@bonesofspring/ai-rules 0.2.18 → 0.2.20

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 (697) hide show
  1. package/CHANGELOG.md +59 -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 +3 -3
  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/agent-team/task-classification.md +21 -0
  10. package/presets/_shared/core/architecture/feature-delivery-workflow.md +2 -1
  11. package/presets/_shared/core/architecture/product-specs-authoring.md +6 -3
  12. package/presets/_shared/core/architecture/product-specs.md +8 -3
  13. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +1 -0
  14. package/presets/_shared/core/quality/anti-sycophancy-discipline.md +1 -1
  15. package/presets/_shared/core/quality/code-quality-and-refactoring.md +1 -1
  16. package/presets/_shared/core/quality/debug-investigation.md +24 -0
  17. package/presets/_shared/core/quality/mcp-usage.md +84 -0
  18. package/presets/_shared/core/quality/verification-before-completion.md +25 -0
  19. package/presets/_shared/core/review/receiving-code-review.md +24 -0
  20. package/presets/claude/android-kotlin/MCP.md +20 -1
  21. package/presets/claude/android-kotlin/agents/accessibility-reviewer.md +6 -0
  22. package/presets/claude/android-kotlin/agents/build-verifier.md +6 -0
  23. package/presets/claude/android-kotlin/agents/ci-investigator.md +9 -0
  24. package/presets/claude/android-kotlin/agents/code-reviewer.md +2 -0
  25. package/presets/claude/android-kotlin/agents/debugger.md +13 -0
  26. package/presets/claude/android-kotlin/agents/feature-developer.md +30 -0
  27. package/presets/claude/android-kotlin/agents/migration-specialist.md +6 -0
  28. package/presets/claude/android-kotlin/agents/performance-auditor.md +6 -0
  29. package/presets/claude/android-kotlin/agents/solution-architect.md +6 -0
  30. package/presets/claude/android-kotlin/agents/task-analyst.md +27 -0
  31. package/presets/claude/android-kotlin/agents/task-router.md +20 -0
  32. package/presets/claude/android-kotlin/commands/spec-start.md +1 -1
  33. package/presets/claude/android-kotlin/mcp.json +1 -1
  34. package/presets/claude/android-kotlin/rules/README.md +1 -0
  35. package/presets/claude/android-kotlin/rules/architecture/feature-delivery.md +3 -1
  36. package/presets/claude/android-kotlin/rules/architecture/product-specs-authoring.md +6 -4
  37. package/presets/claude/android-kotlin/rules/architecture/product-specs.md +8 -4
  38. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  39. package/presets/claude/android-kotlin/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  40. package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +1 -1
  41. package/presets/claude/android-kotlin/rules/tooling-and-review/mcp-usage.md +100 -0
  42. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-no-cross-stack-leakage.md +2 -0
  43. package/presets/claude/android-kotlin/skills/README.md +2 -0
  44. package/presets/claude/android-kotlin/skills/ci-investigation/SKILL.md +8 -0
  45. package/presets/claude/android-kotlin/skills/code-review/SKILL.md +6 -0
  46. package/presets/claude/android-kotlin/skills/debug-investigation/SKILL.md +40 -4
  47. package/presets/claude/android-kotlin/skills/feature-delivery/SKILL.md +6 -0
  48. package/presets/claude/android-kotlin/skills/spec-discovery/SKILL.md +58 -0
  49. package/presets/claude/android-kotlin/team/README.md +8 -0
  50. package/presets/claude/android-kotlin/team/fixtures/feature-full.json +1 -0
  51. package/presets/claude/android-kotlin/team/fixtures/memlog.example.md +9 -0
  52. package/presets/claude/go/MCP.md +22 -1
  53. package/presets/claude/go/agents/build-verifier.md +6 -0
  54. package/presets/claude/go/agents/ci-investigator.md +9 -0
  55. package/presets/claude/go/agents/code-reviewer.md +2 -0
  56. package/presets/claude/go/agents/debugger.md +15 -0
  57. package/presets/claude/go/agents/feature-developer.md +30 -0
  58. package/presets/claude/go/agents/migration-specialist.md +6 -0
  59. package/presets/claude/go/agents/performance-auditor.md +6 -0
  60. package/presets/claude/go/agents/solution-architect.md +6 -0
  61. package/presets/claude/go/agents/task-analyst.md +27 -0
  62. package/presets/claude/go/agents/task-router.md +20 -0
  63. package/presets/claude/go/commands/feature-continue.md +11 -40
  64. package/presets/claude/go/commands/spec-start.md +1 -1
  65. package/presets/claude/go/mcp.json +1 -1
  66. package/presets/claude/go/rules/README.md +2 -1
  67. package/presets/claude/go/rules/architecture/feature-delivery.md +2 -1
  68. package/presets/claude/go/rules/architecture/product-specs-authoring.md +6 -4
  69. package/presets/claude/go/rules/architecture/product-specs.md +8 -4
  70. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  71. package/presets/claude/go/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  72. package/presets/claude/go/rules/tooling-and-review/code-quality.md +1 -1
  73. package/presets/claude/go/rules/tooling-and-review/mcp-usage.md +99 -0
  74. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  75. package/presets/claude/go/skills/README.md +1 -1
  76. package/presets/claude/go/skills/ci-investigation/SKILL.md +7 -0
  77. package/presets/claude/go/skills/code-review/SKILL.md +7 -0
  78. package/presets/claude/go/skills/debug-investigation/SKILL.md +38 -2
  79. package/presets/claude/go/skills/feature-delivery/SKILL.md +7 -1
  80. package/presets/claude/go/skills/spec-discovery/SKILL.md +58 -0
  81. package/presets/claude/go/team/README.md +8 -0
  82. package/presets/claude/go/team/fixtures/feature-full.json +46 -10
  83. package/presets/claude/go/team/fixtures/memlog.example.md +9 -0
  84. package/presets/claude/ios-swift/MCP.md +20 -1
  85. package/presets/claude/ios-swift/agents/accessibility-reviewer.md +7 -10
  86. package/presets/claude/ios-swift/agents/api-contract-reviewer.md +2 -11
  87. package/presets/claude/ios-swift/agents/build-verifier.md +6 -0
  88. package/presets/claude/ios-swift/agents/ci-investigator.md +11 -11
  89. package/presets/claude/ios-swift/agents/code-reviewer.md +2 -0
  90. package/presets/claude/ios-swift/agents/debugger.md +15 -11
  91. package/presets/claude/ios-swift/agents/feature-developer.md +30 -0
  92. package/presets/claude/ios-swift/agents/migration-specialist.md +8 -11
  93. package/presets/claude/ios-swift/agents/performance-auditor.md +8 -11
  94. package/presets/claude/ios-swift/agents/qa-tester.md +2 -11
  95. package/presets/claude/ios-swift/agents/security-reviewer.md +2 -11
  96. package/presets/claude/ios-swift/agents/solution-architect.md +6 -0
  97. package/presets/claude/ios-swift/agents/task-analyst.md +27 -0
  98. package/presets/claude/ios-swift/agents/task-router.md +20 -0
  99. package/presets/claude/ios-swift/agents/unit-test-generator.md +2 -11
  100. package/presets/claude/ios-swift/agents/unit-test-healer.md +2 -11
  101. package/presets/claude/ios-swift/agents/unit-test-planner.md +2 -11
  102. package/presets/claude/ios-swift/agents/xcuitest-test-generator.md +1 -11
  103. package/presets/claude/ios-swift/agents/xcuitest-test-healer.md +1 -11
  104. package/presets/claude/ios-swift/agents/xcuitest-test-planner.md +1 -13
  105. package/presets/claude/ios-swift/commands/spec-start.md +1 -1
  106. package/presets/claude/ios-swift/mcp.json +1 -1
  107. package/presets/claude/ios-swift/rules/README.md +3 -1
  108. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +2 -1
  109. package/presets/claude/ios-swift/rules/architecture/product-specs-authoring.md +6 -4
  110. package/presets/claude/ios-swift/rules/architecture/product-specs.md +8 -4
  111. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  112. package/presets/claude/ios-swift/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  113. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +1 -1
  114. package/presets/claude/ios-swift/rules/tooling-and-review/mcp-usage.md +100 -0
  115. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  116. package/presets/claude/ios-swift/skills/README.md +2 -0
  117. package/presets/claude/ios-swift/skills/ci-investigation/SKILL.md +8 -0
  118. package/presets/claude/ios-swift/skills/code-review/SKILL.md +7 -1
  119. package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +41 -5
  120. package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +7 -1
  121. package/presets/claude/ios-swift/skills/spec-discovery/SKILL.md +58 -0
  122. package/presets/claude/ios-swift/team/README.md +8 -0
  123. package/presets/claude/ios-swift/team/fixtures/feature-full.json +39 -9
  124. package/presets/claude/ios-swift/team/fixtures/memlog.example.md +9 -0
  125. package/presets/claude/java/CLAUDE.md +1 -1
  126. package/presets/claude/java/MCP.md +21 -0
  127. package/presets/claude/java/agents/build-verifier.md +6 -0
  128. package/presets/claude/java/agents/ci-investigator.md +9 -0
  129. package/presets/claude/java/agents/code-reviewer.md +2 -0
  130. package/presets/claude/java/agents/debugger.md +15 -0
  131. package/presets/claude/java/agents/feature-developer.md +30 -0
  132. package/presets/claude/java/agents/migration-specialist.md +6 -0
  133. package/presets/claude/java/agents/performance-auditor.md +6 -0
  134. package/presets/claude/java/agents/solution-architect.md +6 -0
  135. package/presets/claude/java/agents/task-analyst.md +27 -0
  136. package/presets/claude/java/agents/task-router.md +20 -0
  137. package/presets/claude/java/commands/feature-continue.md +11 -40
  138. package/presets/claude/java/commands/spec-start.md +1 -1
  139. package/presets/claude/java/mcp.json +1 -1
  140. package/presets/claude/java/rules/README.md +1 -0
  141. package/presets/claude/java/rules/architecture/feature-delivery.md +2 -1
  142. package/presets/claude/java/rules/architecture/product-specs-authoring.md +6 -4
  143. package/presets/claude/java/rules/architecture/product-specs.md +8 -4
  144. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  145. package/presets/claude/java/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  146. package/presets/claude/java/rules/tooling-and-review/code-quality.md +1 -1
  147. package/presets/claude/java/rules/tooling-and-review/mcp-usage.md +98 -0
  148. package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  149. package/presets/claude/java/skills/README.md +1 -1
  150. package/presets/claude/java/skills/ci-investigation/SKILL.md +7 -0
  151. package/presets/claude/java/skills/code-review/SKILL.md +7 -0
  152. package/presets/claude/java/skills/debug-investigation/SKILL.md +38 -2
  153. package/presets/claude/java/skills/feature-delivery/SKILL.md +7 -1
  154. package/presets/claude/java/skills/spec-discovery/SKILL.md +58 -0
  155. package/presets/claude/java/team/README.md +8 -0
  156. package/presets/claude/java/team/fixtures/feature-full.json +46 -10
  157. package/presets/claude/java/team/fixtures/memlog.example.md +9 -0
  158. package/presets/claude/mcp-ts/MCP.md +20 -1
  159. package/presets/claude/mcp-ts/agents/build-verifier.md +6 -0
  160. package/presets/claude/mcp-ts/agents/feature-developer.md +30 -0
  161. package/presets/claude/mcp-ts/agents/solution-architect.md +5 -0
  162. package/presets/claude/mcp-ts/agents/task-analyst.md +27 -0
  163. package/presets/claude/mcp-ts/agents/task-router.md +20 -0
  164. package/presets/claude/mcp-ts/commands/spec-start.md +1 -1
  165. package/presets/claude/mcp-ts/mcp.json +1 -1
  166. package/presets/claude/mcp-ts/rules/README.md +1 -0
  167. package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +3 -1
  168. package/presets/claude/mcp-ts/rules/architecture/product-specs-authoring.md +6 -4
  169. package/presets/claude/mcp-ts/rules/architecture/product-specs.md +8 -4
  170. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  171. package/presets/claude/mcp-ts/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  172. package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +1 -1
  173. package/presets/claude/mcp-ts/rules/tooling-and-review/mcp-usage.md +99 -0
  174. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  175. package/presets/claude/mcp-ts/skills/README.md +2 -0
  176. package/presets/claude/mcp-ts/skills/code-review/SKILL.md +7 -0
  177. package/presets/claude/mcp-ts/skills/debug-investigation/SKILL.md +36 -1
  178. package/presets/claude/mcp-ts/skills/feature-delivery/SKILL.md +7 -1
  179. package/presets/claude/mcp-ts/skills/spec-discovery/SKILL.md +58 -0
  180. package/presets/claude/mcp-ts/team/README.md +7 -0
  181. package/presets/claude/mcp-ts/team/fixtures/feature-full.json +5 -2
  182. package/presets/claude/mcp-ts/team/fixtures/memlog.example.md +9 -0
  183. package/presets/claude/next/MCP.md +22 -0
  184. package/presets/claude/next/agents/accessibility-reviewer.md +8 -0
  185. package/presets/claude/next/agents/build-verifier.md +6 -0
  186. package/presets/claude/next/agents/ci-investigator.md +9 -0
  187. package/presets/claude/next/agents/code-reviewer.md +2 -0
  188. package/presets/claude/next/agents/debugger.md +17 -0
  189. package/presets/claude/next/agents/feature-developer.md +32 -0
  190. package/presets/claude/next/agents/migration-specialist.md +6 -0
  191. package/presets/claude/next/agents/performance-auditor.md +8 -0
  192. package/presets/claude/next/agents/playwright-test-generator.md +11 -1
  193. package/presets/claude/next/agents/playwright-test-healer.md +8 -1
  194. package/presets/claude/next/agents/solution-architect.md +6 -0
  195. package/presets/claude/next/agents/task-analyst.md +28 -1
  196. package/presets/claude/next/agents/task-router.md +20 -0
  197. package/presets/claude/next/commands/feature-continue.md +11 -40
  198. package/presets/claude/next/commands/spec-start.md +1 -1
  199. package/presets/claude/next/mcp.json +3 -3
  200. package/presets/claude/next/rules/README.md +5 -3
  201. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +2 -1
  202. package/presets/claude/next/rules/architecture/product-specs-authoring.md +6 -4
  203. package/presets/claude/next/rules/architecture/product-specs.md +8 -4
  204. package/presets/claude/next/rules/testing/tests-unit.md +5 -0
  205. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  206. package/presets/claude/next/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  207. package/presets/claude/next/rules/tooling-and-review/code-quality.md +1 -1
  208. package/presets/claude/next/rules/tooling-and-review/mcp-usage.md +101 -0
  209. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  210. package/presets/claude/next/skills/README.md +2 -0
  211. package/presets/claude/next/skills/ci-investigation/SKILL.md +8 -0
  212. package/presets/claude/next/skills/code-review/SKILL.md +7 -1
  213. package/presets/claude/next/skills/debug-investigation/SKILL.md +39 -12
  214. package/presets/claude/next/skills/feature-delivery/SKILL.md +9 -1
  215. package/presets/claude/next/skills/spec-discovery/SKILL.md +58 -0
  216. package/presets/claude/next/team/README.md +11 -0
  217. package/presets/claude/next/team/fixtures/feature-full.json +43 -9
  218. package/presets/claude/next/team/fixtures/memlog.example.md +9 -0
  219. package/presets/claude/nuxt/MCP.md +22 -0
  220. package/presets/claude/nuxt/agents/accessibility-reviewer.md +8 -0
  221. package/presets/claude/nuxt/agents/build-verifier.md +6 -0
  222. package/presets/claude/nuxt/agents/ci-investigator.md +9 -0
  223. package/presets/claude/nuxt/agents/code-reviewer.md +2 -0
  224. package/presets/claude/nuxt/agents/debugger.md +17 -0
  225. package/presets/claude/nuxt/agents/feature-developer.md +32 -0
  226. package/presets/claude/nuxt/agents/migration-specialist.md +6 -0
  227. package/presets/claude/nuxt/agents/performance-auditor.md +8 -0
  228. package/presets/claude/nuxt/agents/playwright-test-generator.md +11 -1
  229. package/presets/claude/nuxt/agents/playwright-test-healer.md +8 -1
  230. package/presets/claude/nuxt/agents/solution-architect.md +6 -0
  231. package/presets/claude/nuxt/agents/task-analyst.md +28 -1
  232. package/presets/claude/nuxt/agents/task-router.md +24 -4
  233. package/presets/claude/nuxt/commands/spec-start.md +1 -1
  234. package/presets/claude/nuxt/mcp.json +3 -3
  235. package/presets/claude/nuxt/rules/README.md +2 -0
  236. package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +2 -1
  237. package/presets/claude/nuxt/rules/architecture/product-specs-authoring.md +6 -4
  238. package/presets/claude/nuxt/rules/architecture/product-specs.md +8 -4
  239. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  240. package/presets/claude/nuxt/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  241. package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +1 -1
  242. package/presets/claude/nuxt/rules/tooling-and-review/mcp-usage.md +106 -0
  243. package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  244. package/presets/claude/nuxt/skills/README.md +2 -0
  245. package/presets/claude/nuxt/skills/ci-investigation/SKILL.md +8 -0
  246. package/presets/claude/nuxt/skills/code-review/SKILL.md +7 -1
  247. package/presets/claude/nuxt/skills/debug-investigation/SKILL.md +41 -12
  248. package/presets/claude/nuxt/skills/feature-delivery/SKILL.md +9 -1
  249. package/presets/claude/nuxt/skills/spec-discovery/SKILL.md +58 -0
  250. package/presets/claude/nuxt/team/README.md +11 -0
  251. package/presets/claude/nuxt/team/fixtures/feature-full.json +43 -9
  252. package/presets/claude/nuxt/team/fixtures/memlog.example.md +9 -0
  253. package/presets/claude/php-hexagonal/CLAUDE.md +1 -1
  254. package/presets/claude/php-hexagonal/MCP.md +20 -1
  255. package/presets/claude/php-hexagonal/agents/build-verifier.md +6 -0
  256. package/presets/claude/php-hexagonal/agents/ci-investigator.md +9 -0
  257. package/presets/claude/php-hexagonal/agents/code-reviewer.md +2 -0
  258. package/presets/claude/php-hexagonal/agents/debugger.md +15 -0
  259. package/presets/claude/php-hexagonal/agents/feature-developer.md +30 -0
  260. package/presets/claude/php-hexagonal/agents/migration-specialist.md +6 -0
  261. package/presets/claude/php-hexagonal/agents/performance-auditor.md +6 -0
  262. package/presets/claude/php-hexagonal/agents/solution-architect.md +6 -0
  263. package/presets/claude/php-hexagonal/agents/task-analyst.md +27 -0
  264. package/presets/claude/php-hexagonal/agents/task-router.md +20 -0
  265. package/presets/claude/php-hexagonal/commands/feature-continue.md +11 -40
  266. package/presets/claude/php-hexagonal/commands/spec-start.md +1 -1
  267. package/presets/claude/php-hexagonal/mcp.json +1 -1
  268. package/presets/claude/php-hexagonal/rules/README.md +1 -0
  269. package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +2 -1
  270. package/presets/claude/php-hexagonal/rules/architecture/product-specs-authoring.md +6 -4
  271. package/presets/claude/php-hexagonal/rules/architecture/product-specs.md +8 -4
  272. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  273. package/presets/claude/php-hexagonal/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  274. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +1 -1
  275. package/presets/claude/php-hexagonal/rules/tooling-and-review/mcp-usage.md +98 -0
  276. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  277. package/presets/claude/php-hexagonal/skills/README.md +1 -1
  278. package/presets/claude/php-hexagonal/skills/ci-investigation/SKILL.md +7 -0
  279. package/presets/claude/php-hexagonal/skills/code-review/SKILL.md +7 -0
  280. package/presets/claude/php-hexagonal/skills/debug-investigation/SKILL.md +38 -2
  281. package/presets/claude/php-hexagonal/skills/feature-delivery/SKILL.md +7 -1
  282. package/presets/claude/php-hexagonal/skills/spec-discovery/SKILL.md +58 -0
  283. package/presets/claude/php-hexagonal/team/README.md +8 -0
  284. package/presets/claude/php-hexagonal/team/fixtures/feature-full.json +46 -10
  285. package/presets/claude/php-hexagonal/team/fixtures/memlog.example.md +9 -0
  286. package/presets/claude/php-laravel/MCP.md +21 -0
  287. package/presets/claude/php-laravel/agents/build-verifier.md +6 -0
  288. package/presets/claude/php-laravel/agents/ci-investigator.md +9 -0
  289. package/presets/claude/php-laravel/agents/code-reviewer.md +2 -0
  290. package/presets/claude/php-laravel/agents/debugger.md +15 -0
  291. package/presets/claude/php-laravel/agents/feature-developer.md +30 -0
  292. package/presets/claude/php-laravel/agents/migration-specialist.md +6 -0
  293. package/presets/claude/php-laravel/agents/performance-auditor.md +6 -0
  294. package/presets/claude/php-laravel/agents/solution-architect.md +6 -0
  295. package/presets/claude/php-laravel/agents/task-analyst.md +27 -0
  296. package/presets/claude/php-laravel/agents/task-router.md +20 -0
  297. package/presets/claude/php-laravel/commands/feature-continue.md +11 -40
  298. package/presets/claude/php-laravel/commands/spec-start.md +1 -1
  299. package/presets/claude/php-laravel/mcp.json +1 -1
  300. package/presets/claude/php-laravel/rules/README.md +1 -0
  301. package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +3 -1
  302. package/presets/claude/php-laravel/rules/architecture/product-specs-authoring.md +6 -4
  303. package/presets/claude/php-laravel/rules/architecture/product-specs.md +8 -4
  304. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  305. package/presets/claude/php-laravel/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  306. package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +1 -1
  307. package/presets/claude/php-laravel/rules/tooling-and-review/mcp-usage.md +98 -0
  308. package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  309. package/presets/claude/php-laravel/skills/README.md +1 -1
  310. package/presets/claude/php-laravel/skills/ci-investigation/SKILL.md +7 -0
  311. package/presets/claude/php-laravel/skills/code-review/SKILL.md +7 -0
  312. package/presets/claude/php-laravel/skills/debug-investigation/SKILL.md +38 -2
  313. package/presets/claude/php-laravel/skills/feature-delivery/SKILL.md +7 -1
  314. package/presets/claude/php-laravel/skills/spec-discovery/SKILL.md +58 -0
  315. package/presets/claude/php-laravel/team/README.md +7 -0
  316. package/presets/claude/php-laravel/team/fixtures/feature-full.json +38 -9
  317. package/presets/claude/php-laravel/team/fixtures/memlog.example.md +9 -0
  318. package/presets/claude/svelte/MCP.md +22 -0
  319. package/presets/claude/svelte/agents/accessibility-reviewer.md +8 -0
  320. package/presets/claude/svelte/agents/build-verifier.md +6 -0
  321. package/presets/claude/svelte/agents/ci-investigator.md +9 -0
  322. package/presets/claude/svelte/agents/code-reviewer.md +2 -0
  323. package/presets/claude/svelte/agents/debugger.md +17 -0
  324. package/presets/claude/svelte/agents/feature-developer.md +32 -0
  325. package/presets/claude/svelte/agents/migration-specialist.md +6 -0
  326. package/presets/claude/svelte/agents/performance-auditor.md +8 -0
  327. package/presets/claude/svelte/agents/playwright-test-generator.md +11 -1
  328. package/presets/claude/svelte/agents/playwright-test-healer.md +8 -1
  329. package/presets/claude/svelte/agents/solution-architect.md +6 -0
  330. package/presets/claude/svelte/agents/task-analyst.md +28 -1
  331. package/presets/claude/svelte/agents/task-router.md +20 -0
  332. package/presets/claude/svelte/commands/spec-start.md +1 -1
  333. package/presets/claude/svelte/mcp.json +3 -3
  334. package/presets/claude/svelte/rules/README.md +2 -0
  335. package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +2 -1
  336. package/presets/claude/svelte/rules/architecture/product-specs-authoring.md +6 -4
  337. package/presets/claude/svelte/rules/architecture/product-specs.md +8 -4
  338. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  339. package/presets/claude/svelte/rules/tooling-and-review/anti-sycophancy-discipline.md +1 -1
  340. package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +1 -1
  341. package/presets/claude/svelte/rules/tooling-and-review/mcp-usage.md +101 -0
  342. package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -0
  343. package/presets/claude/svelte/skills/README.md +2 -0
  344. package/presets/claude/svelte/skills/ci-investigation/SKILL.md +8 -0
  345. package/presets/claude/svelte/skills/code-review/SKILL.md +7 -1
  346. package/presets/claude/svelte/skills/debug-investigation/SKILL.md +41 -12
  347. package/presets/claude/svelte/skills/feature-delivery/SKILL.md +9 -1
  348. package/presets/claude/svelte/skills/spec-discovery/SKILL.md +58 -0
  349. package/presets/claude/svelte/team/README.md +11 -0
  350. package/presets/claude/svelte/team/fixtures/feature-full.json +43 -9
  351. package/presets/claude/svelte/team/fixtures/memlog.example.md +9 -0
  352. package/presets/cursor/android-kotlin/MCP.md +20 -1
  353. package/presets/cursor/android-kotlin/agents/accessibility-reviewer.md +6 -0
  354. package/presets/cursor/android-kotlin/agents/build-verifier.md +6 -0
  355. package/presets/cursor/android-kotlin/agents/ci-investigator.md +9 -0
  356. package/presets/cursor/android-kotlin/agents/code-reviewer.md +2 -0
  357. package/presets/cursor/android-kotlin/agents/debugger.md +13 -0
  358. package/presets/cursor/android-kotlin/agents/feature-developer.md +30 -0
  359. package/presets/cursor/android-kotlin/agents/migration-specialist.md +6 -0
  360. package/presets/cursor/android-kotlin/agents/performance-auditor.md +6 -0
  361. package/presets/cursor/android-kotlin/agents/solution-architect.md +6 -0
  362. package/presets/cursor/android-kotlin/agents/task-analyst.md +27 -0
  363. package/presets/cursor/android-kotlin/agents/task-router.md +20 -0
  364. package/presets/cursor/android-kotlin/commands/spec-start.md +1 -1
  365. package/presets/cursor/android-kotlin/mcp.json +1 -1
  366. package/presets/cursor/android-kotlin/rules/README.md +2 -0
  367. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +2 -1
  368. package/presets/cursor/android-kotlin/rules/anti-sycophancy-discipline.mdc +1 -1
  369. package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +1 -1
  370. package/presets/cursor/android-kotlin/rules/feature-delivery-workflow.mdc +3 -1
  371. package/presets/cursor/android-kotlin/rules/mcp-usage.mdc +99 -0
  372. package/presets/cursor/android-kotlin/rules/preset-no-cross-stack-leakage.mdc +3 -1
  373. package/presets/cursor/android-kotlin/rules/product-specs-authoring.mdc +6 -4
  374. package/presets/cursor/android-kotlin/rules/product-specs.mdc +8 -4
  375. package/presets/cursor/android-kotlin/skills/README.md +2 -0
  376. package/presets/cursor/android-kotlin/skills/ci-investigation/SKILL.md +8 -0
  377. package/presets/cursor/android-kotlin/skills/code-review/SKILL.md +6 -0
  378. package/presets/cursor/android-kotlin/skills/debug-investigation/SKILL.md +40 -4
  379. package/presets/cursor/android-kotlin/skills/feature-delivery/SKILL.md +6 -0
  380. package/presets/cursor/android-kotlin/skills/spec-discovery/SKILL.md +58 -0
  381. package/presets/cursor/android-kotlin/team/README.md +8 -0
  382. package/presets/cursor/android-kotlin/team/fixtures/feature-full.json +1 -0
  383. package/presets/cursor/android-kotlin/team/fixtures/memlog.example.md +9 -0
  384. package/presets/cursor/go/MCP.md +22 -1
  385. package/presets/cursor/go/agents/build-verifier.md +6 -0
  386. package/presets/cursor/go/agents/ci-investigator.md +9 -0
  387. package/presets/cursor/go/agents/code-reviewer.md +2 -0
  388. package/presets/cursor/go/agents/debugger.md +15 -0
  389. package/presets/cursor/go/agents/feature-developer.md +30 -0
  390. package/presets/cursor/go/agents/migration-specialist.md +6 -0
  391. package/presets/cursor/go/agents/performance-auditor.md +6 -0
  392. package/presets/cursor/go/agents/solution-architect.md +6 -0
  393. package/presets/cursor/go/agents/task-analyst.md +27 -0
  394. package/presets/cursor/go/agents/task-router.md +20 -0
  395. package/presets/cursor/go/commands/spec-start.md +1 -1
  396. package/presets/cursor/go/mcp.json +1 -1
  397. package/presets/cursor/go/rules/README.md +2 -1
  398. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +1 -0
  399. package/presets/cursor/go/rules/anti-sycophancy-discipline.mdc +1 -1
  400. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +1 -1
  401. package/presets/cursor/go/rules/feature-delivery-workflow.mdc +2 -1
  402. package/presets/cursor/go/rules/mcp-usage.mdc +98 -0
  403. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +1 -0
  404. package/presets/cursor/go/rules/product-specs-authoring.mdc +6 -4
  405. package/presets/cursor/go/rules/product-specs.mdc +8 -4
  406. package/presets/cursor/go/skills/README.md +1 -1
  407. package/presets/cursor/go/skills/ci-investigation/SKILL.md +7 -0
  408. package/presets/cursor/go/skills/code-review/SKILL.md +7 -0
  409. package/presets/cursor/go/skills/debug-investigation/SKILL.md +38 -2
  410. package/presets/cursor/go/skills/feature-delivery/SKILL.md +7 -1
  411. package/presets/cursor/go/skills/spec-discovery/SKILL.md +58 -0
  412. package/presets/cursor/go/team/README.md +8 -0
  413. package/presets/cursor/go/team/fixtures/feature-full.json +46 -10
  414. package/presets/cursor/go/team/fixtures/memlog.example.md +9 -0
  415. package/presets/cursor/ios-swift/MCP.md +20 -1
  416. package/presets/cursor/ios-swift/agents/accessibility-reviewer.md +7 -10
  417. package/presets/cursor/ios-swift/agents/api-contract-reviewer.md +2 -11
  418. package/presets/cursor/ios-swift/agents/build-verifier.md +6 -0
  419. package/presets/cursor/ios-swift/agents/ci-investigator.md +11 -11
  420. package/presets/cursor/ios-swift/agents/code-reviewer.md +2 -0
  421. package/presets/cursor/ios-swift/agents/debugger.md +15 -11
  422. package/presets/cursor/ios-swift/agents/feature-developer.md +30 -0
  423. package/presets/cursor/ios-swift/agents/migration-specialist.md +8 -11
  424. package/presets/cursor/ios-swift/agents/performance-auditor.md +8 -11
  425. package/presets/cursor/ios-swift/agents/qa-tester.md +2 -11
  426. package/presets/cursor/ios-swift/agents/security-reviewer.md +2 -11
  427. package/presets/cursor/ios-swift/agents/solution-architect.md +6 -0
  428. package/presets/cursor/ios-swift/agents/task-analyst.md +27 -0
  429. package/presets/cursor/ios-swift/agents/task-router.md +20 -0
  430. package/presets/cursor/ios-swift/agents/unit-test-generator.md +2 -11
  431. package/presets/cursor/ios-swift/agents/unit-test-healer.md +2 -11
  432. package/presets/cursor/ios-swift/agents/unit-test-planner.md +2 -11
  433. package/presets/cursor/ios-swift/agents/xcuitest-test-generator.md +1 -11
  434. package/presets/cursor/ios-swift/agents/xcuitest-test-healer.md +1 -11
  435. package/presets/cursor/ios-swift/agents/xcuitest-test-planner.md +1 -13
  436. package/presets/cursor/ios-swift/commands/spec-start.md +1 -1
  437. package/presets/cursor/ios-swift/mcp.json +1 -1
  438. package/presets/cursor/ios-swift/rules/README.md +2 -0
  439. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +2 -1
  440. package/presets/cursor/ios-swift/rules/anti-sycophancy-discipline.mdc +1 -1
  441. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +1 -1
  442. package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +2 -1
  443. package/presets/cursor/ios-swift/rules/mcp-usage.mdc +99 -0
  444. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +1 -0
  445. package/presets/cursor/ios-swift/rules/product-specs-authoring.mdc +6 -4
  446. package/presets/cursor/ios-swift/rules/product-specs.mdc +8 -4
  447. package/presets/cursor/ios-swift/skills/README.md +2 -0
  448. package/presets/cursor/ios-swift/skills/ci-investigation/SKILL.md +8 -0
  449. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +7 -1
  450. package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +41 -5
  451. package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +7 -1
  452. package/presets/cursor/ios-swift/skills/spec-discovery/SKILL.md +58 -0
  453. package/presets/cursor/ios-swift/team/README.md +8 -0
  454. package/presets/cursor/ios-swift/team/fixtures/feature-full.json +39 -9
  455. package/presets/cursor/ios-swift/team/fixtures/memlog.example.md +9 -0
  456. package/presets/cursor/java/AGENTS.md +1 -1
  457. package/presets/cursor/java/MCP.md +20 -1
  458. package/presets/cursor/java/agents/build-verifier.md +6 -0
  459. package/presets/cursor/java/agents/ci-investigator.md +9 -0
  460. package/presets/cursor/java/agents/code-reviewer.md +2 -0
  461. package/presets/cursor/java/agents/debugger.md +15 -0
  462. package/presets/cursor/java/agents/feature-developer.md +30 -0
  463. package/presets/cursor/java/agents/migration-specialist.md +6 -0
  464. package/presets/cursor/java/agents/performance-auditor.md +6 -0
  465. package/presets/cursor/java/agents/solution-architect.md +6 -0
  466. package/presets/cursor/java/agents/task-analyst.md +27 -0
  467. package/presets/cursor/java/agents/task-router.md +20 -0
  468. package/presets/cursor/java/commands/spec-start.md +1 -1
  469. package/presets/cursor/java/mcp.json +1 -1
  470. package/presets/cursor/java/rules/README.md +2 -1
  471. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +1 -0
  472. package/presets/cursor/java/rules/anti-sycophancy-discipline.mdc +1 -1
  473. package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +1 -1
  474. package/presets/cursor/java/rules/feature-delivery-workflow.mdc +2 -1
  475. package/presets/cursor/java/rules/mcp-usage.mdc +97 -0
  476. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +1 -0
  477. package/presets/cursor/java/rules/product-specs-authoring.mdc +6 -4
  478. package/presets/cursor/java/rules/product-specs.mdc +8 -4
  479. package/presets/cursor/java/skills/README.md +1 -1
  480. package/presets/cursor/java/skills/ci-investigation/SKILL.md +7 -0
  481. package/presets/cursor/java/skills/code-review/SKILL.md +7 -0
  482. package/presets/cursor/java/skills/debug-investigation/SKILL.md +38 -2
  483. package/presets/cursor/java/skills/feature-delivery/SKILL.md +7 -1
  484. package/presets/cursor/java/skills/spec-discovery/SKILL.md +58 -0
  485. package/presets/cursor/java/team/README.md +8 -0
  486. package/presets/cursor/java/team/fixtures/feature-full.json +46 -10
  487. package/presets/cursor/java/team/fixtures/memlog.example.md +9 -0
  488. package/presets/cursor/mcp-ts/MCP.md +20 -1
  489. package/presets/cursor/mcp-ts/agents/build-verifier.md +6 -0
  490. package/presets/cursor/mcp-ts/agents/feature-developer.md +30 -0
  491. package/presets/cursor/mcp-ts/agents/solution-architect.md +5 -0
  492. package/presets/cursor/mcp-ts/agents/task-analyst.md +27 -0
  493. package/presets/cursor/mcp-ts/agents/task-router.md +20 -0
  494. package/presets/cursor/mcp-ts/commands/spec-start.md +1 -1
  495. package/presets/cursor/mcp-ts/mcp.json +1 -1
  496. package/presets/cursor/mcp-ts/rules/README.md +3 -2
  497. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +1 -0
  498. package/presets/cursor/mcp-ts/rules/anti-sycophancy-discipline.mdc +1 -1
  499. package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +1 -1
  500. package/presets/cursor/mcp-ts/rules/feature-delivery-workflow.mdc +2 -1
  501. package/presets/cursor/mcp-ts/rules/mcp-usage.mdc +98 -0
  502. package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +1 -0
  503. package/presets/cursor/mcp-ts/rules/product-specs-authoring.mdc +6 -4
  504. package/presets/cursor/mcp-ts/rules/product-specs.mdc +8 -4
  505. package/presets/cursor/mcp-ts/skills/README.md +2 -0
  506. package/presets/cursor/mcp-ts/skills/code-review/SKILL.md +7 -0
  507. package/presets/cursor/mcp-ts/skills/debug-investigation/SKILL.md +36 -1
  508. package/presets/cursor/mcp-ts/skills/feature-delivery/SKILL.md +7 -1
  509. package/presets/cursor/mcp-ts/skills/spec-discovery/SKILL.md +58 -0
  510. package/presets/cursor/mcp-ts/team/README.md +7 -0
  511. package/presets/cursor/mcp-ts/team/fixtures/feature-full.json +5 -2
  512. package/presets/cursor/mcp-ts/team/fixtures/memlog.example.md +9 -0
  513. package/presets/cursor/next/MCP.md +21 -1
  514. package/presets/cursor/next/agents/accessibility-reviewer.md +8 -0
  515. package/presets/cursor/next/agents/build-verifier.md +6 -0
  516. package/presets/cursor/next/agents/ci-investigator.md +9 -0
  517. package/presets/cursor/next/agents/code-reviewer.md +2 -0
  518. package/presets/cursor/next/agents/debugger.md +17 -0
  519. package/presets/cursor/next/agents/feature-developer.md +32 -0
  520. package/presets/cursor/next/agents/migration-specialist.md +6 -0
  521. package/presets/cursor/next/agents/performance-auditor.md +8 -0
  522. package/presets/cursor/next/agents/playwright-test-generator.md +9 -1
  523. package/presets/cursor/next/agents/playwright-test-healer.md +9 -1
  524. package/presets/cursor/next/agents/playwright-test-planner.md +1 -1
  525. package/presets/cursor/next/agents/solution-architect.md +6 -0
  526. package/presets/cursor/next/agents/task-analyst.md +28 -1
  527. package/presets/cursor/next/agents/task-router.md +20 -0
  528. package/presets/cursor/next/commands/spec-start.md +1 -1
  529. package/presets/cursor/next/mcp.json +3 -3
  530. package/presets/cursor/next/rules/README.md +3 -2
  531. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +2 -1
  532. package/presets/cursor/next/rules/anti-sycophancy-discipline.mdc +1 -1
  533. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +1 -1
  534. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +2 -1
  535. package/presets/cursor/next/rules/mcp-usage.mdc +100 -0
  536. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +1 -0
  537. package/presets/cursor/next/rules/product-specs-authoring.mdc +6 -4
  538. package/presets/cursor/next/rules/product-specs.mdc +8 -4
  539. package/presets/cursor/next/rules/tests-unit.mdc +5 -0
  540. package/presets/cursor/next/skills/README.md +2 -0
  541. package/presets/cursor/next/skills/ci-investigation/SKILL.md +8 -0
  542. package/presets/cursor/next/skills/code-review/SKILL.md +7 -1
  543. package/presets/cursor/next/skills/debug-investigation/SKILL.md +39 -12
  544. package/presets/cursor/next/skills/feature-delivery/SKILL.md +9 -1
  545. package/presets/cursor/next/skills/spec-discovery/SKILL.md +58 -0
  546. package/presets/cursor/next/team/README.md +11 -0
  547. package/presets/cursor/next/team/fixtures/feature-full.json +1 -0
  548. package/presets/cursor/next/team/fixtures/memlog.example.md +9 -0
  549. package/presets/cursor/nuxt/MCP.md +21 -1
  550. package/presets/cursor/nuxt/agents/accessibility-reviewer.md +8 -0
  551. package/presets/cursor/nuxt/agents/build-verifier.md +6 -0
  552. package/presets/cursor/nuxt/agents/ci-investigator.md +9 -0
  553. package/presets/cursor/nuxt/agents/code-reviewer.md +2 -0
  554. package/presets/cursor/nuxt/agents/debugger.md +17 -0
  555. package/presets/cursor/nuxt/agents/feature-developer.md +32 -0
  556. package/presets/cursor/nuxt/agents/migration-specialist.md +6 -0
  557. package/presets/cursor/nuxt/agents/performance-auditor.md +8 -0
  558. package/presets/cursor/nuxt/agents/playwright-test-generator.md +9 -1
  559. package/presets/cursor/nuxt/agents/playwright-test-healer.md +9 -1
  560. package/presets/cursor/nuxt/agents/playwright-test-planner.md +1 -1
  561. package/presets/cursor/nuxt/agents/solution-architect.md +6 -0
  562. package/presets/cursor/nuxt/agents/task-analyst.md +28 -1
  563. package/presets/cursor/nuxt/agents/task-router.md +20 -0
  564. package/presets/cursor/nuxt/commands/spec-start.md +1 -1
  565. package/presets/cursor/nuxt/mcp.json +3 -3
  566. package/presets/cursor/nuxt/rules/README.md +2 -1
  567. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +2 -1
  568. package/presets/cursor/nuxt/rules/anti-sycophancy-discipline.mdc +1 -1
  569. package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +1 -1
  570. package/presets/cursor/nuxt/rules/feature-delivery-workflow.mdc +2 -1
  571. package/presets/cursor/nuxt/rules/mcp-usage.mdc +100 -0
  572. package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +1 -0
  573. package/presets/cursor/nuxt/rules/product-specs-authoring.mdc +6 -4
  574. package/presets/cursor/nuxt/rules/product-specs.mdc +8 -4
  575. package/presets/cursor/nuxt/skills/README.md +2 -0
  576. package/presets/cursor/nuxt/skills/ci-investigation/SKILL.md +8 -0
  577. package/presets/cursor/nuxt/skills/code-review/SKILL.md +7 -1
  578. package/presets/cursor/nuxt/skills/debug-investigation/SKILL.md +41 -12
  579. package/presets/cursor/nuxt/skills/feature-delivery/SKILL.md +9 -1
  580. package/presets/cursor/nuxt/skills/spec-discovery/SKILL.md +58 -0
  581. package/presets/cursor/nuxt/team/README.md +11 -0
  582. package/presets/cursor/nuxt/team/fixtures/feature-full.json +43 -9
  583. package/presets/cursor/nuxt/team/fixtures/memlog.example.md +9 -0
  584. package/presets/cursor/php-hexagonal/AGENTS.md +1 -1
  585. package/presets/cursor/php-hexagonal/MCP.md +20 -1
  586. package/presets/cursor/php-hexagonal/agents/build-verifier.md +6 -0
  587. package/presets/cursor/php-hexagonal/agents/ci-investigator.md +9 -0
  588. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +2 -0
  589. package/presets/cursor/php-hexagonal/agents/debugger.md +15 -0
  590. package/presets/cursor/php-hexagonal/agents/feature-developer.md +30 -0
  591. package/presets/cursor/php-hexagonal/agents/migration-specialist.md +6 -0
  592. package/presets/cursor/php-hexagonal/agents/performance-auditor.md +6 -0
  593. package/presets/cursor/php-hexagonal/agents/solution-architect.md +6 -0
  594. package/presets/cursor/php-hexagonal/agents/task-analyst.md +27 -0
  595. package/presets/cursor/php-hexagonal/agents/task-router.md +20 -0
  596. package/presets/cursor/php-hexagonal/commands/spec-start.md +1 -1
  597. package/presets/cursor/php-hexagonal/mcp.json +1 -1
  598. package/presets/cursor/php-hexagonal/rules/README.md +2 -1
  599. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +1 -0
  600. package/presets/cursor/php-hexagonal/rules/anti-sycophancy-discipline.mdc +1 -1
  601. package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +1 -1
  602. package/presets/cursor/php-hexagonal/rules/feature-delivery-workflow.mdc +2 -1
  603. package/presets/cursor/php-hexagonal/rules/mcp-usage.mdc +97 -0
  604. package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +1 -0
  605. package/presets/cursor/php-hexagonal/rules/product-specs-authoring.mdc +6 -4
  606. package/presets/cursor/php-hexagonal/rules/product-specs.mdc +8 -4
  607. package/presets/cursor/php-hexagonal/skills/README.md +1 -1
  608. package/presets/cursor/php-hexagonal/skills/ci-investigation/SKILL.md +7 -0
  609. package/presets/cursor/php-hexagonal/skills/code-review/SKILL.md +7 -0
  610. package/presets/cursor/php-hexagonal/skills/debug-investigation/SKILL.md +38 -2
  611. package/presets/cursor/php-hexagonal/skills/feature-delivery/SKILL.md +7 -1
  612. package/presets/cursor/php-hexagonal/skills/spec-discovery/SKILL.md +58 -0
  613. package/presets/cursor/php-hexagonal/team/README.md +8 -0
  614. package/presets/cursor/php-hexagonal/team/fixtures/feature-full.json +46 -10
  615. package/presets/cursor/php-hexagonal/team/fixtures/memlog.example.md +9 -0
  616. package/presets/cursor/php-laravel/AGENTS.md +1 -1
  617. package/presets/cursor/php-laravel/MCP.md +21 -0
  618. package/presets/cursor/php-laravel/agents/build-verifier.md +6 -0
  619. package/presets/cursor/php-laravel/agents/ci-investigator.md +9 -0
  620. package/presets/cursor/php-laravel/agents/code-reviewer.md +2 -0
  621. package/presets/cursor/php-laravel/agents/debugger.md +15 -0
  622. package/presets/cursor/php-laravel/agents/feature-developer.md +30 -0
  623. package/presets/cursor/php-laravel/agents/migration-specialist.md +6 -0
  624. package/presets/cursor/php-laravel/agents/performance-auditor.md +6 -0
  625. package/presets/cursor/php-laravel/agents/solution-architect.md +6 -0
  626. package/presets/cursor/php-laravel/agents/task-analyst.md +27 -0
  627. package/presets/cursor/php-laravel/agents/task-router.md +20 -0
  628. package/presets/cursor/php-laravel/commands/spec-start.md +1 -1
  629. package/presets/cursor/php-laravel/mcp.json +1 -1
  630. package/presets/cursor/php-laravel/rules/README.md +2 -1
  631. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +1 -0
  632. package/presets/cursor/php-laravel/rules/anti-sycophancy-discipline.mdc +1 -1
  633. package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +1 -1
  634. package/presets/cursor/php-laravel/rules/feature-delivery-workflow.mdc +2 -1
  635. package/presets/cursor/php-laravel/rules/mcp-usage.mdc +97 -0
  636. package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +1 -0
  637. package/presets/cursor/php-laravel/rules/product-specs-authoring.mdc +6 -4
  638. package/presets/cursor/php-laravel/rules/product-specs.mdc +8 -4
  639. package/presets/cursor/php-laravel/skills/README.md +1 -1
  640. package/presets/cursor/php-laravel/skills/ci-investigation/SKILL.md +7 -0
  641. package/presets/cursor/php-laravel/skills/code-review/SKILL.md +7 -0
  642. package/presets/cursor/php-laravel/skills/debug-investigation/SKILL.md +38 -2
  643. package/presets/cursor/php-laravel/skills/feature-delivery/SKILL.md +7 -1
  644. package/presets/cursor/php-laravel/skills/spec-discovery/SKILL.md +58 -0
  645. package/presets/cursor/php-laravel/team/README.md +7 -0
  646. package/presets/cursor/php-laravel/team/fixtures/feature-full.json +38 -9
  647. package/presets/cursor/php-laravel/team/fixtures/memlog.example.md +9 -0
  648. package/presets/cursor/svelte/MCP.md +21 -1
  649. package/presets/cursor/svelte/agents/accessibility-reviewer.md +8 -0
  650. package/presets/cursor/svelte/agents/build-verifier.md +6 -0
  651. package/presets/cursor/svelte/agents/ci-investigator.md +9 -0
  652. package/presets/cursor/svelte/agents/code-reviewer.md +2 -0
  653. package/presets/cursor/svelte/agents/debugger.md +17 -0
  654. package/presets/cursor/svelte/agents/feature-developer.md +32 -0
  655. package/presets/cursor/svelte/agents/migration-specialist.md +6 -0
  656. package/presets/cursor/svelte/agents/performance-auditor.md +8 -0
  657. package/presets/cursor/svelte/agents/playwright-test-generator.md +9 -1
  658. package/presets/cursor/svelte/agents/playwright-test-healer.md +9 -1
  659. package/presets/cursor/svelte/agents/playwright-test-planner.md +1 -1
  660. package/presets/cursor/svelte/agents/solution-architect.md +6 -0
  661. package/presets/cursor/svelte/agents/task-analyst.md +28 -1
  662. package/presets/cursor/svelte/agents/task-router.md +20 -0
  663. package/presets/cursor/svelte/commands/spec-start.md +1 -1
  664. package/presets/cursor/svelte/mcp.json +3 -3
  665. package/presets/cursor/svelte/rules/README.md +2 -1
  666. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +2 -1
  667. package/presets/cursor/svelte/rules/anti-sycophancy-discipline.mdc +1 -1
  668. package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +1 -1
  669. package/presets/cursor/svelte/rules/feature-delivery-workflow.mdc +2 -1
  670. package/presets/cursor/svelte/rules/mcp-usage.mdc +100 -0
  671. package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +1 -0
  672. package/presets/cursor/svelte/rules/product-specs-authoring.mdc +6 -4
  673. package/presets/cursor/svelte/rules/product-specs.mdc +8 -4
  674. package/presets/cursor/svelte/skills/README.md +2 -0
  675. package/presets/cursor/svelte/skills/ci-investigation/SKILL.md +8 -0
  676. package/presets/cursor/svelte/skills/code-review/SKILL.md +7 -1
  677. package/presets/cursor/svelte/skills/debug-investigation/SKILL.md +41 -12
  678. package/presets/cursor/svelte/skills/feature-delivery/SKILL.md +9 -1
  679. package/presets/cursor/svelte/skills/spec-discovery/SKILL.md +58 -0
  680. package/presets/cursor/svelte/team/README.md +11 -0
  681. package/presets/cursor/svelte/team/fixtures/feature-full.json +43 -9
  682. package/presets/cursor/svelte/team/fixtures/memlog.example.md +9 -0
  683. package/scripts/aggregate-agent-task-metrics.mjs +212 -0
  684. package/scripts/check-hook-only-lifecycle.sh +46 -0
  685. package/scripts/check-preset-i18n.sh +61 -0
  686. package/scripts/check-preset-leakage.sh +450 -0
  687. package/scripts/check-preset-structure.sh +70 -0
  688. package/scripts/check-preset-token-budget.sh +139 -0
  689. package/scripts/check-preset-twin-map.sh +122 -0
  690. package/scripts/check-product-specs.sh +90 -0
  691. package/scripts/check-rule-eval.mjs +149 -0
  692. package/scripts/check-shared-core-drift.sh +154 -0
  693. package/scripts/close-agent-task-human-gate.mjs +61 -0
  694. package/scripts/sync-dogfood-cursor.sh +70 -0
  695. package/scripts/sync-shared-core-embeds.sh +114 -0
  696. package/scripts/test-agent-task-metrics-hooks.mjs +895 -0
  697. package/scripts/test-cli-mcp-merge.mjs +137 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,65 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ### Superpowers B1–B5 (all installable stacks)
