harnessed 5.0.12 → 5.0.13
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/CHANGELOG.md +18 -0
- package/README-en.md +1 -0
- package/README-zh.md +1 -0
- package/README.md +1 -0
- package/bin/harnessed-check-docs.mjs +15 -0
- package/bin/harnessed-update-reminder-worker.mjs +2598 -134
- package/bin/harnessed-update-reminder.mjs +636 -61
- package/dist/cli.mjs +1524 -589
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/messages/en.json +15 -1
- package/messages/zh-Hans.json +15 -1
- package/package.json +1 -1
- package/workflows/auto/SKILL.md +10 -18
- package/workflows/auto/SKILL.zh-Hans.md +8 -18
- package/workflows/discuss/auto/SKILL.md +4 -7
- package/workflows/discuss/auto/SKILL.zh-Hans.md +2 -7
- package/workflows/discuss/phase/SKILL.md +4 -7
- package/workflows/discuss/phase/SKILL.zh-Hans.md +2 -7
- package/workflows/discuss/strategic/SKILL.md +4 -8
- package/workflows/discuss/strategic/SKILL.zh-Hans.md +2 -8
- package/workflows/discuss/subtask/SKILL.md +4 -7
- package/workflows/discuss/subtask/SKILL.zh-Hans.md +2 -7
- package/workflows/harnessed-update/SKILL.md +9 -8
- package/workflows/harnessed-update/SKILL.zh-Hans.md +7 -8
- package/workflows/host-primitives.yaml +8 -8
- package/workflows/host-primitives.zh-Hans.yaml +8 -8
- package/workflows/plan/ai-integration/SKILL.md +7 -7
- package/workflows/plan/ai-integration/SKILL.zh-Hans.md +7 -7
- package/workflows/plan/architecture/SKILL.md +7 -13
- package/workflows/plan/architecture/SKILL.zh-Hans.md +7 -13
- package/workflows/plan/auto/SKILL.md +8 -14
- package/workflows/plan/auto/SKILL.zh-Hans.md +8 -14
- package/workflows/plan/phase/SKILL.md +7 -13
- package/workflows/plan/phase/SKILL.zh-Hans.md +7 -13
- package/workflows/plan/secure/SKILL.md +7 -7
- package/workflows/plan/secure/SKILL.zh-Hans.md +7 -7
- package/workflows/plan/spec/SKILL.md +7 -7
- package/workflows/plan/spec/SKILL.zh-Hans.md +7 -7
- package/workflows/plan/ui/SKILL.md +7 -7
- package/workflows/plan/ui/SKILL.zh-Hans.md +7 -7
- package/workflows/research/SKILL.md +7 -7
- package/workflows/research/SKILL.zh-Hans.md +7 -7
- package/workflows/retro/SKILL.md +8 -15
- package/workflows/retro/SKILL.zh-Hans.md +7 -15
- package/workflows/ship/auto/SKILL.md +8 -14
- package/workflows/ship/auto/SKILL.zh-Hans.md +8 -14
- package/workflows/ship/preflight/SKILL.md +7 -9
- package/workflows/ship/preflight/SKILL.zh-Hans.md +7 -9
- package/workflows/task/auto/SKILL.md +8 -15
- package/workflows/task/auto/SKILL.zh-Hans.md +8 -15
- package/workflows/task/clarify/SKILL.md +2 -10
- package/workflows/task/clarify/SKILL.zh-Hans.md +2 -10
- package/workflows/task/code/SKILL.md +7 -15
- package/workflows/task/code/SKILL.zh-Hans.md +7 -15
- package/workflows/task/deliver/SKILL.md +7 -17
- package/workflows/task/deliver/SKILL.zh-Hans.md +7 -17
- package/workflows/task/test/SKILL.md +7 -14
- package/workflows/task/test/SKILL.zh-Hans.md +7 -14
- package/workflows/verify/auto/SKILL.md +9 -14
- package/workflows/verify/auto/SKILL.zh-Hans.md +9 -14
- package/workflows/verify/code-review/SKILL.md +8 -13
- package/workflows/verify/code-review/SKILL.zh-Hans.md +8 -13
- package/workflows/verify/design/SKILL.md +8 -12
- package/workflows/verify/design/SKILL.zh-Hans.md +7 -12
- package/workflows/verify/eval-review/SKILL.md +8 -12
- package/workflows/verify/eval-review/SKILL.zh-Hans.md +7 -12
- package/workflows/verify/multispec/SKILL.md +8 -15
- package/workflows/verify/multispec/SKILL.zh-Hans.md +7 -15
- package/workflows/verify/paranoid/SKILL.md +7 -14
- package/workflows/verify/paranoid/SKILL.zh-Hans.md +7 -14
- package/workflows/verify/progress/SKILL.md +8 -13
- package/workflows/verify/progress/SKILL.zh-Hans.md +8 -13
- package/workflows/verify/qa/SKILL.md +7 -13
- package/workflows/verify/qa/SKILL.zh-Hans.md +7 -13
- package/workflows/verify/second-opinion/SKILL.md +8 -12
- package/workflows/verify/second-opinion/SKILL.zh-Hans.md +7 -12
- package/workflows/verify/security/SKILL.md +8 -12
- package/workflows/verify/security/SKILL.zh-Hans.md +7 -12
- package/workflows/verify/simplify/SKILL.md +8 -12
- package/workflows/verify/simplify/SKILL.zh-Hans.md +7 -12
- package/workflows/verify/validate-phase/SKILL.md +8 -12
- package/workflows/verify/validate-phase/SKILL.zh-Hans.md +7 -12
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-clarify
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
brainstorm + mattpocock /grill-with-docs conditional invoke)。Per-subtask
|
|
6
|
-
repeat invoke 入口 — execute-task 每个 subtask 起步先走 task-clarify 评估 gate
|
|
7
|
-
(judgments.subtask-gate.brainstorming.fires) 是否激活 brainstorming + 条件性
|
|
8
|
-
fire grill-with-docs (phase.spec_ambiguous == true)。
|
|
9
|
-
schema_version: harnessed.workflow.v3 with disciplines_applied [6] + tools_available
|
|
10
|
-
[superpowers-brainstorming, grill-with-docs]. Triggered by headless CLI
|
|
11
|
-
`harnessed run task-clarify` or slash command `/task-clarify` after
|
|
12
|
-
`harnessed setup`.
|
|
4
|
+
判断子任务在动手写代码前是否需要头脑风暴并锁定 spec。每个子任务起步跑一次,常规子任务透明跳过。
|
|
13
5
|
trigger_phrases:
|
|
14
6
|
- "clarify this subtask"
|
|
15
7
|
- "task-clarify workflow"
|
|
@@ -69,7 +61,7 @@ Phase 01-brainstorm 在 `phase.spec_ambiguous == true` 时条件性 fire `grill-
|
|
|
69
61
|
|
|
70
62
|
产出:一份 locked spec,执行阶段(`/plan` → `/task` → `/verify`)无需再问用户即可消费。
|
|
71
63
|
|
|
72
|
-
<!-- harnessed-generated:v4.
|
|
64
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
73
65
|
|
|
74
66
|
## References
|
|
75
67
|
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-code
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
always-on + mattpocock conditional route + planning-with-files progress.md update)。
|
|
6
|
-
2-phase composition: 01-code (karpathy 心法 + improve-arch
|
|
7
|
-
周期审查 / diagnose bug conditional invokes_tools) → 02-progress (Claude Code plugin
|
|
8
|
-
/plan 更新 progress.md 跨 session 进度同步)。
|
|
9
|
-
schema_version: harnessed.workflow.v3 with disciplines_applied [6] + tools_available
|
|
10
|
-
[improve-codebase-architecture, diagnose, planning-with-files]. Triggered
|
|
11
|
-
by headless CLI `harnessed run task-code` or slash command `/task-code`
|
|
12
|
-
after `harnessed setup`.
|
|
4
|
+
Write the code for a locked subtask, then record the progress so the session can resume later. Run it after the spec is settled and before the subtask is tested.
|
|
13
5
|
trigger_phrases:
|
|
14
6
|
- "code this subtask"
|
|
15
7
|
- "task-code workflow"
|
|
@@ -79,16 +71,16 @@ evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subag
|
|
|
79
71
|
|
|
80
72
|
Do NOT pipe to `harnessed run task-code` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
81
73
|
|
|
82
|
-
1. Bash: `harnessed prompt task-code --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
83
|
-
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model
|
|
84
|
-
-
|
|
74
|
+
1. Bash: `harnessed prompt task-code --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model, result_file}`.
|
|
75
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`. The sub writes its own final result into `result_file` — the path that prompt names — so the FILE is the completion signal: do NOT wait for the sub's chat message, because a background or re-parented agent's message may never arrive. Then drive delivery with harnessed's own completion gate:
|
|
76
|
+
- the gate is `harnessed checkpoint complete task-code --result-file <result_file> --wait 60` — one call waits at most 60 seconds, so run the SAME command again when the sub needs longer; it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
85
77
|
- if it blocks, run `harnessed checkpoint fail task-code --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
|
|
86
78
|
- 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.
|
|
87
|
-
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.
|
|
88
|
-
4.
|
|
79
|
+
3. If the sub’s output contains `STATUS: NEEDS_CLARIFICATION` + a question list (read it from `result_file` — the chat message may never arrive): STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
80
|
+
4. When `result_file` carries the completion marker: Bash `harnessed checkpoint complete task-code --result-file <result_file> --wait 60 --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 file carries a verbatim `<promise>COMPLETE</promise>` (or a structured COMPLETE status). `--wait 60` bounds ONE call to 60 seconds — run the SAME command again when the sub needs longer, never an unbounded wait. `--result <text>` is the inline variant; `--result-file` wins and is quoting-safe on Windows. A `result-wait-timeout` exit means the sub has not signalled YET — repeat the same command; `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
89
81
|
5. If the complete gate blocked: Bash `harnessed checkpoint fail task-code --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.
|
|
90
82
|
|
|
91
|
-
<!-- harnessed-generated:v4.
|
|
83
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
92
84
|
|
|
93
85
|
## References
|
|
94
86
|
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-code
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
always-on + mattpocock conditional route + planning-with-files progress.md update)。
|
|
6
|
-
2-phase composition: 01-code (karpathy 心法 + improve-arch
|
|
7
|
-
周期审查 / diagnose bug conditional invokes_tools) → 02-progress (Claude Code plugin
|
|
8
|
-
/plan 更新 progress.md 跨 session 进度同步)。
|
|
9
|
-
schema_version: harnessed.workflow.v3 with disciplines_applied [6] + tools_available
|
|
10
|
-
[improve-codebase-architecture, diagnose, planning-with-files]. Triggered
|
|
11
|
-
by headless CLI `harnessed run task-code` or slash command `/task-code`
|
|
12
|
-
after `harnessed setup`.
|
|
4
|
+
按锁定的 spec 写子任务代码,并把进度写回 progress.md 以便跨 session 续跑。测试之前跑它。
|
|
13
5
|
trigger_phrases:
|
|
14
6
|
- "code this subtask"
|
|
15
7
|
- "task-code workflow"
|
|
@@ -77,16 +69,16 @@ freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 sp
|
|
|
77
69
|
|
|
78
70
|
**不要** pipe 到 `harnessed run task-code` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
79
71
|
|
|
80
|
-
1. Bash: `harnessed prompt task-code --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
81
|
-
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn
|
|
82
|
-
-
|
|
72
|
+
1. Bash: `harnessed prompt task-code --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model, result_file}`。
|
|
73
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn。sub 自己把最终结果写入 `result_file`(prompt 里给出的那个路径)—— **完成信号是文件**,不是聊天消息:后台 / 被 re-parent 的 agent 消息可能永不到达,不要等它。然后用 harnessed 自己的完成闸门驱动交付:
|
|
74
|
+
- 闸门是 `harnessed checkpoint complete task-code --result-file <result_file> --wait 60` —— 单次调用最多等 60 秒,sub 需要更久就重复**同一条**命令;它对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
83
75
|
- 若被拦下,跑 `harnessed checkpoint fail task-code --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
84
76
|
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
85
|
-
3.
|
|
86
|
-
4.
|
|
77
|
+
3. 若 sub 的输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表(从 `result_file` 读 —— 聊天消息可能永不到达):STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
78
|
+
4. 当 `result_file` 携带完成标记时:Bash `harnessed checkpoint complete task-code --result-file <result_file> --wait 60 --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果文件含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--wait 60` 只约束**单次**调用为 60 秒 —— sub 需要更久就重复**同一条**命令,绝不无限等待。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`result-wait-timeout` 退出码表示 sub 尚未发出完成信号 —— 重复同一条命令;`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
87
79
|
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail task-code --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
88
80
|
|
|
89
|
-
<!-- harnessed-generated:v4.
|
|
81
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
90
82
|
|
|
91
83
|
## References
|
|
92
84
|
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-deliver
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
+ {{ host.team.attributive }} conditional escalation + R20.10 explicit max_iterations_exceeded
|
|
6
|
-
fallback)。2-phase composition: 01-deliver (completion-gate with completion_promise
|
|
7
|
-
verbatim "COMPLETE" + parallelism judgments.parallelism-gate.completion-gate-wrapper.fires +
|
|
8
|
-
fallback emit_warning_and_halt exit_code 1) → 02-progress-mark (Claude Code plugin
|
|
9
|
-
/plan mark subtask complete in progress.md)。
|
|
10
|
-
schema_version: harnessed.workflow.v3 with disciplines_applied [6] + tools_available
|
|
11
|
-
[completion-gate, verification-before-completion, agent-teams-create,
|
|
12
|
-
agent-teams-send-message, agent-teams-shutdown,
|
|
13
|
-
planning-with-files]. Triggered by headless CLI `harnessed run task-deliver`
|
|
14
|
-
or slash command `/task-deliver` after `harnessed setup`.
|
|
4
|
+
Close out a subtask behind a completion gate and mark it complete in progress.md. Run it after the tests pass, before you start the next subtask.
|
|
15
5
|
trigger_phrases:
|
|
16
6
|
- "deliver this subtask"
|
|
17
7
|
- "task-deliver workflow"
|
|
@@ -109,16 +99,16 @@ evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subag
|
|
|
109
99
|
|
|
110
100
|
Do NOT pipe to `harnessed run task-deliver` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
111
101
|
|
|
112
|
-
1. Bash: `harnessed prompt task-deliver --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
113
|
-
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model
|
|
114
|
-
-
|
|
102
|
+
1. Bash: `harnessed prompt task-deliver --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model, result_file}`.
|
|
103
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`. The sub writes its own final result into `result_file` — the path that prompt names — so the FILE is the completion signal: do NOT wait for the sub's chat message, because a background or re-parented agent's message may never arrive. Then drive delivery with harnessed's own completion gate:
|
|
104
|
+
- the gate is `harnessed checkpoint complete task-deliver --result-file <result_file> --wait 60` — one call waits at most 60 seconds, so run the SAME command again when the sub needs longer; it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
115
105
|
- if it blocks, run `harnessed checkpoint fail task-deliver --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
|
|
116
106
|
- 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.
|
|
117
|
-
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.
|
|
118
|
-
4.
|
|
107
|
+
3. If the sub’s output contains `STATUS: NEEDS_CLARIFICATION` + a question list (read it from `result_file` — the chat message may never arrive): STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
108
|
+
4. When `result_file` carries the completion marker: Bash `harnessed checkpoint complete task-deliver --result-file <result_file> --wait 60 --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 file carries a verbatim `<promise>COMPLETE</promise>` (or a structured COMPLETE status). `--wait 60` bounds ONE call to 60 seconds — run the SAME command again when the sub needs longer, never an unbounded wait. `--result <text>` is the inline variant; `--result-file` wins and is quoting-safe on Windows. A `result-wait-timeout` exit means the sub has not signalled YET — repeat the same command; `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
119
109
|
5. If the complete gate blocked: Bash `harnessed checkpoint fail task-deliver --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.
|
|
120
110
|
|
|
121
|
-
<!-- harnessed-generated:v4.
|
|
111
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
122
112
|
|
|
123
113
|
## References
|
|
124
114
|
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-deliver
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
+ {{ host.team.attributive }} conditional escalation + R20.10 explicit max_iterations_exceeded
|
|
6
|
-
fallback)。2-phase composition: 01-deliver (completion-gate with completion_promise
|
|
7
|
-
verbatim "COMPLETE" + parallelism judgments.parallelism-gate.completion-gate-wrapper.fires +
|
|
8
|
-
fallback emit_warning_and_halt exit_code 1) → 02-progress-mark (Claude Code plugin
|
|
9
|
-
/plan mark subtask complete in progress.md)。
|
|
10
|
-
schema_version: harnessed.workflow.v3 with disciplines_applied [6] + tools_available
|
|
11
|
-
[completion-gate, verification-before-completion, agent-teams-create,
|
|
12
|
-
agent-teams-send-message, agent-teams-shutdown,
|
|
13
|
-
planning-with-files]. Triggered by headless CLI `harnessed run task-deliver`
|
|
14
|
-
or slash command `/task-deliver` after `harnessed setup`.
|
|
4
|
+
通过完成闸门收尾子任务,并在 progress.md 标记完成。测试通过后、下一个子任务开始前跑它。
|
|
15
5
|
trigger_phrases:
|
|
16
6
|
- "deliver this subtask"
|
|
17
7
|
- "task-deliver workflow"
|
|
@@ -109,16 +99,16 @@ freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 sp
|
|
|
109
99
|
|
|
110
100
|
**不要** pipe 到 `harnessed run task-deliver` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
111
101
|
|
|
112
|
-
1. Bash: `harnessed prompt task-deliver --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
113
|
-
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn
|
|
114
|
-
-
|
|
102
|
+
1. Bash: `harnessed prompt task-deliver --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model, result_file}`。
|
|
103
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn。sub 自己把最终结果写入 `result_file`(prompt 里给出的那个路径)—— **完成信号是文件**,不是聊天消息:后台 / 被 re-parent 的 agent 消息可能永不到达,不要等它。然后用 harnessed 自己的完成闸门驱动交付:
|
|
104
|
+
- 闸门是 `harnessed checkpoint complete task-deliver --result-file <result_file> --wait 60` —— 单次调用最多等 60 秒,sub 需要更久就重复**同一条**命令;它对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
115
105
|
- 若被拦下,跑 `harnessed checkpoint fail task-deliver --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
116
106
|
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
117
|
-
3.
|
|
118
|
-
4.
|
|
107
|
+
3. 若 sub 的输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表(从 `result_file` 读 —— 聊天消息可能永不到达):STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
108
|
+
4. 当 `result_file` 携带完成标记时:Bash `harnessed checkpoint complete task-deliver --result-file <result_file> --wait 60 --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果文件含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--wait 60` 只约束**单次**调用为 60 秒 —— sub 需要更久就重复**同一条**命令,绝不无限等待。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`result-wait-timeout` 退出码表示 sub 尚未发出完成信号 —— 重复同一条命令;`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
119
109
|
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail task-deliver --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
120
110
|
|
|
121
|
-
<!-- harnessed-generated:v4.
|
|
111
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
122
112
|
|
|
123
113
|
## References
|
|
124
114
|
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-test
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
red-green-refactor 强制 + diagnose conditional invoke)。Single-phase composition:
|
|
6
|
-
01-test (capability `superpowers:test-driven-development` + gate
|
|
7
|
-
judgments.tdd-gate.tdd-strongly-suggested.fires + invokes_tools[{if: test_fail,
|
|
8
|
-
tool: diagnose}])。Alias /tdd (mattpocock-skills) 可替代 superpowers TDD per D-13。
|
|
9
|
-
schema_version: harnessed.workflow.v3 with disciplines_applied [6] + tools_available
|
|
10
|
-
[tdd, diagnose]. Triggered by headless CLI `harnessed run task-test` or
|
|
11
|
-
slash command `/task-test` after `harnessed setup`.
|
|
4
|
+
Write and run the tests for a subtask with a red-green-refactor loop, and diagnose the failures when they break. Run it after the code is written, before the subtask is delivered.
|
|
12
5
|
trigger_phrases:
|
|
13
6
|
- "test this subtask"
|
|
14
7
|
- "task-test workflow"
|
|
@@ -106,16 +99,16 @@ evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subag
|
|
|
106
99
|
|
|
107
100
|
Do NOT pipe to `harnessed run task-test` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
108
101
|
|
|
109
|
-
1. Bash: `harnessed prompt task-test --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
110
|
-
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model
|
|
111
|
-
-
|
|
102
|
+
1. Bash: `harnessed prompt task-test --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model, result_file}`.
|
|
103
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`. The sub writes its own final result into `result_file` — the path that prompt names — so the FILE is the completion signal: do NOT wait for the sub's chat message, because a background or re-parented agent's message may never arrive. Then drive delivery with harnessed's own completion gate:
|
|
104
|
+
- the gate is `harnessed checkpoint complete task-test --result-file <result_file> --wait 60` — one call waits at most 60 seconds, so run the SAME command again when the sub needs longer; it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
112
105
|
- 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.
|
|
113
106
|
- 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.
|
|
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.
|
|
115
|
-
4.
|
|
107
|
+
3. If the sub’s output contains `STATUS: NEEDS_CLARIFICATION` + a question list (read it from `result_file` — the chat message may never arrive): STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
108
|
+
4. When `result_file` carries the completion marker: Bash `harnessed checkpoint complete task-test --result-file <result_file> --wait 60 --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 file carries a verbatim `<promise>COMPLETE</promise>` (or a structured COMPLETE status). `--wait 60` bounds ONE call to 60 seconds — run the SAME command again when the sub needs longer, never an unbounded wait. `--result <text>` is the inline variant; `--result-file` wins and is quoting-safe on Windows. A `result-wait-timeout` exit means the sub has not signalled YET — repeat the same command; `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
116
109
|
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.
|
|
117
110
|
|
|
118
|
-
<!-- harnessed-generated:v4.
|
|
111
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
119
112
|
|
|
120
113
|
## References
|
|
121
114
|
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-test
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
red-green-refactor 强制 + diagnose 条件调用)。单阶段组合:
|
|
6
|
-
01-test(能力 `superpowers:test-driven-development` + 关卡
|
|
7
|
-
judgments.tdd-gate.tdd-strongly-suggested.fires + invokes_tools[{if: test_fail,
|
|
8
|
-
tool: diagnose}])。Alias /tdd (mattpocock-skills) 可替代 superpowers TDD per D-13。
|
|
9
|
-
schema_version: harnessed.workflow.v3,含 disciplines_applied [6] + tools_available
|
|
10
|
-
[tdd, diagnose]。通过 headless CLI `harnessed run task-test` 或
|
|
11
|
-
`harnessed setup` 后的斜杠命令 `/task-test` 触发。
|
|
4
|
+
用 red-green-refactor 循环为子任务写并跑测试,测试挂了走排障流程。代码写完、交付之前跑它。
|
|
12
5
|
trigger_phrases:
|
|
13
6
|
- "test this subtask"
|
|
14
7
|
- "task-test workflow"
|
|
@@ -101,16 +94,16 @@ freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 sp
|
|
|
101
94
|
|
|
102
95
|
**不要** pipe 到 `harnessed run task-test` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
103
96
|
|
|
104
|
-
1. Bash: `harnessed prompt task-test --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
105
|
-
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn
|
|
106
|
-
-
|
|
97
|
+
1. Bash: `harnessed prompt task-test --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model, result_file}`。
|
|
98
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn。sub 自己把最终结果写入 `result_file`(prompt 里给出的那个路径)—— **完成信号是文件**,不是聊天消息:后台 / 被 re-parent 的 agent 消息可能永不到达,不要等它。然后用 harnessed 自己的完成闸门驱动交付:
|
|
99
|
+
- 闸门是 `harnessed checkpoint complete task-test --result-file <result_file> --wait 60` —— 单次调用最多等 60 秒,sub 需要更久就重复**同一条**命令;它对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
107
100
|
- 若被拦下,跑 `harnessed checkpoint fail task-test --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
108
101
|
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
109
|
-
3.
|
|
110
|
-
4.
|
|
102
|
+
3. 若 sub 的输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表(从 `result_file` 读 —— 聊天消息可能永不到达):STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
103
|
+
4. 当 `result_file` 携带完成标记时:Bash `harnessed checkpoint complete task-test --result-file <result_file> --wait 60 --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果文件含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--wait 60` 只约束**单次**调用为 60 秒 —— sub 需要更久就重复**同一条**命令,绝不无限等待。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`result-wait-timeout` 退出码表示 sub 尚未发出完成信号 —— 重复同一条命令;`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
111
104
|
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail task-test --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
112
105
|
|
|
113
|
-
<!-- harnessed-generated:v4.
|
|
106
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
114
107
|
|
|
115
108
|
## 参考资料
|
|
116
109
|
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verify
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
并行 conditional → simplify 末尾 → multispec 关键发布 Pattern C 4-specialist {{ host.team.singular }}。
|
|
7
|
-
schema_version: harnessed.workflow.v3 with delegates_to (7 sub: progress serial order 1 +
|
|
8
|
-
5 parallel conditional + simplify serial order 99) + disciplines_applied (6 default) +
|
|
9
|
-
tools_available (10 entry)。Triggered by headless CLI `harnessed run verify` or
|
|
10
|
-
slash command `/verify` (bare per ADR 0030 namespace policy D-02 LOCK) after `harnessed setup`.
|
|
4
|
+
Run the Verify stage end to end: progress, code review, paranoid review, the conditional
|
|
5
|
+
checks, simplification, and the release review. Use it to close out a completed phase.
|
|
11
6
|
trigger_phrases:
|
|
12
7
|
- "verify"
|
|
13
8
|
- "验证阶段"
|
|
@@ -91,25 +86,25 @@ Do NOT pipe to `harnessed run verify` — that is the CI/headless path ({{ host.
|
|
|
91
86
|
|
|
92
87
|
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.
|
|
93
88
|
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.
|
|
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.
|
|
89
|
+
2. Bash: `harnessed gates verify --task "<locked spec>" --context-file .harnessed-facts.json --skip-sub discuss` → parse the JSON `{fire: [{sub, order, mode, is_master}], skip: [{sub, reason}], parallelism: {escalate_to_teams, teams_active, transport, result_contract, bounded_wait}}`. `escalate_to_teams: false` means the run cannot form a team — drive the fired subs as a plain subagent fan-out (parallel where `order` allows) instead. `teams_active` says whether a team is actually running, `transport` names the transport this plan uses, `result_contract` is `result-file` and `bounded_wait` is `true`: every sub signals completion through its result file, never through a chat message. This is the plan SoT (no spawn). Keep the verbatim JSON.
|
|
95
90
|
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.
|
|
96
91
|
{{ host.teams_step_note.skill }}
|
|
97
92
|
5. Otherwise, for each fired sub in `order` (serial subs sequentially, parallel subs concurrently):
|
|
98
93
|
- **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.
|
|
99
94
|
- **Else (leaf sub):**
|
|
100
|
-
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → parse `{prompt, max_iterations, model}`.
|
|
101
|
-
b. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model
|
|
102
|
-
-
|
|
95
|
+
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → parse `{prompt, max_iterations, model, result_file}`.
|
|
96
|
+
b. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`. The sub writes its own final result into `result_file` — the path that prompt names — so the FILE is the completion signal: do NOT wait for the sub's chat message, because a background or re-parented agent's message may never arrive. Then drive delivery with harnessed's own completion gate:
|
|
97
|
+
- the gate is `harnessed checkpoint complete <sub> --result-file <result_file> --wait 60` — one call waits at most 60 seconds, so run the SAME command again when the sub needs longer; it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
103
98
|
- 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.
|
|
104
99
|
- 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.
|
|
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.
|
|
106
|
-
d.
|
|
100
|
+
c. If the sub’s output contains `STATUS: NEEDS_CLARIFICATION` + questions (read it from `result_file` — the chat message may never arrive): STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
101
|
+
d. When `result_file` carries the completion marker: Bash `harnessed checkpoint complete <sub> --result-file <result_file> --wait 60 --summary "<one-line>"`. The evidence guard runs here (fail-CLOSED) and 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 file carries a verbatim `<promise>COMPLETE</promise>` (or a structured COMPLETE status). `--wait 60` bounds ONE call to 60 seconds — run the SAME command again when the sub needs longer, never an unbounded wait. `--result <text>` is the inline variant; `--result-file` wins and is quoting-safe on Windows. A `result-wait-timeout` exit means the sub has not signalled YET — repeat the same command; on any other 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).
|
|
107
102
|
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.
|
|
108
103
|
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.
|
|
109
104
|
|
|
110
105
|
**If you lose context (compaction / resume):** run `harnessed status --recover` first — it reads the ledger and prints "you are here, this is next" so you resume at the first `pending` sub instead of restarting. If the ledger is empty, re-run steps 2-3.
|
|
111
106
|
|
|
112
|
-
<!-- harnessed-generated:v4.
|
|
107
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
113
108
|
|
|
114
109
|
## References
|
|
115
110
|
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verify
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
并行 conditional → simplify 末尾 → multispec 关键发布 Pattern C 4-specialist {{ host.team.singular }}。
|
|
7
|
-
schema_version: harnessed.workflow.v3,含 delegates_to(7 sub:progress serial order 1 +
|
|
8
|
-
5 parallel conditional + simplify serial order 99)+ disciplines_applied(6 default)+
|
|
9
|
-
tools_available(10 entry)。通过 headless CLI `harnessed run verify` 或
|
|
10
|
-
`harnessed setup` 后的斜杠命令 `/verify`(裸命令,per ADR 0030 命名空间规范 D-02 LOCK)触发。
|
|
4
|
+
端到端跑 Verify 阶段:进度、代码审查、关键模块审查、可选检查、简化与发布审查。
|
|
5
|
+
用于在收尾一个已完成的 phase 时做整体验收。
|
|
11
6
|
trigger_phrases:
|
|
12
7
|
- "verify"
|
|
13
8
|
- "验证阶段"
|
|
@@ -90,25 +85,25 @@ Sister `workflows/capabilities.yaml`:
|
|
|
90
85
|
|
|
91
86
|
1. 若 "$ARGUMENTS" 触发澄清判据(≥2 方案 / 核心算法 / API contract / 高错误成本),先在**本 session** 交互澄清({{ host.ask_user }})并锁决策;否则透明 skip。产出 locked spec。
|
|
92
87
|
1b. Bash: `harnessed facts verify --out .harnessed-facts.json` → 它只列出**本阶段 gate 真正读取**的 fact:能确定性推导的已填好(改动行数 / 触及文件数 / stage,来自 git),判断题留 `null` 并附一行说明。编辑该文件,把 `facts` 里每个 `null` 按 locked spec 换成你的真实判断 —— 只有确实无法判断时才留 null(此时回退内置默认值)。**不要**跳过本步,也**不要**自行编造命令没问的 fact。
|
|
93
|
-
2. Bash: `harnessed gates verify --task "<locked spec>" --context-file .harnessed-facts.json --skip-sub discuss` → 解析 JSON `{fire, skip, parallelism}
|
|
88
|
+
2. Bash: `harnessed gates verify --task "<locked spec>" --context-file .harnessed-facts.json --skip-sub discuss` → 解析 JSON `{fire: [{sub, order, mode, is_master}], skip: [{sub, reason}], parallelism: {escalate_to_teams, teams_active, transport, result_contract, bounded_wait}}`。`escalate_to_teams: false` 表示本次运行成不了团 —— 按 subagent fan-out 驱动 fired subs(`order` 允许处并发),不要成团。`teams_active` 说明此刻是否真的有团在跑,`transport` 给出本 plan 使用的传输,`result_contract` 是 `result-file`、`bounded_wait` 是 `true`:每个 sub 的完成信号是结果文件,不是聊天消息。这是 plan SoT(不 spawn)。保留 verbatim JSON。
|
|
94
89
|
3. Bash: `harnessed checkpoint start verify --plan '<step 2 的 verbatim gates JSON>'` → seed per-sub ledger,让 `harnessed status --recover` 能在 compaction 后给你重新定位。
|
|
95
90
|
{{ host.teams_step_note.skill }}
|
|
96
91
|
5. 否则,对 `order` 里每个 fired sub(serial 串行、parallel 并发):
|
|
97
92
|
- **若该项 `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 重复本循环。
|
|
98
93
|
- **否则(leaf sub):**
|
|
99
|
-
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
100
|
-
b. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn
|
|
101
|
-
-
|
|
94
|
+
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → 解析 `{prompt, max_iterations, model, result_file}`。
|
|
95
|
+
b. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn。sub 自己把最终结果写入 `result_file`(prompt 里给出的那个路径)—— **完成信号是文件**,不是聊天消息:后台 / 被 re-parent 的 agent 消息可能永不到达,不要等它。然后用 harnessed 自己的完成闸门驱动交付:
|
|
96
|
+
- 闸门是 `harnessed checkpoint complete <sub> --result-file <result_file> --wait 60` —— 单次调用最多等 60 秒,sub 需要更久就重复**同一条**命令;它对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
102
97
|
- 若被拦下,跑 `harnessed checkpoint fail <sub> --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
103
98
|
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
104
|
-
c.
|
|
105
|
-
d.
|
|
99
|
+
c. 若 sub 的输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表(从 `result_file` 读 —— 聊天消息可能永不到达):STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn 同一 sub。
|
|
100
|
+
d. 当 `result_file` 携带完成标记时:Bash `harnessed checkpoint complete <sub> --result-file <result_file> --wait 60 --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果文件含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--wait 60` 只约束**单次**调用为 60 秒 —— sub 需要更久就重复**同一条**命令,绝不无限等待。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`result-wait-timeout` 退出码表示 sub 尚未发出完成信号 —— 重复同一条命令;其它非零退出码即表示该 sub **未** done —— 重 spawn 补齐,或仅在刻意覆盖时传 `--force`(记录 `evidence_status=overridden`,是可审计的覆盖而非静默放行)。
|
|
106
101
|
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 —— 重新收敛范围、修掉阻塞点或上报用户,并说明情况。
|
|
107
102
|
6. 所有 fired subs `done`(或记录 `failed`)后,Bash `harnessed status --recover` 确认 ledger,并向用户报告 per-sub fired/skipped/done/failed 摘要。
|
|
108
103
|
|
|
109
104
|
**若丢失上下文(compaction / resume):** 先跑 `harnessed status --recover` —— 它读 ledger 并打印「你在这里,下一步是什么」,让你从第一个 `pending` sub 续跑而非重启。若 ledger 为空,重跑 step 2-3。
|
|
110
105
|
|
|
111
|
-
<!-- harnessed-generated:v4.
|
|
106
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
112
107
|
|
|
113
108
|
## 参考资料
|
|
114
109
|
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verify-code-review
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
多 subagent fan-out, context 隔离, token 敏感)。
|
|
7
|
-
schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
|
|
8
|
-
(code-review) + 1 phase (parallelism ref judgments.parallelism-gate.subagent-default.fires)。
|
|
9
|
-
Triggered by slash command
|
|
10
|
-
`/verify-code-review` after `harnessed setup`.
|
|
4
|
+
Run a multi-agent code review that fans out reviewers in parallel and reports only
|
|
5
|
+
high-confidence findings. Use it to review the changes before they land.
|
|
11
6
|
trigger_phrases:
|
|
12
7
|
- "verify code review"
|
|
13
8
|
- "代码审查"
|
|
@@ -60,16 +55,16 @@ evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subag
|
|
|
60
55
|
|
|
61
56
|
Do NOT pipe to `harnessed run verify-code-review` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
62
57
|
|
|
63
|
-
1. Bash: `harnessed prompt verify-code-review --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
64
|
-
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model
|
|
65
|
-
-
|
|
58
|
+
1. Bash: `harnessed prompt verify-code-review --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model, result_file}`.
|
|
59
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`. The sub writes its own final result into `result_file` — the path that prompt names — so the FILE is the completion signal: do NOT wait for the sub's chat message, because a background or re-parented agent's message may never arrive. Then drive delivery with harnessed's own completion gate:
|
|
60
|
+
- the gate is `harnessed checkpoint complete verify-code-review --result-file <result_file> --wait 60` — one call waits at most 60 seconds, so run the SAME command again when the sub needs longer; it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
66
61
|
- 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.
|
|
67
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.
|
|
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.
|
|
69
|
-
4.
|
|
63
|
+
3. If the sub’s output contains `STATUS: NEEDS_CLARIFICATION` + a question list (read it from `result_file` — the chat message may never arrive): STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
64
|
+
4. When `result_file` carries the completion marker: Bash `harnessed checkpoint complete verify-code-review --result-file <result_file> --wait 60 --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 file carries a verbatim `<promise>COMPLETE</promise>` (or a structured COMPLETE status). `--wait 60` bounds ONE call to 60 seconds — run the SAME command again when the sub needs longer, never an unbounded wait. `--result <text>` is the inline variant; `--result-file` wins and is quoting-safe on Windows. A `result-wait-timeout` exit means the sub has not signalled YET — repeat the same command; `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
70
65
|
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.
|
|
71
66
|
|
|
72
|
-
<!-- harnessed-generated:v4.
|
|
67
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
73
68
|
|
|
74
69
|
## References
|
|
75
70
|
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verify-code-review
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
多 subagent fan-out,context 隔离,token 敏感)。
|
|
7
|
-
schema_version: harnessed.workflow.v3,含 disciplines_applied(6 default)+ tools_available
|
|
8
|
-
(code-review)+ 1 阶段(parallelism ref judgments.parallelism-gate.subagent-default.fires)。
|
|
9
|
-
通过 `harnessed setup` 后的斜杠命令
|
|
10
|
-
`/verify-code-review` 触发。
|
|
4
|
+
并行 fan-out 多个 reviewer 做代码审查,只报高置信度问题。
|
|
5
|
+
用于在改动落地前过一遍代码。
|
|
11
6
|
trigger_phrases:
|
|
12
7
|
- "verify code review"
|
|
13
8
|
- "代码审查"
|
|
@@ -59,16 +54,16 @@ freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 sp
|
|
|
59
54
|
|
|
60
55
|
**不要** pipe 到 `harnessed run verify-code-review` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
61
56
|
|
|
62
|
-
1. Bash: `harnessed prompt verify-code-review --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
63
|
-
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn
|
|
64
|
-
-
|
|
57
|
+
1. Bash: `harnessed prompt verify-code-review --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model, result_file}`。
|
|
58
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn。sub 自己把最终结果写入 `result_file`(prompt 里给出的那个路径)—— **完成信号是文件**,不是聊天消息:后台 / 被 re-parent 的 agent 消息可能永不到达,不要等它。然后用 harnessed 自己的完成闸门驱动交付:
|
|
59
|
+
- 闸门是 `harnessed checkpoint complete verify-code-review --result-file <result_file> --wait 60` —— 单次调用最多等 60 秒,sub 需要更久就重复**同一条**命令;它对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
65
60
|
- 若被拦下,跑 `harnessed checkpoint fail verify-code-review --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
66
61
|
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
67
|
-
3.
|
|
68
|
-
4.
|
|
62
|
+
3. 若 sub 的输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表(从 `result_file` 读 —— 聊天消息可能永不到达):STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
63
|
+
4. 当 `result_file` 携带完成标记时:Bash `harnessed checkpoint complete verify-code-review --result-file <result_file> --wait 60 --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果文件含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--wait 60` 只约束**单次**调用为 60 秒 —— sub 需要更久就重复**同一条**命令,绝不无限等待。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`result-wait-timeout` 退出码表示 sub 尚未发出完成信号 —— 重复同一条命令;`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
69
64
|
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail verify-code-review --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
70
65
|
|
|
71
|
-
<!-- harnessed-generated:v4.
|
|
66
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
72
67
|
|
|
73
68
|
## 参考资料
|
|
74
69
|
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verify-design
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
|
|
7
|
-
(gstack-design-review + ui-ux-pro-max + design-taste-frontend) + 1 phase (gate ref has_design_changes
|
|
8
|
-
conditional)。Triggered by headless CLI `harnessed run verify-design` or slash
|
|
9
|
-
command `/verify-design` after `harnessed setup`.
|
|
4
|
+
Optional: run a design-system consistency and AI-taste review with gstack /design-review
|
|
5
|
+
when the change touches the design.
|
|
10
6
|
trigger_phrases:
|
|
11
7
|
- "verify design"
|
|
12
8
|
- "设计审查"
|
|
@@ -73,16 +69,16 @@ evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subag
|
|
|
73
69
|
|
|
74
70
|
Do NOT pipe to `harnessed run verify-design` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
75
71
|
|
|
76
|
-
1. Bash: `harnessed prompt verify-design --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
77
|
-
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model
|
|
78
|
-
-
|
|
72
|
+
1. Bash: `harnessed prompt verify-design --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model, result_file}`.
|
|
73
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`. The sub writes its own final result into `result_file` — the path that prompt names — so the FILE is the completion signal: do NOT wait for the sub's chat message, because a background or re-parented agent's message may never arrive. Then drive delivery with harnessed's own completion gate:
|
|
74
|
+
- the gate is `harnessed checkpoint complete verify-design --result-file <result_file> --wait 60` — one call waits at most 60 seconds, so run the SAME command again when the sub needs longer; it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
79
75
|
- 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.
|
|
80
76
|
- 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.
|
|
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.
|
|
82
|
-
4.
|
|
77
|
+
3. If the sub’s output contains `STATUS: NEEDS_CLARIFICATION` + a question list (read it from `result_file` — the chat message may never arrive): STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
78
|
+
4. When `result_file` carries the completion marker: Bash `harnessed checkpoint complete verify-design --result-file <result_file> --wait 60 --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 file carries a verbatim `<promise>COMPLETE</promise>` (or a structured COMPLETE status). `--wait 60` bounds ONE call to 60 seconds — run the SAME command again when the sub needs longer, never an unbounded wait. `--result <text>` is the inline variant; `--result-file` wins and is quoting-safe on Windows. A `result-wait-timeout` exit means the sub has not signalled YET — repeat the same command; `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
83
79
|
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.
|
|
84
80
|
|
|
85
|
-
<!-- harnessed-generated:v4.
|
|
81
|
+
<!-- harnessed-generated:v4.13.0 -->
|
|
86
82
|
|
|
87
83
|
## References
|
|
88
84
|
|