@bonesofspring/ai-rules 0.2.36 → 0.2.38

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 (851) hide show
  1. package/CHANGELOG.md +38 -0
  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 +7 -1
  12. package/presets/_shared/ai-local/scripts/derive-gate-signals.mjs +173 -0
  13. package/presets/_shared/ai-local/scripts/efficacy-oracle.mjs +576 -0
  14. package/presets/_shared/ai-local/scripts/lock.mjs +118 -0
  15. package/presets/_shared/ai-local/scripts/rule-improver.mjs +795 -0
  16. package/presets/_shared/ai-local/scripts/run.mjs +309 -0
  17. package/presets/_shared/ai-local/scripts/signals.mjs +256 -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 +142 -0
  21. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +1377 -0
  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/MCP.md +2 -2
  25. package/presets/claude/android-kotlin/REPO_AGENTS.md +14 -0
  26. package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
  27. package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -1
  28. package/presets/claude/android-kotlin/agents/debugger.md +1 -1
  29. package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
  30. package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
  31. package/presets/claude/android-kotlin/commands/README.md +1 -0
  32. package/presets/claude/android-kotlin/commands/task-continue.md +9 -0
  33. package/presets/claude/android-kotlin/commands/technical-retro.md +8 -0
  34. package/presets/claude/android-kotlin/commands/update.md +39 -0
  35. package/presets/claude/android-kotlin/hooks/README.md +1 -0
  36. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +278 -28
  37. package/presets/claude/android-kotlin/hooks/check-preset-update.mjs +227 -0
  38. package/presets/claude/android-kotlin/hooks/examples/README.md +1 -1
  39. package/presets/claude/android-kotlin/mcp.json +1 -1
  40. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +7 -154
  41. package/presets/claude/android-kotlin/settings.json +14 -1
  42. package/presets/claude/android-kotlin/skills/technical-retro/SKILL.md +2 -0
  43. package/presets/claude/android-kotlin/team/README.md +2 -6
  44. package/presets/claude/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
  45. package/presets/claude/go/CLAUDE.md +1 -1
  46. package/presets/claude/go/MCP.md +2 -2
  47. package/presets/claude/go/REPO_AGENTS.md +14 -0
  48. package/presets/claude/go/agents/build-verifier.md +1 -1
  49. package/presets/claude/go/agents/code-reviewer.md +1 -1
  50. package/presets/claude/go/agents/debugger.md +1 -1
  51. package/presets/claude/go/agents/feature-developer.md +1 -1
  52. package/presets/claude/go/agents/task-analyst.md +1 -1
  53. package/presets/claude/go/commands/README.md +1 -0
  54. package/presets/claude/go/commands/task-continue.md +9 -0
  55. package/presets/claude/go/commands/technical-retro.md +8 -0
  56. package/presets/claude/go/commands/update.md +39 -0
  57. package/presets/claude/go/hooks/README.md +1 -0
  58. package/presets/claude/go/hooks/chain-team-phases.sh +290 -34
  59. package/presets/claude/go/hooks/check-preset-update.mjs +227 -0
  60. package/presets/claude/go/hooks/examples/README.md +1 -1
  61. package/presets/claude/go/mcp.json +1 -1
  62. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +7 -12
  63. package/presets/claude/go/settings.json +14 -1
  64. package/presets/claude/go/skills/technical-retro/SKILL.md +2 -0
  65. package/presets/claude/go/team/README.md +2 -6
  66. package/presets/claude/ios-swift/CLAUDE.md +1 -1
  67. package/presets/claude/ios-swift/MCP.md +2 -2
  68. package/presets/claude/ios-swift/REPO_AGENTS.md +14 -0
  69. package/presets/claude/ios-swift/agents/build-verifier.md +1 -1
  70. package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
  71. package/presets/claude/ios-swift/agents/debugger.md +1 -1
  72. package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
  73. package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
  74. package/presets/claude/ios-swift/commands/README.md +1 -0
  75. package/presets/claude/ios-swift/commands/task-continue.md +9 -0
  76. package/presets/claude/ios-swift/commands/technical-retro.md +8 -0
  77. package/presets/claude/ios-swift/commands/update.md +39 -0
  78. package/presets/claude/ios-swift/hooks/README.md +1 -0
  79. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +285 -35
  80. package/presets/claude/ios-swift/hooks/check-preset-update.mjs +227 -0
  81. package/presets/claude/ios-swift/hooks/examples/README.md +1 -1
  82. package/presets/claude/ios-swift/mcp.json +1 -1
  83. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +7 -154
  84. package/presets/claude/ios-swift/settings.json +14 -1
  85. package/presets/claude/ios-swift/skills/technical-retro/SKILL.md +2 -0
  86. package/presets/claude/ios-swift/team/README.md +2 -6
  87. package/presets/claude/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
  88. package/presets/claude/java/CLAUDE.md +2 -2
  89. package/presets/claude/java/REPO_AGENTS.md +14 -0
  90. package/presets/claude/java/agents/build-verifier.md +1 -1
  91. package/presets/claude/java/agents/code-reviewer.md +1 -1
  92. package/presets/claude/java/agents/debugger.md +1 -1
  93. package/presets/claude/java/agents/feature-developer.md +1 -1
  94. package/presets/claude/java/agents/task-analyst.md +1 -1
  95. package/presets/claude/java/commands/README.md +1 -0
  96. package/presets/claude/java/commands/task-continue.md +9 -0
  97. package/presets/claude/java/commands/technical-retro.md +8 -0
  98. package/presets/claude/java/commands/update.md +39 -0
  99. package/presets/claude/java/hooks/README.md +1 -0
  100. package/presets/claude/java/hooks/chain-team-phases.sh +290 -34
  101. package/presets/claude/java/hooks/check-preset-update.mjs +227 -0
  102. package/presets/claude/java/hooks/examples/README.md +1 -1
  103. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +7 -29
  104. package/presets/claude/java/settings.json +14 -1
  105. package/presets/claude/java/skills/technical-retro/SKILL.md +2 -0
  106. package/presets/claude/java/team/README.md +2 -6
  107. package/presets/claude/mcp-ts/CLAUDE.md +1 -1
  108. package/presets/claude/mcp-ts/REPO_AGENTS.md +14 -0
  109. package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
  110. package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
  111. package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
  112. package/presets/claude/mcp-ts/commands/README.md +1 -0
  113. package/presets/claude/mcp-ts/commands/task-continue.md +9 -0
  114. package/presets/claude/mcp-ts/commands/technical-retro.md +8 -0
  115. package/presets/claude/mcp-ts/commands/update.md +39 -0
  116. package/presets/claude/mcp-ts/hooks/README.md +1 -0
  117. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +289 -31
  118. package/presets/claude/mcp-ts/hooks/check-preset-update.mjs +227 -0
  119. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +7 -15
  120. package/presets/claude/mcp-ts/settings.json +14 -1
  121. package/presets/claude/mcp-ts/team/README.md +2 -6
  122. package/presets/claude/next/CLAUDE.md +2 -1
  123. package/presets/claude/next/MCP.md +2 -2
  124. package/presets/claude/next/REPO_AGENTS.md +15 -1
  125. package/presets/claude/next/agents/build-verifier.md +1 -1
  126. package/presets/claude/next/agents/code-reviewer.md +1 -1
  127. package/presets/claude/next/agents/debugger.md +1 -1
  128. package/presets/claude/next/agents/feature-developer.md +1 -1
  129. package/presets/claude/next/agents/task-analyst.md +1 -1
  130. package/presets/claude/next/agents/task-router.md +1 -1
  131. package/presets/claude/next/commands/README.md +1 -0
  132. package/presets/claude/next/commands/task-continue.md +9 -0
  133. package/presets/claude/next/commands/technical-retro.md +8 -0
  134. package/presets/claude/next/commands/update.md +39 -0
  135. package/presets/claude/next/hooks/README.md +1 -0
  136. package/presets/claude/next/hooks/chain-team-phases.sh +209 -24
  137. package/presets/claude/next/hooks/check-preset-update.mjs +227 -0
  138. package/presets/claude/next/hooks/examples/README.md +1 -1
  139. package/presets/claude/next/mcp.json +1 -1
  140. package/presets/claude/next/rules/anti-hallucination/react-next-anti-hallucination.md +21 -18
  141. package/presets/claude/next/rules/stack/next-app-router.md +27 -0
  142. package/presets/claude/next/rules/stack/next-static-export.md +16 -0
  143. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +7 -227
  144. package/presets/claude/next/rules/tooling-and-review/security-next.md +16 -2
  145. package/presets/claude/next/rules/ui-and-accessibility/component-catalog-gate.md +13 -0
  146. package/presets/claude/next/rules/ui-and-accessibility/forms-validation.md +12 -0
  147. package/presets/claude/next/settings.json +13 -0
  148. package/presets/claude/next/skills/technical-retro/SKILL.md +2 -0
  149. package/presets/claude/next/team/README.md +2 -6
  150. package/presets/claude/next/team/fixtures/artifact-manifest.example.json +1 -0
  151. package/presets/claude/next/team/fixtures/feature-light.json +2 -1
  152. package/presets/claude/next/team/fixtures/feature-ui-standard.json +24 -0
  153. package/presets/claude/nuxt/CLAUDE.md +2 -1
  154. package/presets/claude/nuxt/MCP.md +2 -2
  155. package/presets/claude/nuxt/REPO_AGENTS.md +14 -0
  156. package/presets/claude/nuxt/agents/build-verifier.md +1 -1
  157. package/presets/claude/nuxt/agents/code-reviewer.md +1 -1
  158. package/presets/claude/nuxt/agents/debugger.md +1 -1
  159. package/presets/claude/nuxt/agents/feature-developer.md +1 -1
  160. package/presets/claude/nuxt/agents/task-analyst.md +1 -1
  161. package/presets/claude/nuxt/commands/README.md +1 -0
  162. package/presets/claude/nuxt/commands/task-continue.md +9 -0
  163. package/presets/claude/nuxt/commands/technical-retro.md +8 -0
  164. package/presets/claude/nuxt/commands/update.md +39 -0
  165. package/presets/claude/nuxt/hooks/README.md +1 -0
  166. package/presets/claude/nuxt/hooks/chain-team-phases.sh +255 -25
  167. package/presets/claude/nuxt/hooks/check-preset-update.mjs +227 -0
  168. package/presets/claude/nuxt/hooks/examples/README.md +1 -1
  169. package/presets/claude/nuxt/mcp.json +1 -1
  170. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +7 -224
  171. package/presets/claude/nuxt/settings.json +13 -0
  172. package/presets/claude/nuxt/skills/technical-retro/SKILL.md +2 -0
  173. package/presets/claude/nuxt/team/README.md +2 -6
  174. package/presets/claude/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
  175. package/presets/claude/php-hexagonal/CLAUDE.md +2 -2
  176. package/presets/claude/php-hexagonal/REPO_AGENTS.md +14 -0
  177. package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
  178. package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
  179. package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
  180. package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
  181. package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
  182. package/presets/claude/php-hexagonal/commands/README.md +1 -0
  183. package/presets/claude/php-hexagonal/commands/task-continue.md +9 -0
  184. package/presets/claude/php-hexagonal/commands/technical-retro.md +8 -0
  185. package/presets/claude/php-hexagonal/commands/update.md +39 -0
  186. package/presets/claude/php-hexagonal/hooks/README.md +1 -0
  187. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +290 -34
  188. package/presets/claude/php-hexagonal/hooks/check-preset-update.mjs +227 -0
  189. package/presets/claude/php-hexagonal/hooks/examples/README.md +1 -1
  190. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +7 -29
  191. package/presets/claude/php-hexagonal/settings.json +14 -1
  192. package/presets/claude/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
  193. package/presets/claude/php-hexagonal/team/README.md +2 -6
  194. package/presets/claude/php-laravel/CLAUDE.md +1 -1
  195. package/presets/claude/php-laravel/REPO_AGENTS.md +14 -0
  196. package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
  197. package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
  198. package/presets/claude/php-laravel/agents/debugger.md +1 -1
  199. package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
  200. package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
  201. package/presets/claude/php-laravel/commands/README.md +1 -0
  202. package/presets/claude/php-laravel/commands/task-continue.md +9 -0
  203. package/presets/claude/php-laravel/commands/technical-retro.md +8 -0
  204. package/presets/claude/php-laravel/commands/update.md +39 -0
  205. package/presets/claude/php-laravel/hooks/README.md +1 -0
  206. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +290 -34
  207. package/presets/claude/php-laravel/hooks/check-preset-update.mjs +227 -0
  208. package/presets/claude/php-laravel/hooks/examples/README.md +1 -1
  209. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +7 -30
  210. package/presets/claude/php-laravel/settings.json +14 -1
  211. package/presets/claude/php-laravel/skills/technical-retro/SKILL.md +2 -0
  212. package/presets/claude/php-laravel/team/README.md +2 -6
  213. package/presets/claude/svelte/CLAUDE.md +2 -1
  214. package/presets/claude/svelte/MCP.md +2 -2
  215. package/presets/claude/svelte/REPO_AGENTS.md +14 -0
  216. package/presets/claude/svelte/agents/build-verifier.md +1 -1
  217. package/presets/claude/svelte/agents/code-reviewer.md +1 -1
  218. package/presets/claude/svelte/agents/debugger.md +1 -1
  219. package/presets/claude/svelte/agents/feature-developer.md +1 -1
  220. package/presets/claude/svelte/agents/task-analyst.md +1 -1
  221. package/presets/claude/svelte/commands/README.md +1 -0
  222. package/presets/claude/svelte/commands/task-continue.md +9 -0
  223. package/presets/claude/svelte/commands/technical-retro.md +8 -0
  224. package/presets/claude/svelte/commands/update.md +39 -0
  225. package/presets/claude/svelte/hooks/README.md +1 -0
  226. package/presets/claude/svelte/hooks/chain-team-phases.sh +255 -25
  227. package/presets/claude/svelte/hooks/check-preset-update.mjs +227 -0
  228. package/presets/claude/svelte/hooks/examples/README.md +1 -1
  229. package/presets/claude/svelte/mcp.json +1 -1
  230. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +7 -224
  231. package/presets/claude/svelte/settings.json +13 -0
  232. package/presets/claude/svelte/skills/technical-retro/SKILL.md +2 -0
  233. package/presets/claude/svelte/team/README.md +2 -6
  234. package/presets/claude/svelte/team/fixtures/artifact-manifest.example.json +1 -0
  235. package/presets/cursor/android-kotlin/AGENTS.md +1 -0
  236. package/presets/cursor/android-kotlin/MCP.md +2 -2
  237. package/presets/cursor/android-kotlin/REPO_AGENTS.md +14 -0
  238. package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
  239. package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -1
  240. package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
  241. package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
  242. package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
  243. package/presets/cursor/android-kotlin/commands/README.md +1 -0
  244. package/presets/cursor/android-kotlin/commands/task-continue.md +9 -0
  245. package/presets/cursor/android-kotlin/commands/technical-retro.md +8 -0
  246. package/presets/cursor/android-kotlin/commands/update.md +39 -0
  247. package/presets/cursor/android-kotlin/hooks/README.md +5 -1
  248. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +257 -25
  249. package/presets/cursor/android-kotlin/hooks/check-preset-update.mjs +227 -0
  250. package/presets/cursor/android-kotlin/hooks/examples/README.md +1 -1
  251. package/presets/cursor/android-kotlin/hooks.json +6 -0
  252. package/presets/cursor/android-kotlin/mcp.json +1 -1
  253. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +1 -1
  254. package/presets/cursor/android-kotlin/skills/technical-retro/SKILL.md +2 -0
  255. package/presets/cursor/android-kotlin/team/README.md +2 -0
  256. package/presets/cursor/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
  257. package/presets/cursor/go/MCP.md +2 -2
  258. package/presets/cursor/go/REPO_AGENTS.md +14 -0
  259. package/presets/cursor/go/agents/build-verifier.md +1 -1
  260. package/presets/cursor/go/agents/code-reviewer.md +1 -1
  261. package/presets/cursor/go/agents/debugger.md +1 -1
  262. package/presets/cursor/go/agents/feature-developer.md +1 -1
  263. package/presets/cursor/go/agents/task-analyst.md +1 -1
  264. package/presets/cursor/go/commands/README.md +1 -0
  265. package/presets/cursor/go/commands/task-continue.md +9 -0
  266. package/presets/cursor/go/commands/technical-retro.md +8 -0
  267. package/presets/cursor/go/commands/update.md +39 -0
  268. package/presets/cursor/go/hooks/README.md +5 -1
  269. package/presets/cursor/go/hooks/chain-team-phases.sh +282 -26
  270. package/presets/cursor/go/hooks/check-preset-update.mjs +227 -0
  271. package/presets/cursor/go/hooks/examples/README.md +1 -1
  272. package/presets/cursor/go/hooks.json +6 -0
  273. package/presets/cursor/go/mcp.json +1 -1
  274. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +1 -1
  275. package/presets/cursor/go/skills/technical-retro/SKILL.md +2 -0
  276. package/presets/cursor/go/team/README.md +2 -0
  277. package/presets/cursor/ios-swift/AGENTS.md +1 -0
  278. package/presets/cursor/ios-swift/MCP.md +2 -2
  279. package/presets/cursor/ios-swift/REPO_AGENTS.md +14 -0
  280. package/presets/cursor/ios-swift/agents/build-verifier.md +1 -1
  281. package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
  282. package/presets/cursor/ios-swift/agents/debugger.md +1 -1
  283. package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
  284. package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
  285. package/presets/cursor/ios-swift/commands/README.md +1 -0
  286. package/presets/cursor/ios-swift/commands/task-continue.md +9 -0
  287. package/presets/cursor/ios-swift/commands/technical-retro.md +8 -0
  288. package/presets/cursor/ios-swift/commands/update.md +39 -0
  289. package/presets/cursor/ios-swift/hooks/README.md +5 -1
  290. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +257 -25
  291. package/presets/cursor/ios-swift/hooks/check-preset-update.mjs +227 -0
  292. package/presets/cursor/ios-swift/hooks/examples/README.md +1 -1
  293. package/presets/cursor/ios-swift/hooks.json +6 -0
  294. package/presets/cursor/ios-swift/mcp.json +1 -1
  295. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +1 -1
  296. package/presets/cursor/ios-swift/skills/technical-retro/SKILL.md +2 -0
  297. package/presets/cursor/ios-swift/team/README.md +2 -0
  298. package/presets/cursor/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
  299. package/presets/cursor/java/AGENTS.md +1 -1
  300. package/presets/cursor/java/REPO_AGENTS.md +14 -0
  301. package/presets/cursor/java/agents/build-verifier.md +1 -1
  302. package/presets/cursor/java/agents/code-reviewer.md +1 -1
  303. package/presets/cursor/java/agents/debugger.md +1 -1
  304. package/presets/cursor/java/agents/feature-developer.md +1 -1
  305. package/presets/cursor/java/agents/task-analyst.md +1 -1
  306. package/presets/cursor/java/commands/README.md +1 -0
  307. package/presets/cursor/java/commands/task-continue.md +9 -0
  308. package/presets/cursor/java/commands/technical-retro.md +8 -0
  309. package/presets/cursor/java/commands/update.md +39 -0
  310. package/presets/cursor/java/hooks/README.md +5 -1
  311. package/presets/cursor/java/hooks/chain-team-phases.sh +282 -26
  312. package/presets/cursor/java/hooks/check-preset-update.mjs +227 -0
  313. package/presets/cursor/java/hooks/examples/README.md +1 -1
  314. package/presets/cursor/java/hooks.json +6 -0
  315. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +1 -1
  316. package/presets/cursor/java/skills/technical-retro/SKILL.md +2 -0
  317. package/presets/cursor/java/team/README.md +2 -0
  318. package/presets/cursor/mcp-ts/REPO_AGENTS.md +14 -0
  319. package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
  320. package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
  321. package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
  322. package/presets/cursor/mcp-ts/commands/README.md +1 -0
  323. package/presets/cursor/mcp-ts/commands/task-continue.md +9 -0
  324. package/presets/cursor/mcp-ts/commands/technical-retro.md +8 -0
  325. package/presets/cursor/mcp-ts/commands/update.md +39 -0
  326. package/presets/cursor/mcp-ts/hooks/README.md +5 -1
  327. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +286 -28
  328. package/presets/cursor/mcp-ts/hooks/check-preset-update.mjs +227 -0
  329. package/presets/cursor/mcp-ts/hooks.json +6 -0
  330. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +1 -1
  331. package/presets/cursor/mcp-ts/team/README.md +2 -0
  332. package/presets/cursor/next/AGENTS.md +1 -0
  333. package/presets/cursor/next/MCP.md +2 -2
  334. package/presets/cursor/next/REPO_AGENTS.md +15 -1
  335. package/presets/cursor/next/agents/build-verifier.md +1 -1
  336. package/presets/cursor/next/agents/code-reviewer.md +1 -1
  337. package/presets/cursor/next/agents/debugger.md +1 -1
  338. package/presets/cursor/next/agents/feature-developer.md +1 -1
  339. package/presets/cursor/next/agents/task-analyst.md +1 -1
  340. package/presets/cursor/next/agents/task-router.md +1 -1
  341. package/presets/cursor/next/commands/README.md +1 -0
  342. package/presets/cursor/next/commands/task-continue.md +9 -0
  343. package/presets/cursor/next/commands/technical-retro.md +8 -0
  344. package/presets/cursor/next/commands/update.md +39 -0
  345. package/presets/cursor/next/hooks/README.md +6 -0
  346. package/presets/cursor/next/hooks/chain-team-phases.sh +206 -23
  347. package/presets/cursor/next/hooks/check-preset-update.mjs +227 -0
  348. package/presets/cursor/next/hooks/examples/README.md +1 -1
  349. package/presets/cursor/next/hooks.json +6 -0
  350. package/presets/cursor/next/mcp.json +1 -1
  351. package/presets/cursor/next/rules/README.md +3 -1
  352. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +1 -1
  353. package/presets/cursor/next/rules/component-catalog-gate.mdc +13 -0
  354. package/presets/cursor/next/rules/forms-validation.mdc +12 -0
  355. package/presets/cursor/next/rules/next-app-router.mdc +27 -0
  356. package/presets/cursor/next/rules/next-static-export.mdc +16 -0
  357. package/presets/cursor/next/rules/react-next-anti-hallucination.mdc +21 -18
  358. package/presets/cursor/next/rules/security-next.mdc +16 -2
  359. package/presets/cursor/next/skills/technical-retro/SKILL.md +2 -0
  360. package/presets/cursor/next/team/README.md +2 -0
  361. package/presets/cursor/next/team/fixtures/artifact-manifest.example.json +1 -0
  362. package/presets/cursor/next/team/fixtures/feature-light.json +2 -1
  363. package/presets/cursor/next/team/fixtures/feature-ui-standard.json +24 -0
  364. package/presets/cursor/nuxt/AGENTS.md +1 -0
  365. package/presets/cursor/nuxt/MCP.md +2 -2
  366. package/presets/cursor/nuxt/REPO_AGENTS.md +14 -0
  367. package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
  368. package/presets/cursor/nuxt/agents/code-reviewer.md +1 -1
  369. package/presets/cursor/nuxt/agents/debugger.md +1 -1
  370. package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
  371. package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
  372. package/presets/cursor/nuxt/commands/README.md +1 -0
  373. package/presets/cursor/nuxt/commands/task-continue.md +9 -0
  374. package/presets/cursor/nuxt/commands/technical-retro.md +8 -0
  375. package/presets/cursor/nuxt/commands/update.md +39 -0
  376. package/presets/cursor/nuxt/hooks/README.md +4 -0
  377. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +252 -24
  378. package/presets/cursor/nuxt/hooks/check-preset-update.mjs +227 -0
  379. package/presets/cursor/nuxt/hooks/examples/README.md +1 -1
  380. package/presets/cursor/nuxt/hooks.json +6 -0
  381. package/presets/cursor/nuxt/mcp.json +1 -1
  382. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +1 -1
  383. package/presets/cursor/nuxt/skills/technical-retro/SKILL.md +2 -0
  384. package/presets/cursor/nuxt/team/README.md +2 -0
  385. package/presets/cursor/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
  386. package/presets/cursor/php-hexagonal/AGENTS.md +1 -1
  387. package/presets/cursor/php-hexagonal/REPO_AGENTS.md +14 -0
  388. package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
  389. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
  390. package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
  391. package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
  392. package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
  393. package/presets/cursor/php-hexagonal/commands/README.md +1 -0
  394. package/presets/cursor/php-hexagonal/commands/task-continue.md +9 -0
  395. package/presets/cursor/php-hexagonal/commands/technical-retro.md +8 -0
  396. package/presets/cursor/php-hexagonal/commands/update.md +39 -0
  397. package/presets/cursor/php-hexagonal/hooks/README.md +5 -1
  398. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +282 -26
  399. package/presets/cursor/php-hexagonal/hooks/check-preset-update.mjs +227 -0
  400. package/presets/cursor/php-hexagonal/hooks/examples/README.md +1 -1
  401. package/presets/cursor/php-hexagonal/hooks.json +6 -0
  402. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +1 -1
  403. package/presets/cursor/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
  404. package/presets/cursor/php-hexagonal/team/README.md +2 -0
  405. package/presets/cursor/php-laravel/AGENTS.md +1 -1
  406. package/presets/cursor/php-laravel/REPO_AGENTS.md +14 -0
  407. package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
  408. package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
  409. package/presets/cursor/php-laravel/agents/debugger.md +1 -1
  410. package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
  411. package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
  412. package/presets/cursor/php-laravel/commands/README.md +1 -0
  413. package/presets/cursor/php-laravel/commands/task-continue.md +9 -0
  414. package/presets/cursor/php-laravel/commands/technical-retro.md +8 -0
  415. package/presets/cursor/php-laravel/commands/update.md +39 -0
  416. package/presets/cursor/php-laravel/hooks/README.md +5 -1
  417. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +282 -26
  418. package/presets/cursor/php-laravel/hooks/check-preset-update.mjs +227 -0
  419. package/presets/cursor/php-laravel/hooks/examples/README.md +1 -1
  420. package/presets/cursor/php-laravel/hooks.json +6 -0
  421. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +1 -1
  422. package/presets/cursor/php-laravel/skills/technical-retro/SKILL.md +2 -0
  423. package/presets/cursor/php-laravel/team/README.md +2 -0
  424. package/presets/cursor/svelte/AGENTS.md +1 -0
  425. package/presets/cursor/svelte/MCP.md +2 -2
  426. package/presets/cursor/svelte/REPO_AGENTS.md +14 -0
  427. package/presets/cursor/svelte/agents/build-verifier.md +1 -1
  428. package/presets/cursor/svelte/agents/code-reviewer.md +1 -1
  429. package/presets/cursor/svelte/agents/debugger.md +1 -1
  430. package/presets/cursor/svelte/agents/feature-developer.md +1 -1
  431. package/presets/cursor/svelte/agents/task-analyst.md +1 -1
  432. package/presets/cursor/svelte/commands/README.md +1 -0
  433. package/presets/cursor/svelte/commands/task-continue.md +9 -0
  434. package/presets/cursor/svelte/commands/technical-retro.md +8 -0
  435. package/presets/cursor/svelte/commands/update.md +39 -0
  436. package/presets/cursor/svelte/hooks/README.md +4 -0
  437. package/presets/cursor/svelte/hooks/chain-team-phases.sh +252 -24
  438. package/presets/cursor/svelte/hooks/check-preset-update.mjs +227 -0
  439. package/presets/cursor/svelte/hooks/examples/README.md +1 -1
  440. package/presets/cursor/svelte/hooks.json +6 -0
  441. package/presets/cursor/svelte/mcp.json +1 -1
  442. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +1 -1
  443. package/presets/cursor/svelte/skills/technical-retro/SKILL.md +2 -0
  444. package/presets/cursor/svelte/team/README.md +2 -0
  445. package/presets/cursor/svelte/team/fixtures/artifact-manifest.example.json +1 -0
  446. package/presets/mavis/android-kotlin/MAVIS.md +1 -0
  447. package/presets/mavis/android-kotlin/MCP.md +2 -2
  448. package/presets/mavis/android-kotlin/REPO_AGENTS.md +14 -0
  449. package/presets/mavis/android-kotlin/adapter-map.json +17 -1
  450. package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
  451. package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -1
  452. package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
  453. package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
  454. package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
  455. package/presets/mavis/android-kotlin/commands/README.md +1 -0
  456. package/presets/mavis/android-kotlin/commands/task-continue.md +9 -0
  457. package/presets/mavis/android-kotlin/commands/technical-retro.md +8 -0
  458. package/presets/mavis/android-kotlin/commands/update.md +34 -0
  459. package/presets/mavis/android-kotlin/hooks/README.md +3 -0
  460. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +257 -25
  461. package/presets/mavis/android-kotlin/hooks/check-preset-update.mjs +227 -0
  462. package/presets/mavis/android-kotlin/mcp.json +1 -1
  463. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +1 -1
  464. package/presets/mavis/android-kotlin/skills/technical-retro/SKILL.md +2 -0
  465. package/presets/mavis/android-kotlin/team/README.md +2 -0
  466. package/presets/mavis/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
  467. package/presets/mavis/go/MCP.md +2 -2
  468. package/presets/mavis/go/REPO_AGENTS.md +14 -0
  469. package/presets/mavis/go/adapter-map.json +17 -1
  470. package/presets/mavis/go/agents/build-verifier.md +1 -1
  471. package/presets/mavis/go/agents/code-reviewer.md +1 -1
  472. package/presets/mavis/go/agents/debugger.md +1 -1
  473. package/presets/mavis/go/agents/feature-developer.md +1 -1
  474. package/presets/mavis/go/agents/task-analyst.md +1 -1
  475. package/presets/mavis/go/commands/README.md +1 -0
  476. package/presets/mavis/go/commands/task-continue.md +9 -0
  477. package/presets/mavis/go/commands/technical-retro.md +8 -0
  478. package/presets/mavis/go/commands/update.md +34 -0
  479. package/presets/mavis/go/hooks/README.md +3 -0
  480. package/presets/mavis/go/hooks/chain-team-phases.sh +282 -26
  481. package/presets/mavis/go/hooks/check-preset-update.mjs +227 -0
  482. package/presets/mavis/go/mcp.json +1 -1
  483. package/presets/mavis/go/rules/agent-team-orchestrator.md +1 -1
  484. package/presets/mavis/go/skills/technical-retro/SKILL.md +2 -0
  485. package/presets/mavis/go/team/README.md +2 -0
  486. package/presets/mavis/ios-swift/MAVIS.md +1 -0
  487. package/presets/mavis/ios-swift/MCP.md +2 -2
  488. package/presets/mavis/ios-swift/REPO_AGENTS.md +14 -0
  489. package/presets/mavis/ios-swift/adapter-map.json +17 -1
  490. package/presets/mavis/ios-swift/agents/build-verifier.md +1 -1
  491. package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
  492. package/presets/mavis/ios-swift/agents/debugger.md +1 -1
  493. package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
  494. package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
  495. package/presets/mavis/ios-swift/commands/README.md +1 -0
  496. package/presets/mavis/ios-swift/commands/task-continue.md +9 -0
  497. package/presets/mavis/ios-swift/commands/technical-retro.md +8 -0
  498. package/presets/mavis/ios-swift/commands/update.md +34 -0
  499. package/presets/mavis/ios-swift/hooks/README.md +3 -0
  500. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +257 -25
  501. package/presets/mavis/ios-swift/hooks/check-preset-update.mjs +227 -0
  502. package/presets/mavis/ios-swift/mcp.json +1 -1
  503. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +1 -1
  504. package/presets/mavis/ios-swift/skills/technical-retro/SKILL.md +2 -0
  505. package/presets/mavis/ios-swift/team/README.md +2 -0
  506. package/presets/mavis/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
  507. package/presets/mavis/java/REPO_AGENTS.md +14 -0
  508. package/presets/mavis/java/adapter-map.json +17 -1
  509. package/presets/mavis/java/agents/build-verifier.md +1 -1
  510. package/presets/mavis/java/agents/code-reviewer.md +1 -1
  511. package/presets/mavis/java/agents/debugger.md +1 -1
  512. package/presets/mavis/java/agents/feature-developer.md +1 -1
  513. package/presets/mavis/java/agents/task-analyst.md +1 -1
  514. package/presets/mavis/java/commands/README.md +1 -0
  515. package/presets/mavis/java/commands/task-continue.md +9 -0
  516. package/presets/mavis/java/commands/technical-retro.md +8 -0
  517. package/presets/mavis/java/commands/update.md +34 -0
  518. package/presets/mavis/java/hooks/README.md +3 -0
  519. package/presets/mavis/java/hooks/chain-team-phases.sh +282 -26
  520. package/presets/mavis/java/hooks/check-preset-update.mjs +227 -0
  521. package/presets/mavis/java/rules/agent-team-orchestrator.md +1 -1
  522. package/presets/mavis/java/skills/technical-retro/SKILL.md +2 -0
  523. package/presets/mavis/java/team/README.md +2 -0
  524. package/presets/mavis/mcp-ts/REPO_AGENTS.md +14 -0
  525. package/presets/mavis/mcp-ts/adapter-map.json +17 -1
  526. package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
  527. package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
  528. package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
  529. package/presets/mavis/mcp-ts/commands/README.md +1 -0
  530. package/presets/mavis/mcp-ts/commands/task-continue.md +9 -0
  531. package/presets/mavis/mcp-ts/commands/technical-retro.md +8 -0
  532. package/presets/mavis/mcp-ts/commands/update.md +34 -0
  533. package/presets/mavis/mcp-ts/hooks/README.md +3 -0
  534. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +286 -28
  535. package/presets/mavis/mcp-ts/hooks/check-preset-update.mjs +227 -0
  536. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +1 -1
  537. package/presets/mavis/mcp-ts/team/README.md +2 -0
  538. package/presets/mavis/next/MAVIS.md +1 -0
  539. package/presets/mavis/next/MCP.md +2 -2
  540. package/presets/mavis/next/REPO_AGENTS.md +15 -1
  541. package/presets/mavis/next/adapter-map.json +25 -1
  542. package/presets/mavis/next/agents/build-verifier.md +1 -1
  543. package/presets/mavis/next/agents/code-reviewer.md +1 -1
  544. package/presets/mavis/next/agents/debugger.md +1 -1
  545. package/presets/mavis/next/agents/feature-developer.md +1 -1
  546. package/presets/mavis/next/agents/task-analyst.md +1 -1
  547. package/presets/mavis/next/agents/task-router.md +1 -1
  548. package/presets/mavis/next/commands/README.md +1 -0
  549. package/presets/mavis/next/commands/task-continue.md +9 -0
  550. package/presets/mavis/next/commands/technical-retro.md +8 -0
  551. package/presets/mavis/next/commands/update.md +34 -0
  552. package/presets/mavis/next/hooks/README.md +3 -0
  553. package/presets/mavis/next/hooks/chain-team-phases.sh +206 -23
  554. package/presets/mavis/next/hooks/check-preset-update.mjs +227 -0
  555. package/presets/mavis/next/mcp.json +1 -1
  556. package/presets/mavis/next/rules/agent-team-orchestrator.md +1 -1
  557. package/presets/mavis/next/rules/component-catalog-gate.md +13 -0
  558. package/presets/mavis/next/rules/forms-validation.md +12 -0
  559. package/presets/mavis/next/rules/next-app-router.md +27 -0
  560. package/presets/mavis/next/rules/next-static-export.md +16 -0
  561. package/presets/mavis/next/rules/react-next-anti-hallucination.md +20 -18
  562. package/presets/mavis/next/rules/security-next.md +13 -0
  563. package/presets/mavis/next/skills/technical-retro/SKILL.md +2 -0
  564. package/presets/mavis/next/team/README.md +2 -0
  565. package/presets/mavis/next/team/fixtures/artifact-manifest.example.json +1 -0
  566. package/presets/mavis/next/team/fixtures/feature-light.json +2 -1
  567. package/presets/mavis/next/team/fixtures/feature-ui-standard.json +24 -0
  568. package/presets/mavis/nuxt/MAVIS.md +1 -0
  569. package/presets/mavis/nuxt/MCP.md +2 -2
  570. package/presets/mavis/nuxt/REPO_AGENTS.md +14 -0
  571. package/presets/mavis/nuxt/adapter-map.json +17 -1
  572. package/presets/mavis/nuxt/agents/build-verifier.md +1 -1
  573. package/presets/mavis/nuxt/agents/code-reviewer.md +1 -1
  574. package/presets/mavis/nuxt/agents/debugger.md +1 -1
  575. package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
  576. package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
  577. package/presets/mavis/nuxt/commands/README.md +1 -0
  578. package/presets/mavis/nuxt/commands/task-continue.md +9 -0
  579. package/presets/mavis/nuxt/commands/technical-retro.md +8 -0
  580. package/presets/mavis/nuxt/commands/update.md +34 -0
  581. package/presets/mavis/nuxt/hooks/README.md +3 -0
  582. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +252 -24
  583. package/presets/mavis/nuxt/hooks/check-preset-update.mjs +227 -0
  584. package/presets/mavis/nuxt/mcp.json +1 -1
  585. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +1 -1
  586. package/presets/mavis/nuxt/skills/technical-retro/SKILL.md +2 -0
  587. package/presets/mavis/nuxt/team/README.md +2 -0
  588. package/presets/mavis/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
  589. package/presets/mavis/php-hexagonal/REPO_AGENTS.md +14 -0
  590. package/presets/mavis/php-hexagonal/adapter-map.json +17 -1
  591. package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
  592. package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
  593. package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
  594. package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
  595. package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
  596. package/presets/mavis/php-hexagonal/commands/README.md +1 -0
  597. package/presets/mavis/php-hexagonal/commands/task-continue.md +9 -0
  598. package/presets/mavis/php-hexagonal/commands/technical-retro.md +8 -0
  599. package/presets/mavis/php-hexagonal/commands/update.md +34 -0
  600. package/presets/mavis/php-hexagonal/hooks/README.md +3 -0
  601. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +282 -26
  602. package/presets/mavis/php-hexagonal/hooks/check-preset-update.mjs +227 -0
  603. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
  604. package/presets/mavis/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
  605. package/presets/mavis/php-hexagonal/team/README.md +2 -0
  606. package/presets/mavis/php-laravel/REPO_AGENTS.md +14 -0
  607. package/presets/mavis/php-laravel/adapter-map.json +17 -1
  608. package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
  609. package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
  610. package/presets/mavis/php-laravel/agents/debugger.md +1 -1
  611. package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
  612. package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
  613. package/presets/mavis/php-laravel/commands/README.md +1 -0
  614. package/presets/mavis/php-laravel/commands/task-continue.md +9 -0
  615. package/presets/mavis/php-laravel/commands/technical-retro.md +8 -0
  616. package/presets/mavis/php-laravel/commands/update.md +34 -0
  617. package/presets/mavis/php-laravel/hooks/README.md +3 -0
  618. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +282 -26
  619. package/presets/mavis/php-laravel/hooks/check-preset-update.mjs +227 -0
  620. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +1 -1
  621. package/presets/mavis/php-laravel/skills/technical-retro/SKILL.md +2 -0
  622. package/presets/mavis/php-laravel/team/README.md +2 -0
  623. package/presets/mavis/svelte/MAVIS.md +1 -0
  624. package/presets/mavis/svelte/MCP.md +2 -2
  625. package/presets/mavis/svelte/REPO_AGENTS.md +14 -0
  626. package/presets/mavis/svelte/adapter-map.json +17 -1
  627. package/presets/mavis/svelte/agents/build-verifier.md +1 -1
  628. package/presets/mavis/svelte/agents/code-reviewer.md +1 -1
  629. package/presets/mavis/svelte/agents/debugger.md +1 -1
  630. package/presets/mavis/svelte/agents/feature-developer.md +1 -1
  631. package/presets/mavis/svelte/agents/task-analyst.md +1 -1
  632. package/presets/mavis/svelte/commands/README.md +1 -0
  633. package/presets/mavis/svelte/commands/task-continue.md +9 -0
  634. package/presets/mavis/svelte/commands/technical-retro.md +8 -0
  635. package/presets/mavis/svelte/commands/update.md +34 -0
  636. package/presets/mavis/svelte/hooks/README.md +3 -0
  637. package/presets/mavis/svelte/hooks/chain-team-phases.sh +252 -24
  638. package/presets/mavis/svelte/hooks/check-preset-update.mjs +227 -0
  639. package/presets/mavis/svelte/mcp.json +1 -1
  640. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +1 -1
  641. package/presets/mavis/svelte/skills/technical-retro/SKILL.md +2 -0
  642. package/presets/mavis/svelte/team/README.md +2 -0
  643. package/presets/mavis/svelte/team/fixtures/artifact-manifest.example.json +1 -0
  644. package/presets/opencode/android-kotlin/MCP.md +2 -2
  645. package/presets/opencode/android-kotlin/OPENCODE.md +15 -6
  646. package/presets/opencode/android-kotlin/REPO_AGENTS.md +14 -0
  647. package/presets/opencode/android-kotlin/adapter-map.json +17 -1
  648. package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
  649. package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -1
  650. package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
  651. package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
  652. package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
  653. package/presets/opencode/android-kotlin/commands/README.md +1 -0
  654. package/presets/opencode/android-kotlin/commands/task-continue.md +9 -0
  655. package/presets/opencode/android-kotlin/commands/technical-retro.md +8 -0
  656. package/presets/opencode/android-kotlin/commands/update.md +42 -0
  657. package/presets/opencode/android-kotlin/hooks/README.md +3 -0
  658. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +257 -25
  659. package/presets/opencode/android-kotlin/hooks/check-preset-update.mjs +227 -0
  660. package/presets/opencode/android-kotlin/opencode.json +3 -13
  661. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +1 -1
  662. package/presets/opencode/android-kotlin/skills/technical-retro/SKILL.md +2 -0
  663. package/presets/opencode/android-kotlin/team/README.md +2 -0
  664. package/presets/opencode/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
  665. package/presets/opencode/go/MCP.md +2 -2
  666. package/presets/opencode/go/OPENCODE.md +14 -6
  667. package/presets/opencode/go/REPO_AGENTS.md +14 -0
  668. package/presets/opencode/go/adapter-map.json +17 -1
  669. package/presets/opencode/go/agents/build-verifier.md +1 -1
  670. package/presets/opencode/go/agents/code-reviewer.md +1 -1
  671. package/presets/opencode/go/agents/debugger.md +1 -1
  672. package/presets/opencode/go/agents/feature-developer.md +1 -1
  673. package/presets/opencode/go/agents/task-analyst.md +1 -1
  674. package/presets/opencode/go/commands/README.md +1 -0
  675. package/presets/opencode/go/commands/task-continue.md +9 -0
  676. package/presets/opencode/go/commands/technical-retro.md +8 -0
  677. package/presets/opencode/go/commands/update.md +42 -0
  678. package/presets/opencode/go/hooks/README.md +3 -0
  679. package/presets/opencode/go/hooks/chain-team-phases.sh +282 -26
  680. package/presets/opencode/go/hooks/check-preset-update.mjs +227 -0
  681. package/presets/opencode/go/opencode.json +3 -13
  682. package/presets/opencode/go/rules/agent-team-orchestrator.md +1 -1
  683. package/presets/opencode/go/skills/technical-retro/SKILL.md +2 -0
  684. package/presets/opencode/go/team/README.md +2 -0
  685. package/presets/opencode/ios-swift/MCP.md +2 -2
  686. package/presets/opencode/ios-swift/OPENCODE.md +15 -6
  687. package/presets/opencode/ios-swift/REPO_AGENTS.md +14 -0
  688. package/presets/opencode/ios-swift/adapter-map.json +17 -1
  689. package/presets/opencode/ios-swift/agents/build-verifier.md +1 -1
  690. package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
  691. package/presets/opencode/ios-swift/agents/debugger.md +1 -1
  692. package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
  693. package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
  694. package/presets/opencode/ios-swift/commands/README.md +1 -0
  695. package/presets/opencode/ios-swift/commands/task-continue.md +9 -0
  696. package/presets/opencode/ios-swift/commands/technical-retro.md +8 -0
  697. package/presets/opencode/ios-swift/commands/update.md +42 -0
  698. package/presets/opencode/ios-swift/hooks/README.md +3 -0
  699. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +257 -25
  700. package/presets/opencode/ios-swift/hooks/check-preset-update.mjs +227 -0
  701. package/presets/opencode/ios-swift/opencode.json +3 -13
  702. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +1 -1
  703. package/presets/opencode/ios-swift/skills/technical-retro/SKILL.md +2 -0
  704. package/presets/opencode/ios-swift/team/README.md +2 -0
  705. package/presets/opencode/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
  706. package/presets/opencode/java/OPENCODE.md +14 -6
  707. package/presets/opencode/java/REPO_AGENTS.md +14 -0
  708. package/presets/opencode/java/adapter-map.json +17 -1
  709. package/presets/opencode/java/agents/build-verifier.md +1 -1
  710. package/presets/opencode/java/agents/code-reviewer.md +1 -1
  711. package/presets/opencode/java/agents/debugger.md +1 -1
  712. package/presets/opencode/java/agents/feature-developer.md +1 -1
  713. package/presets/opencode/java/agents/task-analyst.md +1 -1
  714. package/presets/opencode/java/commands/README.md +1 -0
  715. package/presets/opencode/java/commands/task-continue.md +9 -0
  716. package/presets/opencode/java/commands/technical-retro.md +8 -0
  717. package/presets/opencode/java/commands/update.md +42 -0
  718. package/presets/opencode/java/hooks/README.md +3 -0
  719. package/presets/opencode/java/hooks/chain-team-phases.sh +282 -26
  720. package/presets/opencode/java/hooks/check-preset-update.mjs +227 -0
  721. package/presets/opencode/java/opencode.json +2 -12
  722. package/presets/opencode/java/rules/agent-team-orchestrator.md +1 -1
  723. package/presets/opencode/java/skills/technical-retro/SKILL.md +2 -0
  724. package/presets/opencode/java/team/README.md +2 -0
  725. package/presets/opencode/mcp-ts/OPENCODE.md +14 -6
  726. package/presets/opencode/mcp-ts/REPO_AGENTS.md +14 -0
  727. package/presets/opencode/mcp-ts/adapter-map.json +17 -1
  728. package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
  729. package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
  730. package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
  731. package/presets/opencode/mcp-ts/commands/README.md +1 -0
  732. package/presets/opencode/mcp-ts/commands/task-continue.md +9 -0
  733. package/presets/opencode/mcp-ts/commands/technical-retro.md +8 -0
  734. package/presets/opencode/mcp-ts/commands/update.md +42 -0
  735. package/presets/opencode/mcp-ts/hooks/README.md +3 -0
  736. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +286 -28
  737. package/presets/opencode/mcp-ts/hooks/check-preset-update.mjs +227 -0
  738. package/presets/opencode/mcp-ts/opencode.json +2 -12
  739. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +1 -1
  740. package/presets/opencode/mcp-ts/team/README.md +2 -0
  741. package/presets/opencode/next/MCP.md +2 -2
  742. package/presets/opencode/next/OPENCODE.md +15 -6
  743. package/presets/opencode/next/REPO_AGENTS.md +15 -1
  744. package/presets/opencode/next/adapter-map.json +25 -1
  745. package/presets/opencode/next/agents/build-verifier.md +1 -1
  746. package/presets/opencode/next/agents/code-reviewer.md +1 -1
  747. package/presets/opencode/next/agents/debugger.md +1 -1
  748. package/presets/opencode/next/agents/feature-developer.md +1 -1
  749. package/presets/opencode/next/agents/task-analyst.md +1 -1
  750. package/presets/opencode/next/agents/task-router.md +1 -1
  751. package/presets/opencode/next/commands/README.md +1 -0
  752. package/presets/opencode/next/commands/task-continue.md +9 -0
  753. package/presets/opencode/next/commands/technical-retro.md +8 -0
  754. package/presets/opencode/next/commands/update.md +42 -0
  755. package/presets/opencode/next/hooks/README.md +3 -0
  756. package/presets/opencode/next/hooks/chain-team-phases.sh +206 -23
  757. package/presets/opencode/next/hooks/check-preset-update.mjs +227 -0
  758. package/presets/opencode/next/opencode.json +3 -13
  759. package/presets/opencode/next/rules/agent-team-orchestrator.md +1 -1
  760. package/presets/opencode/next/rules/component-catalog-gate.md +13 -0
  761. package/presets/opencode/next/rules/forms-validation.md +12 -0
  762. package/presets/opencode/next/rules/next-app-router.md +27 -0
  763. package/presets/opencode/next/rules/next-static-export.md +16 -0
  764. package/presets/opencode/next/rules/react-next-anti-hallucination.md +20 -18
  765. package/presets/opencode/next/rules/security-next.md +13 -0
  766. package/presets/opencode/next/skills/technical-retro/SKILL.md +2 -0
  767. package/presets/opencode/next/team/README.md +2 -0
  768. package/presets/opencode/next/team/fixtures/artifact-manifest.example.json +1 -0
  769. package/presets/opencode/next/team/fixtures/feature-light.json +2 -1
  770. package/presets/opencode/next/team/fixtures/feature-ui-standard.json +24 -0
  771. package/presets/opencode/nuxt/MCP.md +2 -2
  772. package/presets/opencode/nuxt/OPENCODE.md +15 -6
  773. package/presets/opencode/nuxt/REPO_AGENTS.md +14 -0
  774. package/presets/opencode/nuxt/adapter-map.json +17 -1
  775. package/presets/opencode/nuxt/agents/build-verifier.md +1 -1
  776. package/presets/opencode/nuxt/agents/code-reviewer.md +1 -1
  777. package/presets/opencode/nuxt/agents/debugger.md +1 -1
  778. package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
  779. package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
  780. package/presets/opencode/nuxt/commands/README.md +1 -0
  781. package/presets/opencode/nuxt/commands/task-continue.md +9 -0
  782. package/presets/opencode/nuxt/commands/technical-retro.md +8 -0
  783. package/presets/opencode/nuxt/commands/update.md +42 -0
  784. package/presets/opencode/nuxt/hooks/README.md +3 -0
  785. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +252 -24
  786. package/presets/opencode/nuxt/hooks/check-preset-update.mjs +227 -0
  787. package/presets/opencode/nuxt/opencode.json +3 -13
  788. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +1 -1
  789. package/presets/opencode/nuxt/skills/technical-retro/SKILL.md +2 -0
  790. package/presets/opencode/nuxt/team/README.md +2 -0
  791. package/presets/opencode/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
  792. package/presets/opencode/php-hexagonal/OPENCODE.md +14 -6
  793. package/presets/opencode/php-hexagonal/REPO_AGENTS.md +14 -0
  794. package/presets/opencode/php-hexagonal/adapter-map.json +17 -1
  795. package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
  796. package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
  797. package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
  798. package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
  799. package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
  800. package/presets/opencode/php-hexagonal/commands/README.md +1 -0
  801. package/presets/opencode/php-hexagonal/commands/task-continue.md +9 -0
  802. package/presets/opencode/php-hexagonal/commands/technical-retro.md +8 -0
  803. package/presets/opencode/php-hexagonal/commands/update.md +42 -0
  804. package/presets/opencode/php-hexagonal/hooks/README.md +3 -0
  805. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +282 -26
  806. package/presets/opencode/php-hexagonal/hooks/check-preset-update.mjs +227 -0
  807. package/presets/opencode/php-hexagonal/opencode.json +2 -12
  808. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
  809. package/presets/opencode/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
  810. package/presets/opencode/php-hexagonal/team/README.md +2 -0
  811. package/presets/opencode/php-laravel/OPENCODE.md +14 -6
  812. package/presets/opencode/php-laravel/REPO_AGENTS.md +14 -0
  813. package/presets/opencode/php-laravel/adapter-map.json +17 -1
  814. package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
  815. package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
  816. package/presets/opencode/php-laravel/agents/debugger.md +1 -1
  817. package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
  818. package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
  819. package/presets/opencode/php-laravel/commands/README.md +1 -0
  820. package/presets/opencode/php-laravel/commands/task-continue.md +9 -0
  821. package/presets/opencode/php-laravel/commands/technical-retro.md +8 -0
  822. package/presets/opencode/php-laravel/commands/update.md +42 -0
  823. package/presets/opencode/php-laravel/hooks/README.md +3 -0
  824. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +282 -26
  825. package/presets/opencode/php-laravel/hooks/check-preset-update.mjs +227 -0
  826. package/presets/opencode/php-laravel/opencode.json +2 -12
  827. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +1 -1
  828. package/presets/opencode/php-laravel/skills/technical-retro/SKILL.md +2 -0
  829. package/presets/opencode/php-laravel/team/README.md +2 -0
  830. package/presets/opencode/svelte/MCP.md +2 -2
  831. package/presets/opencode/svelte/OPENCODE.md +15 -6
  832. package/presets/opencode/svelte/REPO_AGENTS.md +14 -0
  833. package/presets/opencode/svelte/adapter-map.json +17 -1
  834. package/presets/opencode/svelte/agents/build-verifier.md +1 -1
  835. package/presets/opencode/svelte/agents/code-reviewer.md +1 -1
  836. package/presets/opencode/svelte/agents/debugger.md +1 -1
  837. package/presets/opencode/svelte/agents/feature-developer.md +1 -1
  838. package/presets/opencode/svelte/agents/task-analyst.md +1 -1
  839. package/presets/opencode/svelte/commands/README.md +1 -0
  840. package/presets/opencode/svelte/commands/task-continue.md +9 -0
  841. package/presets/opencode/svelte/commands/technical-retro.md +8 -0
  842. package/presets/opencode/svelte/commands/update.md +42 -0
  843. package/presets/opencode/svelte/hooks/README.md +3 -0
  844. package/presets/opencode/svelte/hooks/chain-team-phases.sh +252 -24
  845. package/presets/opencode/svelte/hooks/check-preset-update.mjs +227 -0
  846. package/presets/opencode/svelte/opencode.json +3 -13
  847. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +1 -1
  848. package/presets/opencode/svelte/skills/technical-retro/SKILL.md +2 -0
  849. package/presets/opencode/svelte/team/README.md +2 -0
  850. package/presets/opencode/svelte/team/fixtures/artifact-manifest.example.json +1 -0
  851. package/scripts/check-product-specs.sh +115 -9
