create-harness-vibe-coding 0.8.17 → 0.8.19

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 (150) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README-CN.md +2 -0
  3. package/README.md +3 -0
  4. package/package.json +5 -2
  5. package/src/generator.js +613 -97
  6. package/src/index.js +556 -309
  7. package/src/prompts.js +18 -0
  8. package/src/ui/dist/assets/AgentsRoute-CuSKYmFu.js +17 -0
  9. package/src/ui/dist/assets/AgentsRoute-CuSKYmFu.js.map +1 -0
  10. package/src/ui/dist/assets/RolesRoute-DOzTYVRm.js +7 -0
  11. package/src/ui/dist/assets/RolesRoute-DOzTYVRm.js.map +1 -0
  12. package/src/ui/dist/assets/SettingsRoute-DPU7jSQm.js +12 -0
  13. package/src/ui/dist/assets/SettingsRoute-DPU7jSQm.js.map +1 -0
  14. package/src/ui/dist/assets/TaskList-BN4r8s1i.js +50 -0
  15. package/src/ui/dist/assets/TaskList-BN4r8s1i.js.map +1 -0
  16. package/src/ui/dist/assets/TerminalDrawer-6GBZ9nXN.css +32 -0
  17. package/src/ui/dist/assets/TerminalDrawer-Cej4PxsH.js +74 -0
  18. package/src/ui/dist/assets/TerminalDrawer-Cej4PxsH.js.map +1 -0
  19. package/src/ui/dist/assets/WorkflowRoute-BnuhLJ6X.css +1 -0
  20. package/src/ui/dist/assets/WorkflowRoute-C-clKe-j.js +39 -0
  21. package/src/ui/dist/assets/WorkflowRoute-C-clKe-j.js.map +1 -0
  22. package/src/ui/dist/assets/index-BOVYWntB.js +117 -0
  23. package/src/ui/dist/assets/index-BOVYWntB.js.map +1 -0
  24. package/src/ui/dist/assets/index-DaUObq0H.css +1 -0
  25. package/src/ui/dist/assets/maximize-2-LNrr_rKr.js +7 -0
  26. package/src/ui/dist/assets/maximize-2-LNrr_rKr.js.map +1 -0
  27. package/src/ui/dist/assets/plus-QuTJyoT3.js +7 -0
  28. package/src/ui/dist/assets/plus-QuTJyoT3.js.map +1 -0
  29. package/src/ui/dist/assets/proxy-D0vUbds5.js +2 -0
  30. package/src/ui/dist/assets/proxy-D0vUbds5.js.map +1 -0
  31. package/src/ui/dist/assets/refresh-cw-JNmExijd.js +7 -0
  32. package/src/ui/dist/assets/refresh-cw-JNmExijd.js.map +1 -0
  33. package/src/ui/dist/assets/terminal-BBQvnOAK.js +7 -0
  34. package/src/ui/dist/assets/terminal-BBQvnOAK.js.map +1 -0
  35. package/src/ui/dist/assets/useReducedMotion-BqmH0Tf7.js +7 -0
  36. package/src/ui/dist/assets/useReducedMotion-BqmH0Tf7.js.map +1 -0
  37. package/src/ui/dist/assets/x-DoIOGAJz.js +7 -0
  38. package/src/ui/dist/assets/x-DoIOGAJz.js.map +1 -0
  39. package/src/ui/dist/index.html +18 -0
  40. package/src/ui/index.html +17 -0
  41. package/src/ui/package.json +33 -0
  42. package/src/ui/pnpm-lock.yaml +1582 -0
  43. package/src/ui/pnpm-workspace.yaml +2 -0
  44. package/src/ui/src/App.tsx +86 -0
  45. package/src/ui/src/api.ts +93 -0
  46. package/src/ui/src/components/AgentsRoute.tsx +503 -0
  47. package/src/ui/src/components/Footer.tsx +69 -0
  48. package/src/ui/src/components/Header.tsx +175 -0
  49. package/src/ui/src/components/LoadingView.tsx +22 -0
  50. package/src/ui/src/components/RolesRoute.tsx +169 -0
  51. package/src/ui/src/components/SettingsRoute.tsx +166 -0
  52. package/src/ui/src/components/TaskList.tsx +388 -0
  53. package/src/ui/src/components/TerminalDrawer.tsx +611 -0
  54. package/src/ui/src/components/WorkflowRoute.tsx +670 -0
  55. package/src/ui/src/hooks/useReducedMotion.ts +17 -0
  56. package/src/ui/src/hooks/useServerConnection.ts +114 -0
  57. package/src/ui/src/index.css +281 -0
  58. package/src/ui/src/main.tsx +11 -0
  59. package/src/ui/src/types.ts +108 -0
  60. package/src/ui/tsconfig.json +21 -0
  61. package/src/ui/vite.config.ts +19 -0
  62. package/src/wf-ui-server/__tests__/a2a-store.test.mjs +79 -0
  63. package/src/wf-ui-server/__tests__/peer-capsule.test.mjs +268 -0
  64. package/src/wf-ui-server/__tests__/pty-adapter.test.mjs +70 -0
  65. package/src/wf-ui-server/__tests__/runtime-config.test.mjs +43 -0
  66. package/src/wf-ui-server/__tests__/runtime-detector.test.mjs +90 -0
  67. package/src/wf-ui-server/__tests__/security.test.mjs +59 -0
  68. package/src/wf-ui-server/__tests__/server.integration.test.mjs +150 -0
  69. package/src/wf-ui-server/__tests__/session-registry.test.mjs +238 -0
  70. package/src/wf-ui-server/__tests__/settings.test.mjs +135 -0
  71. package/src/wf-ui-server/__tests__/task-parser.test.mjs +200 -0
  72. package/src/wf-ui-server/__tests__/terminal-store.test.mjs +138 -0
  73. package/src/wf-ui-server/__tests__/token.test.mjs +48 -0
  74. package/src/wf-ui-server/__tests__/ws-events.integration.test.mjs +419 -0
  75. package/src/wf-ui-server/__tests__/ws-terminal.integration.test.mjs +383 -0
  76. package/src/wf-ui-server/a2a-store.mjs +296 -0
  77. package/src/wf-ui-server/peer-capsule.mjs +213 -0
  78. package/src/wf-ui-server/pty-adapter.mjs +155 -0
  79. package/src/wf-ui-server/runtime-config.mjs +153 -0
  80. package/src/wf-ui-server/runtime-detector.mjs +374 -0
  81. package/src/wf-ui-server/security.mjs +67 -0
  82. package/src/wf-ui-server/server.mjs +849 -0
  83. package/src/wf-ui-server/session-registry.mjs +204 -0
  84. package/src/wf-ui-server/settings.mjs +100 -0
  85. package/src/wf-ui-server/task-parser.mjs +133 -0
  86. package/src/wf-ui-server/terminal-store.mjs +225 -0
  87. package/src/wf-ui-server/token.mjs +41 -0
  88. package/src/wf-ui-server/ws-events.mjs +354 -0
  89. package/src/wf-ui-server/ws-terminal.mjs +473 -0
  90. package/templates/common/.claude/commands/wf-command-create.md +58 -0
  91. package/templates/common/.claude/commands/wf-help.md +5 -0
  92. package/templates/common/.claude/commands/wf-task-archive.md +26 -0
  93. package/templates/common/.claude/commands/wf-task-list.md +26 -0
  94. package/templates/common/.claude/commands/wf-task-record.md +24 -0
  95. package/templates/common/.claude/commands/wf-ui.md +26 -0
  96. package/templates/common/.claude/commands/wf-update.md +54 -9
  97. package/templates/common/.claude/rules/ecc/common.md +1 -1
  98. package/templates/common/.claude/skills/wf-agents-docs/SKILL.md +15 -30
  99. package/templates/common/.claude/skills/wf-auto/SKILL.md +3 -3
  100. package/templates/common/.claude/skills/wf-auto-spark/SKILL.md +2 -2
  101. package/templates/common/.claude/skills/wf-command-create/SKILL.md +37 -0
  102. package/templates/common/.claude/skills/wf-max/SKILL.md +1 -1
  103. package/templates/common/.claude/skills/wf-review/SKILL.md +29 -2
  104. package/templates/common/.claude/skills/wf-task-archive/SKILL.md +28 -0
  105. package/templates/common/.claude/skills/wf-task-list/SKILL.md +28 -0
  106. package/templates/common/.claude/skills/wf-task-record/SKILL.md +28 -0
  107. package/templates/common/.claude/skills/wf-ui/SKILL.md +78 -0
  108. package/templates/common/.claude/skills/wf-update/SKILL.md +55 -58
  109. package/templates/common/.harness-version +105 -47
  110. package/templates/common/.opencode/commands/wf-command-create.md +61 -0
  111. package/templates/common/.opencode/commands/wf-help.md +5 -0
  112. package/templates/common/.opencode/commands/wf-task-archive.md +29 -0
  113. package/templates/common/.opencode/commands/wf-task-list.md +29 -0
  114. package/templates/common/.opencode/commands/wf-task-record.md +27 -0
  115. package/templates/common/.opencode/commands/wf-ui.md +26 -0
  116. package/templates/common/.opencode/commands/wf-update.md +54 -9
  117. package/templates/common/CLAUDE.md +8 -6
  118. package/templates/common/Harness/MEMORY.md +11 -0
  119. package/templates/common/Harness/README.md +21 -38
  120. package/templates/common/Harness/a2a/role-graph.json +79 -0
  121. package/templates/common/Harness/a2a/runtime-registry.json +5 -0
  122. package/templates/common/Harness/a2a/skills/terminal-control.json +15 -0
  123. package/templates/common/Harness/ownership.manifest.json +142 -2
  124. package/templates/common/Harness/scripts/README.md +134 -0
  125. package/templates/common/Harness/scripts/a2a-terminal.mjs +191 -0
  126. package/templates/common/Harness/scripts/context-budget.mjs +1 -1
  127. package/templates/common/Harness/scripts/sync-host-global.mjs +278 -0
  128. package/templates/common/Harness/scripts/task-state.mjs +949 -26
  129. package/templates/common/Harness/scripts/validate-harness.mjs +637 -62
  130. package/templates/common/Harness/scripts/wf-remove.mjs +42 -5
  131. package/templates/common/Harness/scripts/wf-update-check.mjs +37 -9
  132. package/templates/common/Harness/scripts/wf-update-runner.mjs +325 -0
  133. package/templates/common/Harness/settings.json +35 -0
  134. package/templates/common/Harness/specs/guides/SETUP.md +8 -0
  135. package/templates/common/Harness/specs/protocols/MEMORY_PROTOCOL.md +15 -0
  136. package/templates/common/Harness/specs/protocols/TASK_ARCHIVE.md +16 -5
  137. package/templates/common/Harness/specs/runtime/command-surface.json +229 -0
  138. package/templates/common/Harness/specs/runtime/subagents.md +6 -0
  139. package/templates/common/Harness/specs/workflows/WF-AUTO-SPARK.md +8 -8
  140. package/templates/common/Harness/specs/workflows/WF-AUTO.md +12 -12
  141. package/templates/common/Harness/specs/workflows/WF-MAX.md +5 -0
  142. package/templates/common/Harness/specs/workflows/WF-STATE.md +66 -0
  143. package/templates/common/Harness/tasks/_template/NAMING.md +16 -16
  144. package/templates/common/Harness/tasks/_template/PLAN.md +17 -60
  145. package/templates/common/Harness/tasks/_template/PROBLEM.md +18 -0
  146. package/templates/common/Harness/tasks/_template/PROGRESS.md +9 -14
  147. package/templates/common/Harness/tasks/_template/REFERENCES.md +26 -0
  148. package/templates/common/Harness/tasks/_template/STATE.json +6 -0
  149. package/templates/common/Harness/tasks/_template/ARTIFACTS.md +0 -3
  150. package/templates/common/Harness/tasks/_template/NOTES.md +0 -3
