harnessed 4.44.0 → 4.46.0

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.
Files changed (72) hide show
  1. package/dist/cli.mjs +8266 -6902
  2. package/dist/cli.mjs.map +1 -1
  3. package/dist/index.mjs +1 -1
  4. package/dist/index.mjs.map +1 -1
  5. package/messages/en.json +4 -0
  6. package/messages/zh-Hans.json +4 -0
  7. package/package.json +1 -1
  8. package/workflows/SCHEMA.md +31 -0
  9. package/workflows/auto/SKILL.md +7 -9
  10. package/workflows/auto/SKILL.zh-Hans.md +7 -9
  11. package/workflows/capabilities.yaml +16 -0
  12. package/workflows/disciplines/language.yaml +9 -1
  13. package/workflows/discuss/auto/SKILL.md +1 -1
  14. package/workflows/discuss/auto/SKILL.zh-Hans.md +1 -1
  15. package/workflows/discuss/phase/SKILL.md +1 -1
  16. package/workflows/discuss/phase/SKILL.zh-Hans.md +1 -1
  17. package/workflows/discuss/strategic/SKILL.md +1 -1
  18. package/workflows/discuss/strategic/SKILL.zh-Hans.md +1 -1
  19. package/workflows/discuss/subtask/SKILL.md +1 -1
  20. package/workflows/discuss/subtask/SKILL.zh-Hans.md +1 -1
  21. package/workflows/host-primitives.yaml +348 -0
  22. package/workflows/host-primitives.zh-Hans.yaml +319 -0
  23. package/workflows/plan/architecture/SKILL.md +4 -5
  24. package/workflows/plan/architecture/SKILL.zh-Hans.md +4 -5
  25. package/workflows/plan/auto/SKILL.md +6 -7
  26. package/workflows/plan/auto/SKILL.zh-Hans.md +6 -7
  27. package/workflows/plan/phase/SKILL.md +4 -5
  28. package/workflows/plan/phase/SKILL.zh-Hans.md +4 -5
  29. package/workflows/research/SKILL.md +5 -6
  30. package/workflows/research/SKILL.zh-Hans.md +5 -6
  31. package/workflows/retro/SKILL.md +4 -5
  32. package/workflows/retro/SKILL.zh-Hans.md +4 -5
  33. package/workflows/role-prompts.yaml +15 -16
  34. package/workflows/role-prompts.zh-Hans.yaml +14 -15
  35. package/workflows/ship/auto/SKILL.md +6 -7
  36. package/workflows/ship/auto/SKILL.zh-Hans.md +6 -7
  37. package/workflows/ship/preflight/SKILL.md +4 -5
  38. package/workflows/ship/preflight/SKILL.zh-Hans.md +4 -5
  39. package/workflows/task/auto/SKILL.md +7 -8
  40. package/workflows/task/auto/SKILL.zh-Hans.md +7 -8
  41. package/workflows/task/clarify/SKILL.md +1 -1
  42. package/workflows/task/clarify/SKILL.zh-Hans.md +1 -1
  43. package/workflows/task/code/SKILL.md +4 -5
  44. package/workflows/task/code/SKILL.zh-Hans.md +4 -5
  45. package/workflows/task/deliver/SKILL.md +11 -16
  46. package/workflows/task/deliver/SKILL.zh-Hans.md +11 -15
  47. package/workflows/task/test/SKILL.md +4 -5
  48. package/workflows/task/test/SKILL.zh-Hans.md +4 -5
  49. package/workflows/verify/auto/SKILL.md +9 -10
  50. package/workflows/verify/auto/SKILL.zh-Hans.md +9 -10
  51. package/workflows/verify/code-review/SKILL.md +6 -8
  52. package/workflows/verify/code-review/SKILL.zh-Hans.md +6 -8
  53. package/workflows/verify/design/SKILL.md +4 -5
  54. package/workflows/verify/design/SKILL.zh-Hans.md +4 -5
  55. package/workflows/verify/eval-review/SKILL.md +4 -5
  56. package/workflows/verify/eval-review/SKILL.zh-Hans.md +4 -5
  57. package/workflows/verify/multispec/SKILL.md +19 -23
  58. package/workflows/verify/multispec/SKILL.zh-Hans.md +18 -22
  59. package/workflows/verify/paranoid/SKILL.md +4 -5
  60. package/workflows/verify/paranoid/SKILL.zh-Hans.md +4 -5
  61. package/workflows/verify/progress/SKILL.md +4 -5
  62. package/workflows/verify/progress/SKILL.zh-Hans.md +4 -5
  63. package/workflows/verify/qa/SKILL.md +4 -5
  64. package/workflows/verify/qa/SKILL.zh-Hans.md +4 -5
  65. package/workflows/verify/second-opinion/SKILL.md +4 -5
  66. package/workflows/verify/second-opinion/SKILL.zh-Hans.md +4 -5
  67. package/workflows/verify/security/SKILL.md +4 -5
  68. package/workflows/verify/security/SKILL.zh-Hans.md +4 -5
  69. package/workflows/verify/simplify/SKILL.md +4 -5
  70. package/workflows/verify/simplify/SKILL.zh-Hans.md +4 -5
  71. package/workflows/verify/validate-phase/SKILL.md +4 -5
  72. package/workflows/verify/validate-phase/SKILL.zh-Hans.md +4 -5
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var package_default = {
3
- version: "4.44.0"};
3
+ version: "4.46.0"};
4
4
 
5
5
  // src/index.ts
