harnessed 3.4.3 → 3.5.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 +3 -0
- package/dist/cli.mjs +1119 -745
- 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 +10 -4
- package/workflows/capabilities.yaml +18 -19
- package/workflows/disciplines/karpathy.yaml +1 -1
- package/workflows/disciplines/language.yaml +1 -1
- package/workflows/disciplines/operational.yaml +2 -2
- package/workflows/disciplines/output-style.yaml +1 -1
- package/workflows/disciplines/priority.yaml +1 -1
- package/workflows/disciplines/protocols.yaml +1 -1
- package/workflows/discuss/auto/SKILL.md +10 -6
- package/workflows/discuss/auto/workflow.yaml +1 -2
- package/workflows/discuss/phase/SKILL.md +11 -30
- package/workflows/discuss/phase/workflow.yaml +1 -1
- package/workflows/discuss/strategic/SKILL.md +12 -33
- package/workflows/discuss/strategic/workflow.yaml +2 -3
- package/workflows/discuss/subtask/SKILL.md +11 -30
- package/workflows/discuss/subtask/workflow.yaml +1 -1
- package/workflows/execute-task/SKILL.md +7 -6
- package/workflows/execute-task/workflow.yaml +93 -0
- package/workflows/judgments/fallback.yaml +1 -1
- package/workflows/judgments/parallelism-gate.yaml +4 -3
- package/workflows/judgments/phase-gate.yaml +2 -2
- package/workflows/judgments/strategic-gate.yaml +2 -2
- package/workflows/judgments/subtask-gate.yaml +2 -2
- package/workflows/judgments/tdd-gate.yaml +2 -2
- package/workflows/judgments/web-design-routing.yaml +1 -1
- package/workflows/judgments/web-search-routing.yaml +1 -1
- package/workflows/judgments/web-testing-routing.yaml +1 -1
- package/workflows/plan/architecture/SKILL.md +13 -34
- package/workflows/plan/architecture/workflow.yaml +2 -2
- package/workflows/plan/auto/SKILL.md +10 -6
- package/workflows/plan/auto/workflow.yaml +1 -2
- package/workflows/plan/phase/SKILL.md +14 -35
- package/workflows/plan/phase/workflow.yaml +3 -3
- package/workflows/plan-feature/SKILL.md +4 -4
- package/workflows/research/SKILL.md +19 -6
- package/workflows/research/workflow.yaml +4 -4
- package/workflows/retro/SKILL.md +13 -32
- package/workflows/retro/workflow.yaml +1 -2
- package/workflows/role-prompts.yaml +4 -3
- package/workflows/task/auto/SKILL.md +11 -7
- package/workflows/task/auto/workflow.yaml +2 -3
- package/workflows/task/clarify/SKILL.md +11 -30
- package/workflows/task/code/SKILL.md +14 -35
- package/workflows/task/code/workflow.yaml +0 -1
- package/workflows/task/deliver/SKILL.md +15 -38
- package/workflows/task/deliver/workflow.yaml +7 -6
- package/workflows/task/test/SKILL.md +11 -32
- package/workflows/task/test/workflow.yaml +1 -2
- package/workflows/verify/auto/SKILL.md +14 -10
- package/workflows/verify/auto/workflow.yaml +4 -5
- package/workflows/verify/code-review/SKILL.md +14 -38
- package/workflows/verify/code-review/workflow.yaml +1 -3
- package/workflows/verify/design/SKILL.md +14 -38
- package/workflows/verify/design/workflow.yaml +4 -5
- package/workflows/verify/multispec/SKILL.md +17 -39
- package/workflows/verify/multispec/workflow.yaml +5 -8
- package/workflows/verify/paranoid/SKILL.md +13 -38
- package/workflows/verify/paranoid/workflow.yaml +1 -2
- package/workflows/verify/progress/SKILL.md +13 -32
- package/workflows/verify/progress/workflow.yaml +0 -1
- package/workflows/verify/qa/SKILL.md +15 -36
- package/workflows/verify/qa/workflow.yaml +1 -2
- package/workflows/verify/security/SKILL.md +12 -35
- package/workflows/verify/security/workflow.yaml +1 -2
- package/workflows/verify/simplify/SKILL.md +13 -34
- package/workflows/verify/simplify/workflow.yaml +1 -2
- package/workflows/verify-work/SKILL.md +5 -7
- package/workflows/verify-work/workflow.yaml +5 -7
- package/workflows/execute-task/phases.yaml +0 -73
|
@@ -22,7 +22,7 @@ trigger_phrases:
|
|
|
22
22
|
## Overview
|
|
23
23
|
|
|
24
24
|
4-stage cadence Stage ③ master orchestrator delegating to 4 sequential sub-workflows
|
|
25
|
-
per subtask (
|
|
25
|
+
per subtask (bundled Execute-stage cadence + karpathy 心法 always-on):
|
|
26
26
|
|
|
27
27
|
| order | sub | gate ref | mode | when fires |
|
|
28
28
|
| ----- | --- | -------- | ---- | ---------- |
|
|
@@ -39,7 +39,7 @@ mode delegate carries explicit `order`。Each subtask 入口走一次此 master
|
|
|
39
39
|
|
|
40
40
|
ralph-loop 是正交 wrapper, 套在 deliver sub 的 01-deliver phase 外层保 completion-promise
|
|
41
41
|
verbatim "COMPLETE" (R20.10)。任何执行单元 (subagent / team / 主 session) 都可外层套 ralph-loop
|
|
42
|
-
保 completion-promise (
|
|
42
|
+
保 completion-promise (bundled subagent vs Agent Teams routing — orthogonal wrapper rule).
|
|
43
43
|
|
|
44
44
|
## Capability refs
|
|
45
45
|
|
|
@@ -57,20 +57,24 @@ Sister `workflows/capabilities.yaml`:
|
|
|
57
57
|
|
|
58
58
|
- Slash command: `/task <text>` (bare per ADR 0030 namespace policy D-02 LOCK after `harnessed setup`)
|
|
59
59
|
|
|
60
|
-
<!-- v3.4.3-dual-path-invocation -->
|
|
61
60
|
## How to invoke
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
Use the Bash tool to run:
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
```bash
|
|
65
|
+
echo "$ARGUMENTS" | harnessed run task --task-stdin
|
|
66
|
+
```
|
|
66
67
|
|
|
67
|
-
|
|
68
|
+
If `$ARGUMENTS` is empty, run `harnessed run task` (no stdin pipe).
|
|
69
|
+
|
|
70
|
+
After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
|
|
71
|
+
|
|
72
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
68
73
|
|
|
69
74
|
## References
|
|
70
75
|
|
|
71
76
|
- D-01 master orchestrator delegation pattern
|
|
72
77
|
- D-02 bare slash cmd convention (ADR 0030 namespace policy LOCK)
|
|
73
78
|
- D-10 ralph-loop orthogonal wrapper
|
|
74
|
-
- ~/.claude/CLAUDE.md "Execute 阶段" 节 verbatim (karpathy 心法 + mattpocock 招式 + ralph-loop COMPLETE)
|
|
75
79
|
- workflows/judgments/{subtask-gate,tdd-gate}.yaml — brainstorming + tdd-strongly-suggested triggers
|
|
76
80
|
- workflows/task/{clarify,code,test,deliver}/workflow.yaml — 4 sub-workflow Phase 3.4 SHIPPED
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
# workflows/task/auto/workflow.yaml — Phase v3.0-3.5 W1 T3.5.W1.3
|
|
2
2
|
#
|
|
3
3
|
# Stage ③ Task master orchestrator — 串行 invoke 4 sub per subtask (clarify → code → test → deliver)
|
|
4
|
-
# per
|
|
4
|
+
# per bundled Execute-stage cadence + RESEARCH-workflows § Area 2。
|
|
5
5
|
# ralph-loop COMPLETE wrapper 在 deliver phase 内 (D-10 orthogonal wrapper not master concern)。
|
|
6
6
|
# tdd-gate conditional fire on test sub (sister task/test/workflow.yaml gate
|
|
7
7
|
# judgments.tdd-gate.tdd-strongly-suggested.fires)。
|
|
8
8
|
#
|
|
9
9
|
# Sister refs:
|
|
10
|
-
# - ~/.claude/CLAUDE.md "Execute 阶段 (GSD orchestration + superpowers 子任务执行)" 节
|
|
11
10
|
# - workflows/judgments/subtask-gate.yaml — brainstorming trigger (clarify)
|
|
12
11
|
# - workflows/judgments/tdd-gate.yaml — tdd-strongly-suggested trigger (test conditional)
|
|
13
12
|
# - workflows/task/{clarify,code,test,deliver}/workflow.yaml — 4 sub-workflow Phase 3.4 SHIPPED
|
|
@@ -27,7 +26,7 @@ description: |
|
|
|
27
26
|
Stage ③ Task master orchestrator — 串行 invoke 4 sub per subtask (clarify → code → test → deliver);
|
|
28
27
|
ralph-loop COMPLETE wrapper 在 deliver phase 内 (D-10 orthogonal wrapper not master concern)。
|
|
29
28
|
tdd-gate conditional fire on test sub (核心业务 / 算法 / 数据处理 / 回归 risk high / reliability
|
|
30
|
-
required, 6 fires_when OR-chain
|
|
29
|
+
required, 6 fires_when OR-chain; bundled tdd-gate judgment)。execute-task 每个 subtask 入口走一次。
|
|
31
30
|
|
|
32
31
|
disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]
|
|
33
32
|
tools_available:
|
|
@@ -54,37 +54,19 @@ sister CLAUDE.md "Discuss / Research 阶段" mattpocock 招式按需召唤 patte
|
|
|
54
54
|
unconditional fire (D-05 invokes_tools 与 OnClause 并存, 但作用面不同 — invokes_tools
|
|
55
55
|
phase-level conditional tool fire NOT 决定 phase 是否走)。
|
|
56
56
|
|
|
57
|
-
<!-- v3.4.3-dual-path-invocation -->
|
|
58
57
|
## How to invoke
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
> 1. Read the subtask description; restate it in your own words to confirm
|
|
72
|
-
>
|
|
73
|
-
> 2. List every assumption you would make; flag the ones the user must confirm
|
|
74
|
-
>
|
|
75
|
-
> 3. Ask ONE question at a time, lowest-cost-to-answer first
|
|
76
|
-
>
|
|
77
|
-
> 4. Stop asking when you have enough to write 80% of the code without guessing
|
|
78
|
-
>
|
|
79
|
-
> 5. Record the resolved spec at the top of the subtask file before implementing
|
|
80
|
-
>
|
|
81
|
-
> 6. If `phase.spec_ambiguous == true AND phase.no_docs == true`, request grill-me
|
|
82
|
-
>
|
|
83
|
-
> **Output format**: structured report with severity-classified findings (blocking-question / nice-to-know / resolved). One finding per line: `[severity] file:line — problem (one sentence); fix: suggested change`. If no findings, say so explicitly. No preamble, no end-of-report summary.
|
|
84
|
-
|
|
85
|
-
(Role prompt is self-contained — works even when the upstream `superpowers-brainstorming` user-skill / plugin isn't installed.)
|
|
86
|
-
|
|
87
|
-
(Sister `~/.claude/commands/task-clarify.md` is also generated by `harnessed setup` so `/task-clarify` is a real platform slash command — both files carry the same dual-path instruction. Previous v3.4.x `harnessed task-clarify --apply` CLI claims are removed; that subcommand was never implemented.)
|
|
59
|
+
Use the Bash tool to run:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
echo "$ARGUMENTS" | harnessed run task-clarify --task-stdin
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If `$ARGUMENTS` is empty, run `harnessed run task-clarify` (no stdin pipe).
|
|
66
|
+
|
|
67
|
+
After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
|
|
68
|
+
|
|
69
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
88
70
|
|
|
89
71
|
## References
|
|
90
72
|
|
|
@@ -92,7 +74,6 @@ phase-level conditional tool fire NOT 决定 phase 是否走)。
|
|
|
92
74
|
- D-05 — phase-level `invokes_tools` conditional tool fire
|
|
93
75
|
- D-04 — `gate` 4-level ref pre-resolved by `judgmentResolver`
|
|
94
76
|
- D-02 — SKILL.md `name:` bare slash cmd (`task-clarify` NOT `task/clarify`) per ADR 0030
|
|
95
|
-
- ~/.claude/CLAUDE.md "Execute 阶段" 节 brainstorming 子任务层判据
|
|
96
77
|
- `workflows/judgments/subtask-gate.yaml` triggers.brainstorming
|
|
97
78
|
- `workflows/capabilities.yaml` — superpowers-brainstorming + grill-with-docs entries
|
|
98
79
|
- `workflows/defaults.yaml` — ralph_max_iterations.task-clarify.* values (T3.4.W2.2 followup)
|
|
@@ -56,43 +56,23 @@ Phase 01-code 按 phase fact context 条件性 fire 3 mattpocock 招式:
|
|
|
56
56
|
|
|
57
57
|
02-progress invokes the **Claude Code plugin** slash command `/plan` to update
|
|
58
58
|
`progress.md` in `.planning/<phase-id>/` — 跟踪 subtask 完成 / blocked / next step
|
|
59
|
-
per
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
per bundled "跨 session 恢复" 模式 + R20.6 Manus-style 持久化. Requires the
|
|
60
|
+
`planning-with-files` Claude Code plugin (install via Claude Code plugin
|
|
61
|
+
marketplace).
|
|
62
62
|
|
|
63
|
-
<!-- v3.4.3-dual-path-invocation -->
|
|
64
63
|
## How to invoke
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
> 1. Before any edit: read the file you intend to change end-to-end
|
|
78
|
-
>
|
|
79
|
-
> 2. Smallest change that satisfies the acceptance criteria — no scope creep
|
|
80
|
-
>
|
|
81
|
-
> 3. ≤200 LOC per file (split modules if growing past it)
|
|
82
|
-
>
|
|
83
|
-
> 4. Trust internal code: don't re-validate already-checked inputs at every layer
|
|
84
|
-
>
|
|
85
|
-
> 5. No speculative abstractions (no 'just in case' generics)
|
|
86
|
-
>
|
|
87
|
-
> 6. Edit with surgical precision: full path, exact selectors, no broad rewrites
|
|
88
|
-
>
|
|
89
|
-
> 7. Update progress.md before declaring done (planning-with-files `/plan`)
|
|
90
|
-
>
|
|
91
|
-
> **Output format**: structured report with severity-classified findings (needs-fix / done / blocked). One finding per line: `[severity] file:line — problem (one sentence); fix: suggested change`. If no findings, say so explicitly. No preamble, no end-of-report summary.
|
|
92
|
-
|
|
93
|
-
(Role prompt is self-contained — works even when the upstream `planning-with-files` user-skill / plugin isn't installed.)
|
|
94
|
-
|
|
95
|
-
(Sister `~/.claude/commands/task-code.md` is also generated by `harnessed setup` so `/task-code` is a real platform slash command — both files carry the same dual-path instruction. Previous v3.4.x `harnessed task-code --apply` CLI claims are removed; that subcommand was never implemented.)
|
|
65
|
+
Use the Bash tool to run:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
echo "$ARGUMENTS" | harnessed run task-code --task-stdin
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
If `$ARGUMENTS` is empty, run `harnessed run task-code` (no stdin pipe).
|
|
72
|
+
|
|
73
|
+
After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
|
|
74
|
+
|
|
75
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
96
76
|
|
|
97
77
|
## References
|
|
98
78
|
|
|
@@ -100,7 +80,6 @@ verified at `~/.claude/plugins/cache/planning-with-files/planning-with-files/2.3
|
|
|
100
80
|
- D-05 — phase-level `invokes_tools` conditional tool fire
|
|
101
81
|
- D-15 + Q-AUDIT-5a — planning-with-files = Claude Code plugin slash cmd `/plan`
|
|
102
82
|
- D-02 — SKILL.md `name:` bare slash cmd (`task-code` NOT `task/code`) per ADR 0030
|
|
103
|
-
- ~/.claude/CLAUDE.md "Execute 阶段" 节 karpathy 心法 + mattpocock 招式按需召唤
|
|
104
83
|
- `workflows/disciplines/karpathy.yaml` — 4 心法 + ≤200L hard limit 等 rules (L0 substrate)
|
|
105
84
|
- `workflows/capabilities.yaml` — zoom-out / improve-codebase-architecture / diagnose / planning-with-files entries
|
|
106
85
|
- `workflows/defaults.yaml` — ralph_max_iterations.task-code.* values (T3.4.W2.2 followup)
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
#
|
|
9
9
|
# Sister refs:
|
|
10
10
|
# - .planning/phase-v3.0-3.2/RESEARCH-workflows.md § Area 2 task/code sub yaml example
|
|
11
|
-
# - ~/.claude/CLAUDE.md "Execute 阶段" 节 karpathy 4 心法 + mattpocock 招式按需召唤
|
|
12
11
|
# - workflows/capabilities.yaml zoom-out + improve-codebase-architecture + diagnose +
|
|
13
12
|
# planning-with-files (Phase 2.3 W0.1 SHIPPED)
|
|
14
13
|
# - workflows/disciplines/karpathy.yaml (Phase 3.3 W0.4 SHIPPED, L0 substrate always-on)
|
|
@@ -41,7 +41,7 @@ spawns each phase as a sub-agent via `@anthropic-ai/claude-agent-sdk` 0.3.142+.
|
|
|
41
41
|
ralph-loop SDK wrapper 保 completion-promise verbatim string `"COMPLETE"` — sub-task
|
|
42
42
|
被认为完成的判据是子任务输出包含 verbatim "COMPLETE" string (NOT 启发式 / NOT
|
|
43
43
|
LLM-as-judge). Sister capabilities.yaml `ralph-loop` entry impl `bundled-skill` +
|
|
44
|
-
`sdk_ref: src/
|
|
44
|
+
`sdk_ref: src/workflow/lib/ralphLoop.ts` (Phase 2.2 v0.2.0 ship)。
|
|
45
45
|
|
|
46
46
|
### Parallelism — ralph-loop 正交 wrapper
|
|
47
47
|
|
|
@@ -79,55 +79,32 @@ ref / ✅ R20.10 explicit max_iterations_exceeded handler。
|
|
|
79
79
|
|
|
80
80
|
02-progress-mark invokes Claude Code plugin slash cmd `/plan` to mark subtask complete
|
|
81
81
|
in `progress.md` — sister Phase 01-code progress update pattern, last call in Stage
|
|
82
|
-
③ task chain
|
|
83
|
-
|
|
82
|
+
③ task chain. Requires `planning-with-files` Claude Code plugin (install via
|
|
83
|
+
Claude Code plugin marketplace).
|
|
84
84
|
|
|
85
|
-
<!-- v3.4.3-dual-path-invocation -->
|
|
86
85
|
## How to invoke
|
|
87
86
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
> 1. Confirm subtask acceptance criteria are explicit and verifiable BEFORE looping
|
|
100
|
-
>
|
|
101
|
-
> 2. Set `max_iterations` based on subtask size; default 20
|
|
102
|
-
>
|
|
103
|
-
> 3. On loop entry, give the agent the full spec + acceptance criteria + completion promise
|
|
104
|
-
>
|
|
105
|
-
> 4. If agent emits 'COMPLETE' verbatim, mark progress.md done via `/plan`
|
|
106
|
-
>
|
|
107
|
-
> 5. If max_iterations exceeded, emit warning + halt; do NOT silent-continue
|
|
108
|
-
>
|
|
109
|
-
> 6. If teammate communication needed / context overflow → escalate to Agent Teams
|
|
110
|
-
>
|
|
111
|
-
> 7. Cleanup: SendMessage shutdown_request + TeamDelete (防呆清单 mandatory)
|
|
112
|
-
>
|
|
113
|
-
> **Output format**: structured report with severity-classified findings (complete / max-iter-exceeded / escalated-to-teams). One finding per line: `[severity] file:line — problem (one sentence); fix: suggested change`. If no findings, say so explicitly. No preamble, no end-of-report summary.
|
|
114
|
-
|
|
115
|
-
(Role prompt is self-contained — works even when the upstream `ralph-loop` user-skill / plugin isn't installed.)
|
|
116
|
-
|
|
117
|
-
(Sister `~/.claude/commands/task-deliver.md` is also generated by `harnessed setup` so `/task-deliver` is a real platform slash command — both files carry the same dual-path instruction. Previous v3.4.x `harnessed task-deliver --apply` CLI claims are removed; that subcommand was never implemented.)
|
|
87
|
+
Use the Bash tool to run:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
echo "$ARGUMENTS" | harnessed run task-deliver --task-stdin
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If `$ARGUMENTS` is empty, run `harnessed run task-deliver` (no stdin pipe).
|
|
94
|
+
|
|
95
|
+
After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
|
|
96
|
+
|
|
97
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
118
98
|
|
|
119
99
|
## References
|
|
120
100
|
|
|
121
101
|
- D-09 — L0 Discipline Substrate always-on (6 disciplines)
|
|
122
102
|
- D-10 — ralph-loop 真接 SDK wrapper (NOT mock reference; v0.2.0 ship)
|
|
123
|
-
- D-11 — Agent Teams 升级 5 触发 OR-chain per
|
|
103
|
+
- D-11 — Agent Teams 升级 5 触发 OR-chain per bundled parallelism-gate rules
|
|
124
104
|
- R20.10 — ralph-loop max_iterations_exceeded explicit emit_warning_and_halt
|
|
125
105
|
(acceptance c "NOT silent abort"); ralph-loop 正交 wrapper wraps 3 mode
|
|
126
106
|
- D-02 — SKILL.md `name:` bare slash cmd (`task-deliver` NOT `task/deliver`) per ADR 0030
|
|
127
107
|
- ADR 0011 — SDK + ralph-loop integration v0.2.0 baseline
|
|
128
|
-
- ~/.claude/CLAUDE.md "Execute 阶段" 节 ralph-loop 至 verbatim COMPLETE +
|
|
129
|
-
`子任务并行执行机制` Agent Teams 升级路由
|
|
130
|
-
- ~/.claude/rules/agent-teams.md — Pattern A/B/C + 防呆清单 cleanup mandatory
|
|
131
108
|
- `workflows/judgments/parallelism-gate.yaml` triggers.ralph-loop-wrapper +
|
|
132
109
|
agent-teams-upgrade + subagent-default + main-session-fallback
|
|
133
110
|
- `workflows/capabilities.yaml` — ralph-loop + agent-teams-{create,send-message,shutdown}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
#
|
|
4
4
|
# Stage ③.d 子任务交付 — ralph-loop COMPLETE wrapper 保 completion-promise verbatim
|
|
5
5
|
# "COMPLETE" (R20.10 + D-10 v0.2.0 ralph-loop SDK pattern)。Parallelism: subagent
|
|
6
|
-
# default fan-out OR Agent Teams 升级 (5 触发 OR-chain per
|
|
7
|
-
# + D-11)。02-progress-mark: planning-with-files /plan 更新 progress.md 标记完成。
|
|
6
|
+
# default fan-out OR Agent Teams 升级 (5 触发 OR-chain per bundled Agent Teams
|
|
7
|
+
# routing + D-11)。02-progress-mark: planning-with-files /plan 更新 progress.md 标记完成。
|
|
8
8
|
#
|
|
9
9
|
# Brief enforcement (W0.9 spec MUST include):
|
|
10
10
|
# - ralph-loop completion_promise = COMPLETE (R20.10 verbatim acceptance string)
|
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
# - workflows/judgments/parallelism-gate.yaml triggers.ralph-loop-wrapper (Phase 2.3 W0.2 SHIPPED)
|
|
21
21
|
# - workflows/capabilities.yaml ralph-loop + agent-teams-{create,send-message,shutdown} +
|
|
22
22
|
# planning-with-files (Phase 2.3 W0.1 + 3.3 W0.2 SHIPPED)
|
|
23
|
-
# -
|
|
24
|
-
#
|
|
23
|
+
# - workflows/judgments/parallelism-gate.yaml — 5 升级触发 OR-chain
|
|
24
|
+
# (teammate_send_message_needed / subagent_context_overflow / shared_task_list /
|
|
25
|
+
# opposing_hypothesis_debate / fullstack_three_way)
|
|
25
26
|
# - src/workflow/schema/workflow.ts WorkflowSchemaV3 FallbackMaxIterationsExceeded
|
|
26
27
|
# Type.Literal('emit_warning_and_halt') (Phase 3.3 W0.5 SHIPPED)
|
|
27
28
|
#
|
|
@@ -33,11 +34,11 @@ workflow: task-deliver
|
|
|
33
34
|
description: |
|
|
34
35
|
Stage ③.d 子任务交付 — ralph-loop COMPLETE wrapper 保 completion-promise verbatim
|
|
35
36
|
"COMPLETE" (R20.10 + D-10 v0.2.0 ralph-loop SDK pattern)。Parallelism subagent
|
|
36
|
-
default fan-out OR Agent Teams 升级 (5 触发 OR-chain per
|
|
37
|
+
default fan-out OR Agent Teams 升级 (5 触发 OR-chain per bundled Agent Teams routing
|
|
37
38
|
+ D-11)。R20.10 explicit max_iterations_exceeded handler: emit_warning_and_halt
|
|
38
39
|
exit_code 1 (NOT silent abort, sister Phase 2.4 W1.2 fallbackHandlers.ts engine.ts
|
|
39
40
|
wire pattern)。Cleanup mandatory when Agent Teams escalation path fires (shutdown_request
|
|
40
|
-
+ TeamDelete per
|
|
41
|
+
+ TeamDelete per bundled Agent Teams cleanup discipline)。
|
|
41
42
|
|
|
42
43
|
disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]
|
|
43
44
|
tools_available:
|
|
@@ -63,39 +63,19 @@ Phase 01-test 条件性 fire `diagnose` (capabilities.yaml L55-64 mattpocock-ski
|
|
|
63
63
|
test fail 时进入 diagnose loop (reproduce → minimise → hypothesise → instrument →
|
|
64
64
|
fix → regression-test), 测试通过则 skip diagnose entirely。
|
|
65
65
|
|
|
66
|
-
<!-- v3.4.3-dual-path-invocation -->
|
|
67
66
|
## How to invoke
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
> 1. Red: write ONE failing test for the smallest behavior increment; run, watch it fail
|
|
81
|
-
>
|
|
82
|
-
> 2. Green: write the minimum code that makes it pass — nothing more
|
|
83
|
-
>
|
|
84
|
-
> 3. Refactor: clean up duplication / clarify names — keep tests green
|
|
85
|
-
>
|
|
86
|
-
> 4. Loop. Each cycle ≤10 min; if longer, the increment is too big — split
|
|
87
|
-
>
|
|
88
|
-
> 5. Negative cases matter: at least 1 test per error / edge / boundary
|
|
89
|
-
>
|
|
90
|
-
> 6. Test name = expected behavior, not 'test1', not 'should work'
|
|
91
|
-
>
|
|
92
|
-
> 7. On unexpected failure: stop adding tests; route to `/diagnose` for root cause
|
|
93
|
-
>
|
|
94
|
-
> **Output format**: structured report with severity-classified findings (red / green / refactored / blocked). One finding per line: `[severity] file:line — problem (one sentence); fix: suggested change`. If no findings, say so explicitly. No preamble, no end-of-report summary.
|
|
95
|
-
|
|
96
|
-
(Role prompt is self-contained — works even when the upstream `tdd` user-skill / plugin isn't installed.)
|
|
97
|
-
|
|
98
|
-
(Sister `~/.claude/commands/task-test.md` is also generated by `harnessed setup` so `/task-test` is a real platform slash command — both files carry the same dual-path instruction. Previous v3.4.x `harnessed task-test --apply` CLI claims are removed; that subcommand was never implemented.)
|
|
68
|
+
Use the Bash tool to run:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
echo "$ARGUMENTS" | harnessed run task-test --task-stdin
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
If `$ARGUMENTS` is empty, run `harnessed run task-test` (no stdin pipe).
|
|
75
|
+
|
|
76
|
+
After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
|
|
77
|
+
|
|
78
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
99
79
|
|
|
100
80
|
## References
|
|
101
81
|
|
|
@@ -104,7 +84,6 @@ fix → regression-test), 测试通过则 skip diagnose entirely。
|
|
|
104
84
|
- D-05 — phase-level `invokes_tools` conditional tool fire
|
|
105
85
|
- D-13 — tdd capability 2 impl 候选 alias (superpowers 主 + mattpocock /tdd 备)
|
|
106
86
|
- D-02 — SKILL.md `name:` bare slash cmd (`task-test` NOT `task/test`) per ADR 0030
|
|
107
|
-
- ~/.claude/CLAUDE.md "Execute 阶段" TDD 强烈建议开启 6 触发 + 3 跳过
|
|
108
87
|
- `workflows/judgments/tdd-gate.yaml` triggers.tdd-strongly-suggested
|
|
109
88
|
- `workflows/capabilities.yaml` — tdd (superpowers + mattpocock alias) + diagnose entries
|
|
110
89
|
- `workflows/defaults.yaml` — ralph_max_iterations.task-test.* values (T3.4.W2.2 followup)
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
# - .planning/phase-v3.0-3.2/RESEARCH-workflows.md § Area 2 task/test sub yaml example
|
|
10
10
|
# - workflows/judgments/tdd-gate.yaml triggers.tdd-strongly-suggested (Phase 2.3 W0.2 SHIPPED)
|
|
11
11
|
# - workflows/capabilities.yaml tdd + diagnose (Phase 2.3 W0.1 SHIPPED + D-13 alias)
|
|
12
|
-
# - ~/.claude/CLAUDE.md "Execute 阶段" 节 TDD 强烈建议开启 6 触发 + 3 跳过
|
|
13
12
|
# - src/workflow/schema/workflow.ts WorkflowSchemaV3 (Phase 3.3 W0.5 SHIPPED)
|
|
14
13
|
#
|
|
15
14
|
# Brief enforcement:
|
|
@@ -24,7 +23,7 @@ workflow: task-test
|
|
|
24
23
|
description: |
|
|
25
24
|
Stage ③.c 子任务测试 — superpowers TDD red-green-refactor 强制 (核心业务 / 算法 /
|
|
26
25
|
数据处理 / 回归 risk high / reliability required, 6 fires_when OR-chain per
|
|
27
|
-
|
|
26
|
+
bundled tdd-gate judgment), 其他可选 mattpocock /tdd alias。Conditional diagnose
|
|
28
27
|
invoke when test_fail (D-05 invokes_tools phase-level fire). Gate:
|
|
29
28
|
judgments.tdd-gate.tdd-strongly-suggested.fires (4-level ref, pre-resolved per D-04)。
|
|
30
29
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verify
|
|
3
3
|
description: |
|
|
4
|
-
Stage ④ Verify master orchestrator — 7 sub conditional per
|
|
5
|
-
|
|
4
|
+
Stage ④ Verify master orchestrator — 7 sub conditional per bundled Verify-stage cadence:
|
|
5
|
+
progress 必跑 → code-review 并行 → paranoid 关键模块强制 → qa/security/design 可选
|
|
6
6
|
并行 conditional → simplify 末尾 → multispec 关键发布 Pattern C 4-specialist Agent Team。
|
|
7
7
|
schema_version: harnessed.workflow.v3 with delegates_to (7 sub: progress serial order 1 +
|
|
8
8
|
5 parallel conditional + simplify serial order 99) + disciplines_applied (6 default) +
|
|
@@ -21,8 +21,8 @@ trigger_phrases:
|
|
|
21
21
|
## Overview
|
|
22
22
|
|
|
23
23
|
4-stage cadence Stage ④ master orchestrator delegating to 7 sub-workflows
|
|
24
|
-
(
|
|
25
|
-
|
|
24
|
+
(bundled Verify-stage cadence — 9-phase composition compressed into 7 sub delegation
|
|
25
|
+
via stage-routing.yaml):
|
|
26
26
|
|
|
27
27
|
| order/mode | sub | gate ref | mode | when fires |
|
|
28
28
|
| ---------- | --- | -------- | ---- | ---------- |
|
|
@@ -64,22 +64,26 @@ Sister `workflows/capabilities.yaml`:
|
|
|
64
64
|
|
|
65
65
|
- Slash command: `/verify` (bare per ADR 0030 namespace policy D-02 LOCK after `harnessed setup`)
|
|
66
66
|
|
|
67
|
-
<!-- v3.4.3-dual-path-invocation -->
|
|
68
67
|
## How to invoke
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
Use the Bash tool to run:
|
|
71
70
|
|
|
72
|
-
|
|
71
|
+
```bash
|
|
72
|
+
echo "$ARGUMENTS" | harnessed run verify --task-stdin
|
|
73
|
+
```
|
|
73
74
|
|
|
74
|
-
|
|
75
|
+
If `$ARGUMENTS` is empty, run `harnessed run verify` (no stdin pipe).
|
|
76
|
+
|
|
77
|
+
After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
|
|
78
|
+
|
|
79
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
75
80
|
|
|
76
81
|
## References
|
|
77
82
|
|
|
78
83
|
- D-01 master orchestrator delegation pattern
|
|
79
84
|
- D-02 bare slash cmd convention (ADR 0030 namespace policy LOCK)
|
|
80
85
|
- D-12 gstack 治理关卡 ref (paranoid / qa / security / design subs)
|
|
81
|
-
-
|
|
82
|
-
- ~/.claude/rules/agent-teams.md Pattern C 多维度审查 (multispec sub 4-specialist 互相质询)
|
|
86
|
+
- workflows/judgments/parallelism-gate.yaml — Pattern C 多维度审查 (multispec sub 4-specialist 互相质询)
|
|
83
87
|
- workflows/judgments/stage-routing.yaml — verify-* 6 triggers (7 sub delegation)
|
|
84
88
|
- workflows/verify/{progress,code-review,paranoid,qa,security,design,simplify,multispec}/workflow.yaml
|
|
85
89
|
— 8 sub-workflow Phase 3.4 SHIPPED
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# workflows/verify/auto/workflow.yaml — Phase v3.0-3.5 W1 T3.5.W1.4
|
|
2
2
|
#
|
|
3
|
-
# Stage ④ Verify master orchestrator — 7 sub conditional per
|
|
4
|
-
#
|
|
3
|
+
# Stage ④ Verify master orchestrator — 7 sub conditional per bundled Verify-stage cadence
|
|
4
|
+
# + RESEARCH-workflows § Area 2 verify master:
|
|
5
5
|
# progress 必跑 (serial order 1) →
|
|
6
6
|
# code-review 并行 (parallel) +
|
|
7
7
|
# paranoid 关键模块 (parallel + gate is-critical-module) +
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# multispec 关键发布 Pattern C (parallel + gate critical-release-upgrade)
|
|
11
11
|
#
|
|
12
12
|
# Sister refs:
|
|
13
|
-
# - ~/.claude/CLAUDE.md "Verify 阶段 (GSD + gstack)" 节 verbatim
|
|
14
13
|
# - workflows/judgments/stage-routing.yaml — verify-* triggers (7 sub delegation)
|
|
15
14
|
# - workflows/judgments/parallelism-gate.yaml — agent-teams-upgrade trigger (multispec gate)
|
|
16
15
|
# - workflows/verify/{progress,code-review,paranoid,qa,security,design,simplify,multispec}/workflow.yaml
|
|
@@ -30,8 +29,8 @@
|
|
|
30
29
|
schema_version: harnessed.workflow.v3
|
|
31
30
|
workflow: verify
|
|
32
31
|
description: |
|
|
33
|
-
Stage ④ Verify master orchestrator — 7 sub conditional per
|
|
34
|
-
|
|
32
|
+
Stage ④ Verify master orchestrator — 7 sub conditional per bundled Verify-stage cadence:
|
|
33
|
+
progress 必跑串行 → code-review 并行 → paranoid 关键模块强制 → qa/security/design
|
|
35
34
|
可选 conditional 并行 → simplify 末尾串行 → multispec 关键发布 Pattern C 4-specialist Agent Team。
|
|
36
35
|
serial mode 必带 explicit order (K9 invariant); progress order 1 起点, simplify order 99 末尾。
|
|
37
36
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: verify-code-review
|
|
3
3
|
description: |
|
|
4
4
|
Stage ④.b verify sub-workflow — code-review 多 agent 并行 fan-out 高置信度 finding
|
|
5
|
-
(subagent default per
|
|
5
|
+
(subagent default per bundled parallelism gate — Task / Agent 工具 spawn
|
|
6
6
|
多 subagent fan-out, context 隔离, token 敏感)。
|
|
7
7
|
schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
|
|
8
8
|
(code-review) + 1 phase (parallelism ref judgments.parallelism-gate.subagent-default.fires)。
|
|
@@ -29,8 +29,8 @@ onto harnessed runtime (Phase v3.0-3.4 W0.11 — D-04 Stage ④ Verify 7 sub +
|
|
|
29
29
|
| 1 | `01-code-review` | mattpocock-skills | sonnet | `{{ capabilities.code-review.cmd }}` | `judgments.parallelism-gate.subagent-default.fires` |
|
|
30
30
|
|
|
31
31
|
Per-phase config loads from `workflows/verify/code-review/workflow.yaml`; engine spawns
|
|
32
|
-
multiple subagent in parallel fan-out (
|
|
33
|
-
|
|
32
|
+
multiple subagent in parallel fan-out (bundled subagent-default rule — Task / Agent
|
|
33
|
+
工具 spawn 多任务并发, context 隔离, summary 折叠回主 context)。
|
|
34
34
|
|
|
35
35
|
## Capability refs
|
|
36
36
|
|
|
@@ -48,47 +48,23 @@ Sister `workflows/judgments/parallelism-gate.yaml`:
|
|
|
48
48
|
总 fire 当 `phase.stage == 'verify'` 后必跑串行 (verify-progress) 之后并行 fan-out。无 skip
|
|
49
49
|
条件 — code-review 多 agent 是 verify-work 第 3 phase 默认 fan-out (sister CLAUDE.md verbatim)。
|
|
50
50
|
|
|
51
|
-
<!-- v3.4.3-dual-path-invocation -->
|
|
52
51
|
## How to invoke
|
|
53
52
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
> 1. Read the diff against the base branch — full diff, not just summaries
|
|
66
|
-
>
|
|
67
|
-
> 2. Audit against CLAUDE.md (root + any directory-level CLAUDE.md)
|
|
68
|
-
>
|
|
69
|
-
> 3. Shallow scan for obvious bugs in changed lines (avoid context expansion)
|
|
70
|
-
>
|
|
71
|
-
> 4. Git blame on modified regions — bugs visible only in historical context
|
|
72
|
-
>
|
|
73
|
-
> 5. Previous PRs touching same files — recurring patterns / past comments
|
|
74
|
-
>
|
|
75
|
-
> 6. Inline code comments / docstrings — does the change violate stated invariants?
|
|
76
|
-
>
|
|
77
|
-
> 7. Score each finding 0-100; drop <80; cite file:line for kept findings
|
|
78
|
-
>
|
|
79
|
-
> 8. Avoid: pre-existing issues, linter-catchable nits, lines user did not modify
|
|
80
|
-
>
|
|
81
|
-
> **Output format**: structured report with severity-classified findings (critical / high / medium (only findings ≥80 confidence are reported)). One finding per line: `[severity] file:line — problem (one sentence); fix: suggested change`. If no findings, say so explicitly. No preamble, no end-of-report summary.
|
|
82
|
-
|
|
83
|
-
(Role prompt is self-contained — works even when the upstream `code-review` user-skill / plugin isn't installed.)
|
|
84
|
-
|
|
85
|
-
(Sister `~/.claude/commands/verify-code-review.md` is also generated by `harnessed setup` so `/verify-code-review` is a real platform slash command — both files carry the same dual-path instruction. Previous v3.4.x `harnessed verify-code-review --apply` CLI claims are removed; that subcommand was never implemented.)
|
|
53
|
+
Use the Bash tool to run:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
echo "$ARGUMENTS" | harnessed run verify-code-review --task-stdin
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If `$ARGUMENTS` is empty, run `harnessed run verify-code-review` (no stdin pipe).
|
|
60
|
+
|
|
61
|
+
After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
|
|
62
|
+
|
|
63
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
86
64
|
|
|
87
65
|
## References
|
|
88
66
|
|
|
89
67
|
- D-04 Stage ④ Verify 7 sub 分解
|
|
90
|
-
- ~/.claude/CLAUDE.md "Verify 阶段 — code-review 多 agent 并行" verbatim
|
|
91
|
-
- ~/.claude/CLAUDE.md "子任务并行执行机制 — subagent vs Agent Teams 路由" subagent default
|
|
92
68
|
- workflows/capabilities.yaml — code-review
|
|
93
69
|
- workflows/judgments/parallelism-gate.yaml — subagent-default.fires
|
|
94
70
|
- workflows/defaults.yaml — ralph_max_iterations.verify-code-review.* values (W2.2 backfill)
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# workflows/verify/code-review/workflow.yaml — Phase v3.0-3.4 W0 T3.4.W0.11
|
|
2
2
|
#
|
|
3
3
|
# Stage ④.b verify sub-workflow — code-review 多 agent 并行 fan-out 高置信度 finding
|
|
4
|
-
# (subagent default per
|
|
4
|
+
# (subagent default per bundled parallelism gate — Task / Agent 工具 spawn 多任务 fan-out,
|
|
5
5
|
# context 隔离, token 敏感)。
|
|
6
6
|
#
|
|
7
7
|
# Sister refs:
|
|
8
|
-
# - ~/.claude/CLAUDE.md "Verify 阶段" — "code-review 多 agent 并行" 章节
|
|
9
|
-
# - ~/.claude/CLAUDE.md "子任务并行执行机制 — subagent vs Agent Teams 路由" subagent default
|
|
10
8
|
# - workflows/judgments/parallelism-gate.yaml — subagent-default.fires 默认 fan-out
|
|
11
9
|
# - workflows/capabilities.yaml — code-review (Bucket 1 mattpocock 高频招式)
|
|
12
10
|
# - workflows/verify-work/workflow.yaml v2 SHIPPED phase 03-code-review-parallel sister pattern
|