harnessed 5.0.11 → 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.
Files changed (84) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README-en.md +1 -0
  3. package/README-zh.md +1 -0
  4. package/README.md +1 -0
  5. package/bin/harnessed-check-docs.mjs +15 -0
  6. package/bin/harnessed-update-reminder-worker.mjs +2598 -134
  7. package/bin/harnessed-update-reminder.mjs +636 -61
  8. package/dist/cli.mjs +1597 -546
  9. package/dist/cli.mjs.map +1 -1
  10. package/dist/index.mjs +1 -1
  11. package/dist/index.mjs.map +1 -1
  12. package/messages/en.json +15 -1
  13. package/messages/zh-Hans.json +15 -1
  14. package/package.json +1 -1
  15. package/workflows/auto/SKILL.md +10 -18
  16. package/workflows/auto/SKILL.zh-Hans.md +8 -18
  17. package/workflows/discuss/auto/SKILL.md +4 -7
  18. package/workflows/discuss/auto/SKILL.zh-Hans.md +2 -7
  19. package/workflows/discuss/phase/SKILL.md +4 -7
  20. package/workflows/discuss/phase/SKILL.zh-Hans.md +2 -7
  21. package/workflows/discuss/strategic/SKILL.md +4 -8
  22. package/workflows/discuss/strategic/SKILL.zh-Hans.md +2 -8
  23. package/workflows/discuss/subtask/SKILL.md +4 -7
  24. package/workflows/discuss/subtask/SKILL.zh-Hans.md +2 -7
  25. package/workflows/harnessed-update/SKILL.md +9 -8
  26. package/workflows/harnessed-update/SKILL.zh-Hans.md +7 -8
  27. package/workflows/host-primitives.yaml +8 -8
  28. package/workflows/host-primitives.zh-Hans.yaml +8 -8
  29. package/workflows/plan/ai-integration/SKILL.md +7 -7
  30. package/workflows/plan/ai-integration/SKILL.zh-Hans.md +7 -7
  31. package/workflows/plan/architecture/SKILL.md +7 -13
  32. package/workflows/plan/architecture/SKILL.zh-Hans.md +7 -13
  33. package/workflows/plan/auto/SKILL.md +8 -14
  34. package/workflows/plan/auto/SKILL.zh-Hans.md +8 -14
  35. package/workflows/plan/phase/SKILL.md +7 -13
  36. package/workflows/plan/phase/SKILL.zh-Hans.md +7 -13
  37. package/workflows/plan/secure/SKILL.md +7 -7
  38. package/workflows/plan/secure/SKILL.zh-Hans.md +7 -7
  39. package/workflows/plan/spec/SKILL.md +7 -7
  40. package/workflows/plan/spec/SKILL.zh-Hans.md +7 -7
  41. package/workflows/plan/ui/SKILL.md +7 -7
  42. package/workflows/plan/ui/SKILL.zh-Hans.md +7 -7
  43. package/workflows/research/SKILL.md +7 -7
  44. package/workflows/research/SKILL.zh-Hans.md +7 -7
  45. package/workflows/retro/SKILL.md +8 -15
  46. package/workflows/retro/SKILL.zh-Hans.md +7 -15
  47. package/workflows/ship/auto/SKILL.md +8 -14
  48. package/workflows/ship/auto/SKILL.zh-Hans.md +8 -14
  49. package/workflows/ship/preflight/SKILL.md +7 -9
  50. package/workflows/ship/preflight/SKILL.zh-Hans.md +7 -9
  51. package/workflows/task/auto/SKILL.md +8 -15
  52. package/workflows/task/auto/SKILL.zh-Hans.md +8 -15
  53. package/workflows/task/clarify/SKILL.md +2 -10
  54. package/workflows/task/clarify/SKILL.zh-Hans.md +2 -10
  55. package/workflows/task/code/SKILL.md +7 -15
  56. package/workflows/task/code/SKILL.zh-Hans.md +7 -15
  57. package/workflows/task/deliver/SKILL.md +7 -17
  58. package/workflows/task/deliver/SKILL.zh-Hans.md +7 -17
  59. package/workflows/task/test/SKILL.md +7 -14
  60. package/workflows/task/test/SKILL.zh-Hans.md +7 -14
  61. package/workflows/verify/auto/SKILL.md +9 -14
  62. package/workflows/verify/auto/SKILL.zh-Hans.md +9 -14
  63. package/workflows/verify/code-review/SKILL.md +8 -13
  64. package/workflows/verify/code-review/SKILL.zh-Hans.md +8 -13
  65. package/workflows/verify/design/SKILL.md +8 -12
  66. package/workflows/verify/design/SKILL.zh-Hans.md +7 -12
  67. package/workflows/verify/eval-review/SKILL.md +8 -12
  68. package/workflows/verify/eval-review/SKILL.zh-Hans.md +7 -12
  69. package/workflows/verify/multispec/SKILL.md +8 -15
  70. package/workflows/verify/multispec/SKILL.zh-Hans.md +7 -15
  71. package/workflows/verify/paranoid/SKILL.md +7 -14
  72. package/workflows/verify/paranoid/SKILL.zh-Hans.md +7 -14
  73. package/workflows/verify/progress/SKILL.md +8 -13
  74. package/workflows/verify/progress/SKILL.zh-Hans.md +8 -13
  75. package/workflows/verify/qa/SKILL.md +7 -13
  76. package/workflows/verify/qa/SKILL.zh-Hans.md +7 -13
  77. package/workflows/verify/second-opinion/SKILL.md +8 -12
  78. package/workflows/verify/second-opinion/SKILL.zh-Hans.md +7 -12
  79. package/workflows/verify/security/SKILL.md +8 -12
  80. package/workflows/verify/security/SKILL.zh-Hans.md +7 -12
  81. package/workflows/verify/simplify/SKILL.md +8 -12
  82. package/workflows/verify/simplify/SKILL.zh-Hans.md +7 -12
  83. package/workflows/verify/validate-phase/SKILL.md +8 -12
  84. package/workflows/verify/validate-phase/SKILL.zh-Hans.md +7 -12
