@bonesofspring/ai-rules 0.2.66 → 0.2.68

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 (843) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +6 -4
  3. package/bin/cli.js +9 -1
  4. package/bin/lib/engine-scripts.js +3 -10
  5. package/bin/lib/seed-ai-local-team.js +27 -1
  6. package/docs/OPENCODE-COMPATIBILITY.md +1 -0
  7. package/docs/OPENCODE.md +14 -1
  8. package/docs/PRESET-CONTRIBUTION.md +15 -8
  9. package/docs/TEAM-DB.md +107 -106
  10. package/docs/TOKEN-ECONOMY.md +36 -3
  11. package/docs/openapi/team-db.v1.json +3910 -1471
  12. package/package.json +13 -5
  13. package/presets/_shared/ai-local/scripts/dump-output.mjs +63 -12
  14. package/presets/_shared/ai-local/scripts/processes.mjs +467 -55
  15. package/presets/_shared/ai-local/scripts/team-db-api.mjs +564 -10
  16. package/presets/_shared/ai-local/scripts/team-db-openapi.mjs +819 -50
  17. package/presets/_shared/ai-local/scripts/team-db-project.mjs +659 -5
  18. package/presets/_shared/ai-local/scripts/team-db-schema.mjs +135 -0
  19. package/presets/_shared/ai-local/scripts/team-db-task-runner.mjs +11 -6
  20. package/presets/_shared/ai-local/scripts/team-db-tracker.mjs +2 -0
  21. package/presets/_shared/ai-local/scripts/team-db.mjs +16 -54
  22. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +5 -5
  23. package/presets/_shared/core/architecture/feature-delivery-workflow.md +3 -7
  24. package/presets/_shared/core/meta/preset-pr-checklist.md +2 -2
  25. package/presets/_shared/core/quality/code-quality-and-refactoring.md +2 -6
  26. package/presets/_shared/core/quality/verification-before-completion.md +20 -3
  27. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +21 -5
  28. package/presets/_shared/hooks/list-ai-local.mjs +17 -0
  29. package/presets/claude/android-kotlin/REPO_AGENTS.md +7 -47
  30. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +21 -5
  31. package/presets/claude/android-kotlin/hooks/list-ai-local.mjs +17 -0
  32. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  33. package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +2 -6
  34. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  35. package/presets/claude/go/REPO_AGENTS.md +7 -47
  36. package/presets/claude/go/hooks/chain-team-phases.sh +21 -5
  37. package/presets/claude/go/hooks/list-ai-local.mjs +17 -0
  38. package/presets/claude/go/rules/architecture/feature-delivery.md +3 -7
  39. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  40. package/presets/claude/go/rules/tooling-and-review/code-quality.md +2 -6
  41. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  42. package/presets/claude/ios-swift/REPO_AGENTS.md +7 -47
  43. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +21 -5
  44. package/presets/claude/ios-swift/hooks/list-ai-local.mjs +17 -0
  45. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +3 -7
  46. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  47. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +2 -6
  48. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  49. package/presets/claude/java/REPO_AGENTS.md +7 -47
  50. package/presets/claude/java/hooks/chain-team-phases.sh +21 -5
  51. package/presets/claude/java/hooks/list-ai-local.mjs +17 -0
  52. package/presets/claude/java/rules/architecture/feature-delivery.md +3 -7
  53. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  54. package/presets/claude/java/rules/tooling-and-review/code-quality.md +2 -6
  55. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  56. package/presets/claude/mcp-ts/REPO_AGENTS.md +7 -47
  57. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +21 -5
  58. package/presets/claude/mcp-ts/hooks/list-ai-local.mjs +17 -0
  59. package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +3 -7
  60. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  61. package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +2 -6
  62. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  63. package/presets/claude/mol/REPO_AGENTS.md +9 -49
  64. package/presets/claude/mol/hooks/chain-team-phases.sh +21 -5
  65. package/presets/claude/mol/hooks/list-ai-local.mjs +17 -0
  66. package/presets/claude/mol/rules/architecture/feature-delivery-workflow.md +3 -7
  67. package/presets/claude/mol/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  68. package/presets/claude/mol/rules/tooling-and-review/code-quality.md +2 -6
  69. package/presets/claude/mol/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  70. package/presets/claude/next/REPO_AGENTS.md +10 -50
  71. package/presets/claude/next/agents/accessibility-reviewer.md +0 -1
  72. package/presets/claude/next/agents/api-contract-reviewer.md +0 -1
  73. package/presets/claude/next/agents/build-verifier.md +12 -8
  74. package/presets/claude/next/agents/ci-investigator.md +5 -2
  75. package/presets/claude/next/agents/code-reviewer.md +1 -1
  76. package/presets/claude/next/agents/codebase-analyzer.md +0 -1
  77. package/presets/claude/next/agents/debugger.md +5 -2
  78. package/presets/claude/next/agents/feature-developer.md +11 -8
  79. package/presets/claude/next/agents/migration-specialist.md +0 -1
  80. package/presets/claude/next/agents/mockup-reviewer.md +0 -1
  81. package/presets/claude/next/agents/openspec-author.md +0 -1
  82. package/presets/claude/next/agents/performance-auditor.md +0 -1
  83. package/presets/claude/next/agents/playwright-test-generator.md +0 -1
  84. package/presets/claude/next/agents/playwright-test-healer.md +0 -1
  85. package/presets/claude/next/agents/playwright-test-planner.md +0 -1
  86. package/presets/claude/next/agents/qa-tester.md +3 -3
  87. package/presets/claude/next/agents/security-reviewer.md +0 -1
  88. package/presets/claude/next/agents/solution-architect.md +0 -1
  89. package/presets/claude/next/agents/task-analyst.md +0 -1
  90. package/presets/claude/next/agents/task-router.md +8 -7
  91. package/presets/claude/next/agents/tech-writer.md +0 -1
  92. package/presets/claude/next/agents/unit-test-generator.md +0 -1
  93. package/presets/claude/next/agents/unit-test-healer.md +0 -1
  94. package/presets/claude/next/agents/unit-test-planner.md +0 -1
  95. package/presets/claude/next/commands/README.md +0 -6
  96. package/presets/claude/next/hooks/chain-team-phases.sh +21 -5
  97. package/presets/claude/next/hooks/list-ai-local.mjs +17 -0
  98. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +9 -9
  99. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  100. package/presets/claude/next/rules/tooling-and-review/code-quality.md +2 -6
  101. package/presets/claude/next/rules/tooling-and-review/post-change-lint.md +12 -16
  102. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  103. package/presets/claude/next/skills/feature-delivery/SKILL.md +1 -1
  104. package/presets/claude/next/skills/playwright-e2e/SKILL.md +1 -1
  105. package/presets/claude/next/skills/unit-testing/SKILL.md +1 -1
  106. package/presets/claude/nuxt/REPO_AGENTS.md +8 -48
  107. package/presets/claude/nuxt/agents/accessibility-reviewer.md +0 -1
  108. package/presets/claude/nuxt/agents/api-contract-reviewer.md +0 -1
  109. package/presets/claude/nuxt/agents/build-verifier.md +5 -3
  110. package/presets/claude/nuxt/agents/ci-investigator.md +1 -1
  111. package/presets/claude/nuxt/agents/code-reviewer.md +0 -1
  112. package/presets/claude/nuxt/agents/codebase-analyzer.md +0 -1
  113. package/presets/claude/nuxt/agents/debugger.md +1 -1
  114. package/presets/claude/nuxt/agents/feature-developer.md +6 -6
  115. package/presets/claude/nuxt/agents/migration-specialist.md +0 -1
  116. package/presets/claude/nuxt/agents/mockup-reviewer.md +0 -1
  117. package/presets/claude/nuxt/agents/openspec-author.md +0 -1
  118. package/presets/claude/nuxt/agents/performance-auditor.md +0 -1
  119. package/presets/claude/nuxt/agents/playwright-test-generator.md +0 -1
  120. package/presets/claude/nuxt/agents/playwright-test-healer.md +0 -1
  121. package/presets/claude/nuxt/agents/playwright-test-planner.md +0 -1
  122. package/presets/claude/nuxt/agents/qa-tester.md +3 -3
  123. package/presets/claude/nuxt/agents/security-reviewer.md +0 -1
  124. package/presets/claude/nuxt/agents/solution-architect.md +0 -1
  125. package/presets/claude/nuxt/agents/task-analyst.md +0 -1
  126. package/presets/claude/nuxt/agents/task-router.md +8 -7
  127. package/presets/claude/nuxt/agents/tech-writer.md +0 -1
  128. package/presets/claude/nuxt/agents/unit-test-generator.md +0 -1
  129. package/presets/claude/nuxt/agents/unit-test-healer.md +0 -1
  130. package/presets/claude/nuxt/agents/unit-test-planner.md +0 -1
  131. package/presets/claude/nuxt/hooks/chain-team-phases.sh +21 -5
  132. package/presets/claude/nuxt/hooks/list-ai-local.mjs +17 -0
  133. package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +3 -7
  134. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  135. package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +2 -6
  136. package/presets/claude/nuxt/rules/tooling-and-review/post-change-lint.md +14 -14
  137. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  138. package/presets/claude/nuxt/skills/feature-delivery/SKILL.md +1 -1
  139. package/presets/claude/nuxt/skills/playwright-e2e/SKILL.md +1 -1
  140. package/presets/claude/nuxt/skills/unit-testing/SKILL.md +1 -1
  141. package/presets/claude/php-hexagonal/REPO_AGENTS.md +7 -47
  142. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +21 -5
  143. package/presets/claude/php-hexagonal/hooks/list-ai-local.mjs +17 -0
  144. package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +3 -7
  145. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  146. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +2 -6
  147. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  148. package/presets/claude/php-laravel/REPO_AGENTS.md +7 -47
  149. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +21 -5
  150. package/presets/claude/php-laravel/hooks/list-ai-local.mjs +17 -0
  151. package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +3 -7
  152. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  153. package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +2 -6
  154. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  155. package/presets/claude/svelte/REPO_AGENTS.md +8 -48
  156. package/presets/claude/svelte/agents/accessibility-reviewer.md +0 -1
  157. package/presets/claude/svelte/agents/api-contract-reviewer.md +0 -1
  158. package/presets/claude/svelte/agents/build-verifier.md +5 -3
  159. package/presets/claude/svelte/agents/ci-investigator.md +1 -1
  160. package/presets/claude/svelte/agents/code-reviewer.md +0 -1
  161. package/presets/claude/svelte/agents/codebase-analyzer.md +0 -1
  162. package/presets/claude/svelte/agents/debugger.md +1 -1
  163. package/presets/claude/svelte/agents/feature-developer.md +6 -6
  164. package/presets/claude/svelte/agents/migration-specialist.md +0 -1
  165. package/presets/claude/svelte/agents/mockup-reviewer.md +0 -1
  166. package/presets/claude/svelte/agents/openspec-author.md +0 -1
  167. package/presets/claude/svelte/agents/performance-auditor.md +0 -1
  168. package/presets/claude/svelte/agents/playwright-test-generator.md +0 -1
  169. package/presets/claude/svelte/agents/playwright-test-healer.md +0 -1
  170. package/presets/claude/svelte/agents/playwright-test-planner.md +0 -1
  171. package/presets/claude/svelte/agents/qa-tester.md +3 -3
  172. package/presets/claude/svelte/agents/security-reviewer.md +0 -1
  173. package/presets/claude/svelte/agents/solution-architect.md +0 -1
  174. package/presets/claude/svelte/agents/task-analyst.md +0 -1
  175. package/presets/claude/svelte/agents/task-router.md +8 -7
  176. package/presets/claude/svelte/agents/tech-writer.md +0 -1
  177. package/presets/claude/svelte/agents/unit-test-generator.md +0 -1
  178. package/presets/claude/svelte/agents/unit-test-healer.md +0 -1
  179. package/presets/claude/svelte/agents/unit-test-planner.md +0 -1
  180. package/presets/claude/svelte/hooks/chain-team-phases.sh +21 -5
  181. package/presets/claude/svelte/hooks/list-ai-local.mjs +17 -0
  182. package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +3 -7
  183. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
  184. package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +2 -6
  185. package/presets/claude/svelte/rules/tooling-and-review/post-change-lint.md +14 -14
  186. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  187. package/presets/claude/svelte/skills/feature-delivery/SKILL.md +1 -1
  188. package/presets/claude/svelte/skills/playwright-e2e/SKILL.md +1 -1
  189. package/presets/claude/svelte/skills/unit-testing/SKILL.md +1 -1
  190. package/presets/cursor/android-kotlin/AGENTS.md +0 -10
  191. package/presets/cursor/android-kotlin/REPO_AGENTS.md +7 -47
  192. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +21 -5
  193. package/presets/cursor/android-kotlin/hooks/list-ai-local.mjs +17 -0
  194. package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +2 -6
  195. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +2 -2
  196. package/presets/cursor/go/AGENTS.md +0 -8
  197. package/presets/cursor/go/REPO_AGENTS.md +7 -47
  198. package/presets/cursor/go/hooks/chain-team-phases.sh +21 -5
  199. package/presets/cursor/go/hooks/list-ai-local.mjs +17 -0
  200. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +2 -6
  201. package/presets/cursor/go/rules/preset-pr-checklist.mdc +2 -2
  202. package/presets/cursor/ios-swift/AGENTS.md +0 -10
  203. package/presets/cursor/ios-swift/REPO_AGENTS.md +7 -47
  204. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +21 -5
  205. package/presets/cursor/ios-swift/hooks/list-ai-local.mjs +17 -0
  206. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +2 -6
  207. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -2
  208. package/presets/cursor/java/AGENTS.md +0 -8
  209. package/presets/cursor/java/REPO_AGENTS.md +7 -47
  210. package/presets/cursor/java/hooks/chain-team-phases.sh +21 -5
  211. package/presets/cursor/java/hooks/list-ai-local.mjs +17 -0
  212. package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +2 -6
  213. package/presets/cursor/java/rules/preset-pr-checklist.mdc +2 -2
  214. package/presets/cursor/mcp-ts/AGENTS.md +0 -6
  215. package/presets/cursor/mcp-ts/REPO_AGENTS.md +7 -47
  216. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +21 -5
  217. package/presets/cursor/mcp-ts/hooks/list-ai-local.mjs +17 -0
  218. package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +2 -6
  219. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +2 -2
  220. package/presets/cursor/mol/AGENTS.md +0 -11
  221. package/presets/cursor/mol/REPO_AGENTS.md +9 -49
  222. package/presets/cursor/mol/hooks/chain-team-phases.sh +21 -5
  223. package/presets/cursor/mol/hooks/list-ai-local.mjs +17 -0
  224. package/presets/cursor/mol/rules/code-quality-and-refactoring.mdc +2 -6
  225. package/presets/cursor/mol/rules/preset-pr-checklist.mdc +2 -2
  226. package/presets/cursor/next/AGENTS.md +1 -12
  227. package/presets/cursor/next/REPO_AGENTS.md +10 -50
  228. package/presets/cursor/next/agents/build-verifier.md +11 -7
  229. package/presets/cursor/next/agents/code-reviewer.md +1 -0
  230. package/presets/cursor/next/agents/feature-developer.md +6 -6
  231. package/presets/cursor/next/agents/qa-tester.md +3 -2
  232. package/presets/cursor/next/agents/task-router.md +8 -6
  233. package/presets/cursor/next/commands/README.md +0 -6
  234. package/presets/cursor/next/hooks/chain-team-phases.sh +21 -5
  235. package/presets/cursor/next/hooks/list-ai-local.mjs +17 -0
  236. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +4 -4
  237. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +2 -6
  238. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +6 -2
  239. package/presets/cursor/next/rules/post-change-lint.mdc +12 -16
  240. package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -2
  241. package/presets/cursor/next/skills/feature-delivery/SKILL.md +1 -1
  242. package/presets/cursor/next/skills/playwright-e2e/SKILL.md +1 -1
  243. package/presets/cursor/next/skills/unit-testing/SKILL.md +1 -1
  244. package/presets/cursor/nuxt/AGENTS.md +1 -12
  245. package/presets/cursor/nuxt/REPO_AGENTS.md +8 -48
  246. package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
  247. package/presets/cursor/nuxt/agents/feature-developer.md +2 -2
  248. package/presets/cursor/nuxt/agents/qa-tester.md +3 -2
  249. package/presets/cursor/nuxt/agents/task-router.md +8 -6
  250. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +21 -5
  251. package/presets/cursor/nuxt/hooks/list-ai-local.mjs +17 -0
  252. package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +2 -6
  253. package/presets/cursor/nuxt/rules/post-change-lint.mdc +14 -14
  254. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +2 -2
  255. package/presets/cursor/nuxt/skills/feature-delivery/SKILL.md +1 -1
  256. package/presets/cursor/nuxt/skills/playwright-e2e/SKILL.md +1 -1
  257. package/presets/cursor/nuxt/skills/unit-testing/SKILL.md +1 -1
  258. package/presets/cursor/php-hexagonal/AGENTS.md +0 -8
  259. package/presets/cursor/php-hexagonal/REPO_AGENTS.md +7 -47
  260. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +21 -5
  261. package/presets/cursor/php-hexagonal/hooks/list-ai-local.mjs +17 -0
  262. package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +2 -6
  263. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +2 -2
  264. package/presets/cursor/php-laravel/AGENTS.md +0 -8
  265. package/presets/cursor/php-laravel/REPO_AGENTS.md +7 -47
  266. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +21 -5
  267. package/presets/cursor/php-laravel/hooks/list-ai-local.mjs +17 -0
  268. package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +2 -6
  269. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +2 -2
  270. package/presets/cursor/svelte/AGENTS.md +1 -12
  271. package/presets/cursor/svelte/REPO_AGENTS.md +8 -48
  272. package/presets/cursor/svelte/agents/build-verifier.md +1 -1
  273. package/presets/cursor/svelte/agents/feature-developer.md +2 -2
  274. package/presets/cursor/svelte/agents/qa-tester.md +3 -2
  275. package/presets/cursor/svelte/agents/task-router.md +8 -6
  276. package/presets/cursor/svelte/hooks/chain-team-phases.sh +21 -5
  277. package/presets/cursor/svelte/hooks/list-ai-local.mjs +17 -0
  278. package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +2 -6
  279. package/presets/cursor/svelte/rules/post-change-lint.mdc +14 -14
  280. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +2 -2
  281. package/presets/cursor/svelte/skills/feature-delivery/SKILL.md +1 -1
  282. package/presets/cursor/svelte/skills/playwright-e2e/SKILL.md +1 -1
  283. package/presets/cursor/svelte/skills/unit-testing/SKILL.md +1 -1
  284. package/presets/mavis/android-kotlin/MAVIS.md +0 -2
  285. package/presets/mavis/android-kotlin/REPO_AGENTS.md +7 -47
  286. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  287. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +21 -5
  288. package/presets/mavis/android-kotlin/hooks/list-ai-local.mjs +17 -0
  289. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +5 -5
  290. package/presets/mavis/android-kotlin/rules/code-quality-and-refactoring.md +2 -6
  291. package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +2 -2
  292. package/presets/mavis/go/MAVIS.md +8 -0
  293. package/presets/mavis/go/REPO_AGENTS.md +7 -47
  294. package/presets/mavis/go/adapter-map.json +1 -1
  295. package/presets/mavis/go/hooks/chain-team-phases.sh +21 -5
  296. package/presets/mavis/go/hooks/list-ai-local.mjs +17 -0
  297. package/presets/mavis/go/rules/agent-team-orchestrator.md +5 -5
  298. package/presets/mavis/go/rules/code-quality-and-refactoring.md +2 -6
  299. package/presets/mavis/go/rules/feature-delivery-workflow.md +3 -7
  300. package/presets/mavis/go/rules/preset-pr-checklist.md +2 -2
  301. package/presets/mavis/ios-swift/MAVIS.md +0 -2
  302. package/presets/mavis/ios-swift/REPO_AGENTS.md +7 -47
  303. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  304. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +21 -5
  305. package/presets/mavis/ios-swift/hooks/list-ai-local.mjs +17 -0
  306. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +5 -5
  307. package/presets/mavis/ios-swift/rules/code-quality-and-refactoring.md +2 -6
  308. package/presets/mavis/ios-swift/rules/feature-delivery-workflow.md +3 -7
  309. package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +2 -2
  310. package/presets/mavis/java/MAVIS.md +14 -0
  311. package/presets/mavis/java/REPO_AGENTS.md +7 -47
  312. package/presets/mavis/java/adapter-map.json +1 -1
  313. package/presets/mavis/java/hooks/chain-team-phases.sh +21 -5
  314. package/presets/mavis/java/hooks/list-ai-local.mjs +17 -0
  315. package/presets/mavis/java/rules/agent-team-orchestrator.md +5 -5
  316. package/presets/mavis/java/rules/code-quality-and-refactoring.md +2 -6
  317. package/presets/mavis/java/rules/feature-delivery-workflow.md +3 -7
  318. package/presets/mavis/java/rules/preset-pr-checklist.md +2 -2
  319. package/presets/mavis/mcp-ts/MAVIS.md +6 -0
  320. package/presets/mavis/mcp-ts/REPO_AGENTS.md +7 -47
  321. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  322. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +21 -5
  323. package/presets/mavis/mcp-ts/hooks/list-ai-local.mjs +17 -0
  324. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +5 -5
  325. package/presets/mavis/mcp-ts/rules/code-quality-and-refactoring.md +2 -6
  326. package/presets/mavis/mcp-ts/rules/feature-delivery-workflow.md +3 -7
  327. package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +2 -2
  328. package/presets/mavis/mol/MAVIS.md +1 -5
  329. package/presets/mavis/mol/REPO_AGENTS.md +9 -49
  330. package/presets/mavis/mol/adapter-map.json +1 -1
  331. package/presets/mavis/mol/hooks/chain-team-phases.sh +21 -5
  332. package/presets/mavis/mol/hooks/list-ai-local.mjs +17 -0
  333. package/presets/mavis/mol/rules/agent-team-orchestrator.md +5 -5
  334. package/presets/mavis/mol/rules/code-quality-and-refactoring.md +2 -6
  335. package/presets/mavis/mol/rules/feature-delivery-workflow.md +3 -7
  336. package/presets/mavis/mol/rules/preset-pr-checklist.md +2 -2
  337. package/presets/mavis/next/MAVIS.md +2 -6
  338. package/presets/mavis/next/REPO_AGENTS.md +10 -50
  339. package/presets/mavis/next/adapter-map.json +1 -17
  340. package/presets/mavis/next/agents/accessibility-reviewer.md +0 -1
  341. package/presets/mavis/next/agents/api-contract-reviewer.md +0 -1
  342. package/presets/mavis/next/agents/build-verifier.md +12 -8
  343. package/presets/mavis/next/agents/ci-investigator.md +5 -2
  344. package/presets/mavis/next/agents/code-reviewer.md +1 -1
  345. package/presets/mavis/next/agents/codebase-analyzer.md +0 -1
  346. package/presets/mavis/next/agents/debugger.md +5 -2
  347. package/presets/mavis/next/agents/feature-developer.md +11 -8
  348. package/presets/mavis/next/agents/migration-specialist.md +0 -1
  349. package/presets/mavis/next/agents/mockup-reviewer.md +0 -1
  350. package/presets/mavis/next/agents/openspec-author.md +0 -1
  351. package/presets/mavis/next/agents/performance-auditor.md +0 -1
  352. package/presets/mavis/next/agents/playwright-test-generator.md +0 -1
  353. package/presets/mavis/next/agents/playwright-test-healer.md +0 -1
  354. package/presets/mavis/next/agents/playwright-test-planner.md +0 -1
  355. package/presets/mavis/next/agents/qa-tester.md +3 -3
  356. package/presets/mavis/next/agents/security-reviewer.md +0 -1
  357. package/presets/mavis/next/agents/solution-architect.md +0 -1
  358. package/presets/mavis/next/agents/task-analyst.md +0 -1
  359. package/presets/mavis/next/agents/task-router.md +8 -7
  360. package/presets/mavis/next/agents/tech-writer.md +0 -1
  361. package/presets/mavis/next/agents/unit-test-generator.md +0 -1
  362. package/presets/mavis/next/agents/unit-test-healer.md +0 -1
  363. package/presets/mavis/next/agents/unit-test-planner.md +0 -1
  364. package/presets/mavis/next/commands/README.md +0 -6
  365. package/presets/mavis/next/hooks/chain-team-phases.sh +21 -5
  366. package/presets/mavis/next/hooks/list-ai-local.mjs +17 -0
  367. package/presets/mavis/next/rules/agent-team-orchestrator.md +5 -5
  368. package/presets/mavis/next/rules/code-quality-and-refactoring.md +2 -6
  369. package/presets/mavis/next/rules/feature-delivery-workflow.md +9 -9
  370. package/presets/mavis/next/rules/post-change-lint.md +11 -15
  371. package/presets/mavis/next/rules/preset-pr-checklist.md +2 -2
  372. package/presets/mavis/next/skills/feature-delivery/SKILL.md +1 -1
  373. package/presets/mavis/next/skills/playwright-e2e/SKILL.md +1 -1
  374. package/presets/mavis/next/skills/unit-testing/SKILL.md +1 -1
  375. package/presets/mavis/nuxt/MAVIS.md +2 -6
  376. package/presets/mavis/nuxt/REPO_AGENTS.md +8 -48
  377. package/presets/mavis/nuxt/adapter-map.json +1 -1
  378. package/presets/mavis/nuxt/agents/accessibility-reviewer.md +0 -1
  379. package/presets/mavis/nuxt/agents/api-contract-reviewer.md +0 -1
  380. package/presets/mavis/nuxt/agents/build-verifier.md +2 -2
  381. package/presets/mavis/nuxt/agents/ci-investigator.md +1 -1
  382. package/presets/mavis/nuxt/agents/code-reviewer.md +0 -1
  383. package/presets/mavis/nuxt/agents/codebase-analyzer.md +0 -1
  384. package/presets/mavis/nuxt/agents/debugger.md +1 -1
  385. package/presets/mavis/nuxt/agents/feature-developer.md +3 -3
  386. package/presets/mavis/nuxt/agents/migration-specialist.md +0 -1
  387. package/presets/mavis/nuxt/agents/mockup-reviewer.md +0 -1
  388. package/presets/mavis/nuxt/agents/openspec-author.md +0 -1
  389. package/presets/mavis/nuxt/agents/performance-auditor.md +0 -1
  390. package/presets/mavis/nuxt/agents/playwright-test-generator.md +0 -1
  391. package/presets/mavis/nuxt/agents/playwright-test-healer.md +0 -1
  392. package/presets/mavis/nuxt/agents/playwright-test-planner.md +0 -1
  393. package/presets/mavis/nuxt/agents/qa-tester.md +3 -3
  394. package/presets/mavis/nuxt/agents/security-reviewer.md +0 -1
  395. package/presets/mavis/nuxt/agents/solution-architect.md +0 -1
  396. package/presets/mavis/nuxt/agents/task-analyst.md +0 -1
  397. package/presets/mavis/nuxt/agents/task-router.md +8 -7
  398. package/presets/mavis/nuxt/agents/tech-writer.md +0 -1
  399. package/presets/mavis/nuxt/agents/unit-test-generator.md +0 -1
  400. package/presets/mavis/nuxt/agents/unit-test-healer.md +0 -1
  401. package/presets/mavis/nuxt/agents/unit-test-planner.md +0 -1
  402. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +21 -5
  403. package/presets/mavis/nuxt/hooks/list-ai-local.mjs +17 -0
  404. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +5 -5
  405. package/presets/mavis/nuxt/rules/code-quality-and-refactoring.md +2 -6
  406. package/presets/mavis/nuxt/rules/feature-delivery-workflow.md +3 -7
  407. package/presets/mavis/nuxt/rules/post-change-lint.md +13 -13
  408. package/presets/mavis/nuxt/rules/preset-pr-checklist.md +2 -2
  409. package/presets/mavis/nuxt/skills/feature-delivery/SKILL.md +1 -1
  410. package/presets/mavis/nuxt/skills/playwright-e2e/SKILL.md +1 -1
  411. package/presets/mavis/nuxt/skills/unit-testing/SKILL.md +1 -1
  412. package/presets/mavis/php-hexagonal/MAVIS.md +16 -0
  413. package/presets/mavis/php-hexagonal/REPO_AGENTS.md +7 -47
  414. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  415. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +21 -5
  416. package/presets/mavis/php-hexagonal/hooks/list-ai-local.mjs +17 -0
  417. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +5 -5
  418. package/presets/mavis/php-hexagonal/rules/code-quality-and-refactoring.md +2 -6
  419. package/presets/mavis/php-hexagonal/rules/feature-delivery-workflow.md +3 -7
  420. package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +2 -2
  421. package/presets/mavis/php-laravel/MAVIS.md +16 -0
  422. package/presets/mavis/php-laravel/REPO_AGENTS.md +7 -47
  423. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  424. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +21 -5
  425. package/presets/mavis/php-laravel/hooks/list-ai-local.mjs +17 -0
  426. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +5 -5
  427. package/presets/mavis/php-laravel/rules/code-quality-and-refactoring.md +2 -6
  428. package/presets/mavis/php-laravel/rules/feature-delivery-workflow.md +3 -7
  429. package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +2 -2
  430. package/presets/mavis/svelte/MAVIS.md +2 -6
  431. package/presets/mavis/svelte/REPO_AGENTS.md +8 -48
  432. package/presets/mavis/svelte/adapter-map.json +1 -1
  433. package/presets/mavis/svelte/agents/accessibility-reviewer.md +0 -1
  434. package/presets/mavis/svelte/agents/api-contract-reviewer.md +0 -1
  435. package/presets/mavis/svelte/agents/build-verifier.md +2 -2
  436. package/presets/mavis/svelte/agents/ci-investigator.md +1 -1
  437. package/presets/mavis/svelte/agents/code-reviewer.md +0 -1
  438. package/presets/mavis/svelte/agents/codebase-analyzer.md +0 -1
  439. package/presets/mavis/svelte/agents/debugger.md +1 -1
  440. package/presets/mavis/svelte/agents/feature-developer.md +3 -3
  441. package/presets/mavis/svelte/agents/migration-specialist.md +0 -1
  442. package/presets/mavis/svelte/agents/mockup-reviewer.md +0 -1
  443. package/presets/mavis/svelte/agents/openspec-author.md +0 -1
  444. package/presets/mavis/svelte/agents/performance-auditor.md +0 -1
  445. package/presets/mavis/svelte/agents/playwright-test-generator.md +0 -1
  446. package/presets/mavis/svelte/agents/playwright-test-healer.md +0 -1
  447. package/presets/mavis/svelte/agents/playwright-test-planner.md +0 -1
  448. package/presets/mavis/svelte/agents/qa-tester.md +3 -3
  449. package/presets/mavis/svelte/agents/security-reviewer.md +0 -1
  450. package/presets/mavis/svelte/agents/solution-architect.md +0 -1
  451. package/presets/mavis/svelte/agents/task-analyst.md +0 -1
  452. package/presets/mavis/svelte/agents/task-router.md +8 -7
  453. package/presets/mavis/svelte/agents/tech-writer.md +0 -1
  454. package/presets/mavis/svelte/agents/unit-test-generator.md +0 -1
  455. package/presets/mavis/svelte/agents/unit-test-healer.md +0 -1
  456. package/presets/mavis/svelte/agents/unit-test-planner.md +0 -1
  457. package/presets/mavis/svelte/hooks/chain-team-phases.sh +21 -5
  458. package/presets/mavis/svelte/hooks/list-ai-local.mjs +17 -0
  459. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +5 -5
  460. package/presets/mavis/svelte/rules/code-quality-and-refactoring.md +2 -6
  461. package/presets/mavis/svelte/rules/feature-delivery-workflow.md +3 -7
  462. package/presets/mavis/svelte/rules/post-change-lint.md +13 -13
  463. package/presets/mavis/svelte/rules/preset-pr-checklist.md +2 -2
  464. package/presets/mavis/svelte/skills/feature-delivery/SKILL.md +1 -1
  465. package/presets/mavis/svelte/skills/playwright-e2e/SKILL.md +1 -1
  466. package/presets/mavis/svelte/skills/unit-testing/SKILL.md +1 -1
  467. package/presets/opencode/android-kotlin/OPENCODE.md +1 -43
  468. package/presets/opencode/android-kotlin/REPO_AGENTS.md +7 -47
  469. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  470. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +21 -5
  471. package/presets/opencode/android-kotlin/hooks/list-ai-local.mjs +17 -0
  472. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +5 -5
  473. package/presets/opencode/android-kotlin/rules/code-quality-and-refactoring.md +2 -6
  474. package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +2 -2
  475. package/presets/opencode/go/OPENCODE.md +7 -39
  476. package/presets/opencode/go/REPO_AGENTS.md +7 -47
  477. package/presets/opencode/go/adapter-map.json +1 -1
  478. package/presets/opencode/go/hooks/chain-team-phases.sh +21 -5
  479. package/presets/opencode/go/hooks/list-ai-local.mjs +17 -0
  480. package/presets/opencode/go/rules/agent-team-orchestrator.md +5 -5
  481. package/presets/opencode/go/rules/code-quality-and-refactoring.md +2 -6
  482. package/presets/opencode/go/rules/feature-delivery-workflow.md +3 -7
  483. package/presets/opencode/go/rules/preset-pr-checklist.md +2 -2
  484. package/presets/opencode/ios-swift/OPENCODE.md +1 -43
  485. package/presets/opencode/ios-swift/REPO_AGENTS.md +7 -47
  486. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  487. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +21 -5
  488. package/presets/opencode/ios-swift/hooks/list-ai-local.mjs +17 -0
  489. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +5 -5
  490. package/presets/opencode/ios-swift/rules/code-quality-and-refactoring.md +2 -6
  491. package/presets/opencode/ios-swift/rules/feature-delivery-workflow.md +3 -7
  492. package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +2 -2
  493. package/presets/opencode/java/OPENCODE.md +12 -38
  494. package/presets/opencode/java/REPO_AGENTS.md +7 -47
  495. package/presets/opencode/java/adapter-map.json +1 -1
  496. package/presets/opencode/java/hooks/chain-team-phases.sh +21 -5
  497. package/presets/opencode/java/hooks/list-ai-local.mjs +17 -0
  498. package/presets/opencode/java/rules/agent-team-orchestrator.md +5 -5
  499. package/presets/opencode/java/rules/code-quality-and-refactoring.md +2 -6
  500. package/presets/opencode/java/rules/feature-delivery-workflow.md +3 -7
  501. package/presets/opencode/java/rules/preset-pr-checklist.md +2 -2
  502. package/presets/opencode/mcp-ts/OPENCODE.md +5 -39
  503. package/presets/opencode/mcp-ts/REPO_AGENTS.md +7 -47
  504. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  505. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +21 -5
  506. package/presets/opencode/mcp-ts/hooks/list-ai-local.mjs +17 -0
  507. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +5 -5
  508. package/presets/opencode/mcp-ts/rules/code-quality-and-refactoring.md +2 -6
  509. package/presets/opencode/mcp-ts/rules/feature-delivery-workflow.md +3 -7
  510. package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +2 -2
  511. package/presets/opencode/mol/OPENCODE.md +1 -44
  512. package/presets/opencode/mol/REPO_AGENTS.md +9 -49
  513. package/presets/opencode/mol/adapter-map.json +1 -1
  514. package/presets/opencode/mol/hooks/chain-team-phases.sh +21 -5
  515. package/presets/opencode/mol/hooks/list-ai-local.mjs +17 -0
  516. package/presets/opencode/mol/rules/agent-team-orchestrator.md +5 -5
  517. package/presets/opencode/mol/rules/code-quality-and-refactoring.md +2 -6
  518. package/presets/opencode/mol/rules/feature-delivery-workflow.md +3 -7
  519. package/presets/opencode/mol/rules/preset-pr-checklist.md +2 -2
  520. package/presets/opencode/next/OPENCODE.md +2 -45
  521. package/presets/opencode/next/REPO_AGENTS.md +10 -50
  522. package/presets/opencode/next/adapter-map.json +1 -17
  523. package/presets/opencode/next/agents/accessibility-reviewer.md +0 -1
  524. package/presets/opencode/next/agents/api-contract-reviewer.md +0 -1
  525. package/presets/opencode/next/agents/build-verifier.md +12 -8
  526. package/presets/opencode/next/agents/ci-investigator.md +5 -2
  527. package/presets/opencode/next/agents/code-reviewer.md +1 -1
  528. package/presets/opencode/next/agents/codebase-analyzer.md +0 -1
  529. package/presets/opencode/next/agents/debugger.md +5 -2
  530. package/presets/opencode/next/agents/feature-developer.md +11 -8
  531. package/presets/opencode/next/agents/migration-specialist.md +0 -1
  532. package/presets/opencode/next/agents/mockup-reviewer.md +0 -1
  533. package/presets/opencode/next/agents/openspec-author.md +0 -1
  534. package/presets/opencode/next/agents/performance-auditor.md +0 -1
  535. package/presets/opencode/next/agents/playwright-test-generator.md +0 -1
  536. package/presets/opencode/next/agents/playwright-test-healer.md +0 -1
  537. package/presets/opencode/next/agents/playwright-test-planner.md +0 -1
  538. package/presets/opencode/next/agents/qa-tester.md +3 -3
  539. package/presets/opencode/next/agents/security-reviewer.md +0 -1
  540. package/presets/opencode/next/agents/solution-architect.md +0 -1
  541. package/presets/opencode/next/agents/task-analyst.md +0 -1
  542. package/presets/opencode/next/agents/task-router.md +8 -7
  543. package/presets/opencode/next/agents/tech-writer.md +0 -1
  544. package/presets/opencode/next/agents/unit-test-generator.md +0 -1
  545. package/presets/opencode/next/agents/unit-test-healer.md +0 -1
  546. package/presets/opencode/next/agents/unit-test-planner.md +0 -1
  547. package/presets/opencode/next/commands/README.md +0 -6
  548. package/presets/opencode/next/hooks/chain-team-phases.sh +21 -5
  549. package/presets/opencode/next/hooks/list-ai-local.mjs +17 -0
  550. package/presets/opencode/next/rules/agent-team-orchestrator.md +5 -5
  551. package/presets/opencode/next/rules/code-quality-and-refactoring.md +2 -6
  552. package/presets/opencode/next/rules/feature-delivery-workflow.md +9 -9
  553. package/presets/opencode/next/rules/post-change-lint.md +11 -15
  554. package/presets/opencode/next/rules/preset-pr-checklist.md +2 -2
  555. package/presets/opencode/next/skills/feature-delivery/SKILL.md +1 -1
  556. package/presets/opencode/next/skills/playwright-e2e/SKILL.md +1 -1
  557. package/presets/opencode/next/skills/unit-testing/SKILL.md +1 -1
  558. package/presets/opencode/nuxt/OPENCODE.md +2 -45
  559. package/presets/opencode/nuxt/REPO_AGENTS.md +8 -48
  560. package/presets/opencode/nuxt/adapter-map.json +1 -1
  561. package/presets/opencode/nuxt/agents/accessibility-reviewer.md +0 -1
  562. package/presets/opencode/nuxt/agents/api-contract-reviewer.md +0 -1
  563. package/presets/opencode/nuxt/agents/build-verifier.md +2 -2
  564. package/presets/opencode/nuxt/agents/ci-investigator.md +1 -1
  565. package/presets/opencode/nuxt/agents/code-reviewer.md +0 -1
  566. package/presets/opencode/nuxt/agents/codebase-analyzer.md +0 -1
  567. package/presets/opencode/nuxt/agents/debugger.md +1 -1
  568. package/presets/opencode/nuxt/agents/feature-developer.md +3 -3
  569. package/presets/opencode/nuxt/agents/migration-specialist.md +0 -1
  570. package/presets/opencode/nuxt/agents/mockup-reviewer.md +0 -1
  571. package/presets/opencode/nuxt/agents/openspec-author.md +0 -1
  572. package/presets/opencode/nuxt/agents/performance-auditor.md +0 -1
  573. package/presets/opencode/nuxt/agents/playwright-test-generator.md +0 -1
  574. package/presets/opencode/nuxt/agents/playwright-test-healer.md +0 -1
  575. package/presets/opencode/nuxt/agents/playwright-test-planner.md +0 -1
  576. package/presets/opencode/nuxt/agents/qa-tester.md +3 -3
  577. package/presets/opencode/nuxt/agents/security-reviewer.md +0 -1
  578. package/presets/opencode/nuxt/agents/solution-architect.md +0 -1
  579. package/presets/opencode/nuxt/agents/task-analyst.md +0 -1
  580. package/presets/opencode/nuxt/agents/task-router.md +8 -7
  581. package/presets/opencode/nuxt/agents/tech-writer.md +0 -1
  582. package/presets/opencode/nuxt/agents/unit-test-generator.md +0 -1
  583. package/presets/opencode/nuxt/agents/unit-test-healer.md +0 -1
  584. package/presets/opencode/nuxt/agents/unit-test-planner.md +0 -1
  585. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +21 -5
  586. package/presets/opencode/nuxt/hooks/list-ai-local.mjs +17 -0
  587. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +5 -5
  588. package/presets/opencode/nuxt/rules/code-quality-and-refactoring.md +2 -6
  589. package/presets/opencode/nuxt/rules/feature-delivery-workflow.md +3 -7
  590. package/presets/opencode/nuxt/rules/post-change-lint.md +13 -13
  591. package/presets/opencode/nuxt/rules/preset-pr-checklist.md +2 -2
  592. package/presets/opencode/nuxt/skills/feature-delivery/SKILL.md +1 -1
  593. package/presets/opencode/nuxt/skills/playwright-e2e/SKILL.md +1 -1
  594. package/presets/opencode/nuxt/skills/unit-testing/SKILL.md +1 -1
  595. package/presets/opencode/php-hexagonal/OPENCODE.md +14 -38
  596. package/presets/opencode/php-hexagonal/REPO_AGENTS.md +7 -47
  597. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  598. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +21 -5
  599. package/presets/opencode/php-hexagonal/hooks/list-ai-local.mjs +17 -0
  600. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +5 -5
  601. package/presets/opencode/php-hexagonal/rules/code-quality-and-refactoring.md +2 -6
  602. package/presets/opencode/php-hexagonal/rules/feature-delivery-workflow.md +3 -7
  603. package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +2 -2
  604. package/presets/opencode/php-laravel/OPENCODE.md +14 -38
  605. package/presets/opencode/php-laravel/REPO_AGENTS.md +7 -47
  606. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  607. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +21 -5
  608. package/presets/opencode/php-laravel/hooks/list-ai-local.mjs +17 -0
  609. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +5 -5
  610. package/presets/opencode/php-laravel/rules/code-quality-and-refactoring.md +2 -6
  611. package/presets/opencode/php-laravel/rules/feature-delivery-workflow.md +3 -7
  612. package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +2 -2
  613. package/presets/opencode/plugins/output-guard/README.md +43 -0
  614. package/presets/opencode/plugins/output-guard/index.ts +306 -0
  615. package/presets/opencode/plugins/output-guard/ledger.ts +43 -0
  616. package/presets/opencode/plugins/output-guard/package.json +9 -0
  617. package/presets/opencode/plugins/output-guard/rewrite.ts +149 -0
  618. package/presets/opencode/plugins/task-status/economy.ts +112 -0
  619. package/presets/opencode/plugins/task-status/task-view.ts +86 -20
  620. package/presets/opencode/plugins/task-status/tui.tsx +19 -5
  621. package/presets/opencode/plugins/task-status/types.ts +3 -1
  622. package/presets/opencode/svelte/OPENCODE.md +2 -45
  623. package/presets/opencode/svelte/REPO_AGENTS.md +8 -48
  624. package/presets/opencode/svelte/adapter-map.json +1 -1
  625. package/presets/opencode/svelte/agents/accessibility-reviewer.md +0 -1
  626. package/presets/opencode/svelte/agents/api-contract-reviewer.md +0 -1
  627. package/presets/opencode/svelte/agents/build-verifier.md +2 -2
  628. package/presets/opencode/svelte/agents/ci-investigator.md +1 -1
  629. package/presets/opencode/svelte/agents/code-reviewer.md +0 -1
  630. package/presets/opencode/svelte/agents/codebase-analyzer.md +0 -1
  631. package/presets/opencode/svelte/agents/debugger.md +1 -1
  632. package/presets/opencode/svelte/agents/feature-developer.md +3 -3
  633. package/presets/opencode/svelte/agents/migration-specialist.md +0 -1
  634. package/presets/opencode/svelte/agents/mockup-reviewer.md +0 -1
  635. package/presets/opencode/svelte/agents/openspec-author.md +0 -1
  636. package/presets/opencode/svelte/agents/performance-auditor.md +0 -1
  637. package/presets/opencode/svelte/agents/playwright-test-generator.md +0 -1
  638. package/presets/opencode/svelte/agents/playwright-test-healer.md +0 -1
  639. package/presets/opencode/svelte/agents/playwright-test-planner.md +0 -1
  640. package/presets/opencode/svelte/agents/qa-tester.md +3 -3
  641. package/presets/opencode/svelte/agents/security-reviewer.md +0 -1
  642. package/presets/opencode/svelte/agents/solution-architect.md +0 -1
  643. package/presets/opencode/svelte/agents/task-analyst.md +0 -1
  644. package/presets/opencode/svelte/agents/task-router.md +8 -7
  645. package/presets/opencode/svelte/agents/tech-writer.md +0 -1
  646. package/presets/opencode/svelte/agents/unit-test-generator.md +0 -1
  647. package/presets/opencode/svelte/agents/unit-test-healer.md +0 -1
  648. package/presets/opencode/svelte/agents/unit-test-planner.md +0 -1
  649. package/presets/opencode/svelte/hooks/chain-team-phases.sh +21 -5
  650. package/presets/opencode/svelte/hooks/list-ai-local.mjs +17 -0
  651. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +5 -5
  652. package/presets/opencode/svelte/rules/code-quality-and-refactoring.md +2 -6
  653. package/presets/opencode/svelte/rules/feature-delivery-workflow.md +3 -7
  654. package/presets/opencode/svelte/rules/post-change-lint.md +13 -13
  655. package/presets/opencode/svelte/rules/preset-pr-checklist.md +2 -2
  656. package/presets/opencode/svelte/skills/feature-delivery/SKILL.md +1 -1
  657. package/presets/opencode/svelte/skills/playwright-e2e/SKILL.md +1 -1
  658. package/presets/opencode/svelte/skills/unit-testing/SKILL.md +1 -1
  659. package/presets/zcode/android-kotlin/REPO_AGENTS.md +7 -47
  660. package/presets/zcode/android-kotlin/adapter-map.json +1 -1
  661. package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +21 -5
  662. package/presets/zcode/android-kotlin/hooks/list-ai-local.mjs +17 -0
  663. package/presets/zcode/android-kotlin/rules/agent-team-orchestrator.md +5 -5
  664. package/presets/zcode/android-kotlin/rules/code-quality-and-refactoring.md +2 -6
  665. package/presets/zcode/android-kotlin/rules/preset-pr-checklist.md +2 -2
  666. package/presets/zcode/go/REPO_AGENTS.md +7 -47
  667. package/presets/zcode/go/adapter-map.json +1 -1
  668. package/presets/zcode/go/hooks/chain-team-phases.sh +21 -5
  669. package/presets/zcode/go/hooks/list-ai-local.mjs +17 -0
  670. package/presets/zcode/go/rules/agent-team-orchestrator.md +5 -5
  671. package/presets/zcode/go/rules/code-quality-and-refactoring.md +2 -6
  672. package/presets/zcode/go/rules/feature-delivery-workflow.md +3 -7
  673. package/presets/zcode/go/rules/preset-pr-checklist.md +2 -2
  674. package/presets/zcode/ios-swift/REPO_AGENTS.md +7 -47
  675. package/presets/zcode/ios-swift/adapter-map.json +1 -1
  676. package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +21 -5
  677. package/presets/zcode/ios-swift/hooks/list-ai-local.mjs +17 -0
  678. package/presets/zcode/ios-swift/rules/agent-team-orchestrator.md +5 -5
  679. package/presets/zcode/ios-swift/rules/code-quality-and-refactoring.md +2 -6
  680. package/presets/zcode/ios-swift/rules/feature-delivery-workflow.md +3 -7
  681. package/presets/zcode/ios-swift/rules/preset-pr-checklist.md +2 -2
  682. package/presets/zcode/java/REPO_AGENTS.md +7 -47
  683. package/presets/zcode/java/adapter-map.json +1 -1
  684. package/presets/zcode/java/hooks/chain-team-phases.sh +21 -5
  685. package/presets/zcode/java/hooks/list-ai-local.mjs +17 -0
  686. package/presets/zcode/java/rules/agent-team-orchestrator.md +5 -5
  687. package/presets/zcode/java/rules/code-quality-and-refactoring.md +2 -6
  688. package/presets/zcode/java/rules/feature-delivery-workflow.md +3 -7
  689. package/presets/zcode/java/rules/preset-pr-checklist.md +2 -2
  690. package/presets/zcode/mcp-ts/REPO_AGENTS.md +7 -47
  691. package/presets/zcode/mcp-ts/adapter-map.json +1 -1
  692. package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +21 -5
  693. package/presets/zcode/mcp-ts/hooks/list-ai-local.mjs +17 -0
  694. package/presets/zcode/mcp-ts/rules/agent-team-orchestrator.md +5 -5
  695. package/presets/zcode/mcp-ts/rules/code-quality-and-refactoring.md +2 -6
  696. package/presets/zcode/mcp-ts/rules/feature-delivery-workflow.md +3 -7
  697. package/presets/zcode/mcp-ts/rules/preset-pr-checklist.md +2 -2
  698. package/presets/zcode/mol/REPO_AGENTS.md +9 -49
  699. package/presets/zcode/mol/adapter-map.json +1 -1
  700. package/presets/zcode/mol/hooks/chain-team-phases.sh +21 -5
  701. package/presets/zcode/mol/hooks/list-ai-local.mjs +17 -0
  702. package/presets/zcode/mol/rules/agent-team-orchestrator.md +5 -5
  703. package/presets/zcode/mol/rules/code-quality-and-refactoring.md +2 -6
  704. package/presets/zcode/mol/rules/feature-delivery-workflow.md +3 -7
  705. package/presets/zcode/mol/rules/preset-pr-checklist.md +2 -2
  706. package/presets/zcode/next/REPO_AGENTS.md +10 -50
  707. package/presets/zcode/next/adapter-map.json +1 -17
  708. package/presets/zcode/next/agents/accessibility-reviewer.md +0 -1
  709. package/presets/zcode/next/agents/api-contract-reviewer.md +0 -1
  710. package/presets/zcode/next/agents/build-verifier.md +12 -8
  711. package/presets/zcode/next/agents/ci-investigator.md +5 -2
  712. package/presets/zcode/next/agents/code-reviewer.md +1 -1
  713. package/presets/zcode/next/agents/codebase-analyzer.md +0 -1
  714. package/presets/zcode/next/agents/debugger.md +5 -2
  715. package/presets/zcode/next/agents/feature-developer.md +11 -8
  716. package/presets/zcode/next/agents/migration-specialist.md +0 -1
  717. package/presets/zcode/next/agents/mockup-reviewer.md +0 -1
  718. package/presets/zcode/next/agents/openspec-author.md +0 -1
  719. package/presets/zcode/next/agents/performance-auditor.md +0 -1
  720. package/presets/zcode/next/agents/playwright-test-generator.md +0 -1
  721. package/presets/zcode/next/agents/playwright-test-healer.md +0 -1
  722. package/presets/zcode/next/agents/playwright-test-planner.md +0 -1
  723. package/presets/zcode/next/agents/qa-tester.md +3 -3
  724. package/presets/zcode/next/agents/security-reviewer.md +0 -1
  725. package/presets/zcode/next/agents/solution-architect.md +0 -1
  726. package/presets/zcode/next/agents/task-analyst.md +0 -1
  727. package/presets/zcode/next/agents/task-router.md +8 -7
  728. package/presets/zcode/next/agents/tech-writer.md +0 -1
  729. package/presets/zcode/next/agents/unit-test-generator.md +0 -1
  730. package/presets/zcode/next/agents/unit-test-healer.md +0 -1
  731. package/presets/zcode/next/agents/unit-test-planner.md +0 -1
  732. package/presets/zcode/next/commands/README.md +0 -6
  733. package/presets/zcode/next/hooks/chain-team-phases.sh +21 -5
  734. package/presets/zcode/next/hooks/list-ai-local.mjs +17 -0
  735. package/presets/zcode/next/rules/agent-team-orchestrator.md +5 -5
  736. package/presets/zcode/next/rules/code-quality-and-refactoring.md +2 -6
  737. package/presets/zcode/next/rules/feature-delivery-workflow.md +9 -9
  738. package/presets/zcode/next/rules/post-change-lint.md +11 -15
  739. package/presets/zcode/next/rules/preset-pr-checklist.md +2 -2
  740. package/presets/zcode/next/skills/feature-delivery/SKILL.md +1 -1
  741. package/presets/zcode/next/skills/playwright-e2e/SKILL.md +1 -1
  742. package/presets/zcode/next/skills/unit-testing/SKILL.md +1 -1
  743. package/presets/zcode/nuxt/REPO_AGENTS.md +8 -48
  744. package/presets/zcode/nuxt/adapter-map.json +1 -1
  745. package/presets/zcode/nuxt/agents/accessibility-reviewer.md +0 -1
  746. package/presets/zcode/nuxt/agents/api-contract-reviewer.md +0 -1
  747. package/presets/zcode/nuxt/agents/build-verifier.md +2 -2
  748. package/presets/zcode/nuxt/agents/ci-investigator.md +1 -1
  749. package/presets/zcode/nuxt/agents/code-reviewer.md +0 -1
  750. package/presets/zcode/nuxt/agents/codebase-analyzer.md +0 -1
  751. package/presets/zcode/nuxt/agents/debugger.md +1 -1
  752. package/presets/zcode/nuxt/agents/feature-developer.md +3 -3
  753. package/presets/zcode/nuxt/agents/migration-specialist.md +0 -1
  754. package/presets/zcode/nuxt/agents/mockup-reviewer.md +0 -1
  755. package/presets/zcode/nuxt/agents/openspec-author.md +0 -1
  756. package/presets/zcode/nuxt/agents/performance-auditor.md +0 -1
  757. package/presets/zcode/nuxt/agents/playwright-test-generator.md +0 -1
  758. package/presets/zcode/nuxt/agents/playwright-test-healer.md +0 -1
  759. package/presets/zcode/nuxt/agents/playwright-test-planner.md +0 -1
  760. package/presets/zcode/nuxt/agents/qa-tester.md +3 -3
  761. package/presets/zcode/nuxt/agents/security-reviewer.md +0 -1
  762. package/presets/zcode/nuxt/agents/solution-architect.md +0 -1
  763. package/presets/zcode/nuxt/agents/task-analyst.md +0 -1
  764. package/presets/zcode/nuxt/agents/task-router.md +8 -7
  765. package/presets/zcode/nuxt/agents/tech-writer.md +0 -1
  766. package/presets/zcode/nuxt/agents/unit-test-generator.md +0 -1
  767. package/presets/zcode/nuxt/agents/unit-test-healer.md +0 -1
  768. package/presets/zcode/nuxt/agents/unit-test-planner.md +0 -1
  769. package/presets/zcode/nuxt/hooks/chain-team-phases.sh +21 -5
  770. package/presets/zcode/nuxt/hooks/list-ai-local.mjs +17 -0
  771. package/presets/zcode/nuxt/rules/agent-team-orchestrator.md +5 -5
  772. package/presets/zcode/nuxt/rules/code-quality-and-refactoring.md +2 -6
  773. package/presets/zcode/nuxt/rules/feature-delivery-workflow.md +3 -7
  774. package/presets/zcode/nuxt/rules/post-change-lint.md +13 -13
  775. package/presets/zcode/nuxt/rules/preset-pr-checklist.md +2 -2
  776. package/presets/zcode/nuxt/skills/feature-delivery/SKILL.md +1 -1
  777. package/presets/zcode/nuxt/skills/playwright-e2e/SKILL.md +1 -1
  778. package/presets/zcode/nuxt/skills/unit-testing/SKILL.md +1 -1
  779. package/presets/zcode/php-hexagonal/REPO_AGENTS.md +7 -47
  780. package/presets/zcode/php-hexagonal/adapter-map.json +1 -1
  781. package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +21 -5
  782. package/presets/zcode/php-hexagonal/hooks/list-ai-local.mjs +17 -0
  783. package/presets/zcode/php-hexagonal/rules/agent-team-orchestrator.md +5 -5
  784. package/presets/zcode/php-hexagonal/rules/code-quality-and-refactoring.md +2 -6
  785. package/presets/zcode/php-hexagonal/rules/feature-delivery-workflow.md +3 -7
  786. package/presets/zcode/php-hexagonal/rules/preset-pr-checklist.md +2 -2
  787. package/presets/zcode/php-laravel/REPO_AGENTS.md +7 -47
  788. package/presets/zcode/php-laravel/adapter-map.json +1 -1
  789. package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +21 -5
  790. package/presets/zcode/php-laravel/hooks/list-ai-local.mjs +17 -0
  791. package/presets/zcode/php-laravel/rules/agent-team-orchestrator.md +5 -5
  792. package/presets/zcode/php-laravel/rules/code-quality-and-refactoring.md +2 -6
  793. package/presets/zcode/php-laravel/rules/feature-delivery-workflow.md +3 -7
  794. package/presets/zcode/php-laravel/rules/preset-pr-checklist.md +2 -2
  795. package/presets/zcode/svelte/REPO_AGENTS.md +8 -48
  796. package/presets/zcode/svelte/adapter-map.json +1 -1
  797. package/presets/zcode/svelte/agents/accessibility-reviewer.md +0 -1
  798. package/presets/zcode/svelte/agents/api-contract-reviewer.md +0 -1
  799. package/presets/zcode/svelte/agents/build-verifier.md +2 -2
  800. package/presets/zcode/svelte/agents/ci-investigator.md +1 -1
  801. package/presets/zcode/svelte/agents/code-reviewer.md +0 -1
  802. package/presets/zcode/svelte/agents/codebase-analyzer.md +0 -1
  803. package/presets/zcode/svelte/agents/debugger.md +1 -1
  804. package/presets/zcode/svelte/agents/feature-developer.md +3 -3
  805. package/presets/zcode/svelte/agents/migration-specialist.md +0 -1
  806. package/presets/zcode/svelte/agents/mockup-reviewer.md +0 -1
  807. package/presets/zcode/svelte/agents/openspec-author.md +0 -1
  808. package/presets/zcode/svelte/agents/performance-auditor.md +0 -1
  809. package/presets/zcode/svelte/agents/playwright-test-generator.md +0 -1
  810. package/presets/zcode/svelte/agents/playwright-test-healer.md +0 -1
  811. package/presets/zcode/svelte/agents/playwright-test-planner.md +0 -1
  812. package/presets/zcode/svelte/agents/qa-tester.md +3 -3
  813. package/presets/zcode/svelte/agents/security-reviewer.md +0 -1
  814. package/presets/zcode/svelte/agents/solution-architect.md +0 -1
  815. package/presets/zcode/svelte/agents/task-analyst.md +0 -1
  816. package/presets/zcode/svelte/agents/task-router.md +8 -7
  817. package/presets/zcode/svelte/agents/tech-writer.md +0 -1
  818. package/presets/zcode/svelte/agents/unit-test-generator.md +0 -1
  819. package/presets/zcode/svelte/agents/unit-test-healer.md +0 -1
  820. package/presets/zcode/svelte/agents/unit-test-planner.md +0 -1
  821. package/presets/zcode/svelte/hooks/chain-team-phases.sh +21 -5
  822. package/presets/zcode/svelte/hooks/list-ai-local.mjs +17 -0
  823. package/presets/zcode/svelte/rules/agent-team-orchestrator.md +5 -5
  824. package/presets/zcode/svelte/rules/code-quality-and-refactoring.md +2 -6
  825. package/presets/zcode/svelte/rules/feature-delivery-workflow.md +3 -7
  826. package/presets/zcode/svelte/rules/post-change-lint.md +13 -13
  827. package/presets/zcode/svelte/rules/preset-pr-checklist.md +2 -2
  828. package/presets/zcode/svelte/skills/feature-delivery/SKILL.md +1 -1
  829. package/presets/zcode/svelte/skills/playwright-e2e/SKILL.md +1 -1
  830. package/presets/zcode/svelte/skills/unit-testing/SKILL.md +1 -1
  831. package/scripts/report-context-cost.mjs +432 -0
  832. package/presets/_shared/ai-local/scripts/team-db-dashboard.mjs +0 -2103
  833. package/presets/_shared/ai-local/scripts/team-db-ui.mjs +0 -750
  834. package/presets/claude/next/commands/ui-start.md +0 -78
  835. package/presets/claude/next/commands/ui-stop.md +0 -71
  836. package/presets/cursor/next/commands/ui-start.md +0 -78
  837. package/presets/cursor/next/commands/ui-stop.md +0 -71
  838. package/presets/mavis/next/commands/ui-start.md +0 -73
  839. package/presets/mavis/next/commands/ui-stop.md +0 -66
  840. package/presets/opencode/next/commands/ui-start.md +0 -81
  841. package/presets/opencode/next/commands/ui-stop.md +0 -74
  842. package/presets/zcode/next/commands/ui-start.md +0 -81
  843. package/presets/zcode/next/commands/ui-stop.md +0 -74
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
 
