@bonesofspring/ai-rules 0.2.37 → 0.2.39

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 (749) hide show
  1. package/CHANGELOG.md +282 -1
  2. package/README.md +23 -2
  3. package/bin/cli.js +106 -1
  4. package/bin/lib/engine-scripts.js +22 -0
  5. package/bin/lib/fs-utils.js +78 -11
  6. package/bin/lib/merged-config.js +30 -16
  7. package/bin/lib/seed-ai-local-team.js +160 -12
  8. package/bin/opencode-install.js +37 -52
  9. package/docs/OPENCODE.md +4 -4
  10. package/docs/specs/INDEX.md +5 -2
  11. package/package.json +4 -1
  12. package/presets/_shared/ai-local/scripts/derive-gate-signals.mjs +171 -0
  13. package/presets/_shared/ai-local/scripts/efficacy-oracle.mjs +581 -0
  14. package/presets/_shared/ai-local/scripts/lock.mjs +146 -0
  15. package/presets/_shared/ai-local/scripts/rule-improver.mjs +795 -0
  16. package/presets/_shared/ai-local/scripts/run.mjs +318 -0
  17. package/presets/_shared/ai-local/scripts/signals.mjs +286 -0
  18. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +1 -1
  19. package/presets/_shared/core/quality/self-review-and-context-hygiene.md +8 -7
  20. package/presets/_shared/hooks/README.md +5 -0
  21. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +111 -23
  22. package/presets/_shared/hooks/check-preset-update.mjs +227 -0
  23. package/presets/claude/android-kotlin/CLAUDE.md +1 -1
  24. package/presets/claude/android-kotlin/REPO_AGENTS.md +14 -0
  25. package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
  26. package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -1
  27. package/presets/claude/android-kotlin/agents/debugger.md +1 -1
  28. package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
  29. package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
  30. package/presets/claude/android-kotlin/commands/README.md +1 -0
  31. package/presets/claude/android-kotlin/commands/task-continue.md +9 -0
  32. package/presets/claude/android-kotlin/commands/technical-retro.md +8 -0
  33. package/presets/claude/android-kotlin/commands/update.md +39 -0
  34. package/presets/claude/android-kotlin/hooks/README.md +1 -0
  35. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +111 -23
  36. package/presets/claude/android-kotlin/hooks/check-preset-update.mjs +227 -0
  37. package/presets/claude/android-kotlin/hooks/examples/README.md +1 -1
  38. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  39. package/presets/claude/android-kotlin/settings.json +14 -1
  40. package/presets/claude/android-kotlin/skills/technical-retro/SKILL.md +2 -0
  41. package/presets/claude/go/CLAUDE.md +1 -1
  42. package/presets/claude/go/REPO_AGENTS.md +14 -0
  43. package/presets/claude/go/agents/build-verifier.md +1 -1
  44. package/presets/claude/go/agents/code-reviewer.md +1 -1
  45. package/presets/claude/go/agents/debugger.md +1 -1
  46. package/presets/claude/go/agents/feature-developer.md +1 -1
  47. package/presets/claude/go/agents/task-analyst.md +1 -1
  48. package/presets/claude/go/commands/README.md +1 -0
  49. package/presets/claude/go/commands/task-continue.md +9 -0
  50. package/presets/claude/go/commands/technical-retro.md +8 -0
  51. package/presets/claude/go/commands/update.md +39 -0
  52. package/presets/claude/go/hooks/README.md +1 -0
  53. package/presets/claude/go/hooks/chain-team-phases.sh +111 -23
  54. package/presets/claude/go/hooks/check-preset-update.mjs +227 -0
  55. package/presets/claude/go/hooks/examples/README.md +1 -1
  56. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  57. package/presets/claude/go/settings.json +14 -1
  58. package/presets/claude/go/skills/technical-retro/SKILL.md +2 -0
  59. package/presets/claude/ios-swift/CLAUDE.md +1 -1
  60. package/presets/claude/ios-swift/REPO_AGENTS.md +14 -0
  61. package/presets/claude/ios-swift/agents/build-verifier.md +1 -1
  62. package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
  63. package/presets/claude/ios-swift/agents/debugger.md +1 -1
  64. package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
  65. package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
  66. package/presets/claude/ios-swift/commands/README.md +1 -0
  67. package/presets/claude/ios-swift/commands/task-continue.md +9 -0
  68. package/presets/claude/ios-swift/commands/technical-retro.md +8 -0
  69. package/presets/claude/ios-swift/commands/update.md +39 -0
  70. package/presets/claude/ios-swift/hooks/README.md +1 -0
  71. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +111 -23
  72. package/presets/claude/ios-swift/hooks/check-preset-update.mjs +227 -0
  73. package/presets/claude/ios-swift/hooks/examples/README.md +1 -1
  74. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  75. package/presets/claude/ios-swift/settings.json +14 -1
  76. package/presets/claude/ios-swift/skills/technical-retro/SKILL.md +2 -0
  77. package/presets/claude/java/CLAUDE.md +2 -2
  78. package/presets/claude/java/REPO_AGENTS.md +14 -0
  79. package/presets/claude/java/agents/build-verifier.md +1 -1
  80. package/presets/claude/java/agents/code-reviewer.md +1 -1
  81. package/presets/claude/java/agents/debugger.md +1 -1
  82. package/presets/claude/java/agents/feature-developer.md +1 -1
  83. package/presets/claude/java/agents/task-analyst.md +1 -1
  84. package/presets/claude/java/commands/README.md +1 -0
  85. package/presets/claude/java/commands/task-continue.md +9 -0
  86. package/presets/claude/java/commands/technical-retro.md +8 -0
  87. package/presets/claude/java/commands/update.md +39 -0
  88. package/presets/claude/java/hooks/README.md +1 -0
  89. package/presets/claude/java/hooks/chain-team-phases.sh +111 -23
  90. package/presets/claude/java/hooks/check-preset-update.mjs +227 -0
  91. package/presets/claude/java/hooks/examples/README.md +1 -1
  92. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  93. package/presets/claude/java/settings.json +14 -1
  94. package/presets/claude/java/skills/technical-retro/SKILL.md +2 -0
  95. package/presets/claude/mcp-ts/CLAUDE.md +1 -1
  96. package/presets/claude/mcp-ts/REPO_AGENTS.md +14 -0
  97. package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
  98. package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
  99. package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
  100. package/presets/claude/mcp-ts/commands/README.md +1 -0
  101. package/presets/claude/mcp-ts/commands/task-continue.md +9 -0
  102. package/presets/claude/mcp-ts/commands/technical-retro.md +8 -0
  103. package/presets/claude/mcp-ts/commands/update.md +39 -0
  104. package/presets/claude/mcp-ts/hooks/README.md +1 -0
  105. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +111 -23
  106. package/presets/claude/mcp-ts/hooks/check-preset-update.mjs +227 -0
  107. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  108. package/presets/claude/mcp-ts/settings.json +14 -1
  109. package/presets/claude/next/CLAUDE.md +2 -1
  110. package/presets/claude/next/REPO_AGENTS.md +15 -1
  111. package/presets/claude/next/agents/build-verifier.md +1 -1
  112. package/presets/claude/next/agents/code-reviewer.md +1 -1
  113. package/presets/claude/next/agents/debugger.md +1 -1
  114. package/presets/claude/next/agents/feature-developer.md +1 -1
  115. package/presets/claude/next/agents/task-analyst.md +1 -1
  116. package/presets/claude/next/agents/task-router.md +1 -1
  117. package/presets/claude/next/commands/README.md +1 -0
  118. package/presets/claude/next/commands/task-continue.md +9 -0
  119. package/presets/claude/next/commands/technical-retro.md +8 -0
  120. package/presets/claude/next/commands/update.md +39 -0
  121. package/presets/claude/next/hooks/README.md +1 -0
  122. package/presets/claude/next/hooks/chain-team-phases.sh +111 -23
  123. package/presets/claude/next/hooks/check-preset-update.mjs +227 -0
  124. package/presets/claude/next/hooks/examples/README.md +1 -1
  125. package/presets/claude/next/rules/anti-hallucination/react-next-anti-hallucination.md +21 -18
  126. package/presets/claude/next/rules/stack/next-app-router.md +27 -0
  127. package/presets/claude/next/rules/stack/next-static-export.md +16 -0
  128. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  129. package/presets/claude/next/rules/tooling-and-review/security-next.md +16 -2
  130. package/presets/claude/next/rules/ui-and-accessibility/component-catalog-gate.md +13 -0
  131. package/presets/claude/next/rules/ui-and-accessibility/forms-validation.md +12 -0
  132. package/presets/claude/next/settings.json +13 -0
  133. package/presets/claude/next/skills/technical-retro/SKILL.md +2 -0
  134. package/presets/claude/next/team/fixtures/feature-light.json +2 -1
  135. package/presets/claude/next/team/fixtures/feature-ui-standard.json +24 -0
  136. package/presets/claude/nuxt/CLAUDE.md +2 -1
  137. package/presets/claude/nuxt/REPO_AGENTS.md +14 -0
  138. package/presets/claude/nuxt/agents/build-verifier.md +1 -1
  139. package/presets/claude/nuxt/agents/code-reviewer.md +1 -1
  140. package/presets/claude/nuxt/agents/debugger.md +1 -1
  141. package/presets/claude/nuxt/agents/feature-developer.md +1 -1
  142. package/presets/claude/nuxt/agents/task-analyst.md +1 -1
  143. package/presets/claude/nuxt/commands/README.md +1 -0
  144. package/presets/claude/nuxt/commands/task-continue.md +9 -0
  145. package/presets/claude/nuxt/commands/technical-retro.md +8 -0
  146. package/presets/claude/nuxt/commands/update.md +39 -0
  147. package/presets/claude/nuxt/hooks/README.md +1 -0
  148. package/presets/claude/nuxt/hooks/chain-team-phases.sh +111 -23
  149. package/presets/claude/nuxt/hooks/check-preset-update.mjs +227 -0
  150. package/presets/claude/nuxt/hooks/examples/README.md +1 -1
  151. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  152. package/presets/claude/nuxt/settings.json +13 -0
  153. package/presets/claude/nuxt/skills/technical-retro/SKILL.md +2 -0
  154. package/presets/claude/php-hexagonal/CLAUDE.md +2 -2
  155. package/presets/claude/php-hexagonal/REPO_AGENTS.md +14 -0
  156. package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
  157. package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
  158. package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
  159. package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
  160. package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
  161. package/presets/claude/php-hexagonal/commands/README.md +1 -0
  162. package/presets/claude/php-hexagonal/commands/task-continue.md +9 -0
  163. package/presets/claude/php-hexagonal/commands/technical-retro.md +8 -0
  164. package/presets/claude/php-hexagonal/commands/update.md +39 -0
  165. package/presets/claude/php-hexagonal/hooks/README.md +1 -0
  166. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +111 -23
  167. package/presets/claude/php-hexagonal/hooks/check-preset-update.mjs +227 -0
  168. package/presets/claude/php-hexagonal/hooks/examples/README.md +1 -1
  169. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  170. package/presets/claude/php-hexagonal/settings.json +14 -1
  171. package/presets/claude/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
  172. package/presets/claude/php-laravel/CLAUDE.md +1 -1
  173. package/presets/claude/php-laravel/REPO_AGENTS.md +14 -0
  174. package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
  175. package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
  176. package/presets/claude/php-laravel/agents/debugger.md +1 -1
  177. package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
  178. package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
  179. package/presets/claude/php-laravel/commands/README.md +1 -0
  180. package/presets/claude/php-laravel/commands/task-continue.md +9 -0
  181. package/presets/claude/php-laravel/commands/technical-retro.md +8 -0
  182. package/presets/claude/php-laravel/commands/update.md +39 -0
  183. package/presets/claude/php-laravel/hooks/README.md +1 -0
  184. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +111 -23
  185. package/presets/claude/php-laravel/hooks/check-preset-update.mjs +227 -0
  186. package/presets/claude/php-laravel/hooks/examples/README.md +1 -1
  187. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  188. package/presets/claude/php-laravel/settings.json +14 -1
  189. package/presets/claude/php-laravel/skills/technical-retro/SKILL.md +2 -0
  190. package/presets/claude/svelte/CLAUDE.md +2 -1
  191. package/presets/claude/svelte/REPO_AGENTS.md +14 -0
  192. package/presets/claude/svelte/agents/build-verifier.md +1 -1
  193. package/presets/claude/svelte/agents/code-reviewer.md +1 -1
  194. package/presets/claude/svelte/agents/debugger.md +1 -1
  195. package/presets/claude/svelte/agents/feature-developer.md +1 -1
  196. package/presets/claude/svelte/agents/task-analyst.md +1 -1
  197. package/presets/claude/svelte/commands/README.md +1 -0
  198. package/presets/claude/svelte/commands/task-continue.md +9 -0
  199. package/presets/claude/svelte/commands/technical-retro.md +8 -0
  200. package/presets/claude/svelte/commands/update.md +39 -0
  201. package/presets/claude/svelte/hooks/README.md +1 -0
  202. package/presets/claude/svelte/hooks/chain-team-phases.sh +111 -23
  203. package/presets/claude/svelte/hooks/check-preset-update.mjs +227 -0
  204. package/presets/claude/svelte/hooks/examples/README.md +1 -1
  205. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  206. package/presets/claude/svelte/settings.json +13 -0
  207. package/presets/claude/svelte/skills/technical-retro/SKILL.md +2 -0
  208. package/presets/cursor/android-kotlin/AGENTS.md +1 -0
  209. package/presets/cursor/android-kotlin/REPO_AGENTS.md +14 -0
  210. package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
  211. package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -1
  212. package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
  213. package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
  214. package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
  215. package/presets/cursor/android-kotlin/commands/README.md +1 -0
  216. package/presets/cursor/android-kotlin/commands/task-continue.md +9 -0
  217. package/presets/cursor/android-kotlin/commands/technical-retro.md +8 -0
  218. package/presets/cursor/android-kotlin/commands/update.md +39 -0
  219. package/presets/cursor/android-kotlin/hooks/README.md +5 -1
  220. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +111 -23
  221. package/presets/cursor/android-kotlin/hooks/check-preset-update.mjs +227 -0
  222. package/presets/cursor/android-kotlin/hooks/examples/README.md +1 -1
  223. package/presets/cursor/android-kotlin/hooks.json +6 -0
  224. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +1 -1
  225. package/presets/cursor/android-kotlin/skills/technical-retro/SKILL.md +2 -0
  226. package/presets/cursor/go/REPO_AGENTS.md +14 -0
  227. package/presets/cursor/go/agents/build-verifier.md +1 -1
  228. package/presets/cursor/go/agents/code-reviewer.md +1 -1
  229. package/presets/cursor/go/agents/debugger.md +1 -1
  230. package/presets/cursor/go/agents/feature-developer.md +1 -1
  231. package/presets/cursor/go/agents/task-analyst.md +1 -1
  232. package/presets/cursor/go/commands/README.md +1 -0
  233. package/presets/cursor/go/commands/task-continue.md +9 -0
  234. package/presets/cursor/go/commands/technical-retro.md +8 -0
  235. package/presets/cursor/go/commands/update.md +39 -0
  236. package/presets/cursor/go/hooks/README.md +5 -1
  237. package/presets/cursor/go/hooks/chain-team-phases.sh +111 -23
  238. package/presets/cursor/go/hooks/check-preset-update.mjs +227 -0
  239. package/presets/cursor/go/hooks/examples/README.md +1 -1
  240. package/presets/cursor/go/hooks.json +6 -0
  241. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +1 -1
  242. package/presets/cursor/go/skills/technical-retro/SKILL.md +2 -0
  243. package/presets/cursor/ios-swift/AGENTS.md +1 -0
  244. package/presets/cursor/ios-swift/REPO_AGENTS.md +14 -0
  245. package/presets/cursor/ios-swift/agents/build-verifier.md +1 -1
  246. package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
  247. package/presets/cursor/ios-swift/agents/debugger.md +1 -1
  248. package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
  249. package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
  250. package/presets/cursor/ios-swift/commands/README.md +1 -0
  251. package/presets/cursor/ios-swift/commands/task-continue.md +9 -0
  252. package/presets/cursor/ios-swift/commands/technical-retro.md +8 -0
  253. package/presets/cursor/ios-swift/commands/update.md +39 -0
  254. package/presets/cursor/ios-swift/hooks/README.md +5 -1
  255. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +111 -23
  256. package/presets/cursor/ios-swift/hooks/check-preset-update.mjs +227 -0
  257. package/presets/cursor/ios-swift/hooks/examples/README.md +1 -1
  258. package/presets/cursor/ios-swift/hooks.json +6 -0
  259. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +1 -1
  260. package/presets/cursor/ios-swift/skills/technical-retro/SKILL.md +2 -0
  261. package/presets/cursor/java/AGENTS.md +1 -1
  262. package/presets/cursor/java/REPO_AGENTS.md +14 -0
  263. package/presets/cursor/java/agents/build-verifier.md +1 -1
  264. package/presets/cursor/java/agents/code-reviewer.md +1 -1
  265. package/presets/cursor/java/agents/debugger.md +1 -1
  266. package/presets/cursor/java/agents/feature-developer.md +1 -1
  267. package/presets/cursor/java/agents/task-analyst.md +1 -1
  268. package/presets/cursor/java/commands/README.md +1 -0
  269. package/presets/cursor/java/commands/task-continue.md +9 -0
  270. package/presets/cursor/java/commands/technical-retro.md +8 -0
  271. package/presets/cursor/java/commands/update.md +39 -0
  272. package/presets/cursor/java/hooks/README.md +5 -1
  273. package/presets/cursor/java/hooks/chain-team-phases.sh +111 -23
  274. package/presets/cursor/java/hooks/check-preset-update.mjs +227 -0
  275. package/presets/cursor/java/hooks/examples/README.md +1 -1
  276. package/presets/cursor/java/hooks.json +6 -0
  277. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +1 -1
  278. package/presets/cursor/java/skills/technical-retro/SKILL.md +2 -0
  279. package/presets/cursor/mcp-ts/REPO_AGENTS.md +14 -0
  280. package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
  281. package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
  282. package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
  283. package/presets/cursor/mcp-ts/commands/README.md +1 -0
  284. package/presets/cursor/mcp-ts/commands/task-continue.md +9 -0
  285. package/presets/cursor/mcp-ts/commands/technical-retro.md +8 -0
  286. package/presets/cursor/mcp-ts/commands/update.md +39 -0
  287. package/presets/cursor/mcp-ts/hooks/README.md +5 -1
  288. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +111 -23
  289. package/presets/cursor/mcp-ts/hooks/check-preset-update.mjs +227 -0
  290. package/presets/cursor/mcp-ts/hooks.json +6 -0
  291. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +1 -1
  292. package/presets/cursor/next/AGENTS.md +1 -0
  293. package/presets/cursor/next/REPO_AGENTS.md +15 -1
  294. package/presets/cursor/next/agents/build-verifier.md +1 -1
  295. package/presets/cursor/next/agents/code-reviewer.md +1 -1
  296. package/presets/cursor/next/agents/debugger.md +1 -1
  297. package/presets/cursor/next/agents/feature-developer.md +1 -1
  298. package/presets/cursor/next/agents/task-analyst.md +1 -1
  299. package/presets/cursor/next/agents/task-router.md +1 -1
  300. package/presets/cursor/next/commands/README.md +1 -0
  301. package/presets/cursor/next/commands/task-continue.md +9 -0
  302. package/presets/cursor/next/commands/technical-retro.md +8 -0
  303. package/presets/cursor/next/commands/update.md +39 -0
  304. package/presets/cursor/next/hooks/README.md +6 -0
  305. package/presets/cursor/next/hooks/chain-team-phases.sh +111 -23
  306. package/presets/cursor/next/hooks/check-preset-update.mjs +227 -0
  307. package/presets/cursor/next/hooks/examples/README.md +1 -1
  308. package/presets/cursor/next/hooks.json +6 -0
  309. package/presets/cursor/next/rules/README.md +3 -1
  310. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +1 -1
  311. package/presets/cursor/next/rules/component-catalog-gate.mdc +13 -0
  312. package/presets/cursor/next/rules/forms-validation.mdc +12 -0
  313. package/presets/cursor/next/rules/next-app-router.mdc +27 -0
  314. package/presets/cursor/next/rules/next-static-export.mdc +16 -0
  315. package/presets/cursor/next/rules/react-next-anti-hallucination.mdc +21 -18
  316. package/presets/cursor/next/rules/security-next.mdc +16 -2
  317. package/presets/cursor/next/skills/technical-retro/SKILL.md +2 -0
  318. package/presets/cursor/next/team/fixtures/feature-light.json +2 -1
  319. package/presets/cursor/next/team/fixtures/feature-ui-standard.json +24 -0
  320. package/presets/cursor/nuxt/AGENTS.md +1 -0
  321. package/presets/cursor/nuxt/REPO_AGENTS.md +14 -0
  322. package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
  323. package/presets/cursor/nuxt/agents/code-reviewer.md +1 -1
  324. package/presets/cursor/nuxt/agents/debugger.md +1 -1
  325. package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
  326. package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
  327. package/presets/cursor/nuxt/commands/README.md +1 -0
  328. package/presets/cursor/nuxt/commands/task-continue.md +9 -0
  329. package/presets/cursor/nuxt/commands/technical-retro.md +8 -0
  330. package/presets/cursor/nuxt/commands/update.md +39 -0
  331. package/presets/cursor/nuxt/hooks/README.md +4 -0
  332. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +111 -23
  333. package/presets/cursor/nuxt/hooks/check-preset-update.mjs +227 -0
  334. package/presets/cursor/nuxt/hooks/examples/README.md +1 -1
  335. package/presets/cursor/nuxt/hooks.json +6 -0
  336. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +1 -1
  337. package/presets/cursor/nuxt/skills/technical-retro/SKILL.md +2 -0
  338. package/presets/cursor/php-hexagonal/AGENTS.md +1 -1
  339. package/presets/cursor/php-hexagonal/REPO_AGENTS.md +14 -0
  340. package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
  341. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
  342. package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
  343. package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
  344. package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
  345. package/presets/cursor/php-hexagonal/commands/README.md +1 -0
  346. package/presets/cursor/php-hexagonal/commands/task-continue.md +9 -0
  347. package/presets/cursor/php-hexagonal/commands/technical-retro.md +8 -0
  348. package/presets/cursor/php-hexagonal/commands/update.md +39 -0
  349. package/presets/cursor/php-hexagonal/hooks/README.md +5 -1
  350. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +111 -23
  351. package/presets/cursor/php-hexagonal/hooks/check-preset-update.mjs +227 -0
  352. package/presets/cursor/php-hexagonal/hooks/examples/README.md +1 -1
  353. package/presets/cursor/php-hexagonal/hooks.json +6 -0
  354. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +1 -1
  355. package/presets/cursor/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
  356. package/presets/cursor/php-laravel/AGENTS.md +1 -1
  357. package/presets/cursor/php-laravel/REPO_AGENTS.md +14 -0
  358. package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
  359. package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
  360. package/presets/cursor/php-laravel/agents/debugger.md +1 -1
  361. package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
  362. package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
  363. package/presets/cursor/php-laravel/commands/README.md +1 -0
  364. package/presets/cursor/php-laravel/commands/task-continue.md +9 -0
  365. package/presets/cursor/php-laravel/commands/technical-retro.md +8 -0
  366. package/presets/cursor/php-laravel/commands/update.md +39 -0
  367. package/presets/cursor/php-laravel/hooks/README.md +5 -1
  368. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +111 -23
  369. package/presets/cursor/php-laravel/hooks/check-preset-update.mjs +227 -0
  370. package/presets/cursor/php-laravel/hooks/examples/README.md +1 -1
  371. package/presets/cursor/php-laravel/hooks.json +6 -0
  372. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +1 -1
  373. package/presets/cursor/php-laravel/skills/technical-retro/SKILL.md +2 -0
  374. package/presets/cursor/svelte/AGENTS.md +1 -0
  375. package/presets/cursor/svelte/REPO_AGENTS.md +14 -0
  376. package/presets/cursor/svelte/agents/build-verifier.md +1 -1
  377. package/presets/cursor/svelte/agents/code-reviewer.md +1 -1
  378. package/presets/cursor/svelte/agents/debugger.md +1 -1
  379. package/presets/cursor/svelte/agents/feature-developer.md +1 -1
  380. package/presets/cursor/svelte/agents/task-analyst.md +1 -1
  381. package/presets/cursor/svelte/commands/README.md +1 -0
  382. package/presets/cursor/svelte/commands/task-continue.md +9 -0
  383. package/presets/cursor/svelte/commands/technical-retro.md +8 -0
  384. package/presets/cursor/svelte/commands/update.md +39 -0
  385. package/presets/cursor/svelte/hooks/README.md +4 -0
  386. package/presets/cursor/svelte/hooks/chain-team-phases.sh +111 -23
  387. package/presets/cursor/svelte/hooks/check-preset-update.mjs +227 -0
  388. package/presets/cursor/svelte/hooks/examples/README.md +1 -1
  389. package/presets/cursor/svelte/hooks.json +6 -0
  390. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +1 -1
  391. package/presets/cursor/svelte/skills/technical-retro/SKILL.md +2 -0
  392. package/presets/mavis/android-kotlin/MAVIS.md +1 -0
  393. package/presets/mavis/android-kotlin/REPO_AGENTS.md +14 -0
  394. package/presets/mavis/android-kotlin/adapter-map.json +17 -1
  395. package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
  396. package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -1
  397. package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
  398. package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
  399. package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
  400. package/presets/mavis/android-kotlin/commands/README.md +1 -0
  401. package/presets/mavis/android-kotlin/commands/task-continue.md +9 -0
  402. package/presets/mavis/android-kotlin/commands/technical-retro.md +8 -0
  403. package/presets/mavis/android-kotlin/commands/update.md +34 -0
  404. package/presets/mavis/android-kotlin/hooks/README.md +3 -0
  405. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +111 -23
  406. package/presets/mavis/android-kotlin/hooks/check-preset-update.mjs +227 -0
  407. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +1 -1
  408. package/presets/mavis/android-kotlin/skills/technical-retro/SKILL.md +2 -0
  409. package/presets/mavis/go/REPO_AGENTS.md +14 -0
  410. package/presets/mavis/go/adapter-map.json +17 -1
  411. package/presets/mavis/go/agents/build-verifier.md +1 -1
  412. package/presets/mavis/go/agents/code-reviewer.md +1 -1
  413. package/presets/mavis/go/agents/debugger.md +1 -1
  414. package/presets/mavis/go/agents/feature-developer.md +1 -1
  415. package/presets/mavis/go/agents/task-analyst.md +1 -1
  416. package/presets/mavis/go/commands/README.md +1 -0
  417. package/presets/mavis/go/commands/task-continue.md +9 -0
  418. package/presets/mavis/go/commands/technical-retro.md +8 -0
  419. package/presets/mavis/go/commands/update.md +34 -0
  420. package/presets/mavis/go/hooks/README.md +3 -0
  421. package/presets/mavis/go/hooks/chain-team-phases.sh +111 -23
  422. package/presets/mavis/go/hooks/check-preset-update.mjs +227 -0
  423. package/presets/mavis/go/rules/agent-team-orchestrator.md +1 -1
  424. package/presets/mavis/go/skills/technical-retro/SKILL.md +2 -0
  425. package/presets/mavis/ios-swift/MAVIS.md +1 -0
  426. package/presets/mavis/ios-swift/REPO_AGENTS.md +14 -0
  427. package/presets/mavis/ios-swift/adapter-map.json +17 -1
  428. package/presets/mavis/ios-swift/agents/build-verifier.md +1 -1
  429. package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
  430. package/presets/mavis/ios-swift/agents/debugger.md +1 -1
  431. package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
  432. package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
  433. package/presets/mavis/ios-swift/commands/README.md +1 -0
  434. package/presets/mavis/ios-swift/commands/task-continue.md +9 -0
  435. package/presets/mavis/ios-swift/commands/technical-retro.md +8 -0
  436. package/presets/mavis/ios-swift/commands/update.md +34 -0
  437. package/presets/mavis/ios-swift/hooks/README.md +3 -0
  438. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +111 -23
  439. package/presets/mavis/ios-swift/hooks/check-preset-update.mjs +227 -0
  440. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +1 -1
  441. package/presets/mavis/ios-swift/skills/technical-retro/SKILL.md +2 -0
  442. package/presets/mavis/java/REPO_AGENTS.md +14 -0
  443. package/presets/mavis/java/adapter-map.json +17 -1
  444. package/presets/mavis/java/agents/build-verifier.md +1 -1
  445. package/presets/mavis/java/agents/code-reviewer.md +1 -1
  446. package/presets/mavis/java/agents/debugger.md +1 -1
  447. package/presets/mavis/java/agents/feature-developer.md +1 -1
  448. package/presets/mavis/java/agents/task-analyst.md +1 -1
  449. package/presets/mavis/java/commands/README.md +1 -0
  450. package/presets/mavis/java/commands/task-continue.md +9 -0
  451. package/presets/mavis/java/commands/technical-retro.md +8 -0
  452. package/presets/mavis/java/commands/update.md +34 -0
  453. package/presets/mavis/java/hooks/README.md +3 -0
  454. package/presets/mavis/java/hooks/chain-team-phases.sh +111 -23
  455. package/presets/mavis/java/hooks/check-preset-update.mjs +227 -0
  456. package/presets/mavis/java/rules/agent-team-orchestrator.md +1 -1
  457. package/presets/mavis/java/skills/technical-retro/SKILL.md +2 -0
  458. package/presets/mavis/mcp-ts/REPO_AGENTS.md +14 -0
  459. package/presets/mavis/mcp-ts/adapter-map.json +17 -1
  460. package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
  461. package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
  462. package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
  463. package/presets/mavis/mcp-ts/commands/README.md +1 -0
  464. package/presets/mavis/mcp-ts/commands/task-continue.md +9 -0
  465. package/presets/mavis/mcp-ts/commands/technical-retro.md +8 -0
  466. package/presets/mavis/mcp-ts/commands/update.md +34 -0
  467. package/presets/mavis/mcp-ts/hooks/README.md +3 -0
  468. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +111 -23
  469. package/presets/mavis/mcp-ts/hooks/check-preset-update.mjs +227 -0
  470. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +1 -1
  471. package/presets/mavis/next/MAVIS.md +1 -0
  472. package/presets/mavis/next/REPO_AGENTS.md +15 -1
  473. package/presets/mavis/next/adapter-map.json +25 -1
  474. package/presets/mavis/next/agents/build-verifier.md +1 -1
  475. package/presets/mavis/next/agents/code-reviewer.md +1 -1
  476. package/presets/mavis/next/agents/debugger.md +1 -1
  477. package/presets/mavis/next/agents/feature-developer.md +1 -1
  478. package/presets/mavis/next/agents/task-analyst.md +1 -1
  479. package/presets/mavis/next/agents/task-router.md +1 -1
  480. package/presets/mavis/next/commands/README.md +1 -0
  481. package/presets/mavis/next/commands/task-continue.md +9 -0
  482. package/presets/mavis/next/commands/technical-retro.md +8 -0
  483. package/presets/mavis/next/commands/update.md +34 -0
  484. package/presets/mavis/next/hooks/README.md +3 -0
  485. package/presets/mavis/next/hooks/chain-team-phases.sh +111 -23
  486. package/presets/mavis/next/hooks/check-preset-update.mjs +227 -0
  487. package/presets/mavis/next/rules/agent-team-orchestrator.md +1 -1
  488. package/presets/mavis/next/rules/component-catalog-gate.md +13 -0
  489. package/presets/mavis/next/rules/forms-validation.md +12 -0
  490. package/presets/mavis/next/rules/next-app-router.md +27 -0
  491. package/presets/mavis/next/rules/next-static-export.md +16 -0
  492. package/presets/mavis/next/rules/react-next-anti-hallucination.md +20 -18
  493. package/presets/mavis/next/rules/security-next.md +13 -0
  494. package/presets/mavis/next/skills/technical-retro/SKILL.md +2 -0
  495. package/presets/mavis/next/team/fixtures/feature-light.json +2 -1
  496. package/presets/mavis/next/team/fixtures/feature-ui-standard.json +24 -0
  497. package/presets/mavis/nuxt/MAVIS.md +1 -0
  498. package/presets/mavis/nuxt/REPO_AGENTS.md +14 -0
  499. package/presets/mavis/nuxt/adapter-map.json +17 -1
  500. package/presets/mavis/nuxt/agents/build-verifier.md +1 -1
  501. package/presets/mavis/nuxt/agents/code-reviewer.md +1 -1
  502. package/presets/mavis/nuxt/agents/debugger.md +1 -1
  503. package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
  504. package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
  505. package/presets/mavis/nuxt/commands/README.md +1 -0
  506. package/presets/mavis/nuxt/commands/task-continue.md +9 -0
  507. package/presets/mavis/nuxt/commands/technical-retro.md +8 -0
  508. package/presets/mavis/nuxt/commands/update.md +34 -0
  509. package/presets/mavis/nuxt/hooks/README.md +3 -0
  510. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +111 -23
  511. package/presets/mavis/nuxt/hooks/check-preset-update.mjs +227 -0
  512. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +1 -1
  513. package/presets/mavis/nuxt/skills/technical-retro/SKILL.md +2 -0
  514. package/presets/mavis/php-hexagonal/REPO_AGENTS.md +14 -0
  515. package/presets/mavis/php-hexagonal/adapter-map.json +17 -1
  516. package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
  517. package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
  518. package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
  519. package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
  520. package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
  521. package/presets/mavis/php-hexagonal/commands/README.md +1 -0
  522. package/presets/mavis/php-hexagonal/commands/task-continue.md +9 -0
  523. package/presets/mavis/php-hexagonal/commands/technical-retro.md +8 -0
  524. package/presets/mavis/php-hexagonal/commands/update.md +34 -0
  525. package/presets/mavis/php-hexagonal/hooks/README.md +3 -0
  526. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +111 -23
  527. package/presets/mavis/php-hexagonal/hooks/check-preset-update.mjs +227 -0
  528. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
  529. package/presets/mavis/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
  530. package/presets/mavis/php-laravel/REPO_AGENTS.md +14 -0
  531. package/presets/mavis/php-laravel/adapter-map.json +17 -1
  532. package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
  533. package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
  534. package/presets/mavis/php-laravel/agents/debugger.md +1 -1
  535. package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
  536. package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
  537. package/presets/mavis/php-laravel/commands/README.md +1 -0
  538. package/presets/mavis/php-laravel/commands/task-continue.md +9 -0
  539. package/presets/mavis/php-laravel/commands/technical-retro.md +8 -0
  540. package/presets/mavis/php-laravel/commands/update.md +34 -0
  541. package/presets/mavis/php-laravel/hooks/README.md +3 -0
  542. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +111 -23
  543. package/presets/mavis/php-laravel/hooks/check-preset-update.mjs +227 -0
  544. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +1 -1
  545. package/presets/mavis/php-laravel/skills/technical-retro/SKILL.md +2 -0
  546. package/presets/mavis/svelte/MAVIS.md +1 -0
  547. package/presets/mavis/svelte/REPO_AGENTS.md +14 -0
  548. package/presets/mavis/svelte/adapter-map.json +17 -1
  549. package/presets/mavis/svelte/agents/build-verifier.md +1 -1
  550. package/presets/mavis/svelte/agents/code-reviewer.md +1 -1
  551. package/presets/mavis/svelte/agents/debugger.md +1 -1
  552. package/presets/mavis/svelte/agents/feature-developer.md +1 -1
  553. package/presets/mavis/svelte/agents/task-analyst.md +1 -1
  554. package/presets/mavis/svelte/commands/README.md +1 -0
  555. package/presets/mavis/svelte/commands/task-continue.md +9 -0
  556. package/presets/mavis/svelte/commands/technical-retro.md +8 -0
  557. package/presets/mavis/svelte/commands/update.md +34 -0
  558. package/presets/mavis/svelte/hooks/README.md +3 -0
  559. package/presets/mavis/svelte/hooks/chain-team-phases.sh +111 -23
  560. package/presets/mavis/svelte/hooks/check-preset-update.mjs +227 -0
  561. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +1 -1
  562. package/presets/mavis/svelte/skills/technical-retro/SKILL.md +2 -0
  563. package/presets/opencode/android-kotlin/OPENCODE.md +15 -6
  564. package/presets/opencode/android-kotlin/REPO_AGENTS.md +14 -0
  565. package/presets/opencode/android-kotlin/adapter-map.json +17 -1
  566. package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
  567. package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -1
  568. package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
  569. package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
  570. package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
  571. package/presets/opencode/android-kotlin/commands/README.md +1 -0
  572. package/presets/opencode/android-kotlin/commands/task-continue.md +9 -0
  573. package/presets/opencode/android-kotlin/commands/technical-retro.md +8 -0
  574. package/presets/opencode/android-kotlin/commands/update.md +42 -0
  575. package/presets/opencode/android-kotlin/hooks/README.md +3 -0
  576. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +111 -23
  577. package/presets/opencode/android-kotlin/hooks/check-preset-update.mjs +227 -0
  578. package/presets/opencode/android-kotlin/opencode.json +2 -12
  579. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +1 -1
  580. package/presets/opencode/android-kotlin/skills/technical-retro/SKILL.md +2 -0
  581. package/presets/opencode/go/OPENCODE.md +14 -6
  582. package/presets/opencode/go/REPO_AGENTS.md +14 -0
  583. package/presets/opencode/go/adapter-map.json +17 -1
  584. package/presets/opencode/go/agents/build-verifier.md +1 -1
  585. package/presets/opencode/go/agents/code-reviewer.md +1 -1
  586. package/presets/opencode/go/agents/debugger.md +1 -1
  587. package/presets/opencode/go/agents/feature-developer.md +1 -1
  588. package/presets/opencode/go/agents/task-analyst.md +1 -1
  589. package/presets/opencode/go/commands/README.md +1 -0
  590. package/presets/opencode/go/commands/task-continue.md +9 -0
  591. package/presets/opencode/go/commands/technical-retro.md +8 -0
  592. package/presets/opencode/go/commands/update.md +42 -0
  593. package/presets/opencode/go/hooks/README.md +3 -0
  594. package/presets/opencode/go/hooks/chain-team-phases.sh +111 -23
  595. package/presets/opencode/go/hooks/check-preset-update.mjs +227 -0
  596. package/presets/opencode/go/opencode.json +2 -12
  597. package/presets/opencode/go/rules/agent-team-orchestrator.md +1 -1
  598. package/presets/opencode/go/skills/technical-retro/SKILL.md +2 -0
  599. package/presets/opencode/ios-swift/OPENCODE.md +15 -6
  600. package/presets/opencode/ios-swift/REPO_AGENTS.md +14 -0
  601. package/presets/opencode/ios-swift/adapter-map.json +17 -1
  602. package/presets/opencode/ios-swift/agents/build-verifier.md +1 -1
  603. package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
  604. package/presets/opencode/ios-swift/agents/debugger.md +1 -1
  605. package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
  606. package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
  607. package/presets/opencode/ios-swift/commands/README.md +1 -0
  608. package/presets/opencode/ios-swift/commands/task-continue.md +9 -0
  609. package/presets/opencode/ios-swift/commands/technical-retro.md +8 -0
  610. package/presets/opencode/ios-swift/commands/update.md +42 -0
  611. package/presets/opencode/ios-swift/hooks/README.md +3 -0
  612. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +111 -23
  613. package/presets/opencode/ios-swift/hooks/check-preset-update.mjs +227 -0
  614. package/presets/opencode/ios-swift/opencode.json +2 -12
  615. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +1 -1
  616. package/presets/opencode/ios-swift/skills/technical-retro/SKILL.md +2 -0
  617. package/presets/opencode/java/OPENCODE.md +14 -6
  618. package/presets/opencode/java/REPO_AGENTS.md +14 -0
  619. package/presets/opencode/java/adapter-map.json +17 -1
  620. package/presets/opencode/java/agents/build-verifier.md +1 -1
  621. package/presets/opencode/java/agents/code-reviewer.md +1 -1
  622. package/presets/opencode/java/agents/debugger.md +1 -1
  623. package/presets/opencode/java/agents/feature-developer.md +1 -1
  624. package/presets/opencode/java/agents/task-analyst.md +1 -1
  625. package/presets/opencode/java/commands/README.md +1 -0
  626. package/presets/opencode/java/commands/task-continue.md +9 -0
  627. package/presets/opencode/java/commands/technical-retro.md +8 -0
  628. package/presets/opencode/java/commands/update.md +42 -0
  629. package/presets/opencode/java/hooks/README.md +3 -0
  630. package/presets/opencode/java/hooks/chain-team-phases.sh +111 -23
  631. package/presets/opencode/java/hooks/check-preset-update.mjs +227 -0
  632. package/presets/opencode/java/opencode.json +2 -12
  633. package/presets/opencode/java/rules/agent-team-orchestrator.md +1 -1
  634. package/presets/opencode/java/skills/technical-retro/SKILL.md +2 -0
  635. package/presets/opencode/mcp-ts/OPENCODE.md +14 -6
  636. package/presets/opencode/mcp-ts/REPO_AGENTS.md +14 -0
  637. package/presets/opencode/mcp-ts/adapter-map.json +17 -1
  638. package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
  639. package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
  640. package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
  641. package/presets/opencode/mcp-ts/commands/README.md +1 -0
  642. package/presets/opencode/mcp-ts/commands/task-continue.md +9 -0
  643. package/presets/opencode/mcp-ts/commands/technical-retro.md +8 -0
  644. package/presets/opencode/mcp-ts/commands/update.md +42 -0
  645. package/presets/opencode/mcp-ts/hooks/README.md +3 -0
  646. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +111 -23
  647. package/presets/opencode/mcp-ts/hooks/check-preset-update.mjs +227 -0
  648. package/presets/opencode/mcp-ts/opencode.json +2 -12
  649. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +1 -1
  650. package/presets/opencode/next/OPENCODE.md +15 -6
  651. package/presets/opencode/next/REPO_AGENTS.md +15 -1
  652. package/presets/opencode/next/adapter-map.json +25 -1
  653. package/presets/opencode/next/agents/build-verifier.md +1 -1
  654. package/presets/opencode/next/agents/code-reviewer.md +1 -1
  655. package/presets/opencode/next/agents/debugger.md +1 -1
  656. package/presets/opencode/next/agents/feature-developer.md +1 -1
  657. package/presets/opencode/next/agents/task-analyst.md +1 -1
  658. package/presets/opencode/next/agents/task-router.md +1 -1
  659. package/presets/opencode/next/commands/README.md +1 -0
  660. package/presets/opencode/next/commands/task-continue.md +9 -0
  661. package/presets/opencode/next/commands/technical-retro.md +8 -0
  662. package/presets/opencode/next/commands/update.md +42 -0
  663. package/presets/opencode/next/hooks/README.md +3 -0
  664. package/presets/opencode/next/hooks/chain-team-phases.sh +111 -23
  665. package/presets/opencode/next/hooks/check-preset-update.mjs +227 -0
  666. package/presets/opencode/next/opencode.json +2 -12
  667. package/presets/opencode/next/rules/agent-team-orchestrator.md +1 -1
  668. package/presets/opencode/next/rules/component-catalog-gate.md +13 -0
  669. package/presets/opencode/next/rules/forms-validation.md +12 -0
  670. package/presets/opencode/next/rules/next-app-router.md +27 -0
  671. package/presets/opencode/next/rules/next-static-export.md +16 -0
  672. package/presets/opencode/next/rules/react-next-anti-hallucination.md +20 -18
  673. package/presets/opencode/next/rules/security-next.md +13 -0
  674. package/presets/opencode/next/skills/technical-retro/SKILL.md +2 -0
  675. package/presets/opencode/next/team/fixtures/feature-light.json +2 -1
  676. package/presets/opencode/next/team/fixtures/feature-ui-standard.json +24 -0
  677. package/presets/opencode/nuxt/OPENCODE.md +15 -6
  678. package/presets/opencode/nuxt/REPO_AGENTS.md +14 -0
  679. package/presets/opencode/nuxt/adapter-map.json +17 -1
  680. package/presets/opencode/nuxt/agents/build-verifier.md +1 -1
  681. package/presets/opencode/nuxt/agents/code-reviewer.md +1 -1
  682. package/presets/opencode/nuxt/agents/debugger.md +1 -1
  683. package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
  684. package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
  685. package/presets/opencode/nuxt/commands/README.md +1 -0
  686. package/presets/opencode/nuxt/commands/task-continue.md +9 -0
  687. package/presets/opencode/nuxt/commands/technical-retro.md +8 -0
  688. package/presets/opencode/nuxt/commands/update.md +42 -0
  689. package/presets/opencode/nuxt/hooks/README.md +3 -0
  690. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +111 -23
  691. package/presets/opencode/nuxt/hooks/check-preset-update.mjs +227 -0
  692. package/presets/opencode/nuxt/opencode.json +2 -12
  693. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +1 -1
  694. package/presets/opencode/nuxt/skills/technical-retro/SKILL.md +2 -0
  695. package/presets/opencode/php-hexagonal/OPENCODE.md +14 -6
  696. package/presets/opencode/php-hexagonal/REPO_AGENTS.md +14 -0
  697. package/presets/opencode/php-hexagonal/adapter-map.json +17 -1
  698. package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
  699. package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
  700. package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
  701. package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
  702. package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
  703. package/presets/opencode/php-hexagonal/commands/README.md +1 -0
  704. package/presets/opencode/php-hexagonal/commands/task-continue.md +9 -0
  705. package/presets/opencode/php-hexagonal/commands/technical-retro.md +8 -0
  706. package/presets/opencode/php-hexagonal/commands/update.md +42 -0
  707. package/presets/opencode/php-hexagonal/hooks/README.md +3 -0
  708. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +111 -23
  709. package/presets/opencode/php-hexagonal/hooks/check-preset-update.mjs +227 -0
  710. package/presets/opencode/php-hexagonal/opencode.json +2 -12
  711. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
  712. package/presets/opencode/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
  713. package/presets/opencode/php-laravel/OPENCODE.md +14 -6
  714. package/presets/opencode/php-laravel/REPO_AGENTS.md +14 -0
  715. package/presets/opencode/php-laravel/adapter-map.json +17 -1
  716. package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
  717. package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
  718. package/presets/opencode/php-laravel/agents/debugger.md +1 -1
  719. package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
  720. package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
  721. package/presets/opencode/php-laravel/commands/README.md +1 -0
  722. package/presets/opencode/php-laravel/commands/task-continue.md +9 -0
  723. package/presets/opencode/php-laravel/commands/technical-retro.md +8 -0
  724. package/presets/opencode/php-laravel/commands/update.md +42 -0
  725. package/presets/opencode/php-laravel/hooks/README.md +3 -0
  726. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +111 -23
  727. package/presets/opencode/php-laravel/hooks/check-preset-update.mjs +227 -0
  728. package/presets/opencode/php-laravel/opencode.json +2 -12
  729. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +1 -1
  730. package/presets/opencode/php-laravel/skills/technical-retro/SKILL.md +2 -0
  731. package/presets/opencode/svelte/OPENCODE.md +15 -6
  732. package/presets/opencode/svelte/REPO_AGENTS.md +14 -0
  733. package/presets/opencode/svelte/adapter-map.json +17 -1
  734. package/presets/opencode/svelte/agents/build-verifier.md +1 -1
  735. package/presets/opencode/svelte/agents/code-reviewer.md +1 -1
  736. package/presets/opencode/svelte/agents/debugger.md +1 -1
  737. package/presets/opencode/svelte/agents/feature-developer.md +1 -1
  738. package/presets/opencode/svelte/agents/task-analyst.md +1 -1
  739. package/presets/opencode/svelte/commands/README.md +1 -0
  740. package/presets/opencode/svelte/commands/task-continue.md +9 -0
  741. package/presets/opencode/svelte/commands/technical-retro.md +8 -0
  742. package/presets/opencode/svelte/commands/update.md +42 -0
  743. package/presets/opencode/svelte/hooks/README.md +3 -0
  744. package/presets/opencode/svelte/hooks/chain-team-phases.sh +111 -23
  745. package/presets/opencode/svelte/hooks/check-preset-update.mjs +227 -0
  746. package/presets/opencode/svelte/opencode.json +2 -12
  747. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +1 -1
  748. package/presets/opencode/svelte/skills/technical-retro/SKILL.md +2 -0
  749. package/scripts/check-product-specs.sh +115 -9
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  description: Next.js frontend security — secrets, auth, XSS, Server Actions, env
3
3
  paths:
4
- - "app/src/**/*.{ts,tsx}"
5
- - "app/**/app/**/*.{ts,tsx}"
6
4
  - "**/*Auth*.{ts,tsx}"
7
5
  - "**/*Session*.{ts,tsx}"
8
6
  - "**/.env*"
7
+ - "app/**/middleware.ts"
8
+ - "app/src/**/*middleware*.{ts,tsx}"
9
+ - "app/src/**/*action*.{ts,tsx}"
9
10
  impact: CRITICAL
10
11
  ---
11
12
 
@@ -66,3 +67,16 @@ For apps that ship medical or personal data (e.g. GDPR / local data-protection l
66
67
  ## Agent requirement
67
68
 
68
69
  On auth, forms, payments, or env changes — load this rule and `tooling-and-review/code-review-mr.md`. Route sensitive features through `security-reviewer`.
70
+
71
+ ## Incorrect
72
+
73
+ ```tsx
74
+ const key = process.env.SECRET_KEY
75
+ ```
76
+
77
+ ## Correct
78
+
79
+ ```tsx
80
+ // Secret stays on the BFF. The client reads only NEXT_PUBLIC_* through the repo config module.
81
+ const apiUrl = publicConfig.apiUrl
82
+ ```
@@ -38,3 +38,16 @@ When the repo ships a **component catalog** (Storybook, Ladle, Chromatic, or a `
38
38
 
39
39
  - `ui-and-accessibility/design-tokens-binding.md` — Figma → repo token binding for the implementation.
40
40
  - `tooling-and-review/mockup-review.md` — the reviewer-side parity gate.
41
+
42
+ ## Incorrect
43
+
44
+ ```tsx
45
+ export const Price = () => null
46
+ ```
47
+
48
+ ## Correct
49
+
50
+ ```tsx
51
+ export const Price = () => null
52
+ export const Primary = () => <Price />
53
+ ```
@@ -33,3 +33,15 @@ Use the form solution already in the repo (`package.json` + the nearest form com
33
33
 
34
34
  - `ui-and-accessibility/react-ui.md` — component structure and decomposition.
35
35
  - `architecture/architecture-boundaries-ui.md` — no API/DTO in UI.
36
+
37
+ ## Incorrect
38
+
39
+ ```tsx
40
+ const [name, setName] = useState('')
41
+ ```
42
+
43
+ ## Correct
44
+
45
+ ```tsx
46
+ const form = useForm({ mode: 'onTouched' })
47
+ ```
@@ -3,7 +3,9 @@
3
3
  "permissions": {
4
4
  "deny": [
5
5
  "Bash(git commit *)",
6
+ "Bash(git commit)",
6
7
  "Bash(git push *)",
8
+ "Bash(git push)",
7
9
  "Bash(npx jest*)"
8
10
  ],
9
11
  "ask": [
@@ -14,6 +16,17 @@
14
16
  ]
15
17
  },
16
18
  "hooks": {
19
+ "SessionStart": [
20
+ {
21
+ "hooks": [
22
+ {
23
+ "type": "command",
24
+ "command": "node \"${CLAUDE_PROJECT_DIR}/.claude/hooks/check-preset-update.mjs\" --format claude",
25
+ "timeout": 8
26
+ }
27
+ ]
28
+ }
29
+ ],
17
30
  "PreToolUse": [
18
31
  {
19
32
  "matcher": "Bash",
@@ -63,3 +63,5 @@ human-promote set: move a `.ai.local/rules-library/<stem>.md` seed to `.ai.local
63
63
  and record the promotion in `.ai.local/rule-changes.jsonl`.
64
64
 
65
65
  Do not apply preset or conventions changes without user approval.
66
+
67
+ In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
@@ -22,6 +22,7 @@
22
22
  "skipped": [
23
23
  { "agent": "task-analyst", "reason": "Explicit AC and single-file scope" },
24
24
  { "agent": "code-reviewer", "reason": "Light profile — non-trivial app changes should use standard" },
25
- { "agent": "qa-tester", "reason": "No e2e AC" }
25
+ { "agent": "qa-tester", "reason": "No e2e AC" },
26
+ { "agent": "mockup-reviewer", "reason": "Light profile, no figma.com URL, no required-signal UX AC" }
26
27
  ]
27
28
  }
@@ -0,0 +1,24 @@
1
+ {
2
+ "slug": "example-feature-ui-standard",
3
+ "intent": "feature",
4
+ "profile": "standard",
5
+ "routingDecision": {
6
+ "complexity": "medium",
7
+ "riskFlags": [],
8
+ "routingReasons": [
9
+ "The scope includes app/src/ui/** and there is no figma.com URL, so mockup-reviewer reviews against the acceptance criteria.",
10
+ "Profile is standard, so a UI feature schedules mockup-reviewer before feature-developer."
11
+ ],
12
+ "estimatedWorkPackages": 1,
13
+ "openDecisionCount": 0
14
+ },
15
+ "summary": "UI feature without a Figma URL",
16
+ "steps": [
17
+ { "agent": "mockup-reviewer", "label": "Review UI against AC", "model": "strong" },
18
+ { "agent": "feature-developer", "label": "Implement", "model": "cheap" },
19
+ { "agent": "build-verifier", "label": "Validation gate", "model": "cheap" }
20
+ ],
21
+ "humanGates": [],
22
+ "autoChain": true,
23
+ "skipped": []
24
+ }
@@ -30,6 +30,7 @@ See @rules/README.md for the full catalog and loading strategy.
30
30
  | Security (auth/forms/env) | `rules/tooling-and-review/security-nuxt.md` + agent `security-reviewer` |
31
31
  | How X works | agent `codebase-analyzer` (explain-as-is; no `/task`) |
32
32
  | Technical retro | `commands/technical-retro.md` + skill `technical-retro` |
33
+ | Update installed presets | `commands/update.md` |
33
34
 
34
35
  ## Install
35
36
 
@@ -50,4 +51,4 @@ Copies `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**`, `hooks/**`, `MCP.md`
50
51
  `git commit/push deny`; JS stacks also `npx jest* deny` and `npm/npx/pnpm/bun`
51
52
  ask). Re-init overwrites the file (consumer can edit afterwards); mirror