@@ -0,0 +1,227 @@
1
+ #!/usr/bin/env node
2
+ // Shared preset hook. Edit this file only; `yarn fix:generated` copies it into every stack.
3
+
4
+ import crypto from 'node:crypto';
5
+ import fs from 'node:fs';
6
+ import os from 'node:os';
7
+ import path from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+
10
+ export const PACKAGE_NAME = '@bonesofspring/ai-rules';
11
+ export const REGISTRY_URL = 'https://registry.npmjs.org/@bonesofspring/ai-rules/latest';
12
+ export const CACHE_TTL_MS = 12 * 60 * 60 * 1000;
13
+ export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode'];
14
+
15
+ const RELEASE_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
16
+
17
+ export function isReleaseVersion(value) {
18
+ return typeof value === 'string' && RELEASE_VERSION.test(value);
19
+ }
20
+
21
+ function versionParts(value) {
22
+ const core = String(value).trim().replace(/^v/, '').split('-')[0];
23
+ const parts = core.split('.').map((part) => {
24
+ const parsed = Number.parseInt(part, 10);
25
+ return Number.isFinite(parsed) ? parsed : 0;
26
+ });
27
+ while (parts.length < 3) parts.push(0);
28
+ return parts.slice(0, 3);
29
+ }
30
+
31
+ /** Negative when `left` is older than `right`. */
32
+ export function compareVersions(left, right) {
33
+ const a = versionParts(left);
34
+ const b = versionParts(right);
35
+ for (let index = 0; index < 3; index += 1) {
36
+ if (a[index] !== b[index]) return a[index] < b[index] ? -1 : 1;
37
+ }
38
+ return 0;
39
+ }
40
+
41
+ export function readInstalls(root) {
42
+ const installs = [];
43
+ for (const tool of TOOL_ROOTS) {
44
+ const file = path.join(root, tool, '.ai-rules-install.json');
45
+ if (!fs.existsSync(file)) continue;
46
+ let parsed;
47
+ try {
48
+ parsed = JSON.parse(fs.readFileSync(file, 'utf8'));
49
+ } catch {
50
+ continue;
51
+ }
52
+ if (!parsed || typeof parsed !== 'object') continue;
53
+ const version = typeof parsed.packageVersion === 'string' ? parsed.packageVersion.trim() : '';
54
+ installs.push({ tool, version: version || null });
55
+ }
56
+ return installs;
57
+ }
58
+
59
+ function formatInstalled(installs) {
60
+ const byVersion = new Map();
61
+ for (const item of installs) {
62
+ const label = item.version ?? 'not recorded';
63
+ const tools = byVersion.get(label) ?? [];
64
+ tools.push(item.tool);
65
+ byVersion.set(label, tools);
66
+ }
67
+ return [...byVersion.entries()]
68
+ .map(([version, tools]) => `${version} (${tools.join(', ')})`)
69
+ .join('; ');
70
+ }
71
+
72
+ export function buildNotice(installs, latest) {
73
+ if (!isReleaseVersion(latest) || installs.length === 0) return '';
74
+ const behind = installs.filter(
75
+ (item) => item.version === null || compareVersions(item.version, latest) < 0,
76
+ );
77
+ if (behind.length === 0) return '';
78
+ return [
79
+ `Preset update available for ${PACKAGE_NAME}.`,
80
+ `Installed: ${formatInstalled(behind)}.`,
81
+ `Latest: ${latest}.`,
82
+ 'Tell the user once in their native language before other work.',
83
+ 'Name the installed version and the latest version, and ask them to run /update.',
84
+ 'Do not run the update unless they ask.',
85
+ ].join(' ');
86
+ }
87
+
88
+ export function formatOutput(notice, format) {
89
+ if (format === 'cursor') {
90
+ return notice ? `${JSON.stringify({ additional_context: notice })}\n` : '{}\n';
91
+ }
92
+ if (format === 'claude') {
93
+ return notice
94
+ ? `${JSON.stringify({
95
+ hookSpecificOutput: {
96
+ hookEventName: 'SessionStart',
97
+ additionalContext: notice,
98
+ },
99
+ additional_context: notice,
100
+ })}\n`
101
+ : '{}\n';
102
+ }
103
+ return notice ? `${notice}\n` : '';
104
+ }
105
+
106
+ function cacheFile(root, tmp) {
107
+ let resolved = path.resolve(root);
108
+ try {
109
+ resolved = fs.realpathSync(resolved);
110
+ } catch {
111
+ // Keep the unresolved path when the directory is not on disk yet.
112
+ }
113
+ const key = crypto.createHash('sha256').update(resolved).digest('hex').slice(0, 16);
114
+ return path.join(tmp, 'ai-rules-update-check', key, 'latest.json');
115
+ }
116
+
117
+ export async function resolveLatest({
118
+ root,
119
+ now = Date.now(),
120
+ fetchLatest,
121
+ tmp = os.tmpdir(),
122
+ ttl = CACHE_TTL_MS,
123
+ }) {
124
+ const file = cacheFile(root, tmp);
125
+ try {
126
+ const cached = JSON.parse(fs.readFileSync(file, 'utf8'));
127
+ if (
128
+ isReleaseVersion(cached.version) &&
129
+ typeof cached.checkedAt === 'number' &&
130
+ now - cached.checkedAt < ttl
131
+ ) {
132
+ return cached.version;
133
+ }
134
+ } catch {
135
+ // Missing or unreadable cache is a miss.
136
+ }
137
+ const version = await fetchLatest();
138
+ if (!isReleaseVersion(version)) {
139
+ throw new Error('registry version missing');
140
+ }
141
+ try {
142
+ fs.mkdirSync(path.dirname(file), { recursive: true });
143
+ fs.writeFileSync(file, `${JSON.stringify({ version, checkedAt: now })}\n`);
144
+ } catch {
145
+ // The check still returns the version when the cache directory is not writable.
146
+ }
147
+ return version;
148
+ }
149
+
150
+ export async function fetchRegistryLatest(url = REGISTRY_URL, timeoutMs = 2500) {
151
+ const response = await fetch(url, {
152
+ headers: { accept: 'application/json', 'user-agent': 'ai-rules-update-check' },
153
+ signal: AbortSignal.timeout(timeoutMs),
154
+ redirect: 'follow',
155
+ });
156
+ if (!response.ok) {
157
+ throw new Error(`registry status ${response.status}`);
158
+ }
159
+ const body = await response.json();
160
+ if (!isReleaseVersion(body?.version)) {
161
+ throw new Error('registry version missing');
162
+ }
163
+ return body.version;
164
+ }
165
+
166
+ export function parseFormat(argv) {
167
+ for (let index = 0; index < argv.length; index += 1) {
168
+ const arg = argv[index];
169
+ if (arg === '--format') {
170
+ const next = argv[index + 1];
171
+ if (next === 'cursor' || next === 'claude' || next === 'text') return next;
172
+ } else if (arg.startsWith('--format=')) {
173
+ const value = arg.slice('--format='.length);
174
+ if (value === 'cursor' || value === 'claude' || value === 'text') return value;
175
+ }
176
+ }
177
+ return 'text';
178
+ }
179
+
180
+ export function projectRoot() {
181
+ const fromEnv = process.env.CURSOR_PROJECT_DIR || process.env.CLAUDE_PROJECT_DIR;
182
+ if (fromEnv) return path.resolve(fromEnv);
183
+ return process.cwd();
184
+ }
185
+
186
+ export async function runCheck({
187
+ root,
188
+ format = 'text',
189
+ now,
190
+ fetchLatest,
191
+ tmp,
192
+ ttl,
193
+ }) {
194
+ try {
195
+ const installs = readInstalls(root);
196
+ if (installs.length === 0) return formatOutput('', format);
197
+ const latest = await resolveLatest({ root, now, fetchLatest, tmp, ttl });
198
+ return formatOutput(buildNotice(installs, latest), format);
199
+ } catch {
200
+ return formatOutput('', format);
201
+ }
202
+ }
203
+
204
+ async function main() {
205
+ const format = parseFormat(process.argv.slice(2));
206
+ const text = await runCheck({
207
+ root: projectRoot(),
208
+ format,
209
+ fetchLatest: () => fetchRegistryLatest(),
210
+ });
211
+ process.stdout.write(text);
212
+ }
213
+
214
+ const isDirect =
215
+ process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
216
+
217
+ if (isDirect) {
218
+ main()
219
+ .then(() => {
220
+ process.exitCode = 0;
221
+ })
222
+ .catch(() => {
223
+ const format = parseFormat(process.argv.slice(2));
224
+ process.stdout.write(format === 'text' ? '' : '{}\n');
225
+ process.exitCode = 0;
226
+ });
227
+ }
@@ -1,6 +1,6 @@
1
1
  # Hooks cookbook (examples)