17
16
  Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
@@ -8,10 +8,13 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
8
8
  - `.mavis/rules/ai-local-overlay.md`
9
9
  - `.mavis/rules/architecture-boundaries.md` — layer boundaries and allowed imports
10
10
  - `.mavis/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
11
- - `.mavis/rules/reference-features.md` — analog files first
12
- - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
11
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
12
  - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
13
+
14
+ Read when the task reaches the matching zone:
15
+
16
+ - `.mavis/rules/reference-features.md` — analog files first
17
+ - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
15
18
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
19
  - `.mavis/rules/public-imports.md` — @/types, @/api barrels
17
20
  - `.mavis/rules/react-ui.md` — UI component style (no FC, no spread, decomposition)
@@ -8,10 +8,13 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
8
8
  - `.mavis/rules/ai-local-overlay.md`
9
9
  - `.mavis/rules/architecture-boundaries.md` — layer boundaries and allowed imports
10
10
  - `.mavis/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
11
- - `.mavis/rules/reference-features.md` — analog files first
12
- - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
11
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
12
  - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
13
+
14
+ Read when the task reaches the matching zone:
15
+
16
+ - `.mavis/rules/reference-features.md` — analog files first
17
+ - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
15
18
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
19
  - `.mavis/rules/public-imports.md` — @/types, @/api barrels
