workspace-maxxing 0.1.0

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 (198) hide show
  1. package/.agents/skills/workspace-maxxing/.workspace-templates/CONTEXT.md +44 -0
  2. package/.agents/skills/workspace-maxxing/.workspace-templates/SYSTEM.md +44 -0
  3. package/.agents/skills/workspace-maxxing/.workspace-templates/references/anti-patterns.md +16 -0
  4. package/.agents/skills/workspace-maxxing/.workspace-templates/references/iron-laws.md +26 -0
  5. package/.agents/skills/workspace-maxxing/.workspace-templates/references/reporting-format.md +52 -0
  6. package/.agents/skills/workspace-maxxing/.workspace-templates/scripts/benchmark.ts +171 -0
  7. package/.agents/skills/workspace-maxxing/.workspace-templates/scripts/dispatch.ts +473 -0
  8. package/.agents/skills/workspace-maxxing/.workspace-templates/scripts/generate-tests.ts +158 -0
  9. package/.agents/skills/workspace-maxxing/.workspace-templates/scripts/install-tool.ts +82 -0
  10. package/.agents/skills/workspace-maxxing/.workspace-templates/scripts/iterate.ts +265 -0
  11. package/.agents/skills/workspace-maxxing/.workspace-templates/scripts/orchestrator.ts +539 -0
  12. package/.agents/skills/workspace-maxxing/.workspace-templates/scripts/scaffold.ts +282 -0
  13. package/.agents/skills/workspace-maxxing/.workspace-templates/scripts/validate.ts +452 -0
  14. package/.agents/skills/workspace-maxxing/.workspace-templates/skills/architecture/SKILL.md +95 -0
  15. package/.agents/skills/workspace-maxxing/.workspace-templates/skills/fixer/SKILL.md +109 -0
  16. package/.agents/skills/workspace-maxxing/.workspace-templates/skills/iteration/SKILL.md +89 -0
  17. package/.agents/skills/workspace-maxxing/.workspace-templates/skills/prompt-engineering/SKILL.md +87 -0
  18. package/.agents/skills/workspace-maxxing/.workspace-templates/skills/research/SKILL.md +94 -0
  19. package/.agents/skills/workspace-maxxing/.workspace-templates/skills/testing/SKILL.md +89 -0
  20. package/.agents/skills/workspace-maxxing/.workspace-templates/skills/tooling/SKILL.md +87 -0
  21. package/.agents/skills/workspace-maxxing/.workspace-templates/skills/validation/SKILL.md +103 -0
  22. package/.agents/skills/workspace-maxxing/.workspace-templates/skills/worker/SKILL.md +79 -0
  23. package/.agents/skills/workspace-maxxing/.workspace-templates/workspace/00-meta/CONTEXT.md +6 -0
  24. package/.agents/skills/workspace-maxxing/.workspace-templates/workspace/00-meta/execution-log.md +27 -0
  25. package/.agents/skills/workspace-maxxing/.workspace-templates/workspace/01-input/CONTEXT.md +29 -0
  26. package/.agents/skills/workspace-maxxing/.workspace-templates/workspace/02-process/CONTEXT.md +29 -0
  27. package/.agents/skills/workspace-maxxing/.workspace-templates/workspace/03-output/CONTEXT.md +29 -0
  28. package/.agents/skills/workspace-maxxing/.workspace-templates/workspace/README.md +14 -0
  29. package/.agents/skills/workspace-maxxing/SKILL.md +312 -0
  30. package/.agents/skills/workspace-maxxing/scripts/benchmark.ts +171 -0
  31. package/.agents/skills/workspace-maxxing/scripts/dispatch.ts +473 -0
  32. package/.agents/skills/workspace-maxxing/scripts/generate-tests.ts +158 -0
  33. package/.agents/skills/workspace-maxxing/scripts/install-tool.ts +82 -0
  34. package/.agents/skills/workspace-maxxing/scripts/iterate.ts +265 -0
  35. package/.agents/skills/workspace-maxxing/scripts/orchestrator.ts +539 -0
  36. package/.agents/skills/workspace-maxxing/scripts/scaffold.ts +282 -0
  37. package/.agents/skills/workspace-maxxing/scripts/validate.ts +452 -0
  38. package/README.md +144 -0
  39. package/dist/agent-creator.d.ts +9 -0
  40. package/dist/agent-creator.d.ts.map +1 -0
  41. package/dist/agent-creator.js +199 -0
  42. package/dist/agent-creator.js.map +1 -0
  43. package/dist/agent-iterator.d.ts +38 -0
  44. package/dist/agent-iterator.d.ts.map +1 -0
  45. package/dist/agent-iterator.js +327 -0
  46. package/dist/agent-iterator.js.map +1 -0
  47. package/dist/index.d.ts +3 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +197 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/install.d.ts +18 -0
  52. package/dist/install.d.ts.map +1 -0
  53. package/dist/install.js +117 -0
  54. package/dist/install.js.map +1 -0
  55. package/dist/platforms/claude.d.ts +7 -0
  56. package/dist/platforms/claude.d.ts.map +1 -0
  57. package/dist/platforms/claude.js +70 -0
  58. package/dist/platforms/claude.js.map +1 -0
  59. package/dist/platforms/copilot.d.ts +7 -0
  60. package/dist/platforms/copilot.d.ts.map +1 -0
  61. package/dist/platforms/copilot.js +75 -0
  62. package/dist/platforms/copilot.js.map +1 -0
  63. package/dist/platforms/gemini.d.ts +7 -0
  64. package/dist/platforms/gemini.d.ts.map +1 -0
  65. package/dist/platforms/gemini.js +81 -0
  66. package/dist/platforms/gemini.js.map +1 -0
  67. package/dist/platforms/index.d.ts +8 -0
  68. package/dist/platforms/index.d.ts.map +1 -0
  69. package/dist/platforms/index.js +41 -0
  70. package/dist/platforms/index.js.map +1 -0
  71. package/dist/platforms/opencode.d.ts +7 -0
  72. package/dist/platforms/opencode.d.ts.map +1 -0
  73. package/dist/platforms/opencode.js +70 -0
  74. package/dist/platforms/opencode.js.map +1 -0
  75. package/dist/scripts/benchmark.d.ts +20 -0
  76. package/dist/scripts/benchmark.d.ts.map +1 -0
  77. package/dist/scripts/benchmark.js +170 -0
  78. package/dist/scripts/benchmark.js.map +1 -0
  79. package/dist/scripts/dispatch.d.ts +32 -0
  80. package/dist/scripts/dispatch.d.ts.map +1 -0
  81. package/dist/scripts/dispatch.js +386 -0
  82. package/dist/scripts/dispatch.js.map +1 -0
  83. package/dist/scripts/generate-tests.d.ts +11 -0
  84. package/dist/scripts/generate-tests.d.ts.map +1 -0
  85. package/dist/scripts/generate-tests.js +118 -0
  86. package/dist/scripts/generate-tests.js.map +1 -0
  87. package/dist/scripts/install-tool.d.ts +8 -0
  88. package/dist/scripts/install-tool.d.ts.map +1 -0
  89. package/dist/scripts/install-tool.js +98 -0
  90. package/dist/scripts/install-tool.js.map +1 -0
  91. package/dist/scripts/iterate.d.ts +44 -0
  92. package/dist/scripts/iterate.d.ts.map +1 -0
  93. package/dist/scripts/iterate.js +260 -0
  94. package/dist/scripts/iterate.js.map +1 -0
  95. package/dist/scripts/orchestrator.d.ts +40 -0
  96. package/dist/scripts/orchestrator.d.ts.map +1 -0
  97. package/dist/scripts/orchestrator.js +378 -0
  98. package/dist/scripts/orchestrator.js.map +1 -0
  99. package/dist/scripts/scaffold.d.ts +8 -0
  100. package/dist/scripts/scaffold.d.ts.map +1 -0
  101. package/dist/scripts/scaffold.js +279 -0
  102. package/dist/scripts/scaffold.js.map +1 -0
  103. package/dist/scripts/validate.d.ts +11 -0
  104. package/dist/scripts/validate.d.ts.map +1 -0
  105. package/dist/scripts/validate.js +472 -0
  106. package/dist/scripts/validate.js.map +1 -0
  107. package/docs/superpowers/plans/2026-04-07-autonomous-iteration-plan.md +1123 -0
  108. package/docs/superpowers/plans/2026-04-07-autonomous-iteration-sub-agent-batches.md +1923 -0
  109. package/docs/superpowers/plans/2026-04-07-autonomous-workflow-sub-skill-plan.md +1505 -0
  110. package/docs/superpowers/plans/2026-04-07-benchmarking-multi-agent-plan.md +854 -0
  111. package/docs/superpowers/plans/2026-04-07-workspace-builder-logic-plan.md +1426 -0
  112. package/docs/superpowers/plans/2026-04-07-workspace-maxxing-plan.md +1299 -0
  113. package/docs/superpowers/plans/2026-04-08-session-294c-subagent-invocation-plan.md +320 -0
  114. package/docs/superpowers/plans/2026-04-08-workflow-prompt-hardening-plan.md +1025 -0
  115. package/docs/superpowers/plans/2026-04-12-workspace-agent-creation-plan.md +992 -0
  116. package/docs/superpowers/specs/2026-04-07-autonomous-iteration-design.md +214 -0
  117. package/docs/superpowers/specs/2026-04-07-autonomous-iteration-sub-agent-batches-design.md +188 -0
  118. package/docs/superpowers/specs/2026-04-07-autonomous-workflow-sub-skill-design.md +137 -0
  119. package/docs/superpowers/specs/2026-04-07-benchmarking-multi-agent-design.md +105 -0
  120. package/docs/superpowers/specs/2026-04-07-workspace-builder-logic-design.md +179 -0
  121. package/docs/superpowers/specs/2026-04-07-workspace-maxxing-design.md +227 -0
  122. package/docs/superpowers/specs/2026-04-08-session-294c-subagent-invocation-design.md +265 -0
  123. package/docs/superpowers/specs/2026-04-08-workflow-prompt-hardening-design.md +146 -0
  124. package/docs/superpowers/specs/2026-04-12-workspace-agent-creation-design.md +239 -0
  125. package/jest.config.js +8 -0
  126. package/package.json +32 -0
  127. package/src/agent-creator.ts +180 -0
  128. package/src/agent-iterator.ts +397 -0
  129. package/src/index.ts +189 -0
  130. package/src/install.ts +105 -0
  131. package/src/platforms/claude.ts +40 -0
  132. package/src/platforms/copilot.ts +50 -0
  133. package/src/platforms/gemini.ts +55 -0
  134. package/src/platforms/index.ts +45 -0
  135. package/src/platforms/opencode.ts +41 -0
  136. package/src/scripts/benchmark.ts +171 -0
  137. package/src/scripts/dispatch.ts +473 -0
  138. package/src/scripts/generate-tests.ts +112 -0
  139. package/src/scripts/install-tool.ts +82 -0
  140. package/src/scripts/iterate.ts +271 -0
  141. package/src/scripts/orchestrator.ts +539 -0
  142. package/src/scripts/scaffold.ts +282 -0
  143. package/src/scripts/validate.ts +516 -0
  144. package/templates/.workspace-templates/CONTEXT.md +44 -0
  145. package/templates/.workspace-templates/SYSTEM.md +44 -0
  146. package/templates/.workspace-templates/references/anti-patterns.md +16 -0
  147. package/templates/.workspace-templates/references/iron-laws.md +26 -0
  148. package/templates/.workspace-templates/references/reporting-format.md +52 -0
  149. package/templates/.workspace-templates/scripts/benchmark.ts +171 -0
  150. package/templates/.workspace-templates/scripts/dispatch.ts +473 -0
  151. package/templates/.workspace-templates/scripts/generate-tests.ts +158 -0
  152. package/templates/.workspace-templates/scripts/install-tool.ts +82 -0
  153. package/templates/.workspace-templates/scripts/iterate.ts +265 -0
  154. package/templates/.workspace-templates/scripts/orchestrator.ts +539 -0
  155. package/templates/.workspace-templates/scripts/scaffold.ts +282 -0
  156. package/templates/.workspace-templates/scripts/validate.ts +452 -0
  157. package/templates/.workspace-templates/skills/architecture/SKILL.md +95 -0
  158. package/templates/.workspace-templates/skills/fixer/SKILL.md +109 -0
  159. package/templates/.workspace-templates/skills/iteration/SKILL.md +89 -0
  160. package/templates/.workspace-templates/skills/prompt-engineering/SKILL.md +87 -0
  161. package/templates/.workspace-templates/skills/research/SKILL.md +94 -0
  162. package/templates/.workspace-templates/skills/testing/SKILL.md +89 -0
  163. package/templates/.workspace-templates/skills/tooling/SKILL.md +87 -0
  164. package/templates/.workspace-templates/skills/validation/SKILL.md +103 -0
  165. package/templates/.workspace-templates/skills/worker/SKILL.md +79 -0
  166. package/templates/.workspace-templates/workspace/00-meta/CONTEXT.md +6 -0
  167. package/templates/.workspace-templates/workspace/00-meta/execution-log.md +27 -0
  168. package/templates/.workspace-templates/workspace/01-input/CONTEXT.md +29 -0
  169. package/templates/.workspace-templates/workspace/02-process/CONTEXT.md +29 -0
  170. package/templates/.workspace-templates/workspace/03-output/CONTEXT.md +29 -0
  171. package/templates/.workspace-templates/workspace/README.md +14 -0
  172. package/templates/SKILL.md +347 -0
  173. package/tests/benchmark.test.ts +158 -0
  174. package/tests/cli.test.ts +109 -0
  175. package/tests/dispatch-parallel.test.ts +124 -0
  176. package/tests/dispatch.test.ts +218 -0
  177. package/tests/fixer-skill.test.ts +203 -0
  178. package/tests/generate-tests.test.ts +101 -0
  179. package/tests/install-tool.test.ts +141 -0
  180. package/tests/install.test.ts +144 -0
  181. package/tests/integration.test.ts +324 -0
  182. package/tests/iterate.test.ts +219 -0
  183. package/tests/orchestrator.test.ts +710 -0
  184. package/tests/scaffold.test.ts +238 -0
  185. package/tests/templates-enhanced.test.ts +208 -0
  186. package/tests/templates.test.ts +219 -0
  187. package/tests/validate.test.ts +421 -0
  188. package/tests/validation-enhanced.test.ts +303 -0
  189. package/tests/worker-skill.test.ts +88 -0
  190. package/tsconfig.json +19 -0
  191. package/workspace/00-meta/CONTEXT.md +3 -0
  192. package/workspace/00-meta/execution-log.md +17 -0
  193. package/workspace/00-meta/tools.md +11 -0
  194. package/workspace/01-input/CONTEXT.md +27 -0
  195. package/workspace/CONTEXT.md +35 -0
  196. package/workspace/README.md +14 -0
  197. package/workspace/SYSTEM.md +36 -0
  198. package/workspace-maxxing-0.1.0.tgz +0 -0
