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,121 +1,125 @@
1
- # Subagent Orchestration
2
-
3
- Purpose: coordinate subagents for speed without losing control of scope, evidence, or integration.
4
-
5
- Use this file when work needs multiple roles, parallel reading, independent review, broad context, repeated failures, or `/wf`.
6
-
7
- 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
-
9
- Subagent work is acceptance-driven. Use [AGENT_ISOLATION.md](AGENT_ISOLATION.md)
10
- for role/context isolation and [ACCEPTANCE_PROTOCOL.md](ACCEPTANCE_PROTOCOL.md)
11
- for PRD-GATE, AC-GATE, CONTRACT-GATE, TEST-GATE, VALIDATION-GATE, and
12
- REVIEW-GATE.
13
-
14
- ## Source Attribution
15
-
16
- This harness distills ideas from these sources. Keep the protocol local and conservative; do not import external runtimes by default.
17
-
18
- | Source | Found By | Adopted Idea |
19
- | --- | --- | --- |
20
- | `superpowers:dispatching-parallel-agents` | local skill | Dispatch one agent per independent problem domain; give focused scope and exact context. |
21
- | `superpowers:subagent-driven-development` | local skill | Fresh implementer per task; spec review before code-quality review; handle `DONE`, `DONE_WITH_CONCERNS`, `NEEDS_CONTEXT`, and `BLOCKED`. |
22
- | [`flc1125/skills@subagent-orchestrator`](https://skills.sh/flc1125/skills/subagent-orchestrator) | `npx skills find "subagent orchestration"` | Explicit subagent invocation, role-specific prompts, tool permission awareness. |
23
- | [`davila7/claude-code-templates@parallel-agents`](https://skills.sh/davila7/claude-code-templates/parallel-agents) | `npx skills find "parallel agents"` | Discovery -> domain agents -> synthesis; one unified synthesis instead of scattered reports. |
24
- | [`ruvnet/ruflo@agent-workflow`](https://skills.sh/ruvnet/ruflo/agent-workflow) | `npx skills find "agent workflow"` | Workflow thinking: triggers, agent assignments, parallel processing, and stateful handoffs. |
25
- | [`pcvelz/superpowers@subagent-driven-development`](https://skills.sh/pcvelz/superpowers/subagent-driven-development) | `npx skills find "subagent driven development"` | Implementer plus review gates for spec compliance and code quality. |
26
- | [`oimiragieo/agent-studio`](https://skills.sh/oimiragieo/agent-studio/dispatching-parallel-agents) | Skills CLI / public docs | Router-subordinate architecture and durable handoff discipline. |
27
- | [`subagent-orchestration-skill`](https://skills.rest/rjtaryn/skills/subagent-orchestration-skill) | public docs | Multi-stage executor, spec reviewer, code reviewer, circuit breaker, and escalation pattern. |
28
-
29
- ## Controller Role
30
-
31
- The main agent is the controller. It owns:
32
-
33
- - intent confidence and user questions
34
- - task decomposition
35
- - read/write set boundaries
36
- - dispatch table in `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch`
37
- - integration of returned summaries
38
- - final verification and closeout
39
-
40
- Subagents provide bounded work. They do not own final scope, architecture, release claims, or user-facing decisions.
41
-
42
- ## Built-in Agent Roster
43
-
44
- Use the installed roster under `.claude/agents/` before inventing ad hoc roles.
45
-
46
- | Agent | Default Use |
47
- | --- | --- |
48
- | `planner` | decompose goals, map unknowns, define success criteria and write sets |
49
- | `researcher` | local/external ecosystem context, comparable projects, current facts |
50
- | `docs-researcher` | official docs, SDK/API behavior, browser/tool constraints |
51
- | `architect` | boundaries, interface decoupling, state ownership, data flow, migration risk |
52
- | `test-writer` | failing tests, manual check contracts, browser/API evidence plan |
53
- | `implementer` | bounded code or doc changes after the second plan |
54
- | `reviewer` | spec compliance, code quality, maintainability, security, missing tests |
55
- | `debugger` | reproduced failures, root cause isolation, smallest safe fix |
56
- | `verifier` | command execution, real browser/API checks, final evidence |
57
- | `reflector` | closeout synthesis, unresolved-risk check, acceptance gate verdict |
58
- | `memory-master` | write/consolidate memory entries, dedup, cross-project extraction; dispatched on repeated failures, user corrections, and WF closeout |
59
- | `context-master` | analyze context usage, recommend compression at ~85% window, extract durable session knowledge during closeout |
60
-
61
- ## Acceptance Role Passes
62
-
63
- These are role passes that may be handled by the built-in roster above or by
64
- project-specific agents. They define context boundaries even when no dedicated
65
- agent file exists.
66
-
67
- | Role Pass | Default Agent | Reads | Writes |
68
- | --- | --- | --- | --- |
69
- | PRD Planner | `planner` | user request, memory, research | Mini PRD/task PLAN only |
70
- | Acceptance Agent | `planner` or `test-writer` | PRD, user scenarios, UI requirements | AC section only |
71
- | Contract Agent | `architect` or `test-writer` | PRD, AC, API/schema/UI requirements | UI/API/state contract section only |
72
- | Test Architect | `test-writer` | AC, contracts, test utilities | tests or test plan only |
73
- | Implementer | `implementer` | PRD, AC, contracts, tests, relevant code | assigned implementation write set only |
74
- | Independent Validator | `verifier` | PRD, AC, contracts, running app/API, commands | validation report/evidence only |
75
- | Cross Review | `reviewer` | PRD, AC, contracts, diff, tests, validation evidence | spec/AC and code/architecture/test findings only |
76
- | Reflector | `reflector` | validation evidence, reviewer findings, risks, decisions | final PASS/RETURN_TO_DEBUG/BLOCKED verdict only |
77
- | Debugger | `debugger` | failed AC, logs, trace, screenshot, diff | smallest assigned fix set |
78
-
79
- Hard rule: implementer may not be the independent validator for the same AC ID.
80
-
81
- ## WF Default Fan-Out
82
-
83
- Explicit `/wf`, `wf mode`, `workflow mode`, or `wk mode` requires complete
84
- role-chain coverage from `.claude/agents/` before closeout: plan,
85
- research/docs research as needed, architecture, test, implement, independent
86
- validation, cross-review, reflector, and accept.
87
-
88
- Default starter set:
89
-
90
- - `planner` for decomposition and local map
91
- - `architect` for boundaries, interfaces, and state impact
92
- - `researcher` or `docs-researcher` depending whether the unknowns are project/ecosystem facts or official tool/API behavior
93
-
94
- Then add phase-specific agents:
95
-
96
- - `test-writer` before implementation
97
- - `implementer` for the serial write lane
98
- - `reviewer` for independent spec/AC and code/architecture/test gates
99
- - `debugger` after a reproduced verification failure
100
- - `verifier` for command/browser/API evidence and AC matrix
101
- - `reflector` after cross-review to decide whether final acceptance may proceed
102
- - `context-master` before closeout for knowledge extraction
103
- - `memory-master` after repeated failures and during closeout for consolidation
104
-
105
- Collaboration mode is determined by concrete conditions, not a fixed ratio. See `Harness/WF.md#Complete Role Chain Requirement` for the full decision tree. Summary: explicit WF/WK mode always uses the complete role chain. 3+ files or cross-layer work uses multi-agent orchestration. 1-2 local files, well-understood, not in WF mode can be solo. Repeated failure stops solo work and switches to multi-agent.
106
-
107
- ## Efficiency Ladder
108
-
109
- Choose the cheapest coordination level that is safe.
110
-
111
- | Level | Use When | Pattern |
112
- | --- | --- | --- |
113
- | Solo pass | one file, low risk, clear intent | no subagent |
114
- | Single reviewer | small change with meaningful risk | implement, then reviewer |
115
- | Parallel read-only | broad reading, research, architecture, multiple independent failures | 2-3 read-only agents |
116
- | Serial build lane | normal feature or fix | acceptance/contract -> test-writer -> implementer -> verifier evidence -> cross-review -> reflector -> acceptance |
1
+ # Subagent Orchestration
2
+
3
+ Purpose: coordinate subagents for speed without losing control of scope, evidence, or integration.
4
+
5
+ Use this file when work needs multiple roles, parallel reading, independent review, broad context, repeated failures, or explicit `/wf` / `/wf-max` invocation.
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/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
+
9
+ Subagent work is acceptance-driven. Use [AGENT_ISOLATION.md](AGENT_ISOLATION.md)
10
+ for role/context isolation and [ACCEPTANCE_PROTOCOL.md](ACCEPTANCE_PROTOCOL.md)
11
+ for PRD-GATE, AC-GATE, CONTRACT-GATE, TEST-GATE, VALIDATION-GATE, and
12
+ REVIEW-GATE.
13
+
14
+ ## Source Attribution
15
+
16
+ This harness distills ideas from these sources. Keep the protocol local and conservative; do not import external runtimes by default.
17
+
18
+ | Source | Found By | Adopted Idea |
19
+ | --- | --- | --- |
20
+ | `superpowers:dispatching-parallel-agents` | local skill | Dispatch one agent per independent problem domain; give focused scope and exact context. |
21
+ | `superpowers:subagent-driven-development` | local skill | Fresh implementer per task; spec review before code-quality review; handle `DONE`, `DONE_WITH_CONCERNS`, `NEEDS_CONTEXT`, and `BLOCKED`. |
22
+ | [`flc1125/skills@subagent-orchestrator`](https://skills.sh/flc1125/skills/subagent-orchestrator) | `npx skills find "subagent orchestration"` | Explicit subagent invocation, role-specific prompts, tool permission awareness. |
23
+ | [`davila7/claude-code-templates@parallel-agents`](https://skills.sh/davila7/claude-code-templates/parallel-agents) | `npx skills find "parallel agents"` | Discovery -> domain agents -> synthesis; one unified synthesis instead of scattered reports. |
24
+ | [`ruvnet/ruflo@agent-workflow`](https://skills.sh/ruvnet/ruflo/agent-workflow) | `npx skills find "agent workflow"` | Workflow thinking: triggers, agent assignments, parallel processing, and stateful handoffs. |
25
+ | [`pcvelz/superpowers@subagent-driven-development`](https://skills.sh/pcvelz/superpowers/subagent-driven-development) | `npx skills find "subagent driven development"` | Implementer plus review gates for spec compliance and code quality. |
26
+ | [`oimiragieo/agent-studio`](https://skills.sh/oimiragieo/agent-studio/dispatching-parallel-agents) | Skills CLI / public docs | Router-subordinate architecture and durable handoff discipline. |
27
+ | [`subagent-orchestration-skill`](https://skills.rest/rjtaryn/skills/subagent-orchestration-skill) | public docs | Multi-stage executor, spec reviewer, code reviewer, circuit breaker, and escalation pattern. |
28
+
29
+ ## Controller Role
30
+
31
+ The main agent is the controller. It owns:
32
+
33
+ - intent confidence and user questions
34
+ - task decomposition
35
+ - read/write set boundaries
36
+ - dispatch table in `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch`
37
+ - integration of returned summaries
38
+ - final verification and closeout
39
+
40
+ Subagents provide bounded work. They do not own final scope, architecture, release claims, or user-facing decisions.
41
+
42
+ ## Built-in Agent Roster
43
+
44
+ Use the installed roster under `.claude/agents/` before inventing ad hoc roles.
45
+
46
+ | Agent | Default Use | Model Tier |
47
+ | --- | --- | --- |
48
+ | `planner` | decompose goals, map unknowns, define success criteria and write sets | standard |
49
+ | `researcher` | local/external ecosystem context, comparable projects, current facts | standard |
50
+ | `docs-researcher` | official docs, SDK/API behavior, browser/tool constraints | standard |
51
+ | `architect` | boundaries, interface decoupling, state ownership, data flow, migration risk | standard |
52
+ | `test-writer` | failing tests, manual check contracts, browser/API evidence plan | standard |
53
+ | `implementer` | bounded code or doc changes after the second plan | standard |
54
+ | `reviewer` | spec compliance, code quality, maintainability, security, missing tests | standard |
55
+ | `debugger` | reproduced failures, root cause isolation, smallest safe fix | standard |
56
+ | `verifier` | command execution, real browser/API checks, final evidence | standard or small-fast |
57
+ | `reflector` | closeout synthesis, unresolved-risk check, acceptance gate verdict | standard |
58
+ | `task-scribe` | task state, heartbeat, dispatch ledger, evidence pointers NEVER source code | small-fast (haiku) |
59
+ | `codebase-explorer` | scoped read-only source exploration, file discovery, symbol tracing | small-fast (haiku) |
60
+ | `context-master` | analyze context usage, recommend compression at ~85% window, extract durable session knowledge during closeout | small-fast (haiku) |
61
+ | `memory-master` | write/consolidate memory entries, dedup, cross-project extraction; dispatched on repeated failures, user corrections, and WF closeout | standard |
62
+
63
+ ## Acceptance Role Passes
64
+
65
+ These are role passes that may be handled by the built-in roster above or by
66
+ project-specific agents. They define context boundaries even when no dedicated
67
+ agent file exists.
68
+
69
+ | Role Pass | Default Agent | Reads | Writes |
70
+ | --- | --- | --- | --- |
71
+ | PRD Planner | `planner` | user request, memory, research | Mini PRD/task PLAN only |
72
+ | Acceptance Agent | `planner` or `test-writer` | PRD, user scenarios, UI requirements | AC section only |
73
+ | Contract Agent | `architect` or `test-writer` | PRD, AC, API/schema/UI requirements | UI/API/state contract section only |
74
+ | Test Architect | `test-writer` | AC, contracts, test utilities | tests or test plan only |
75
+ | Implementer | `implementer` | PRD, AC, contracts, tests, relevant code | assigned implementation write set only |
76
+ | Independent Validator | `verifier` | PRD, AC, contracts, running app/API, commands | validation report/evidence only |
77
+ | Cross Review | `reviewer` | PRD, AC, contracts, diff, tests, validation evidence | spec/AC and code/architecture/test findings only |
78
+ | Reflector | `reflector` | validation evidence, reviewer findings, risks, decisions | final PASS/RETURN_TO_DEBUG/BLOCKED verdict only |
79
+ | Debugger | `debugger` | failed AC, logs, trace, screenshot, diff | smallest assigned fix set |
80
+
81
+ Hard rule: implementer may not be the independent validator for the same AC ID.
82
+
83
+ ## WF Default Fan-Out
84
+
85
+ Explicit `/wf`, `$wf`, or `/skills wf` requires tier-specific role coverage per `Harness/WF.md`.
86
+ WF-Light: planner + test-writer + implementer + verifier.
87
+ WF-Standard: adds research/docs + one review lens.
88
+ WF-Full: complete role-chain coverage from `.claude/agents/` before closeout: plan,
89
+ research/docs research as needed, architecture, test, implement, independent
90
+ validation, cross-review, reflector, and accept.
91
+
92
+ Default starter set:
93
+
94
+ - `planner` for decomposition and local map
95
+ - `architect` for boundaries, interfaces, and state impact
96
+ - `researcher` or `docs-researcher` depending whether the unknowns are project/ecosystem facts or official tool/API behavior
97
+
98
+ Then add phase-specific agents:
99
+
100
+ - `test-writer` before implementation
101
+ - `implementer` for the serial write lane
102
+ - `reviewer` for independent spec/AC and code/architecture/test gates
103
+ - `debugger` after a reproduced verification failure
104
+ - `verifier` for command/browser/API evidence and AC matrix
105
+ - `reflector` after cross-review to decide whether final acceptance may proceed
106
+ - `context-master` before closeout for knowledge extraction
107
+ - `memory-master` after repeated failures and during closeout for consolidation
108
+
109
+ Collaboration mode is determined by WF tier and concrete conditions, not a fixed ratio. See `Harness/WF.md` for the tier decision guide. Summary: WF-Light uses minimal roles. WF-Standard uses moderate roles with one review lens. WF-Full always uses the complete role chain. Non-WF complex work may still use subagents and planning without entering any WF mode. Repeated failure after two attempts escalates to next tier.
110
+
111
+ ## Efficiency Ladder
112
+
113
+ Choose the cheapest coordination level that is safe.
114
+
115
+ | Level | Use When | Pattern |
116
+ | --- | --- | --- |
117
+ | Solo pass | one file, low risk, clear intent | no subagent |
118
+ | Single reviewer | small change with meaningful risk | implement, then reviewer |
119
+ | Parallel read-only | broad reading, research, architecture, multiple independent failures | 2-3 read-only agents |
120
+ | Serial build lane | normal feature or fix | acceptance/contract -> test-writer -> implementer -> verifier evidence -> cross-review -> reflector -> acceptance |
117
121
  | Isolated lanes | disjoint write sets or competing approaches | separate worktrees, then review and merge |
118
- | Max parallelism | 5+ disjoint files, fan-out benefit > coordination cost | /wf max: write-set coloring -> wave dispatch -> parallel review |
122
+ | Max parallelism | 5+ disjoint files, fan-out benefit > coordination cost | /wf-max: write-set coloring -> wave dispatch -> parallel review |
119
123
 
120
124
  Max parallelism removes the Harness default cap, not the runtime's physical or
121
125
  account cap. For WF-MAX, record the current runtime budget, use native
@@ -127,103 +131,100 @@ bottleneck, ask the user before raising `agents.max_threads` and keep
127
131
  `max_depth = 1` unless recursive delegation is explicitly approved. Do not rely
128
132
  on undocumented fork/derive bypasses as stable capacity.
129
133
 
130
- Default for automatic WF triggers: 3-5 active read-only agents before second
131
- planning. For explicit WF/WK mode, never use the solo pass; schedule the
132
- complete role chain and use bounded role passes as the recorded fallback when
133
- subagents are unavailable.
134
-
135
- ## WF Orchestration Shape
136
-
137
- ```text
138
- controller intake
139
- -> parallel planner/researcher/docs-researcher/architect subagents
140
- -> controller synthesis
141
- -> second plan with dependencies and write sets
142
- -> acceptance/contract/test-writer
143
- -> implementer
144
- -> independent validator
145
- -> cross-review: spec/AC reviewer + code/architecture/test reviewer
146
- -> reflector
147
- -> if failed: debugger/fixer -> verify -> cross-review -> reflector -> loop
148
- -> close with evidence
149
- ```
150
-
151
- Use this shape for `/wf`, long tasks, multi-file changes, architecture work, migrations, browser/API behavior, or repeated failures.
152
-
153
- ```text
154
- /wf max orchestration shape:
155
- controller intake
156
- -> wave 0: max-parallel exploration (4-14 read-only agents)
134
+ Default for explicit WF invocation: tier-based. WF-Light: planner + test-writer + implementer + verifier (bounded passes acceptable). WF-Standard: adds research/docs + one independent review lens. WF-Full: complete role chain, use bounded role passes as the recorded fallback when subagents are unavailable.
135
+
136
+ ## WF Orchestration Shape
137
+
138
+ ```text
139
+ controller intake
140
+ -> parallel planner/researcher/docs-researcher/architect subagents
141
+ -> controller synthesis
142
+ -> second plan with dependencies and write sets
143
+ -> acceptance/contract/test-writer
144
+ -> implementer
145
+ -> independent validator
146
+ -> cross-review: spec/AC reviewer + code/architecture/test reviewer
147
+ -> reflector
148
+ -> if failed: debugger/fixer -> verify -> cross-review -> reflector -> loop
149
+ -> close with evidence
150
+ ```
151
+
152
+ Use this shape for explicit `/wf`, `/wf-max`, or non-WF complex work with subagents.
153
+
154
+ ```text
155
+ /wf-max orchestration shape:
156
+ controller intake
157
+ -> wave 0: max-parallel exploration (4-14 read-only agents)
157
158
  -> E-GATE: Exploration Gate - all questions answered, findings synthesized (per WF-MAX.md)
158
159
  -> wave 1: architecture - 3 parallel architects -> boundary decisions + interface contract
159
160
  -> D-GATE: Write Decomposition Gate - Dispatch Table + Self-Audit for write-set (MANDATORY, per WF-MAX.md)
160
- -> wave 2: N parallel implementers (disjoint file claims, ALL spawned in ONE message)
161
- -> wave 2 review: parallel spec/code/security reviewers
162
- -> wave 3+: dependent implementers (if any; re-run D-GATE if write-set changed)
163
- -> integration verifier
164
- -> reflector after cross-review
165
- -> closeout with evidence
166
- ```
167
-
168
- ## Dispatch Pack
169
-
170
- Use the canonical dispatch input and handoff format in `Harness/dispatch.md`. Every subagent dispatch must be self-contained - inject only the docs selected by `Harness/README.md` and `Harness/context-loading.md`.
171
-
172
- ## Parallelism Rules
173
-
174
- - Read-only agents may run in parallel.
175
- - Writing agents run serially unless write sets are disjoint and the controller has chosen an isolated worktree.
176
- - Reviewers may run in parallel after implementation, but spec compliance is evaluated before code-quality approval.
177
- - Subagents are readers and reporters. They return findings and PLAN patch suggestions. Only the controller (main agent) commits state changes to task files.
178
- - Do not let two agents edit `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, `Harness/MEMORY.md`, or `Harness/memory/*` concurrently. The controller writes durable state.
179
- - If two agents disagree, the controller records the conflict in `Harness/tasks/<task-id>/PLAN.md` and chooses the smallest reversible next step.
180
-
181
- ## Review Gates
182
-
183
- Implementation is not complete until cross-review and reflection pass:
184
-
185
- 1. **Spec review**: confirms the result matches the user request, PRD, feature doc, acceptance criteria, contracts, and non-goals. Extra features are failures.
186
- 2. **Code-quality review**: checks correctness, maintainability, architecture, tests, security, and integration risk.
187
- 3. **Reflector gate**: checks reviewer findings, verifier evidence, unresolved risks, and contradictions; returns PASS, RETURN_TO_DEBUG, or BLOCKED.
188
-
189
- Validation is separate from review. Validator must produce an AC-by-AC result
190
- matrix from running behavior and evidence, not from the implementer's summary.
191
-
192
- If either reviewer finds issues, the implementer or debugger fixes them and the same gate runs again. Do not move to final acceptance with open critical/high findings or without reflector PASS.
193
-
194
- ## Subagent Status Handling
195
-
196
- | Status | Controller Action |
197
- | --- | --- |
198
- | `DONE` | start review gates |
199
- | `DONE_WITH_CONCERNS` | read concerns, decide whether to address before review, record in `Harness/tasks/<task-id>/PROGRESS.md` |
200
- | `NEEDS_CONTEXT` | provide only missing context and re-dispatch |
201
- | `BLOCKED` | change something: add context, split task, upgrade reasoning, use debugger, or ask user |
202
-
203
- Never retry the same failed prompt unchanged.
204
-
205
- ## Failure Recovery
206
-
207
- - First failed verification: record evidence, dispatch debugger with the smallest reproduced failure.
208
- - Second same-class failure: narrow scope, update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat`, and add a reviewer before another fix.
209
- - Third same-class failure: stop blind fixes. Present evidence-backed options to the user.
210
-
211
- The recovery loop must preserve the same evidence standard as the main workflow: real commands, real browser/API checks when applicable, and recorded logs or artifacts.
212
-
213
- ## Synthesis Output
214
-
215
- After subagents return, the controller writes one synthesis into `Harness/tasks/<task-id>/PLAN.md`:
216
-
217
- ```text
218
- Agents used:
219
- Findings accepted:
220
- Findings rejected:
221
- Conflicts:
222
- Decisions:
223
- Next write set:
224
- Verification path:
225
- Acceptance/contract traceability:
226
- Residual risk:
227
- ```
228
-
229
- Only the synthesis and named files enter main context. Do not replay full subagent conversations.
161
+ -> wave 2: N parallel implementers (disjoint file claims, ALL spawned in ONE message)
162
+ -> wave 2 review: parallel spec/code/security reviewers
163
+ -> wave 3+: dependent implementers (if any; re-run D-GATE if write-set changed)
164
+ -> integration verifier
165
+ -> reflector after cross-review
166
+ -> closeout with evidence
167
+ ```
168
+
169
+ ## Dispatch Pack
170
+
171
+ Use the canonical dispatch input and handoff format in `Harness/dispatch.md`. Every subagent dispatch must be self-contained - inject only the docs selected by `Harness/README.md` and `Harness/context-loading.md`. On session start, the controller reads `Harness/tasks/<task-id>/STATE.json` per [WF-STATE.md](WF-STATE.md) to resume the dispatch ledger and ready queue.
172
+
173
+ ## Parallelism Rules
174
+
175
+ - Read-only agents may run in parallel.
176
+ - Writing agents run serially unless write sets are disjoint and the controller has chosen an isolated worktree.
177
+ - Reviewers may run in parallel after implementation, but spec compliance is evaluated before code-quality approval.
178
+ - Subagents are readers and reporters. They return findings and PLAN patch suggestions. Only the controller (main agent) or task-scribe commits state changes to task files. Production source agents (implementer, debugger, test-writer) never write task state unless explicitly dispatched as task-scribe.
179
+ - 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.
180
+ - If two agents disagree, the controller records the conflict in `Harness/tasks/<task-id>/PLAN.md` and chooses the smallest reversible next step.
181
+
182
+ ## Review Gates
183
+
184
+ Implementation is not complete until cross-review and reflection pass:
185
+
186
+ 1. **Spec review**: confirms the result matches the user request, PRD, feature doc, acceptance criteria, contracts, and non-goals. Extra features are failures.
187
+ 2. **Code-quality review**: checks correctness, maintainability, architecture, tests, security, and integration risk.
188
+ 3. **Reflector gate**: checks reviewer findings, verifier evidence, unresolved risks, and contradictions; returns PASS, RETURN_TO_DEBUG, or BLOCKED.
189
+
190
+ Validation is separate from review. Validator must produce an AC-by-AC result
191
+ matrix from running behavior and evidence, not from the implementer's summary.
192
+
193
+ If either reviewer finds issues, the implementer or debugger fixes them and the same gate runs again. Do not move to final acceptance with open critical/high findings or without reflector PASS.
194
+
195
+ ## Subagent Status Handling
196
+
197
+ | Status | Controller Action |
198
+ | --- | --- |
199
+ | `DONE` | start review gates |
200
+ | `DONE_WITH_CONCERNS` | read concerns, decide whether to address before review, record in `Harness/tasks/<task-id>/PROGRESS.md` |
201
+ | `NEEDS_CONTEXT` | provide only missing context and re-dispatch |
202
+ | `BLOCKED` | change something: add context, split task, upgrade reasoning, use debugger, or ask user |
203
+
204
+ Never retry the same failed prompt unchanged.
205
+
206
+ ## Failure Recovery
207
+
208
+ - First failed verification: record evidence, dispatch debugger with the smallest reproduced failure.
209
+ - Second same-class failure: narrow scope, update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat`, and add a reviewer before another fix.
210
+ - Third same-class failure: stop blind fixes. Present evidence-backed options to the user.
211
+
212
+ 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.
213
+
214
+ ## Synthesis Output
215
+
216
+ After subagents return, the controller writes one synthesis into `Harness/tasks/<task-id>/PLAN.md`:
217
+
218
+ ```text
219
+ Agents used:
220
+ Findings accepted:
221
+ Findings rejected:
222
+ Conflicts:
223
+ Decisions:
224
+ Next write set:
225
+ Verification path:
226
+ Acceptance/contract traceability:
227
+ Residual risk:
228
+ ```
229
+
230
+ Only the synthesis and named files enter main context. Do not replay full subagent conversations.
@@ -1,3 +1,3 @@
1
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.
2
+
3
+ Optional: screenshots, logs, API responses, links. Create only when evidence is too large for this task's PLAN.md verification table.
@@ -1,3 +1,3 @@
1
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.
2
+
3
+ Optional: exploration notes, design alternatives, research leads. Create only when notes are too long for this task's PLAN.md.
@@ -35,6 +35,11 @@ Forbidden:
35
35
  -
36
36
  - Truth files (PRD, ACs, UI/API contracts, test plan, validation report) unless a Change Request is recorded.
37
37
 
38
+ ## Memory Preflight
39
+
40
+ - Memory preflight: done | exempt | blocked
41
+ - Memory hints: none | <file/path + reason>
42
+
38
43
  ## Context
39
44
 
40
45
  - Loaded:
@@ -0,0 +1,23 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "taskId": "task-example",
4
+ "status": "active",
5
+ "mode": "direct",
6
+ "tier": "none",
7
+ "phase": "intake",
8
+ "gate": null,
9
+ "updatedAt": "2026-07-16T00:00:00.000Z",
10
+ "activeQuestion": null,
11
+ "nextAction": "Define goal and acceptance criteria",
12
+ "acceptance": [],
13
+ "queues": {
14
+ "ready": [],
15
+ "running": [],
16
+ "blocked": [],
17
+ "done": []
18
+ },
19
+ "dispatchLedger": [],
20
+ "decisions": [],
21
+ "risks": [],
22
+ "artifacts": []
23
+ }
@@ -1,43 +1,43 @@
1
- # {{projectName}}
2
-
3
- Project development notes belong here.
4
-
5
- ## Development Commands
6
-
7
- Record the real project commands after bootstrap:
8
-
9
- ```bash
10
- # Install dependencies
11
- # e.g. npm install
12
-
13
- # Run locally
14
- # e.g. npm run dev
15
-
16
- # Run tests
17
- # e.g. npm test
18
-
19
- # Build
20
- # e.g. npm run build
21
- ```
22
-
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
-
25
- ## Git And Release Notes
26
-
27
- - Keep branch, commit, pull request, CI, and release conventions in this README.
28
- - Do not place build scripts, git policy, or project maintenance instructions in `CLAUDE.md`.
29
- - Keep code architecture notes in `Harness/architecture.md` or feature docs.
30
- - For README improvements, use `.claude/skills/wf-readme/SKILL.md`; preserve public docs unless a rewrite is approved.
31
-
1
+ # {{projectName}}
2
+
3
+ Project development notes belong here.
4
+
5
+ ## Development Commands
6
+
7
+ Record the real project commands after bootstrap:
8
+
9
+ ```bash
10
+ # Install dependencies
11
+ # e.g. npm install
12
+
13
+ # Run locally
14
+ # e.g. npm run dev
15
+
16
+ # Run tests
17
+ # e.g. npm test
18
+
19
+ # Build
20
+ # e.g. npm run build
21
+ ```
22
+
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
+
25
+ ## Git And Release Notes
26
+
27
+ - Keep branch, commit, pull request, CI, and release conventions in this README.
28
+ - Do not place build scripts, git policy, or project maintenance instructions in `CLAUDE.md`.
29
+ - Keep code architecture notes in `Harness/architecture.md` or feature docs.
30
+ - For README improvements, use `.claude/skills/wf-readme/SKILL.md`; preserve public docs unless a rewrite is approved.
31
+
32
32
  ## Harness
33
33
 
34
34
  The agentic engineering harness lives in `Harness/`.
35
-
36
- - Follow `Harness/SETUP.md` before normal work while it exists.
37
- - Start at `Harness/README.md`.
38
- - Load memory and resource registrations from `Harness/MEMORY.md`.
39
- - Track active work in `Harness/PROGRESS.md` and `Harness/tasks/<task-id>/PROGRESS.md`.
40
- - Use `Harness/WF.md` for long, difficult, multi-agent work.
35
+
36
+ - Follow `Harness/SETUP.md` before normal work while it exists.
37
+ - Start at `Harness/README.md`.
38
+ - Load memory and resource registrations from `Harness/MEMORY.md`.
39
+ - Track active work in `Harness/PROGRESS.md` and `Harness/tasks/<task-id>/PROGRESS.md`.
40
+ - Use `Harness/WF.md` only when the user explicitly invokes a WF command such as `/wf` or `/wf-max`; complex work may still use direct planning, tests, and subagents without entering WF.
41
41
  - Claude Code: invoke the `wf` skill with `/wf`.
42
42
  - Codex: invoke the `wf` skill with `$wf` or `/skills`.
43
43
  - Use `Harness/subagents.md` when coordinating multiple agents.
@@ -1,21 +1,22 @@
1
- # Agent Lessons And Patterns
2
-
3
- Purpose: record reusable lessons from review, debugging, validation, and handoff loops.
4
-
5
- Write here when:
6
- - A review/debug loop reveals a reusable prevention pattern.
7
- - A validation failure exposes a missing regression check.
8
- - A handoff, dispatch, or context-loading pattern should be repeated or avoided.
9
-
10
- Entry format, newest first:
11
-
12
- ```markdown
13
- ## YYYY-MM-DD - Short Lesson Name
14
-
15
- - Lesson: the reusable pattern.
16
- - Source: review finding, debug loop, failed verification, or handoff.
17
- - Apply when: the task shape or files where this matters.
18
- - Regression guard: test, validator check, docs update, or manual evidence to keep it from recurring.
19
- ```
20
-
21
- Keep entries lightweight and actionable. Avoid secrets and speculative lessons.
1
+ # Agent Lessons And Patterns
2
+
3
+ Purpose: record reusable lessons from review, debugging, validation, and handoff loops.
4
+
5
+ Write here when:
6
+ - A review/debug loop reveals a reusable prevention pattern.
7
+ - A validation failure exposes a missing regression check.
8
+ - A handoff, dispatch, or context-loading pattern should be repeated or avoided.
9
+
10
+ Entry format (compact, default no date):
11
+
12
+ ```markdown
13
+ - When <scenario>: <rule>. Avoid <over-application>. Signals: <signals>.
14
+ ```
15
+
16
+ Only use date/timestamp headings when:
17
+ - Entry supersedes prior conflicting guidance
18
+ - Time-sensitive context (version, deprecation)
19
+ - Conflict resolution needed
20
+
21
+ Keep entries lightweight and actionable. Avoid secrets, speculative lessons, task logs, and process summaries.
22
+ - Entry supersedes prior conflicting guidance: add date stamp.