17
20
  - `.mavis/rules/react-ui.md` — UI component style (no FC, no spread, decomposition)
@@ -59,7 +62,7 @@ Load `dev-process-lifecycle` before starting, reusing, or stopping a dev server,
59
62
 
60
63
  - Do **not** start blocked tasks or tasks with incomplete dependencies.
61
64
  - **Reuse means reuse.** When the brief says to reuse an existing component, do not widen the change into extracting or relocating a shared primitive. If extraction is genuinely required, stop and hand back to the orchestrator: it is a separate task that needs its own gate, because every other call site inherits the blast radius.
62
- - **Unit tests must run before handoff** for mappers, store logic, and non-trivial pure functions.
65
+ - **Unit tests must be authored before handoff** for mappers, store logic, and non-trivial pure functions. Do not execute the project test suite; the closure gate runs it.
63
66
  - When the strict implementation rail is off or unset, that test-before-handoff rule is the implementation handoff text.
64
67
  - When `pipeline.json` `implementationRail` is `on`:
65
68
  - Write a failing test before any production edit.
@@ -69,8 +72,8 @@ Load `dev-process-lifecycle` before starting, reusing, or stopping a dev server,
69
72
  - Debug retries for this handoff stop at two.
70
73
  - L0, docs-only, research, and preset-only tasks do not take the rail. `build-verifier` and `code-reviewer` stay.
