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.
- package/dist/cli.mjs +8266 -6902
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/messages/en.json +4 -0
- package/messages/zh-Hans.json +4 -0
- package/package.json +1 -1
- package/workflows/SCHEMA.md +31 -0
- package/workflows/auto/SKILL.md +7 -9
- package/workflows/auto/SKILL.zh-Hans.md +7 -9
- package/workflows/capabilities.yaml +16 -0
- package/workflows/disciplines/language.yaml +9 -1
- package/workflows/discuss/auto/SKILL.md +1 -1
- package/workflows/discuss/auto/SKILL.zh-Hans.md +1 -1
- package/workflows/discuss/phase/SKILL.md +1 -1
- package/workflows/discuss/phase/SKILL.zh-Hans.md +1 -1
- package/workflows/discuss/strategic/SKILL.md +1 -1
- package/workflows/discuss/strategic/SKILL.zh-Hans.md +1 -1
- package/workflows/discuss/subtask/SKILL.md +1 -1
- package/workflows/discuss/subtask/SKILL.zh-Hans.md +1 -1
- package/workflows/host-primitives.yaml +348 -0
- package/workflows/host-primitives.zh-Hans.yaml +319 -0
- package/workflows/plan/architecture/SKILL.md +4 -5
- package/workflows/plan/architecture/SKILL.zh-Hans.md +4 -5
- package/workflows/plan/auto/SKILL.md +6 -7
- package/workflows/plan/auto/SKILL.zh-Hans.md +6 -7
- package/workflows/plan/phase/SKILL.md +4 -5
- package/workflows/plan/phase/SKILL.zh-Hans.md +4 -5
- package/workflows/research/SKILL.md +5 -6
- package/workflows/research/SKILL.zh-Hans.md +5 -6
- package/workflows/retro/SKILL.md +4 -5
- package/workflows/retro/SKILL.zh-Hans.md +4 -5
- package/workflows/role-prompts.yaml +15 -16
- package/workflows/role-prompts.zh-Hans.yaml +14 -15
- package/workflows/ship/auto/SKILL.md +6 -7
- package/workflows/ship/auto/SKILL.zh-Hans.md +6 -7
- package/workflows/ship/preflight/SKILL.md +4 -5
- package/workflows/ship/preflight/SKILL.zh-Hans.md +4 -5
- package/workflows/task/auto/SKILL.md +7 -8
- package/workflows/task/auto/SKILL.zh-Hans.md +7 -8
- package/workflows/task/clarify/SKILL.md +1 -1
- package/workflows/task/clarify/SKILL.zh-Hans.md +1 -1
- package/workflows/task/code/SKILL.md +4 -5
- package/workflows/task/code/SKILL.zh-Hans.md +4 -5
- package/workflows/task/deliver/SKILL.md +11 -16
- package/workflows/task/deliver/SKILL.zh-Hans.md +11 -15
- package/workflows/task/test/SKILL.md +4 -5
- package/workflows/task/test/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/auto/SKILL.md +9 -10
- package/workflows/verify/auto/SKILL.zh-Hans.md +9 -10
- package/workflows/verify/code-review/SKILL.md +6 -8
- package/workflows/verify/code-review/SKILL.zh-Hans.md +6 -8
- package/workflows/verify/design/SKILL.md +4 -5
- package/workflows/verify/design/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/eval-review/SKILL.md +4 -5
- package/workflows/verify/eval-review/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/multispec/SKILL.md +19 -23
- package/workflows/verify/multispec/SKILL.zh-Hans.md +18 -22
- package/workflows/verify/paranoid/SKILL.md +4 -5
- package/workflows/verify/paranoid/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/progress/SKILL.md +4 -5
- package/workflows/verify/progress/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/qa/SKILL.md +4 -5
- package/workflows/verify/qa/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/second-opinion/SKILL.md +4 -5
- package/workflows/verify/second-opinion/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/security/SKILL.md +4 -5
- package/workflows/verify/security/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/simplify/SKILL.md +4 -5
- package/workflows/verify/simplify/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/validate-phase/SKILL.md +4 -5
- package/workflows/verify/validate-phase/SKILL.zh-Hans.md +4 -5
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: task-deliver
|
|
3
3
|
description: |
|
|
4
4
|
task-deliver workflow v3 — Stage ③.d 子任务交付 sub-workflow (harnessed 自有 completion-gate
|
|
5
|
-
+
|
|
5
|
+
+ {{ host.team.attributive }} conditional escalation + R20.10 explicit max_iterations_exceeded
|
|
6
6
|
fallback)。2-phase composition: 01-deliver (completion-gate with completion_promise
|
|
7
7
|
verbatim "COMPLETE" + parallelism judgments.parallelism-gate.completion-gate-wrapper.fires +
|
|
8
8
|
fallback emit_warning_and_halt exit_code 1) → 02-progress-mark (Claude Code plugin
|
|
@@ -26,7 +26,7 @@ trigger_phrases:
|
|
|
26
26
|
|
|
27
27
|
2-phase 子工作流,将 CLAUDE.md Stage ③.d 子任务交付纪律映射到 harnessed runtime,
|
|
28
28
|
完整采用 `harnessed.workflow.v3` schema(Phase v3.0-3.4 W0 T3.4.W0.9 — D-09 L0
|
|
29
|
-
Discipline Substrate + D-10 完成保证 + D-11
|
|
29
|
+
Discipline Substrate + D-10 完成保证 + D-11 {{ host.team.attributive }} 升级 5 触发
|
|
30
30
|
OR-chain + R20.10 explicit max_iterations_exceeded handler)。
|
|
31
31
|
|
|
32
32
|
| phase | id | upstream | model | capability / args / parallelism / fallback |
|
|
@@ -67,19 +67,16 @@ main-session-fallback 任意 1 种模式外层(NOT 互斥触发器,而是 pa
|
|
|
67
67
|
中的 `wraps:` 正交字段)。Runtime engine 评估 wrapping mode 后 spawn 相应
|
|
68
68
|
执行单元并套 completion check。
|
|
69
69
|
|
|
70
|
-
###
|
|
70
|
+
### {{ host.team.attributive }} 条件性升级 (D-11 + agent-teams.md 5 OR-chain)
|
|
71
71
|
|
|
72
72
|
5 个升级触发(来自 capabilities.yaml `agent-teams-create.fires_when` + agent-teams.md):
|
|
73
|
-
1. `teammate_send_message_needed == true` — teammate 间
|
|
73
|
+
1. `teammate_send_message_needed == true` — {{ host.teammate }} 间 {{ host.send_message }} 互通(NOT fire-and-forget)
|
|
74
74
|
2. `subagent_context_overflow == true` — subagent 撞 context 上限
|
|
75
|
-
3. `shared_task_list == true` — 多 teammate 共享 task list 自协调
|
|
75
|
+
3. `shared_task_list == true` — 多 {{ host.teammate }} 共享 task list 自协调
|
|
76
76
|
4. `opposing_hypothesis_debate == true` — 对立假设辩论
|
|
77
77
|
5. `fullstack_three_way == true` — 全栈三路协同
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
遵循 agent-teams.md 防呆清单(lead 按名请求每个 teammate shut down;CC 2.1.178+ 已无
|
|
81
|
-
teardown 工具,团目录在 session 退出时自动清理——剩下的纪律是别把 teammate 落在运行态)
|
|
82
|
-
——属于 engine 级别的连接,NOT yaml schema 的职责范围。
|
|
79
|
+
{{ host.teams_cleanup_note.deliver }}
|
|
83
80
|
|
|
84
81
|
### R20.10 explicit max_iterations_exceeded handler(非静默中止)
|
|
85
82
|
|
|
@@ -108,17 +105,16 @@ Claude Code plugin marketplace 安装)。
|
|
|
108
105
|
|
|
109
106
|
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
110
107
|
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
111
|
-
|
|
108
|
+
{{ host.native }} {{ host.spawn_subagent.zh_tool }} spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
112
109
|
|
|
113
|
-
**不要** pipe 到 `harnessed run task-deliver` —— 那是 CI/headless 路径(
|
|
114
|
-
Code 内部会阻塞 session)。
|
|
110
|
+
**不要** pipe 到 `harnessed run task-deliver` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
115
111
|
|
|
116
112
|
1. Bash: `harnessed prompt task-deliver --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
117
|
-
2. 用
|
|
113
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
|
|
118
114
|
- subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete task-deliver --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
119
115
|
- 若被拦下,跑 `harnessed checkpoint fail task-deliver --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
120
116
|
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
121
|
-
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用
|
|
117
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
122
118
|
4. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete task-deliver --result-file <path> --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
123
119
|
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail task-deliver --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
124
120
|
|
|
@@ -128,7 +124,7 @@ Code 内部会阻塞 session)。
|
|
|
128
124
|
|
|
129
125
|
- D-09 — L0 Discipline Substrate always-on (6 disciplines)
|
|
130
126
|
- D-10 — 完成保证真接 SDK wrapper (NOT mock reference; v0.2.0 ship)
|
|
131
|
-
- D-11 —
|
|
127
|
+
- D-11 — {{ host.team.attributive }} 升级 5 触发 OR-chain per bundled parallelism-gate rules
|
|
132
128
|
- R20.10 — max_iterations_exceeded explicit emit_warning_and_halt
|
|
133
129
|
(acceptance c "NOT silent abort"); 完成闸门正交 wrapper wraps 3 mode
|
|
134
130
|
- D-02 — SKILL.md `name:` bare slash cmd (`task-deliver` NOT `task/deliver`) per ADR 0030
|
|
@@ -102,17 +102,16 @@ result. Never mark this sub complete on a narrowed pass alone.
|
|
|
102
102
|
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
103
103
|
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
104
104
|
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
105
|
-
|
|
105
|
+
{{ host.native }} {{ host.spawn_subagent }} (keeps the session responsive + lets clarification round-trips reach the user).
|
|
106
106
|
|
|
107
|
-
Do NOT pipe to `harnessed run task-test` — that is the CI/headless path (
|
|
108
|
-
that blocks the session inside Claude Code).
|
|
107
|
+
Do NOT pipe to `harnessed run task-test` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
109
108
|
|
|
110
109
|
1. Bash: `harnessed prompt task-test --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
111
|
-
2. Spawn a
|
|
110
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
|
|
112
111
|
- on return, write the subagent's final output to a file and run `harnessed checkpoint complete task-test --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
113
112
|
- if it blocks, run `harnessed checkpoint fail task-test --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
|
|
114
113
|
- 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.
|
|
115
|
-
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via
|
|
114
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
116
115
|
4. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete task-test --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. `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
117
116
|
5. If the complete gate blocked: Bash `harnessed checkpoint fail task-test --failing-tests <n>` to record the attempt. It prints `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP` once a stop condition is reached. 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.
|
|
118
117
|
|
|
@@ -97,17 +97,16 @@ if [ -n "$AFFECTED" ]; then npx vitest run $AFFECTED; fi
|
|
|
97
97
|
|
|
98
98
|
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
99
99
|
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
100
|
-
|
|
100
|
+
{{ host.native }} {{ host.spawn_subagent.zh_tool }} spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
101
101
|
|
|
102
|
-
**不要** pipe 到 `harnessed run task-test` —— 那是 CI/headless 路径(
|
|
103
|
-
Code 内部会阻塞 session)。
|
|
102
|
+
**不要** pipe 到 `harnessed run task-test` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
104
103
|
|
|
105
104
|
1. Bash: `harnessed prompt task-test --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
106
|
-
2. 用
|
|
105
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
|
|
107
106
|
- subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete task-test --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
108
107
|
- 若被拦下,跑 `harnessed checkpoint fail task-test --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
109
108
|
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
110
|
-
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用
|
|
109
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
111
110
|
4. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete task-test --result-file <path> --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
112
111
|
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail task-test --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
113
112
|
|
|
@@ -3,7 +3,7 @@ name: verify
|
|
|
3
3
|
description: |
|
|
4
4
|
Stage ④ Verify master orchestrator — 7 sub conditional per bundled Verify-stage cadence:
|
|
5
5
|
progress 必跑 → code-review 并行 → paranoid 关键模块强制 → qa/security/design 可选
|
|
6
|
-
并行 conditional → simplify 末尾 → multispec 关键发布 Pattern C 4-specialist
|
|
6
|
+
并行 conditional → simplify 末尾 → multispec 关键发布 Pattern C 4-specialist {{ host.team.singular }}。
|
|
7
7
|
schema_version: harnessed.workflow.v3 with delegates_to (7 sub: progress serial order 1 +
|
|
8
8
|
5 parallel conditional + simplify serial order 99) + disciplines_applied (6 default) +
|
|
9
9
|
tools_available (10 entry)。Triggered by harnessed CLI `harnessed verify --phase <num>` or
|
|
@@ -32,7 +32,7 @@ via stage-routing.yaml):
|
|
|
32
32
|
| parallel | `qa` | `judgments.stage-routing.verify-qa-ui.fires` | parallel | phase.has_ui_changes == true |
|
|
33
33
|
| parallel | `security` | `judgments.stage-routing.verify-security-secrets.fires` | parallel | phase.has_auth_or_secrets == true |
|
|
34
34
|
| parallel | `design` | `judgments.web-design-routing.design-review-post.fires` | parallel | phase.has_design_changes == true |
|
|
35
|
-
| parallel | `multispec` | `judgments.stage-routing.verify-multispec-critical-release.fires` | parallel | is_critical_release == true (Pattern C 4-specialist
|
|
35
|
+
| parallel | `multispec` | `judgments.stage-routing.verify-multispec-critical-release.fires` | parallel | is_critical_release == true (Pattern C 4-specialist {{ host.team.singular }}) |
|
|
36
36
|
| 99 (serial) | `simplify` | (unconditional — 末尾 tail) | serial | always — code-simplifier 末尾移除重复 / 多余逻辑 |
|
|
37
37
|
|
|
38
38
|
Engine runtime per T3.5.W0.1 `runMasterOrchestrator`:
|
|
@@ -48,7 +48,7 @@ Engine runtime per T3.5.W0.1 `runMasterOrchestrator`:
|
|
|
48
48
|
- 先 `code-review` 多 Agent 并行 (sub code-review)
|
|
49
49
|
- **关键模块强制** `/review` Paranoid Staff Engineer (sub paranoid, gate is_critical_module)
|
|
50
50
|
- 可选 `/qa` (sub qa, gate has_ui_changes) / `/cso` (sub security, gate has_auth_or_secrets) / `/design-review` (sub design, gate has_design_changes)
|
|
51
|
-
- **关键发布 / 大重构 PR** 升级 4-specialist
|
|
51
|
+
- **关键发布 / 大重构 PR** 升级 4-specialist {{ host.team.singular }} Pattern C (sub multispec, gate critical-release-upgrade)
|
|
52
52
|
- 再 `code-simplifier` 末尾 (sub simplify, serial order 99)
|
|
53
53
|
|
|
54
54
|
## When verification fails
|
|
@@ -85,25 +85,24 @@ The numbered sequence below **is** the state machine — execute it step by step
|
|
|
85
85
|
Do NOT improvise an equivalent flow from the Overview above: freelancing bypasses the engine
|
|
86
86
|
(no per-sub ledger, no evidence guard, no recovery). harnessed is the orchestration brain
|
|
87
87
|
(`harnessed gates` says which subs fire, `harnessed prompt` gives each spawn-ready prompt,
|
|
88
|
-
`harnessed checkpoint` records the ledger); YOU spawn with
|
|
88
|
+
`harnessed checkpoint` records the ledger); YOU spawn with {{ host.native }} {{ host.spawn_subagent.plural }}.
|
|
89
89
|
|
|
90
|
-
Do NOT pipe to `harnessed run verify` — that is the CI/headless path (
|
|
91
|
-
that blocks the session, bypasses Agent Teams, and hangs inside Claude Code).
|
|
90
|
+
Do NOT pipe to `harnessed run verify` — that is the CI/headless path ({{ host.harnessed_run_warning_note.orchestrator_tail }}
|
|
92
91
|
|
|
93
|
-
1. If the clarification criteria fire for "$ARGUMENTS" (≥2 approaches / core algorithm / API contract / high error cost), clarify interactively in THIS session first (
|
|
92
|
+
1. If the clarification criteria fire for "$ARGUMENTS" (≥2 approaches / core algorithm / API contract / high error cost), clarify interactively in THIS session first ({{ host.ask_user }}) and lock decisions; otherwise transparent-skip. Produce a locked spec.
|
|
94
93
|
1b. Bash: `harnessed facts verify --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.
|
|
95
94
|
2. Bash: `harnessed gates verify --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.
|
|
96
95
|
3. Bash: `harnessed checkpoint start verify --plan '<the verbatim gates JSON from step 2>'` → seeds the per-sub ledger so `harnessed status --recover` can re-orient you after compaction.
|
|
97
|
-
|
|
96
|
+
{{ host.teams_step_note.skill }}
|
|
98
97
|
5. Otherwise, for each fired sub in `order` (serial subs sequentially, parallel subs concurrently):
|
|
99
98
|
- **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.
|
|
100
99
|
- **Else (leaf sub):**
|
|
101
100
|
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → parse `{prompt, max_iterations, model}`.
|
|
102
|
-
b. Spawn a
|
|
101
|
+
b. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
|
|
103
102
|
- 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>`.
|
|
104
103
|
- 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.
|
|
105
104
|
- 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.
|
|
106
|
-
c. If the output contains `STATUS: NEEDS_CLARIFICATION` + questions: STOP, relay them verbatim via
|
|
105
|
+
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.
|
|
107
106
|
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).
|
|
108
107
|
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.
|
|
109
108
|
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.
|
|
@@ -3,7 +3,7 @@ name: verify
|
|
|
3
3
|
description: |
|
|
4
4
|
Stage ④ Verify 主控编排器 — 7 个条件子工作流,按打包的 Verify 阶段节奏执行:
|
|
5
5
|
progress 必跑 → code-review 并行 → paranoid 关键模块强制 → qa/security/design 可选
|
|
6
|
-
并行 conditional → simplify 末尾 → multispec 关键发布 Pattern C 4-specialist
|
|
6
|
+
并行 conditional → simplify 末尾 → multispec 关键发布 Pattern C 4-specialist {{ host.team.singular }}。
|
|
7
7
|
schema_version: harnessed.workflow.v3,含 delegates_to(7 sub:progress serial order 1 +
|
|
8
8
|
5 parallel conditional + simplify serial order 99)+ disciplines_applied(6 default)+
|
|
9
9
|
tools_available(10 entry)。通过 harnessed CLI `harnessed verify --phase <num>` 或
|
|
@@ -32,7 +32,7 @@ via stage-routing.yaml):
|
|
|
32
32
|
| parallel | `qa` | `judgments.stage-routing.verify-qa-ui.fires` | parallel | phase.has_ui_changes == true |
|
|
33
33
|
| parallel | `security` | `judgments.stage-routing.verify-security-secrets.fires` | parallel | phase.has_auth_or_secrets == true |
|
|
34
34
|
| parallel | `design` | `judgments.web-design-routing.design-review-post.fires` | parallel | phase.has_design_changes == true |
|
|
35
|
-
| parallel | `multispec` | `judgments.stage-routing.verify-multispec-critical-release.fires` | parallel | is_critical_release == true(Pattern C 4-specialist
|
|
35
|
+
| parallel | `multispec` | `judgments.stage-routing.verify-multispec-critical-release.fires` | parallel | is_critical_release == true(Pattern C 4-specialist {{ host.team.singular }}) |
|
|
36
36
|
| 99 (serial) | `simplify` | (无条件 — 末尾收尾) | serial | 始终触发 — code-simplifier 末尾移除重复 / 多余逻辑 |
|
|
37
37
|
|
|
38
38
|
引擎运行时 per T3.5.W0.1 `runMasterOrchestrator`:
|
|
@@ -48,7 +48,7 @@ via stage-routing.yaml):
|
|
|
48
48
|
- 先 `code-review` 多 Agent 并行(sub code-review)
|
|
49
49
|
- **关键模块强制** `/review` Paranoid Staff Engineer(sub paranoid,关卡 is_critical_module)
|
|
50
50
|
- 可选 `/qa`(sub qa,关卡 has_ui_changes)/ `/cso`(sub security,关卡 has_auth_or_secrets)/ `/design-review`(sub design,关卡 has_design_changes)
|
|
51
|
-
- **关键发布 / 大重构 PR** 升级 4-specialist
|
|
51
|
+
- **关键发布 / 大重构 PR** 升级 4-specialist {{ host.team.singular }} Pattern C(sub multispec,关卡 critical-release-upgrade)
|
|
52
52
|
- 再 `code-simplifier` 末尾(sub simplify,serial order 99)
|
|
53
53
|
|
|
54
54
|
## 验证判否之后
|
|
@@ -84,25 +84,24 @@ Sister `workflows/capabilities.yaml`:
|
|
|
84
84
|
下面这套编号序列**就是** state machine —— 逐步用 Bash 执行。**不要**从上方 Overview 自行演绎一套
|
|
85
85
|
等价流程:freestyle 会旁路引擎(无 per-sub ledger、无 evidence guard、无 recovery)。harnessed 是
|
|
86
86
|
编排大脑(`harnessed gates` 决定哪些 sub fire,`harnessed prompt` 给出每个 spawn-ready prompt,
|
|
87
|
-
`harnessed checkpoint` 记录 ledger);**你**(主 session)用
|
|
87
|
+
`harnessed checkpoint` 记录 ledger);**你**(主 session)用 {{ host.native }} {{ host.spawn_subagent.zh_tool }}做 spawn。
|
|
88
88
|
|
|
89
|
-
**不要** pipe 到 `harnessed run verify` —— 那是 CI/headless 路径(
|
|
90
|
-
session、绕过 Agent Teams,在 Claude Code 内部调用时会挂死)。
|
|
89
|
+
**不要** pipe 到 `harnessed run verify` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.orchestrator_tail }}
|
|
91
90
|
|
|
92
|
-
1. 若 "$ARGUMENTS" 触发澄清判据(≥2 方案 / 核心算法 / API contract / 高错误成本),先在**本 session** 交互澄清(
|
|
91
|
+
1. 若 "$ARGUMENTS" 触发澄清判据(≥2 方案 / 核心算法 / API contract / 高错误成本),先在**本 session** 交互澄清({{ host.ask_user }})并锁决策;否则透明 skip。产出 locked spec。
|
|
93
92
|
1b. Bash: `harnessed facts verify --out .harnessed-facts.json` → 它只列出**本阶段 gate 真正读取**的 fact:能确定性推导的已填好(改动行数 / 触及文件数 / stage,来自 git),判断题留 `null` 并附一行说明。编辑该文件,把 `facts` 里每个 `null` 按 locked spec 换成你的真实判断 —— 只有确实无法判断时才留 null(此时回退内置默认值)。**不要**跳过本步,也**不要**自行编造命令没问的 fact。
|
|
94
93
|
2. Bash: `harnessed gates verify --task "<locked spec>" --context-file .harnessed-facts.json --skip-sub discuss` → 解析 JSON `{fire, skip, parallelism}`。这是 plan SoT(不 spawn)。保留 verbatim JSON。
|
|
95
94
|
3. Bash: `harnessed checkpoint start verify --plan '<step 2 的 verbatim gates JSON>'` → seed per-sub ledger,让 `harnessed status --recover` 能在 compaction 后给你重新定位。
|
|
96
|
-
|
|
95
|
+
{{ host.teams_step_note.skill }}
|
|
97
96
|
5. 否则,对 `order` 里每个 fired sub(serial 串行、parallel 并发):
|
|
98
97
|
- **若该项 `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 重复本循环。
|
|
99
98
|
- **否则(leaf sub):**
|
|
100
99
|
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
101
|
-
b. 用
|
|
100
|
+
b. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
|
|
102
101
|
- subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete <sub> --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
103
102
|
- 若被拦下,跑 `harnessed checkpoint fail <sub> --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
104
103
|
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
105
|
-
c. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用
|
|
104
|
+
c. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn 同一 sub。
|
|
106
105
|
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`,是可审计的覆盖而非静默放行)。
|
|
107
106
|
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 —— 重新收敛范围、修掉阻塞点或上报用户,并说明情况。
|
|
108
107
|
6. 所有 fired subs `done`(或记录 `failed`)后,Bash `harnessed status --recover` 确认 ledger,并向用户报告 per-sub fired/skipped/done/failed 摘要。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: verify-code-review
|
|
3
3
|
description: |
|
|
4
4
|
Stage ④.b verify sub-workflow — code-review 多 agent 并行 fan-out 高置信度 finding
|
|
5
|
-
(subagent default per bundled parallelism gate —
|
|
5
|
+
(subagent default per bundled parallelism gate — {{ host.spawn_subagent.zh_tool }} spawn
|
|
6
6
|
多 subagent fan-out, context 隔离, token 敏感)。
|
|
7
7
|
schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
|
|
8
8
|
(code-review) + 1 phase (parallelism ref judgments.parallelism-gate.subagent-default.fires)。
|
|
@@ -29,8 +29,7 @@ onto harnessed runtime (Phase v3.0-3.4 W0.11 — D-04 Stage ④ Verify 7 sub +
|
|
|
29
29
|
| 1 | `01-code-review` | mattpocock-skills | sonnet | `{{ capabilities.code-review.cmd }}` | `judgments.parallelism-gate.subagent-default.fires` |
|
|
30
30
|
|
|
31
31
|
Per-phase config loads from `workflows/verify/code-review/workflow.yaml`; engine spawns
|
|
32
|
-
multiple subagent in parallel fan-out (bundled subagent-default rule —
|
|
33
|
-
工具 spawn 多任务并发, context 隔离, summary 折叠回主 context)。
|
|
32
|
+
multiple subagent in parallel fan-out (bundled subagent-default rule — {{ host.spawn_subagent.zh_tool_wrapped }} spawn 多任务并发, context 隔离, summary 折叠回主 context)。
|
|
34
33
|
|
|
35
34
|
## Capability refs
|
|
36
35
|
|
|
@@ -57,17 +56,16 @@ Sister `workflows/judgments/parallelism-gate.yaml`:
|
|
|
57
56
|
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
58
57
|
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
59
58
|
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
60
|
-
|
|
59
|
+
{{ host.native }} {{ host.spawn_subagent }} (keeps the session responsive + lets clarification round-trips reach the user).
|
|
61
60
|
|
|
62
|
-
Do NOT pipe to `harnessed run verify-code-review` — that is the CI/headless path (
|
|
63
|
-
that blocks the session inside Claude Code).
|
|
61
|
+
Do NOT pipe to `harnessed run verify-code-review` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
64
62
|
|
|
65
63
|
1. Bash: `harnessed prompt verify-code-review --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
66
|
-
2. Spawn a
|
|
64
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
|
|
67
65
|
- on return, write the subagent's final output to a file and run `harnessed checkpoint complete verify-code-review --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
68
66
|
- if it blocks, run `harnessed checkpoint fail verify-code-review --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
|
|
69
67
|
- 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.
|
|
70
|
-
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via
|
|
68
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
71
69
|
4. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete verify-code-review --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. `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
72
70
|
5. If the complete gate blocked: Bash `harnessed checkpoint fail verify-code-review --failing-tests <n>` to record the attempt. It prints `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP` once a stop condition is reached. 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.
|
|
73
71
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: verify-code-review
|
|
3
3
|
description: |
|
|
4
4
|
Stage ④.b verify 子工作流 — code-review 多 agent 并行 fan-out 高置信度 finding
|
|
5
|
-
(subagent 默认路由,per 打包的 parallelism 关卡 —
|
|
5
|
+
(subagent 默认路由,per 打包的 parallelism 关卡 — {{ host.spawn_subagent.zh_tool }} spawn
|
|
6
6
|
多 subagent fan-out,context 隔离,token 敏感)。
|
|
7
7
|
schema_version: harnessed.workflow.v3,含 disciplines_applied(6 default)+ tools_available
|
|
8
8
|
(code-review)+ 1 阶段(parallelism ref judgments.parallelism-gate.subagent-default.fires)。
|
|
@@ -29,8 +29,7 @@ trigger_phrases:
|
|
|
29
29
|
| 1 | `01-code-review` | mattpocock-skills | sonnet | `{{ capabilities.code-review.cmd }}` | `judgments.parallelism-gate.subagent-default.fires` |
|
|
30
30
|
|
|
31
31
|
每阶段配置从 `workflows/verify/code-review/workflow.yaml` 加载;引擎以并行 fan-out 方式
|
|
32
|
-
启动多个 subagent(打包的 subagent-default 规则 —
|
|
33
|
-
工具 spawn 多任务并发,context 隔离,summary 折叠回主 context)。
|
|
32
|
+
启动多个 subagent(打包的 subagent-default 规则 — {{ host.spawn_subagent.zh_tool_wrapped }} spawn 多任务并发,context 隔离,summary 折叠回主 context)。
|
|
34
33
|
|
|
35
34
|
## 能力引用
|
|
36
35
|
|
|
@@ -56,17 +55,16 @@ Sister `workflows/judgments/parallelism-gate.yaml`:
|
|
|
56
55
|
|
|
57
56
|
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
58
57
|
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
59
|
-
|
|
58
|
+
{{ host.native }} {{ host.spawn_subagent.zh_tool }} spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
60
59
|
|
|
61
|
-
**不要** pipe 到 `harnessed run verify-code-review` —— 那是 CI/headless 路径(
|
|
62
|
-
Code 内部会阻塞 session)。
|
|
60
|
+
**不要** pipe 到 `harnessed run verify-code-review` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
63
61
|
|
|
64
62
|
1. Bash: `harnessed prompt verify-code-review --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
65
|
-
2. 用
|
|
63
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
|
|
66
64
|
- subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete verify-code-review --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
67
65
|
- 若被拦下,跑 `harnessed checkpoint fail verify-code-review --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
68
66
|
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
69
|
-
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用
|
|
67
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
70
68
|
4. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete verify-code-review --result-file <path> --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
71
69
|
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail verify-code-review --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
72
70
|
|
|
@@ -69,17 +69,16 @@ Sister `workflows/judgments/web-design-routing.yaml`:
|
|
|
69
69
|
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
70
70
|
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
71
71
|
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
72
|
-
|
|
72
|
+
{{ host.native }} {{ host.spawn_subagent }} (keeps the session responsive + lets clarification round-trips reach the user).
|
|
73
73
|
|
|
74
|
-
Do NOT pipe to `harnessed run verify-design` — that is the CI/headless path (
|
|
75
|
-
that blocks the session inside Claude Code).
|
|
74
|
+
Do NOT pipe to `harnessed run verify-design` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
76
75
|
|
|
77
76
|
1. Bash: `harnessed prompt verify-design --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
78
|
-
2. Spawn a
|
|
77
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
|
|
79
78
|
- on return, write the subagent's final output to a file and run `harnessed checkpoint complete verify-design --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
80
79
|
- if it blocks, run `harnessed checkpoint fail verify-design --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
|
|
81
80
|
- 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.
|
|
82
|
-
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via
|
|
81
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
83
82
|
4. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete verify-design --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. `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
84
83
|
5. If the complete gate blocked: Bash `harnessed checkpoint fail verify-design --failing-tests <n>` to record the attempt. It prints `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP` once a stop condition is reached. 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.
|
|
85
84
|
|
|
@@ -68,17 +68,16 @@ Sister `workflows/judgments/web-design-routing.yaml`:
|
|
|
68
68
|
|
|
69
69
|
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
70
70
|
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
71
|
-
|
|
71
|
+
{{ host.native }} {{ host.spawn_subagent.zh_tool }} spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
72
72
|
|
|
73
|
-
**不要** pipe 到 `harnessed run verify-design` —— 那是 CI/headless 路径(
|
|
74
|
-
Code 内部会阻塞 session)。
|
|
73
|
+
**不要** pipe 到 `harnessed run verify-design` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
75
74
|
|
|
76
75
|
1. Bash: `harnessed prompt verify-design --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
77
|
-
2. 用
|
|
76
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
|
|
78
77
|
- subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete verify-design --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
79
78
|
- 若被拦下,跑 `harnessed checkpoint fail verify-design --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
80
79
|
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
81
|
-
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用
|
|
80
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
82
81
|
4. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete verify-design --result-file <path> --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
83
82
|
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail verify-design --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
84
83
|
|
|
@@ -51,17 +51,16 @@ Sister `workflows/judgments/stage-routing.yaml`:
|
|
|
51
51
|
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
52
52
|
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
53
53
|
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
54
|
-
|
|
54
|
+
{{ host.native }} {{ host.spawn_subagent }} (keeps the session responsive + lets clarification round-trips reach the user).
|
|
55
55
|
|
|
56
|
-
Do NOT pipe to `harnessed run verify-eval-review` — that is the CI/headless path (
|
|
57
|
-
that blocks the session inside Claude Code).
|
|
56
|
+
Do NOT pipe to `harnessed run verify-eval-review` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
58
57
|
|
|
59
58
|
1. Bash: `harnessed prompt verify-eval-review --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
60
|
-
2. Spawn a
|
|
59
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
|
|
61
60
|
- on return, write the subagent's final output to a file and run `harnessed checkpoint complete verify-eval-review --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
62
61
|
- if it blocks, run `harnessed checkpoint fail verify-eval-review --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
|
|
63
62
|
- 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.
|
|
64
|
-
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via
|
|
63
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
65
64
|
4. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete verify-eval-review --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. `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
66
65
|
5. If the complete gate blocked: Bash `harnessed checkpoint fail verify-eval-review --failing-tests <n>` to record the attempt. It prints `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP` once a stop condition is reached. 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.
|
|
67
66
|
|
|
@@ -50,17 +50,16 @@ Sister `workflows/judgments/stage-routing.yaml`:
|
|
|
50
50
|
|
|
51
51
|
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
52
52
|
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
53
|
-
|
|
53
|
+
{{ host.native }} {{ host.spawn_subagent.zh_tool }} spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
54
54
|
|
|
55
|
-
**不要** pipe 到 `harnessed run verify-eval-review` —— 那是 CI/headless 路径(
|
|
56
|
-
Code 内部会阻塞 session)。
|
|
55
|
+
**不要** pipe 到 `harnessed run verify-eval-review` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
57
56
|
|
|
58
57
|
1. Bash: `harnessed prompt verify-eval-review --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
59
|
-
2. 用
|
|
58
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
|
|
60
59
|
- subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete verify-eval-review --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
61
60
|
- 若被拦下,跑 `harnessed checkpoint fail verify-eval-review --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
62
61
|
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
63
|
-
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用
|
|
62
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
64
63
|
4. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete verify-eval-review --result-file <path> --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
65
64
|
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail verify-eval-review --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
66
65
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verify-multispec
|
|
3
3
|
description: |
|
|
4
|
-
Stage ④.h verify sub-workflow — 4-specialist
|
|
5
|
-
大重构 PR 升级, code-review + gstack-review + gstack-cso + gstack-qa 4 teammate 互相
|
|
6
|
-
|
|
7
|
-
routing). Cleanup mandatory:
|
|
4
|
+
Stage ④.h verify sub-workflow — 4-specialist {{ host.team.singular }} Pattern C 多维度审查 (关键发布 /
|
|
5
|
+
大重构 PR 升级, code-review + gstack-review + gstack-cso + gstack-qa 4 {{ host.teammate }} 互相
|
|
6
|
+
{{ host.send_message }} 质询, NOT fire-and-forget subagent fan-out; bundled {{ host.team.attributive }} Pattern C
|
|
7
|
+
routing). Cleanup mandatory: {{ host.teams_cleanup_note.shutdown_phrase }} (bundled cleanup discipline).
|
|
8
8
|
schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
|
|
9
9
|
(agent-teams 3 + 4 specialist capability) + 2 phase (01-team-create on critical-release
|
|
10
10
|
invoke / 02-team-cleanup mandatory shutdown)。
|
|
@@ -22,9 +22,9 @@ trigger_phrases:
|
|
|
22
22
|
|
|
23
23
|
## Overview
|
|
24
24
|
|
|
25
|
-
2-phase sub-workflow mapping CLAUDE.md "Verify 阶段 — 关键发布 / 大重构 PR 升级
|
|
25
|
+
2-phase sub-workflow mapping CLAUDE.md "Verify 阶段 — 关键发布 / 大重构 PR 升级 {{ host.team.singular }}
|
|
26
26
|
Pattern C" onto harnessed runtime (Phase v3.0-3.4 W0.13e — D-04 Stage ④ Verify 7 sub +
|
|
27
|
-
D-11
|
|
27
|
+
D-11 {{ host.team.attributive }} + Pattern A sub-workflow ship)。
|
|
28
28
|
|
|
29
29
|
| phase | id | upstream | model | capability | gate / on |
|
|
30
30
|
| ----- | -- | -------- | ----- | ---------- | --------- |
|
|
@@ -32,12 +32,9 @@ D-11 Agent Teams + Pattern A sub-workflow ship)。
|
|
|
32
32
|
| 2 | `02-team-cleanup` | claude-platform | haiku | `{{ capabilities.agent-teams-shutdown.cmd }}` | mandatory 防呆清单 |
|
|
33
33
|
|
|
34
34
|
Per-phase config loads from `workflows/verify/multispec/workflow.yaml`; phase 01 spawns 4
|
|
35
|
-
background teammate (code-review + gstack-review + gstack-cso + gstack-qa) with
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
真问题 (NOT fire-and-forget); phase 02 mandatory 按名请求每个 teammate shut down (bundled
|
|
39
|
-
Agent Teams cleanup discipline — 团目录在 session 退出时自动清理,无独立 teardown 工具,
|
|
40
|
-
剩下的纪律是别把 teammate 落在运行态)。
|
|
35
|
+
background {{ host.teammate }} (code-review + gstack-review + gstack-cso + gstack-qa) with
|
|
36
|
+
{{ host.multispec_spawn_note }}; phase 02 mandatory {{ host.teams_cleanup_note.shutdown_phrase }} (bundled
|
|
37
|
+
{{ host.teams_cleanup_note.multispec }}
|
|
41
38
|
|
|
42
39
|
## Capability refs
|
|
43
40
|
|
|
@@ -45,10 +42,10 @@ Sister `workflows/capabilities.yaml` entries:
|
|
|
45
42
|
- `agent-teams-create` — Bucket 5 Agent Teams (impl: claude-platform, cmd: `Agent(name, run_in_background=true)`)
|
|
46
43
|
- `agent-teams-send-message` — Bucket 5 Agent Teams (impl: claude-platform, cmd: SendMessage)
|
|
47
44
|
- `agent-teams-shutdown` — Bucket 5 Agent Teams (impl: claude-platform, cmd: `ask the <teammate-name> teammate to shut down`)
|
|
48
|
-
- `code-review` — Bucket 1 mattpocock (teammate 1)
|
|
49
|
-
- `gstack-review` — Bucket 3 治理关卡 (teammate 2 Paranoid Staff Engineer)
|
|
50
|
-
- `gstack-cso` — Bucket 3 治理关卡 (teammate 3 安全审查)
|
|
51
|
-
- `gstack-qa` — Bucket 3 治理关卡 (teammate 4 端到端 QA)
|
|
45
|
+
- `code-review` — Bucket 1 mattpocock ({{ host.teammate }} 1)
|
|
46
|
+
- `gstack-review` — Bucket 3 治理关卡 ({{ host.teammate }} 2 Paranoid Staff Engineer)
|
|
47
|
+
- `gstack-cso` — Bucket 3 治理关卡 ({{ host.teammate }} 3 安全审查)
|
|
48
|
+
- `gstack-qa` — Bucket 3 治理关卡 ({{ host.teammate }} 4 端到端 QA)
|
|
52
49
|
|
|
53
50
|
## Parallelism + on gate refs
|
|
54
51
|
|
|
@@ -60,7 +57,7 @@ Phase-level `on` clause (critical-release 升级触发):
|
|
|
60
57
|
- `if: phase.is_major_release == true or phase.is_large_refactor == true` → `action: invoke`
|
|
61
58
|
- else → `action: skip`
|
|
62
59
|
|
|
63
|
-
## Routing rules (bundled
|
|
60
|
+
## Routing rules (bundled {{ host.team.attributive }} routing — `workflows/judgments/parallelism-gate.yaml`)
|
|
64
61
|
|
|
65
62
|
- ✅ **触发**: 关键发布 / 大重构 PR (≥3 specialist 需互相质询而非 fire-and-forget)
|
|
66
63
|
- ❌ **跳过**: 常规 PR / 单点任务 (sister verify-code-review fan-out + verify-paranoid 已够用且省 token)
|
|
@@ -76,17 +73,16 @@ Phase-level `on` clause (critical-release 升级触发):
|
|
|
76
73
|
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
77
74
|
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
78
75
|
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
79
|
-
|
|
76
|
+
{{ host.native }} {{ host.spawn_subagent }} (keeps the session responsive + lets clarification round-trips reach the user).
|
|
80
77
|
|
|
81
|
-
Do NOT pipe to `harnessed run verify-multispec` — that is the CI/headless path (
|
|
82
|
-
that blocks the session inside Claude Code).
|
|
78
|
+
Do NOT pipe to `harnessed run verify-multispec` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
83
79
|
|
|
84
80
|
1. Bash: `harnessed prompt verify-multispec --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
85
|
-
2. Spawn a
|
|
81
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
|
|
86
82
|
- on return, write the subagent's final output to a file and run `harnessed checkpoint complete verify-multispec --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
87
83
|
- if it blocks, run `harnessed checkpoint fail verify-multispec --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
|
|
88
84
|
- 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.
|
|
89
|
-
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via
|
|
85
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
90
86
|
4. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete verify-multispec --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. `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
91
87
|
5. If the complete gate blocked: Bash `harnessed checkpoint fail verify-multispec --failing-tests <n>` to record the attempt. It prints `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP` once a stop condition is reached. 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.
|
|
92
88
|
|
|
@@ -95,7 +91,7 @@ that blocks the session inside Claude Code).
|
|
|
95
91
|
## References
|
|
96
92
|
|
|
97
93
|
- D-04 Stage ④ Verify 7 sub 分解
|
|
98
|
-
- D-11
|
|
94
|
+
- D-11 {{ host.team.attributive }} 4-specialist Pattern C upgrade
|
|
99
95
|
- workflows/capabilities.yaml — agent-teams-{create,send-message,shutdown} + 4 specialist
|
|
100
96
|
- workflows/judgments/stage-routing.yaml — verify-multispec-critical-release trigger
|
|
101
97
|
- workflows/judgments/parallelism-gate.yaml — agent-teams-upgrade.fires (5 OR-chain)
|