create-harness-vibe-coding 0.2.1 → 0.3.1

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.
Files changed (51) hide show
  1. package/README-CN.md +58 -57
  2. package/README.md +108 -23
  3. package/package.json +1 -1
  4. package/src/generator.js +2 -0
  5. package/templates/common/.claude/agents/context-master.md +78 -0
  6. package/templates/common/.claude/agents/debugger.md +1 -1
  7. package/templates/common/.claude/agents/docs-researcher.md +1 -1
  8. package/templates/common/.claude/agents/implementer.md +1 -1
  9. package/templates/common/.claude/agents/memory-master.md +67 -0
  10. package/templates/common/.claude/agents/planner.md +1 -1
  11. package/templates/common/.claude/agents/researcher.md +1 -1
  12. package/templates/common/.claude/agents/test-writer.md +1 -1
  13. package/templates/common/.claude/agents/verifier.md +1 -1
  14. package/templates/common/.claude/commands/update.md +11 -0
  15. package/templates/common/.claude/commands/wf-max.md +28 -0
  16. package/templates/common/.claude/commands/wf.md +10 -4
  17. package/templates/common/.claude/rules/ecc/common.md +2 -2
  18. package/templates/common/.claude/skills/harness-build-loop/SKILL.md +2 -1
  19. package/templates/common/.claude/skills/harness-context/SKILL.md +2 -1
  20. package/templates/common/.claude/skills/harness-lifecycle/SKILL.md +2 -1
  21. package/templates/common/.claude/skills/harness-research/SKILL.md +2 -1
  22. package/templates/common/.claude/skills/harness-router/SKILL.md +1 -1
  23. package/templates/common/.claude/skills/readme-optimizer/SKILL.md +3 -2
  24. package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +5 -3
  25. package/templates/common/.claude/skills/wf-max/SKILL.md +95 -0
  26. package/templates/common/.claude/skills/wf-mode/SKILL.md +9 -4
  27. package/templates/common/.claude/skills/wf-update/SKILL.md +58 -0
  28. package/templates/common/.harness-version +8 -0
  29. package/templates/common/CLAUDE.md +14 -5
  30. package/templates/common/MEMORY.md +8 -1
  31. package/templates/common/README.md +2 -2
  32. package/templates/common/SETUP.md +24 -14
  33. package/templates/common/docs/README.md +28 -16
  34. package/templates/common/docs/features/_template.md +11 -1
  35. package/templates/common/docs/harness/PLAN.md +37 -88
  36. package/templates/common/docs/harness/PROGRESS.md +17 -0
  37. package/templates/common/docs/harness/WF-MAX.md +134 -0
  38. package/templates/common/docs/harness/WF.md +20 -9
  39. package/templates/common/docs/harness/agent-workflow.md +19 -7
  40. package/templates/common/docs/harness/architecture.md +1 -1
  41. package/templates/common/docs/harness/context-loading.md +17 -5
  42. package/templates/common/docs/harness/dispatch.md +13 -6
  43. package/templates/common/docs/harness/extension.md +4 -4
  44. package/templates/common/docs/harness/lifecycle.md +2 -2
  45. package/templates/common/docs/harness/subagents.md +25 -7
  46. package/templates/common/docs/research/README.md +3 -3
  47. package/templates/common/docs/tasks/_template/ARTIFACTS.md +3 -0
  48. package/templates/common/docs/tasks/_template/NOTES.md +3 -0
  49. package/templates/common/docs/tasks/_template/PLAN.md +40 -0
  50. package/templates/common/docs/tasks/_template/PROGRESS.md +29 -0
  51. package/templates/common/scripts/validate-harness.mjs +70 -7
@@ -6,9 +6,9 @@ Use when context is growing, subagents are needed, or an agent is unsure which h
6
6
 
7
7
  `Harness/README.md` is the primary router. This file is a secondary context-splitting protocol for subagents and long tasks.
8
8
 
9
- If this file and `Harness/README.md` disagree, follow `Harness/README.md`, record the assumption in `Harness/PLAN.md`, and update this file later.
9
+ If this file and `Harness/README.md` disagree, follow `Harness/README.md`, record the assumption in `Harness/tasks/<task-id>/PROGRESS.md`, and update this file later.
10
10
 
11
- 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/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
11
+ 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.
12
12
 
13
13
  ## Main Context
14
14
 
@@ -17,7 +17,9 @@ Always keep:
17
17
  - `CLAUDE.md`