@@ -0,0 +1,320 @@
1
+ # Session 294c Sub-Agent Invocation Hardening Implementation Plan
2
+
3
+ > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4
+
5
+ **Goal:** Eliminate simulated worker/fixer loops and enforce true agent-driven execution with strict runner contracts, canonical test-case inputs, and reliable quality gates.
6
+
7
+ **Architecture:** Keep the current scaffold/dispatch/orchestrator architecture, but replace implicit simulated fallback behavior with strict external runner contracts for worker/fixer execution. Make `.agents/iteration/test-cases.json` authoritative, enforce readiness and schema checks, and block completion when validation or threshold gates are not met.
8
+
9
+ **Tech Stack:** TypeScript, Node.js (`fs`, `path`, `child_process`), Jest.
10
+
11
+ ---
12
+
13
+ ## File Responsibility Map
14
+
15
+ - `src/scripts/dispatch.ts`: strict worker/fixer runner behavior, command rendering, telemetry capture.
16
+ - `src/scripts/orchestrator.ts`: canonical test-case loading, strict gating, summary consistency checks.
17
+ - `src/scripts/validate.ts`: enforce agent-generated test-case and readiness-marker schema.
18
+ - `src/scripts/generate-tests.ts`: fallback-only behavior and explicit warnings (non-authoritative path).
19
+ - `tests/dispatch.test.ts`: runner contract tests and failure-path tests.
20
+ - `tests/dispatch-parallel.test.ts`: batch dispatch behavior under strict runner mode.
21
+ - `tests/orchestrator.test.ts`: canonical test-case loading, strict fail conditions, consistency checks.
22
+ - `tests/validate.test.ts`: schema/readiness checks and blocking behavior.
23
+ - `tests/integration.test.ts`: end-to-end agent-driven scenario.
24
+ - `templates/SKILL.md`: root workflow contract wording.
25
+ - `templates/.workspace-templates/skills/worker/SKILL.md`: explicit runner and output contract.
26
+ - `templates/.workspace-templates/skills/fixer/SKILL.md`: explicit runner and output contract.
27
+ - `README.md`: npx usage and external runner examples.
28
+
29
+ ---
30
+
31
+ ### Task 1: Make Worker/Fixer Dispatch Strict (No Silent Simulation)
32
+
33
+ **Files:**
34
+ - Modify: `tests/dispatch.test.ts`
35
+ - Modify: `tests/dispatch-parallel.test.ts`
36
+ - Modify: `src/scripts/dispatch.ts`
37
+
38
+ - [ ] **Step 1: Write failing tests for strict worker/fixer behavior**
39
+
40
+ Add tests asserting:
41
+ - `dispatchSkill('worker', ...)` fails without `runnerCommand`.
42
+ - `dispatchSkill('fixer', ...)` fails without `runnerCommand`.
43
+ - Non-worker skills (`research`, `architecture`) may still load without runner.
44
+
45
+ - [ ] **Step 2: Run tests to confirm failure**
46
+
47
+ Run:
48
+ ```bash
49
+ npm test --silent -- tests/dispatch.test.ts tests/dispatch-parallel.test.ts
50
+ ```
51
+ Expected: worker/fixer tests fail because current fallback reports simulated pass.
52
+
53
+ - [ ] **Step 3: Implement strict logic in `dispatch.ts`**
54
+
55
+ Implement guard:
56
+ ```ts
57
+ const requiresExternalRunner = skillName === 'worker' || skillName === 'fixer';
58
+ if (requiresExternalRunner && !options.runnerCommand) {
59
+ return createRunnerFailureReport(skillName, 'External sub-agent runner is required for worker/fixer', 'none');
60
+ }
61
+ ```
62
+
63
+ - [ ] **Step 4: Re-run tests and verify pass**
64
+
65
+ Run same test command and expect PASS.
66
+
67
+ - [ ] **Step 5: Commit**
68
+
69
+ ```bash
70
+ git add src/scripts/dispatch.ts tests/dispatch.test.ts tests/dispatch-parallel.test.ts
71
+ git commit -m "fix(dispatch): enforce external runner for worker/fixer"
72
+ ```
73
+
74
+ ---
75
+
76
+ ### Task 2: Enforce Canonical Agent Test-Case Source in Orchestrator
77
+
78
+ **Files:**
79
+ - Modify: `tests/orchestrator.test.ts`
80
+ - Modify: `src/scripts/orchestrator.ts`
81
+
82
+ - [ ] **Step 1: Add failing tests for canonical input source**
83
+
84
+ Add tests asserting:
85
+ - Orchestrator prefers `.agents/iteration/test-cases.json` when present.
86
+ - Orchestrator rejects malformed/non-array payloads.
87
+ - Orchestrator fails when required metadata (`id`, `input`, `expected`) is missing.
88
+
89
+ - [ ] **Step 2: Run orchestrator tests and confirm failure**
90
+
91
+ ```bash
92
+ npm test --silent -- tests/orchestrator.test.ts
93
+ ```
94
+
95
+ - [ ] **Step 3: Implement canonical-source parsing and schema checks**
96
+
97
+ In `runBatchLifecycle`:
98
+ - Load `.agents/iteration/test-cases.json` first.
99
+ - Validate each item has required minimal contract.
100
+ - Persist normalized IDs and reject duplicates.
101
+
102
+ - [ ] **Step 4: Re-run tests and verify pass**
103
+
104
+ ```bash
105
+ npm test --silent -- tests/orchestrator.test.ts
106
+ ```
107
+
108
+ - [ ] **Step 5: Commit**
109
+
110
+ ```bash
111
+ git add src/scripts/orchestrator.ts tests/orchestrator.test.ts
112
+ git commit -m "feat(orchestrator): enforce canonical agent test-cases contract"
113
+ ```
114
+
115
+ ---
116
+
117
+ ### Task 3: Harden Validation for Agent-Generated Inputs
118
+
119
+ **Files:**
120
+ - Modify: `tests/validate.test.ts`
121
+ - Modify: `src/scripts/validate.ts`
122
+
123
+ - [ ] **Step 1: Add failing tests for readiness and schema checks**
124
+
125
+ Add tests asserting validation fails when:
126
+ - `.agents/iteration/test-cases.json` is missing.
127
+ - `.agents/iteration/.test-cases-ready` is missing.
128
+ - JSON cannot parse.
129
+ - Item schema is missing required fields.
130
+
131
+ - [ ] **Step 2: Run tests to confirm failure**
132
+
133
+ ```bash
134
+ npm test --silent -- tests/validate.test.ts
135
+ ```
136
+
137
+ - [ ] **Step 3: Implement validator checks and precise error messages**
138
+
139
+ Add checks:
140
+ - `test-cases.json exists`
141
+ - `test-cases.json parseable`
142
+ - `test-cases.json items valid`
143
+ - `.test-cases-ready exists`
144
+
145
+ - [ ] **Step 4: Re-run tests and verify pass**
146
+
147
+ ```bash
148
+ npm test --silent -- tests/validate.test.ts
149
+ ```
150
+
151
+ - [ ] **Step 5: Commit**
152
+
153
+ ```bash
154
+ git add src/scripts/validate.ts tests/validate.test.ts
155
+ git commit -m "feat(validate): require agent-generated test-case readiness and schema"
156
+ ```
157
+
158
+ ---
159
+
160
+ ### Task 4: Add Runner Telemetry for Debuggability
161
+
162
+ **Files:**
163
+ - Modify: `tests/dispatch.test.ts`
164
+ - Modify: `src/scripts/dispatch.ts`
165
+
166
+ - [ ] **Step 1: Add failing tests for telemetry artifact creation**
167
+
168
+ Add tests asserting that each worker/fixer runner invocation writes telemetry with:
169
+ - rendered command
170
+ - elapsed time
171
+ - exit code
172
+ - stdout/stderr capture summary
173
+
174
+ - [ ] **Step 2: Run tests to confirm failure**
175
+
176
+ ```bash
177
+ npm test --silent -- tests/dispatch.test.ts
178
+ ```
179
+
180
+ - [ ] **Step 3: Implement telemetry writer**
181
+
182
+ Write under:
183
+ - `.agents/iteration/runs/<timestamp>-<skill>-<batchId>-<testCaseId>.json`
184
+
185
+ Include bounded stdout/stderr to avoid large files.
186
+
187
+ - [ ] **Step 4: Re-run tests**
188
+
189
+ ```bash
190
+ npm test --silent -- tests/dispatch.test.ts
191
+ ```
192
+
193
+ - [ ] **Step 5: Commit**
194
+
195
+ ```bash
196
+ git add src/scripts/dispatch.ts tests/dispatch.test.ts
197
+ git commit -m "feat(dispatch): persist runner telemetry artifacts"
198
+ ```
199
+
200
+ ---
201
+
202
+ ### Task 5: Align Skills and README with True Agent-Driven Contract
203
+
204
+ **Files:**
205
+ - Modify: `templates/SKILL.md`
206
+ - Modify: `templates/.workspace-templates/skills/worker/SKILL.md`
207
+ - Modify: `templates/.workspace-templates/skills/fixer/SKILL.md`
208
+ - Modify: `README.md`
209
+
210
+ - [ ] **Step 1: Add explicit runner contract text**
211
+
212
+ Document:
213
+ - worker/fixer require external runner
214
+ - expected JSON output schema
215
+ - required placeholders
216
+ - no simulated completion semantics
217
+
218
+ - [ ] **Step 2: Add Windows-safe and POSIX-safe runner examples**
219
+
220
+ Include `npx` examples that actually spawn an external agent command, not dispatch recursion.
221
+
222
+ - [ ] **Step 3: Add a failing docs test (if docs assertions exist)**
223
+
224
+ If repository has template docs tests, add assertions for new contract headings.
225
+
226
+ - [ ] **Step 4: Run related tests**
227
+
228
+ ```bash
229
+ npm test --silent -- tests/templates.test.ts tests/templates-enhanced.test.ts
230
+ ```
231
+
232
+ - [ ] **Step 5: Commit**
233
+
234
+ ```bash
235
+ git add templates/SKILL.md templates/.workspace-templates/skills/worker/SKILL.md templates/.workspace-templates/skills/fixer/SKILL.md README.md tests/templates.test.ts tests/templates-enhanced.test.ts
236
+ git commit -m "docs(skill): codify true agent-driven runner contract"
237
+ ```
238
+
239
+ ---
240
+
241
+ ### Task 6: Add Integration Coverage for Session 294c Failure Class
242
+
243
+ **Files:**
244
+ - Modify: `tests/integration.test.ts`
245
+
246
+ - [ ] **Step 1: Add failing integration cases**
247
+
248
+ Add tests for:
249
+ - worker/fixer without runner must fail.
250
+ - dispatch-recursion runner command does not count as true sub-agent success.
251
+ - orchestrator refuses completion claims under threshold.
252
+
253
+ - [ ] **Step 2: Run integration tests and confirm fail**
254
+
255
+ ```bash
256
+ npm test --silent -- tests/integration.test.ts
257
+ ```
258
+
259
+ - [ ] **Step 3: Implement minimal code updates required for passing behavior**
260
+
261
+ Adjust orchestrator/dispatch gating logic and completion condition checks.
262
+
263
+ - [ ] **Step 4: Re-run integration tests**
264
+
265
+ ```bash
266
+ npm test --silent -- tests/integration.test.ts
267
+ ```
268
+
269
+ - [ ] **Step 5: Commit**
270
+
271
+ ```bash
272
+ git add tests/integration.test.ts src/scripts/dispatch.ts src/scripts/orchestrator.ts
273
+ git commit -m "test(integration): cover real sub-agent execution gates"
274
+ ```
275
+
276
+ ---
277
+
278
+ ### Task 7: Full Verification and Release Readiness
279
+
280
+ **Files:**
281
+ - Modify if needed: any touched files from previous tasks
282
+
283
+ - [ ] **Step 1: Run full build and test suite**
284
+
285
+ ```bash
286
+ npm run build
287
+ npm test --silent
288
+ ```
289
+
290
+ - [ ] **Step 2: Verify key runtime command against fresh desktop workspace**
291
+
292
+ ```bash
293
+ node dist/scripts/orchestrator.js --workspace "<fresh-workspace>" --subagent-runner "<real-runner-command>"
294
+ ```
295
+ Expected:
296
+ - worker/fixer invocations produce telemetry artifacts
297
+ - summary reflects real runner results
298
+
299
+ - [ ] **Step 3: Document verification evidence in PR/commit notes**
300
+
301
+ Capture:
302
+ - command outputs
303
+ - pass/fail counts
304
+ - sample telemetry file path
305
+
306
+ - [ ] **Step 4: Final commit**
307
+
308
+ ```bash
309
+ git add -A
310
+ git commit -m "chore: finalize sub-agent invocation hardening and verification"
311
+ ```
312
+
313
+ ---
314
+
315
+ ## Self-Review Checklist
316
+
317
+ - [ ] Every defect tag from the spec maps to at least one implementation task.
318
+ - [ ] No task depends on implicit simulated worker/fixer behavior.
319
+ - [ ] Completion criteria require both validation and benchmark gates.
320
+ - [ ] Integration coverage includes the session-294c failure pattern.