@bonesofspring/ai-rules 0.2.72 → 0.2.73

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 (458) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +7 -6
  3. package/bin/lib/ai-local-drift.js +4 -4
  4. package/bin/lib/engine-scripts.js +2 -0
  5. package/bin/lib/seed-ai-local-team.js +9 -5
  6. package/docs/TEAM-DB.md +19 -4
  7. package/package.json +1 -1
  8. package/presets/_shared/ai-local/scripts/manifest.mjs +19 -1
  9. package/presets/_shared/ai-local/scripts/team-db-project.mjs +73 -11
  10. package/presets/_shared/ai-local/scripts/team-db.mjs +125 -40
  11. package/presets/_shared/ai-local/scripts/tracker-planned-drain.mjs +335 -0
  12. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +9 -0
  13. package/presets/_shared/core/agent-team/agent-team-intake.md +2 -2
  14. package/presets/_shared/core/quality/self-review-and-context-hygiene.md +1 -0
  15. package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
  16. package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -1
  17. package/presets/claude/android-kotlin/agents/debugger.md +1 -1
  18. package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
  19. package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
  20. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +2 -2
  21. package/presets/claude/go/agents/build-verifier.md +1 -1
  22. package/presets/claude/go/agents/code-reviewer.md +1 -1
  23. package/presets/claude/go/agents/debugger.md +1 -1
  24. package/presets/claude/go/agents/feature-developer.md +1 -1
  25. package/presets/claude/go/agents/task-analyst.md +1 -1
  26. package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +2 -2
  27. package/presets/claude/ios-swift/agents/build-verifier.md +1 -1
  28. package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
  29. package/presets/claude/ios-swift/agents/debugger.md +1 -1
  30. package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
  31. package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
  32. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +2 -2
  33. package/presets/claude/java/agents/build-verifier.md +1 -1
  34. package/presets/claude/java/agents/code-reviewer.md +1 -1
  35. package/presets/claude/java/agents/debugger.md +1 -1
  36. package/presets/claude/java/agents/feature-developer.md +1 -1
  37. package/presets/claude/java/agents/task-analyst.md +1 -1
  38. package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +2 -2
  39. package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
  40. package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
  41. package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
  42. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +2 -2
  43. package/presets/claude/mol/agents/build-verifier.md +1 -1
  44. package/presets/claude/mol/agents/code-reviewer.md +1 -1
  45. package/presets/claude/mol/agents/debugger.md +1 -1
  46. package/presets/claude/mol/agents/feature-developer.md +1 -1
  47. package/presets/claude/mol/agents/task-analyst.md +1 -1
  48. package/presets/claude/mol/rules/tooling-and-review/agent-team-intake.md +2 -2
  49. package/presets/claude/next/REPO_AGENTS.md +16 -0
  50. package/presets/claude/next/agents/accessibility-reviewer.md +4 -1
  51. package/presets/claude/next/agents/api-contract-reviewer.md +5 -2
  52. package/presets/claude/next/agents/build-verifier.md +6 -3
  53. package/presets/claude/next/agents/ci-investigator.md +1 -1
  54. package/presets/claude/next/agents/code-reviewer.md +7 -4
  55. package/presets/claude/next/agents/codebase-analyzer.md +4 -1
  56. package/presets/claude/next/agents/debugger.md +2 -2
  57. package/presets/claude/next/agents/feature-developer.md +2 -2
  58. package/presets/claude/next/agents/migration-specialist.md +4 -1
  59. package/presets/claude/next/agents/mockup-reviewer.md +4 -1
  60. package/presets/claude/next/agents/openspec-author.md +4 -1
  61. package/presets/claude/next/agents/performance-auditor.md +4 -1
  62. package/presets/claude/next/agents/playwright-test-generator.md +5 -2
  63. package/presets/claude/next/agents/playwright-test-healer.md +5 -2
  64. package/presets/claude/next/agents/playwright-test-planner.md +5 -2
  65. package/presets/claude/next/agents/qa-tester.md +5 -2
  66. package/presets/claude/next/agents/security-reviewer.md +4 -1
  67. package/presets/claude/next/agents/solution-architect.md +4 -1
  68. package/presets/claude/next/agents/task-analyst.md +5 -2
  69. package/presets/claude/next/agents/task-router.md +4 -1
  70. package/presets/claude/next/agents/tech-writer.md +4 -1
  71. package/presets/claude/next/agents/unit-test-generator.md +5 -2
  72. package/presets/claude/next/agents/unit-test-healer.md +5 -2
  73. package/presets/claude/next/agents/unit-test-planner.md +5 -2
  74. package/presets/claude/next/ai-local/conventions.md +26 -1
  75. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +2 -2
  76. package/presets/claude/nuxt/agents/build-verifier.md +1 -1
  77. package/presets/claude/nuxt/agents/code-reviewer.md +1 -1
  78. package/presets/claude/nuxt/agents/debugger.md +1 -1
  79. package/presets/claude/nuxt/agents/feature-developer.md +1 -1
  80. package/presets/claude/nuxt/agents/task-analyst.md +1 -1
  81. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +2 -2
  82. package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
  83. package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
  84. package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
  85. package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
  86. package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
  87. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +2 -2
  88. package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
  89. package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
  90. package/presets/claude/php-laravel/agents/debugger.md +1 -1
  91. package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
  92. package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
  93. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +2 -2
  94. package/presets/claude/svelte/agents/build-verifier.md +1 -1
  95. package/presets/claude/svelte/agents/code-reviewer.md +1 -1
  96. package/presets/claude/svelte/agents/debugger.md +1 -1
  97. package/presets/claude/svelte/agents/feature-developer.md +1 -1
  98. package/presets/claude/svelte/agents/task-analyst.md +1 -1
  99. package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +2 -2
  100. package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
  101. package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -1
  102. package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
  103. package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
  104. package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
  105. package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +2 -2
  106. package/presets/cursor/go/agents/build-verifier.md +1 -1
  107. package/presets/cursor/go/agents/code-reviewer.md +1 -1
  108. package/presets/cursor/go/agents/debugger.md +1 -1
  109. package/presets/cursor/go/agents/feature-developer.md +1 -1
  110. package/presets/cursor/go/agents/task-analyst.md +1 -1
  111. package/presets/cursor/go/rules/agent-team-intake.mdc +2 -2
  112. package/presets/cursor/ios-swift/agents/build-verifier.md +1 -1
  113. package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
  114. package/presets/cursor/ios-swift/agents/debugger.md +1 -1
  115. package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
  116. package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
  117. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +2 -2
  118. package/presets/cursor/java/agents/build-verifier.md +1 -1
  119. package/presets/cursor/java/agents/code-reviewer.md +1 -1
  120. package/presets/cursor/java/agents/debugger.md +1 -1
  121. package/presets/cursor/java/agents/feature-developer.md +1 -1
  122. package/presets/cursor/java/agents/task-analyst.md +1 -1
  123. package/presets/cursor/java/rules/agent-team-intake.mdc +2 -2
  124. package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
  125. package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
  126. package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
  127. package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +2 -2
  128. package/presets/cursor/mol/agents/build-verifier.md +1 -1
  129. package/presets/cursor/mol/agents/code-reviewer.md +1 -1
  130. package/presets/cursor/mol/agents/debugger.md +1 -1
  131. package/presets/cursor/mol/agents/feature-developer.md +1 -1
  132. package/presets/cursor/mol/agents/task-analyst.md +1 -1
  133. package/presets/cursor/mol/rules/agent-team-intake.mdc +2 -2
  134. package/presets/cursor/next/AGENTS.md +2 -1
  135. package/presets/cursor/next/REPO_AGENTS.md +16 -0
  136. package/presets/cursor/next/agents/build-verifier.md +1 -1
  137. package/presets/cursor/next/agents/code-reviewer.md +1 -1
  138. package/presets/cursor/next/agents/debugger.md +1 -1
  139. package/presets/cursor/next/agents/feature-developer.md +1 -1
  140. package/presets/cursor/next/agents/task-analyst.md +1 -1
  141. package/presets/cursor/next/ai-local/conventions.md +6 -1
  142. package/presets/cursor/next/rules/agent-team-intake.mdc +2 -2
  143. package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
  144. package/presets/cursor/nuxt/agents/code-reviewer.md +1 -1
  145. package/presets/cursor/nuxt/agents/debugger.md +1 -1
  146. package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
  147. package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
  148. package/presets/cursor/nuxt/rules/agent-team-intake.mdc +2 -2
  149. package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
  150. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
  151. package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
  152. package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
  153. package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
  154. package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +2 -2
  155. package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
  156. package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
  157. package/presets/cursor/php-laravel/agents/debugger.md +1 -1
  158. package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
  159. package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
  160. package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +2 -2
  161. package/presets/cursor/svelte/agents/build-verifier.md +1 -1
  162. package/presets/cursor/svelte/agents/code-reviewer.md +1 -1
  163. package/presets/cursor/svelte/agents/debugger.md +1 -1
  164. package/presets/cursor/svelte/agents/feature-developer.md +1 -1
  165. package/presets/cursor/svelte/agents/task-analyst.md +1 -1
  166. package/presets/cursor/svelte/rules/agent-team-intake.mdc +2 -2
  167. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  168. package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
  169. package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -1
  170. package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
  171. package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
  172. package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
  173. package/presets/mavis/android-kotlin/rules/agent-team-intake.md +2 -2
  174. package/presets/mavis/go/adapter-map.json +1 -1
  175. package/presets/mavis/go/agents/build-verifier.md +1 -1
  176. package/presets/mavis/go/agents/code-reviewer.md +1 -1
  177. package/presets/mavis/go/agents/debugger.md +1 -1
  178. package/presets/mavis/go/agents/feature-developer.md +1 -1
  179. package/presets/mavis/go/agents/task-analyst.md +1 -1
  180. package/presets/mavis/go/rules/agent-team-intake.md +2 -2
  181. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  182. package/presets/mavis/ios-swift/agents/build-verifier.md +1 -1
  183. package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
  184. package/presets/mavis/ios-swift/agents/debugger.md +1 -1
  185. package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
  186. package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
  187. package/presets/mavis/ios-swift/rules/agent-team-intake.md +2 -2
  188. package/presets/mavis/java/adapter-map.json +1 -1
  189. package/presets/mavis/java/agents/build-verifier.md +1 -1
  190. package/presets/mavis/java/agents/code-reviewer.md +1 -1
  191. package/presets/mavis/java/agents/debugger.md +1 -1
  192. package/presets/mavis/java/agents/feature-developer.md +1 -1
  193. package/presets/mavis/java/agents/task-analyst.md +1 -1
  194. package/presets/mavis/java/rules/agent-team-intake.md +2 -2
  195. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  196. package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
  197. package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
  198. package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
  199. package/presets/mavis/mcp-ts/rules/agent-team-intake.md +2 -2
  200. package/presets/mavis/mol/adapter-map.json +1 -1
  201. package/presets/mavis/mol/agents/build-verifier.md +1 -1
  202. package/presets/mavis/mol/agents/code-reviewer.md +1 -1
  203. package/presets/mavis/mol/agents/debugger.md +1 -1
  204. package/presets/mavis/mol/agents/feature-developer.md +1 -1
  205. package/presets/mavis/mol/agents/task-analyst.md +1 -1
  206. package/presets/mavis/mol/rules/agent-team-intake.md +2 -2
  207. package/presets/mavis/next/MAVIS.md +2 -1
  208. package/presets/mavis/next/REPO_AGENTS.md +16 -0
  209. package/presets/mavis/next/adapter-map.json +1 -1
  210. package/presets/mavis/next/agents/accessibility-reviewer.md +4 -1
  211. package/presets/mavis/next/agents/api-contract-reviewer.md +5 -2
  212. package/presets/mavis/next/agents/build-verifier.md +6 -3
  213. package/presets/mavis/next/agents/ci-investigator.md +1 -1
  214. package/presets/mavis/next/agents/code-reviewer.md +7 -4
  215. package/presets/mavis/next/agents/codebase-analyzer.md +4 -1
  216. package/presets/mavis/next/agents/debugger.md +2 -2
  217. package/presets/mavis/next/agents/feature-developer.md +2 -2
  218. package/presets/mavis/next/agents/migration-specialist.md +4 -1
  219. package/presets/mavis/next/agents/mockup-reviewer.md +4 -1
  220. package/presets/mavis/next/agents/openspec-author.md +4 -1
  221. package/presets/mavis/next/agents/performance-auditor.md +4 -1
  222. package/presets/mavis/next/agents/playwright-test-generator.md +5 -2
  223. package/presets/mavis/next/agents/playwright-test-healer.md +5 -2
  224. package/presets/mavis/next/agents/playwright-test-planner.md +5 -2
  225. package/presets/mavis/next/agents/qa-tester.md +5 -2
  226. package/presets/mavis/next/agents/security-reviewer.md +4 -1
  227. package/presets/mavis/next/agents/solution-architect.md +4 -1
  228. package/presets/mavis/next/agents/task-analyst.md +5 -2
  229. package/presets/mavis/next/agents/task-router.md +4 -1
  230. package/presets/mavis/next/agents/tech-writer.md +4 -1
  231. package/presets/mavis/next/agents/unit-test-generator.md +5 -2
  232. package/presets/mavis/next/agents/unit-test-healer.md +5 -2
  233. package/presets/mavis/next/agents/unit-test-planner.md +5 -2
  234. package/presets/mavis/next/ai-local/conventions.md +6 -1
  235. package/presets/mavis/next/rules/agent-team-intake.md +2 -2
  236. package/presets/mavis/nuxt/adapter-map.json +1 -1
  237. package/presets/mavis/nuxt/agents/build-verifier.md +1 -1
  238. package/presets/mavis/nuxt/agents/code-reviewer.md +1 -1
  239. package/presets/mavis/nuxt/agents/debugger.md +1 -1
  240. package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
  241. package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
  242. package/presets/mavis/nuxt/rules/agent-team-intake.md +2 -2
  243. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  244. package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
  245. package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
  246. package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
  247. package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
  248. package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
  249. package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +2 -2
  250. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  251. package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
  252. package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
  253. package/presets/mavis/php-laravel/agents/debugger.md +1 -1
  254. package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
  255. package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
  256. package/presets/mavis/php-laravel/rules/agent-team-intake.md +2 -2
  257. package/presets/mavis/svelte/adapter-map.json +1 -1
  258. package/presets/mavis/svelte/agents/build-verifier.md +1 -1
  259. package/presets/mavis/svelte/agents/code-reviewer.md +1 -1
  260. package/presets/mavis/svelte/agents/debugger.md +1 -1
  261. package/presets/mavis/svelte/agents/feature-developer.md +1 -1
  262. package/presets/mavis/svelte/agents/task-analyst.md +1 -1
  263. package/presets/mavis/svelte/rules/agent-team-intake.md +2 -2
  264. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  265. package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
  266. package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -1
  267. package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
  268. package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
  269. package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
  270. package/presets/opencode/android-kotlin/rules/agent-team-intake.md +2 -2
  271. package/presets/opencode/go/adapter-map.json +1 -1
  272. package/presets/opencode/go/agents/build-verifier.md +1 -1
  273. package/presets/opencode/go/agents/code-reviewer.md +1 -1
  274. package/presets/opencode/go/agents/debugger.md +1 -1
  275. package/presets/opencode/go/agents/feature-developer.md +1 -1
  276. package/presets/opencode/go/agents/task-analyst.md +1 -1
  277. package/presets/opencode/go/rules/agent-team-intake.md +2 -2
  278. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  279. package/presets/opencode/ios-swift/agents/build-verifier.md +1 -1
  280. package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
  281. package/presets/opencode/ios-swift/agents/debugger.md +1 -1
  282. package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
  283. package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
  284. package/presets/opencode/ios-swift/rules/agent-team-intake.md +2 -2
  285. package/presets/opencode/java/adapter-map.json +1 -1
  286. package/presets/opencode/java/agents/build-verifier.md +1 -1
  287. package/presets/opencode/java/agents/code-reviewer.md +1 -1
  288. package/presets/opencode/java/agents/debugger.md +1 -1
  289. package/presets/opencode/java/agents/feature-developer.md +1 -1
  290. package/presets/opencode/java/agents/task-analyst.md +1 -1
  291. package/presets/opencode/java/rules/agent-team-intake.md +2 -2
  292. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  293. package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
  294. package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
  295. package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
  296. package/presets/opencode/mcp-ts/rules/agent-team-intake.md +2 -2
  297. package/presets/opencode/mol/adapter-map.json +1 -1
  298. package/presets/opencode/mol/agents/build-verifier.md +1 -1
  299. package/presets/opencode/mol/agents/code-reviewer.md +1 -1
  300. package/presets/opencode/mol/agents/debugger.md +1 -1
  301. package/presets/opencode/mol/agents/feature-developer.md +1 -1
  302. package/presets/opencode/mol/agents/task-analyst.md +1 -1
  303. package/presets/opencode/mol/rules/agent-team-intake.md +2 -2
  304. package/presets/opencode/next/OPENCODE.md +2 -1
  305. package/presets/opencode/next/REPO_AGENTS.md +16 -0
  306. package/presets/opencode/next/adapter-map.json +1 -1
  307. package/presets/opencode/next/agents/accessibility-reviewer.md +4 -1
  308. package/presets/opencode/next/agents/api-contract-reviewer.md +5 -2
  309. package/presets/opencode/next/agents/build-verifier.md +6 -3
  310. package/presets/opencode/next/agents/ci-investigator.md +1 -1
  311. package/presets/opencode/next/agents/code-reviewer.md +7 -4
  312. package/presets/opencode/next/agents/codebase-analyzer.md +4 -1
  313. package/presets/opencode/next/agents/debugger.md +2 -2
  314. package/presets/opencode/next/agents/feature-developer.md +2 -2
  315. package/presets/opencode/next/agents/migration-specialist.md +4 -1
  316. package/presets/opencode/next/agents/mockup-reviewer.md +4 -1
  317. package/presets/opencode/next/agents/openspec-author.md +4 -1
  318. package/presets/opencode/next/agents/performance-auditor.md +4 -1
  319. package/presets/opencode/next/agents/playwright-test-generator.md +5 -2
  320. package/presets/opencode/next/agents/playwright-test-healer.md +5 -2
  321. package/presets/opencode/next/agents/playwright-test-planner.md +5 -2
  322. package/presets/opencode/next/agents/qa-tester.md +5 -2
  323. package/presets/opencode/next/agents/security-reviewer.md +4 -1
  324. package/presets/opencode/next/agents/solution-architect.md +4 -1
  325. package/presets/opencode/next/agents/task-analyst.md +5 -2
  326. package/presets/opencode/next/agents/task-router.md +4 -1
  327. package/presets/opencode/next/agents/tech-writer.md +4 -1
  328. package/presets/opencode/next/agents/unit-test-generator.md +5 -2
  329. package/presets/opencode/next/agents/unit-test-healer.md +5 -2
  330. package/presets/opencode/next/agents/unit-test-planner.md +5 -2
  331. package/presets/opencode/next/ai-local/conventions.md +6 -1
  332. package/presets/opencode/next/rules/agent-team-intake.md +2 -2
  333. package/presets/opencode/nuxt/adapter-map.json +1 -1
  334. package/presets/opencode/nuxt/agents/build-verifier.md +1 -1
  335. package/presets/opencode/nuxt/agents/code-reviewer.md +1 -1
  336. package/presets/opencode/nuxt/agents/debugger.md +1 -1
  337. package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
  338. package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
  339. package/presets/opencode/nuxt/rules/agent-team-intake.md +2 -2
  340. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  341. package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
  342. package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
  343. package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
  344. package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
  345. package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
  346. package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +2 -2
  347. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  348. package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
  349. package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
  350. package/presets/opencode/php-laravel/agents/debugger.md +1 -1
  351. package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
  352. package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
  353. package/presets/opencode/php-laravel/rules/agent-team-intake.md +2 -2
  354. package/presets/opencode/plugins/output-guard/README.md +14 -8
  355. package/presets/opencode/plugins/output-guard/rewrite.ts +15 -9
  356. package/presets/opencode/svelte/adapter-map.json +1 -1
  357. package/presets/opencode/svelte/agents/build-verifier.md +1 -1
  358. package/presets/opencode/svelte/agents/code-reviewer.md +1 -1
  359. package/presets/opencode/svelte/agents/debugger.md +1 -1
  360. package/presets/opencode/svelte/agents/feature-developer.md +1 -1
  361. package/presets/opencode/svelte/agents/task-analyst.md +1 -1
  362. package/presets/opencode/svelte/rules/agent-team-intake.md +2 -2
  363. package/presets/zcode/android-kotlin/adapter-map.json +1 -1
  364. package/presets/zcode/android-kotlin/agents/build-verifier.md +1 -1
  365. package/presets/zcode/android-kotlin/agents/code-reviewer.md +1 -1
  366. package/presets/zcode/android-kotlin/agents/debugger.md +1 -1
  367. package/presets/zcode/android-kotlin/agents/feature-developer.md +1 -1
  368. package/presets/zcode/android-kotlin/agents/task-analyst.md +1 -1
  369. package/presets/zcode/android-kotlin/rules/agent-team-intake.md +2 -2
  370. package/presets/zcode/go/adapter-map.json +1 -1
  371. package/presets/zcode/go/agents/build-verifier.md +1 -1
  372. package/presets/zcode/go/agents/code-reviewer.md +1 -1
  373. package/presets/zcode/go/agents/debugger.md +1 -1
  374. package/presets/zcode/go/agents/feature-developer.md +1 -1
  375. package/presets/zcode/go/agents/task-analyst.md +1 -1
  376. package/presets/zcode/go/rules/agent-team-intake.md +2 -2
  377. package/presets/zcode/ios-swift/adapter-map.json +1 -1
  378. package/presets/zcode/ios-swift/agents/build-verifier.md +1 -1
  379. package/presets/zcode/ios-swift/agents/code-reviewer.md +1 -1
  380. package/presets/zcode/ios-swift/agents/debugger.md +1 -1
  381. package/presets/zcode/ios-swift/agents/feature-developer.md +1 -1
  382. package/presets/zcode/ios-swift/agents/task-analyst.md +1 -1
  383. package/presets/zcode/ios-swift/rules/agent-team-intake.md +2 -2
  384. package/presets/zcode/java/adapter-map.json +1 -1
  385. package/presets/zcode/java/agents/build-verifier.md +1 -1
  386. package/presets/zcode/java/agents/code-reviewer.md +1 -1
  387. package/presets/zcode/java/agents/debugger.md +1 -1
  388. package/presets/zcode/java/agents/feature-developer.md +1 -1
  389. package/presets/zcode/java/agents/task-analyst.md +1 -1
  390. package/presets/zcode/java/rules/agent-team-intake.md +2 -2
  391. package/presets/zcode/mcp-ts/adapter-map.json +1 -1
  392. package/presets/zcode/mcp-ts/agents/build-verifier.md +1 -1
  393. package/presets/zcode/mcp-ts/agents/feature-developer.md +1 -1
  394. package/presets/zcode/mcp-ts/agents/task-analyst.md +1 -1
  395. package/presets/zcode/mcp-ts/rules/agent-team-intake.md +2 -2
  396. package/presets/zcode/mol/adapter-map.json +1 -1
  397. package/presets/zcode/mol/agents/build-verifier.md +1 -1
  398. package/presets/zcode/mol/agents/code-reviewer.md +1 -1
  399. package/presets/zcode/mol/agents/debugger.md +1 -1
  400. package/presets/zcode/mol/agents/feature-developer.md +1 -1
  401. package/presets/zcode/mol/agents/task-analyst.md +1 -1
  402. package/presets/zcode/mol/rules/agent-team-intake.md +2 -2
  403. package/presets/zcode/next/REPO_AGENTS.md +16 -0
  404. package/presets/zcode/next/adapter-map.json +1 -1
  405. package/presets/zcode/next/agents/accessibility-reviewer.md +4 -1
  406. package/presets/zcode/next/agents/api-contract-reviewer.md +5 -2
  407. package/presets/zcode/next/agents/build-verifier.md +6 -3
  408. package/presets/zcode/next/agents/ci-investigator.md +1 -1
  409. package/presets/zcode/next/agents/code-reviewer.md +7 -4
  410. package/presets/zcode/next/agents/codebase-analyzer.md +4 -1
  411. package/presets/zcode/next/agents/debugger.md +2 -2
  412. package/presets/zcode/next/agents/feature-developer.md +2 -2
  413. package/presets/zcode/next/agents/migration-specialist.md +4 -1
  414. package/presets/zcode/next/agents/mockup-reviewer.md +4 -1
  415. package/presets/zcode/next/agents/openspec-author.md +4 -1
  416. package/presets/zcode/next/agents/performance-auditor.md +4 -1
  417. package/presets/zcode/next/agents/playwright-test-generator.md +5 -2
  418. package/presets/zcode/next/agents/playwright-test-healer.md +5 -2
  419. package/presets/zcode/next/agents/playwright-test-planner.md +5 -2
  420. package/presets/zcode/next/agents/qa-tester.md +5 -2
  421. package/presets/zcode/next/agents/security-reviewer.md +4 -1
  422. package/presets/zcode/next/agents/solution-architect.md +4 -1
  423. package/presets/zcode/next/agents/task-analyst.md +5 -2
  424. package/presets/zcode/next/agents/task-router.md +4 -1
  425. package/presets/zcode/next/agents/tech-writer.md +4 -1
  426. package/presets/zcode/next/agents/unit-test-generator.md +5 -2
  427. package/presets/zcode/next/agents/unit-test-healer.md +5 -2
  428. package/presets/zcode/next/agents/unit-test-planner.md +5 -2
  429. package/presets/zcode/next/ai-local/conventions.md +6 -1
  430. package/presets/zcode/next/rules/agent-team-intake.md +2 -2
  431. package/presets/zcode/nuxt/adapter-map.json +1 -1
  432. package/presets/zcode/nuxt/agents/build-verifier.md +1 -1
  433. package/presets/zcode/nuxt/agents/code-reviewer.md +1 -1
  434. package/presets/zcode/nuxt/agents/debugger.md +1 -1
  435. package/presets/zcode/nuxt/agents/feature-developer.md +1 -1
  436. package/presets/zcode/nuxt/agents/task-analyst.md +1 -1
  437. package/presets/zcode/nuxt/rules/agent-team-intake.md +2 -2
  438. package/presets/zcode/php-hexagonal/adapter-map.json +1 -1
  439. package/presets/zcode/php-hexagonal/agents/build-verifier.md +1 -1
  440. package/presets/zcode/php-hexagonal/agents/code-reviewer.md +1 -1
  441. package/presets/zcode/php-hexagonal/agents/debugger.md +1 -1
  442. package/presets/zcode/php-hexagonal/agents/feature-developer.md +1 -1
  443. package/presets/zcode/php-hexagonal/agents/task-analyst.md +1 -1
  444. package/presets/zcode/php-hexagonal/rules/agent-team-intake.md +2 -2
  445. package/presets/zcode/php-laravel/adapter-map.json +1 -1
  446. package/presets/zcode/php-laravel/agents/build-verifier.md +1 -1
  447. package/presets/zcode/php-laravel/agents/code-reviewer.md +1 -1
  448. package/presets/zcode/php-laravel/agents/debugger.md +1 -1
  449. package/presets/zcode/php-laravel/agents/feature-developer.md +1 -1
  450. package/presets/zcode/php-laravel/agents/task-analyst.md +1 -1
  451. package/presets/zcode/php-laravel/rules/agent-team-intake.md +2 -2
  452. package/presets/zcode/svelte/adapter-map.json +1 -1
  453. package/presets/zcode/svelte/agents/build-verifier.md +1 -1
  454. package/presets/zcode/svelte/agents/code-reviewer.md +1 -1
  455. package/presets/zcode/svelte/agents/debugger.md +1 -1
  456. package/presets/zcode/svelte/agents/feature-developer.md +1 -1
  457. package/presets/zcode/svelte/agents/task-analyst.md +1 -1
  458. package/presets/zcode/svelte/rules/agent-team-intake.md +2 -2