@@ -1,12 +1,8 @@
1
1
  ---
2
2
  name: verify-security
3
3
  description: |
4
- Stage ④.e verify sub-workflow — gstack /cso 安全审查 OWASP/auth/secrets (has_auth_or_secrets
5
- 触发, 可选 conditional; bundled verify-stage optional /cso step).
6
- schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
- (gstack-cso) + 1 phase (gate ref has_auth_or_secrets conditional)。
8
- Triggered by slash command
9
- `/verify-security` after `harnessed setup`.
4
+ Optional: run an OWASP security review with gstack /cso when the change touches auth
5
+ or secrets.
10
6
  trigger_phrases:
11
7
  - "verify security"
12
8
  - "安全审查"
@@ -60,16 +56,16 @@ evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subag
60
56
 
61
57
  Do NOT pipe to `harnessed run verify-security` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
62
58
 
63
- 1. Bash: `harnessed prompt verify-security --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
64
- 2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
65
- - on return, write the subagent's final output to a file and run `harnessed checkpoint complete verify-security --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
59
+ 1. Bash: `harnessed prompt verify-security --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model, result_file}`.
60
+ 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:
61
+ - the gate is `harnessed checkpoint complete verify-security --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
62
  - if it blocks, run `harnessed checkpoint fail verify-security --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
67
63
  - 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. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete verify-security --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.
64
+ 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.
65
+ 4. When `result_file` carries the completion marker: Bash `harnessed checkpoint complete verify-security --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
66
  5. If the complete gate blocked: Bash `harnessed checkpoint fail verify-security --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
67
 
72
- <!-- harnessed-generated:v4.12.0 -->
68
+ <!-- harnessed-generated:v4.13.0 -->
73
69
 
74
70
  ## References
75
71
 
@@ -1,12 +1,7 @@
1
1
  ---
2
2
  name: verify-security
3
3
  description: |
4
- Stage ④.e 验证子工作流 — gstack /cso 安全审查 OWASP/auth/secrets (has_auth_or_secrets
5
- 触发, 可选 conditional; 捆绑 verify 阶段可选 /cso 步骤).
6
- schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
- (gstack-cso) + 1 phase (gate ref has_auth_or_secrets conditional)。
8
- Triggered by slash command
9
- `/verify-security` after `harnessed setup`.
4
+ 可选:改动涉及鉴权或密钥时,用 gstack /cso 做 OWASP 安全审查。
10
5
  trigger_phrases:
11
6
  - "verify security"
12
7
  - "安全审查"
@@ -59,16 +54,16 @@ freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 sp
59
54
 
60
55
  **不要** pipe 到 `harnessed run verify-security` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
61
56
 
