create-harness-vibe-coding 0.8.7 → 0.8.9

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 (126) hide show
  1. package/README-CN.md +163 -105
  2. package/README.md +179 -244
  3. package/bin/create-harness-vibe-coding.js +2 -2
  4. package/docs/images/harness-architecture-light.png +0 -0
  5. package/docs/images/harness-architecture.drawio +164 -0
  6. package/docs/images/harness-icon.png +0 -0
  7. package/package.json +47 -44
  8. package/src/generator.js +41 -5
  9. package/src/index.js +86 -13
  10. package/src/prompts.js +37 -37
  11. package/templates/common/.claude/agents/architect-manager.md +45 -45
  12. package/templates/common/.claude/agents/architect.md +31 -31
  13. package/templates/common/.claude/agents/codebase-explorer.md +45 -0
  14. package/templates/common/.claude/agents/context-master.md +75 -75
  15. package/templates/common/.claude/agents/debugger.md +41 -41
  16. package/templates/common/.claude/agents/docs-researcher.md +41 -41
  17. package/templates/common/.claude/agents/explore-manager.md +41 -41
  18. package/templates/common/.claude/agents/implement-manager.md +49 -49
  19. package/templates/common/.claude/agents/implementer.md +40 -40
  20. package/templates/common/.claude/agents/memory-master.md +82 -64
  21. package/templates/common/.claude/agents/planner.md +34 -34
  22. package/templates/common/.claude/agents/researcher.md +41 -41
  23. package/templates/common/.claude/agents/review-manager.md +56 -56
  24. package/templates/common/.claude/agents/reviewer.md +34 -34
  25. package/templates/common/.claude/agents/task-scribe.md +70 -0
  26. package/templates/common/.claude/agents/verifier.md +29 -29
  27. package/templates/common/.claude/commands/wf-help.md +9 -5
  28. package/templates/common/.claude/commands/wf-update.md +24 -0
  29. package/templates/common/.claude/rules/ecc/common.md +57 -44
  30. package/templates/common/.claude/settings.json +13 -0
  31. package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +8 -4
  32. package/templates/common/.claude/skills/wf/SKILL.md +15 -8
  33. package/templates/common/.claude/skills/wf-auto/SKILL.md +10 -7
  34. package/templates/common/.claude/skills/wf-learn/SKILL.md +9 -2
  35. package/templates/common/.claude/skills/wf-max/SKILL.md +23 -5
  36. package/templates/common/.claude/skills/wf-readme/SKILL.md +49 -49
  37. package/templates/common/.claude/skills/wf-remove/SKILL.md +7 -7
  38. package/templates/common/.claude/skills/wf-update/SKILL.md +15 -2
  39. package/templates/common/.codex/hooks.json +17 -0
  40. package/templates/common/.harness-version +130 -45
  41. package/templates/common/.opencode/agents/architect-manager.md +52 -0
  42. package/templates/common/.opencode/agents/architect.md +35 -0
  43. package/templates/common/.opencode/agents/codebase-explorer.md +45 -0
  44. package/templates/common/.opencode/agents/context-master.md +81 -0
  45. package/templates/common/.opencode/agents/debugger.md +43 -0
  46. package/templates/common/.opencode/agents/docs-researcher.md +42 -0
  47. package/templates/common/.opencode/agents/explore-manager.md +49 -0
  48. package/templates/common/.opencode/agents/implement-manager.md +56 -0
  49. package/templates/common/.opencode/agents/implementer.md +42 -0
  50. package/templates/common/.opencode/agents/memory-master.md +88 -0
  51. package/templates/common/.opencode/agents/planner.md +38 -0
  52. package/templates/common/.opencode/agents/reflector.md +39 -0
  53. package/templates/common/.opencode/agents/researcher.md +42 -0
  54. package/templates/common/.opencode/agents/review-manager.md +63 -0
  55. package/templates/common/.opencode/agents/reviewer.md +37 -0
  56. package/templates/common/.opencode/agents/task-scribe.md +70 -0
  57. package/templates/common/.opencode/agents/tdd-guide.md +83 -0
  58. package/templates/common/.opencode/agents/test-writer.md +54 -0
  59. package/templates/common/.opencode/agents/verifier.md +37 -0
  60. package/templates/common/.opencode/commands/wf-auto-spark.md +15 -0
  61. package/templates/common/.opencode/commands/wf-auto.md +15 -0
  62. package/templates/common/.opencode/commands/wf-help.md +27 -0
  63. package/templates/common/.opencode/commands/wf-learn.md +15 -0
  64. package/templates/common/.opencode/commands/wf-max.md +15 -0
  65. package/templates/common/.opencode/commands/wf-readme.md +15 -0
  66. package/templates/common/.opencode/commands/wf-remove.md +15 -0
  67. package/templates/common/.opencode/commands/wf-review.md +15 -0
  68. package/templates/common/.opencode/commands/wf-update.md +24 -0
  69. package/templates/common/.opencode/commands/wf.md +15 -0
  70. package/templates/common/.opencode/plugins/harness-wf-status.mjs +135 -0
  71. package/templates/common/AGENTS.md +2 -29
  72. package/templates/common/CLAUDE.md +114 -88
  73. package/templates/common/Harness/ACCEPTANCE_PROTOCOL.md +2 -2
  74. package/templates/common/{MEMORY.md → Harness/MEMORY.md} +17 -4
  75. package/templates/common/Harness/MEMORY_PROTOCOL.md +80 -30
  76. package/templates/common/Harness/PROGRESS.md +17 -17
  77. package/templates/common/Harness/README.md +58 -19
  78. package/templates/common/{SETUP.md → Harness/SETUP.md} +278 -276
  79. package/templates/common/Harness/TASK_ARCHIVE.md +56 -0
  80. package/templates/common/Harness/WF-AUTO-ANGLES.md +170 -0
  81. package/templates/common/Harness/WF-AUTO-SPARK.md +10 -19
  82. package/templates/common/Harness/WF-AUTO.md +93 -167
  83. package/templates/common/Harness/WF-KERNEL.md +189 -0
  84. package/templates/common/Harness/WF-MAX.md +60 -328
  85. package/templates/common/Harness/WF-STATE.md +83 -0
  86. package/templates/common/Harness/WF.md +117 -237
  87. package/templates/common/Harness/agent-workflow.md +2 -2
  88. package/templates/common/Harness/architecture.md +124 -124
  89. package/templates/common/Harness/context-loading.md +111 -111
  90. package/templates/common/Harness/dispatch.md +43 -35
  91. package/templates/common/Harness/extension.md +66 -66
  92. package/templates/common/Harness/lifecycle.md +20 -20
  93. package/templates/common/Harness/research/PRD.md +56 -56
  94. package/templates/common/Harness/research/README.md +169 -169
  95. package/templates/common/Harness/research/research-results.md +66 -66
  96. package/templates/common/Harness/scripts/archive-tasks.mjs +239 -0
  97. package/templates/common/{scripts → Harness/scripts}/scan-clean.mjs +443 -416
  98. package/templates/common/{scripts → Harness/scripts}/validate-harness.mjs +691 -452
  99. package/templates/common/Harness/scripts/wf-auto-update-prompt.mjs +258 -0
  100. package/templates/common/{scripts → Harness/scripts}/wf-remove.mjs +56 -39
  101. package/templates/common/{scripts → Harness/scripts}/wf-update-check.mjs +632 -599
  102. package/templates/common/Harness/subagents.md +215 -214
  103. package/templates/common/Harness/tasks/_template/ARTIFACTS.md +2 -2
  104. package/templates/common/Harness/tasks/_template/NOTES.md +2 -2
  105. package/templates/common/Harness/tasks/_template/PLAN.md +5 -0
  106. package/templates/common/Harness/tasks/_template/STATE.json +23 -0
  107. package/templates/common/README.md +37 -37
  108. package/templates/common/memory/agent-lessons-patterns.md +22 -21
  109. package/templates/common/memory/routes.md +43 -0
  110. package/templates/common/memory/startup-hints.md +32 -0
  111. package/templates/common/memory/tool-usage-reflections.md +22 -21
  112. package/templates/common/memory/user-corrections-preferences.md +23 -21
  113. package/templates/common/opencode.json +19 -0
  114. package/templates/optional/catalog.json +49 -33
  115. package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +42 -42
  116. package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +193 -193
  117. package/templates/optional/skills/browser-e2e/.opencode/commands/wf-browser.md +15 -0
  118. package/templates/optional/skills/browser-e2e/Harness/workflows/browser-e2e.md +48 -48
  119. package/templates/optional/skills/github-pr-review/.claude/skills/github-pr-review/SKILL.md +40 -40
  120. package/templates/optional/skills/github-pr-review/Harness/workflows/github-pr-review.md +28 -28
  121. package/templates/optional/skills/python-backend/.claude/skills/python-backend/SKILL.md +40 -40
  122. package/templates/optional/skills/python-backend/Harness/workflows/python-backend.md +34 -34
  123. package/templates/optional/skills/ts-react-frontend/.claude/skills/ts-react-frontend/SKILL.md +43 -43
  124. package/templates/optional/skills/ts-react-frontend/Harness/workflows/ts-react-frontend.md +34 -34
  125. package/templates/optional/skills/ui-ux-review/.claude/skills/ui-ux-review/SKILL.md +40 -40
  126. package/templates/optional/skills/ui-ux-review/Harness/workflows/ui-ux-review.md +26 -26
