harnessed 4.7.0 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +174 -81
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/messages/zh-Hans.json +16 -2
- package/package.json +1 -1
- package/workflows/auto/SKILL.zh-Hans.md +129 -0
- package/workflows/disciplines/doc-discipline.zh-Hans.yaml +49 -0
- package/workflows/disciplines/karpathy.yaml +5 -5
- package/workflows/disciplines/karpathy.zh-Hans.yaml +47 -0
- package/workflows/disciplines/operational.yaml +6 -6
- package/workflows/disciplines/operational.zh-Hans.yaml +79 -0
- package/workflows/disciplines/output-style.yaml +7 -7
- package/workflows/disciplines/output-style.zh-Hans.yaml +62 -0
- package/workflows/disciplines/priority.yaml +2 -2
- package/workflows/disciplines/priority.zh-Hans.yaml +28 -0
- package/workflows/discuss/auto/SKILL.zh-Hans.md +75 -0
- package/workflows/discuss/phase/SKILL.zh-Hans.md +73 -0
- package/workflows/discuss/strategic/SKILL.zh-Hans.md +78 -0
- package/workflows/discuss/subtask/SKILL.zh-Hans.md +79 -0
- package/workflows/plan/architecture/SKILL.zh-Hans.md +74 -0
- package/workflows/plan/auto/SKILL.zh-Hans.md +75 -0
- package/workflows/plan/phase/SKILL.zh-Hans.md +76 -0
- package/workflows/research/SKILL.zh-Hans.md +81 -0
- package/workflows/retro/SKILL.zh-Hans.md +71 -0
- package/workflows/role-prompts.zh-Hans.yaml +501 -0
- package/workflows/ship/auto/SKILL.zh-Hans.md +46 -0
- package/workflows/ship/preflight/SKILL.zh-Hans.md +38 -0
- package/workflows/task/auto/SKILL.zh-Hans.md +80 -0
- package/workflows/task/clarify/SKILL.zh-Hans.md +79 -0
- package/workflows/task/code/SKILL.zh-Hans.md +85 -0
- package/workflows/task/deliver/SKILL.zh-Hans.md +113 -0
- package/workflows/task/test/SKILL.zh-Hans.md +90 -0
- package/workflows/verify/auto/SKILL.zh-Hans.md +89 -0
- package/workflows/verify/code-review/SKILL.zh-Hans.md +71 -0
- package/workflows/verify/design/SKILL.zh-Hans.md +74 -0
- package/workflows/verify/multispec/SKILL.zh-Hans.md +88 -0
- package/workflows/verify/paranoid/SKILL.zh-Hans.md +74 -0
- package/workflows/verify/progress/SKILL.zh-Hans.md +69 -0
- package/workflows/verify/qa/SKILL.zh-Hans.md +76 -0
- package/workflows/verify/security/SKILL.zh-Hans.md +70 -0
- package/workflows/verify/simplify/SKILL.zh-Hans.md +70 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task
|
|
3
|
+
description: |
|
|
4
|
+
Stage ③ Task 主控编排器 — 串行 invoke 4 sub per subtask (clarify → code → test → deliver)。
|
|
5
|
+
ralph-loop COMPLETE wrapper 在 deliver phase 内 (D-10 orthogonal wrapper)。tdd-gate conditional
|
|
6
|
+
fire on test sub。schema_version: harnessed.workflow.v3 with delegates_to (4 sub: clarify order 1
|
|
7
|
+
conditional + code order 2 + test order 3 conditional + deliver order 4) + disciplines_applied
|
|
8
|
+
(6 default) + tools_available (8 entry: superpowers-brainstorming + tdd + grill-with-docs +
|
|
9
|
+
zoom-out + improve-codebase-architecture + diagnose + ralph-loop + planning-with-files)。
|
|
10
|
+
Triggered by slash command `/task`
|
|
11
|
+
(bare per ADR 0030 namespace policy D-02 LOCK) after `harnessed setup`.
|
|
12
|
+
trigger_phrases:
|
|
13
|
+
- "task"
|
|
14
|
+
- "子任务执行"
|
|
15
|
+
- "stage 3 execute"
|
|
16
|
+
- "ralph loop"
|
|
17
|
+
- "执行子任务"
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# task 主控编排器 (v3)
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
24
|
+
4-stage cadence Stage ③ 主控编排器,针对每个 subtask 依次委托给 4 个串行子工作流
|
|
25
|
+
(捆绑 Execute-stage cadence + karpathy 心法 always-on):
|
|
26
|
+
|
|
27
|
+
| order | sub | gate ref | mode | 触发条件 |
|
|
28
|
+
| ----- | --- | -------- | ---- | ---------- |
|
|
29
|
+
| 1 | `clarify` | `judgments.subtask-gate.brainstorming.fires` | serial | approaches ≥ 2 / core_algorithm / has_api_contract / error_cost=high |
|
|
30
|
+
| 2 | `code` | (无条件 — karpathy 心法 always-on + mattpocock conditional route) | serial | 始终触发 |
|
|
31
|
+
| 3 | `test` | `judgments.tdd-gate.tdd-strongly-suggested.fires` | serial | 核心业务 / 算法 / 数据处理 / 回归 risk / reliability (6 fires_when OR-chain) |
|
|
32
|
+
| 4 | `deliver` | (无条件 — ralph-loop COMPLETE wrapper) | serial | 始终触发 |
|
|
33
|
+
|
|
34
|
+
Engine runtime 通过 `runMasterOrchestrator` 按顺序 spawn 4 个子工作流阶段
|
|
35
|
+
(依照 T3.5.W0.1:clarify → code → test → deliver)。K9 invariant 强制执行:每个 serial
|
|
36
|
+
mode delegate 必须携带显式 `order`。每个 subtask 入口走一次此主控编排器。
|
|
37
|
+
|
|
38
|
+
## ralph-loop 正交 wrapper (D-10)
|
|
39
|
+
|
|
40
|
+
ralph-loop 是正交 wrapper, 套在 deliver sub 的 01-deliver phase 外层保 completion-promise
|
|
41
|
+
verbatim "COMPLETE" (R20.10)。任何执行单元 (subagent / team / 主 session) 都可外层套 ralph-loop
|
|
42
|
+
保 completion-promise (bundled subagent vs Agent Teams routing — orthogonal wrapper rule).
|
|
43
|
+
|
|
44
|
+
## Capability refs
|
|
45
|
+
|
|
46
|
+
Sister `workflows/capabilities.yaml`:
|
|
47
|
+
- `superpowers-brainstorming` — Bucket 4 核心 capability (sub clarify upstream)
|
|
48
|
+
- `tdd` — Bucket 4 核心 capability TDD red-green-refactor (sub test upstream)
|
|
49
|
+
- `grill-with-docs` — Bucket 1 mattpocock conditional invoke (clarify)
|
|
50
|
+
- `zoom-out` — Bucket 1 mattpocock conditional invoke (code, unfamiliar_module)
|
|
51
|
+
- `improve-codebase-architecture` — Bucket 1 mattpocock conditional invoke (code, architecture_health_audit)
|
|
52
|
+
- `diagnose` — Bucket 1 mattpocock conditional invoke (code/test, bug_root_cause_unknown / test_fail)
|
|
53
|
+
- `ralph-loop` — Bucket 4 核心 capability orthogonal wrapper (deliver)
|
|
54
|
+
- `planning-with-files` — Bucket 4 核心 capability (code + deliver progress.md update)
|
|
55
|
+
|
|
56
|
+
## Invocation
|
|
57
|
+
|
|
58
|
+
- Slash command: `/task <text>` (bare per ADR 0030 namespace policy D-02 LOCK after `harnessed setup`)
|
|
59
|
+
|
|
60
|
+
## How to invoke
|
|
61
|
+
|
|
62
|
+
使用 Bash 工具运行:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
echo "$ARGUMENTS" | harnessed run task --task-stdin
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
若 `$ARGUMENTS` 为空,运行 `harnessed run task`(不带 stdin pipe)。
|
|
69
|
+
|
|
70
|
+
执行完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一个阶段。根据对话上下文自行决定是否调用——该提示仅供参考,不具强制性。
|
|
71
|
+
|
|
72
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
73
|
+
|
|
74
|
+
## References
|
|
75
|
+
|
|
76
|
+
- D-01 master orchestrator delegation pattern
|
|
77
|
+
- D-02 bare slash cmd convention (ADR 0030 namespace policy LOCK)
|
|
78
|
+
- D-10 ralph-loop orthogonal wrapper
|
|
79
|
+
- workflows/judgments/{subtask-gate,tdd-gate}.yaml — brainstorming + tdd-strongly-suggested triggers
|
|
80
|
+
- workflows/task/{clarify,code,test,deliver}/workflow.yaml — 4 sub-workflow Phase 3.4 SHIPPED
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-clarify
|
|
3
|
+
description: |
|
|
4
|
+
task-clarify workflow v3 — Stage ③.a 子任务澄清 sub-workflow (superpowers
|
|
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 harnessed CLI
|
|
11
|
+
`harnessed task-clarify --task <text>` or slash command `/task-clarify` after
|
|
12
|
+
`harnessed setup`.
|
|
13
|
+
trigger_phrases:
|
|
14
|
+
- "clarify this subtask"
|
|
15
|
+
- "task-clarify workflow"
|
|
16
|
+
- "Stage 3 clarify"
|
|
17
|
+
- "跑 task-clarify"
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# task-clarify workflow (v3)
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
24
|
+
单阶段子工作流,将 CLAUDE.md Stage ③.a 子任务澄清纪律映射到 harnessed runtime,
|
|
25
|
+
完整采用 `harnessed.workflow.v3` schema(Phase v3.0-3.4 W0 T3.4.W0.6 — D-09 L0
|
|
26
|
+
Discipline Substrate + D-05 conditional `invokes_tools` + D-04 gate ref)。
|
|
27
|
+
|
|
28
|
+
| phase | id | upstream | model | capability / invokes_tools | gate |
|
|
29
|
+
| ----- | -- | -------- | ----- | -------------------------- | ---- |
|
|
30
|
+
| 1 | `01-brainstorm` | superpowers | sonnet | `{{ capabilities.superpowers-brainstorming.cmd }}` + `invokes_tools: [{if: phase.spec_ambiguous, tool: grill-with-docs}]` | `judgments.subtask-gate.brainstorming.fires` |
|
|
31
|
+
|
|
32
|
+
每阶段配置从 `workflows/task/clarify/workflow.yaml` 加载;engine.runRouting 通过
|
|
33
|
+
`@anthropic-ai/claude-agent-sdk` 0.3.142+ 将每个阶段 spawn 为 sub-agent。
|
|
34
|
+
|
|
35
|
+
## Per-subtask 重复 invoke 模式
|
|
36
|
+
|
|
37
|
+
task-clarify **不是**一次性阶段——execute-task 主控编排器对**每个 subtask 入口**委托一次
|
|
38
|
+
task-clarify,评估 gate(subtask-gate.brainstorming.fires)是否激活。跳过路径
|
|
39
|
+
(subtask.type in ['crud','standard_lib_call'] OR subtask.lines < 20)完全绕过
|
|
40
|
+
brainstorming,遵循 CLAUDE.md「拿不准 → 倾向跳过」原则。
|
|
41
|
+
|
|
42
|
+
## Discipline Substrate (L0 always-on)
|
|
43
|
+
|
|
44
|
+
6 个 discipline(karpathy + output-style + language + operational + priority + protocols)
|
|
45
|
+
按 D-09 L0 Discipline Substrate 横切应用——workflow runtime pre-phase hook 加载
|
|
46
|
+
discipline yaml 并应用规则。Sentinel 类别 `behavioral` 跳过 cmd invoke;runtime engine
|
|
47
|
+
通过 `discipline_ref` 路由至 `workflows/disciplines/<basename>.yaml`。
|
|
48
|
+
|
|
49
|
+
## 条件性 grill-with-docs 触发 (D-05 invokes_tools)
|
|
50
|
+
|
|
51
|
+
Phase 01-brainstorm 在 `phase.spec_ambiguous == true` 时条件性 fire `grill-with-docs`——
|
|
52
|
+
对应 CLAUDE.md「Discuss / Research 阶段」mattpocock 招式按需召唤模式;**非**强制
|
|
53
|
+
无条件 fire(D-05 invokes_tools 与 OnClause 并存,但作用面不同——invokes_tools
|
|
54
|
+
属于 phase 级别的条件性工具触发,不决定 phase 是否执行)。
|
|
55
|
+
|
|
56
|
+
## How to invoke
|
|
57
|
+
|
|
58
|
+
使用 Bash 工具运行:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
echo "$ARGUMENTS" | harnessed run task-clarify --task-stdin
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
若 `$ARGUMENTS` 为空,运行 `harnessed run task-clarify`(不带 stdin pipe)。
|
|
65
|
+
|
|
66
|
+
执行完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一个阶段。根据对话上下文自行决定是否调用——该提示仅供参考,不具强制性。
|
|
67
|
+
|
|
68
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
69
|
+
|
|
70
|
+
## References
|
|
71
|
+
|
|
72
|
+
- D-09 — L0 Discipline Substrate always-on (6 disciplines)
|
|
73
|
+
- D-05 — phase-level `invokes_tools` conditional tool fire
|
|
74
|
+
- D-04 — `gate` 4-level ref pre-resolved by `judgmentResolver`
|
|
75
|
+
- D-02 — SKILL.md `name:` bare slash cmd (`task-clarify` NOT `task/clarify`) per ADR 0030
|
|
76
|
+
- `workflows/judgments/subtask-gate.yaml` triggers.brainstorming
|
|
77
|
+
- `workflows/capabilities.yaml` — superpowers-brainstorming + grill-with-docs entries
|
|
78
|
+
- `workflows/defaults.yaml` — ralph_max_iterations.task-clarify.* values (T3.4.W2.2 followup)
|
|
79
|
+
- `docs/WORKFLOW.md` — 4-stage workflow mermaid + Stage ③ Execute 章节
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-code
|
|
3
|
+
description: |
|
|
4
|
+
task-code workflow v3 — Stage ③.b 子任务编码 sub-workflow (karpathy 4 心法
|
|
5
|
+
always-on + mattpocock conditional route + planning-with-files progress.md update)。
|
|
6
|
+
2-phase composition: 01-code (karpathy 心法 + zoom-out 陌生模块 / 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
|
+
[zoom-out, improve-codebase-architecture, diagnose, planning-with-files]. Triggered
|
|
11
|
+
by harnessed CLI `harnessed task-code --task <text>` or slash command `/task-code`
|
|
12
|
+
after `harnessed setup`.
|
|
13
|
+
trigger_phrases:
|
|
14
|
+
- "code this subtask"
|
|
15
|
+
- "task-code workflow"
|
|
16
|
+
- "Stage 3 code"
|
|
17
|
+
- "跑 task-code"
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# task-code workflow (v3)
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
24
|
+
2-phase 子工作流,将 CLAUDE.md Stage ③.b 子任务编码纪律映射到 harnessed runtime,
|
|
25
|
+
完整采用 `harnessed.workflow.v3` schema(Phase v3.0-3.4 W0 T3.4.W0.7 — D-09 L0
|
|
26
|
+
Discipline Substrate + D-05 conditional `invokes_tools` + D-15
|
|
27
|
+
planning-with-files plugin)。
|
|
28
|
+
|
|
29
|
+
| phase | id | upstream | model | capability / invokes_tools |
|
|
30
|
+
| ----- | -- | -------- | ----- | -------------------------- |
|
|
31
|
+
| 1 | `01-code` | karpathy | sonnet | `invokes_tools: [{if: phase.unfamiliar_module, tool: zoom-out}, {if: phase.architecture_health_audit, tool: improve-codebase-architecture}, {if: subtask.bug_root_cause_unknown, tool: diagnose}]` |
|
|
32
|
+
| 2 | `02-progress` | planning-with-files | haiku | `{{ capabilities.planning-with-files.cmd }}` / `invokes: /plan` / `artifacts_expected: [progress.md]` |
|
|
33
|
+
|
|
34
|
+
每阶段配置从 `workflows/task/code/workflow.yaml` 加载;engine.runRouting 通过
|
|
35
|
+
`@anthropic-ai/claude-agent-sdk` 0.3.142+ 将每个阶段 spawn 为 sub-agent。
|
|
36
|
+
|
|
37
|
+
## Karpathy 4 心法 (L0 Discipline Substrate always-on)
|
|
38
|
+
|
|
39
|
+
Phase 01-code 的 upstream 是 `karpathy`——runtime engine 加载 `workflows/disciplines/
|
|
40
|
+
karpathy.yaml` discipline rules 横切应用(Think Before Coding / Simplicity
|
|
41
|
+
First / Surgical Changes / Goal-Driven Execution + ≤200L hard limit + no-feature-creep
|
|
42
|
+
+ trust-internal-code + no-comments-default)。不 invoke slash cmd,通过 hook 强制
|
|
43
|
+
behavioral rule,遵循 D-09 L0 Discipline Substrate。
|
|
44
|
+
|
|
45
|
+
## mattpocock conditional route (D-05 invokes_tools)
|
|
46
|
+
|
|
47
|
+
Phase 01-code 根据 phase fact context 条件性 fire 3 个 mattpocock 招式:
|
|
48
|
+
- `zoom-out` — 陌生模块导航(当 `phase.unfamiliar_module == true`)
|
|
49
|
+
- `improve-codebase-architecture` — 周期架构健康审查(当 `phase.architecture_health_audit == true`)
|
|
50
|
+
- `diagnose` — bug 系统化排错(当 `subtask.bug_root_cause_unknown == true`)
|
|
51
|
+
|
|
52
|
+
3 个触发条件 OR-chain,任 1 触发即 invoke 对应招式——互不排斥(对应 CLAUDE.md
|
|
53
|
+
「mattpocock 招式按需召唤」模式,NOT exclusive)。无触发 = pure karpathy 心法 only。
|
|
54
|
+
|
|
55
|
+
## Phase 02-progress planning-with-files plugin 直接对接 (Q-AUDIT-5a LOCKED Option A)
|
|
56
|
+
|
|
57
|
+
02-progress 调用 **Claude Code plugin** slash command `/plan` 更新
|
|
58
|
+
`.planning/<phase-id>/` 下的 `progress.md`——跟踪 subtask 完成 / blocked / next step,
|
|
59
|
+
遵循捆绑的「跨 session 恢复」模式 + R20.6 Manus-style 持久化。需要安装
|
|
60
|
+
`planning-with-files` Claude Code plugin(通过 Claude Code plugin marketplace 安装)。
|
|
61
|
+
|
|
62
|
+
## How to invoke
|
|
63
|
+
|
|
64
|
+
使用 Bash 工具运行:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
echo "$ARGUMENTS" | harnessed run task-code --task-stdin
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
若 `$ARGUMENTS` 为空,运行 `harnessed run task-code`(不带 stdin pipe)。
|
|
71
|
+
|
|
72
|
+
执行完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一个阶段。根据对话上下文自行决定是否调用——该提示仅供参考,不具强制性。
|
|
73
|
+
|
|
74
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
75
|
+
|
|
76
|
+
## References
|
|
77
|
+
|
|
78
|
+
- D-09 — L0 Discipline Substrate always-on (karpathy 心法 4 条 cross-cutting)
|
|
79
|
+
- D-05 — phase-level `invokes_tools` conditional tool fire
|
|
80
|
+
- D-15 + Q-AUDIT-5a — planning-with-files = Claude Code plugin slash cmd `/plan`
|
|
81
|
+
- D-02 — SKILL.md `name:` bare slash cmd (`task-code` NOT `task/code`) per ADR 0030
|
|
82
|
+
- `workflows/disciplines/karpathy.yaml` — 4 心法 + ≤200L hard limit 等 rules (L0 substrate)
|
|
83
|
+
- `workflows/capabilities.yaml` — zoom-out / improve-codebase-architecture / diagnose / planning-with-files entries
|
|
84
|
+
- `workflows/defaults.yaml` — ralph_max_iterations.task-code.* values (T3.4.W2.2 followup)
|
|
85
|
+
- `docs/WORKFLOW.md` — 4-stage workflow mermaid + Stage ③ Execute 章节
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-deliver
|
|
3
|
+
description: |
|
|
4
|
+
task-deliver workflow v3 — Stage ③.d 子任务交付 sub-workflow (ralph-loop COMPLETE
|
|
5
|
+
wrapper + Agent Teams conditional escalation + R20.10 explicit max_iterations_exceeded
|
|
6
|
+
fallback)。2-phase composition: 01-deliver (ralph-loop SDK wrapper with completion_promise
|
|
7
|
+
verbatim "COMPLETE" + parallelism judgments.parallelism-gate.ralph-loop-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
|
+
[ralph-loop, agent-teams-create, agent-teams-send-message, agent-teams-shutdown,
|
|
12
|
+
planning-with-files]. Triggered by harnessed CLI `harnessed task-deliver --task <text>`
|
|
13
|
+
or slash command `/task-deliver` after `harnessed setup`.
|
|
14
|
+
trigger_phrases:
|
|
15
|
+
- "deliver this subtask"
|
|
16
|
+
- "task-deliver workflow"
|
|
17
|
+
- "Stage 3 deliver"
|
|
18
|
+
- "ralph-loop COMPLETE"
|
|
19
|
+
- "跑 task-deliver"
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# task-deliver workflow (v3)
|
|
23
|
+
|
|
24
|
+
## Overview
|
|
25
|
+
|
|
26
|
+
2-phase 子工作流,将 CLAUDE.md Stage ③.d 子任务交付纪律映射到 harnessed runtime,
|
|
27
|
+
完整采用 `harnessed.workflow.v3` schema(Phase v3.0-3.4 W0 T3.4.W0.9 — D-09 L0
|
|
28
|
+
Discipline Substrate + D-10 ralph-loop SDK wrapper + D-11 Agent Teams 升级 5 触发
|
|
29
|
+
OR-chain + R20.10 explicit max_iterations_exceeded handler)。
|
|
30
|
+
|
|
31
|
+
| phase | id | upstream | model | capability / args / parallelism / fallback |
|
|
32
|
+
| ----- | -- | -------- | ----- | ------------------------------------------ |
|
|
33
|
+
| 1 | `01-deliver` | ralph-loop | haiku | `{{ capabilities.ralph-loop.cmd }}` + `args: {completion_promise: COMPLETE, max_iterations: ...}` + `parallelism: judgments.parallelism-gate.ralph-loop-wrapper.fires` + `fallback.max_iterations_exceeded.action: emit_warning_and_halt` |
|
|
34
|
+
| 2 | `02-progress-mark` | planning-with-files | haiku | `{{ capabilities.planning-with-files.cmd }}` / `invokes: /plan` / `artifacts_expected: [progress.md]` |
|
|
35
|
+
|
|
36
|
+
每阶段配置从 `workflows/task/deliver/workflow.yaml` 加载;engine.runRouting 通过
|
|
37
|
+
`@anthropic-ai/claude-agent-sdk` 0.3.142+ 将每个阶段 spawn 为 sub-agent。
|
|
38
|
+
|
|
39
|
+
## Phase 01 ralph-loop COMPLETE wrapper (R20.10 + D-10 + ADR 0011)
|
|
40
|
+
|
|
41
|
+
ralph-loop SDK wrapper 保 completion-promise verbatim string `"COMPLETE"`——sub-task
|
|
42
|
+
被认为完成的判据是子任务输出包含 verbatim "COMPLETE" string(NOT 启发式 / NOT
|
|
43
|
+
LLM-as-judge)。Sister capabilities.yaml `ralph-loop` entry impl `bundled-skill` +
|
|
44
|
+
`sdk_ref: src/workflow/lib/ralphLoop.ts`(Phase 2.2 v0.2.0 ship)。
|
|
45
|
+
|
|
46
|
+
### Parallelism — ralph-loop 正交 wrapper
|
|
47
|
+
|
|
48
|
+
`parallelism: judgments.parallelism-gate.ralph-loop-wrapper.fires` ref——遵循 R20.10
|
|
49
|
+
+ D-10,ralph-loop 是**正交 wrapper**,套在 subagent-default / agent-teams-upgrade /
|
|
50
|
+
main-session-fallback 任意 1 种模式外层(NOT 互斥触发器,而是 parallelism-gate.yaml
|
|
51
|
+
L42-45 中的 `wraps:` 正交字段)。Runtime engine 评估 wrapping mode 后 spawn 相应
|
|
52
|
+
执行单元并套 ralph-loop completion check。
|
|
53
|
+
|
|
54
|
+
### Agent Teams 条件性升级 (D-11 + agent-teams.md 5 OR-chain)
|
|
55
|
+
|
|
56
|
+
5 个升级触发(来自 capabilities.yaml `agent-teams-create.fires_when` + agent-teams.md):
|
|
57
|
+
1. `teammate_send_message_needed == true` — teammate 间 SendMessage 互通(NOT fire-and-forget)
|
|
58
|
+
2. `subagent_context_overflow == true` — subagent 撞 context 上限
|
|
59
|
+
3. `shared_task_list == true` — 多 teammate 共享 task list 自协调
|
|
60
|
+
4. `opposing_hypothesis_debate == true` — 对立假设辩论
|
|
61
|
+
5. `fullstack_three_way == true` — 全栈三路协同
|
|
62
|
+
|
|
63
|
+
任 1 触发 → 升级 subagent fan-out → Agent Teams Pattern A/B/C。清理是强制的,
|
|
64
|
+
遵循 agent-teams.md 防呆清单(SendMessage shutdown_request + TeamDelete)——属于
|
|
65
|
+
engine 级别的连接,NOT yaml schema 的职责范围。
|
|
66
|
+
|
|
67
|
+
### R20.10 explicit max_iterations_exceeded handler(非静默中止)
|
|
68
|
+
|
|
69
|
+
phase.fallback.max_iterations_exceeded = `{action: emit_warning_and_halt, message,
|
|
70
|
+
exit_code: 1}`——通过 FallbackMaxIterationsExceeded Type.Literal(
|
|
71
|
+
'emit_warning_and_halt')(workflow.ts L70-77)做 schema 级强制约束。Sister Phase 2.4
|
|
72
|
+
W1.2 fallbackHandlers.ts engine.ts wire——ralph-loop 撞 max_iterations 时显式 emit
|
|
73
|
+
warning + halt with exit_code 1,NOT 静默中止/继续执行。
|
|
74
|
+
|
|
75
|
+
Brief enforcement W0.9: ✅ ralph-loop completion_promise COMPLETE / ✅ parallelism-gate
|
|
76
|
+
ref / ✅ R20.10 explicit max_iterations_exceeded handler。
|
|
77
|
+
|
|
78
|
+
## Phase 02 progress-mark planning-with-files (D-15 + Q-AUDIT-5a Option A)
|
|
79
|
+
|
|
80
|
+
02-progress-mark 调用 Claude Code plugin slash cmd `/plan`,在 `progress.md` 中将
|
|
81
|
+
subtask 标记为完成——对应 Phase 01-code progress update 模式,是 Stage ③ task chain
|
|
82
|
+
的最后一次调用。需要安装 `planning-with-files` Claude Code plugin(通过
|
|
83
|
+
Claude Code plugin marketplace 安装)。
|
|
84
|
+
|
|
85
|
+
## How to invoke
|
|
86
|
+
|
|
87
|
+
使用 Bash 工具运行:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
echo "$ARGUMENTS" | harnessed run task-deliver --task-stdin
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
若 `$ARGUMENTS` 为空,运行 `harnessed run task-deliver`(不带 stdin pipe)。
|
|
94
|
+
|
|
95
|
+
执行完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一个阶段。根据对话上下文自行决定是否调用——该提示仅供参考,不具强制性。
|
|
96
|
+
|
|
97
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
98
|
+
|
|
99
|
+
## References
|
|
100
|
+
|
|
101
|
+
- D-09 — L0 Discipline Substrate always-on (6 disciplines)
|
|
102
|
+
- D-10 — ralph-loop 真接 SDK wrapper (NOT mock reference; v0.2.0 ship)
|
|
103
|
+
- D-11 — Agent Teams 升级 5 触发 OR-chain per bundled parallelism-gate rules
|
|
104
|
+
- R20.10 — ralph-loop max_iterations_exceeded explicit emit_warning_and_halt
|
|
105
|
+
(acceptance c "NOT silent abort"); ralph-loop 正交 wrapper wraps 3 mode
|
|
106
|
+
- D-02 — SKILL.md `name:` bare slash cmd (`task-deliver` NOT `task/deliver`) per ADR 0030
|
|
107
|
+
- ADR 0011 — SDK + ralph-loop integration v0.2.0 baseline
|
|
108
|
+
- `workflows/judgments/parallelism-gate.yaml` triggers.ralph-loop-wrapper +
|
|
109
|
+
agent-teams-upgrade + subagent-default + main-session-fallback
|
|
110
|
+
- `workflows/capabilities.yaml` — ralph-loop + agent-teams-{create,send-message,shutdown}
|
|
111
|
+
+ planning-with-files entries
|
|
112
|
+
- `workflows/defaults.yaml` — ralph_max_iterations.task-deliver.* values (T3.4.W2.2 followup)
|
|
113
|
+
- `docs/WORKFLOW.md` — 4-stage workflow mermaid + Stage ③ Execute 章节
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-test
|
|
3
|
+
description: |
|
|
4
|
+
task-test 工作流 v3 — Stage ③.c 子任务测试 sub-workflow (superpowers TDD
|
|
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]。通过 harnessed CLI `harnessed task-test --task <text>` 或
|
|
11
|
+
`harnessed setup` 后的斜杠命令 `/task-test` 触发。
|
|
12
|
+
trigger_phrases:
|
|
13
|
+
- "test this subtask"
|
|
14
|
+
- "task-test workflow"
|
|
15
|
+
- "Stage 3 test"
|
|
16
|
+
- "TDD red-green-refactor"
|
|
17
|
+
- "跑 task-test"
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# task-test workflow (v3)
|
|
21
|
+
|
|
22
|
+
## 概述
|
|
23
|
+
|
|
24
|
+
单阶段子工作流,将用户 CLAUDE.md Stage ③.c 子任务测试 + TDD
|
|
25
|
+
强烈建议开启纪律映射到 harnessed 运行时,完整采用 `harnessed.workflow.v3`
|
|
26
|
+
schema(Phase v3.0-3.4 W0 T3.4.W0.8 — D-09 L0 Discipline Substrate + D-04 关卡引用
|
|
27
|
+
+ D-05 条件式 `invokes_tools` + D-13 tdd 能力别名)。
|
|
28
|
+
|
|
29
|
+
| phase | id | upstream | model | capability / invokes_tools | gate |
|
|
30
|
+
| ----- | -- | -------- | ----- | -------------------------- | ---- |
|
|
31
|
+
| 1 | `01-test` | superpowers | sonnet | `{{ capabilities.tdd.cmd }}` + `invokes_tools: [{if: test_fail == true, tool: diagnose}]` | `judgments.tdd-gate.tdd-strongly-suggested.fires` |
|
|
32
|
+
|
|
33
|
+
每阶段配置从 `workflows/task/test/workflow.yaml` 加载;engine.runRouting
|
|
34
|
+
通过 `@anthropic-ai/claude-agent-sdk` 0.3.142+ 将每个阶段作为 subagent 启动。
|
|
35
|
+
|
|
36
|
+
## TDD 关卡(D-04 + judgments/tdd-gate.yaml 6 fires_when + 3 skips_when)
|
|
37
|
+
|
|
38
|
+
关卡 `judgments.tdd-gate.tdd-strongly-suggested.fires` 机器化 CLAUDE.md
|
|
39
|
+
「Execute 阶段」TDD 强烈建议开启节的 6 项 OR-chain:
|
|
40
|
+
- `subtask.is_core_business_logic == true`
|
|
41
|
+
- `subtask.is_algorithm == true`
|
|
42
|
+
- `subtask.is_data_processing == true`
|
|
43
|
+
- `subtask.regression_risk == 'high'`
|
|
44
|
+
- `subtask.reliability_required == true`
|
|
45
|
+
|
|
46
|
+
跳过条件(per tdd-gate.yaml skips_when):
|
|
47
|
+
- `subtask.type in ['crud', 'ui_polish', 'docs_only']`
|
|
48
|
+
|
|
49
|
+
关卡 4 级引用由 `judgmentResolver`(T2.3.W0.4 SHIPPED)在 expr-eval 求值**前**预解析——
|
|
50
|
+
运行时引擎在关卡未触发时跳过该阶段。
|
|
51
|
+
|
|
52
|
+
## D-13 tdd 能力别名
|
|
53
|
+
|
|
54
|
+
能力 `tdd`(per capabilities.yaml L346-359)主 impl 为 `superpowers:test-driven-
|
|
55
|
+
development`,别名 `[{impl: mattpocock-skills, cmd: /tdd}]` — 两者可替代 per D-13
|
|
56
|
+
LOCKED 决策。`{{ capabilities.tdd.cmd }}` 默认 resolve 至 superpowers
|
|
57
|
+
SDK,用户发出明确信号时可切换至 mattpocock /tdd 别名路径。
|
|
58
|
+
|
|
59
|
+
## 条件式 diagnose 调用(D-05 invokes_tools)
|
|
60
|
+
|
|
61
|
+
阶段 01-test 在 `test_fail == true` 时条件性触发 `diagnose`(capabilities.yaml L55-64 mattpocock-skills
|
|
62
|
+
/diagnose)— 对应 sister CLAUDE.md「系统化排错」模式;
|
|
63
|
+
测试失败时进入 diagnose 循环(reproduce → minimise → hypothesise → instrument →
|
|
64
|
+
fix → regression-test),测试通过则完全跳过 diagnose。
|
|
65
|
+
|
|
66
|
+
## 调用方式
|
|
67
|
+
|
|
68
|
+
使用 Bash 工具运行:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
echo "$ARGUMENTS" | harnessed run task-test --task-stdin
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
若 `$ARGUMENTS` 为空,运行 `harnessed run task-test`(不带 stdin pipe)。
|
|
75
|
+
|
|
76
|
+
执行完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一阶段操作。是否调用取决于对话上下文——该提示仅供参考,不具强制性。
|
|
77
|
+
|
|
78
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
79
|
+
|
|
80
|
+
## 参考资料
|
|
81
|
+
|
|
82
|
+
- D-09 — L0 Discipline Substrate always-on
|
|
83
|
+
- D-04 — `gate` 4 级引用由 `judgmentResolver` 预解析
|
|
84
|
+
- D-05 — 阶段级 `invokes_tools` 条件工具触发
|
|
85
|
+
- D-13 — tdd 能力 2 impl 候选别名(superpowers 主 + mattpocock /tdd 备)
|
|
86
|
+
- D-02 — SKILL.md `name:` 裸斜杠命令(`task-test` 而非 `task/test`)per ADR 0030
|
|
87
|
+
- `workflows/judgments/tdd-gate.yaml` triggers.tdd-strongly-suggested
|
|
88
|
+
- `workflows/capabilities.yaml` — tdd(superpowers + mattpocock 别名)+ diagnose 条目
|
|
89
|
+
- `workflows/defaults.yaml` — ralph_max_iterations.task-test.* 值(T3.4.W2.2 followup)
|
|
90
|
+
- `docs/WORKFLOW.md` — 4-stage 工作流 mermaid + Stage ③ Execute 章节
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify
|
|
3
|
+
description: |
|
|
4
|
+
Stage ④ Verify 主控编排器 — 7 个条件子工作流,按打包的 Verify 阶段节奏执行:
|
|
5
|
+
progress 必跑 → code-review 并行 → paranoid 关键模块强制 → qa/security/design 可选
|
|
6
|
+
并行 conditional → simplify 末尾 → multispec 关键发布 Pattern C 4-specialist Agent Team。
|
|
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)。通过 harnessed CLI `harnessed verify --phase <num>` 或
|
|
10
|
+
`harnessed setup` 后的斜杠命令 `/verify`(裸命令,per ADR 0030 命名空间规范 D-02 LOCK)触发。
|
|
11
|
+
trigger_phrases:
|
|
12
|
+
- "verify"
|
|
13
|
+
- "验证阶段"
|
|
14
|
+
- "stage 4 verify"
|
|
15
|
+
- "verify work"
|
|
16
|
+
- "代码审查 + 简化"
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# verify 主控编排器(v3)
|
|
20
|
+
|
|
21
|
+
## 概述
|
|
22
|
+
|
|
23
|
+
4-stage 节奏 Stage ④ 主控编排器,委托给 7 个子工作流
|
|
24
|
+
(打包的 Verify 阶段节奏 — 9 阶段组合压缩为 7 个子委托
|
|
25
|
+
via stage-routing.yaml):
|
|
26
|
+
|
|
27
|
+
| order/mode | sub | gate ref | mode | when fires |
|
|
28
|
+
| ---------- | --- | -------- | ---- | ---------- |
|
|
29
|
+
| 1 (serial) | `progress` | (无条件 — verify 起点) | serial | 当 stage=='verify' 时始终触发 |
|
|
30
|
+
| parallel | `code-review` | (无条件 — multi-agent fan-out) | parallel | 始终触发 |
|
|
31
|
+
| parallel | `paranoid` | `judgments.stage-routing.verify-paranoid-critical.fires` | parallel | phase.is_critical_module == true |
|
|
32
|
+
| parallel | `qa` | `judgments.stage-routing.verify-qa-ui.fires` | parallel | phase.has_ui_changes == true |
|
|
33
|
+
| parallel | `security` | `judgments.stage-routing.verify-security-secrets.fires` | parallel | phase.has_auth_or_secrets == true |
|
|
34
|
+
| parallel | `design` | `judgments.stage-routing.verify-design-changes.fires` | parallel | phase.has_design_changes == true |
|
|
35
|
+
| parallel | `multispec` | `judgments.stage-routing.verify-multispec-critical-release.fires` | parallel | is_critical_release == true(Pattern C 4-specialist Agent Team) |
|
|
36
|
+
| 99 (serial) | `simplify` | (无条件 — 末尾收尾) | serial | 始终触发 — code-simplifier 末尾移除重复 / 多余逻辑 |
|
|
37
|
+
|
|
38
|
+
引擎运行时 per T3.5.W0.1 `runMasterOrchestrator`:
|
|
39
|
+
- **串行链**:progress(order 1)起点 → ... → simplify(order 99)末尾收尾
|
|
40
|
+
- **并行 fan-out**:5 个条件子工作流(code-review + paranoid + qa + security + design + multispec)
|
|
41
|
+
并发启动,按关卡求值结果决定触发或跳过
|
|
42
|
+
- K9 不变量强制执行:每个 serial 模式委托必须携带显式 `order`
|
|
43
|
+
|
|
44
|
+
## Verify 节奏(sister CLAUDE.md「Verify 阶段」原文)
|
|
45
|
+
|
|
46
|
+
1. 子任务完成后立即 `/gsd-verify-work` + `/gsd-progress`(sub progress 起点必跑串行)
|
|
47
|
+
2. 项目 / 大功能整体完成后:
|
|
48
|
+
- 先 `code-review` 多 Agent 并行(sub code-review)
|
|
49
|
+
- **关键模块强制** `/review` Paranoid Staff Engineer(sub paranoid,关卡 is_critical_module)
|
|
50
|
+
- 可选 `/qa`(sub qa,关卡 has_ui_changes)/ `/cso`(sub security,关卡 has_auth_or_secrets)/ `/design-review`(sub design,关卡 has_design_changes)
|
|
51
|
+
- **关键发布 / 大重构 PR** 升级 4-specialist Agent Team Pattern C(sub multispec,关卡 critical-release-upgrade)
|
|
52
|
+
- 再 `code-simplifier` 末尾(sub simplify,serial order 99)
|
|
53
|
+
|
|
54
|
+
## 能力引用
|
|
55
|
+
|
|
56
|
+
Sister `workflows/capabilities.yaml`:
|
|
57
|
+
- `gsd-verify-work` + `gsd-progress` — Bucket 2(progress sub upstream)
|
|
58
|
+
- `code-review` + `code-simplifier` — Bucket 1 mattpocock(code-review + simplify subs)
|
|
59
|
+
- `gstack-review` + `gstack-qa` + `gstack-cso` + `gstack-design-review` — Bucket 3 治理关卡(paranoid/qa/security/design subs)
|
|
60
|
+
- `agent-teams-create` — Bucket 5 agent-platform(multispec Pattern C 4-specialist team)
|
|
61
|
+
- `planning-with-files` — Bucket 4 核心(progress.md sink throughout)
|
|
62
|
+
|
|
63
|
+
## 调用方式说明
|
|
64
|
+
|
|
65
|
+
- 斜杠命令:`/verify`(裸命令,per ADR 0030 命名空间规范 D-02 LOCK,在 `harnessed setup` 后使用)
|
|
66
|
+
|
|
67
|
+
## 如何调用
|
|
68
|
+
|
|
69
|
+
使用 Bash 工具运行:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
echo "$ARGUMENTS" | harnessed run verify --task-stdin
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
若 `$ARGUMENTS` 为空,运行 `harnessed run verify`(不带 stdin pipe)。
|
|
76
|
+
|
|
77
|
+
执行完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一阶段操作。是否调用取决于对话上下文——该提示仅供参考,不具强制性。
|
|
78
|
+
|
|
79
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
80
|
+
|
|
81
|
+
## 参考资料
|
|
82
|
+
|
|
83
|
+
- D-01 主控编排器委托模式
|
|
84
|
+
- D-02 裸斜杠命令约定(ADR 0030 命名空间规范 LOCK)
|
|
85
|
+
- D-12 gstack 治理关卡引用(paranoid / qa / security / design subs)
|
|
86
|
+
- workflows/judgments/parallelism-gate.yaml — Pattern C 多维度审查(multispec sub 4-specialist 互相质询)
|
|
87
|
+
- workflows/judgments/stage-routing.yaml — verify-* 6 触发器(7 sub 委托)
|
|
88
|
+
- workflows/verify/{progress,code-review,paranoid,qa,security,design,simplify,multispec}/workflow.yaml
|
|
89
|
+
— 8 个子工作流 Phase 3.4 SHIPPED
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify-code-review
|
|
3
|
+
description: |
|
|
4
|
+
Stage ④.b verify 子工作流 — code-review 多 agent 并行 fan-out 高置信度 finding
|
|
5
|
+
(subagent 默认路由,per 打包的 parallelism 关卡 — Task / Agent 工具 spawn
|
|
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` 触发。
|
|
11
|
+
trigger_phrases:
|
|
12
|
+
- "verify code review"
|
|
13
|
+
- "代码审查"
|
|
14
|
+
- "multi-agent code review"
|
|
15
|
+
- "并行 review"
|
|
16
|
+
- "跑 verify-code-review"
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# verify-code-review workflow (v3)
|
|
20
|
+
|
|
21
|
+
## 概述
|
|
22
|
+
|
|
23
|
+
单阶段子工作流,将 CLAUDE.md「Verify 阶段 — code-review 多 agent 并行」章节
|
|
24
|
+
映射到 harnessed 运行时(Phase v3.0-3.4 W0.11 — D-04 Stage ④ Verify 7 sub + 子任务并行
|
|
25
|
+
机制 subagent 默认路由机器化 + Pattern A 子工作流发布)。
|
|
26
|
+
|
|
27
|
+
| phase | id | upstream | model | capability | parallelism |
|
|
28
|
+
| ----- | -- | -------- | ----- | ---------- | ----------- |
|
|
29
|
+
| 1 | `01-code-review` | mattpocock-skills | sonnet | `{{ capabilities.code-review.cmd }}` | `judgments.parallelism-gate.subagent-default.fires` |
|
|
30
|
+
|
|
31
|
+
每阶段配置从 `workflows/verify/code-review/workflow.yaml` 加载;引擎以并行 fan-out 方式
|
|
32
|
+
启动多个 subagent(打包的 subagent-default 规则 — Task / Agent
|
|
33
|
+
工具 spawn 多任务并发,context 隔离,summary 折叠回主 context)。
|
|
34
|
+
|
|
35
|
+
## 能力引用
|
|
36
|
+
|
|
37
|
+
Sister `workflows/capabilities.yaml` 条目:
|
|
38
|
+
- `code-review` — Bucket 1 mattpocock 高频招式(impl: mattpocock-skills,cmd: /code-review)
|
|
39
|
+
|
|
40
|
+
## Parallelism 关卡引用
|
|
41
|
+
|
|
42
|
+
Sister `workflows/judgments/parallelism-gate.yaml`:
|
|
43
|
+
- `subagent-default.fires` — `subtask.parallel_count <= 3 and subtask.communication_needed == false`
|
|
44
|
+
(默认 fan-out,focused 任务 research / verify / review 单文件 / 跑测试 / 抓 doc / 探索模块)
|
|
45
|
+
|
|
46
|
+
## 路由规则
|
|
47
|
+
|
|
48
|
+
在 `phase.stage == 'verify'` 触发后,必须先跑串行(verify-progress),之后并行 fan-out。无跳过
|
|
49
|
+
条件 — code-review 多 agent 是 verify-work 第 3 阶段的默认 fan-out(sister CLAUDE.md 原文)。
|
|
50
|
+
|
|
51
|
+
## 如何调用
|
|
52
|
+
|
|
53
|
+
使用 Bash 工具运行:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
echo "$ARGUMENTS" | harnessed run verify-code-review --task-stdin
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
若 `$ARGUMENTS` 为空,运行 `harnessed run verify-code-review`(不带 stdin pipe)。
|
|
60
|
+
|
|
61
|
+
执行完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一阶段操作。是否调用取决于对话上下文——该提示仅供参考,不具强制性。
|
|
62
|
+
|
|
63
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
64
|
+
|
|
65
|
+
## 参考资料
|
|
66
|
+
|
|
67
|
+
- D-04 Stage ④ Verify 7 sub 分解
|
|
68
|
+
- workflows/capabilities.yaml — code-review
|
|
69
|
+
- workflows/judgments/parallelism-gate.yaml — subagent-default.fires
|
|
70
|
+
- workflows/defaults.yaml — ralph_max_iterations.verify-code-review.* 值(W2.2 backfill)
|
|
71
|
+
- workflows/verify-work/workflow.yaml v2 SHIPPED phase 03-code-review-parallel sister verbatim
|