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
@@ -2,12 +2,18 @@
2
2
 
3
3
  Enter `wf-mode`.
4
4
 
5
- Read `Harness/WF.md`, then run the full long-task loop:
5
+ ## Required
6
+
7
+ - Load `subagent-orchestrator` skill.
8
+ - Explicit `/wf`, `wf mode`, `workflow mode`, or `wk mode` MUST spawn at least 3 distinct subagents from `.claude/agents/` before second planning.
9
+ - Read `Harness/WF.md` and `.claude/skills/wf-mode/SKILL.md`.
10
+
11
+ ## Loop
6
12
 
7
13
  ```text
8
14
  intake
9
- -> exploration
10
- -> second plan
15
+ -> parallel read-only exploration (≥3 subagents)
16
+ -> synthesis + second plan
11
17
  -> test
12
18
  -> implement
13
19
  -> review
@@ -15,4 +21,4 @@ intake
15
21
  -> debugger recovery loop when needed
16
22
  ```
17
23
 
18
- Keep `Harness/PLAN.md#Heartbeat` current.
24
+ Keep `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` current.
@@ -9,9 +9,9 @@ alwaysApply: true
9
9
 
10
10
  - Start with `CLAUDE.md`, `Harness/MEMORY.md`, and `Harness/README.md`.
11
11
  - Do not bulk-read `Harness/`. Load by router trigger.
12
- - Keep `Harness/PLAN.md` current when work has multiple steps, files, or agents.
12
+ - Keep `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` current when work has multiple steps, files, or agents.
13
13
  - project files are the only durable communication channel. chat/subagent transcript state is non-authoritative.