18
18
  - `Harness/MEMORY.md`
19
19
  - `Harness/README.md`
20
- - `Harness/PLAN.md` when active
20
+ - `Harness/PROGRESS.md` when active
21
+ - `Harness/tasks/<task-id>/PROGRESS.md` when active
22
+ - `Harness/tasks/<task-id>/PLAN.md` when active
21
23
  - current feature doc when active
22
24
 
23
25
  Load other docs only by trigger.
@@ -30,8 +32,8 @@ Load other docs only by trigger.
30
32
  | research, competitors, stack choice | `Harness/research/README.md`, `Harness/research/research-results.md` |
31
33
  | official docs, API, SDK, version, limits | `Harness/research/README.md`, `Harness/architecture.md`, `Harness/domain/ports.md` as needed |
32
34
  | layer, dependency, module boundary | `Harness/architecture.md`, `Harness/domain/ports.md` |
33
- | task split, owner, write set | `Harness/PLAN.md`, `Harness/agent-workflow.md` |
34
- | parallel agents, dispatch, worktree decision | `Harness/subagents.md`, `Harness/dispatch.md`, `Harness/PLAN.md` |
35
+ | task split, owner, write set | `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, `Harness/agent-workflow.md` |
36
+ | parallel agents, dispatch, worktree decision | `Harness/subagents.md`, `Harness/dispatch.md`, `Harness/tasks/<task-id>/PLAN.md` |
35
37
  | memory, repeated tool failure, repeated user correction, reusable lesson | `Harness/MEMORY.md`, the relevant `Harness/memory/*.md` file |
36
38
  | event, retry, failure path | `Harness/data-flow.md` |
37
39
  | status, transition, resume | `Harness/state-machines.md` |
@@ -89,6 +91,16 @@ Verifier:
89
91
  - forbid: code changes
90
92
  - return: commands run, results, residual risk
91
93
 
94
+ Memory Master:
95
+ - inject: trigger reason, current failure/user-correction/closeout context, task PROGRESS.md section
96
+ - forbid: source code, unrelated Harness docs
97
+ - return: memory action summary, files written, cross-project flag
98
+
99
+ Context Master:
100
+ - inject: trigger reason (threshold % or closeout), current task PROGRESS.md, task phase
101
+ - forbid: source code, memory files, MEMORY.md writes
102
+ - return: context usage %, stale blocks, compressible blocks, durable knowledge candidates, compression suggestion
103
+
92
104
  ## Handoff Rule
93
105
 
94
106
  Only the subagent summary enters main context. If details are needed, load the named files directly instead of replaying the subagent conversation.
@@ -10,18 +10,19 @@ Use when work needs parallel reading, independent review, cross-layer analysis,
10
10
 
11
11
  - Main agent owns the final decision, integration, and verification.
12
12
  - project files are the only durable communication channel; chat/subagent transcript state is non-authoritative.
13
- - Important assumptions, decisions, blockers, evidence, and handoffs must be written to `Harness/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
14
- - Prefer three or fewer active agents.
13
+ - 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.
14
+ - Prefer three or fewer active agents (WF mode overrides this; see [WF.md](WF.md)).
15
15
  - Read-only agents may run in parallel.
16
16
  - Writing agents run serially unless write sets are disjoint.
17
17
  - Use a worktree when two agents may touch overlapping files or long-running branches.
18
18
  - Only summaries enter main context. Load named files directly when details are needed.
19
+ - Subagents read task files, return findings and PLAN patch suggestions. Only the main agent commits changes to PROGRESS.md and PLAN.md.
19
20
 
20
21
  ## Dispatch Loop
21
22
 
22
23
  ```text
23
24
  Goal
24
- -> Fill PLAN tasks and Parallel Dispatch
25
+ -> Fill task PROGRESS.md and PLAN.md
25
26
  -> Apply subagents.md efficiency ladder
26
27
  -> Run parallel read-only agents
27
28
  -> Main agent integrates findings
@@ -29,7 +30,7 @@ Goal
29
30
  -> Implementer makes bounded change
30
31
  -> Reviewer checks diff
31
32
  -> Verifier records evidence
32
- -> Main agent updates PLAN and closes or iterates
33
+ -> Main agent updates task files and closes or iterates
33
34
  ```
34
35
 
35
36
  ## Modes
@@ -54,6 +55,8 @@ Goal
54
55
  | `debugger` | Serial Write | smallest fix for a reproduced failure |
55
56
  | `reviewer` | Parallel Read | diff review, risks, missing tests |
56
57
  | `verifier` | Parallel Read | run checks and record evidence |
58
+ | `memory-master` | Serial Write | write/consolidate memory entries, dedup, cross-project extraction |
59
+ | `context-master` | Parallel Read | analyze context usage, recommend compression, extract session knowledge |
57
60
 
58
61
  ## Dispatch Rules
59
62
 
@@ -61,7 +64,8 @@ Goal
61
64
  - A write set of `none` means read-only.
62
65
  - If two write sets overlap, do not run those agents in parallel.
63
66
  - If an agent returns uncertainty, mark the row `Blocked` or add a follow-up row.
64
- - If docs, tests, and code disagree, stop implementation and record the conflict in `PLAN.md`.
67
+ - If docs, tests, and code disagree, stop implementation and record the conflict in `Harness/tasks/<task-id>/PROGRESS.md`.
68
+ - In /wf max, file claims must respect WF-MAX.md leaf condition: no split below 50 avgLines, no split when files ≤ span×2.
65
69
 
66
70
  ## Handoff Format
67
71
 
@@ -78,10 +82,13 @@ Evidence:
78
82
  Risks:
79
83
  Next:
80
84
  PLAN patch:
85
+ Concurrency group: <wave number — 0=exploration, 1,2,3,...=implementation waves. Optional; only used in /wf max.>
86
+ File claim: <list of exact file paths this agent exclusively owns. Optional; only used in /wf max.>
87
+ Granularity floor: <50 avgLines → do NOT spawn. Apply leaf condition from WF-MAX.md.>
81
88
  ```
82
89
 
83
90
  Use `Files changed: none` for read-only agents. Use `PLAN patch: none` when no state update is needed.
84
- If a handoff matters after context loss, write it to `Harness/PLAN.md`, the current feature doc, or `Harness/memory/*`; do not rely on chat transcript state.
91
+ If a handoff matters after context loss, write it to `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, the current feature doc, or `Harness/memory/*`; do not rely on chat transcript state.
85
92
 
86
93
  ## Statuses
87
94
 
@@ -12,7 +12,7 @@ Extensions must preserve project and harness ownership boundaries.
12
12
  - Treat existing project config as project fact. Read it before adding assets, then adapt new assets to the project instead of replacing the project.
13
13
  - Register added agents, skills, workflows, rules, and hooks in `Harness/MEMORY.md` and this docs router where applicable.
14
14
  - Added assets may extend `.claude/skills/`, `.claude/agents/`, `.claude/rules/`, or `Harness/workflows/`, but they must not replace core harness docs.
15
- - Core harness docs are `Harness/README.md`, `Harness/PLAN.md`, `Harness/subagents.md`, `Harness/context-loading.md`, `Harness/dispatch.md`, `Harness/agent-workflow.md`, and this file.
15
+ - Core harness docs are `Harness/README.md`, `Harness/PROGRESS.md`, `Harness/subagents.md`, `Harness/context-loading.md`, `Harness/dispatch.md`, `Harness/agent-workflow.md`, and this file.
16
16
  - If an optional workflow needs a new command or tool, document the command and fallback in `Harness/workflows/<name>.md` instead of changing core harness behavior.
17
17
 
18
18
  ## Agent Contract
@@ -55,10 +55,10 @@ Every added skill must state:
55
55
  - required inputs
56
56
  - allowed writes
57
57
  - output format
58
- - whether to update `Harness/PLAN.md`
58
+ - whether to update `Harness/PROGRESS.md` and task files
59
59
  - whether to use [subagents.md](subagents.md) and [dispatch.md](dispatch.md)
60
60
 
61
- Skills should extend the harness. They should not replace `Harness/README.md`, `PLAN.md`, `subagents.md`, `context-loading.md`, `dispatch.md`, or `agent-workflow.md`.
61
+ Skills should extend the harness. They should not replace `Harness/README.md`, `Harness/PROGRESS.md`, `subagents.md`, `context-loading.md`, `dispatch.md`, or `agent-workflow.md`.
62
62
 
63
63
  ## Rules
64
64
 
@@ -75,5 +75,5 @@ After adding assets:
75
75
  - list agents in `Harness/MEMORY.md#Agents`
76
76
  - list skills in `Harness/MEMORY.md#Skills`
77
77
  - list workflows by path in `Harness/MEMORY.md` or `Harness/README.md`
78
- - update `Harness/PLAN.md` when the asset affects current work
78
+ - update `Harness/PROGRESS.md` and `Harness/tasks/<task-id>/PROGRESS.md` when the asset affects current work
79
79
  - run `node Harness/scripts/validate-harness.mjs`
@@ -10,10 +10,10 @@ Use when starting a new product, clarifying a vague idea, or deciding the next p
10
10
  | Research | problem and constraints | `research/research-results.md` | `research/README.md` followed; at least 3 references or explicit reason not possible |
11
11
  | PRD | research decision | `research/PRD.md` | MVP, non-goals, acceptance criteria are verifiable |
12
12
  | Architecture | PRD | `Harness/architecture.md`, `Harness/domain/ports.md` | boundaries and first ports are defined |
13
- | Plan | PRD and architecture | `Harness/PLAN.md`, optional `Harness/dispatch.md`, one `Harness/features/<name>.md` per PRD scope item | tasks have owners, write sets, verification |
13
+ | Plan | PRD and architecture | `Harness/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, optional `Harness/dispatch.md`, one `Harness/features/<name>.md` per PRD scope item | tasks have owners, write sets, verification |
14
14
  | Build | plan and tests | minimal vertical slice | tests or manual checks prove behavior |
15
15
  | Verify | implementation | review findings, test evidence | no unresolved critical/high findings |
16
- | Feedback | verified slice | next iteration or release decision | learnings recorded in PRD, PLAN, or MEMORY |
16
+ | Feedback | verified slice | next iteration or release decision | learnings recorded in PRD, `Harness/tasks/<task-id>/PROGRESS.md`, or MEMORY |
17
17
 
18
18
  ## Operating Rules
19
19
 
@@ -4,7 +4,7 @@ Purpose: coordinate subagents for speed without losing control of scope, evidenc
4
4
 
5
5
  Use this file when work needs multiple roles, parallel reading, independent review, broad context, repeated failures, or `/wf`.
6
6
 
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/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
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
  ## Source Attribution
10
10
 
@@ -28,7 +28,7 @@ The main agent is the controller. It owns:
28
28
  - intent confidence and user questions
29
29
  - task decomposition
30
30
  - read/write set boundaries
31
- - dispatch table in `Harness/PLAN.md`
31
+ - dispatch table in `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch`
32
32
  - integration of returned summaries
33
33
  - final verification and closeout
34
34
 
@@ -49,6 +49,8 @@ Use the installed roster under `.claude/agents/` before inventing ad hoc roles.
49
49
  | `reviewer` | spec compliance, code quality, maintainability, security, missing tests |
50
50
  | `debugger` | reproduced failures, root cause isolation, smallest safe fix |
51
51
  | `verifier` | command execution, real browser/API checks, final evidence |
52
+ | `memory-master` | write/consolidate memory entries, dedup, cross-project extraction; dispatched on repeated failures, user corrections, and WF closeout |
53
+ | `context-master` | analyze context usage, recommend compression at ~85% window, extract durable session knowledge during closeout |
52
54
 
53
55
  ## WF Default Fan-Out
54
56
 
@@ -67,6 +69,8 @@ Then add phase-specific agents:
67
69
  - `reviewer` for spec and code-quality gates
68
70
  - `debugger` after a reproduced verification failure
69
71
  - `verifier` for final command/browser/API evidence
72
+ - `context-master` before closeout for knowledge extraction
73
+ - `memory-master` after repeated failures and during closeout for consolidation
70
74
 
71
75
  The default decision ratio is a 7:3 collaboration bias: choose multi-agent collaboration for substantial or uncertain work about 70% of the time; choose solo mode only for clearly local, low-risk work that is not explicitly in WF/WK mode.
72
76
 
@@ -81,6 +85,7 @@ Choose the cheapest coordination level that is safe.
81
85
  | Parallel read-only | broad reading, research, architecture, multiple independent failures | 2-3 read-only agents |
82
86
  | Serial build lane | normal feature or fix | test-writer -> implementer -> reviewers -> verifier |
83
87
  | Isolated lanes | disjoint write sets or competing approaches | separate worktrees, then review and merge |
88
+ | Max parallelism | 5+ disjoint files, fan-out benefit > coordination cost | /wf max: write-set coloring -> wave dispatch -> parallel review |
84
89
 
85
90
  Default for automatic WF triggers: 3-5 active read-only agents before second planning. For explicit WF/WK mode, never use the solo pass unless subagents are unavailable; use bounded role passes as the recorded fallback.
86
91
 
@@ -102,6 +107,18 @@ controller intake
102
107
 
103
108
  Use this shape for `/wf`, long tasks, multi-file changes, architecture work, migrations, browser/API behavior, or repeated failures.
104
109
 
110
+ ```text
111
+ /wf max orchestration shape:
112
+ controller intake
113
+ -> wave 0: max-parallel exploration (4-14 read-only agents)
114
+ -> controller synthesis: dependency graph + write-set coloring
115
+ -> wave 1: N parallel implementers (disjoint file claims)
116
+ -> wave 1 review: parallel spec/code/security reviewers
117
+ -> wave 2+: dependent implementers (if any)
118
+ -> integration verifier
119
+ -> closeout with evidence
120
+ ```
121
+
105
122
  ## Dispatch Pack
106
123
 
107
124
  Every subagent dispatch must be self-contained:
@@ -127,8 +144,9 @@ Do not make a subagent rediscover the entire project or read the whole harness.
127
144
  - Read-only agents may run in parallel.
128
145
  - Writing agents run serially unless write sets are disjoint and the controller has chosen an isolated worktree.
129
146
  - Reviewers may run in parallel after implementation, but spec compliance is evaluated before code-quality approval.
130
- - Do not let two agents edit `Harness/PLAN.md`, `Harness/MEMORY.md`, or `Harness/memory/*` concurrently. The controller writes durable state.
131
- - If two agents disagree, the controller records the conflict in `Harness/PLAN.md` and chooses the smallest reversible next step.
147
+ - Subagents are readers and reporters. They return findings and PLAN patch suggestions. Only the controller (main agent) commits state changes to task files.
148
+ - 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.
149
+ - If two agents disagree, the controller records the conflict in `Harness/tasks/<task-id>/PLAN.md` and chooses the smallest reversible next step.
132
150
 
133
151
  ## Review Gates
134
152
 
@@ -144,7 +162,7 @@ If either reviewer finds issues, the implementer or debugger fixes them and the
144
162
  | Status | Controller Action |
145
163
  | --- | --- |
146
164
  | `DONE` | start review gates |
147
- | `DONE_WITH_CONCERNS` | read concerns, decide whether to address before review, record in `PLAN.md` |
165
+ | `DONE_WITH_CONCERNS` | read concerns, decide whether to address before review, record in `Harness/tasks/<task-id>/PROGRESS.md` |
148
166
  | `NEEDS_CONTEXT` | provide only missing context and re-dispatch |
149
167
  | `BLOCKED` | change something: add context, split task, upgrade reasoning, use debugger, or ask user |
150
168
 
@@ -153,14 +171,14 @@ Never retry the same failed prompt unchanged.
153
171
  ## Failure Recovery
154
172
 
155
173
  - First failed verification: record evidence, dispatch debugger with the smallest reproduced failure.
156
- - Second same-class failure: narrow scope, update `PLAN.md#Heartbeat`, and add a reviewer before another fix.
174
+ - Second same-class failure: narrow scope, update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat`, and add a reviewer before another fix.
157
175
  - Third same-class failure: stop blind fixes. Present evidence-backed options to the user.
158
176
 
159
177
  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.
160
178
 
161
179
  ## Synthesis Output
162
180
 
163
- After subagents return, the controller writes one synthesis into `Harness/PLAN.md`:
181
+ After subagents return, the controller writes one synthesis into `Harness/tasks/<task-id>/PLAN.md`:
164
182
 
165
183
  ```text
166
184
  Agents used:
@@ -6,7 +6,7 @@ Purpose: guide agent research. Record conclusions in [research-results.md](resea
6
6
 
7
7
  Use this before PRD, stack choice, external API use, public dependency choice, pricing/legal/security assumptions, or any fact likely to change.
8
8
 
9
- Skip only when the task is local, narrow, and fully answerable from existing project files. Record the skip reason in `Harness/PLAN.md`.
9
+ Skip only when the task is local, narrow, and fully answerable from existing project files. Record the skip reason in `Harness/tasks/<task-id>/PROGRESS.md`.
10
10
 
11
11
  ## Research Agent
12
12
 
@@ -21,7 +21,7 @@ Built-in agents:
21
21
  - `.claude/agents/researcher.md`: product, market, open-source, dependency, pricing, policy, and ecosystem research.
22
22
  - `.claude/agents/docs-researcher.md`: official docs, API, SDK, config, limits, errors, and examples verification.
23
23
 
24
- For multi-agent research plus build work, create the dispatch table in `Harness/PLAN.md` and follow `Harness/dispatch.md`.
24
+ For multi-agent research plus build work, create the dispatch table in `Harness/tasks/<task-id>/PLAN.md` and follow `Harness/dispatch.md`.
25
25
 
26
26
  Research Agent input:
27
27
 
@@ -104,7 +104,7 @@ Use these patterns when turning research into PRD or feature docs:
104
104
 
105
105
  ## Write Target
106
106
 
107
- - Research process, queries, and limitations: this file or `Harness/PLAN.md`.
107
+ - Research process, queries, and limitations: this file or `Harness/tasks/<task-id>/PROGRESS.md`.
108
108
  - Final research decisions: [research-results.md](research-results.md).
109
109
  - Product scope: [PRD.md](PRD.md).
110
110
  - Architecture consequences: `Harness/architecture.md` and `Harness/domain/ports.md`.
@@ -0,0 +1,3 @@
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.
@@ -0,0 +1,3 @@
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.
@@ -0,0 +1,40 @@
1
+ # {{TASK_ID}} — PLAN
2
+
3
+ Task-level implementation plan and evidence. Main agent writes after second planning; implementer reads before coding.
4
+
5
+ ## Goal
6
+
7
+ ## Acceptance Criteria
8
+
9
+ - [ ]
10
+
11
+ ## Scope
12
+
13
+ Allowed write set:
14
+ -
15
+
16
+ Forbidden:
17
+ -
18
+
19
+ ## Loaded Context
20
+
21
+ -
22
+
23
+ ## Subagent Dispatch
24
+
25
+ | Agent | Mode | Read Set | Write Set | Status |
26
+ |-------|------|----------|-----------|--------|
27
+
28
+ ## Subagent Synthesis
29
+
30
+ Agents used:
31
+ Findings accepted:
32
+ Findings rejected:
33
+ Conflicts:
34
+ Decisions:
35
+ Residual risk:
36
+
37
+ ## Verification
38
+
39
+ | Check | Result | Notes |
40
+ |-------|--------|-------|
@@ -0,0 +1,29 @@
1
+ # {{TASK_ID}} — PROGRESS
2
+
3
+ Task-level progress and heartbeat. Main agent updates; subagents read only.
4
+
5
+ ## Current Goal
6
+
7
+ ## Phase
8
+
9
+ Current: Intake
10
+
11
+ ## Heartbeat
12
+
13
+ Last beat:
14
+ Current phase: Intake
15
+ Current blocker: none
16
+ Next beat trigger:
17
+ Failure count: 0
18
+ Recovery action: none
19
+
20
+ ## Tasks
21
+
22
+ | # | Task | Owner | Verify | Status |
23
+ |---|------|-------|--------|--------|
24
+ | 1 | Define goal and scope | main agent | recorded above | Pending |
25
+
26
+ ## Agent Handoffs
27
+
28
+ | Agent | Role | Context Pack | Result |
29
+ |-------|------|-------------|--------|
@@ -25,6 +25,8 @@ const commonAgents = [
25
25
  'debugger',
26
26
  'reviewer',
27
27
  'verifier',
28
+ 'memory-master',
29
+ 'context-master',
28
30
  ];
29
31
 
30
32
  const commonSkills = [
@@ -34,6 +36,8 @@ const commonSkills = [
34
36
  'harness-context',
35
37
  'harness-build-loop',
36
38
  'wf-mode',
39
+ 'wf-update',
40
+ 'wf-max',
37
41
  'subagent-orchestrator',
38
42
  'readme-optimizer',
39
43
  ];
@@ -50,13 +54,16 @@ const required = [
50
54
  'README.md',
51
55
  'Harness/MEMORY.md',
52
56
  'Harness/WF.md',
57
+ 'Harness/WF-MAX.md',
53
58
  ...memoryFiles,
54
59
  '.claude/settings.json',
55
60
  '.claude/commands/wf.md',
61
+ '.claude/commands/wf-max.md',
56
62
  '.claude/rules/ecc/common.md',
57
63
  ...commonAgents.map(agent => `.claude/agents/${agent}.md`),
58
64
  ...commonSkills.map(skill => `.claude/skills/${skill}/SKILL.md`),
59
65
  'Harness/README.md',
66
+ 'Harness/PROGRESS.md',
60
67
  'Harness/PLAN.md',
61
68
  'Harness/lifecycle.md',
62
69
  'Harness/subagents.md',
@@ -72,10 +79,13 @@ const required = [
72
79
  'Harness/research/research-results.md',
73
80
  'Harness/research/PRD.md',
74
81
  'Harness/domain/ports.md',
82
+ '.claude/skills/wf-update/SKILL.md',
83
+ '.claude/commands/update.md',
84
+ 'Harness/.harness-version',
75
85
  ];
76
86
 
77
87
  const projectFacts = [
78
- 'Harness/PLAN.md',
88
+ 'Harness/PROGRESS.md',
79
89
  'Harness/research/PRD.md',
80
90
  'Harness/research/research-results.md',
81
91
  'Harness/architecture.md',
@@ -93,6 +103,8 @@ const contextPacks = [
93
103
  'Reviewer:',
94
104
  'Debugger:',
95
105
  'Verifier:',
106
+ 'Memory Master:',
107
+ 'Context Master:',
96
108
  ];
97
109
 
98
110
  const durableCommunicationDocs = [
@@ -181,6 +193,37 @@ for (const rel of required) {
181
193
  }
182
194
  }
183
195
 
196
+ // Task capsule template files
197
+ const taskTemplateDir = path.join(root, 'Harness', 'tasks', '_template');
198
+ if (!fs.existsSync(taskTemplateDir)) {
199
+ errors.push('missing directory: Harness/tasks/_template/');
200
+ } else {
201
+ for (const f of ['PROGRESS.md', 'PLAN.md']) {
202
+ if (!fs.existsSync(path.join(taskTemplateDir, f))) {
203
+ errors.push(`missing task template file: Harness/tasks/_template/${f}`);
204
+ }
205
+ }
206
+ }
207
+
208
+ // Cross-reference: DONE files in task PLAN.md must exist on disk
209
+ const taskDirs = fs.existsSync(path.join(root, 'Harness', 'tasks'))
210
+ ? fs.readdirSync(path.join(root, 'Harness', 'tasks'), { withFileTypes: true })
211
+ .filter(e => e.isDirectory() && e.name !== '_template')
212
+ .map(e => e.name)
213
+ : [];
214
+ for (const taskDir of taskDirs) {
215
+ const planPath = `Harness/tasks/${taskDir}/PLAN.md`;
216
+ const planText = read(planPath);
217
+ if (!planText) continue;
218
+ const donePattern = /`([^`]+\.(?:md|mjs|js|ts|json|html|css))`[^\n]*DONE/gi;
219
+ for (const match of planText.matchAll(donePattern)) {
220
+ const claimedFile = match[1];
221
+ if (!fs.existsSync(path.join(root, claimedFile))) {
222
+ errors.push(`${planPath} claims '${claimedFile}' is DONE but file does not exist`);
223
+ }
224
+ }
225
+ }
226
+
184
227
  if (fs.existsSync(path.join(root, 'Harness/research/scaffolds.md'))) {
185
228
  errors.push('legacy research file should be renamed: Harness/research/scaffolds.md -> Harness/research/research-results.md');
186
229
  }
@@ -218,17 +261,26 @@ requireText('CLAUDE.md', 'Harness/MEMORY.md` is the memory/resource router', 'me
218
261
  requireText('CLAUDE.md', 'Harness/README.md#Load By Task', 'Harness task router');
219
262
  requireText('CLAUDE.md', 'Harness/SETUP.md` exists, follow it before normal project work', 'setup bootstrap contract');
220
263
  requireText('CLAUDE.md', 'subagent-orchestrator` and `Harness/subagents.md', 'subagent orchestrator entry trigger');
264
+ requireText('CLAUDE.md', 'Harness/PROGRESS.md` is the global task index', 'PROGRESS global task index');
265
+ requireText('CLAUDE.md', 'Harness/tasks/', 'task capsule directory reference');
266
+ requireText('CLAUDE.md', 'Subagents are readers and reporters', 'subagent state committer rule');
221
267
  for (const heading of ['## 2. Think Before Coding', '## 3. Simplicity First', '## 4. Surgical Changes', '## 5. Goal-Driven Execution']) {
222
268
  requireText('CLAUDE.md', heading, `Karpathy-style rule heading: ${heading}`);
223
269
  }
224
270
 
271
+ // Root PROGRESS.md structure check
272
+ const progress = read('Harness/PROGRESS.md');
273
+ if (progress) {
274
+ for (const heading of ['## Active Task', '## Task Index', '## Cross-Task Decisions']) {
275
+ if (!progress.includes(heading)) errors.push(`Harness/PROGRESS.md missing heading: ${heading}`);
276
+ }
277
+ }
278
+
279
+ // Legacy PLAN.md deprecation check (it exists as stub, no longer requires active task headings)
225
280
  const plan = read('Harness/PLAN.md');
226
281
  if (plan) {
227
- for (const heading of ['## Current Goal', '## Phase', '## Heartbeat', '## Success Criteria', '## Loaded Context', '## Tasks', '## Parallel Dispatch', '## Subagent Synthesis', '## Verification']) {
228
- if (!plan.includes(heading)) errors.push(`Harness/PLAN.md missing heading: ${heading}`);
229
- }
230
- for (const marker of ['Next beat trigger', 'Recovery action']) {
231
- if (!plan.includes(marker)) errors.push(`Harness/PLAN.md missing heartbeat marker: ${marker}`);
282
+ if (!plan.includes('DEPRECATED')) {
283
+ errors.push('Harness/PLAN.md should be a deprecation stub; see Harness/PROGRESS.md');
232
284
  }
233
285
  }
234
286
 
@@ -349,7 +401,7 @@ for (const agent of commonAgents) {
349
401
  }
350
402
 
351
403
  requireText('Harness/extension.md', 'Skills should extend the harness');
352
- requireText('Harness/agent-workflow.md', 'Harness/PLAN.md');
404
+ requireText('Harness/agent-workflow.md', 'Harness/tasks/<task-id>/PROGRESS.md');
353
405
  requireText('Harness/research/README.md', 'research-results.md');
354
406
  requireText('Harness/WF.md', 'Ralph-style harness loop', 'WF loop description');
355
407
  requireText('Harness/WF.md', 'Heartbeat Protocol', 'heartbeat protocol');
@@ -357,6 +409,7 @@ requireText('Harness/WF.md', 'WF mode requires multi-subagent orchestration by d
357
409
  requireText('Harness/WF.md', 'Explicit `/wf`, `wf mode`, `workflow mode`, or `wk mode` MUST spawn at least 3 distinct subagents', 'explicit WF/WK subagent minimum');
358
410
  requireText('Harness/WF.md', '.claude/agents/', 'WF built-in agent roster path');
359
411
  requireText('Harness/WF.md', '7:3 collaboration bias', 'WF collaboration bias');
412
+ requireText('Harness/WF.md', 'Harness/tasks/', 'WF task directory reference');
360
413
  requireText('Harness/README.md', '`/wf`, `wf mode`, `workflow mode`, or `wk mode`', 'WF/WK router aliases');
361
414
  requireText('Harness/README.md', 'explicit WF/WK loads subagent docs immediately', 'explicit WF/WK router output');
362
415
  requireText('.claude/skills/harness-router/SKILL.md', '`/wf`, `wf mode`, `workflow mode`, `wk mode`', 'harness-router WF/WK aliases');
@@ -384,6 +437,16 @@ requireText('Harness/architecture.md', '## 2. Interface Decoupling', 'architectu
384
437
  requireText('Harness/architecture.md', '## 3. State Design', 'architecture state design');
385
438
  requireText('Harness/architecture.md', 'Avoid speculative abstraction', 'anti-overengineering architecture rule');
386
439
  requireText('CLAUDE.md', 'Use explicit interfaces or state models only when they protect a real boundary', 'CLAUDE interface/state simplicity rule');
440
+ requireText('CLAUDE.md', '/wf update', 'wf update startup instruction');
441
+ requireText('Harness/README.md', 'Need harness update', 'update routing row');
442
+ requireText('Harness/WF-MAX.md', 'write-set coloring', 'WF-MAX coloring algorithm');
443
+ requireText('Harness/WF-MAX.md', 'wave dispatch', 'WF-MAX wave dispatch');
444
+ requireText('Harness/README.md', '/wf max', 'wf max router alias');
445
+ requireText('Harness/README.md', 'WF-MAX.md', 'WF-MAX router reference');
446
+ requireText('Harness/subagents.md', 'Max parallelism', 'subagents max parallelism row');
447
+ requireText('Harness/dispatch.md', 'Concurrency group', 'dispatch concurrency group field');
448
+ requireText('Harness/dispatch.md', 'File claim', 'dispatch file claim field');
449
+ requireText('CLAUDE.md', '/wf max', 'wf max startup instruction');
387
450
 
388
451
  if (errors.length) {
389
452
  console.error(`Harness validation failed${strict ? ' (strict)' : ''}:`);