52
53
  with root `AGENTS.md` if you change the harness.
53
- - **Pipeline hooks:** `.claude/settings.json` `hooks` wires `guard-shell-command.sh` (`PreToolUse` / `Bash`, `permissionDecision` `ask` or `allow`) and `chain-team-phases.sh` (`SubagentStop` for kebab-case `agent_type`). See `hooks/README.md`. No `hooks.json`.
54
+ - **Pipeline hooks:** `.claude/settings.json` `hooks` wires `check-preset-update.mjs` (`SessionStart`; names the latest version and asks the user to run `/update` when the install is older), `guard-shell-command.sh` (`PreToolUse` / `Bash`, `permissionDecision` `ask` or `allow`) and `chain-team-phases.sh` (`SubagentStop` for kebab-case `agent_type`). See `hooks/README.md`. No `hooks.json`.
@@ -16,6 +16,12 @@ Cross-tool repo-root guide. Tool-specific maps stay under `.cursor/AGENTS.md`, `
16
16
  npx @bonesofspring/ai-rules init multi --preset nuxt
17
17
  ```
18
18
 
19
+ Refresh tools already installed in this repository, keeping each recorded preset (`/update` runs the same command):
20
+
21
+ ```bash
22
+ npx @bonesofspring/ai-rules update
23
+ ```
24
+
19
25
  Per-tool: `init cursor|claude|mavis|opencode --preset nuxt`. `init` overwrites this file from the preset (`REPO_AGENTS.md` → `AGENTS.md`). `clean` of one tool leaves this file if another tool install remains. Living gotchas belong in `.ai.local/conventions.md`, not here.