14
- - 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
+ - Important assumptions, decisions, blockers, evidence, and handoffs must be written to `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
15
15
 
16
16
  ## Verification
17
17
 
@@ -10,7 +10,8 @@ Load:
10
10
  - `Harness/agent-workflow.md`
11
11
  - `Harness/subagents.md` when more than one agent, reviewer, or recovery pass is useful
12
12
  - `Harness/dispatch.md` when more than one agent is useful
13
- - `Harness/PLAN.md`
13
+ - `Harness/PROGRESS.md`
14
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
14
15
  - current feature doc if present
15
16
 
16
17
  Follow:
@@ -10,7 +10,8 @@ Load:
10
10
  - `Harness/subagents.md`
11
11
  - `Harness/context-loading.md`
12
12
  - `Harness/dispatch.md` when more than one agent is useful
13
- - `Harness/PLAN.md`
13
+ - `Harness/PROGRESS.md`
14
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
14
15
  - current feature doc if present
15
16
 
16
17
  For each subagent or bounded pass, provide:
@@ -9,7 +9,8 @@ Load:
9
9
 
10
10
  - `Harness/lifecycle.md`
11
11
  - `Harness/research/PRD.md`
12
- - `Harness/PLAN.md`
12
+ - `Harness/PROGRESS.md`
13
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
13
14
 
14
15
  Output:
15
16
 
@@ -9,7 +9,8 @@ Load:
9
9
 
10
10
  - `Harness/research/README.md`
11
11
  - `Harness/research/research-results.md`
12
- - `Harness/PLAN.md`
12
+ - `Harness/PROGRESS.md`
13
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
13
14
 
14
15
  Define:
15
16
 
@@ -11,6 +11,6 @@ description: Use at the start of any task, or when unsure which harness document
11
11
  - `/wf`, `wf mode`, `workflow mode`, `wk mode`, long, difficult, uncertain, repeated-failure, migration, architecture-heavy, browser-visible, or broad multi-agent implementation work routes to `wf-mode` first.
12
12
  - Bounded subagent-only coordination routes to `subagent-orchestrator`.
13
13
  4. Load only the listed primary doc(s). Let `wf-mode` decide when to load subagent docs.
14
- 5. If the task grows, update `Harness/PLAN.md` and use `harness-context`.
14
+ 5. If the task grows, update `Harness/tasks/<task-id>/PROGRESS.md` and use `harness-context`.
15
15
 
16
16
  Do not bulk-read `Harness/`.
@@ -12,7 +12,8 @@ Improve `README.md` without breaking project-owned public docs.
12
12
  - root `README.md`
13
13
  - package files and scripts (`package.json`, `pyproject.toml`, `go.mod`, etc.)
14
14
  - CI files when present
15
- - `Harness/PLAN.md`
15
+ - `Harness/PROGRESS.md`
16
+ - `Harness/tasks/<task-id>/PLAN.md` when available
16
17
  - `Harness/architecture.md` only when an architecture summary or diagram is requested
17
18
 
18
19
  ## Mode
@@ -35,7 +36,7 @@ If unanswered, use Preserve + append.
35
36
  - Use Mermaid or ASCII architecture diagrams only when the structure is observed or approved; label uncertain diagrams as proposed.
36
37
  - Keep detailed architecture in `Harness/architecture.md`; README may link to it or show a short overview.
37
38
  - Keep agent rules in `CLAUDE.md`/`AGENTS.md`, not README.
38
- - Record the chosen mode and any skipped README improvements in `Harness/PLAN.md`.
39
+ - Record the chosen mode and any skipped README improvements in `Harness/tasks/<task-id>/PLAN.md` when available.
39
40
 
40
41
  ## Output
41
42
 
@@ -10,14 +10,16 @@ Load:
10
10
  - `Harness/subagents.md`
11
11
  - `Harness/dispatch.md`
12
12
  - `Harness/context-loading.md`
13
- - `Harness/PLAN.md`
13
+ - `Harness/PROGRESS.md`
14
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when active
14
15
  - `Harness/agent-workflow.md`
15
16
  - `Harness/WF.md` when in `/wf`, `wf mode`, `workflow mode`, `wk mode`, or recovery loop
16
17
  - `.claude/agents/` roster names before choosing roles
17
18
 
18
19
  Follow:
19
20
 
20
- - The main agent is the controller. It decomposes work, writes `Harness/PLAN.md`, integrates returns, and owns final verification.
21
+ - The main agent is the controller. It decomposes work, writes `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md`, integrates returns, and owns final verification.
22
+ - Subagents are readers and reporters. Only the controller writes to task state files.
21
23
  - Use the efficiency ladder in `Harness/subagents.md`: solo pass -> single reviewer -> parallel read-only -> serial build lane -> isolated lanes.
22
24
  - Explicit WF/WK mode requires at least 3 distinct agents from `.claude/agents/` before second planning.
23
25
  - Prefer the built-in roles `planner`, `researcher`, `docs-researcher`, `architect`, `test-writer`, `implementer`, `reviewer`, `debugger`, and `verifier` before inventing custom roles.
@@ -26,7 +28,7 @@ Follow:
26
28
  - Use two review gates after implementation: spec review first, then code-quality or architecture review.
27
29
  - If verification fails, dispatch debugger/fixer with the smallest reproduced failure, then re-review and re-verify.
28
30
  - If subagents are unavailable, emulate the same roles as separate bounded passes and record that fallback.
29
- - When used outside `wf-mode`, update `Harness/PLAN.md#Parallel Dispatch`; update `Harness/PLAN.md#Heartbeat` only if an active heartbeat/recovery loop exists.
31
+ - When used outside `wf-mode`, update `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch`; update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` only if an active heartbeat/recovery loop exists.
30
32
 
31
33
  Return:
32
34
 
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: wf-max
3
+ description: Use for /wf max or maximum parallelism. Three-tier CEO→Manager→Worker hierarchy with recursive depth, per-domain span caps, and leaf-condition stop rules.
4
+ ---
5
+
6
+ # WF Max
7
+
8
+ CEO → Managers → Workers. Scale to 1000 agents via recursive depth. Full spec: `Harness/WF-MAX.md`.
9
+
10
+ ## Load
11
+
12
+ - `Harness/WF-MAX.md` — organization model, span formula, wave orchestration
13
+ - `Harness/subagents.md` — agent roster, controller role
14
+ - `Harness/dispatch.md` — File claim, Concurrency group handoff fields
15
+ - `Harness/agent-workflow.md` — cohesion rule (feature doc < Worker granularity)
16
+
17
+ ## Organization
18
+
19
+ ```
20
+ CEO(1) → Managers(span) → Workers(leaf) or Sub-Managers(depth≥3)
21
+ ```
22
+
23
+ - CEO: intent, scope, integration, final verification.
24
+ - Manager: domain partition → parallel dispatch → synthesize → report.
25
+ - Worker: single file (write) or single dimension (read). File claims must be file-level disjoint.
26
+ - depth≥3: Manager spawns Sub-Manager (span≤7). No mixed Worker+Sub-Manager in same wave.
27
+
28
+ ## Span Formula
29
+
30
+ ```
31
+ span = min(ceil(sqrt(files)), domain_cap)
32
+ Architecture: 3
33
+ Implementation: 5-7
34
+ Review: 7-10
35
+ Research: 10-12
36
+ ```
37
+
38
+ ## Total Agents
39
+
40
+ ```
41
+ total(depth, span) = Σ span^L for L=0..depth
42
+ ```
43
+
44
+ No hard cap. Governed by leaf condition + overhead filter.
45
+
46
+ ## Leaf Condition
47
+
48
+ ```
49
+ stop if: files ≤ span×2 | avgLines < 50 | overhead > 0.30
50
+ ```
51
+
52
+ Overhead threshold: `overhead > 0.30 → degrade to /wf`
53
+
54
+ ## Manager Types (4)
55
+
56
+ | Type | Span | Workers |
57
+ |------|------|---------|
58
+ | Explore-Mgr | 5-10 | researcher₁..ₙ, domain-explorer₁..ₙ |
59
+ | Architect-Mgr | 3 | boundary-researcher, interface-designer, data-flow-mapper |
60
+ | Implement-Mgr | 5-7 | implementer₁..ₙ (1 file_claim/Worker) |
61
+ | Review-Mgr | 3-4 | reviewer-spec, reviewer-code, reviewer-security |
62
+
63
+ ## Manager Synthesis
64
+
65
+ ```
66
+ 1. COLLECT → 2. DEDUPLICATE → 3. CONFLICT (flag, no silent resolve) → 4. SYNTHESIZE → 5. REPORT
67
+ ```
68
+ Worker failure: retry 1× → absorb or escalate to CEO.
69
+
70
+ ## Wave Orchestration
71
+
72
+ ```
73
+ W0: Explore-Mgr → N parallel → synthesize → CEO
74
+ W1: Architect-Mgr → 3 parallel → boundary contract → CEO approval
75
+ W2: Implement-Mgr → write-set coloring → wave dispatch: N parallel → merge → CEO
76
+ W2R: Review-Mgr → 3-4 parallel → dedupe+severity → CEO assigns fixes
77
+ W3+: Dependent waves (repeat W2)
78
+ CLOSEOUT: CEO → context-master + memory-master (direct)
79
+ ```
80
+
81
+ ## When NOT to Use
82
+
83
+ - files <5 → /wf
84
+ - all changes share single interface → serial
85
+ - overhead > 30% → degrade
86
+
87
+ ## /wf vs /wf max
88
+
89
+ | | /wf | /wf max |
90
+ |---|-----|------|
91
+ | Organization | flat | CEO→Mgr→Worker (3-tier) |
92
+ | Span formula | none | sqrt(files) + domain cap |
93
+ | Recursive depth | 0 | 1-3 (scales to 1000) |
94
+ | Granularity floor | none | <50 lines no split |
95
+ | Context threshold | ~85% | ~70% |
@@ -8,7 +8,8 @@ description: Use for /wf, wf mode, workflow mode, wk mode, long difficult tasks,
8
8
  Load:
9
9
 
10
10
  - `Harness/WF.md`
11
- - `Harness/PLAN.md`
11
+ - `Harness/PROGRESS.md`
12
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when active
12
13
  - `Harness/agent-workflow.md` when implementation, review, or verification starts
13
14
  - `Harness/subagents.md`, `Harness/dispatch.md`, and `Harness/context-loading.md` immediately for explicit WF/WK mode; otherwise only when coordinating subagents or bounded role passes
14
15
  - current feature doc when one exists
@@ -24,25 +25,29 @@ intake + 95% confidence gate
24
25
  -> bounded implementation
25
26
  -> review
26
27
  -> verification
27
- -> debugger recovery loop when verification fails
28
+ -> debugger recovery loop when verification fails (dispatch memory-master after 3 same-class failures)
29
+ -> context-master session analysis + knowledge extraction
30
+ -> memory-master consolidation
28
31
  -> close with evidence
29
32
  ```