62
- 1. Bash: `harnessed prompt verify-security --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
63
- 2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
64
- - subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete verify-security --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
57
+ 1. Bash: `harnessed prompt verify-security --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-security --result-file <result_file> --wait 60` —— 单次调用最多等 60 秒,sub 需要更久就重复**同一条**命令;它对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
65
60
  - 若被拦下,跑 `harnessed checkpoint fail verify-security --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
66
61
  - **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
67
- 3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
68
- 4. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete verify-security --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`),不是静默放行。
62
+ 3. 若 sub 的输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表(从 `result_file` 读 —— 聊天消息可能永不到达):STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
63
+ 4. 当 `result_file` 携带完成标记时:Bash `harnessed checkpoint complete verify-security --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-security --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
70
65
 
71
- <!-- harnessed-generated:v4.12.0 -->
66
+ <!-- harnessed-generated:v4.13.0 -->
72
67
 
73
68
  ## 参考资料
74
69
 
@@ -1,12 +1,8 @@
1
1
  ---
2
2
  name: verify-simplify
3
3
  description: |
4
- Stage ④.g verify sub-workflow — code-simplifier 末尾串行 (移除重复 / 多余逻辑;
5
- bundled verify-stage cadence — tail-step code-simplifier).
6
- schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
- (code-simplifier) + 1 phase (gate ref is_final_step 末尾串行)。
8
- Triggered by slash command
9
- `/verify-simplify` after `harnessed setup`.
4
+ Remove duplicated and unnecessary logic from the changed code with the code-simplifier
5
+ skill. Run it last in the Verify stage.
10
6
  trigger_phrases:
11
7
  - "verify simplify"
12
8
  - "code simplify"
@@ -60,16 +56,16 @@ evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subag
60
56
 
61
57
  Do NOT pipe to `harnessed run verify-simplify` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
62
58
 
63
- 1. Bash: `harnessed prompt verify-simplify --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
64
- 2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
65
- - on return, write the subagent's final output to a file and run `harnessed checkpoint complete verify-simplify --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
59
+ 1. Bash: `harnessed prompt verify-simplify --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model, result_file}`.
60
+ 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:
61
+ - the gate is `harnessed checkpoint complete verify-simplify --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
62
  - if it blocks, run `harnessed checkpoint fail verify-simplify --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
67
63
  - 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. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete verify-simplify --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.
64
+ 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.
65
+ 4. When `result_file` carries the completion marker: Bash `harnessed checkpoint complete verify-simplify --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
66
  5. If the complete gate blocked: Bash `harnessed checkpoint fail verify-simplify --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
67
 
72
- <!-- harnessed-generated:v4.12.0 -->
68
+ <!-- harnessed-generated:v4.13.0 -->
73
69
 
74
70
  ## References
75
71
 
@@ -1,12 +1,7 @@
1
1
  ---
2
2
  name: verify-simplify
3
3
  description: |
4
- Stage ④.g 验证子工作流 — code-simplifier 末尾串行 (移除重复 / 多余逻辑;
5
- 捆绑 verify 阶段节奏 — tail-step code-simplifier).
6
- schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
- (code-simplifier) + 1 phase (gate ref is_final_step 末尾串行)。
8
- Triggered by slash command
9
- `/verify-simplify` after `harnessed setup`.
4
+ 用 code-simplifier 清掉改动里的重复与多余逻辑。Verify 阶段最后一步必跑。
10
5
  trigger_phrases:
11
6
  - "verify simplify"
12
7
  - "code simplify"
@@ -59,16 +54,16 @@ freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 sp
59
54
 
60
55
  **不要** pipe 到 `harnessed run verify-simplify` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
61
56
 
62
- 1. Bash: `harnessed prompt verify-simplify --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
63
- 2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
64
- - subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete verify-simplify --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
57
+ 1. Bash: `harnessed prompt verify-simplify --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-simplify --result-file <result_file> --wait 60` —— 单次调用最多等 60 秒,sub 需要更久就重复**同一条**命令;它对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
65
60
  - 若被拦下,跑 `harnessed checkpoint fail verify-simplify --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
66
61
  - **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
67
- 3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
68
- 4. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete verify-simplify --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`),不是静默放行。
62
+ 3. 若 sub 的输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表(从 `result_file` 读 —— 聊天消息可能永不到达):STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
63
+ 4. 当 `result_file` 携带完成标记时:Bash `harnessed checkpoint complete verify-simplify --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-simplify --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
70
65
 
71
- <!-- harnessed-generated:v4.12.0 -->
66
+ <!-- harnessed-generated:v4.13.0 -->
72
67
 
73
68
  ## 参考资料