71
74
  - Mark completed tasks in `decomposition.md`.
72
- - Validation: **`post-change-lint.md`**. If pipeline next step is **`build-verifier`**, scoped lint/type-check on **changed files** is enough; full project lint is build-verifier's job.
73
- - **Preset twin/golden DoD (preset source repo only).** When the change-set edits Cursor next agents and/or `presets/_shared/hooks/**` (or other surfaces that require generated twins), from `packages/ai-rules` run `node scripts/fix-generated.mjs` then `yarn check:changed` and the gates it names (exit 0) before implementation handoff. The full `yarn release:gate` is release-only.
75
+ - Validation: **`post-change-lint.md`** is the closure gate. Do **not** run project lint/type-check/test/build in this step; hand off with the diff and authored specs. `build-verifier` owns the full run.
76
+ - **Preset twin/golden DoD (preset source repo only).** When the change-set edits Cursor next agents and/or `presets/_shared/hooks/**` (or other surfaces that require generated twins), from `packages/ai-rules` run `node scripts/fix-generated.mjs` then `yarn check:task <slug>` (or `yarn check:changed` on a clean tree) and the gates it names (exit 0) before implementation handoff. The full `yarn release:gate` is release-only.
74
77
 
75
78
  ## Zero improvisation
76
79
 