@@ -1,142 +1,142 @@
1
- # Context Loading Protocol
2
-
3
- Use when context is growing, subagents are needed, or an agent is unsure which harness doc applies.
4
-
5
- ## Routing Authority
6
-
7
- `Harness/README.md` is the primary router. This file is a secondary context-splitting protocol for subagents and long tasks.
8
-
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
-
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
-
13
- ## Main Context
14
-
15
- Always keep:
16
-
17
- - `CLAUDE.md`
18
- - `Harness/MEMORY.md`
19
- - `Harness/README.md`
20
- - `Harness/PROGRESS.md` when active
21
- - `Harness/tasks/<task-id>/PROGRESS.md` when active
22
- - `Harness/tasks/<task-id>/PLAN.md` when active
23
- - current feature doc when active
24
-
25
- Load other docs only by trigger.
26
-
27
- ## Trigger Matrix
28
-
29
- | Trigger | Load |
30
- | --- | --- |
1
+ # Context Loading Protocol
2
+
3
+ Use when context is growing, subagents are needed, or an agent is unsure which harness doc applies.
4
+
5
+ ## Routing Authority
6
+
7
+ `CLAUDE.md` is the session entry router. `Harness/README.md` is the primary Harness documentation router. This file is a secondary context-splitting protocol for subagents and long tasks.
8
+
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
+
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
+
13
+ ## Main Context
14
+
15
+ Always keep:
16
+
17
+ - `CLAUDE.md`
18
+ - `Harness/MEMORY.md`
19
+ - `Harness/README.md`
20
+ - `Harness/PROGRESS.md` when active
21
+ - `Harness/tasks/<task-id>/PROGRESS.md` when active
22
+ - `Harness/tasks/<task-id>/PLAN.md` when active
23
+ - current feature doc when active
24
+
25
+ Load other docs only by trigger.
26
+
27
+ ## Trigger Matrix
28
+
29
+ | Trigger | Load |
30
+ | --- | --- |
31
31
  | idea, scope, MVP | `Harness/lifecycle.md`, `Harness/research/PRD.md`, `Harness/ACCEPTANCE_PROTOCOL.md` |