6
+
7
+ - All 10 stacks (Cursor + Claude): **verification-before-completion** lineage snippet on `build-verifier` / `feature-developer` only. `debugger` keeps inline 3-fix + `fixApplied` re-run (skill cross-ref) — not the verification stem. **receiving-code-review** embed on `code-review` skill; implementer one-liner on `feature-developer`, `debugger`, and `ci-investigator` (where those agents exist). Debug skill 4-phase + 3-fix architecture gate; task-analyst/router classify spike / bounded / architectural onto **existing** pipeline profiles.
8
+ - Drift CI: `quality/debug-investigation.md` is **embed** (skill body = core + `## Stack notes`). `verification-before-completion`, `receiving-code-review`, and `task-classification` are **lineage** (section snippets in fat agents — whole-file embed would fail). `mcp-ts` has no `debugger` / `code-reviewer` / `ci-investigator` agents; B1/B2 via skill + `feature-developer` (+ `build-verifier` for B1); B3 via `debug-investigation` skill; B4 on task-analyst/router.
9
+ - Skill-authoring craft (SDO, positive recipes, ~500-line cap) lives in `docs/PRESET-CONTRIBUTION.md` (not installed by `init`).
10
+ - No 4th always-on rule; `anti-sycophancy-discipline` core body unchanged (promote receiving-CR there in a later 10-stack PR).
11
+ - Consumers: re-run `npx @bonesofspring/ai-rules init cursor|claude --preset <stack>` after publish.
12
+
13
+ Grouping for the next npm cut: **(A)** post-`0.2.18` delta — MCP merge, spec P0/P1, hook-only lifecycle, and the review follow-up below; **(B)** sections after MCP (UX, mockup reviewer, product-specs, android-kotlin, nuxt/svelte/php-laravel, …) were already Unreleased **on the `v0.2.18` tag** and were never versioned.
14
+
15
+ ### Follow-up: Superpowers B1–B5 review alignment
16
+
17
+ - CHANGELOG/SoT match PRESET-CONTRIBUTION: verification lineage is `build-verifier` + `feature-developer`; debugger 3-fix stays inline (no verification marker).
18
+ - receiving-CR implementer one-liner extended to `debugger` and `ci-investigator` (9 stacks × 2; mcp-ts has neither).
19
+ - Backend `debugger` agents (`go` / `java` / `php-hexagonal` / `php-laravel`, Cursor + Claude) now load `debug-investigation` at the top, matching UI/mobile.
20
+
21
+ ### Follow-up: review fixes (lifecycle, MCP merge, docs)
22
+
23
+ - Hook-only lifecycle sweep: 22 ios-swift agents, 8 next/nuxt/svelte/ios `code-review` skills, 5 Claude `feature-continue` commands, Claude Playwright generators, and backend `code-review` skills upsert `artifact-manifest.json` receipts and must not mutate `status.json`. New hard gate `check:hook-only-lifecycle` (wired into `check:preset-structure`).
24
+ - CLI `init` MCP merge: nested `env` / `headers` on shipped keys are preserved; invalid / JSONC / non-object files get a timestamped `*.bak.<iso>` then preset replace; `mcpServers` as an array is backed up and merged as empty extras. Tests cover those paths.
25
+ - Shipped MCP packages pinned: Context7 `@upstash/context7-mcp@4.0.2`, Playwright `@playwright/mcp@0.0.79`, Chrome DevTools `chrome-devtools-mcp@1.7.0` (no `@latest`).
26
+ - `mcp-usage`: Figma policy is stack-class-specific (UI Stack notes: only `mockup-reviewer` for mockup review). Overlay matching prefers documented aliases / `plugin-*` over substring guessing. Cursor adapters are requestable (no source-tree `globs`); Claude keeps `paths:` so the stem is not a 4th session-start rule.
27
+ - Docs: applyReadiness is YAML on `implementation.md` and a JSON-shaped object on the analyst receipt; Claude rules README twin FAIL list is all 10 stacks; backend AGENTS/CLAUDE inventories list 10 skills including `spec-authoring` / `spec-discovery`. Package README documents JSONC backup and non-sticky shipped-server deletes.
28
+
29
+ ### Follow-up: hook-only lifecycle + stack-neutral discovery examples
30
+
31
+ - **`debug-investigation`** (next / nuxt / svelte / ios-swift, Cursor + Claude) upserts the owned `artifact-manifest.json` receipt; it must not mutate `status.json`. Cursor **`playwright-test-*`** (planner/generator/healer) and iOS **`xcuitest-test-*`** use the same receipt pattern.
32
+ - **`spec-discovery`** claim-ledger example is stack-neutral (no `app/src/ui/Cart.tsx`). Backend / mobile **`memlog.example.md`** fixtures no longer cite Next `CartEmpty.tsx`.
33
+ - Next **`tests-unit`** Incorrect/Correct pair includes a fenced Correct example (`yarn check:rule-eval`).
34
+
35
+ ### Spec workflow P1 capabilities
36
+
37
+ - **`specMode`** (`consume` | `generate` | `none`) on `brief.md` / optional `pipeline.json`. Spike/research uses `none` — no dummy INDEX row.
38
+ - **`applyReadiness`:** YAML frontmatter on developer `implementation.md`; JSON-shaped `{ state: blocked|ready|all_done, contextFiles[] }` on the analyst receipt (analyst may emit `blocked` before the authoring gate).
39
+ - Requestable skill **`spec-discovery`** (11 methods, mandatory claim ledger). Analyst loads it only for research-before-spec — not default `/task` consume. Cursor + Claude ×10 stacks.
40
+ - **Memlog** `.cursor/team/tasks/<slug>/.memlog.md` (Claude: `.claude/…`) — append-only agent notes; hook does not parse it.
41
+ - **Code Map** (3–8 annotated paths) + **Suggested Review Order** when a WP spans more than one layer.
42
+ - Skills README catalogs include **`spec-authoring`** (was missing beside `spec-discovery`). Claude nuxt `task-router` writes `.claude/team` (not `.cursor/team`).
43
+ - Consumers: re-run `npx @bonesofspring/ai-rules init cursor|claude --preset <stack>` after publish.
44
+
45
+ ### Spec workflow P0 hygiene
46
+
47
+ - Router intent **`spec-gen`** now has a default human gate `["after:task-analyst"]` on every stack `task-router` (hook will stop author drafts before `feature-developer`).
48
+ - Orchestrator **Entry points** lists **`/spec-start`** (intent `spec-gen` → analyst author mode → human gate) across Cursor + Claude twins.
49
+ - `feature-delivery` and `debug-investigation` skills, Cursor `playwright-test-*` (planner/generator/healer), and iOS `xcuitest-test-*` no longer tell agents to write `status.json`; the orchestration hook is the single lifecycle writer (receipts stay on `artifact-manifest.json`).
50
+ - Embed drift check includes `architecture/product-specs-authoring.md` (same mode as `product-specs`).
51
+ - npm tarball now ships `scripts/` so consumers can run `check-product-specs.sh` (and the other structure/drift checkers) from the package. The checker is bash INDEX/frontmatter/heading validation — it does **not** evaluate `frontmatter-v1.schema.json`. The schema’s hosted `$id` (404) was removed; `$comment` documents that split.
52
+ - Consumers: re-run `npx @bonesofspring/ai-rules init cursor|claude --preset <stack>` after publish to pick up Entry points / router / skill wording.
53
+
54
+ ### MCP usage protocol + `mcp.json` merge
55
+
56
+ - New requestable shared-core stem **`mcp-usage`** (Cursor + Claude twins ×10 stacks). Runtime catalog is SoT. **Context7** (already shipped): query installed-major docs when lockfile + sibling files are not enough; cap ≤3 queries; degrade to `// VERIFY` if down — do not block.
57
+ - **Chrome DevTools** (already shipped on next/nuxt/svelte): wired for `debugger` / `performance-auditor` against a running app. Playwright MCP stays the e2e path. Not interchangeable.
58
+ - **Local overlay** (not shipped): Storybook (`user-storybook` / `@storybook/addon-mcp`), Sentry/Datadog, Linear/Jira/Notion, optional GitHub MCP. Use only when the server is ready **and** the task fits. Ticket MCP is read-only; task-folder artifacts remain SoT. No new pipeline agents.
59
+ - `anti-sycophancy-discipline` rule 1 and always-on `code-quality` essentials point at Context7 via `mcp-usage`.
60
+ - CLI **`init` merges `mcpServers`**: extra local servers are kept; shipped keys update; nested `env` / `headers` on shipped keys are preserved unless the preset defines them. Invalid / JSONC / non-object JSON is copied to a timestamped `*.bak.<iso>` and replaced with the preset (extras are not merged on that path). Deleting a shipped server is not sticky across re-init. Help + package README updated.
61
+ - Leakage: `storybook-reviewer` forbidden as an agent stem on backend/mobile; Storybook/Chrome DevTools must not be required handoffs there.
62
+ - Consumers: re-run `npx @bonesofspring/ai-rules init cursor|claude --preset <stack>` after publish. Overlay servers in project `mcp.json` survive re-init **when the existing file is valid JSON**.
63
+
5
64
  ### UX design skill (UI stacks)
