@playcraft/cli 0.0.57 → 0.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -16
- package/dist/cli-root-help.js +1 -0
- package/dist/commands/build-all.js +10 -9
- package/dist/commands/build.js +13 -12
- package/dist/commands/create.js +26 -33
- package/dist/commands/platform-skills.generated.js +19 -0
- package/dist/commands/skills.js +2 -0
- package/dist/commands/tools-generation.js +1 -1
- package/dist/commands/workspace-runtime.js +54 -0
- package/dist/index.js +3 -1
- package/dist/project-skills/commands.js +72 -0
- package/dist/project-skills/lifecycle.js +28 -0
- package/dist/project-skills/local-run.js +112 -0
- package/dist/project-skills/local-store.js +149 -0
- package/dist/project-skills/messages.js +72 -0
- package/dist/project-skills/reconcile.js +62 -0
- package/dist/project-skills/remote-cache.js +51 -0
- package/dist/project-skills/validation.js +19 -0
- package/dist/remix/clone.js +2 -0
- package/dist/remix/init-template.js +2 -0
- package/dist/remix/pull.js +2 -0
- package/dist/remix/push.js +21 -1
- package/dist/utils/agent-api-client.js +54 -17
- package/dist/utils/tool-operation-journal.js +54 -0
- package/dist/workspace-runtime/codex/app-server.js +395 -0
- package/dist/workspace-runtime/codex/config-toml.js +25 -0
- package/dist/workspace-runtime/codex/jsonrpc-stdio.js +106 -0
- package/dist/workspace-runtime/codex/loopback.js +59 -0
- package/dist/workspace-runtime/codex/native-adapter.js +3 -0
- package/dist/workspace-runtime/main.js +10 -0
- package/dist/workspace-runtime/persistence/journal.js +350 -0
- package/dist/workspace-runtime/processes/managed-writes.js +69 -0
- package/dist/workspace-runtime/serve.js +111 -0
- package/dist/workspace-runtime/server/auth.js +21 -0
- package/dist/workspace-runtime/server/dispatch.js +861 -0
- package/dist/workspace-runtime/server/execution-group.js +88 -0
- package/dist/workspace-runtime/server/http.js +561 -0
- package/dist/workspace-runtime/server/lock.js +53 -0
- package/dist/workspace-runtime/server/types.js +1 -0
- package/dist/workspace-runtime/workspaces/context-error.js +2 -0
- package/dist/workspace-runtime/workspaces/file-snapshot.js +213 -0
- package/dist/workspace-runtime/workspaces/files.js +143 -0
- package/dist/workspace-runtime/workspaces/git.js +242 -0
- package/dist/workspace-runtime/workspaces/json5-edit.js +170 -0
- package/dist/workspace-runtime/workspaces/parameters.js +272 -0
- package/dist/workspace-runtime/workspaces/prepare.js +364 -0
- package/dist/workspace-runtime/workspaces/registry.js +107 -0
- package/dist/workspace-runtime/workspaces/revisions.js +31 -0
- package/package.json +4 -1
- package/project-template-v2/.claude/agents/artist.md +82 -0
- package/project-template-v2/.claude/agents/developer.md +153 -0
- package/project-template-v2/.claude/agents/game-designer.md +264 -0
- package/project-template-v2/.claude/agents/refs/artist-art-style-catalog.md +533 -0
- package/project-template-v2/.claude/agents/refs/artist-color-audio-recipes.md +153 -0
- package/project-template-v2/.claude/agents/refs/artist-dimension-axis.md +27 -0
- package/project-template-v2/.claude/agents/refs/artist-master-composite-recipes.md +208 -0
- package/project-template-v2/.claude/agents/refs/atom-skill-library.md +81 -0
- package/project-template-v2/.claude/agents/refs/developer-impl-cookbook.md +432 -0
- package/project-template-v2/.claude/agents/refs/framework-5-component-filter.md +252 -0
- package/project-template-v2/.claude/agents/refs/framework-game-feel-juice.md +266 -0
- package/project-template-v2/.claude/agents/refs/framework-mda.md +147 -0
- package/project-template-v2/.claude/agents/refs/game-designer-gameplay-sufficiency.md +123 -0
- package/project-template-v2/.claude/agents/refs/ta-3d-flip-recipe.md +88 -0
- package/project-template-v2/.claude/agents/refs/ta-atlas-deliverable-standard.md +67 -0
- package/project-template-v2/.claude/agents/refs/ta-batch-pipeline-recipes.md +120 -0
- package/project-template-v2/.claude/agents/refs/ta-image-generation-detail.md +300 -0
- package/project-template-v2/.claude/agents/refs/ta-image-ops-reference.md +495 -0
- package/project-template-v2/.claude/agents/refs/ta-pipeline-cookbook.md +1141 -0
- package/project-template-v2/.claude/agents/refs/ta-tools-reference.md +111 -0
- package/project-template-v2/.claude/agents/refs/ta-vfx-preset-catalog.md +365 -0
- package/project-template-v2/.claude/agents/refs/threejs-cannon-pitfalls.md +412 -0
- package/project-template-v2/.claude/agents/reviewer.md +75 -0
- package/project-template-v2/.claude/agents/technical-artist.md +86 -0
- package/project-template-v2/.claude/hooks/snapshot-milestone.mjs +243 -0
- package/project-template-v2/.claude/hooks/user-prompt.mjs +133 -0
- package/project-template-v2/.claude/settings.json +33 -0
- package/project-template-v2/.claude/skills/brainstorming/SKILL.md +161 -0
- package/project-template-v2/.claude/skills/brainstorming/scripts/frame-template.html +270 -0
- package/project-template-v2/.claude/skills/brainstorming/scripts/helper.js +177 -0
- package/project-template-v2/.claude/skills/brainstorming/scripts/server.cjs +354 -0
- package/project-template-v2/.claude/skills/brainstorming/scripts/start-server.sh +148 -0
- package/project-template-v2/.claude/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/project-template-v2/.claude/skills/brainstorming/scripts/wait-for-selection.sh +62 -0
- package/project-template-v2/.claude/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/project-template-v2/.claude/skills/brainstorming/visual-companion.md +309 -0
- package/project-template-v2/.claude/skills/playcraft-ad-psychology/SKILL.md +182 -0
- package/project-template-v2/.claude/skills/playcraft-art-style-guide/SKILL.md +123 -0
- package/project-template-v2/.claude/skills/playcraft-asset-state-sheet/SKILL.md +205 -0
- package/project-template-v2/.claude/skills/playcraft-audio-generation/SKILL.md +280 -0
- package/project-template-v2/.claude/skills/playcraft-batch-pipeline/SKILL.md +184 -0
- package/project-template-v2/.claude/skills/playcraft-build-optimizer/SKILL.md +306 -0
- package/project-template-v2/.claude/skills/playcraft-image-generation/SKILL.md +298 -0
- package/project-template-v2/.claude/skills/playcraft-image-generation/reference/build-sprite-sheet.template.mjs +123 -0
- package/project-template-v2/.claude/skills/playcraft-image-generation/reference/compare-style.template.mjs +254 -0
- package/project-template-v2/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +324 -0
- package/project-template-v2/.claude/skills/playcraft-image-generation/reference/gen-batch.template.mjs +97 -0
- package/project-template-v2/.claude/skills/playcraft-image-generation/reference/gen-edit-variants.template.mjs +118 -0
- package/project-template-v2/.claude/skills/playcraft-image-generation/reference/process-batch.template.mjs +137 -0
- package/project-template-v2/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +397 -0
- package/project-template-v2/.claude/skills/playcraft-image-generation/reference/validate-sprite-sheet.template.mjs +296 -0
- package/project-template-v2/.claude/skills/playcraft-image-ops/SKILL.md +122 -0
- package/project-template-v2/.claude/skills/playcraft-image-processing/SKILL.md +219 -0
- package/project-template-v2/.claude/skills/playcraft-masking/SKILL.md +373 -0
- package/project-template-v2/.claude/skills/playcraft-playable-optimization/SKILL.md +161 -0
- package/project-template-v2/.claude/skills/playcraft-research/SKILL.md +215 -0
- package/project-template-v2/.claude/skills/playcraft-skill-recommender/SKILL.md +382 -0
- package/project-template-v2/.claude/skills/playcraft-sprite-generation/SKILL.md +423 -0
- package/project-template-v2/.claude/skills/playcraft-sprite-remix/SKILL.md +158 -0
- package/project-template-v2/.claude/skills/playcraft-sprite-sheet/SKILL.md +100 -0
- package/project-template-v2/.claude/skills/playcraft-storyboard/SKILL.md +167 -0
- package/project-template-v2/.claude/skills/playcraft-style-qa/SKILL.md +270 -0
- package/project-template-v2/.claude/skills/playcraft-text-rendering/SKILL.md +236 -0
- package/project-template-v2/.claude/skills/playcraft-vfx-animation/SKILL.md +130 -0
- package/project-template-v2/.claude/skills/playwright-cli/SKILL.md +390 -0
- package/project-template-v2/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
- package/project-template-v2/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/project-template-v2/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
- package/project-template-v2/.claude/skills/playwright-cli/references/running-code.md +240 -0
- package/project-template-v2/.claude/skills/playwright-cli/references/session-management.md +226 -0
- package/project-template-v2/.claude/skills/playwright-cli/references/spec-driven-testing.md +308 -0
- package/project-template-v2/.claude/skills/playwright-cli/references/storage-state.md +275 -0
- package/project-template-v2/.claude/skills/playwright-cli/references/test-generation.md +134 -0
- package/project-template-v2/.claude/skills/playwright-cli/references/tracing.md +142 -0
- package/project-template-v2/.claude/skills/playwright-cli/references/video-recording.md +153 -0
- package/project-template-v2/.claude/skills/session-analyzer/SKILL.md +386 -0
- package/project-template-v2/.claude/skills/session-analyzer/scripts/execution-breakdown.mjs +182 -0
- package/project-template-v2/.claude/skills/session-analyzer/scripts/find-turns.mjs +72 -0
- package/project-template-v2/.claude/skills/session-analyzer/scripts/heavy-output.mjs +121 -0
- package/project-template-v2/.claude/skills/session-analyzer/scripts/resolve-session.mjs +102 -0
- package/project-template-v2/.claude/skills/session-analyzer/scripts/subagent-stats.mjs +127 -0
- package/project-template-v2/.claude/skills/session-analyzer/scripts/subagent-tool-timeline.mjs +106 -0
- package/project-template-v2/.claude/skills/session-analyzer/scripts/time-gaps.mjs +128 -0
- package/project-template-v2/.claude/skills/session-analyzer/scripts/turn-timeline.mjs +67 -0
- package/project-template-v2/.claude/snapshot.mjs +263 -0
- package/project-template-v2/.playcraft/skills.lock.json +152 -0
- package/project-template-v2/CLAUDE.md +146 -0
- package/project-template-v2/assets/audio/bgm/.gitkeep +0 -0
- package/project-template-v2/assets/audio/sfx/.gitkeep +0 -0
- package/project-template-v2/assets/bundles/.gitkeep +0 -0
- package/project-template-v2/assets/images/bg/.gitkeep +0 -0
- package/project-template-v2/assets/images/reference/.gitkeep +0 -0
- package/project-template-v2/assets/images/storyboard/.gitkeep +0 -0
- package/project-template-v2/assets/images/tiles/.gitkeep +0 -0
- package/project-template-v2/assets/images/ui/.gitkeep +0 -0
- package/project-template-v2/assets/images/vfx/.gitkeep +0 -0
- package/project-template-v2/assets/models/.gitkeep +0 -0
- package/project-template-v2/docs/harness/iteration-1/context-flow.md +254 -0
- package/project-template-v2/docs/harness/iteration-1/generate-flow.md +91 -0
- package/project-template-v2/docs/harness/iteration-1/ideate-flow.md +214 -0
- package/project-template-v2/docs/harness/iteration-1/optimize-flow.md +75 -0
- package/project-template-v2/docs/harness/iteration-1/wrapup-flow.md +63 -0
- package/project-template-v2/docs/harness/iteration-2/context-flow.md +223 -0
- package/project-template-v2/docs/harness/iteration-2/generate-flow.md +129 -0
- package/project-template-v2/docs/harness/iteration-2/ideate-flow.md +267 -0
- package/project-template-v2/docs/harness/iteration-2/optimize-flow.md +164 -0
- package/project-template-v2/docs/harness/iteration-2/wrapup-flow.md +115 -0
- package/project-template-v2/docs/harness/orchestrator-flow.md +364 -0
- package/project-template-v2/docs/project-state.json +60 -0
- package/project-template-v2/docs/project-state.md +72 -0
- package/project-template-v2/docs/standards/README.md +225 -0
- package/project-template-v2/docs/standards/agent-behavior-standards.md +174 -0
- package/project-template-v2/docs/standards/artifacts/design-brief.md +19 -0
- package/project-template-v2/docs/standards/artifacts/design.md +22 -0
- package/project-template-v2/docs/standards/artifacts/game-code.md +41 -0
- package/project-template-v2/docs/standards/artifacts/todo-list.md +41 -0
- package/project-template-v2/docs/standards/iter1-agent-behavior-standards.md +343 -0
- package/project-template-v2/game/index.ts +18 -0
- package/project-template-v2/globals.d.ts +51 -0
- package/project-template-v2/index.css +34 -0
- package/project-template-v2/index.html +18 -0
- package/project-template-v2/main.ts +9 -0
- package/project-template-v2/package.json +46 -0
- package/project-template-v2/skills/_shared/scripts/dispatch-clear.mjs +31 -0
- package/project-template-v2/skills/_shared/scripts/dispatch-set.mjs +86 -0
- package/project-template-v2/skills/_shared/scripts/dod-check.mjs +153 -0
- package/project-template-v2/skills/_shared/scripts/handoff-append.mjs +70 -0
- package/project-template-v2/skills/_shared/scripts/lib/validator-artifacts.mjs +91 -0
- package/project-template-v2/skills/_shared/scripts/pipeline/dod-config.mjs +131 -0
- package/project-template-v2/skills/_shared/scripts/pipeline/index.mjs +80 -0
- package/project-template-v2/skills/_shared/scripts/pipeline/iteration-1-core.mjs +90 -0
- package/project-template-v2/skills/_shared/scripts/pipeline/iteration-2-wrap.mjs +93 -0
- package/project-template-v2/skills/_shared/scripts/pipeline/iteration-3-visual.mjs +23 -0
- package/project-template-v2/skills/_shared/scripts/render-project-state.mjs +230 -0
- package/project-template-v2/skills/_shared/scripts/state-advance-stage.mjs +58 -0
- package/project-template-v2/skills/_shared/scripts/state-get.mjs +339 -0
- package/project-template-v2/skills/_shared/scripts/state-handoff.mjs +39 -0
- package/project-template-v2/skills/_shared/scripts/state-set.mjs +94 -0
- package/project-template-v2/skills/_shared/scripts/state-store.mjs +783 -0
- package/project-template-v2/skills/_shared/scripts/todo-add.mjs +88 -0
- package/project-template-v2/skills/_shared/scripts/todo-get.mjs +130 -0
- package/project-template-v2/skills/_shared/scripts/todo-remove.mjs +33 -0
- package/project-template-v2/skills/_shared/scripts/todo-set.mjs +47 -0
- package/project-template-v2/skills/_shared/scripts/verify-asset-code-sync.mjs +268 -0
- package/project-template-v2/skills/_shared/scripts/verify-env.mjs +285 -0
- package/project-template-v2/skills/_shared/scripts/verify-placeholders.mjs +161 -0
- package/project-template-v2/skills/playable-autoplay/SKILL.md +176 -0
- package/project-template-v2/skills/playable-autoplay/agents/openai.yaml +4 -0
- package/project-template-v2/skills/playable-debug/SKILL.md +116 -0
- package/project-template-v2/skills/playable-debug/agents/openai.yaml +4 -0
- package/project-template-v2/skills/playable-debug/references/debug-config.md +40 -0
- package/project-template-v2/skills/playable-record/SKILL.md +140 -0
- package/project-template-v2/skills/playable-record/scripts/lib/dev-server.mjs +104 -0
- package/project-template-v2/skills/playable-record/scripts/lib/record-audio-bridge.js +141 -0
- package/project-template-v2/skills/playable-record/scripts/record-playable.mjs +425 -0
- package/project-template-v2/skills/playable-record/scripts/verify-contract.mjs +261 -0
- package/project-template-v2/skills/playable-record/scripts/verify-firstwin.mjs +398 -0
- package/project-template-v2/skills/playable-record/scripts/verify-fusion.mjs +322 -0
- package/project-template-v2/skills/playable-record/scripts/verify-lifecycle.mjs +105 -0
- package/project-template-v2/skills/playable-record/scripts/verify-vlm-video.mjs +230 -0
- package/project-template-v2/skills/playable-validate/SKILL.md +61 -0
- package/project-template-v2/skills/playable-validate/validation-rules.md +14 -0
- package/project-template-v2/skills/playable-verify-ui/SKILL.md +63 -0
- package/project-template-v2/skills/playable-verify-ui/scripts/lib/__init__.py +1 -0
- package/project-template-v2/skills/playable-verify-ui/scripts/lib/config_expr.js +218 -0
- package/project-template-v2/skills/playable-verify-ui/scripts/lib/node_utils.js +51 -0
- package/project-template-v2/skills/playable-verify-ui/scripts/lib/profile_loader.py +59 -0
- package/project-template-v2/skills/playable-verify-ui/scripts/lib/report.py +106 -0
- package/project-template-v2/skills/playable-verify-ui/scripts/lib/runtime_contract.js +116 -0
- package/project-template-v2/skills/playable-verify-ui/scripts/verify_fetch_antipatterns.py +59 -0
- package/project-template-v2/skills/playable-verify-ui/scripts/verify_hardcoded_layout.js +64 -0
- package/project-template-v2/skills/playable-verify-ui/scripts/verify_runtime_contract.js +58 -0
- package/project-template-v2/skills/playable-verify-ui/scripts/verify_text_overlap.py +333 -0
- package/project-template-v2/ta-workspace/scripts/.gitkeep +0 -0
- package/project-template-v2/tsconfig.json +20 -0
- package/project-template-v2/vite.config.ts +27 -0
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
# Orchestrator Flow
|
|
2
|
+
|
|
3
|
+
> 调度者运行手册。主会话 agent 读取本文件;具名角色 subagent 不读取本文件。state 用来判断"当前工作应该给谁",不单独判断"当前进程是谁"。
|
|
4
|
+
|
|
5
|
+
## 入口
|
|
6
|
+
|
|
7
|
+
主会话每次接管项目先运行:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm run state:get
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
主会话始终是 orchestrator。用返回值判断下一步控制动作:
|
|
14
|
+
|
|
15
|
+
- `dispatchedRole` 非空 → 当前已有 active dispatch。主会话不要内联执行角色工作,应恢复/调用对应角色读取 dispatch。
|
|
16
|
+
- `dispatchedRole` 为空 → 没有 active dispatch,按当前 `pipeline.stage` 选择下一步。
|
|
17
|
+
- 状态不明确 → 不猜。先修正 state 或写入明确 dispatch。
|
|
18
|
+
|
|
19
|
+
具名角色 subagent 的入口是:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm run state:get -- --json dispatch
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
如果 `dispatch.role` 不是自己,subagent 停止并说明未被派发;subagent 不能升级成 orchestrator。
|
|
26
|
+
|
|
27
|
+
## 主循环
|
|
28
|
+
|
|
29
|
+
1. 读 orchestrator view:
|
|
30
|
+
```bash
|
|
31
|
+
npm run state:get
|
|
32
|
+
```
|
|
33
|
+
2. 识别 `pipeline.iteration` / `pipeline.stage`。
|
|
34
|
+
3. 读取当前阶段 flow。flow 路径由当前 iteration 决定:
|
|
35
|
+
- `docs/harness/iteration-1/ideate-flow.md`
|
|
36
|
+
- `docs/harness/iteration-1/context-flow.md`
|
|
37
|
+
- `docs/harness/iteration-1/generate-flow.md`
|
|
38
|
+
- `docs/harness/iteration-1/optimize-flow.md`
|
|
39
|
+
- `docs/harness/iteration-1/wrapup-flow.md`
|
|
40
|
+
- `docs/harness/iteration-2/ideate-flow.md`
|
|
41
|
+
- `docs/harness/iteration-2/context-flow.md`
|
|
42
|
+
- `docs/harness/iteration-2/generate-flow.md`
|
|
43
|
+
- `docs/harness/iteration-2/optimize-flow.md`
|
|
44
|
+
- `docs/harness/iteration-2/wrapup-flow.md`
|
|
45
|
+
调度者也可从 `state:get` / pipeline spec 暴露的 `flowRef` 确认具体路径;不要在 iteration 2 继续读取 iteration 1 flow。进入 iteration 2 ideate 前,调度者先清空并复制当前 `docs/` 到 `docs-last/`,供后续差异分析使用。
|
|
46
|
+
4. 结合 orchestrator view 中的 `stageExit`、`dispatchableRoles`、`canWriteTodo`、`todoPool`、`stageDod` 判断下一步。
|
|
47
|
+
5. 如果已有 `dispatchedRole`,恢复/调用该角色继续执行当前 dispatch。
|
|
48
|
+
6. 需要新角色执行时,先把当前阶段 flow 收窄成一张角色工单(`dispatch`),再派发对应角色。
|
|
49
|
+
7. 角色 STOP 后,读取 handoff,由 orchestrator 决定 todo 状态、失败处理、继续派发或推进阶段。
|
|
50
|
+
8. 当前 dispatch 已处理完毕后,清空 dispatch;否则主会话重新进入时会继续恢复同一角色。
|
|
51
|
+
|
|
52
|
+
如果 `state:get` 显示 `pendingUserInput.status=awaiting_user_input`,当前 dispatch 仍 active 但任务暂停等待用户输入。不要清空 dispatch,不要新建 dispatch,也不要新开 subagent;先按"用户确认"里的 relay 协议问用户,再用 `sendMessage` 恢复同一个 subagent 会话。
|
|
53
|
+
|
|
54
|
+
## Subagent 调用权限
|
|
55
|
+
|
|
56
|
+
调度者调用具名角色 subagent 时,运行模式必须设为 `bypassPermissions`。这是 subagent 工具调用参数,不是 `state.dispatch` 字段。
|
|
57
|
+
|
|
58
|
+
- 新建 role subagent 时:使用 `mode=bypassPermissions`。
|
|
59
|
+
- 恢复已有 active dispatch 对应的 subagent 时:仍使用 `mode=bypassPermissions`。
|
|
60
|
+
- 用户 relay 后用 `sendMessage` 恢复同一个 subagent 会话时:仍使用 `mode=bypassPermissions`。
|
|
61
|
+
|
|
62
|
+
不要使用默认权限模式、只读模式或 ask/confirm 模式派发角色。否则 subagent 可能无法按 `allowedFiles` 写产物、调用项目脚本或追加 handoff,导致流程假性阻塞。
|
|
63
|
+
|
|
64
|
+
## 角色信息分发协议
|
|
65
|
+
|
|
66
|
+
派发单位是 `role + title/goal + flowRef + workId`,不是 `stage` 本身。stage 只决定调度者该读哪份 flow、哪些角色可派、退出条件是什么;subagent 只收到自己这次要完成的一张窄工单。
|
|
67
|
+
|
|
68
|
+
`state:get` 是统一的信息入口:
|
|
69
|
+
|
|
70
|
+
- 主会话读 `npm run state:get`,获得 orchestrator view。
|
|
71
|
+
- 具名角色读 `npm run state:get -- --json dispatch`,获得自己的 workticket。
|
|
72
|
+
- dispatch 不重复完整 state,只补充"这次派给谁、做什么、读哪里、写哪里、做到什么停"。
|
|
73
|
+
|
|
74
|
+
调度者在信息阶段的职责:
|
|
75
|
+
|
|
76
|
+
1. 读取 `state:get` 的 orchestrator view。
|
|
77
|
+
2. 读取当前阶段 flow。
|
|
78
|
+
3. 把阶段目标压缩成本次 `dispatch`。
|
|
79
|
+
4. 调用对应角色。
|
|
80
|
+
5. STOP 后验收 handoff 并更新 state。
|
|
81
|
+
|
|
82
|
+
调度者不在信息阶段替角色完成产物。尤其:
|
|
83
|
+
|
|
84
|
+
- ideate 阶段不由调度者写 `docs/design-brief.md` / `docs/design.md`,只派发 `game-designer`。
|
|
85
|
+
- context 阶段不由调度者内联选择 atom、生成 `docs/atom-tree.json`、拆 `docs/todo_list.md`,只把 recommender 教学和产物边界派给 `game-designer`。`docs/atom-tree.json` / `docs/atom-tree.md` 是 Atom 引入中间产物,不是任务计划或执行状态。
|
|
86
|
+
- generate 阶段不由调度者实现 `game/`,只按 todo 派发 `developer`。
|
|
87
|
+
- optimize 阶段不由调度者猜修复方案,先运行 DoD (Definition of Done, 完成定义),再按失败 key 路由角色。
|
|
88
|
+
|
|
89
|
+
dispatch 里只给执行所需且有明确来源的最小信息:
|
|
90
|
+
|
|
91
|
+
- 当前 `workId` / `activeTodoId`。
|
|
92
|
+
- 被派发 `role`。
|
|
93
|
+
- 本次 `title` / `goal`。
|
|
94
|
+
- `flowRef` 或等价的 `requiredContext` 路径。
|
|
95
|
+
- 必读上下文中 state 无法推断的文件,例如 `docs/design.md`、`docs/design-brief.md`、相关 skill ref。
|
|
96
|
+
- 可写文件边界:仅当 flow / todo / artifactRules 已明确给出时写。
|
|
97
|
+
- 明确不做的事:仅当 flow / todo / stage 边界已明确给出时写。
|
|
98
|
+
- 停止条件、产物、验证方式。
|
|
99
|
+
|
|
100
|
+
信息写法优先转述,不要自行扩展:
|
|
101
|
+
|
|
102
|
+
- `guidance` 只能摘录 / 压缩已有来源:用户原始输入、`state:get`、当前阶段 flow、最近 handoff、已落盘设计文档。
|
|
103
|
+
- `allowedFiles` / `forbiddenTasks` 没有确切来源时不要写;宁愿让字段为空,也不要为"看起来完整"而编造边界或禁令。
|
|
104
|
+
- 不把自己的判断扩写成新玩法、新规则、新技术方案或新执行步骤。
|
|
105
|
+
- 如果必须补一句判断,明确标成"调度判断",且只用于路由 / 边界 / 验收,不替角色产出内容。
|
|
106
|
+
- 不把模糊信息润色成确定结论;缺信息就写成缺口或 blocker。
|
|
107
|
+
|
|
108
|
+
dispatch 里不要泄漏调度者视图:
|
|
109
|
+
|
|
110
|
+
- 不重复 `pipeline` / `gate` / `recentHandoffHistory` / `sharedDecisions` 等 orchestrator view 已有字段。
|
|
111
|
+
- 不写 `stageExit` / `dispatchableRoles` / `canWriteTodo`。
|
|
112
|
+
- 不写完整 todo pool。
|
|
113
|
+
- 不写未来阶段计划。
|
|
114
|
+
- 不要求 subagent 判断自己处于哪个 stage / gate。
|
|
115
|
+
- 不要求 subagent 自己决定 next role。
|
|
116
|
+
|
|
117
|
+
如果 `state:get` 已显示 `dispatchedRole` 非空,主会话只恢复/调用该角色继续当前工单;不要重新解释阶段目标,也不要绕过当前 dispatch 直接生产产物。
|
|
118
|
+
|
|
119
|
+
## Dispatch 写入规则
|
|
120
|
+
|
|
121
|
+
调度者写给 subagent 的 dispatch 必须比全局流程窄:
|
|
122
|
+
|
|
123
|
+
写入 dispatch 后,实际调用 / 恢复 subagent 时必须确认设置参数 `mode=bypassPermissions`;只写 state dispatch 不等于完成派发。
|
|
124
|
+
|
|
125
|
+
- `activeTodoId` — 当前 todo id;阶段型任务可用 `stage:<stage>` 形式,不要依赖空值表示任务。
|
|
126
|
+
- `role` — 被派发角色。
|
|
127
|
+
- `goal` — 本次只做什么。
|
|
128
|
+
- `guidance` — 从用户输入 / state / 当前 stage flow / handoff 摘取的短指导;只转述边界和已知事实,不自行扩展。
|
|
129
|
+
- `requiredContext` — 建议读取的文件;必须包含当前 iteration 对应 flowRef,例如 `docs/harness/iteration-1/context-flow.md` 或 `docs/harness/iteration-2/context-flow.md`。
|
|
130
|
+
- `allowedFiles` — 可写边界;仅在来源明确时填写,无来源可留空。
|
|
131
|
+
- `forbiddenTasks` — 本次明确不做的事项;仅在来源明确时填写,无来源可留空。
|
|
132
|
+
- `acceptance` — 达到哪些条件就停。
|
|
133
|
+
- `verifier` — 本次建议验证命令或 DoD key。
|
|
134
|
+
|
|
135
|
+
写入阶段型 dispatch:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npm run dispatch:set -- id=stage:<stage> role=<role> goal="..." \
|
|
139
|
+
requiredContext="docs/harness/iteration-<n>/<stage>-flow.md;docs/..." \
|
|
140
|
+
acceptance="..."
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
若 `allowedFiles` / `forbiddenTasks` 有明确来源,再追加对应参数;没有就不要写。
|
|
144
|
+
|
|
145
|
+
写入真实 todo dispatch,并把 todo 标为 `in_progress`:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
npm run dispatch:set -- id=<todo-id> role=<role> goal="..." \
|
|
149
|
+
requiredContext="docs/..." allowedFiles="game/**" acceptance="..." --mark-todo
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
如果 `goal` / `requiredContext` / `acceptance` / `verifier` 未显式传入,`dispatch:set` 会从同 id 的机器态 todo 继承这些字段。`npm run state:get -- --json dispatch` 会动态展开 active todo 的 `title` / `context`,这样 developer 只读 dispatch 也能拿到 context 阶段写入的完整任务上下文。
|
|
153
|
+
|
|
154
|
+
### Generate 上下文复用派发
|
|
155
|
+
|
|
156
|
+
generate 阶段允许复用同一个 `developer` subagent 的已读上下文,但只用于减少重复读大段设计 / atom ref,不改变“一次一个 todo”的执行和验收模型。满足以下条件时,调度者可以在写入下一个 todo dispatch 后用 `sendMessage` 恢复同一个 developer 会话:
|
|
157
|
+
|
|
158
|
+
- 下一个 pending todo 有非空 `contextReuse`。
|
|
159
|
+
- 它与上一个刚完成的 developer todo 在当前 iteration todo 队列中连续,role 相同,`contextReuse` 相同。
|
|
160
|
+
- 最近 handoff 无 blocker,上一 todo 已由调度者验收并标为 `done`。
|
|
161
|
+
- 当前连续复用段长度不超过 3;第 4 个同 key todo 必须新开 / 重建上下文。
|
|
162
|
+
- 调度者没有发现设计、代码结构、engine、selected atom 或 allowedFiles 发生会让旧上下文失效的变化。
|
|
163
|
+
|
|
164
|
+
`contextReuse` 依赖 todo 池顺序判断“连续”。context 阶段 seed todo 时必须串行执行 `todo:add`,不要并行写入同一批 todo。
|
|
165
|
+
|
|
166
|
+
推荐顺序:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
npm run todo:set -- id=<previous-id> status=done
|
|
170
|
+
npm run dispatch:clear
|
|
171
|
+
npm run dispatch:set -- id=<next-id> role=developer allowedFiles="game/**" --mark-todo
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
随后用 `sendMessage` 发给同一个 developer subagent。消息只包含:
|
|
175
|
+
|
|
176
|
+
- 下一个 todo 已写入 dispatch,要求重新读取 `npm run state:get -- --json dispatch`。
|
|
177
|
+
- 本次命中 `contextReuse=<key>`,允许复用上一 todo 已读的共同上下文。
|
|
178
|
+
- 必须读取新 dispatch 展开的 todo `context`,以及 dispatch 中未读过的 `requiredContext`。
|
|
179
|
+
- 每个 todo 仍需单独实现、验证、`handoff:append`;不得顺手做后续 todo。
|
|
180
|
+
|
|
181
|
+
如果当前工具环境无法 `sendMessage` 恢复同一个 developer subagent,或 `state:get` 的 `contextReuseHint.eligibleForSendMessage` 不是 `true`,就按普通新 dispatch 派发。不要为了复用而把多个 todo 合并成一个 dispatch。
|
|
182
|
+
|
|
183
|
+
角色 STOP 后由 orchestrator 根据 handoff 判断是否推进阶段、补 todo、或更新 todo 状态。不要要求 subagent 自行 `todo:set`。
|
|
184
|
+
|
|
185
|
+
当前 dispatch 已处理完毕后清空:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
npm run dispatch:clear
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
TODO(C2):补 `dispatch:next` 脚本,自动从 stage spec + todo 合成 dispatch。
|
|
192
|
+
|
|
193
|
+
## Stage 行为
|
|
194
|
+
|
|
195
|
+
### ideate
|
|
196
|
+
|
|
197
|
+
- 迭代1目标:产出 `docs/design-brief.md` 和 `docs/design.md`;先在 brief 建立完整 playable 玩法预期,再在 design 锁定核心玩法方向。
|
|
198
|
+
- 迭代2目标:读取 `docs/design-brief.md` 的 hook 包装线索,在原 `docs/design.md` / `docs/design-brief.md` 中追加或更新迭代2章节,锁定玩法包装方向。
|
|
199
|
+
- 派发:`game-designer`。
|
|
200
|
+
- dispatch 范围:只传用户原始意图、当前 iteration 的 ideate flowRef、产物路径、禁止实现/技术选型边界。
|
|
201
|
+
- 调度者不写设计文档、不补玩法细节、不给引擎建议。
|
|
202
|
+
- 用户确认由 orchestrator 处理;角色不自行跨 session 继续。
|
|
203
|
+
- 退出前确认:
|
|
204
|
+
- 迭代1:`docs/design-brief.md` 是过程日志,包含完整 playable 玩法预期与取舍;`docs/design.md` 只写核心玩法,不写代码细节。
|
|
205
|
+
- 迭代2:`docs-last/` 快照存在;`docs/design.md` 有迭代2包装章节;`docs/design-brief.md` 继续记录包装探索、差异点和用户输入;明确 hook、完整体验流程、布局意图、关卡意图、引导、成功失败、包装叙事和情绪弧线。
|
|
206
|
+
- `pipeline.userConfirm` 已确认。
|
|
207
|
+
|
|
208
|
+
### context
|
|
209
|
+
|
|
210
|
+
- 迭代1目标:生成 / 刷新 Atom 引入中间产物 `docs/atom-tree.json`,写 `docs/todo_list.md` 完整任务卡,并 seed 当前 iteration todo。
|
|
211
|
+
- 迭代2目标:基于 `docs-last/` 与当前 docs 的差异,在原 `docs/todo_list.md` 追加迭代2任务卡,seed 当前 iteration 包装 todo。
|
|
212
|
+
- 派发:`game-designer`。
|
|
213
|
+
- 迭代1关键 skill:`playcraft-skill-recommender`。
|
|
214
|
+
- dispatch 范围:传当前 iteration 的 context flowRef、已确认设计文档、todo seed 产物边界。
|
|
215
|
+
- 调度者不内联选择 atom、不自行写 todo 清单、不把 context 做成实现计划;这些由被派发角色按 flow 和 skill 完成。
|
|
216
|
+
- 退出前确认:
|
|
217
|
+
- 迭代1:`docs/atom-tree.json` 作为 Atom 引入中间产物存在,或明确记录无法生成原因。
|
|
218
|
+
- 迭代2:`docs/todo_list.md` 有迭代2任务卡,每个 todo 来自明确差异点,并标注重写 / 优化 / 功能补充。
|
|
219
|
+
- 迭代2 context 禁止写 `docs/design-brief.md`;发现设计缺口时回 ideate。
|
|
220
|
+
- todoPool 当前 iteration 非空。
|
|
221
|
+
- 每个 todo 有 role / title / goal / context / acceptance / requiredContext / verifier。
|
|
222
|
+
- 每个 todo 都在当前 iteration 的 `docs/todo_list.md` 有同名任务卡,机器态 `context` 镜像该任务卡关键语义。
|
|
223
|
+
- 迭代1 context 完成后、推进 generate 前,调度者基于 todoPool 追加系统 todo `firstwin-harness`(若当前迭代还没有等价 `verify:firstwin` todo):
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
npm run todo:add -- id=firstwin-harness role=developer \
|
|
227
|
+
title="接入 first win 自动验证链路" \
|
|
228
|
+
goal="让当前核心玩法可通过平台 runtime harness 自动跑到首胜终态" \
|
|
229
|
+
context="只接平台 runtime harness:暴露 autoPlay/getState,通过玩家动作等价入口驱动已实现玩法,不得直接写终态或补包装。" \
|
|
230
|
+
requiredContext="skills/playable-autoplay/SKILL.md;docs/design.md;game/**" \
|
|
231
|
+
acceptance="window.__playable.autoPlay() exists and is wired through the debug-gated trigger;window.__playable.getState() returns currentPhase and isGameOver;autoPlay drives player-equivalent input or controller actions instead of direct terminal-state writes;npm run verify:firstwin exits 0" \
|
|
232
|
+
verifier=verify:firstwin createdBy=orchestrator-system
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
- 这是调度者动作,不是 context 输出,不要求 `docs/todo_list.md` 同名任务卡,也不需要 atom ref。
|
|
236
|
+
- 该 todo 的 `requiredContext` 必须包含 `skills/playable-autoplay/SKILL.md`;目标是最后把已完成核心玩法接到平台 runtime harness。
|
|
237
|
+
|
|
238
|
+
- 迭代2 context 完成后、推进 generate 前,调度者检查 context 阶段的技术基础设施评估结果。若 Scene 状态机骨架为"缺失-阻塞",追加系统 todo `packaging-scene-fsm`(若 todoPool 中还没有等价项):
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
npm run todo:add -- id=packaging-scene-fsm role=developer \
|
|
242
|
+
title="建立完整包装游戏的 Scene 状态机骨架" \
|
|
243
|
+
goal="实现 HOOK/TUTORIAL/GAMEPLAY/WIN/FAIL/ENDCARD 六阶段状态机入口和转换触发;扩展 autoPlay 能驱动完整包装路径" \
|
|
244
|
+
context="骨架只定义状态转换入口,不实现各 scene 内部逻辑;内部逻辑由其他包装任务卡实现后接入。必须保持 window.__playable 合约不破:autoPlay/getState 接口签名不变,初始 currentPhase 仍为 HOOK。autoPlay 扩展只能通过玩家动作等价路径驱动各 scene,不得直接写 currentPhase 或调用 forceWin/showWinScreen。" \
|
|
245
|
+
requiredContext="skills/playable-autoplay/SKILL.md;skills/playable-record/scripts/verify-lifecycle.mjs;docs/design.md#完整体验流程;docs/todo_list.md#迭代2技术基础设施评估;game/**" \
|
|
246
|
+
acceptance="game/ 中存在覆盖 HOOK/TUTORIAL/GAMEPLAY/WIN/FAIL/ENDCARD 的状态机入口;每个阶段有明确进入和退出触发;window.__playable.autoPlay() 能驱动完整路径;npm run verify:lifecycle exits 0(phasePath 包含 HOOK/TUTORIAL/GAMEPLAY/ENDCARD)" \
|
|
247
|
+
verifier=verify:lifecycle createdBy=orchestrator-system
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
- 这是调度者动作,不是 context 输出,不要求 `docs/todo_list.md` 同名任务卡。
|
|
251
|
+
- 若技术基础设施评估中 Scene 状态机骨架已标注"已有",跳过此步。
|
|
252
|
+
- `packaging-scene-fsm` 必须在其他包装功能 todo 之前完成,因为其他 todo 依赖状态转换入口存在。
|
|
253
|
+
|
|
254
|
+
### generate
|
|
255
|
+
|
|
256
|
+
- 目标:按 todo 逐个实现当前 iteration 的玩家可感知闭环。迭代1是核心玩法;迭代2是玩法包装升级,制作标准基本一致,评价按完整游戏判断。
|
|
257
|
+
- 派发:`developer`。
|
|
258
|
+
- 每次只派一个 todo。
|
|
259
|
+
- 迭代1的 todoPool 应包含调度者在 context 后追加的 `firstwin-harness`;它按普通 todo 派发给 developer,通常排在普通核心玩法 todo 之后执行。
|
|
260
|
+
- 如果 todo failed:
|
|
261
|
+
- 读取 handoff blocker。
|
|
262
|
+
- 判断是补充设计 / 修复实现 / 增加 reviewer todo。
|
|
263
|
+
- 不推进阶段,直到当前 iteration todo 全部 `done`。
|
|
264
|
+
- 退出前确认:
|
|
265
|
+
- 当前 iteration todo 全部 `done`。
|
|
266
|
+
- 没有 pending / in_progress / failed todo。
|
|
267
|
+
- 迭代2结束 generate 时,`docs/todo_list.md` 已整理当前 todo 与之前 todo 的完整历史总览。
|
|
268
|
+
|
|
269
|
+
### optimize
|
|
270
|
+
|
|
271
|
+
- 目标:build、autoplay、record、DoD 收敛。迭代2还要确认录像能呈现完整游戏体验,包括包装 hook / 引导 / 成功失败表达。
|
|
272
|
+
- 派发:`developer`;必要时按失败路由给 technical-artist / reviewer。
|
|
273
|
+
- 运行:
|
|
274
|
+
```bash
|
|
275
|
+
npm run dod:check
|
|
276
|
+
```
|
|
277
|
+
- 退出前确认:
|
|
278
|
+
- 有脚本的 DoD 已通过。
|
|
279
|
+
- 无脚本 DoD 已被 orchestrator 明确确认并写入 `gate.stageDoD.<key>=passed`,或记录 blocker。
|
|
280
|
+
|
|
281
|
+
### wrapup
|
|
282
|
+
|
|
283
|
+
- 目标:清理运行态副作用,刷新 `CLAUDE.md` 项目速览。
|
|
284
|
+
- 不派发角色;由 orchestrator / 脚本执行。
|
|
285
|
+
- 按当前 iteration 的 wrapup flowRef 刷新入口文档。补模板流程规则时不要提前改 `CLAUDE.md`;只有对应迭代真实落地后才改。
|
|
286
|
+
- 退出前确认:
|
|
287
|
+
- 无悬挂 dev / record 进程。
|
|
288
|
+
- `CLAUDE.md` 反映当前目录事实。
|
|
289
|
+
- 当前 iteration todo 全部 `done`。
|
|
290
|
+
|
|
291
|
+
### 迭代2结束用户确认
|
|
292
|
+
|
|
293
|
+
- 迭代1结束后自动进入迭代2,不在两轮之间询问用户是否修改包装。
|
|
294
|
+
- 迭代2 wrapup / optimize 完成后,编排者再向用户确认第二轮包装后的完整游戏是否接受。
|
|
295
|
+
- 若用户要求修改,由调度者根据问题性质新增当前 iteration follow-up todo 或回退到合适 stage;不要把用户反馈伪装成已确认状态。
|
|
296
|
+
|
|
297
|
+
## 推进阶段
|
|
298
|
+
|
|
299
|
+
只有当前阶段退出条件满足时才推进:
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
npm run stage:advance -- --accepted
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
`stage:advance` 会强制检查硬门槛:没有 active dispatch;ideate 必须 `userConfirm=confirmed`;context 必须 seed 当前 iteration todo;generate / wrapup 必须当前 iteration todo 全 done;optimize 必须当前 stage DoD 全 pass。其他非结构化退出条件仍由 orchestrator 人工判断。
|
|
306
|
+
|
|
307
|
+
## 失败处理
|
|
308
|
+
|
|
309
|
+
- `todo.status=failed` 不是清空状态,会阻塞当前 iteration 关闭。
|
|
310
|
+
- 失败后不要直接改成 done。
|
|
311
|
+
- 先读最近 handoff 的 blocker、summary 和 acceptanceResults。
|
|
312
|
+
- 再选择:
|
|
313
|
+
- 改写 dispatch 让同角色修复;
|
|
314
|
+
- 新增 follow-up todo;
|
|
315
|
+
- 路由给更合适角色;
|
|
316
|
+
- 若 todo 不再适用,明确移除并记录原因。
|
|
317
|
+
|
|
318
|
+
## 用户确认
|
|
319
|
+
|
|
320
|
+
只有 orchestrator 可以向用户确认流程门:
|
|
321
|
+
|
|
322
|
+
- ideate:核心玩法方向确认。
|
|
323
|
+
- iteration 2 ideate:包装方向是否修改。
|
|
324
|
+
- 其他用户门按对应 stage flow 执行。
|
|
325
|
+
|
|
326
|
+
用户确认后用 state 记录,例如:
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
npm run state:set -- userConfirm=confirmed
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Brainstorm Relay
|
|
333
|
+
|
|
334
|
+
`game-designer` 在 ideate 阶段会使用 `brainstorming` 的问题质量协议,但不能直接调用用户交互。编排者负责把 designer 写入 state 的 `pendingUserInput` 转成用户确认:
|
|
335
|
+
|
|
336
|
+
1. 识别 state:
|
|
337
|
+
- `pendingUserInput.status=awaiting_user_input`
|
|
338
|
+
- `orchestratorAction=ask_user_then_sendMessage_to_active_subagent`
|
|
339
|
+
- `activeTodoId` / `dispatchedRole` 仍指向当前 subagent workticket
|
|
340
|
+
2. 读取 `pendingUserInput.prompt/options/recommended/impact`。只转述问题、选项、推荐项和影响,不要自行补玩法。
|
|
341
|
+
3. 保持 dispatch active。不要执行:
|
|
342
|
+
```bash
|
|
343
|
+
npm run dispatch:clear
|
|
344
|
+
npm run dispatch:set ...
|
|
345
|
+
```
|
|
346
|
+
4. 向用户确认。收到答案后记录到 state:
|
|
347
|
+
```bash
|
|
348
|
+
npm run state:set -- pendingUserInputPatch='{"status":"answered","answer":"<user answer>","answeredAt":"<ISO timestamp>"}'
|
|
349
|
+
```
|
|
350
|
+
5. 再次 `state:get` 应显示 `orchestratorAction=sendMessage_answer_to_active_subagent`。用 `sendMessage` 把答案发回同一个 `game-designer` subagent 会话。消息只包含 question id、用户答案、要求继续原任务并把答案以 `[USER]` 来源写入 `docs/design-brief.md`。
|
|
351
|
+
6. 如果当前工具环境无法 `sendMessage` 恢复同一个 subagent,这是流程 blocker。不要伪装成正常重派,因为新会话会丢失脑暴上下文。
|
|
352
|
+
|
|
353
|
+
最终 ideate 退出门仍是 `pipeline.userConfirm`:用户明确批准核心玩法方向后才设 `userConfirm=confirmed`。中途脑暴回答只作为设计输入,不等同于阶段确认。
|
|
354
|
+
|
|
355
|
+
## 不要做
|
|
356
|
+
|
|
357
|
+
- 不让 subagent 读取完整 todo 池后自行挑活。
|
|
358
|
+
- 不把 stage 当成任务直接派给角色;必须转成 `role + goal + flowRef + workId`。
|
|
359
|
+
- 不在 ideate/context 信息阶段替角色产出设计、atom-tree 或 todo_list。
|
|
360
|
+
- 不让 subagent 自己标记 todo done;todo 状态由 orchestrator 根据 handoff 更新。
|
|
361
|
+
- 不把 `stageExit` / `dispatchableRoles` / `canWriteTodo` 写入 dispatch。
|
|
362
|
+
- 不让角色决定 next role。
|
|
363
|
+
- 不手改 `docs/project-state.md`。
|
|
364
|
+
- 不把 todo failed 当作完成。
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 3,
|
|
3
|
+
"specVersion": "pipeline",
|
|
4
|
+
"userIntent": "",
|
|
5
|
+
"settings": {},
|
|
6
|
+
"pipeline": {
|
|
7
|
+
"iteration": 1,
|
|
8
|
+
"stage": "ideate",
|
|
9
|
+
"stageStatus": "pending",
|
|
10
|
+
"userConfirm": "pending"
|
|
11
|
+
},
|
|
12
|
+
"dispatch": {
|
|
13
|
+
"activeTodoId": "none",
|
|
14
|
+
"role": "",
|
|
15
|
+
"goal": "",
|
|
16
|
+
"guidance": "",
|
|
17
|
+
"skillHints": [],
|
|
18
|
+
"requiredContext": [],
|
|
19
|
+
"contextReuse": "",
|
|
20
|
+
"allowedFiles": [],
|
|
21
|
+
"forbiddenTasks": [],
|
|
22
|
+
"acceptance": [],
|
|
23
|
+
"verifier": ""
|
|
24
|
+
},
|
|
25
|
+
"todos": [],
|
|
26
|
+
"handoff": {
|
|
27
|
+
"history": [],
|
|
28
|
+
"pendingUserInput": {
|
|
29
|
+
"status": "none",
|
|
30
|
+
"id": "",
|
|
31
|
+
"requestedBy": "",
|
|
32
|
+
"prompt": "",
|
|
33
|
+
"options": [],
|
|
34
|
+
"recommended": "",
|
|
35
|
+
"impact": "",
|
|
36
|
+
"answer": "",
|
|
37
|
+
"answeredAt": ""
|
|
38
|
+
},
|
|
39
|
+
"sharedDecisions": {
|
|
40
|
+
"engine": "unset",
|
|
41
|
+
"coreAction": "unset"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"gate": {
|
|
45
|
+
"stageDoD": {},
|
|
46
|
+
"canAskUser": "no"
|
|
47
|
+
},
|
|
48
|
+
"devPreview": {
|
|
49
|
+
"devStatus": "pending",
|
|
50
|
+
"devUrl": "unset",
|
|
51
|
+
"devStartedBy": "none",
|
|
52
|
+
"devLastChecked": "unset",
|
|
53
|
+
"loadCheck": "pending",
|
|
54
|
+
"loadCheckNotes": "unset",
|
|
55
|
+
"uiReviewStatus": "deferred",
|
|
56
|
+
"uiDiffNotes": "deferred",
|
|
57
|
+
"uiReworkRound": "0",
|
|
58
|
+
"devBlockers": []
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Project State (generated — do not edit)
|
|
2
|
+
|
|
3
|
+
<!-- GENERATED — do not hand-edit. Read via `npm run state:get`; process backing file: docs/project-state.json. Write via `npm run state:set`. -->
|
|
4
|
+
|
|
5
|
+
> **Agent entry**: run `npm run state:get` first. Do **not** hand-edit this file — it is generated from the process backing file `docs/project-state.json`. Write via `npm run state:set`.
|
|
6
|
+
|
|
7
|
+
## User Intent
|
|
8
|
+
|
|
9
|
+
> {{user intent — ≤2 sentences}}
|
|
10
|
+
|
|
11
|
+
## Pipeline
|
|
12
|
+
|
|
13
|
+
| field | value |
|
|
14
|
+
| ----------- | -------- |
|
|
15
|
+
| specVersion | pipeline |
|
|
16
|
+
| iteration | 1 |
|
|
17
|
+
| stage | ideate |
|
|
18
|
+
| stageStatus | pending |
|
|
19
|
+
| userConfirm | pending |
|
|
20
|
+
|
|
21
|
+
## Current Dispatch
|
|
22
|
+
|
|
23
|
+
- role: @—
|
|
24
|
+
- todo: none — —
|
|
25
|
+
- read: —
|
|
26
|
+
- context reuse: —
|
|
27
|
+
- write boundary: —
|
|
28
|
+
- forbidden: —
|
|
29
|
+
- acceptance: —
|
|
30
|
+
- verifier: —
|
|
31
|
+
|
|
32
|
+
## TODO Pool (iteration 1)
|
|
33
|
+
|
|
34
|
+
_no todos yet_
|
|
35
|
+
|
|
36
|
+
## Last Handoff
|
|
37
|
+
|
|
38
|
+
_no handoff entries yet_
|
|
39
|
+
|
|
40
|
+
## Pending User Input
|
|
41
|
+
|
|
42
|
+
none
|
|
43
|
+
|
|
44
|
+
## Stage DoD
|
|
45
|
+
|
|
46
|
+
| canAskUser |
|
|
47
|
+
| ---------- |
|
|
48
|
+
| no |
|
|
49
|
+
|
|
50
|
+
## Dev Preview
|
|
51
|
+
|
|
52
|
+
> Written programmatically. Do not hand-edit.
|
|
53
|
+
|
|
54
|
+
| Field | Value |
|
|
55
|
+
| -------------- | -------- |
|
|
56
|
+
| devStatus | pending |
|
|
57
|
+
| devUrl | unset |
|
|
58
|
+
| devStartedBy | none |
|
|
59
|
+
| devLastChecked | unset |
|
|
60
|
+
| loadCheck | pending |
|
|
61
|
+
| loadCheckNotes | unset |
|
|
62
|
+
| uiReviewStatus | deferred |
|
|
63
|
+
| uiDiffNotes | deferred |
|
|
64
|
+
| uiReworkRound | 0 |
|
|
65
|
+
| devBlockers | none |
|
|
66
|
+
|
|
67
|
+
## Shared Decisions
|
|
68
|
+
|
|
69
|
+
| Key | Value |
|
|
70
|
+
| ---------- | ----- |
|
|
71
|
+
| engine | unset |
|
|
72
|
+
| coreAction | unset |
|