32
32
  | acceptance, AC, criteria, contract, validation matrix | `Harness/ACCEPTANCE_PROTOCOL.md`, `Harness/AGENT_ISOLATION.md`, `Harness/HARNESS_BRIDGE.md` as needed |
33
33
  | research, competitors, stack choice | `Harness/research/README.md`, `Harness/research/research-results.md` |
34
- | task split, owner, write set | `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, `Harness/agent-workflow.md` |
35
- | parallel agents, dispatch, worktree decision | `Harness/subagents.md`, `Harness/dispatch.md`, `Harness/tasks/<task-id>/PLAN.md` |
36
- | `/wf` mode, long task, multi-file, multi-agent | `Harness/WF.md`, `Harness/subagents.md`, `Harness/dispatch.md`, `Harness/tasks/<task-id>/PLAN.md` |
37
- | `/wf max`, 5+ disjoint files, maximum parallelism | `Harness/WF-MAX.md`, `Harness/subagents.md`, `Harness/dispatch.md`, `Harness/tasks/<task-id>/PLAN.md` |
34
+ | task split, owner, write set | `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, `Harness/agent-workflow.md` |
35
+ | parallel agents, dispatch, worktree decision | `Harness/subagents.md`, `Harness/dispatch.md`, `Harness/tasks/<task-id>/PLAN.md` |
36
+ | `/wf` mode (explicit only) | [Harness/WF.md](WF.md), [Harness/subagents.md](subagents.md), [Harness/dispatch.md](dispatch.md), [Harness/tasks/<task-id>/PLAN.md](tasks/<task-id>/PLAN.md) |
37
+ | `/wf-max` (explicit only) | [Harness/WF-MAX.md](WF-MAX.md), [Harness/subagents.md](subagents.md), [Harness/dispatch.md](dispatch.md), [Harness/tasks/<task-id>/PLAN.md](tasks/<task-id>/PLAN.md) |
38
38
  | memory, scenario memory, repeated tool failure, repeated user correction, reusable lesson | `Harness/MEMORY.md`, `Harness/MEMORY_PROTOCOL.md`, the relevant `Harness/memory/*.md` file |
39
39
  | subagent spawn | `Harness/subagents.md`, `Harness/AGENT_ISOLATION.md`, this file plus the role pack below |
40
-
41
- ## ECC Rules Per Role
42
-
43
- Each subagent role loads a specific ECC rule subset. The dispatcher MUST include
44
- `ecc` in the dispatch packet so the subagent knows which rules to read first.
45
-
46
- | Role | Frontend Task | Backend Task | Full-Stack Task |
47
- |------|--------------|-------------|-----------------|
48
- | **Explorer** | `web/patterns.md`, `web/design-quality.md` | `common/patterns.md`, stack patterns | All |
49
- | **Planner** | `common/patterns.md`, `web/patterns.md` | `common/patterns.md`, stack patterns | All |
50
- | **Architect** | `web/patterns.md`, `web/performance.md` | `common/patterns.md`, `python/fastapi.md` or `golang/patterns.md` | All + API contract |
51
- | **Implementer (FE)** | `web/design-quality.md`, `web/patterns.md`, `web/performance.md`, `typescript/patterns.md` | N/A | Frontend subset |
52
- | **Implementer (BE)** | N/A | `common/patterns.md`, `python/fastapi.md` or `golang/patterns.md` | Backend subset |
53
- | **Test Writer** | `web/testing.md`, `typescript/testing.md` | Stack testing rules | Both |
54
- | **Reviewer** | `web/design-quality.md`, `web/security.md`, `web/performance.md` | Stack security + testing rules | All |
40
+
41
+ ## ECC Rules Per Role
42
+
43
+ Each subagent role loads a specific ECC rule subset. The dispatcher MUST include
44
+ `ecc` in the dispatch packet so the subagent knows which rules to read first.
45
+
46
+ | Role | Frontend Task | Backend Task | Full-Stack Task |
47
+ |------|--------------|-------------|-----------------|
48
+ | **Explorer** | `web/patterns.md`, `web/design-quality.md` | `common/patterns.md`, stack patterns | All |
49
+ | **Planner** | `common/patterns.md`, `web/patterns.md` | `common/patterns.md`, stack patterns | All |
50
+ | **Architect** | `web/patterns.md`, `web/performance.md` | `common/patterns.md`, `python/fastapi.md` or `golang/patterns.md` | All + API contract |
51
+ | **Implementer (FE)** | `web/design-quality.md`, `web/patterns.md`, `web/performance.md`, `typescript/patterns.md` | N/A | Frontend subset |
52
+ | **Implementer (BE)** | N/A | `common/patterns.md`, `python/fastapi.md` or `golang/patterns.md` | Backend subset |
53
+ | **Test Writer** | `web/testing.md`, `typescript/testing.md` | Stack testing rules | Both |
54
+ | **Reviewer** | `web/design-quality.md`, `web/security.md`, `web/performance.md` | Stack security + testing rules | All |
55
55
  | **Debugger** | Stack-specific coding-style + patterns | Stack-specific coding-style + patterns | Context-dependent |