30
33
 
31
34
  Rules:
32
35
 
33
- - Update `Harness/PLAN.md#Heartbeat` before long commands, after failures, before handoff, and at closeout.
36
+ - Update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` before long commands, after failures, before handoff, and at closeout.
34
37
  - Explicit `/wf`, `wf mode`, `workflow mode`, or `wk mode` MUST use `subagent-orchestrator` and spawn at least 3 distinct subagents from `.claude/agents/` before second planning.
35
38
  - Use the 7:3 collaboration bias from `Harness/WF.md`: default to multi-agent collaboration for substantial work; use solo mode only for clearly small/local tasks outside explicit WF/WK mode.
36
39
  - Use `subagent-orchestrator` and `Harness/subagents.md` when the task has broad reading, cross-layer impact, independent review needs, or repeated failures.
40
+ - Subagents return findings and PLAN patch suggestions. Only the main agent writes to task PROGRESS.md and PLAN.md.
37
41
  - If subagents are unavailable, emulate the same roles as separate bounded passes.
38
42
  - Do not claim browser/UI acceptance without real-browser evidence from Chrome DevTools, CDP, Playwright, or documented manual browser checks.
39
43
  - If `Harness/workflows/browser-e2e.md` is not installed, use `Harness/WF.md#Browser And API Evidence` as the fallback evidence contract or ask the user before adding the optional workflow.
40
- - If the same failure class happens three times, stop blind fixes and ask the user with evidence-backed options.
44
+ - If the same failure class happens three times, dispatch `memory-master` to record the failure pattern first, then ask the user with evidence-backed options.
41
45
 
42
46
  Return:
43
47
 
44
48
  - changed files
45
49
  - agents or bounded passes used
50
+ - memory-master / context-master dispatches
46
51
  - commands run
47
52
  - browser/API evidence when applicable