@@ -0,0 +1,229 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "commands": [
4
+ {
5
+ "id": "wf-help",
6
+ "classification": "direct",
7
+ "aliases": ["/wf-help", "$wf-help", "/skills wf-help"],
8
+ "entersWf": false,
9
+ "taskCapsulePolicy": "none",
10
+ "surfaces": {
11
+ "claudeCommand": true,
12
+ "opencodeCommand": true,
13
+ "claudeSkill": true,
14
+ "codexSkill": true,
15
+ "helpRow": true
16
+ }
17
+ },
18
+ {
19
+ "id": "wf",
20
+ "classification": "workflow",
21
+ "aliases": ["/wf", "$wf", "/skills wf"],
22
+ "entersWf": true,
23
+ "taskCapsulePolicy": "required",
24
+ "surfaces": {
25
+ "claudeCommand": true,
26
+ "opencodeCommand": true,
27
+ "claudeSkill": true,
28
+ "codexSkill": true,
29
+ "helpRow": true
30
+ }
31
+ },
32
+ {
33
+ "id": "wf-max",
34
+ "classification": "workflow",
35
+ "aliases": ["/wf-max", "$wf-max", "/skills wf-max"],
36
+ "entersWf": true,
37
+ "taskCapsulePolicy": "required",
38
+ "surfaces": {
39
+ "claudeCommand": true,
40
+ "opencodeCommand": true,
41
+ "claudeSkill": true,
42
+ "codexSkill": true,
43
+ "helpRow": true
44
+ }
45
+ },
46
+ {
47
+ "id": "wf-auto",
48
+ "classification": "workflow",
49
+ "aliases": ["/wf-auto", "$wf-auto", "/skills wf-auto"],
50
+ "entersWf": true,
51
+ "taskCapsulePolicy": "auto-capsule-required",
52
+ "surfaces": {
53
+ "claudeCommand": true,
54
+ "opencodeCommand": true,
55
+ "claudeSkill": true,
56
+ "codexSkill": true,
57
+ "helpRow": true
58
+ }
59
+ },
60
+ {
61
+ "id": "wf-auto-spark",
62
+ "classification": "workflow",
63
+ "aliases": ["/wf-auto-spark", "$wf-auto-spark", "/skills wf-auto-spark"],
64
+ "entersWf": true,
65
+ "taskCapsulePolicy": "auto-capsule-required",
66
+ "surfaces": {
67
+ "claudeCommand": true,
68
+ "opencodeCommand": true,
69
+ "claudeSkill": true,
70
+ "codexSkill": true,
71
+ "helpRow": true
72
+ }
73
+ },
74
+ {
75
+ "id": "wf-review",
76
+ "classification": "workflow",
77
+ "aliases": ["/wf-review", "$wf-review", "/skills wf-review"],
78
+ "entersWf": true,
79
+ "taskCapsulePolicy": "use-current-or-create-when-needed",
80
+ "surfaces": {
81
+ "claudeCommand": true,
82
+ "opencodeCommand": true,
83
+ "claudeSkill": true,
84
+ "codexSkill": true,
85
+ "helpRow": true
86
+ }
87
+ },
88
+ {
89
+ "id": "wf-learn",
90
+ "classification": "workflow",
91
+ "aliases": ["/wf-learn", "$wf-learn", "/skills wf-learn"],
92
+ "entersWf": true,
93
+ "taskCapsulePolicy": "use-current-or-create-when-needed",
94
+ "surfaces": {
95
+ "claudeCommand": true,
96
+ "opencodeCommand": true,
97
+ "claudeSkill": true,
98
+ "codexSkill": true,
99
+ "helpRow": true
100
+ }
101
+ },
102
+ {
103
+ "id": "wf-browser",
104
+ "classification": "workflow",
105
+ "aliases": ["/wf-browser", "$wf-browser", "/skills wf-browser"],
106
+ "entersWf": true,
107
+ "taskCapsulePolicy": "required",
108
+ "surfaces": {
109
+ "claudeCommand": true,
110
+ "opencodeCommand": true,
111
+ "claudeSkill": true,
112
+ "codexSkill": true,
113
+ "helpRow": true
114
+ }
115
+ },
116
+ {
117
+ "id": "wf-readme",
118
+ "classification": "workflow",
119
+ "aliases": ["/wf-readme", "$wf-readme", "/skills wf-readme"],
120
+ "entersWf": true,
121
+ "taskCapsulePolicy": "required",
122
+ "surfaces": {
123
+ "claudeCommand": true,
124
+ "opencodeCommand": true,
125
+ "claudeSkill": true,
126
+ "codexSkill": true,
127
+ "helpRow": true
128
+ }
129
+ },
130
+ {
131
+ "id": "wf-update",
132
+ "classification": "direct",
133
+ "aliases": ["/wf-update", "$wf-update", "/skills wf-update"],
134
+ "entersWf": false,
135
+ "taskCapsulePolicy": "none",
136
+ "surfaces": {
137
+ "claudeCommand": true,
138
+ "opencodeCommand": true,
139
+ "claudeSkill": true,
140
+ "codexSkill": true,
141
+ "helpRow": true
142
+ }
143
+ },
144
+ {
145
+ "id": "wf-remove",
146
+ "classification": "workflow",
147
+ "aliases": ["/wf-remove", "$wf-remove", "/skills wf-remove"],
148
+ "entersWf": true,
149
+ "taskCapsulePolicy": "required",
150
+ "surfaces": {
151
+ "claudeCommand": true,
152
+ "opencodeCommand": true,
153
+ "claudeSkill": true,
154
+ "codexSkill": true,
155
+ "helpRow": true
156
+ }
157
+ },
158
+ {
159
+ "id": "wf-task-record",
160
+ "classification": "direct",
161
+ "aliases": ["/wf-task-record", "$wf-task-record", "/skills wf-task-record"],
162
+ "entersWf": false,
163
+ "taskCapsulePolicy": "creates-or-updates",
164
+ "surfaces": {
165
+ "claudeCommand": true,
166
+ "opencodeCommand": true,
167
+ "claudeSkill": true,
168
+ "codexSkill": true,
169
+ "helpRow": true
170
+ }
171
+ },
172
+ {
173
+ "id": "wf-task-list",
174
+ "classification": "direct",
175
+ "aliases": ["/wf-task-list", "$wf-task-list", "/skills wf-task-list"],
176
+ "entersWf": false,
177
+ "taskCapsulePolicy": "none",
178
+ "surfaces": {
179
+ "claudeCommand": true,
180
+ "opencodeCommand": true,
181
+ "claudeSkill": true,
182
+ "codexSkill": true,
183
+ "helpRow": true
184
+ }
185
+ },
186
+ {
187
+ "id": "wf-task-archive",
188
+ "classification": "direct",
189
+ "aliases": ["/wf-task-archive", "$wf-task-archive", "/skills wf-task-archive"],
190
+ "entersWf": false,
191
+ "taskCapsulePolicy": "none",
192
+ "surfaces": {
193
+ "claudeCommand": true,
194
+ "opencodeCommand": true,
195
+ "claudeSkill": true,
196
+ "codexSkill": true,
197
+ "helpRow": true
198
+ }
199
+ },
200
+ {
201
+ "id": "wf-command-create",
202
+ "classification": "direct",
203
+ "aliases": ["/wf-command-create", "$wf-command-create", "/skills wf-command-create"],
204
+ "entersWf": false,
205
+ "taskCapsulePolicy": "required",
206
+ "surfaces": {
207
+ "claudeCommand": true,
208
+ "opencodeCommand": true,
209
+ "claudeSkill": true,
210
+ "codexSkill": true,
211
+ "helpRow": true
212
+ }
213
+ },
214
+ {
215
+ "id": "wf-ui",
216
+ "classification": "direct",
217
+ "aliases": ["/wf-ui", "$wf-ui", "/skills wf-ui"],
218
+ "entersWf": false,
219
+ "taskCapsulePolicy": "none",
220
+ "surfaces": {
221
+ "claudeCommand": true,
222
+ "opencodeCommand": true,
223
+ "claudeSkill": true,
224
+ "codexSkill": true,
225
+ "helpRow": true
226
+ }
227
+ }
228
+ ]
229
+ }
@@ -208,6 +208,12 @@ independent same-runtime subagent context; for broad WF-MAX review, dispatch
208
208
  agents report suggestions only. The controller accepts, rejects, or escalates