@@ -103,7 +103,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
103
103
 
104
104
  Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
105
105
 
106
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
106
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
107
107
 
108
108
  ## Product specs (docs/specs)
109
109
 
@@ -73,7 +73,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
73
73
 
74
74
  Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
75
75
 
76
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
76
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
77
77
 
78
78
  ## Deliverables
79
79
 
@@ -6,9 +6,9 @@ When the user message looks like a **work request** (implement, add, fix, refact
6
6
 
7
7
  1. Prefer **`/task <their request>`** or invoke **task-router** first.
8
8
  2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
9
- 3. Pure questions (“how does X work”, “explain”) — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
9
+ 3. A question that one read answers — “how does X work”, “explain this function” — is a **pure question**: answer inline, no file, no `/task`. A question that needs more than one read, or whose answer is written down, is a **research** request: route it to agent **`codebase-analyzer`** (explain-as-is) or a `spike` pipeline, and never open implementation steps for it. Where the always-on root agent file ships the research gate, it states this same boundary as a `MUST` (§ Research requests).
10
10
  4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
11
- 5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
11
+ 5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file; a research request is one (rule 3). On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
12
12
  6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
13
13
  7. **Project the intake write.** After `prompt.md` is written for an inline (non-`/task`) work request, run `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500` once, so the new task row and its prompt reach the database. A projection failure is reported to the user, never blocks the request; the next full sync remains the convergence path. Do not run a full sync from intake.
14
14
 
@@ -3,7 +3,7 @@
3
3
  "platform": "opencode",
4
4
  "stack": "php-laravel",
5
5
  "semanticSource": "cursor/php-laravel",
6
- "sourceRevision": "f7083193d68d510d5cb34fdd9653e25dd8881f32021548fbf4d80fb9487c4ad1",
6
+ "sourceRevision": "ff14228831038984e00c960ccbba2d355b27b2f059397b250b00b7a06c89512c",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -63,7 +63,7 @@ Before you run the project gate and write the terminal validation receipt, self-
63
63
 
64
64
  Record a `## Self-review` block in `validation-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
65
65
 
66
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
66
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
67
67
 
68
68
  ## Artifact contract
69
69
 
@@ -76,7 +76,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
76
76
 
77
77
  Record a `## Self-review` block in `review.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
78
78
 
79
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt.
79
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
80
80
 
81
81
  ## Review artifact
82
82
 
@@ -78,7 +78,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
78
78
 
79
79
  Record a `## Self-review` block in `debug-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
80
80
 
81
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
81
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
82
82
 
83
83
  ## MCP usage
84
84
 
@@ -103,7 +103,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
103
103
 
104
104
  Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
105
105
 
106
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
106
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
107
107
 
108
108
  ## Product specs (docs/specs)
109
109
 
@@ -73,7 +73,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
73
73
 
74
74
  Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
75
75
 
76
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
76
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
77
77
 
78
78
  ## Deliverables
79
79
 
@@ -6,9 +6,9 @@ When the user message looks like a **work request** (implement, add, fix, refact
6
6
 
7
7
  1. Prefer **`/task <their request>`** or invoke **task-router** first.
8
8
  2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
9
- 3. Pure questions (“how does X work”, “explain”) — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
9
+ 3. A question that one read answers — “how does X work”, “explain this function” — is a **pure question**: answer inline, no file, no `/task`. A question that needs more than one read, or whose answer is written down, is a **research** request: route it to agent **`codebase-analyzer`** (explain-as-is) or a `spike` pipeline, and never open implementation steps for it. Where the always-on root agent file ships the research gate, it states this same boundary as a `MUST` (§ Research requests).
10
10
  4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
11
- 5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
11
+ 5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file; a research request is one (rule 3). On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
12
12
  6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
13
13
  7. **Project the intake write.** After `prompt.md` is written for an inline (non-`/task`) work request, run `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500` once, so the new task row and its prompt reach the database. A projection failure is reported to the user, never blocks the request; the next full sync remains the convergence path. Do not run a full sync from intake.
14
14
 
@@ -4,8 +4,9 @@ Keeps a large tool result out of the model's context window. The plugin register
4
4
  `ctx.session.hook("context")`, which receives the assembled messages before
5
5
  dispatch. A `tool-result` over the threshold is written to
6
6
  `.ai.local/team/output-guard/<sessionID>/outputs/` and replaced with a bounded
7
- head + tail, the path, and one `grep` / `sed` hint. The change affects only the
8
- outgoing model call; persisted history is untouched.
7
+ head + tail, the path, and one recovery command — a `grep -n '<term>'` lookup,
8
+ or `tail -c` when a line is cut. The change affects only the outgoing model
9
+ call; persisted history is untouched.
9
10
 
10
11
  ## Behaviour
11
12
 
@@ -13,7 +14,7 @@ outgoing model call; persisted history is untouched.
13
14
  |---|---|
14
15
  | Trigger | `tool-result` text over **8192 B** (`AI_RULES_OUTPUT_GUARD_BYTES`) |
15
16
  | Tools | `shell`, `bash`, `read`, `grep`, `glob`, `webfetch` |
16
- | Replacement (8–20 KB band) | structured head + tail: named elision, top-level JSON keys that sit in the gap, a `sed -n 'A,Bp'` hint for a whole-line gap, or `tail -c` when a line is cut mid-way |
17
+ | Replacement (8–20 KB band) | structured head + tail: named elision, top-level JSON keys that sit in the gap, a `grep -n '<term>'` hint for a whole-line gap that carries a usable term, or `tail -c` when a line is cut mid-way |
17
18
  | Replacement (over 20 KB) | 40-line / 2 KB head + 15-line / 1 KB tail + path + hints |
18
19
  | Shape override | `AI_RULES_OUTPUT_GUARD_SHAPE=flat` forces the legacy renderer in the band |
19
20
  | Saved file | `.ai.local/team/output-guard/<sessionID>/outputs/<callID>-<tool>.txt`, 2 MiB cap |
@@ -25,11 +26,16 @@ outgoing model call; persisted history is untouched.
25
26
 
26
27
  The replacement keeps the first and last lines because a test log often carries
27
28
  the failure at the end. Results in the 8–20 KB band get the structured shape.
28
- A whole-line gap is a `sed -n` range. A head or tail cut mid-line, including a
29
- one-line payload, is a `tail -c` byte window: a line range would skip the rest
30
- of the cut line. JSON keys are listed only when they sit in that gap. Larger
31
- results keep the flat head+tail with a `[json: full document at the path]` note
32
- so the agent can `jq` the file.
29
+ A whole-line gap is a `grep -n '<term>'` lookup: a line range just invites the
30
+ same file back in overlapping windows. The term is taken from the elided lines,
31
+ never from the head — a head token greps back the lines the model already has —
32
+ and a gap that yields no such token keeps the `elided lines A..B` marker and
33
+ prints no command, rather than a term that matches nothing. One command per
34
+ replacement, never the same command twice. A head or tail cut mid-line,
35
+ including a one-line payload, is a `tail -c` byte window: a lookup would skip
36
+ the rest of the cut line. JSON keys are listed only when they sit in that gap.
37
+ Larger results keep the flat head+tail with a `[json: full document at the path]`
38
+ note so the agent can `jq` the file.
33
39
 
34
40
  ## Ledgers
35
41
 
@@ -117,9 +117,14 @@ const joinedSlice = (lines: string[], start: number, count: number): string =>
117
117
  lines.slice(start, start + count).join("\n")
118
118
 
119
119
  /**
120
- * The 8–20 KB band names the gap. A whole-line gap keeps a `sed -n` range.
121
- * A head or tail cut mid-line (or a one-line payload) names a byte window:
122
- * a line range would skip the rest of the cut line, and `sed` past EOF is empty.
120
+ * The 8–20 KB band names the gap. A whole-line gap names a `grep -n` term
121
+ * instead of a line range: a range invites the same file to be read again in
122
+ * overlapping windows. The term is taken from the elided lines, not the head —
123
+ * a head token greps back the content the model already holds. A whole-line gap
124
+ * with no usable token keeps the `elided lines A..B` marker as its only
125
+ * recovery path: a fabricated term would be a `grep` that matches nothing. A
126
+ * head or tail cut mid-line (or a one-line payload) names a byte window: a
127
+ * lookup would skip the rest of the cut line, and `grep` past EOF is empty.
123
128
  * JSON keys are listed only when they sit in that gap.
124
129
  */
125
130
  export const renderStructured = (
@@ -129,7 +134,6 @@ export const renderStructured = (
129
134
  ): string => {
130
135
  const head = takeHead(value, options.headBytes, options.headLines)
131
136
  const tail = takeTail(value, options.tailBytes, options.tailLines)
132
- const term = searchTerm(head, "")
133
137
  const total = bytes(value)
134
138
  const lines = value.split("\n")
135
139
  const headLinesUsed = head === "" ? 0 : head.split("\n").length
@@ -156,10 +160,13 @@ export const renderStructured = (
156
160
  if (at < headBytes || at >= total - tailBytes) return []
157
161
  return [line > 0 ? `"${key}" (line ${line})` : `"${key}"`]
158
162
  }).slice(0, 12)
163
+ const elidedLines = lineRange ? lines.slice(firstElided - 1, lastElided) : []
164
+ const elidedTerm = elidedLines.length === 0 ? "" : searchTerm(elidedLines.join("\n"), "")
159
165
  const hints = [
160
- term !== "" && value.includes(term) ? `${options.marker} search: grep -n '${term}' ${file}` : "",
161
166
  lineRange
162
- ? `${options.marker} read more: sed -n '${firstElided},${lastElided}p' ${file}`
167
+ ? elidedTerm === ""
168
+ ? ""
169
+ : `${options.marker} read more: grep -n '${elidedTerm}' ${file}`
163
170
  : elidedBytes > 0
164
171
  ? `${options.marker} read more: tail -c +${headBytes + 1} ${file} | head -c ${elidedBytes}`
165
172
  : "",
@@ -184,7 +191,7 @@ export const renderReplacement = (
184
191
  ): string => {
185
192
  const head = takeHead(value, options.headBytes, options.headLines)
186
193
  const tail = takeTail(value, options.tailBytes, options.tailLines)
187
- const term = searchTerm(head, "error")
194
+ const term = searchTerm(head, "")
188
195
  const total = bytes(value)
189
196
  const json = looksJson(value) ? " [json: full document at the path]" : ""
190
197
  return [
@@ -193,8 +200,7 @@ export const renderReplacement = (
193
200
  "... (truncated)",
194
201
  tail,
195
202
  `${options.marker} full output: ${file} (${total} B)`,
196
- `${options.marker} search: grep -n '${term}' ${file}`,
197
- `${options.marker} read more: sed -n '${options.headLines + 1},${options.headLines + 80}p' ${file}`,
203
+ ...(term === "" ? [] : [`${options.marker} read more: grep -n '${term}' ${file}`]),
198
204
  ].join("\n")
199
205
  }
200
206
 
@@ -3,7 +3,7 @@
3
3
  "platform": "opencode",
4
4
  "stack": "svelte",
5
5
  "semanticSource": "cursor/svelte",
6
- "sourceRevision": "034613cd2dce4fe89dcb9de2a0a5b7381f9c06d1bbe0fccb354bcdb8cb0fa074",
6
+ "sourceRevision": "821b15c39a4affebe260f6b87f38f73e8c30f8d4c5f6acf44112aee16d24a626",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -72,7 +72,7 @@ Before you run the project gate and write the terminal validation receipt, self-
72
72
 
73
73
  Record a `## Self-review` block in `validation-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
74
74
 
75
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
75
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
76
76
 
77
77
  ## Output
78
78
 
@@ -65,7 +65,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
65
65
 
66
66
  Record a `## Self-review` block in `review.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
67
67
 
68
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt.
68
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
69
69
 
70
70
  ## Review artifact
71
71
 
@@ -105,7 +105,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
105
105
 
106
106
  Record a `## Self-review` block in `debug-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
107
107
 
108
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
108
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
109
109
 
110
110
  ## MCP usage
111
111
 
@@ -112,7 +112,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
112
112
 
113
113
  Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
114
114
 
115
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
115
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
116
116
 
117
117
  ## Anti-hallucination (Svelte / SvelteKit / Svelte stores/runes)
118
118
 
@@ -76,7 +76,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
76
76
 
77
77
  Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
78
78
 
79
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
79
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
80
80
 
81
81
  ## Clarification cycle (must)
82
82
 
@@ -6,9 +6,9 @@ When the user message looks like a **work request** (implement, add, fix, refact
6
6
 
7
7
  1. Prefer **`/task <their request>`** or invoke **task-router** first.
8
8
  2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
9
- 3. Pure questions (“how does X work”, “explain”) — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
9
+ 3. A question that one read answers — “how does X work”, “explain this function” — is a **pure question**: answer inline, no file, no `/task`. A question that needs more than one read, or whose answer is written down, is a **research** request: route it to agent **`codebase-analyzer`** (explain-as-is) or a `spike` pipeline, and never open implementation steps for it. Where the always-on root agent file ships the research gate, it states this same boundary as a `MUST` (§ Research requests).
10
10
  4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
11
- 5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
11
+ 5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file; a research request is one (rule 3). On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
12
12
  6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
13
13
  7. **Project the intake write.** After `prompt.md` is written for an inline (non-`/task`) work request, run `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500` once, so the new task row and its prompt reach the database. A projection failure is reported to the user, never blocks the request; the next full sync remains the convergence path. Do not run a full sync from intake.
14
14
 
@@ -3,7 +3,7 @@
3
3
  "platform": "zcode",
4
4
  "stack": "android-kotlin",
5
5
  "semanticSource": "cursor/android-kotlin",
6
- "sourceRevision": "ee19e6c80f46af0a8307034142c742e07bdf8dd7c20c7488e1582a30ec82aada",
6
+ "sourceRevision": "a175721e644dabd89f1e210a77ba0afb74fe4bc7cfe33fb8641f1685dcf4ef37",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -66,7 +66,7 @@ Before you run the project gate and write the terminal validation receipt, self-
66
66
 
67
67
  Record a `## Self-review` block in `validation-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
68
68
 
69
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
69
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
70
70
 
71
71
  ## Output
72
72
 
@@ -72,7 +72,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
72
72
 
73
73
  Record a `## Self-review` block in `review.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
74
74
 
75
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt.
75
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
76
76
 
77
77
  ## Review artifact
78
78
 
@@ -106,7 +106,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
106
106
 
107
107
  Record a `## Self-review` block in `debug-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
108
108
 
109
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
109
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
110
110
 
111
111
  ## MCP usage
112
112
 
@@ -108,7 +108,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
108
108
 
109
109
  Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
110
110
 
111
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
111
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
112
112
 
113
113
  ## UX design (behavioral)
114
114
 
@@ -68,7 +68,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
68
68
 
69
69
  Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
70
70
 
71
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
71
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
72
72
 
73
73
  ## Clarification cycle
74
74
 
@@ -6,9 +6,9 @@ When the user message looks like a **work request** (implement, add, fix, refact
6
6
 
7
7
  1. Prefer **`/task <their request>`** or invoke **task-router** first.
8
8
  2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
9
- 3. Pure questions (“how does X work”, “explain”) — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
9
+ 3. A question that one read answers — “how does X work”, “explain this function” — is a **pure question**: answer inline, no file, no `/task`. A question that needs more than one read, or whose answer is written down, is a **research** request: route it to agent **`codebase-analyzer`** (explain-as-is) or a `spike` pipeline, and never open implementation steps for it. Where the always-on root agent file ships the research gate, it states this same boundary as a `MUST` (§ Research requests).
10
10
  4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
11
- 5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
11
+ 5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file; a research request is one (rule 3). On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
12
12
  6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
13
13
  7. **Project the intake write.** After `prompt.md` is written for an inline (non-`/task`) work request, run `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500` once, so the new task row and its prompt reach the database. A projection failure is reported to the user, never blocks the request; the next full sync remains the convergence path. Do not run a full sync from intake.
14
14
 
@@ -3,7 +3,7 @@
3
3
  "platform": "zcode",
4
4
  "stack": "go",
5
5
  "semanticSource": "cursor/go",
6
- "sourceRevision": "2be7b15dc3497638dcc31a6a5f9573cbdec8012a48f915593dc4696a4b1e8ccf",
6
+ "sourceRevision": "31497dc7c8d26f37a9f872726301855b7b0ff24c5831dddff148b7983c61f501",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -58,7 +58,7 @@ Before you run the project gate and write the terminal validation receipt, self-
58
58
 
59
59
  Record a `## Self-review` block in `validation-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
60
60
 
61
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
61
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
62
62
 
63
63
  ## Artifact contract
64
64
 
@@ -71,7 +71,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
71
71
 
72
72
  Record a `## Self-review` block in `review.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
73
73
 
74
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt.
74
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
75
75
 
76
76
  ## Review artifact
77
77
 
@@ -75,7 +75,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
75
75
 
76
76
  Record a `## Self-review` block in `debug-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
77
77
 
78
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
78
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
79
79
 
80
80
  ## MCP usage
81
81
 
@@ -100,7 +100,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
100
100
 
101
101
  Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
102
102
 
103
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
103
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
104
104
 
105
105
  ## Product specs (docs/specs)
106
106
 
@@ -68,7 +68,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
68
68
 
69
69
  Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
70
70
 
71
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
71
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
72
72
 
73
73
  ## Deliverables
74
74
 
@@ -6,9 +6,9 @@ When the user message looks like a **work request** (implement, add, fix, refact
6
6
 
7
7
  1. Prefer **`/task <their request>`** or invoke **task-router** first.
8
8
  2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
9
- 3. Pure questions (“how does X work”, “explain”) — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
9
+ 3. A question that one read answers — “how does X work”, “explain this function” — is a **pure question**: answer inline, no file, no `/task`. A question that needs more than one read, or whose answer is written down, is a **research** request: route it to agent **`codebase-analyzer`** (explain-as-is) or a `spike` pipeline, and never open implementation steps for it. Where the always-on root agent file ships the research gate, it states this same boundary as a `MUST` (§ Research requests).
10
10
  4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
11
- 5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
11
+ 5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file; a research request is one (rule 3). On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
12
12
  6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
13
13
  7. **Project the intake write.** After `prompt.md` is written for an inline (non-`/task`) work request, run `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500` once, so the new task row and its prompt reach the database. A projection failure is reported to the user, never blocks the request; the next full sync remains the convergence path. Do not run a full sync from intake.
14
14
 
@@ -3,7 +3,7 @@
3
3
  "platform": "zcode",
4
4
  "stack": "ios-swift",
5
5
  "semanticSource": "cursor/ios-swift",
6
- "sourceRevision": "88908cc3d9c30b8ee202f8a54942847741ba7d09ab038b46cb4ee42e053f12f1",
6
+ "sourceRevision": "e2521ffaae5b3c15e314770048998fac95225949bab2c9e5e9e4fd293c1303d5",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -65,7 +65,7 @@ Before you run the project gate and write the terminal validation receipt, self-
65
65
 
66
66
  Record a `## Self-review` block in `validation-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
67
67
 
68
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
68
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
69
69
 
70
70
  ## Output
71
71
 
@@ -72,7 +72,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
72
72
 
73
73
  Record a `## Self-review` block in `review.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
74
74
 
75
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt.
75
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
76
76
 
77
77
  ## Review artifact
78
78
 
@@ -110,7 +110,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
110
110
 
111
111
  Record a `## Self-review` block in `debug-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
112
112
 
113
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
113
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
114
114
 
115
115
  ## MCP usage
116
116
 
@@ -107,7 +107,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
107
107
 
108
108
  Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
109
109
 
110
- A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
110
+ A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
111
111
 
112
112
  ## UX design (behavioral)
113
113