harnessed 4.9.1 → 4.10.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/README.md +40 -4
- package/bin/harnessed-inject-state.mjs +103 -2
- package/dist/cli.mjs +1668 -1400
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/workflows/auto/SKILL.md +26 -12
- package/workflows/auto/SKILL.zh-Hans.md +25 -10
- package/workflows/discuss/auto/SKILL.md +15 -12
- package/workflows/discuss/auto/SKILL.zh-Hans.md +12 -8
- package/workflows/discuss/phase/SKILL.md +15 -12
- package/workflows/discuss/phase/SKILL.zh-Hans.md +12 -8
- package/workflows/discuss/strategic/SKILL.md +15 -12
- package/workflows/discuss/strategic/SKILL.zh-Hans.md +12 -8
- package/workflows/discuss/subtask/SKILL.md +15 -12
- package/workflows/discuss/subtask/SKILL.zh-Hans.md +12 -8
- package/workflows/plan/architecture/SKILL.md +14 -12
- package/workflows/plan/architecture/SKILL.zh-Hans.md +11 -8
- package/workflows/plan/auto/SKILL.md +26 -12
- package/workflows/plan/auto/SKILL.zh-Hans.md +25 -10
- package/workflows/plan/phase/SKILL.md +14 -12
- package/workflows/plan/phase/SKILL.zh-Hans.md +11 -8
- package/workflows/research/SKILL.md +14 -12
- package/workflows/research/SKILL.zh-Hans.md +11 -8
- package/workflows/retro/SKILL.md +14 -12
- package/workflows/retro/SKILL.zh-Hans.md +11 -8
- package/workflows/role-prompts.yaml +34 -0
- package/workflows/role-prompts.zh-Hans.yaml +33 -0
- package/workflows/ship/auto/SKILL.md +29 -0
- package/workflows/ship/auto/SKILL.zh-Hans.md +28 -0
- package/workflows/ship/preflight/SKILL.md +17 -0
- package/workflows/ship/preflight/SKILL.zh-Hans.md +16 -0
- package/workflows/task/auto/SKILL.md +26 -12
- package/workflows/task/auto/SKILL.zh-Hans.md +25 -10
- package/workflows/task/clarify/SKILL.md +15 -12
- package/workflows/task/clarify/SKILL.zh-Hans.md +12 -8
- package/workflows/task/code/SKILL.md +14 -12
- package/workflows/task/code/SKILL.zh-Hans.md +11 -8
- package/workflows/task/deliver/SKILL.md +14 -12
- package/workflows/task/deliver/SKILL.zh-Hans.md +11 -8
- package/workflows/task/test/SKILL.md +14 -12
- package/workflows/task/test/SKILL.zh-Hans.md +11 -8
- package/workflows/verify/auto/SKILL.md +26 -12
- package/workflows/verify/auto/SKILL.zh-Hans.md +25 -10
- package/workflows/verify/code-review/SKILL.md +14 -12
- package/workflows/verify/code-review/SKILL.zh-Hans.md +11 -8
- package/workflows/verify/design/SKILL.md +14 -12
- package/workflows/verify/design/SKILL.zh-Hans.md +11 -8
- package/workflows/verify/multispec/SKILL.md +14 -12
- package/workflows/verify/multispec/SKILL.zh-Hans.md +11 -8
- package/workflows/verify/paranoid/SKILL.md +14 -12
- package/workflows/verify/paranoid/SKILL.zh-Hans.md +11 -8
- package/workflows/verify/progress/SKILL.md +14 -12
- package/workflows/verify/progress/SKILL.zh-Hans.md +11 -8
- package/workflows/verify/qa/SKILL.md +14 -12
- package/workflows/verify/qa/SKILL.zh-Hans.md +11 -8
- package/workflows/verify/security/SKILL.md +14 -12
- package/workflows/verify/security/SKILL.zh-Hans.md +11 -8
- package/workflows/verify/simplify/SKILL.md +14 -12
- package/workflows/verify/simplify/SKILL.zh-Hans.md +11 -8
|
@@ -56,18 +56,20 @@ reframe)。
|
|
|
56
56
|
|
|
57
57
|
## How to invoke
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
60
|
+
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
61
|
+
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
62
|
+
CC-native Task / Agent tool (keeps the session responsive + lets clarification round-trips reach the user).
|
|
63
|
+
|
|
64
|
+
Do NOT pipe to `harnessed run plan-phase` — that is the CI/headless path (in-process SDK spawn
|
|
65
|
+
that blocks the session inside Claude Code).
|
|
66
|
+
|
|
67
|
+
1. Bash: `harnessed prompt plan-phase --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
68
|
+
2. Spawn a CC-native subagent (Task / Agent tool) with that `prompt` + `model`, wrapped in the ralph-loop plugin: `/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`. If the plugin is absent, self-loop: spawn → check output for `<promise>COMPLETE</promise>` → re-spawn with prior output appended (up to max_iterations).
|
|
69
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via AskUserQuestion, append the answers to the spec, then re-spawn the same sub.
|
|
70
|
+
4. On `<promise>COMPLETE</promise>`: Bash `harnessed checkpoint complete plan-phase --summary "<one-line>"`. The evidence guard runs here (fail-CLOSED): if a declared `artifacts_expected` file is missing it exits non-zero — re-spawn to produce it before treating the sub as done.
|
|
71
|
+
|
|
72
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
71
73
|
|
|
72
74
|
## References
|
|
73
75
|
|
|
@@ -56,16 +56,19 @@ reframe)。
|
|
|
56
56
|
|
|
57
57
|
## 如何调用
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
60
|
+
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
61
|
+
CC-native Task / Agent 工具 spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
spawn-ready prompt,然后用 CC-native subagent(Task / Agent 工具)逐个 spawn 已 fire 的 sub,
|
|
65
|
-
每个结果用 `harnessed checkpoint` 记录。完整 state-machine 步骤见 `~/.claude/commands/plan-phase.md`;
|
|
66
|
-
若该文件不存在,自行按 gates → prompt → spawn → checkpoint 同序执行。
|
|
63
|
+
**不要** pipe 到 `harnessed run plan-phase` —— 那是 CI/headless 路径(in-process SDK spawn,在 Claude
|
|
64
|
+
Code 内部会阻塞 session)。
|
|
67
65
|
|
|
68
|
-
|
|
66
|
+
1. Bash: `harnessed prompt plan-phase --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
67
|
+
2. 用 CC-native subagent(Task / Agent 工具)以该 `prompt` + `model` spawn,用 ralph-loop plugin 包裹:`/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`。若 plugin 未装,自循环:spawn → 检查 `<promise>COMPLETE</promise>` → 把上轮输出 append 后重 spawn(至多 max_iterations)。
|
|
68
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 AskUserQuestion 原样转达,把答案 append 进 spec,再重 spawn。
|
|
69
|
+
4. 命中 `<promise>COMPLETE</promise>`:Bash `harnessed checkpoint complete plan-phase --summary "<one-line>"`。evidence guard 在此运行(fail-CLOSED):若声明的 `artifacts_expected` 文件缺失会 exit 非零 —— 重 spawn 产出它再算 done。
|
|
70
|
+
|
|
71
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
69
72
|
|
|
70
73
|
## 参考文档
|
|
71
74
|
|
|
@@ -39,15 +39,17 @@ Sister `workflows/capabilities.yaml` entries:
|
|
|
39
39
|
|
|
40
40
|
## How to invoke
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
43
|
+
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
44
|
+
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
45
|
+
CC-native Task / Agent tool (keeps the session responsive + lets clarification round-trips reach the user).
|
|
46
|
+
|
|
47
|
+
Do NOT pipe to `harnessed run research` — that is the CI/headless path (in-process SDK spawn
|
|
48
|
+
that blocks the session inside Claude Code).
|
|
49
|
+
|
|
50
|
+
1. Bash: `harnessed prompt research --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
51
|
+
2. Spawn a CC-native subagent (Task / Agent tool) with that `prompt` + `model`, wrapped in the ralph-loop plugin: `/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`. If the plugin is absent, self-loop: spawn → check output for `<promise>COMPLETE</promise>` → re-spawn with prior output appended (up to max_iterations).
|
|
52
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via AskUserQuestion, append the answers to the spec, then re-spawn the same sub.
|
|
53
|
+
4. On `<promise>COMPLETE</promise>`: Bash `harnessed checkpoint complete research --summary "<one-line>"`. The evidence guard runs here (fail-CLOSED): if a declared `artifacts_expected` file is missing it exits non-zero — re-spawn to produce it before treating the sub as done.
|
|
54
|
+
|
|
55
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
@@ -39,13 +39,16 @@ Sister `workflows/capabilities.yaml` 条目:
|
|
|
39
39
|
|
|
40
40
|
## 如何调用
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
43
|
+
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
44
|
+
CC-native Task / Agent 工具 spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
spawn-ready prompt,然后用 CC-native subagent(Task / Agent 工具)逐个 spawn 已 fire 的 sub,
|
|
48
|
-
每个结果用 `harnessed checkpoint` 记录。完整 state-machine 步骤见 `~/.claude/commands/research.md`;
|
|
49
|
-
若该文件不存在,自行按 gates → prompt → spawn → checkpoint 同序执行。
|
|
46
|
+
**不要** pipe 到 `harnessed run research` —— 那是 CI/headless 路径(in-process SDK spawn,在 Claude
|
|
47
|
+
Code 内部会阻塞 session)。
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
1. Bash: `harnessed prompt research --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
50
|
+
2. 用 CC-native subagent(Task / Agent 工具)以该 `prompt` + `model` spawn,用 ralph-loop plugin 包裹:`/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`。若 plugin 未装,自循环:spawn → 检查 `<promise>COMPLETE</promise>` → 把上轮输出 append 后重 spawn(至多 max_iterations)。
|
|
51
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 AskUserQuestion 原样转达,把答案 append 进 spec,再重 spawn。
|
|
52
|
+
4. 命中 `<promise>COMPLETE</promise>`:Bash `harnessed checkpoint complete research --summary "<one-line>"`。evidence guard 在此运行(fail-CLOSED):若声明的 `artifacts_expected` 文件缺失会 exit 非零 —— 重 spawn 产出它再算 done。
|
|
53
|
+
|
|
54
|
+
<!-- harnessed-generated:v4.9.3 -->
|
package/workflows/retro/SKILL.md
CHANGED
|
@@ -49,18 +49,20 @@ Sister `workflows/capabilities.yaml` entries:
|
|
|
49
49
|
|
|
50
50
|
## How to invoke
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
53
|
+
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
54
|
+
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
55
|
+
CC-native Task / Agent tool (keeps the session responsive + lets clarification round-trips reach the user).
|
|
56
|
+
|
|
57
|
+
Do NOT pipe to `harnessed run retro` — that is the CI/headless path (in-process SDK spawn
|
|
58
|
+
that blocks the session inside Claude Code).
|
|
59
|
+
|
|
60
|
+
1. Bash: `harnessed prompt retro --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
61
|
+
2. Spawn a CC-native subagent (Task / Agent tool) with that `prompt` + `model`, wrapped in the ralph-loop plugin: `/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`. If the plugin is absent, self-loop: spawn → check output for `<promise>COMPLETE</promise>` → re-spawn with prior output appended (up to max_iterations).
|
|
62
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via AskUserQuestion, append the answers to the spec, then re-spawn the same sub.
|
|
63
|
+
4. On `<promise>COMPLETE</promise>`: Bash `harnessed checkpoint complete retro --summary "<one-line>"`. The evidence guard runs here (fail-CLOSED): if a declared `artifacts_expected` file is missing it exits non-zero — re-spawn to produce it before treating the sub as done.
|
|
64
|
+
|
|
65
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
64
66
|
|
|
65
67
|
## References
|
|
66
68
|
|
|
@@ -49,16 +49,19 @@ Sister `workflows/capabilities.yaml` 条目:
|
|
|
49
49
|
|
|
50
50
|
## 如何调用
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
53
|
+
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
54
|
+
CC-native Task / Agent 工具 spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
spawn-ready prompt,然后用 CC-native subagent(Task / Agent 工具)逐个 spawn 已 fire 的 sub,
|
|
58
|
-
每个结果用 `harnessed checkpoint` 记录。完整 state-machine 步骤见 `~/.claude/commands/retro.md`;
|
|
59
|
-
若该文件不存在,自行按 gates → prompt → spawn → checkpoint 同序执行。
|
|
56
|
+
**不要** pipe 到 `harnessed run retro` —— 那是 CI/headless 路径(in-process SDK spawn,在 Claude
|
|
57
|
+
Code 内部会阻塞 session)。
|
|
60
58
|
|
|
61
|
-
|
|
59
|
+
1. Bash: `harnessed prompt retro --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
60
|
+
2. 用 CC-native subagent(Task / Agent 工具)以该 `prompt` + `model` spawn,用 ralph-loop plugin 包裹:`/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`。若 plugin 未装,自循环:spawn → 检查 `<promise>COMPLETE</promise>` → 把上轮输出 append 后重 spawn(至多 max_iterations)。
|
|
61
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 AskUserQuestion 原样转达,把答案 append 进 spec,再重 spawn。
|
|
62
|
+
4. 命中 `<promise>COMPLETE</promise>`:Bash `harnessed checkpoint complete retro --summary "<one-line>"`。evidence guard 在此运行(fail-CLOSED):若声明的 `artifacts_expected` 文件缺失会 exit 非零 —— 重 spawn 产出它再算 done。
|
|
63
|
+
|
|
64
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
62
65
|
|
|
63
66
|
## 参考文档
|
|
64
67
|
|
|
@@ -101,6 +101,20 @@ prompts:
|
|
|
101
101
|
severity: "per-sub fire/skip (with reason); paranoid is mandatory on critical modules"
|
|
102
102
|
description: "Stage 4 Verify master — progress → parallel reviewers → simplify tail (paranoid mandatory on critical modules)."
|
|
103
103
|
|
|
104
|
+
ship:
|
|
105
|
+
primary_cap: ""
|
|
106
|
+
is_master: true
|
|
107
|
+
specialist: "Stage 5 ship dispatcher"
|
|
108
|
+
responsibility: |
|
|
109
|
+
Release stage after verify. Order: `/ship-preflight` (always, serial 1 —
|
|
110
|
+
read-only release-readiness gate) → delegate PR / deploy to gstack `/ship`
|
|
111
|
+
(composition, not reimplementation) → publish via `publish.yml` CI on tag
|
|
112
|
+
push. Deploy boundary = TAG-READY: this stage never pushes to the remote,
|
|
113
|
+
never publishes to npm, and never creates a git tag on its own.
|
|
114
|
+
checklist: []
|
|
115
|
+
severity: "preflight pass/fail → tag-ready (delegate PR/deploy; publish stays in CI)"
|
|
116
|
+
description: "Release stage after Verify — preflight → delegate PR/deploy to gstack /ship → publish via CI (tag-ready boundary)."
|
|
117
|
+
|
|
104
118
|
# ============================================================================
|
|
105
119
|
# Standalone
|
|
106
120
|
# ============================================================================
|
|
@@ -510,6 +524,26 @@ prompts:
|
|
|
510
524
|
severity: "ship-blocker / ship-with-action / informational"
|
|
511
525
|
description: "Pattern C 4-specialist Agent Team — critical-release multi-dimensional review with SendMessage cross-questioning."
|
|
512
526
|
|
|
527
|
+
# ============================================================================
|
|
528
|
+
# ship-* (1 sub)
|
|
529
|
+
# ============================================================================
|
|
530
|
+
|
|
531
|
+
ship-preflight:
|
|
532
|
+
primary_cap: "release-preflight"
|
|
533
|
+
specialist: "Release-readiness gate"
|
|
534
|
+
responsibility: |
|
|
535
|
+
Read-only release-readiness gate, run first (serial 1) in the ship stage.
|
|
536
|
+
Runs `harnessed release-preflight` to confirm the repo is tag-ready; a
|
|
537
|
+
failing check blocks shipping. Nothing is pushed / published / tagged here.
|
|
538
|
+
checklist:
|
|
539
|
+
- "CHANGELOG `## [Unreleased]` is non-empty (this release is documented)"
|
|
540
|
+
- "`package.json` carries a valid semver version"
|
|
541
|
+
- "Working tree is git-clean (no uncommitted changes)"
|
|
542
|
+
- "A `v<version>` git tag does NOT already exist (tag-absent)"
|
|
543
|
+
- "On any failure: STOP, surface the `fix:` hint, do not proceed to PR / tag"
|
|
544
|
+
severity: "pass / fail (fail blocks the ship stage — read-only, never pushes / publishes / tags)"
|
|
545
|
+
description: "Read-only release-readiness gate (CHANGELOG `[Unreleased]` / version / git-clean / tag-absent); blocks on failure."
|
|
546
|
+
|
|
513
547
|
# ============================================================================
|
|
514
548
|
# Multi-cap workflow notes
|
|
515
549
|
# ============================================================================
|
|
@@ -89,6 +89,19 @@ prompts:
|
|
|
89
89
|
severity: "逐 sub fire/skip(附原因);关键模块上 paranoid 强制"
|
|
90
90
|
description: "Stage 4 Verify master — progress → 并行 reviewers → simplify 收尾(关键模块上 paranoid 强制)。"
|
|
91
91
|
|
|
92
|
+
ship:
|
|
93
|
+
primary_cap: ""
|
|
94
|
+
is_master: true
|
|
95
|
+
specialist: "Stage 5 ship 分发器"
|
|
96
|
+
responsibility: |
|
|
97
|
+
verify 之后的 release 阶段。顺序:`/ship-preflight`(总是,串行第 1 ——
|
|
98
|
+
只读发布就绪门)→ 把 PR / deploy 委派给 gstack `/ship`(组合,不重新实现)
|
|
99
|
+
→ 经 `publish.yml` CI 在 tag push 时 publish。Deploy 边界 = TAG-READY:
|
|
100
|
+
本 stage 绝不 push 到 remote、绝不 publish 到 npm、绝不自行创建 git tag。
|
|
101
|
+
checklist: []
|
|
102
|
+
severity: "preflight pass/fail → tag-ready(委派 PR/deploy;publish 留在 CI)"
|
|
103
|
+
description: "Verify 之后的 release 阶段 —— preflight → 把 PR/deploy 委派给 gstack /ship → 经 CI publish(tag-ready 边界)。"
|
|
104
|
+
|
|
92
105
|
# ============================================================================
|
|
93
106
|
# Standalone
|
|
94
107
|
# ============================================================================
|
|
@@ -488,6 +501,26 @@ prompts:
|
|
|
488
501
|
severity: "ship-blocker / ship-with-action / informational"
|
|
489
502
|
description: "Pattern C 4-specialist Agent Team —— 关键发布的多维度审查,带 SendMessage 交叉质询。"
|
|
490
503
|
|
|
504
|
+
# ============================================================================
|
|
505
|
+
# ship-* (1 sub)
|
|
506
|
+
# ============================================================================
|
|
507
|
+
|
|
508
|
+
ship-preflight:
|
|
509
|
+
primary_cap: "release-preflight"
|
|
510
|
+
specialist: "发布就绪门"
|
|
511
|
+
responsibility: |
|
|
512
|
+
只读发布就绪门,在 ship 阶段最先(串行第 1)运行。跑
|
|
513
|
+
`harnessed release-preflight` 确认 repo 是否 tag-ready;任一检查失败即
|
|
514
|
+
阻塞 shipping。此处不 push / publish / 创建 tag。
|
|
515
|
+
checklist:
|
|
516
|
+
- "CHANGELOG `## [Unreleased]` 非空(本次 release 已记录文档)"
|
|
517
|
+
- "`package.json` 带合法 semver 版本"
|
|
518
|
+
- "工作树 git-clean(无未提交改动)"
|
|
519
|
+
- "`v<version>` git tag 尚不存在(tag-absent)"
|
|
520
|
+
- "任一失败:STOP,给出 `fix:` 提示,不要推进到 PR / tag"
|
|
521
|
+
severity: "pass / fail(fail 阻塞 ship 阶段 —— 只读,绝不 push / publish / tag)"
|
|
522
|
+
description: "只读发布就绪门(CHANGELOG `[Unreleased]` / version / git-clean / tag-absent);失败即阻塞。"
|
|
523
|
+
|
|
491
524
|
# ============================================================================
|
|
492
525
|
# Multi-cap workflow notes
|
|
493
526
|
# ============================================================================
|
|
@@ -45,3 +45,32 @@ harnessed does not reimplement it), and the actual `npm publish` + GitHub releas
|
|
|
45
45
|
This stage stops at **tag-ready**. It never pushes to the remote, never publishes to npm, and
|
|
46
46
|
never creates a git tag on its own. Those are CI + explicit-approval actions, by design —
|
|
47
47
|
"PR ready != release ready", and "release ready != already published".
|
|
48
|
+
|
|
49
|
+
## How to invoke
|
|
50
|
+
|
|
51
|
+
The numbered sequence below **is** the state machine — execute it step by step with Bash.
|
|
52
|
+
Do NOT improvise an equivalent flow from the Overview above: freelancing bypasses the engine
|
|
53
|
+
(no per-sub ledger, no evidence guard, no recovery). harnessed is the orchestration brain
|
|
54
|
+
(`harnessed gates` says which subs fire, `harnessed prompt` gives each spawn-ready prompt,
|
|
55
|
+
`harnessed checkpoint` records the ledger); YOU spawn with CC-native Task / Agent tools.
|
|
56
|
+
|
|
57
|
+
Do NOT pipe to `harnessed run ship` — that is the CI/headless path (in-process SDK spawn
|
|
58
|
+
that blocks the session, bypasses Agent Teams, and hangs inside Claude Code).
|
|
59
|
+
|
|
60
|
+
1. If the clarification criteria fire for "$ARGUMENTS" (≥2 approaches / core algorithm / API contract / high error cost), clarify interactively in THIS session first (AskUserQuestion) and lock decisions; otherwise transparent-skip. Produce a locked spec.
|
|
61
|
+
2. Bash: `harnessed gates ship --task "<locked spec>" --skip-sub clarify` → parse the JSON `{fire, skip, parallelism}`. This is the plan SoT (no spawn). Keep the verbatim JSON.
|
|
62
|
+
3. Bash: `harnessed checkpoint start ship --plan '<the verbatim gates JSON from step 2>'` → seeds the per-sub ledger so `harnessed status --recover` can re-orient you after compaction.
|
|
63
|
+
4. If `parallelism.escalate_to_teams === true`: read `~/.claude/rules/agent-teams.md`, then drive the fired subs as an Agent Team (`TeamCreate` → `Agent(name, team_name, …)` per sub with its `harnessed prompt <sub>` prompt → coordinate via `SendMessage` → `SendMessage shutdown_request` + `TeamDelete`). Still checkpoint each sub (`complete` / `fail`) as below.
|
|
64
|
+
5. Otherwise, for each fired sub in `order` (serial subs sequentially, parallel subs concurrently):
|
|
65
|
+
- **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 gates <sub> --task "<spec>" --skip-sub clarify` → `harnessed checkpoint start <sub> --plan '<json>'` → repeat this loop for ITS fired subs.
|
|
66
|
+
- **Else (leaf sub):**
|
|
67
|
+
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → parse `{prompt, max_iterations, model}`.
|
|
68
|
+
b. Spawn a CC-native subagent (Task / Agent tool) with that `prompt` + `model`, wrapped in the ralph-loop plugin: `/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`. If the plugin is absent, self-loop: spawn → check output for `<promise>COMPLETE</promise>` → re-spawn with prior output appended (up to max_iterations).
|
|
69
|
+
c. If the output contains `STATUS: NEEDS_CLARIFICATION` + questions: STOP, relay them verbatim via AskUserQuestion, append the answers to the spec, then re-spawn the same sub.
|
|
70
|
+
d. On `<promise>COMPLETE</promise>`: Bash `harnessed checkpoint complete <sub> --summary "<one-line>"`. The evidence guard runs here (fail-CLOSED): if a declared `artifacts_expected` file is missing it exits non-zero — re-spawn to produce it, or pass `--force` only to deliberately override.
|
|
71
|
+
e. If the sub cannot reach COMPLETE (max_iterations exhausted / unrecoverable error): Bash `harnessed checkpoint fail <sub> --summary "<why>"`, then STOP and report to the user.
|
|
72
|
+
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.
|
|
73
|
+
|
|
74
|
+
**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.
|
|
75
|
+
|
|
76
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
@@ -44,3 +44,31 @@ preflight 通过后,主控将 PR + deploy 委派给 gstack `/ship`(组合复
|
|
|
44
44
|
此阶段止步于 **tag-ready**。它不会自行推送到远端、不会发布到 npm、也不会创建 git tag。
|
|
45
45
|
这些操作属于 CI + 显式批准动作,是有意为之——"PR ready != release ready",
|
|
46
46
|
"release ready != already published"。
|
|
47
|
+
|
|
48
|
+
## 如何调用
|
|
49
|
+
|
|
50
|
+
下面这套编号序列**就是** state machine —— 逐步用 Bash 执行。**不要**从上方 Overview 自行演绎一套
|
|
51
|
+
等价流程:freestyle 会旁路引擎(无 per-sub ledger、无 evidence guard、无 recovery)。harnessed 是
|
|
52
|
+
编排大脑(`harnessed gates` 决定哪些 sub fire,`harnessed prompt` 给出每个 spawn-ready prompt,
|
|
53
|
+
`harnessed checkpoint` 记录 ledger);**你**(主 session)用 CC-native Task / Agent 工具做 spawn。
|
|
54
|
+
|
|
55
|
+
**不要** pipe 到 `harnessed run ship` —— 那是 CI/headless 路径(in-process SDK spawn,会阻塞
|
|
56
|
+
session、绕过 Agent Teams,在 Claude Code 内部调用时会挂死)。
|
|
57
|
+
|
|
58
|
+
1. 若 "$ARGUMENTS" 触发澄清判据(≥2 方案 / 核心算法 / API contract / 高错误成本),先在**本 session** 交互澄清(AskUserQuestion)并锁决策;否则透明 skip。产出 locked spec。
|
|
59
|
+
2. Bash: `harnessed gates ship --task "<locked spec>" --skip-sub clarify` → 解析 JSON `{fire, skip, parallelism}`。这是 plan SoT(不 spawn)。保留 verbatim JSON。
|
|
60
|
+
3. Bash: `harnessed checkpoint start ship --plan '<step 2 的 verbatim gates JSON>'` → seed per-sub ledger,让 `harnessed status --recover` 能在 compaction 后给你重新定位。
|
|
61
|
+
4. 若 `parallelism.escalate_to_teams === true`:读 `~/.claude/rules/agent-teams.md`,然后把 fired subs 作为 Agent Team 驱动(`TeamCreate` → 每个 sub `Agent(name, team_name, …)` + 其 `harnessed prompt <sub>` prompt → 用 `SendMessage` 协调 → `SendMessage shutdown_request` + `TeamDelete`)。每个 sub 仍按下方 checkpoint(`complete` / `fail`)。
|
|
62
|
+
5. 否则,对 `order` 里每个 fired sub(serial 串行、parallel 并发):
|
|
63
|
+
- **若该项 `is_master: true`**(本身是 stage master —— 如 `/auto` fire `plan`/`task`/`verify`):**不要**直接 prompt+spawn。RECURSE:跑该 master 自己的 `harnessed gates <sub> --task "<spec>" --skip-sub clarify` → `harnessed checkpoint start <sub> --plan '<json>'` → 对它的 fired subs 重复本循环。
|
|
64
|
+
- **否则(leaf sub):**
|
|
65
|
+
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
66
|
+
b. 用 CC-native subagent(Task / Agent 工具)以该 `prompt` + `model` spawn,用 ralph-loop plugin 包裹:`/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`。若 plugin 未装,自循环:spawn → 检查输出 `<promise>COMPLETE</promise>` → 把上轮输出 append 后重 spawn(至多 max_iterations)。
|
|
67
|
+
c. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 AskUserQuestion 原样转达,把答案 append 进 spec,再重 spawn 同一 sub。
|
|
68
|
+
d. 命中 `<promise>COMPLETE</promise>`:Bash `harnessed checkpoint complete <sub> --summary "<one-line>"`。evidence guard 在此运行(fail-CLOSED):若声明的 `artifacts_expected` 文件缺失会 exit 非零 —— 重 spawn 产出它,或仅在刻意覆盖时传 `--force`。
|
|
69
|
+
e. 若 sub 无法达到 COMPLETE(max_iterations 耗尽 / 不可恢复错误):Bash `harnessed checkpoint fail <sub> --summary "<why>"`,然后 STOP 并向用户报告。
|
|
70
|
+
6. 所有 fired subs `done`(或记录 `failed`)后,Bash `harnessed status --recover` 确认 ledger,并向用户报告 per-sub fired/skipped/done/failed 摘要。
|
|
71
|
+
|
|
72
|
+
**若丢失上下文(compaction / resume):** 先跑 `harnessed status --recover` —— 它读 ledger 并打印「你在这里,下一步是什么」,让你从第一个 `pending` sub 续跑而非重启。若 ledger 为空,重跑 step 2-3。
|
|
73
|
+
|
|
74
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
@@ -38,3 +38,20 @@ ready to tag a release:
|
|
|
38
38
|
This gate is READ-ONLY. It never pushes, publishes, or creates a tag. The actual
|
|
39
39
|
`npm publish` + GitHub release happen in `publish.yml` CI when a `v<version>` tag is
|
|
40
40
|
pushed (with explicit user approval).
|
|
41
|
+
|
|
42
|
+
## How to invoke
|
|
43
|
+
|
|
44
|
+
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
45
|
+
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
46
|
+
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
47
|
+
CC-native Task / Agent tool (keeps the session responsive + lets clarification round-trips reach the user).
|
|
48
|
+
|
|
49
|
+
Do NOT pipe to `harnessed run ship-preflight` — that is the CI/headless path (in-process SDK spawn
|
|
50
|
+
that blocks the session inside Claude Code).
|
|
51
|
+
|
|
52
|
+
1. Bash: `harnessed prompt ship-preflight --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
53
|
+
2. Spawn a CC-native subagent (Task / Agent tool) with that `prompt` + `model`, wrapped in the ralph-loop plugin: `/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`. If the plugin is absent, self-loop: spawn → check output for `<promise>COMPLETE</promise>` → re-spawn with prior output appended (up to max_iterations).
|
|
54
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via AskUserQuestion, append the answers to the spec, then re-spawn the same sub.
|
|
55
|
+
4. On `<promise>COMPLETE</promise>`: Bash `harnessed checkpoint complete ship-preflight --summary "<one-line>"`. The evidence guard runs here (fail-CLOSED): if a declared `artifacts_expected` file is missing it exits non-zero — re-spawn to produce it before treating the sub as done.
|
|
56
|
+
|
|
57
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
@@ -36,3 +36,19 @@ trigger_phrases:
|
|
|
36
36
|
|
|
37
37
|
此关卡为只读操作,不会推送、发布或创建 tag。实际的 `npm publish` + GitHub release
|
|
38
38
|
在显式用户批准后,由 `publish.yml` CI 在推送 `v<version>` tag 时触发。
|
|
39
|
+
|
|
40
|
+
## 如何调用
|
|
41
|
+
|
|
42
|
+
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
43
|
+
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
44
|
+
CC-native Task / Agent 工具 spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
45
|
+
|
|
46
|
+
**不要** pipe 到 `harnessed run ship-preflight` —— 那是 CI/headless 路径(in-process SDK spawn,在 Claude
|
|
47
|
+
Code 内部会阻塞 session)。
|
|
48
|
+
|
|
49
|
+
1. Bash: `harnessed prompt ship-preflight --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
50
|
+
2. 用 CC-native subagent(Task / Agent 工具)以该 `prompt` + `model` spawn,用 ralph-loop plugin 包裹:`/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`。若 plugin 未装,自循环:spawn → 检查 `<promise>COMPLETE</promise>` → 把上轮输出 append 后重 spawn(至多 max_iterations)。
|
|
51
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 AskUserQuestion 原样转达,把答案 append 进 spec,再重 spawn。
|
|
52
|
+
4. 命中 `<promise>COMPLETE</promise>`:Bash `harnessed checkpoint complete ship-preflight --summary "<one-line>"`。evidence guard 在此运行(fail-CLOSED):若声明的 `artifacts_expected` 文件缺失会 exit 非零 —— 重 spawn 产出它再算 done。
|
|
53
|
+
|
|
54
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
@@ -59,18 +59,32 @@ Sister `workflows/capabilities.yaml`:
|
|
|
59
59
|
|
|
60
60
|
## How to invoke
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
The numbered sequence below **is** the state machine — execute it step by step with Bash.
|
|
63
|
+
Do NOT improvise an equivalent flow from the Overview above: freelancing bypasses the engine
|
|
64
|
+
(no per-sub ledger, no evidence guard, no recovery). harnessed is the orchestration brain
|
|
65
|
+
(`harnessed gates` says which subs fire, `harnessed prompt` gives each spawn-ready prompt,
|
|
66
|
+
`harnessed checkpoint` records the ledger); YOU spawn with CC-native Task / Agent tools.
|
|
67
|
+
|
|
68
|
+
Do NOT pipe to `harnessed run task` — that is the CI/headless path (in-process SDK spawn
|
|
69
|
+
that blocks the session, bypasses Agent Teams, and hangs inside Claude Code).
|
|
70
|
+
|
|
71
|
+
1. If the clarification criteria fire for "$ARGUMENTS" (≥2 approaches / core algorithm / API contract / high error cost), clarify interactively in THIS session first (AskUserQuestion) and lock decisions; otherwise transparent-skip. Produce a locked spec.
|
|
72
|
+
2. Bash: `harnessed gates task --task "<locked spec>" --skip-sub clarify` → parse the JSON `{fire, skip, parallelism}`. This is the plan SoT (no spawn). Keep the verbatim JSON.
|
|
73
|
+
3. Bash: `harnessed checkpoint start task --plan '<the verbatim gates JSON from step 2>'` → seeds the per-sub ledger so `harnessed status --recover` can re-orient you after compaction.
|
|
74
|
+
4. If `parallelism.escalate_to_teams === true`: read `~/.claude/rules/agent-teams.md`, then drive the fired subs as an Agent Team (`TeamCreate` → `Agent(name, team_name, …)` per sub with its `harnessed prompt <sub>` prompt → coordinate via `SendMessage` → `SendMessage shutdown_request` + `TeamDelete`). Still checkpoint each sub (`complete` / `fail`) as below.
|
|
75
|
+
5. Otherwise, for each fired sub in `order` (serial subs sequentially, parallel subs concurrently):
|
|
76
|
+
- **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 gates <sub> --task "<spec>" --skip-sub clarify` → `harnessed checkpoint start <sub> --plan '<json>'` → repeat this loop for ITS fired subs.
|
|
77
|
+
- **Else (leaf sub):**
|
|
78
|
+
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → parse `{prompt, max_iterations, model}`.
|
|
79
|
+
b. Spawn a CC-native subagent (Task / Agent tool) with that `prompt` + `model`, wrapped in the ralph-loop plugin: `/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`. If the plugin is absent, self-loop: spawn → check output for `<promise>COMPLETE</promise>` → re-spawn with prior output appended (up to max_iterations).
|
|
80
|
+
c. If the output contains `STATUS: NEEDS_CLARIFICATION` + questions: STOP, relay them verbatim via AskUserQuestion, append the answers to the spec, then re-spawn the same sub.
|
|
81
|
+
d. On `<promise>COMPLETE</promise>`: Bash `harnessed checkpoint complete <sub> --summary "<one-line>"`. The evidence guard runs here (fail-CLOSED): if a declared `artifacts_expected` file is missing it exits non-zero — re-spawn to produce it, or pass `--force` only to deliberately override.
|
|
82
|
+
e. If the sub cannot reach COMPLETE (max_iterations exhausted / unrecoverable error): Bash `harnessed checkpoint fail <sub> --summary "<why>"`, then STOP and report to the user.
|
|
83
|
+
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.
|
|
84
|
+
|
|
85
|
+
**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.
|
|
86
|
+
|
|
87
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
74
88
|
|
|
75
89
|
## References
|
|
76
90
|
|
|
@@ -59,16 +59,31 @@ Sister `workflows/capabilities.yaml`:
|
|
|
59
59
|
|
|
60
60
|
## 如何调用
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
下面这套编号序列**就是** state machine —— 逐步用 Bash 执行。**不要**从上方 Overview 自行演绎一套
|
|
63
|
+
等价流程:freestyle 会旁路引擎(无 per-sub ledger、无 evidence guard、无 recovery)。harnessed 是
|
|
64
|
+
编排大脑(`harnessed gates` 决定哪些 sub fire,`harnessed prompt` 给出每个 spawn-ready prompt,
|
|
65
|
+
`harnessed checkpoint` 记录 ledger);**你**(主 session)用 CC-native Task / Agent 工具做 spawn。
|
|
66
|
+
|
|
67
|
+
**不要** pipe 到 `harnessed run task` —— 那是 CI/headless 路径(in-process SDK spawn,会阻塞
|
|
68
|
+
session、绕过 Agent Teams,在 Claude Code 内部调用时会挂死)。
|
|
69
|
+
|
|
70
|
+
1. 若 "$ARGUMENTS" 触发澄清判据(≥2 方案 / 核心算法 / API contract / 高错误成本),先在**本 session** 交互澄清(AskUserQuestion)并锁决策;否则透明 skip。产出 locked spec。
|
|
71
|
+
2. Bash: `harnessed gates task --task "<locked spec>" --skip-sub clarify` → 解析 JSON `{fire, skip, parallelism}`。这是 plan SoT(不 spawn)。保留 verbatim JSON。
|
|
72
|
+
3. Bash: `harnessed checkpoint start task --plan '<step 2 的 verbatim gates JSON>'` → seed per-sub ledger,让 `harnessed status --recover` 能在 compaction 后给你重新定位。
|
|
73
|
+
4. 若 `parallelism.escalate_to_teams === true`:读 `~/.claude/rules/agent-teams.md`,然后把 fired subs 作为 Agent Team 驱动(`TeamCreate` → 每个 sub `Agent(name, team_name, …)` + 其 `harnessed prompt <sub>` prompt → 用 `SendMessage` 协调 → `SendMessage shutdown_request` + `TeamDelete`)。每个 sub 仍按下方 checkpoint(`complete` / `fail`)。
|
|
74
|
+
5. 否则,对 `order` 里每个 fired sub(serial 串行、parallel 并发):
|
|
75
|
+
- **若该项 `is_master: true`**(本身是 stage master —— 如 `/auto` fire `plan`/`task`/`verify`):**不要**直接 prompt+spawn。RECURSE:跑该 master 自己的 `harnessed gates <sub> --task "<spec>" --skip-sub clarify` → `harnessed checkpoint start <sub> --plan '<json>'` → 对它的 fired subs 重复本循环。
|
|
76
|
+
- **否则(leaf sub):**
|
|
77
|
+
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
78
|
+
b. 用 CC-native subagent(Task / Agent 工具)以该 `prompt` + `model` spawn,用 ralph-loop plugin 包裹:`/ralph-loop "<prompt>" --max-iterations <max_iterations> --completion-promise "COMPLETE"`。若 plugin 未装,自循环:spawn → 检查输出 `<promise>COMPLETE</promise>` → 把上轮输出 append 后重 spawn(至多 max_iterations)。
|
|
79
|
+
c. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 AskUserQuestion 原样转达,把答案 append 进 spec,再重 spawn 同一 sub。
|
|
80
|
+
d. 命中 `<promise>COMPLETE</promise>`:Bash `harnessed checkpoint complete <sub> --summary "<one-line>"`。evidence guard 在此运行(fail-CLOSED):若声明的 `artifacts_expected` 文件缺失会 exit 非零 —— 重 spawn 产出它,或仅在刻意覆盖时传 `--force`。
|
|
81
|
+
e. 若 sub 无法达到 COMPLETE(max_iterations 耗尽 / 不可恢复错误):Bash `harnessed checkpoint fail <sub> --summary "<why>"`,然后 STOP 并向用户报告。
|
|
82
|
+
6. 所有 fired subs `done`(或记录 `failed`)后,Bash `harnessed status --recover` 确认 ledger,并向用户报告 per-sub fired/skipped/done/failed 摘要。
|
|
83
|
+
|
|
84
|
+
**若丢失上下文(compaction / resume):** 先跑 `harnessed status --recover` —— 它读 ledger 并打印「你在这里,下一步是什么」,让你从第一个 `pending` sub 续跑而非重启。若 ledger 为空,重跑 step 2-3。
|
|
85
|
+
|
|
86
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
72
87
|
|
|
73
88
|
## References
|
|
74
89
|
|
|
@@ -56,18 +56,21 @@ phase-level conditional tool fire NOT 决定 phase 是否走)。
|
|
|
56
56
|
|
|
57
57
|
## How to invoke
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
Clarification needs real user dialogue, so run this stage directly in THIS session — do NOT
|
|
60
|
+
spawn it, and do NOT improvise: follow these steps so the locked spec is persisted for the
|
|
61
|
+
execution stages.
|
|
62
|
+
|
|
63
|
+
1. Evaluate the clarification criteria for "$ARGUMENTS":
|
|
64
|
+
- **Strategic** — new feature / milestone / unclear business scope → gstack `/office-hours` + `/plan-ceo-review`
|
|
65
|
+
- **Phase** — ≥2 open implementation decisions / unclear cross-phase API contract → GSD `/gsd-discuss-phase`
|
|
66
|
+
- **Subtask** — ≥2 distinct approaches / core algorithm / API contract design / high error cost → superpowers brainstorming
|
|
67
|
+
2. For each layer that fires, hold the dialogue with the user (use AskUserQuestion for option-style decisions) and lock every open decision.
|
|
68
|
+
3. Transparent-skip layers that don't fire — state which were skipped and why.
|
|
69
|
+
4. Persist the locked decisions to `.planning/` via planning-with-files (`findings.md` / `task_plan.md`).
|
|
70
|
+
|
|
71
|
+
Output: a locked spec the execution stages (`/plan` → `/task` → `/verify`) consume without further user input.
|
|
72
|
+
|
|
73
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
71
74
|
|
|
72
75
|
## References
|
|
73
76
|
|
|
@@ -55,16 +55,20 @@ Phase 01-brainstorm 在 `phase.spec_ambiguous == true` 时条件性 fire `grill-
|
|
|
55
55
|
|
|
56
56
|
## 如何调用
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
澄清需要真实用户对话,所以本阶段直接在**本 session** 跑 —— **不要** spawn,也**不要**自行演绎:
|
|
59
|
+
按以下步骤走,把 locked spec 持久化给执行阶段。
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
1. 对 "$ARGUMENTS" 评估澄清判据:
|
|
62
|
+
- **战略层** —— 新功能 / 新 milestone / 商业 scope 不清 → gstack `/office-hours` + `/plan-ceo-review`
|
|
63
|
+
- **Phase 层** —— ≥2 个 open implementation decision / 跨 phase API contract 不清 → GSD `/gsd-discuss-phase`
|
|
64
|
+
- **子任务层** —— ≥2 个不同方案 / 核心算法 / API contract 设计 / 高错误成本 → superpowers brainstorming
|
|
65
|
+
2. 对每个 fire 的层与用户对话(option 型决策用 AskUserQuestion),锁定每个 open decision。
|
|
66
|
+
3. 不 fire 的层透明 skip —— 说明哪些被 skip 及原因。
|
|
67
|
+
4. 把 locked 决策持久化到 `.planning/`(planning-with-files 的 `findings.md` / `task_plan.md`)。
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
产出:一份 locked spec,执行阶段(`/plan` → `/task` → `/verify`)无需再问用户即可消费。
|
|
70
|
+
|
|
71
|
+
<!-- harnessed-generated:v4.9.3 -->
|
|
68
72
|
|
|
69
73
|
## References
|
|
70
74
|
|