2
2
 
3
- Optional scripts under `hooks/examples/`. **Not** referenced from default `hooks.json` (only `guard-shell-command.sh` + `chain-team-phases.sh`).
3
+ Optional scripts under `hooks/examples/`. **Not** referenced from default `hooks.json` (only `guard-shell-command.sh`, `chain-team-phases.sh`, and `check-preset-update.mjs`).
4
4
 
5
5
  | Script | Purpose |
6
6
  |--------|---------|
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "figma": {
8
8
  "type": "http",
9
- "url": "https://mcp.figma.com/mcp"
9
+ "url": "http://127.0.0.1:3845/mcp"
10
10
  }
11
11
  }
12
12
  }
@@ -32,10 +32,14 @@ Roster of specialists is **stack-specific** (agent names and write scopes differ
32
32
  | Tests | unit planner/generator/healer; e2e/UI planner/generator/healer (stack-native) |
33
33
  | Docs | `tech-writer` |
34
34
 
35
- **Cursor frontmatter:** all team pipeline agents use `readonly: false` so they can write team artifacts. Production/app restrictions live in the agent prompt body — do **not** set `readonly: true`.
35
+ **Claude packaging:** team pipeline agents are Markdown files with YAML frontmatter under `.claude/agents/`; subagents are invoked with the Task tool and start with no always-on context, so each prompt re-declares the rules it needs. Production/app restrictions live in the agent prompt body. See `agents/README.md`.
36
36
 
37
37
  Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`; schema SoT: **agent-artifact-contracts**.
38
38
 
39
+ ## Stack notes
40
+
41
+ Roles, write scopes, and Claude `tools` / frontmatter packaging — **`agents/README.md`**.
42
+
39
43
  ## Dynamic pipeline
40
44
 
41
45
  ```mermaid
@@ -128,7 +132,7 @@ Each producing agent runs a **pre-receipt self-review** of its own output — go
128
132
 
129
133
  - **Context loss vs excess/noise.** *Loss* = a dropped/misattributed AC or constraint, a stale plan vs the current request, a forgotten prior decision. *Excess/noise* = irrelevant/tangent reads, scope creep beyond the frame, duplicated or bloated artifacts, chat state that belongs on disk.
130
134
  - **Re-anchor.** On detected drift, return the run to the framed task: 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). Re-anchor is a **trigger source of the existing `plan-graph` `replan`** — no second orchestrator, no `status.json`/`metrics.json` field.
