@bonesofspring/ai-rules 0.2.72 → 0.2.74

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 (634) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +7 -6
  3. package/bin/lib/ai-local-drift.js +4 -4
  4. package/bin/lib/engine-scripts.js +10 -0
  5. package/bin/lib/seed-ai-local-team.js +9 -5
  6. package/docs/TEAM-DB.md +105 -9
  7. package/docs/openapi/team-db.v1.json +1164 -224
  8. package/package.json +1 -1
  9. package/presets/_shared/ai-local/scripts/action-signals.mjs +225 -0
  10. package/presets/_shared/ai-local/scripts/actions-report.mjs +210 -0
  11. package/presets/_shared/ai-local/scripts/manifest.mjs +19 -1
  12. package/presets/_shared/ai-local/scripts/processes.mjs +5 -4
  13. package/presets/_shared/ai-local/scripts/rr-scheduler-start.mjs +161 -0
  14. package/presets/_shared/ai-local/scripts/team-db-api.mjs +347 -9
  15. package/presets/_shared/ai-local/scripts/team-db-openapi.mjs +309 -4
  16. package/presets/_shared/ai-local/scripts/team-db-project.mjs +312 -36
  17. package/presets/_shared/ai-local/scripts/team-db-schema.mjs +86 -1
  18. package/presets/_shared/ai-local/scripts/team-db.mjs +125 -40
  19. package/presets/_shared/ai-local/scripts/tracker-planned-drain.mjs +335 -0
  20. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +9 -0
  21. package/presets/_shared/core/agent-team/agent-team-intake.md +2 -2
  22. package/presets/_shared/core/quality/self-review-and-context-hygiene.md +1 -0
  23. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +15 -1
  24. package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
  25. package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -1
  26. package/presets/claude/android-kotlin/agents/debugger.md +1 -1
  27. package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
  28. package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
  29. package/presets/claude/android-kotlin/commands/README.md +4 -0
  30. package/presets/claude/android-kotlin/commands/rr-scheduler-start.md +32 -0
  31. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +15 -1
  32. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +2 -2
  33. package/presets/claude/go/agents/build-verifier.md +1 -1
  34. package/presets/claude/go/agents/code-reviewer.md +1 -1
  35. package/presets/claude/go/agents/debugger.md +1 -1
  36. package/presets/claude/go/agents/feature-developer.md +1 -1
  37. package/presets/claude/go/agents/task-analyst.md +1 -1
  38. package/presets/claude/go/commands/README.md +4 -0
  39. package/presets/claude/go/commands/rr-scheduler-start.md +32 -0
  40. package/presets/claude/go/hooks/chain-team-phases.sh +15 -1
  41. package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +2 -2
  42. package/presets/claude/ios-swift/agents/build-verifier.md +1 -1
  43. package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
  44. package/presets/claude/ios-swift/agents/debugger.md +1 -1
  45. package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
  46. package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
  47. package/presets/claude/ios-swift/commands/README.md +4 -0
  48. package/presets/claude/ios-swift/commands/rr-scheduler-start.md +32 -0
  49. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +15 -1
  50. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +2 -2
  51. package/presets/claude/java/agents/build-verifier.md +1 -1
  52. package/presets/claude/java/agents/code-reviewer.md +1 -1
  53. package/presets/claude/java/agents/debugger.md +1 -1
  54. package/presets/claude/java/agents/feature-developer.md +1 -1
  55. package/presets/claude/java/agents/task-analyst.md +1 -1
  56. package/presets/claude/java/commands/README.md +4 -0
  57. package/presets/claude/java/commands/rr-scheduler-start.md +32 -0
  58. package/presets/claude/java/hooks/chain-team-phases.sh +15 -1
  59. package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +2 -2
  60. package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
  61. package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
  62. package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
  63. package/presets/claude/mcp-ts/commands/README.md +4 -0
  64. package/presets/claude/mcp-ts/commands/rr-scheduler-start.md +32 -0
  65. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +15 -1
  66. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +2 -2
  67. package/presets/claude/mol/agents/build-verifier.md +1 -1
  68. package/presets/claude/mol/agents/code-reviewer.md +1 -1
  69. package/presets/claude/mol/agents/debugger.md +1 -1
  70. package/presets/claude/mol/agents/feature-developer.md +1 -1
  71. package/presets/claude/mol/agents/task-analyst.md +1 -1
  72. package/presets/claude/mol/commands/README.md +4 -0
  73. package/presets/claude/mol/commands/rr-scheduler-start.md +32 -0
  74. package/presets/claude/mol/hooks/chain-team-phases.sh +15 -1
  75. package/presets/claude/mol/rules/tooling-and-review/agent-team-intake.md +2 -2
  76. package/presets/claude/next/REPO_AGENTS.md +16 -0
  77. package/presets/claude/next/agents/accessibility-reviewer.md +4 -1
  78. package/presets/claude/next/agents/api-contract-reviewer.md +5 -2
  79. package/presets/claude/next/agents/build-verifier.md +6 -3
  80. package/presets/claude/next/agents/ci-investigator.md +1 -1
  81. package/presets/claude/next/agents/code-reviewer.md +7 -4
  82. package/presets/claude/next/agents/codebase-analyzer.md +4 -1
  83. package/presets/claude/next/agents/debugger.md +2 -2
  84. package/presets/claude/next/agents/feature-developer.md +2 -2
  85. package/presets/claude/next/agents/migration-specialist.md +4 -1
  86. package/presets/claude/next/agents/mockup-reviewer.md +4 -1
  87. package/presets/claude/next/agents/openspec-author.md +4 -1
  88. package/presets/claude/next/agents/performance-auditor.md +4 -1
  89. package/presets/claude/next/agents/playwright-test-generator.md +5 -2
  90. package/presets/claude/next/agents/playwright-test-healer.md +5 -2
  91. package/presets/claude/next/agents/playwright-test-planner.md +5 -2
  92. package/presets/claude/next/agents/qa-tester.md +5 -2
  93. package/presets/claude/next/agents/security-reviewer.md +4 -1
  94. package/presets/claude/next/agents/solution-architect.md +4 -1
  95. package/presets/claude/next/agents/task-analyst.md +5 -2
  96. package/presets/claude/next/agents/task-router.md +4 -1
  97. package/presets/claude/next/agents/tech-writer.md +4 -1
  98. package/presets/claude/next/agents/unit-test-generator.md +5 -2
  99. package/presets/claude/next/agents/unit-test-healer.md +5 -2
  100. package/presets/claude/next/agents/unit-test-planner.md +5 -2
  101. package/presets/claude/next/ai-local/conventions.md +26 -1
  102. package/presets/claude/next/commands/README.md +4 -0
  103. package/presets/claude/next/commands/rr-scheduler-start.md +32 -0
  104. package/presets/claude/next/hooks/chain-team-phases.sh +15 -1
  105. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +2 -2
  106. package/presets/claude/nuxt/agents/build-verifier.md +1 -1
  107. package/presets/claude/nuxt/agents/code-reviewer.md +1 -1
  108. package/presets/claude/nuxt/agents/debugger.md +1 -1
  109. package/presets/claude/nuxt/agents/feature-developer.md +1 -1
  110. package/presets/claude/nuxt/agents/task-analyst.md +1 -1
  111. package/presets/claude/nuxt/commands/README.md +4 -0
  112. package/presets/claude/nuxt/commands/rr-scheduler-start.md +32 -0
  113. package/presets/claude/nuxt/hooks/chain-team-phases.sh +15 -1
  114. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +2 -2
  115. package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
  116. package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
  117. package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
  118. package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
  119. package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
  120. package/presets/claude/php-hexagonal/commands/README.md +4 -0
  121. package/presets/claude/php-hexagonal/commands/rr-scheduler-start.md +32 -0
  122. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +15 -1
  123. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +2 -2
  124. package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
  125. package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
  126. package/presets/claude/php-laravel/agents/debugger.md +1 -1
  127. package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
  128. package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
  129. package/presets/claude/php-laravel/commands/README.md +4 -0
  130. package/presets/claude/php-laravel/commands/rr-scheduler-start.md +32 -0
  131. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +15 -1
  132. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +2 -2
  133. package/presets/claude/svelte/agents/build-verifier.md +1 -1
  134. package/presets/claude/svelte/agents/code-reviewer.md +1 -1
  135. package/presets/claude/svelte/agents/debugger.md +1 -1
  136. package/presets/claude/svelte/agents/feature-developer.md +1 -1
  137. package/presets/claude/svelte/agents/task-analyst.md +1 -1
  138. package/presets/claude/svelte/commands/README.md +4 -0
  139. package/presets/claude/svelte/commands/rr-scheduler-start.md +32 -0
  140. package/presets/claude/svelte/hooks/chain-team-phases.sh +15 -1
  141. package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +2 -2
  142. package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
  143. package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -1
  144. package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
  145. package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
  146. package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
  147. package/presets/cursor/android-kotlin/commands/README.md +4 -0
  148. package/presets/cursor/android-kotlin/commands/rr-scheduler-start.md +32 -0
  149. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +15 -1
  150. package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +2 -2
  151. package/presets/cursor/go/agents/build-verifier.md +1 -1
  152. package/presets/cursor/go/agents/code-reviewer.md +1 -1
  153. package/presets/cursor/go/agents/debugger.md +1 -1
  154. package/presets/cursor/go/agents/feature-developer.md +1 -1
  155. package/presets/cursor/go/agents/task-analyst.md +1 -1
  156. package/presets/cursor/go/commands/README.md +4 -0
  157. package/presets/cursor/go/commands/rr-scheduler-start.md +32 -0
  158. package/presets/cursor/go/hooks/chain-team-phases.sh +15 -1
  159. package/presets/cursor/go/rules/agent-team-intake.mdc +2 -2
  160. package/presets/cursor/ios-swift/agents/build-verifier.md +1 -1
  161. package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
  162. package/presets/cursor/ios-swift/agents/debugger.md +1 -1
  163. package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
  164. package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
  165. package/presets/cursor/ios-swift/commands/README.md +4 -0
  166. package/presets/cursor/ios-swift/commands/rr-scheduler-start.md +32 -0
  167. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +15 -1
  168. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +2 -2
  169. package/presets/cursor/java/agents/build-verifier.md +1 -1
  170. package/presets/cursor/java/agents/code-reviewer.md +1 -1
  171. package/presets/cursor/java/agents/debugger.md +1 -1
  172. package/presets/cursor/java/agents/feature-developer.md +1 -1
  173. package/presets/cursor/java/agents/task-analyst.md +1 -1
  174. package/presets/cursor/java/commands/README.md +4 -0
  175. package/presets/cursor/java/commands/rr-scheduler-start.md +32 -0
  176. package/presets/cursor/java/hooks/chain-team-phases.sh +15 -1
  177. package/presets/cursor/java/rules/agent-team-intake.mdc +2 -2
  178. package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
  179. package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
  180. package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
  181. package/presets/cursor/mcp-ts/commands/README.md +4 -0
  182. package/presets/cursor/mcp-ts/commands/rr-scheduler-start.md +32 -0
  183. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +15 -1
  184. package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +2 -2
  185. package/presets/cursor/mol/agents/build-verifier.md +1 -1
  186. package/presets/cursor/mol/agents/code-reviewer.md +1 -1
  187. package/presets/cursor/mol/agents/debugger.md +1 -1
  188. package/presets/cursor/mol/agents/feature-developer.md +1 -1
  189. package/presets/cursor/mol/agents/task-analyst.md +1 -1
  190. package/presets/cursor/mol/commands/README.md +4 -0
  191. package/presets/cursor/mol/commands/rr-scheduler-start.md +32 -0
  192. package/presets/cursor/mol/hooks/chain-team-phases.sh +15 -1
  193. package/presets/cursor/mol/rules/agent-team-intake.mdc +2 -2
  194. package/presets/cursor/next/AGENTS.md +2 -1
  195. package/presets/cursor/next/REPO_AGENTS.md +16 -0
  196. package/presets/cursor/next/agents/build-verifier.md +1 -1
  197. package/presets/cursor/next/agents/code-reviewer.md +1 -1
  198. package/presets/cursor/next/agents/debugger.md +1 -1
  199. package/presets/cursor/next/agents/feature-developer.md +1 -1
  200. package/presets/cursor/next/agents/task-analyst.md +1 -1
  201. package/presets/cursor/next/ai-local/conventions.md +6 -1
  202. package/presets/cursor/next/commands/README.md +4 -0
  203. package/presets/cursor/next/commands/rr-scheduler-start.md +32 -0
  204. package/presets/cursor/next/hooks/chain-team-phases.sh +15 -1
  205. package/presets/cursor/next/rules/agent-team-intake.mdc +2 -2
  206. package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
  207. package/presets/cursor/nuxt/agents/code-reviewer.md +1 -1
  208. package/presets/cursor/nuxt/agents/debugger.md +1 -1
  209. package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
  210. package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
  211. package/presets/cursor/nuxt/commands/README.md +4 -0
  212. package/presets/cursor/nuxt/commands/rr-scheduler-start.md +32 -0
  213. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +15 -1
  214. package/presets/cursor/nuxt/rules/agent-team-intake.mdc +2 -2
  215. package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
  216. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
  217. package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
  218. package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
  219. package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
  220. package/presets/cursor/php-hexagonal/commands/README.md +4 -0
  221. package/presets/cursor/php-hexagonal/commands/rr-scheduler-start.md +32 -0
  222. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +15 -1
  223. package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +2 -2
  224. package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
  225. package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
  226. package/presets/cursor/php-laravel/agents/debugger.md +1 -1
  227. package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
  228. package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
  229. package/presets/cursor/php-laravel/commands/README.md +4 -0
  230. package/presets/cursor/php-laravel/commands/rr-scheduler-start.md +32 -0
  231. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +15 -1
  232. package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +2 -2
  233. package/presets/cursor/svelte/agents/build-verifier.md +1 -1
  234. package/presets/cursor/svelte/agents/code-reviewer.md +1 -1
  235. package/presets/cursor/svelte/agents/debugger.md +1 -1
  236. package/presets/cursor/svelte/agents/feature-developer.md +1 -1
  237. package/presets/cursor/svelte/agents/task-analyst.md +1 -1
  238. package/presets/cursor/svelte/commands/README.md +4 -0
  239. package/presets/cursor/svelte/commands/rr-scheduler-start.md +32 -0
  240. package/presets/cursor/svelte/hooks/chain-team-phases.sh +15 -1
  241. package/presets/cursor/svelte/rules/agent-team-intake.mdc +2 -2
  242. package/presets/mavis/android-kotlin/adapter-map.json +9 -1
  243. package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
  244. package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -1
  245. package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
  246. package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
  247. package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
  248. package/presets/mavis/android-kotlin/commands/README.md +4 -0
  249. package/presets/mavis/android-kotlin/commands/rr-scheduler-start.md +27 -0
  250. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +15 -1
  251. package/presets/mavis/android-kotlin/rules/agent-team-intake.md +2 -2
  252. package/presets/mavis/go/adapter-map.json +9 -1
  253. package/presets/mavis/go/agents/build-verifier.md +1 -1
  254. package/presets/mavis/go/agents/code-reviewer.md +1 -1
  255. package/presets/mavis/go/agents/debugger.md +1 -1
  256. package/presets/mavis/go/agents/feature-developer.md +1 -1
  257. package/presets/mavis/go/agents/task-analyst.md +1 -1
  258. package/presets/mavis/go/commands/README.md +4 -0
  259. package/presets/mavis/go/commands/rr-scheduler-start.md +27 -0
  260. package/presets/mavis/go/hooks/chain-team-phases.sh +15 -1
  261. package/presets/mavis/go/rules/agent-team-intake.md +2 -2
  262. package/presets/mavis/ios-swift/adapter-map.json +9 -1
  263. package/presets/mavis/ios-swift/agents/build-verifier.md +1 -1
  264. package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
  265. package/presets/mavis/ios-swift/agents/debugger.md +1 -1
  266. package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
  267. package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
  268. package/presets/mavis/ios-swift/commands/README.md +4 -0
  269. package/presets/mavis/ios-swift/commands/rr-scheduler-start.md +27 -0
  270. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +15 -1
  271. package/presets/mavis/ios-swift/rules/agent-team-intake.md +2 -2
  272. package/presets/mavis/java/adapter-map.json +9 -1
  273. package/presets/mavis/java/agents/build-verifier.md +1 -1
  274. package/presets/mavis/java/agents/code-reviewer.md +1 -1
  275. package/presets/mavis/java/agents/debugger.md +1 -1
  276. package/presets/mavis/java/agents/feature-developer.md +1 -1
  277. package/presets/mavis/java/agents/task-analyst.md +1 -1
  278. package/presets/mavis/java/commands/README.md +4 -0
  279. package/presets/mavis/java/commands/rr-scheduler-start.md +27 -0
  280. package/presets/mavis/java/hooks/chain-team-phases.sh +15 -1
  281. package/presets/mavis/java/rules/agent-team-intake.md +2 -2
  282. package/presets/mavis/mcp-ts/adapter-map.json +9 -1
  283. package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
  284. package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
  285. package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
  286. package/presets/mavis/mcp-ts/commands/README.md +4 -0
  287. package/presets/mavis/mcp-ts/commands/rr-scheduler-start.md +27 -0
  288. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +15 -1
  289. package/presets/mavis/mcp-ts/rules/agent-team-intake.md +2 -2
  290. package/presets/mavis/mol/adapter-map.json +9 -1
  291. package/presets/mavis/mol/agents/build-verifier.md +1 -1
  292. package/presets/mavis/mol/agents/code-reviewer.md +1 -1
  293. package/presets/mavis/mol/agents/debugger.md +1 -1
  294. package/presets/mavis/mol/agents/feature-developer.md +1 -1
  295. package/presets/mavis/mol/agents/task-analyst.md +1 -1
  296. package/presets/mavis/mol/commands/README.md +4 -0
  297. package/presets/mavis/mol/commands/rr-scheduler-start.md +27 -0
  298. package/presets/mavis/mol/hooks/chain-team-phases.sh +15 -1
  299. package/presets/mavis/mol/rules/agent-team-intake.md +2 -2
  300. package/presets/mavis/next/MAVIS.md +2 -1
  301. package/presets/mavis/next/REPO_AGENTS.md +16 -0
  302. package/presets/mavis/next/adapter-map.json +9 -1
  303. package/presets/mavis/next/agents/accessibility-reviewer.md +4 -1
  304. package/presets/mavis/next/agents/api-contract-reviewer.md +5 -2
  305. package/presets/mavis/next/agents/build-verifier.md +6 -3
  306. package/presets/mavis/next/agents/ci-investigator.md +1 -1
  307. package/presets/mavis/next/agents/code-reviewer.md +7 -4
  308. package/presets/mavis/next/agents/codebase-analyzer.md +4 -1
  309. package/presets/mavis/next/agents/debugger.md +2 -2
  310. package/presets/mavis/next/agents/feature-developer.md +2 -2
  311. package/presets/mavis/next/agents/migration-specialist.md +4 -1
  312. package/presets/mavis/next/agents/mockup-reviewer.md +4 -1
  313. package/presets/mavis/next/agents/openspec-author.md +4 -1
  314. package/presets/mavis/next/agents/performance-auditor.md +4 -1
  315. package/presets/mavis/next/agents/playwright-test-generator.md +5 -2
  316. package/presets/mavis/next/agents/playwright-test-healer.md +5 -2
  317. package/presets/mavis/next/agents/playwright-test-planner.md +5 -2
  318. package/presets/mavis/next/agents/qa-tester.md +5 -2
  319. package/presets/mavis/next/agents/security-reviewer.md +4 -1
  320. package/presets/mavis/next/agents/solution-architect.md +4 -1
  321. package/presets/mavis/next/agents/task-analyst.md +5 -2
  322. package/presets/mavis/next/agents/task-router.md +4 -1
  323. package/presets/mavis/next/agents/tech-writer.md +4 -1
  324. package/presets/mavis/next/agents/unit-test-generator.md +5 -2
  325. package/presets/mavis/next/agents/unit-test-healer.md +5 -2
  326. package/presets/mavis/next/agents/unit-test-planner.md +5 -2
  327. package/presets/mavis/next/ai-local/conventions.md +6 -1
  328. package/presets/mavis/next/commands/README.md +4 -0
  329. package/presets/mavis/next/commands/rr-scheduler-start.md +27 -0
  330. package/presets/mavis/next/hooks/chain-team-phases.sh +15 -1
  331. package/presets/mavis/next/rules/agent-team-intake.md +2 -2
  332. package/presets/mavis/nuxt/adapter-map.json +9 -1
  333. package/presets/mavis/nuxt/agents/build-verifier.md +1 -1
  334. package/presets/mavis/nuxt/agents/code-reviewer.md +1 -1
  335. package/presets/mavis/nuxt/agents/debugger.md +1 -1
  336. package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
  337. package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
  338. package/presets/mavis/nuxt/commands/README.md +4 -0
  339. package/presets/mavis/nuxt/commands/rr-scheduler-start.md +27 -0
  340. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +15 -1
  341. package/presets/mavis/nuxt/rules/agent-team-intake.md +2 -2
  342. package/presets/mavis/php-hexagonal/adapter-map.json +9 -1
  343. package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
  344. package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
  345. package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
  346. package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
  347. package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
  348. package/presets/mavis/php-hexagonal/commands/README.md +4 -0
  349. package/presets/mavis/php-hexagonal/commands/rr-scheduler-start.md +27 -0
  350. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +15 -1
  351. package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +2 -2
  352. package/presets/mavis/php-laravel/adapter-map.json +9 -1
  353. package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
  354. package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
  355. package/presets/mavis/php-laravel/agents/debugger.md +1 -1
  356. package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
  357. package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
  358. package/presets/mavis/php-laravel/commands/README.md +4 -0
  359. package/presets/mavis/php-laravel/commands/rr-scheduler-start.md +27 -0
  360. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +15 -1
  361. package/presets/mavis/php-laravel/rules/agent-team-intake.md +2 -2
  362. package/presets/mavis/svelte/adapter-map.json +9 -1
  363. package/presets/mavis/svelte/agents/build-verifier.md +1 -1
  364. package/presets/mavis/svelte/agents/code-reviewer.md +1 -1
  365. package/presets/mavis/svelte/agents/debugger.md +1 -1
  366. package/presets/mavis/svelte/agents/feature-developer.md +1 -1
  367. package/presets/mavis/svelte/agents/task-analyst.md +1 -1
  368. package/presets/mavis/svelte/commands/README.md +4 -0
  369. package/presets/mavis/svelte/commands/rr-scheduler-start.md +27 -0
  370. package/presets/mavis/svelte/hooks/chain-team-phases.sh +15 -1
  371. package/presets/mavis/svelte/rules/agent-team-intake.md +2 -2
  372. package/presets/opencode/android-kotlin/adapter-map.json +9 -1
  373. package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
  374. package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -1
  375. package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
  376. package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
  377. package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
  378. package/presets/opencode/android-kotlin/commands/README.md +4 -0
  379. package/presets/opencode/android-kotlin/commands/rr-scheduler-start.md +35 -0
  380. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +15 -1
  381. package/presets/opencode/android-kotlin/rules/agent-team-intake.md +2 -2
  382. package/presets/opencode/go/adapter-map.json +9 -1
  383. package/presets/opencode/go/agents/build-verifier.md +1 -1
  384. package/presets/opencode/go/agents/code-reviewer.md +1 -1
  385. package/presets/opencode/go/agents/debugger.md +1 -1
  386. package/presets/opencode/go/agents/feature-developer.md +1 -1
  387. package/presets/opencode/go/agents/task-analyst.md +1 -1
  388. package/presets/opencode/go/commands/README.md +4 -0
  389. package/presets/opencode/go/commands/rr-scheduler-start.md +35 -0
  390. package/presets/opencode/go/hooks/chain-team-phases.sh +15 -1
  391. package/presets/opencode/go/rules/agent-team-intake.md +2 -2
  392. package/presets/opencode/ios-swift/adapter-map.json +9 -1
  393. package/presets/opencode/ios-swift/agents/build-verifier.md +1 -1
  394. package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
  395. package/presets/opencode/ios-swift/agents/debugger.md +1 -1
  396. package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
  397. package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
  398. package/presets/opencode/ios-swift/commands/README.md +4 -0
  399. package/presets/opencode/ios-swift/commands/rr-scheduler-start.md +35 -0
  400. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +15 -1
  401. package/presets/opencode/ios-swift/rules/agent-team-intake.md +2 -2
  402. package/presets/opencode/java/adapter-map.json +9 -1
  403. package/presets/opencode/java/agents/build-verifier.md +1 -1
  404. package/presets/opencode/java/agents/code-reviewer.md +1 -1
  405. package/presets/opencode/java/agents/debugger.md +1 -1
  406. package/presets/opencode/java/agents/feature-developer.md +1 -1
  407. package/presets/opencode/java/agents/task-analyst.md +1 -1
  408. package/presets/opencode/java/commands/README.md +4 -0
  409. package/presets/opencode/java/commands/rr-scheduler-start.md +35 -0
  410. package/presets/opencode/java/hooks/chain-team-phases.sh +15 -1
  411. package/presets/opencode/java/rules/agent-team-intake.md +2 -2
  412. package/presets/opencode/mcp-ts/adapter-map.json +9 -1
  413. package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
  414. package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
  415. package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
  416. package/presets/opencode/mcp-ts/commands/README.md +4 -0
  417. package/presets/opencode/mcp-ts/commands/rr-scheduler-start.md +35 -0
  418. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +15 -1
  419. package/presets/opencode/mcp-ts/rules/agent-team-intake.md +2 -2
  420. package/presets/opencode/mol/adapter-map.json +9 -1
  421. package/presets/opencode/mol/agents/build-verifier.md +1 -1
  422. package/presets/opencode/mol/agents/code-reviewer.md +1 -1
  423. package/presets/opencode/mol/agents/debugger.md +1 -1
  424. package/presets/opencode/mol/agents/feature-developer.md +1 -1
  425. package/presets/opencode/mol/agents/task-analyst.md +1 -1
  426. package/presets/opencode/mol/commands/README.md +4 -0
  427. package/presets/opencode/mol/commands/rr-scheduler-start.md +35 -0
  428. package/presets/opencode/mol/hooks/chain-team-phases.sh +15 -1
  429. package/presets/opencode/mol/rules/agent-team-intake.md +2 -2
  430. package/presets/opencode/next/OPENCODE.md +2 -1
  431. package/presets/opencode/next/REPO_AGENTS.md +16 -0
  432. package/presets/opencode/next/adapter-map.json +9 -1
  433. package/presets/opencode/next/agents/accessibility-reviewer.md +4 -1
  434. package/presets/opencode/next/agents/api-contract-reviewer.md +5 -2
  435. package/presets/opencode/next/agents/build-verifier.md +6 -3
  436. package/presets/opencode/next/agents/ci-investigator.md +1 -1
  437. package/presets/opencode/next/agents/code-reviewer.md +7 -4
  438. package/presets/opencode/next/agents/codebase-analyzer.md +4 -1
  439. package/presets/opencode/next/agents/debugger.md +2 -2
  440. package/presets/opencode/next/agents/feature-developer.md +2 -2
  441. package/presets/opencode/next/agents/migration-specialist.md +4 -1
  442. package/presets/opencode/next/agents/mockup-reviewer.md +4 -1
  443. package/presets/opencode/next/agents/openspec-author.md +4 -1
  444. package/presets/opencode/next/agents/performance-auditor.md +4 -1
  445. package/presets/opencode/next/agents/playwright-test-generator.md +5 -2
  446. package/presets/opencode/next/agents/playwright-test-healer.md +5 -2
  447. package/presets/opencode/next/agents/playwright-test-planner.md +5 -2
  448. package/presets/opencode/next/agents/qa-tester.md +5 -2
  449. package/presets/opencode/next/agents/security-reviewer.md +4 -1
  450. package/presets/opencode/next/agents/solution-architect.md +4 -1
  451. package/presets/opencode/next/agents/task-analyst.md +5 -2
  452. package/presets/opencode/next/agents/task-router.md +4 -1
  453. package/presets/opencode/next/agents/tech-writer.md +4 -1
  454. package/presets/opencode/next/agents/unit-test-generator.md +5 -2
  455. package/presets/opencode/next/agents/unit-test-healer.md +5 -2
  456. package/presets/opencode/next/agents/unit-test-planner.md +5 -2
  457. package/presets/opencode/next/ai-local/conventions.md +6 -1
  458. package/presets/opencode/next/commands/README.md +4 -0
  459. package/presets/opencode/next/commands/rr-scheduler-start.md +35 -0
  460. package/presets/opencode/next/hooks/chain-team-phases.sh +15 -1
  461. package/presets/opencode/next/rules/agent-team-intake.md +2 -2
  462. package/presets/opencode/nuxt/adapter-map.json +9 -1
  463. package/presets/opencode/nuxt/agents/build-verifier.md +1 -1
  464. package/presets/opencode/nuxt/agents/code-reviewer.md +1 -1
  465. package/presets/opencode/nuxt/agents/debugger.md +1 -1
  466. package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
  467. package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
  468. package/presets/opencode/nuxt/commands/README.md +4 -0
  469. package/presets/opencode/nuxt/commands/rr-scheduler-start.md +35 -0
  470. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +15 -1
  471. package/presets/opencode/nuxt/rules/agent-team-intake.md +2 -2
  472. package/presets/opencode/php-hexagonal/adapter-map.json +9 -1
  473. package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
  474. package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
  475. package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
  476. package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
  477. package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
  478. package/presets/opencode/php-hexagonal/commands/README.md +4 -0
  479. package/presets/opencode/php-hexagonal/commands/rr-scheduler-start.md +35 -0
  480. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +15 -1
  481. package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +2 -2
  482. package/presets/opencode/php-laravel/adapter-map.json +9 -1
  483. package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
  484. package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
  485. package/presets/opencode/php-laravel/agents/debugger.md +1 -1
  486. package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
  487. package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
  488. package/presets/opencode/php-laravel/commands/README.md +4 -0
  489. package/presets/opencode/php-laravel/commands/rr-scheduler-start.md +35 -0
  490. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +15 -1
  491. package/presets/opencode/php-laravel/rules/agent-team-intake.md +2 -2
  492. package/presets/opencode/plugins/output-guard/README.md +56 -9
  493. package/presets/opencode/plugins/output-guard/actions.ts +201 -0
  494. package/presets/opencode/plugins/output-guard/index.ts +147 -6
  495. package/presets/opencode/plugins/output-guard/rewrite.ts +15 -9
  496. package/presets/opencode/svelte/adapter-map.json +9 -1
  497. package/presets/opencode/svelte/agents/build-verifier.md +1 -1
  498. package/presets/opencode/svelte/agents/code-reviewer.md +1 -1
  499. package/presets/opencode/svelte/agents/debugger.md +1 -1
  500. package/presets/opencode/svelte/agents/feature-developer.md +1 -1
  501. package/presets/opencode/svelte/agents/task-analyst.md +1 -1
  502. package/presets/opencode/svelte/commands/README.md +4 -0
  503. package/presets/opencode/svelte/commands/rr-scheduler-start.md +35 -0
  504. package/presets/opencode/svelte/hooks/chain-team-phases.sh +15 -1
  505. package/presets/opencode/svelte/rules/agent-team-intake.md +2 -2
  506. package/presets/zcode/android-kotlin/adapter-map.json +9 -1
  507. package/presets/zcode/android-kotlin/agents/build-verifier.md +1 -1
  508. package/presets/zcode/android-kotlin/agents/code-reviewer.md +1 -1
  509. package/presets/zcode/android-kotlin/agents/debugger.md +1 -1
  510. package/presets/zcode/android-kotlin/agents/feature-developer.md +1 -1
  511. package/presets/zcode/android-kotlin/agents/task-analyst.md +1 -1
  512. package/presets/zcode/android-kotlin/commands/README.md +4 -0
  513. package/presets/zcode/android-kotlin/commands/rr-scheduler-start.md +35 -0
  514. package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +15 -1
  515. package/presets/zcode/android-kotlin/rules/agent-team-intake.md +2 -2
  516. package/presets/zcode/go/adapter-map.json +9 -1
  517. package/presets/zcode/go/agents/build-verifier.md +1 -1
  518. package/presets/zcode/go/agents/code-reviewer.md +1 -1
  519. package/presets/zcode/go/agents/debugger.md +1 -1
  520. package/presets/zcode/go/agents/feature-developer.md +1 -1
  521. package/presets/zcode/go/agents/task-analyst.md +1 -1
  522. package/presets/zcode/go/commands/README.md +4 -0
  523. package/presets/zcode/go/commands/rr-scheduler-start.md +35 -0
  524. package/presets/zcode/go/hooks/chain-team-phases.sh +15 -1
  525. package/presets/zcode/go/rules/agent-team-intake.md +2 -2
  526. package/presets/zcode/ios-swift/adapter-map.json +9 -1
  527. package/presets/zcode/ios-swift/agents/build-verifier.md +1 -1
  528. package/presets/zcode/ios-swift/agents/code-reviewer.md +1 -1
  529. package/presets/zcode/ios-swift/agents/debugger.md +1 -1
  530. package/presets/zcode/ios-swift/agents/feature-developer.md +1 -1
  531. package/presets/zcode/ios-swift/agents/task-analyst.md +1 -1
  532. package/presets/zcode/ios-swift/commands/README.md +4 -0
  533. package/presets/zcode/ios-swift/commands/rr-scheduler-start.md +35 -0
  534. package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +15 -1
  535. package/presets/zcode/ios-swift/rules/agent-team-intake.md +2 -2
  536. package/presets/zcode/java/adapter-map.json +9 -1
  537. package/presets/zcode/java/agents/build-verifier.md +1 -1
  538. package/presets/zcode/java/agents/code-reviewer.md +1 -1
  539. package/presets/zcode/java/agents/debugger.md +1 -1
  540. package/presets/zcode/java/agents/feature-developer.md +1 -1
  541. package/presets/zcode/java/agents/task-analyst.md +1 -1
  542. package/presets/zcode/java/commands/README.md +4 -0
  543. package/presets/zcode/java/commands/rr-scheduler-start.md +35 -0
  544. package/presets/zcode/java/hooks/chain-team-phases.sh +15 -1
  545. package/presets/zcode/java/rules/agent-team-intake.md +2 -2
  546. package/presets/zcode/mcp-ts/adapter-map.json +9 -1
  547. package/presets/zcode/mcp-ts/agents/build-verifier.md +1 -1
  548. package/presets/zcode/mcp-ts/agents/feature-developer.md +1 -1
  549. package/presets/zcode/mcp-ts/agents/task-analyst.md +1 -1
  550. package/presets/zcode/mcp-ts/commands/README.md +4 -0
  551. package/presets/zcode/mcp-ts/commands/rr-scheduler-start.md +35 -0
  552. package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +15 -1
  553. package/presets/zcode/mcp-ts/rules/agent-team-intake.md +2 -2
  554. package/presets/zcode/mol/adapter-map.json +9 -1
  555. package/presets/zcode/mol/agents/build-verifier.md +1 -1
  556. package/presets/zcode/mol/agents/code-reviewer.md +1 -1
  557. package/presets/zcode/mol/agents/debugger.md +1 -1
  558. package/presets/zcode/mol/agents/feature-developer.md +1 -1
  559. package/presets/zcode/mol/agents/task-analyst.md +1 -1
  560. package/presets/zcode/mol/commands/README.md +4 -0
  561. package/presets/zcode/mol/commands/rr-scheduler-start.md +35 -0
  562. package/presets/zcode/mol/hooks/chain-team-phases.sh +15 -1
  563. package/presets/zcode/mol/rules/agent-team-intake.md +2 -2
  564. package/presets/zcode/next/REPO_AGENTS.md +16 -0
  565. package/presets/zcode/next/adapter-map.json +9 -1
  566. package/presets/zcode/next/agents/accessibility-reviewer.md +4 -1
  567. package/presets/zcode/next/agents/api-contract-reviewer.md +5 -2
  568. package/presets/zcode/next/agents/build-verifier.md +6 -3
  569. package/presets/zcode/next/agents/ci-investigator.md +1 -1
  570. package/presets/zcode/next/agents/code-reviewer.md +7 -4
  571. package/presets/zcode/next/agents/codebase-analyzer.md +4 -1
  572. package/presets/zcode/next/agents/debugger.md +2 -2
  573. package/presets/zcode/next/agents/feature-developer.md +2 -2
  574. package/presets/zcode/next/agents/migration-specialist.md +4 -1
  575. package/presets/zcode/next/agents/mockup-reviewer.md +4 -1
  576. package/presets/zcode/next/agents/openspec-author.md +4 -1
  577. package/presets/zcode/next/agents/performance-auditor.md +4 -1
  578. package/presets/zcode/next/agents/playwright-test-generator.md +5 -2
  579. package/presets/zcode/next/agents/playwright-test-healer.md +5 -2
  580. package/presets/zcode/next/agents/playwright-test-planner.md +5 -2
  581. package/presets/zcode/next/agents/qa-tester.md +5 -2
  582. package/presets/zcode/next/agents/security-reviewer.md +4 -1
  583. package/presets/zcode/next/agents/solution-architect.md +4 -1
  584. package/presets/zcode/next/agents/task-analyst.md +5 -2
  585. package/presets/zcode/next/agents/task-router.md +4 -1
  586. package/presets/zcode/next/agents/tech-writer.md +4 -1
  587. package/presets/zcode/next/agents/unit-test-generator.md +5 -2
  588. package/presets/zcode/next/agents/unit-test-healer.md +5 -2
  589. package/presets/zcode/next/agents/unit-test-planner.md +5 -2
  590. package/presets/zcode/next/ai-local/conventions.md +6 -1
  591. package/presets/zcode/next/commands/README.md +4 -0
  592. package/presets/zcode/next/commands/rr-scheduler-start.md +35 -0
  593. package/presets/zcode/next/hooks/chain-team-phases.sh +15 -1
  594. package/presets/zcode/next/rules/agent-team-intake.md +2 -2
  595. package/presets/zcode/nuxt/adapter-map.json +9 -1
  596. package/presets/zcode/nuxt/agents/build-verifier.md +1 -1
  597. package/presets/zcode/nuxt/agents/code-reviewer.md +1 -1
  598. package/presets/zcode/nuxt/agents/debugger.md +1 -1
  599. package/presets/zcode/nuxt/agents/feature-developer.md +1 -1
  600. package/presets/zcode/nuxt/agents/task-analyst.md +1 -1
  601. package/presets/zcode/nuxt/commands/README.md +4 -0
  602. package/presets/zcode/nuxt/commands/rr-scheduler-start.md +35 -0
  603. package/presets/zcode/nuxt/hooks/chain-team-phases.sh +15 -1
  604. package/presets/zcode/nuxt/rules/agent-team-intake.md +2 -2
  605. package/presets/zcode/php-hexagonal/adapter-map.json +9 -1
  606. package/presets/zcode/php-hexagonal/agents/build-verifier.md +1 -1
  607. package/presets/zcode/php-hexagonal/agents/code-reviewer.md +1 -1
  608. package/presets/zcode/php-hexagonal/agents/debugger.md +1 -1
  609. package/presets/zcode/php-hexagonal/agents/feature-developer.md +1 -1
  610. package/presets/zcode/php-hexagonal/agents/task-analyst.md +1 -1
  611. package/presets/zcode/php-hexagonal/commands/README.md +4 -0
  612. package/presets/zcode/php-hexagonal/commands/rr-scheduler-start.md +35 -0
  613. package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +15 -1
  614. package/presets/zcode/php-hexagonal/rules/agent-team-intake.md +2 -2
  615. package/presets/zcode/php-laravel/adapter-map.json +9 -1
  616. package/presets/zcode/php-laravel/agents/build-verifier.md +1 -1
  617. package/presets/zcode/php-laravel/agents/code-reviewer.md +1 -1
  618. package/presets/zcode/php-laravel/agents/debugger.md +1 -1
  619. package/presets/zcode/php-laravel/agents/feature-developer.md +1 -1
  620. package/presets/zcode/php-laravel/agents/task-analyst.md +1 -1
  621. package/presets/zcode/php-laravel/commands/README.md +4 -0
  622. package/presets/zcode/php-laravel/commands/rr-scheduler-start.md +35 -0
  623. package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +15 -1
  624. package/presets/zcode/php-laravel/rules/agent-team-intake.md +2 -2
  625. package/presets/zcode/svelte/adapter-map.json +9 -1
  626. package/presets/zcode/svelte/agents/build-verifier.md +1 -1
  627. package/presets/zcode/svelte/agents/code-reviewer.md +1 -1
  628. package/presets/zcode/svelte/agents/debugger.md +1 -1
  629. package/presets/zcode/svelte/agents/feature-developer.md +1 -1
  630. package/presets/zcode/svelte/agents/task-analyst.md +1 -1
  631. package/presets/zcode/svelte/commands/README.md +4 -0
  632. package/presets/zcode/svelte/commands/rr-scheduler-start.md +35 -0
  633. package/presets/zcode/svelte/hooks/chain-team-phases.sh +15 -1
  634. package/presets/zcode/svelte/rules/agent-team-intake.md +2 -2
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: rr-scheduler-start
3
+ description: Start the team-db scheduler, or restart it when one is already running.
4
+ ---
5
+
6
+ # Start or restart the scheduler
7
+
8
+ Bring up `team-db.mjs schedule` for this repository. When a scheduler already holds the lease, stop that process and start a new one.
9
+
10
+ ## What to do
11
+
12
+ 1. From the repository root, run:
13
+
14
+ ```bash
15
+ node .ai.local/scripts/rr-scheduler-start.mjs
16
+ ```
17
+
18
+ 2. Quote the stdout verbatim. A start prints `scheduler: started pid <pid>`. A restart prints `scheduler: restarted pid <pid> (stopped <previous>)`, plus the `processes:` lines from the manager.
19
+ 3. On a non-zero exit, quote the `error:` line verbatim and stop. Do not start `team-db.mjs schedule` by hand and do not signal a pid the script did not name.
20
+
21
+ ## What the script does
22
+
23
+ - Stops a scheduler this repository recorded, via `processes.mjs stop --name scheduler`.
24
+ - Signals a scheduler that was started outside the manager only when `scheduler.lock` names a live pid whose command line is `team-db.mjs schedule`. `SIGTERM`, then `SIGKILL` if it is still alive after 8 seconds. An in-flight child can outlive that kill.
25
+ - Removes `scheduler.lock` when its pid is already dead, so a crash does not block the next start for 90 seconds.
26
+ - Starts the timer through `processes.mjs start --name scheduler` with `exec node .ai.local/scripts/team-db.mjs schedule`, then waits until the new lease is fresh.
27
+
28
+ ## Do not
29
+
30
+ - Write `status.json`, `metrics.json`, or any task or lifecycle file.
31
+ - Run `pkill`, `killall`, or `kill` against a pid the script did not print.
32
+ - Start a second `team-db.mjs schedule` after a non-zero exit.
@@ -76,12 +76,26 @@ function readSessionLease(id) {
76
76
  return null;
77
77
  }
