@bonesofspring/ai-rules 0.2.65 → 0.2.66

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 (261) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +19 -11
  3. package/bin/lib/engine-scripts.js +38 -7
  4. package/bin/lib/engine-upgrade.js +5 -2
  5. package/bin/lib/seed-ai-local-team.js +6 -3
  6. package/docs/OPENCODE.md +17 -9
  7. package/docs/TEAM-DB.md +52 -13
  8. package/docs/TOKEN-ECONOMY.md +79 -0
  9. package/package.json +7 -2
  10. package/presets/_shared/ai-local/scripts/dump-output.mjs +371 -0
  11. package/presets/_shared/ai-local/scripts/team-db.mjs +82 -2
  12. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +3 -1
  13. package/presets/_shared/core/architecture/feature-delivery-workflow.md +4 -0
  14. package/presets/_shared/core/quality/context-and-iteration.md +1 -0
  15. package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
  16. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
  17. package/presets/claude/go/agents/task-analyst.md +1 -1
  18. package/presets/claude/go/rules/architecture/feature-delivery.md +4 -0
  19. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
  20. package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
  21. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +4 -0
  22. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
  23. package/presets/claude/java/agents/task-analyst.md +1 -1
  24. package/presets/claude/java/rules/architecture/feature-delivery.md +4 -0
  25. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
  26. package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
  27. package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +4 -0
  28. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
  29. package/presets/claude/mol/agents/task-analyst.md +1 -1
  30. package/presets/claude/mol/rules/architecture/feature-delivery-workflow.md +4 -0
  31. package/presets/claude/mol/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
  32. package/presets/claude/next/agents/task-analyst.md +1 -1
  33. package/presets/claude/next/commands/README.md +1 -1
  34. package/presets/claude/next/commands/task.md +1 -1
  35. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +4 -0
  36. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
  37. package/presets/claude/next/team/README.md +7 -3
  38. package/presets/claude/nuxt/agents/task-analyst.md +1 -1
  39. package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +4 -0
  40. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
  41. package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
  42. package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +4 -0
  43. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
  44. package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
  45. package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +4 -0
  46. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
  47. package/presets/claude/svelte/agents/task-analyst.md +1 -1
  48. package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +4 -0
  49. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
  50. package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
  51. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +1 -1
  52. package/presets/cursor/go/agents/task-analyst.md +1 -1
  53. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +1 -1
  54. package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
  55. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +1 -1
  56. package/presets/cursor/java/agents/task-analyst.md +1 -1
  57. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +1 -1
  58. package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
  59. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +1 -1
  60. package/presets/cursor/mol/agents/task-analyst.md +1 -1
  61. package/presets/cursor/mol/rules/agent-team-orchestrator.mdc +1 -1
  62. package/presets/cursor/next/agents/task-analyst.md +1 -1
  63. package/presets/cursor/next/commands/README.md +1 -1
  64. package/presets/cursor/next/commands/task.md +1 -1
  65. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +3 -1
  66. package/presets/cursor/next/team/README.md +7 -3
  67. package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
  68. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +1 -1
  69. package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
  70. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +1 -1
  71. package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
  72. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +1 -1
  73. package/presets/cursor/svelte/agents/task-analyst.md +1 -1
  74. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +1 -1
  75. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  76. package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
  77. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +3 -1
  78. package/presets/mavis/go/adapter-map.json +1 -1
  79. package/presets/mavis/go/agents/task-analyst.md +1 -1
  80. package/presets/mavis/go/rules/agent-team-orchestrator.md +3 -1
  81. package/presets/mavis/go/rules/feature-delivery-workflow.md +4 -0
  82. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  83. package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
  84. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +3 -1
  85. package/presets/mavis/ios-swift/rules/feature-delivery-workflow.md +4 -0
  86. package/presets/mavis/java/adapter-map.json +1 -1
  87. package/presets/mavis/java/agents/task-analyst.md +1 -1
  88. package/presets/mavis/java/rules/agent-team-orchestrator.md +3 -1
  89. package/presets/mavis/java/rules/feature-delivery-workflow.md +4 -0
  90. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  91. package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
  92. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +3 -1
  93. package/presets/mavis/mcp-ts/rules/feature-delivery-workflow.md +4 -0
  94. package/presets/mavis/mol/adapter-map.json +1 -1
  95. package/presets/mavis/mol/agents/task-analyst.md +1 -1
  96. package/presets/mavis/mol/rules/agent-team-orchestrator.md +3 -1
  97. package/presets/mavis/mol/rules/feature-delivery-workflow.md +4 -0
  98. package/presets/mavis/next/adapter-map.json +9 -1
  99. package/presets/mavis/next/agents/task-analyst.md +1 -1
  100. package/presets/mavis/next/commands/README.md +1 -1
  101. package/presets/mavis/next/commands/task.md +1 -1
  102. package/presets/mavis/next/rules/agent-team-orchestrator.md +3 -1
  103. package/presets/mavis/next/rules/feature-delivery-workflow.md +4 -0
  104. package/presets/mavis/next/team/README.md +7 -3
  105. package/presets/mavis/nuxt/adapter-map.json +1 -1
  106. package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
  107. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +3 -1
  108. package/presets/mavis/nuxt/rules/feature-delivery-workflow.md +4 -0
  109. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  110. package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
  111. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +3 -1
  112. package/presets/mavis/php-hexagonal/rules/feature-delivery-workflow.md +4 -0
  113. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  114. package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
  115. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +3 -1
  116. package/presets/mavis/php-laravel/rules/feature-delivery-workflow.md +4 -0
  117. package/presets/mavis/svelte/adapter-map.json +1 -1
  118. package/presets/mavis/svelte/agents/task-analyst.md +1 -1
  119. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +3 -1
  120. package/presets/mavis/svelte/rules/feature-delivery-workflow.md +4 -0
  121. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  122. package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
  123. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +3 -1
  124. package/presets/opencode/go/adapter-map.json +1 -1
  125. package/presets/opencode/go/agents/task-analyst.md +1 -1
  126. package/presets/opencode/go/rules/agent-team-orchestrator.md +3 -1
  127. package/presets/opencode/go/rules/feature-delivery-workflow.md +4 -0
  128. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  129. package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
  130. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +3 -1
  131. package/presets/opencode/ios-swift/rules/feature-delivery-workflow.md +4 -0
  132. package/presets/opencode/java/adapter-map.json +1 -1
  133. package/presets/opencode/java/agents/task-analyst.md +1 -1
  134. package/presets/opencode/java/rules/agent-team-orchestrator.md +3 -1
  135. package/presets/opencode/java/rules/feature-delivery-workflow.md +4 -0
  136. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  137. package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
  138. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +3 -1
  139. package/presets/opencode/mcp-ts/rules/feature-delivery-workflow.md +4 -0
  140. package/presets/opencode/mol/adapter-map.json +1 -1
  141. package/presets/opencode/mol/agents/task-analyst.md +1 -1
  142. package/presets/opencode/mol/rules/agent-team-orchestrator.md +3 -1
  143. package/presets/opencode/mol/rules/feature-delivery-workflow.md +4 -0
  144. package/presets/opencode/next/adapter-map.json +9 -1
  145. package/presets/opencode/next/agents/task-analyst.md +1 -1
  146. package/presets/opencode/next/commands/README.md +1 -1
  147. package/presets/opencode/next/commands/task.md +1 -1
  148. package/presets/opencode/next/rules/agent-team-orchestrator.md +3 -1
  149. package/presets/opencode/next/rules/feature-delivery-workflow.md +4 -0
  150. package/presets/opencode/next/team/README.md +7 -3
  151. package/presets/opencode/nuxt/adapter-map.json +1 -1
  152. package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
  153. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +3 -1
  154. package/presets/opencode/nuxt/rules/feature-delivery-workflow.md +4 -0
  155. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  156. package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
  157. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +3 -1
  158. package/presets/opencode/php-hexagonal/rules/feature-delivery-workflow.md +4 -0
  159. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  160. package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
  161. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +3 -1
  162. package/presets/opencode/php-laravel/rules/feature-delivery-workflow.md +4 -0
  163. package/presets/opencode/plugins/task-status/README.md +23 -11
  164. package/presets/opencode/plugins/task-status/details-data.ts +64 -46
  165. package/presets/opencode/plugins/task-status/details.tsx +12 -2
  166. package/presets/opencode/plugins/task-status/format.ts +16 -0
  167. package/presets/opencode/plugins/task-status/prompt-text.ts +37 -0
  168. package/presets/opencode/plugins/task-status/task-view.ts +241 -177
  169. package/presets/opencode/plugins/task-status/tui.tsx +57 -15
  170. package/presets/opencode/plugins/task-status/types.ts +74 -0
  171. package/presets/opencode/svelte/adapter-map.json +1 -1
  172. package/presets/opencode/svelte/agents/task-analyst.md +1 -1
  173. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +3 -1
  174. package/presets/opencode/svelte/rules/feature-delivery-workflow.md +4 -0
  175. package/presets/zcode/android-kotlin/adapter-map.json +1 -1
  176. package/presets/zcode/android-kotlin/agents/task-analyst.md +1 -1
  177. package/presets/zcode/android-kotlin/rules/agent-team-orchestrator.md +3 -1
  178. package/presets/zcode/go/adapter-map.json +1 -1
  179. package/presets/zcode/go/agents/task-analyst.md +1 -1
  180. package/presets/zcode/go/rules/agent-team-orchestrator.md +3 -1
  181. package/presets/zcode/go/rules/feature-delivery-workflow.md +4 -0
  182. package/presets/zcode/ios-swift/adapter-map.json +1 -1
  183. package/presets/zcode/ios-swift/agents/task-analyst.md +1 -1
  184. package/presets/zcode/ios-swift/rules/agent-team-orchestrator.md +3 -1
  185. package/presets/zcode/ios-swift/rules/feature-delivery-workflow.md +4 -0
  186. package/presets/zcode/java/adapter-map.json +1 -1
  187. package/presets/zcode/java/agents/task-analyst.md +1 -1
  188. package/presets/zcode/java/rules/agent-team-orchestrator.md +3 -1
  189. package/presets/zcode/java/rules/feature-delivery-workflow.md +4 -0
  190. package/presets/zcode/mcp-ts/adapter-map.json +1 -1
  191. package/presets/zcode/mcp-ts/agents/task-analyst.md +1 -1
  192. package/presets/zcode/mcp-ts/rules/agent-team-orchestrator.md +3 -1
  193. package/presets/zcode/mcp-ts/rules/feature-delivery-workflow.md +4 -0
  194. package/presets/zcode/mol/adapter-map.json +1 -1
  195. package/presets/zcode/mol/agents/task-analyst.md +1 -1
  196. package/presets/zcode/mol/rules/agent-team-orchestrator.md +3 -1
  197. package/presets/zcode/mol/rules/feature-delivery-workflow.md +4 -0
  198. package/presets/zcode/next/adapter-map.json +9 -1
  199. package/presets/zcode/next/agents/task-analyst.md +1 -1
  200. package/presets/zcode/next/commands/README.md +1 -1
  201. package/presets/zcode/next/commands/task.md +1 -1
  202. package/presets/zcode/next/rules/agent-team-orchestrator.md +3 -1
  203. package/presets/zcode/next/rules/feature-delivery-workflow.md +4 -0
  204. package/presets/zcode/next/team/README.md +7 -3
  205. package/presets/zcode/nuxt/adapter-map.json +1 -1
  206. package/presets/zcode/nuxt/agents/task-analyst.md +1 -1
  207. package/presets/zcode/nuxt/rules/agent-team-orchestrator.md +3 -1
  208. package/presets/zcode/nuxt/rules/feature-delivery-workflow.md +4 -0
  209. package/presets/zcode/php-hexagonal/adapter-map.json +1 -1
  210. package/presets/zcode/php-hexagonal/agents/task-analyst.md +1 -1
  211. package/presets/zcode/php-hexagonal/rules/agent-team-orchestrator.md +3 -1
  212. package/presets/zcode/php-hexagonal/rules/feature-delivery-workflow.md +4 -0
  213. package/presets/zcode/php-laravel/adapter-map.json +1 -1
  214. package/presets/zcode/php-laravel/agents/task-analyst.md +1 -1
  215. package/presets/zcode/php-laravel/rules/agent-team-orchestrator.md +3 -1
  216. package/presets/zcode/php-laravel/rules/feature-delivery-workflow.md +4 -0
  217. package/presets/zcode/svelte/adapter-map.json +1 -1
  218. package/presets/zcode/svelte/agents/task-analyst.md +1 -1
  219. package/presets/zcode/svelte/rules/agent-team-orchestrator.md +3 -1
  220. package/presets/zcode/svelte/rules/feature-delivery-workflow.md +4 -0
  221. package/presets/_shared/ai-local/scripts/upstream-research.mjs +0 -2964
  222. package/presets/claude/next/commands/upstream-research.md +0 -23
  223. package/presets/claude/next/team/upstream/config.json +0 -31
  224. package/presets/claude/next/team/upstream/digest-template.md +0 -55
  225. package/presets/claude/next/team/upstream/jobs.json +0 -34
  226. package/presets/claude/next/team/upstream/opencode.json +0 -34
  227. package/presets/claude/next/team/upstream/projects.json +0 -4
  228. package/presets/claude/next/team/upstream/prompt.md +0 -77
  229. package/presets/claude/next/team/upstream/signatures.json +0 -9
  230. package/presets/cursor/next/commands/upstream-research.md +0 -23
  231. package/presets/cursor/next/team/upstream/config.json +0 -31
  232. package/presets/cursor/next/team/upstream/digest-template.md +0 -55
  233. package/presets/cursor/next/team/upstream/jobs.json +0 -34
  234. package/presets/cursor/next/team/upstream/opencode.json +0 -34
  235. package/presets/cursor/next/team/upstream/projects.json +0 -4
  236. package/presets/cursor/next/team/upstream/prompt.md +0 -77
  237. package/presets/cursor/next/team/upstream/signatures.json +0 -9
  238. package/presets/mavis/next/commands/upstream-research.md +0 -18
  239. package/presets/mavis/next/team/upstream/config.json +0 -31
  240. package/presets/mavis/next/team/upstream/digest-template.md +0 -55
  241. package/presets/mavis/next/team/upstream/jobs.json +0 -34
  242. package/presets/mavis/next/team/upstream/opencode.json +0 -34
  243. package/presets/mavis/next/team/upstream/projects.json +0 -4
  244. package/presets/mavis/next/team/upstream/prompt.md +0 -77
  245. package/presets/mavis/next/team/upstream/signatures.json +0 -9
  246. package/presets/opencode/next/commands/upstream-research.md +0 -26
  247. package/presets/opencode/next/team/upstream/config.json +0 -31
  248. package/presets/opencode/next/team/upstream/digest-template.md +0 -55
  249. package/presets/opencode/next/team/upstream/jobs.json +0 -34
  250. package/presets/opencode/next/team/upstream/opencode.json +0 -34
  251. package/presets/opencode/next/team/upstream/projects.json +0 -4
  252. package/presets/opencode/next/team/upstream/prompt.md +0 -77
  253. package/presets/opencode/next/team/upstream/signatures.json +0 -9
  254. package/presets/zcode/next/commands/upstream-research.md +0 -26
  255. package/presets/zcode/next/team/upstream/config.json +0 -31
  256. package/presets/zcode/next/team/upstream/digest-template.md +0 -55
  257. package/presets/zcode/next/team/upstream/jobs.json +0 -34
  258. package/presets/zcode/next/team/upstream/opencode.json +0 -34
  259. package/presets/zcode/next/team/upstream/projects.json +0 -4
  260. package/presets/zcode/next/team/upstream/prompt.md +0 -77
  261. package/presets/zcode/next/team/upstream/signatures.json +0 -9