131
- - **Recording & ratchet.** The producer writes a `## Self-review` block in the artifact it owns; the correction lives only in `.memlog.md` (hook-only lifecycle preserved). No self-review, context-health pass, or re-anchor for `bounded`/`spike` tasks (or the `light` profile) — ratchet up for `standard`/`architectural`, never down past a required verification gate. See the requestable `quality/self-review-and-context-hygiene` contract — including the optional rule-improvement loop (append wrong-turn signals to `.ai.local/signals.jsonl` and run `.ai.local/scripts/rule-improver.mjs`) when that script exists.
135
+ - **Recording & ratchet.** The producer writes a `## Self-review` block in the artifact it owns; the correction lives only in `.memlog.md` (hook-only lifecycle preserved). No self-review, context-health pass, or re-anchor for `bounded`/`spike` tasks (or the `light` profile) — ratchet up for `standard`/`architectural`, never down past a required verification gate. See the requestable `quality/self-review-and-context-hygiene` contract — including the optional loop. 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`.
132
136
 
133
137
  ## status.json (pipeline mode)
134
138
 
@@ -203,7 +207,7 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
203
207
  12. **Invoke the ready set, and never advance before reconciliation.** In graph mode the hook computes the ready queue; invoke exactly the handoff's agent list (a wave in one assistant turn, multiple Task calls) and do not start any next step from your own reasoning until the hook records the join and emits the next handoff. The wave is the join unit; `status.joinedSlots` is the satisfaction ledger.
204
208
  13. **Only a proven conflict-free set is `parallel: true`.** Disjoint declared `writeScopes`, distinct agents, distinct `artifactOutputIds`, no shared lifecycle file; `mockup-reviewer` is never parallel (its FAIL gate is serial). See **plan-graph** § Conflict model.
205
209
 
206
- ## Team artifact I/O (Cursor Shell sandbox)
210
+ ## Team artifact I/O
207
211
 
208
212
  - **Persist the original prompt.** For **every** task — `/task` or a routed work request — write the user's **verbatim** prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). The header is additive provenance only; the fenced text block holds the user's words unchanged. It is not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
209
213
  - **Append follow-up prompts.** When a user-authored prompt arrives for an active slug (new message, `/task-continue` args, gate feedback, clarification), append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` — `seq` = current max + 1, create on first append, never rewrite or duplicate an entry, never touch `prompt.md`. Exclude hook `followup_message` and empty/argument-less invocations. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