@@ -81,13 +84,13 @@ Load `dev-process-lifecycle` before starting, reusing, or stopping a dev server,
81
84
 
82
85
  ## Will / Will not
83
86
 
84
- **Will:** follow layer order and reference features; add required unit tests; run the post-change gate; update task artifacts.
87
+ **Will:** follow layer order and reference features; add required unit tests; hand off to the closure gate; update task artifacts.
85
88
 
86
89
  **Will not:** formal code review; start blocked/dependent tasks; invent AC; auto-continue the next WP when the pipeline expects a human gate or handoff.
87
90
 
88
91
  ## On completion
89
92
 
90
- Emit the owned implementation receipt with outcome `completed`. Handoff: tasks done, files by layer, unit specs, validation result, gaps for build-verifier/reviewer.
93
+ Emit the owned implementation receipt with outcome `completed`. Handoff: tasks done, files by layer, authored unit specs, closure-gate status (not run), gaps for build-verifier/reviewer.
91
94
 
92
95
  Do not perform formal code review — that is the code-reviewer subagent's job.
93
96
 
@@ -106,7 +109,7 @@ Do not perform formal code review — that is the code-reviewer subagent's job.
106
109
 
107
110
  <!-- shared-core: quality/verification-before-completion.md -->
108
111
 
109
- Before handoff, IDENTIFY→RUN→READ→VERIFY the scoped checks for this WP, THEN claim. Do not say the work is done without that evidence in the same turn. Full-project lint is `build-verifier`.
112
+ Before handoff, verify the change-set: files changed, specs authored, no project gate run. Do not claim green; closure evidence belongs to `build-verifier` (see the gate-cadence rule in `post-change-lint`).
110
113
 