6
6
  var VERSION = package_default.version;
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,QAuGb,CAAA;;;ACpGO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"4.44.0\",\n \"description\": \"AI coding harness package manager + composition orchestrator\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"author\": \"easyinplay\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/easyinplay/harnessed.git\"\n },\n \"homepage\": \"https://github.com/easyinplay/harnessed#readme\",\n \"bugs\": \"https://github.com/easyinplay/harnessed/issues\",\n \"keywords\": [\n \"claude-code\",\n \"ai-harness\",\n \"package-manager\",\n \"composition\",\n \"skill-pack\",\n \"mcp\",\n \"orchestrator\"\n ],\n \"engines\": {\n \"node\": \">=22.0.0\"\n },\n \"packageManager\": \"pnpm@10.12.0\",\n \"bin\": {\n \"harnessed\": \"./dist/cli.mjs\",\n \"harnessed-inject-state\": \"./bin/harnessed-inject-state.mjs\"\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"default\": \"./dist/index.mjs\"\n },\n \"./schemas\": {\n \"types\": \"./dist/schemas/index.d.ts\",\n \"import\": \"./dist/schemas/index.mjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"bin\",\n \"manifests\",\n \"messages\",\n \"workflows\",\n \"routing\",\n \"config-templates\",\n \"schemas\",\n \"README.md\",\n \"README-en.md\",\n \"LICENSE\",\n \"NOTICE\",\n \"THIRD-PARTY-NOTICES.md\"\n ],\n \"scripts\": {\n \"dev\": \"tsup --watch\",\n \"build\": \"tsc --noEmit && tsup && node ./scripts/build-hooks.mjs\",\n \"build:hooks\": \"node ./scripts/build-hooks.mjs\",\n \"build:schema\": \"node ./scripts/build-schema.mjs\",\n \"validate:schema\": \"node ./scripts/validate-schema.mjs\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run --passWithNoTests\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage --passWithNoTests\",\n \"test:codex-live\": \"node ./scripts/codex-live/run.mjs\",\n \"bench\": \"vitest bench --run\",\n \"lint\": \"biome check .\",\n \"lint:fix\": \"biome check --write .\",\n \"format\": \"biome format --write .\",\n \"build:binary\": \"bun scripts/build-binary.mjs\"\n },\n \"dependencies\": {\n \"@anthropic-ai/claude-agent-sdk\": \"0.3.142\",\n \"@clack/prompts\": \"^0.10.1\",\n \"@sinclair/typebox\": \"^0.34.49\",\n \"ajv\": \"^8.20.0\",\n \"ajv-errors\": \"^3.0.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"commander\": \"^13.0.0\",\n \"diff\": \"^9.0.0\",\n \"expr-eval\": \"^2.0.2\",\n \"picocolors\": \"^1.1.1\",\n \"proper-lockfile\": \"^4.1.2\",\n \"yaml\": \"^2.9.0\"\n },\n \"devDependencies\": {\n \"@biomejs/biome\": \"^2.0.0\",\n \"@types/node\": \"^22.10.0\",\n \"@types/proper-lockfile\": \"^4.1.4\",\n \"@vitest/coverage-v8\": \"^4.0.0\",\n \"esbuild\": \"0.27.7\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.6.0\",\n \"vitest\": \"^4.0.0\"\n },\n \"pnpm\": {\n \"onlyBuiltDependencies\": [\n \"esbuild\"\n ]\n }\n}\n","// Main library entry — re-exports public APIs.\n// phase 1.1 batch 1: skeleton only; schema validator wired in batch 2 (T3+).\n\nimport pkg from '../package.json' with { type: 'json' }\n\nexport const VERSION = pkg.version\n"]}
1
+ {"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,QAuGb,CAAA;;;ACpGO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"4.46.0\",\n \"description\": \"AI coding harness package manager + composition orchestrator\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"author\": \"easyinplay\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/easyinplay/harnessed.git\"\n },\n \"homepage\": \"https://github.com/easyinplay/harnessed#readme\",\n \"bugs\": \"https://github.com/easyinplay/harnessed/issues\",\n \"keywords\": [\n \"claude-code\",\n \"ai-harness\",\n \"package-manager\",\n \"composition\",\n \"skill-pack\",\n \"mcp\",\n \"orchestrator\"\n ],\n \"engines\": {\n \"node\": \">=22.0.0\"\n },\n \"packageManager\": \"pnpm@10.12.0\",\n \"bin\": {\n \"harnessed\": \"./dist/cli.mjs\",\n \"harnessed-inject-state\": \"./bin/harnessed-inject-state.mjs\"\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"default\": \"./dist/index.mjs\"\n },\n \"./schemas\": {\n \"types\": \"./dist/schemas/index.d.ts\",\n \"import\": \"./dist/schemas/index.mjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"bin\",\n \"manifests\",\n \"messages\",\n \"workflows\",\n \"routing\",\n \"config-templates\",\n \"schemas\",\n \"README.md\",\n \"README-en.md\",\n \"LICENSE\",\n \"NOTICE\",\n \"THIRD-PARTY-NOTICES.md\"\n ],\n \"scripts\": {\n \"dev\": \"tsup --watch\",\n \"build\": \"tsc --noEmit && tsup && node ./scripts/build-hooks.mjs\",\n \"build:hooks\": \"node ./scripts/build-hooks.mjs\",\n \"build:schema\": \"node ./scripts/build-schema.mjs\",\n \"validate:schema\": \"node ./scripts/validate-schema.mjs\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run --passWithNoTests\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage --passWithNoTests\",\n \"test:codex-live\": \"node ./scripts/codex-live/run.mjs\",\n \"bench\": \"vitest bench --run\",\n \"lint\": \"biome check .\",\n \"lint:fix\": \"biome check --write .\",\n \"format\": \"biome format --write .\",\n \"build:binary\": \"bun scripts/build-binary.mjs\"\n },\n \"dependencies\": {\n \"@anthropic-ai/claude-agent-sdk\": \"0.3.142\",\n \"@clack/prompts\": \"^0.10.1\",\n \"@sinclair/typebox\": \"^0.34.49\",\n \"ajv\": \"^8.20.0\",\n \"ajv-errors\": \"^3.0.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"commander\": \"^13.0.0\",\n \"diff\": \"^9.0.0\",\n \"expr-eval\": \"^2.0.2\",\n \"picocolors\": \"^1.1.1\",\n \"proper-lockfile\": \"^4.1.2\",\n \"yaml\": \"^2.9.0\"\n },\n \"devDependencies\": {\n \"@biomejs/biome\": \"^2.0.0\",\n \"@types/node\": \"^22.10.0\",\n \"@types/proper-lockfile\": \"^4.1.4\",\n \"@vitest/coverage-v8\": \"^4.0.0\",\n \"esbuild\": \"0.27.7\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.6.0\",\n \"vitest\": \"^4.0.0\"\n },\n \"pnpm\": {\n \"onlyBuiltDependencies\": [\n \"esbuild\"\n ]\n }\n}\n","// Main library entry — re-exports public APIs.\n// phase 1.1 batch 1: skeleton only; schema validator wired in batch 2 (T3+).\n\nimport pkg from '../package.json' with { type: 'json' }\n\nexport const VERSION = pkg.version\n"]}
package/messages/en.json CHANGED
@@ -48,6 +48,7 @@
48
48
  "uninstall.unified.nothing": "nothing to do — no harnessed artifacts found",
