@bonesofspring/ai-rules 0.2.67 → 0.2.69

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 (775) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +5 -5
  3. package/bin/lib/engine-scripts.js +3 -6
  4. package/bin/lib/seed-ai-local-team.js +1 -1
  5. package/docs/PRESET-CONTRIBUTION.md +15 -8
  6. package/docs/TEAM-DB.md +105 -105
  7. package/docs/TOKEN-ECONOMY.md +4 -2
  8. package/docs/openapi/team-db.v1.json +3905 -1466
  9. package/package.json +5 -5
  10. package/presets/_shared/ai-local/scripts/processes.mjs +467 -55
  11. package/presets/_shared/ai-local/scripts/team-db-api.mjs +564 -10
  12. package/presets/_shared/ai-local/scripts/team-db-openapi.mjs +816 -47
  13. package/presets/_shared/ai-local/scripts/team-db-project.mjs +659 -5
  14. package/presets/_shared/ai-local/scripts/team-db-schema.mjs +135 -0
  15. package/presets/_shared/ai-local/scripts/team-db-task-runner.mjs +11 -6
  16. package/presets/_shared/ai-local/scripts/team-db.mjs +16 -54
  17. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +5 -5
  18. package/presets/_shared/core/architecture/feature-delivery-workflow.md +3 -7
  19. package/presets/_shared/core/meta/preset-pr-checklist.md +2 -2
  20. package/presets/_shared/core/quality/code-quality-and-refactoring.md +2 -6
  21. package/presets/_shared/core/quality/verification-before-completion.md +20 -3
  22. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +149 -5
  23. package/presets/claude/android-kotlin/REPO_AGENTS.md +7 -47
  24. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +149 -5
  25. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  26. package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +2 -6
  27. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  28. package/presets/claude/go/REPO_AGENTS.md +7 -47
  29. package/presets/claude/go/hooks/chain-team-phases.sh +149 -5
  30. package/presets/claude/go/rules/architecture/feature-delivery.md +3 -7
  31. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  32. package/presets/claude/go/rules/tooling-and-review/code-quality.md +2 -6
  33. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  34. package/presets/claude/ios-swift/REPO_AGENTS.md +7 -47
  35. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +149 -5
  36. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +3 -7
  37. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  38. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +2 -6
  39. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  40. package/presets/claude/java/REPO_AGENTS.md +7 -47
  41. package/presets/claude/java/hooks/chain-team-phases.sh +149 -5
  42. package/presets/claude/java/rules/architecture/feature-delivery.md +3 -7
  43. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  44. package/presets/claude/java/rules/tooling-and-review/code-quality.md +2 -6
  45. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  46. package/presets/claude/mcp-ts/REPO_AGENTS.md +7 -47
  47. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +149 -5
  48. package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +3 -7
  49. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  50. package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +2 -6
  51. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  52. package/presets/claude/mol/REPO_AGENTS.md +9 -49
  53. package/presets/claude/mol/hooks/chain-team-phases.sh +149 -5
  54. package/presets/claude/mol/rules/architecture/feature-delivery-workflow.md +3 -7
  55. package/presets/claude/mol/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  56. package/presets/claude/mol/rules/tooling-and-review/code-quality.md +2 -6
  57. package/presets/claude/mol/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  58. package/presets/claude/next/REPO_AGENTS.md +10 -50
  59. package/presets/claude/next/agents/accessibility-reviewer.md +0 -1
  60. package/presets/claude/next/agents/api-contract-reviewer.md +0 -1
  61. package/presets/claude/next/agents/build-verifier.md +12 -8
  62. package/presets/claude/next/agents/code-reviewer.md +1 -1
  63. package/presets/claude/next/agents/codebase-analyzer.md +0 -1
  64. package/presets/claude/next/agents/feature-developer.md +6 -6
  65. package/presets/claude/next/agents/migration-specialist.md +0 -1
  66. package/presets/claude/next/agents/mockup-reviewer.md +0 -1
  67. package/presets/claude/next/agents/openspec-author.md +0 -1
  68. package/presets/claude/next/agents/performance-auditor.md +0 -1
  69. package/presets/claude/next/agents/playwright-test-generator.md +0 -1
  70. package/presets/claude/next/agents/playwright-test-healer.md +0 -1
  71. package/presets/claude/next/agents/playwright-test-planner.md +0 -1
  72. package/presets/claude/next/agents/qa-tester.md +3 -3
  73. package/presets/claude/next/agents/security-reviewer.md +0 -1
  74. package/presets/claude/next/agents/solution-architect.md +0 -1
  75. package/presets/claude/next/agents/task-analyst.md +0 -1
  76. package/presets/claude/next/agents/task-router.md +8 -7
  77. package/presets/claude/next/agents/tech-writer.md +0 -1
  78. package/presets/claude/next/agents/unit-test-generator.md +0 -1
  79. package/presets/claude/next/agents/unit-test-healer.md +0 -1
  80. package/presets/claude/next/agents/unit-test-planner.md +0 -1
  81. package/presets/claude/next/commands/README.md +0 -6
  82. package/presets/claude/next/commands/task-continue.md +17 -6
  83. package/presets/claude/next/hooks/chain-team-phases.sh +149 -5
  84. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +5 -9
  85. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  86. package/presets/claude/next/rules/tooling-and-review/code-quality.md +2 -6
  87. package/presets/claude/next/rules/tooling-and-review/post-change-lint.md +12 -16
  88. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  89. package/presets/claude/next/skills/feature-delivery/SKILL.md +1 -1
  90. package/presets/claude/next/skills/playwright-e2e/SKILL.md +1 -1
  91. package/presets/claude/next/skills/unit-testing/SKILL.md +1 -1
  92. package/presets/claude/nuxt/REPO_AGENTS.md +8 -48
  93. package/presets/claude/nuxt/agents/accessibility-reviewer.md +0 -1
  94. package/presets/claude/nuxt/agents/api-contract-reviewer.md +0 -1
  95. package/presets/claude/nuxt/agents/build-verifier.md +5 -3
  96. package/presets/claude/nuxt/agents/ci-investigator.md +1 -1
  97. package/presets/claude/nuxt/agents/code-reviewer.md +0 -1
  98. package/presets/claude/nuxt/agents/codebase-analyzer.md +0 -1
  99. package/presets/claude/nuxt/agents/debugger.md +1 -1
  100. package/presets/claude/nuxt/agents/feature-developer.md +6 -6
  101. package/presets/claude/nuxt/agents/migration-specialist.md +0 -1
  102. package/presets/claude/nuxt/agents/mockup-reviewer.md +0 -1
  103. package/presets/claude/nuxt/agents/openspec-author.md +0 -1
  104. package/presets/claude/nuxt/agents/performance-auditor.md +0 -1
  105. package/presets/claude/nuxt/agents/playwright-test-generator.md +0 -1
  106. package/presets/claude/nuxt/agents/playwright-test-healer.md +0 -1
  107. package/presets/claude/nuxt/agents/playwright-test-planner.md +0 -1
  108. package/presets/claude/nuxt/agents/qa-tester.md +3 -3
  109. package/presets/claude/nuxt/agents/security-reviewer.md +0 -1
  110. package/presets/claude/nuxt/agents/solution-architect.md +0 -1
  111. package/presets/claude/nuxt/agents/task-analyst.md +0 -1
  112. package/presets/claude/nuxt/agents/task-router.md +8 -7
  113. package/presets/claude/nuxt/agents/tech-writer.md +0 -1
  114. package/presets/claude/nuxt/agents/unit-test-generator.md +0 -1
  115. package/presets/claude/nuxt/agents/unit-test-healer.md +0 -1
  116. package/presets/claude/nuxt/agents/unit-test-planner.md +0 -1
  117. package/presets/claude/nuxt/hooks/chain-team-phases.sh +149 -5
  118. package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +3 -7
  119. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  120. package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +2 -6
  121. package/presets/claude/nuxt/rules/tooling-and-review/post-change-lint.md +14 -14
  122. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  123. package/presets/claude/nuxt/skills/feature-delivery/SKILL.md +1 -1
  124. package/presets/claude/nuxt/skills/playwright-e2e/SKILL.md +1 -1
  125. package/presets/claude/nuxt/skills/unit-testing/SKILL.md +1 -1
  126. package/presets/claude/php-hexagonal/REPO_AGENTS.md +7 -47
  127. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +149 -5
  128. package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +3 -7
  129. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  130. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +2 -6
  131. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  132. package/presets/claude/php-laravel/REPO_AGENTS.md +7 -47
  133. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +149 -5
  134. package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +3 -7
  135. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  136. package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +2 -6
  137. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  138. package/presets/claude/svelte/REPO_AGENTS.md +8 -48
  139. package/presets/claude/svelte/agents/accessibility-reviewer.md +0 -1
  140. package/presets/claude/svelte/agents/api-contract-reviewer.md +0 -1
  141. package/presets/claude/svelte/agents/build-verifier.md +5 -3
  142. package/presets/claude/svelte/agents/ci-investigator.md +1 -1
  143. package/presets/claude/svelte/agents/code-reviewer.md +0 -1
  144. package/presets/claude/svelte/agents/codebase-analyzer.md +0 -1
  145. package/presets/claude/svelte/agents/debugger.md +1 -1
  146. package/presets/claude/svelte/agents/feature-developer.md +6 -6
  147. package/presets/claude/svelte/agents/migration-specialist.md +0 -1
  148. package/presets/claude/svelte/agents/mockup-reviewer.md +0 -1
  149. package/presets/claude/svelte/agents/openspec-author.md +0 -1
  150. package/presets/claude/svelte/agents/performance-auditor.md +0 -1
  151. package/presets/claude/svelte/agents/playwright-test-generator.md +0 -1
  152. package/presets/claude/svelte/agents/playwright-test-healer.md +0 -1
  153. package/presets/claude/svelte/agents/playwright-test-planner.md +0 -1
  154. package/presets/claude/svelte/agents/qa-tester.md +3 -3
  155. package/presets/claude/svelte/agents/security-reviewer.md +0 -1
  156. package/presets/claude/svelte/agents/solution-architect.md +0 -1
  157. package/presets/claude/svelte/agents/task-analyst.md +0 -1
  158. package/presets/claude/svelte/agents/task-router.md +8 -7
  159. package/presets/claude/svelte/agents/tech-writer.md +0 -1
  160. package/presets/claude/svelte/agents/unit-test-generator.md +0 -1
  161. package/presets/claude/svelte/agents/unit-test-healer.md +0 -1
  162. package/presets/claude/svelte/agents/unit-test-planner.md +0 -1
  163. package/presets/claude/svelte/hooks/chain-team-phases.sh +149 -5
  164. package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +3 -7
  165. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  166. package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +2 -6
  167. package/presets/claude/svelte/rules/tooling-and-review/post-change-lint.md +14 -14
  168. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  169. package/presets/claude/svelte/skills/feature-delivery/SKILL.md +1 -1
  170. package/presets/claude/svelte/skills/playwright-e2e/SKILL.md +1 -1
  171. package/presets/claude/svelte/skills/unit-testing/SKILL.md +1 -1
  172. package/presets/cursor/android-kotlin/AGENTS.md +0 -10
  173. package/presets/cursor/android-kotlin/REPO_AGENTS.md +7 -47
  174. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +149 -5
  175. package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +2 -6
  176. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +2 -2
  177. package/presets/cursor/go/AGENTS.md +0 -8
  178. package/presets/cursor/go/REPO_AGENTS.md +7 -47
  179. package/presets/cursor/go/hooks/chain-team-phases.sh +149 -5
  180. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +2 -6
  181. package/presets/cursor/go/rules/preset-pr-checklist.mdc +2 -2
  182. package/presets/cursor/ios-swift/AGENTS.md +0 -10
  183. package/presets/cursor/ios-swift/REPO_AGENTS.md +7 -47
  184. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +149 -5
  185. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +2 -6
  186. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -2
  187. package/presets/cursor/java/AGENTS.md +0 -8
  188. package/presets/cursor/java/REPO_AGENTS.md +7 -47
  189. package/presets/cursor/java/hooks/chain-team-phases.sh +149 -5
  190. package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +2 -6
  191. package/presets/cursor/java/rules/preset-pr-checklist.mdc +2 -2
  192. package/presets/cursor/mcp-ts/AGENTS.md +0 -6
  193. package/presets/cursor/mcp-ts/REPO_AGENTS.md +7 -47
  194. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +149 -5
  195. package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +2 -6
  196. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +2 -2
  197. package/presets/cursor/mol/AGENTS.md +0 -11
  198. package/presets/cursor/mol/REPO_AGENTS.md +9 -49
  199. package/presets/cursor/mol/hooks/chain-team-phases.sh +149 -5
  200. package/presets/cursor/mol/rules/code-quality-and-refactoring.mdc +2 -6
  201. package/presets/cursor/mol/rules/preset-pr-checklist.mdc +2 -2
  202. package/presets/cursor/next/AGENTS.md +1 -12
  203. package/presets/cursor/next/REPO_AGENTS.md +10 -50
  204. package/presets/cursor/next/agents/build-verifier.md +11 -7
  205. package/presets/cursor/next/agents/code-reviewer.md +1 -0
  206. package/presets/cursor/next/agents/feature-developer.md +6 -6
  207. package/presets/cursor/next/agents/qa-tester.md +3 -2
  208. package/presets/cursor/next/agents/task-router.md +8 -6
  209. package/presets/cursor/next/commands/README.md +0 -6
  210. package/presets/cursor/next/commands/task-continue.md +17 -6
  211. package/presets/cursor/next/hooks/chain-team-phases.sh +149 -5
  212. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +4 -4
  213. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +2 -6
  214. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +2 -2
  215. package/presets/cursor/next/rules/post-change-lint.mdc +12 -16
  216. package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -2
  217. package/presets/cursor/next/skills/feature-delivery/SKILL.md +1 -1
  218. package/presets/cursor/next/skills/playwright-e2e/SKILL.md +1 -1
  219. package/presets/cursor/next/skills/unit-testing/SKILL.md +1 -1
  220. package/presets/cursor/nuxt/AGENTS.md +1 -12
  221. package/presets/cursor/nuxt/REPO_AGENTS.md +8 -48
  222. package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
  223. package/presets/cursor/nuxt/agents/feature-developer.md +2 -2
  224. package/presets/cursor/nuxt/agents/qa-tester.md +3 -2
  225. package/presets/cursor/nuxt/agents/task-router.md +8 -6
  226. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +149 -5
  227. package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +2 -6
  228. package/presets/cursor/nuxt/rules/post-change-lint.mdc +14 -14
  229. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +2 -2
  230. package/presets/cursor/nuxt/skills/feature-delivery/SKILL.md +1 -1
  231. package/presets/cursor/nuxt/skills/playwright-e2e/SKILL.md +1 -1
  232. package/presets/cursor/nuxt/skills/unit-testing/SKILL.md +1 -1
  233. package/presets/cursor/php-hexagonal/AGENTS.md +0 -8
  234. package/presets/cursor/php-hexagonal/REPO_AGENTS.md +7 -47
  235. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +149 -5
  236. package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +2 -6
  237. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +2 -2
  238. package/presets/cursor/php-laravel/AGENTS.md +0 -8
  239. package/presets/cursor/php-laravel/REPO_AGENTS.md +7 -47
  240. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +149 -5
  241. package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +2 -6
  242. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +2 -2
  243. package/presets/cursor/svelte/AGENTS.md +1 -12
  244. package/presets/cursor/svelte/REPO_AGENTS.md +8 -48
  245. package/presets/cursor/svelte/agents/build-verifier.md +1 -1
  246. package/presets/cursor/svelte/agents/feature-developer.md +2 -2
  247. package/presets/cursor/svelte/agents/qa-tester.md +3 -2
  248. package/presets/cursor/svelte/agents/task-router.md +8 -6
  249. package/presets/cursor/svelte/hooks/chain-team-phases.sh +149 -5
  250. package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +2 -6
  251. package/presets/cursor/svelte/rules/post-change-lint.mdc +14 -14
  252. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +2 -2
  253. package/presets/cursor/svelte/skills/feature-delivery/SKILL.md +1 -1
  254. package/presets/cursor/svelte/skills/playwright-e2e/SKILL.md +1 -1
  255. package/presets/cursor/svelte/skills/unit-testing/SKILL.md +1 -1
  256. package/presets/mavis/android-kotlin/MAVIS.md +0 -2
  257. package/presets/mavis/android-kotlin/REPO_AGENTS.md +7 -47
  258. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  259. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +149 -5
  260. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +5 -5
  261. package/presets/mavis/android-kotlin/rules/code-quality-and-refactoring.md +2 -6
  262. package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +2 -2
  263. package/presets/mavis/go/MAVIS.md +8 -0
  264. package/presets/mavis/go/REPO_AGENTS.md +7 -47
  265. package/presets/mavis/go/adapter-map.json +1 -1
  266. package/presets/mavis/go/hooks/chain-team-phases.sh +149 -5
  267. package/presets/mavis/go/rules/agent-team-orchestrator.md +5 -5
  268. package/presets/mavis/go/rules/code-quality-and-refactoring.md +2 -6
  269. package/presets/mavis/go/rules/feature-delivery-workflow.md +3 -7
  270. package/presets/mavis/go/rules/preset-pr-checklist.md +2 -2
  271. package/presets/mavis/ios-swift/MAVIS.md +0 -2
  272. package/presets/mavis/ios-swift/REPO_AGENTS.md +7 -47
  273. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  274. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +149 -5
  275. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +5 -5
  276. package/presets/mavis/ios-swift/rules/code-quality-and-refactoring.md +2 -6
  277. package/presets/mavis/ios-swift/rules/feature-delivery-workflow.md +3 -7
  278. package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +2 -2
  279. package/presets/mavis/java/MAVIS.md +14 -0
  280. package/presets/mavis/java/REPO_AGENTS.md +7 -47
  281. package/presets/mavis/java/adapter-map.json +1 -1
  282. package/presets/mavis/java/hooks/chain-team-phases.sh +149 -5
  283. package/presets/mavis/java/rules/agent-team-orchestrator.md +5 -5
  284. package/presets/mavis/java/rules/code-quality-and-refactoring.md +2 -6
  285. package/presets/mavis/java/rules/feature-delivery-workflow.md +3 -7
  286. package/presets/mavis/java/rules/preset-pr-checklist.md +2 -2
  287. package/presets/mavis/mcp-ts/MAVIS.md +6 -0
  288. package/presets/mavis/mcp-ts/REPO_AGENTS.md +7 -47
  289. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  290. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +149 -5
  291. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +5 -5
  292. package/presets/mavis/mcp-ts/rules/code-quality-and-refactoring.md +2 -6
  293. package/presets/mavis/mcp-ts/rules/feature-delivery-workflow.md +3 -7
  294. package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +2 -2
  295. package/presets/mavis/mol/MAVIS.md +1 -5
  296. package/presets/mavis/mol/REPO_AGENTS.md +9 -49
  297. package/presets/mavis/mol/adapter-map.json +1 -1
  298. package/presets/mavis/mol/hooks/chain-team-phases.sh +149 -5
  299. package/presets/mavis/mol/rules/agent-team-orchestrator.md +5 -5
  300. package/presets/mavis/mol/rules/code-quality-and-refactoring.md +2 -6
  301. package/presets/mavis/mol/rules/feature-delivery-workflow.md +3 -7
  302. package/presets/mavis/mol/rules/preset-pr-checklist.md +2 -2
  303. package/presets/mavis/next/MAVIS.md +2 -6
  304. package/presets/mavis/next/REPO_AGENTS.md +10 -50
  305. package/presets/mavis/next/adapter-map.json +1 -17
  306. package/presets/mavis/next/agents/accessibility-reviewer.md +0 -1
  307. package/presets/mavis/next/agents/api-contract-reviewer.md +0 -1
  308. package/presets/mavis/next/agents/build-verifier.md +12 -8
  309. package/presets/mavis/next/agents/code-reviewer.md +1 -1
  310. package/presets/mavis/next/agents/codebase-analyzer.md +0 -1
  311. package/presets/mavis/next/agents/feature-developer.md +6 -6
  312. package/presets/mavis/next/agents/migration-specialist.md +0 -1
  313. package/presets/mavis/next/agents/mockup-reviewer.md +0 -1
  314. package/presets/mavis/next/agents/openspec-author.md +0 -1
  315. package/presets/mavis/next/agents/performance-auditor.md +0 -1
  316. package/presets/mavis/next/agents/playwright-test-generator.md +0 -1
  317. package/presets/mavis/next/agents/playwright-test-healer.md +0 -1
  318. package/presets/mavis/next/agents/playwright-test-planner.md +0 -1
  319. package/presets/mavis/next/agents/qa-tester.md +3 -3
  320. package/presets/mavis/next/agents/security-reviewer.md +0 -1
  321. package/presets/mavis/next/agents/solution-architect.md +0 -1
  322. package/presets/mavis/next/agents/task-analyst.md +0 -1
  323. package/presets/mavis/next/agents/task-router.md +8 -7
  324. package/presets/mavis/next/agents/tech-writer.md +0 -1
  325. package/presets/mavis/next/agents/unit-test-generator.md +0 -1
  326. package/presets/mavis/next/agents/unit-test-healer.md +0 -1
  327. package/presets/mavis/next/agents/unit-test-planner.md +0 -1
  328. package/presets/mavis/next/commands/README.md +0 -6
  329. package/presets/mavis/next/commands/task-continue.md +16 -5
  330. package/presets/mavis/next/hooks/chain-team-phases.sh +149 -5
  331. package/presets/mavis/next/rules/agent-team-orchestrator.md +5 -5
  332. package/presets/mavis/next/rules/code-quality-and-refactoring.md +2 -6
  333. package/presets/mavis/next/rules/feature-delivery-workflow.md +5 -9
  334. package/presets/mavis/next/rules/post-change-lint.md +11 -15
  335. package/presets/mavis/next/rules/preset-pr-checklist.md +2 -2
  336. package/presets/mavis/next/skills/feature-delivery/SKILL.md +1 -1
  337. package/presets/mavis/next/skills/playwright-e2e/SKILL.md +1 -1
  338. package/presets/mavis/next/skills/unit-testing/SKILL.md +1 -1
  339. package/presets/mavis/nuxt/MAVIS.md +2 -6
  340. package/presets/mavis/nuxt/REPO_AGENTS.md +8 -48
  341. package/presets/mavis/nuxt/adapter-map.json +1 -1
  342. package/presets/mavis/nuxt/agents/accessibility-reviewer.md +0 -1
  343. package/presets/mavis/nuxt/agents/api-contract-reviewer.md +0 -1
  344. package/presets/mavis/nuxt/agents/build-verifier.md +2 -2
  345. package/presets/mavis/nuxt/agents/ci-investigator.md +1 -1
  346. package/presets/mavis/nuxt/agents/code-reviewer.md +0 -1
  347. package/presets/mavis/nuxt/agents/codebase-analyzer.md +0 -1
  348. package/presets/mavis/nuxt/agents/debugger.md +1 -1
  349. package/presets/mavis/nuxt/agents/feature-developer.md +3 -3
  350. package/presets/mavis/nuxt/agents/migration-specialist.md +0 -1
  351. package/presets/mavis/nuxt/agents/mockup-reviewer.md +0 -1
  352. package/presets/mavis/nuxt/agents/openspec-author.md +0 -1
  353. package/presets/mavis/nuxt/agents/performance-auditor.md +0 -1
  354. package/presets/mavis/nuxt/agents/playwright-test-generator.md +0 -1
  355. package/presets/mavis/nuxt/agents/playwright-test-healer.md +0 -1
  356. package/presets/mavis/nuxt/agents/playwright-test-planner.md +0 -1
  357. package/presets/mavis/nuxt/agents/qa-tester.md +3 -3
  358. package/presets/mavis/nuxt/agents/security-reviewer.md +0 -1
  359. package/presets/mavis/nuxt/agents/solution-architect.md +0 -1
  360. package/presets/mavis/nuxt/agents/task-analyst.md +0 -1
  361. package/presets/mavis/nuxt/agents/task-router.md +8 -7
  362. package/presets/mavis/nuxt/agents/tech-writer.md +0 -1
  363. package/presets/mavis/nuxt/agents/unit-test-generator.md +0 -1
  364. package/presets/mavis/nuxt/agents/unit-test-healer.md +0 -1
  365. package/presets/mavis/nuxt/agents/unit-test-planner.md +0 -1
  366. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +149 -5
  367. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +5 -5
  368. package/presets/mavis/nuxt/rules/code-quality-and-refactoring.md +2 -6
  369. package/presets/mavis/nuxt/rules/feature-delivery-workflow.md +3 -7
  370. package/presets/mavis/nuxt/rules/post-change-lint.md +13 -13
  371. package/presets/mavis/nuxt/rules/preset-pr-checklist.md +2 -2
  372. package/presets/mavis/nuxt/skills/feature-delivery/SKILL.md +1 -1
  373. package/presets/mavis/nuxt/skills/playwright-e2e/SKILL.md +1 -1
  374. package/presets/mavis/nuxt/skills/unit-testing/SKILL.md +1 -1
  375. package/presets/mavis/php-hexagonal/MAVIS.md +16 -0
  376. package/presets/mavis/php-hexagonal/REPO_AGENTS.md +7 -47
  377. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  378. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +149 -5
  379. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +5 -5
  380. package/presets/mavis/php-hexagonal/rules/code-quality-and-refactoring.md +2 -6
  381. package/presets/mavis/php-hexagonal/rules/feature-delivery-workflow.md +3 -7
  382. package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +2 -2
  383. package/presets/mavis/php-laravel/MAVIS.md +16 -0
  384. package/presets/mavis/php-laravel/REPO_AGENTS.md +7 -47
  385. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  386. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +149 -5
  387. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +5 -5
  388. package/presets/mavis/php-laravel/rules/code-quality-and-refactoring.md +2 -6
  389. package/presets/mavis/php-laravel/rules/feature-delivery-workflow.md +3 -7
  390. package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +2 -2
  391. package/presets/mavis/svelte/MAVIS.md +2 -6
  392. package/presets/mavis/svelte/REPO_AGENTS.md +8 -48
  393. package/presets/mavis/svelte/adapter-map.json +1 -1
  394. package/presets/mavis/svelte/agents/accessibility-reviewer.md +0 -1
  395. package/presets/mavis/svelte/agents/api-contract-reviewer.md +0 -1
  396. package/presets/mavis/svelte/agents/build-verifier.md +2 -2
  397. package/presets/mavis/svelte/agents/ci-investigator.md +1 -1
  398. package/presets/mavis/svelte/agents/code-reviewer.md +0 -1
  399. package/presets/mavis/svelte/agents/codebase-analyzer.md +0 -1
  400. package/presets/mavis/svelte/agents/debugger.md +1 -1
  401. package/presets/mavis/svelte/agents/feature-developer.md +3 -3
  402. package/presets/mavis/svelte/agents/migration-specialist.md +0 -1
  403. package/presets/mavis/svelte/agents/mockup-reviewer.md +0 -1
  404. package/presets/mavis/svelte/agents/openspec-author.md +0 -1
  405. package/presets/mavis/svelte/agents/performance-auditor.md +0 -1
  406. package/presets/mavis/svelte/agents/playwright-test-generator.md +0 -1
  407. package/presets/mavis/svelte/agents/playwright-test-healer.md +0 -1
  408. package/presets/mavis/svelte/agents/playwright-test-planner.md +0 -1
  409. package/presets/mavis/svelte/agents/qa-tester.md +3 -3
  410. package/presets/mavis/svelte/agents/security-reviewer.md +0 -1
  411. package/presets/mavis/svelte/agents/solution-architect.md +0 -1
  412. package/presets/mavis/svelte/agents/task-analyst.md +0 -1
  413. package/presets/mavis/svelte/agents/task-router.md +8 -7
  414. package/presets/mavis/svelte/agents/tech-writer.md +0 -1
  415. package/presets/mavis/svelte/agents/unit-test-generator.md +0 -1
  416. package/presets/mavis/svelte/agents/unit-test-healer.md +0 -1
  417. package/presets/mavis/svelte/agents/unit-test-planner.md +0 -1
  418. package/presets/mavis/svelte/hooks/chain-team-phases.sh +149 -5
  419. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +5 -5
  420. package/presets/mavis/svelte/rules/code-quality-and-refactoring.md +2 -6
  421. package/presets/mavis/svelte/rules/feature-delivery-workflow.md +3 -7
  422. package/presets/mavis/svelte/rules/post-change-lint.md +13 -13
  423. package/presets/mavis/svelte/rules/preset-pr-checklist.md +2 -2
  424. package/presets/mavis/svelte/skills/feature-delivery/SKILL.md +1 -1
  425. package/presets/mavis/svelte/skills/playwright-e2e/SKILL.md +1 -1
  426. package/presets/mavis/svelte/skills/unit-testing/SKILL.md +1 -1
  427. package/presets/opencode/android-kotlin/OPENCODE.md +1 -43
  428. package/presets/opencode/android-kotlin/REPO_AGENTS.md +7 -47
  429. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  430. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +149 -5
  431. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +5 -5
  432. package/presets/opencode/android-kotlin/rules/code-quality-and-refactoring.md +2 -6
  433. package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +2 -2
  434. package/presets/opencode/go/OPENCODE.md +7 -39
  435. package/presets/opencode/go/REPO_AGENTS.md +7 -47
  436. package/presets/opencode/go/adapter-map.json +1 -1
  437. package/presets/opencode/go/hooks/chain-team-phases.sh +149 -5
  438. package/presets/opencode/go/rules/agent-team-orchestrator.md +5 -5
  439. package/presets/opencode/go/rules/code-quality-and-refactoring.md +2 -6
  440. package/presets/opencode/go/rules/feature-delivery-workflow.md +3 -7
  441. package/presets/opencode/go/rules/preset-pr-checklist.md +2 -2
  442. package/presets/opencode/ios-swift/OPENCODE.md +1 -43
  443. package/presets/opencode/ios-swift/REPO_AGENTS.md +7 -47
  444. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  445. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +149 -5
  446. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +5 -5
  447. package/presets/opencode/ios-swift/rules/code-quality-and-refactoring.md +2 -6
  448. package/presets/opencode/ios-swift/rules/feature-delivery-workflow.md +3 -7
  449. package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +2 -2
  450. package/presets/opencode/java/OPENCODE.md +12 -38
  451. package/presets/opencode/java/REPO_AGENTS.md +7 -47
  452. package/presets/opencode/java/adapter-map.json +1 -1
  453. package/presets/opencode/java/hooks/chain-team-phases.sh +149 -5
  454. package/presets/opencode/java/rules/agent-team-orchestrator.md +5 -5
  455. package/presets/opencode/java/rules/code-quality-and-refactoring.md +2 -6
  456. package/presets/opencode/java/rules/feature-delivery-workflow.md +3 -7
  457. package/presets/opencode/java/rules/preset-pr-checklist.md +2 -2
  458. package/presets/opencode/mcp-ts/OPENCODE.md +5 -39
  459. package/presets/opencode/mcp-ts/REPO_AGENTS.md +7 -47
  460. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  461. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +149 -5
  462. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +5 -5
  463. package/presets/opencode/mcp-ts/rules/code-quality-and-refactoring.md +2 -6
  464. package/presets/opencode/mcp-ts/rules/feature-delivery-workflow.md +3 -7
  465. package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +2 -2
  466. package/presets/opencode/mol/OPENCODE.md +1 -44
  467. package/presets/opencode/mol/REPO_AGENTS.md +9 -49
  468. package/presets/opencode/mol/adapter-map.json +1 -1
  469. package/presets/opencode/mol/hooks/chain-team-phases.sh +149 -5
  470. package/presets/opencode/mol/rules/agent-team-orchestrator.md +5 -5
  471. package/presets/opencode/mol/rules/code-quality-and-refactoring.md +2 -6
  472. package/presets/opencode/mol/rules/feature-delivery-workflow.md +3 -7
  473. package/presets/opencode/mol/rules/preset-pr-checklist.md +2 -2
  474. package/presets/opencode/next/OPENCODE.md +2 -45
  475. package/presets/opencode/next/REPO_AGENTS.md +10 -50
  476. package/presets/opencode/next/adapter-map.json +1 -17
  477. package/presets/opencode/next/agents/accessibility-reviewer.md +0 -1
  478. package/presets/opencode/next/agents/api-contract-reviewer.md +0 -1
  479. package/presets/opencode/next/agents/build-verifier.md +12 -8
  480. package/presets/opencode/next/agents/code-reviewer.md +1 -1
  481. package/presets/opencode/next/agents/codebase-analyzer.md +0 -1
  482. package/presets/opencode/next/agents/feature-developer.md +6 -6
  483. package/presets/opencode/next/agents/migration-specialist.md +0 -1
  484. package/presets/opencode/next/agents/mockup-reviewer.md +0 -1
  485. package/presets/opencode/next/agents/openspec-author.md +0 -1
  486. package/presets/opencode/next/agents/performance-auditor.md +0 -1
  487. package/presets/opencode/next/agents/playwright-test-generator.md +0 -1
  488. package/presets/opencode/next/agents/playwright-test-healer.md +0 -1
  489. package/presets/opencode/next/agents/playwright-test-planner.md +0 -1
  490. package/presets/opencode/next/agents/qa-tester.md +3 -3
  491. package/presets/opencode/next/agents/security-reviewer.md +0 -1
  492. package/presets/opencode/next/agents/solution-architect.md +0 -1
  493. package/presets/opencode/next/agents/task-analyst.md +0 -1
  494. package/presets/opencode/next/agents/task-router.md +8 -7
  495. package/presets/opencode/next/agents/tech-writer.md +0 -1
  496. package/presets/opencode/next/agents/unit-test-generator.md +0 -1
  497. package/presets/opencode/next/agents/unit-test-healer.md +0 -1
  498. package/presets/opencode/next/agents/unit-test-planner.md +0 -1
  499. package/presets/opencode/next/commands/README.md +0 -6
  500. package/presets/opencode/next/commands/task-continue.md +17 -6
  501. package/presets/opencode/next/hooks/chain-team-phases.sh +149 -5
  502. package/presets/opencode/next/rules/agent-team-orchestrator.md +5 -5
  503. package/presets/opencode/next/rules/code-quality-and-refactoring.md +2 -6
  504. package/presets/opencode/next/rules/feature-delivery-workflow.md +5 -9
  505. package/presets/opencode/next/rules/post-change-lint.md +11 -15
  506. package/presets/opencode/next/rules/preset-pr-checklist.md +2 -2
  507. package/presets/opencode/next/skills/feature-delivery/SKILL.md +1 -1
  508. package/presets/opencode/next/skills/playwright-e2e/SKILL.md +1 -1
  509. package/presets/opencode/next/skills/unit-testing/SKILL.md +1 -1
  510. package/presets/opencode/nuxt/OPENCODE.md +2 -45
  511. package/presets/opencode/nuxt/REPO_AGENTS.md +8 -48
  512. package/presets/opencode/nuxt/adapter-map.json +1 -1
  513. package/presets/opencode/nuxt/agents/accessibility-reviewer.md +0 -1
  514. package/presets/opencode/nuxt/agents/api-contract-reviewer.md +0 -1
  515. package/presets/opencode/nuxt/agents/build-verifier.md +2 -2
  516. package/presets/opencode/nuxt/agents/ci-investigator.md +1 -1
  517. package/presets/opencode/nuxt/agents/code-reviewer.md +0 -1
  518. package/presets/opencode/nuxt/agents/codebase-analyzer.md +0 -1
  519. package/presets/opencode/nuxt/agents/debugger.md +1 -1
  520. package/presets/opencode/nuxt/agents/feature-developer.md +3 -3
  521. package/presets/opencode/nuxt/agents/migration-specialist.md +0 -1
  522. package/presets/opencode/nuxt/agents/mockup-reviewer.md +0 -1
  523. package/presets/opencode/nuxt/agents/openspec-author.md +0 -1
  524. package/presets/opencode/nuxt/agents/performance-auditor.md +0 -1
  525. package/presets/opencode/nuxt/agents/playwright-test-generator.md +0 -1
  526. package/presets/opencode/nuxt/agents/playwright-test-healer.md +0 -1
  527. package/presets/opencode/nuxt/agents/playwright-test-planner.md +0 -1
  528. package/presets/opencode/nuxt/agents/qa-tester.md +3 -3
  529. package/presets/opencode/nuxt/agents/security-reviewer.md +0 -1
  530. package/presets/opencode/nuxt/agents/solution-architect.md +0 -1
  531. package/presets/opencode/nuxt/agents/task-analyst.md +0 -1
  532. package/presets/opencode/nuxt/agents/task-router.md +8 -7
  533. package/presets/opencode/nuxt/agents/tech-writer.md +0 -1
  534. package/presets/opencode/nuxt/agents/unit-test-generator.md +0 -1
  535. package/presets/opencode/nuxt/agents/unit-test-healer.md +0 -1
  536. package/presets/opencode/nuxt/agents/unit-test-planner.md +0 -1
  537. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +149 -5
  538. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +5 -5
  539. package/presets/opencode/nuxt/rules/code-quality-and-refactoring.md +2 -6
  540. package/presets/opencode/nuxt/rules/feature-delivery-workflow.md +3 -7
  541. package/presets/opencode/nuxt/rules/post-change-lint.md +13 -13
  542. package/presets/opencode/nuxt/rules/preset-pr-checklist.md +2 -2
  543. package/presets/opencode/nuxt/skills/feature-delivery/SKILL.md +1 -1
  544. package/presets/opencode/nuxt/skills/playwright-e2e/SKILL.md +1 -1
  545. package/presets/opencode/nuxt/skills/unit-testing/SKILL.md +1 -1
  546. package/presets/opencode/php-hexagonal/OPENCODE.md +14 -38
  547. package/presets/opencode/php-hexagonal/REPO_AGENTS.md +7 -47
  548. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  549. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +149 -5
  550. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +5 -5
  551. package/presets/opencode/php-hexagonal/rules/code-quality-and-refactoring.md +2 -6
  552. package/presets/opencode/php-hexagonal/rules/feature-delivery-workflow.md +3 -7
  553. package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +2 -2
  554. package/presets/opencode/php-laravel/OPENCODE.md +14 -38
  555. package/presets/opencode/php-laravel/REPO_AGENTS.md +7 -47
  556. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  557. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +149 -5
  558. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +5 -5
  559. package/presets/opencode/php-laravel/rules/code-quality-and-refactoring.md +2 -6
  560. package/presets/opencode/php-laravel/rules/feature-delivery-workflow.md +3 -7
  561. package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +2 -2
  562. package/presets/opencode/plugins/output-guard/index.ts +7 -1
  563. package/presets/opencode/plugins/output-guard/ledger.ts +43 -0
  564. package/presets/opencode/plugins/task-status/economy.ts +112 -0
  565. package/presets/opencode/plugins/task-status/task-view.ts +28 -0
  566. package/presets/opencode/plugins/task-status/tui.tsx +14 -2
  567. package/presets/opencode/plugins/task-status/types.ts +3 -1
  568. package/presets/opencode/svelte/OPENCODE.md +2 -45
  569. package/presets/opencode/svelte/REPO_AGENTS.md +8 -48
  570. package/presets/opencode/svelte/adapter-map.json +1 -1
  571. package/presets/opencode/svelte/agents/accessibility-reviewer.md +0 -1
  572. package/presets/opencode/svelte/agents/api-contract-reviewer.md +0 -1
  573. package/presets/opencode/svelte/agents/build-verifier.md +2 -2
  574. package/presets/opencode/svelte/agents/ci-investigator.md +1 -1
  575. package/presets/opencode/svelte/agents/code-reviewer.md +0 -1
  576. package/presets/opencode/svelte/agents/codebase-analyzer.md +0 -1
  577. package/presets/opencode/svelte/agents/debugger.md +1 -1
  578. package/presets/opencode/svelte/agents/feature-developer.md +3 -3
  579. package/presets/opencode/svelte/agents/migration-specialist.md +0 -1
  580. package/presets/opencode/svelte/agents/mockup-reviewer.md +0 -1
  581. package/presets/opencode/svelte/agents/openspec-author.md +0 -1
  582. package/presets/opencode/svelte/agents/performance-auditor.md +0 -1
  583. package/presets/opencode/svelte/agents/playwright-test-generator.md +0 -1
  584. package/presets/opencode/svelte/agents/playwright-test-healer.md +0 -1
  585. package/presets/opencode/svelte/agents/playwright-test-planner.md +0 -1
  586. package/presets/opencode/svelte/agents/qa-tester.md +3 -3
  587. package/presets/opencode/svelte/agents/security-reviewer.md +0 -1
  588. package/presets/opencode/svelte/agents/solution-architect.md +0 -1
  589. package/presets/opencode/svelte/agents/task-analyst.md +0 -1
  590. package/presets/opencode/svelte/agents/task-router.md +8 -7
  591. package/presets/opencode/svelte/agents/tech-writer.md +0 -1
  592. package/presets/opencode/svelte/agents/unit-test-generator.md +0 -1
  593. package/presets/opencode/svelte/agents/unit-test-healer.md +0 -1
  594. package/presets/opencode/svelte/agents/unit-test-planner.md +0 -1
  595. package/presets/opencode/svelte/hooks/chain-team-phases.sh +149 -5
  596. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +5 -5
  597. package/presets/opencode/svelte/rules/code-quality-and-refactoring.md +2 -6
  598. package/presets/opencode/svelte/rules/feature-delivery-workflow.md +3 -7
  599. package/presets/opencode/svelte/rules/post-change-lint.md +13 -13
  600. package/presets/opencode/svelte/rules/preset-pr-checklist.md +2 -2
  601. package/presets/opencode/svelte/skills/feature-delivery/SKILL.md +1 -1
  602. package/presets/opencode/svelte/skills/playwright-e2e/SKILL.md +1 -1
  603. package/presets/opencode/svelte/skills/unit-testing/SKILL.md +1 -1
  604. package/presets/zcode/android-kotlin/REPO_AGENTS.md +7 -47
  605. package/presets/zcode/android-kotlin/adapter-map.json +1 -1
  606. package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +149 -5
  607. package/presets/zcode/android-kotlin/rules/agent-team-orchestrator.md +5 -5
  608. package/presets/zcode/android-kotlin/rules/code-quality-and-refactoring.md +2 -6
  609. package/presets/zcode/android-kotlin/rules/preset-pr-checklist.md +2 -2
  610. package/presets/zcode/go/REPO_AGENTS.md +7 -47
  611. package/presets/zcode/go/adapter-map.json +1 -1
  612. package/presets/zcode/go/hooks/chain-team-phases.sh +149 -5
  613. package/presets/zcode/go/rules/agent-team-orchestrator.md +5 -5
  614. package/presets/zcode/go/rules/code-quality-and-refactoring.md +2 -6
  615. package/presets/zcode/go/rules/feature-delivery-workflow.md +3 -7
  616. package/presets/zcode/go/rules/preset-pr-checklist.md +2 -2
  617. package/presets/zcode/ios-swift/REPO_AGENTS.md +7 -47
  618. package/presets/zcode/ios-swift/adapter-map.json +1 -1
  619. package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +149 -5
  620. package/presets/zcode/ios-swift/rules/agent-team-orchestrator.md +5 -5
  621. package/presets/zcode/ios-swift/rules/code-quality-and-refactoring.md +2 -6
  622. package/presets/zcode/ios-swift/rules/feature-delivery-workflow.md +3 -7
  623. package/presets/zcode/ios-swift/rules/preset-pr-checklist.md +2 -2
  624. package/presets/zcode/java/REPO_AGENTS.md +7 -47
  625. package/presets/zcode/java/adapter-map.json +1 -1
  626. package/presets/zcode/java/hooks/chain-team-phases.sh +149 -5
  627. package/presets/zcode/java/rules/agent-team-orchestrator.md +5 -5
  628. package/presets/zcode/java/rules/code-quality-and-refactoring.md +2 -6
  629. package/presets/zcode/java/rules/feature-delivery-workflow.md +3 -7
  630. package/presets/zcode/java/rules/preset-pr-checklist.md +2 -2
  631. package/presets/zcode/mcp-ts/REPO_AGENTS.md +7 -47
  632. package/presets/zcode/mcp-ts/adapter-map.json +1 -1
  633. package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +149 -5
  634. package/presets/zcode/mcp-ts/rules/agent-team-orchestrator.md +5 -5
  635. package/presets/zcode/mcp-ts/rules/code-quality-and-refactoring.md +2 -6
  636. package/presets/zcode/mcp-ts/rules/feature-delivery-workflow.md +3 -7
  637. package/presets/zcode/mcp-ts/rules/preset-pr-checklist.md +2 -2
  638. package/presets/zcode/mol/REPO_AGENTS.md +9 -49
  639. package/presets/zcode/mol/adapter-map.json +1 -1
  640. package/presets/zcode/mol/hooks/chain-team-phases.sh +149 -5
  641. package/presets/zcode/mol/rules/agent-team-orchestrator.md +5 -5
  642. package/presets/zcode/mol/rules/code-quality-and-refactoring.md +2 -6
  643. package/presets/zcode/mol/rules/feature-delivery-workflow.md +3 -7
  644. package/presets/zcode/mol/rules/preset-pr-checklist.md +2 -2
  645. package/presets/zcode/next/REPO_AGENTS.md +10 -50
  646. package/presets/zcode/next/adapter-map.json +1 -17
  647. package/presets/zcode/next/agents/accessibility-reviewer.md +0 -1
  648. package/presets/zcode/next/agents/api-contract-reviewer.md +0 -1
  649. package/presets/zcode/next/agents/build-verifier.md +12 -8
  650. package/presets/zcode/next/agents/code-reviewer.md +1 -1
  651. package/presets/zcode/next/agents/codebase-analyzer.md +0 -1
  652. package/presets/zcode/next/agents/feature-developer.md +6 -6
  653. package/presets/zcode/next/agents/migration-specialist.md +0 -1
  654. package/presets/zcode/next/agents/mockup-reviewer.md +0 -1
  655. package/presets/zcode/next/agents/openspec-author.md +0 -1
  656. package/presets/zcode/next/agents/performance-auditor.md +0 -1
  657. package/presets/zcode/next/agents/playwright-test-generator.md +0 -1
  658. package/presets/zcode/next/agents/playwright-test-healer.md +0 -1
  659. package/presets/zcode/next/agents/playwright-test-planner.md +0 -1
  660. package/presets/zcode/next/agents/qa-tester.md +3 -3
  661. package/presets/zcode/next/agents/security-reviewer.md +0 -1
  662. package/presets/zcode/next/agents/solution-architect.md +0 -1
  663. package/presets/zcode/next/agents/task-analyst.md +0 -1
  664. package/presets/zcode/next/agents/task-router.md +8 -7
  665. package/presets/zcode/next/agents/tech-writer.md +0 -1
  666. package/presets/zcode/next/agents/unit-test-generator.md +0 -1
  667. package/presets/zcode/next/agents/unit-test-healer.md +0 -1
  668. package/presets/zcode/next/agents/unit-test-planner.md +0 -1
  669. package/presets/zcode/next/commands/README.md +0 -6
  670. package/presets/zcode/next/commands/task-continue.md +17 -6
  671. package/presets/zcode/next/hooks/chain-team-phases.sh +149 -5
  672. package/presets/zcode/next/rules/agent-team-orchestrator.md +5 -5
  673. package/presets/zcode/next/rules/code-quality-and-refactoring.md +2 -6
  674. package/presets/zcode/next/rules/feature-delivery-workflow.md +5 -9
  675. package/presets/zcode/next/rules/post-change-lint.md +11 -15
  676. package/presets/zcode/next/rules/preset-pr-checklist.md +2 -2
  677. package/presets/zcode/next/skills/feature-delivery/SKILL.md +1 -1
  678. package/presets/zcode/next/skills/playwright-e2e/SKILL.md +1 -1
  679. package/presets/zcode/next/skills/unit-testing/SKILL.md +1 -1
  680. package/presets/zcode/nuxt/REPO_AGENTS.md +8 -48
  681. package/presets/zcode/nuxt/adapter-map.json +1 -1
  682. package/presets/zcode/nuxt/agents/accessibility-reviewer.md +0 -1
  683. package/presets/zcode/nuxt/agents/api-contract-reviewer.md +0 -1
  684. package/presets/zcode/nuxt/agents/build-verifier.md +2 -2
  685. package/presets/zcode/nuxt/agents/ci-investigator.md +1 -1
  686. package/presets/zcode/nuxt/agents/code-reviewer.md +0 -1
  687. package/presets/zcode/nuxt/agents/codebase-analyzer.md +0 -1
  688. package/presets/zcode/nuxt/agents/debugger.md +1 -1
  689. package/presets/zcode/nuxt/agents/feature-developer.md +3 -3
  690. package/presets/zcode/nuxt/agents/migration-specialist.md +0 -1
  691. package/presets/zcode/nuxt/agents/mockup-reviewer.md +0 -1
  692. package/presets/zcode/nuxt/agents/openspec-author.md +0 -1
  693. package/presets/zcode/nuxt/agents/performance-auditor.md +0 -1
  694. package/presets/zcode/nuxt/agents/playwright-test-generator.md +0 -1
  695. package/presets/zcode/nuxt/agents/playwright-test-healer.md +0 -1
  696. package/presets/zcode/nuxt/agents/playwright-test-planner.md +0 -1
  697. package/presets/zcode/nuxt/agents/qa-tester.md +3 -3
  698. package/presets/zcode/nuxt/agents/security-reviewer.md +0 -1
  699. package/presets/zcode/nuxt/agents/solution-architect.md +0 -1
  700. package/presets/zcode/nuxt/agents/task-analyst.md +0 -1
  701. package/presets/zcode/nuxt/agents/task-router.md +8 -7
  702. package/presets/zcode/nuxt/agents/tech-writer.md +0 -1
  703. package/presets/zcode/nuxt/agents/unit-test-generator.md +0 -1
  704. package/presets/zcode/nuxt/agents/unit-test-healer.md +0 -1
  705. package/presets/zcode/nuxt/agents/unit-test-planner.md +0 -1
  706. package/presets/zcode/nuxt/hooks/chain-team-phases.sh +149 -5
  707. package/presets/zcode/nuxt/rules/agent-team-orchestrator.md +5 -5
  708. package/presets/zcode/nuxt/rules/code-quality-and-refactoring.md +2 -6
  709. package/presets/zcode/nuxt/rules/feature-delivery-workflow.md +3 -7
  710. package/presets/zcode/nuxt/rules/post-change-lint.md +13 -13
  711. package/presets/zcode/nuxt/rules/preset-pr-checklist.md +2 -2
  712. package/presets/zcode/nuxt/skills/feature-delivery/SKILL.md +1 -1
  713. package/presets/zcode/nuxt/skills/playwright-e2e/SKILL.md +1 -1
  714. package/presets/zcode/nuxt/skills/unit-testing/SKILL.md +1 -1
  715. package/presets/zcode/php-hexagonal/REPO_AGENTS.md +7 -47
  716. package/presets/zcode/php-hexagonal/adapter-map.json +1 -1
  717. package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +149 -5
  718. package/presets/zcode/php-hexagonal/rules/agent-team-orchestrator.md +5 -5
  719. package/presets/zcode/php-hexagonal/rules/code-quality-and-refactoring.md +2 -6
  720. package/presets/zcode/php-hexagonal/rules/feature-delivery-workflow.md +3 -7
  721. package/presets/zcode/php-hexagonal/rules/preset-pr-checklist.md +2 -2
  722. package/presets/zcode/php-laravel/REPO_AGENTS.md +7 -47
  723. package/presets/zcode/php-laravel/adapter-map.json +1 -1
  724. package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +149 -5
  725. package/presets/zcode/php-laravel/rules/agent-team-orchestrator.md +5 -5
  726. package/presets/zcode/php-laravel/rules/code-quality-and-refactoring.md +2 -6
  727. package/presets/zcode/php-laravel/rules/feature-delivery-workflow.md +3 -7
  728. package/presets/zcode/php-laravel/rules/preset-pr-checklist.md +2 -2
  729. package/presets/zcode/svelte/REPO_AGENTS.md +8 -48
  730. package/presets/zcode/svelte/adapter-map.json +1 -1
  731. package/presets/zcode/svelte/agents/accessibility-reviewer.md +0 -1
  732. package/presets/zcode/svelte/agents/api-contract-reviewer.md +0 -1
  733. package/presets/zcode/svelte/agents/build-verifier.md +2 -2
  734. package/presets/zcode/svelte/agents/ci-investigator.md +1 -1
  735. package/presets/zcode/svelte/agents/code-reviewer.md +0 -1
  736. package/presets/zcode/svelte/agents/codebase-analyzer.md +0 -1
  737. package/presets/zcode/svelte/agents/debugger.md +1 -1
  738. package/presets/zcode/svelte/agents/feature-developer.md +3 -3
  739. package/presets/zcode/svelte/agents/migration-specialist.md +0 -1
  740. package/presets/zcode/svelte/agents/mockup-reviewer.md +0 -1
  741. package/presets/zcode/svelte/agents/openspec-author.md +0 -1
  742. package/presets/zcode/svelte/agents/performance-auditor.md +0 -1
  743. package/presets/zcode/svelte/agents/playwright-test-generator.md +0 -1
  744. package/presets/zcode/svelte/agents/playwright-test-healer.md +0 -1
  745. package/presets/zcode/svelte/agents/playwright-test-planner.md +0 -1
  746. package/presets/zcode/svelte/agents/qa-tester.md +3 -3
  747. package/presets/zcode/svelte/agents/security-reviewer.md +0 -1
  748. package/presets/zcode/svelte/agents/solution-architect.md +0 -1
  749. package/presets/zcode/svelte/agents/task-analyst.md +0 -1
  750. package/presets/zcode/svelte/agents/task-router.md +8 -7
  751. package/presets/zcode/svelte/agents/tech-writer.md +0 -1
  752. package/presets/zcode/svelte/agents/unit-test-generator.md +0 -1
  753. package/presets/zcode/svelte/agents/unit-test-healer.md +0 -1
  754. package/presets/zcode/svelte/agents/unit-test-planner.md +0 -1
  755. package/presets/zcode/svelte/hooks/chain-team-phases.sh +149 -5
  756. package/presets/zcode/svelte/rules/agent-team-orchestrator.md +5 -5
  757. package/presets/zcode/svelte/rules/code-quality-and-refactoring.md +2 -6
  758. package/presets/zcode/svelte/rules/feature-delivery-workflow.md +3 -7
  759. package/presets/zcode/svelte/rules/post-change-lint.md +13 -13
  760. package/presets/zcode/svelte/rules/preset-pr-checklist.md +2 -2
  761. package/presets/zcode/svelte/skills/feature-delivery/SKILL.md +1 -1
  762. package/presets/zcode/svelte/skills/playwright-e2e/SKILL.md +1 -1
  763. package/presets/zcode/svelte/skills/unit-testing/SKILL.md +1 -1
  764. package/presets/_shared/ai-local/scripts/team-db-dashboard.mjs +0 -2103
  765. package/presets/_shared/ai-local/scripts/team-db-ui.mjs +0 -750
  766. package/presets/claude/next/commands/ui-start.md +0 -78
  767. package/presets/claude/next/commands/ui-stop.md +0 -71
  768. package/presets/cursor/next/commands/ui-start.md +0 -78
  769. package/presets/cursor/next/commands/ui-stop.md +0 -71
  770. package/presets/mavis/next/commands/ui-start.md +0 -73
  771. package/presets/mavis/next/commands/ui-stop.md +0 -66
  772. package/presets/opencode/next/commands/ui-start.md +0 -81
  773. package/presets/opencode/next/commands/ui-stop.md +0 -74
  774. package/presets/zcode/next/commands/ui-start.md +0 -81
  775. package/presets/zcode/next/commands/ui-stop.md +0 -74