111
114
  ## Existing-suite impact check (UI / copy / table / route changes)
112
115
 
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
 
17
16
  Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
 
17
16
  Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
 
17
16
  Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
 
17
16
  Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
  - `.mavis/rules/playwright-agents.md`
17
16
  - `.mavis/rules/tests-e2e-structure.md`
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
  - `.mavis/rules/playwright-agents.md`
17
16
  - `.mavis/rules/tests-e2e-structure.md`
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
  - `.mavis/rules/playwright-agents.md`
17
16
  - `.mavis/rules/tests-e2e-structure.md`
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
  - `.mavis/rules/tests-unit.md`
17
16
  - `.mavis/rules/playwright-agents.md`
@@ -57,8 +56,9 @@ When the task is mostly e2e, prefer invoking the dedicated `playwright-test-plan
57
56
 
58
57
  ## Execution
59
58
 
60
- - Run relevant unit tests for changed modules.
61
- - Run affected e2e specs if feasible; report failures clearly.
59
+ - Author the unit and e2e specs; do **not** run the project gate suite. `build-verifier` executes the affected specs at closure.
60
+ - For a `test-only`, `unit-only`, or `e2e-only` intent, run the targeted spec being authored or healed; that is the test-authoring exception, not a project gate.
61
+ - Do not re-run a unit suite already recorded green in `validation-report.md`; the closure step owns it.
62
62
 
63
63
  ## Artifact contract
64
64
 
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
 
17
16
  Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
 
17
16
  Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
 
17
16
  Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
 
17
16
  Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
@@ -33,12 +32,12 @@ You are a task router for a Next.js frontend agent team. You **do not** implemen
33
32
 
34
33
  | intent | Signals in prompt | Default steps |
35
34
  |--------|-------------------|---------------|
36
- | `feature` | «добавь» (add), «новая» (new), «реализуй» (implement), «сделай» (do/build), new UI/API/store | task-analyst → feature-developer (unit-in-dev) → build-verifier → code-reviewer → qa-tester (e2e-only) or playwright trio | <!-- i18n-keep: E4 -->
37
- | `bugfix` | «баг» (bug), «fix», «не работает» (doesn't work), «падает» (crashes), «ошибка» (error), regression | debugger → feature-developer (skipIf debugger.fixed) → build-verifier → code-reviewer → qa-tester (regression) | <!-- i18n-keep: E4 -->
38
- | `ci-fix` | «CI», «упал пайплайн» (pipeline failed), «красный PR» (red PR), «failing check», «lint в CI» (lint in CI) | ci-investigator → feature-developer (skipIf ci-investigator.resolved) → build-verifier → code-reviewer | <!-- i18n-keep: E4 -->
39
- | `migration` | «миграция» (migration), «upgrade», «обнови Next» (upgrade Next), «переход на» (move to), major version | task-analyst → migration-specialist → feature-developer → build-verifier → code-reviewer → qa-tester (regression) | <!-- i18n-keep: E4 -->
35
+ | `feature` | «добавь» (add), «новая» (new), «реализуй» (implement), «сделай» (do/build), new UI/API/store | task-analyst → feature-developer (unit authored) → qa-tester (e2e authored; skip when no e2e AC) → build-verifier (closure) → code-reviewer | <!-- i18n-keep: E4 -->
36
+ | `bugfix` | «баг» (bug), «fix», «не работает» (doesn't work), «падает» (crashes), «ошибка» (error), regression | debugger → feature-developer (skipIf debugger.fixed) → qa-tester (regression authored) → build-verifier (closure) → code-reviewer | <!-- i18n-keep: E4 -->
37
+ | `ci-fix` | «CI», «упал пайплайн» (pipeline failed), «красный PR» (red PR), «failing check», «lint в CI» (lint in CI) | ci-investigator → feature-developer (skipIf ci-investigator.resolved) → build-verifier (closure) → code-reviewer | <!-- i18n-keep: E4 -->
38
+ | `migration` | «миграция» (migration), «upgrade», «обнови Next» (upgrade Next), «переход на» (move to), major version | task-analyst → migration-specialist → feature-developer → qa-tester (regression authored) → build-verifier (closure) → code-reviewer | <!-- i18n-keep: E4 -->
40
39
  | `perf-audit` | «производительность» (performance), «perf», «bundle», «LCP», «медленно» (slow), «waterfall» | performance-auditor | <!-- i18n-keep: E4 -->
41
- | `a11y` | «a11y», «доступность» (accessibility), «accessibility», «WCAG», «screen reader», «клавиатура» (keyboard) | task-analyst → feature-developer → build-verifier → accessibility-reviewer → code-reviewer | <!-- i18n-keep: E4 -->
40
+ | `a11y` | «a11y», «доступность» (accessibility), «accessibility», «WCAG», «screen reader», «клавиатура» (keyboard) | task-analyst → feature-developer → accessibility-reviewer → qa-tester (e2e authored, if AC) → build-verifier (closure) → code-reviewer | <!-- i18n-keep: E4 -->
42
41
  | `mockup-review` | «ревью макета» (mockup review), «mockup review», «проверь Figma» (check Figma), «figma review», «макет» (mockup) + review verb, `figma.com` + review-not-implement | mockup-reviewer | <!-- i18n-keep: E4 -->
43
42
  | `ux-design` | «разработай UX» (design UX), «спроектируй» (design/plan) flows, «journey», «IA», «state matrix», «ревью UX» (UX review) without Figma | task-analyst | <!-- i18n-keep: E4 -->
44
43
  | `review-only` | «ревью» (review), «review MR», «проверь diff» (check diff), «code review» | code-reviewer | <!-- i18n-keep: E4 -->
@@ -65,10 +64,12 @@ Set optional top-level `"profile": "full" | "standard" | "light"` in `pipeline.j
65
64
 