48
53
  - review findings
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: wf-update
3
+ description: Use when the user says /wf update, wf update, update harness, or check for updates. Fetches latest template files from GitHub, compares against stored checksums, and applies incremental updates safely.
4
+ ---
5
+
6
+ # WF Update
7
+
8
+ GitHub-based incremental harness update. Pulls latest template files and compares against stored checksums in `Harness/.harness-version`.
9
+
10
+ ## Load
11
+
12
+ - `Harness/.harness-version`
13
+ - `Harness/README.md#Update Mechanism` row (when available)
14
+
15
+ ## How It Works
16
+
17
+ 1. Read `Harness/.harness-version` -- get current `generator` version and stored `checksums`.
18
+ 2. Fetch the latest template file list from GitHub:
19
+ - Base URL: `https://raw.githubusercontent.com/zingspark/create-harness-vibe-coding/main/templates/common/`
20
+ - Fetch `.harness-version` from the repo first to get the latest version and expected file list.
21
+ - If the repo version equals the local version, report "Already up to date."
22
+ 3. For each file in the repo's checksums map:
23
+ - Compute SHA-256 of the fetched file content (normalize line endings to LF).
24
+ - Compare against the local stored checksum in `Harness/.harness-version`.
25
+ 4. Classify each difference:
26
+ - **SAFE** (TIER 1): Harness runtime files. If local checksum matches stored -> file is unmodified -> safe to overwrite with fetched version.
27
+ - **PRESERVE** (TIER 2): User data files. Never overwrite. (`Harness/PROGRESS.md`, `Harness/tasks/**`, `Harness/memory/**`, `Harness/research/PRD.md`, `Harness/research/research-results.md`, `Harness/architecture.md`, `Harness/domain/ports.md`, `Harness/features/**`, root `README.md`, `.gitignore`)
28
+ - **MERGE** (TIER 3): Dual-purpose files. If local checksum matches stored -> safe to overwrite. If mismatch -> user modified -> report as merge candidate, never auto-overwrite. (`CLAUDE.md`, `Harness/MEMORY.md`, `Harness/README.md`)
29
+ 5. For files in the GitHub repo NOT in local checksums: classify as NEW, plan to create.
30
+ 6. Report update plan: `updated/N, merge/N, created/N, skipped/N`
31
+ 7. If `--check` flag: report only, do not write.
32
+ 8. Apply updates:
33
+ - SAFE files: overwrite with fetched content.
34
+ - NEW files: create.
35
+ - MERGE files with matching checksums: overwrite.
36
+ - MERGE files with mismatched checksums: skip, warn user.
37
+ - PRESERVE files: never touched.
38
+ 9. Update `Harness/.harness-version`:
39
+ - Update `generator` to latest version.
40
+ - Update `generated` timestamp.
41
+ - Recompute and store checksums for all updated files.
42
+ 10. Record update in `Harness/tasks/harness-update/PROGRESS.md` (create task capsule if needed).
43
+
44
+ ## Rules
45
+
46
+ - Never overwrite PRESERVE files.
47
+ - Never auto-overwrite MERGE files with mismatched checksums.
48
+ - If offline (cannot reach GitHub), report and exit cleanly.
49
+ - After update, suggest running `node Harness/scripts/validate-harness.mjs`.
50
+ - Subagents are readers and reporters. Only the main agent writes updated files.
51
+
52
+ ## Return
53
+
54
+ - Update plan summary
55
+ - Files updated
56
+ - Files skipped (with reasons)
57
+ - New version
58
+ - Validation suggestion
@@ -0,0 +1,8 @@
1
+ {
2
+ "generator": "{{generatorVersion}}",
3
+ "generated": "{{generatedTimestamp}}",
4
+ "options": [],
5
+ "autoCheck": true,
6
+ "source": "https://raw.githubusercontent.com/zingspark/create-harness-vibe-coding/main/templates/common/",
7
+ "checksums": {}
8
+ }
@@ -6,12 +6,17 @@ Root entry for Claude Code. Keep this file short.
6
6
 
7
7
  - If `Harness/` exists, this repository is governed by the Harness contract. Treat these files as mandatory operating instructions, not optional references.
8
8
  - Every session: load `Harness/MEMORY.md` first, then `Harness/README.md`.
9
- - If `Harness/SETUP.md` exists, follow it before normal project work; it is the install/bootstrap contract and may be deleted only after setup is complete.
9
+ - If `Harness/SETUP.md` exists, follow it before normal project work; it is the install/bootstrap contract and may be deleted after setup is complete.
10
10
  - `Harness/MEMORY.md` is the memory/resource router: agents, skills, durable memories, and cross-session lessons. Follow its registrations when selecting agents/skills or recording memory.
11
11
  - `Harness/README.md` is the task router. For every request, check `Harness/README.md#Load By Task`; if a row matches, read and follow those docs before acting.
12
- - If work spans more than one step, update `Harness/PLAN.md`.
13
- - Use `/wf`, `wf-mode`, `wf mode`, `workflow mode`, `wk mode`, or `Harness/WF.md` for long, difficult, uncertain, multi-file, or repeated-failure work.
12
+ - `Harness/PROGRESS.md` is the global task index. Load at session start to see active task and task history.
13
+ - If work spans more than one step, create a task capsule from `Harness/tasks/_template/` and update `Harness/tasks/<task-id>/PROGRESS.md`.
14
+ - Use `/wf`, `/wf max`, `wf-mode`, `wf mode`, `workflow mode`, `wk mode`, `Harness/WF.md`, or `Harness/WF-MAX.md` for long, difficult, uncertain, multi-file, or repeated-failure work.
14
15
  - Use `subagent-orchestrator` and `Harness/subagents.md` when coordinating multiple subagents.
16
+ - Use `/wf update` to check for and apply scaffold updates from GitHub. See `.claude/skills/wf-update/SKILL.md`.
17
+ - Subagents are readers and reporters. Only the main agent writes to `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md`.
18
+ - For memory writing and consolidation (repeated failures, user corrections, closeout), dispatch `memory-master`.
19
+ - For context analysis and compression alerts (~85% window), dispatch `context-master`.
15
20
  - Universal rules live in `.claude/rules/ecc/common.md`.
16
21
  - Never bulk-read `Harness/`; route through `Harness/README.md` and `Harness/MEMORY.md`.
17
22
 
@@ -20,7 +25,7 @@ Root entry for Claude Code. Keep this file short.
20
25
  - You must have **>=95% confidence** in user intent before writing implementation code.
21
26
  - If confidence is below 95%, stop and ask up to 3 blocking questions.
22
27
  - If multiple valid approaches exist and the choice affects architecture, scope, stack, or user-facing behavior, present trade-offs instead of picking silently.
23
- - State assumptions before implementation and record durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/PLAN.md`.
28
+ - State assumptions before implementation and record durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/tasks/<task-id>/PLAN.md`.
24
29
  - If something is unclear, stop. Name what is unclear and ask instead of guessing.
25
30
 
26
31
  ## 3. Simplicity First
@@ -44,7 +49,8 @@ Root entry for Claude Code. Keep this file short.
44
49
 
45
50
  - Define verifiable success criteria before implementation.
46
51
  - For bugs, reproduce the failure or document why reproduction is impossible before fixing.