74
69
 
@@ -1,12 +1,8 @@
1
1
  ---
2
2
  name: verify-validate-phase
3
3
  description: |
4
- Stage ④ verify sub-workflow — GSD /gsd-validate-phase Nyquist 覆盖审计 (requires_coverage_audit
5
- 触发, 可选 conditional; 补 TDD 前向写测试之外的后向 requirement→test 覆盖查漏).
6
- schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
- (gsd-validate-phase) + 1 phase (gate ref requires_coverage_audit conditional)。
8
- Triggered by slash command
9
- `/verify-validate-phase` after `harnessed setup`.
4
+ Optional: audit requirement-to-test coverage after a phase ships, catching the
5
+ requirements that no test covers.
10
6
  trigger_phrases:
11
7
  - "verify validate phase"
12
8
  - "Nyquist 覆盖审计"
@@ -55,16 +51,16 @@ evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subag
55
51
 
56
52
  Do NOT pipe to `harnessed run verify-validate-phase` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
57
53
 
58
- 1. Bash: `harnessed prompt verify-validate-phase --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
59
- 2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
60
- - on return, write the subagent's final output to a file and run `harnessed checkpoint complete verify-validate-phase --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
54
+ 1. Bash: `harnessed prompt verify-validate-phase --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model, result_file}`.
55
+ 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:
56
+ - the gate is `harnessed checkpoint complete verify-validate-phase --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>`.
61
57
  - if it blocks, run `harnessed checkpoint fail verify-validate-phase --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
62
58
  - 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.
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.
64
- 4. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete verify-validate-phase --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.
59
+ 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.
60
+ 4. When `result_file` carries the completion marker: Bash `harnessed checkpoint complete verify-validate-phase --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.
65
61
  5. If the complete gate blocked: Bash `harnessed checkpoint fail verify-validate-phase --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.
66
62
 
67
- <!-- harnessed-generated:v4.12.0 -->
63
+ <!-- harnessed-generated:v4.13.0 -->
68
64
 
69
65
  ## References
70
66
 
@@ -1,12 +1,7 @@
1
1
  ---
2
2
  name: verify-validate-phase
3
3
  description: |
4
- Stage ④ 验证子工作流 — GSD /gsd-validate-phase Nyquist 覆盖审计 (requires_coverage_audit
5
- 触发, 可选 conditional; 补 TDD 前向写测试之外的后向 requirement→test 覆盖查漏).
6
- schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
- (gsd-validate-phase) + 1 phase (gate ref requires_coverage_audit conditional)。
8
- Triggered by slash command
9
- `/verify-validate-phase` after `harnessed setup`.
4
+ 可选:phase 完成后回溯审计 requirement→test 覆盖,找出漏掉的需求。
10
5
  trigger_phrases:
11
6
  - "verify validate phase"
12
7
  - "Nyquist 覆盖审计"
@@ -54,16 +49,16 @@ freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 sp
54
49
 
55
50
  **不要** pipe 到 `harnessed run verify-validate-phase` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
56
51
 
57
- 1. Bash: `harnessed prompt verify-validate-phase --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
58
- 2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
59
- - subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete verify-validate-phase --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
52
+ 1. Bash: `harnessed prompt verify-validate-phase --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model, result_file}`。
53
+ 2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn。sub 自己把最终结果写入 `result_file`(prompt 里给出的那个路径)—— **完成信号是文件**,不是聊天消息:后台 / 被 re-parent 的 agent 消息可能永不到达,不要等它。然后用 harnessed 自己的完成闸门驱动交付:
54
+ - 闸门是 `harnessed checkpoint complete verify-validate-phase --result-file <result_file> --wait 60` —— 单次调用最多等 60 秒,sub 需要更久就重复**同一条**命令;它对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
60
55
  - 若被拦下,跑 `harnessed checkpoint fail verify-validate-phase --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
61
56
  - **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
62
- 3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
63
- 4. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete verify-validate-phase --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`),不是静默放行。
57
+ 3. 若 sub 的输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表(从 `result_file` 读 —— 聊天消息可能永不到达):STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
58
+ 4. 当 `result_file` 携带完成标记时:Bash `harnessed checkpoint complete verify-validate-phase --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`),不是静默放行。
64
59
  5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail verify-validate-phase --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
65
60
 
66
- <!-- harnessed-generated:v4.12.0 -->
61
+ <!-- harnessed-generated:v4.13.0 -->
67
62
 
68
63
  ## 参考资料
69
64