@@ -25,8 +25,12 @@ try {
25
25
  // <<<hook-slot:/PLATFORM_PREAMBLE>>>
26
26
 
27
27
  if (hookInput.status !== 'completed') {
28
- process.stdout.write('{}');
29
- process.exit(0);
28
+ // `resume_blocked` is a lifecycle repair, not a producer receipt: it runs
29
+ // with no `status`, and a `status` it carries is ignored.
30
+ if (hookInput.action !== 'resume_blocked') {
31
+ process.stdout.write('{}');
32
+ process.exit(0);
33
+ }
30
34
  }
31
35
 
32
36
  // Slug resolution, strongest first:
@@ -1956,6 +1960,137 @@ function syncMetricsProfile(pipeline) {
1956
1960
  });
1957
1961
  }
1958
1962
 
1963
+ function resumeBlockedRefuse(reason) {
1964
+ process.stdout.write(JSON.stringify({ ok: false, action: 'resume_blocked', reason }));
1965
+ }
1966
+
1967
+ /**
1968
+ * Arm attempt N+1 for one linear step. The ordinal read and the append share
1969
+ * one metrics critical section, like `completeTaskMetrics`: a second process
1970
+ * serializes on the lock and sees the first attempt instead of minting the
1971
+ * same ordinal.
1972
+ */
1973
+ function armResumedAttempt(step, stepIndex, agent) {
1974
+ let attemptId = null;
1975
+ mutateMetrics((metrics) => {
1976
+ const ledgerRunId = metrics.task && typeof metrics.task.runId === 'string' ? metrics.task.runId : '';
1977
+ const runId = ledgerRunId || status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
1978
+ metrics.task = { ...(metrics.task || {}), runId };
1979
+ status.metricsRunId = runId;
1980
+ const events = Array.isArray(metrics.events) ? metrics.events : (metrics.events = []);
1981
+ const attempt =
1982
+ events.reduce(
1983
+ (highest, event) =>
1984
+ event && event.type === 'attempt_started' && event.stepIndex === stepIndex && event.agent === agent
1985
+ ? Math.max(highest, Number(event.attempt) || 0)
1986
+ : highest,
1987
+ 0,
1988
+ ) + 1;
1989
+ attemptId = `${runId}:step-${stepIndex}:${agent}:attempt-${attempt}`;
1990
+ status.activeAttempts = {
1991
+ ...(status.activeAttempts || {}),
1992
+ [attemptId]: { agent, stepIndex, attempt, startedAt: now, parallelGroupId: null, waveId: null },
1993
+ };
1994
+ events.push({
1995
+ eventId: `${runId}:${Date.now()}:${Math.random().toString(16).slice(2)}`,
1996
+ type: 'attempt_started',
1997
+ at: now,
1998
+ attemptId,
1999
+ stepIndex,
2000
+ stepLabel: step.label || null,
2001
+ agent,
2002
+ role: roleFor(agent),
2003
+ attempt,
2004
+ parallelGroupId: null,
2005
+ waveId: null,
2006
+ source: 'hook',
2007
+ attributionConfidence: 'high',
2008
+ });
2009
+ });
2010
+ return attemptId;
2011
+ }
2012
+
2013
+ // Re-arm the step a producer left `blocked`. It arms the attempt only: a stop
2014
+ // that finds `awaitingHumanGate: true` returns before the stop tail, so an open
2015
+ // gate would swallow the retried receipt. Gate/advance stays receipt-driven.
2016
+ if (hookInput.action === 'resume_blocked') {
2017
+ if (pauseBlocksAdvance()) process.exit(0);
2018
+ const pipeline = readPipeline();
2019
+ if (!pipeline || !Array.isArray(pipeline.steps) || pipeline.steps.length === 0) {
2020
+ resumeBlockedRefuse(
2021
+ `pipeline.json is missing, unparseable, or has no steps for slug "${slug}"; no attempt was armed and status.json is unchanged.`,
2022
+ );
2023
+ process.exit(0);
2024
+ }
2025
+ const stepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
2026
+ const step = pipeline.steps[stepIndex];
2027
+ const blockedSteps = Array.isArray(status.blockedSteps) ? status.blockedSteps : [];
2028
+ if (blockedSteps.length > 0 || pipeline.steps.some((entry) => entry && Array.isArray(entry.dependsOn))) {
2029
+ resumeBlockedRefuse(
2030
+ `graph mode is not supported by resume_blocked for slug "${slug}" (status.blockedSteps or a step.dependsOn): nothing was armed; resume the wave by hand.`,
2031
+ );
2032
+ process.exit(0);
2033
+ }
2034
+ const agents = step ? getStepAgents(step).filter((agent) => typeof agent === 'string' && agent.length > 0) : [];
2035
+ if (agents.length === 0) {
2036
+ resumeBlockedRefuse(
2037
+ `pipeline.json has no executable step at pipelineIndex ${stepIndex} for slug "${slug}"; nothing was armed.`,
2038
+ );
2039
+ process.exit(0);
2040
+ }
2041
+ // A parallel wave is not a single linear step: re-arming it would re-run the
2042
+ // agents that already succeeded. Refuse the shape instead of arming the wave.
2043
+ if (agents.length > 1) {
2044
+ resumeBlockedRefuse(
2045
+ `step ${stepIndex} is a parallel wave for slug "${slug}" (${agents.join(', ')}); resume_blocked arms one linear step, so nothing was armed.`,
2046
+ );
2047
+ process.exit(0);
2048
+ }
2049
+ if (status.state !== 'blocked') {
2050
+ resumeBlockedRefuse(
2051
+ `state "${status.state || 'unknown'}" is not blocked for slug "${slug}"; resume_blocked only re-arms the step a producer left blocked.`,
2052
+ );
2053
+ process.exit(0);
2054
+ }
2055
+ if (status.currentAgent === 'mockup-reviewer') {
2056
+ resumeBlockedRefuse(
2057
+ `the mockup-reviewer BLOCKED_MCP skip-forward owns this state for slug "${slug}": run {"action":"end_human_gate","activateNext":true} instead; resume_blocked armed nothing.`,
2058
+ );
2059
+ process.exit(0);
2060
+ }
2061
+ const activeForStep = Object.values(status.activeAttempts || {}).filter(
2062
+ (entry) => entry && entry.stepIndex === stepIndex,
2063
+ );
2064
+ if (activeForStep.length > 0) {
2065
+ resumeBlockedRefuse(
2066
+ `step ${stepIndex} already has an active attempt for slug "${slug}" (${activeForStep.map((entry) => entry.agent).join(', ')}); resume_blocked changed nothing.`,
2067
+ );
2068
+ process.exit(0);
2069
+ }
2070
+ const attemptId = armResumedAttempt(step, stepIndex, agents[0]);
2071
+ // `currentAgent` names the blocked producer; a pipeline blocked without one
2072
+ // (missing consumer artifacts) falls back to the step's agent.
2073
+ const resumedAgent = status.currentAgent || agents[0];
2074
+ writeStatus({
2075
+ pipelineIndex: stepIndex,
2076
+ currentAgent: resumedAgent,
2077
+ phase: 'executing',
2078
+ state: 'in_progress',
2079
+ awaitingHumanGate: false,
2080
+ });
2081
+ process.stdout.write(
2082
+ JSON.stringify({
2083
+ ok: true,
2084
+ action: 'resume_blocked',
2085
+ pipelineIndex: stepIndex,
2086
+ agents,
2087
+ attemptIds: [attemptId],
2088
+ followup_message: handoffForAgent(resumedAgent, step.scope, step),
2089
+ }),
2090
+ );
2091
+ process.exit(0);
2092
+ }
2093
+
1959
2094
  if (hookInput.action === 'bootstrap') {
1960
2095
  if (pauseBlocksAdvance()) process.exit(0);
1961
2096
  const pipeline = readPipeline();
@@ -2511,7 +2646,16 @@ if (status.state === 'changes_requested') {
2511
2646
  process.stdout.write('{}');
2512
2647
  process.exit(0);
2513
2648
  }
2514
- const retryAfterFixStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
2649
+ const reviewerStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
2650
+ let verifierStepIndex = -1;
2651
+ for (let index = reviewerStepIndex - 1; index >= 0; index -= 1) {
2652
+ if (getStepAgents(steps[index]).includes('build-verifier')) {
2653
+ verifierStepIndex = index;
2654
+ break;
2655
+ }
2656
+ }
2657
+ const retryGate = verifierStepIndex >= 0 ? 'build-verifier' : reviewer;
2658
+ const retryAfterFixStepIndex = verifierStepIndex >= 0 ? verifierStepIndex : reviewerStepIndex;
2515
2659
  const developerIndex = scheduleRetry('feature-developer', reviewer, finishedAttempt);
2516
2660
  if (developerIndex < 0) {
2517
2661
  beginHumanGate();
@@ -2524,10 +2668,10 @@ if (status.state === 'changes_requested') {
2524
2668
  currentAgent: 'feature-developer',
2525
2669
  state: 'in_progress',
2526
2670
  phase: 'executing',
2527
- retryAfterFix: reviewer,
2671
+ retryAfterFix: retryGate,
2528
2672
  retryAfterFixStepIndex,
2529
2673
  });
2530
- out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${reviewer}.`);
2674
+ out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${retryGate}.`);
2531
2675
  process.exit(0);
2532
2676
  }
2533
2677
 
@@ -5,33 +5,14 @@ Cross-tool repo-root guide. Tool-specific maps stay under `.cursor/AGENTS.md`, `
5
5
  ## Cross-tool setup
6
6
 
7
7
  - Treat this file as the **shared** entry for any agent (Cursor, Claude Code, Mavis, OpenCode, ZCode, or other).
8
- - All five platforms ship **the same** root file. `init` overwrites it; content does not depend on which tool ran last.
9
- - Tool maps (agent-team tables, slash commands) live in `.cursor/AGENTS.md` / `.claude/CLAUDE.md` / `.mavis/AGENTS.md` / `.opencode/AGENTS.md` — use them when that tool is installed.
10
- - **Language.** On every user message, before you answer, resolve the dialogue language and answer in the user's **native language** (`.ai.local/conventions.md` `## Language`, else the prompt language, else English), including a question and a message without a slash command. Commands reuse this resolution. Development, reasoning, and artifacts stay **English**. See the `language-policy` rule.
11
- - Install:
12
-
13
- ```bash
14
- npx @bonesofspring/ai-rules init multi --preset android-kotlin
15
- ```
16
-
17
- Refresh tools already installed in this repository, keeping each recorded preset (`/update` runs the same command):
18
-
19
- ```bash
20
- npx @bonesofspring/ai-rules update
21
- ```
22
-
23
- Per-tool: `init cursor|claude|mavis|opencode|zcode --preset android-kotlin`. `init` overwrites this file from the preset (`REPO_AGENTS.md` → `AGENTS.md`). `clean` of one tool leaves this file if another tool install remains. Living gotchas belong in `.ai.local/conventions.md`, not here.
8
+ - Every installed platform ships **the same** root file; `init` overwrites it from the preset (`REPO_AGENTS.md` → `AGENTS.md`). `clean` of one tool leaves it while another install remains.
9
+ - Tool maps — agent team, slash commands, always-on rules — live in `.cursor/AGENTS.md`, `.claude/CLAUDE.md`, `.mavis/AGENTS.md`, `.opencode/AGENTS.md`. ZCode loads this file natively and has no per-tool map. Read the map for the tool you run in; do not read another installed tool's tree.
10
+ - **Language.** On every user message, resolve the dialogue language and answer in the user's **native language**: a `language:` stored for an active task, else `## Language` in the nearest `.ai.local/conventions.md`, else the prompt language, else English. Development, reasoning, and artifacts stay **English** (see `language-policy`).
11
+ - Install / refresh: `npx @bonesofspring/ai-rules init multi --preset android-kotlin` (`/update` runs `init update`); MCP catalog: `init mcp`.
24
12
 
