@bonesofspring/ai-rules 0.2.18 → 0.2.19

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 (653) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +5 -3
  3. package/bin/cli.js +111 -4
  4. package/package.json +6 -3
  5. package/presets/_shared/README.md +1 -1
  6. package/presets/_shared/assets/docs-specs/schemas/frontmatter-v1.schema.json +1 -1
  7. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +38 -0
  8. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +1 -0
  9. package/presets/_shared/core/architecture/feature-delivery-workflow.md +2 -1
  10. package/presets/_shared/core/architecture/product-specs-authoring.md +6 -3
  11. package/presets/_shared/core/architecture/product-specs.md +8 -3
  12. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +1 -0
  13. package/presets/_shared/core/quality/anti-sycophancy-discipline.md +1 -1
  14. package/presets/_shared/core/quality/code-quality-and-refactoring.md +1 -1
  15. package/presets/_shared/core/quality/mcp-usage.md +84 -0
  16. package/presets/claude/android-kotlin/MCP.md +20 -1
  17. package/presets/claude/android-kotlin/agents/accessibility-reviewer.md +6 -0
  18. package/presets/claude/android-kotlin/agents/ci-investigator.md +8 -0
  19. package/presets/claude/android-kotlin/agents/debugger.md +8 -0
  20. package/presets/claude/android-kotlin/agents/feature-developer.md +23 -0
  21. package/presets/claude/android-kotlin/agents/migration-specialist.md +6 -0
  22. package/presets/claude/android-kotlin/agents/performance-auditor.md +6 -0
  23. package/presets/claude/android-kotlin/agents/solution-architect.md +6 -0
  24. package/presets/claude/android-kotlin/agents/task-analyst.md +17 -0
  25. package/presets/claude/android-kotlin/agents/task-router.md +6 -0
  26. package/presets/claude/android-kotlin/commands/spec-start.md +1 -1
  27. package/presets/claude/android-kotlin/mcp.json +1 -1
  28. package/presets/claude/android-kotlin/rules/README.md +1 -0
  29. package/presets/claude/android-kotlin/rules/architecture/feature-delivery.md +3 -1
  30. package/presets/claude/android-kotlin/rules/architecture/product-specs-authoring.md +6 -4
  31. package/presets/claude/android-kotlin/rules/architecture/product-specs.md +8 -4
  32. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  33. package/presets/claude/android-kotlin/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  34. package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +1 -1
  35. package/presets/claude/android-kotlin/rules/tooling-and-review/mcp-usage.md +100 -0
  36. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-no-cross-stack-leakage.md +2 -0
  37. package/presets/claude/android-kotlin/skills/README.md +2 -0
  38. package/presets/claude/android-kotlin/skills/ci-investigation/SKILL.md +8 -0
  39. package/presets/claude/android-kotlin/skills/debug-investigation/SKILL.md +8 -0
  40. package/presets/claude/android-kotlin/skills/feature-delivery/SKILL.md +6 -0
  41. package/presets/claude/android-kotlin/skills/spec-discovery/SKILL.md +58 -0
  42. package/presets/claude/android-kotlin/team/README.md +8 -0
  43. package/presets/claude/android-kotlin/team/fixtures/feature-full.json +1 -0
  44. package/presets/claude/android-kotlin/team/fixtures/memlog.example.md +9 -0
  45. package/presets/claude/go/MCP.md +22 -1
  46. package/presets/claude/go/agents/ci-investigator.md +8 -0
  47. package/presets/claude/go/agents/debugger.md +8 -0
  48. package/presets/claude/go/agents/feature-developer.md +23 -0
  49. package/presets/claude/go/agents/migration-specialist.md +6 -0
  50. package/presets/claude/go/agents/performance-auditor.md +6 -0
  51. package/presets/claude/go/agents/solution-architect.md +6 -0
  52. package/presets/claude/go/agents/task-analyst.md +17 -0
  53. package/presets/claude/go/agents/task-router.md +6 -0
  54. package/presets/claude/go/commands/feature-continue.md +11 -40
  55. package/presets/claude/go/commands/spec-start.md +1 -1
  56. package/presets/claude/go/mcp.json +1 -1
  57. package/presets/claude/go/rules/README.md +2 -1
  58. package/presets/claude/go/rules/architecture/feature-delivery.md +2 -1
  59. package/presets/claude/go/rules/architecture/product-specs-authoring.md +6 -4
  60. package/presets/claude/go/rules/architecture/product-specs.md +8 -4
  61. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  62. package/presets/claude/go/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  63. package/presets/claude/go/rules/tooling-and-review/code-quality.md +1 -1
  64. package/presets/claude/go/rules/tooling-and-review/mcp-usage.md +99 -0
  65. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  66. package/presets/claude/go/skills/README.md +1 -1
  67. package/presets/claude/go/skills/ci-investigation/SKILL.md +7 -0
  68. package/presets/claude/go/skills/code-review/SKILL.md +1 -0
  69. package/presets/claude/go/skills/debug-investigation/SKILL.md +8 -0
  70. package/presets/claude/go/skills/feature-delivery/SKILL.md +7 -1
  71. package/presets/claude/go/skills/spec-discovery/SKILL.md +58 -0
  72. package/presets/claude/go/team/README.md +8 -0
  73. package/presets/claude/go/team/fixtures/feature-full.json +46 -10
  74. package/presets/claude/go/team/fixtures/memlog.example.md +9 -0
  75. package/presets/claude/ios-swift/MCP.md +20 -1
  76. package/presets/claude/ios-swift/agents/accessibility-reviewer.md +7 -10
  77. package/presets/claude/ios-swift/agents/api-contract-reviewer.md +2 -11
  78. package/presets/claude/ios-swift/agents/ci-investigator.md +10 -11
  79. package/presets/claude/ios-swift/agents/debugger.md +10 -11
  80. package/presets/claude/ios-swift/agents/feature-developer.md +23 -0
  81. package/presets/claude/ios-swift/agents/migration-specialist.md +8 -11
  82. package/presets/claude/ios-swift/agents/performance-auditor.md +8 -11
  83. package/presets/claude/ios-swift/agents/qa-tester.md +2 -11
  84. package/presets/claude/ios-swift/agents/security-reviewer.md +2 -11
  85. package/presets/claude/ios-swift/agents/solution-architect.md +6 -0
  86. package/presets/claude/ios-swift/agents/task-analyst.md +17 -0
  87. package/presets/claude/ios-swift/agents/task-router.md +6 -0
  88. package/presets/claude/ios-swift/agents/unit-test-generator.md +2 -11
  89. package/presets/claude/ios-swift/agents/unit-test-healer.md +2 -11
  90. package/presets/claude/ios-swift/agents/unit-test-planner.md +2 -11
  91. package/presets/claude/ios-swift/agents/xcuitest-test-generator.md +1 -11
  92. package/presets/claude/ios-swift/agents/xcuitest-test-healer.md +1 -11
  93. package/presets/claude/ios-swift/agents/xcuitest-test-planner.md +1 -13
  94. package/presets/claude/ios-swift/commands/spec-start.md +1 -1
  95. package/presets/claude/ios-swift/mcp.json +1 -1
  96. package/presets/claude/ios-swift/rules/README.md +3 -1
  97. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +2 -1
  98. package/presets/claude/ios-swift/rules/architecture/product-specs-authoring.md +6 -4
  99. package/presets/claude/ios-swift/rules/architecture/product-specs.md +8 -4
  100. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  101. package/presets/claude/ios-swift/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  102. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +1 -1
  103. package/presets/claude/ios-swift/rules/tooling-and-review/mcp-usage.md +100 -0
  104. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  105. package/presets/claude/ios-swift/skills/README.md +2 -0
  106. package/presets/claude/ios-swift/skills/ci-investigation/SKILL.md +8 -0
  107. package/presets/claude/ios-swift/skills/code-review/SKILL.md +1 -1
  108. package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +9 -1
  109. package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +7 -1
  110. package/presets/claude/ios-swift/skills/spec-discovery/SKILL.md +58 -0
  111. package/presets/claude/ios-swift/team/README.md +8 -0
  112. package/presets/claude/ios-swift/team/fixtures/feature-full.json +39 -9
  113. package/presets/claude/ios-swift/team/fixtures/memlog.example.md +9 -0
  114. package/presets/claude/java/CLAUDE.md +1 -1
  115. package/presets/claude/java/MCP.md +21 -0
  116. package/presets/claude/java/agents/ci-investigator.md +8 -0
  117. package/presets/claude/java/agents/debugger.md +8 -0
  118. package/presets/claude/java/agents/feature-developer.md +23 -0
  119. package/presets/claude/java/agents/migration-specialist.md +6 -0
  120. package/presets/claude/java/agents/performance-auditor.md +6 -0
  121. package/presets/claude/java/agents/solution-architect.md +6 -0
  122. package/presets/claude/java/agents/task-analyst.md +17 -0
  123. package/presets/claude/java/agents/task-router.md +6 -0
  124. package/presets/claude/java/commands/feature-continue.md +11 -40
  125. package/presets/claude/java/commands/spec-start.md +1 -1
  126. package/presets/claude/java/mcp.json +1 -1
  127. package/presets/claude/java/rules/README.md +1 -0
  128. package/presets/claude/java/rules/architecture/feature-delivery.md +2 -1
  129. package/presets/claude/java/rules/architecture/product-specs-authoring.md +6 -4
  130. package/presets/claude/java/rules/architecture/product-specs.md +8 -4
  131. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  132. package/presets/claude/java/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  133. package/presets/claude/java/rules/tooling-and-review/code-quality.md +1 -1
  134. package/presets/claude/java/rules/tooling-and-review/mcp-usage.md +98 -0
  135. package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  136. package/presets/claude/java/skills/README.md +1 -1
  137. package/presets/claude/java/skills/ci-investigation/SKILL.md +7 -0
  138. package/presets/claude/java/skills/code-review/SKILL.md +1 -0
  139. package/presets/claude/java/skills/debug-investigation/SKILL.md +8 -0
  140. package/presets/claude/java/skills/feature-delivery/SKILL.md +7 -1
  141. package/presets/claude/java/skills/spec-discovery/SKILL.md +58 -0
  142. package/presets/claude/java/team/README.md +8 -0
  143. package/presets/claude/java/team/fixtures/feature-full.json +46 -10
  144. package/presets/claude/java/team/fixtures/memlog.example.md +9 -0
  145. package/presets/claude/mcp-ts/MCP.md +20 -1
  146. package/presets/claude/mcp-ts/agents/feature-developer.md +23 -0
  147. package/presets/claude/mcp-ts/agents/solution-architect.md +5 -0
  148. package/presets/claude/mcp-ts/agents/task-analyst.md +17 -0
  149. package/presets/claude/mcp-ts/agents/task-router.md +6 -0
  150. package/presets/claude/mcp-ts/commands/spec-start.md +1 -1
  151. package/presets/claude/mcp-ts/mcp.json +1 -1
  152. package/presets/claude/mcp-ts/rules/README.md +1 -0
  153. package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +3 -1
  154. package/presets/claude/mcp-ts/rules/architecture/product-specs-authoring.md +6 -4
  155. package/presets/claude/mcp-ts/rules/architecture/product-specs.md +8 -4
  156. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  157. package/presets/claude/mcp-ts/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  158. package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +1 -1
  159. package/presets/claude/mcp-ts/rules/tooling-and-review/mcp-usage.md +99 -0
  160. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  161. package/presets/claude/mcp-ts/skills/README.md +2 -0
  162. package/presets/claude/mcp-ts/skills/code-review/SKILL.md +1 -0
  163. package/presets/claude/mcp-ts/skills/debug-investigation/SKILL.md +7 -0
  164. package/presets/claude/mcp-ts/skills/feature-delivery/SKILL.md +7 -1
  165. package/presets/claude/mcp-ts/skills/spec-discovery/SKILL.md +58 -0
  166. package/presets/claude/mcp-ts/team/README.md +7 -0
  167. package/presets/claude/mcp-ts/team/fixtures/feature-full.json +5 -2
  168. package/presets/claude/mcp-ts/team/fixtures/memlog.example.md +9 -0
  169. package/presets/claude/next/MCP.md +22 -0
  170. package/presets/claude/next/agents/accessibility-reviewer.md +8 -0
  171. package/presets/claude/next/agents/ci-investigator.md +8 -0
  172. package/presets/claude/next/agents/debugger.md +12 -0
  173. package/presets/claude/next/agents/feature-developer.md +25 -0
  174. package/presets/claude/next/agents/migration-specialist.md +6 -0
  175. package/presets/claude/next/agents/performance-auditor.md +8 -0
  176. package/presets/claude/next/agents/playwright-test-generator.md +11 -1
  177. package/presets/claude/next/agents/playwright-test-healer.md +8 -1
  178. package/presets/claude/next/agents/solution-architect.md +6 -0
  179. package/presets/claude/next/agents/task-analyst.md +17 -0
  180. package/presets/claude/next/agents/task-router.md +6 -0
  181. package/presets/claude/next/commands/feature-continue.md +11 -40
  182. package/presets/claude/next/commands/spec-start.md +1 -1
  183. package/presets/claude/next/mcp.json +3 -3
  184. package/presets/claude/next/rules/README.md +5 -3
  185. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +2 -1
  186. package/presets/claude/next/rules/architecture/product-specs-authoring.md +6 -4
  187. package/presets/claude/next/rules/architecture/product-specs.md +8 -4
  188. package/presets/claude/next/rules/testing/tests-unit.md +5 -0
  189. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  190. package/presets/claude/next/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  191. package/presets/claude/next/rules/tooling-and-review/code-quality.md +1 -1
  192. package/presets/claude/next/rules/tooling-and-review/mcp-usage.md +101 -0
  193. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  194. package/presets/claude/next/skills/README.md +2 -0
  195. package/presets/claude/next/skills/ci-investigation/SKILL.md +8 -0
  196. package/presets/claude/next/skills/code-review/SKILL.md +1 -1
  197. package/presets/claude/next/skills/debug-investigation/SKILL.md +13 -1
  198. package/presets/claude/next/skills/feature-delivery/SKILL.md +9 -1
  199. package/presets/claude/next/skills/spec-discovery/SKILL.md +58 -0
  200. package/presets/claude/next/team/README.md +11 -0
  201. package/presets/claude/next/team/fixtures/feature-full.json +43 -9
  202. package/presets/claude/next/team/fixtures/memlog.example.md +9 -0
  203. package/presets/claude/nuxt/MCP.md +22 -0
  204. package/presets/claude/nuxt/agents/accessibility-reviewer.md +8 -0
  205. package/presets/claude/nuxt/agents/ci-investigator.md +8 -0
  206. package/presets/claude/nuxt/agents/debugger.md +12 -0
  207. package/presets/claude/nuxt/agents/feature-developer.md +25 -0
  208. package/presets/claude/nuxt/agents/migration-specialist.md +6 -0
  209. package/presets/claude/nuxt/agents/performance-auditor.md +8 -0
  210. package/presets/claude/nuxt/agents/playwright-test-generator.md +11 -1
  211. package/presets/claude/nuxt/agents/playwright-test-healer.md +8 -1
  212. package/presets/claude/nuxt/agents/solution-architect.md +6 -0
  213. package/presets/claude/nuxt/agents/task-analyst.md +17 -0
  214. package/presets/claude/nuxt/agents/task-router.md +10 -4
  215. package/presets/claude/nuxt/commands/spec-start.md +1 -1
  216. package/presets/claude/nuxt/mcp.json +3 -3
  217. package/presets/claude/nuxt/rules/README.md +2 -0
  218. package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +2 -1
  219. package/presets/claude/nuxt/rules/architecture/product-specs-authoring.md +6 -4
  220. package/presets/claude/nuxt/rules/architecture/product-specs.md +8 -4
  221. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  222. package/presets/claude/nuxt/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  223. package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +1 -1
  224. package/presets/claude/nuxt/rules/tooling-and-review/mcp-usage.md +106 -0
  225. package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  226. package/presets/claude/nuxt/skills/README.md +2 -0
  227. package/presets/claude/nuxt/skills/ci-investigation/SKILL.md +8 -0
  228. package/presets/claude/nuxt/skills/code-review/SKILL.md +1 -1
  229. package/presets/claude/nuxt/skills/debug-investigation/SKILL.md +13 -1
  230. package/presets/claude/nuxt/skills/feature-delivery/SKILL.md +9 -1
  231. package/presets/claude/nuxt/skills/spec-discovery/SKILL.md +58 -0
  232. package/presets/claude/nuxt/team/README.md +11 -0
  233. package/presets/claude/nuxt/team/fixtures/feature-full.json +43 -9
  234. package/presets/claude/nuxt/team/fixtures/memlog.example.md +9 -0
  235. package/presets/claude/php-hexagonal/CLAUDE.md +1 -1
  236. package/presets/claude/php-hexagonal/MCP.md +20 -1
  237. package/presets/claude/php-hexagonal/agents/ci-investigator.md +8 -0
  238. package/presets/claude/php-hexagonal/agents/debugger.md +8 -0
  239. package/presets/claude/php-hexagonal/agents/feature-developer.md +23 -0
  240. package/presets/claude/php-hexagonal/agents/migration-specialist.md +6 -0
  241. package/presets/claude/php-hexagonal/agents/performance-auditor.md +6 -0
  242. package/presets/claude/php-hexagonal/agents/solution-architect.md +6 -0
  243. package/presets/claude/php-hexagonal/agents/task-analyst.md +17 -0
  244. package/presets/claude/php-hexagonal/agents/task-router.md +6 -0
  245. package/presets/claude/php-hexagonal/commands/feature-continue.md +11 -40
  246. package/presets/claude/php-hexagonal/commands/spec-start.md +1 -1
  247. package/presets/claude/php-hexagonal/mcp.json +1 -1
  248. package/presets/claude/php-hexagonal/rules/README.md +1 -0
  249. package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +2 -1
  250. package/presets/claude/php-hexagonal/rules/architecture/product-specs-authoring.md +6 -4
  251. package/presets/claude/php-hexagonal/rules/architecture/product-specs.md +8 -4
  252. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  253. package/presets/claude/php-hexagonal/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  254. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +1 -1
  255. package/presets/claude/php-hexagonal/rules/tooling-and-review/mcp-usage.md +98 -0
  256. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  257. package/presets/claude/php-hexagonal/skills/README.md +1 -1
  258. package/presets/claude/php-hexagonal/skills/ci-investigation/SKILL.md +7 -0
  259. package/presets/claude/php-hexagonal/skills/code-review/SKILL.md +1 -0
  260. package/presets/claude/php-hexagonal/skills/debug-investigation/SKILL.md +8 -0
  261. package/presets/claude/php-hexagonal/skills/feature-delivery/SKILL.md +7 -1
  262. package/presets/claude/php-hexagonal/skills/spec-discovery/SKILL.md +58 -0
  263. package/presets/claude/php-hexagonal/team/README.md +8 -0
  264. package/presets/claude/php-hexagonal/team/fixtures/feature-full.json +46 -10
  265. package/presets/claude/php-hexagonal/team/fixtures/memlog.example.md +9 -0
  266. package/presets/claude/php-laravel/MCP.md +21 -0
  267. package/presets/claude/php-laravel/agents/ci-investigator.md +8 -0
  268. package/presets/claude/php-laravel/agents/debugger.md +8 -0
  269. package/presets/claude/php-laravel/agents/feature-developer.md +23 -0
  270. package/presets/claude/php-laravel/agents/migration-specialist.md +6 -0
  271. package/presets/claude/php-laravel/agents/performance-auditor.md +6 -0
  272. package/presets/claude/php-laravel/agents/solution-architect.md +6 -0
  273. package/presets/claude/php-laravel/agents/task-analyst.md +17 -0
  274. package/presets/claude/php-laravel/agents/task-router.md +6 -0
  275. package/presets/claude/php-laravel/commands/feature-continue.md +11 -40
  276. package/presets/claude/php-laravel/commands/spec-start.md +1 -1
  277. package/presets/claude/php-laravel/mcp.json +1 -1
  278. package/presets/claude/php-laravel/rules/README.md +1 -0
  279. package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +3 -1
  280. package/presets/claude/php-laravel/rules/architecture/product-specs-authoring.md +6 -4
  281. package/presets/claude/php-laravel/rules/architecture/product-specs.md +8 -4
  282. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  283. package/presets/claude/php-laravel/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  284. package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +1 -1
  285. package/presets/claude/php-laravel/rules/tooling-and-review/mcp-usage.md +98 -0
  286. package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  287. package/presets/claude/php-laravel/skills/README.md +1 -1
  288. package/presets/claude/php-laravel/skills/ci-investigation/SKILL.md +7 -0
  289. package/presets/claude/php-laravel/skills/code-review/SKILL.md +1 -0
  290. package/presets/claude/php-laravel/skills/debug-investigation/SKILL.md +8 -0
  291. package/presets/claude/php-laravel/skills/feature-delivery/SKILL.md +7 -1
  292. package/presets/claude/php-laravel/skills/spec-discovery/SKILL.md +58 -0
  293. package/presets/claude/php-laravel/team/README.md +7 -0
  294. package/presets/claude/php-laravel/team/fixtures/feature-full.json +38 -9
  295. package/presets/claude/php-laravel/team/fixtures/memlog.example.md +9 -0
  296. package/presets/claude/svelte/MCP.md +22 -0
  297. package/presets/claude/svelte/agents/accessibility-reviewer.md +8 -0
  298. package/presets/claude/svelte/agents/ci-investigator.md +8 -0
  299. package/presets/claude/svelte/agents/debugger.md +12 -0
  300. package/presets/claude/svelte/agents/feature-developer.md +25 -0
  301. package/presets/claude/svelte/agents/migration-specialist.md +6 -0
  302. package/presets/claude/svelte/agents/performance-auditor.md +8 -0
  303. package/presets/claude/svelte/agents/playwright-test-generator.md +11 -1
  304. package/presets/claude/svelte/agents/playwright-test-healer.md +8 -1
  305. package/presets/claude/svelte/agents/solution-architect.md +6 -0
  306. package/presets/claude/svelte/agents/task-analyst.md +17 -0
  307. package/presets/claude/svelte/agents/task-router.md +6 -0
  308. package/presets/claude/svelte/commands/spec-start.md +1 -1
  309. package/presets/claude/svelte/mcp.json +3 -3
  310. package/presets/claude/svelte/rules/README.md +2 -0
  311. package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +2 -1
  312. package/presets/claude/svelte/rules/architecture/product-specs-authoring.md +6 -4
  313. package/presets/claude/svelte/rules/architecture/product-specs.md +8 -4
  314. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  315. package/presets/claude/svelte/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  316. package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +1 -1
  317. package/presets/claude/svelte/rules/tooling-and-review/mcp-usage.md +101 -0
  318. package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  319. package/presets/claude/svelte/skills/README.md +2 -0
  320. package/presets/claude/svelte/skills/ci-investigation/SKILL.md +8 -0
  321. package/presets/claude/svelte/skills/code-review/SKILL.md +1 -1
  322. package/presets/claude/svelte/skills/debug-investigation/SKILL.md +13 -1
  323. package/presets/claude/svelte/skills/feature-delivery/SKILL.md +9 -1
  324. package/presets/claude/svelte/skills/spec-discovery/SKILL.md +58 -0
  325. package/presets/claude/svelte/team/README.md +11 -0
  326. package/presets/claude/svelte/team/fixtures/feature-full.json +43 -9
  327. package/presets/claude/svelte/team/fixtures/memlog.example.md +9 -0
  328. package/presets/cursor/android-kotlin/MCP.md +20 -1
  329. package/presets/cursor/android-kotlin/agents/accessibility-reviewer.md +6 -0
  330. package/presets/cursor/android-kotlin/agents/ci-investigator.md +8 -0
  331. package/presets/cursor/android-kotlin/agents/debugger.md +8 -0
  332. package/presets/cursor/android-kotlin/agents/feature-developer.md +23 -0
  333. package/presets/cursor/android-kotlin/agents/migration-specialist.md +6 -0
  334. package/presets/cursor/android-kotlin/agents/performance-auditor.md +6 -0
  335. package/presets/cursor/android-kotlin/agents/solution-architect.md +6 -0
  336. package/presets/cursor/android-kotlin/agents/task-analyst.md +17 -0
  337. package/presets/cursor/android-kotlin/agents/task-router.md +6 -0
  338. package/presets/cursor/android-kotlin/commands/spec-start.md +1 -1
  339. package/presets/cursor/android-kotlin/mcp.json +1 -1
  340. package/presets/cursor/android-kotlin/rules/README.md +2 -0
  341. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +2 -1
  342. package/presets/cursor/android-kotlin/rules/anti-sycophancy-discipline.mdc +1 -1
  343. package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +1 -1
  344. package/presets/cursor/android-kotlin/rules/feature-delivery-workflow.mdc +3 -1
  345. package/presets/cursor/android-kotlin/rules/mcp-usage.mdc +99 -0
  346. package/presets/cursor/android-kotlin/rules/preset-no-cross-stack-leakage.mdc +3 -1
  347. package/presets/cursor/android-kotlin/rules/product-specs-authoring.mdc +6 -4
  348. package/presets/cursor/android-kotlin/rules/product-specs.mdc +8 -4
  349. package/presets/cursor/android-kotlin/skills/README.md +2 -0
  350. package/presets/cursor/android-kotlin/skills/ci-investigation/SKILL.md +8 -0
  351. package/presets/cursor/android-kotlin/skills/debug-investigation/SKILL.md +8 -0
  352. package/presets/cursor/android-kotlin/skills/feature-delivery/SKILL.md +6 -0
  353. package/presets/cursor/android-kotlin/skills/spec-discovery/SKILL.md +58 -0
  354. package/presets/cursor/android-kotlin/team/README.md +8 -0
  355. package/presets/cursor/android-kotlin/team/fixtures/feature-full.json +1 -0
  356. package/presets/cursor/android-kotlin/team/fixtures/memlog.example.md +9 -0
  357. package/presets/cursor/go/MCP.md +22 -1
  358. package/presets/cursor/go/agents/ci-investigator.md +8 -0
  359. package/presets/cursor/go/agents/debugger.md +8 -0
  360. package/presets/cursor/go/agents/feature-developer.md +23 -0
  361. package/presets/cursor/go/agents/migration-specialist.md +6 -0
  362. package/presets/cursor/go/agents/performance-auditor.md +6 -0
  363. package/presets/cursor/go/agents/solution-architect.md +6 -0
  364. package/presets/cursor/go/agents/task-analyst.md +17 -0
  365. package/presets/cursor/go/agents/task-router.md +6 -0
  366. package/presets/cursor/go/commands/spec-start.md +1 -1
  367. package/presets/cursor/go/mcp.json +1 -1
  368. package/presets/cursor/go/rules/README.md +2 -1
  369. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +1 -0
  370. package/presets/cursor/go/rules/anti-sycophancy-discipline.mdc +1 -1
  371. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +1 -1
  372. package/presets/cursor/go/rules/feature-delivery-workflow.mdc +2 -1
  373. package/presets/cursor/go/rules/mcp-usage.mdc +98 -0
  374. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +1 -0
  375. package/presets/cursor/go/rules/product-specs-authoring.mdc +6 -4
  376. package/presets/cursor/go/rules/product-specs.mdc +8 -4
  377. package/presets/cursor/go/skills/README.md +1 -1
  378. package/presets/cursor/go/skills/ci-investigation/SKILL.md +7 -0
  379. package/presets/cursor/go/skills/code-review/SKILL.md +1 -0
  380. package/presets/cursor/go/skills/debug-investigation/SKILL.md +8 -0
  381. package/presets/cursor/go/skills/feature-delivery/SKILL.md +7 -1
  382. package/presets/cursor/go/skills/spec-discovery/SKILL.md +58 -0
  383. package/presets/cursor/go/team/README.md +8 -0
  384. package/presets/cursor/go/team/fixtures/feature-full.json +46 -10
  385. package/presets/cursor/go/team/fixtures/memlog.example.md +9 -0
  386. package/presets/cursor/ios-swift/MCP.md +20 -1
  387. package/presets/cursor/ios-swift/agents/accessibility-reviewer.md +7 -10
  388. package/presets/cursor/ios-swift/agents/api-contract-reviewer.md +2 -11
  389. package/presets/cursor/ios-swift/agents/ci-investigator.md +10 -11
  390. package/presets/cursor/ios-swift/agents/debugger.md +10 -11
  391. package/presets/cursor/ios-swift/agents/feature-developer.md +23 -0
  392. package/presets/cursor/ios-swift/agents/migration-specialist.md +8 -11
  393. package/presets/cursor/ios-swift/agents/performance-auditor.md +8 -11
  394. package/presets/cursor/ios-swift/agents/qa-tester.md +2 -11
  395. package/presets/cursor/ios-swift/agents/security-reviewer.md +2 -11
  396. package/presets/cursor/ios-swift/agents/solution-architect.md +6 -0
  397. package/presets/cursor/ios-swift/agents/task-analyst.md +17 -0
  398. package/presets/cursor/ios-swift/agents/task-router.md +6 -0
  399. package/presets/cursor/ios-swift/agents/unit-test-generator.md +2 -11
  400. package/presets/cursor/ios-swift/agents/unit-test-healer.md +2 -11
  401. package/presets/cursor/ios-swift/agents/unit-test-planner.md +2 -11
  402. package/presets/cursor/ios-swift/agents/xcuitest-test-generator.md +1 -11
  403. package/presets/cursor/ios-swift/agents/xcuitest-test-healer.md +1 -11
  404. package/presets/cursor/ios-swift/agents/xcuitest-test-planner.md +1 -13
  405. package/presets/cursor/ios-swift/commands/spec-start.md +1 -1
  406. package/presets/cursor/ios-swift/mcp.json +1 -1
  407. package/presets/cursor/ios-swift/rules/README.md +2 -0
  408. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +2 -1
  409. package/presets/cursor/ios-swift/rules/anti-sycophancy-discipline.mdc +1 -1
  410. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +1 -1
  411. package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +2 -1
  412. package/presets/cursor/ios-swift/rules/mcp-usage.mdc +99 -0
  413. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +1 -0
  414. package/presets/cursor/ios-swift/rules/product-specs-authoring.mdc +6 -4
  415. package/presets/cursor/ios-swift/rules/product-specs.mdc +8 -4
  416. package/presets/cursor/ios-swift/skills/README.md +2 -0
  417. package/presets/cursor/ios-swift/skills/ci-investigation/SKILL.md +8 -0
  418. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +1 -1
  419. package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +9 -1
  420. package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +7 -1
  421. package/presets/cursor/ios-swift/skills/spec-discovery/SKILL.md +58 -0
  422. package/presets/cursor/ios-swift/team/README.md +8 -0
  423. package/presets/cursor/ios-swift/team/fixtures/feature-full.json +39 -9
  424. package/presets/cursor/ios-swift/team/fixtures/memlog.example.md +9 -0
  425. package/presets/cursor/java/AGENTS.md +1 -1
  426. package/presets/cursor/java/MCP.md +20 -1
  427. package/presets/cursor/java/agents/ci-investigator.md +8 -0
  428. package/presets/cursor/java/agents/debugger.md +8 -0
  429. package/presets/cursor/java/agents/feature-developer.md +23 -0
  430. package/presets/cursor/java/agents/migration-specialist.md +6 -0
  431. package/presets/cursor/java/agents/performance-auditor.md +6 -0
  432. package/presets/cursor/java/agents/solution-architect.md +6 -0
  433. package/presets/cursor/java/agents/task-analyst.md +17 -0
  434. package/presets/cursor/java/agents/task-router.md +6 -0
  435. package/presets/cursor/java/commands/spec-start.md +1 -1
  436. package/presets/cursor/java/mcp.json +1 -1
  437. package/presets/cursor/java/rules/README.md +2 -1
  438. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +1 -0
  439. package/presets/cursor/java/rules/anti-sycophancy-discipline.mdc +1 -1
  440. package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +1 -1
  441. package/presets/cursor/java/rules/feature-delivery-workflow.mdc +2 -1
  442. package/presets/cursor/java/rules/mcp-usage.mdc +97 -0
  443. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +1 -0
  444. package/presets/cursor/java/rules/product-specs-authoring.mdc +6 -4
  445. package/presets/cursor/java/rules/product-specs.mdc +8 -4
  446. package/presets/cursor/java/skills/README.md +1 -1
  447. package/presets/cursor/java/skills/ci-investigation/SKILL.md +7 -0
  448. package/presets/cursor/java/skills/code-review/SKILL.md +1 -0
  449. package/presets/cursor/java/skills/debug-investigation/SKILL.md +8 -0
  450. package/presets/cursor/java/skills/feature-delivery/SKILL.md +7 -1
  451. package/presets/cursor/java/skills/spec-discovery/SKILL.md +58 -0
  452. package/presets/cursor/java/team/README.md +8 -0
  453. package/presets/cursor/java/team/fixtures/feature-full.json +46 -10
  454. package/presets/cursor/java/team/fixtures/memlog.example.md +9 -0
  455. package/presets/cursor/mcp-ts/MCP.md +20 -1
  456. package/presets/cursor/mcp-ts/agents/feature-developer.md +23 -0
  457. package/presets/cursor/mcp-ts/agents/solution-architect.md +5 -0
  458. package/presets/cursor/mcp-ts/agents/task-analyst.md +17 -0
  459. package/presets/cursor/mcp-ts/agents/task-router.md +6 -0
  460. package/presets/cursor/mcp-ts/commands/spec-start.md +1 -1
  461. package/presets/cursor/mcp-ts/mcp.json +1 -1
  462. package/presets/cursor/mcp-ts/rules/README.md +3 -2
  463. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +1 -0
  464. package/presets/cursor/mcp-ts/rules/anti-sycophancy-discipline.mdc +1 -1
  465. package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +1 -1
  466. package/presets/cursor/mcp-ts/rules/feature-delivery-workflow.mdc +2 -1
  467. package/presets/cursor/mcp-ts/rules/mcp-usage.mdc +98 -0
  468. package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +1 -0
  469. package/presets/cursor/mcp-ts/rules/product-specs-authoring.mdc +6 -4
  470. package/presets/cursor/mcp-ts/rules/product-specs.mdc +8 -4
  471. package/presets/cursor/mcp-ts/skills/README.md +2 -0
  472. package/presets/cursor/mcp-ts/skills/code-review/SKILL.md +1 -0
  473. package/presets/cursor/mcp-ts/skills/debug-investigation/SKILL.md +7 -0
  474. package/presets/cursor/mcp-ts/skills/feature-delivery/SKILL.md +7 -1
  475. package/presets/cursor/mcp-ts/skills/spec-discovery/SKILL.md +58 -0
  476. package/presets/cursor/mcp-ts/team/README.md +7 -0
  477. package/presets/cursor/mcp-ts/team/fixtures/feature-full.json +5 -2
  478. package/presets/cursor/mcp-ts/team/fixtures/memlog.example.md +9 -0
  479. package/presets/cursor/next/MCP.md +21 -1
  480. package/presets/cursor/next/agents/accessibility-reviewer.md +8 -0
  481. package/presets/cursor/next/agents/ci-investigator.md +8 -0
  482. package/presets/cursor/next/agents/debugger.md +12 -0
  483. package/presets/cursor/next/agents/feature-developer.md +25 -0
  484. package/presets/cursor/next/agents/migration-specialist.md +6 -0
  485. package/presets/cursor/next/agents/performance-auditor.md +8 -0
  486. package/presets/cursor/next/agents/playwright-test-generator.md +9 -1
  487. package/presets/cursor/next/agents/playwright-test-healer.md +9 -1
  488. package/presets/cursor/next/agents/playwright-test-planner.md +1 -1
  489. package/presets/cursor/next/agents/solution-architect.md +6 -0
  490. package/presets/cursor/next/agents/task-analyst.md +17 -0
  491. package/presets/cursor/next/agents/task-router.md +6 -0
  492. package/presets/cursor/next/commands/spec-start.md +1 -1
  493. package/presets/cursor/next/mcp.json +3 -3
  494. package/presets/cursor/next/rules/README.md +3 -2
  495. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +2 -1
  496. package/presets/cursor/next/rules/anti-sycophancy-discipline.mdc +1 -1
  497. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +1 -1
  498. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +2 -1
  499. package/presets/cursor/next/rules/mcp-usage.mdc +100 -0
  500. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +1 -0
  501. package/presets/cursor/next/rules/product-specs-authoring.mdc +6 -4
  502. package/presets/cursor/next/rules/product-specs.mdc +8 -4
  503. package/presets/cursor/next/rules/tests-unit.mdc +5 -0
  504. package/presets/cursor/next/skills/README.md +2 -0
  505. package/presets/cursor/next/skills/ci-investigation/SKILL.md +8 -0
  506. package/presets/cursor/next/skills/code-review/SKILL.md +1 -1
  507. package/presets/cursor/next/skills/debug-investigation/SKILL.md +13 -1
  508. package/presets/cursor/next/skills/feature-delivery/SKILL.md +9 -1
  509. package/presets/cursor/next/skills/spec-discovery/SKILL.md +58 -0
  510. package/presets/cursor/next/team/README.md +11 -0
  511. package/presets/cursor/next/team/fixtures/feature-full.json +1 -0
  512. package/presets/cursor/next/team/fixtures/memlog.example.md +9 -0
  513. package/presets/cursor/nuxt/MCP.md +21 -1
  514. package/presets/cursor/nuxt/agents/accessibility-reviewer.md +8 -0
  515. package/presets/cursor/nuxt/agents/ci-investigator.md +8 -0
  516. package/presets/cursor/nuxt/agents/debugger.md +12 -0
  517. package/presets/cursor/nuxt/agents/feature-developer.md +25 -0
  518. package/presets/cursor/nuxt/agents/migration-specialist.md +6 -0
  519. package/presets/cursor/nuxt/agents/performance-auditor.md +8 -0
  520. package/presets/cursor/nuxt/agents/playwright-test-generator.md +9 -1
  521. package/presets/cursor/nuxt/agents/playwright-test-healer.md +9 -1
  522. package/presets/cursor/nuxt/agents/playwright-test-planner.md +1 -1
  523. package/presets/cursor/nuxt/agents/solution-architect.md +6 -0
  524. package/presets/cursor/nuxt/agents/task-analyst.md +17 -0
  525. package/presets/cursor/nuxt/agents/task-router.md +6 -0
  526. package/presets/cursor/nuxt/commands/spec-start.md +1 -1
  527. package/presets/cursor/nuxt/mcp.json +3 -3
  528. package/presets/cursor/nuxt/rules/README.md +2 -1
  529. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +2 -1
  530. package/presets/cursor/nuxt/rules/anti-sycophancy-discipline.mdc +1 -1
  531. package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +1 -1
  532. package/presets/cursor/nuxt/rules/feature-delivery-workflow.mdc +2 -1
  533. package/presets/cursor/nuxt/rules/mcp-usage.mdc +100 -0
  534. package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +1 -0
  535. package/presets/cursor/nuxt/rules/product-specs-authoring.mdc +6 -4
  536. package/presets/cursor/nuxt/rules/product-specs.mdc +8 -4
  537. package/presets/cursor/nuxt/skills/README.md +2 -0
  538. package/presets/cursor/nuxt/skills/ci-investigation/SKILL.md +8 -0
  539. package/presets/cursor/nuxt/skills/code-review/SKILL.md +1 -1
  540. package/presets/cursor/nuxt/skills/debug-investigation/SKILL.md +13 -1
  541. package/presets/cursor/nuxt/skills/feature-delivery/SKILL.md +9 -1
  542. package/presets/cursor/nuxt/skills/spec-discovery/SKILL.md +58 -0
  543. package/presets/cursor/nuxt/team/README.md +11 -0
  544. package/presets/cursor/nuxt/team/fixtures/feature-full.json +43 -9
  545. package/presets/cursor/nuxt/team/fixtures/memlog.example.md +9 -0
  546. package/presets/cursor/php-hexagonal/AGENTS.md +1 -1
  547. package/presets/cursor/php-hexagonal/MCP.md +20 -1
  548. package/presets/cursor/php-hexagonal/agents/ci-investigator.md +8 -0
  549. package/presets/cursor/php-hexagonal/agents/debugger.md +8 -0
  550. package/presets/cursor/php-hexagonal/agents/feature-developer.md +23 -0
  551. package/presets/cursor/php-hexagonal/agents/migration-specialist.md +6 -0
  552. package/presets/cursor/php-hexagonal/agents/performance-auditor.md +6 -0
  553. package/presets/cursor/php-hexagonal/agents/solution-architect.md +6 -0
  554. package/presets/cursor/php-hexagonal/agents/task-analyst.md +17 -0
  555. package/presets/cursor/php-hexagonal/agents/task-router.md +6 -0
  556. package/presets/cursor/php-hexagonal/commands/spec-start.md +1 -1
  557. package/presets/cursor/php-hexagonal/mcp.json +1 -1
  558. package/presets/cursor/php-hexagonal/rules/README.md +2 -1
  559. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +1 -0
  560. package/presets/cursor/php-hexagonal/rules/anti-sycophancy-discipline.mdc +1 -1
  561. package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +1 -1
  562. package/presets/cursor/php-hexagonal/rules/feature-delivery-workflow.mdc +2 -1
  563. package/presets/cursor/php-hexagonal/rules/mcp-usage.mdc +97 -0
  564. package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +1 -0
  565. package/presets/cursor/php-hexagonal/rules/product-specs-authoring.mdc +6 -4
  566. package/presets/cursor/php-hexagonal/rules/product-specs.mdc +8 -4
  567. package/presets/cursor/php-hexagonal/skills/README.md +1 -1
  568. package/presets/cursor/php-hexagonal/skills/ci-investigation/SKILL.md +7 -0
  569. package/presets/cursor/php-hexagonal/skills/code-review/SKILL.md +1 -0
  570. package/presets/cursor/php-hexagonal/skills/debug-investigation/SKILL.md +8 -0
  571. package/presets/cursor/php-hexagonal/skills/feature-delivery/SKILL.md +7 -1
  572. package/presets/cursor/php-hexagonal/skills/spec-discovery/SKILL.md +58 -0
  573. package/presets/cursor/php-hexagonal/team/README.md +8 -0
  574. package/presets/cursor/php-hexagonal/team/fixtures/feature-full.json +46 -10
  575. package/presets/cursor/php-hexagonal/team/fixtures/memlog.example.md +9 -0
  576. package/presets/cursor/php-laravel/AGENTS.md +1 -1
  577. package/presets/cursor/php-laravel/MCP.md +21 -0
  578. package/presets/cursor/php-laravel/agents/ci-investigator.md +8 -0
  579. package/presets/cursor/php-laravel/agents/debugger.md +8 -0
  580. package/presets/cursor/php-laravel/agents/feature-developer.md +23 -0
  581. package/presets/cursor/php-laravel/agents/migration-specialist.md +6 -0
  582. package/presets/cursor/php-laravel/agents/performance-auditor.md +6 -0
  583. package/presets/cursor/php-laravel/agents/solution-architect.md +6 -0
  584. package/presets/cursor/php-laravel/agents/task-analyst.md +17 -0
  585. package/presets/cursor/php-laravel/agents/task-router.md +6 -0
  586. package/presets/cursor/php-laravel/commands/spec-start.md +1 -1
  587. package/presets/cursor/php-laravel/mcp.json +1 -1
  588. package/presets/cursor/php-laravel/rules/README.md +2 -1
  589. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +1 -0
  590. package/presets/cursor/php-laravel/rules/anti-sycophancy-discipline.mdc +1 -1
  591. package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +1 -1
  592. package/presets/cursor/php-laravel/rules/feature-delivery-workflow.mdc +2 -1
  593. package/presets/cursor/php-laravel/rules/mcp-usage.mdc +97 -0
  594. package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +1 -0
  595. package/presets/cursor/php-laravel/rules/product-specs-authoring.mdc +6 -4
  596. package/presets/cursor/php-laravel/rules/product-specs.mdc +8 -4
  597. package/presets/cursor/php-laravel/skills/README.md +1 -1
  598. package/presets/cursor/php-laravel/skills/ci-investigation/SKILL.md +7 -0
  599. package/presets/cursor/php-laravel/skills/code-review/SKILL.md +1 -0
  600. package/presets/cursor/php-laravel/skills/debug-investigation/SKILL.md +8 -0
  601. package/presets/cursor/php-laravel/skills/feature-delivery/SKILL.md +7 -1
  602. package/presets/cursor/php-laravel/skills/spec-discovery/SKILL.md +58 -0
  603. package/presets/cursor/php-laravel/team/README.md +7 -0
  604. package/presets/cursor/php-laravel/team/fixtures/feature-full.json +38 -9
  605. package/presets/cursor/php-laravel/team/fixtures/memlog.example.md +9 -0
  606. package/presets/cursor/svelte/MCP.md +21 -1
  607. package/presets/cursor/svelte/agents/accessibility-reviewer.md +8 -0
  608. package/presets/cursor/svelte/agents/ci-investigator.md +8 -0
  609. package/presets/cursor/svelte/agents/debugger.md +12 -0
  610. package/presets/cursor/svelte/agents/feature-developer.md +25 -0
  611. package/presets/cursor/svelte/agents/migration-specialist.md +6 -0
  612. package/presets/cursor/svelte/agents/performance-auditor.md +8 -0
  613. package/presets/cursor/svelte/agents/playwright-test-generator.md +9 -1
  614. package/presets/cursor/svelte/agents/playwright-test-healer.md +9 -1
  615. package/presets/cursor/svelte/agents/playwright-test-planner.md +1 -1
  616. package/presets/cursor/svelte/agents/solution-architect.md +6 -0
  617. package/presets/cursor/svelte/agents/task-analyst.md +17 -0
  618. package/presets/cursor/svelte/agents/task-router.md +6 -0
  619. package/presets/cursor/svelte/commands/spec-start.md +1 -1
  620. package/presets/cursor/svelte/mcp.json +3 -3
  621. package/presets/cursor/svelte/rules/README.md +2 -1
  622. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +2 -1
  623. package/presets/cursor/svelte/rules/anti-sycophancy-discipline.mdc +1 -1
  624. package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +1 -1
  625. package/presets/cursor/svelte/rules/feature-delivery-workflow.mdc +2 -1
  626. package/presets/cursor/svelte/rules/mcp-usage.mdc +100 -0
  627. package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +1 -0
  628. package/presets/cursor/svelte/rules/product-specs-authoring.mdc +6 -4
  629. package/presets/cursor/svelte/rules/product-specs.mdc +8 -4
  630. package/presets/cursor/svelte/skills/README.md +2 -0
  631. package/presets/cursor/svelte/skills/ci-investigation/SKILL.md +8 -0
  632. package/presets/cursor/svelte/skills/code-review/SKILL.md +1 -1
  633. package/presets/cursor/svelte/skills/debug-investigation/SKILL.md +13 -1
  634. package/presets/cursor/svelte/skills/feature-delivery/SKILL.md +9 -1
  635. package/presets/cursor/svelte/skills/spec-discovery/SKILL.md +58 -0
  636. package/presets/cursor/svelte/team/README.md +11 -0
  637. package/presets/cursor/svelte/team/fixtures/feature-full.json +43 -9
  638. package/presets/cursor/svelte/team/fixtures/memlog.example.md +9 -0
  639. package/scripts/aggregate-agent-task-metrics.mjs +212 -0
  640. package/scripts/check-hook-only-lifecycle.sh +46 -0
  641. package/scripts/check-preset-i18n.sh +61 -0
  642. package/scripts/check-preset-leakage.sh +450 -0
  643. package/scripts/check-preset-structure.sh +70 -0
  644. package/scripts/check-preset-token-budget.sh +139 -0
  645. package/scripts/check-preset-twin-map.sh +122 -0
  646. package/scripts/check-product-specs.sh +90 -0
  647. package/scripts/check-rule-eval.mjs +149 -0
  648. package/scripts/check-shared-core-drift.sh +148 -0
  649. package/scripts/close-agent-task-human-gate.mjs +61 -0
  650. package/scripts/sync-dogfood-cursor.sh +70 -0
  651. package/scripts/sync-shared-core-embeds.sh +114 -0
  652. package/scripts/test-agent-task-metrics-hooks.mjs +895 -0
  653. package/scripts/test-cli-mcp-merge.mjs +137 -0