56
- | **Verifier** | `web/testing.md` | Stack testing rules | Both |
57
-
58
- ## Subagent Packs
59
-
60
- Each pack now includes `ecc` — the ECC rule files this role MUST load first.
61
-
62
- Explorer Pass:
63
- - ecc: `common/patterns.md` + stack-specific patterns (see ECC Rules Per Role)
64
- - inject: question, read boundary, relevant docs
65
- - forbid: writes
66
- - return: files found, facts, risks, suggested tests
67
-
56
+ | **Verifier** | `web/testing.md` | Stack testing rules | Both |
57
+
58
+ ## Subagent Packs
59
+
60
+ Each pack now includes `ecc` — the ECC rule files this role MUST load first.
61
+
62
+ Explorer Pass:
63
+ - ecc: `common/patterns.md` + stack-specific patterns (see ECC Rules Per Role)
64
+ - inject: question, read boundary, relevant docs
65
+ - forbid: writes
66
+ - return: files found, facts, risks, suggested tests
67
+
68
68
  Planner:
69
69
  - ecc: `common/patterns.md` + `common/development-workflow.md`
70
70
  - inject: user goal, lifecycle phase, PRD or PLAN section, acceptance gate status, dispatch constraints
71
71
  - forbid: production code
72
72
  - return: tasks, dependencies, read/write sets, dispatch table, gates, open questions
73
-
74
- Researcher:
75
- - ecc: none (uses WebSearch/WebFetch, not code rules)
76
- - inject: question, decision needed, source boundaries, tool options
77
- - forbid: production code
78
- - return: sources, adopted/rejected/watch decisions, risks, research-results.md patch
79
-
80
- Docs Researcher:
81
- - ecc: none (uses official docs, not code rules)
82
- - inject: library/API/config, implementation question, version/date constraints
83
- - forbid: production code
84
- - return: official links, constraints, errors, examples, affected docs
85
-
86
- Architect:
87
- - ecc: `common/patterns.md` + stack-specific (web/patterns.md for FE, python/fastapi.md for BE)
88
- - inject: PRD, current architecture, ports
89
- - forbid: implementation
90
- - return: boundary decision, affected docs, risks
91
-
73
+
74
+ Researcher:
75
+ - ecc: none (uses WebSearch/WebFetch, not code rules)
76
+ - inject: question, decision needed, source boundaries, tool options
77
+ - forbid: production code
78
+ - return: sources, adopted/rejected/watch decisions, risks, research-results.md patch
79
+
80
+ Docs Researcher:
81
+ - ecc: none (uses official docs, not code rules)
82
+ - inject: library/API/config, implementation question, version/date constraints
83
+ - forbid: production code
84
+ - return: official links, constraints, errors, examples, affected docs
85
+
86
+ Architect:
87
+ - ecc: `common/patterns.md` + stack-specific (web/patterns.md for FE, python/fastapi.md for BE)
88
+ - inject: PRD, current architecture, ports
89
+ - forbid: implementation
90
+ - return: boundary decision, affected docs, risks
91
+
92
92
  Test Writer:
93
93
  - ecc: `common/testing.md` + stack-specific testing rules
94
94
  - inject: acceptance criteria, UI/API contracts, feature doc, test write set
95
95
  - forbid: production code
96
96
  - return: failing tests, AC ID mapping, and test intent
97
-
98
- Implementer (Frontend):
99
- - ecc: `web/design-quality.md`, `web/patterns.md`, `web/performance.md`, `typescript/patterns.md`
100
- - inject: task, tests, allowed write set, forbidden scope
101
- - forbid: unrelated refactor and test loosening
102
- - return: changed files and implementation notes
103
-
104
- Implementer (Backend):
105
- - ecc: `common/patterns.md`, stack-specific patterns (`python/fastapi.md` or `golang/patterns.md`)
106
- - inject: task, tests, allowed write set, forbidden scope
107
- - forbid: unrelated refactor and test loosening
108
- - return: changed files and implementation notes
109
-
97
+
98
+ Implementer (Frontend):
99
+ - ecc: `web/design-quality.md`, `web/patterns.md`, `web/performance.md`, `typescript/patterns.md`
100
+ - inject: task, tests, allowed write set, forbidden scope
101
+ - forbid: unrelated refactor and test loosening
102
+ - return: changed files and implementation notes
103
+
104
+ Implementer (Backend):
105
+ - ecc: `common/patterns.md`, stack-specific patterns (`python/fastapi.md` or `golang/patterns.md`)
106
+ - inject: task, tests, allowed write set, forbidden scope
107
+ - forbid: unrelated refactor and test loosening
108
+ - return: changed files and implementation notes
109
+
110
110
  Reviewer:
111
111
  - ecc: `web/design-quality.md` (FE), `web/security.md` (FE), `common/security.md`, stack security
112
112
  - inject: PRD, acceptance criteria, UI/API contracts, diff, test/validation evidence, architecture docs
113
113
  - forbid: writes
114
114
  - return: findings by severity, AC traceability, missing tests, boundary issues
115
-
115
+
116
116
  Debugger:
117
117
  - ecc: stack-specific coding-style + patterns
118
118
  - inject: failed AC ID, failing command, error output, trace/screenshot/network evidence, related files
119
119
  - forbid: broad rewrites
120
120
  - return: failure layer, root cause, fix, proof
121
-
121
+
122
122
  Verifier:
123
123
  - ecc: stack-specific testing rules
124
124
  - inject: verification commands, acceptance criteria, UI/API contracts, running app/API endpoint
125
125
  - forbid: code changes
126
126
  - return: commands run, AC-by-AC validation matrix, evidence paths, residual risk
127
-
128
- Memory Master:
129
- - inject: trigger reason, current failure/user-correction/closeout context, task PROGRESS.md section
130
- - forbid: source code, unrelated Harness docs
131
- - return: memory action summary, files written, cross-project flag
132
-
133
- Context Master:
134
- - inject: trigger reason (threshold % or closeout), current task PROGRESS.md, task phase
135
- - forbid: source code, memory files, MEMORY.md writes
136
- - return: context usage %, stale blocks, compressible blocks, durable knowledge candidates, compression suggestion
137
-
138
- ## Handoff Rule
139
-
140
- Only the subagent summary enters main context. If details are needed, load the named files directly instead of replaying the subagent conversation.
141
-
142
- Use the handoff format in [dispatch.md](dispatch.md) for every dispatched agent.
127
+
128
+ Memory Master:
129
+ - inject: trigger reason, current failure/user-correction/closeout context, task PROGRESS.md section
130
+ - forbid: source code, unrelated Harness docs
131
+ - return: memory action summary, files written, cross-project flag
132
+
133
+ Context Master:
134
+ - inject: trigger reason (threshold % or closeout), current task PROGRESS.md, task phase
135
+ - forbid: source code, memory files, MEMORY.md writes
136
+ - return: context usage %, stale blocks, compressible blocks, durable knowledge candidates, compression suggestion
137
+
138
+ ## Handoff Rule
139
+
140
+ Only the subagent summary enters main context. If details are needed, load the named files directly instead of replaying the subagent conversation.
141
+
142
+ Use the handoff format in [dispatch.md](dispatch.md) for every dispatched agent.
@@ -11,13 +11,14 @@ Use when work needs parallel reading, independent review, cross-layer analysis,
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
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
+ - Resumable state is governed by [WF-STATE.md](WF-STATE.md). On session start, the controller reads STATE.json before building a fresh dispatch table.
14
15
  - PRD-derived Acceptance Criteria are the source of truth. Dispatch packets must carry the relevant AC IDs and contracts.
15
- - Agent count: default (non-WF) <=3 active agents; `/wf` requires the complete role chain by default; `/wf max` inherits that chain and removes the Harness default cap through the span formula. Real concurrency is still bounded by runtime thread budget, config, billing, and local resources. Use current runtime subagents first, close completed agents, then cross-CLI overflow. Generated Codex config defaults to `agents.max_threads = 12` and `agents.max_depth = 1`; ask the user before raising `agents.max_threads` above that default. See [WF.md](WF.md) and [WF-MAX.md](WF-MAX.md).
16
+ - Agent count: default (non-WF) <=3 active agents; `/wf` selects a tier dynamically per [WF-KERNEL.md](WF-KERNEL.md) (Light/Standard/Full); `/wf-max` inherits the selected tier and adds maximum safe fan-out (WF-Max-Useful default; WF-Max-Strict explicit only), removing the Harness default cap through the span formula. Real concurrency is still bounded by runtime thread budget, config, billing, and local resources. Use current runtime subagents first, close completed agents, then cross-CLI overflow. Generated Codex config defaults to `agents.max_threads = 12` and `agents.max_depth = 1`; ask the user before raising `agents.max_threads` above that default. See [WF.md](WF.md) and [WF-MAX.md](WF-MAX.md).
16
17
  - Read-only agents may run in parallel.
17
18
  - Writing agents run serially unless write sets are disjoint.
18
19
  - Use a worktree when two agents may touch overlapping files or long-running branches.
19
20
  - Only summaries enter main context. Load named files directly when details are needed.
20
- - Subagents read task files, return findings and PLAN patch suggestions. Only the main agent commits changes to PROGRESS.md and PLAN.md.
21
+ - Only the controller or task-scribe writes task state (PROGRESS.md, PLAN.md). Production source agents (implementer, debugger, test-writer) never write task state unless explicitly dispatched as task-scribe.
21
22
 