25
13
  ## Presence-based load
26
14
 
27
- Read the map and the essential rules for the tool you are running in. Do not preload the full catalog. Do not read the other installed tool trees — their copies of the same rules belong to that host.
28
-
29
- - Cursor host: `.cursor/AGENTS.md`. Always-on rules are already injected.
30
- - Claude Code host: `.claude/CLAUDE.md`. Session-start rules are already injected.
31
- - Mavis host: read `.mavis/AGENTS.md`, then `.mavis/rules/android-app-core.md`, `.mavis/rules/architecture-boundaries.md`, `.mavis/rules/code-quality-and-refactoring.md`, `.mavis/rules/ai-local-overlay.md`.
32
- - OpenCode host: read `.opencode/AGENTS.md`, then `.opencode/rules/android-app-core.md`, `.opencode/rules/architecture-boundaries.md`, `.opencode/rules/code-quality-and-refactoring.md`, `.opencode/rules/ai-local-overlay.md`.
33
-
34
- Mavis has no native rule discovery without those root paths. OpenCode has no `alwaysApply` engine — those root-entry files are its always-on set.
15
+ Read the map and the essential rules for the tool you are running in; that map lists them. Do not preload the full catalog. Do not read another installed tool's tree — its copies of the same rules belong to that host.
35
16
 