@@ -0,0 +1,122 @@
1
+ #!/usr/bin/env bash
2
+ # FAIL if Cursor→Claude twin mapping is incomplete for next + ios-swift.
3
+ # Exit 0 on OK; exit 1 on any FAIL.
4
+ set -euo pipefail
5
+
6
+ ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
7
+ export AI_RULES_PRESETS_ROOT="$ROOT/packages/ai-rules/presets"
8
+
9
+ python3 <<'PY'
10
+ from __future__ import annotations
11
+
12
+ import os
13
+ import re
14
+ import sys
15
+ from pathlib import Path
16
+
17
+ presets = Path(os.environ["AI_RULES_PRESETS_ROOT"])
18
+ STACKS = ("next", "nuxt", "svelte", "ios-swift", "android-kotlin", "go", "java", "mcp-ts", "php-hexagonal", "php-laravel")
19
+
20
+ # Mapping rows: | `foo.mdc` | `topic/bar.md` |
21
+ ROW_RE = re.compile(
22
+ r"^\|\s*`([^`]+?\.mdc)`\s*\|\s*`([^`]+?\.md)`\s*\|",
23
+ re.MULTILINE,
24
+ )
25
+
26
+
27
+ def parse_mapping(readme: Path) -> dict[str, str]:
28
+ text = readme.read_text(encoding="utf-8")
29
+ # Prefer the Cursor → Claude mapping section if present
30
+ marker = "## Cursor → Claude mapping"
31
+ idx = text.find(marker)
32
+ section = text[idx:] if idx >= 0 else text
33
+ # Stop at next ## heading of same or higher level if possible
34
+ next_h = re.search(r"\n## (?!#)", section[len(marker) :])
35
+ if next_h:
36
+ section = section[: len(marker) + next_h.start()]
37
+ mapping: dict[str, str] = {}
38
+ for m in ROW_RE.finditer(section):
39
+ cursor_stem = m.group(1)
40
+ claude_rel = m.group(2)
41
+ mapping[cursor_stem] = claude_rel
42
+ return mapping
43
+
44
+
45
+ failed = 0
46
+
47
+ print("Preset twin-map completeness")
48
+ print(f"Presets: {presets}")
49
+ print()
50
+
51
+ for stack in STACKS:
52
+ cursor_rules = presets / "cursor" / stack / "rules"
53
+ claude_rules = presets / "claude" / stack / "rules"
54
+ readme = claude_rules / "README.md"
55
+
56
+ print(f"=== {stack} ===")
57
+ if not cursor_rules.is_dir():
58
+ print(f"FAIL: missing Cursor rules dir {cursor_rules}")
59
+ failed += 1
60
+ continue
61
+ if not readme.is_file():
62
+ print(f"FAIL: missing mapping README {readme}")
63
+ failed += 1
64
+ continue
65
+
66
+ mapping = parse_mapping(readme)
67
+ if not mapping:
68
+ print(f"FAIL: no Cursor→Claude mapping rows in {readme}")
69
+ failed += 1
70
+ continue
71
+
72
+ cursor_mdc = sorted(p for p in cursor_rules.glob("*.mdc") if p.is_file())
73
+ mapped_stems = set(mapping.keys())
74
+ cursor_names = {p.name for p in cursor_mdc}
75
+
76
+ missing_rows = sorted(cursor_names - mapped_stems)
77
+ extra_rows = sorted(mapped_stems - cursor_names)
78
+
79
+ for name in missing_rows:
80
+ print(f"FAIL: Cursor stem not in mapping table: {name}")
81
+ failed += 1
82
+
83
+ for name in extra_rows:
84
+ print(f"FAIL: mapping row has no Cursor .mdc: {name}")
85
+ failed += 1
86
+
87
+ mapped_twins: set[str] = set()
88
+ for cursor_name, twin_rel in sorted(mapping.items()):
89
+ if cursor_name not in cursor_names:
90
+ continue
91
+ twin_path = claude_rules / twin_rel
92
+ mapped_twins.add(twin_rel.replace("\\", "/"))
93
+ if not twin_path.is_file():
94
+ print(f"FAIL: twin missing for {cursor_name} → {twin_rel}")
95
+ failed += 1
96
+
97
+ # Orphan Claude topic .md (exclude **/README.md indexes)
98
+ orphans: list[str] = []
99
+ for path in sorted(claude_rules.rglob("*.md")):
100
+ if path.name == "README.md":
101
+ continue
102
+ rel = path.relative_to(claude_rules).as_posix()
103
+ if rel not in mapped_twins:
104
+ orphans.append(rel)
105
+
106
+ for rel in orphans:
107
+ print(f"FAIL: orphan Claude twin (not in mapping): {rel}")
108
+ failed += 1
109
+
110
+ print(
111
+ f" Cursor .mdc: {len(cursor_mdc)}; mapping rows: {len(mapping)}; "
112
+ f"orphans: {len(orphans)}"
113
+ )
114
+ print()
115
+
116
+ if failed:
117
+ print(f"Result: FAIL ({failed} issue(s))")
118
+ sys.exit(1)
119
+
120
+ print("Result: OK")
121
+ sys.exit(0)
122
+ PY
@@ -0,0 +1,90 @@
1
+ #!/usr/bin/env bash
2
+ # Optional consumer/opt-in check for docs/specs frontmatter + INDEX links.
3
+ # Default: WARN (exit 0 with messages). --strict: FAIL (exit 1) on issues.
4
+ # Not required for consumer CI unless AC/--strict says so.
5
+ # Does not load or evaluate schemas/frontmatter-v1.schema.json (documentation artifact only).
6
+ set -euo pipefail
7
+
8
+ ROOT="."
9
+ STRICT=0
10
+ for arg in "$@"; do
11
+ case "$arg" in
12
+ --strict) STRICT=1 ;;
13
+ -*)
14
+ echo "Unknown flag: $arg" >&2
15
+ exit 2
16
+ ;;
17
+ *) ROOT="$arg" ;;
18
+ esac
19
+ done
20
+
21
+ SPECS="$ROOT/docs/specs"
22
+ INDEX="$SPECS/INDEX.md"
23
+ WARNINGS=0
24
+ FAILURES=0
25
+
26
+ log() { printf '%s\n' "$*"; }
27
+ fail() { log "FAIL: $*"; FAILURES=$((FAILURES + 1)); }
28
+
29
+ if [[ ! -d "$SPECS" ]]; then
30
+ log "OK: no docs/specs/ (optional tree)"
31
+ exit 0
32
+ fi
33
+
34
+ if [[ ! -f "$INDEX" ]]; then
35
+ fail "docs/specs/ exists but INDEX.md missing"
36
+ else
37
+ while IFS= read -r line; do
38
+ [[ "$line" =~ ^\| ]] || continue
39
+ path=$(echo "$line" | grep -oE 'docs/specs/[^|[:space:]]+\.md' | head -1 || true)
40
+ [[ -n "${path:-}" ]] || continue
41
+ if [[ ! -f "$ROOT/$path" ]]; then
42
+ fail "INDEX path missing: $path"
43
+ fi
44
+ done < "$INDEX"
45
+ fi
46
+
47
+ REQUIRED_KEYS=(id type domain routes ui store api aliases e2e)
48
+ REQUIRED_PAGE_HEADINGS=("## Overview" "## Entry / actors" "## Primary flows" "## States" "## Acceptance criteria")
49
+ REQUIRED_FEATURE_HEADINGS=("## Overview" "## Shared behavior / constraints" "## Related pages")
50
+
51
+ shopt -s nullglob
52
+ for f in "$SPECS"/domains/*/*.md; do
53
+ body=$(cat "$f")
54
+ if [[ "$body" != ---* ]]; then
55
+ fail "missing frontmatter: $f"
56
+ continue
57
+ fi
58
+ fm=$(awk 'BEGIN{p=0} /^---$/{p++; next} p==1{print} p==2{exit}' "$f")
59
+ for key in "${REQUIRED_KEYS[@]}"; do
60
+ if ! grep -qE "^${key}:" <<<"$fm"; then
61
+ fail "missing frontmatter key '$key': $f"
62
+ fi
63
+ done
64
+ type=$(grep -E '^type:' <<<"$fm" | head -1 | sed 's/^type:[[:space:]]*//;s/[[:space:]]*$//' || true)
65
+ if [[ "$type" == "page" ]]; then
66
+ for h in "${REQUIRED_PAGE_HEADINGS[@]}"; do
67
+ if ! grep -qF "$h" <<<"$body"; then
68
+ fail "missing heading '$h': $f"
69
+ fi
70
+ done
71
+ elif [[ "$type" == "feature" ]]; then
72
+ for h in "${REQUIRED_FEATURE_HEADINGS[@]}"; do
73
+ if ! grep -qF "$h" <<<"$body"; then
74
+ fail "missing heading '$h': $f"
75
+ fi
76
+ done
77
+ fi
78
+ done
79
+
80
+ if (( FAILURES > 0 )); then
81
+ log "Found $FAILURES failure(s), $WARNINGS warning(s)"
82
+ if (( STRICT == 1 )); then
83
+ exit 1
84
+ fi
85
+ log "(non-strict) exiting 0 — re-run with --strict to fail CI"
86
+ exit 0
87
+ fi
88
+
89
+ log "OK: docs/specs checks passed ($WARNINGS warning(s))"
90
+ exit 0
@@ -0,0 +1,149 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Opt-in eval: Incorrect/Correct pairs + impact frontmatter for **next** golden rules.
4
+ * Scope is next-only (eval/next/manifest.json). Other presets (go/java/php-hexagonal/…)
5
+ * are out of scope until they ship their own eval/<stack>/ manifest.
6
+ * Usage (cwd packages/ai-rules): node scripts/check-rule-eval.mjs
7
+ */
8
+ import fs from 'node:fs';
9
+ import path from 'node:path';
10
+ import { fileURLToPath } from 'node:url';
11
+
12
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
13
+ const PKG_ROOT = path.join(__dirname, '..');
14
+ const MANIFEST = path.join(PKG_ROOT, 'eval/next/manifest.json');
15
+
16
+ const IMPACT_RE = /^impact:\s*(CRITICAL|HIGH|MEDIUM|LOW)\s*$/m;
17
+
18
+ function fail(msg) {
19
+ console.error(`FAIL: ${msg}`);
20
+ return false;
21
+ }
22
+
23
+ function warn(msg) {
24
+ console.warn(`WARN: ${msg}`);
25
+ }
26
+
27
+ function countHeadings(text, kind) {
28
+ const re =
29
+ kind === 'Incorrect'
30
+ ? /^#{2,3}\s+Incorrect\s*$/gim
31
+ : /^#{2,3}\s+Correct\s*$/gim;
32
+ const m = text.match(re);
33
+ return m ? m.length : 0;
34
+ }
35
+
36
+ function sectionBodies(text, kind) {
37
+ const headingRe =
38
+ kind === 'Incorrect'
39
+ ? /^#{2,3}\s+Incorrect\s*$/gim
40
+ : /^#{2,3}\s+Correct\s*$/gim;
41
+
42
+ const bodies = [];
43
+ let match;
44
+ const re = new RegExp(headingRe.source, 'gim');
45
+ while ((match = re.exec(text)) !== null) {
46
+ const start = match.index + match[0].length;
47
+ let end = text.length;
48
+ if (kind === 'Incorrect') {
49
+ const correctRe = /^#{2,3}\s+Correct\s*$/gim;
50
+ correctRe.lastIndex = start;
51
+ const c = correctRe.exec(text);
52
+ if (c) end = c.index;
53
+ else {
54
+ const anyH = /^#{2,3}\s+/gm;
55
+ anyH.lastIndex = start;
56
+ const h = anyH.exec(text);
57
+ if (h) end = h.index;
58
+ }
59
+ } else {
60
+ const anyH = /^#{2,3}\s+/gm;
61
+ anyH.lastIndex = start;
62
+ const h = anyH.exec(text);
63
+ if (h) end = h.index;
64
+ }
65
+ bodies.push(text.slice(start, end));
66
+ }
67
+ return bodies;
68
+ }
69
+
70
+ function hasNonEmptyFence(section) {
71
+ const fenceRe = /```[^\n]*\n([\s\S]*?)```/g;
72
+ let m;
73
+ while ((m = fenceRe.exec(section)) !== null) {
74
+ if (m[1].trim().length > 0) return true;
75
+ }
76
+ return false;
77
+ }
78
+
79
+ function checkFile(relPath, minPairs, requireImpact) {
80
+ const file = path.join(PKG_ROOT, relPath);
81
+ if (!fs.existsSync(file)) {
82
+ return { ok: fail(`missing file ${relPath}`), incorrectCount: 0, correctCount: 0 };
83
+ }
84
+ const text = fs.readFileSync(file, 'utf8');
85
+ let ok = true;
86
+
87
+ if (requireImpact && !IMPACT_RE.test(text)) {
88
+ ok = fail(`${relPath}: missing or invalid impact frontmatter`);
89
+ }
90
+
91
+ const incorrectCount = countHeadings(text, 'Incorrect');
92
+ const correctCount = countHeadings(text, 'Correct');
93
+ const pairs = Math.min(incorrectCount, correctCount);
94
+
95
+ if (pairs < minPairs) {
96
+ ok =
97
+ fail(
98
+ `${relPath}: need ≥${minPairs} Incorrect/Correct pair(s), found incorrect=${incorrectCount} correct=${correctCount}`,
99
+ ) && ok;
100
+ }
101
+
102
+ const incorrectBodies = sectionBodies(text, 'Incorrect');
103
+ const correctBodies = sectionBodies(text, 'Correct');
104
+ for (let i = 0; i < Math.min(incorrectBodies.length, correctBodies.length); i++) {
105
+ if (!hasNonEmptyFence(incorrectBodies[i])) {
106
+ ok = fail(`${relPath}: Incorrect #${i + 1} has no non-empty fenced block`) && ok;
107
+ }
108
+ if (!hasNonEmptyFence(correctBodies[i])) {
109
+ ok = fail(`${relPath}: Correct #${i + 1} has no non-empty fenced block`) && ok;
110
+ }
111
+ }
112
+
113
+ return { ok, incorrectCount, correctCount };
114
+ }
115
+
116
+ function main() {
117
+ if (!fs.existsSync(MANIFEST)) {
118
+ console.error(`FAIL: manifest not found: ${MANIFEST}`);
119
+ process.exit(1);
120
+ }
121
+ const manifest = JSON.parse(fs.readFileSync(MANIFEST, 'utf8'));
122
+ let failed = 0;
123
+
124
+ console.log(`Rule eval (${manifest.stack}) — ${manifest.rules.length} stem(s)`);
125
+ for (const rule of manifest.rules) {
126
+ const minPairs = rule.minPairs ?? 1;
127
+ const requireImpact = Boolean(rule.requireImpact);
128
+ console.log(`\n=== ${rule.stem} ===`);
129
+ const c = checkFile(rule.cursor, minPairs, requireImpact);
130
+ const cl = checkFile(rule.claude, minPairs, requireImpact);
131
+ if (c.incorrectCount !== cl.incorrectCount || c.correctCount !== cl.correctCount) {
132
+ warn(
133
+ `${rule.stem}: heading count differs cursor(I=${c.incorrectCount},C=${c.correctCount}) vs claude(I=${cl.incorrectCount},C=${cl.correctCount})`,
134
+ );
135
+ }
136
+ if (!c.ok || !cl.ok) failed++;
137
+ else console.log(`PASS: ${rule.stem}`);
138
+ }
139
+
140
+ console.log();
141
+ if (failed) {
142
+ console.error(`Result: FAIL (${failed} stem(s))`);
143
+ process.exit(1);
144
+ }
145
+ console.log('Result: OK');
146
+ process.exit(0);
147
+ }
148
+
149
+ main();
@@ -0,0 +1,148 @@
1
+ #!/usr/bin/env bash
2
+ # Soft-check embed-mode shared-core adapters vs core prose.
3
+ # Lineage-mode stems are listed and skipped (marker presence only).
4
+ # Exit 0 always for soft mode; exit 1 if AI_RULES_DRIFT_FAIL=1 and drift found.
5
+ set -euo pipefail
6
+
7
+ ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
8
+ export AI_RULES_PRESETS_ROOT="$ROOT/packages/ai-rules/presets"
9
+
10
+ python3 <<'PY'
11
+ from __future__ import annotations
12
+
13
+ import os
14
+ import re
15
+ import sys
16
+ from pathlib import Path
17
+
18
+ presets = Path(os.environ["AI_RULES_PRESETS_ROOT"])
19
+ core_root = presets / "_shared" / "core"
20
+
21
+ EMBED = [
22
+ "quality/code-quality-and-refactoring.md",
23
+ "quality/anti-sycophancy-discipline.md",
24
+ "quality/design-guidance.md",
25
+ "quality/mcp-usage.md",
26
+ "meta/preset-layering.md",
27
+ "meta/preset-twin-sync.md",
28
+ "meta/preset-token-budget.md",
29
+ "meta/preset-pr-checklist.md",
30
+ "meta/preset-no-cross-stack-leakage.md",
31
+ "review/code-review-mr.md",
32
+ "review/technical-retro.md",
33
+ "review/mockup-review.md",
34
+ "review/ux-design.md",
35
+ "agent-team/agent-team-intake.md",
36
+ "architecture/product-specs.md",
37
+ "architecture/product-specs-authoring.md",
38
+ ]
39
+
40
+ LINEAGE = [
41
+ "architecture/feature-delivery-workflow.md",
42
+ "architecture/reference-features.template.md",
43
+ "agent-team/agent-team-orchestrator.md",
44
+ ]
45
+
46
+ # Full-line sync marker only (do not strip prose that *mentions* the marker).
47
+ MARKER_LINE_RE = re.compile(r"^<!--\s*shared-core:\s*[^>]+?\s*-->\s*$")
48
+
49
+
50
+ def strip_frontmatter(text: str) -> str:
51
+ if not text.startswith("---\n"):
52
+ return text
53
+ end = text.find("\n---\n", 4)
54
+ if end < 0:
55
+ return text
56
+ return text[end + 5 :]
57
+
58
+
59
+ def normalize_adapter(text: str) -> str:
60
+ text = strip_frontmatter(text)
61
+ lines: list[str] = []
62
+ skip_stack = False
63
+ for line in text.splitlines():
64
+ if MARKER_LINE_RE.match(line.strip()):
65
+ continue
66
+ if line.startswith("## Stack notes"):
67
+ skip_stack = True
68
+ if skip_stack:
69
+ continue
70
+ lines.append(line.rstrip())
71
+ while lines and not lines[0]:
72
+ lines.pop(0)
73
+ while lines and not lines[-1]:
74
+ lines.pop()
75
+ return "\n".join(lines) + ("\n" if lines else "")
76
+
77
+
78
+ def normalize_core(text: str) -> str:
79
+ lines = [line.rstrip() for line in text.splitlines()]
80
+ while lines and not lines[0]:
81
+ lines.pop(0)
82
+ while lines and not lines[-1]:
83
+ lines.pop()
84
+ return "\n".join(lines) + ("\n" if lines else "")
85
+
86
+
87
+ def consumers(stem: str) -> list[Path]:
88
+ out: list[Path] = []
89
+ needle = f"shared-core: {stem}"
90
+ for base in (presets / "cursor", presets / "claude"):
91
+ for path in base.rglob("*"):
92
+ if path.suffix not in {".md", ".mdc"}:
93
+ continue
94
+ try:
95
+ if needle in path.read_text(encoding="utf-8"):
96
+ out.append(path)
97
+ except OSError:
98
+ continue
99
+ return out
100
+
101
+
102
+ print("Shared-core drift check (embed mode)")
103
+ print(f"Core: {core_root}")
104
+ print()
105
+
106
+ drift = 0
107
+ checked = 0
108
+
109
+ for stem in EMBED:
110
+ core_file = core_root / stem
111
+ if not core_file.is_file():
112
+ print(f"WARN: missing core {stem}")
113
+ continue
114
+ core_n = normalize_core(core_file.read_text(encoding="utf-8"))
115
+ for adapter in consumers(stem):
116
+ checked += 1
117
+ ad_n = normalize_adapter(adapter.read_text(encoding="utf-8"))
118
+ if ad_n != core_n:
119
+ print(f"DRIFT (embed): {adapter}")
120
+ print(f" vs core: {stem}")
121
+ drift += 1
122
+
123
+ print()
124
+ print("Lineage-mode (marker only; body not compared):")
125
+ lineage_ok = 0
126
+ for stem in LINEAGE:
127
+ count = len(consumers(stem))
128
+ print(f" {stem} → {count} consumers")
129
+ if count < 1:
130
+ print(f" WARN: no consumers for lineage stem {stem}")
131
+ else:
132
+ lineage_ok += 1
133
+
134
+ print()
135
+ print(
136
+ f"Checked embed adapters: {checked}; drift: {drift}; "
137
+ f"lineage stems ok: {lineage_ok}/{len(LINEAGE)}"
138
+ )
139
+
140
+ if drift:
141
+ print("Result: DRIFT (soft — document intentional fork or re-sync embed bodies)")
142
+ if os.environ.get("AI_RULES_DRIFT_FAIL") == "1":
143
+ sys.exit(1)
144
+ sys.exit(0)
145
+
146
+ print("Result: OK")
147
+ sys.exit(0)
148
+ PY
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Thin wrapper around the installed chain-team-phases hook action `end_human_gate`.
4
+ * Prefer invoking the hook directly from /task-continue (see command Metrics section).
5
+ *
6
+ * Usage:
7
+ * node close-agent-task-human-gate.mjs [--cwd <repo>] [--platform cursor|claude] [--slug <slug>]
8
+ */
9
+
10
+ import { execFileSync } from 'node:child_process';
11
+ import fs from 'node:fs';
12
+ import path from 'node:path';
13
+
14
+ function parseArgs(argv) {
15
+ const options = { cwd: process.cwd(), platform: 'cursor', slug: null };
16
+ for (let i = 2; i < argv.length; i += 1) {
17
+ const arg = argv[i];
18
+ if (arg === '--cwd') options.cwd = path.resolve(argv[++i]);
19
+ else if (arg === '--platform') options.platform = argv[++i];
20
+ else if (arg === '--slug') options.slug = argv[++i];
21
+ else if (arg === '--activate-next') {
22
+ /* always activate via hook payload */
23
+ } else if (arg === '--team-root') {
24
+ // Compatibility with earlier docs: derive platform + cwd from team root.
25
+ const teamRoot = path.resolve(argv[++i]);
26
+ options.cwd = path.resolve(teamRoot, '..', '..');
27
+ options.platform = path.basename(path.dirname(teamRoot)) === '.claude' ? 'claude' : 'cursor';
28
+ } else {
29
+ console.error(`Unknown argument: ${arg}`);
30
+ process.exit(2);
31
+ }
32
+ }
33
+ return options;
34
+ }
35
+
36
+ const options = parseArgs(process.argv);
37
+ const toolRoot = path.join(options.cwd, `.${options.platform}`);
38
+ const hookPath = path.join(toolRoot, 'hooks', 'chain-team-phases.sh');
39
+ if (!fs.existsSync(hookPath)) {
40
+ console.error(`Installed hook not found: ${hookPath}`);
41
+ process.exit(1);
42
+ }
43
+
44
+ if (options.slug) {
45
+ const activePath = path.join(toolRoot, 'team', 'active-task.json');
46
+ fs.mkdirSync(path.dirname(activePath), { recursive: true });
47
+ fs.writeFileSync(activePath, `${JSON.stringify({ slug: options.slug }, null, 2)}\n`);
48
+ }
49
+
50
+ const payload = JSON.stringify({
51
+ status: 'completed',
52
+ action: 'end_human_gate',
53
+ activateNext: true,
54
+ });
55
+
56
+ const output = execFileSync('bash', [hookPath], {
57
+ cwd: options.cwd,
58
+ encoding: 'utf8',
59
+ input: payload,
60
+ });
61
+ process.stdout.write(output || '{}\n');
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env bash
2
+ # Sync monorepo dogfood root `.cursor/` from Cursor next preset (packages SoT).
3
+ # Also syncs repo-root AGENTS.md from REPO_AGENTS.md when present.
4
+ # Usage (from repo root or any cwd):
5
+ # ./packages/ai-rules/scripts/sync-dogfood-cursor.sh
6
+ # AI_RULES_DOGFOOD_PRESET=ios-swift ./packages/ai-rules/scripts/sync-dogfood-cursor.sh
7
+ set -euo pipefail
8
+
9
+ ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
10
+ PRESET_NAME="${AI_RULES_DOGFOOD_PRESET:-next}"
11
+ SRC="$ROOT/packages/ai-rules/presets/cursor/$PRESET_NAME"
12
+ DST="$ROOT/.cursor"
13
+
14
+ if [[ ! -d "$SRC" ]]; then
15
+ echo "error: preset not found: $SRC" >&2
16
+ exit 1
17
+ fi
18
+
19
+ echo "Dogfood sync: $SRC → $DST (preset=$PRESET_NAME)"
20
+
21
+ mkdir -p "$DST"
22
+
23
+ # Platform files at preset root
24
+ for f in AGENTS.md BUGBOT.md MCP.md hooks.json mcp.json README.md; do
25
+ if [[ -f "$SRC/$f" ]]; then
26
+ cp "$SRC/$f" "$DST/$f"
27
+ fi
28
+ done
29
+
30
+ # Repo-root AGENTS.md (cross-tool) from REPO_AGENTS.md
31
+ if [[ -f "$SRC/REPO_AGENTS.md" ]]; then
32
+ cp "$SRC/REPO_AGENTS.md" "$ROOT/AGENTS.md"
33
+ echo "Copied REPO_AGENTS.md → $ROOT/AGENTS.md"
34
+ fi
35
+
36
+ # Directory trees (preserve local team/tasks)
37
+ for dir in agents commands hooks rules skills; do
38
+ if [[ -d "$SRC/$dir" ]]; then
39
+ mkdir -p "$DST/$dir"
40
+ rsync -a --delete "$SRC/$dir/" "$DST/$dir/"
41
+ fi
42
+ done
43
+
44
+ if [[ -d "$SRC/team" ]]; then
45
+ mkdir -p "$DST/team"
46
+ # Sync fixtures + README; never delete local tasks/
47
+ if [[ -d "$SRC/team/fixtures" ]]; then
48
+ mkdir -p "$DST/team/fixtures"
49
+ rsync -a --delete "$SRC/team/fixtures/" "$DST/team/fixtures/"
50
+ fi
51
+ if [[ -f "$SRC/team/README.md" ]]; then
52
+ cp "$SRC/team/README.md" "$DST/team/README.md"
53
+ fi
54
+ if [[ -f "$SRC/team/.gitkeep" ]]; then
55
+ mkdir -p "$DST/team/tasks"
56
+ cp "$SRC/team/.gitkeep" "$DST/team/tasks/.gitkeep" 2>/dev/null || true
57
+ fi
58
+ # Living conventions: seed if absent; preserve consumer edits
59
+ if [[ -f "$SRC/team/conventions.md" ]]; then
60
+ if [[ ! -f "$DST/team/conventions.md" ]]; then
61
+ cp "$SRC/team/conventions.md" "$DST/team/conventions.md"
62
+ echo "Seeded team/conventions.md"
63
+ else
64
+ echo "Tip: skipped team/conventions.md (already present — living dogfood notes preserved)"
65
+ fi
66
+ fi
67
+ fi
68
+
69
+ echo "Done. Review: git status -- .cursor/ AGENTS.md"
70
+ echo "Tip: run packages/ai-rules/scripts/check-shared-core-drift.sh after core edits."