49
49
  "uninstall.unified.header": "harnessed uninstall will remove the following:",
50
50
  "uninstall.unified.commands": " Commands: {{count}} harnessed-generated slash command file(s) in ~/.claude/commands/",
51
+ "uninstall.unified.agent_roles": " Agent roles: {{count}} harnessed-generated codex agent role file(s) in ~/.codex/agents/",
51
52
  "uninstall.unified.skills": " Skills: {{count}} workflow skill directory(ies) in ~/.claude/skills/",
52
53
  "uninstall.unified.settings": " Settings: harnessed env vars (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS, HARNESSED_USER_LANG) from ~/.claude/settings.json",
53
54
  "uninstall.unified.hooks": " Hooks: {{count}} harnessed Stop/UserPromptSubmit hook(s) in ~/.claude/settings.json",
@@ -57,6 +58,7 @@
57
58
  "uninstall.unified.confirm": "Remove harnessed's own files? Upstream components (npm packages, MCP servers, CC plugins, etc.) will NOT be affected. This cannot be undone.",
58
59
  "uninstall.unified.removing": "removing harnessed files...",
59
60
  "uninstall.unified.removed_commands": " removed {{count}} command file(s)",
61
+ "uninstall.unified.removed_agent_roles": " removed {{count}} codex agent role file(s)",
60
62
  "uninstall.unified.removed_skills": " removed {{count}} skill directory(ies)",
61
63
  "uninstall.unified.removed_settings": " removed harnessed env vars from ~/.claude/settings.json",
62
64
  "uninstall.unified.removed_hooks": " removed {{count}} harnessed hook(s) from ~/.claude/settings.json",
@@ -79,6 +81,8 @@
79
81
  "doctor.summary.fail": "\nsome checks failed (see fix hints above)",
80
82
  "doctor.summary.warn": "\nall checks ok (with warnings — see hints above)",
81
83
  "doctor.summary.pass": "\nall checks passed",
84
+ "doctor.host_scope": "host: {{host}} — {{applied}} of {{total}} checks apply\n",
85
+ "doctor.matrix.legend": "\nn/a = the check is not declared for that host in the registry, so it was not run",
82
86
 
83
87
  "check_docs.clean": "documentation discipline: no violations",
84
88
  "check_docs.state_line_limit": "STATE.md is {{lines}} lines > the {{limit}}-line digest limit — archive older phase narrative to RETROSPECTIVE.md (override for one run: HARNESSED_ALLOW_LONG_STATE=1)",
@@ -48,6 +48,7 @@
48
48
  "uninstall.unified.nothing": "无需操作 — 未找到 harnessed 产物",
49
49
  "uninstall.unified.header": "harnessed uninstall 将移除以下内容:",
50
50
  "uninstall.unified.commands": " Commands: ~/.claude/commands/ 中 {{count}} 个 harnessed 生成的 slash command 文件",
51
+ "uninstall.unified.agent_roles": " Agent roles: ~/.codex/agents/ 中 {{count}} 个 harnessed 生成的 codex agent role 文件",
51
52
  "uninstall.unified.skills": " Skills: ~/.claude/skills/ 中 {{count}} 个 workflow skill 目录",
52
53
  "uninstall.unified.settings": " Settings: ~/.claude/settings.json 中的 harnessed 环境变量(CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS、HARNESSED_USER_LANG)",
53
54
  "uninstall.unified.hooks": " Hooks: ~/.claude/settings.json 中 {{count}} 条 harnessed Stop/UserPromptSubmit hook",
@@ -57,6 +58,7 @@
57
58
  "uninstall.unified.confirm": "移除 harnessed 自身的文件?Upstream 组件(npm packages、MCP servers、CC plugins 等)不受影响。此操作不可撤销。",
58
59
  "uninstall.unified.removing": "正在移除 harnessed 文件...",
59
60
  "uninstall.unified.removed_commands": " 已移除 {{count}} 个 command 文件",
61
+ "uninstall.unified.removed_agent_roles": " 已移除 {{count}} 个 codex agent role 文件",
60
62
  "uninstall.unified.removed_skills": " 已移除 {{count}} 个 skill 目录",
61
63
  "uninstall.unified.removed_settings": " 已移除 ~/.claude/settings.json 中的 harnessed 环境变量",
62
64
  "uninstall.unified.removed_hooks": " 已从 ~/.claude/settings.json 移除 {{count}} 条 harnessed hook",
@@ -79,6 +81,8 @@
79
81
  "doctor.summary.fail": "\nsome checks failed (see fix hints above)",
80
82
  "doctor.summary.warn": "\nall checks ok (with warnings — see hints above)",
81
83
  "doctor.summary.pass": "\nall checks passed",
84
+ "doctor.host_scope": "host: {{host}} — {{applied}} of {{total}} checks apply\n",
85
+ "doctor.matrix.legend": "\nn/a = the check is not declared for that host in the registry, so it was not run",
82
86
 
83
87
  "check_docs.clean": "文档纪律检查通过:无违规",
84
88
  "check_docs.state_line_limit": "STATE.md 当前 {{lines}} 行,超过 {{limit}} 行 digest 上限 —— 把更早的 phase 叙事归档到 RETROSPECTIVE.md(单次放行:HARNESSED_ALLOW_LONG_STATE=1)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harnessed",