36
17
  ## Pipelines are shared
37
18
 
@@ -68,33 +49,12 @@ Empty output or a failed run stays silent.
68
49
  - Review destructive git before running; respect shell hooks.
69
50
  - Do not weaken TLS / cleartext policy unless the user explicitly asks.
70
51
 
71
- ## Tool entry points
72
-
73
- | Tool | Map |
74
- |------|-----|
75
- | Cursor | `.cursor/AGENTS.md` (optional if Cursor not installed) |
76
- | Claude Code | `.claude/CLAUDE.md` (optional if Claude not installed) |
77
- | Mavis | `.mavis/AGENTS.md` (optional if Mavis not installed) |
78
- | OpenCode | `.opencode/AGENTS.md` (optional if OpenCode not installed) |
79
- | ZCode | this file — loaded natively, no per-tool copy |
80
-
81
- Rules: `.cursor/rules/`, `.claude/rules/`, `.mavis/rules/`, `.opencode/rules/`, or `.zcode/rules/`.
82
- Skills: `.cursor/skills/`, `.claude/skills/`, `.mavis/skills/`, `.opencode/skills/`, or `.zcode/skills/`.
83
-
84
- ## ZCode host
85
-
86
- ZCode loads this file natively and has no per-tool map: this file is the entry. Read the essential rules under `.zcode/rules/` (plain Markdown) when the task scope matches their subject, and use the agents in `.zcode/agents/`, commands in `.zcode/commands/`, and skills in `.zcode/skills/` as the pipeline directs.
87
- On the first reply of a session, run `node .zcode/hooks/check-preset-update.mjs` when it exists; the notice rules above apply.
88
- On every turn, run `node .zcode/hooks/list-ai-local.mjs` with the paths this step will touch, apply the printed `.ai.local/rules/*.md` and `.ai.local/conventions.md`, and acknowledge `Using .ai.local: <rule-name>`. Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package.
89
-
90
52
  ## Living conventions