47
- - For multi-step work, keep `Harness/PLAN.md` current with loaded context, task state, assumptions, and verification.
52
+ - For multi-step work, keep `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` current. The main agent is the only state committer; subagents return suggestions only.
53
+ - State assumptions before implementation and record durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/tasks/<task-id>/PLAN.md`.
48
54
  - Every task needs a test, build check, validator run, or recorded manual check.
49
55
  - Do not claim web/UI acceptance without real-browser evidence from Chrome DevTools, CDP, Playwright, or documented manual browser checks.
50
56
  - Do not place project build scripts, git conventions, run commands, or release process in this file. Put them in `README.md`.
@@ -57,4 +63,7 @@ Root entry for Claude Code. Keep this file short.
57
63
  - **Tool reflection trigger**: record a lightweight reflection when the same tool/use pattern fails 3+ times, or when a better command pattern/environment fix is found. Write it newest-first in `Harness/memory/tool-usage-reflections.md`.
58
64
  - **User correction trigger**: record a lightweight preference/correction when the user asks to remember it, or when the user corrects the same assumption/pattern 2+ times. Write it newest-first in `Harness/memory/user-corrections-preferences.md`.
59
65
  - **Agent lesson trigger**: record reusable lessons from review/debug loops in `Harness/memory/agent-lessons-patterns.md` when they would prevent recurrence.
66
+ - **WF auto-trigger**: when the same failure class happens 3+ times in a WF recovery loop, dispatch `memory-master` to record the failure pattern to `Harness/memory/agent-lessons-patterns.md` before asking the user.
67
+ - **Context threshold trigger**: when context approaches ~85% of the window, dispatch `context-master` to analyze and write a non-blocking compression suggestion to `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat`.
68
+ - **Closeout trigger**: during WF closeout, dispatch `context-master` to extract durable knowledge, then `memory-master` to consolidate into `Harness/memory/*`.
60
69
  - Never record secrets, credentials, tokens, or private data.
@@ -14,6 +14,8 @@
14
14
  - [debugger](../.claude/agents/debugger.md) — smallest fix for a reproduced failure.
15
15
  - [reviewer](../.claude/agents/reviewer.md) — read-only diff review and closeout risk.
16
16
  - [verifier](../.claude/agents/verifier.md) — verification commands and evidence.
17
+ - [memory-master](../.claude/agents/memory-master.md) — memory writing, dedup, consolidation, and cross-project knowledge extraction.
18
+ - [context-master](../.claude/agents/context-master.md) — context analysis, compression alerts, and session knowledge extraction for memory-master.
17
19
 
18
20
  Stack-specific agents can be added after the product shape is known.
19
21
 
@@ -27,6 +29,8 @@ Stack-specific agents can be added after the product shape is known.
27
29
  - [wf-mode](../.claude/skills/wf-mode/SKILL.md) — long-task workflow: exploration, second plan, implementation, review, verification, heartbeat, and recovery loop.
28
30
  - [subagent-orchestrator](../.claude/skills/subagent-orchestrator/SKILL.md) — controller-led subagent orchestration, parallel read-only passes, review gates, and recovery handoffs.
29
31
  - [readme-optimizer](../.claude/skills/readme-optimizer/SKILL.md) — README preservation, append-only development sections, structured tables, and approved architecture diagrams.
32
+ - [wf-update](../.claude/skills/wf-update/SKILL.md) — GitHub-based incremental harness update, checksum comparison, and safe in-place updates.
33
+ - [wf-max](../.claude/skills/wf-max/SKILL.md) — maximum-parallelism workflow: write-set coloring, wave dispatch, parallel review per dimension.
30
34
 
31
35
  Stack-specific skills can be added after the product shape is known.
32
36
 
@@ -39,9 +43,11 @@ Located under `.claude/rules/ecc/`, auto-loaded by the CC engine:
39
43
 
40
44
  ## Harness (Runtime)
41
45
 
42
- - [Active plan](PLAN.md)
46
+ - [Global progress](PROGRESS.md)
47
+ - [Task directory](tasks/)
43
48
  - [Docs router](README.md)
44
49
  - [WF mode](WF.md)
50
+ - [WF Max mode](WF-MAX.md)
45
51
  - [0-1 lifecycle](lifecycle.md)
46
52
  - [Research protocol](research/README.md)
47
53
  - [Context loading protocol](context-loading.md)
@@ -51,6 +57,7 @@ Located under `.claude/rules/ecc/`, auto-loaded by the CC engine:
51
57
  - [Architecture docs](architecture.md)
52
58
  - [Agent workflow](agent-workflow.md)
53
59
  - [Harness validator](scripts/validate-harness.mjs)
60
+ - [Version file](.harness-version)
54
61
 
55
62
  ## Memory Folder
56
63
 
@@ -20,7 +20,7 @@ Record the real project commands after bootstrap:
20
20
  # e.g. npm run build
21
21
  ```
22
22
 
23
- Replace the examples with the real commands discovered from this project. If a command is unknown, record the open question in `Harness/PLAN.md`.
23
+ Replace the examples with the real commands discovered from this project. If a command is unknown, record the open question in `Harness/tasks/<task-id>/PROGRESS.md`.
24
24
 
25
25
  ## Git And Release Notes
26
26
 
@@ -36,6 +36,6 @@ The agentic engineering harness lives in `Harness/`.
36
36
  - Follow `Harness/SETUP.md` before normal work while it exists.
37
37
  - Start at `Harness/README.md`.
38
38
  - Load memory and resource registrations from `Harness/MEMORY.md`.
39
- - Track active work in `Harness/PLAN.md`.
39
+ - Track active work in `Harness/PROGRESS.md` and `Harness/tasks/<task-id>/PROGRESS.md`.
40
40
  - Use `Harness/WF.md` or `/wf` for long, difficult, multi-agent work.
41
41
  - Use `Harness/subagents.md` when coordinating multiple agents.
@@ -9,7 +9,7 @@ This scaffold is a 0-1 product harness:
9
9
  - short agent entry files
10
10
  - dynamic docs router
11
11
  - PRD, research protocol, architecture, ports, data-flow, state templates
12
- - active `Harness/PLAN.md`
12
+ - active `Harness/PROGRESS.md`
13
13
  - `Harness/MEMORY.md` plus a `Harness/memory/` folder for durable self-learning, user corrections, and tool reflections
14
14
  - built-in common agents
15
15
  - subagent orchestration and context-loading protocol
@@ -26,7 +26,7 @@ Start Claude Code, then say:
26
26
  ```text
27
27
  Read Harness/SETUP.md. Bootstrap this project as a 0-1 product harness.
28
28
  Use Harness/README.md as the router. Keep context small.
29
- First clarify the idea, then create PRD, research, architecture, Harness/PLAN.md, and the first vertical-slice task.
29
+ First clarify the idea, then create PRD, research, architecture, Harness/PROGRESS.md and the first per-task plan, and the first vertical-slice task.
30
30
  ```
31
31
 
32
32
  ## Required Bootstrap Sequence
@@ -34,23 +34,23 @@ First clarify the idea, then create PRD, research, architecture, Harness/PLAN.md
34
34
  Claude must follow this order:
35
35
 
36
36
  1. Read `CLAUDE.md`, `Harness/MEMORY.md`, `Harness/README.md`, and `Harness/lifecycle.md`. Load `Harness/memory/*` only when the router or memory trigger applies.
37
- 2. Ask up to 3 blocking product questions. If not blocked, record assumptions in `Harness/PLAN.md`.
37
+ 2. Ask up to 3 blocking product questions. If not blocked, record assumptions in `Harness/tasks/<task-id>/PLAN.md`.
38
38
  3. Fill `Harness/research/PRD.md` with MVP, non-goals, and acceptance criteria.
39
39
  4. Read `Harness/research/README.md`, then fill `Harness/research/research-results.md` with adopted/rejected research choices.
40
40
  5. Fill minimum architecture: `Harness/architecture.md` and one port in `Harness/domain/ports.md`.
41
- 6. Create the first vertical-slice plan in `Harness/PLAN.md`.
41
+ 6. Create a task capsule from `Harness/tasks/_template/` and fill the first vertical-slice plan in `Harness/tasks/<task-id>/PLAN.md`.
42
42
  7. Use `Harness/subagents.md`, `Harness/context-loading.md`, and `Harness/dispatch.md` when explicit WF/WK mode or any spawned subagents are involved.
43
43
  8. Fill `Harness/data-flow.md` or `Harness/state-machines.md` only when the slice changes runtime flow, failure behavior, or state.
44
44
  9. Implement only after a failing test or manual verification step is defined.
45
45
  10. Run `node Harness/scripts/validate-harness.mjs --strict`.
46
- 11. Record final verification and next feedback step in `Harness/PLAN.md`. If repeated tool failures, repeated user corrections, or reusable review/debug lessons appeared, record the concise reflection in the relevant `Harness/memory/` file.
46
+ 11. Record final verification and next feedback step in `Harness/tasks/<task-id>/PROGRESS.md`. If repeated tool failures, repeated user corrections, or reusable review/debug lessons appeared, record the concise reflection in the relevant `Harness/memory/` file.
47
47
 
48
48
  ## Existing Project Bootstrap Sequence
49
49
 
50
50
  When adding this harness to a project that already has source code, docs, CI, or tool configuration, treat the existing project as the source of truth before filling harness docs.
51
51
 
52
52
  1. Scan existing project facts first: `README.md`, package files (`package.json`, `pyproject.toml`, `go.mod`, etc.), test commands, app entry points, CI files, existing docs, and current run/build scripts.
53
- 2. Record discovered facts and open questions in `Harness/PLAN.md` before changing harness docs.
53
+ 2. Record discovered facts and open questions in `Harness/tasks/<task-id>/PROGRESS.md` before changing harness docs.
54
54
  3. Fill `Harness/research/PRD.md`, `Harness/research/research-results.md`, `Harness/architecture.md`, and `Harness/domain/ports.md` from observed project facts plus explicit user input.
55
55
  4. Existing configuration is project fact. Do not overwrite `CLAUDE.md`, `AGENTS.md`, `.claude/`, `.gitignore`, settings, hooks, package files, CI, docs routers, or workflow docs unless the user explicitly approves that exact overwrite.
56
56
  5. When a harness file conflicts with an existing file, preserve the existing file and register any missing harness guidance manually using `Harness/extension.md`.
@@ -123,7 +123,9 @@ The harness validator checks for specific structural invariants. When comparing
123
123
  | `Harness/context-loading.md` | The durable communication invariant; `Harness/README.md is the primary router`; all 10 subagent context packs (Explorer Pass, Planner, Researcher, Docs Researcher, Architect, Test Writer, Implementer, Reviewer, Debugger, Verifier) |
124
124
  | `Harness/subagents.md` | `## Source Attribution`; `## Built-in Agent Roster`; `## WF Default Fan-Out`; `Controller Role`; `Efficiency Ladder`; `Review Gates`; `7:3 collaboration bias`; source markers for `npx skills find`, `dispatching-parallel-agents`, and `subagent-driven-development` |
125
125
  | `Harness/architecture.md` | `## 2. Interface Decoupling`; `## 3. State Design`; `Avoid speculative abstraction`; layer constraints derived from actual project facts |
126
- | `Harness/PLAN.md` | `## Current Goal`, `## Phase`, `## Success Criteria`, `## Loaded Context`, `## Tasks`, `## Parallel Dispatch`, `## Subagent Synthesis`, `## Verification` headings |
126
+ | `Harness/PROGRESS.md` | global task index with Active Task and task history; cross-task decisions |
127
+ | `Harness/tasks/<id>/PROGRESS.md` | `## Current Goal`, `## Phase`, `## Heartbeat`, `## Loaded Context` headings |
128
+ | `Harness/tasks/<id>/PLAN.md` | `## Tasks`, `## Parallel Dispatch`, `## Subagent Synthesis`, `## Verification` headings |
127
129
  | `Harness/SETUP.md` | Only meaningful for fresh projects. If the project has its own onboarding docs, skip this file entirely (it is temporary). If kept, ensure the "Existing Project Bootstrap Sequence" is present. |
128
130
  | `Harness/workflows/browser-e2e.md` (if installed as optional) | `data-testid`, `accessible labels/roles`, and `inputs, buttons, filters, rows, empty/error/loading states` requirement |
129
131
  | `Harness/workflows/ts-react-frontend.md` (if installed as optional) | Same UI selector contract as above |
@@ -133,7 +135,8 @@ The harness validator checks for specific structural invariants. When comparing
133
135
 
134
136
  - `Harness/memory/tool-usage-reflections.md`, `Harness/memory/user-corrections-preferences.md`, `Harness/memory/agent-lessons-patterns.md` — these are new empty files
135
137
  - `.claude/agents/*.md` — all 9 common agents
136
- - `.claude/skills/harness-*/SKILL.md`, `.claude/skills/wf-mode/SKILL.md`, and `.claude/skills/subagent-orchestrator/SKILL.md` — core harness skills, WF mode, and subagent orchestration
138
+ - `.claude/skills/harness-*/SKILL.md`, `.claude/skills/wf-mode/SKILL.md`, `.claude/skills/wf-update/SKILL.md`, and `.claude/skills/subagent-orchestrator/SKILL.md` — core harness skills, WF mode, and subagent orchestration
139
+ - `.claude/commands/update.md` — /wf update command bridge
137
140
  - `.claude/rules/ecc/common.md` — universal rules (unless the project has custom rules in this file)
138
141
  - `.claude/settings.json` — harness settings
139
142
  - `Harness/WF.md`, `Harness/lifecycle.md`, `Harness/subagents.md`, `Harness/agent-workflow.md`, `Harness/architecture.md`, `Harness/data-flow.md`, `Harness/state-machines.md` — harness runtime docs
@@ -151,7 +154,7 @@ npx create-harness-vibe-coding@latest my-app ./my-app -y --preset web-app
151
154
 
152
155
  ### Template Fill Guide
153
156
 
154
- Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeholder expects. Replace all markers in the doc before moving to the next doc. If a section does not apply yet, leave the `{{...}}` but record why in `Harness/PLAN.md`.
157
+ Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeholder expects. Replace all markers in the doc before moving to the next doc. If a section does not apply yet, leave the `{{...}}` but record why in `Harness/tasks/<task-id>/PLAN.md`.
155
158
 
156
159
  **`Harness/research/PRD.md`** — Product scope. Fill with product facts from user input, not guesses:
157
160
  - `{{WHY_THIS_PROJECT_EXISTS}}`: one-sentence motivation
@@ -181,9 +184,16 @@ Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeh
181
184
  - For each port: fill Purpose, Preconditions, Postconditions, Error Semantics, Idempotency.
182
185
  - Leave remaining rows as `{{...}}` until more slices add ports.
183
186
 
184
- **`Harness/PLAN.md`** — Active execution state. Update continuously:
187
+ **`Harness/PROGRESS.md`** — Global task index. Update at session start and task closeout:
188
+ - `## Active Task`: current active task ID.
189
+ - `## Task History`: closed tasks with date, result, and archive path.
190
+
191
+ **`Harness/tasks/<id>/PROGRESS.md`** — Per-task progress state. Update continuously:
185
192
  - `## Current Goal`: one sentence, what this iteration achieves.
