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
@@ -0,0 +1,348 @@
1
+ # harnessed host primitives — the `{{ host.* }}` lookup table (v16.0 Phase 65).
2
+ #
3
+ # Renders the SECOND placeholder family in workflows/**/SKILL.md bodies, next to
4
+ # `{{ capabilities.<x>.cmd }}`. One SKILL.md source, two hosts: the placeholder
5
+ # names the primitive abstractly and this table supplies the word the active
6
+ # harness actually uses.
7
+ #
8
+ # {{ host.<primitive> }} ≡ {{ host.<primitive>.default }}
9
+ # {{ host.<primitive>.<variant> }}
10
+ #
11
+ # Rules:
12
+ # - Host columns are `claude` / `codex` (PlatformDescriptor.id). BOTH are
13
+ # required on every cell — the renderer throws on a missing column.
14
+ # - Every primitive MUST declare a `default` variant (bare-placeholder contract,
15
+ # asserted by tests/cli/hostPrimitives.test.ts). Where no variant is a natural
16
+ # default, `default` is a YAML ALIAS of the widest-used variant — see the
17
+ # anchors below. Call sites should still name the variant explicitly.
18
+ # - The `claude` column is the verbatim text today's Claude-authored SKILL.md
19
+ # bodies already contain, so rendering for claude is byte-identical to the
20
+ # pre-Phase-65 artifact. Do not "improve" those strings.
21
+ # - Placeholder SYNTAX is pure ASCII and byte-identical across this file and
22
+ # host-primitives.zh-Hans.yaml; only the rendered TEXT differs by locale.
23
+ # - The zh-Hans sibling must keep the exact same primitive / variant / host key
24
+ # set (scripts/check-yaml-i18n-parity.mjs + tests/cli/hostPrimitives.test.ts).
25
+ # - Proper nouns (tool and API names) are NOT translated — per the project's
26
+ # language rules a tool called `SendMessage` is `SendMessage` in every locale.
27
+ # Those cells are therefore identical in both files by design, not by drift.
28
+ #
29
+ # codex column sourcing (Phase 65 findings F4): tool names and parameters come
30
+ # from upstream `codex-rs/core/src/tools/handlers/multi_agents_spec.rs` on
31
+ # codex-cli 0.155.1 (`multi_agent` stable/true → v1 in effect):
32
+ # spawn_agent(agent_type, message) / send_input(target, items, interrupt) /
33
+ # wait_agent / list_agents / close_agent / resume_agent
34
+ # codex agent LIFECYCLE (session scope, automatic reclamation on exit, nesting)
35
+ # is NOT measured — every cell that would need it says TODO(未验证) instead of
36
+ # asserting. Do not "fill in" those TODOs without a real measurement.
37
+ #
38
+ # VERBATIM DISCIPLINE: every `claude` value below was verified by string-
39
+ # containment against the real artifact it must restore (25/25). Re-verify after
40
+ # any edit — see .planning/phases/65-host-primitive-content/inventory.md
41
+ # § "金标自检" for the checker script and how to run it. Never transcribe a
42
+ # claude value from the builder source (it is an escaped JS template literal) or
43
+ # from a doc — always `sed -n` it out of the real file.
44
+
45
+ version: 1
46
+
47
+ primitives:
48
+ # ── A 类:token 级 ──────────────────────────────────────────────────────────
49
+
50
+ # How a harness names "start a delegated agent".
51
+ spawn_subagent:
52
+ default:
53
+ claude: "Task / Agent tool"
54
+ codex: "spawn_agent tool"
55
+ # Chinese-prose variant: the tool name stays English, the noun is localized.
56
+ zh_tool:
57
+ claude: "Task / Agent 工具"
58
+ codex: "spawn_agent 工具"
59
+ # `orchestratorEn` says "... Task / Agent tools." (plural).
60
+ plural:
61
+ claude: "Task / Agent tools"
62
+ codex: "spawn_agent tools"
63
+ # The CALL form, not the tool-name form: "parallel subs concurrently via
64
+ # parallel Task calls" (src/cli/lib/generateCommands.ts ORCHESTRATOR body).
65
+ # `plural` renders "Task / Agent tools", which does not fit that slot.
66
+ call_plural:
67
+ claude: "Task calls"
68
+ codex: "spawn_agent calls"
69
+ # Same words as `zh_tool`, but at this call site the SOURCE line wrapped
70
+ # between the tool name and 工具 (verify/code-review/SKILL*.md body prose).
71
+ # Carrying the newline in the CELL lets the body hold one unbroken
72
+ # placeholder while the claude render restores the original two lines
73
+ # byte-for-byte. Reflowing the body instead would move a newline into the
74
+ # claude artifact, which the byte golden (rightly) rejects.
75
+ zh_tool_wrapped:
76
+ claude: |-
77
+ Task / Agent
78
+ 工具
79
+ codex: "spawn_agent 工具"
80
+
81
+ # How a harness names "send a message to a running agent".
82
+ send_message:
83
+ default:
84
+ claude: "SendMessage"
85
+ codex: "send_input"
86
+
87
+ # The formation noun. codex v1 has no branded team concept — per F4 the
88
+ # formation IS repeated spawn_agent, so the codex cell is descriptive prose
89
+ # rather than a tool name. If a call site reads badly after substitution,
90
+ # that sentence belongs in a C-class whole-paragraph variant instead.
91
+ team:
92
+ default:
93
+ claude: "Agent Teams"
94
+ codex: "a multi-agent formation (repeated `spawn_agent`)"
95
+ # ATTRIBUTIVE / heading position — "bundled <X> routing", "### <X> conditional
96
+ # escalation", "D-11 <X> 升级". `default`'s codex text is a noun-phrase gloss
97
+ # WITH an explanatory parenthetical: right where the term stands alone
98
+ # ("escalate to Agent Teams"), unreadable as a modifier. Only the codex column
99
+ # differs from `default`; claude stays byte-identical, so the byte golden is
100
+ # unaffected either way. Keep `default` for standalone-noun sites.
101
+ attributive:
102
+ claude: "Agent Teams"
103
+ codex: "multi-agent formation"
104
+ # SINGULAR — "4-specialist Agent Team Pattern C". Also attributive, so the
105
+ # codex column matches `attributive` (that gloss has no plural inflection).
106
+ singular:
107
+ claude: "Agent Team"
108
+ codex: "multi-agent formation"
109
+ # Same words as `attributive`, but the SOURCE line wrapped BETWEEN them
110
+ # (task/deliver/SKILL.md Overview: `D-11 Agent` / `Teams 升级 …`). Same
111
+ # rationale as spawn_subagent.zh_tool_wrapped — the cell carries the
112
+ # newline so the body can hold one unbroken placeholder. That site is
113
+ # attributive too, hence the `attributive` codex text rather than `default`'s.
114
+ wrapped:
115
+ claude: |-
116
+ Agent
117
+ Teams
118
+ codex: "multi-agent formation"
119
+
120
+ # Adjective prefix, used adjacent to (or a few words from) spawn_subagent.
121
+ # Kept separate so the two compose back to the exact original wording.
122
+ native:
123
+ default:
124
+ claude: "CC-native"
125
+ codex: "codex-native"
126
+
127
+ name:
128
+ default:
129
+ claude: "Claude Code"
130
+ codex: "Codex"
131
+ # The BARE agent name as running prose uses it ("<X> loads it when triggers
132
+ # match"), not the product name. Only the claude column differs from
133
+ # `default`; codex's product and agent name are the same word.
134
+ short:
135
+ claude: "Claude"
136
+ codex: "Codex"
137
+
138
+ teammate:
139
+ default:
140
+ claude: "teammate"
141
+ codex: "agent"
142
+ plural:
143
+ claude: "teammates"
144
+ codex: "agents"
145
+
146
+ # The codex tool exists upstream (codex-rs/core/src/tools/handlers/
147
+ # request_user_input{,_spec}.rs) but whether it is ENABLED by default on a
148
+ # given install is NOT verified — the caveat lives once in host_map_notes
149
+ # below, never inline in the 74 prose sites.
150
+ ask_user:
151
+ default:
152
+ claude: "AskUserQuestion"
153
+ codex: "request_user_input"
154
+
155
+ skills_dir:
156
+ default:
157
+ claude: "~/.claude/skills"
158
+ codex: "~/.agents/skills"
159
+
160
+ # ── C 类:整段 ─────────────────────────────────────────────────────────────
161
+ #
162
+ # These exist because the claude wording states a CLAUDE-SPECIFIC FACT. A
163
+ # token-level swap would leave the sentence asserting that fact about codex.
164
+ # The codex column therefore DROPS the host-specific claim rather than
165
+ # re-asserting it for a host where it was never measured.
166
+
167
+ # THREE SHAPES, THREE CONSUMERS — do not point a call site at the wrong one.
168
+ #
169
+ # *_tail → the SKILL surface (scripts/rewrite-skill-invoke-sections.mjs).
170
+ # The sentence names the workflow ("harnessed run auto"), and NOTHING
171
+ # substitutes a name at render time: renderHostPrimitives is a plain
172
+ # table splice with no template context. So the builder — which DOES
173
+ # know the name — emits
174
+ # Do NOT pipe to `harnessed run <the real name>` — that is the
175
+ # CI/headless path (
176
+ # as a literal prefix and the placeholder supplies only the tail. The
177
+ # split point is the last byte the claude and codex wordings share
178
+ # (they diverge immediately after `(`: "in-process" vs "an in-process").
179
+ #
180
+ # orchestrator / execution → the pre-split whole-sentence forms, kept as the
181
+ # readable reference for what prefix + tail compose back to. They
182
+ # carry a literal `<name>` that no renderer resolves, so they have NO
183
+ # live SKILL site. Do not "fix" that by rewording — read the tails.
184
+ #
185
+ # command_* → src/cli/lib/generateCommands.ts (en-only surface). That generator
186
+ # runs in TypeScript with the workflow name in hand, so it can do the
187
+ # `<name>` substitution itself, which is why those two stay whole.
188
+ #
189
+ # `default` aliases `.execution_tail` — the widest-used LIVE variant (19
190
+ # renderings per locale vs 5 for the orchestrator tail).
191
+ harnessed_run_warning_note:
192
+ default: &harnessed_run_execution_tail
193
+ claude: |-
194
+ in-process SDK spawn
195
+ that blocks the session inside Claude Code).
196
+ # Identical for both tails: the codex column drops the Claude-only claims
197
+ # ("bypasses Agent Teams" / "hangs inside Claude Code") rather than
198
+ # re-asserting them, which collapses the two wordings into one.
199
+ codex: &harnessed_run_codex_tail |-
200
+ an in-process SDK
201
+ spawn that blocks this session).
202
+ execution_tail: *harnessed_run_execution_tail
203
+ orchestrator_tail:
204
+ claude: |-
205
+ in-process SDK spawn
206
+ that blocks the session, bypasses Agent Teams, and hangs inside Claude Code).
207
+ codex: *harnessed_run_codex_tail
208
+ execution:
209
+ claude: |-
210
+ Do NOT pipe to `harnessed run <name>` — that is the CI/headless path (in-process SDK spawn
211
+ that blocks the session inside Claude Code).
212
+ codex: |-
213
+ Do NOT pipe to `harnessed run <name>` — that is the CI/headless path (an in-process SDK
214
+ spawn that blocks this session).
215
+ orchestrator:
216
+ claude: |-
217
+ Do NOT pipe to `harnessed run <name>` — that is the CI/headless path (in-process SDK spawn
218
+ that blocks the session, bypasses Agent Teams, and hangs inside Claude Code).
219
+ codex: |-
220
+ Do NOT pipe to `harnessed run <name>` — that is the CI/headless path (an in-process SDK
221
+ spawn that blocks this session).
222
+ # The two `command_*` variants belong to src/cli/lib/generateCommands.ts
223
+ # (en-only surface). Their claude text differs from the SKILL variants above
224
+ # — that divergence is real and pre-existing; see inventory.md § "批 A / 批 D".
225
+ command_orchestrator:
226
+ claude: "Do NOT pipe to `harnessed run <name>` — that is the CI/headless path (SDK spawn, blocks the session, no Agent Teams, no clarification round-trip)."
227
+ codex: "Do NOT pipe to `harnessed run <name>` — that is the CI/headless path (SDK spawn, blocks the session, no clarification round-trip)."
228
+ command_execution:
229
+ claude: "Do NOT pipe to `harnessed run <name>` — that is the CI/headless path (SDK spawn)."
230
+ codex: "Do NOT pipe to `harnessed run <name>` — that is the CI/headless path (SDK spawn)."
231
+
232
+ # `default` aliases `.skill` (30 hits vs 1 for the command surface).
233
+ teams_step_note:
234
+ default: &teams_step_skill
235
+ claude: '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.'
236
+ # Drops the `~/.claude/rules/agent-teams.md` read — that file does not exist
237
+ # on codex, and F7b already settled that codex variants inline the points
238
+ # rather than pointing at an external file.
239
+ codex: '4. If `parallelism.escalate_to_teams === true`: spawn one agent per fired sub with `spawn_agent(message: <that sub''s `harnessed prompt <sub>` prompt>)` — the tool takes only `agent_type` and `message`, and `agent_type` names an agent role under `~/.codex/agents/` rather than labelling the task, so identify the sub inside the message. Coordinate with `send_input(target, items)`; `wait_agent` blocks until one finishes and `list_agents` enumerates the running set. When a sub is finished, close it with `close_agent`. Still checkpoint each sub (`complete` / `fail`) as below. TODO(未验证): codex agent lifecycle — whether agents are session-scoped, whether anything is reclaimed automatically on exit, and whether an agent may spawn another. Do not rely on any of it until measured.'
240
+ skill: *teams_step_skill
241
+ command:
242
+ claude: '4. If `parallelism.escalate_to_teams === true`: this stage needs multiple subagents to coordinate (SendMessage / shared contract). 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>)`; the team forms implicitly on the FIRST spawn with this session as lead (`team_name` 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") — shutdown is a REQUEST, so re-ask rather than assume, and shut every teammate down before you finish (a teammate you never stopped keeps burning tokens and can hang the host). The team directory is removed automatically at session exit; there is no teardown tool. Still checkpoint each sub (`complete` / `fail`) as below.'
243
+ codex: '4. If `parallelism.escalate_to_teams === true`: this stage needs multiple agents to coordinate. Spawn one agent per fired sub with `spawn_agent(message: <that sub''s `harnessed prompt <sub>` prompt>)` — the tool takes only `agent_type` and `message`, and `agent_type` names an agent role under `~/.codex/agents/` rather than labelling the task, so identify the sub inside the message. Coordinate with `send_input(target, items)`; `wait_agent` blocks until one finishes and `list_agents` enumerates the running set. Close each finished agent with `close_agent`, and close every agent you spawned before you finish (an agent you never closed keeps burning tokens). Still checkpoint each sub (`complete` / `fail`) as below. TODO(未验证): codex agent lifecycle — session scope, automatic reclamation on exit, nesting. Not asserted here.'
244
+
245
+ # Two bullets, each carrying 3 LEADING SPACES in the original. A block scalar
246
+ # would strip that common indent, so these are double-quoted with \n.
247
+ teams_teardown_note:
248
+ default:
249
+ claude: " - **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).\n - **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."
250
+ codex: " - **Close every agent 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, call `close_agent` for each agent you spawned and confirm it stopped. An agent you never closed keeps consuming tokens and can hang the host (headless especially — issue #7: an 11h hang, work complete but the process never exited). TODO(未验证): whether codex reclaims running agents on session exit — this note deliberately asserts nothing about it, so close them explicitly.\n - **Headless runs sequentially**: in a headless run `harnessed gates` already returns `escalate_to_teams: false`. Do NOT spawn agents in headless even if you think it would parallelize — run the fired subs sequentially in-session instead."
251
+
252
+ delivery_contract_note:
253
+ default:
254
+ claude: "delivery contract: use a BLOCKING Agent/Task call — only a blocking call returns the subagent's final text as your tool result. A named/background teammate's final message is DISCARDED by the platform; if you must run it that way, instruct the agent to write its findings to a file (and read it back) or SendMessage them to the main session — otherwise the COMPLETE promise and the findings never reach you."
255
+ codex: "delivery contract: instruct the agent to write its findings to a file (and read it back), or to return them with `send_input` to this session; call `wait_agent` before you read. TODO(未验证): whether codex hands a spawned agent's final text back to the caller — until measured, do not rely on it, so that the COMPLETE promise and the findings reach you by file or by `send_input` either way."
256
+ checklist:
257
+ claude: "Delivery contract: a named/background teammate's FINAL message is discarded by the platform — every finding must arrive via SendMessage to the lead or be written to a file the lead reads back; never rely on the teammate's last output"
258
+ codex: "Delivery contract: every finding must arrive via `send_input` to the lead or be written to a file the lead reads back; call `wait_agent` before reading. TODO(未验证): whether codex returns a spawned agent's final message to the lead — do not rely on it."
259
+
260
+ # `default` aliases `.checklist` — the shortest, most generic phrasing of the
261
+ # same discipline. The other three are site-specific wordings that must each
262
+ # restore their own original bytes.
263
+ teams_cleanup_note:
264
+ default: &teams_cleanup_checklist
265
+ claude: "Cleanup: ask each teammate to shut down by name — that request IS the teardown (CC 2.1.178+ has no delete tool); the team's shared dirs are removed automatically at session exit, and a teammate that ignores the request is only guaranteed stopped when the session ends"
266
+ codex: "Cleanup: call `close_agent` for each agent you spawned and confirm it stopped. TODO(未验证): whether codex reclaims agents at session exit — close them explicitly rather than relying on it"
267
+ checklist: *teams_cleanup_checklist
268
+ # C-class PHRASE (not a token swap). "ask each teammate to shut down BY NAME"
269
+ # is the Claude Code teardown IDIOM — CC 2.1.178+ has no delete tool, so the
270
+ # request itself IS the teardown. Substituting only the noun would leave codex
271
+ # reading a WRONG INSTRUCTION: codex stops an agent with `close_agent`, and
272
+ # nothing there answers to a by-name shutdown request. Deliberately SHORT —
273
+ # one of its two sites is a frontmatter `description`, where length dilutes
274
+ # the trigger signal.
275
+ shutdown_phrase:
276
+ claude: "按名请求每个 teammate shut down"
277
+ codex: "对每个 agent 调 `close_agent`"
278
+ multispec_checklist:
279
+ claude: "Cleanup MANDATORY: ask each of the 4 teammates to shut down by name and confirm it stopped — that request IS the teardown (no delete tool exists); the team dirs are removed automatically at session exit, and a teammate that ignores the request is only guaranteed stopped when the session ends"
280
+ codex: "Cleanup MANDATORY: call `close_agent` for each of the 4 agents and confirm it stopped. TODO(未验证): whether codex reclaims agents at session exit — close them explicitly rather than relying on it"
281
+ deliver:
282
+ claude: |-
283
+ 任 1 fire → escalate subagent fan-out → Agent Teams Pattern A/B/C。Cleanup mandatory
284
+ per agent-teams.md 防呆清单 (lead 按名请求每个 teammate shut down; CC 2.1.178+ 无 teardown
285
+ 工具,团目录 session 退出时自动清理 —— 剩下的纪律是别把 teammate 落在运行态) — engine-level
286
+ wiring, NOT yaml schema scope。
287
+ codex: |-
288
+ 任 1 fire → escalate subagent fan-out → 多 agent 编队 Pattern A/B/C。Cleanup mandatory
289
+ (对每个 spawn 出来的 agent 调 `close_agent` 并确认它停了 —— 别把 agent 落在运行态) —
290
+ engine-level wiring, NOT yaml schema scope。
291
+ TODO(未验证):codex 是否在 session 退出时回收运行中的 agent。
292
+ multispec:
293
+ claude: |-
294
+ Agent Teams cleanup discipline — 团目录在 session 退出时自动清理,无独立 teardown 工具,
295
+ 剩下的纪律是别把 teammate 落在运行态)。
296
+ codex: |-
297
+ cleanup discipline — 对每个 spawn 出来的 agent 调 `close_agent` 并确认它停了,
298
+ 别把 agent 落在运行态)。TODO(未验证):codex 的 session 退出回收行为。
299
+
300
+ multispec_spawn_note:
301
+ default:
302
+ claude: |-
303
+ `Agent(name, run_in_background=true)` — the team forms implicitly on the FIRST spawn (CC
304
+ 2.1.178+ has no create step / no create tool), teammates 互相 SendMessage 质询 findings 是否
305
+ 真问题 (NOT fire-and-forget)
306
+ codex: |-
307
+ `spawn_agent(message: <brief>)` ×4 — there is no create step, and no task-label
308
+ parameter either (`agent_type` names an agent role under `~/.codex/agents/`, not a
309
+ task), so name the specialist lens inside the brief; the four agents cross-question
310
+ each other's findings with `send_input` (NOT fire-and-forget)
311
+ # ── The two role-prompts.yaml `verify-multispec` sites (Phase 65 tail) ──
312
+ # Both state the SAME Claude-Code-only fact in two shapes: a team FORMS on the
313
+ # first spawn and `team_name` is accepted-then-ignored. codex's multi-agent v1
314
+ # has neither concept — no team handle, and `spawn_agent(agent_type, message)`
315
+ # takes no team input — so a token-level swap would have the codex artifact
316
+ # asserting a formation semantic that does not exist there. Both codex columns
317
+ # therefore state only what the upstream tool spec shows (no create tool in the
318
+ # 6-tool surface) and say NOTHING about agent lifecycle, which is unmeasured.
319
+ #
320
+ # `responsibility` carries a NEWLINE: the source block scalar wrapped inside
321
+ # the clause, and the cell holds that break so the body can carry one unbroken
322
+ # placeholder (same rationale as spawn_subagent.zh_tool_wrapped).
323
+ responsibility:
324
+ claude: |-
325
+ — the team forms
326
+ implicitly on the first spawn, there is no create step —
327
+ codex: "— there is no create step: four `spawn_agent` calls are the whole formation —"
328
+ checklist:
329
+ claude: "(the first spawn forms the team; `team_name` is ignored)"
330
+ codex: "(one `spawn_agent(agent_type, message)` call per agent; `agent_type` is an agent role, not a task label, so name the specialist in the message; there is no create step and no team handle)"
331
+
332
+ # ─────────────────────────────────────────────────────────────────────────────
333
+ # Host-map section notes (Phase 65 R4).
334
+ #
335
+ # NOT part of `primitives:` — `loadHostPrimitives` reads only `primitives`, so
336
+ # nothing here affects placeholder rendering or the parity/`default` contracts.
337
+ # These lines are emitted INSIDE the codex-only map section
338
+ # (`<!-- harnessed:host-map:start -->` … `<!-- harnessed:host-map:end -->`)
339
+ # by T10. The claude artifact gets ZERO bytes from this key.
340
+ #
341
+ # Purpose: caveats that are true for the whole artifact and must be stated ONCE,
342
+ # rather than smeared across every prose site that touches them.
343
+ # ─────────────────────────────────────────────────────────────────────────────
344
+ host_map_notes:
345
+ codex:
346
+ - "`request_user_input` — TODO(未验证): the tool exists upstream (`codex-rs/core/src/tools/handlers/request_user_input{,_spec}.rs`), but whether it is enabled on this install was not measured. The `default_mode_request_user_input` entry in `codex features list` is a mode flag, not the tool's own switch. If a clarification round-trip is unavailable, do not guess — stop and report `STATUS: NEEDS_CLARIFICATION` with the questions."
347
+ - "Claude Code plugin components — some workflow prose names an upstream component distributed as a Claude Code plugin (e.g. `planning-with-files`, invoked as `/plan`). That is the component's actual distribution channel, not a Claude Code-specific spelling of something codex also has, so the wording is left as-is. On this host those components are NOT installed: harnessed reports it at capability-resolution time as a per-capability warning. Treat such a step as unavailable rather than substituting an equivalent, and record the skip."
348
+ - "codex agent lifecycle — session scope, automatic reclamation on session exit, and whether an agent may spawn another are ALL unmeasured. Nothing in this artifact asserts them. Close every agent you spawn with `close_agent` explicitly rather than relying on any cleanup you have not observed."