create-harness-vibe-coding 0.8.6 → 0.8.8
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-CN.md +157 -105
- package/README.md +160 -244
- package/bin/create-harness-vibe-coding.js +2 -2
- package/docs/images/harness-architecture-light.png +0 -0
- package/docs/images/harness-architecture.drawio +164 -0
- package/package.json +46 -44
- package/src/generator.js +30 -11
- package/src/index.js +143 -14
- package/src/prompts.js +37 -37
- package/templates/common/.claude/agents/architect-manager.md +45 -45
- package/templates/common/.claude/agents/context-master.md +75 -75
- package/templates/common/.claude/agents/debugger.md +41 -41
- package/templates/common/.claude/agents/explore-manager.md +41 -41
- package/templates/common/.claude/agents/implement-manager.md +49 -49
- package/templates/common/.claude/agents/implementer.md +40 -40
- package/templates/common/.claude/agents/memory-master.md +64 -64
- package/templates/common/.claude/agents/planner.md +34 -34
- package/templates/common/.claude/agents/reflector.md +35 -0
- package/templates/common/.claude/agents/researcher.md +41 -41
- package/templates/common/.claude/agents/review-manager.md +56 -56
- package/templates/common/.claude/agents/verifier.md +34 -32
- package/templates/common/.claude/commands/wf-help.md +2 -3
- package/templates/common/.claude/rules/ecc/common.md +44 -44
- package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +10 -4
- package/templates/common/.claude/skills/wf/SKILL.md +7 -3
- package/templates/common/.claude/skills/wf-auto/SKILL.md +61 -107
- package/templates/common/.claude/skills/wf-auto-spark/SKILL.md +19 -17
- package/templates/common/.claude/skills/wf-max/SKILL.md +40 -21
- package/templates/common/.claude/skills/wf-readme/SKILL.md +49 -49
- package/templates/common/.claude/skills/wf-remove/SKILL.md +7 -7
- package/templates/common/.claude/skills/wf-update/SKILL.md +9 -4
- package/templates/common/.codex/config.toml +5 -0
- package/templates/common/.harness-version +78 -36
- package/templates/common/.opencode/agents/architect-manager.md +52 -0
- package/templates/common/.opencode/agents/architect.md +35 -0
- package/templates/common/.opencode/agents/context-master.md +81 -0
- package/templates/common/.opencode/agents/debugger.md +43 -0
- package/templates/common/.opencode/agents/docs-researcher.md +42 -0
- package/templates/common/.opencode/agents/explore-manager.md +49 -0
- package/templates/common/.opencode/agents/implement-manager.md +56 -0
- package/templates/common/.opencode/agents/implementer.md +42 -0
- package/templates/common/.opencode/agents/memory-master.md +70 -0
- package/templates/common/.opencode/agents/planner.md +38 -0
- package/templates/common/.opencode/agents/reflector.md +39 -0
- package/templates/common/.opencode/agents/researcher.md +42 -0
- package/templates/common/.opencode/agents/review-manager.md +63 -0
- package/templates/common/.opencode/agents/reviewer.md +37 -0
- package/templates/common/.opencode/agents/tdd-guide.md +83 -0
- package/templates/common/.opencode/agents/test-writer.md +54 -0
- package/templates/common/.opencode/agents/verifier.md +37 -0
- package/templates/common/.opencode/commands/wf-help.md +23 -0
- package/templates/common/AGENTS.md +26 -25
- package/templates/common/CLAUDE.md +86 -88
- package/templates/common/Harness/ACCEPTANCE_PROTOCOL.md +12 -4
- package/templates/common/Harness/PROGRESS.md +17 -17
- package/templates/common/Harness/README.md +26 -16
- package/templates/common/Harness/WF-AUTO-ANGLES.md +170 -0
- package/templates/common/Harness/WF-AUTO-SPARK.md +23 -6
- package/templates/common/Harness/WF-AUTO.md +508 -493
- package/templates/common/Harness/WF-MAX.md +284 -232
- package/templates/common/Harness/WF.md +47 -29
- package/templates/common/Harness/agent-workflow.md +108 -76
- package/templates/common/Harness/architecture.md +124 -124
- package/templates/common/Harness/context-loading.md +111 -111
- package/templates/common/Harness/dispatch.md +96 -95
- package/templates/common/Harness/extension.md +67 -67
- package/templates/common/Harness/lifecycle.md +20 -20
- package/templates/common/Harness/research/PRD.md +56 -56
- package/templates/common/Harness/research/README.md +169 -169
- package/templates/common/Harness/research/research-results.md +66 -66
- package/templates/common/Harness/subagents.md +192 -170
- package/templates/common/Harness/tasks/_template/ARTIFACTS.md +3 -3
- package/templates/common/Harness/tasks/_template/NOTES.md +3 -3
- package/templates/common/Harness/tasks/_template/PLAN.md +53 -60
- package/templates/common/Harness/tasks/_template/PROGRESS.md +26 -29
- package/templates/common/MEMORY.md +27 -30
- package/templates/common/README.md +36 -36
- package/templates/common/SETUP.md +1 -1
- package/templates/common/memory/agent-lessons-patterns.md +21 -21
- package/templates/common/memory/tool-usage-reflections.md +21 -21
- package/templates/common/memory/user-corrections-preferences.md +21 -21
- package/templates/common/opencode.json +19 -0
- package/templates/common/scripts/scan-clean.mjs +487 -448
- package/templates/common/scripts/validate-harness.mjs +245 -146
- package/templates/common/scripts/wf-remove.mjs +311 -293
- package/templates/common/scripts/wf-update-check.mjs +511 -311
- package/templates/optional/catalog.json +41 -33
- package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +194 -194
- package/templates/optional/skills/browser-e2e/Harness/workflows/browser-e2e.md +105 -69
- package/templates/optional/skills/github-pr-review/Harness/workflows/github-pr-review.md +28 -28
- package/templates/optional/skills/python-backend/Harness/workflows/python-backend.md +34 -34
- package/templates/optional/skills/ts-react-frontend/Harness/workflows/ts-react-frontend.md +34 -34
- package/templates/optional/skills/ui-ux-review/Harness/workflows/ui-ux-review.md +26 -26
|
@@ -1,59 +1,60 @@
|
|
|
1
|
-
# Subagent Orchestration
|
|
2
|
-
|
|
3
|
-
Purpose: coordinate subagents for speed without losing control of scope, evidence, or integration.
|
|
4
|
-
|
|
5
|
-
Use this file when work needs multiple roles, parallel reading, independent review, broad context, repeated failures, or `/wf`.
|
|
6
|
-
|
|
1
|
+
# Subagent Orchestration
|
|
2
|
+
|
|
3
|
+
Purpose: coordinate subagents for speed without losing control of scope, evidence, or integration.
|
|
4
|
+
|
|
5
|
+
Use this file when work needs multiple roles, parallel reading, independent review, broad context, repeated failures, or `/wf`.
|
|
6
|
+
|
|
7
7
|
project files are the only durable communication channel; chat/subagent transcript state is non-authoritative. Important assumptions, decisions, blockers, evidence, and handoffs must be written to `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
|
|
8
8
|
|
|
9
9
|
Subagent work is acceptance-driven. Use [AGENT_ISOLATION.md](AGENT_ISOLATION.md)
|
|
10
10
|
for role/context isolation and [ACCEPTANCE_PROTOCOL.md](ACCEPTANCE_PROTOCOL.md)
|
|
11
11
|
for PRD-GATE, AC-GATE, CONTRACT-GATE, TEST-GATE, VALIDATION-GATE, and
|
|
12
12
|
REVIEW-GATE.
|
|
13
|
-
|
|
14
|
-
## Source Attribution
|
|
15
|
-
|
|
16
|
-
This harness distills ideas from these sources. Keep the protocol local and conservative; do not import external runtimes by default.
|
|
17
|
-
|
|
18
|
-
| Source | Found By | Adopted Idea |
|
|
19
|
-
| --- | --- | --- |
|
|
20
|
-
| `superpowers:dispatching-parallel-agents` | local skill | Dispatch one agent per independent problem domain; give focused scope and exact context. |
|
|
21
|
-
| `superpowers:subagent-driven-development` | local skill | Fresh implementer per task; spec review before code-quality review; handle `DONE`, `DONE_WITH_CONCERNS`, `NEEDS_CONTEXT`, and `BLOCKED`. |
|
|
22
|
-
| [`flc1125/skills@subagent-orchestrator`](https://skills.sh/flc1125/skills/subagent-orchestrator) | `npx skills find "subagent orchestration"` | Explicit subagent invocation, role-specific prompts, tool permission awareness. |
|
|
23
|
-
| [`davila7/claude-code-templates@parallel-agents`](https://skills.sh/davila7/claude-code-templates/parallel-agents) | `npx skills find "parallel agents"` | Discovery -> domain agents -> synthesis; one unified synthesis instead of scattered reports. |
|
|
24
|
-
| [`ruvnet/ruflo@agent-workflow`](https://skills.sh/ruvnet/ruflo/agent-workflow) | `npx skills find "agent workflow"` | Workflow thinking: triggers, agent assignments, parallel processing, and stateful handoffs. |
|
|
25
|
-
| [`pcvelz/superpowers@subagent-driven-development`](https://skills.sh/pcvelz/superpowers/subagent-driven-development) | `npx skills find "subagent driven development"` | Implementer plus review gates for spec compliance and code quality. |
|
|
26
|
-
| [`oimiragieo/agent-studio`](https://skills.sh/oimiragieo/agent-studio/dispatching-parallel-agents) | Skills CLI / public docs | Router-subordinate architecture and durable handoff discipline. |
|
|
27
|
-
| [`subagent-orchestration-skill`](https://skills.rest/rjtaryn/skills/subagent-orchestration-skill) | public docs | Multi-stage executor, spec reviewer, code reviewer, circuit breaker, and escalation pattern. |
|
|
28
|
-
|
|
29
|
-
## Controller Role
|
|
30
|
-
|
|
31
|
-
The main agent is the controller. It owns:
|
|
32
|
-
|
|
33
|
-
- intent confidence and user questions
|
|
34
|
-
- task decomposition
|
|
35
|
-
- read/write set boundaries
|
|
36
|
-
- dispatch table in `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch`
|
|
37
|
-
- integration of returned summaries
|
|
38
|
-
- final verification and closeout
|
|
39
|
-
|
|
40
|
-
Subagents provide bounded work. They do not own final scope, architecture, release claims, or user-facing decisions.
|
|
41
|
-
|
|
42
|
-
## Built-in Agent Roster
|
|
43
|
-
|
|
44
|
-
Use the installed roster under `.claude/agents/` before inventing ad hoc roles.
|
|
45
|
-
|
|
46
|
-
| Agent | Default Use |
|
|
47
|
-
| --- | --- |
|
|
48
|
-
| `planner` | decompose goals, map unknowns, define success criteria and write sets |
|
|
49
|
-
| `researcher` | local/external ecosystem context, comparable projects, current facts |
|
|
50
|
-
| `docs-researcher` | official docs, SDK/API behavior, browser/tool constraints |
|
|
51
|
-
| `architect` | boundaries, interface decoupling, state ownership, data flow, migration risk |
|
|
52
|
-
| `test-writer` | failing tests, manual check contracts, browser/API evidence plan |
|
|
53
|
-
| `implementer` | bounded code or doc changes after the second plan |
|
|
54
|
-
| `reviewer` | spec compliance, code quality, maintainability, security, missing tests |
|
|
55
|
-
| `debugger` | reproduced failures, root cause isolation, smallest safe fix |
|
|
56
|
-
| `verifier` | command execution, real browser/API checks, final evidence |
|
|
13
|
+
|
|
14
|
+
## Source Attribution
|
|
15
|
+
|
|
16
|
+
This harness distills ideas from these sources. Keep the protocol local and conservative; do not import external runtimes by default.
|
|
17
|
+
|
|
18
|
+
| Source | Found By | Adopted Idea |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| `superpowers:dispatching-parallel-agents` | local skill | Dispatch one agent per independent problem domain; give focused scope and exact context. |
|
|
21
|
+
| `superpowers:subagent-driven-development` | local skill | Fresh implementer per task; spec review before code-quality review; handle `DONE`, `DONE_WITH_CONCERNS`, `NEEDS_CONTEXT`, and `BLOCKED`. |
|
|
22
|
+
| [`flc1125/skills@subagent-orchestrator`](https://skills.sh/flc1125/skills/subagent-orchestrator) | `npx skills find "subagent orchestration"` | Explicit subagent invocation, role-specific prompts, tool permission awareness. |
|
|
23
|
+
| [`davila7/claude-code-templates@parallel-agents`](https://skills.sh/davila7/claude-code-templates/parallel-agents) | `npx skills find "parallel agents"` | Discovery -> domain agents -> synthesis; one unified synthesis instead of scattered reports. |
|
|
24
|
+
| [`ruvnet/ruflo@agent-workflow`](https://skills.sh/ruvnet/ruflo/agent-workflow) | `npx skills find "agent workflow"` | Workflow thinking: triggers, agent assignments, parallel processing, and stateful handoffs. |
|
|
25
|
+
| [`pcvelz/superpowers@subagent-driven-development`](https://skills.sh/pcvelz/superpowers/subagent-driven-development) | `npx skills find "subagent driven development"` | Implementer plus review gates for spec compliance and code quality. |
|
|
26
|
+
| [`oimiragieo/agent-studio`](https://skills.sh/oimiragieo/agent-studio/dispatching-parallel-agents) | Skills CLI / public docs | Router-subordinate architecture and durable handoff discipline. |
|
|
27
|
+
| [`subagent-orchestration-skill`](https://skills.rest/rjtaryn/skills/subagent-orchestration-skill) | public docs | Multi-stage executor, spec reviewer, code reviewer, circuit breaker, and escalation pattern. |
|
|
28
|
+
|
|
29
|
+
## Controller Role
|
|
30
|
+
|
|
31
|
+
The main agent is the controller. It owns:
|
|
32
|
+
|
|
33
|
+
- intent confidence and user questions
|
|
34
|
+
- task decomposition
|
|
35
|
+
- read/write set boundaries
|
|
36
|
+
- dispatch table in `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch`
|
|
37
|
+
- integration of returned summaries
|
|
38
|
+
- final verification and closeout
|
|
39
|
+
|
|
40
|
+
Subagents provide bounded work. They do not own final scope, architecture, release claims, or user-facing decisions.
|
|
41
|
+
|
|
42
|
+
## Built-in Agent Roster
|
|
43
|
+
|
|
44
|
+
Use the installed roster under `.claude/agents/` before inventing ad hoc roles.
|
|
45
|
+
|
|
46
|
+
| Agent | Default Use |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| `planner` | decompose goals, map unknowns, define success criteria and write sets |
|
|
49
|
+
| `researcher` | local/external ecosystem context, comparable projects, current facts |
|
|
50
|
+
| `docs-researcher` | official docs, SDK/API behavior, browser/tool constraints |
|
|
51
|
+
| `architect` | boundaries, interface decoupling, state ownership, data flow, migration risk |
|
|
52
|
+
| `test-writer` | failing tests, manual check contracts, browser/API evidence plan |
|
|
53
|
+
| `implementer` | bounded code or doc changes after the second plan |
|
|
54
|
+
| `reviewer` | spec compliance, code quality, maintainability, security, missing tests |
|
|
55
|
+
| `debugger` | reproduced failures, root cause isolation, smallest safe fix |
|
|
56
|
+
| `verifier` | command execution, real browser/API checks, final evidence |
|
|
57
|
+
| `reflector` | closeout synthesis, unresolved-risk check, acceptance gate verdict |
|
|
57
58
|
| `memory-master` | write/consolidate memory entries, dedup, cross-project extraction; dispatched on repeated failures, user corrections, and WF closeout |
|
|
58
59
|
| `context-master` | analyze context usage, recommend compression at ~85% window, extract durable session knowledge during closeout |
|
|
59
60
|
|
|
@@ -71,137 +72,158 @@ agent file exists.
|
|
|
71
72
|
| Test Architect | `test-writer` | AC, contracts, test utilities | tests or test plan only |
|
|
72
73
|
| Implementer | `implementer` | PRD, AC, contracts, tests, relevant code | assigned implementation write set only |
|
|
73
74
|
| Independent Validator | `verifier` | PRD, AC, contracts, running app/API, commands | validation report/evidence only |
|
|
75
|
+
| Cross Review | `reviewer` | PRD, AC, contracts, diff, tests, validation evidence | spec/AC and code/architecture/test findings only |
|
|
76
|
+
| Reflector | `reflector` | validation evidence, reviewer findings, risks, decisions | final PASS/RETURN_TO_DEBUG/BLOCKED verdict only |
|
|
74
77
|
| Debugger | `debugger` | failed AC, logs, trace, screenshot, diff | smallest assigned fix set |
|
|
75
78
|
|
|
76
79
|
Hard rule: implementer may not be the independent validator for the same AC ID.
|
|
77
|
-
|
|
78
|
-
## WF Default Fan-Out
|
|
79
|
-
|
|
80
|
-
Explicit `/wf`, `wf mode`, `workflow mode`, or `wk mode` requires
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- `
|
|
94
|
-
- `
|
|
95
|
-
- `
|
|
96
|
-
- `
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
80
|
+
|
|
81
|
+
## WF Default Fan-Out
|
|
82
|
+
|
|
83
|
+
Explicit `/wf`, `wf mode`, `workflow mode`, or `wk mode` requires complete
|
|
84
|
+
role-chain coverage from `.claude/agents/` before closeout: plan,
|
|
85
|
+
research/docs research as needed, architecture, test, implement, independent
|
|
86
|
+
validation, cross-review, reflector, and accept.
|
|
87
|
+
|
|
88
|
+
Default starter set:
|
|
89
|
+
|
|
90
|
+
- `planner` for decomposition and local map
|
|
91
|
+
- `architect` for boundaries, interfaces, and state impact
|
|
92
|
+
- `researcher` or `docs-researcher` depending whether the unknowns are project/ecosystem facts or official tool/API behavior
|
|
93
|
+
|
|
94
|
+
Then add phase-specific agents:
|
|
95
|
+
|
|
96
|
+
- `test-writer` before implementation
|
|
97
|
+
- `implementer` for the serial write lane
|
|
98
|
+
- `reviewer` for independent spec/AC and code/architecture/test gates
|
|
99
|
+
- `debugger` after a reproduced verification failure
|
|
100
|
+
- `verifier` for command/browser/API evidence and AC matrix
|
|
101
|
+
- `reflector` after cross-review to decide whether final acceptance may proceed
|
|
102
|
+
- `context-master` before closeout for knowledge extraction
|
|
103
|
+
- `memory-master` after repeated failures and during closeout for consolidation
|
|
104
|
+
|
|
105
|
+
Collaboration mode is determined by concrete conditions, not a fixed ratio. See `Harness/WF.md#Complete Role Chain Requirement` for the full decision tree. Summary: explicit WF/WK mode always uses the complete role chain. 3+ files or cross-layer work uses multi-agent orchestration. 1-2 local files, well-understood, not in WF mode can be solo. Repeated failure stops solo work and switches to multi-agent.
|
|
106
|
+
|
|
107
|
+
## Efficiency Ladder
|
|
108
|
+
|
|
109
|
+
Choose the cheapest coordination level that is safe.
|
|
110
|
+
|
|
111
|
+
| Level | Use When | Pattern |
|
|
112
|
+
| --- | --- | --- |
|
|
113
|
+
| Solo pass | one file, low risk, clear intent | no subagent |
|
|
114
|
+
| Single reviewer | small change with meaningful risk | implement, then reviewer |
|
|
115
|
+
| Parallel read-only | broad reading, research, architecture, multiple independent failures | 2-3 read-only agents |
|
|
116
|
+
| Serial build lane | normal feature or fix | acceptance/contract -> test-writer -> implementer -> verifier evidence -> cross-review -> reflector -> acceptance |
|
|
117
|
+
| Isolated lanes | disjoint write sets or competing approaches | separate worktrees, then review and merge |
|
|
118
|
+
| Max parallelism | 5+ disjoint files, fan-out benefit > coordination cost | /wf max: write-set coloring -> wave dispatch -> parallel review |
|
|
119
|
+
|
|
120
|
+
Max parallelism removes the Harness default cap, not the runtime's physical or
|
|
121
|
+
account cap. For WF-MAX, record the current runtime budget, use native
|
|
122
|
+
subagents first, close completed agents before declaring the pool exhausted,
|
|
123
|
+
then overflow to the other CLI (`claude -p` or `codex exec`) with explicit
|
|
124
|
+
dispatch packets. Generated Harness Codex config defaults to
|
|
125
|
+
`agents.max_threads = 12` and `agents.max_depth = 1`; if that becomes the
|
|
126
|
+
bottleneck, ask the user before raising `agents.max_threads` and keep
|
|
127
|
+
`max_depth = 1` unless recursive delegation is explicitly approved. Do not rely
|
|
128
|
+
on undocumented fork/derive bypasses as stable capacity.
|
|
129
|
+
|
|
130
|
+
Default for automatic WF triggers: 3-5 active read-only agents before second
|
|
131
|
+
planning. For explicit WF/WK mode, never use the solo pass; schedule the
|
|
132
|
+
complete role chain and use bounded role passes as the recorded fallback when
|
|
133
|
+
subagents are unavailable.
|
|
134
|
+
|
|
135
|
+
## WF Orchestration Shape
|
|
136
|
+
|
|
137
|
+
```text
|
|
138
|
+
controller intake
|
|
139
|
+
-> parallel planner/researcher/docs-researcher/architect subagents
|
|
140
|
+
-> controller synthesis
|
|
141
|
+
-> second plan with dependencies and write sets
|
|
122
142
|
-> acceptance/contract/test-writer
|
|
123
143
|
-> implementer
|
|
124
144
|
-> independent validator
|
|
125
|
-
-> spec reviewer
|
|
126
|
-
->
|
|
127
|
-
-> if failed: debugger/fixer -> review ->
|
|
128
|
-
-> close with evidence
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Use this shape for `/wf`, long tasks, multi-file changes, architecture work, migrations, browser/API behavior, or repeated failures.
|
|
132
|
-
|
|
133
|
-
```text
|
|
134
|
-
/wf max orchestration shape:
|
|
135
|
-
controller intake
|
|
136
|
-
-> wave 0: max-parallel exploration (4-14 read-only agents)
|
|
137
|
-
-> E-GATE: Exploration Gate
|
|
138
|
-
-> wave 1: architecture
|
|
139
|
-
-> D-GATE: Write Decomposition Gate
|
|
140
|
-
-> wave 2: N parallel implementers (disjoint file claims, ALL spawned in ONE message)
|
|
141
|
-
-> wave 2 review: parallel spec/code/security reviewers
|
|
142
|
-
-> wave 3+: dependent implementers (if any; re-run D-GATE if write-set changed)
|
|
143
|
-
-> integration verifier
|
|
144
|
-
->
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
145
|
+
-> cross-review: spec/AC reviewer + code/architecture/test reviewer
|
|
146
|
+
-> reflector
|
|
147
|
+
-> if failed: debugger/fixer -> verify -> cross-review -> reflector -> loop
|
|
148
|
+
-> close with evidence
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Use this shape for `/wf`, long tasks, multi-file changes, architecture work, migrations, browser/API behavior, or repeated failures.
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
/wf max orchestration shape:
|
|
155
|
+
controller intake
|
|
156
|
+
-> wave 0: max-parallel exploration (4-14 read-only agents)
|
|
157
|
+
-> E-GATE: Exploration Gate - all questions answered, findings synthesized (per WF-MAX.md)
|
|
158
|
+
-> wave 1: architecture - 3 parallel architects -> boundary decisions + interface contract
|
|
159
|
+
-> D-GATE: Write Decomposition Gate - Dispatch Table + Self-Audit for write-set (MANDATORY, per WF-MAX.md)
|
|
160
|
+
-> wave 2: N parallel implementers (disjoint file claims, ALL spawned in ONE message)
|
|
161
|
+
-> wave 2 review: parallel spec/code/security reviewers
|
|
162
|
+
-> wave 3+: dependent implementers (if any; re-run D-GATE if write-set changed)
|
|
163
|
+
-> integration verifier
|
|
164
|
+
-> reflector after cross-review
|
|
165
|
+
-> closeout with evidence
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Dispatch Pack
|
|
169
|
+
|
|
170
|
+
Use the canonical dispatch input and handoff format in `Harness/dispatch.md`. Every subagent dispatch must be self-contained - inject only the docs selected by `Harness/README.md` and `Harness/context-loading.md`.
|
|
171
|
+
|
|
172
|
+
## Parallelism Rules
|
|
173
|
+
|
|
174
|
+
- Read-only agents may run in parallel.
|
|
175
|
+
- Writing agents run serially unless write sets are disjoint and the controller has chosen an isolated worktree.
|
|
176
|
+
- Reviewers may run in parallel after implementation, but spec compliance is evaluated before code-quality approval.
|
|
177
|
+
- Subagents are readers and reporters. They return findings and PLAN patch suggestions. Only the controller (main agent) commits state changes to task files.
|
|
178
|
+
- Do not let two agents edit `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, `Harness/MEMORY.md`, or `Harness/memory/*` concurrently. The controller writes durable state.
|
|
179
|
+
- If two agents disagree, the controller records the conflict in `Harness/tasks/<task-id>/PLAN.md` and chooses the smallest reversible next step.
|
|
180
|
+
|
|
181
|
+
## Review Gates
|
|
182
|
+
|
|
183
|
+
Implementation is not complete until cross-review and reflection pass:
|
|
184
|
+
|
|
164
185
|
1. **Spec review**: confirms the result matches the user request, PRD, feature doc, acceptance criteria, contracts, and non-goals. Extra features are failures.
|
|
165
186
|
2. **Code-quality review**: checks correctness, maintainability, architecture, tests, security, and integration risk.
|
|
187
|
+
3. **Reflector gate**: checks reviewer findings, verifier evidence, unresolved risks, and contradictions; returns PASS, RETURN_TO_DEBUG, or BLOCKED.
|
|
166
188
|
|
|
167
189
|
Validation is separate from review. Validator must produce an AC-by-AC result
|
|
168
190
|
matrix from running behavior and evidence, not from the implementer's summary.
|
|
169
|
-
|
|
170
|
-
If either reviewer finds issues, the implementer or debugger fixes them and the same gate runs again. Do not move to
|
|
171
|
-
|
|
172
|
-
## Subagent Status Handling
|
|
173
|
-
|
|
174
|
-
| Status | Controller Action |
|
|
175
|
-
| --- | --- |
|
|
176
|
-
| `DONE` | start review gates |
|
|
177
|
-
| `DONE_WITH_CONCERNS` | read concerns, decide whether to address before review, record in `Harness/tasks/<task-id>/PROGRESS.md` |
|
|
178
|
-
| `NEEDS_CONTEXT` | provide only missing context and re-dispatch |
|
|
179
|
-
| `BLOCKED` | change something: add context, split task, upgrade reasoning, use debugger, or ask user |
|
|
180
|
-
|
|
181
|
-
Never retry the same failed prompt unchanged.
|
|
182
|
-
|
|
183
|
-
## Failure Recovery
|
|
184
|
-
|
|
185
|
-
- First failed verification: record evidence, dispatch debugger with the smallest reproduced failure.
|
|
186
|
-
- Second same-class failure: narrow scope, update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat`, and add a reviewer before another fix.
|
|
187
|
-
- Third same-class failure: stop blind fixes. Present evidence-backed options to the user.
|
|
188
|
-
|
|
189
|
-
The recovery loop must preserve the same evidence standard as the main workflow: real commands, real browser/API checks when applicable, and recorded logs or artifacts.
|
|
190
|
-
|
|
191
|
-
## Synthesis Output
|
|
192
|
-
|
|
193
|
-
After subagents return, the controller writes one synthesis into `Harness/tasks/<task-id>/PLAN.md`:
|
|
194
|
-
|
|
195
|
-
```text
|
|
196
|
-
Agents used:
|
|
197
|
-
Findings accepted:
|
|
198
|
-
Findings rejected:
|
|
199
|
-
Conflicts:
|
|
200
|
-
Decisions:
|
|
201
|
-
Next write set:
|
|
191
|
+
|
|
192
|
+
If either reviewer finds issues, the implementer or debugger fixes them and the same gate runs again. Do not move to final acceptance with open critical/high findings or without reflector PASS.
|
|
193
|
+
|
|
194
|
+
## Subagent Status Handling
|
|
195
|
+
|
|
196
|
+
| Status | Controller Action |
|
|
197
|
+
| --- | --- |
|
|
198
|
+
| `DONE` | start review gates |
|
|
199
|
+
| `DONE_WITH_CONCERNS` | read concerns, decide whether to address before review, record in `Harness/tasks/<task-id>/PROGRESS.md` |
|
|
200
|
+
| `NEEDS_CONTEXT` | provide only missing context and re-dispatch |
|
|
201
|
+
| `BLOCKED` | change something: add context, split task, upgrade reasoning, use debugger, or ask user |
|
|
202
|
+
|
|
203
|
+
Never retry the same failed prompt unchanged.
|
|
204
|
+
|
|
205
|
+
## Failure Recovery
|
|
206
|
+
|
|
207
|
+
- First failed verification: record evidence, dispatch debugger with the smallest reproduced failure.
|
|
208
|
+
- Second same-class failure: narrow scope, update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat`, and add a reviewer before another fix.
|
|
209
|
+
- Third same-class failure: stop blind fixes. Present evidence-backed options to the user.
|
|
210
|
+
|
|
211
|
+
The recovery loop must preserve the same evidence standard as the main workflow: real commands, real browser/API checks when applicable, and recorded logs or artifacts.
|
|
212
|
+
|
|
213
|
+
## Synthesis Output
|
|
214
|
+
|
|
215
|
+
After subagents return, the controller writes one synthesis into `Harness/tasks/<task-id>/PLAN.md`:
|
|
216
|
+
|
|
217
|
+
```text
|
|
218
|
+
Agents used:
|
|
219
|
+
Findings accepted:
|
|
220
|
+
Findings rejected:
|
|
221
|
+
Conflicts:
|
|
222
|
+
Decisions:
|
|
223
|
+
Next write set:
|
|
202
224
|
Verification path:
|
|
203
225
|
Acceptance/contract traceability:
|
|
204
226
|
Residual risk:
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
Only the synthesis and named files enter main context. Do not replay full subagent conversations.
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Only the synthesis and named files enter main context. Do not replay full subagent conversations.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# {{TASK_ID}}
|
|
2
|
-
|
|
3
|
-
Optional: screenshots, logs, API responses, links. Create only when evidence is too large for this task's PLAN.md verification table.
|
|
1
|
+
# {{TASK_ID}} - Artifacts
|
|
2
|
+
|
|
3
|
+
Optional: screenshots, logs, API responses, links. Create only when evidence is too large for this task's PLAN.md verification table.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# {{TASK_ID}}
|
|
2
|
-
|
|
3
|
-
Optional: exploration notes, design alternatives, research leads. Create only when notes are too long for this task's PLAN.md.
|
|
1
|
+
# {{TASK_ID}} - Notes
|
|
2
|
+
|
|
3
|
+
Optional: exploration notes, design alternatives, research leads. Create only when notes are too long for this task's PLAN.md.
|
|
@@ -1,82 +1,75 @@
|
|
|
1
|
-
# {{TASK_ID}}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
# {{TASK_ID}} - PLAN
|
|
2
|
+
|
|
3
|
+
Compact task record. Keep only facts needed to resume, review, and verify.
|
|
4
|
+
Link files or command names instead of pasting logs or subagent transcripts.
|
|
5
|
+
|
|
6
|
+
> Task ID: kebab-case, under 60 chars. Directory name = task ID.
|
|
7
|
+
|
|
5
8
|
## Goal
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
- Outcome:
|
|
11
|
+
- Non-goals:
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
-
|
|
13
|
+
## Decisions
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
-
|
|
15
|
+
-
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
1.
|
|
17
|
+
## Acceptance
|
|
17
18
|
|
|
18
|
-
UI
|
|
19
|
-
-
|
|
19
|
+
Default: keep 1-3 concise ACs. Expand only for UI/API/security/data-loss,
|
|
20
|
+
cross-module, or other high-risk behavior.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
-
|
|
22
|
+
- AC-001:
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Expanded evidence required when triggered:
|
|
25
|
+
- UI/browser-visible: add selector contract and real browser evidence.
|
|
26
|
+
- API/integration: add endpoint/payload/response contract.
|
|
27
|
+
- High-risk behavior: add AC-by-AC validation matrix.
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|-------|----------------------|--------------|----------|
|
|
28
|
-
| AC-001 | | | |
|
|
29
|
+
## Scope
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
Allowed write set:
|
|
32
|
+
-
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
Forbidden:
|
|
35
|
+
-
|
|
36
|
+
- Truth files (PRD, ACs, UI/API contracts, test plan, validation report) unless a Change Request is recorded.
|
|
34
37
|
|
|
35
|
-
##
|
|
38
|
+
## Context
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
- Loaded:
|
|
41
|
+
- Assumptions:
|
|
39
42
|
|
|
40
|
-
##
|
|
43
|
+
## Agents
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
Only record agents or bounded passes that materially changed the decision.
|
|
46
|
+
|
|
47
|
+
| Role | Read / Write Set | Result |
|
|
48
|
+
|------|------------------|--------|
|
|
43
49
|
|
|
44
|
-
| AC ID | Test Level | User Action / API Request | Command / File | Evidence | Status |
|
|
45
|
-
|-------|------------|---------------------------|----------------|----------|--------|
|
|
46
|
-
|
|
47
|
-
## Scope
|
|
48
|
-
|
|
49
|
-
Allowed write set:
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
Forbidden:
|
|
53
|
-
-
|
|
54
|
-
- PRD / acceptance criteria / UI contract / API contract / test plan / validation report unless Change Request is recorded
|
|
55
|
-
|
|
56
|
-
## Loaded Context
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
## Subagent Dispatch
|
|
61
|
-
|
|
62
|
-
| Agent | Mode | Read Set | Write Set | Status |
|
|
63
|
-
|-------|------|----------|-----------|--------|
|
|
64
|
-
|
|
65
|
-
## Subagent Synthesis
|
|
66
|
-
|
|
67
|
-
Agents used:
|
|
68
|
-
Findings accepted:
|
|
69
|
-
Findings rejected:
|
|
70
|
-
Conflicts:
|
|
71
|
-
Decisions:
|
|
72
|
-
Residual risk:
|
|
73
|
-
|
|
74
50
|
## Verification
|
|
75
51
|
|
|
76
|
-
|
|
77
|
-
|
|
52
|
+
- [ ]
|
|
53
|
+
|
|
54
|
+
## Risks
|
|
55
|
+
|
|
56
|
+
-
|
|
57
|
+
|
|
58
|
+
## Expanded Contracts
|
|
59
|
+
|
|
60
|
+
Use this section only when the Acceptance triggers above apply.
|
|
61
|
+
|
|
62
|
+
### UI Contract
|
|
63
|
+
|
|
64
|
+
| Element | Selector / Role | States | AC IDs |
|
|
65
|
+
|---------|-----------------|--------|--------|
|
|
66
|
+
|
|
67
|
+
### API Contract
|
|
68
|
+
|
|
69
|
+
| Endpoint | Method | Payload / Response | AC IDs |
|
|
70
|
+
|----------|--------|--------------------|--------|
|
|
78
71
|
|
|
79
|
-
|
|
72
|
+
### Validation Matrix
|
|
80
73
|
|
|
81
74
|
| AC ID | Result | Evidence | Notes |
|
|
82
75
|
|-------|--------|----------|-------|
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
# {{TASK_ID}}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
| Agent | Role | Context Pack | Result |
|
|
29
|
-
|-------|------|-------------|--------|
|
|
1
|
+
# {{TASK_ID}} - PROGRESS
|
|
2
|
+
|
|
3
|
+
Compact heartbeat. Update on phase changes, blockers, failures, and closeout.
|
|
4
|
+
Do not paste logs; record the command/file that proves the state.
|
|
5
|
+
|
|
6
|
+
## Status
|
|
7
|
+
|
|
8
|
+
- Phase: Intake
|
|
9
|
+
- Next:
|
|
10
|
+
- Blocker: none
|
|
11
|
+
|
|
12
|
+
## Tasks
|
|
13
|
+
|
|
14
|
+
- [ ] Define goal and scope
|
|
15
|
+
|
|
16
|
+
## Changes
|
|
17
|
+
|
|
18
|
+
-
|
|
19
|
+
|
|
20
|
+
## Verification
|
|
21
|
+
|
|
22
|
+
-
|
|
23
|
+
|
|
24
|
+
## Notes
|
|
25
|
+
|
|
26
|
+
-
|