20
26
 
21
27
  ## Presence-based load
@@ -51,6 +57,14 @@ Working directory for package scripts: **repository root** (directory with `nuxt
51
57
 
52
58
  After code edits: invoke **`post-change-lint`** (requestable). Full gate: agent `build-verifier`.
53
59
 
60
+ ## Preset version
61
+
62
+ On the first reply of a session, run `node .cursor/hooks/check-preset-update.mjs` when it exists, otherwise the copy under `.claude/hooks/`, `.mavis/hooks/`, or `.opencode/hooks/`.
63
+ Cursor `sessionStart` and Claude `SessionStart` run the same script.
64
+ When it prints a notice, tell the user once in their native language: the installed version, the latest version, and to run `/update`.
65
+ Do not run the update unless they ask.
66
+ Empty output or a failed run stays silent.
67
+
54
68
  ## Security basics
55
69
 
56
70
  - Do not commit secrets (`.env`, tokens, credentials).
@@ -58,7 +58,7 @@ Before you run the project gate and write the terminal validation receipt, self-
58
58
 
59
59
  **Re-anchor.** On detected drift: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Bound to the existing `plan-graph` `replan` — no second orchestrator, no `status.json`/`metrics.json` field.
60
60
 
61
- Record a `## Self-review` block in `validation-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop: when `.ai.local/scripts/rule-improver.mjs` exists, append wrong-turn signals to `.ai.local/signals.jsonl` and run the improver (see the requestable `self-review-and-context-hygiene` contract). Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
61
+ Record a `## Self-review` block in `validation-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
62
62
 
63
63
  ## Output
64
64
 
@@ -50,7 +50,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
50
50
 
51
51
  **Re-anchor.** On detected drift: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Bound to the existing `plan-graph` `replan` — no second orchestrator, no `status.json`/`metrics.json` field.
52
52
 
53
- Record a `## Self-review` block in `review.md` (goal/AC coverage, evidence, alignment/drift). Optional loop: when `.ai.local/scripts/rule-improver.mjs` exists, append wrong-turn signals to `.ai.local/signals.jsonl` and run the improver (see the requestable `self-review-and-context-hygiene` contract). Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
53
+ Record a `## Self-review` block in `review.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
54
54
 
55
55
  ## Review artifact
56
56
 
@@ -94,7 +94,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
94
94
 
95
95
  **Re-anchor.** On detected drift: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Bound to the existing `plan-graph` `replan` — no second orchestrator, no `status.json`/`metrics.json` field.
96
96
 
97
- Record a `## Self-review` block in `debug-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop: when `.ai.local/scripts/rule-improver.mjs` exists, append wrong-turn signals to `.ai.local/signals.jsonl` and run the improver (see the requestable `self-review-and-context-hygiene` contract). Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
97
+ Record a `## Self-review` block in `debug-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
98
98
 
99
99
  ## MCP usage
100
100
 
@@ -101,7 +101,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
101
101
 
102
102
  **Re-anchor.** On detected drift: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Bound to the existing `plan-graph` `replan` — no second orchestrator, no `status.json`/`metrics.json` field.
103
103
 
104
- Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop: when `.ai.local/scripts/rule-improver.mjs` exists, append wrong-turn signals to `.ai.local/signals.jsonl` and run the improver (see the requestable `self-review-and-context-hygiene` contract). Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
104
+ Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
105
105
 
106
106
  ## Anti-hallucination (Vue / Nuxt / Pinia)
107
107
 
@@ -63,7 +63,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
63
63
 
64
64
  **Re-anchor.** On detected drift: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Bound to the existing `plan-graph` `replan` — no second orchestrator, no `status.json`/`metrics.json` field.
65
65
 
66
- Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop: when `.ai.local/scripts/rule-improver.mjs` exists, append wrong-turn signals to `.ai.local/signals.jsonl` and run the improver (see the requestable `self-review-and-context-hygiene` contract). Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
66
+ Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
67
67
 
68
68
  ## Clarification cycle (must)
69
69
 
@@ -9,6 +9,7 @@ Slash commands are copied to `.claude/commands/` on `ai-rules init claude --pres
9
9
  | **`/task <description>`** | **Main entry:** router → pipeline.json → roles in order |
10
10
  | `/task-continue <slug>` | After a human gate or pause |
11
11
  | `/technical-retro [slug]` | Retro; with slug — “Agent work” block |
12
+ | `update.md` | Reinstall each installed tool with the preset recorded at init |
12
13
 
13
14
  ## `/task` examples
14
15
 
@@ -45,6 +45,15 @@ Plan revision during execution is a named, auditable operation: an evaluation or
45
45
 
46
46
  A producer-side **re-anchor** (detected context loss / excess against the framed goal) is recorded append-only in `.memlog.md` (`event:` line, or `decision: replan rev N → N+1` when the plan changes); resume reads that line with the checkpoint and does not re-derive the correction from chat.
47
47
 
48
+ ## Self-learning loop (optional)
49
+
50
+ The chain hook runs the loop after every producer receipt; with the hook disabled or no auto-chain, run it yourself:
51
+
52
+ In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
53
+
54
+ Never pass `--strict` from this path — it exits 1 when capture is broken and would fail a healthy resume. The
55
+ store deduplicates, so a second run appends nothing.
56
+
48
57
  ## Artifacts for handoff
49
58
 
50
59
  | Agent | Read |
@@ -83,3 +83,11 @@ If the retro is tied to an agent-team pipeline:
83
83
  ### Metrics evidence
84
84
 
85
85
  When `metrics.json` exists, run the local aggregation script and report the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not treat gate wait or malformed ledgers as agent duration.
86
+
87
+ ### Self-learning loop
88
+
89
+ In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
90
+
91
+ Read `.ai.local/signals.jsonl` and `.ai.local/rule-changes.jsonl` before reconstructing themes; a second run
92
+ appends nothing (dedup).
93
+
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: update
3
+ description: Reinstall the preset recorded for each tool that is already installed.
4
+ ---
5
+
6
+ # Update
7
+
8
+ Reinstall every tool that already has an install manifest, using the `preset` recorded in that manifest.
9
+
10
+ ## What to do
11
+
12
+ 1. From the repository root, run:
13
+
14
+ ```bash
15
+ npx @bonesofspring/ai-rules update
16
+ ```
17
+
18
+ 2. Report the CLI summary to the user. It names each tool and the preset it kept.
19
+ 3. On a non-zero exit, stop and report stderr.
20
+
21
+ ## Record
22
+
23
+ `init` writes `platform` and `preset` into `<tool>/.ai-rules-install.json`:
24
+
25
+ - `.cursor/.ai-rules-install.json`
26
+ - `.claude/.ai-rules-install.json`
27
+ - `.mavis/.ai-rules-install.json`
28
+ - `.opencode/.ai-rules-install.json`
29
+
30
+ `update` reads those files. A tool without that file stays uninstalled. Report the result in the user's native language (`language-policy`).
31
+
32
+ ## Version check
33
+
34
+ See `## Preset version` in `REPO_AGENTS.md`. That check names the installed version and the latest version, then asks the user to run this command.
35
+
36
+ ## Do not
37
+
38
+ - Pass `--preset` or a tool name. To switch preset, run `init <tool> --preset <name>`.
39
+ - Delete `.ai.local/`.
@@ -12,6 +12,7 @@ No `hooks.json`. Default chain and shell guard are registered in `.claude/settin
12
12
  `.claude/settings.json` `hooks` (https://code.claude.com/docs/en/hooks) registers:
13
13
 
14
14
  - `PreToolUse` matcher `Bash` → `guard-shell-command.sh` (reads `tool_input.command`; emits `permissionDecision` `ask` or `allow`)
15
+ - `SessionStart` → `check-preset-update.mjs` (names the latest version and asks the user to run `/update` when the install is older; a registry failure stays silent)
15
16
  - `SubagentStop` → `chain-team-phases.sh` (kebab-case `agent_type` maps to `status: completed`; empty or non-kebab types are ignored; `stop_hook_active` does not recurse)
16
17
 
17
18
  There is no `hooks.json`. Cookbook scripts under `hooks/examples/` stay unwired. A hook crash is not a deny (Cursor `failClosed` has no Claude field); `ask` is the supported review decision.
@@ -433,6 +433,38 @@ function finishActiveAttempt(forced) {
433
433
  appendMetric({ type: 'attempt_finished', at: now, attemptId: resolved.attemptId, outcome, durationMs: Number.isFinite(durationMs) && durationMs >= 0 ? durationMs : null, retryAfterFix: status.retryAfterFix || null, source: resolved.source || 'hook', attributionConfidence: resolved.confidence });
434
434
  const active = { ...(status.activeAttempts || {}) }; delete active[resolved.attemptId]; status.activeAttempts = active; status.lastCompletedAttempt = { attemptId: resolved.attemptId, completedAt: now }; return { ...resolved, outcome };
435
435
  }
436
+ function missingConsumerArtifacts() {
437
+ const file = path.join(process.cwd(), '.ai.local', 'pipeline-gates.json');
438
+ if (!fs.existsSync(file)) return [];
439
+ let parsed;
440
+ try { parsed = JSON.parse(fs.readFileSync(file, 'utf8')); } catch { return []; }
441
+ const required = Array.isArray(parsed && parsed.requireArtifacts) ? parsed.requireArtifacts : [];
442
+ const ids = required.filter((id) => typeof id === 'string' && /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(id));
443
+ if (ids.length === 0) return [];
444
+ let manifest = { artifacts: [] };
445
+ try { manifest = JSON.parse(fs.readFileSync(path.join(taskDir, 'artifact-manifest.json'), 'utf8')); } catch {}
446
+ const done = new Set(
447
+ (manifest.artifacts || [])
448
+ .filter((artifact) => artifact && artifact.status === 'completed' && ids.includes(artifact.id))
449
+ .map((artifact) => artifact.id),
450
+ );
451
+ return ids.filter((id) => !done.has(id));
452
+ }
453
+ function completePipeline(statusPatch) {
454
+ const missing = missingConsumerArtifacts();
455
+ if (missing.length > 0) {
456
+ writeStatus({ ...statusPatch, phase: 'blocked', state: 'blocked', currentAgent: null, awaitingHumanGate: false });
457
+ out(`Pipeline blocked for "${slug}": .ai.local/pipeline-gates.json requireArtifacts missing completed receipt(s): ${missing.join(', ')}.`);
458
+ process.exit(0);
459
+ }
460
+ // task_completed is written only on this branch. A missing receipt blocks
461
+ // above and must not be counted as a finished task.
462
+ status.state = 'completed';
463
+ completeTaskMetrics();
464
+ writeStatus(statusPatch);
465
+ out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
466
+ process.exit(0);
467
+ }
436
468
  function beginHumanGate() { const eventId = `${status.metricsRunId || slug}:gate:${Date.now()}`; appendMetric({ eventId, type: 'human_gate_started', at: now, source: 'hook', attributionConfidence: 'high' }); status.activeHumanGateEventId = eventId; }
437
469
  function endHumanGateIfResumed() {
438
470
  if (!status.activeHumanGateEventId || status.awaitingHumanGate || status.state === 'awaiting_approval') return;
@@ -942,10 +974,7 @@ if (hookInput.action === 'end_human_gate') {
942
974
  if (dispatchReadyWave()) process.exit(0);
943
975
  if (pendingStepIndexes().length === 0) {
944
976
  status.state = 'completed';
945
- completeTaskMetrics();
946
- writeStatus({ pipelineIndex: resumeSteps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
947
- out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
948
- process.exit(0);
977
+ completePipeline({ pipelineIndex: resumeSteps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
949
978
  }
950
979
  out(noProgressNotice());
951
980
  process.exit(0);
@@ -970,16 +999,13 @@ if (hookInput.action === 'end_human_gate') {
970
999
  // Gate on the final step: no executable step remains. Complete the
971
1000
  // pipeline instead of leaving it in_progress forever.
972
1001
  status.state = 'completed';
973
- completeTaskMetrics();
974
- writeStatus({
1002
+ completePipeline({
975
1003
  pipelineIndex: resumeSteps.length,
976
1004
  phase: 'done',
977
1005
  state: 'completed',
978
1006
  currentAgent: null,
979
1007
  awaitingHumanGate: false,
980
1008
  });
981
- out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
982
- process.exit(0);
983
1009
  }
984
1010
  }
985
1011
  // A2 (retro §8): if gate closes the final human gate of the pipeline
@@ -1283,10 +1309,7 @@ if (waveIndexes) {
1283
1309
  process.exit(0);
1284
1310
  }
1285
1311
  if (pendingStepIndexes().length === 0) {
1286
- completeTaskMetrics();
1287
- writeStatus({ pipelineIndex: steps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
1288
- out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
1289
- process.exit(0);
1312
+ completePipeline({ pipelineIndex: steps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
1290
1313
  }
1291
1314
  out(noProgressNotice());
1292
1315
  process.exit(0);
@@ -1378,9 +1401,7 @@ if (status.state === 'completed' && status.retryAfterFix) {
1378
1401
  }
1379
1402
 
1380
1403
  if (!currentStep) {
1381
- writeStatus({ phase: 'done', state: 'completed', currentAgent: null });
1382
- out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
1383
- process.exit(0);
1404
+ completePipeline({ phase: 'done', state: 'completed', currentAgent: null });
1384
1405
  }
1385
1406
 
1386
1407
  if (hasGateAfterStep(currentStep, pipeline.humanGates)) {
@@ -1401,10 +1422,7 @@ if (isGraphMode()) {
1401
1422
  }
1402
1423
  if (dispatchReadyWave()) process.exit(0);
1403
1424
  if (pendingStepIndexes().length === 0) {
1404
- completeTaskMetrics();
1405
- writeStatus({ pipelineIndex: steps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
1406
- out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
1407
- process.exit(0);
1425
+ completePipeline({ pipelineIndex: steps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
1408
1426
  }
1409
1427
  out(noProgressNotice());
1410
1428
  process.exit(0);
@@ -1412,16 +1430,13 @@ if (isGraphMode()) {
1412
1430
 
1413
1431
  const next = findNextExecutableStep(steps, idx + 1, taskDir);
1414
1432
  if (!next) {
1415
- completeTaskMetrics();
1416
- writeStatus({
1433
+ completePipeline({
1417
1434
  pipelineIndex: steps.length,
1418
1435
  phase: 'done',
1419
1436
  state: 'completed',
1420
1437
  currentAgent: null,
1421
1438
  awaitingHumanGate: false,
1422
1439
  });
1423
- out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
1424
- process.exit(0);
1425
1440
  }
1426
1441
 
1427
1442
  const { step: nextStep, index: nextIdx } = next;
@@ -1443,3 +1458,76 @@ if (nextStep.parallel && nextAgents.length > 1) {
1443
1458
  out(handoffForAgent(nextAgents[0], nextStep.scope, nextStep));
1444
1459
  }
1445
1460
  NODE
1461
+
1462
+ # --- In-task self-learning postflight ----------------------------------------
1463
+ # One loop run per completed stop, as a second process: capture must not depend
1464
+ # on an agent remembering to run it. The child's stdout is forwarded to stderr
1465
+ # so the hook's own stdout contract (the JSON above) is untouched; `|| true`
1466
+ # plus an unconditional exit 0 keep a loop failure from failing the task; and
1467
+ # `--strict` is never passed — a gate must not live in a hook.
1468
+ INPUT="$input" node <<'POSTFLIGHT' || true
1469
+ const fs = require('fs');
1470
+ const path = require('path');
1471
+ const { spawnSync } = require('child_process');
1472
+
1473
+ let input;
1474
+ try {
1475
+ input = JSON.parse(process.env.INPUT || '');
1476
+ } catch {
1477
+ process.exit(0);
1478
+ }
1479
+ if (!input || input.status !== 'completed') {
1480
+ process.exit(0);
1481
+ }
1482
+
1483
+ // Ratchet: off for `light` pipelines and `spike` intents. A policy skip is
1484
+ // silent on purpose — a warning on every light receipt would make the
1485
+ // containment warnings below unreadable.
1486
+ let pipeline = null;
1487
+ try {
1488
+ const teamRoot = path.join(process.cwd(), '.ai.local', 'team');
1489
+ const active = JSON.parse(fs.readFileSync(path.join(teamRoot, 'active-task.json'), 'utf8'));
1490
+ const pipelineSlug = typeof active.slug === 'string' ? active.slug : '';
1491
+ // Same pattern as `SLUG_RE` at the top of this file: `tasks/<slug>` is
1492
+ // re-derived from `active-task.json` here too, so an unchecked slug could
1493
+ // escape the tree on this path exactly as it could there.
1494
+ const POSTFLIGHT_SLUG_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
1495
+ if (pipelineSlug.length <= 48 && POSTFLIGHT_SLUG_RE.test(pipelineSlug)) {
1496
+ pipeline = JSON.parse(fs.readFileSync(path.join(teamRoot, 'tasks', pipelineSlug, 'pipeline.json'), 'utf8'));
1497
+ }
1498
+ } catch {
1499
+ pipeline = null;
1500
+ }
1501
+ if (pipeline && (pipeline.profile === 'light' || pipeline.intent === 'spike')) {
1502
+ process.exit(0);
1503
+ }
1504
+
1505
+ if (!fs.existsSync(path.join(process.cwd(), '.ai.local', 'scripts', 'run.mjs'))) {
1506
+ process.stderr.write(
1507
+ 'WARNING: self-learning loop skipped: .ai.local/scripts/run.mjs is missing (install it with `npx @bonesofspring/ai-rules init <tool> --preset <stack>`)\n',
1508
+ );
1509
+ process.exit(0);
1510
+ }
1511
+
1512
+ // Relative argv[1] + `cwd` keeps `run.mjs`'s own entry guard (pathToFileURL
1513
+ // comparison) satisfied even when the project path traverses a symlink.
1514
+ // SIGKILL, not the SIGTERM default: a child that ignores SIGTERM would hold the
1515
+ // hook for its whole runtime while the warning below still reported 15 s.
1516
+ const result = spawnSync(process.execPath, ['.ai.local/scripts/run.mjs'], {
1517
+ cwd: process.cwd(),
1518
+ encoding: 'utf8',
1519
+ timeout: 15000,
1520
+ killSignal: 'SIGKILL',
1521
+ });
1522
+ if (result.stdout) process.stderr.write(result.stdout);
1523
+ if (result.stderr) process.stderr.write(result.stderr);
1524
+ if (result.error) {
1525
+ const timedOut = result.error.code === 'ETIMEDOUT';
1526
+ process.stderr.write(
1527
+ `WARNING: self-learning loop ${timedOut ? 'timed out after 15s' : `failed: ${result.error.message}`}\n`,
1528
+ );
1529
+ } else if (result.status !== 0) {
1530
+ process.stderr.write(`WARNING: self-learning loop exited ${result.status}\n`);
1531
+ }
1532
+ process.exit(0);
1533
+ POSTFLIGHT