补充试玩更新说明聊天入口
新增 /release-notes 试玩更新说明摘要 补充 /next 与 /help 的更新说明入口覆盖 验证 /release-notes 不触发文件读取、运行、预览、导出或 agent 控制 同步 AI 游戏创作 App 技术方案和决策记录
This commit is contained in:
@@ -1895,6 +1895,7 @@ const chatCommandHelp = [
|
||||
'/post:准备社区发布文案',
|
||||
'/store:准备上架资料清单',
|
||||
'/media-kit:准备媒体资料包清单',
|
||||
'/release-notes:准备试玩更新说明',
|
||||
'/criteria:查看当前任务验收标准',
|
||||
'/groups:查看专业组进度',
|
||||
'/balance:查看数值与难度口径',
|
||||
@@ -4331,6 +4332,89 @@ function summarizeProjectMediaKit(
|
||||
};
|
||||
}
|
||||
|
||||
function summarizeProjectReleaseNotes(
|
||||
nextManifest: GameCreationAppManifest,
|
||||
trace: GameCreationAgentRunTrace | null,
|
||||
) {
|
||||
const preview = nextManifest.preview;
|
||||
const previewRunning = preview?.status === 'running' && preview.url;
|
||||
const previewSummary = previewRunning
|
||||
? `运行中 ${preview.url}`
|
||||
: preview
|
||||
? previewStatusLabels[preview.status]
|
||||
: '未启动';
|
||||
const tracePassed = isAgentRunTracePassed(trace);
|
||||
const blockedTrace =
|
||||
trace?.lifecycleStatus === 'killed' ||
|
||||
trace?.status === 'failed' ||
|
||||
trace?.status === 'needs-revision' ||
|
||||
trace?.stopReason === 'max-passes-exhausted';
|
||||
const goal =
|
||||
nextManifest.goal?.trim() ||
|
||||
trace?.goal?.trim() ||
|
||||
trace?.taskGraph.goal?.trim() ||
|
||||
'暂无';
|
||||
const artifacts = trace ? readableArtifactsFromAgentRunTrace(trace) : [];
|
||||
const artifactSummary =
|
||||
artifacts.length > 0
|
||||
? artifacts
|
||||
.slice(0, 4)
|
||||
.map((artifact) => artifact.path)
|
||||
.join(';')
|
||||
: '暂无';
|
||||
const visualAssetCount = nextManifest.assets.filter(isProjectVisualAsset)
|
||||
.length;
|
||||
const audioAssetCount = nextManifest.assets.filter(isProjectAudioAsset)
|
||||
.length;
|
||||
const hasPublishReadme =
|
||||
trace?.artifacts.some(
|
||||
(artifact) => artifact.path === 'exports/README.md',
|
||||
) ?? false;
|
||||
|
||||
let draftCommand = '/media-kit';
|
||||
let draftCommandLabel = '准备资料包';
|
||||
if (!trace) {
|
||||
draftCommand = '/next';
|
||||
draftCommandLabel = '查看下一步';
|
||||
} else if (blockedTrace) {
|
||||
draftCommand = '/review';
|
||||
draftCommandLabel = '查看评审';
|
||||
} else if (!tracePassed) {
|
||||
draftCommand = '/trace';
|
||||
draftCommandLabel = '查看 trace';
|
||||
} else if (!previewRunning) {
|
||||
draftCommand = '/run';
|
||||
draftCommandLabel = '启动试玩';
|
||||
} else if (hasPublishReadme) {
|
||||
draftCommand = '/read exports/README.md';
|
||||
draftCommandLabel = '读发布说明';
|
||||
}
|
||||
|
||||
return {
|
||||
text: [
|
||||
'试玩更新说明:',
|
||||
`- 项目:${nextManifest.name}`,
|
||||
`- 一句话:${goal}`,
|
||||
`- 当前版本:本地 Web 原型 · 小范围试玩 · 预览 ${previewSummary}`,
|
||||
`- Run:${
|
||||
trace
|
||||
? `${trace.runId} · ${formatAgentRunStatus(trace)}`
|
||||
: '暂无最近 run'
|
||||
}`,
|
||||
`- 本轮变化:${tracePassed ? '可试玩版本已通过 Evaluator' : trace ? '仍需返工或复查' : '待生成首个版本'}`,
|
||||
`- 主要产物:${artifactSummary}`,
|
||||
`- 素材变化:视觉素材 ${visualAssetCount} 个;音频素材 ${audioAssetCount} 个`,
|
||||
'- 玩家可见说明:玩法目标;操作方式;胜负 / 重开反馈;当前已知限制',
|
||||
'- 已知限制:本地原型;不承诺账号、云存档、排行榜、付费或长期兼容',
|
||||
'- 搭配:/changes;/media-kit;/post;/store;/share',
|
||||
'- 边界:只准备试玩更新说明;不读取文件;不启动或打开预览;不导出试玩包;不上传云端;不发布作品;不写项目',
|
||||
`- 建议:${draftCommand}`,
|
||||
].join('\n'),
|
||||
draftCommand,
|
||||
draftCommandLabel,
|
||||
};
|
||||
}
|
||||
|
||||
function summarizeProjectAcceptanceCriteria(
|
||||
nextManifest: GameCreationAppManifest,
|
||||
trace: GameCreationAgentRunTrace | null,
|
||||
@@ -5775,6 +5859,7 @@ function summarizeNextProjectActions(
|
||||
addSuggestion('准备社区发布文案', '/post');
|
||||
addSuggestion('准备上架资料清单', '/store');
|
||||
addSuggestion('准备媒体资料包清单', '/media-kit');
|
||||
addSuggestion('准备试玩更新说明', '/release-notes');
|
||||
|
||||
const readyTasks = selectGameCreationAppReadyTasks({
|
||||
tasks: taskRowsFromManifest(nextManifest),
|
||||
@@ -9936,6 +10021,23 @@ export function App() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (prompt === '/release-notes') {
|
||||
if (!requireChatProjectForUserAction()) {
|
||||
return;
|
||||
}
|
||||
const summary = summarizeProjectReleaseNotes(manifest, agentRunTrace);
|
||||
setMessages((current) => [
|
||||
...current,
|
||||
{
|
||||
role: 'assistant',
|
||||
text: summary.text,
|
||||
draftCommand: summary.draftCommand,
|
||||
draftCommandLabel: summary.draftCommandLabel,
|
||||
},
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (prompt === '/criteria') {
|
||||
if (!requireChatProjectForUserAction()) {
|
||||
return;
|
||||
|
||||
@@ -4755,6 +4755,7 @@ describe('AI 游戏创作 App 界面边界', () => {
|
||||
expect(screen.getByText(/准备社区发布文案:\/post/)).not.toBeNull();
|
||||
expect(screen.getByText(/准备上架资料清单:\/store/)).not.toBeNull();
|
||||
expect(screen.getByText(/准备媒体资料包清单:\/media-kit/)).not.toBeNull();
|
||||
expect(screen.getByText(/准备试玩更新说明:\/release-notes/)).not.toBeNull();
|
||||
expect(screen.getByText(/查看素材署名与来源:\/credits/)).not.toBeNull();
|
||||
expect(screen.getByText(/查看美术素材:\/art/)).not.toBeNull();
|
||||
expect(screen.getByText(/查看发布准备清单:\/publish/)).not.toBeNull();
|
||||
@@ -6183,6 +6184,124 @@ describe('AI 游戏创作 App 界面边界', () => {
|
||||
invoke.mock.calls.filter(([command]) => command === 'control_agent_run'),
|
||||
).toHaveLength(commandCountsBeforeMediaKit.controlAgentRun);
|
||||
|
||||
const commandCountsBeforeReleaseNotes = {
|
||||
manifestRead: invoke.mock.calls.filter(
|
||||
([command]) => command === 'get_local_game_manifest',
|
||||
).length,
|
||||
fileRead: invoke.mock.calls.filter(
|
||||
([command]) => command === 'read_local_project_file',
|
||||
).length,
|
||||
fileList: invoke.mock.calls.filter(
|
||||
([command]) => command === 'list_local_project_files',
|
||||
).length,
|
||||
runLocal: invoke.mock.calls.filter(
|
||||
([command]) => command === 'run_limited_local_command',
|
||||
).length,
|
||||
startPreview: invoke.mock.calls.filter(
|
||||
([command]) => command === 'start_local_game_preview',
|
||||
).length,
|
||||
openPreview: invoke.mock.calls.filter(
|
||||
([command]) => command === 'open_local_game_preview',
|
||||
).length,
|
||||
exportPackage: invoke.mock.calls.filter(
|
||||
([command]) => command === 'export_local_project_package',
|
||||
).length,
|
||||
exportList: invoke.mock.calls.filter(
|
||||
([command]) => command === 'list_local_project_export_packages',
|
||||
).length,
|
||||
controlAgentRun: invoke.mock.calls.filter(
|
||||
([command]) => command === 'control_agent_run',
|
||||
).length,
|
||||
};
|
||||
submitChat('/release-notes');
|
||||
const releaseNotesMessages = await screen.findAllByText(/试玩更新说明:/);
|
||||
const releaseNotesMessage =
|
||||
releaseNotesMessages[releaseNotesMessages.length - 1];
|
||||
expect(releaseNotesMessage.textContent).toContain('项目:未命名游戏原型');
|
||||
expect(releaseNotesMessage.textContent).toContain(
|
||||
'一句话:做一个厨房弹幕游戏',
|
||||
);
|
||||
expect(releaseNotesMessage.textContent).toContain(
|
||||
'当前版本:本地 Web 原型 · 小范围试玩 · 预览 未启动',
|
||||
);
|
||||
expect(releaseNotesMessage.textContent).toContain(
|
||||
'Run:run-main-shortcut-trace · passed / done · 1/3 轮 · evaluator-passed',
|
||||
);
|
||||
expect(releaseNotesMessage.textContent).toContain(
|
||||
'本轮变化:可试玩版本已通过 Evaluator',
|
||||
);
|
||||
expect(releaseNotesMessage.textContent).toContain(
|
||||
'主要产物:exports/README.md;.agent/passes/pass-1/agenda.md',
|
||||
);
|
||||
expect(releaseNotesMessage.textContent).toContain(
|
||||
'素材变化:视觉素材 1 个;音频素材 0 个',
|
||||
);
|
||||
expect(releaseNotesMessage.textContent).toContain(
|
||||
'玩家可见说明:玩法目标;操作方式;胜负 / 重开反馈;当前已知限制',
|
||||
);
|
||||
expect(releaseNotesMessage.textContent).toContain(
|
||||
'已知限制:本地原型;不承诺账号、云存档、排行榜、付费或长期兼容',
|
||||
);
|
||||
expect(releaseNotesMessage.textContent).toContain(
|
||||
'搭配:/changes;/media-kit;/post;/store;/share',
|
||||
);
|
||||
expect(releaseNotesMessage.textContent).toContain(
|
||||
'边界:只准备试玩更新说明;不读取文件;不启动或打开预览;不导出试玩包;不上传云端;不发布作品;不写项目',
|
||||
);
|
||||
expect(releaseNotesMessage.textContent).toContain('建议:/run');
|
||||
const releaseNotesMessageList = document.querySelector('.message-list');
|
||||
expect(releaseNotesMessageList).not.toBeNull();
|
||||
const releaseNotesDraftButtons = within(
|
||||
releaseNotesMessageList as HTMLElement,
|
||||
).getAllByRole('button', { name: '启动试玩' });
|
||||
fireEvent.click(
|
||||
releaseNotesDraftButtons[releaseNotesDraftButtons.length - 1],
|
||||
);
|
||||
expect(screen.getByLabelText('创作想法')).toHaveProperty('value', '/run');
|
||||
expect(
|
||||
invoke.mock.calls.filter(
|
||||
([command]) => command === 'get_local_game_manifest',
|
||||
),
|
||||
).toHaveLength(commandCountsBeforeReleaseNotes.manifestRead);
|
||||
expect(
|
||||
invoke.mock.calls.filter(
|
||||
([command]) => command === 'read_local_project_file',
|
||||
),
|
||||
).toHaveLength(commandCountsBeforeReleaseNotes.fileRead);
|
||||
expect(
|
||||
invoke.mock.calls.filter(
|
||||
([command]) => command === 'list_local_project_files',
|
||||
),
|
||||
).toHaveLength(commandCountsBeforeReleaseNotes.fileList);
|
||||
expect(
|
||||
invoke.mock.calls.filter(
|
||||
([command]) => command === 'run_limited_local_command',
|
||||
),
|
||||
).toHaveLength(commandCountsBeforeReleaseNotes.runLocal);
|
||||
expect(
|
||||
invoke.mock.calls.filter(
|
||||
([command]) => command === 'start_local_game_preview',
|
||||
),
|
||||
).toHaveLength(commandCountsBeforeReleaseNotes.startPreview);
|
||||
expect(
|
||||
invoke.mock.calls.filter(
|
||||
([command]) => command === 'open_local_game_preview',
|
||||
),
|
||||
).toHaveLength(commandCountsBeforeReleaseNotes.openPreview);
|
||||
expect(
|
||||
invoke.mock.calls.filter(
|
||||
([command]) => command === 'export_local_project_package',
|
||||
),
|
||||
).toHaveLength(commandCountsBeforeReleaseNotes.exportPackage);
|
||||
expect(
|
||||
invoke.mock.calls.filter(
|
||||
([command]) => command === 'list_local_project_export_packages',
|
||||
),
|
||||
).toHaveLength(commandCountsBeforeReleaseNotes.exportList);
|
||||
expect(
|
||||
invoke.mock.calls.filter(([command]) => command === 'control_agent_run'),
|
||||
).toHaveLength(commandCountsBeforeReleaseNotes.controlAgentRun);
|
||||
|
||||
const commandCountsBeforeFeedback = {
|
||||
manifestRead: invoke.mock.calls.filter(
|
||||
([command]) => command === 'get_local_game_manifest',
|
||||
@@ -12160,6 +12279,7 @@ describe('AI 游戏创作 App 界面边界', () => {
|
||||
expect(screen.getByText(/\/post:准备社区发布文案/)).not.toBeNull();
|
||||
expect(screen.getByText(/\/store:准备上架资料清单/)).not.toBeNull();
|
||||
expect(screen.getByText(/\/media-kit:准备媒体资料包清单/)).not.toBeNull();
|
||||
expect(screen.getByText(/\/release-notes:准备试玩更新说明/)).not.toBeNull();
|
||||
expect(screen.getByText(/\/criteria:查看当前任务验收标准/)).not.toBeNull();
|
||||
expect(screen.getByText(/\/groups:查看专业组进度/)).not.toBeNull();
|
||||
expect(screen.getByText(/\/balance:查看数值与难度口径/)).not.toBeNull();
|
||||
|
||||
@@ -3905,6 +3905,7 @@
|
||||
- 2026-07-04 调整:普通用户通过聊天输入 `/post` 准备社区发布文案,只基于主窗口当前已加载的 manifest、最近 run trace、preview 和资产状态汇总短文案、长文案结构、标签建议和 CTA,并提供 `/run`、`/store`、`/review`、`/trace` 或 `/next` 草稿;该入口不得触发 Tauri 读写、不得上传云端、不得发布作品、不得读取文件、不得启动或打开预览、不得导出试玩包、不得写项目,也不得新增普通用户社区发布面板。
|
||||
- 2026-07-04 调整:普通用户通过聊天输入 `/store` 准备上架资料清单,只基于主窗口当前已加载的 manifest、最近 run trace、preview、资产和发布说明状态汇总必备资料、首发范围、上架前检查和参考命令,并提供 `/run`、`/listing`、`/review`、`/trace`、`/read exports/README.md` 或 `/next` 草稿;该入口不得触发 Tauri 读写、不得上传云端、不得发布作品、不得读取文件、不得启动或打开预览、不得导出试玩包、不得写项目,也不得新增普通用户上架面板。
|
||||
- 2026-07-04 调整:普通用户通过聊天输入 `/media-kit` 准备媒体资料包清单,只基于主窗口当前已加载的 manifest、最近 run trace、preview、资产和发布说明状态汇总对外资料、素材缺口、组装顺序和参考命令,并提供 `/run`、`/screenshots`、`/review`、`/trace`、`/read exports/README.md` 或 `/next` 草稿;该入口不得触发 Tauri 读写、不得截屏、不得录屏、不得读取文件、不得启动或打开预览、不得导出试玩包、不得上传云端、不得发布作品、不得写项目,也不得新增普通用户媒体包面板。
|
||||
- 2026-07-04 调整:普通用户通过聊天输入 `/release-notes` 准备试玩更新说明,只基于主窗口当前已加载的 manifest、最近 run trace、preview、资产和发布说明状态汇总本轮变化、主要产物、玩家可见说明和已知限制,并提供 `/run`、`/media-kit`、`/review`、`/trace`、`/read exports/README.md` 或 `/next` 草稿;该入口不得触发 Tauri 读写、不得读取文件、不得启动或打开预览、不得导出试玩包、不得上传云端、不得发布作品、不得写项目,也不得新增普通用户更新说明面板。
|
||||
- 2026-07-03 调整:普通用户通过聊天输入 `/feedback` 准备试玩反馈和修改说明,只基于当前 manifest、最近 run trace 和 preview 状态列出反馈方向、反馈模板和参考命令,并提供 `/run`、`/agent-resume 试玩反馈:`、`/review` 或 `/next` 草稿;该入口不得触发 Tauri 读写、不得读取文件、不得启动或打开预览、不得直接继续 run,也不得新增普通用户反馈面板。
|
||||
- 2026-07-03 调整:普通用户通过聊天输入 `/listing` 准备作品页文案清单,只基于当前 manifest、最近 run trace、发布组任务和资产清单汇总标题、一句话卖点、标签口径、封面素材、发布说明和最近运营步骤,并提供 `/read exports/README.md`、`/review`、`/art`、`/publish` 或 `/next` 草稿;该入口不得触发 Tauri 读写、不得读取发布说明、不得上传云端、不得发布作品,也不得新增普通用户作品页面板。
|
||||
- 2026-07-03 调整:普通用户通过聊天输入 `/handoff` 生成当前项目交接摘要,只基于主窗口当前已加载的 manifest、授权项目路径、最近 run trace、Agent 状态和已加载 run 历史生成交接信息,并提供 `/next` 后续草稿;该入口不得触发 Tauri 读写、不得读取文件、不得启动或打开预览,也不得新增普通用户面板。
|
||||
@@ -3918,7 +3919,7 @@
|
||||
- 2026-07-03 调整:普通用户通过聊天输入 `/balance` 查看数值与难度口径,只基于当前 manifest.tasks、最近 run trace.taskGraph、trace artifacts 和 steps 汇总数值组任务、验收口径、`game/balance.json` 状态和最近数值步骤,并提供 `/read game/balance.json` 或 `/agent-resume 数值调整:...` 草稿;该入口不得触发 Tauri 读写、不得读取数值表、不得启动预览或继续 run,也不得新增普通用户数值面板。
|
||||
- 2026-07-03 调整:主窗口新增常用生成产物读取入口,只把入口 HTML、设计、数值、美术清单、音频清单和发布说明对应的 `/read` 草稿填入聊天输入框;聊天命令 `/artifacts` 只列出同一组固定读取命令并提供首个读取草稿,`/run-artifacts` 只列出最近 trace 里的产物读取命令并提供首个 `/read` 草稿,`/logs` 只列出固定日志读取命令;实际读取仍走聊天侧 `file.read` 权限流,不直接读本地文件。
|
||||
- 2026-07-03 调整:普通用户通过聊天输入 `/share` 准备试玩交付清单,只基于当前 manifest、授权项目路径、最近 run trace、preview 状态和 manifest.commandRuns 汇总原型通过状态、本地预览、本地试玩包、测试者说明和反馈收集方向,并提供 `/export`、`/exports`、`/trace`、`/review` 或 `/next` 草稿;该入口不得触发 Tauri 读写、不得导出试玩包、不得列出历史包、不得上传云端、不得生成公开分享链接,也不得新增普通用户分享面板。
|
||||
- 2026-07-03 调整,2026-07-04 更新:普通用户通过聊天输入 `/next` 触发下一步建议入口,只基于主窗口当前已加载的 manifest、最近 run trace 和最近命令摘要生成聊天建议,列出 `/goal`、`/spec`、`/mvp`、`/pitch`、`/demo`、`/rules`、`/tutorial`、`/mobile`、`/accessibility`、`/performance`、`/polish`、`/blockers`、`/ready`、`/deps`、`/revise`、`/privacy`、`/audience`、`/invite`、`/bug-report`、`/survey`、`/screenshots`、`/trailer`、`/faq`、`/post`、`/store`、`/media-kit`、`/tasks`、`/criteria`、`/groups`、`/balance`、`/budget`、`/qa`、`/changes`、`/todo`、`/trace`、`/review`、`/context`、`/timeline`、`/playtest`、`/test-plan`、`/feedback`、`/share`、`/listing`、`/run`、`/open-preview`、`/assets`、`/credits`、`/art`、`/audio`、`/publish`、`/artifacts`、`/run-artifacts`、`/passes`、`/run-files`、`/internals`、`/logs`、`/agent-resume ` 等安全命令草稿方向,并提供一个首选草稿;该命令不得直接执行 Tauri 读写、启动或打开预览、读取本地文件,也不得绕过原有命令确认和 `file.read` 权限流。
|
||||
- 2026-07-03 调整,2026-07-04 更新:普通用户通过聊天输入 `/next` 触发下一步建议入口,只基于主窗口当前已加载的 manifest、最近 run trace 和最近命令摘要生成聊天建议,列出 `/goal`、`/spec`、`/mvp`、`/pitch`、`/demo`、`/rules`、`/tutorial`、`/mobile`、`/accessibility`、`/performance`、`/polish`、`/blockers`、`/ready`、`/deps`、`/revise`、`/privacy`、`/audience`、`/invite`、`/bug-report`、`/survey`、`/screenshots`、`/trailer`、`/faq`、`/post`、`/store`、`/media-kit`、`/release-notes`、`/tasks`、`/criteria`、`/groups`、`/balance`、`/budget`、`/qa`、`/changes`、`/todo`、`/trace`、`/review`、`/context`、`/timeline`、`/playtest`、`/test-plan`、`/feedback`、`/share`、`/listing`、`/run`、`/open-preview`、`/assets`、`/credits`、`/art`、`/audio`、`/publish`、`/artifacts`、`/run-artifacts`、`/passes`、`/run-files`、`/internals`、`/logs`、`/agent-resume ` 等安全命令草稿方向,并提供一个首选草稿;该命令不得直接执行 Tauri 读写、启动或打开预览、读取本地文件,也不得绕过原有命令确认和 `file.read` 权限流。
|
||||
- 2026-07-03 调整:普通用户通过聊天输入 `/publish` 生成发布准备清单,只基于主窗口当前已加载的 manifest、最近 run trace、预览状态、资产来源和最近命令摘要列出原型通过、预览、任务、资产、音频、包装说明和试玩包状态,并提供 `/run`、`/trace`、`/agent-resume ` 或 `/export` 草稿;该入口不得触发 Tauri 读写、不得启动或打开预览、不得读取文件,也不得新增普通用户发布面板。
|
||||
- 2026-07-03 调整:普通用户通过聊天输入 `/internals` 只列出 `.agent/manifest.json`、`.agent/run.latest.json`、`.agent/spec.md`、`.agent/findings.md`、`.agent/policy.json`、`.agent/project.index.json`、`.agent/agent.db` 和 `.agent/conversations/project.jsonl` 的 `/read` 草稿,并提供首个读取草稿;该入口不得直接读取内部文件、不得触发 Tauri 读写,也不得新增普通用户内部文件面板。
|
||||
- 2026-07-03 调整:普通用户通过聊天输入 `/passes` 只从当前已加载的最近 run trace artifacts 中筛选 `.agent/passes/` 轮次产物,列出 `/read` 草稿并提供首个读取草稿;该入口不得直接读取轮次文件、不得触发 Tauri 读写,也不得新增普通用户轮次面板。
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user