78
78
  }
79
+ // The lease carries the window the projector attributes rows with — never one
80
+ // instant. `firstSeenAt` survives every later write of the same (session, slug)
81
+ // pair; a different slug starts a new window, and a lease older than the TTL
82
+ // starts over instead of claiming an ancient first sighting.
83
+ function firstSeenAtOf(file, value, now) {
84
+ try {
85
+ if (Date.now() - fs.statSync(file).mtimeMs > LEASE_TTL_MS) return now;
86
+ const previous = JSON.parse(fs.readFileSync(file, 'utf8'));
87
+ if (previous && previous.slug === value && typeof previous.firstSeenAt === 'string') return previous.firstSeenAt;
88
+ } catch {}
89
+ return now;
90
+ }
79
91
  function writeSessionLease(id, value) {
80
92
  try {
81
93
  fs.mkdirSync(LEASE_ROOT, { recursive: true });
82
94
  const file = sessionLeasePath(id);
83
95
  const temporary = `${file}.${process.pid}.tmp`;
84
- fs.writeFileSync(temporary, `${JSON.stringify({ slug: value, sessionId: id, updatedAt: new Date().toISOString() })}\n`);
96
+ const now = new Date().toISOString();
97
+ const firstSeenAt = firstSeenAtOf(file, value, now);
98
+ fs.writeFileSync(temporary, `${JSON.stringify({ slug: value, sessionId: id, firstSeenAt, updatedAt: now })}\n`);
85
99
  fs.renameSync(temporary, file);
86
100
  for (const name of fs.readdirSync(LEASE_ROOT)) {
87
101
  if (!name.endsWith('.json')) continue;
@@ -11,9 +11,9 @@ When the user message looks like a **work request** (implement, add, fix, refact
11
11
 
12
12
  1. Prefer **`/task <their request>`** or invoke **task-router** first.
13
13
  2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
14
- 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`.
14
+ 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).
15
15
  4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
16
- 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).
16
+ 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).
17
17
  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**.
18
18
  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.
19
19
 
@@ -60,7 +60,7 @@ Before you run the project gate and write the terminal validation receipt, self-
60
60
 
61
61
  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).
62
62
 
63
- 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.
63
+ 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.
64
64
 
65
65
  ## Output
66
66
 
@@ -66,7 +66,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
66
66
 
67
67
  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).
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. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt.
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. 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.
70
70
 
71
71
  ## Review artifact
72
72
 
@@ -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
 
@@ -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
  ## UX design (behavioral)
109
109
 
@@ -63,7 +63,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
63
63
 
64
64
  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).
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
  ## Clarification cycle
69
69
 
@@ -49,3 +49,7 @@ Slash commands are copied to `.claude/commands/` on `ai-rules init claude --pres
49
49
  - Hooks: `../hooks/chain-team-phases.sh` (no `hooks.json` on Claude)
50
50
 
51
51
  Create and edit commands in this preset folder (Claude Code slash commands).
52
+
53
+ ## Scheduler
54
+
55
+ - **`/rr-scheduler-start`** — start the team-db scheduler, or restart it when one already holds the lease. `init` seeds `.ai.local/scripts/rr-scheduler-start.mjs`.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: rr-scheduler-start
3
+ description: Start the team-db scheduler, or restart it when one is already running.
4
+ ---
5
+
6
+ # Start or restart the scheduler
7
+
8
+ Bring up `team-db.mjs schedule` for this repository. When a scheduler already holds the lease, stop that process and start a new one.
9
+
10
+ ## What to do
11
+
12
+ 1. From the repository root, run:
13
+
14
+ ```bash
15
+ node .ai.local/scripts/rr-scheduler-start.mjs
16
+ ```
17
+
18
+ 2. Quote the stdout verbatim. A start prints `scheduler: started pid <pid>`. A restart prints `scheduler: restarted pid <pid> (stopped <previous>)`, plus the `processes:` lines from the manager.
19
+ 3. On a non-zero exit, quote the `error:` line verbatim and stop. Do not start `team-db.mjs schedule` by hand and do not signal a pid the script did not name.
20
+
21
+ ## What the script does
22
+
23
+ - Stops a scheduler this repository recorded, via `processes.mjs stop --name scheduler`.
24
+ - Signals a scheduler that was started outside the manager only when `scheduler.lock` names a live pid whose command line is `team-db.mjs schedule`. `SIGTERM`, then `SIGKILL` if it is still alive after 8 seconds. An in-flight child can outlive that kill.
25
+ - Removes `scheduler.lock` when its pid is already dead, so a crash does not block the next start for 90 seconds.
26
+ - Starts the timer through `processes.mjs start --name scheduler` with `exec node .ai.local/scripts/team-db.mjs schedule`, then waits until the new lease is fresh.
27
+
28
+ ## Do not
29
+
30
+ - Write `status.json`, `metrics.json`, or any task or lifecycle file.
31
+ - Run `pkill`, `killall`, or `kill` against a pid the script did not print.
32
+ - Start a second `team-db.mjs schedule` after a non-zero exit.
@@ -75,12 +75,26 @@ function readSessionLease(id) {
75
75
  return null;
76
76
  }
77
77
  }
78
+ // The lease carries the window the projector attributes rows with — never one
79
+ // instant. `firstSeenAt` survives every later write of the same (session, slug)
80
+ // pair; a different slug starts a new window, and a lease older than the TTL
81
+ // starts over instead of claiming an ancient first sighting.
82
+ function firstSeenAtOf(file, value, now) {
83
+ try {
84
+ if (Date.now() - fs.statSync(file).mtimeMs > LEASE_TTL_MS) return now;
85
+ const previous = JSON.parse(fs.readFileSync(file, 'utf8'));
86
+ if (previous && previous.slug === value && typeof previous.firstSeenAt === 'string') return previous.firstSeenAt;
87
+ } catch {}
88
+ return now;
89
+ }
78
90
  function writeSessionLease(id, value) {
79
91
  try {
80
92
  fs.mkdirSync(LEASE_ROOT, { recursive: true });
81
93
  const file = sessionLeasePath(id);
82
94
  const temporary = `${file}.${process.pid}.tmp`;
83
- fs.writeFileSync(temporary, `${JSON.stringify({ slug: value, sessionId: id, updatedAt: new Date().toISOString() })}\n`);
95
+ const now = new Date().toISOString();
96
+ const firstSeenAt = firstSeenAtOf(file, value, now);
97
+ fs.writeFileSync(temporary, `${JSON.stringify({ slug: value, sessionId: id, firstSeenAt, updatedAt: now })}\n`);
84
98
  fs.renameSync(temporary, file);
85
99
  for (const name of fs.readdirSync(LEASE_ROOT)) {
86
100
  if (!name.endsWith('.json')) continue;
@@ -11,9 +11,9 @@ When the user message looks like a **work request** (implement, add, fix, refact
11
11
 
12
12
  1. Prefer **`/task <their request>`** or invoke **task-router** first.
13
13
  2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
14
- 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`.
14
+ 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).
15
15
  4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
16
- 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).
16
+ 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).
17
17
  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**.
18
18
  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.
19
19
 
@@ -53,7 +53,7 @@ Before you run the project gate and write the terminal validation receipt, self-
53
53
 
54
54
  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).
55
55
 
56
- 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.
56
+ 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.
57
57
 
58
58
  ## Artifact contract
59
59
 
@@ -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
 
@@ -70,7 +70,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
70
70
 
71
71
  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).
72
72
 
73
- 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.
73
+ 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.
74
74
 
75
75
  ## MCP usage
76
76
 
@@ -95,7 +95,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
95
95
 
96
96
  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).
97
97
 
98
- 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.
98
+ 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.
99
99
 
100
100
  ## Product specs (docs/specs)
101
101
 
@@ -63,7 +63,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
63
63
 
64
64
  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).
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
  ## Deliverables
69
69
 
@@ -11,3 +11,7 @@ Slash-command and on-demand scenario definitions. Copied to `.claude/commands/`
11
11
  | `migrate-tasks.md` | Create or reconcile `.ai.local/team/team.db`; writes only the delta |
12
12
 
13
13
  See also the preset root `README.md`. Artifacts: `.ai.local/team/README.md`.
14
+
15
+ ## Scheduler
16
+
17
+ - **`/rr-scheduler-start`** — start the team-db scheduler, or restart it when one already holds the lease. `init` seeds `.ai.local/scripts/rr-scheduler-start.mjs`.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: rr-scheduler-start
3
+ description: Start the team-db scheduler, or restart it when one is already running.
4
+ ---
5
+
6
+ # Start or restart the scheduler
7
+
8
+ Bring up `team-db.mjs schedule` for this repository. When a scheduler already holds the lease, stop that process and start a new one.
9
+
10
+ ## What to do
11
+
12
+ 1. From the repository root, run:
13
+
14
+ ```bash
15
+ node .ai.local/scripts/rr-scheduler-start.mjs
16
+ ```
17
+
18
+ 2. Quote the stdout verbatim. A start prints `scheduler: started pid <pid>`. A restart prints `scheduler: restarted pid <pid> (stopped <previous>)`, plus the `processes:` lines from the manager.
19
+ 3. On a non-zero exit, quote the `error:` line verbatim and stop. Do not start `team-db.mjs schedule` by hand and do not signal a pid the script did not name.
20
+
21
+ ## What the script does
22
+
23
+ - Stops a scheduler this repository recorded, via `processes.mjs stop --name scheduler`.
24
+ - Signals a scheduler that was started outside the manager only when `scheduler.lock` names a live pid whose command line is `team-db.mjs schedule`. `SIGTERM`, then `SIGKILL` if it is still alive after 8 seconds. An in-flight child can outlive that kill.
25
+ - Removes `scheduler.lock` when its pid is already dead, so a crash does not block the next start for 90 seconds.
26
+ - Starts the timer through `processes.mjs start --name scheduler` with `exec node .ai.local/scripts/team-db.mjs schedule`, then waits until the new lease is fresh.
27
+
28
+ ## Do not
29
+
30
+ - Write `status.json`, `metrics.json`, or any task or lifecycle file.
31
+ - Run `pkill`, `killall`, or `kill` against a pid the script did not print.
32
+ - Start a second `team-db.mjs schedule` after a non-zero exit.
@@ -76,12 +76,26 @@ function readSessionLease(id) {
76
76
  return null;
77
77
  }
78
78
  }
79
+ // The lease carries the window the projector attributes rows with — never one
80
+ // instant. `firstSeenAt` survives every later write of the same (session, slug)
81
+ // pair; a different slug starts a new window, and a lease older than the TTL
82
+ // starts over instead of claiming an ancient first sighting.
83
+ function firstSeenAtOf(file, value, now) {
84
+ try {
85
+ if (Date.now() - fs.statSync(file).mtimeMs > LEASE_TTL_MS) return now;
86
+ const previous = JSON.parse(fs.readFileSync(file, 'utf8'));
87
+ if (previous && previous.slug === value && typeof previous.firstSeenAt === 'string') return previous.firstSeenAt;
88
+ } catch {}
89
+ return now;
90
+ }
79
91
  function writeSessionLease(id, value) {
80
92
  try {
81
93
  fs.mkdirSync(LEASE_ROOT, { recursive: true });
82
94
  const file = sessionLeasePath(id);
83
95
  const temporary = `${file}.${process.pid}.tmp`;
84
- fs.writeFileSync(temporary, `${JSON.stringify({ slug: value, sessionId: id, updatedAt: new Date().toISOString() })}\n`);
96
+ const now = new Date().toISOString();
97
+ const firstSeenAt = firstSeenAtOf(file, value, now);
98
+ fs.writeFileSync(temporary, `${JSON.stringify({ slug: value, sessionId: id, firstSeenAt, updatedAt: now })}\n`);
85
99
  fs.renameSync(temporary, file);
86
100
  for (const name of fs.readdirSync(LEASE_ROOT)) {
87
101
  if (!name.endsWith('.json')) continue;
@@ -11,9 +11,9 @@ When the user message looks like a **work request** (implement, add, fix, refact
11
11
 
12
12
  1. Prefer **`/task <their request>`** or invoke **task-router** first.
13
13
  2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
14
- 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`.
14
+ 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).
15
15
  4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
16
- 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).
16
+ 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).
17
17
  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**.
18
18
  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.
19
19
 
@@ -54,7 +54,7 @@ Before you run the project gate and write the terminal validation receipt, self-
54
54
 
55
55
  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).
56
56
 
57
- 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.
57
+ 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.
58
58
 
59
59
  ## Artifact contract
60
60
 
@@ -88,7 +88,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
88
88
 
89
89
  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).
90
90
 
91
- 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.
91
+ 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.
92
92
 
93
93
 
94
94
  ## Product specs (docs/specs)
@@ -62,7 +62,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
62
62
 
63
63
  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).
64
64
 
65
- 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.
65
+ 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.
66
66
 
67
67
  ## Deliverables
68
68
 
@@ -9,3 +9,7 @@ Slash commands are copied to `.cursor/commands/` (Cursor) or `.claude/commands/`
9
9
  | `/technical-retro` | Retro |
10
10
  | `update.md` | Reinstall each installed tool with the preset recorded at init |
11
11
  | `migrate-tasks.md` | Create or reconcile `.ai.local/team/team.db`; writes only the delta |
12
+
13
+ ## Scheduler
14
+
15
+ - **`/rr-scheduler-start`** — start the team-db scheduler, or restart it when one already holds the lease. `init` seeds `.ai.local/scripts/rr-scheduler-start.mjs`.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: rr-scheduler-start
3
+ description: Start the team-db scheduler, or restart it when one is already running.
4
+ ---
5
+
6
+ # Start or restart the scheduler
7
+
8
+ Bring up `team-db.mjs schedule` for this repository. When a scheduler already holds the lease, stop that process and start a new one.
9
+
10
+ ## What to do
11
+
12
+ 1. From the repository root, run:
13
+
14
+ ```bash
15
+ node .ai.local/scripts/rr-scheduler-start.mjs
16
+ ```
17
+
18
+ 2. Quote the stdout verbatim. A start prints `scheduler: started pid <pid>`. A restart prints `scheduler: restarted pid <pid> (stopped <previous>)`, plus the `processes:` lines from the manager.
19
+ 3. On a non-zero exit, quote the `error:` line verbatim and stop. Do not start `team-db.mjs schedule` by hand and do not signal a pid the script did not name.
20
+
21
+ ## What the script does
22
+
23
+ - Stops a scheduler this repository recorded, via `processes.mjs stop --name scheduler`.
24
+ - Signals a scheduler that was started outside the manager only when `scheduler.lock` names a live pid whose command line is `team-db.mjs schedule`. `SIGTERM`, then `SIGKILL` if it is still alive after 8 seconds. An in-flight child can outlive that kill.
25
+ - Removes `scheduler.lock` when its pid is already dead, so a crash does not block the next start for 90 seconds.
26
+ - Starts the timer through `processes.mjs start --name scheduler` with `exec node .ai.local/scripts/team-db.mjs schedule`, then waits until the new lease is fresh.
27
+
28
+ ## Do not
29
+
30
+ - Write `status.json`, `metrics.json`, or any task or lifecycle file.
31
+ - Run `pkill`, `killall`, or `kill` against a pid the script did not print.
32
+ - Start a second `team-db.mjs schedule` after a non-zero exit.
@@ -78,12 +78,26 @@ function readSessionLease(id) {
78
78
  return null;
79
79
  }
80
80
  }