209
209
  each finding and owns the final decision.
210
210
 
211
+ ### OpenCode Reviewer Caveat
212
+
213
+ `opencode run --agent reviewer`: current installed `.opencode/agents/reviewer.md`
214
+ is `mode: subagent`; OpenCode falls back to the default agent. Probe before
215
+ claiming primary-runner review. Prefer same-runtime reviewer subagent fallback.
216
+
211
217
  ## Subagent Status Handling
212
218
 
213
219
  | Status | Controller Action |
@@ -28,7 +28,7 @@ For task-state writes, CEO provides concise bullets and decisions; task-scribe f
28
28
 
29
29
  ## Startup: Roadmap Declaration
30
30
 
31
- Before first spark cycle, CEO MUST declare a roadmap. This is written to `Harness/tasks/auto/SPARK-ROADMAP.md`.
31
+ Before first spark cycle, CEO MUST declare a roadmap. This is written to `Harness/tasks/continuous/SPARK-ROADMAP.md`.
32
32
 
33
33
  ### Roadmap Format
34
34
 
@@ -239,15 +239,15 @@ Re-Anchor Gate (every preset interval)
239
239
 
240
240
  ## Task Capsule & Recording
241
241
 
242
- WF-AUTO-SPARK uses a dedicated task capsule at `Harness/tasks/auto/`. Shared with `/wf-auto` — same capsule, different operational mode.
242
+ WF-AUTO-SPARK uses a dedicated task capsule at `Harness/tasks/continuous/`. Shared with `/wf-auto` — same capsule, different operational mode.
243
243
 