186
193
  - `## Phase`: current lifecycle phase (Idea/Research/PRD/Architecture/Plan/Build/Verify/Feedback).
194
+ - `## Heartbeat`: last beat time, mode, blocker, recovery action.
195
+
196
+ **`Harness/tasks/<id>/PLAN.md`** — Per-task implementation plan and evidence. Update continuously:
187
197
  - `## Success Criteria`: verifiable outcomes for this iteration.
188
198
  - `## Tasks`: numbered tasks with owner, write set, and verify command.
189
199
  - `## Parallel Dispatch`: only when spawning subagents — fill agent roles, read/write boundaries.
@@ -198,11 +208,11 @@ Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeh
198
208
  - `{{EVENT_1}}`: the first event type with producer, consumers, payload fields, delivery semantics.
199
209
  - Happy Path: fill the Mermaid sequence diagram with actual ports and actions.
200
210
  - Failure Paths: for each failure point, document trigger, system behavior, event, caller perception, recovery.
201
- - If the first slice is synchronous and stateless, leave this doc as `{{...}}` and note in PLAN.md.
211
+ - If the first slice is synchronous and stateless, leave this doc as `{{...}}` and note in `Harness/tasks/<task-id>/PLAN.md`.
202
212
 
203
213
  **`Harness/state-machines.md`** — State transitions (only when first slice has stateful entities):