91
53
 
92
54
  Gotchas, local patterns, and team decisions: **`.ai.local/conventions.md`** (fill after init; `init` does not overwrite it).
93
55
 
94
56
  ## Local overlay (`.ai.local/`) — MANDATORY
95
57
 
96
- A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in monorepos. **All agents MUST read and apply it on every turn.** Rules there override preset rules; in conflicts, the local rule wins. `override: kill <preset-rule-name>` drops the named preset rule from the agent's context entirely.
97
-
98
- Plain markdown rules under `.ai.local/rules/*.md` are read by the agent with higher priority than preset rules. Living gotchas live in `.ai.local/conventions.md`.
58
+ A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in monorepos. **Every agent MUST read and apply it on every turn.** Rules there override preset rules; `override: kill <preset-rule-name>` drops that preset rule from context entirely.
99
59
 
100
- On every turn, run `list-ai-local.mjs` from the host hooks directory (`.cursor`, `.claude`, `.mavis`, `.opencode`, or `.zcode`) with the paths this step will touch, apply the printed `.ai.local/rules/*.md` and `.ai.local/conventions.md`, and acknowledge `Using .ai.local: <rule-name>`. Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule is always-on on Cursor and session-start on Claude (no `paths:`). Mavis and OpenCode have no native `alwaysApply`; this section plus the platform entry's essential-rules list is the reinforcement.
60
+ On every turn, run `list-ai-local.mjs` from the host hooks directory (`.cursor`, `.claude`, `.mavis`, `.opencode`, or `.zcode`) with the paths this step will touch, then apply the printed `.ai.local/rules/*.md` and `.ai.local/conventions.md`. The root overlay applies to every path; a nested one applies only under its directory. Do not read `shadowed` files or `rules-library/**` as rules. Acknowledge `Using .ai.local: <rule-name>` when answering. Authoring guide: `docs/LOCAL-OVERLAY.md`.
@@ -41,8 +41,12 @@ if (hookInput.hook_event_name === 'SubagentStop') {
41
41
  }