244
244
  ### Capsule Structure
245
245
 
246
246
  | File | Purpose | Updated |
247
247
  |------|---------|---------|
248
- | `Harness/tasks/auto/SPARK-ROADMAP.md` | North Star + milestones + deviation log | At startup + every milestone change |
249
- | `Harness/tasks/auto/PLAN.md` | Current cycle's change spec (write set, acceptance criteria) | Before each implementation |
250
- | `Harness/tasks/auto/PROGRESS.md` | Cycle log, value reflections, cumulative stats, evidence | After each cycle |
248
+ | `Harness/tasks/continuous/SPARK-ROADMAP.md` | North Star + milestones + deviation log | At startup + every milestone change |
249
+ | `Harness/tasks/continuous/PLAN.md` | Current cycle's change spec (write set, acceptance criteria) | Before each implementation |
250
+ | `Harness/tasks/continuous/PROGRESS.md` | Cycle log, value reflections, cumulative stats, evidence | After each cycle |
251
251
  | `Harness/PROGRESS.md` | Global task index — active spark session status | At session start, milestone, and stop |
252
252
 
253
253
  ### Heartbeat Protocol (per cycle, in `PROGRESS.md`)
@@ -314,9 +314,9 @@ This replaces the broken `/wf-auto` auto-continue. No silent drift across sessio
314
314
  | File | Purpose |
315
315
  |------|---------|
316
316
  | `Harness/specs/workflows/WF-AUTO-SPARK.md` | This spec |
317
- | `Harness/tasks/auto/SPARK-ROADMAP.md` | Active roadmap (created at startup) |
318
- | `Harness/tasks/auto/PLAN.md` | Per-cycle change spec |
319
- | `Harness/tasks/auto/PROGRESS.md` | Cycle log, heartbeat, evidence ledger |
317
+ | `Harness/tasks/continuous/SPARK-ROADMAP.md` | Active roadmap (created at startup) |
318
+ | `Harness/tasks/continuous/PLAN.md` | Per-cycle change spec |
319
+ | `Harness/tasks/continuous/PROGRESS.md` | Cycle log, heartbeat, evidence ledger |
320
320
  | `Harness/PROGRESS.md` | Global task index linkage |
321
321
  | `.claude/skills/wf-auto-spark/SKILL.md` | Claude Code skill loader |
322
322
  | `.agents/skills/wf-auto-spark/SKILL.md` | Codex skill loader (mirror) |
@@ -113,7 +113,7 @@ WF-AUTO operates in explicit states. Without a state machine, "auto-degrade", "s
113
113
  | `auto.exhausted` | A-GATE passed permanently | Two different confirmation strategies return no actionable finding |
114
114
  | `paused` | User interrupted, waiting for direction | User says "stop" or interrupts at any point |
115
115
 
116
- **State transitions are CEO-owned.** The CEO decides which state to enter based on W0 results and checkpoint responses. The state machine is recorded in `Harness/tasks/auto/PROGRESS.md` at each transition.
116
+ **State transitions are CEO-owned.** The CEO decides which state to enter based on W0 results and checkpoint responses. The state machine is recorded in `Harness/tasks/continuous/PROGRESS.md` at each transition.
117
117
 
118
118
  ## Adaptive coverage instead of a magic angle count
119
119
 
@@ -271,7 +271,7 @@ CEO NEVER writes production code (per WF-KERNEL State Ownership). Implementer wr
271
271
 
272
272
  ### RECORD
273
273
 
274
- Every cycle writes one entry to `Harness/tasks/auto/PROGRESS.md`:
274
+ Every cycle writes one entry to `Harness/tasks/continuous/PROGRESS.md`:
275
275
 
276
276
  ```text
277
277
  ## Cycle N (timestamp) — State: auto.internal | auto.spark | auto.checkpoint
@@ -304,18 +304,18 @@ enabled `/wf-auto` tick hook may drive long-running auto-optimization.
304
304
 
305
305
  Manual or benchmark-driven single-cycle `/wf-auto` runs use the same bounded
306
306
  tick contract: they may stop because the caller explicitly requested one tick,
307
- but they still MUST create or update `Harness/tasks/auto/PLAN.md` and
308
- `Harness/tasks/auto/PROGRESS.md` before returning.
307
+ but they still MUST create or update `Harness/tasks/continuous/PLAN.md` and
308
+ `Harness/tasks/continuous/PROGRESS.md` before returning.
309
309
 
310
310
  The hook is not a role-enforcement mechanism, not a memory injection mechanism,
311
311
  and not WF-MAX state. It is only a bounded tick trigger:
312
312
 
313
313
  ```text
314
314
  wf-auto hook event
315
- -> confirm /wf-auto is active in Harness/tasks/auto/
315
+ -> confirm /wf-auto is active in Harness/tasks/continuous/
316
316
  -> check STOP/paused/user-interrupt state
317
317
  -> request exactly one W0-W5 tick or one Intent Checkpoint
318
- -> append heartbeat/evidence to Harness/tasks/auto/PROGRESS.md
318
+ -> append heartbeat/evidence to Harness/tasks/continuous/PROGRESS.md
319
319
  -> exit
320
320
  ```
321
321
 
@@ -324,7 +324,7 @@ Hard boundaries:
324
324
  - no execution-control hook is installed or registered by default
325
325
  - only `/wf-auto` may use a runtime hook to drive auto-optimization
326
326
  - the hook must run one bounded tick, not an unbounded process
327
- - the hook must respect `Harness/tasks/auto/STOP`, `state=paused`, user stop,
327
+ - the hook must respect `Harness/tasks/continuous/STOP`, `state=paused`, user stop,
328
328
  and the Adaptive Coverage Exhaustion Gate
329
329
  - the hook must not enforce WF-MAX roles, writeSet, or agent identity
330
330
  - the hook must not inject memory directly; use `MEMORY_PROTOCOL.md` scenario
@@ -449,7 +449,7 @@ If a spark cycle's measured result is NEGLIGIBLE or REVERTED, increment `weakSpa
449
449
 