204
214
  - Define states, transitions, guards, and illegal transitions for the first stateful entity.
205
- - If no stateful entity exists in the first slice, leave as `{{...}}` and note in PLAN.md.
215
+ - If no stateful entity exists in the first slice, leave as `{{...}}` and note in `Harness/tasks/<task-id>/PLAN.md`.
206
216
 
207
217
  **General rules for all templates**:
208
218
  - Replace `{{projectName}}` with the actual project name immediately.
@@ -234,7 +244,7 @@ After research, fill these docs in order:
234
244
  3. `Harness/domain/ports.md` — Define ONE driving port and ONE driven port from the first vertical slice. More ports come with more slices.
235
245
  4. `Harness/data-flow.md` — Fill the happy path for the first slice only. Add failure paths when they differ from the happy path.
236
246
 
237
- **Constraint**: If the research does not give you enough confidence to fill a section, leave the `{{...}}` placeholder and record the open question in `Harness/PLAN.md`. The strict validator will catch it.
247
+ **Constraint**: If the research does not give you enough confidence to fill a section, leave the `{{...}}` placeholder and record the open question in `Harness/tasks/<task-id>/PLAN.md`. The strict validator will catch it.
238
248
 
239
249
  ## User Confirmation Protocol (Non-Negotiable)
240
250
 
@@ -245,7 +255,7 @@ When user intent is unclear or ambiguous:
245
255
  - **Maximum 3 blocking questions per decision point.** Ask the highest-impact questions first.
246
256
  - **Do not act on assumptions that affect architecture, scope, stack, or user-facing behavior.**
247
257
  - **You must have ≥95% confidence before writing implementation code.** If below that threshold, stop and ask.
248
- - **Record every assumption explicitly** in `Harness/PLAN.md` so the user can correct it later.
258
+ - **Record every assumption explicitly** in `Harness/tasks/<task-id>/PLAN.md` so the user can correct it later.
249
259
  - **Silent picks are forbidden.** If two valid approaches exist and you cannot decide with high confidence, present both to the user with trade-offs.
250
260
 
251
261
  False confidence is worse than a question. If you catch yourself thinking "this is probably what they want," stop and ask.