66
65
  | Profile | When | Typical `feature` steps |
67
66
  |---------|------|------------------------|
68
- | `full` | App code with a named risk flag or an e2e AC: multi-layer, new public API, incomplete AC | analyst → [architect] → developer → build-verifier → reviewer → qa-tester |
67
+ | `full` | App code with a named risk flag or an e2e AC: multi-layer, new public API, incomplete AC | analyst → [architect] → developer → qa-tester → build-verifier → reviewer |
69
68
  | `standard` | Single layer, default work | analyst → developer → build-verifier → reviewer |
70
69
  | `light` | Trivial: one file/layer, explicit AC, «просто поправь» (just fix it), «typo», user «без pipeline» (without pipeline) | developer → build-verifier | <!-- i18n-keep: E4 -->
71
70
 
71
+ **Closure order:** the last authoring step (`feature-developer`, `qa-tester`, a test generator) is always followed by exactly one `build-verifier`; `code-reviewer` reviews the validated tree. A review fix re-enters the delta verifier before the reviewer sees it again.
72
+
72
73
  **Light signals:** one file, one layer, explicit AC in prompt, no architectural risk. **Never skip `build-verifier`** after developer when `app/**` changed. **Skip `code-reviewer`** in light only for non-prod preset/docs tasks — for `app/src` changes prefer standard.
73
74
 
74
75
  **Profile caps:** a pipeline that cannot name a risk flag is `standard`, not `full`. Do not raise the profile because the raw file count is large: generated trees, snapshots, CLI goldens, docs, and test fixtures do not count.
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
 
17
16
  Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
  - `.mavis/rules/tests-unit.md`
17
16
  - `.mavis/rules/react-next-anti-hallucination.md` — phantom import banlist
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
  - `.mavis/rules/tests-unit.md`
17
16
  - `.mavis/rules/react-next-anti-hallucination.md` — phantom import banlist
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
11
11
  - `.mavis/rules/reference-features.md` — analog files first
12
12
  - `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
13
13
  - `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
14
- - `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
15
14
  - `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
16
15
  - `.mavis/rules/tests-unit.md`
17
16
  - `.mavis/rules/react-next-anti-hallucination.md` — phantom import banlist
@@ -13,12 +13,6 @@ Procedure files are copied to `.mavis/commands/` on `ai-rules init mavis --prese
13
13
  | `/update` | Reinstall each installed tool with the preset recorded at init |
14
14
  | `/upstream-research` | Repository-only (not in the published package): queue the weekly upstream evolution review; run one `schedule --once` tick when the timer is offline |
15
15
  | `/migrate-tasks` | Create or reconcile `.ai.local/team/team.db`; writes only the delta |
16
- | `/ui-start` | Start the shipped dashboard in the background on loopback; no Docker, no build step |
17
- | `/ui-stop` | Stop the server this repository started, then clear its marker |
18
-
19
- Both UI commands ship on the `next` stack only. On every other stack the contract is the verb itself:
20
- `node .ai.local/scripts/team-db.mjs ui start|status|stop|restart`, with
21
- `node .ai.local/scripts/team-db.mjs serve` as the foreground fallback for an engine that predates it.
22
16
 
23
17
  `/task-evil` is intentionally autonomous. Use it when you will review the diff and `decisions.md` after the run; use `/task` when the plan or a product decision needs a human gate.
24
18
 
@@ -1283,11 +1283,15 @@ function focusDigestMarkdown(dir, statusSnapshot) {
1283
1283
  }
1284
1284
  } catch {}
1285
1285
  }
1286
+ // Five entries is enough to resume; a longer list is a status dump, not a
1287
+ // pointer. The line budget below still bounds a single entry with many paths.
1288
+ const MAX_FOCUS_ENTRIES = 5;
1289
+ const shownIncomplete = incomplete.slice(0, MAX_FOCUS_ENTRIES);
1286
1290
  const pathLines = [];
1287
1291
  if (incomplete.length === 0) pathLines.push(' - (none)');
1288
1292
  else {
1289
- for (let index = 0; index < incomplete.length; index += 1) {
1290
- const item = incomplete[index];
1293
+ for (let index = 0; index < shownIncomplete.length; index += 1) {
1294
+ const item = shownIncomplete[index];
1291
1295
  if (item.paths.length === 0) pathLines.push(' - ' + item.id + ': (none)');
1292
1296
  else {
1293
1297
  for (let pathIndex = 0; pathIndex < item.paths.length; pathIndex += 1) {
@@ -1295,6 +1299,9 @@ function focusDigestMarkdown(dir, statusSnapshot) {
1295
1299
  }
1296
1300
  }
1297
1301
  }
1302
+ if (incomplete.length > shownIncomplete.length) {
1303
+ pathLines.push(' - (+' + String(incomplete.length - shownIncomplete.length) + ' more incomplete entries)');
1304
+ }
1298
1305
  }
1299
1306
  let readyLine = '- decomposition ready set: (none)';
1300
1307
  try {
@@ -2643,7 +2650,16 @@ if (status.state === 'changes_requested') {
2643
2650
  process.stdout.write('{}');
2644
2651
  process.exit(0);
2645
2652
  }
2646
- const retryAfterFixStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
2653
+ const reviewerStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
2654
+ let verifierStepIndex = -1;
2655
+ for (let index = reviewerStepIndex - 1; index >= 0; index -= 1) {
2656
+ if (getStepAgents(steps[index]).includes('build-verifier')) {
2657
+ verifierStepIndex = index;
2658
+ break;
2659
+ }
2660
+ }
2661
+ const retryGate = verifierStepIndex >= 0 ? 'build-verifier' : reviewer;
2662
+ const retryAfterFixStepIndex = verifierStepIndex >= 0 ? verifierStepIndex : reviewerStepIndex;
2647
2663
  const developerIndex = scheduleRetry('feature-developer', reviewer, finishedAttempt);
2648
2664
  if (developerIndex < 0) {
2649
2665
  beginHumanGate();
@@ -2656,10 +2672,10 @@ if (status.state === 'changes_requested') {
2656
2672
  currentAgent: 'feature-developer',
2657
2673
  state: 'in_progress',
2658
2674
  phase: 'executing',
2659
- retryAfterFix: reviewer,
2675
+ retryAfterFix: retryGate,
2660
2676
  retryAfterFixStepIndex,
2661
2677
  });
2662
- out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${reviewer}.`);
2678
+ out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${retryGate}.`);
2663
2679
  process.exit(0);
2664
2680
  }
2665
2681
 
@@ -14,6 +14,7 @@
14
14
  */
15
15
  import fs from 'node:fs';
16
16
  import path from 'node:path';
17
+ import crypto from 'node:crypto';
17
18
  import { fileURLToPath } from 'node:url';
18
19
 
19
20
  export const OUTPUT_CAP = 4096;
@@ -29,6 +30,15 @@ const isRealDirectory = (target) => {
29
30
  }
30
31
  };
31
32
 
33
+ /** First 8 hex of the file body; a session-local re-read gate, not a security hash. */
34
+ const shortHash = (file) => {
35
+ try {
36
+ return crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex').slice(0, 8);
37
+ } catch {
38
+ return '????????';
39
+ }
40
+ };
41
+
32
42
  const insideRoot = (root, abs) => {
33
43
  const relative = path.relative(root, abs);
34
44
  return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
@@ -168,6 +178,13 @@ export const renderReport = (root, inputs) => {
168
178
  }
169
179
  if (blocks.length === 0) return { text: 'overlays=0', chains: [], read: [] };
170
180
  const lines = [`overlays=${overlaySet.size}`, ...blocks.flatMap((block) => block.lines)];
181
+ const readSet = new Set(read);
182
+ if (readSet.size > 0) {
183
+ lines.push('hashes:');
184
+ for (const file of [...readSet].sort()) {
185
+ lines.push(`${file} ${shortHash(path.join(root, file))}`);
186
+ }
187
+ }
171
188
  return {
172
189
  text: lines.join('\n'),
173
190
  chains: blocks.map((block) => ({ for: block.for, overlays: block.overlays })),
@@ -201,8 +201,8 @@ Additional states: `blocked` — a step (or a parallel producer) cannot proceed;
201
201
  | `in_progress` | Current step running |
202
202
  | `completed` | Current step done; hook advances |
203
203
  | `awaiting_approval` | Human gate; wait for `/task-continue` |
204
- | `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
205
- | `validation_failed` | build-verifier failed; re-run developer then build-verifier |
204
+ | `changes_requested` | Reviewer blocked; re-run developer → `build-verifier` (delta) → same reviewer when the fix touches code/tests; docs/artifacts only → same reviewer |
205
+ | `validation_failed` | build-verifier failed; re-run developer then `build-verifier` (delta) |
206
206
  | `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) |
207
207
  | `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. |
208
208
  | `paused` | Operator sentinel engaged; the hook recorded the pause and refused to advance or hand off. Remove the sentinel and run `/task-continue`. |
@@ -242,8 +242,8 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
242
242
  3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
243
243
  4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
244
244
  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`.
245
- 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.
246
- 7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
245
+ 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.
246
+ 7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier (delta).
247
247
  8. When all steps complete, suggest `/technical-retro <slug>`.
248
248
  9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
249
249
  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.
@@ -280,7 +280,7 @@ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
280
280
  **Token usage.** When the host exposes token counts, append a `usage_recorded` event next to the attempt:
281
281
 
282
282
  ```bash
283
- node .ai.local/scripts/record-usage.mjs --task <slug> --attempt <attemptId> --input <n> --output <n> [--cached <n>] [--model <id>]
283
+ 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>]
284
284
  ```
285
285
 
286
286
  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.
@@ -7,12 +7,8 @@
7
7
 
8
8
  # Principles
9
9
 
10
- - **KISS:** the simplest change in the repository’s patterns.
11
- - **DRY + Rule of Three:** share only after the 3rd repetition (wrong abstraction costs more than duplication).
12
- - **YAGNI:** no APIs, flags, or “for later” layers without a current requirement.
13
- - **SOLID:** S — one reason to change; O — composition/new implementations; L — subtype contract; I — narrow ports; D — abstractions (ports), details in stack adapters.
14
- - **CUPID:** Composable; Unix philosophy (one responsibility); Predictable; Idiomatic (repo); Domain-based.
15
- - **Composition over inheritance;** Law of Demeter — no `a.b.c.d` chains; via public API / facade.
10
+ - **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.
11
+ - **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.
16
12
 
17
13
  # Over-abstraction guardrails
18
14
 
@@ -12,7 +12,7 @@ Typical feature with data and UI. Concrete directories and rule stems — in the
12
12
  4. **State** — store / ViewModel / use cases; no direct HTTP and no DTOs in UI.
13
13
  5. **UI** — thin views/components; data via state; design system. If the prompt or `brief.md` contains a `figma.com` URL, **mockup review must complete** (or the user must continue past FAIL/`BLOCKED_MCP` via `/task-continue`) **before UI work**. When required-signal and **no** `figma.com`, **`ux-design.md` must exist** (not `INCOMPLETE`) before UI work — else blocked, hand back to analyst. Non-UI tasks no-op these gates. When a mockup contract exists for the WP, the UI step consumes it (per-node spec = the binding baseline) and a post-implementation verification gate runs against it (scope per `mockup-review` § Post-implementation gate) — screenshot / value / state / structural-parity diff plus a freeze re-check; unmapped implemented components are findings, not silent additions.
14
14
  6. **Tests** — unit for mappers / non-trivial logic; e2e/UI per stack convention.
15
- 7. **Completion** — stack post-change gate (lint/build) + package/toolchain rules. When the current WP spans **more than one** layer or module, `implementation.md` includes a **Code Map** (3–8 annotated repo-relative paths) and **Suggested Review Order** (`concern | path:line | ≤15 word note`). Omit both for a single-file or single-layer WP.
15
+ 7. **Completion** — closure gate: `build-verifier` runs the stack gate set **once**, after the last authoring step. During Build (steps 1–6) do not run project lint/test/build; author code and tests. When the current WP spans **more than one** layer or module, `implementation.md` includes a **Code Map** (3–8 annotated repo-relative paths) and **Suggested Review Order** (`concern | path:line | ≤15 word note`). Omit both for a single-file or single-layer WP.
16
16
 
17
17
  ## Context hygiene
18
18
 
@@ -20,13 +20,9 @@ A command whose output can exceed ~4 KB — a test run, a build/lint log, `git l
20
20
 