450
450
  ## CEO Constraints
451
451
 
452
- CEO tool boundaries follow [WF-KERNEL.md](WF-KERNEL.md) State Ownership: CEO plans, dispatches, synthesizes, and writes ONLY the auto task capsule (`Harness/tasks/auto/PROGRESS.md`, `Harness/tasks/auto/PLAN.md`). CEO never writes production source code — all implementation is delegated to Workers.
452
+ CEO tool boundaries follow [WF-KERNEL.md](WF-KERNEL.md) State Ownership: CEO plans, dispatches, synthesizes, and writes ONLY the auto task capsule (`Harness/tasks/continuous/PROGRESS.md`, `Harness/tasks/continuous/PLAN.md`). CEO never writes production source code — all implementation is delegated to Workers.
453
453
 
454
454
  ## Anti-Pattern Catalog
455
455
 
@@ -509,10 +509,10 @@ Mini PRD-derived AC IDs in `/wf-auto`.
509
509
 
510
510
  ## Task Capsule
511
511
 
512
- WF-AUTO uses a dedicated task capsule at `Harness/tasks/auto/`:
512
+ WF-AUTO uses a dedicated task capsule at `Harness/tasks/continuous/`:
513
513
 
514
- - `Harness/tasks/auto/PROGRESS.md` — cycle log, exhaustion evidence, cumulative stats
515
- - `Harness/tasks/auto/PLAN.md` — current cycle's change spec
514
+ - `Harness/tasks/continuous/PROGRESS.md` — cycle log, exhaustion evidence, cumulative stats
515
+ - `Harness/tasks/continuous/PLAN.md` — current cycle's change spec
516
516
 
517
517
  Unlike normal task capsules, this one is never archived — it's the permanent home of the auto-optimization state.
518
518
 
@@ -522,6 +522,6 @@ Closeout happens exactly once, when A-GATE passes permanently:
522
522
 
523
523
  1. CEO records final exhaustion evidence: dynamic obligations, selected and skipped probes, coverage, confidence, and two different confirmation strategies
524
524
  2. CEO writes summary: total cycles, files changed, findings addressed, findings rejected, residual risk
525
- 3. CEO marks `Harness/tasks/auto/PROGRESS.md` as "WF-AUTO EXHAUSTED" with timestamp
525
+ 3. CEO marks `Harness/tasks/continuous/PROGRESS.md` as "WF-AUTO EXHAUSTED" with timestamp
526
526
  4. `Harness/PROGRESS.md` is updated with the auto session outcome
527
527
  5. No further automatic action is taken
@@ -86,6 +86,11 @@ Every Worker dispatch or peer-CLI call must be bounded by the controller's comma
86
86
 
87
87
  Record the channel actually used, command/tool form, timeout, exit status, and a <=250 token Evidence-Packet in the task capsule. Do not create ad hoc probe scripts or write peer-CLI output to `%TEMP%`; persistent evidence belongs only under the current task's `evidence/` directory when it is intentionally part of the task record.
88
88
 
89
+ ### Peer CLI Output Contract
90
+
91
+ - `opencode run --agent reviewer`: installed agent is `mode: subagent` per `.opencode/agents/reviewer.md`. Do NOT claim primary-runner role use without a live probe.
92
+ - Parse JSON/JSONL peer CLI output: fail on empty/non-JSON, error events, budget errors, fallback warnings, or missing final model text.
93
+
89
94
  ## Parallelism Priority
90
95
 
91
96
  1. Read-only exploration — max parallel, all readSets
@@ -82,6 +82,67 @@ Use `Harness/scripts/task-state.mjs` as the deterministic state writer:
82
82
  Do not rely on prompt instructions alone to keep active task, task `STATE.json`,
83
83
  task `PROGRESS.md`, and root `Harness/PROGRESS.md` synchronized.
84
84
 
85
+ ## Links (Cross-Task Dependencies)
86
+
87
+ STATE.json `links` enables cross-task dependency resolution without reading
88
+ every task capsule:
89
+
90
+ | Field | Type | Description |
91
+ |-------|------|-------------|
92
+ | `links.dependsOn` | `string[]` | Task IDs this task depends on (blockers) |
93
+ | `links.blocks` | `string[]` | Task IDs this task blocks |
94
+ | `links.related` | `string[]` | Related task IDs (no dependency direction) |
95
+
96
+ When resolving `links.dependsOn`, the controller reads only the listed tasks'
97
+ STATE.json, not all task capsules. A task with unresolved dependsOn entries
98
+ should stay in the blocked queue until its dependencies resolve.
99
+
100
+ ## Work Items (Parallel Dispatch)
101
+
102
+ STATE.json `workItems[]` enables fine-grained parallel dispatch tracking with
103
+ per-item dependencies:
104
+
105
+ | Field | Type | Description |
106
+ |-------|------|-------------|
107
+ | `id` | `string` | Unique item identifier |
108
+ | `status` | `string` | `pending`, `ready`, `running`, `done`, `blocked`, `skipped`, `failed` |
109
+ | `phase` | `string` | Phase this item belongs to |
110
+ | `dependsOn` | `string[]` | Item IDs this item depends on |
111
+ | `parallelGroup` | `string` | Group name for concurrent dispatch (optional) |
112
+ | `readSet` | `string[]` | Files/patterns the item may read |
113
+ | `writeSet` | `string[]` | Files/patterns the item may write |
114
+ | `agent` | `string` | Agent role assigned (optional) |
115
+ | `evidence` | `string` | Evidence path or summary (optional) |
116
+ | `next` | `string` | Next action after this item completes (optional) |
117
+
118
+ `workItems` is an additive array — it supplements the dispatchLedger and queues
119
+ for finer-grained tracking. The dispatchLedger remains the canonical record of
120
+ subagent dispatches.
121
+
122
+ ## Open Tasks
123
+
124
+ "Open tasks" are non-archived task capsules with status one of:
125
+ `active`, `in_progress`, `running`, `pending`, `blocked`,
126
+ `needs-user-decision`.
127
+
128
+ The active pointer (`Harness/PROGRESS.md`) marks the single task the agent
129
+ should resume. Other open tasks remain visible in the Task Index but are not
130
+ automatically loaded.
131
+
132
+ ## Queue Entry Normalization
133
+
134
+ Queues (`ready`, `running`, `blocked`, `done`) accept both plain string entries
135
+ and object entries. The normalization rules are backward-compatible:
136
+
137
+ - A plain string entry is treated as a task or dispatch item ID.
138
+ - An object entry may contain the same fields as a work item (`id`, `status`,
139
+ `dependsOn`, etc.) for richer inline tracking.
140
+ - `task-state.mjs` preserves both forms during reconcile — it does not coerce
141
+ objects to strings or vice versa.
142
+
143
+ This enables incremental adoption: existing STATE.json files with string-only
144
+ queues continue to work without changes.
145
+
85
146
  ## Resume Protocol
86
147
 
87
148
  New window / session start:
@@ -99,6 +160,11 @@ New window / session start:
99
160
  - Queues: ready (can dispatch immediately), running (awaiting results),
100
161
  blocked (needs resolution), done.
101
162
  - nextAction (what to do next).
163
+ - **links.dependsOn**: if non-empty, check whether any dependency tasks are
164
+ still open (their STATE.json has a non-archived status). Report blocked
165
+ dependencies to the user.
166
+ - **workItems[]**: if non-empty, inspect items with status `running` or
167
+ `ready` for parallel dispatch candidates.
102
168
  4. Do NOT bulk-read `Harness/tasks/` to find context. Use the active pointer.
103
169
  5. Direct simple tasks may skip STATE/PLAN/PROGRESS unless the user says
104
170
  "continue"/"resume".
@@ -3,20 +3,20 @@
3
3
  ## Format
4
4
 
5
5
  ```
6
- task-<verb>-<noun>[-detail]
6
+ task-<verb>-<noun>[-detail]-<MMDD>
7
7
  ```
8
8
 
9
- All task directories MUST have the `task-` prefix. This distinguishes tasks from system directories at a glance.
9
+ All task directories MUST have the `task-` prefix and end with a 4-digit month-day suffix (MMDD, e.g. `0729` for July 29). This distinguishes tasks from system directories and provides chronological ordering.
10
10
 
11
11
  ## Rules
12
12
 
13
13
  | Rule | Example ✓ | Example ✗ |
14
14
  |------|-----------|-----------|
15
- | `task-` prefix required | `task-fix-ceo-inheritance` | `fix-ceo-inheritance` |
16
- | kebab-case (lowercase, hyphens) | `task-fix-ceo-inheritance` | `task-fix_ceo_inheritance` |
17
- | Verb-first after prefix | `task-add-goal-persistence` | `task-goal-persistence-add` |
18
- | 2-5 words after prefix, <=46 total chars | `task-refactor-role-contract` | `task-refactor-the-entire-role-contract-model` |
19
- | No abbreviations unless domain-standard | `task-fix-auth-middleware` | `task-fx-ath-mdw` |
15
+ | `task-` prefix + MMDD suffix required | `task-fix-ceo-inheritance-0730` | `fix-ceo-inheritance-0730` |
16
+ | kebab-case (lowercase, hyphens) | `task-fix-ceo-inheritance-0730` | `task-fix_ceo_inheritance-0730` |
17
+ | Verb-first after prefix | `task-add-goal-persistence-0730` | `task-goal-persistence-add-0730` |
18
+ | 2-5 words after prefix + MMDD date, <=46 total chars | `task-refactor-role-contract-0729` | `task-refactor-the-entire-role-contract-model-0729` |
19
+ | No abbreviations unless domain-standard | `task-fix-auth-middleware-0730` | `task-fx-ath-mdw-0730` |
20
20
 
21
21
  ## Reserved Names
22
22
 
@@ -27,7 +27,7 @@ All task directories MUST have the `task-` prefix. This distinguishes tasks from
27
27
 
28
28
  ## Task ID Lifecycle
29
29
 
30
- 1. Created by copying `_template/` → `task-<verb>-<noun>/`
30
+ 1. Created by copying `_template/` → `task-<verb>-<noun>-<MMDD>/`
31
31
  2. Directory name IS the task ID - used in `Harness/PROGRESS.md` and dispatch packets
32
32
  3. Directory archived (not renamed) when task completes
33
33
  4. Task ID is immutable after creation (changing it breaks cross-references)
@@ -36,12 +36,12 @@ All task directories MUST have the `task-` prefix. This distinguishes tasks from
36
36
  ## Examples
37
37
 
38
38
  ```
39
- task-add-dark-mode-support
40
- task-fix-auth-token-expiry
41
- task-update-harness-lifecycle-docs
42
- task-remove-legacy-config-files
43
- task-refactor-agent-dispatch-model
44
- task-migrate-to-esm-imports
45
- task-audit-security-headers
46
- task-benchmark-wf-max-throughput
39
+ task-add-dark-mode-support-0729
40
+ task-fix-auth-token-expiry-0730
41
+ task-update-harness-lifecycle-docs-0728
42
+ task-remove-legacy-config-files-0731
43
+ task-refactor-agent-dispatch-model-0801
44
+ task-migrate-to-esm-imports-0802
45
+ task-audit-security-headers-0803
46
+ task-benchmark-wf-max-throughput-0804
47
47
  ```
@@ -1,80 +1,37 @@
1
1
  # {{TASK_ID}} - PLAN
2
2
 
3
- Compact task record. Keep only facts needed to resume, review, and verify.
4
- Link files or command names instead of pasting logs or subagent transcripts.
5
-
6
- > Task ID: kebab-case, under 60 chars. Directory name = task ID.
3
+ Compact task record. Default: keep 1-3 concise ACs unless the task explicitly needs a broader acceptance matrix.
7
4
 
8
5
  ## Goal
9
6
 
10
7
  - Outcome:
11
8
  - Non-goals:
12
9
 
13
- ## Decisions
14
-
15
- -
16
-
17
- ## Acceptance
18
-
19
- Default: keep 1-3 concise ACs. Expand only for UI/API/security/data-loss,
20
- cross-module, or other high-risk behavior.
21
-
22
- - AC-001:
23
-
24
- Expanded evidence required when triggered:
25
- - UI/browser-visible: add selector contract and real browser evidence.
26
- - API/integration: add endpoint/payload/response contract.
27
- - High-risk behavior: add AC-by-AC validation matrix.
28
-
29
10
  ## Scope
30
11
 
31
- Allowed write set:
32
- -
33
-
34
- Forbidden:
35
- -
36
- - Truth files (PRD, ACs, UI/API contracts, test plan, validation report) unless a Change Request is recorded.
37
-
38
- ## Memory Preflight
39
-
40
- - Memory preflight: done | exempt | blocked
41
- - Memory hints: none | <file/path + reason>
12
+ - Write set:
13
+ - Forbidden:
42
14
 
43
- ## Context
44
-
45
- - Loaded:
46
- - Assumptions:
47
-
48
- ## Agents
49
-
50
- Only record agents or bounded passes that materially changed the decision.
51
-
52
- | Role | Read / Write Set | Result |
53
- |------|------------------|--------|
15
+ ## Decisions
54
16
 
55
- ## Verification
17
+ | # | Decision | Reason | Date |
18
+ |---|----------|--------|------|
19
+ | | | | |
56
20
 
57
- - [ ]
21
+ ## Acceptance
58
22
 
59
- ## Risks
23
+ | ID | Criterion | Evidence | Status |
24
+ |----|-----------|----------|--------|
25
+ | AC-001 | | | pending |
60
26
 
61
- -
27
+ Expanded evidence required when triggered by high-risk changes, broad cross-file edits, release work, or user request.
62
28
 
63
29
  ## Expanded Contracts
64
30
 
65
- Use this section only when the Acceptance triggers above apply.
66
-
67
- ### UI Contract
68
-
69
- | Element | Selector / Role | States | AC IDs |
70
- |---------|-----------------|--------|--------|
31
+ - Add Given/When/Then, selector contracts, migration notes, or release evidence only when the task risk requires it.
71
32
 
72
- ### API Contract
73
-
74
- | Endpoint | Method | Payload / Response | AC IDs |
75
- |----------|--------|--------------------|--------|
76
-
77
- ### Validation Matrix
33
+ ## Risks
78
34
 
79
- | AC ID | Result | Evidence | Notes |
80
- |-------|--------|----------|-------|
35
+ | Risk | Mitigation | Status |
36
+ |------|------------|--------|
37
+ | | | |
@@ -0,0 +1,18 @@
1
+ # {{TASK_ID}} - PROBLEM
2
+
3
+ Record problems, root causes, and fixes. One entry per distinct problem.
4
+ Delete files that prove nothing.
5
+
6
+ ## Active
7
+
8
+ | ID | Problem | Root cause | Fix | Status |
9
+ |----|---------|------------|-----|--------|
10
+ | | | | | |
11
+
12
+ ## Resolved
13
+
14
+ | ID | Problem | Root cause | Fix | Resolved |
15
+ |----|---------|------------|-----|----------|
16
+ | | | | | |
17
+
18
+ Status: open | investigating | blocked | fixed
@@ -1,26 +1,21 @@
1
1
  # {{TASK_ID}} - PROGRESS
2
2
 
3
- Compact heartbeat. Update on phase changes, blockers, failures, and closeout.
4
- Do not paste logs; record the command/file that proves the state.
3
+ Compact heartbeat.
5
4
 
6
- ## Status
5
+ Phase heartbeat. Update on transitions, blockers, verification. Keep under 20 lines.
6
+
7
+ ## Current
7
8
 
8
9
  - Phase: Intake
9
10
  - Next:
10
11
  - Blocker: none
11
12
 
12
- ## Tasks
13
-
14
- - [ ] Define goal and scope
15
-
16
- ## Changes
17
-
18
- -
19
-
20
13
  ## Verification
21
14
 
22
- -
15
+ - [ ] verification command
23
16
 
24
- ## Notes
17
+ ## Log
25
18
 
26
- -
19
+ | Date | Phase | Note |
20
+ |------|-------|------|
21
+ | | | |