22
23
  ## Scope
23
24
 
@@ -25,24 +26,26 @@ Use when work needs parallel reading, independent review, cross-layer analysis,
25
26
 
26
27
  ## Agent Roster
27
28
 
28
- | Agent | Mode | Purpose |
29
- | --- | --- | --- |
30
- | `planner` | Read | split goal into tasks, dependencies, write sets |
31
- | `researcher` | Read | product, market, ecosystem, dependency research |
32
- | `docs-researcher` | Read | official docs, API, SDK, version, limits |
33
- | `architect` | Read | layer boundaries, ports, data flow, state impact |
34
- | `test-writer` | Write | failing test or manual verification plan |
35
- | `implementer` | Write | minimal change inside declared write set |
36
- | `debugger` | Write | smallest fix for a reproduced failure |
37
- | `reviewer` | Read | diff review, risks, missing tests |
38
- | `verifier` | Read | run checks and record evidence |
39
- | `reflector` | Read | synthesize review/evidence and decide acceptance readiness |
40
- | `memory-master` | Write | write/consolidate memory entries |
41
- | `context-master` | Read | analyze context, recommend compression |
42
- | `explore-manager` | Read | WF-MAX W0: spawn researchers, synthesize |
43
- | `architect-manager` | Read | WF-MAX W1: spawn architects, synthesize |
44
- | `implement-manager` | Write | WF-MAX W2: spawn implementers |
45
- | `review-manager` | Read | WF-MAX W2R: spawn reviewers, deduplicate |
29
+ | Agent | Mode | Model Tier | Purpose |
30
+ | --- | --- | --- | --- |
31
+ | `task-scribe` | Write | small-fast | Task state, heartbeat, dispatch ledger, evidence pointers |
32
+ | `codebase-explorer` | Read | small-fast | Scoped read-only source exploration, file discovery |
33
+ | `planner` | Read | standard | Split goal into tasks, dependencies, write sets |
34
+ | `researcher` | Read | standard | Product, market, ecosystem, dependency research |
35
+ | `docs-researcher` | Read | standard | Official docs, API, SDK, version, limits |
36
+ | `architect` | Read | standard | Layer boundaries, ports, data flow, state impact |
37
+ | `test-writer` | Write | standard | Failing test or manual verification plan |
38
+ | `implementer` | Write | standard | Minimal change inside declared write set |
39
+ | `debugger` | Write | standard | Smallest fix for a reproduced failure |
40
+ | `reviewer` | Read | standard | Diff review, risks, missing tests |
41
+ | `verifier` | Read | standard or small-fast | Run checks and record evidence |
42
+ | `reflector` | Read | standard | Synthesize review/evidence and decide acceptance readiness |
43
+ | `memory-master` | Write | standard | Write/consolidate memory entries |
44
+ | `context-master` | Read | small-fast | Analyze context, recommend compression |
45
+ | `explore-manager` | Read | standard | WF-MAX W0: spawn researchers, synthesize |
46
+ | `architect-manager` | Read | standard | WF-MAX W1: spawn architects, synthesize |
47
+ | `implement-manager` | Write | standard | WF-MAX W2: spawn implementers |
48
+ | `review-manager` | Read | standard | WF-MAX W2R: spawn reviewers, deduplicate |
46
49
 
47
50
  ## Dispatch Rules
48
51
 
@@ -51,7 +54,7 @@ Use when work needs parallel reading, independent review, cross-layer analysis,
51
54
  - If two write sets overlap, do not run those agents in parallel.
52
55
  - If an agent returns uncertainty, mark the row `Blocked` or add a follow-up row.
53
56
  - If docs, tests, and code disagree, stop implementation and record the conflict in `Harness/tasks/<task-id>/PROGRESS.md`.
54
- - In /wf max, file claims must respect WF-MAX.md leaf condition: no split below 50 avgLines, no split when files <= span*2.
57
+ - In /wf-max, file claims must respect WF-MAX.md leaf condition: no split below 50 avgLines, no split when files <= span*2.
55
58
 
56
59
  ## Dispatch Input (Controller -> Subagent)
57
60
 
@@ -59,18 +62,23 @@ The controller MUST include these fields in the subagent's dispatch packet.
59
62
  Without them, the subagent has no way to know which rules or contracts to load.
60
63
 