42
42
 
43
43
  if (hookInput.status !== 'completed') {
44
- process.stdout.write('{}');
45
- process.exit(0);
44
+ // `resume_blocked` is a lifecycle repair, not a producer receipt: it runs
45
+ // with no `status`, and a `status` it carries is ignored.
46
+ if (hookInput.action !== 'resume_blocked') {
47
+ process.stdout.write('{}');
48
+ process.exit(0);
49
+ }
46
50
  }
47
51
 
48
52
  // Slug resolution, strongest first:
@@ -2115,6 +2119,137 @@ function syncMetricsProfile(pipeline) {
2115
2119
  });
2116
2120
  }
2117
2121
 
2122
+ function resumeBlockedRefuse(reason) {
2123
+ process.stdout.write(JSON.stringify({ ok: false, action: 'resume_blocked', reason }));
2124
+ }
2125
+
2126
+ /**
2127
+ * Arm attempt N+1 for one linear step. The ordinal read and the append share
2128
+ * one metrics critical section, like `completeTaskMetrics`: a second process
2129
+ * serializes on the lock and sees the first attempt instead of minting the
2130
+ * same ordinal.
2131
+ */
2132
+ function armResumedAttempt(step, stepIndex, agent) {
2133
+ let attemptId = null;
2134
+ mutateMetrics((metrics) => {
2135
+ const ledgerRunId = metrics.task && typeof metrics.task.runId === 'string' ? metrics.task.runId : '';
2136
+ const runId = ledgerRunId || status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
2137
+ metrics.task = { ...(metrics.task || {}), runId };
2138
+ status.metricsRunId = runId;
2139
+ const events = Array.isArray(metrics.events) ? metrics.events : (metrics.events = []);
2140
+ const attempt =
2141
+ events.reduce(
2142
+ (highest, event) =>
2143
+ event && event.type === 'attempt_started' && event.stepIndex === stepIndex && event.agent === agent
2144
+ ? Math.max(highest, Number(event.attempt) || 0)
2145
+ : highest,
2146
+ 0,
2147
+ ) + 1;
2148
+ attemptId = `${runId}:step-${stepIndex}:${agent}:attempt-${attempt}`;
2149
+ status.activeAttempts = {
2150
+ ...(status.activeAttempts || {}),
2151
+ [attemptId]: { agent, stepIndex, attempt, startedAt: now, parallelGroupId: null, waveId: null },
2152
+ };
2153
+ events.push({
2154
+ eventId: `${runId}:${Date.now()}:${Math.random().toString(16).slice(2)}`,
2155
+ type: 'attempt_started',
2156
+ at: now,
2157
+ attemptId,
2158
+ stepIndex,
2159
+ stepLabel: step.label || null,
2160
+ agent,
2161
+ role: roleFor(agent),
2162
+ attempt,
2163
+ parallelGroupId: null,
2164
+ waveId: null,
2165
+ source: 'hook',
2166
+ attributionConfidence: 'high',
2167
+ });
2168
+ });
2169
+ return attemptId;
2170
+ }
2171
+
2172
+ // Re-arm the step a producer left `blocked`. It arms the attempt only: a stop
2173
+ // that finds `awaitingHumanGate: true` returns before the stop tail, so an open
2174
+ // gate would swallow the retried receipt. Gate/advance stays receipt-driven.
2175
+ if (hookInput.action === 'resume_blocked') {
2176
+ if (pauseBlocksAdvance()) process.exit(0);
2177
+ const pipeline = readPipeline();
2178
+ if (!pipeline || !Array.isArray(pipeline.steps) || pipeline.steps.length === 0) {
2179
+ resumeBlockedRefuse(
2180
+ `pipeline.json is missing, unparseable, or has no steps for slug "${slug}"; no attempt was armed and status.json is unchanged.`,
2181
+ );
2182
+ process.exit(0);
2183
+ }
2184
+ const stepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
2185
+ const step = pipeline.steps[stepIndex];
2186
+ const blockedSteps = Array.isArray(status.blockedSteps) ? status.blockedSteps : [];
2187
+ if (blockedSteps.length > 0 || pipeline.steps.some((entry) => entry && Array.isArray(entry.dependsOn))) {
2188
+ resumeBlockedRefuse(
2189
+ `graph mode is not supported by resume_blocked for slug "${slug}" (status.blockedSteps or a step.dependsOn): nothing was armed; resume the wave by hand.`,
2190
+ );
2191
+ process.exit(0);
2192
+ }
2193
+ const agents = step ? getStepAgents(step).filter((agent) => typeof agent === 'string' && agent.length > 0) : [];
2194
+ if (agents.length === 0) {
2195
+ resumeBlockedRefuse(
2196
+ `pipeline.json has no executable step at pipelineIndex ${stepIndex} for slug "${slug}"; nothing was armed.`,
2197
+ );
2198
+ process.exit(0);
2199
+ }
2200
+ // A parallel wave is not a single linear step: re-arming it would re-run the
2201
+ // agents that already succeeded. Refuse the shape instead of arming the wave.
2202
+ if (agents.length > 1) {
2203
+ resumeBlockedRefuse(
2204
+ `step ${stepIndex} is a parallel wave for slug "${slug}" (${agents.join(', ')}); resume_blocked arms one linear step, so nothing was armed.`,
2205
+ );
2206
+ process.exit(0);
2207
+ }
2208
+ if (status.state !== 'blocked') {
2209
+ resumeBlockedRefuse(
2210
+ `state "${status.state || 'unknown'}" is not blocked for slug "${slug}"; resume_blocked only re-arms the step a producer left blocked.`,
2211
+ );
2212
+ process.exit(0);
2213
+ }
2214
+ if (status.currentAgent === 'mockup-reviewer') {
2215
+ resumeBlockedRefuse(
2216
+ `the mockup-reviewer BLOCKED_MCP skip-forward owns this state for slug "${slug}": run {"action":"end_human_gate","activateNext":true} instead; resume_blocked armed nothing.`,
2217
+ );
2218
+ process.exit(0);
2219
+ }
2220
+ const activeForStep = Object.values(status.activeAttempts || {}).filter(
2221
+ (entry) => entry && entry.stepIndex === stepIndex,
2222
+ );
2223
+ if (activeForStep.length > 0) {
2224
+ resumeBlockedRefuse(
2225
+ `step ${stepIndex} already has an active attempt for slug "${slug}" (${activeForStep.map((entry) => entry.agent).join(', ')}); resume_blocked changed nothing.`,
2226
+ );
2227
+ process.exit(0);
2228
+ }
2229
+ const attemptId = armResumedAttempt(step, stepIndex, agents[0]);
2230
+ // `currentAgent` names the blocked producer; a pipeline blocked without one
2231
+ // (missing consumer artifacts) falls back to the step's agent.
2232
+ const resumedAgent = status.currentAgent || agents[0];
2233
+ writeStatus({
2234
+ pipelineIndex: stepIndex,
2235
+ currentAgent: resumedAgent,
2236
+ phase: 'executing',
2237
+ state: 'in_progress',
2238
+ awaitingHumanGate: false,
2239
+ });
2240
+ process.stdout.write(
2241
+ JSON.stringify({
2242
+ ok: true,
2243
+ action: 'resume_blocked',
2244
+ pipelineIndex: stepIndex,
2245
+ agents,
2246
+ attemptIds: [attemptId],
2247
+ followup_message: handoffForAgent(resumedAgent, step.scope, step),
2248
+ }),
2249
+ );
2250
+ process.exit(0);
2251
+ }
2252
+
2118
2253
  if (hookInput.action === 'bootstrap') {
2119
2254
  if (pauseBlocksAdvance()) process.exit(0);
2120
2255
  const pipeline = readPipeline();
@@ -2670,7 +2805,16 @@ if (status.state === 'changes_requested') {
2670
2805
  process.stdout.write('{}');
2671
2806
  process.exit(0);
2672
2807
  }
2673
- const retryAfterFixStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
2808
+ const reviewerStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
2809
+ let verifierStepIndex = -1;
2810
+ for (let index = reviewerStepIndex - 1; index >= 0; index -= 1) {
2811
+ if (getStepAgents(steps[index]).includes('build-verifier')) {
2812
+ verifierStepIndex = index;
2813
+ break;
2814
+ }
2815
+ }
2816
+ const retryGate = verifierStepIndex >= 0 ? 'build-verifier' : reviewer;
2817
+ const retryAfterFixStepIndex = verifierStepIndex >= 0 ? verifierStepIndex : reviewerStepIndex;
2674
2818
  const developerIndex = scheduleRetry('feature-developer', reviewer, finishedAttempt);
2675
2819
  if (developerIndex < 0) {
2676
2820
  beginHumanGate();
@@ -2683,10 +2827,10 @@ if (status.state === 'changes_requested') {
2683
2827
  currentAgent: 'feature-developer',
2684
2828
  state: 'in_progress',
2685
2829
  phase: 'executing',
2686
- retryAfterFix: reviewer,
2830
+ retryAfterFix: retryGate,
2687
2831
  retryAfterFixStepIndex,
2688
2832
  });
2689
- out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${reviewer}.`);
2833
+ out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${retryGate}.`);
2690
2834
  process.exit(0);
2691
2835
  }
2692
2836
 
@@ -206,8 +206,8 @@ Additional states: `blocked` — a step (or a parallel producer) cannot proceed;
206
206
  | `in_progress` | Current step running |
207
207
  | `completed` | Current step done; hook advances |
208
208
  | `awaiting_approval` | Human gate; wait for `/task-continue` |
209
- | `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
210
- | `validation_failed` | build-verifier failed; re-run developer then build-verifier |
209
+ | `changes_requested` | Reviewer blocked; re-run developer → `build-verifier` (delta) → same reviewer when the fix touches code/tests; docs/artifacts only → same reviewer |
210
+ | `validation_failed` | build-verifier failed; re-run developer then `build-verifier` (delta) |
211
211
  | `blocked` | Pipeline / step cannot proceed (e.g. `pipeline_parse_error`, completion of a parallel step whose producer's receipt was missing — see `agent-artifact-contracts.md` § Completion receipts) |
212
212
  | `awaiting_artifact_receipt` | Producer stopped but the bound or assigned-output receipt was missing or stale; hook keeps the attempt active and does not advance. See `agent-artifact-contracts.md` (Schema field name + Receipt binding) for the silent-bug class that lands here. |
213
213
  | `paused` | Operator sentinel engaged; the hook recorded the pause and refused to advance or hand off. Remove the sentinel and run `/task-continue`. |
@@ -247,8 +247,8 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
247
247
  3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
248
248
  4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
249
249
  5. Persist handoffs to disk (`brief.md`, `decomposition.md`, `debug-report.md`, `validation-report.md`, `architecture.md`, `migration-plan.md`, `ci-report.md`, `a11y-review.md`, `perf-report.md`, `security-review.md`, `api-contract-review.md`, `unit-test-plan.md`, `documentation.md`, `review.md`, `mockup-review.md`, `ux-design.md`) and update the producer-owned terminal receipt in `artifact-manifest.json`.
250
- 6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer. Exception: embedded `mockup-reviewer` FAIL (`changes_requested` while the completed/current agent is `mockup-reviewer`) → `awaiting_approval` / `/task-continue` only — do **not** `retryAfterFix` to developer. A `mockup-reviewer` verdict `mockup-change-requested` (a defect whose fix belongs in the design source, not the implementation) routes the same way — `awaiting_approval`, no developer retry.
251
- 7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
250
+ 6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → `build-verifier` (delta) → same reviewer when the fix touches code/tests; a docs/artifacts-only fix returns to the same reviewer without a code gate. Exception: embedded `mockup-reviewer` FAIL (`changes_requested` while the completed/current agent is `mockup-reviewer`) → `awaiting_approval` / `/task-continue` only — do **not** `retryAfterFix` to developer. A `mockup-reviewer` verdict `mockup-change-requested` (a defect whose fix belongs in the design source, not the implementation) routes the same way — `awaiting_approval`, no developer retry.
251
+ 7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier (delta).
252
252
  8. When all steps complete, suggest `/technical-retro <slug>`.
253
253
  9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
254
254
  10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). It is not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log. A message that explicitly addresses a **closed** slug follows the same ledger with the `post-terminal` marker — append-only, no reopen, one bounded `sync --slug`; see § Team artifact I/O.
@@ -285,7 +285,7 @@ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
285
285
  **Token usage.** When the host exposes token counts, append a `usage_recorded` event next to the attempt:
286
286
 
287
287
  ```bash