@@ -3,7 +3,7 @@
3
3
  "platform": "zcode",
4
4
  "stack": "next",
5
5
  "semanticSource": "cursor/next",
6
- "sourceRevision": "14050ca0d1c309078e7c038bec1f881158d3bc9c05e06926812b1ad5f1cf7cbd",
6
+ "sourceRevision": "6963e095bbe461e77686e65987ac2c358052146e129d7c32d79275c3eaf54c06",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -1423,6 +1423,14 @@
1423
1423
  "loadMode": "manual",
1424
1424
  "reason": "File pipeline templates; runtime artifacts seed to .ai.local/team"
1425
1425
  },
1426
+ {
1427
+ "source": "team/upstream/plan-prompt.md",
1428
+ "target": "team/upstream/plan-prompt.md",
1429
+ "category": "team",
1430
+ "disposition": "transform",
1431
+ "loadMode": "manual",
1432
+ "reason": "File pipeline templates; runtime artifacts seed to .ai.local/team"
1433
+ },
1426
1434
  {
1427
1435
  "source": "team/upstream/projects.json",
1428
1436
  "target": "team/upstream/projects.json",
@@ -66,7 +66,7 @@ Whenever decomposition Files cover edits to Cursor next `openspec-author` / `tas
66
66
 
67
67
  <!-- shared-core: quality/context-and-iteration.md -->
68
68
 
69
- Work in bounded waves; delegate mechanical waves to repo scripts. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`. On resume, read `.ai.local/team/tasks/<slug>/focus.md` first as a resume aid only. It is a view, not the system of record, and it includes one decomposition ready-set line and one archive index line. The run still resumes from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
69
+ Work in bounded waves; delegate mechanical waves to repo scripts. A large command output (log, diff, test run, `git log`) is piped through `.ai.local/scripts/dump-output.mjs` instead of being read whole: take its ≤40-line head, then `grep -n` the stored file or find it with `team-db.mjs search "<term>"`. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`. On resume, read `.ai.local/team/tasks/<slug>/focus.md` first as a resume aid only. It is a view, not the system of record, and it includes one decomposition ready-set line and one archive index line. The run still resumes from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
70
70
 
71
71
  ## Self-review & context hygiene
72
72
 
@@ -11,7 +11,7 @@ Slash commands are copied to `.zcode/commands/` on `ai-rules init zcode --preset
11
11
  | `/task-continue <slug>` | After human gate or pause |
12
12
  | `/technical-retro [slug]` | Retro; with slug — “Agent work” section |
13
13
  | `/update` | Reinstall each installed tool with the preset recorded at init |
14
- | `/upstream-research` | Queue the weekly upstream evolution review; run one `schedule --once` tick when the timer is offline |
14
+ | `/upstream-research` | Repository-only (not in the published package): queue the weekly upstream evolution review; run one `schedule --once` tick when the timer is offline |
15
15
  | `/migrate-tasks` | Create or reconcile `.ai.local/team/team.db`; writes only the delta |
16
16
  | `/ui-start` | Start the shipped dashboard in the background on loopback; no Docker, no build step |
17
17
  | `/ui-stop` | Stop the server this repository started, then clear its marker |
@@ -45,7 +45,7 @@ Examples:
45
45
  - confirm `pipeline.json` and `active-task.json`;
46
46
  - **do not** write lifecycle fields in `status.json` / `metrics.json` yourself — orchestration runtime/hook owns them (see **agent-artifact-contracts**). If `status.json` is missing, only minimal bootstrap is allowed (`slug`, `intent`, `pipelineIndex: 0`, `currentAgent: steps[0]`, `state: in_progress`) — **do not** increment `pipelineIndex` manually;
47
47
  - invoke subagent for `pipeline.steps[0].agent` (slug, artifact paths, scope).
48
- 7. **After each agent** — wait for hook handoff / reconciliation terminal receipt → `status.state`; do not start the next step until `status.json` reflects handoff (or until there is a `followup_message` from the hook).
48
+ 7. **After each agent** — wait for hook handoff / reconciliation terminal receipt → `status.state`; do not start the next step until `status.json` reflects handoff (or until there is a `followup_message` from the hook). A Task call that returns a session handle has only **started** the agent: keep the step open until it reports back.
49
49
  8. **Human gate** — if after the current step there is a gate in `humanGates` (`after:<agent>`), after the agent finishes **stop** and ask for `/task-continue <slug>`.
50
50
 
51
51
  ## Plan contract
@@ -151,7 +151,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
151
151
 
152
152
  ## Context budget & checkpoint/resume
153
153
 
154
- Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
154
+ Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. A large command output (log, diff, test run, `git log`) is piped through `.ai.local/scripts/dump-output.mjs` instead of being read whole: take its ≤40-line head, then `grep -n` the stored file or find it with `team-db.mjs search "<term>"`. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
155
155
 
156
156
  ## Self-review & context hygiene
157
157
 
@@ -218,6 +218,8 @@ Additional states: `blocked` — a step (or a parallel producer) cannot proceed;
218
218
 
219
219
  On each `subagentStop`, the hook reconciles `status.state` from the completing producer's terminal `artifact-manifest.json` receipt (`completed` \| `changes_requested` \| `validation_failed`) when agents left lifecycle fields untouched. Parent orchestrators must wait for that handoff before invoking the next step.
220
220
 
221
+ **A dispatch is not a completion.** When the host hands back a session handle, a job id, or control before the specialist's turn ends, the step is still open: do not dispatch the next step, do not report the step done, and do not run the chain hook until the specialist reports back and the hook records the receipt. A background handle is a start signal only.
222
+
221
223
  ## Pipeline step options
222
224
 
223
225
  | Field | Use |
@@ -14,6 +14,10 @@ Typical feature with data and UI. Concrete directories and rule stems — in the
14
14
  6. **Tests** — unit for mappers / non-trivial logic; e2e/UI per stack convention.
15
15
  7. **Completion** — stack post-change gate (lint/build) + package/toolchain rules. When the current WP spans **more than one** layer or module, `implementation.md` includes a **Code Map** (3–8 annotated repo-relative paths) and **Suggested Review Order** (`concern | path:line | ≤15 word note`). Omit both for a single-file or single-layer WP.
16
16
 
17
+ ## Context hygiene
18
+
19
+ A command whose output can exceed ~4 KB — a test run, a build/lint log, `git log`, a diff — is piped through `.ai.local/scripts/dump-output.mjs --task <slug>` instead of being read whole. Work from its ≤40-line head and the stored file (grep it or use `team-db.mjs search`), and when that output informed a decision, record the repo-relative `outputs/…` path in `implementation.md` or `validation-report.md`; a `code-reviewer` may ask for that path. Do not read the whole output into context.
20
+
17
21
  ## Iterative refinement loop
18
22
 
19
23
  Every stage runs the named loop **draft → evaluate against named criteria → refine**:
@@ -21,7 +21,7 @@ Shared `/task` runtime for Cursor, Claude, Mavis, and OpenCode. Seeded at **`.ai
21
21
  brief.md, decomposition.md, implementation.md, review.md, …
22
22
  figma-contract.json # frozen Figma node map + per-node spec (writer: mockup-reviewer)
23
23
  .memlog.md # optional agent notes (hook does not parse)
24
- upstream/
24
+ upstream/ # repository-only; not in the published package
25
25
  prompt.md # upstream-review prompt (preset-owned; refreshed on init/update)
26
26
  opencode.json # read-only upstream-researcher agent (preset-owned; refreshed)
27
27
  digest-template.md # digest skeleton (preset-owned; refreshed)
@@ -35,9 +35,13 @@ Shared `/task` runtime for Cursor, Claude, Mavis, and OpenCode. Seeded at **`.ai
35
35
  state.json # scheduler last-fire state (git-ignored; never commit)
36
36
  ```
37
37
 
38
- ## Upstream research
38
+ ## Upstream research (repository-only)
39
39
 
40
- The shipped `upstream-research` scheduler job runs `node ../scripts/upstream-research.mjs`, reads `upstream/projects.json` and `upstream/config.json`, and writes evidence under `scheduler/runs/upstream-research/<runId>/` plus one committed digest at `docs/upstream/digest-<runId>.md`.
40
+ This workflow exists only in the `@bonesofspring/ai-rules` repository: the published npm package
41
+ excludes the runner, the `/upstream-research` command, and the `upstream/` templates. The
42
+ `scheduler/jobs.json` seed is likewise absent for a consumer.
43
+
44
+ The `upstream-research` scheduler job runs `node ../scripts/upstream-research.mjs`, reads `upstream/projects.json` and `upstream/config.json`, and writes evidence under `scheduler/runs/upstream-research/<runId>/` plus one committed digest at `docs/upstream/digest-<runId>.md`.
41
45
 
42
46
  - `init`/`update` refresh `prompt.md`, `opencode.json`, and `digest-template.md`; they seed `projects.json`, `config.json`, `signatures.json`, and `scheduler/jobs.json` only when absent.
43
47
  - `upstream/cursor.json` is git-ignored. A lost cursor is rebuilt from the newest `report.json`, then degrades to a bounded baseline.
@@ -3,7 +3,7 @@
3
3
  "platform": "zcode",
4
4
  "stack": "nuxt",
5
5
  "semanticSource": "cursor/nuxt",
6
- "sourceRevision": "b68d147be357b674e2d54133540e961756a0a69c96c1a2d4f6c1baec59f2c8bb",
6
+ "sourceRevision": "802214488e661f6abcdb872f3a72851f0554a96bcbb66c8269f07c2327e4a615",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -58,7 +58,7 @@ Decompose as a **dependency graph**: each task carries `dependsOn[]`, the edges
58
58
 
59
59
  <!-- shared-core: quality/context-and-iteration.md -->
60
60
 
61
- Work in bounded waves; delegate mechanical waves to repo scripts. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`, so a run can resume from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
61
+ Work in bounded waves; delegate mechanical waves to repo scripts. A large command output (log, diff, test run, `git log`) is piped through `.ai.local/scripts/dump-output.mjs` instead of being read whole: take its ≤40-line head, then `grep -n` the stored file or find it with `team-db.mjs search "<term>"`. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`, so a run can resume from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
62
62
 
63
63
  ## Self-review & context hygiene
64
64
 
@@ -151,7 +151,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
151
151
 
152
152
  ## Context budget & checkpoint/resume
153
153
 
154
- Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
154
+ Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. A large command output (log, diff, test run, `git log`) is piped through `.ai.local/scripts/dump-output.mjs` instead of being read whole: take its ≤40-line head, then `grep -n` the stored file or find it with `team-db.mjs search "<term>"`. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
155
155
 
156
156
  ## Self-review & context hygiene
157
157
 
@@ -218,6 +218,8 @@ Additional states: `blocked` — a step (or a parallel producer) cannot proceed;
218
218
 
219
219
  On each `subagentStop`, the hook reconciles `status.state` from the completing producer's terminal `artifact-manifest.json` receipt (`completed` \| `changes_requested` \| `validation_failed`) when agents left lifecycle fields untouched. Parent orchestrators must wait for that handoff before invoking the next step.
220
220
 
221
+ **A dispatch is not a completion.** When the host hands back a session handle, a job id, or control before the specialist's turn ends, the step is still open: do not dispatch the next step, do not report the step done, and do not run the chain hook until the specialist reports back and the hook records the receipt. A background handle is a start signal only.
222
+
221
223
  ## Pipeline step options
222
224
 
223
225
  | Field | Use |
@@ -14,6 +14,10 @@ Typical feature with data and UI. Concrete directories and rule stems — in the
14
14
  6. **Tests** — unit for mappers / non-trivial logic; e2e/UI per stack convention.
15
15
  7. **Completion** — stack post-change gate (lint/build) + package/toolchain rules. When the current WP spans **more than one** layer or module, `implementation.md` includes a **Code Map** (3–8 annotated repo-relative paths) and **Suggested Review Order** (`concern | path:line | ≤15 word note`). Omit both for a single-file or single-layer WP.
16
16
 
17
+ ## Context hygiene
18
+
19
+ A command whose output can exceed ~4 KB — a test run, a build/lint log, `git log`, a diff — is piped through `.ai.local/scripts/dump-output.mjs --task <slug>` instead of being read whole. Work from its ≤40-line head and the stored file (grep it or use `team-db.mjs search`), and when that output informed a decision, record the repo-relative `outputs/…` path in `implementation.md` or `validation-report.md`; a `code-reviewer` may ask for that path. Do not read the whole output into context.
20
+
17
21
  ## Iterative refinement loop
18
22
 
19
23
  Every stage runs the named loop **draft → evaluate against named criteria → refine**:
@@ -3,7 +3,7 @@
3
3
  "platform": "zcode",
4
4
  "stack": "php-hexagonal",
5
5
  "semanticSource": "cursor/php-hexagonal",
6
- "sourceRevision": "9b9a7369f7e13d990562a2ce595896f4ae1365f4b4127c5d5059a6b94875a2a7",
6
+ "sourceRevision": "fa784eb7647e80c2ba9fdbd50914c88a8aa6359af2838d3be26abb6d2e2ef0b2",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -54,7 +54,7 @@ Decompose as a **dependency graph**: each task carries `dependsOn[]`, the edges
54
54
 
55
55
  <!-- shared-core: quality/context-and-iteration.md -->
56
56
 
57
- Work in bounded waves; delegate mechanical waves to repo scripts. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`, so a run can resume from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
57
+ Work in bounded waves; delegate mechanical waves to repo scripts. A large command output (log, diff, test run, `git log`) is piped through `.ai.local/scripts/dump-output.mjs` instead of being read whole: take its ≤40-line head, then `grep -n` the stored file or find it with `team-db.mjs search "<term>"`. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`, so a run can resume from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
58
58
 
59
59
  ## Self-review & context hygiene
60
60
 
@@ -151,7 +151,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
151
151
 
152
152
  ## Context budget & checkpoint/resume
153
153
 
154
- Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
154
+ Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. A large command output (log, diff, test run, `git log`) is piped through `.ai.local/scripts/dump-output.mjs` instead of being read whole: take its ≤40-line head, then `grep -n` the stored file or find it with `team-db.mjs search "<term>"`. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
155
155
 
156
156
  ## Self-review & context hygiene
157
157
 
@@ -218,6 +218,8 @@ Additional states: `blocked` — a step (or a parallel producer) cannot proceed;
218
218
 
219
219
  On each `subagentStop`, the hook reconciles `status.state` from the completing producer's terminal `artifact-manifest.json` receipt (`completed` \| `changes_requested` \| `validation_failed`) when agents left lifecycle fields untouched. Parent orchestrators must wait for that handoff before invoking the next step.
220
220
 
221
+ **A dispatch is not a completion.** When the host hands back a session handle, a job id, or control before the specialist's turn ends, the step is still open: do not dispatch the next step, do not report the step done, and do not run the chain hook until the specialist reports back and the hook records the receipt. A background handle is a start signal only.
222
+
221
223
  ## Pipeline step options
222
224
 
223
225
  | Field | Use |
@@ -14,6 +14,10 @@ Typical feature with data and UI. Concrete directories and rule stems — in the
14
14
  6. **Tests** — unit for mappers / non-trivial logic; e2e/UI per stack convention.
15
15
  7. **Completion** — stack post-change gate (lint/build) + package/toolchain rules. When the current WP spans **more than one** layer or module, `implementation.md` includes a **Code Map** (3–8 annotated repo-relative paths) and **Suggested Review Order** (`concern | path:line | ≤15 word note`). Omit both for a single-file or single-layer WP.
16
16
 
17
+ ## Context hygiene
18
+
19
+ A command whose output can exceed ~4 KB — a test run, a build/lint log, `git log`, a diff — is piped through `.ai.local/scripts/dump-output.mjs --task <slug>` instead of being read whole. Work from its ≤40-line head and the stored file (grep it or use `team-db.mjs search`), and when that output informed a decision, record the repo-relative `outputs/…` path in `implementation.md` or `validation-report.md`; a `code-reviewer` may ask for that path. Do not read the whole output into context.
20
+
17
21
  ## Iterative refinement loop
18
22
 
19
23
  Every stage runs the named loop **draft → evaluate against named criteria → refine**:
@@ -3,7 +3,7 @@
3
3
  "platform": "zcode",
4
4
  "stack": "php-laravel",
5
5
  "semanticSource": "cursor/php-laravel",
6
- "sourceRevision": "e9e5119562f06055f16f55fb99bd4515e23c093e3307f4c953ef86b2f4324e23",
6
+ "sourceRevision": "5ca70d18cbc66865f93e8142025d778995bb3dc549b4dbd48249f99a3628a759",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -54,7 +54,7 @@ Decompose as a **dependency graph**: each task carries `dependsOn[]`, the edges
54
54
 
55
55
  <!-- shared-core: quality/context-and-iteration.md -->
56
56
 
57
- Work in bounded waves; delegate mechanical waves to repo scripts. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`, so a run can resume from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
57
+ Work in bounded waves; delegate mechanical waves to repo scripts. A large command output (log, diff, test run, `git log`) is piped through `.ai.local/scripts/dump-output.mjs` instead of being read whole: take its ≤40-line head, then `grep -n` the stored file or find it with `team-db.mjs search "<term>"`. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`, so a run can resume from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
58
58
 
59
59
  ## Self-review & context hygiene
60
60
 
@@ -151,7 +151,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
151
151
 
152
152
  ## Context budget & checkpoint/resume
153
153
 
154
- Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
154
+ Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. A large command output (log, diff, test run, `git log`) is piped through `.ai.local/scripts/dump-output.mjs` instead of being read whole: take its ≤40-line head, then `grep -n` the stored file or find it with `team-db.mjs search "<term>"`. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
155
155
 
156
156
  ## Self-review & context hygiene
157
157
 
@@ -218,6 +218,8 @@ Additional states: `blocked` — a step (or a parallel producer) cannot proceed;
218
218
 
219
219
  On each `subagentStop`, the hook reconciles `status.state` from the completing producer's terminal `artifact-manifest.json` receipt (`completed` \| `changes_requested` \| `validation_failed`) when agents left lifecycle fields untouched. Parent orchestrators must wait for that handoff before invoking the next step.
220
220
 
221
+ **A dispatch is not a completion.** When the host hands back a session handle, a job id, or control before the specialist's turn ends, the step is still open: do not dispatch the next step, do not report the step done, and do not run the chain hook until the specialist reports back and the hook records the receipt. A background handle is a start signal only.
222
+
221
223
  ## Pipeline step options
222
224
 
223
225
  | Field | Use |
@@ -14,6 +14,10 @@ Typical feature with data and UI. Concrete directories and rule stems — in the
14
14
  6. **Tests** — unit for mappers / non-trivial logic; e2e/UI per stack convention.
15
15
  7. **Completion** — stack post-change gate (lint/build) + package/toolchain rules. When the current WP spans **more than one** layer or module, `implementation.md` includes a **Code Map** (3–8 annotated repo-relative paths) and **Suggested Review Order** (`concern | path:line | ≤15 word note`). Omit both for a single-file or single-layer WP.
16
16
 
17
+ ## Context hygiene
18
+
19
+ A command whose output can exceed ~4 KB — a test run, a build/lint log, `git log`, a diff — is piped through `.ai.local/scripts/dump-output.mjs --task <slug>` instead of being read whole. Work from its ≤40-line head and the stored file (grep it or use `team-db.mjs search`), and when that output informed a decision, record the repo-relative `outputs/…` path in `implementation.md` or `validation-report.md`; a `code-reviewer` may ask for that path. Do not read the whole output into context.
20
+
17
21
  ## Iterative refinement loop
18
22
 
19
23
  Every stage runs the named loop **draft → evaluate against named criteria → refine**:
@@ -3,7 +3,7 @@
3
3
  "platform": "zcode",
4
4
  "stack": "svelte",
5
5
  "semanticSource": "cursor/svelte",
6
- "sourceRevision": "5ba1fd160dc99c9432e271fd004ddbc3a54f34ad4f6b2e5027d42d1f9b986082",
6
+ "sourceRevision": "9d456ee183d392a7bef006558ae785f04a37c02fa5258cb764b955267d637607",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -58,7 +58,7 @@ Decompose as a **dependency graph**: each task carries `dependsOn[]`, the edges
58
58
 
59
59
  <!-- shared-core: quality/context-and-iteration.md -->
60
60
 
61
- Work in bounded waves; delegate mechanical waves to repo scripts. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`, so a run can resume from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
61
+ Work in bounded waves; delegate mechanical waves to repo scripts. A large command output (log, diff, test run, `git log`) is piped through `.ai.local/scripts/dump-output.mjs` instead of being read whole: take its ≤40-line head, then `grep -n` the stored file or find it with `team-db.mjs search "<term>"`. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`, so a run can resume from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
62
62
 
63
63
  ## Self-review & context hygiene
64
64
 
@@ -151,7 +151,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
151
151
 
152
152
  ## Context budget & checkpoint/resume
153
153
 
154
- Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
154
+ Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. A large command output (log, diff, test run, `git log`) is piped through `.ai.local/scripts/dump-output.mjs` instead of being read whole: take its ≤40-line head, then `grep -n` the stored file or find it with `team-db.mjs search "<term>"`. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
155
155
 
156
156
  ## Self-review & context hygiene
157
157
 
@@ -218,6 +218,8 @@ Additional states: `blocked` — a step (or a parallel producer) cannot proceed;
218
218
 
219
219
  On each `subagentStop`, the hook reconciles `status.state` from the completing producer's terminal `artifact-manifest.json` receipt (`completed` \| `changes_requested` \| `validation_failed`) when agents left lifecycle fields untouched. Parent orchestrators must wait for that handoff before invoking the next step.
220
220
 
221
+ **A dispatch is not a completion.** When the host hands back a session handle, a job id, or control before the specialist's turn ends, the step is still open: do not dispatch the next step, do not report the step done, and do not run the chain hook until the specialist reports back and the hook records the receipt. A background handle is a start signal only.
222
+
221
223
  ## Pipeline step options
222
224
 
223
225
  | Field | Use |
@@ -14,6 +14,10 @@ Typical feature with data and UI. Concrete directories and rule stems — in the
14
14
  6. **Tests** — unit for mappers / non-trivial logic; e2e/UI per stack convention.
15
15
  7. **Completion** — stack post-change gate (lint/build) + package/toolchain rules. When the current WP spans **more than one** layer or module, `implementation.md` includes a **Code Map** (3–8 annotated repo-relative paths) and **Suggested Review Order** (`concern | path:line | ≤15 word note`). Omit both for a single-file or single-layer WP.
16
16
 
17
+ ## Context hygiene
18
+
19
+ A command whose output can exceed ~4 KB — a test run, a build/lint log, `git log`, a diff — is piped through `.ai.local/scripts/dump-output.mjs --task <slug>` instead of being read whole. Work from its ≤40-line head and the stored file (grep it or use `team-db.mjs search`), and when that output informed a decision, record the repo-relative `outputs/…` path in `implementation.md` or `validation-report.md`; a `code-reviewer` may ask for that path. Do not read the whole output into context.
20
+
17
21
  ## Iterative refinement loop
18
22
 
19
23
  Every stage runs the named loop **draft → evaluate against named criteria → refine**: