create-harness-vibe-coding 0.6.2 → 0.6.4
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/package.json +1 -1
- package/src/generator.js +466 -466
- package/src/index.js +355 -355
- package/templates/common/.claude/agents/architect.md +31 -35
- package/templates/common/.claude/agents/context-master.md +0 -1
- package/templates/common/.claude/agents/debugger.md +0 -1
- package/templates/common/.claude/agents/docs-researcher.md +41 -43
- package/templates/common/.claude/agents/implementer.md +0 -1
- package/templates/common/.claude/agents/memory-master.md +0 -1
- package/templates/common/.claude/agents/planner.md +0 -1
- package/templates/common/.claude/agents/researcher.md +0 -1
- package/templates/common/.claude/agents/reviewer.md +34 -35
- package/templates/common/.claude/agents/test-writer.md +0 -1
- package/templates/common/.claude/agents/verifier.md +0 -1
- package/templates/common/.claude/commands/wf-max.md +7 -0
- package/templates/common/.claude/commands/{update.md → wf-update.md} +4 -0
- package/templates/common/.claude/commands/wf.md +10 -3
- package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +2 -1
- package/templates/common/.claude/skills/wf-max/SKILL.md +29 -70
- package/templates/common/.claude/skills/{readme-optimizer → wf-readme}/SKILL.md +1 -1
- package/templates/common/.claude/skills/wf-review/SKILL.md +50 -50
- package/templates/common/.claude/skills/wf-update/SKILL.md +58 -58
- package/templates/common/CLAUDE.md +77 -76
- package/templates/common/MEMORY.md +73 -76
- package/templates/common/README.md +1 -1
- package/templates/common/SETUP.md +273 -341
- package/templates/common/docs/README.md +131 -145
- package/templates/common/docs/harness/WF.md +13 -1
- package/templates/common/docs/harness/agent-workflow.md +94 -94
- package/templates/common/docs/harness/architecture.md +1 -1
- package/templates/common/docs/harness/context-loading.md +104 -108
- package/templates/common/docs/harness/extension.md +70 -79
- package/templates/common/docs/harness/lifecycle.md +33 -33
- package/templates/common/docs/harness/subagents.md +1 -1
- package/templates/common/docs/research/PRD.md +65 -65
- package/templates/common/docs/research/README.md +169 -169
- package/templates/common/scripts/validate-harness.mjs +439 -460
- package/templates/optional/skills/browser-e2e/.claude/commands/wf-browser.md +25 -0
- package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +42 -42
- package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +194 -0
- package/templates/optional/skills/browser-e2e/docs/workflows/browser-e2e.md +55 -34
- package/templates/optional/skills/github-pr-review/.claude/skills/github-pr-review/SKILL.md +40 -40
- package/templates/optional/skills/python-backend/.claude/skills/python-backend/SKILL.md +40 -40
- package/templates/optional/skills/ts-react-frontend/.claude/skills/ts-react-frontend/SKILL.md +43 -43
- package/templates/optional/skills/ui-ux-review/.claude/skills/ui-ux-review/SKILL.md +40 -40
- package/templates/common/.claude/skills/harness-build-loop/SKILL.md +0 -23
- package/templates/common/.claude/skills/harness-context/SKILL.md +0 -26
- package/templates/common/.claude/skills/harness-lifecycle/SKILL.md +0 -20
- package/templates/common/.claude/skills/harness-research/SKILL.md +0 -30
- package/templates/common/.claude/skills/harness-router/SKILL.md +0 -16
- package/templates/common/.claude/skills/wf-mode/SKILL.md +0 -55
- package/templates/common/docs/domain/ports.md +0 -76
- package/templates/common/docs/features/_template.md +0 -177
- package/templates/common/docs/harness/PLAN.md +0 -52
- package/templates/common/docs/harness/data-flow.md +0 -59
- package/templates/common/docs/harness/state-machines.md +0 -58
- /package/templates/common/.claude/commands/{learn.md → wf-learn.md} +0 -0
|
@@ -1,145 +1,131 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
Purpose: route humans and agents to the smallest useful context. `Harness/README.md` is the primary router.
|
|
4
|
-
|
|
5
|
-
Default load: `CLAUDE.md`, `Harness/MEMORY.md`, this file, and `Harness/PROGRESS.md` when work is active. Do not read the whole `Harness/` tree.
|
|
6
|
-
|
|
7
|
-
## 0-1 Flow
|
|
8
|
-
|
|
9
|
-
```text
|
|
10
|
-
Idea -> Research -> PRD -> Architecture -> Plan -> Build -> Verify -> Feedback
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For the full phase contract, load [lifecycle.md](lifecycle.md).
|
|
14
|
-
|
|
15
|
-
## Development Contract
|
|
16
|
-
|
|
17
|
-
- This file is a router, not a full spec.
|
|
18
|
-
- If the task does not clearly match a row below, search by keywords before loading more docs.
|
|
19
|
-
- project files are the only durable communication channel; chat/subagent transcript state is non-authoritative.
|
|
20
|
-
- Important assumptions, decisions, blockers, evidence, and handoffs must be written to the current task's `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
|
|
21
|
-
- Build commands, git conventions, and release notes belong in root `README.md`, not `CLAUDE.md`.
|
|
22
|
-
- README rewrites are optional project-doc work. Use `readme
|
|
23
|
-
- Code architecture belongs in [architecture.md](architecture.md) or the current feature doc, not `CLAUDE.md`.
|
|
24
|
-
- Core rules live in `CLAUDE.md` and `.claude/rules/ecc/common.md`.
|
|
25
|
-
- WF mode rules live in [WF.md](WF.md).
|
|
26
|
-
- Phase rules live in [lifecycle.md](lifecycle.md).
|
|
27
|
-
- Build, review, test, and subagent rules live in [agent-workflow.md](agent-workflow.md).
|
|
28
|
-
- Parallel dispatch rules live in [dispatch.md](dispatch.md).
|
|
29
|
-
- Subagent orchestration methodology lives in [subagents.md](subagents.md).
|
|
30
|
-
- Extension rules live in [extension.md](extension.md).
|
|
31
|
-
- Context-loading rules live in [context-loading.md](context-loading.md).
|
|
32
|
-
- Progress lives in `Harness/PROGRESS.md`, `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, and the current feature doc.
|
|
33
|
-
|
|
34
|
-
## Keyword Routing
|
|
35
|
-
|
|
36
|
-
Use this only when the task is ambiguous or the matching row is unclear.
|
|
37
|
-
|
|
38
|
-
1. Extract 2-5 concrete keywords from the user request.
|
|
39
|
-
2. Search the project docs first:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
rg -n "keyword1|keyword2|keyword3" CLAUDE.md README.md Harness
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
3. Load only the top matching doc or the smallest matching doc pair.
|
|
46
|
-
4. If keyword search conflicts with the table below, follow the table and record the assumption in `Harness/tasks/<task-id>/PROGRESS.md`.
|
|
47
|
-
|
|
48
|
-
Keywords are retrieval hints, not project facts.
|
|
49
|
-
|
|
50
|
-
## Load By Task
|
|
51
|
-
|
|
52
|
-
Load the matching row only. Add adjacent docs only when the loaded doc directly names them.
|
|
53
|
-
|
|
54
|
-
Routing priority: if a request explicitly says `/wf <task>`,
|
|
55
|
-
|
|
56
|
-
| When to Read | Keywords | Load | Output |
|
|
57
|
-
| --- | --- | --- | --- |
|
|
58
|
-
| Raw idea or vague product request | idea, vague, clarify, goal, non-goal, lifecycle | [lifecycle.md](lifecycle.md), [research/PRD.md](research/PRD.md) | clarified goal, non-goals, first questions |
|
|
59
|
-
| Need market/tech direction | research, market, competitor, stack, library, pricing, policy | [research/README.md](research/README.md), [research/research-results.md](research/research-results.md) | research protocol, adopted/rejected choices |
|
|
60
|
-
| Need MVP/spec | PRD, MVP, scope, requirement, acceptance, non-goal | [research/PRD.md](research/PRD.md) | one-page PRD with verifiable acceptance criteria |
|
|
61
|
-
| Need architecture or boundaries | architecture, boundary, layer,
|
|
62
|
-
| Need WF mode | wf, /wf, wf mode, workflow mode, wk mode, long task, difficult, stuck, repeated failure | [WF.md](WF.md), [PROGRESS.md](PROGRESS.md), the current task `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md` | exploration plan, second plan, heartbeat, recovery loop; explicit WF/WK loads subagent docs immediately |
|
|
63
|
-
| Need
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
| Need
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
| Need
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
Harness/
|
|
110
|
-
Harness/
|
|
111
|
-
Harness/
|
|
112
|
-
Harness/
|
|
113
|
-
Harness/
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
Harness/
|
|
120
|
-
Harness/
|
|
121
|
-
Harness/
|
|
122
|
-
Harness/
|
|
123
|
-
Harness/
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
Harness
|
|
131
|
-
|
|
132
|
-
Harness/research/research-results.md research results
|
|
133
|
-
Harness/workflows/*.md optional workflow evidence rules (if installed)
|
|
134
|
-
Harness/memory/tool-usage-reflections.md repeated tool failures and better command patterns
|
|
135
|
-
Harness/memory/user-corrections-preferences.md durable user corrections and preferences
|
|
136
|
-
Harness/memory/agent-lessons-patterns.md reusable review/debug lessons
|
|
137
|
-
Harness/scripts/validate-harness.mjs lightweight harness gate
|
|
138
|
-
.claude/agents/* built-in common agents
|
|
139
|
-
.claude/skills/* skill-style dynamic loaders
|
|
140
|
-
.claude/skills/readme-optimizer/SKILL.md README preservation and optional structure pass
|
|
141
|
-
.claude/commands/wf.md slash command bridge into wf-mode
|
|
142
|
-
.claude/skills/wf-update/SKILL.md GitHub-based harness update
|
|
143
|
-
.claude/commands/update.md /wf update slash command bridge
|
|
144
|
-
Harness/.harness-version scaffold version and file checksums
|
|
145
|
-
```
|
|
1
|
+
# create-harness-vibe-coding - Harness Router
|
|
2
|
+
|
|
3
|
+
Purpose: route humans and agents to the smallest useful context. `Harness/README.md` is the primary router.
|
|
4
|
+
|
|
5
|
+
Default load: `CLAUDE.md`, `Harness/MEMORY.md`, this file, and `Harness/PROGRESS.md` when work is active. Do not read the whole `Harness/` tree.
|
|
6
|
+
|
|
7
|
+
## 0-1 Flow
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
Idea -> Research -> PRD -> Architecture -> Plan -> Build -> Verify -> Feedback
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For the full phase contract, load [lifecycle.md](lifecycle.md).
|
|
14
|
+
|
|
15
|
+
## Development Contract
|
|
16
|
+
|
|
17
|
+
- This file is a router, not a full spec.
|
|
18
|
+
- If the task does not clearly match a row below, search by keywords before loading more docs.
|
|
19
|
+
- project files are the only durable communication channel; chat/subagent transcript state is non-authoritative.
|
|
20
|
+
- Important assumptions, decisions, blockers, evidence, and handoffs must be written to the current task's `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
|
|
21
|
+
- Build commands, git conventions, and release notes belong in root `README.md`, not `CLAUDE.md`.
|
|
22
|
+
- README rewrites are optional project-doc work. Use `wf-readme` and preserve existing public docs unless the user approves a broader restructure.
|
|
23
|
+
- Code architecture belongs in [architecture.md](architecture.md) or the current feature doc, not `CLAUDE.md`.
|
|
24
|
+
- Core rules live in `CLAUDE.md` and `.claude/rules/ecc/common.md`.
|
|
25
|
+
- WF mode rules live in [WF.md](WF.md).
|
|
26
|
+
- Phase rules live in [lifecycle.md](lifecycle.md).
|
|
27
|
+
- Build, review, test, and subagent rules live in [agent-workflow.md](agent-workflow.md).
|
|
28
|
+
- Parallel dispatch rules live in [dispatch.md](dispatch.md).
|
|
29
|
+
- Subagent orchestration methodology lives in [subagents.md](subagents.md).
|
|
30
|
+
- Extension rules live in [extension.md](extension.md).
|
|
31
|
+
- Context-loading rules live in [context-loading.md](context-loading.md).
|
|
32
|
+
- Progress lives in `Harness/PROGRESS.md`, `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, and the current feature doc.
|
|
33
|
+
|
|
34
|
+
## Keyword Routing
|
|
35
|
+
|
|
36
|
+
Use this only when the task is ambiguous or the matching row is unclear.
|
|
37
|
+
|
|
38
|
+
1. Extract 2-5 concrete keywords from the user request.
|
|
39
|
+
2. Search the project docs first:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
rg -n "keyword1|keyword2|keyword3" CLAUDE.md README.md Harness
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
3. Load only the top matching doc or the smallest matching doc pair.
|
|
46
|
+
4. If keyword search conflicts with the table below, follow the table and record the assumption in `Harness/tasks/<task-id>/PROGRESS.md`.
|
|
47
|
+
|
|
48
|
+
Keywords are retrieval hints, not project facts.
|
|
49
|
+
|
|
50
|
+
## Load By Task
|
|
51
|
+
|
|
52
|
+
Load the matching row only. Add adjacent docs only when the loaded doc directly names them.
|
|
53
|
+
|
|
54
|
+
Routing priority: if a request explicitly says `/wf <task>`, `wf mode`, `workflow mode`, or `wk mode`, or is long, difficult, uncertain, repeated-failure, migration, architecture-heavy, browser-visible, or broad multi-agent implementation work, choose the WF row first. Load `Harness/WF.md` directly, then delegate subagent coordination to `subagent-orchestrator`.
|
|
55
|
+
|
|
56
|
+
| When to Read | Keywords | Load | Output |
|
|
57
|
+
| --- | --- | --- | --- |
|
|
58
|
+
| Raw idea or vague product request | idea, vague, clarify, goal, non-goal, lifecycle | [lifecycle.md](lifecycle.md), [research/PRD.md](research/PRD.md) | clarified goal, non-goals, first questions |
|
|
59
|
+
| Need market/tech direction | research, market, competitor, stack, library, pricing, policy | [research/README.md](research/README.md), [research/research-results.md](research/research-results.md) | research protocol, adopted/rejected choices |
|
|
60
|
+
| Need MVP/spec | PRD, MVP, scope, requirement, acceptance, non-goal | [research/PRD.md](research/PRD.md) | one-page PRD with verifiable acceptance criteria |
|
|
61
|
+
| Need architecture or boundaries | architecture, boundary, layer, port, adapter, dependency | [architecture.md](architecture.md) | layer map, ports, constraints |
|
|
62
|
+
| Need WF mode | wf, /wf, wf mode, workflow mode, wk mode, long task, difficult, stuck, repeated failure | [WF.md](WF.md), [PROGRESS.md](PROGRESS.md), the current task `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md` | exploration plan, second plan, heartbeat, recovery loop; explicit WF/WK loads subagent docs immediately |
|
|
63
|
+
| Need peer review | /wf-review, peer review, second opinion, cross-check, stuck | `.claude/skills/wf-review/SKILL.md`, `Harness/README.md` | cross-model review via other CLI (Codex/Claude) |
|
|
64
|
+
| Adding harness to existing project | existing project, onboarding, migrate, bootstrap, preserve, conflict | [extension.md](extension.md), [PROGRESS.md](PROGRESS.md), root `README.md` and package/CI files | discovered project facts, preserved config, manual registration plan |
|
|
65
|
+
| README optimization | README, docs, quickstart, install docs, architecture diagram, command table, documentation polish | root `README.md`, `.claude/skills/wf-readme/SKILL.md`, [PROGRESS.md](PROGRESS.md), [architecture.md](architecture.md) as needed | approved README mode, preserved sections, proposed diff plan |
|
|
66
|
+
| Need implementation plan | plan, task, write set, verify, milestone, progress | [PROGRESS.md](PROGRESS.md), the current task `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md`, [agent-workflow.md](agent-workflow.md) | tasks, write set, verification commands |
|
|
67
|
+
| Browser E2E testing or automation | /wf-browser, browser, e2e, web automation, form fill, screenshot verify, page test, browser test, Playwright AI, Browser Use | [workflows/browser-e2e.md](workflows/browser-e2e.md), `.claude/skills/wf-browser/SKILL.md`, `~/.claude/skills/browser-use/SKILL.md` | CLI commands, screenshots, agent history, verification pass/fail evidence |
|
|
68
|
+
| Optional workflow installed | workflow, optional, ui-ux-review, github-pr-review, python-backend, ts-react-frontend | matching `workflows/*.md` (if installed), [extension.md](extension.md) | workflow-specific evidence, commands, fallback path |
|
|
69
|
+
| Need durable memory or reflection | memory, remember, preference, correction, tool failure, lesson, reflection | [MEMORY.md](MEMORY.md), `Harness/memory/tool-usage-reflections.md`, `Harness/memory/user-corrections-preferences.md`, `Harness/memory/agent-lessons-patterns.md` | concise newest-first memory entry or no-op rationale |
|
|
70
|
+
| Need subagents | subagent, role pack, context, inject, return format, orchestrator | [subagents.md](subagents.md), [context-loading.md](context-loading.md), [dispatch.md](dispatch.md) | controller plan, role-specific context pack, dispatch pack |
|
|
71
|
+
| Need feature work | feature, implementation, TDD, test, review, closeout | [tasks/_template/PLAN.md](tasks/_template/PLAN.md), [agent-workflow.md](agent-workflow.md) | task plan, tests, implementation loop |
|
|
72
|
+
| Review or release check | review, release, finding, risk, evidence, verification | [agent-workflow.md](agent-workflow.md), current feature doc | findings, verification evidence |
|
|
73
|
+
| Harness readiness check | validate, readiness, placeholder, missing file, release gate | `Harness/scripts/validate-harness.mjs`, `Harness/scripts/validate-harness.mjs --strict` | missing files and unresolved project placeholders |
|
|
74
|
+
| Need harness update | update, /wf update, check for updates, harness version | `.claude/skills/wf-update/SKILL.md`, `Harness/.harness-version` | update plan, safe incremental update, merge candidates |
|
|
75
|
+
|
|
76
|
+
## Gates
|
|
77
|
+
|
|
78
|
+
- Move phases in order unless the user asks for a fast lane.
|
|
79
|
+
- Use `/wf <task>`, `/wf-max [task]`, `wf mode`, `workflow mode`, or `wk mode` when a task is long, difficult, uncertain, multi-file, or repeatedly failing.
|
|
80
|
+
- Do not code before the PRD has MVP, non-goals, and acceptance criteria.
|
|
81
|
+
- Unsure whether to open a task? Read [agent-workflow.md](agent-workflow.md) Section 1.
|
|
82
|
+
- Do not spawn a subagent without a role, read boundary, write boundary, and return contract.
|
|
83
|
+
- Do not run writing agents in parallel unless write sets are disjoint.
|
|
84
|
+
- Before coordinating multiple agents, fill `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch` and follow `subagents.md` plus `dispatch.md`; if the work also matches WF triggers, enter WF mode first.
|
|
85
|
+
- In WF mode, update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` before long commands, after failures, and at closeout.
|
|
86
|
+
- In WF Max mode, never dispatch two implementers with overlapping file claims. Verify disjointness before each wave.
|
|
87
|
+
- Do not add stack-specific agents or skills without following `extension.md`.
|
|
88
|
+
- Do not close work without tests or recorded manual verification.
|
|
89
|
+
- Do not mark work `Verified` until evidence is recorded in the current task's `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md` or the feature doc.
|
|
90
|
+
- Run `node Harness/scripts/validate-harness.mjs` for scaffold structure; run `node Harness/scripts/validate-harness.mjs --strict` after bootstrap and before release.
|
|
91
|
+
- If a doc still has `{{...}}`, treat that section as a template, not project fact.
|
|
92
|
+
|
|
93
|
+
## Doc Map
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
Harness/README.md router only
|
|
97
|
+
Harness/MEMORY.md resource index
|
|
98
|
+
Harness/PROGRESS.md global task index and cross-task decisions
|
|
99
|
+
Harness/tasks/<id>/PROGRESS.md per-task progress, phase, heartbeat
|
|
100
|
+
Harness/tasks/<id>/PLAN.md per-task implementation plan and evidence
|
|
101
|
+
Harness/tasks/_template/ task capsule template (copy to create new task)
|
|
102
|
+
Harness/WF.md long-task workflow and recovery loop
|
|
103
|
+
Harness/WF-MAX.md max-parallelism workflow with wave dispatch
|
|
104
|
+
.claude/skills/wf-max/SKILL.md max-parallelism skill loader
|
|
105
|
+
.claude/skills/wf-review/SKILL.md cross-model peer review skill
|
|
106
|
+
.claude/commands/wf-max.md /wf-max slash command bridge
|
|
107
|
+
.claude/commands/learn.md /wf-learn slash command bridge
|
|
108
|
+
.claude/commands/wf-review.md /wf-review slash command bridge
|
|
109
|
+
Harness/lifecycle.md 0-1 product flow
|
|
110
|
+
Harness/subagents.md controller-led subagent orchestration
|
|
111
|
+
Harness/context-loading.md dynamic loading and subagent packs
|
|
112
|
+
Harness/dispatch.md lightweight parallel dispatch protocol
|
|
113
|
+
Harness/extension.md stack-specific asset contract
|
|
114
|
+
Harness/agent-workflow.md build/review/test loop
|
|
115
|
+
Harness/architecture.md layer boundaries
|
|
116
|
+
Harness/research/README.md research protocol
|
|
117
|
+
Harness/research/PRD.md product scope
|
|
118
|
+
Harness/research/research-results.md research results
|
|
119
|
+
Harness/workflows/*.md optional workflow evidence rules (if installed)
|
|
120
|
+
Harness/memory/tool-usage-reflections.md repeated tool failures and better command patterns
|
|
121
|
+
Harness/memory/user-corrections-preferences.md durable user corrections and preferences
|
|
122
|
+
Harness/memory/agent-lessons-patterns.md reusable review/debug lessons
|
|
123
|
+
Harness/scripts/validate-harness.mjs lightweight harness gate
|
|
124
|
+
.claude/agents/* built-in common agents
|
|
125
|
+
.claude/skills/* skill-style dynamic loaders
|
|
126
|
+
.claude/skills/wf-readme/SKILL.md README preservation and optional structure pass
|
|
127
|
+
.claude/commands/wf.md slash command bridge into WF mode
|
|
128
|
+
.claude/skills/wf-update/SKILL.md GitHub-based harness update
|
|
129
|
+
.claude/commands/update.md /wf update slash command bridge
|
|
130
|
+
Harness/.harness-version scaffold version and file checksums
|
|
131
|
+
```
|
|
@@ -20,8 +20,20 @@ Enter WF mode when any of these are true:
|
|
|
20
20
|
WF mode requires multi-subagent orchestration by default.
|
|
21
21
|
|
|
22
22
|
- Explicit `/wf`, `wf mode`, `workflow mode`, or `wk mode` MUST spawn at least 3 distinct subagents from `.claude/agents/` before second planning unless the runtime cannot spawn subagents.
|
|
23
|
-
-
|
|
23
|
+
- Collaboration decision tree (replaces the old "7:3" heuristic — concrete conditions, not a magic number):
|
|
24
|
+
- **In explicit WF/WK mode** → ALWAYS multi-agent (≥3 subagents before second plan). No exceptions.
|
|
25
|
+
- **3+ files changed** → multi-agent (at minimum: planner + implementer + reviewer).
|
|
26
|
+
- **Cross-layer change** (DB + API + UI) → multi-agent with architect + implementer(s) + reviewer.
|
|
27
|
+
- **Uncertain scope or approach** → multi-agent exploration (planner + researcher + architect).
|
|
28
|
+
- **1-2 files, well-understood, not in WF mode** → solo is acceptable.
|
|
29
|
+
- **Repeated failure on same task** → STOP solo, switch to multi-agent.
|
|
24
30
|
- Default initial fan-out: `planner`, `researcher` or `docs-researcher`, and `architect`. Add `test-writer`, `reviewer`, `debugger`, or `verifier` when the phase needs them.
|
|
31
|
+
- **Exploration Gate (HARD):**
|
|
32
|
+
- [ ] CEO has NOT read any source files — only `Harness/` docs, `CLAUDE.md`, and subagent returns. This is the #1 rule. **Exception**: if subagents are genuinely unavailable, fall back to bounded-pass emulation and record `Fallback: subagents unavailable` in PLAN.md.
|
|
33
|
+
- [ ] CEO overrides model per-agent: default `sonnet` for real code understanding; `haiku` only for shallow scans (directory listing, file counts); `opus` if user requests.
|
|
34
|
+
- [ ] ≥3 distinct agent types, each with ONE specific question.
|
|
35
|
+
- [ ] All spawned in ONE message block.
|
|
36
|
+
- [ ] Agent count ≥ max(3, ceil(estimated_dirs / 2)) — estimate from prompt/docs; run a second wave if returns reveal more.
|
|
25
37
|
- Record every dispatch or bounded-pass fallback in `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch`.
|
|
26
38
|
- If subagents are unavailable, emulate the same roles as separate bounded passes and record why the fallback was used.
|
|
27
39
|
|
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
# Agent Workflow
|
|
2
|
-
|
|
3
|
-
Use when implementing, reviewing, debugging, or coordinating subagents.
|
|
4
|
-
|
|
5
|
-
## ReAct Loop
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
Observe -> Load minimal context -> Plan -> Act -> Verify -> Update Harness/tasks/<task-id>/PROGRESS.md
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
If context grows, load [context-loading.md](context-loading.md) and split the work. If more than one agent is useful, load [subagents.md](subagents.md) and [dispatch.md](dispatch.md).
|
|
12
|
-
|
|
13
|
-
## Feature Packet
|
|
14
|
-
|
|
15
|
-
Every PRD scope item must be covered by a
|
|
16
|
-
created from `Harness/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
implementation
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## Standard Build Loop
|
|
32
|
-
|
|
33
|
-
```text
|
|
34
|
-
PRD/
|
|
35
|
-
-> failing test or manual check
|
|
36
|
-
-> minimal implementation
|
|
37
|
-
-> verification
|
|
38
|
-
-> review
|
|
39
|
-
-> docs sync
|
|
40
|
-
-> close or iterate
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Subagent Use
|
|
44
|
-
|
|
45
|
-
Use subagents when a task needs broad reading, parallel work, cross-layer changes, independent review, or isolated debugging. Follow [subagents.md](subagents.md) for controller-led orchestration and [dispatch.md](dispatch.md) for the dispatch table.
|
|
46
|
-
|
|
47
|
-
Before spawn, define:
|
|
48
|
-
|
|
49
|
-
- role
|
|
50
|
-
- task
|
|
51
|
-
- mode
|
|
52
|
-
- read boundary
|
|
53
|
-
- write boundary
|
|
54
|
-
- dependency
|
|
55
|
-
- injected docs from [context-loading.md](context-loading.md)
|
|
56
|
-
- return format
|
|
57
|
-
|
|
58
|
-
Rules:
|
|
59
|
-
|
|
60
|
-
- Explorer Pass, Reviewer, and Verifier are read-only.
|
|
61
|
-
- Researcher and Docs Researcher are read-only unless explicitly asked to return a docs patch.
|
|
62
|
-
- Planner and Architect are read-only unless explicitly asked to return a docs patch.
|
|
63
|
-
- Test Writer writes tests before Implementer writes production code.
|
|
64
|
-
- Implementer only writes inside its declared write set.
|
|
65
|
-
- Writing agents run serially unless write sets are disjoint.
|
|
66
|
-
- Debugger fixes the smallest failing path, not adjacent design.
|
|
67
|
-
- Main agent integrates summaries, resolves conflicts, and runs final verification.
|
|
68
|
-
|
|
69
|
-
## Parallel Dispatch
|
|
70
|
-
|
|
71
|
-
Use [subagents.md](subagents.md) and [dispatch.md](dispatch.md) for multi-agent work. Default to at most three active agents (WF mode overrides this; see [WF.md](WF.md)). In `/wf max`, the CEO/Manager/Worker hierarchy in [WF-MAX.md](WF-MAX.md) overrides this limit entirely with wave-based parallel dispatch. Prefer parallel read-only work first, then serial writes.
|
|
72
|
-
|
|
73
|
-
Every dispatched agent returns the handoff format defined in [dispatch.md](dispatch.md).
|
|
74
|
-
|
|
75
|
-
## Conflict Rule
|
|
76
|
-
|
|
77
|
-
If PRD, task PLAN.md, architecture, ports, tests, or code disagree:
|
|
78
|
-
|
|
79
|
-
1. stop implementation
|
|
80
|
-
2. record the conflict in `Harness/tasks/<task-id>/PROGRESS.md` or the feature doc
|
|
81
|
-
3. choose the smallest reversible decision
|
|
82
|
-
4. ask the maintainer when user-visible behavior or security is affected
|
|
83
|
-
|
|
84
|
-
## Completion Gate
|
|
85
|
-
|
|
86
|
-
Close only when:
|
|
87
|
-
|
|
88
|
-
- acceptance criteria are satisfied
|
|
89
|
-
- verification evidence is recorded
|
|
90
|
-
- architecture
|
|
91
|
-
- no unresolved critical/high review findings remain
|
|
92
|
-
- any optimistic UI mutation has a declared and verified rollback path
|
|
93
|
-
- any file declared as DONE in PLAN.md or PROGRESS.md exists on disk (chat output is not durable evidence)
|
|
94
|
-
- `Harness/tasks/<task-id>/PROGRESS.md` states the final status or next iteration
|
|
1
|
+
# Agent Workflow
|
|
2
|
+
|
|
3
|
+
Use when implementing, reviewing, debugging, or coordinating subagents.
|
|
4
|
+
|
|
5
|
+
## ReAct Loop
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
Observe -> Load minimal context -> Plan -> Act -> Verify -> Update Harness/tasks/<task-id>/PROGRESS.md
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
If context grows, load [context-loading.md](context-loading.md) and split the work. If more than one agent is useful, load [subagents.md](subagents.md) and [dispatch.md](dispatch.md).
|
|
12
|
+
|
|
13
|
+
## Feature Packet
|
|
14
|
+
|
|
15
|
+
Every PRD scope item must be covered by a task plan at `Harness/tasks/<task-id>/PLAN.md`
|
|
16
|
+
created from `Harness/tasks/_template/PLAN.md` (the primary work tracking system).
|
|
17
|
+
**Cohesion rule**: if multiple PRD scope items share the same write set, the same
|
|
18
|
+
test/verification path, and the same review boundary, group them into a single
|
|
19
|
+
feature doc. The PRD owns scope decomposition; the feature doc owns the
|
|
20
|
+
implementation unit. The number of feature docs should reflect the number of
|
|
21
|
+
distinguishable implementation units, not the number of PRD checkboxes.
|
|
22
|
+
|
|
23
|
+
**Minimum bar**: a task plan is required when the implementation touches more than one
|
|
24
|
+
file or changes user-visible behavior. Record the plan in `Harness/tasks/<task-id>/PLAN.md`.
|
|
25
|
+
For single-file fixes with no behavior change, a brief note in `PROGRESS.md` is enough.
|
|
26
|
+
|
|
27
|
+
**New vs iterate**: if a PRD scope item overlaps with an existing task, reopen the existing
|
|
28
|
+
task capsule and append to its `PROGRESS.md`. Only create a new task capsule when the
|
|
29
|
+
scope is substantially different. When unsure, ask.
|
|
30
|
+
|
|
31
|
+
## Standard Build Loop
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
PRD/task plan
|
|
35
|
+
-> failing test or manual check
|
|
36
|
+
-> minimal implementation
|
|
37
|
+
-> verification
|
|
38
|
+
-> review
|
|
39
|
+
-> docs sync
|
|
40
|
+
-> close or iterate
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Subagent Use
|
|
44
|
+
|
|
45
|
+
Use subagents when a task needs broad reading, parallel work, cross-layer changes, independent review, or isolated debugging. Follow [subagents.md](subagents.md) for controller-led orchestration and [dispatch.md](dispatch.md) for the dispatch table.
|
|
46
|
+
|
|
47
|
+
Before spawn, define:
|
|
48
|
+
|
|
49
|
+
- role
|
|
50
|
+
- task
|
|
51
|
+
- mode
|
|
52
|
+
- read boundary
|
|
53
|
+
- write boundary
|
|
54
|
+
- dependency
|
|
55
|
+
- injected docs from [context-loading.md](context-loading.md)
|
|
56
|
+
- return format
|
|
57
|
+
|
|
58
|
+
Rules:
|
|
59
|
+
|
|
60
|
+
- Explorer Pass, Reviewer, and Verifier are read-only.
|
|
61
|
+
- Researcher and Docs Researcher are read-only unless explicitly asked to return a docs patch.
|
|
62
|
+
- Planner and Architect are read-only unless explicitly asked to return a docs patch.
|
|
63
|
+
- Test Writer writes tests before Implementer writes production code.
|
|
64
|
+
- Implementer only writes inside its declared write set.
|
|
65
|
+
- Writing agents run serially unless write sets are disjoint.
|
|
66
|
+
- Debugger fixes the smallest failing path, not adjacent design.
|
|
67
|
+
- Main agent integrates summaries, resolves conflicts, and runs final verification.
|
|
68
|
+
|
|
69
|
+
## Parallel Dispatch
|
|
70
|
+
|
|
71
|
+
Use [subagents.md](subagents.md) and [dispatch.md](dispatch.md) for multi-agent work. Default to at most three active agents (WF mode overrides this; see [WF.md](WF.md)). In `/wf max`, the CEO/Manager/Worker hierarchy in [WF-MAX.md](WF-MAX.md) overrides this limit entirely with wave-based parallel dispatch. Prefer parallel read-only work first, then serial writes.
|
|
72
|
+
|
|
73
|
+
Every dispatched agent returns the handoff format defined in [dispatch.md](dispatch.md).
|
|
74
|
+
|
|
75
|
+
## Conflict Rule
|
|
76
|
+
|
|
77
|
+
If PRD, task PLAN.md, architecture, ports, tests, or code disagree:
|
|
78
|
+
|
|
79
|
+
1. stop implementation
|
|
80
|
+
2. record the conflict in `Harness/tasks/<task-id>/PROGRESS.md` or the feature doc
|
|
81
|
+
3. choose the smallest reversible decision
|
|
82
|
+
4. ask the maintainer when user-visible behavior or security is affected
|
|
83
|
+
|
|
84
|
+
## Completion Gate
|
|
85
|
+
|
|
86
|
+
Close only when:
|
|
87
|
+
|
|
88
|
+
- acceptance criteria are satisfied
|
|
89
|
+
- verification evidence is recorded
|
|
90
|
+
- architecture docs are synced if affected
|
|
91
|
+
- no unresolved critical/high review findings remain
|
|
92
|
+
- any optimistic UI mutation has a declared and verified rollback path
|
|
93
|
+
- any file declared as DONE in PLAN.md or PROGRESS.md exists on disk (chat output is not durable evidence)
|
|
94
|
+
- `Harness/tasks/<task-id>/PROGRESS.md` states the final status or next iteration
|
|
@@ -123,4 +123,4 @@ CLI args / prompts
|
|
|
123
123
|
|
|
124
124
|
- Interactive confirmation currently happens before full conflict-plan display in interactive mode.
|
|
125
125
|
- Some README tests assert exact prose and can be made more structural.
|
|
126
|
-
- `
|
|
126
|
+
- `subagent-orchestrator` routing priority should continue to be tightened in templates.
|