61
64
  ```text
62
- Role: <installed agent name or bounded role, e.g. planner, implementer-fe, reviewer, memory-master>
63
- Task: <one-sentence goal>
64
- ECC: <which ECC rules to load, e.g. web/design-quality.md, python/fastapi.md. See context-loading.md#ecc-rules-per-role>
65
- Skills: <which skills to activate, e.g. react-review, tdd-guide>
66
- PRD: <path or task PLAN section containing Mini PRD>
67
- Acceptance IDs: <AC-001, AC-002, or "none" for non-behavioral work>
68
- UI contract: <path to UI_CONTRACT.md or task PLAN section, if UI task>
69
- API contract: <path to api/openapi.yaml, if frontend<->backend task. Omit if N/A>
70
- Read set: <files and directories the subagent may read>
71
- Write set: <files the subagent may modify. "none" = read-only>
72
- Forbidden: <commands, paths, or patterns the subagent must not touch>
73
- Verification: <commands to run after implementation, e.g. npm test>
65
+ Role: <installed agent name or bounded role, e.g. task-scribe, planner, implementer>
66
+ Objective: <one-sentence goal>
67
+ TaskType: ui-browser | api-backend | architecture-migration | docs-readme | dependency-sdk | bug-fix | refactor | chore
68
+ ModelTier: small-fast | standard | high-reasoning
69
+ AgentName: <the agent file name, e.g. task-scribe, codebase-explorer, implementer>
70
+ Skills: <which skills to activate, e.g. tdd, browser-e2e>
71
+ ECC: <which ECC rules to load, e.g. web/design-quality.md, python/fastapi.md>
72
+ PRD: <path or task PLAN section containing Mini PRD>
73
+ Acceptance IDs: <AC-001, AC-002, or "none" for non-behavioral work>
74
+ UI contract: <path to UI_CONTRACT.md or task PLAN section, if UI task>
75
+ API contract: <path to api/openapi.yaml, if frontend<->backend task. Omit if N/A>
76
+ Read set: <files and directories the subagent may read>
77
+ Write set: <files the subagent may modify. "none" = read-only>
78
+ Forbidden: <commands, paths, or patterns the subagent must not touch>
79
+ Verification: <commands to run after implementation, e.g. npm test>
80
+ MaxReturnTokens: <token budget for return>
81
+ ReturnSchema: <expected fields in return>
74
82
  ```
75
83
 
76
84
  ## Handoff Format (Subagent -> Controller)
@@ -93,8 +101,8 @@ Risks:
93
101
  Next:
94
102
  PLAN patch:
95
103
  Validation matrix: <AC-by-AC pass/fail/block evidence, for validators>
96
- Concurrency group: <wave number - 0=exploration, 1,2,3,...=implementation waves. Optional; only used in /wf max.>
97
- File claim: <list of exact file paths this agent exclusively owns. Optional; only used in /wf max.>
104
+ Concurrency group: <wave number - 0=exploration, 1,2,3,...=implementation waves. Optional; only used in /wf-max.>
105
+ File claim: <list of exact file paths this agent exclusively owns. Optional; only used in /wf-max.>
98
106
  Granularity floor: <50 avgLines -> do NOT spawn. Apply leaf condition from WF-MAX.md.>