21
21
  ## Iterative refinement loop
22
22
 
23
- Every stage runs the named loop **draft → evaluate against named criteria → refine**:
23
+ Every stage runs the named loop **draft → structural evaluation → refine** against a named oracle: reference-feature parity, layer/import shape, schema/contract parity, or review. The oracle is **not** a project test run. Tests are authored in the stage and executed by the closure gate; a failing test is closure evidence, not a per-stage trigger. When `implementationRail: tdd` is explicitly on, targeted tests are the documented cadence exception.
24
24
 
25
- - **Draft** the artifact (or work package) for the stage.
26
- - **Evaluate** it against the stage's "done when" / exit criteria with the **named oracle** — a structural gate, a reviewer parity check, a test suite, or a human approval.
27
- - **Refine** and re-evaluate until the oracle passes or the human re-scopes; loop back to the owning task, never forward past a failed oracle.
28
-
29
- **Exit criteria:** a layer or stage is complete only when its named criteria hold (mapper tests green, parity check passes, gate output clean). Do not advance to the next checklist step while the current step's oracle fails; a repeatedly failing oracle triggers **plan revision**.
25
+ **Exit criteria:** a layer or stage is complete only when its structural criteria hold (reference parity, barrel/import shape, authored test present). Do not advance to the next checklist step while the current step's oracle fails; a repeatedly failing oracle triggers **plan revision**.
30
26
 
31
27
  ## Data flow (orientation)
32
28
 
@@ -100,7 +96,11 @@ Typical feature with backend data and shared state. Layer details — `architect
100
96
  6. **UI** — types from `@/types`, no DTOs (`react-ui.md`, `architecture-boundaries-ui.md`, `no-props-spread.md`).
101
97
  7. **Mocks** — per repo layout; register in `app/src/mocks/handlers.ts` (see below).
102
98
  8. **Tests** — unit for mappers (`tests-unit.md`); e2e from `*.cases.md` (`tests-e2e-structure.md`, `playwright-agents.md`).
103
- 9. **Completion** — **`post-change-lint.md`**: `lint:js` + `lint:css` + `type-check`; package manager — `package-manager.md`. When the current WP spans **more than one** layer or module, `implementation.md` includes a **Code Map** (3–8 annotated paths) and **Suggested Review Order** (`concern | path:line | ≤15 word note`). Omit both for a single-file or single-layer WP.
99
+ 9. **Completion** — closure gate: **`post-change-lint.md`** runs **once**, after the last authoring step (`build-verifier` owns it): `lint:js` + `lint:css` + `type-check`; package manager — `package-manager.md`. Do not run project lint/test/build in steps 1–8; author code and tests only. When the current WP spans **more than one** layer or module, `implementation.md` includes a **Code Map** (3–8 annotated paths) and **Suggested Review Order** (`concern | path:line | ≤15 word note`). Omit both for a single-file or single-layer WP.
100
+
101
+ ## Context hygiene
102
+
103
+ A command whose output can exceed ~4 KB — a test run, a build/lint log, `git log`, a diff — is piped through `.ai.local/scripts/dump-output.mjs --task <slug>` instead of being read whole. Work from its ≤40-line head and the stored file (`grep -n` or `team-db.mjs search`), and record the repo-relative `outputs/…` path in `implementation.md` or `validation-report.md` when it informed a decision. Do not read the whole output into context.
104
104
 
105
105
  ## Data flow (orientation)
106
106
 
@@ -163,7 +163,7 @@ When adding or extending a feature, **walk the checklist** and the rules from th
163
163
 
164
164
  ## Iterative refinement loop
165
165
 
166
- Every stage runs the named loop **draft → evaluate against named criteria → refine** with a named oracle (structural gate, reviewer parity check, test suite, or human approval). **Exit criteria:** a layer or stage is complete only when its named criteria hold; do not advance past a failing oracle. A repeatedly failing oracle triggers **plan revision**.
166
+ Every stage runs the named loop **draft → structural evaluation → refine** against a named oracle: reference-feature parity, layer/import shape, schema/contract parity, or review. The oracle is **not** a project test run. Tests are authored in the stage and executed by the closure gate (`build-verifier`); a failing test is closure evidence, not a per-stage trigger. When `implementationRail: tdd` is explicitly on, targeted tests are the documented cadence exception. **Exit criteria:** a layer or stage is complete only when its structural criteria hold (reference parity, barrel/import shape, authored test present); do not advance past a failing oracle. A repeatedly failing oracle triggers **plan revision**.
167
167
 
168
168
  ## Related
169
169
 
@@ -1,18 +1,14 @@
1
- # Linters after code changes
1
+ # Linters at implementation closure
2
2
 
3
- **Requestable, but must run on code changes:** the rule is not always-on (saves context); after editing source files the agent **must** follow this checklist.
3
+ **Requestable, not always-on.** Read it before the closure gate — not after every edit.
4
4
 
5
5
  ## When to apply
6
6
 
7
- After **any** change to source files in `app/**` (TS/TSX/JS/MJS, CSS, styled/Linaria in `.ts`/`.tsx`).
7
+ At **implementation closure**: after the last authoring step (code and tests) is complete, and after a fix that changes lint/type-check inputs.
8
8
 
9
- Exceptions: documentation edits outside `app/`, CI configs, `.mavis/rules/**`, if application executable code did not change.
9
+ In a pipeline, **`build-verifier` owns this pass**; the developer does not run it. During implementation (Build), write code and tests only — do **not** run project `lint`, `type-check`, test, e2e, or `build`.
10
10
 
11
- **Pipeline exception:** if the task runs through the agent team and the next step is `build-verifier`, the developer may limit lint/type-check to **changed files**; full run is **`build-verifier`’s** responsibility. In single-agent mode (no pipeline) — always a full run.
12
-
13
- **Secondary packages:** when the repo has more than one package with a manifest (e.g. `app/` + `storybook/`), run each package's own scripts from its own directory. Do not conflate runners (app unit runner vs catalog runner).
14
-
15
- **Run the package script, not a bare runner:** prefer `yarn lint:js` / `yarn test` over `npx eslint` / `npx jest`. Scripts carry env (`TZ`), coverage, and reporters that CI depends on; a bare runner can diverge from CI.
11
+ Phase rule: **Build** = author code and tests (no project gate); **Closure** = one full pass by `build-verifier`; **Delta** = only commands whose inputs changed. Exceptions: debug/CI reproduction of the single failing check, test-only/test-healing intent, an explicit user request, and single-agent mode (one closure pass at the end of the turn).
16
12
 
17
13
  ## Required commands
18
14
 
@@ -20,16 +16,16 @@ Working directory — **`app/`**. Package manager — **`package-manager.md`**.
20
16
 
21
17
  1. **`lint:js`** — full ESLint across the project.
22
18
  2. **`lint:css`** — full Stylelint (`**/*.{css,ts}`).
23
-
24
- Targeted lint on one file **does not replace** a full run before completing the task (except the pipeline exception above).
19
+ 3. **`type-check`** — when TypeScript changed.
20
+ 4. **`build`** — only when the change-set touches routes, `next.config.*`, `output: export`, or the AC requires a production build.
25
21
 
26
22
  ## Procedure
27
23
 
28
- 1. Finish code edits.
29
- 2. Run **`lint:js`** and **`lint:css`** from `app/`.
24
+ 1. Confirm all authoring is complete.
25
+ 2. Run the closure set **once**.
30
26
  3. Analyze full output; fix errors/warnings in changed files; for Stylelint — **`lint:css --fix`** if auto-fixable.
31
- 4. Repeat until exit code 0 or record a blocker in the user response.
32
- 5. **`type-check`** when TypeScript changed. CI level: **`lint`** (= `lint:js` + `lint:css` + `type-check`).
27
+ 4. Re-run **only the command that failed**. Never re-run a green command with unchanged inputs.
28
+ 5. Record the result in `validation-report.md`, not `implementation.md`.
33
29
 
34
30
  ## What to fix
35
31
 
@@ -29,7 +29,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
29
29
  - [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
30
30
  - [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn release:gate`; keep every registered golden stem paired
31
31
  - [ ] **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.
32
- - [ ] **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)
32
+ - [ ] **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)
33
33
 
34
34
  ## Pointers
35
35
 
@@ -39,7 +39,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
39
39
  - Sync: `preset-twin-sync`
40
40
  - Budget: `preset-token-budget`
41
41
  - Leakage: `preset-no-cross-stack-leakage`
42
- - 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`)
42
+ - Validation: same `check:task` / `check:changed` loop; `yarn release:gate` before a release (`packages/ai-rules/scripts/release-gate.sh`)
43
43
  - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
44
44
  - Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
45
45
  - Orchestrator: when editing presets, load this checklist + twin-sync
@@ -10,7 +10,7 @@ Load `react-next-anti-hallucination` before writing or patching code or tests.
10
10
  2. If `docs/specs/INDEX.md` exists **or** brief/handoff lists approved generated specs, resolve via **`product-specs`** and treat approved specs as behavior SoT before layer work (soft-fail on miss — do not invent behavior). If generation was requested but not yet approved, stop for human gate — do not implement against draft-only gaps.
11
11
  3. Read **`feature-delivery-workflow.md`** and **`reference-features.md`** — follow layer order and mirror closest reference feature.
12
12
  4. Add or update focused tests for changed behavior.
13
- 5. Validation from `app/`: **invoke** **`post-change-lint.md`** after code edits (requestable, not always-on — but **must** when code changed). Pipeline: scoped lint OK if next step is `build-verifier`.
13
+ 5. Validation from `app/`: **`post-change-lint.md`** is the closure gate. Do not run project lint/type-check/test/build during implementation; `build-verifier` runs the full set **once** after the last authoring step.
14
14
 
15
15
  - If the prompt or brief contains a `figma.com` URL, load requestable skill `mockup-review` and do not start UI work until the mockup-reviewer step is completed or the user continued past FAIL/`BLOCKED_MCP`.
16
16
  - When required-signal (user asked UX, AC require flows/states, or spec-gen page/feature) and **no** `figma.com` URL: `ux-design.md` must exist on the analysis manifest entry (verdict not `INCOMPLETE`) before UI work. If missing, **blocked** — hand back to `task-analyst`. Parallel to the mockup gate when Figma exists.
@@ -31,4 +31,4 @@ Fix selectors, waits, setup, or page-object details without weakening business a
31
31
 
32
32
  ## Validation
33
33
 
34
- Run the affected spec when feasible. If the environment blocks execution, report the command that should be run and the blocker.
34
+ For a test-authoring or test-healing intent, run the targeted spec and report the command/result. For feature implementation, author the spec only; `build-verifier` runs the affected e2e at closure.