6
65
 
7
66
  - New requestable skill/rule **`ux-design`** on **`next`**, **`nuxt`**, **`svelte`**, **`ios-swift`**, **`android-kotlin`** (Cursor + Claude twins). Shared-core checklist: `presets/_shared/core/review/ux-design.md`. Invoked by **`task-analyst`** — **no** `ux-designer` agent, **no** FAIL-only hook, **no** Figma MCP in the skill/rule.
package/README.md CHANGED
@@ -13,7 +13,7 @@ npx @bonesofspring/ai-rules clean cursor
13
13
 
14
14
  Global: `npm i -g @bonesofspring/ai-rules`, then `ai-rules ...`.
15
15
 
16
- `init` merges into the **current working directory** (or `--cwd <dir>`): dirs are created, matching files are **overwritten**. `--preset` defaults to **`next`**. Supported forms:
16
+ `init` merges into the **current working directory** (or `--cwd <dir>`): dirs are created, matching files are **overwritten**, except **`mcp.json` / `.mcp.json`** where `mcpServers` is **merged** (extra local servers are kept; shipped keys update; nested `env` / `headers` on shipped keys are preserved unless the preset defines them). `--preset` defaults to **`next`**. Supported forms:
17
17
 
18
18
  ```bash
19
19
  npx @bonesofspring/ai-rules init cursor --preset next
@@ -24,6 +24,8 @@ npx @bonesofspring/ai-rules cursor init --preset next
24
24
 
25
25
  If `.cursor` does not appear, check the command output for errors and confirm you run init from the **target project root** (where the app lives), not from `node_modules`. Success ends with: `Done. .cursor installed at <absolute-path>`.
26
26
 
27
+ **`mcp.json` troubleshooting:** extra overlay servers survive re-init only when the existing file is **valid JSON**. JSONC / trailing commas / a non-object file is copied to a timestamped `mcp.json.bak.<iso>` (or `.mcp.json.bak.<iso>`) and **replaced with the preset** — extras are not merged on that path. Nested `env` / `headers` on shipped server names are kept when the file is valid. Deleting a shipped server (Playwright, Chrome DevTools, Context7, Figma) is **not sticky**: the next `init` restores it.
28
+
27
29
  ### `clean` (breaking vs older wipe behavior)
28
30
 
29
31
  `clean cursor` / `clean claude` removes **only CLI-managed paths** — not the entire `.cursor/` or `.claude/` tree:
@@ -47,7 +49,7 @@ Where things go on `init`:
47
49
  | hooks cookbook | `.cursor/hooks/examples/` (not in default `hooks.json`) | `.claude/hooks/examples/` |
48
50
  | skills | `.cursor/skills` | `.claude/skills` |
49
51
  | team artifacts template | `.cursor/team` (incl. `conventions.md`) | `.claude/team` |
50
- | MCP | `mcp.json` → `.cursor/mcp.json`, `MCP.md` → `.cursor/` | `mcp.json` → **`.mcp.json`** (project root), `MCP.md` → `.claude/` |
52
+ | MCP | `mcp.json` → `.cursor/mcp.json` (**merge** `mcpServers`), `MCP.md` → `.cursor/` | `mcp.json` → **`.mcp.json`** (project root, **merge** `mcpServers`), `MCP.md` → `.claude/` |
51
53
  | tool map | `AGENTS.md` → `.cursor/AGENTS.md`, `BUGBOT.md` | `CLAUDE.md` → `.claude/CLAUDE.md` |
52
54
  | **repo-root agents** | `REPO_AGENTS.md` → **`<cwd>/AGENTS.md`** | same |
53
55
  | **docs/specs seed** | When `<cwd>/docs/specs/` is **absent**, copy INDEX stub + `_templates/*` from `presets/_shared/assets/docs-specs/` (never overwrite existing INDEX) | same |
@@ -101,7 +103,7 @@ Presets are developed in this monorepo under `presets/`. If you add or change ru
101
103
 
102
104
  - **Taxonomy & layers:** [`presets/_shared/README.md`](presets/_shared/README.md) — shared core (`_shared/core`), stack adapters, platform packaging (includes requestable embed stem `architecture/product-specs` for consumer `docs/specs` INDEX discovery)
103
105
  - **Contribution guide:** [`docs/PRESET-CONTRIBUTION.md`](docs/PRESET-CONTRIBUTION.md) — SoT, twin sync, embed vs lineage, token budget (≤3 always-on), PR checklist, new stack preset, platform-only files (`BUGBOT.md`, `CLAUDE.md`)
104
- - **Dogfood / drift scripts:** [`scripts/sync-dogfood-cursor.sh`](scripts/sync-dogfood-cursor.sh) (also syncs root `AGENTS.md` from `REPO_AGENTS.md`; seeds `team/conventions.md` if absent), [`scripts/check-shared-core-drift.sh`](scripts/check-shared-core-drift.sh)
106
+ - **Dogfood / drift scripts:** [`scripts/sync-dogfood-cursor.sh`](scripts/sync-dogfood-cursor.sh) (also syncs root `AGENTS.md` from `REPO_AGENTS.md`; seeds `team/conventions.md` if absent), [`scripts/check-shared-core-drift.sh`](scripts/check-shared-core-drift.sh). Published npm `files` include `scripts/` so consumers can run `check-product-specs.sh` from the package.
105
107
  - **Preset structure CI gates** (exit non-zero on FAIL): `yarn check:preset-structure` (or `bash scripts/check-preset-structure.sh`) — twin map, session-start budget (Option A), leakage, shared-core drift (`AI_RULES_DRIFT_FAIL=1`)
106
108
  - **Opt-in rule eval:** `yarn check:rule-eval` + `.github/workflows/rule-eval.yml` (`workflow_dispatch` + paths-scoped PR) — **not** wired into `check:preset-structure`
107
109
  - **CLI note:** `_shared` is not an installable `--preset`; `init` copies only `presets/cursor/<name>/` or `presets/claude/<name>/`
package/bin/cli.js CHANGED
@@ -60,7 +60,10 @@ Options:
60
60
  --cwd <dir> Target project directory (default: current working directory)
61
61
 
62
62
  Notes:
63
- init merges into the target directory; same-named files are overwritten.
63
+ init merges into the target directory; same-named files are overwritten except mcp.json
64
+ (mcpServers is merged: extra local servers are kept; shipped keys update; nested env/headers
65
+ on shipped keys are preserved unless the preset defines them. Invalid / non-object JSON is
66
+ copied to a timestamped *.bak.* then replaced with the preset file. JSONC is not supported).
64
67
  Cursor init copies rules, commands, agents, hooks, skills, team, hooks.json, BUGBOT.md, AGENTS.md → .cursor/AGENTS.md, MCP.md, mcp.json → .cursor/mcp.json.
65
68
  Claude init copies rules, commands, skills, agents, hooks, team, CLAUDE.md, MCP.md, and mcp.json → .mcp.json (project root).
66
69
  Both tools also copy REPO_AGENTS.md → <cwd>/AGENTS.md (repo-root cross-tool agents file; overwrite).
@@ -204,6 +207,112 @@ function assertPresetDirInsideRoot(presetsRoot, presetBase) {
204
207
  }
205
208
  }
206
209
 
210
+ function isPlainObject(value) {
211
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
212
+ }
213
+
214
+ function ownKeys(object) {
215
+ return Object.keys(object).filter((key) => Object.hasOwn(object, key));
216
+ }
217
+
218
+ function backupMcpFile(mcpDestAbs) {
219
+ const stamp = new Date().toISOString().replace(/[:.]/g, '-');
220
+ const bak = `${mcpDestAbs}.bak.${stamp}`;
221
+ fs.copyFileSync(mcpDestAbs, bak);
222
+ return bak;
223
+ }
224
+
225
+ function replaceMcpWithPreset(mcpFrom, mcpDestAbs, reason) {
226
+ const bak = backupMcpFile(mcpDestAbs);
227
+ fs.copyFileSync(mcpFrom, mcpDestAbs);
228
+ console.warn(`${reason}; backed up to ${bak} and replaced with the preset file.`);
229
+ }
230
+
231
+ /**
232
+ * Merge one shipped server object. Preset scalar fields win; nested `env` / `headers`
233
+ * keep consumer keys unless the preset defines the same nested key.
234
+ */
235
+ function mergeServerEntry(existingEntry, presetEntry) {
236
+ if (!isPlainObject(existingEntry) || !isPlainObject(presetEntry)) {
237
+ return presetEntry;
238
+ }
239
+ const merged = { ...existingEntry, ...presetEntry };
240
+ for (const nested of ['env', 'headers']) {
241
+ const existingNested = existingEntry[nested];
242
+ const presetNested = presetEntry[nested];
243
+ if (isPlainObject(existingNested) && isPlainObject(presetNested)) {
244
+ merged[nested] = { ...existingNested, ...presetNested };
245
+ } else if (isPlainObject(existingNested) && presetNested === undefined) {
246
+ merged[nested] = existingNested;
247
+ }
248
+ }
249
+ return merged;
250
+ }
251
+
252
+ /**
253
+ * Extra local `mcpServers` keys are kept. Shipped keys update; nested `env` / `headers`
254
+ * on overlapping keys are preserved unless the preset defines them.
255
+ * Other unknown top-level keys on the existing file are preserved.
256
+ * @returns {{ merged: object, extrasKept: string[], existingServersInvalid: boolean }}
257
+ */
258
+ function mergeMcpConfig(presetObj, existingObj) {
259
+ const preset = isPlainObject(presetObj) ? presetObj : {};
260
+ const existing = isPlainObject(existingObj) ? existingObj : {};
261
+ const existingServersInvalid =
262
+ Object.hasOwn(existing, 'mcpServers') && !isPlainObject(existing.mcpServers);
263
+ const presetServers = isPlainObject(preset.mcpServers) ? preset.mcpServers : {};
264
+ const existingServers =
265
+ !existingServersInvalid && isPlainObject(existing.mcpServers) ? existing.mcpServers : {};
266
+ const extrasKept = ownKeys(existingServers).filter((key) => !Object.hasOwn(presetServers, key));
267
+ const mergedServers = { ...existingServers };
268
+ for (const key of ownKeys(presetServers)) {
269
+ mergedServers[key] = mergeServerEntry(existingServers[key], presetServers[key]);
270
+ }
271
+ return {
272
+ merged: { ...existing, ...preset, mcpServers: mergedServers },
273
+ extrasKept,
274
+ existingServersInvalid,
275
+ };
276
+ }
277
+
278
+ function installMcpJson(mcpFrom, mcpDestAbs, destLabel) {
279
+ const presetRaw = fs.readFileSync(mcpFrom, 'utf8');
280
+ const presetObj = JSON.parse(presetRaw);
281
+ if (!fs.existsSync(mcpDestAbs)) {
282
+ fs.mkdirSync(path.dirname(mcpDestAbs), { recursive: true });
283
+ fs.copyFileSync(mcpFrom, mcpDestAbs);
284
+ console.log(`Copied ${path.basename(mcpFrom)} → ${destLabel}`);
285
+ return;
286
+ }
287
+ let existingObj;
288
+ try {
289
+ existingObj = JSON.parse(fs.readFileSync(mcpDestAbs, 'utf8'));
290
+ } catch {
291
+ replaceMcpWithPreset(mcpFrom, mcpDestAbs, `Existing ${destLabel} was not valid JSON`);
292
+ return;
293
+ }
294
+ if (!isPlainObject(existingObj)) {
295
+ replaceMcpWithPreset(mcpFrom, mcpDestAbs, `Existing ${destLabel} was not a JSON object`);
296
+ return;
297
+ }
298
+ const { merged, extrasKept, existingServersInvalid } = mergeMcpConfig(presetObj, existingObj);
299
+ if (existingServersInvalid) {
300
+ const bak = backupMcpFile(mcpDestAbs);
301
+ console.warn(
302
+ `Existing ${destLabel} mcpServers was not a JSON object; backed up to ${bak} and merging as empty extras.`,
303
+ );
304
+ }
305
+ fs.mkdirSync(path.dirname(mcpDestAbs), { recursive: true });
306
+ fs.writeFileSync(mcpDestAbs, `${JSON.stringify(merged, null, 2)}\n`);
307
+ if (extrasKept.length > 0) {
308
+ console.log(
309
+ `Merged ${path.basename(mcpFrom)} → ${destLabel} (kept extra servers: ${extrasKept.join(', ')})`,
310
+ );
311
+ } else {
312
+ console.log(`Merged ${path.basename(mcpFrom)} → ${destLabel}`);
313
+ }
314
+ }
315
+
207
316
  function copyDir(src, dest) {
208
317
  if (!fs.existsSync(src)) {
209
318
  throw new Error(`Source not found: ${src}`);
@@ -431,9 +540,7 @@ function cmdInit(tool, preset, cwdOption) {
431
540
  const mcpFrom = path.join(base, cfg.mcpJsonSrc);
432
541
  if (fs.existsSync(mcpFrom)) {
433
542
  const mcpDestAbs = path.join(cwd, cfg.mcpJsonDest);
434
- fs.mkdirSync(path.dirname(mcpDestAbs), { recursive: true });
435
- fs.copyFileSync(mcpFrom, mcpDestAbs);
436
- console.log(`Copied ${cfg.mcpJsonSrc} → ${cfg.mcpJsonDest}`);
543
+ installMcpJson(mcpFrom, mcpDestAbs, cfg.mcpJsonDest);
437
544
  copiedSteps++;
438
545
  }
439
546
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonesofspring/ai-rules",
3
- "version": "0.2.18",
3
+ "version": "0.2.20",
4
4
  "description": "Presets of Cursor and Claude rules/commands for Revy Ross personal use",
5
5
  "license": "MIT",
6
6
  "author": "Revy Ross",
@@ -22,18 +22,21 @@
22
22
  "README.md",
23
23
  "CHANGELOG.md",
24
24
  "bin",
25
- "presets"
25
+ "presets",
26
+ "scripts"
26
27
  ],
27
28
  "scripts": {
28
29
  "check:preset-structure": "bash scripts/check-preset-structure.sh",
29
30
  "check:preset-twin-map": "bash scripts/check-preset-twin-map.sh",
30
31
  "check:preset-token-budget": "bash scripts/check-preset-token-budget.sh",
31
32
  "check:preset-leakage": "bash scripts/check-preset-leakage.sh",
33
+ "check:hook-only-lifecycle": "bash scripts/check-hook-only-lifecycle.sh",
32
34
  "check:preset-i18n": "AI_RULES_I18N_FAIL=1 AI_RULES_I18N_SOFT=0 bash scripts/check-preset-i18n.sh",
33
35
  "check:shared-core-drift": "bash scripts/check-shared-core-drift.sh",
34
36
  "check:product-specs": "bash scripts/check-product-specs.sh",
35
37
  "check:product-specs:dogfood": "bash scripts/check-product-specs.sh ../../dogfood/mcp-ts-sample",
36
- "check:rule-eval": "node scripts/check-rule-eval.mjs"
38
+ "check:rule-eval": "node scripts/check-rule-eval.mjs",
39
+ "test:cli-mcp-merge": "node scripts/test-cli-mcp-merge.mjs"
37
40
  },
38
41
  "engines": {
39
42
  "node": ">=18"
@@ -36,10 +36,10 @@ Do **not** expect lineage adapters to byte-match core. Embed adapters should mat
36
36
 
37
37
  | Dir | Contents |
38
38
  |-----|----------|
39
- | `core/quality/` | Boy-scout + Principles (always-on slim); requestable `anti-sycophancy-discipline` (~17 rules); requestable `design-guidance` (smells ≤12 + GoF ≤8) |
40
- | `core/agent-team/` | Orchestrator + intake (pipeline language) |
39
+ | `core/quality/` | Boy-scout + Principles (always-on slim); requestable `anti-sycophancy-discipline` (~17 rules); requestable `design-guidance` (smells ≤12 + GoF ≤8); requestable `mcp-usage`; embed `debug-investigation`; lineage `verification-before-completion` |
40
+ | `core/agent-team/` | Orchestrator + intake (pipeline language); lineage `task-classification` |
41
41
  | `core/architecture/` | Feature-delivery abstract + reference-features template + product-specs (+ product-specs-authoring) + assets/docs-specs templates |
42
- | `core/review/` | Code-review MR + technical-retro alias + mockup-review checklist + ux-design checklist |
42
+ | `core/review/` | Code-review MR + technical-retro alias + mockup-review checklist + ux-design checklist; lineage `receiving-code-review` |
43
43
  | `core/meta/` | Author-facing preset meta-rules |
44
44
 
45
45
  ## CLI note
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://bonesofspring.github.io/ai-rules/schemas/frontmatter-v1.schema.json",
3
+ "$comment": "Shipped with the npm package as documentation. scripts/check-product-specs.sh validates required keys and headings in bash; it does not load or evaluate this file.",
4
4
  "title": "Product spec frontmatter v1",
5
5
  "type": "object",
6
6
  "required": ["id", "type", "domain", "routes", "ui", "store", "api", "aliases", "e2e"],
@@ -112,6 +112,44 @@ Use these defaults unless a step's `artifactOutputId` / `artifactOutputIds` assi
112
112
 
113
113
  **v1 UX artifact:** when `task-analyst` produces `ux-design.md`, append it to the **`analysis`** entry `authoritativePaths` and `evidencePaths`. Do **not** add a default producer row for `ux-designer` in v1.
114
114
 
115
+ ## specMode
116
+
117
+ Primary location: `brief.md` heading `## Spec mode` with exactly one of `consume` | `generate` | `none` (analyst writes). Optional mirror: top-level `pipeline.json` `specMode` (router echo). Brief wins on conflict.
118
+
119
+ | Value | When | Behavior |
120
+ |-------|------|----------|
121
+ | `consume` | Default when INDEX exists and there is no generate intent | Discover via INDEX; never invent specs |
122
+ | `generate` | `/spec-start`, router `spec-gen`, or brief AC | Author/bootstrap INDEX + specs |
123
+ | `none` | Spike / research / preset-only; no product-behavior SoT | Skip INDEX row requirement and author mode; do not invent a dummy INDEX |
124
+
125
+ ## applyReadiness
126
+
127
+ Optional JSON on the producer receipt and, for `feature-developer`, YAML frontmatter on `implementation.md`:
128
+
129
+ ```json
130
+ {
131
+ "state": "blocked",
132
+ "contextFiles": ["docs/specs/domains/orders/page-checkout.md"]
133
+ }
134
+ ```
135
+
136
+ | `state` | Meaning | Typical emitter |
137
+ |---------|---------|-----------------|
138
+ | `blocked` | Do not implement; read `contextFiles` | analyst (pre-gate), developer (missing SoT) |
139
+ | `ready` | Safe to implement the current WP | developer |
140
+ | `all_done` | WP complete; mechanical spec sync done | developer terminal receipt |
141
+
142
+ `contextFiles` are repo-relative paths the next agent must read or that block progress.
143
+
144
+ ## Memlog
145
+
146
+ Optional append-only file beside slug artifacts:
147
+
148
+ - Cursor: `.cursor/team/tasks/<slug>/.memlog.md`
149
+ - Claude: `.claude/team/tasks/<slug>/.memlog.md`
150
+
151
+ Agent-written chronological markdown (`## YYYY-MM-DD` headings). Suggested line tags: `decision`, `assumption`, `override`, `event`, `claim`. Writers: `task-analyst`, `feature-developer`. `/task-continue` may read it. The hook does **not** parse memlog and does **not** treat it as `status.json` / `metrics.json`.
152
+
115
153
  ## Minimal terminal handoff
116
154
 
117
155
  Report the owned entry ID, outcome, authoritative paths, covered AC/task IDs, and remaining gaps. The hook advances pipeline state from the terminal receipt; the agent receipt is evidence that drives the state transition, not a substitute for writing `status.json`.
@@ -12,6 +12,7 @@ Work request without `/task` — see **agent-team-intake** (when to suggest the
12
12
  | `/task-continue <slug>` | After human gate or pause |
13
13
  | `/feature-start <desc>` | Legacy: analyst-only start (no router) |
14
14
  | `/feature-continue <slug>` | Alias of task-continue |
15
+ | `/spec-start [desc]` | Generate/bootstrap `docs/specs` — router intent `spec-gen` → analyst author mode → human gate |
15
16
  | `/technical-retro [slug]` | Retro with agent team block |
16
17
 
17
18
  ## Roles (shared catalog)
@@ -0,0 +1,21 @@
1
+ # Task classification (spike / bounded / architectural)
2
+
3
+ Stack-agnostic. Classify **before** decomposing work or expanding a pipeline. This maps onto existing `pipeline.json` **profiles** (`light` / `standard` / `full`) and intents — do **not** invent a second orchestrator.
4
+
5
+ ## Classes
6
+
7
+ | Class | Signals | Pipeline posture |
8
+ |-------|---------|------------------|
9
+ | **Spike** | Research, estimate, "can we", no ship | Existing `spike` intent: analyst → architect (or analyst-only). No `feature-developer` until a later task. |
10
+ | **Bounded** | One layer or file, explicit AC, typo / small fix | Existing `light` (or skip analyst fan-out). Do **not** invent a full types/api/store/ui task table. |
11
+ | **Architectural** | New subsystem, public contract, cross-layer | Existing `full`. Add `solution-architect` when boundaries are unclear. |
12
+
13
+ Ratchet **up** if bounded work reveals architectural scope. Do not ratchet **down** to skip a needed verification gate (`build-verifier` after code changes still applies).
14
+
15
+ ## Clarification
16
+
17
+ Prefer **one** unblocking question per message when a single decision unblocks DoR. Never more than **3** questions per iteration (existing analyst cap).
18
+
19
+ ## Router
20
+
21
+ `task-router` already chooses profiles from complexity signals. Use this table to **name** the class in `routingReasons` / brief assumptions — do not add parallel step lists that contradict the intent table.
@@ -10,7 +10,7 @@ Typical feature with data and UI. Concrete directories and rule stems — in the
10
10
  4. **State** — store / ViewModel / use cases; no direct HTTP and no DTOs in UI.
11
11
  5. **UI** — thin views/components; data via state; design system. If the prompt or `brief.md` contains a `figma.com` URL, **mockup review must complete** (or the user must continue past FAIL/`BLOCKED_MCP` via `/task-continue`) **before UI work**. When required-signal and **no** `figma.com`, **`ux-design.md` must exist** (not `INCOMPLETE`) before UI work — else blocked, hand back to analyst. Non-UI tasks no-op these gates.
12
12
  6. **Tests** — unit for mappers / non-trivial logic; e2e/UI per stack convention.
13
- 7. **Completion** — stack post-change gate (lint/build) + package/toolchain rules.
13
+ 7. **Completion** — stack post-change gate (lint/build) + package/toolchain rules. When the current WP spans **more than one** layer or module, `implementation.md` includes a **Code Map** (3–8 annotated repo-relative paths) and **Suggested Review Order** (`concern | path:line | ≤15 word note`). Omit both for a single-file or single-layer WP.
14
14
 
15
15
  ## Data flow (orientation)
16
16
 
@@ -40,6 +40,7 @@ flowchart LR
40
40
  - Breaking layer boundaries for brevity.
41
41
  - **Ubiquitous language:** Domain/type names and boundaries reflect the feature’s subject domain — do not mix transport/framework terms into the domain without need; presentation must not dictate the model vocabulary.
42
42
  - When assessing structure, smells, or pattern choice — load requestable **`design-guidance`** (not always-on); do not copy the catalog into the feature checklist.
43
+ - Do not mutate pipeline `status.json` / `metrics.json`; the orchestration hook is the single writer. Skills upsert the owned terminal receipt in `artifact-manifest.json`.
43
44
 
44
45
  ## Zone → rules matrix
45
46
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  Load when **Generate** or **Bootstrap** is requested (`/spec-start`, router `spec-gen`, brief AC, or analyst author mode). Discovery-only work stays on **`product-specs`**.
4
4
 
5
+ **Optional prefix:** when the user or AC asks **research-before-spec**, load skill **`spec-discovery`** first (subset of methods; **claim-ledger** mandatory). Not the default `/task` consume path and not a new pipeline step.
6
+
5
7
  ## Modes
6
8
 
7
9
  1. **Consume** — default; never invent INDEX/specs (see `product-specs`).
@@ -75,7 +77,7 @@ Compliant = valid frontmatter + all required headings present (non-empty prose o
75
77
 
76
78
  ## Templates & assets
77
79
 
78
- **Package SoT:** `packages/ai-rules/presets/_shared/assets/docs-specs/` (`INDEX.md` stub, `_templates/page.md`, `_templates/feature.md`; optional `schemas/frontmatter-v1.schema.json`).
80
+ **Package SoT:** `packages/ai-rules/presets/_shared/assets/docs-specs/` (`INDEX.md` stub, `_templates/page.md`, `_templates/feature.md`; `schemas/frontmatter-v1.schema.json` is a documentation artifact — the checker does not evaluate it).
79
81
 
80
82
  **CLI `init`:** when consumer `docs/specs/` is **absent**, copy INDEX stub + `_templates/*` (idempotent; **never overwrite** existing INDEX). When the tree already exists, skip seed entirely.
81
83
 
@@ -85,7 +87,7 @@ Compliant = valid frontmatter + all required headings present (non-empty prose o
85
87
 
86
88
  | Role | Responsibility |
87
89
  |------|----------------|
88
- | **task-analyst** | Primary author (Generate + Bootstrap); INDEX bootstrap; brief **Related specs** + **Spec gaps / generation requested**; loads this stem + skill `spec-authoring` |
90
+ | **task-analyst** | Primary author (Generate + Bootstrap); INDEX bootstrap; brief **Related specs** + **Spec gaps / generation requested**; loads this stem + skill `spec-authoring`; optional skill `spec-discovery` when research-before-spec |
89
91
  | **tech-writer** | Post-delivery sync where present; never invent product behavior without AC/code source |
90
92
  | **feature-developer** | Consumes approved specs as SoT; mechanical INDEX/frontmatter fixes only on renames |
91
93
  | **mcp-ts** | No tech-writer — author + post-sync via **task-analyst** only |
@@ -104,4 +106,5 @@ Block handoff via `open_questions` until fixed:
104
106
 
105
107
  - `product-specs` — discovery / consume
106
108
  - Skill `spec-authoring` — procedural checklist
107
- - Optional consumer script `scripts/check-product-specs.sh` (WARN default; `--strict` FAIL)
109
+ - Skill `spec-discovery` opt-in research-before-spec (not default)
110
+ - Optional consumer script `scripts/check-product-specs.sh` (ships in the npm package; WARN default; `--strict` FAIL). Bash checks INDEX links, required frontmatter keys, and body headings — it does **not** evaluate `frontmatter-v1.schema.json`
@@ -4,6 +4,8 @@ Product page/feature **behavior** specs live under the consumer repo `docs/specs
4
4
 
5
5
  **Authoring** (Generate / Bootstrap modes, INDEX/frontmatter v1, body checklist, greenfield, conflict precedence) → load **`product-specs-authoring`** when generation is requested (`/spec-start`, brief AC, or router `spec-gen`).
6
6
 
7
+ **Pipeline `specMode`:** `consume` (this stem) · `generate` (authoring stem) · `none` (spike/research — skip INDEX row requirement; do not invent a dummy INDEX). Primary field: `brief.md` `## Spec mode`; optional `pipeline.json` `specMode`.
8
+
7
9
  ## Modes (summary)
8
10
 
9
11
  | Mode | When | Behavior |
@@ -11,19 +13,21 @@ Product page/feature **behavior** specs live under the consumer repo `docs/specs
11
13
  | **Consume** (default) | INDEX exists or globs hit `docs/specs/**` without generate intent | Discover via INDEX; soft-fail on miss; **never invent** INDEX/specs |
12
14
  | **Generate** | Explicit generate intent / AC / `/spec-start` with existing tree | Create/update page/feature specs + INDEX from stated sources |
13
15
  | **Bootstrap** | Explicit bootstrap / `/spec-start` when tree absent | Create INDEX + templates + first domain spec |
16
+ | **None** (`specMode: none`) | Spike / research / preset-only | Skip INDEX requirement and author mode; no dummy INDEX row |
14
17
 
15
18
  Greenfield: agents may create INDEX/specs **only** on explicit intent, AC, or `/spec-start`. Missing INDEX alone does **not** authorize inventing the tree.
16
19
 
17
20
  ## Presence policy
18
21
 
22
+ - If `specMode` is **`none`** → do **not** require an INDEX row; continue from brief/AC. Do not invent INDEX.
19
23
  - If `docs/specs/INDEX.md` is **missing** → the tree is **optional** (greenfield OK for *consume*). Continue with code/brief discovery; do not invent an INDEX solely because this stem loaded.
20
- - If INDEX **exists** → it is the **required discovery path** for work that touches a listed page, feature, route, or alias.
24
+ - If INDEX **exists** and `specMode` is not `none` → it is the **required discovery path** for work that touches a listed page, feature, route, or alias.
21
25
 
22
26
  ## Discovery algorithm
23
27
 
24
- 1. Always start at `docs/specs/INDEX.md` when present.
28
+ 1. Always start at `docs/specs/INDEX.md` when present (skip when `specMode: none`).
25
29
  2. Resolve the entry by: route, stable `id`, PageName / alias, or domain folder.
26
- 3. Read the linked page spec (and optional domain `feature.md` when the INDEX or page Related links it).
30
+ 3. Read the **linked page** spec and, when INDEX or page Related links it, the optional domain `feature.md`. Do **not** dump the whole `docs/specs/**` tree into the prompt locator = those linked files.
27
31
 
28
32
  ## Miss policy (INDEX present, row or file missing)
29
33
 
@@ -45,5 +49,6 @@ Same-changeset INDEX updates, frontmatter v1, required body headings, templates,
45
49
  ## Related
46
50
 
47
51
  - `product-specs-authoring` — generation modes, contracts, self-check.
52
+ - Skill `spec-discovery` — opt-in research-before-spec (author mode only; not default consume).
48
53
  - `reference-features` — code structure mirror (how to layout files), not product behavior.
49
54
  - Consumer `.ai/context/**` when present — review/domain glossary; cross-link, do not replace.
@@ -12,6 +12,7 @@ Ban leakage of stack-specific names, paths, and handoff stems across presets.
12
12
  - `go` / `java` / `php-hexagonal` / `php-laravel` / `mcp-ts` must not ship Playwright, XCUITest, Android instrumentation agents, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
13
13
  - `mcp-ts` must not ship Go tool commands (`go test`, `go vet`, `golangci-lint`) or `integration-test-*` agents as required delivery gates.
14
14
  - Shared core must not embed stack paths (`app/src/**`, `Features/**`, `playwright`, `xcodebuild`).
15
+ - Storybook / Chrome DevTools MCP must **not** be required handoffs or agent stems (`storybook-reviewer`) on backend or mobile stacks. Frontend overlay mentions in `MCP.md` / `mcp-usage` Stack notes are OK.
15
16
 
16
17
  ## Forbidden in ios-swift hooks/agents (FAIL)
17
18
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Procedural rules for code generation and review. Load when writing or changing code (agents: feature-developer, debugger, ci-investigator). Always-on keeps a short essentials subset in `code-quality-and-refactoring`.
4
4
 
5
- 1. **Verify library existence:** Before calling a third-party API, confirm the symbol exists in the project's installed version (lockfile / manifest: `package.json`, `go.mod`, `Podfile.lock`, `pom.xml`, `Cargo.toml`, or equivalent). If you cannot verify, mark `// VERIFY: lib.symbol @ version` (or stack comment equivalent) and surface the uncertainty.
5
+ 1. **Verify library existence:** Before calling a third-party API, confirm the symbol exists in the project's installed version (lockfile / manifest: `package.json`, `go.mod`, `Podfile.lock`, `pom.xml`, `Cargo.toml`, or equivalent). If that is not enough and Context7 MCP is available, load **`mcp-usage`** and query docs for the **installed major**. If you still cannot verify, mark `// VERIFY: lib.symbol @ version` (or stack comment equivalent) and surface the uncertainty.
6
6
  2. **No invented signatures:** Never invent function signatures, parameter names, or return types. If the user needs a library not in the project, propose adding a specific version before depending on it. Silent stubs are worse than refusal.
7
7
  3. **Enumerate edge cases before validating:** When asked "is this correct?" or "does this work?", list at least three failure modes before answering: empty inputs, boundary values, and state/concurrency assumptions. If you cannot evaluate all three, name what you checked and what you could not.
8
8
  4. **Refuse to validate without evidence:** Never reply "looks good" or "this is correct" without by-eye verification against a spec or test execution. If no spec exists, ask for one or refuse to validate.
@@ -26,7 +26,7 @@
26
26
 
27
27
  Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-discipline`**.
28
28
 
29
- - Unverifiable third-party API → mark `// VERIFY: lib.symbol @ version` (or stack equivalent); never invent signatures.
29
+ - Unverifiable third-party API → if Context7 is up, load **`mcp-usage`** and query the installed major; else mark `// VERIFY: lib.symbol @ version` (or stack equivalent); never invent signatures.
30
30
  - Before "is this correct?" — ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
31
31
  - Refactor without tests → propose characterization test; if declined, label `UNTESTED`.
32
32
  - Comments = WHY only when non-obvious; ban self-referential "added for issue Y".
@@ -0,0 +1,24 @@
1
+ # Debug investigation
2
+
3
+ Stack-agnostic root-cause loop. Consumed by skill `debug-investigation` and agent `debugger`. Platform paths, MCP, and stack commands belong in adapter **Stack notes**.
4
+
5
+ ## When
6
+
7
+ Any bug, test failure, build failure, or unexpected behavior — **before** proposing a fix.
8
+
9
+ ## Phases (in order)
10
+
11
+ 1. **Evidence** — reproduce, or collect the closest evidence (error output, failing test, logs, user steps).
12
+ 2. **Isolate** — expected vs actual in one sentence; smallest relevant slice of the codebase.
13
+ 3. **Root cause** — name the cause before editing. One hypothesis at a time; do not stack speculative fixes.
14
+ 4. **Minimal fix + verify** — smallest change that preserves architecture and public contracts. Add a regression test when the behavior is user-facing or likely to recur. Re-run the **failing** check first, then the relevant lint/type/test slice.
15
+
16
+ ## 3-fix architecture gate
17
+
18
+ If **three** fix attempts fail, or the same symptom returns after two supposed fixes: **STOP**. Do not attempt fix #4. Escalate — the design is likely wrong (human partner or `solution-architect`). Chasing symptoms is the failure mode.
19
+
20
+ ## Do not
21
+
22
+ - Broad refactor during a bugfix.
23
+ - Fix only where the error surfaces if invalid data originates elsewhere.
24
+ - Claim `fixApplied: true` without re-running the failing check (see `quality/verification-before-completion.md`).
@@ -0,0 +1,84 @@
1
+ # MCP usage
2
+
3
+ Requestable protocol for **shipped** and **local-overlay** MCP servers. Agents load this stem via one-liner wiring — do not copy tool schemas into prompts; discover them at runtime.
4
+
5
+ Does not replace Figma mockup-review (that checklist stays on `mockup-review`). Does not add pipeline agents or required handoff stems.
6
+
7
+ ## Presence (runtime catalog is SoT)
8
+
9
+ 1. Inspect the **session MCP catalog** (server names + `serverStatus`). Project `mcp.json` / `.mcp.json` is a hint, not proof the server is up (user-level and plugin servers never appear there).
10
+ 2. Treat `error`, `needsAuth`, and `loading` as **unavailable**. Authenticate only when this task needs that server.
11
+ 3. **Discover tool schemas before calling.** Never invent tool names or arguments from memory.
12
+ 4. Match overlay servers by **documented aliases** or exact catalog ids. Prefer a ready `plugin-*` id over an unknown similarly named server; if several match, ask rather than guessing.
13
+ 5. If two servers expose the same product (plugin + project entry), use the **ready** one; do not call both.
14
+
15
+ ## Classes
16
+
17
+ | Class | Who adds it | Policy |
18
+ |-------|-------------|--------|
19
+ | **Shipped** | Preset `mcp.json` | Assume it should be there; call when the task fits; degrade if down (do not block unless noted below) |
20
+ | **Local overlay** | Consumer project or user MCP | Use only when present **and** the task fits. Never a required pipeline step |
21
+
22
+ Shipped in every preset: **Context7** (library docs). Other shipped servers are stack-specific — see adapter **Stack notes**.
23
+
24
+ ## Context7 (shipped)
25
+
26
+ **When to call** (after lockfile / manifest + sibling files still do not confirm the symbol):
27
+
28
+ - Third-party API that would otherwise get `// VERIFY: lib.symbol @ version`
29
+ - Version-sensitive framework or SDK APIs
30
+ - Migrations / major upgrades
31
+ - Library is in the lockfile but the signature is unclear
32
+
33
+ **When not to call:** repo public API; a sibling file already imports the symbol; a trivial call already in this module.
34
+
35
+ **Flow:**
36
+
37
+ 1. Discover server `context7`.
38
+ 2. Resolve a library id, then query docs (read the live schema; typical names `resolve-library-id` then `query-docs`).
39
+ 3. Put the **installed major** from the project manifest into the query.
40
+ 4. Cap: **≤3 doc queries per question**.
41
+ 5. Source priority: lockfile / sibling code **>** Context7 **>** training data. If docs disagree with the installed major, keep the installed API.
42
+ 6. If Context7 is down: `// VERIFY` (or stack equivalent) and say MCP was unavailable. **Do not block** the task.
43
+
44
+ ## Local overlay protocol
45
+
46
+ If a matching server is ready and a **task signal** fires → discover and use. Otherwise continue from files / native tools (`gh`, repo docs, source).
47
+
48
+ Absence of an overlay is **not** `BLOCKED` unless the user required that MCP as source of truth.
49
+
50
+ ### Observability (Sentry, Datadog, similar)
51
+
52
+ **Signal:** production error, event/trace id, APM / latency, pasted dashboard or issue URL.
53
+
54
+ Use the **first ready** observability MCP. Do not invent metrics or stack traces. Do not require two observability servers.
55
+
56
+ ### Tickets (Linear, Jira, Notion, similar)
57
+
58
+ **Signal:** ticket/page URL in the prompt or brief, or an explicit “pull from \<tracker\>”.
59
+
60
+ Read-only by default. Task-folder artifacts (`brief.md`, `decomposition.md`) remain SoT — do not replace them with a tracker page. Write back to the tracker **only** if the user asked.
61
+
62
+ ### Component-library overlay
63
+
64
+ **Signal:** UI component public API, stories, controls, or explicit component-docs MCP.
65
+
66
+ If such a server is ready, use it for documented props/variants instead of inventing them. If it is down, read story/source files. **Block** only when the user required that MCP as SoT.
67
+
68
+ Usual aliases and runtime needs live in frontend **Stack notes**. Do not ship this server in preset `mcp.json`.
69
+
70
+ ### GitHub MCP
71
+
72
+ Native `gh` / git remain SoT for PRs and checks. A GitHub MCP may be used when present; do not require it.
73
+
74
+ ## Figma
75
+
76
+ Policy is stack-class-specific — see adapter **Stack notes**. If a Figma **plugin** and a project `figma` server are both present, use the ready one and do not duplicate calls.
77
+
78
+ ## Forbidden
79
+
80
+ - Secrets in `mcp.json` / `.mcp.json`
81
+ - New pipeline agents or required handoffs for overlay MCP
82
+ - Treating overlay absence as blocked (except user-required SoT)
83
+ - Tracker/admin write tools without an explicit ask
84
+ - Calling overlay MCP “just in case” on unrelated tasks