99
107
  ```
100
108
 
@@ -1,70 +1,70 @@
1
- # Extension Contract
2
-
1
+ # Extension Contract
2
+
3
3
  Purpose: keep stack-specific agents, skills, and rules compatible with this harness.
4
-
5
- Use during setup whenever adding assets from ECC, SuperClaude, toolboxes, or local project conventions.
6
-
7
- ## Non-Invasive Extension Rules
8
-
9
- Extensions must preserve project and harness ownership boundaries.
10
-
4
+
5
+ Use during setup whenever adding assets from ECC, SuperClaude, toolboxes, or local project conventions.
6
+
7
+ ## Non-Invasive Extension Rules
8
+
9
+ Extensions must preserve project and harness ownership boundaries.
10
+
11
11
  - Preserve existing `.claude/`, `CLAUDE.md`, `AGENTS.md`, `.gitignore`, `Harness/README.md`, `Harness/workflows/*.md`, settings, and local rules unless the user explicitly requests an overwrite.
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.
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, and rules in `Harness/MEMORY.md` and this docs router where applicable.
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/PROGRESS.md`, `Harness/subagents.md`, `Harness/context-loading.md`, `Harness/dispatch.md`, `Harness/agent-workflow.md`, and this file.
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
-
18
- ## Agent Contract
19
-
20
- Every added agent must have frontmatter:
21
-
22
- ```yaml
23
- ---
24
- name: stack-agent-name
25
- description: Use when ...
26
- tools: Read, Grep, Glob
27
- model: sonnet
28
- ---
29
- ```
30
-
31
- Agent body must state:
32
-
33
- - load first
34
- - inputs required
35
- - allowed write set or read-only
36
- - forbidden scope
37
- - verification or evidence
38
- - return format from [subagents.md](subagents.md) and [dispatch.md](dispatch.md)
39
-
40
- ## Skill Contract
41
-
42
- Every added skill must state:
43
-
44
- - when to use
45
- - docs to load
46
- - required inputs
47
- - allowed writes
48
- - output format
49
- - whether to update `Harness/PROGRESS.md` and task files
50
- - whether to use [subagents.md](subagents.md) and [dispatch.md](dispatch.md)
51
-
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/PROGRESS.md`, `Harness/subagents.md`, `Harness/context-loading.md`, `Harness/dispatch.md`, `Harness/agent-workflow.md`, and this file.
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
+
18
+ ## Agent Contract
19
+
20
+ Every added agent must have frontmatter:
21
+
22
+ ```yaml
23
+ ---
24
+ name: stack-agent-name
25
+ description: Use when ...
26
+ tools: Read, Grep, Glob
27
+ model: sonnet
28
+ ---
29
+ ```
30
+
31
+ Agent body must state:
32
+
33
+ - load first
34
+ - inputs required
35
+ - allowed write set or read-only
36
+ - forbidden scope
37
+ - verification or evidence
38
+ - return format from [subagents.md](subagents.md) and [dispatch.md](dispatch.md)
39
+
40
+ ## Skill Contract
41
+
42
+ Every added skill must state:
43
+
44
+ - when to use
45
+ - docs to load
46
+ - required inputs
47
+ - allowed writes
48
+ - output format
49
+ - whether to update `Harness/PROGRESS.md` and task files
50
+ - whether to use [subagents.md](subagents.md) and [dispatch.md](dispatch.md)
51
+
52
52
  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`.
53
-
54
- ## Rules
55
-
56
- - Do not add broad agents that can write anywhere.
57
- - Do not add agents whose role overlaps an existing common agent without naming the difference.
58
- - Do not add tools that bypass project permissions or user approval.
59
- - Do not run stack-specific writing agents in parallel unless write sets are disjoint.
60
- - If an added asset conflicts with this harness, adapt the asset instead of changing the core contract.
61
-
62
- ## Registration
63
-
64
- After adding assets:
65
-
66
- - list agents in `Harness/MEMORY.md#Agents`
67
- - list skills in `Harness/MEMORY.md#Skills`
68
- - list workflows by path in `Harness/MEMORY.md` or `Harness/README.md`
69
- - update `Harness/PROGRESS.md` and `Harness/tasks/<task-id>/PROGRESS.md` when the asset affects current work
70
- - run `node Harness/scripts/validate-harness.mjs`
53
+
54
+ ## Rules
55
+
56
+ - Do not add broad agents that can write anywhere.
57
+ - Do not add agents whose role overlaps an existing common agent without naming the difference.
58
+ - Do not add tools that bypass project permissions or user approval.
59
+ - Do not run stack-specific writing agents in parallel unless write sets are disjoint.
60
+ - If an added asset conflicts with this harness, adapt the asset instead of changing the core contract.
61
+
62
+ ## Registration
63
+
64
+ After adding assets:
65
+
66
+ - list agents in `Harness/MEMORY.md#Agents`
67
+ - list skills in `Harness/MEMORY.md#Skills`
68
+ - list workflows by path in `Harness/MEMORY.md` or `Harness/README.md`
69
+ - update `Harness/PROGRESS.md` and `Harness/tasks/<task-id>/PROGRESS.md` when the asset affects current work
70
+ - run `node Harness/scripts/validate-harness.mjs`
@@ -1,12 +1,12 @@
1
- # 0-1 Product Lifecycle
2
-
3
- Use when starting a new product, clarifying a vague idea, or deciding the next phase.
4
-
5
- ## Phase Contract
6
-
7
- | Phase | Input | Output | Gate |
8
- | --- | --- | --- | --- |
9
- | Idea | user intent | problem, target user, non-goals | unclear points asked or assumptions recorded |
1
+ # 0-1 Product Lifecycle
2
+
3
+ Use when starting a new product, clarifying a vague idea, or deciding the next phase.
4
+
5
+ ## Phase Contract
6
+
7
+ | Phase | Input | Output | Gate |
8
+ | --- | --- | --- | --- |
9
+ | Idea | user intent | problem, target user, non-goals | unclear points asked or assumptions recorded |
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` or task Mini PRD | goal, scope, non-scope, user flow, and verification commands are explicit |
12
12
  | Acceptance | PRD | AC IDs in `ACCEPTANCE.md` section, feature doc, or task PLAN | every user-visible behavior has Given/When/Then and evidence method |
@@ -18,22 +18,22 @@ Use when starting a new product, clarifying a vague idea, or deciding the next p
18
18
  | Independent Validation | running slice | acceptance result matrix, screenshots/traces/logs | validator is not implementer; no unresolved critical/high findings |
19
19
  | Debug | failed AC evidence | root-cause handoff and smallest fix | failing layer identified before edits |
20
20
  | Memory | verified or repeated failure | concise memory entry or no-op rationale | durable lessons recorded without secrets |
21
-
22
- ## Operating Rules
23
-
24
- - Move one phase at a time unless the user explicitly asks for a fast lane.
21
+
22
+ ## Operating Rules
23
+
24
+ - Move one phase at a time unless the user explicitly asks for a fast lane.
25
25
  - Start coding only after PRD-GATE, AC-GATE, CONTRACT-GATE, TEST-GATE, and minimum architecture gates pass.
26
26
  - Prefer one thin vertical slice over broad scaffolding.
27
27
  - If feedback changes scope, update PRD and acceptance criteria before implementation.
28
28
  - If implementation reveals a boundary problem, update architecture or ports before continuing.
29
29
  - If implementation reveals incorrect acceptance criteria or contracts, stop and use Change Request from `ACCEPTANCE_PROTOCOL.md`; do not let the implementer rewrite truth files directly.
30
-
31
- ## Fast Lane
32
-
33
- Small edits may skip full lifecycle when all are true:
34
-
35
- - user intent is clear
36
- - one file or one narrow behavior
30
+
31
+ ## Fast Lane
32
+
33
+ Small edits may skip full lifecycle when all are true:
34
+
35
+ - user intent is clear
36
+ - one file or one narrow behavior
37
37
  - no architecture, permission, or public API change
38
38
  - one verification command or one manual check is enough
39
39
  - Mini PRD, AC IDs, and verification evidence still fit inside the task PLAN