@bonesofspring/ai-rules 0.2.60 → 0.2.63

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 (718) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/README.md +62 -29
  3. package/bin/cli.js +368 -59
  4. package/bin/lib/ai-local-drift.js +18 -0
  5. package/bin/lib/engine-scripts.js +22 -5
  6. package/bin/lib/engine-upgrade.js +279 -0
  7. package/bin/lib/mcp/catalog.js +66 -5
  8. package/bin/lib/mcp/clients.js +4 -4
  9. package/bin/lib/mcp/credentials.js +88 -0
  10. package/bin/lib/mcp/doctor.js +100 -8
  11. package/bin/lib/mcp/npx.js +17 -0
  12. package/bin/lib/mcp/registry.js +2 -0
  13. package/bin/lib/merged-config.js +38 -0
  14. package/bin/lib/seed-ai-local-team.js +32 -14
  15. package/bin/mavis-install.js +3 -1
  16. package/bin/opencode-install.js +3 -1
  17. package/bin/zcode-install.js +3 -1
  18. package/docs/MAVIS.md +5 -2
  19. package/docs/MCP-CATALOG.md +30 -2
  20. package/docs/MCP-SETUP.md +30 -6
  21. package/docs/OPENCODE.md +27 -4
  22. package/docs/PLATFORMS.md +38 -0
  23. package/docs/PRESET-CONTRIBUTION.md +27 -14
  24. package/docs/TEAM-DB.md +194 -21
  25. package/docs/openapi/team-db.v1.json +4443 -2083
  26. package/mcp/defectdojo-mcp.mjs +353 -0
  27. package/mcp/gitlab.mjs +5 -1
  28. package/mcp/lib/defectdojo.mjs +249 -0
  29. package/mcp/lib/yandex.mjs +39 -15
  30. package/package.json +11 -5
  31. package/presets/_shared/ai-local/scripts/check-write-scope.mjs +176 -28
  32. package/presets/_shared/ai-local/scripts/lock.mjs +128 -69
  33. package/presets/_shared/ai-local/scripts/signals.mjs +17 -1
  34. package/presets/_shared/ai-local/scripts/team-db-api.mjs +496 -67
  35. package/presets/_shared/ai-local/scripts/team-db-dashboard.mjs +816 -5
  36. package/presets/_shared/ai-local/scripts/team-db-openapi.mjs +761 -6
  37. package/presets/_shared/ai-local/scripts/team-db-project.mjs +10 -0
  38. package/presets/_shared/ai-local/scripts/team-db-scheduler.mjs +2360 -0
  39. package/presets/_shared/ai-local/scripts/team-db-schema.mjs +87 -0
  40. package/presets/_shared/ai-local/scripts/team-db.mjs +151 -9
  41. package/presets/_shared/ai-local/scripts/upstream-research.mjs +2961 -0
  42. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +17 -0
  43. package/presets/_shared/core/agent-team/agent-team-intake.md +1 -0
  44. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +5 -2
  45. package/presets/_shared/core/meta/preset-pr-checklist.md +4 -4
  46. package/presets/_shared/core/meta/preset-twin-sync.md +1 -1
  47. package/presets/_shared/hooks/README.md +23 -3
  48. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +57 -3
  49. package/presets/_shared/hooks/check-preset-update.mjs +4 -3
  50. package/presets/{claude/nuxt/hooks/guard-shell-command.sh → _shared/hooks/guard-shell-command.mjs.tmpl} +29 -35
  51. package/presets/_shared/hooks/run-hook.mjs +102 -0
  52. package/presets/claude/android-kotlin/hooks/README.md +4 -3
  53. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +57 -3
  54. package/presets/claude/android-kotlin/hooks/check-preset-update.mjs +4 -3
  55. package/presets/claude/android-kotlin/hooks/examples/README.md +2 -2
  56. package/presets/claude/android-kotlin/hooks/guard-shell-command.mjs +96 -0
  57. package/presets/claude/android-kotlin/hooks/run-hook.mjs +102 -0
  58. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +1 -0
  59. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
  60. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +4 -4
  61. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +1 -1
  62. package/presets/claude/android-kotlin/settings.json +2 -2
  63. package/presets/claude/android-kotlin/team/README.md +5 -0
  64. package/presets/claude/go/hooks/README.md +4 -3
  65. package/presets/claude/go/hooks/chain-team-phases.sh +57 -3
  66. package/presets/claude/go/hooks/check-preset-update.mjs +4 -3
  67. package/presets/claude/go/hooks/examples/README.md +2 -2
  68. package/presets/claude/go/hooks/guard-shell-command.mjs +95 -0
  69. package/presets/claude/go/hooks/run-hook.mjs +102 -0
  70. package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +1 -0
  71. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
  72. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +4 -4
  73. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +1 -1
  74. package/presets/claude/go/settings.json +2 -2
  75. package/presets/claude/go/team/README.md +5 -0
  76. package/presets/claude/ios-swift/hooks/README.md +4 -3
  77. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +57 -3
  78. package/presets/claude/ios-swift/hooks/check-preset-update.mjs +4 -3
  79. package/presets/claude/ios-swift/hooks/examples/README.md +2 -2
  80. package/presets/claude/ios-swift/hooks/guard-shell-command.mjs +95 -0
  81. package/presets/claude/ios-swift/hooks/run-hook.mjs +102 -0
  82. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +1 -0
  83. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
  84. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +4 -4
  85. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +1 -1
  86. package/presets/claude/ios-swift/settings.json +2 -2
  87. package/presets/claude/ios-swift/team/README.md +5 -0
  88. package/presets/claude/java/hooks/README.md +4 -3
  89. package/presets/claude/java/hooks/chain-team-phases.sh +57 -3
  90. package/presets/claude/java/hooks/check-preset-update.mjs +4 -3
  91. package/presets/claude/java/hooks/examples/README.md +2 -2
  92. package/presets/claude/java/hooks/{guard-shell-command.sh → guard-shell-command.mjs} +31 -38
  93. package/presets/claude/java/hooks/run-hook.mjs +102 -0
  94. package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +1 -0
  95. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
  96. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +4 -4
  97. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +1 -1
  98. package/presets/claude/java/settings.json +2 -2
  99. package/presets/claude/java/team/README.md +5 -0
  100. package/presets/claude/mcp-ts/hooks/README.md +4 -3
  101. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +57 -3
  102. package/presets/claude/mcp-ts/hooks/check-preset-update.mjs +4 -3
  103. package/presets/claude/mcp-ts/hooks/examples/README.md +1 -1
  104. package/presets/claude/mcp-ts/hooks/guard-shell-command.mjs +95 -0
  105. package/presets/claude/mcp-ts/hooks/run-hook.mjs +102 -0
  106. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +1 -0
  107. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
  108. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +4 -4
  109. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +1 -1
  110. package/presets/claude/mcp-ts/settings.json +2 -2
  111. package/presets/claude/mcp-ts/team/README.md +5 -0
  112. package/presets/claude/mol/hooks/README.md +20 -0
  113. package/presets/claude/mol/hooks/chain-team-phases.sh +57 -3
  114. package/presets/claude/mol/hooks/check-preset-update.mjs +4 -3
  115. package/presets/claude/{svelte/hooks/guard-shell-command.sh → mol/hooks/guard-shell-command.mjs} +29 -35
  116. package/presets/claude/mol/hooks/run-hook.mjs +102 -0
  117. package/presets/claude/mol/rules/tooling-and-review/agent-team-intake.md +1 -0
  118. package/presets/claude/mol/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
  119. package/presets/claude/mol/rules/tooling-and-review/preset-pr-checklist.md +4 -4
  120. package/presets/claude/mol/rules/tooling-and-review/preset-twin-sync.md +1 -1
  121. package/presets/claude/mol/settings.json +2 -2
  122. package/presets/claude/mol/team/README.md +5 -0
  123. package/presets/claude/next/agents/build-verifier.md +18 -3
  124. package/presets/claude/next/agents/code-reviewer.md +2 -0
  125. package/presets/claude/next/agents/feature-developer.md +3 -1
  126. package/presets/claude/next/agents/task-analyst.md +6 -0
  127. package/presets/claude/next/agents/task-router.md +5 -3
  128. package/presets/claude/next/commands/README.md +1 -0
  129. package/presets/claude/next/commands/task-continue.md +1 -1
  130. package/presets/claude/next/commands/upstream-research.md +23 -0
  131. package/presets/claude/next/hooks/README.md +4 -3
  132. package/presets/claude/next/hooks/chain-team-phases.sh +57 -3
  133. package/presets/claude/next/hooks/check-preset-update.mjs +4 -3
  134. package/presets/claude/next/hooks/examples/README.md +2 -2
  135. package/presets/claude/next/hooks/guard-shell-command.mjs +94 -0
  136. package/presets/claude/next/hooks/run-hook.mjs +102 -0
  137. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +1 -0
  138. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
  139. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +4 -4
  140. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +1 -1
  141. package/presets/claude/next/settings.json +2 -2
  142. package/presets/claude/next/team/README.md +23 -0
  143. package/presets/claude/next/team/upstream/config.json +31 -0
  144. package/presets/claude/next/team/upstream/digest-template.md +55 -0
  145. package/presets/claude/next/team/upstream/opencode.json +34 -0
  146. package/presets/claude/next/team/upstream/projects.json +4 -0
  147. package/presets/claude/next/team/upstream/prompt.md +77 -0
  148. package/presets/claude/next/team/upstream/signatures.json +9 -0
  149. package/presets/claude/nuxt/hooks/README.md +4 -3
  150. package/presets/claude/nuxt/hooks/chain-team-phases.sh +57 -3
  151. package/presets/claude/nuxt/hooks/check-preset-update.mjs +4 -3
  152. package/presets/claude/nuxt/hooks/examples/README.md +2 -2
  153. package/presets/claude/{ios-swift/hooks/guard-shell-command.sh → nuxt/hooks/guard-shell-command.mjs} +29 -37
  154. package/presets/claude/nuxt/hooks/run-hook.mjs +102 -0
  155. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +1 -0
  156. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
  157. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +4 -4
  158. package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +1 -1
  159. package/presets/claude/nuxt/settings.json +2 -2
  160. package/presets/claude/nuxt/team/README.md +5 -0
  161. package/presets/claude/php-hexagonal/hooks/README.md +4 -3
  162. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +57 -3
  163. package/presets/claude/php-hexagonal/hooks/check-preset-update.mjs +4 -3
  164. package/presets/claude/php-hexagonal/hooks/examples/README.md +2 -2
  165. package/presets/claude/php-hexagonal/hooks/guard-shell-command.mjs +96 -0
  166. package/presets/claude/php-hexagonal/hooks/run-hook.mjs +102 -0
  167. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +1 -0
  168. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
  169. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +4 -4
  170. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +1 -1
  171. package/presets/claude/php-hexagonal/settings.json +2 -2
  172. package/presets/claude/php-hexagonal/team/README.md +5 -0
  173. package/presets/claude/php-laravel/hooks/README.md +4 -3
  174. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +57 -3
  175. package/presets/claude/php-laravel/hooks/check-preset-update.mjs +4 -3
  176. package/presets/claude/php-laravel/hooks/examples/README.md +2 -2
  177. package/presets/claude/php-laravel/hooks/guard-shell-command.mjs +96 -0
  178. package/presets/claude/php-laravel/hooks/run-hook.mjs +102 -0
  179. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +1 -0
  180. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
  181. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +4 -4
  182. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +1 -1
  183. package/presets/claude/php-laravel/settings.json +2 -2
  184. package/presets/claude/php-laravel/team/README.md +5 -0
  185. package/presets/claude/svelte/hooks/README.md +4 -3
  186. package/presets/claude/svelte/hooks/chain-team-phases.sh +57 -3
  187. package/presets/claude/svelte/hooks/check-preset-update.mjs +4 -3
  188. package/presets/claude/svelte/hooks/examples/README.md +2 -2
  189. package/presets/claude/svelte/hooks/guard-shell-command.mjs +94 -0
  190. package/presets/claude/svelte/hooks/run-hook.mjs +102 -0
  191. package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +1 -0
  192. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
  193. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +4 -4
  194. package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +1 -1
  195. package/presets/claude/svelte/settings.json +2 -2
  196. package/presets/claude/svelte/team/README.md +5 -0
  197. package/presets/cursor/android-kotlin/hooks/README.md +2 -1
  198. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +57 -3
  199. package/presets/cursor/android-kotlin/hooks/check-preset-update.mjs +4 -3
  200. package/presets/cursor/android-kotlin/hooks/examples/README.md +1 -1
  201. package/presets/cursor/android-kotlin/hooks/guard-shell-command.mjs +96 -0
  202. package/presets/cursor/android-kotlin/hooks/run-hook.mjs +102 -0
  203. package/presets/cursor/android-kotlin/hooks.json +2 -2
  204. package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +1 -0
  205. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +2 -1
  206. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +4 -4
  207. package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +1 -1
  208. package/presets/cursor/android-kotlin/team/README.md +5 -0
  209. package/presets/cursor/go/hooks/README.md +2 -1
  210. package/presets/cursor/go/hooks/chain-team-phases.sh +57 -3
  211. package/presets/cursor/go/hooks/check-preset-update.mjs +4 -3
  212. package/presets/cursor/go/hooks/examples/README.md +1 -1
  213. package/presets/cursor/go/hooks/guard-shell-command.mjs +95 -0
  214. package/presets/cursor/go/hooks/run-hook.mjs +102 -0
  215. package/presets/cursor/go/hooks.json +2 -2
  216. package/presets/cursor/go/rules/agent-team-intake.mdc +1 -0
  217. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +2 -1
  218. package/presets/cursor/go/rules/preset-pr-checklist.mdc +4 -4
  219. package/presets/cursor/go/rules/preset-twin-sync.mdc +1 -1
  220. package/presets/cursor/go/team/README.md +5 -0
  221. package/presets/cursor/ios-swift/hooks/README.md +2 -1
  222. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +57 -3
  223. package/presets/cursor/ios-swift/hooks/check-preset-update.mjs +4 -3
  224. package/presets/cursor/ios-swift/hooks/examples/README.md +1 -1
  225. package/presets/cursor/ios-swift/hooks/guard-shell-command.mjs +95 -0
  226. package/presets/cursor/ios-swift/hooks/run-hook.mjs +102 -0
  227. package/presets/cursor/ios-swift/hooks.json +2 -2
  228. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +1 -0
  229. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +2 -1
  230. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +4 -4
  231. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +1 -1
  232. package/presets/cursor/ios-swift/team/README.md +5 -0
  233. package/presets/cursor/java/hooks/README.md +2 -1
  234. package/presets/cursor/java/hooks/chain-team-phases.sh +57 -3
  235. package/presets/cursor/java/hooks/check-preset-update.mjs +4 -3
  236. package/presets/cursor/java/hooks/examples/README.md +1 -1
  237. package/presets/cursor/java/hooks/guard-shell-command.mjs +96 -0
  238. package/presets/cursor/java/hooks/run-hook.mjs +102 -0
  239. package/presets/cursor/java/hooks.json +2 -2
  240. package/presets/cursor/java/rules/agent-team-intake.mdc +1 -0
  241. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +2 -1
  242. package/presets/cursor/java/rules/preset-pr-checklist.mdc +4 -4
  243. package/presets/cursor/java/rules/preset-twin-sync.mdc +1 -1
  244. package/presets/cursor/java/team/README.md +5 -0
  245. package/presets/cursor/mcp-ts/hooks/README.md +2 -1
  246. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +57 -3
  247. package/presets/cursor/mcp-ts/hooks/check-preset-update.mjs +4 -3
  248. package/presets/cursor/mcp-ts/hooks/guard-shell-command.mjs +95 -0
  249. package/presets/cursor/mcp-ts/hooks/run-hook.mjs +102 -0
  250. package/presets/cursor/mcp-ts/hooks.json +2 -2
  251. package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +1 -0
  252. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +2 -1
  253. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +4 -4
  254. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +1 -1
  255. package/presets/cursor/mcp-ts/team/README.md +5 -0
  256. package/presets/cursor/mol/hooks/README.md +2 -1
  257. package/presets/cursor/mol/hooks/chain-team-phases.sh +57 -3
  258. package/presets/cursor/mol/hooks/check-preset-update.mjs +4 -3
  259. package/presets/cursor/mol/hooks/examples/README.md +1 -1
  260. package/presets/{claude/next/hooks/guard-shell-command.sh → cursor/mol/hooks/guard-shell-command.mjs} +29 -35
  261. package/presets/cursor/mol/hooks/run-hook.mjs +102 -0
  262. package/presets/cursor/mol/hooks.json +2 -2
  263. package/presets/cursor/mol/rules/agent-team-intake.mdc +1 -0
  264. package/presets/cursor/mol/rules/agent-team-orchestrator.mdc +2 -1
  265. package/presets/cursor/mol/rules/preset-pr-checklist.mdc +4 -4
  266. package/presets/cursor/mol/rules/preset-twin-sync.mdc +1 -1
  267. package/presets/cursor/mol/team/README.md +5 -0
  268. package/presets/cursor/next/agents/build-verifier.md +18 -3
  269. package/presets/cursor/next/agents/code-reviewer.md +2 -0
  270. package/presets/cursor/next/agents/feature-developer.md +3 -1
  271. package/presets/cursor/next/agents/task-analyst.md +6 -0
  272. package/presets/cursor/next/agents/task-router.md +5 -3
  273. package/presets/cursor/next/commands/README.md +1 -0
  274. package/presets/cursor/next/commands/task-continue.md +1 -1
  275. package/presets/cursor/next/commands/upstream-research.md +23 -0
  276. package/presets/cursor/next/hooks/README.md +2 -1
  277. package/presets/cursor/next/hooks/chain-team-phases.sh +57 -3
  278. package/presets/cursor/next/hooks/check-preset-update.mjs +4 -3
  279. package/presets/cursor/next/hooks/examples/README.md +1 -1
  280. package/presets/cursor/next/hooks/guard-shell-command.mjs +94 -0
  281. package/presets/cursor/next/hooks/run-hook.mjs +102 -0
  282. package/presets/cursor/next/hooks.json +2 -2
  283. package/presets/cursor/next/rules/agent-team-intake.mdc +1 -0
  284. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +2 -1
  285. package/presets/cursor/next/rules/preset-pr-checklist.mdc +4 -4
  286. package/presets/cursor/next/rules/preset-twin-sync.mdc +1 -1
  287. package/presets/cursor/next/team/README.md +23 -0
  288. package/presets/cursor/next/team/upstream/config.json +31 -0
  289. package/presets/cursor/next/team/upstream/digest-template.md +55 -0
  290. package/presets/cursor/next/team/upstream/opencode.json +34 -0
  291. package/presets/cursor/next/team/upstream/projects.json +4 -0
  292. package/presets/cursor/next/team/upstream/prompt.md +77 -0
  293. package/presets/cursor/next/team/upstream/signatures.json +9 -0
  294. package/presets/cursor/nuxt/hooks/README.md +2 -1
  295. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +57 -3
  296. package/presets/cursor/nuxt/hooks/check-preset-update.mjs +4 -3
  297. package/presets/cursor/nuxt/hooks/examples/README.md +1 -1
  298. package/presets/cursor/nuxt/hooks/guard-shell-command.mjs +94 -0
  299. package/presets/cursor/nuxt/hooks/run-hook.mjs +102 -0
  300. package/presets/cursor/nuxt/hooks.json +2 -2
  301. package/presets/cursor/nuxt/rules/agent-team-intake.mdc +1 -0
  302. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +2 -1
  303. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +4 -4
  304. package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +1 -1
  305. package/presets/cursor/nuxt/team/README.md +5 -0
  306. package/presets/cursor/php-hexagonal/hooks/README.md +2 -1
  307. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +57 -3
  308. package/presets/cursor/php-hexagonal/hooks/check-preset-update.mjs +4 -3
  309. package/presets/cursor/php-hexagonal/hooks/examples/README.md +1 -1
  310. package/presets/cursor/php-hexagonal/hooks/guard-shell-command.mjs +96 -0
  311. package/presets/cursor/php-hexagonal/hooks/run-hook.mjs +102 -0
  312. package/presets/cursor/php-hexagonal/hooks.json +2 -2
  313. package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +1 -0
  314. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +2 -1
  315. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +4 -4
  316. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +1 -1
  317. package/presets/cursor/php-hexagonal/team/README.md +5 -0
  318. package/presets/cursor/php-laravel/hooks/README.md +2 -1
  319. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +57 -3
  320. package/presets/cursor/php-laravel/hooks/check-preset-update.mjs +4 -3
  321. package/presets/cursor/php-laravel/hooks/examples/README.md +1 -1
  322. package/presets/cursor/php-laravel/hooks/guard-shell-command.mjs +96 -0
  323. package/presets/cursor/php-laravel/hooks/run-hook.mjs +102 -0
  324. package/presets/cursor/php-laravel/hooks.json +2 -2
  325. package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +1 -0
  326. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +2 -1
  327. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +4 -4
  328. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +1 -1
  329. package/presets/cursor/php-laravel/team/README.md +5 -0
  330. package/presets/cursor/svelte/hooks/README.md +2 -1
  331. package/presets/cursor/svelte/hooks/chain-team-phases.sh +57 -3
  332. package/presets/cursor/svelte/hooks/check-preset-update.mjs +4 -3
  333. package/presets/cursor/svelte/hooks/examples/README.md +1 -1
  334. package/presets/cursor/svelte/hooks/guard-shell-command.mjs +94 -0
  335. package/presets/cursor/svelte/hooks/run-hook.mjs +102 -0
  336. package/presets/cursor/svelte/hooks.json +2 -2
  337. package/presets/cursor/svelte/rules/agent-team-intake.mdc +1 -0
  338. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +2 -1
  339. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +4 -4
  340. package/presets/cursor/svelte/rules/preset-twin-sync.mdc +1 -1
  341. package/presets/cursor/svelte/team/README.md +5 -0
  342. package/presets/mavis/android-kotlin/adapter-map.json +11 -3
  343. package/presets/mavis/android-kotlin/hooks/README.md +2 -1
  344. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +57 -3
  345. package/presets/mavis/android-kotlin/hooks/check-preset-update.mjs +4 -3
  346. package/presets/mavis/android-kotlin/rules/agent-team-intake.md +1 -0
  347. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +5 -2
  348. package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +4 -4
  349. package/presets/mavis/android-kotlin/rules/preset-twin-sync.md +1 -1
  350. package/presets/mavis/android-kotlin/team/README.md +5 -0
  351. package/presets/mavis/go/adapter-map.json +11 -3
  352. package/presets/mavis/go/hooks/README.md +2 -1
  353. package/presets/mavis/go/hooks/chain-team-phases.sh +57 -3
  354. package/presets/mavis/go/hooks/check-preset-update.mjs +4 -3
  355. package/presets/mavis/go/rules/agent-team-intake.md +1 -0
  356. package/presets/mavis/go/rules/agent-team-orchestrator.md +5 -2
  357. package/presets/mavis/go/rules/preset-pr-checklist.md +4 -4
  358. package/presets/mavis/go/rules/preset-twin-sync.md +1 -1
  359. package/presets/mavis/go/team/README.md +5 -0
  360. package/presets/mavis/ios-swift/adapter-map.json +11 -3
  361. package/presets/mavis/ios-swift/hooks/README.md +2 -1
  362. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +57 -3
  363. package/presets/mavis/ios-swift/hooks/check-preset-update.mjs +4 -3
  364. package/presets/mavis/ios-swift/rules/agent-team-intake.md +1 -0
  365. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +5 -2
  366. package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +4 -4
  367. package/presets/mavis/ios-swift/rules/preset-twin-sync.md +1 -1
  368. package/presets/mavis/ios-swift/team/README.md +5 -0
  369. package/presets/mavis/java/adapter-map.json +11 -3
  370. package/presets/mavis/java/hooks/README.md +2 -1
  371. package/presets/mavis/java/hooks/chain-team-phases.sh +57 -3
  372. package/presets/mavis/java/hooks/check-preset-update.mjs +4 -3
  373. package/presets/mavis/java/rules/agent-team-intake.md +1 -0
  374. package/presets/mavis/java/rules/agent-team-orchestrator.md +5 -2
  375. package/presets/mavis/java/rules/preset-pr-checklist.md +4 -4
  376. package/presets/mavis/java/rules/preset-twin-sync.md +1 -1
  377. package/presets/mavis/java/team/README.md +5 -0
  378. package/presets/mavis/mcp-ts/adapter-map.json +11 -3
  379. package/presets/mavis/mcp-ts/hooks/README.md +2 -1
  380. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +57 -3
  381. package/presets/mavis/mcp-ts/hooks/check-preset-update.mjs +4 -3
  382. package/presets/mavis/mcp-ts/rules/agent-team-intake.md +1 -0
  383. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +5 -2
  384. package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +4 -4
  385. package/presets/mavis/mcp-ts/rules/preset-twin-sync.md +1 -1
  386. package/presets/mavis/mcp-ts/team/README.md +5 -0
  387. package/presets/mavis/mol/adapter-map.json +11 -3
  388. package/presets/mavis/mol/hooks/README.md +2 -1
  389. package/presets/mavis/mol/hooks/chain-team-phases.sh +57 -3
  390. package/presets/mavis/mol/hooks/check-preset-update.mjs +4 -3
  391. package/presets/mavis/mol/rules/agent-team-intake.md +1 -0
  392. package/presets/mavis/mol/rules/agent-team-orchestrator.md +5 -2
  393. package/presets/mavis/mol/rules/preset-pr-checklist.md +4 -4
  394. package/presets/mavis/mol/rules/preset-twin-sync.md +1 -1
  395. package/presets/mavis/mol/team/README.md +5 -0
  396. package/presets/mavis/next/adapter-map.json +67 -3
  397. package/presets/mavis/next/agents/build-verifier.md +18 -3
  398. package/presets/mavis/next/agents/code-reviewer.md +2 -0
  399. package/presets/mavis/next/agents/feature-developer.md +3 -1
  400. package/presets/mavis/next/agents/task-analyst.md +6 -0
  401. package/presets/mavis/next/agents/task-router.md +5 -3
  402. package/presets/mavis/next/commands/README.md +1 -0
  403. package/presets/mavis/next/commands/task-continue.md +1 -1
  404. package/presets/mavis/next/commands/upstream-research.md +18 -0
  405. package/presets/mavis/next/hooks/README.md +2 -1
  406. package/presets/mavis/next/hooks/chain-team-phases.sh +57 -3
  407. package/presets/mavis/next/hooks/check-preset-update.mjs +4 -3
  408. package/presets/mavis/next/rules/agent-team-intake.md +1 -0
  409. package/presets/mavis/next/rules/agent-team-orchestrator.md +5 -2
  410. package/presets/mavis/next/rules/preset-pr-checklist.md +4 -4
  411. package/presets/mavis/next/rules/preset-twin-sync.md +1 -1
  412. package/presets/mavis/next/team/README.md +23 -0
  413. package/presets/mavis/next/team/upstream/config.json +31 -0
  414. package/presets/mavis/next/team/upstream/digest-template.md +55 -0
  415. package/presets/mavis/next/team/upstream/opencode.json +34 -0
  416. package/presets/mavis/next/team/upstream/projects.json +4 -0
  417. package/presets/mavis/next/team/upstream/prompt.md +77 -0
  418. package/presets/mavis/next/team/upstream/signatures.json +9 -0
  419. package/presets/mavis/nuxt/adapter-map.json +11 -3
  420. package/presets/mavis/nuxt/hooks/README.md +2 -1
  421. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +57 -3
  422. package/presets/mavis/nuxt/hooks/check-preset-update.mjs +4 -3
  423. package/presets/mavis/nuxt/rules/agent-team-intake.md +1 -0
  424. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +5 -2
  425. package/presets/mavis/nuxt/rules/preset-pr-checklist.md +4 -4
  426. package/presets/mavis/nuxt/rules/preset-twin-sync.md +1 -1
  427. package/presets/mavis/nuxt/team/README.md +5 -0
  428. package/presets/mavis/php-hexagonal/adapter-map.json +11 -3
  429. package/presets/mavis/php-hexagonal/hooks/README.md +2 -1
  430. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +57 -3
  431. package/presets/mavis/php-hexagonal/hooks/check-preset-update.mjs +4 -3
  432. package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +1 -0
  433. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +5 -2
  434. package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +4 -4
  435. package/presets/mavis/php-hexagonal/rules/preset-twin-sync.md +1 -1
  436. package/presets/mavis/php-hexagonal/team/README.md +5 -0
  437. package/presets/mavis/php-laravel/adapter-map.json +11 -3
  438. package/presets/mavis/php-laravel/hooks/README.md +2 -1
  439. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +57 -3
  440. package/presets/mavis/php-laravel/hooks/check-preset-update.mjs +4 -3
  441. package/presets/mavis/php-laravel/rules/agent-team-intake.md +1 -0
  442. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +5 -2
  443. package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +4 -4
  444. package/presets/mavis/php-laravel/rules/preset-twin-sync.md +1 -1
  445. package/presets/mavis/php-laravel/team/README.md +5 -0
  446. package/presets/mavis/svelte/adapter-map.json +11 -3
  447. package/presets/mavis/svelte/hooks/README.md +2 -1
  448. package/presets/mavis/svelte/hooks/chain-team-phases.sh +57 -3
  449. package/presets/mavis/svelte/hooks/check-preset-update.mjs +4 -3
  450. package/presets/mavis/svelte/rules/agent-team-intake.md +1 -0
  451. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +5 -2
  452. package/presets/mavis/svelte/rules/preset-pr-checklist.md +4 -4
  453. package/presets/mavis/svelte/rules/preset-twin-sync.md +1 -1
  454. package/presets/mavis/svelte/team/README.md +5 -0
  455. package/presets/opencode/android-kotlin/OPENCODE.md +1 -1
  456. package/presets/opencode/android-kotlin/README.md +1 -1
  457. package/presets/opencode/android-kotlin/adapter-map.json +11 -3
  458. package/presets/opencode/android-kotlin/hooks/README.md +3 -2
  459. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +57 -3
  460. package/presets/opencode/android-kotlin/hooks/check-preset-update.mjs +4 -3
  461. package/presets/opencode/android-kotlin/rules/agent-team-intake.md +1 -0
  462. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +5 -2
  463. package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +4 -4
  464. package/presets/opencode/android-kotlin/rules/preset-twin-sync.md +1 -1
  465. package/presets/opencode/android-kotlin/team/README.md +5 -0
  466. package/presets/opencode/go/OPENCODE.md +1 -1
  467. package/presets/opencode/go/README.md +1 -1
  468. package/presets/opencode/go/adapter-map.json +11 -3
  469. package/presets/opencode/go/hooks/README.md +3 -2
  470. package/presets/opencode/go/hooks/chain-team-phases.sh +57 -3
  471. package/presets/opencode/go/hooks/check-preset-update.mjs +4 -3
  472. package/presets/opencode/go/rules/agent-team-intake.md +1 -0
  473. package/presets/opencode/go/rules/agent-team-orchestrator.md +5 -2
  474. package/presets/opencode/go/rules/preset-pr-checklist.md +4 -4
  475. package/presets/opencode/go/rules/preset-twin-sync.md +1 -1
  476. package/presets/opencode/go/team/README.md +5 -0
  477. package/presets/opencode/ios-swift/OPENCODE.md +1 -1
  478. package/presets/opencode/ios-swift/README.md +1 -1
  479. package/presets/opencode/ios-swift/adapter-map.json +11 -3
  480. package/presets/opencode/ios-swift/hooks/README.md +3 -2
  481. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +57 -3
  482. package/presets/opencode/ios-swift/hooks/check-preset-update.mjs +4 -3
  483. package/presets/opencode/ios-swift/rules/agent-team-intake.md +1 -0
  484. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +5 -2
  485. package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +4 -4
  486. package/presets/opencode/ios-swift/rules/preset-twin-sync.md +1 -1
  487. package/presets/opencode/ios-swift/team/README.md +5 -0
  488. package/presets/opencode/java/OPENCODE.md +1 -1
  489. package/presets/opencode/java/README.md +1 -1
  490. package/presets/opencode/java/adapter-map.json +11 -3
  491. package/presets/opencode/java/hooks/README.md +3 -2
  492. package/presets/opencode/java/hooks/chain-team-phases.sh +57 -3
  493. package/presets/opencode/java/hooks/check-preset-update.mjs +4 -3
  494. package/presets/opencode/java/rules/agent-team-intake.md +1 -0
  495. package/presets/opencode/java/rules/agent-team-orchestrator.md +5 -2
  496. package/presets/opencode/java/rules/preset-pr-checklist.md +4 -4
  497. package/presets/opencode/java/rules/preset-twin-sync.md +1 -1
  498. package/presets/opencode/java/team/README.md +5 -0
  499. package/presets/opencode/mcp-ts/OPENCODE.md +1 -1
  500. package/presets/opencode/mcp-ts/README.md +1 -1
  501. package/presets/opencode/mcp-ts/adapter-map.json +11 -3
  502. package/presets/opencode/mcp-ts/hooks/README.md +3 -2
  503. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +57 -3
  504. package/presets/opencode/mcp-ts/hooks/check-preset-update.mjs +4 -3
  505. package/presets/opencode/mcp-ts/rules/agent-team-intake.md +1 -0
  506. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +5 -2
  507. package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +4 -4
  508. package/presets/opencode/mcp-ts/rules/preset-twin-sync.md +1 -1
  509. package/presets/opencode/mcp-ts/team/README.md +5 -0
  510. package/presets/opencode/mol/OPENCODE.md +1 -1
  511. package/presets/opencode/mol/README.md +1 -1
  512. package/presets/opencode/mol/adapter-map.json +11 -3
  513. package/presets/opencode/mol/hooks/README.md +3 -2
  514. package/presets/opencode/mol/hooks/chain-team-phases.sh +57 -3
  515. package/presets/opencode/mol/hooks/check-preset-update.mjs +4 -3
  516. package/presets/opencode/mol/rules/agent-team-intake.md +1 -0
  517. package/presets/opencode/mol/rules/agent-team-orchestrator.md +5 -2
  518. package/presets/opencode/mol/rules/preset-pr-checklist.md +4 -4
  519. package/presets/opencode/mol/rules/preset-twin-sync.md +1 -1
  520. package/presets/opencode/mol/team/README.md +5 -0
  521. package/presets/opencode/next/OPENCODE.md +1 -1
  522. package/presets/opencode/next/README.md +1 -1
  523. package/presets/opencode/next/adapter-map.json +67 -3
  524. package/presets/opencode/next/agents/build-verifier.md +18 -3
  525. package/presets/opencode/next/agents/code-reviewer.md +2 -0
  526. package/presets/opencode/next/agents/feature-developer.md +3 -1
  527. package/presets/opencode/next/agents/task-analyst.md +6 -0
  528. package/presets/opencode/next/agents/task-router.md +5 -3
  529. package/presets/opencode/next/commands/README.md +1 -0
  530. package/presets/opencode/next/commands/task-continue.md +1 -1
  531. package/presets/opencode/next/commands/upstream-research.md +26 -0
  532. package/presets/opencode/next/hooks/README.md +3 -2
  533. package/presets/opencode/next/hooks/chain-team-phases.sh +57 -3
  534. package/presets/opencode/next/hooks/check-preset-update.mjs +4 -3
  535. package/presets/opencode/next/rules/agent-team-intake.md +1 -0
  536. package/presets/opencode/next/rules/agent-team-orchestrator.md +5 -2
  537. package/presets/opencode/next/rules/preset-pr-checklist.md +4 -4
  538. package/presets/opencode/next/rules/preset-twin-sync.md +1 -1
  539. package/presets/opencode/next/team/README.md +23 -0
  540. package/presets/opencode/next/team/upstream/config.json +31 -0
  541. package/presets/opencode/next/team/upstream/digest-template.md +55 -0
  542. package/presets/opencode/next/team/upstream/opencode.json +34 -0
  543. package/presets/opencode/next/team/upstream/projects.json +4 -0
  544. package/presets/opencode/next/team/upstream/prompt.md +77 -0
  545. package/presets/opencode/next/team/upstream/signatures.json +9 -0
  546. package/presets/opencode/nuxt/OPENCODE.md +1 -1
  547. package/presets/opencode/nuxt/README.md +1 -1
  548. package/presets/opencode/nuxt/adapter-map.json +11 -3
  549. package/presets/opencode/nuxt/hooks/README.md +3 -2
  550. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +57 -3
  551. package/presets/opencode/nuxt/hooks/check-preset-update.mjs +4 -3
  552. package/presets/opencode/nuxt/rules/agent-team-intake.md +1 -0
  553. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +5 -2
  554. package/presets/opencode/nuxt/rules/preset-pr-checklist.md +4 -4
  555. package/presets/opencode/nuxt/rules/preset-twin-sync.md +1 -1
  556. package/presets/opencode/nuxt/team/README.md +5 -0
  557. package/presets/opencode/php-hexagonal/OPENCODE.md +1 -1
  558. package/presets/opencode/php-hexagonal/README.md +1 -1
  559. package/presets/opencode/php-hexagonal/adapter-map.json +11 -3
  560. package/presets/opencode/php-hexagonal/hooks/README.md +3 -2
  561. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +57 -3
  562. package/presets/opencode/php-hexagonal/hooks/check-preset-update.mjs +4 -3
  563. package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +1 -0
  564. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +5 -2
  565. package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +4 -4
  566. package/presets/opencode/php-hexagonal/rules/preset-twin-sync.md +1 -1
  567. package/presets/opencode/php-hexagonal/team/README.md +5 -0
  568. package/presets/opencode/php-laravel/OPENCODE.md +1 -1
  569. package/presets/opencode/php-laravel/README.md +1 -1
  570. package/presets/opencode/php-laravel/adapter-map.json +11 -3
  571. package/presets/opencode/php-laravel/hooks/README.md +3 -2
  572. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +57 -3
  573. package/presets/opencode/php-laravel/hooks/check-preset-update.mjs +4 -3
  574. package/presets/opencode/php-laravel/rules/agent-team-intake.md +1 -0
  575. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +5 -2
  576. package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +4 -4
  577. package/presets/opencode/php-laravel/rules/preset-twin-sync.md +1 -1
  578. package/presets/opencode/php-laravel/team/README.md +5 -0
  579. package/presets/opencode/svelte/OPENCODE.md +1 -1
  580. package/presets/opencode/svelte/README.md +1 -1
  581. package/presets/opencode/svelte/adapter-map.json +11 -3
  582. package/presets/opencode/svelte/hooks/README.md +3 -2
  583. package/presets/opencode/svelte/hooks/chain-team-phases.sh +57 -3
  584. package/presets/opencode/svelte/hooks/check-preset-update.mjs +4 -3
  585. package/presets/opencode/svelte/rules/agent-team-intake.md +1 -0
  586. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +5 -2
  587. package/presets/opencode/svelte/rules/preset-pr-checklist.md +4 -4
  588. package/presets/opencode/svelte/rules/preset-twin-sync.md +1 -1
  589. package/presets/opencode/svelte/team/README.md +5 -0
  590. package/presets/zcode/android-kotlin/adapter-map.json +11 -3
  591. package/presets/zcode/android-kotlin/hooks/README.md +2 -1
  592. package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +57 -3
  593. package/presets/zcode/android-kotlin/hooks/check-preset-update.mjs +4 -3
  594. package/presets/zcode/android-kotlin/rules/agent-team-intake.md +1 -0
  595. package/presets/zcode/android-kotlin/rules/agent-team-orchestrator.md +5 -2
  596. package/presets/zcode/android-kotlin/rules/preset-pr-checklist.md +4 -4
  597. package/presets/zcode/android-kotlin/rules/preset-twin-sync.md +1 -1
  598. package/presets/zcode/android-kotlin/team/README.md +5 -0
  599. package/presets/zcode/go/adapter-map.json +11 -3
  600. package/presets/zcode/go/hooks/README.md +2 -1
  601. package/presets/zcode/go/hooks/chain-team-phases.sh +57 -3
  602. package/presets/zcode/go/hooks/check-preset-update.mjs +4 -3
  603. package/presets/zcode/go/rules/agent-team-intake.md +1 -0
  604. package/presets/zcode/go/rules/agent-team-orchestrator.md +5 -2
  605. package/presets/zcode/go/rules/preset-pr-checklist.md +4 -4
  606. package/presets/zcode/go/rules/preset-twin-sync.md +1 -1
  607. package/presets/zcode/go/team/README.md +5 -0
  608. package/presets/zcode/ios-swift/adapter-map.json +11 -3
  609. package/presets/zcode/ios-swift/hooks/README.md +2 -1
  610. package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +57 -3
  611. package/presets/zcode/ios-swift/hooks/check-preset-update.mjs +4 -3
  612. package/presets/zcode/ios-swift/rules/agent-team-intake.md +1 -0
  613. package/presets/zcode/ios-swift/rules/agent-team-orchestrator.md +5 -2
  614. package/presets/zcode/ios-swift/rules/preset-pr-checklist.md +4 -4
  615. package/presets/zcode/ios-swift/rules/preset-twin-sync.md +1 -1
  616. package/presets/zcode/ios-swift/team/README.md +5 -0
  617. package/presets/zcode/java/adapter-map.json +11 -3
  618. package/presets/zcode/java/hooks/README.md +2 -1
  619. package/presets/zcode/java/hooks/chain-team-phases.sh +57 -3
  620. package/presets/zcode/java/hooks/check-preset-update.mjs +4 -3
  621. package/presets/zcode/java/rules/agent-team-intake.md +1 -0
  622. package/presets/zcode/java/rules/agent-team-orchestrator.md +5 -2
  623. package/presets/zcode/java/rules/preset-pr-checklist.md +4 -4
  624. package/presets/zcode/java/rules/preset-twin-sync.md +1 -1
  625. package/presets/zcode/java/team/README.md +5 -0
  626. package/presets/zcode/mcp-ts/adapter-map.json +11 -3
  627. package/presets/zcode/mcp-ts/hooks/README.md +2 -1
  628. package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +57 -3
  629. package/presets/zcode/mcp-ts/hooks/check-preset-update.mjs +4 -3
  630. package/presets/zcode/mcp-ts/rules/agent-team-intake.md +1 -0
  631. package/presets/zcode/mcp-ts/rules/agent-team-orchestrator.md +5 -2
  632. package/presets/zcode/mcp-ts/rules/preset-pr-checklist.md +4 -4
  633. package/presets/zcode/mcp-ts/rules/preset-twin-sync.md +1 -1
  634. package/presets/zcode/mcp-ts/team/README.md +5 -0
  635. package/presets/zcode/mol/adapter-map.json +11 -3
  636. package/presets/zcode/mol/hooks/README.md +2 -1
  637. package/presets/zcode/mol/hooks/chain-team-phases.sh +57 -3
  638. package/presets/zcode/mol/hooks/check-preset-update.mjs +4 -3
  639. package/presets/zcode/mol/rules/agent-team-intake.md +1 -0
  640. package/presets/zcode/mol/rules/agent-team-orchestrator.md +5 -2
  641. package/presets/zcode/mol/rules/preset-pr-checklist.md +4 -4
  642. package/presets/zcode/mol/rules/preset-twin-sync.md +1 -1
  643. package/presets/zcode/mol/team/README.md +5 -0
  644. package/presets/zcode/next/adapter-map.json +67 -3
  645. package/presets/zcode/next/agents/build-verifier.md +18 -3
  646. package/presets/zcode/next/agents/code-reviewer.md +2 -0
  647. package/presets/zcode/next/agents/feature-developer.md +3 -1
  648. package/presets/zcode/next/agents/task-analyst.md +6 -0
  649. package/presets/zcode/next/agents/task-router.md +5 -3
  650. package/presets/zcode/next/commands/README.md +1 -0
  651. package/presets/zcode/next/commands/task-continue.md +1 -1
  652. package/presets/zcode/next/commands/upstream-research.md +26 -0
  653. package/presets/zcode/next/hooks/README.md +2 -1
  654. package/presets/zcode/next/hooks/chain-team-phases.sh +57 -3
  655. package/presets/zcode/next/hooks/check-preset-update.mjs +4 -3
  656. package/presets/zcode/next/rules/agent-team-intake.md +1 -0
  657. package/presets/zcode/next/rules/agent-team-orchestrator.md +5 -2
  658. package/presets/zcode/next/rules/preset-pr-checklist.md +4 -4
  659. package/presets/zcode/next/rules/preset-twin-sync.md +1 -1
  660. package/presets/zcode/next/team/README.md +23 -0
  661. package/presets/zcode/next/team/upstream/config.json +31 -0
  662. package/presets/zcode/next/team/upstream/digest-template.md +55 -0
  663. package/presets/zcode/next/team/upstream/opencode.json +34 -0
  664. package/presets/zcode/next/team/upstream/projects.json +4 -0
  665. package/presets/zcode/next/team/upstream/prompt.md +77 -0
  666. package/presets/zcode/next/team/upstream/signatures.json +9 -0
  667. package/presets/zcode/nuxt/adapter-map.json +11 -3
  668. package/presets/zcode/nuxt/hooks/README.md +2 -1
  669. package/presets/zcode/nuxt/hooks/chain-team-phases.sh +57 -3
  670. package/presets/zcode/nuxt/hooks/check-preset-update.mjs +4 -3
  671. package/presets/zcode/nuxt/rules/agent-team-intake.md +1 -0
  672. package/presets/zcode/nuxt/rules/agent-team-orchestrator.md +5 -2
  673. package/presets/zcode/nuxt/rules/preset-pr-checklist.md +4 -4
  674. package/presets/zcode/nuxt/rules/preset-twin-sync.md +1 -1
  675. package/presets/zcode/nuxt/team/README.md +5 -0
  676. package/presets/zcode/php-hexagonal/adapter-map.json +11 -3
  677. package/presets/zcode/php-hexagonal/hooks/README.md +2 -1
  678. package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +57 -3
  679. package/presets/zcode/php-hexagonal/hooks/check-preset-update.mjs +4 -3
  680. package/presets/zcode/php-hexagonal/rules/agent-team-intake.md +1 -0
  681. package/presets/zcode/php-hexagonal/rules/agent-team-orchestrator.md +5 -2
  682. package/presets/zcode/php-hexagonal/rules/preset-pr-checklist.md +4 -4
  683. package/presets/zcode/php-hexagonal/rules/preset-twin-sync.md +1 -1
  684. package/presets/zcode/php-hexagonal/team/README.md +5 -0
  685. package/presets/zcode/php-laravel/adapter-map.json +11 -3
  686. package/presets/zcode/php-laravel/hooks/README.md +2 -1
  687. package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +57 -3
  688. package/presets/zcode/php-laravel/hooks/check-preset-update.mjs +4 -3
  689. package/presets/zcode/php-laravel/rules/agent-team-intake.md +1 -0
  690. package/presets/zcode/php-laravel/rules/agent-team-orchestrator.md +5 -2
  691. package/presets/zcode/php-laravel/rules/preset-pr-checklist.md +4 -4
  692. package/presets/zcode/php-laravel/rules/preset-twin-sync.md +1 -1
  693. package/presets/zcode/php-laravel/team/README.md +5 -0
  694. package/presets/zcode/svelte/adapter-map.json +11 -3
  695. package/presets/zcode/svelte/hooks/README.md +2 -1
  696. package/presets/zcode/svelte/hooks/chain-team-phases.sh +57 -3
  697. package/presets/zcode/svelte/hooks/check-preset-update.mjs +4 -3
  698. package/presets/zcode/svelte/rules/agent-team-intake.md +1 -0
  699. package/presets/zcode/svelte/rules/agent-team-orchestrator.md +5 -2
  700. package/presets/zcode/svelte/rules/preset-pr-checklist.md +4 -4
  701. package/presets/zcode/svelte/rules/preset-twin-sync.md +1 -1
  702. package/presets/zcode/svelte/team/README.md +5 -0
  703. package/presets/claude/android-kotlin/hooks/guard-shell-command.sh +0 -103
  704. package/presets/claude/go/hooks/guard-shell-command.sh +0 -102
  705. package/presets/claude/mcp-ts/hooks/guard-shell-command.sh +0 -102
  706. package/presets/claude/php-hexagonal/hooks/guard-shell-command.sh +0 -103
  707. package/presets/claude/php-laravel/hooks/guard-shell-command.sh +0 -103
  708. package/presets/cursor/android-kotlin/hooks/guard-shell-command.sh +0 -80
  709. package/presets/cursor/go/hooks/guard-shell-command.sh +0 -79
  710. package/presets/cursor/ios-swift/hooks/guard-shell-command.sh +0 -79
  711. package/presets/cursor/java/hooks/guard-shell-command.sh +0 -80
  712. package/presets/cursor/mcp-ts/hooks/guard-shell-command.sh +0 -79
  713. package/presets/cursor/mol/hooks/guard-shell-command.sh +0 -77
  714. package/presets/cursor/next/hooks/guard-shell-command.sh +0 -77
  715. package/presets/cursor/nuxt/hooks/guard-shell-command.sh +0 -77
  716. package/presets/cursor/php-hexagonal/hooks/guard-shell-command.sh +0 -80
  717. package/presets/cursor/php-laravel/hooks/guard-shell-command.sh +0 -80
  718. package/presets/cursor/svelte/hooks/guard-shell-command.sh +0 -77