288
- node .ai.local/scripts/record-usage.mjs --task <slug> --attempt <attemptId> --input <n> --output <n> [--cached <n>] [--model <id>]
288
+ node .ai.local/scripts/record-usage.mjs --task <slug> --attempt <attemptId> --input <n> --output <n> [--cached <n>] [--cache-write <n>] [--reasoning <n>] [--turn <turnId>] [--model <id>]
289
289
  ```
290
290
 
291
291
  The chain hook also forwards a `usage` object from its input into the `attempt_finished` event. Never estimate or invent token counts; a missing usage record stays missing.
@@ -11,12 +11,8 @@ description: Maintain and improve Android Kotlin code quality and architecture
11
11
 
12
12
  # Principles
13
13
 
14
- - **KISS:** the simplest change in the repository’s patterns.
15
- - **DRY + Rule of Three:** share only after the 3rd repetition (wrong abstraction costs more than duplication).
16
- - **YAGNI:** no APIs, flags, or “for later” layers without a current requirement.
17
- - **SOLID:** S — one reason to change; O — composition/new implementations; L — subtype contract; I — narrow ports; D — abstractions (ports), details in stack adapters.
18
- - **CUPID:** Composable; Unix philosophy (one responsibility); Predictable; Idiomatic (repo); Domain-based.
19
- - **Composition over inheritance;** Law of Demeter — no `a.b.c.d` chains; via public API / facade.
14
+ - **KISS / YAGNI / DRY (Rule of Three):** the simplest change in the repository’s patterns; share after the 3rd repetition; no “for later” APIs, flags, or layers.
15
+ - **SOLID / CUPID, applied:** composition over inheritance; one reason to change; narrow ports; no `a.b.c.d` chains — go through a public API or facade.
20
16
 
21
17
  # Over-abstraction guardrails
22
18
 
@@ -37,7 +37,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
37
37
  - [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
38
38
  - [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn release:gate`; keep every registered golden stem paired
39
39
  - [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn release:gate`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
40
- - [ ] **Gate:** `yarn check:fast` in the loop; `yarn release:gate` from `packages/ai-rules/` before a release (full composite: twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
40
+ - [ ] **Gate:** `yarn check:task <slug>` (or `yarn check:changed` on a clean tree) and the gates it names; `yarn check:fast` only when it names none; `yarn release:gate` from `packages/ai-rules/` before a release (full composite: twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
41
41
 
42
42
  ## Pointers
43
43
 
@@ -47,7 +47,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
47
47
  - Sync: `preset-twin-sync`
48
48
  - Budget: `preset-token-budget`
49
49
  - Leakage: `preset-no-cross-stack-leakage`
50
- - Validation: `yarn check:fast` in the loop (`packages/ai-rules/scripts/check-preset-fast.sh`); `yarn release:gate` before a release (`packages/ai-rules/scripts/release-gate.sh`)
50
+ - Validation: same `check:task` / `check:changed` loop; `yarn release:gate` before a release (`packages/ai-rules/scripts/release-gate.sh`)
51
51
  - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
52
52
  - Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
53
53
  - Orchestrator: when editing presets, load this checklist + twin-sync
@@ -5,33 +5,14 @@ Cross-tool repo-root guide. Tool-specific maps stay under `.cursor/AGENTS.md`, `
5
5
  ## Cross-tool setup
6
6
 
7
7
  - Treat this file as the **shared** entry for any agent (Cursor, Claude Code, Mavis, OpenCode, ZCode, or other).
8
- - All five platforms ship **the same** root file. `init` overwrites it; content does not depend on which tool ran last.
9
- - Tool maps (agent-team tables, slash commands) live in `.cursor/AGENTS.md` / `.claude/CLAUDE.md` / `.mavis/AGENTS.md` / `.opencode/AGENTS.md` — use them when that tool is installed.
10
- - **Language.** On every user message, before you answer, resolve the dialogue language and answer in the user's **native language** (`.ai.local/conventions.md` `## Language`, else the prompt language, else English), including a question and a message without a slash command. Commands reuse this resolution. Development, reasoning, and artifacts stay **English**. See the `language-policy` rule.
11
- - Install:
12
-
13
- ```bash
14
- npx @bonesofspring/ai-rules init multi --preset go
15
- ```
16
-
17
- Refresh tools already installed in this repository, keeping each recorded preset (`/update` runs the same command):
18
-
19
- ```bash
20
- npx @bonesofspring/ai-rules update
21
- ```
22
-
23
- Per-tool: `init cursor|claude|mavis|opencode|zcode --preset go`. `init` overwrites this file from the preset (`REPO_AGENTS.md` → `AGENTS.md`). `clean` of one tool leaves this file if another tool install remains. Living gotchas belong in `.ai.local/conventions.md`, not here.
8
+ - Every installed platform ships **the same** root file; `init` overwrites it from the preset (`REPO_AGENTS.md` → `AGENTS.md`). `clean` of one tool leaves it while another install remains.
9
+ - Tool maps — agent team, slash commands, always-on rules — live in `.cursor/AGENTS.md`, `.claude/CLAUDE.md`, `.mavis/AGENTS.md`, `.opencode/AGENTS.md`. ZCode loads this file natively and has no per-tool map. Read the map for the tool you run in; do not read another installed tool's tree.
10
+ - **Language.** On every user message, resolve the dialogue language and answer in the user's **native language**: a `language:` stored for an active task, else `## Language` in the nearest `.ai.local/conventions.md`, else the prompt language, else English. Development, reasoning, and artifacts stay **English** (see `language-policy`).
11
+ - Install / refresh: `npx @bonesofspring/ai-rules init multi --preset go` (`/update` runs `init update`); MCP catalog: `init mcp`.
24
12
 
25
13
  ## Presence-based load
26
14
 
27
- Read the map and the essential rules for the tool you are running in. Do not preload the full catalog. Do not read the other installed tool trees — their copies of the same rules belong to that host.
28
-
29
- - Cursor host: `.cursor/AGENTS.md`. Always-on rules are already injected.
30
- - Claude Code host: `.claude/CLAUDE.md`. Session-start rules are already injected.
31
- - Mavis host: read `.mavis/AGENTS.md`, then `.mavis/rules/go-app-core.md`, `.mavis/rules/architecture-boundaries.md`, `.mavis/rules/code-quality-and-refactoring.md`, `.mavis/rules/ai-local-overlay.md`.
32
- - OpenCode host: read `.opencode/AGENTS.md`, then `.opencode/rules/go-app-core.md`, `.opencode/rules/architecture-boundaries.md`, `.opencode/rules/code-quality-and-refactoring.md`, `.opencode/rules/ai-local-overlay.md`.
33
-
34
- Mavis has no native rule discovery without those root paths. OpenCode has no `alwaysApply` engine — those root-entry files are its always-on set.
15
+ Read the map and the essential rules for the tool you are running in; that map lists them. Do not preload the full catalog. Do not read another installed tool's tree — its copies of the same rules belong to that host.
35
16
 
36
17
  ## Pipelines are shared
37
18
 
@@ -68,33 +49,12 @@ Empty output or a failed run stays silent.
68
49
  - Review destructive git before running; respect shell hooks.
69
50
  - Do not weaken CI or skip hooks unless the user explicitly asks.
70
51
 
71
- ## Tool entry points
72
-
73
- | Tool | Map |
74
- |------|-----|
75
- | Cursor | `.cursor/AGENTS.md` (optional if Cursor not installed) |
76
- | Claude Code | `.claude/CLAUDE.md` (optional if Claude not installed) |
77
- | Mavis | `.mavis/AGENTS.md` (optional if Mavis not installed) |
78
- | OpenCode | `.opencode/AGENTS.md` (optional if OpenCode not installed) |
79
- | ZCode | this file — loaded natively, no per-tool copy |
80
-
81
- Rules: `.cursor/rules/`, `.claude/rules/`, `.mavis/rules/`, `.opencode/rules/`, or `.zcode/rules/`.
82
- Skills: `.cursor/skills/`, `.claude/skills/`, `.mavis/skills/`, `.opencode/skills/`, or `.zcode/skills/`.
83
-
84
- ## ZCode host
85
-
86
- ZCode loads this file natively and has no per-tool map: this file is the entry. Read the essential rules under `.zcode/rules/` (plain Markdown) when the task scope matches their subject, and use the agents in `.zcode/agents/`, commands in `.zcode/commands/`, and skills in `.zcode/skills/` as the pipeline directs.
87
- On the first reply of a session, run `node .zcode/hooks/check-preset-update.mjs` when it exists; the notice rules above apply.
88
- On every turn, run `node .zcode/hooks/list-ai-local.mjs` with the paths this step will touch, apply the printed `.ai.local/rules/*.md` and `.ai.local/conventions.md`, and acknowledge `Using .ai.local: <rule-name>`. Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package.
89
-
90
52
  ## Living conventions
91
53
 
92
54
  Gotchas, local patterns, and team decisions: **`.ai.local/conventions.md`** (fill after init; `init` does not overwrite it).
93
55
 
94
56
  ## Local overlay (`.ai.local/`) — MANDATORY
95
57
 
96
- A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in monorepos. **All agents MUST read and apply it on every turn.** Rules there override preset rules; in conflicts, the local rule wins. `override: kill <preset-rule-name>` drops the named preset rule from the agent's context entirely.
97
-
98
- Plain markdown rules under `.ai.local/rules/*.md` are read by the agent with higher priority than preset rules. Living gotchas live in `.ai.local/conventions.md`.
58
+ A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in monorepos. **Every agent MUST read and apply it on every turn.** Rules there override preset rules; `override: kill <preset-rule-name>` drops that preset rule from context entirely.
99
59
 
100
- On every turn, run `list-ai-local.mjs` from the host hooks directory (`.cursor`, `.claude`, `.mavis`, `.opencode`, or `.zcode`) with the paths this step will touch, apply the printed `.ai.local/rules/*.md` and `.ai.local/conventions.md`, and acknowledge `Using .ai.local: <rule-name>`. Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule is always-on on Cursor and session-start on Claude (no `paths:`). Mavis and OpenCode have no native `alwaysApply`; this section plus the platform entry's essential-rules list is the reinforcement.
60
+ On every turn, run `list-ai-local.mjs` from the host hooks directory (`.cursor`, `.claude`, `.mavis`, `.opencode`, or `.zcode`) with the paths this step will touch, then apply the printed `.ai.local/rules/*.md` and `.ai.local/conventions.md`. The root overlay applies to every path; a nested one applies only under its directory. Do not read `shadowed` files or `rules-library/**` as rules. Acknowledge `Using .ai.local: <rule-name>` when answering. Authoring guide: `docs/LOCAL-OVERLAY.md`.