81
+ // The lease carries the window the projector attributes rows with — never one
82
+ // instant. `firstSeenAt` survives every later write of the same (session, slug)
83
+ // pair; a different slug starts a new window, and a lease older than the TTL
84
+ // starts over instead of claiming an ancient first sighting.
85
+ function firstSeenAtOf(file, value, now) {
86
+ try {
87
+ if (Date.now() - fs.statSync(file).mtimeMs > LEASE_TTL_MS) return now;
88
+ const previous = JSON.parse(fs.readFileSync(file, 'utf8'));
89
+ if (previous && previous.slug === value && typeof previous.firstSeenAt === 'string') return previous.firstSeenAt;
90
+ } catch {}
91
+ return now;
92
+ }
81
93
  function writeSessionLease(id, value) {
82
94
  try {
83
95
  fs.mkdirSync(LEASE_ROOT, { recursive: true });
84
96
  const file = sessionLeasePath(id);
85
97
  const temporary = `${file}.${process.pid}.tmp`;
86
- fs.writeFileSync(temporary, `${JSON.stringify({ slug: value, sessionId: id, updatedAt: new Date().toISOString() })}\n`);
98
+ const now = new Date().toISOString();
99
+ const firstSeenAt = firstSeenAtOf(file, value, now);
100
+ fs.writeFileSync(temporary, `${JSON.stringify({ slug: value, sessionId: id, firstSeenAt, updatedAt: now })}\n`);
87
101
  fs.renameSync(temporary, file);
88
102
  for (const name of fs.readdirSync(LEASE_ROOT)) {
89
103
  if (!name.endsWith('.json')) continue;
@@ -11,9 +11,9 @@ When the user message looks like a **work request** (implement, add, fix, refact
11
11
 
12
12
  1. Prefer **`/task <their request>`** or invoke **task-router** first.
13
13
  2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
14
- 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`.
14
+ 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).
15
15
  4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
16
- 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).
16
+ 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).
17
17
  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**.
18
18
  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.
19
19
 
@@ -62,7 +62,7 @@ Before you run the project gate and write the terminal validation receipt, self-
62
62
 
63
63
  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).
64
64
 
65
- 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.
65
+ 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.
66
66
 
67
67
  ## Local overlay compliance (soft gate)
68
68
 
@@ -54,7 +54,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
54
54
 
55
55
  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).
56
56
 
57
- 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.
57
+ 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.
58
58
 
59
59
  ## UI / Figma parity gate (UI-touching MR)
60
60
 
@@ -83,7 +83,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
83
83
 
84
84
  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).
85
85
 
86
- 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.
86
+ 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.
87
87
 
88
88
 
89
89
  ## MCP usage
@@ -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
  ## Anti-hallucination ($mol)
106
106
 
@@ -70,7 +70,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
70
70
 
71
71
  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).
72
72
 
73
- 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.
73
+ 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.
74
74
 
75
75
  ## Clarification cycle (must)
76
76
 
@@ -54,3 +54,7 @@ On OpenCode, `/task-evil` runs as the `task-evil` primary agent: the `question`
54
54
  - Hooks: `../hooks.json`, `../hooks/chain-team-phases.sh`
55
55
 
56
56
  Create and edit commands via `/commands` in Cursor or directly in this preset folder.
57
+
58
+ ## Scheduler
59
+
60
+ - **`/rr-scheduler-start`** — start the team-db scheduler, or restart it when one already holds the lease. `init` seeds `.ai.local/scripts/rr-scheduler-start.mjs`.