3
- "version": "4.44.0",
3
+ "version": "4.46.0",
4
4
  "description": "AI coding harness package manager + composition orchestrator",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -95,6 +95,37 @@ phases:
95
95
 
96
96
  ---
97
97
 
98
+ ## 4b. capabilities.yaml 的 `by_host`(v16.0 Phase 65)
99
+
100
+ 一个 capability 条目的 `impl` / `cmd` 可以按宿主取不同值。**顶层字段仍是权威值(Claude Code)**,
101
+ `by_host.<host>` 只替换它显式声明的字段:
102
+
103
+ ```yaml
104
+ agent-teams-send-message:
105
+ impl: claude-platform
106
+ cmd: SendMessage
107
+ by_host:
108
+ codex:
109
+ impl: codex-platform
110
+ cmd: send_input
111
+ ```
112
+
113
+ 设计约定:
114
+
115
+ - **顶层值一个字节都不能因为加 `by_host` 而改动** —— claude 侧的渲染产物有逐字节金标
116
+ (`tests/fixtures/render-golden/`)锁着。
117
+ - `by_host` 是 optional,绝大多数 capability 不需要它。当前只有 Bucket 5 的三个
118
+ agent-platform 条目使用。
119
+ - 宿主键是**具名**的(`claude` / `codex`)而非自由 record。写错宿主名在自由 record 下会
120
+ 静默永不命中、继续渲染 Claude 原语;具名 + `additionalProperties: false` 把这类拼写错误
121
+ 变成构建期错误。
122
+ - 读取一律经 `pickHostValues()`(`src/cli/lib/capabilityResolver.ts`),不要直接读 `by_host`。
123
+ 该函数默认 `claude`,所以任何未显式传宿主的既有调用点行为不变。
124
+ - schema 的 SSOT 在 `src/workflow/schema/capabilities.ts`;`scripts/check-workflow-schema.mjs`
125
+ 内是它的镜像,两处必须同步。
126
+
127
+ ---
128
+
98
129
  ## 5. 收益(schema-driven 设计动机)
99
130
 
100
131
  每 phase idempotent + 可单步重跑 + session 中断从最近 checkpoint 恢复 + `harnessed status` 可视化当前 phase。
@@ -114,27 +114,25 @@ The numbered sequence below **is** the state machine — execute it step by step
114
114
  Do NOT improvise an equivalent flow from the Overview above: freelancing bypasses the engine
115
115
  (no per-sub ledger, no evidence guard, no recovery). harnessed is the orchestration brain
116
116
  (`harnessed gates` says which subs fire, `harnessed prompt` gives each spawn-ready prompt,
117
- `harnessed checkpoint` records the ledger); YOU spawn with CC-native Task / Agent tools.
117
+ `harnessed checkpoint` records the ledger); YOU spawn with {{ host.native }} {{ host.spawn_subagent.plural }}.
118
118
 
119
- Do NOT pipe to `harnessed run auto` — that is the CI/headless path (in-process SDK spawn
120
- that blocks the session, bypasses Agent Teams, and hangs inside Claude Code).
119
+ Do NOT pipe to `harnessed run auto` — that is the CI/headless path ({{ host.harnessed_run_warning_note.orchestrator_tail }}
121
120
 
122
- 1. FIRST run the discuss stage interactively in THIS session (spawned subagents cannot ask the user questions). Evaluate strategic / phase / subtask clarification criteria for "$ARGUMENTS"; dialogue with the user (AskUserQuestion) for each layer that fires, lock decisions, transparent-skip the rest. After locking blocking decisions, relay the deferrable set to the user in a single batched AskUserQuestion with each agent-recommended default pre-selected — deferrable defers scheduling, not user authority; only skip an item if the user explicitly defers it again. Produce a locked spec.
121
+ 1. FIRST run the discuss stage interactively in THIS session (spawned subagents cannot ask the user questions). Evaluate strategic / phase / subtask clarification criteria for "$ARGUMENTS"; dialogue with the user ({{ host.ask_user }}) for each layer that fires, lock decisions, transparent-skip the rest. After locking blocking decisions, relay the deferrable set to the user in a single batched {{ host.ask_user }} with each agent-recommended default pre-selected — deferrable defers scheduling, not user authority; only skip an item if the user explicitly defers it again. Produce a locked spec.
123
122
  1b. Bash: `harnessed facts auto --out .harnessed-facts.json` → it lists ONLY the facts this stage’s gates actually read: deterministic ones already filled (change size / files touched / stage, from git), judgement calls left `null` with a one-line hint of what to judge. Edit the file and replace each `null` in `facts` with your honest answer from the locked spec — leave one null only if you genuinely cannot judge it (it then falls back to the built-in default). Do NOT skip this step and do NOT invent facts the command did not ask for.
124
123
  2. Bash: `harnessed gates auto --task "<locked spec>" --context-file .harnessed-facts.json --skip-sub discuss` → parse the JSON `{fire, skip, parallelism}`. This is the plan SoT (no spawn). Keep the verbatim JSON. For a small self-contained task (single-file / single-page class), the sanctioned lite path is adding `--skip-sub verify --skip-sub retro` (repeatable / comma-separated) — skipped subs are still recorded in the ledger with reasons; lite ≠ freestyle (the ledger/evidence IS the difference).
125
124
  3. Bash: `harnessed checkpoint start auto --plan '<the verbatim gates JSON from step 2>'` → seeds the per-sub ledger so `harnessed status --recover` can re-orient you after compaction.
126
- 4. If `parallelism.escalate_to_teams === true`: read `~/.claude/rules/agent-teams.md`, then drive the fired subs as an Agent Team. There is NO create step and no create tool — spawn one background teammate per fired sub with `Agent(name: <sub>, run_in_background: true, prompt: <that sub's `harnessed prompt <sub>` prompt>)` and the team forms implicitly on the FIRST spawn, with this session as lead (the `team_name` input is accepted but ignored — the name is session-derived). Coordinate via `SendMessage`; when a sub is finished, ask that teammate to shut down BY NAME (e.g. "ask the verify-qa teammate to shut down"). Still checkpoint each sub (`complete` / `fail`) as below.
127
- - **Shut every teammate down before you finish — MUST-in-finally, not best-effort**: regardless of whether every sub reached COMPLETE, max_iterations was exhausted, or you consider the work done, ask each teammate to shut down by name before you end the run, and confirm it actually stopped. Shutdown is a REQUEST: the teammate finishes its current tool call first and may reject with a reason, so re-ask rather than assume. The team directory is removed automatically at session exit (there is no teardown tool), but a teammate you never stopped keeps consuming tokens and can hang the host (headless especially — issue #7: an 11h hang, work complete but the process never exited).
128
- - **Headless never spawns teams**: in a headless session (`claude -p`) `harnessed gates` already returns `escalate_to_teams: false` (Agent Teams are session-scoped — lost on `/resume`, incompatible with `-p`). Do NOT spawn teammates or background-`Agent` in headless even if you think it would parallelize — run the fired subs sequentially in-session instead.
125
+ {{ host.teams_step_note.skill }}
126
+ {{ host.teams_teardown_note }}
129
127
  5. Otherwise, for each fired sub in `order` (serial subs sequentially, parallel subs concurrently):
130
128
  - **If the entry has `is_master: true`** (a stage master — e.g. `/auto` firing `plan`/`task`/`verify`): do NOT prompt+spawn it. RECURSE: run that master’s own `harnessed facts <sub> --out .harnessed-facts.json` (fill the nulls) → `harnessed gates <sub> --task "<spec>" --context-file .harnessed-facts.json --skip-sub discuss` → `harnessed checkpoint start <sub> --plan '<json>'` → repeat this loop for ITS fired subs.
131
129
  - **Else (leaf sub):**
132
130
  a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → parse `{prompt, max_iterations, model}`.
133
- b. Spawn a CC-native subagent (Task / Agent tool) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
131
+ b. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
134
132
  - on return, write the subagent's final output to a file and run `harnessed checkpoint complete <sub> --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
135
133
  - if it blocks, run `harnessed checkpoint fail <sub> --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
136
134
  - respawn ONLY while none of those three has fired. Any one of them means stop: re-scope the subtask, fix the blocker, or escalate to the user. Never respawn past a stop directive.
137
- c. If the output contains `STATUS: NEEDS_CLARIFICATION` + questions: STOP, relay them verbatim via AskUserQuestion, append the answers to the spec, then re-spawn the same sub.
135
+ c. If the output contains `STATUS: NEEDS_CLARIFICATION` + questions: STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
138
136
  d. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete <sub> --result-file <path> --summary "<one-line>"`. Fail-CLOSED — it blocks unless every declared `artifacts_expected` file exists, the TDD boundary passes (non-empty evidence / both the red and green sides present / the test file was not deleted), and the result carries a verbatim `<promise>COMPLETE</promise>` (or a structured COMPLETE status). `--result <text>` is the inline variant; `--result-file` wins and is quoting-safe on Windows. On a non-zero exit the sub is NOT done — re-spawn to close the gap, or pass `--force` only to deliberately override (records `evidence_status=overridden`, an audited override rather than a silent pass).
139
137
  e. If the complete gate blocked: Bash `harnessed checkpoint fail <sub> --failing-tests <n>` to record the attempt (omit the flag when the sub has no tests — the evidence-artifact digest is the fallback progress metric). It prints `BUDGET-EXHAUSTED` (attempts spent vs `workflows/defaults.yaml ralph_max_iterations`), `NO-PROGRESS` (no improvement for N consecutive attempts) or `BREAK-LOOP` (this sub failed >= the threshold) once a stop condition is reached. Respawn ONLY while none of those three has fired; any one of them means STOP — re-scope, fix the blocker, or escalate to the user, and report it.
140
138
  6. After all fired subs are `done` (or recorded `failed`), Bash `harnessed status --recover` to confirm the ledger and report a per-sub fired/skipped/done/failed summary to the user. Then run the `retro` stage to capture lessons.
@@ -112,27 +112,25 @@ Sister `workflows/capabilities.yaml`:
112
112
  下面这套编号序列**就是** state machine —— 逐步用 Bash 执行。**不要**从上方 Overview 自行演绎一套
113
113
  等价流程:freestyle 会旁路引擎(无 per-sub ledger、无 evidence guard、无 recovery)。harnessed 是
114
114
  编排大脑(`harnessed gates` 决定哪些 sub fire,`harnessed prompt` 给出每个 spawn-ready prompt,
115
- `harnessed checkpoint` 记录 ledger);**你**(主 session)用 CC-native Task / Agent 工具做 spawn。
115
+ `harnessed checkpoint` 记录 ledger);**你**(主 session)用 {{ host.native }} {{ host.spawn_subagent.zh_tool }}做 spawn。
116
116
 
117
- **不要** pipe 到 `harnessed run auto` —— 那是 CI/headless 路径(in-process SDK spawn,会阻塞
118
- session、绕过 Agent Teams,在 Claude Code 内部调用时会挂死)。
117
+ **不要** pipe 到 `harnessed run auto` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.orchestrator_tail }}
119
118
 
120
- 1. 先在**本 session** 交互式跑 discuss 阶段(spawned subagent 无法向用户提问):对 "$ARGUMENTS" 评估 strategic / phase / subtask 澄清判据,对每个 fire 的层用 AskUserQuestion 与用户对话锁决策,其余透明 skip。blocking 集锁定后,把 deferrable 集以单轮批量 AskUserQuestion 转达给用户(各项 agent 推荐默认值预选)—— deferrable 推迟的是排期,不是用户决策权;仅当用户明确再次推迟才可跳过该项。产出 locked spec。
119
+ 1. 先在**本 session** 交互式跑 discuss 阶段(spawned subagent 无法向用户提问):对 "$ARGUMENTS" 评估 strategic / phase / subtask 澄清判据,对每个 fire 的层用 {{ host.ask_user }} 与用户对话锁决策,其余透明 skip。blocking 集锁定后,把 deferrable 集以单轮批量 {{ host.ask_user }} 转达给用户(各项 agent 推荐默认值预选)—— deferrable 推迟的是排期,不是用户决策权;仅当用户明确再次推迟才可跳过该项。产出 locked spec。
121
120
  1b. Bash: `harnessed facts auto --out .harnessed-facts.json` → 它只列出**本阶段 gate 真正读取**的 fact:能确定性推导的已填好(改动行数 / 触及文件数 / stage,来自 git),判断题留 `null` 并附一行说明。编辑该文件,把 `facts` 里每个 `null` 按 locked spec 换成你的真实判断 —— 只有确实无法判断时才留 null(此时回退内置默认值)。**不要**跳过本步,也**不要**自行编造命令没问的 fact。
122
121
  2. Bash: `harnessed gates auto --task "<locked spec>" --context-file .harnessed-facts.json --skip-sub discuss` → 解析 JSON `{fire, skip, parallelism}`。这是 plan SoT(不 spawn)。保留 verbatim JSON。自包含小任务(单文件/单页面级)的合规轻量路径:追加 `--skip-sub verify --skip-sub retro`(可重复/逗号分隔)——被 skip 的 sub 仍带原因进 ledger;lite ≠ freestyle(差别就在 ledger/evidence)。
123
122
  3. Bash: `harnessed checkpoint start auto --plan '<step 2 的 verbatim gates JSON>'` → seed per-sub ledger,让 `harnessed status --recover` 能在 compaction 后给你重新定位。
124
- 4. 若 `parallelism.escalate_to_teams === true`:读 `~/.claude/rules/agent-teams.md`,然后把 fired subs 作为 Agent Team 驱动。**没有建团步骤、也没有建团工具** —— 对每个 fired sub 用 `Agent(name: <sub>, run_in_background: true, prompt: <该 sub 的 `harnessed prompt <sub>` prompt>)` spawn 一个后台 teammate,团在**第一个** spawn 时隐式形成,本 session 即 lead(`team_name` 入参被接受但忽略 —— 团名由 session 派生)。用 `SendMessage` 协调;某个 sub 完成后,**按名**请求该 teammate 关闭(例如「ask the verify-qa teammate to shut down」)。每个 sub 仍按下方 checkpoint(`complete` / `fail`)。
125
- - **收尾前必须关闭每个 teammate —— finally 强制契约,非尽力而为**:无论是否每个 sub 都到达 COMPLETE、max_iterations 是否耗尽、或你是否认为工作已完成,收尾前都要**按名**请求每个 teammate 关闭,并确认它真的停了。关闭是**请求**:teammate 会先做完当前 tool call,也可能带理由拒绝 —— 所以要复查重发,不要假定。团目录在 session 退出时**自动**删除(没有 teardown 工具),但你没停掉的 teammate 会持续烧 token 并可能挂起宿主(headless 尤甚 —— issue #7:挂 11 小时,工作已完成但进程从不退出)。
126
- - **headless 绝不 spawn team**:headless session(`claude -p`)下 `harnessed gates` 已返回 `escalate_to_teams: false`(Agent Teams 是 session-scoped —— `/resume` 即丢,与 `-p` 不兼容)。即使你认为能并行,headless 下也**不要** spawn teammate 或背景 `Agent` —— 改为在 session 内顺序驱动 fired subs。
123
+ {{ host.teams_step_note.skill }}
124
+ {{ host.teams_teardown_note }}
127
125
  5. 否则,对 `order` 里每个 fired sub(serial 串行、parallel 并发):
128
126
  - **若该项 `is_master: true`**(本身是 stage master —— 如 `/auto` fire `plan`/`task`/`verify`):**不要**直接 prompt+spawn。RECURSE:跑该 master 自己的 `harnessed facts <sub> --out .harnessed-facts.json`(填完 null)→ `harnessed gates <sub> --task "<spec>" --context-file .harnessed-facts.json --skip-sub discuss` → `harnessed checkpoint start <sub> --plan '<json>'` → 对它的 fired subs 重复本循环。
129
127
  - **否则(leaf sub):**
130
128
  a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → 解析 `{prompt, max_iterations, model}`。
131
- b. 用 CC-native subagent(Task / Agent 工具)以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
129
+ b. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
132
130
  - subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete <sub> --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
133
131
  - 若被拦下,跑 `harnessed checkpoint fail <sub> --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
134
132
  - **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
135
- c. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 AskUserQuestion 原样转达,把答案 append 进 spec,再重 spawn 同一 sub。
133
+ c. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn 同一 sub。
136
134
  d. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete <sub> --result-file <path> --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。exit 非零即表示该 sub **未** done —— 重 spawn 补齐,或仅在刻意覆盖时传 `--force`(记录 `evidence_status=overridden`,是可审计的覆盖而非静默放行)。
137
135
  e. 若 complete 闸门拦下:Bash `harnessed checkpoint fail <sub> --failing-tests <n>` 记录本次尝试(该 sub 无测试时省略该 flag —— 回退用证据产物摘要作进展度量)。命中停机条件时它会打印 `BUDGET-EXHAUSTED`(已用尝试次数 vs `workflows/defaults.yaml ralph_max_iterations`)、`NO-PROGRESS`(连续 N 次无进展)或 `BREAK-LOOP`(该 sub 失败次数达阈值)。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛范围、修掉阻塞点或上报用户,并说明情况。
138
136
  6. 所有 fired subs `done`(或记录 `failed`)后,Bash `harnessed status --recover` 确认 ledger,并向用户报告 per-sub fired/skipped/done/failed 摘要。 然后跑 `retro` 阶段沉淀 lessons。
@@ -604,6 +604,12 @@ capabilities:
604
604
  agent-teams-create:
605
605
  impl: claude-platform
606
606
  cmd: 'Agent(name, run_in_background=true)'
607
+ # v16.0 Phase 65 — codex 的等价原语取自上游 multi_agents_spec.rs(codex-cli 0.155.1,
608
+ # feature multi_agent v1 生效)。顶层值仍是 Claude Code 的,claude 侧渲染逐字节不变。
609
+ by_host:
610
+ codex:
611
+ impl: codex-platform
612
+ cmd: 'spawn_agent(agent_type, message)'
607
613
  since: v2.0
608
614
  category: agent-platform
609
615
  description: >-
@@ -620,6 +626,10 @@ capabilities:
620
626
  agent-teams-send-message:
621
627
  impl: claude-platform
622
628
  cmd: SendMessage
629
+ by_host:
630
+ codex:
631
+ impl: codex-platform
632
+ cmd: send_input
623
633
  since: v2.0
624
634
  category: agent-platform
625
635
  description: >-
@@ -629,6 +639,12 @@ capabilities:
629
639
  agent-teams-shutdown:
630
640
  impl: claude-platform
631
641
  cmd: 'ask the <teammate-name> teammate to shut down'
642
+ # codex 侧从「一句自然语言请求」变成一个真工具名 —— 这是 codex 上更强的保证,
643
+ # 但不要顺势改 claude 侧的 phase 描述(金标锁着)。
644
+ by_host:
645
+ codex:
646
+ impl: codex-platform
647
+ cmd: close_agent
632
648
  since: v2.0
633
649
  category: agent-platform
634
650
  description: >-
@@ -24,13 +24,21 @@ rules:
24
24
  # parses the numbered lines below and renders them into the spawn prompt's
25
25
  # `## Language` section. Keep one category per numbered line (`N. <sentence>`),
26
26
  # language-agnostic (they apply to any env.HARNESSED_USER_LANG).
27
+ #
28
+ # v16.0 Phase 65 T8 — these lines are a RENDERED surface, so `{{ host.* }}`
29
+ # (workflows/host-primitives.yaml) resolves in them: category 3's example list
30
+ # names the harness the subagent is actually running on. That render is strict —
31
+ # an unknown key throws — so only add a placeholder here, never in a rule whose
32
+ # description is NOT parsed. `follow-user-language` below is exactly such a rule:
33
+ # buildDisciplinesSection skips the whole `language` discipline (the directive is
34
+ # built from env instead), so a placeholder in it would never be substituted.
27
35
  - id: preserve-english-categories
28
36
  description: |-
29
37
  8 categories always stay in their original English form — never translate,
30
38
  transliterate, or rewrite them:
31
39
  1. Code, commands, shell snippets, config file contents, regex, SQL
32
40
  2. File / directory / path names (e.g. `src/components/Button.tsx`, `.planning/STATE.md`)
33
- 3. Tool / framework / library / product / company names (e.g. Claude Code, GSD, subagent, React, Anthropic)
41
+ 3. Tool / framework / library / product / company names (e.g. {{ host.name }}, GSD, subagent, React, Anthropic)
34
42
  4. API / function / class / variable / field names, env vars, config keys (e.g. `buildAgentDef`, `HARNESSED_USER_LANG`)
35
43
  5. Error messages, stack traces, log output
36
44
  6. URLs, commit hashes, issue / PR numbers, version numbers, git refs
@@ -65,7 +65,7 @@ execution stages.
65
65
  - **Strategic** — new feature / milestone / unclear business scope → gstack `/office-hours` + `/plan-ceo-review`
66
66
  - **Phase** — ≥2 open implementation decisions / unclear cross-phase API contract → GSD `/gsd-discuss-phase`
67
67
  - **Subtask** — ≥2 distinct approaches / core algorithm / API contract design / high error cost → superpowers brainstorming
68
- 2. For each layer that fires, hold the dialogue with the user (use AskUserQuestion for option-style decisions) and lock every open decision. After locking blocking decisions, relay the deferrable set to the user in a single batched AskUserQuestion with each agent-recommended default pre-selected — only skip an item if the user explicitly defers it again; a deferrable item is never resolved without the user seeing it.
68
+ 2. For each layer that fires, hold the dialogue with the user (use {{ host.ask_user }} for option-style decisions) and lock every open decision. After locking blocking decisions, relay the deferrable set to the user in a single batched {{ host.ask_user }} with each agent-recommended default pre-selected — only skip an item if the user explicitly defers it again; a deferrable item is never resolved without the user seeing it.
69
69
  3. Transparent-skip layers that don't fire — state which were skipped and why.
70
70
  4. Persist the locked decisions to `.planning/phases/<NN>-<slug>/` via planning-with-files (`findings.md` / `task_plan.md`; NN = two-digit, one above the highest existing phase dir).
71
71
 
@@ -64,7 +64,7 @@ Sister `workflows/capabilities.yaml`:
64
64
  - **战略层** —— 新功能 / 新 milestone / 商业 scope 不清 → gstack `/office-hours` + `/plan-ceo-review`
65
65
  - **Phase 层** —— ≥2 个 open implementation decision / 跨 phase API contract 不清 → GSD `/gsd-discuss-phase`
66
66
  - **子任务层** —— ≥2 个不同方案 / 核心算法 / API contract 设计 / 高错误成本 → superpowers brainstorming
67
- 2. 对每个 fire 的层与用户对话(option 型决策用 AskUserQuestion),锁定每个 open decision。blocking 集锁定后,把 deferrable 集以单轮批量 AskUserQuestion 转达给用户(各项 agent 推荐默认值预选)—— 仅当用户明确再次推迟才可跳过该项;deferrable 项绝不允许在用户未见的情况下被 resolve。
67
+ 2. 对每个 fire 的层与用户对话(option 型决策用 {{ host.ask_user }}),锁定每个 open decision。blocking 集锁定后,把 deferrable 集以单轮批量 {{ host.ask_user }} 转达给用户(各项 agent 推荐默认值预选)—— 仅当用户明确再次推迟才可跳过该项;deferrable 项绝不允许在用户未见的情况下被 resolve。
68
68
  3. 不 fire 的层透明 skip —— 说明哪些被 skip 及原因。
69
69
  4. 把 locked 决策持久化到 `.planning/phases/<NN>-<slug>/`(planning-with-files 的 `findings.md` / `task_plan.md`;NN = 两位数,取现有最大 phase 目录号 + 1)。
70
70
 
@@ -61,7 +61,7 @@ execution stages.
61
61
  - **Strategic** — new feature / milestone / unclear business scope → gstack `/office-hours` + `/plan-ceo-review`
62
62
  - **Phase** — ≥2 open implementation decisions / unclear cross-phase API contract → GSD `/gsd-discuss-phase`
63
63
  - **Subtask** — ≥2 distinct approaches / core algorithm / API contract design / high error cost → superpowers brainstorming
64
- 2. For each layer that fires, hold the dialogue with the user (use AskUserQuestion for option-style decisions) and lock every open decision.
64
+ 2. For each layer that fires, hold the dialogue with the user (use {{ host.ask_user }} for option-style decisions) and lock every open decision.
65
65
  3. Transparent-skip layers that don't fire — state which were skipped and why.
66
66
  4. Persist the locked decisions to `.planning/` via planning-with-files (`findings.md` / `task_plan.md`).
67
67
 
@@ -60,7 +60,7 @@ Sister `workflows/judgments/phase-gate.yaml`:
60
60
  - **战略层** —— 新功能 / 新 milestone / 商业 scope 不清 → gstack `/office-hours` + `/plan-ceo-review`
61
61
  - **Phase 层** —— ≥2 个 open implementation decision / 跨 phase API contract 不清 → GSD `/gsd-discuss-phase`
62
62
  - **子任务层** —— ≥2 个不同方案 / 核心算法 / API contract 设计 / 高错误成本 → superpowers brainstorming
63
- 2. 对每个 fire 的层与用户对话(option 型决策用 AskUserQuestion),锁定每个 open decision。
63
+ 2. 对每个 fire 的层与用户对话(option 型决策用 {{ host.ask_user }}),锁定每个 open decision。
64
64
  3. 不 fire 的层透明 skip —— 说明哪些被 skip 及原因。
65
65
  4. 把 locked 决策持久化到 `.planning/`(planning-with-files 的 `findings.md` / `task_plan.md`)。
66
66
 
@@ -65,7 +65,7 @@ execution stages.
65
65
  - **Strategic** — new feature / milestone / unclear business scope → gstack `/office-hours` + `/plan-ceo-review`
66
66
  - **Phase** — ≥2 open implementation decisions / unclear cross-phase API contract → GSD `/gsd-discuss-phase`
67
67
  - **Subtask** — ≥2 distinct approaches / core algorithm / API contract design / high error cost → superpowers brainstorming
68
- 2. For each layer that fires, hold the dialogue with the user (use AskUserQuestion for option-style decisions) and lock every open decision.
68
+ 2. For each layer that fires, hold the dialogue with the user (use {{ host.ask_user }} for option-style decisions) and lock every open decision.
69
69
  3. Transparent-skip layers that don't fire — state which were skipped and why.
70
70
  4. Persist the locked decisions to `.planning/` via planning-with-files (`findings.md` / `task_plan.md`).
71
71
 
@@ -64,7 +64,7 @@ Sister `workflows/judgments/strategic-gate.yaml`:
64
64
  - **战略层** —— 新功能 / 新 milestone / 商业 scope 不清 → gstack `/office-hours` + `/plan-ceo-review`
65
65
  - **Phase 层** —— ≥2 个 open implementation decision / 跨 phase API contract 不清 → GSD `/gsd-discuss-phase`
66
66
  - **子任务层** —— ≥2 个不同方案 / 核心算法 / API contract 设计 / 高错误成本 → superpowers brainstorming
67
- 2. 对每个 fire 的层与用户对话(option 型决策用 AskUserQuestion),锁定每个 open decision。
67
+ 2. 对每个 fire 的层与用户对话(option 型决策用 {{ host.ask_user }}),锁定每个 open decision。
68
68
  3. 不 fire 的层透明 skip —— 说明哪些被 skip 及原因。
69
69
  4. 把 locked 决策持久化到 `.planning/`(planning-with-files 的 `findings.md` / `task_plan.md`)。
70
70
 
@@ -66,7 +66,7 @@ execution stages.
66
66
  - **Strategic** — new feature / milestone / unclear business scope → gstack `/office-hours` + `/plan-ceo-review`
67
67
  - **Phase** — ≥2 open implementation decisions / unclear cross-phase API contract → GSD `/gsd-discuss-phase`
68
68
  - **Subtask** — ≥2 distinct approaches / core algorithm / API contract design / high error cost → superpowers brainstorming
69
- 2. For each layer that fires, hold the dialogue with the user (use AskUserQuestion for option-style decisions) and lock every open decision.
69
+ 2. For each layer that fires, hold the dialogue with the user (use {{ host.ask_user }} for option-style decisions) and lock every open decision.
70
70
  3. Transparent-skip layers that don't fire — state which were skipped and why.
71
71
  4. Persist the locked decisions to `.planning/` via planning-with-files (`findings.md` / `task_plan.md`).
72
72
 
@@ -65,7 +65,7 @@ Sister `workflows/judgments/subtask-gate.yaml`:
65
65
  - **战略层** —— 新功能 / 新 milestone / 商业 scope 不清 → gstack `/office-hours` + `/plan-ceo-review`
66
66
  - **Phase 层** —— ≥2 个 open implementation decision / 跨 phase API contract 不清 → GSD `/gsd-discuss-phase`
67
67
  - **子任务层** —— ≥2 个不同方案 / 核心算法 / API contract 设计 / 高错误成本 → superpowers brainstorming
68
- 2. 对每个 fire 的层与用户对话(option 型决策用 AskUserQuestion),锁定每个 open decision。
68
+ 2. 对每个 fire 的层与用户对话(option 型决策用 {{ host.ask_user }}),锁定每个 open decision。
69
69
  3. 不 fire 的层透明 skip —— 说明哪些被 skip 及原因。
70
70
  4. 把 locked 决策持久化到 `.planning/`(planning-with-files 的 `findings.md` / `task_plan.md`)。
71
71