@@ -10,12 +10,14 @@ const { resolveManagedPath } = require('../safe-path');
10
10
  const { isPlainObject } = require('../fs-utils');
11
11
  const { TOOL_INSTALL_MARKERS } = require('../tool-installs');
12
12
  const { assertNodeFloor, resolveProjectRootDetailed } = require('./run');
13
+ const { npxInvocation, npmInvocation } = require('./npx');
13
14
  const { detectClientIds, readClientConfig, containerAt } = require('./clients');
14
15
  const {
15
16
  checkIgnored,
16
17
  CREDENTIALS_REL,
17
18
  CONFIG_REL,
18
19
  GITHUB_CREDENTIALS_REL,
20
+ DEFECTDOJO_CREDENTIALS_REL,
19
21
  githubProjectRoot,
20
22
  } = require('./credentials');
21
23
  const { ownsEntry, registeredPin, tokenFinding, clientById } = require('./registry');
@@ -28,17 +30,18 @@ function oneLine(text) {
28
30
 
29
31
  let npxCached = null;
30
32
 
33
+ function versionResolves(invocation) {
34
+ return spawnSync(invocation.command, ['--version'], {
35
+ stdio: 'ignore',
36
+ shell: invocation.shell,
37
+ }).status === 0;
38
+ }
39
+
31
40
  function npxResolves() {
32
41
  if (npxCached !== null) {
33
42
  return npxCached;
34
43
  }
35
- const npx = process.platform === 'win32' ? 'npx.cmd' : 'npx';
36
- if (spawnSync(npx, ['--version'], { stdio: 'ignore' }).status === 0) {
37
- npxCached = true;
38
- return npxCached;
39
- }
40
- const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
41
- npxCached = spawnSync(npm, ['--version'], { stdio: 'ignore' }).status === 0;
44
+ npxCached = versionResolves(npxInvocation()) || versionResolves(npmInvocation());
42
45
  return npxCached;
43
46
  }
44
47
 
@@ -176,6 +179,77 @@ async function checkGithubUpstream(config, github) {
176
179
  return { status: 'fail', detail: probe.detail, next: `check network access to ${host}` };
177
180
  }
178
181
 
182
+ function checkDefectdojoCredentials(root, config) {
183
+ if (!config.token) {
184
+ return {
185
+ status: 'fail',
186
+ detail: `DEFECTDOJO_TOKEN is not set in ${DEFECTDOJO_CREDENTIALS_REL} or the environment`,
187
+ next: `add DEFECTDOJO_URL and DEFECTDOJO_TOKEN to ${DEFECTDOJO_CREDENTIALS_REL} in the project root, then rerun ai-rules mcp setup defectdojo`,
188
+ };
189
+ }
190
+ if (!config.baseUrl) {
191
+ return {
192
+ status: 'fail',
193
+ detail: `DEFECTDOJO_URL is not set in ${DEFECTDOJO_CREDENTIALS_REL} or the environment`,
194
+ next: `add DEFECTDOJO_URL to ${DEFECTDOJO_CREDENTIALS_REL} in the project root, then rerun ai-rules mcp setup defectdojo`,
195
+ };
196
+ }
197
+
198
+ const origin = config.tokenOrigin === DEFECTDOJO_CREDENTIALS_REL ? DEFECTDOJO_CREDENTIALS_REL : 'the environment';
199
+ const details = [`token from ${origin}`];
200
+
201
+ if (config.fileHasToken) {
202
+ const ignored = checkIgnored(root, DEFECTDOJO_CREDENTIALS_REL);
203
+ if (ignored.status === 'fail') {
204
+ return {
205
+ status: 'fail',
206
+ detail: `${DEFECTDOJO_CREDENTIALS_REL} is not ignored`,
207
+ next: `add ${DEFECTDOJO_CREDENTIALS_REL} to .gitignore, then rerun ai-rules mcp setup defectdojo`,
208
+ };
209
+ }
210
+ details.push(ignored.status === 'warn' ? 'ignore rule not provable (not a git repository)' : 'ignored');
211
+ if (process.platform !== 'win32') {
212
+ const mode = fs.statSync(config.credentialsPath).mode & 0o777;
213
+ if (mode !== 0o600) {
214
+ details.push(`mode 0${mode.toString(8)} (0600 is safer)`);
215
+ return { status: 'warn', detail: details.join(', ') };
216
+ }
217
+ }
218
+ } else if (config.hasCredentialsFile) {
219
+ details.push(`${DEFECTDOJO_CREDENTIALS_REL} holds no token`);
220
+ }
221
+
222
+ return { status: 'ok', detail: details.join(', ') };
223
+ }
224
+
225
+ async function checkDefectdojoUpstream(config, defectdojo) {
226
+ const probe = await defectdojo.probeDefectDojoUpstream({
227
+ baseUrl: config.baseUrl,
228
+ token: config.token,
229
+ });
230
+
231
+ if (probe.ok) {
232
+ return { status: 'ok', detail: probe.detail };
233
+ }
234
+
235
+ if (probe.status === 401 || probe.status === 403) {
236
+ return {
237
+ status: 'fail',
238
+ detail: probe.detail,
239
+ next: `replace DEFECTDOJO_TOKEN in ${DEFECTDOJO_CREDENTIALS_REL} with a valid token, then rerun ai-rules mcp setup defectdojo`,
240
+ };
241
+ }
242
+
243
+ let host = config.baseUrl;
244
+ try {
245
+ host = new URL(config.baseUrl).host;
246
+ } catch {
247
+ // keep the raw value
248
+ }
249
+
250
+ return { status: 'fail', detail: probe.detail, next: `check network access to ${host}` };
251
+ }
252
+
179
253
  async function checkRegistration(server, cwd, version) {
180
254
  const clients = detectClientIds(cwd, TOOL_INSTALL_MARKERS);
181
255
  if (clients.length === 0) {
@@ -376,7 +450,7 @@ function checkRuntime(server, cwd, packageRoot, version) {
376
450
  /**
377
451
  * @returns {Promise<{ servers: object[], exitCode: 0|1|2 }>}
378
452
  */
379
- async function runDoctor({ cwd, provider, packageRoot, version, envfile, yandex, github, options = {} }) {
453
+ async function runDoctor({ cwd, provider, packageRoot, version, envfile, yandex, github, defectdojo, options = {} }) {
380
454
  const { serversFor } = require('./registry');
381
455
  const servers = [];
382
456
  const failures = [];
@@ -393,6 +467,13 @@ async function runDoctor({ cwd, provider, packageRoot, version, envfile, yandex,
393
467
  return { check: checkGithubCredentials(root, config), config };
394
468
  })()
395
469
  : null;
470
+ const defectdojoState = providers.has('defectdojo')
471
+ ? (() => {
472
+ const root = githubProjectRoot(cwd);
473
+ const config = defectdojo.resolveDefectDojoConfig({ root });
474
+ return { check: checkDefectdojoCredentials(root, config), config };
475
+ })()
476
+ : null;
396
477
 
397
478
  for (const server of serversFor(provider)) {
398
479
  const checks = {};
@@ -441,6 +522,17 @@ async function runDoctor({ cwd, provider, packageRoot, version, envfile, yandex,
441
522
  } else {
442
523
  put('upstream', await checkGithubUpstream(githubState.config, github));
443
524
  }
525
+ } else if (server.provider === 'defectdojo') {
526
+ put('credentials', defectdojoState.check);
527
+ if (
528
+ defectdojoState.check.status === 'fail'
529
+ || !defectdojoState.config.token
530
+ || !defectdojoState.config.baseUrl
531
+ ) {
532
+ checks.upstream = { status: 'skipped', detail: 'credentials not ready' };
533
+ } else {
534
+ put('upstream', await checkDefectdojoUpstream(defectdojoState.config, defectdojo));
535
+ }
444
536
  } else {
445
537
  put('credentials', yandexState.check);
446
538
  if (yandexState.check.status === 'fail' || !yandexState.token) {
@@ -0,0 +1,17 @@
1
+ /**
2
+ * How to launch npm's CLI on this platform.
3
+ *
4
+ * On Windows `npx` and `npm` are `.cmd` shims, and current Node refuses to
5
+ * spawn a `.cmd`/`.bat` without a shell (post-CVE-2024-27980). The flag travels
6
+ * with the command so every spawn site uses the same resolution, while the
7
+ * registered MCP client entry keeps the bare `npx` name the goldens encode.
8
+ */
9
+ function invocation(name, platform) {
10
+ return { command: name, shell: platform === 'win32' };
11
+ }
12
+
13
+ const npxInvocation = (platform = process.platform) => invocation('npx', platform);
14
+
15
+ const npmInvocation = (platform = process.platform) => invocation('npm', platform);
16
+
17
+ module.exports = { npxInvocation, npmInvocation };
@@ -29,6 +29,7 @@ const SERVERS = [
29
29
  entry: 'mcp/yandex-mcp-proxy.mjs',
30
30
  argv: ['wiki'],
31
31
  },
32
+ { id: 'defectdojo', slug: 'defectdojo', provider: 'defectdojo', entry: 'mcp/defectdojo-mcp.mjs', argv: [] },
32
33
  ];
33
34
 
34
35
  const CLIENTS = [
@@ -116,6 +117,7 @@ function isLegacyEntry(entry, server) {
116
117
  const markers = {
117
118
  gitlab: 'gitlab-mcp.mjs',
118
119
  yandex: 'yandex-mcp-proxy.mjs',
120
+ defectdojo: 'defectdojo-mcp.mjs',
119
121
  };
120
122
  const marker = markers[server.provider];
121
123
  if (!marker) {
@@ -272,6 +272,42 @@ function mergeMcpConfig(presetObj, existingObj) {
272
272
  };
273
273
  }
274
274
 
275
+ /**
276
+ * Migration: earlier releases registered the guard and the chain hook as `.sh`
277
+ * files. Re-init only adds hook commands, so a consumer `.claude/settings.json`
278
+ * would keep the dead bash command next to the new Node one. These two commands
279
+ * are dropped from every event group before the preset hooks are merged; no
280
+ * other consumer command is touched.
281
+ */
282
+ const LEGACY_CLAUDE_HOOK_COMMANDS = new Set([
283
+ '${CLAUDE_PROJECT_DIR}/.claude/hooks/guard-shell-command.sh',
284
+ '${CLAUDE_PROJECT_DIR}/.claude/hooks/chain-team-phases.sh',
285
+ ]);
286
+
287
+ function dropLegacyClaudeHooks(hooks) {
288
+ if (!isPlainObject(hooks)) return;
289
+ for (const event of ownKeys(hooks)) {
290
+ const groups = hooks[event];
291
+ if (!Array.isArray(groups) || groups.length === 0) continue;
292
+ const keptGroups = [];
293
+ for (const group of groups) {
294
+ if (!isPlainObject(group) || !Array.isArray(group.hooks)) {
295
+ keptGroups.push(group);
296
+ continue;
297
+ }
298
+ const keptHooks = group.hooks.filter(
299
+ (hook) => !(isPlainObject(hook) && LEGACY_CLAUDE_HOOK_COMMANDS.has(hook.command)),
300
+ );
301
+ if (keptHooks.length === 0) continue;
302
+ keptGroups.push(
303
+ keptHooks.length === group.hooks.length ? group : { ...group, hooks: keptHooks },
304
+ );
305
+ }
306
+ if (keptGroups.length === 0) delete hooks[event];
307
+ else hooks[event] = keptGroups;
308
+ }
309
+ }
310
+
275
311
  /**
276
312
  * Union `permissions.*` arrays and add preset hooks by event (deduped by `command`).
277
313
  * Every other consumer key wins. Bare `Bash(git commit)` and `Bash(git push)` are
@@ -283,6 +319,8 @@ function mergeClaudeSettings(presetObj, existingObj) {
283
319
  const merged = structuredClone(isPlainObject(existingObj) ? existingObj : {});
284
320
  const added = { keys: [], permissions: {}, hooks: {} };
285
321
 
322
+ dropLegacyClaudeHooks(merged.hooks);
323
+
286
324
  for (const key of ownKeys(preset)) {
287
325
  if (key !== 'permissions' && key !== 'hooks' && !Object.hasOwn(merged, key)) {
288
326
  merged[key] = structuredClone(preset[key]);
@@ -10,7 +10,7 @@
10
10
  const fs = require('fs');
11
11
  const path = require('path');
12
12
  const { assertSafeDest } = require('./safe-path');
13
- const { ENGINE_SCRIPTS, ENGINE_SOURCE_RELATIVE } = require('./engine-scripts');
13
+ const { ENGINE_SCRIPTS, engineSourceDir } = require('./engine-scripts');
14
14
  const { runTemplateDrift } = require('./ai-local-drift');
15
15
 
16
16
  const LEGACY_TOOLS = ['cursor', 'claude', 'mavis', 'opencode', 'zcode'];
@@ -19,6 +19,7 @@ const AI_LOCAL_GITIGNORE = [
19
19
  '# Files written by the in-task self-learning engine and by legacy-team',
20
20
  '# migration backups. Local safety net — never commit.',
21
21
  '*.lock',
22
+ '*.lock.d/',
22
23
  '*.tmp',
23
24
  '.rollback/',
24
25
  '.template-base.json',
@@ -31,6 +32,14 @@ const AI_LOCAL_GITIGNORE = [
31
32
  'team.db-wal',
32
33
  'team.db-shm',
33
34
  'team-db-errors.log',
35
+ '# Per-session slug bindings for the chain hook; runtime state, never commit.',
36
+ 'team/.session-leases/',
37
+ '# Scheduler runtime state; jobs.json stays tracked (jobs as code).',
38
+ 'team/scheduler/runs/',
39
+ 'team/scheduler/state.json',
40
+ '# Per-step write-scope baselines; derived from git, never a project input.',
41
+ 'team/.write-scope/',
42
+ 'team/upstream/cursor.json',
34
43
  '',
35
44
  ].join('\n');
36
45
  const POINTER_README = `# Agent team artifacts moved
@@ -262,17 +271,6 @@ function ensureAiLocalIgnored(aiLocalRoot) {
262
271
  return true;
263
272
  }
264
273
 
265
- /**
266
- * Preset-root-relative directory holding the shipped engine scripts.
267
- * `presetTeamSrc` is `<presetBase>/team`, so three levels up is the preset root.
268
- */
269
- function engineSourceDir(presetTeamSrc) {
270
- if (!presetTeamSrc) {
271
- return null;
272
- }
273
- return path.resolve(presetTeamSrc, '..', '..', '..', ...ENGINE_SOURCE_RELATIVE.split('/'));
274
- }
275
-
276
274
  /**
277
275
  * Seed the shipped self-learning engine (`presets/_shared/ai-local/scripts/`)
278
276
  * into `<cwd>/.ai.local/scripts/`. Skip-if-exists: a consumer edit is never
@@ -284,7 +282,8 @@ function seedEngineScripts({ cwd, presetTeamSrc }) {
284
282
  if (!presetTeamSrc) {
285
283
  return result;
286
284
  }
287
- const sourceDir = engineSourceDir(presetTeamSrc);
285
+ // `presetTeamSrc` is `<presetBase>/team`; three levels up is the `presets/` root.
286
+ const sourceDir = engineSourceDir(path.resolve(presetTeamSrc, '..', '..', '..'));
288
287
  if (!fs.existsSync(sourceDir) || !fs.statSync(sourceDir).isDirectory()) {
289
288
  return result;
290
289
  }
@@ -339,6 +338,25 @@ function copyTemplates(presetTeamSrc, dest) {
339
338
  written.push(`.ai.local/team/fixtures/${rel}`);
340
339
  }
341
340
  }
341
+ // Preset-owned upstream templates refresh on every init/update: a consumer edit
342
+ // to the permission map or the prompt must not silently defeat the contract.
343
+ const upstreamSrc = path.join(presetTeamSrc, 'upstream');
344
+ for (const name of ['prompt.md', 'digest-template.md', 'opencode.json']) {
345
+ const source = path.join(upstreamSrc, name);
346
+ if (!fs.existsSync(source)) continue;
347
+ copyFile(source, path.join(dest, 'upstream', name));
348
+ written.push(`.ai.local/team/upstream/${name}`);
349
+ }
350
+ // Consumer-owned research data seeds only when absent: the registry is the
351
+ // source of truth and a re-init must never overwrite it.
352
+ for (const name of ['projects.json', 'config.json', 'signatures.json']) {
353
+ const source = path.join(upstreamSrc, name);
354
+ if (!fs.existsSync(source)) continue;
355
+ const target = path.join(dest, 'upstream', name);
356
+ if (fs.existsSync(target)) continue;
357
+ copyFile(source, target);
358
+ written.push(`.ai.local/team/upstream/${name}`);
359
+ }
342
360
  const gitkeepSrc = path.join(presetTeamSrc, 'tasks', '.gitkeep');
343
361
  if (fs.existsSync(gitkeepSrc) && !hasConsumerTaskSlugs(path.join(dest, 'tasks'))) {
344
362
  copyFile(gitkeepSrc, path.join(dest, 'tasks', '.gitkeep'));
@@ -671,7 +689,7 @@ function templateEntries(presetTeamSrc) {
671
689
  // preset keeps precedence because it is added after this line.
672
690
  addFile('.ai.local/rules/router-pages.md', path.join(libraryDir, 'router-pages.md'));
673
691
  addDir('.ai.local/rules/', path.join(presetBase, 'ai-local', 'rules'), (name) => name.endsWith('.md'));
674
- const engineDir = engineSourceDir(presetTeamSrc);
692
+ const engineDir = engineSourceDir(path.resolve(presetTeamSrc, '..', '..', '..'));
675
693
  if (engineDir) {
676
694
  for (const name of ENGINE_SCRIPTS) {
677
695
  addFile(`.ai.local/scripts/${name}`, path.join(engineDir, name));
@@ -269,7 +269,9 @@ function cmdInitMavis({ preset, cwdOption, helpers }) {
269
269
  managedFiles[item.rel] = sha256File(item.dest);
270
270
  }
271
271
  const manifest = {
272
- schemaVersion: 1,
272
+ // Mirrors MANIFEST_SCHEMA_VERSION in cli.js: a v2 manifest lists only preset
273
+ // files, so `doctor` and update pruning can trust it.
274
+ schemaVersion: 2,
273
275
  packageVersion: packageVersion(packageRoot),
274
276
  platform: 'mavis',
275
277
  preset: stack,
@@ -466,7 +466,9 @@ function cmdInitOpencode({ preset, cwdOption, helpers }) {
466
466
  managedFiles[item.rel] = sha256File(item.dest);
467
467
  }
468
468
  const manifest = {
469
- schemaVersion: 1,
469
+ // Mirrors MANIFEST_SCHEMA_VERSION in cli.js: a v2 manifest lists only preset
470
+ // files, so `doctor` and update pruning can trust it.
471
+ schemaVersion: 2,
470
472
  packageVersion: packageVersion(packageRoot),
471
473
  platform: 'opencode',
472
474
  preset: stack,
@@ -366,7 +366,9 @@ function cmdInitZcode({ preset, cwdOption, helpers }) {
366
366
  managedFiles[item.rel] = sha256File(item.dest);
367
367
  }
368
368
  const manifest = {
369
- schemaVersion: 1,
369
+ // Mirrors MANIFEST_SCHEMA_VERSION in cli.js: a v2 manifest lists only preset
370
+ // files, so `doctor` and update pruning can trust it.
371
+ schemaVersion: 2,
370
372
  packageVersion: packageVersion(packageRoot),
371
373
  platform: 'zcode',
372
374
  preset: stack,
package/docs/MAVIS.md CHANGED
@@ -115,15 +115,18 @@ Desktop/CLI versions in the compatibility doc are **operator snapshots**, not pa
115
115
  | [`MAVIS-COMPATIBILITY.md`](./MAVIS-COMPATIBILITY.md) | Probe evidence and go/no-go |
116
116
  | [`PRESET-CONTRIBUTION.md`](./PRESET-CONTRIBUTION.md) | Sibling adapter authoring |
117
117
 
118
- Validate after preset edits:
118
+ Validate after preset edits (loop):
119
119
 
120
120
  ```bash
121
121
  cd packages/ai-rules
122
- bash scripts/check-preset-structure.sh
122
+ yarn check:changed
123
+ yarn check:fast
123
124
  node scripts/check-mavis-platform-contract.mjs --self-test
124
125
  node scripts/check-mavis-adapter-map.mjs --self-test
125
126
  ```
126
127
 
128
+ The full `scripts/check-preset-structure.sh` composite runs in `yarn release:gate` before a release.
129
+
127
130
  ## Released stacks
128
131
 
129
132
  `init mavis --preset <stack>` and `init multi --preset <stack>` install Mavis for every stack in `presets/mavis/platform-contract.json` `releasedStacks` (all 11). Per-stack always-on rules live in `scripts/lib/stack-platform-profiles.mjs`. Derive with `node scripts/generate-mavis.mjs --stack <stack>` from Cursor SoT — never from Claude.
@@ -1,6 +1,12 @@
1
1
  # Project MCP catalog: `init mcp`
2
2
 
3
- `init mcp` writes the third-party MCP servers this package ships in its own client configs. It is the no-credentials command: every entry is a pinned `npx` package or a URL. The credential-bearing pack (GitLab, GitHub, Yandex Tracker, Yandex Wiki) is the separate `mcp setup|add|remove|doctor|refresh|run` namespace — see [`MCP-SETUP.md`](MCP-SETUP.md).
3
+ `init mcp` writes the MCP servers this package and its `next` presets use: Context7, Playwright, Chrome DevTools, Next.js DevTools, Semgrep, Sentry, Figma Desktop/Cloud, Storybook, DefectDojo, GitLab, GitHub, Yandex Tracker, and Yandex Wiki.
4
+
5
+ Three kinds of entry:
6
+
7
+ - **static stdio** — a pinned `npx` package or a local binary (Context7, Playwright, Chrome DevTools, Next.js DevTools, Semgrep);
8
+ - **remote** — a URL the client connects to (Figma, Storybook, Sentry);
9
+ - **runtime** — `npx -y @bonesofspring/ai-rules@<version> mcp run <slug>` (DefectDojo, GitLab, GitHub, Yandex). These need credentials from the `mcp setup` namespace; see [Credentials](#credentials).
4
10
 
5
11
  ```bash
6
12
  npx @bonesofspring/ai-rules@latest init mcp context7
@@ -16,12 +22,21 @@ npx @bonesofspring/ai-rules@latest init mcp --all --tools cursor,claude
16
22
  | `context7` | `npx -y @upstash/context7-mcp@4.5.0` | |
17
23
  | `playwright` | `npx -y @playwright/mcp@0.0.84` | Claude Code stores it as `playwright-test` |
18
24
  | `chrome-devtools` | `npx -y chrome-devtools-mcp@1.12.0` | |
25
+ | `next-devtools` | `npx -y next-devtools-mcp@0.4.0` | Needs a running `next dev` on Next.js 16+; exposes errors, routes, logs, compilation issues |
26
+ | `semgrep` | `semgrep mcp` | Needs the Semgrep CLI (`brew install semgrep`); `SEMGREP_APP_TOKEN` is optional |
27
+ | `sentry` | `https://mcp.sentry.dev/mcp` | OAuth; scope to one org/project by editing the URL. A client without OAuth support can use the stdio form `sentry mcp` after `sentry auth login` |
19
28
  | `figma-desktop` | `http://127.0.0.1:3845/mcp` | Alias `figma`; needs the Figma desktop app and a Dev/Full seat |
20
29
  | `figma-cloud` | `https://mcp.figma.com/mcp` | Remote Figma server; the client handles OAuth |
30
+ | `storybook` | `http://localhost:6200/mcp` | Needs Storybook running; 6200 is the catalog default (edit the entry if yours is 6006) |
31
+ | `defectdojo` | runtime `defectdojo` | Needs `DEFECTDOJO_URL` / `DEFECTDOJO_TOKEN` in `.env.defectdojo` |
32
+ | `gitlab` | runtime `gitlab` | Needs `mcp setup gitlab` |
33
+ | `github` | runtime `github` | Needs `mcp setup github` |
34
+ | `yandex-tracker` | runtime `yandex-tracker` | Needs `mcp setup yandex` |
35
+ | `yandex-wiki` | runtime `yandex-wiki` | Needs `mcp setup yandex` |
21
36
 
22
37
  `--all` selects every row. `figma` and `figma-desktop` resolve to the same entry.
23
38
 
24
- Pins mirror the shipped `next` presets; bump the catalog and `presets/<tool>/next/mcp.json` together — `scripts/test-cli-mcp-catalog.mjs` fails when the two drift.
39
+ For the servers the `next` presets also ship (Context7, Playwright, Chrome DevTools, Figma Desktop), pins mirror `presets/<tool>/next/mcp.json`; bump both together — `scripts/test-cli-mcp-catalog.mjs` fails when the two drift.
25
40
 
26
41
  ## What it writes
27
42
 
@@ -35,6 +50,19 @@ Pins mirror the shipped `next` presets; bump the catalog and `presets/<tool>/nex
35
50
 
36
51
  Only clients detected in the project are written (`mcp.json` exists, or the install marker does). `--tools <list>` narrows the set and warns when a named client is not installed.
37
52
 
53
+ ## Credentials
54
+
55
+ `init mcp` registers the runtime entries without credentials, so one `--all` is enough to wire every client. It prints one `next:` line per provider that has no local configuration yet:
56
+
57
+ | Provider | Where the credential comes from | Setup |
58
+ |----------|---------------------------------|-------|
59
+ | GitLab | `.ai-rules/mcp/credentials.env` (0600) or `GITLAB_TOKEN` | `ai-rules mcp setup gitlab` |
60
+ | GitHub | `.env.github` (project root, ignored) or `GITHUB_TOKEN` / `GITHUB_PERSONAL_ACCESS_TOKEN` | `ai-rules mcp setup github` |
61
+ | Yandex | `.ai-rules/mcp/config.env` or `YANDEX_ORG_ID` | `ai-rules mcp setup yandex` |
62
+ | DefectDojo | `.env.defectdojo` (project root, ignored) or `DEFECTDOJO_TOKEN` | `ai-rules mcp setup defectdojo` |
63
+
64
+ The DefectDojo token is never written by the package. `.env.defectdojo` holds `DEFECTDOJO_URL` and `DEFECTDOJO_TOKEN`; the file must be gitignored. `mcp setup defectdojo` proves the pair with `GET /api/v2/findings/` before registering.
65
+
38
66
  ## Merge rules
39
67
 
40
68
  `init mcp` merges like `init`:
package/docs/MCP-SETUP.md CHANGED
@@ -1,16 +1,16 @@
1
- # MCP setup: GitLab, GitHub, Yandex Tracker, Yandex Wiki
1
+ # MCP setup: GitLab, GitHub, Yandex Tracker, Yandex Wiki, DefectDojo
2
2
 
3
- Three sequences. Nothing here stores a token in a client config.
3
+ Four sequences. Nothing here stores a token in a client config.
4
4
  `mcp setup` writes the exact installed version pin into the client config; the runtime is pinned even though setup runs `@latest`.
5
5
  It registers only the clients already installed in the repository.
6
- GitLab credentials live in `.ai-rules/mcp/credentials.env`; Yandex keeps only non-secret settings in `.ai-rules/mcp/config.env`; the GitHub token is read from the shell or from `.env.github` in the project root and is never written by the package.
6
+ GitLab credentials live in `.ai-rules/mcp/credentials.env`; Yandex keeps only non-secret settings in `.ai-rules/mcp/config.env`; the GitHub token is read from the shell or from `.env.github` in the project root and is never written by the package; the DefectDojo URL and token are read from the shell or from `.env.defectdojo` and are never written by the package.
7
7
  All sequences are idempotent: rerun a step instead of editing a client config by hand.
8
8
  Run the `mcp` commands below from the repository root.
9
9
  Behind a corporate proxy, set `HTTPS_PROXY` and `NO_PROXY` for `yc` before `yc init`.
10
- Prerequisites: Node 20+, an MCP client, network to your GitLab instance, to GitHub and to Yandex.
10
+ Prerequisites: Node 20+, an MCP client, network to your GitLab instance, to GitHub, to Yandex and to DefectDojo.
11
11
  If no MCP client is installed yet, run `npx @bonesofspring/ai-rules@latest init cursor --preset next` (or your client/stack) first; `mcp setup` registers only installed clients.
12
12
 
13
- Third-party servers that need no credentials — Context7, Playwright, Chrome DevTools, Figma Desktop, Figma Cloud — are installed with `init mcp`; see [`MCP-CATALOG.md`](MCP-CATALOG.md).
13
+ Third-party servers that need no credentials — Context7, Playwright, Chrome DevTools, Next.js DevTools, Semgrep, Sentry (OAuth), Figma Desktop, Figma Cloud, Storybook — are installed with `init mcp`; see [`MCP-CATALOG.md`](MCP-CATALOG.md).
14
14
 
15
15
  ## 1. GitLab
16
16
 
@@ -89,6 +89,30 @@ Optional overrides in `.env.github` (or the shell): `GITHUB_MCP_URL` for a GitHu
89
89
  `npx @bonesofspring/ai-rules@latest mcp refresh yandex`
90
90
  → expected: `Yandex IAM token refreshed` and exit 0; no token is stored.
91
91
 
92
+ ## 4. DefectDojo
93
+
94
+ 1. **Create an API token.** Open your DefectDojo profile and copy the **API v2 Key**.
95
+ → expected: the key is shown once; keep it for the next step.
96
+
97
+ 2. **Put the endpoint and the token in `.env.defectdojo` in the project root.**
98
+ `DEFECTDOJO_URL=https://defectdojo.example.com` and `DEFECTDOJO_TOKEN=<the key>`.
99
+ Add the file to `.gitignore`; the package never edits your root `.gitignore` and refuses to register the server while the file is not ignored.
100
+ An exported `DEFECTDOJO_URL` / `DEFECTDOJO_TOKEN` in the shell wins over the file.
101
+ For an internal CA, point `NODE_EXTRA_CA_CERTS` at the PEM bundle.
102
+ → expected: the file exists with both values and is ignored by git.
103
+
104
+ 3. **Register the server and run the doctor.**
105
+ `npx @bonesofspring/ai-rules@latest mcp setup defectdojo`
106
+ → expected: `ok credentials` with `GET /api/v2/findings/ → 200`, `ok registration` per client, then `ok` doctor lines.
107
+
108
+ 4. **Reconnect the client** with the client action from GitLab step 3 (`opencode reload` in OpenCode).
109
+ → expected: `defectdojo` is connected and lists the `dd_*` tools.
110
+
111
+ 5. **Rotate the token.** Create a new key and replace the value in `.env.defectdojo`.
112
+ Rerun the setup; nothing is registered until the new token validates.
113
+ `npx @bonesofspring/ai-rules@latest mcp setup defectdojo`
114
+ → expected: the new token is validated; the server reconnects with it.
115
+
92
116
  ## Diagnostics
93
117
 
94
- `mcp doctor` without a provider covers **every** managed-pack provider (GitLab, GitHub, Yandex Tracker, Yandex Wiki) and exits non-zero while any of them is not ready — a provider you registered but never configured fails the report with one actionable next step. Scope it with `mcp doctor <gitlab|github|yandex>` when you want one provider only.
118
+ `mcp doctor` without a provider covers **every** managed-pack provider (GitLab, GitHub, Yandex Tracker, Yandex Wiki, DefectDojo) and exits non-zero while any of them is not ready — a provider you registered but never configured fails the report with one actionable next step. Scope it with `mcp doctor <gitlab|github|yandex|defectdojo>` when you want one provider only.
package/docs/OPENCODE.md CHANGED
@@ -75,7 +75,7 @@ File-based orchestration under `.ai.local/team/` mirrors Cursor/Claude:
75
75
 
76
76
  ```bash
77
77
  printf '%s\n' '{"status":"completed","attemptId":"<from-status.json>"}' \
78
- | bash .opencode/hooks/chain-team-phases.sh
78
+ | TEAM_TASK_SLUG=<slug> bash .opencode/hooks/chain-team-phases.sh
79
79
  ```
80
80
 
81
81
  Human gates pause with `awaitingHumanGate: true`. Resume with `/task-continue`. There is **no** shipped `hooks.json` or OpenCode plugin in v1.
@@ -101,11 +101,31 @@ Labels from official OpenCode docs (live CLI probe not yet run). Full matrix: [`
101
101
  | `.opencode/agents` / `skills` / `commands` | **confirmed** (docs) | Native discovery |
102
102
  | `opencode.json` MCP | **confirmed** (docs) | Merge `mcp` |
103
103
  | Glob / alwaysApply rules | **no-equivalent** | Lazy Read catalog under `.opencode/rules/` |
104
- | `hooks.json` / subagentStop | **manual** | `bash .opencode/hooks/chain-team-phases.sh` after receipts; no plugin in v1 |
104
+ | `hooks.json` / subagentStop | **manual** | `TEAM_TASK_SLUG=<slug> bash .opencode/hooks/chain-team-phases.sh` after receipts; no plugin in v1 |
105
105
  | Native Team lifecycle | **partial** | File pipeline is SoT; hook is single lifecycle writer |
106
106
 
107
107
  Do not pin OpenCode CLI or TUI versions in the contract.
108
108
 
109
+ ## Upstream research agent
110
+
111
+ The `next` preset ships a read-only agent for the `upstream-research` job at
112
+ `.ai.local/team/upstream/opencode.json` (source:
113
+ `presets/cursor/next/team/upstream/opencode.json`). It is refreshed on every `init`/`update`,
114
+ so a consumer cannot widen it by editing the installed copy.
115
+
116
+ - `agent.upstream-researcher` has `mode: "subagent"`.
117
+ - `permission` starts with `"*": "deny"`, so the agent has no tool at all: MCP servers installed by the same project (`chrome-devtools`, `playwright`, `context7`, `figma`) and custom tools resolve as `<server>_<tool>` and are denied by the same wildcard. The named rows stay as a second line of defence: `edit`/`bash`/`read`/`glob`/`grep`/`list` are `{"*": "deny"}`; `webfetch`, `websearch`, `task`, and `external_directory` are `deny`. The shell deny stops a write around the edit deny; the wildcard and the read/fetch/subagent denies keep untrusted upstream content from reaching a secret or a network destination. The agent needs no tool: the prompt arrives as an attached `--file` message and the runner verifies evidence itself.
118
+ - Before phase 1 the runner resolves the installed agent with `opencode debug agents` and refuses to start a project unless the global `*` and every named action still resolve to `deny` on resource `*` under last-match-wins (`E_AGENT_CONFIG_INVALID`, exit 12). The probe also asserts a synthetic non-built-in name, so a config that enumerates only the ten built-ins fails. A discovered config that appends an allow after the preset deny is caught here, not by a file grep.
119
+ - The job invokes `opencode run --agent upstream-researcher --format json --archived --auto`
120
+ with the child `cwd` set to the team `upstream/` directory; that nested config is the only
121
+ selector, because this build has no `--dir`.
122
+ - `--worktree` is never passed: the research is read-only.
123
+ - `--auto` cannot widen an explicit `deny`; the runner also compares `git status --porcelain`
124
+ in the repository before and after each call (`E_WORKTREE_CHANGED`) and inside the reviewed
125
+ clone (`E_UPSTREAM_DIRTY`).
126
+
127
+ The agent is not a first-class preset agent: it has no `agents/**` mirror and no adapter-map
128
+ row; the job asserts its resolved rules with `opencode debug agents` before the first project.
109
129
  ## Local overlay
110
130
 
111
131
  `.ai.local/rules/*.md` at repo root (or monorepo parents) override preset rules. See [`LOCAL-OVERLAY.md`](./LOCAL-OVERLAY.md).
@@ -119,15 +139,18 @@ Do not pin OpenCode CLI or TUI versions in the contract.
119
139
  | [`OPENCODE-COMPATIBILITY.md`](./OPENCODE-COMPATIBILITY.md) | Evidence and go/no-go |
120
140
  | [`PRESET-CONTRIBUTION.md`](./PRESET-CONTRIBUTION.md) | Sibling adapter authoring |
121
141
 
122
- Validate after preset edits:
142
+ Validate after preset edits (loop):
123
143
 
124
144
  ```bash
125
145
  cd packages/ai-rules
126
- bash scripts/check-preset-structure.sh
146
+ yarn check:changed
147
+ yarn check:fast
127
148
  node scripts/check-opencode-platform-contract.mjs --self-test
128
149
  node scripts/check-opencode-adapter-map.mjs --self-test
129
150
  ```
130
151
 
152
+ The full `scripts/check-preset-structure.sh` composite runs in `yarn release:gate` before a release.
153
+
131
154
  ## Released stacks
132
155
 
133
156
  `init opencode --preset <stack>` and `init multi --preset <stack>` install OpenCode for every stack in `presets/opencode/platform-contract.json` `releasedStacks` (all 11). Per-stack always-on rules and `permission.edit` allow-lists live in `scripts/lib/stack-platform-profiles.mjs`. Derive with `node scripts/generate-opencode.mjs --stack <stack>` from Cursor SoT — never from Claude.
@@ -0,0 +1,38 @@
1
+ # Platform support
2
+
3
+ Scope: `@bonesofspring/ai-rules` — the `ai-rules` CLI, the presets it installs (rules, agents, commands, hook registrations), and the self-learning engine seeded into `.ai.local/scripts/`.
4
+
5
+ macOS and Linux are fully supported. Windows is supported with the prerequisites below. The GitHub Actions full gate runs on ubuntu; the `platform-smoke` workflow adds a macOS and a Windows leg for the CLI, the engine suites, and the line-ending and bash-syntax gate.
6
+
7
+ ## Requirements
8
+
9
+ | Tool | Status | Notes |
10
+ |------|--------|-------|
11
+ | Node.js | required, **>= 20** | The whole package declares `engines.node: ">=20"`. The `mcp` command already refuses older runtimes, and the install doctor reports the floor. |
12
+ | Node.js for the `team-db` SQLite projection | **>= 22.13** | `team-db.mjs` uses `node:sqlite`. Below 22.13 the projection degrades to file-only with one diagnostic line; the rest of the engine keeps working. |
13
+ | `git` | required | Install state, generated-file drift, and every gate read the work tree through `git`. |
14
+ | `bash` | required for the chain hook only | The Cursor/Claude guard and the hook resolver run through Node. `chain-team-phases.sh` itself is still a bash script. |
15
+ | `perl` | not required | The engine lock is a sibling directory `<lock>.d` (`mkdir` + `owner.json`), so the same path excludes every process on a shared checkout. No `flock` helper and no shell, so a runtime without `perl` is not a slower path. |
16
+
17
+ ### Windows `bash`
18
+
19
+ Install **Git Bash**. The installer puts `bash.exe` in `Git\bin`, which is **not** added to the default Windows `PATH` (`Git\cmd` is). A consumer shell that runs the chain hook may need `C:\Program Files\Git\bin` on `PATH`; the hook resolver also probes the standard Git install locations. Git Bash is the documented prerequisite for contributors running the repository gates.
20
+
21
+ ## Feature matrix
22
+
23
+ | Feature | macOS | Linux | Windows |
24
+ |---------|-------|-------|---------|
25
+ | `init`, `update`, `clean`, `doctor` | yes | yes | yes |
26
+ | Cursor / Claude guard hook (Node `.mjs` registered through `node`) | yes | yes | yes |
27
+ | `chain-team-phases.sh` | yes (bash) | yes (bash) | yes (Git Bash) |
28
+ | Self-learning engine — `run.mjs`, `signals.mjs`, `manifest.mjs`, `rule-improver.mjs` | yes | yes | yes |
29
+ | `team-db` projection | SQLite on Node 22.13+; file-only below | SQLite on Node 22.13+; file-only below | SQLite on Node 22.13+; file-only below |
30
+ | `team-db` scheduler | POSIX process groups: a timeout terminates the whole group | POSIX process groups: a timeout terminates the whole group | Single process only — no group kill; a child that spawns its own children may outlive a timeout. A `.cmd` job is launched through `cmd.exe` with minimal argument quoting; avoid embedded double quotes in `jobs.json` argv |
31
+
32
+ ## Contributors
33
+
34
+ The repository gates (`packages/ai-rules/scripts/*.sh`, `yarn check:preset-structure`) require `bash` and `python3`. On Windows, run them from Git Bash, which provides `bash`; `python3` is a separate install — Git for Windows does not bundle it. The Node suites (`node --test`, the `test:*` scripts) run on any supported Node version on all three systems.
35
+
36
+ ## Upgrading from a bash guard
37
+
38
+ Cursor and Claude stacks previously registered `.cursor/hooks/guard-shell-command.sh` and `.claude/hooks/guard-shell-command.sh`. The guard now ships as a Node `.mjs` file, so those old bash files are no longer registered. `init` does not delete a path it no longer manages, so an upgraded consumer tree keeps the orphaned `.sh` file. It is inert; delete it manually after upgrading.