@@ -249,154 +253,3 @@ When user describes a **non-trivial task** (not a question), suggest `/task <mes
249
253
  ## Preset authoring
250
254
 
251
255
  When the work edits `packages/ai-rules/presets/**` (or dogfood `.cursor/` sync of presets), follow meta-rules: **preset-goals**, **preset-pr-checklist**, **preset-twin-sync**, **preset-layering**, **preset-token-budget**, **preset-no-cross-stack-leakage**.
252
-
253
- ## Stack notes
254
-
255
- ### Roles (iOS)
256
-
257
- | Agent | Prod writes | Typical intent |
258
- |-------|-------------|----------------|
259
- | `task-router` | no (team) | Every `/task` |
260
- | `task-analyst` | no | feature, refactor, test-only, a11y, docs, migration, ux-design, spec-gen |
261
- | `solution-architect` | no | spike, cross-layer Feature |
262
- | `migration-specialist` | no | Xcode/SPM/iOS upgrades |
263
- | `api-contract-reviewer` | no | OpenAPI / Swift codegen contracts |
264
- | `debugger` | minimal | bugfix |
265
- | `ci-investigator` | minimal CI | ci-fix |
266
- | `feature-developer` | yes | feature, bugfix, refactor, migration, a11y |
267
- | `build-verifier` | no | xcodebuild + SwiftLint/Format + unit smoke |
268
- | `accessibility-reviewer` | no | VoiceOver / Dynamic Type |
269
- | `performance-auditor` | no | launch / Instruments |
270
- | `mockup-reviewer` | no (team only) | mockup-review, feature/refactor/spike/spec-gen with `figma.com` |
271
- | `code-reviewer` | no | most pipelines, review-only |
272
- | `security-reviewer` | no | Keychain, ATS, PII |
273
- | `qa-tester` | tests | feature, bugfix, test-only |
274
- | `unit-test-planner` / `generator` / `healer` | tests | unit-only |
275
- | `xcuitest-test-planner` / `generator` / `healer` | UI tests | e2e-only (XCUITest) |
276
- | `tech-writer` | docs | docs-only |
277
- | `openspec-author` | `openspec/**` only | openspec-change (`/opsx:propose`, `/opsx:apply`, `/opsx:archive`, openspec refresh) — used only when the consumer repo has `openspec/` initialized |
278
-
279
- **Never use Playwright stems** in this preset — substitute XCUITest trio. Document Playwright skips when copying next templates.
280
-
281
- **Cursor frontmatter:** all team agents use `readonly: false` (team writes). Production restrictions live in prompt bodies.
282
-
283
- Full prompts: `.cursor/agents/*.md`. Artifact conventions: `.ai.local/team/README.md`; schema SoT: **agent-artifact-contracts**.
284
-
285
- **Behavioral UX:** `task-analyst` loads requestable skill `ux-design` for standalone intent `ux-design` and embedded required-signal / advisory UI AC. No `ux-designer` agent in v1.
286
-
287
- **Product specs:** When `/task` or `/spec-start` touches pages/features/`docs/specs`: if INDEX exists and no generate intent → instruct next agent to load requestable **`product-specs`** (consume; soft-fail; never invent). If generate/bootstrap/`spec-gen` → load **`product-specs-authoring`** + skill **`spec-authoring`** inside **task-analyst** (not a separate pipeline step); pass created spec paths + INDEX diff in handoff; human gate must approve before feature-developer. No-op if INDEX absent and no author intent.
288
-
289
- When editing `packages/ai-rules/presets/**`, follow **`tooling-and-review/preset-goals.md`** + **`tooling-and-review/preset-pr-checklist.md`** (+ twin-sync / layering / token-budget / leakage meta-rules).
290
-
291
- ## Dynamic pipeline
292
-
293
- **Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
294
-
295
- New pipelines retain top-level `profile` and include `routingDecision` with `complexity`, `riskFlags`, non-empty `routingReasons`, `estimatedWorkPackages`, and `openDecisionCount`. The stack `task-router` owns heuristics; this metadata is auditable evidence and does not change hook semantics.
296
-
297
- ## Metrics lifecycle
298
-
299
- Use the local `metrics.json` ledger described by **agent-task-metrics**: the orchestration runtime initializes attempts before invocation, hooks record host-clock ends, and agents never guess a parallel completion from `currentAgent`.
300
-
301
- ## Artifact context index and receipts
302
-
303
- Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Schema SoT: **agent-artifact-contracts**.
304
-
305
- - Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
306
- - Markdown remains detailed evidence; the manifest records producer, status, authoritative paths, timestamps, outcome, and evidence paths.
307
- - Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges. The top-level array key is `artifacts` — not `entries`; see `agent-artifact-contracts.md` for the schema callout.
308
- - The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite state, gate, retry, attempt, timestamp, or metrics fields.
309
- - Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
310
-
311
- ## Plan revision
312
-
313
- Replanning is a named, auditable operation — never a silent reorder. When an evaluation oracle fails twice on a task, scope or requirements change, or a new dependency/consumer is discovered: append `decision: replan rev N → N+1` to `.memlog.md`, update `decomposition.md` (and any optional `planRevision` / `epics[]` fields), then **re-run the affected gate**. Scope-changing revisions return to the human gate.
314
-
315
- ## Self-review & context hygiene
316
-
317
- Each producing agent runs a **pre-receipt self-review** of its own output — goal/AC coverage, evidence presence, and alignment/drift — **before** it emits its terminal receipt. It is a producer-side step, **not** a new pipeline agent or step, and it does not replace the evidence gate (`verification-before-completion`), the independent `code-reviewer`, or the `build-verifier` project gate.
318
-
319
- - **Context loss vs excess/noise.** *Loss* = a dropped/misattributed AC or constraint, a stale plan vs the current request, a forgotten prior decision. *Excess/noise* = irrelevant/tangent reads, scope creep beyond the frame, duplicated or bloated artifacts, chat state that belongs on disk.
320
- - **Re-anchor.** On detected drift, return the run to the framed task: 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). Re-anchor is a **trigger source of the existing `plan-graph` `replan`** — no second orchestrator, no `status.json`/`metrics.json` field.
321
- - **Recording & ratchet.** The producer writes a `## Self-review` block in the artifact it owns; the correction lives only in `.memlog.md` (hook-only lifecycle preserved). No self-review, context-health pass, or re-anchor for `bounded`/`spike` tasks (or the `light` profile) — ratchet up for `standard`/`architectural`, never down past a required verification gate. See the requestable `quality/self-review-and-context-hygiene` contract — including the optional rule-improvement loop (append wrong-turn signals to `.ai.local/signals.jsonl` and run `.ai.local/scripts/rule-improver.mjs`) when that script exists.
322
-
323
- ## Context budget & checkpoint/resume
324
-
325
- Work in bounded waves (one artifact class across the surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record produced paths on the `implementation` manifest entry `authoritativePaths`. A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. Mechanical waves (generation, embed sync) are delegated to repo scripts.
326
-
327
- ## status.json (pipeline mode)
328
-
329
- | Field | Meaning |
330
- |-------|---------|
331
- | `activeAttempts` | Transient timing bridge keyed by `attemptId` |
332
- | `lastCompletedAttempt` | Diagnostic pointer to the latest finished attempt |
333
- | `parallelCompleted` | Agents that have stopped in the current parallel step |
334
- | `parallelOutcomes` | Per-agent `{ outcome, attemptId, confidence }` for the current parallel join; cleared when the step advances or retries |
335
-
336
- On each `subagentStop`, the hook reconciles `status.state` from the completing producer's terminal `artifact-manifest.json` receipt when agents left lifecycle fields untouched. Wait for that handoff before invoking the next step.
337
-
338
- | state | Meaning |
339
- |-------|---------|
340
- | `in_progress` | Current step running |
341
- | `completed` | Current step done; hook advances |
342
- | `awaiting_approval` | Human gate; wait for `/task-continue` |
343
- | `changes_requested` | Reviewer blocked; re-run developer |
344
- | `validation_failed` | build-verifier failed; re-run developer then verifier |
345
-
346
- ## Parallel scheduling (graph mode)
347
-
348
- `pipeline.json` may carry an optional step graph: `steps[].id`, `steps[].taskIds[]`, `steps[].dependsOn[]`, `steps[].writeScopes[]`. While no step declares `dependsOn`, the hook keeps the legacy linear advance; any occurrence switches it to graph mode.
349
-
350
- - The hook recomputes the **ready queue** on every stop: steps whose `dependsOn` are satisfied, not yet satisfied, not in flight, not skipped, not blocked.
351
- - The **wave** is the join unit; a single `parallel: true` step is a one-step wave. `status.joinedSlots` is the persistent satisfaction ledger; `status.waveSteps`/`waveId` name the in-flight wave; `status.blockedSteps` excludes a blocked step.
352
- - Set `parallel: true` only for a set proven conflict-free (disjoint `writeScopes`, distinct agents and `artifactOutputIds`); never place `mockup-reviewer` in a parallel group.
353
- - **No advance before reconciliation.** Invoke exactly the handoff's agent list (a wave in one turn, multiple Task calls) and do not start a next step from your own reasoning until the hook records the join.
354
- - A retry re-dispatches only unsatisfied slots: a satisfied sibling keeps its entry and terminal metric and is never re-invoked.
355
-
356
- ## Rules (strict)
357
-
358
- 1. **`/task` always starts with task-router** (unless user skips with documented pipeline).
359
- 2. Read `pipeline.json` before every subagent invocation.
360
- 3. One role per Task call — except parallel steps.
361
- 4. **Never** skip `humanGates` without `/task-continue` or explicit approval.
362
- 5. Persist handoffs to disk under `.ai.local/team/tasks/<slug>/` via **Write** (not Shell `mkdir`), including `mockup-review.md` / `ux-design.md` when those producers ran.
363
- 6. On `changes_requested`: developer → same reviewer. Exception: embedded `mockup-reviewer` FAIL → `awaiting_approval` / `/task-continue` only (no developer retry).
364
- 7. On `validation_failed`: developer → build-verifier.
365
- 8. When all steps complete, suggest `/technical-retro <slug>`.
366
- 9. If `autoChain: false`, do not rely on hook.
367
- 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). 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.
368
- 11. **Answer the user in the resolved dialogue language for the whole task.** Resolve once at task start
369
- (`.ai.local` `## Language` → prompt language → English) and pass it to every step; `/task-continue` keeps
370
- it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See
371
- **language-policy**.
372
-
373
- ## Model when invoking (Task)
374
-
375
- Honor optional `steps[i].model` (`cheap` \| `standard` \| `strong`); else agent frontmatter (matrix in `agents/README.md`).
376
-
377
- - `cheap` → Task `model: "fast"` when accepted.
378
- - `standard` → omit Task model.
379
- - `strong` → never pass `fast`; use agent pin `claude-opus-4-8[effort=high]` / parent Max.
380
-
381
- ## Team artifact I/O (Cursor Shell sandbox)
382
-
383
- - **Persist the original prompt.** For **every** task — `/task` or a routed work request — write the user's **verbatim** prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). The header is additive provenance only; the fenced text block holds the user's words unchanged. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
384
- - **Append follow-up prompts.** When a user-authored prompt arrives for an active slug (new message, `/task-continue` args, gate feedback, clarification), append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` — `seq` = current max + 1, create on first append, never rewrite or duplicate an entry, never touch `prompt.md`. Exclude hook `followup_message` and empty/argument-less invocations. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
385
- - **Answer in the resolved dialogue language.** Resolve once at task start (`.ai.local` `## Language` →
386
- prompt language → English; mixed → dominant; nearest `.ai.local` wins) and reuse it for every user-facing
387
- message and `/task-continue`. Record the tag in the `prompt.md` header (`language: <BCP-47>`) + a
388
- `.memlog.md` `event:` line; a later correction is an append-only memlog event. Development, reasoning, and
389
- artifacts stay **English**. See **language-policy**.
390
-
391
- - Create/update `.ai.local/team/tasks/<slug>/**` with the **Write** tool. Do **not** bootstrap slug dirs with Shell `mkdir -p` — sandbox → `Operation not permitted` (esp. macOS Desktop/Documents + TCC).
392
- - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`.
393
-
394
- ## Skip pipeline when
395
-
396
- - Pure questions (“how does X work?”) — prefer **`codebase-analyzer`**; typo / one-file trivial fix; user “no pipeline”; single-line docs-only.
397
-
398
- Borderline — **`tooling-and-review/agent-team-intake.md`**.
399
-
400
- ## Preset authoring
401
-
402
- When the work edits `packages/ai-rules/presets/**` (or dogfood `.cursor/` sync of presets), follow meta-rules: **preset-goals**, **preset-pr-checklist**, **preset-twin-sync**, **preset-layering**, **preset-token-budget**, **preset-no-cross-stack-leakage**.
@@ -3,11 +3,24 @@
3
3
  "permissions": {
4
4
  "deny": [
5
5
  "Bash(git commit *)",
6
- "Bash(git push *)"
6
+ "Bash(git commit)",
7
+ "Bash(git push *)",
8
+ "Bash(git push)"
7
9
  ],
8
10
  "ask": []
9
11
  },
10
12
  "hooks": {
13
+ "SessionStart": [
14
+ {
15
+ "hooks": [
16
+ {
17
+ "type": "command",
18
+ "command": "node \"${CLAUDE_PROJECT_DIR}/.claude/hooks/check-preset-update.mjs\" --format claude",
19
+ "timeout": 8
20
+ }
21
+ ]
22
+ }
23
+ ],
11
24
  "PreToolUse": [
12
25
  {
13
26
  "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`.
@@ -74,6 +74,8 @@ Same JSON on Claude, Mavis, or OpenCode: `bash .<tool>/hooks/chain-team-phases.s
74
74
 
75
75
  ## Contracts
76
76
 
77
+ - **Manifest field name:** receipts go in `artifacts[]`. Anything written under `entries` is ignored — the hook reads only `artifacts` and prints a dual-read warning naming the file. See `agent-team/agent-artifact-contracts.md` § Schema field name.
78
+ - **Evidence paths:** `authoritativePaths[]` must be task-relative (`.ai.local/team/tasks/<slug>/…`). Put anything outside the task directory — e.g. `openspec/changes/**` — in `evidencePaths[]`.
77
79
  - Manifest schema: shared core `agent-team/agent-artifact-contracts.md`. Read it first; producers upsert only their IDs.
78
80
  - Metrics: append-only allowlisted events — `agent-team/agent-task-metrics.md`. Aggregate: `node node_modules/@bonesofspring/ai-rules/scripts/aggregate-agent-task-metrics.mjs --team-root .ai.local/team`.
79
81
  - Commit `.ai.local/team/` templates (and slugs if you want them in clones).
@@ -89,9 +91,3 @@ Same JSON on Claude, Mavis, or OpenCode: `bash .<tool>/hooks/chain-team-phases.s
89
91
  **Checkpoint / resume:** progress is checkpointed to `tasks/<slug>/.memlog.md` (`## <date>` + `event:` entries) and the `artifact-manifest.json` `implementation` entry (`authoritativePaths`). A resumed run reads both and continues at the first stage whose exit criteria are unmet.
90
92
 
91
93
  **Self-review / re-anchor:** each producing agent records a `## Self-review` block in the artifact it owns (`brief.md` / `implementation.md` / `debug-report.md` / `validation-report.md` / `review.md`) and, on detected context loss / excess, a re-anchor line in `.memlog.md` — `event:` (no plan change) or `decision: replan rev N → N+1` (plan change). No hook/lifecycle field is added.
92
-
93
- ## Contracts
94
-
95
- - Manifest schema: shared core `agent-team/agent-artifact-contracts.md`. Read it first; producers upsert only their IDs.
96
- - Metrics: append-only allowlisted events — `agent-team/agent-task-metrics.md`. Aggregate: `node node_modules/@bonesofspring/ai-rules/scripts/aggregate-agent-task-metrics.mjs --team-root .ai.local/team`.
97
- - Commit `.ai.local/team/` templates (and slugs if you want them in clones).
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
+ "_note": "Receipts go in `artifacts[]`; anything written under `entries` is ignored (the hook warns).",
3
4
  "slug": "example-mockup-review",
4
5
  "updatedAt": "2026-07-31T12:05:45.000Z",
5
6
  "artifacts": [
@@ -17,7 +17,7 @@ Preset for Java backends using ports & adapters (Spring Boot default).
17
17
 
18
18
  - **22 agents** — `agents/README.md` (no a11y / Playwright / XCUITest)
19
19
  - **10 skills** — feature-delivery, spec-authoring, spec-discovery, unit-testing, integration-testing, ci-investigation, debug-investigation, code-review, technical-retro, write-adr
20
- - **3 commands** — `/task`, `/task-continue`, `/technical-retro`
20
+ - **4 commands** — `/task`, `/task-continue`, `/technical-retro`, `/update`
21
21
 
22
22
  ## Dogfood (5 scenarios)
23
23
 
@@ -40,4 +40,4 @@ Init: `npx @bonesofspring/ai-rules init claude --preset java` (also copies `REPO
40
40
  `git commit/push deny`; JS stacks also `npx jest* deny` and `npm/npx/pnpm/bun`
41
41
  ask). Re-init overwrites the file (consumer can edit afterwards); mirror
42
42
  with root `AGENTS.md` if you change the harness.
43
- - **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`.
43
+ - **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 java
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 java`. `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
@@ -49,6 +55,14 @@ Detect Maven vs Gradle from the repo (`pom.xml` vs `build.gradle(.kts)`); prefer
49
55
 
50
56
  Static analysis — only tools already configured in the repo/CI.
51
57
 
58
+ ## Preset version
59
+
60
+ 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/`.
61
+ Cursor `sessionStart` and Claude `SessionStart` run the same script.
62
+ When it prints a notice, tell the user once in their native language: the installed version, the latest version, and to run `/update`.
63
+ Do not run the update unless they ask.
64
+ Empty output or a failed run stays silent.
65
+
52
66
  ## Security basics
53
67
 
54
68
  - Do not commit secrets (`.env`, tokens, credentials).
@@ -50,7 +50,7 @@ Before you run the project gate and write the terminal validation receipt, self-
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 `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).
53
+ 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).
54
54
 
55
55
  ## Artifact contract
56
56
 
@@ -61,7 +61,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
61
61
 
62
62
  **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.
63
63
 
64
- 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).
64
+ 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).
65
65
 
66
66
  ## Artifact
67
67
 
@@ -66,7 +66,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
66
66
 
67
67
  **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.
68
68
 
69
- 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).
69
+ 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).
70
70
 
71
71
  ## MCP usage
72
72
 
@@ -91,7 +91,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
91
91
 
92
92
  **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.
93
93
 
94
- 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).
94
+ 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).
95
95
 
96
96
  ## Product specs (docs/specs)
97
97
 
@@ -60,7 +60,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
60
60
 
61
61
  **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.
62
62
 
63
- 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).
63
+ Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
64
64
 
65
65
  ## Deliverables
66
66
 
@@ -7,5 +7,6 @@ Slash-command and on-demand scenario definitions. Copied to `.claude/commands/`
7
7
  | `task.md` | Single entry point: router → dynamic pipeline → first agent |
8
8
  | `task-continue.md` | Continue after human gate / pause per `pipeline.json` |
9
9
  | `technical-retro.md` | Facilitate a technical retro, including the “Agent work” block |
10
+ | `update.md` | Reinstall each installed tool with the preset recorded at init |
10
11
 
11
12
  See also the preset root `README.md`. Artifacts: `.ai.local/team/README.md`.
@@ -44,6 +44,15 @@ Plan revision during execution is a named, auditable operation: an evaluation or
44
44
 
45
45
  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.
46
46
 
47
+ ## Self-learning loop (optional)
48
+
49
+ The chain hook runs the loop after every producer receipt; with the hook disabled or no auto-chain, run it yourself:
50
+
51
+ 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`.
52
+
53
+ Never pass `--strict` from this path — it exits 1 when capture is broken and would fail a healthy resume. The
54
+ store deduplicates, so a second run appends nothing.
55
+
47
56
  ## Artifacts for handoff
48
57
 
49
58
  | Agent | Read |