@bonesofspring/ai-rules 0.2.10 → 0.2.12

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 (632) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +7 -1
  3. package/bin/cli.js +6 -0
  4. package/package.json +1 -1
  5. package/presets/_shared/README.md +1 -1
  6. package/presets/_shared/core/agent-team/agent-task-metrics.md +30 -0
  7. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +9 -1
  8. package/presets/_shared/core/meta/preset-layering.md +1 -1
  9. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +18 -5
  10. package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
  11. package/presets/_shared/core/meta/preset-twin-sync.md +6 -0
  12. package/presets/_shared/core/review/technical-retro.md +2 -0
  13. package/presets/claude/go/agents/build-verifier.md +2 -2
  14. package/presets/claude/go/agents/task-router.md +4 -0
  15. package/presets/claude/go/commands/task-continue.md +17 -16
  16. package/presets/claude/go/commands/task.md +4 -0
  17. package/presets/claude/go/commands/technical-retro.md +4 -0
  18. package/presets/claude/go/hooks/chain-team-phases.sh +226 -26
  19. package/presets/claude/go/rules/README.md +6 -0
  20. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +4 -0
  21. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
  22. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +18 -5
  23. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  24. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +6 -0
  25. package/presets/claude/go/rules/tooling-and-review/technical-retro.md +2 -0
  26. package/presets/claude/go/team/README.md +8 -0
  27. package/presets/claude/ios-swift/agents/build-verifier.md +3 -3
  28. package/presets/claude/ios-swift/agents/task-router.md +4 -0
  29. package/presets/claude/ios-swift/commands/task-continue.md +17 -16
  30. package/presets/claude/ios-swift/commands/task.md +4 -0
  31. package/presets/claude/ios-swift/commands/technical-retro.md +4 -0
  32. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +226 -26
  33. package/presets/claude/ios-swift/rules/README.md +6 -0
  34. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +4 -0
  35. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +1 -1
  36. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +18 -5
  37. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  38. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +6 -0
  39. package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +2 -0
  40. package/presets/claude/ios-swift/team/README.md +8 -0
  41. package/presets/claude/java/agents/build-verifier.md +3 -3
  42. package/presets/claude/java/agents/task-router.md +4 -0
  43. package/presets/claude/java/commands/task-continue.md +17 -16
  44. package/presets/claude/java/commands/task.md +4 -0
  45. package/presets/claude/java/commands/technical-retro.md +4 -0
  46. package/presets/claude/java/hooks/chain-team-phases.sh +226 -26
  47. package/presets/claude/java/rules/README.md +6 -0
  48. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +4 -0
  49. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +1 -1
  50. package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +18 -5
  51. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  52. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +6 -0
  53. package/presets/claude/java/rules/tooling-and-review/technical-retro.md +2 -0
  54. package/presets/claude/java/team/README.md +8 -0
  55. package/presets/claude/mcp-ts/CLAUDE.md +13 -0
  56. package/presets/claude/mcp-ts/MCP.md +37 -0
  57. package/presets/claude/mcp-ts/README.md +11 -0
  58. package/presets/claude/mcp-ts/REPO_AGENTS.md +49 -0
  59. package/presets/claude/mcp-ts/agents/README.md +21 -0
  60. package/presets/claude/mcp-ts/agents/build-verifier.md +39 -0
  61. package/presets/claude/mcp-ts/agents/feature-developer.md +47 -0
  62. package/presets/claude/mcp-ts/agents/security-reviewer.md +21 -0
  63. package/presets/claude/mcp-ts/agents/solution-architect.md +23 -0
  64. package/presets/claude/mcp-ts/agents/task-analyst.md +25 -0
  65. package/presets/claude/mcp-ts/agents/task-router.md +77 -0
  66. package/presets/claude/mcp-ts/commands/README.md +11 -0
  67. package/presets/claude/mcp-ts/commands/feature-continue.md +19 -0
  68. package/presets/claude/mcp-ts/commands/feature-start.md +33 -0
  69. package/presets/claude/mcp-ts/commands/task-continue.md +50 -0
  70. package/presets/claude/mcp-ts/commands/task.md +53 -0
  71. package/presets/claude/mcp-ts/commands/technical-retro.md +85 -0
  72. package/presets/claude/mcp-ts/hooks/README.md +12 -0
  73. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +546 -0
  74. package/presets/claude/mcp-ts/hooks/examples/README.md +11 -0
  75. package/presets/claude/mcp-ts/hooks/examples/format-edited.example.sh +16 -0
  76. package/presets/claude/mcp-ts/hooks/examples/secret-guard.example.sh +10 -0
  77. package/presets/claude/mcp-ts/hooks/examples/test-on-save.example.sh +25 -0
  78. package/presets/claude/mcp-ts/hooks/guard-shell-command.sh +79 -0
  79. package/presets/claude/mcp-ts/mcp.json +11 -0
  80. package/presets/claude/mcp-ts/rules/README.md +58 -0
  81. package/presets/claude/mcp-ts/rules/api-and-data/README.md +3 -0
  82. package/presets/claude/mcp-ts/rules/api-and-data/mcp-auth-secrets.md +44 -0
  83. package/presets/claude/mcp-ts/rules/api-and-data/mcp-contract-testing.md +42 -0
  84. package/presets/claude/mcp-ts/rules/api-and-data/mcp-tool-design.md +37 -0
  85. package/presets/claude/mcp-ts/rules/api-and-data/mcp-transport-packaging.md +43 -0
  86. package/presets/claude/mcp-ts/rules/architecture/README.md +3 -0
  87. package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +45 -0
  88. package/presets/claude/mcp-ts/rules/architecture/mcp-server-boundaries.md +28 -0
  89. package/presets/claude/mcp-ts/rules/architecture/reference-features.md +33 -0
  90. package/presets/claude/mcp-ts/rules/stack/README.md +3 -0
  91. package/presets/claude/mcp-ts/rules/stack/mcp-ts-app-core.md +27 -0
  92. package/presets/claude/mcp-ts/rules/stack/mcp-ts-conventions.md +29 -0
  93. package/presets/claude/mcp-ts/rules/testing/README.md +3 -0
  94. package/presets/claude/mcp-ts/rules/testing/unit.md +30 -0
  95. package/presets/claude/mcp-ts/rules/tooling-and-review/README.md +3 -0
  96. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +23 -0
  97. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +165 -0
  98. package/presets/claude/mcp-ts/rules/tooling-and-review/anti-sycophancy-discipline.md +34 -0
  99. package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +52 -0
  100. package/presets/claude/mcp-ts/rules/tooling-and-review/code-review.md +51 -0
  101. package/presets/claude/mcp-ts/rules/tooling-and-review/design-guidance.md +109 -0
  102. package/presets/claude/mcp-ts/rules/tooling-and-review/mcp-ts-tooling.md +31 -0
  103. package/presets/claude/mcp-ts/rules/tooling-and-review/post-change-test.md +30 -0
  104. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +36 -0
  105. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +69 -0
  106. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  107. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +41 -0
  108. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +50 -0
  109. package/presets/claude/mcp-ts/rules/tooling-and-review/security-mcp.md +52 -0
  110. package/presets/claude/mcp-ts/rules/tooling-and-review/technical-retro.md +18 -0
  111. package/presets/claude/mcp-ts/rules/ui-and-accessibility/README.md +3 -0
  112. package/presets/claude/mcp-ts/skills/README.md +12 -0
  113. package/presets/claude/mcp-ts/skills/code-review/SKILL.md +10 -0
  114. package/presets/claude/mcp-ts/skills/debug-investigation/SKILL.md +11 -0
  115. package/presets/claude/mcp-ts/skills/feature-delivery/SKILL.md +29 -0
  116. package/presets/claude/mcp-ts/skills/unit-testing/SKILL.md +16 -0
  117. package/presets/claude/mcp-ts/team/README.md +25 -0
  118. package/presets/claude/mcp-ts/team/conventions.md +14 -0
  119. package/presets/claude/mcp-ts/team/fixtures/bugfix-standard.json +32 -0
  120. package/presets/claude/mcp-ts/team/fixtures/feature-full.json +33 -0
  121. package/presets/claude/mcp-ts/team/fixtures/feature-light.json +34 -0
  122. package/presets/claude/next/agents/build-verifier.md +3 -3
  123. package/presets/claude/next/agents/task-router.md +4 -0
  124. package/presets/claude/next/commands/task-continue.md +17 -16
  125. package/presets/claude/next/commands/task.md +4 -0
  126. package/presets/claude/next/commands/technical-retro.md +4 -0
  127. package/presets/claude/next/hooks/chain-team-phases.sh +226 -26
  128. package/presets/claude/next/rules/README.md +6 -0
  129. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +4 -0
  130. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +1 -1
  131. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +18 -5
  132. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  133. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +6 -0
  134. package/presets/claude/next/rules/tooling-and-review/technical-retro.md +2 -0
  135. package/presets/claude/next/team/README.md +19 -0
  136. package/presets/claude/php-hexagonal/CLAUDE.md +31 -0
  137. package/presets/claude/php-hexagonal/MCP.md +15 -0
  138. package/presets/claude/php-hexagonal/README.md +26 -0
  139. package/presets/claude/php-hexagonal/REPO_AGENTS.md +46 -0
  140. package/presets/claude/php-hexagonal/agents/README.md +32 -0
  141. package/presets/claude/php-hexagonal/agents/api-contract-reviewer.md +23 -0
  142. package/presets/claude/php-hexagonal/agents/build-verifier.md +45 -0
  143. package/presets/claude/php-hexagonal/agents/ci-investigator.md +21 -0
  144. package/presets/claude/php-hexagonal/agents/code-reviewer.md +40 -0
  145. package/presets/claude/php-hexagonal/agents/codebase-analyzer.md +28 -0
  146. package/presets/claude/php-hexagonal/agents/debugger.md +29 -0
  147. package/presets/claude/php-hexagonal/agents/feature-developer.md +47 -0
  148. package/presets/claude/php-hexagonal/agents/integration-test-generator.md +22 -0
  149. package/presets/claude/php-hexagonal/agents/integration-test-healer.md +22 -0
  150. package/presets/claude/php-hexagonal/agents/integration-test-planner.md +22 -0
  151. package/presets/claude/php-hexagonal/agents/migration-specialist.md +31 -0
  152. package/presets/claude/php-hexagonal/agents/performance-auditor.md +22 -0
  153. package/presets/claude/php-hexagonal/agents/qa-tester.md +24 -0
  154. package/presets/claude/php-hexagonal/agents/security-reviewer.md +20 -0
  155. package/presets/claude/php-hexagonal/agents/solution-architect.md +28 -0
  156. package/presets/claude/php-hexagonal/agents/task-analyst.md +25 -0
  157. package/presets/claude/php-hexagonal/agents/task-router.md +73 -0
  158. package/presets/claude/php-hexagonal/agents/tech-writer.md +15 -0
  159. package/presets/claude/php-hexagonal/agents/unit-test-generator.md +21 -0
  160. package/presets/claude/php-hexagonal/agents/unit-test-healer.md +13 -0
  161. package/presets/claude/php-hexagonal/agents/unit-test-planner.md +26 -0
  162. package/presets/claude/php-hexagonal/commands/README.md +13 -0
  163. package/presets/claude/php-hexagonal/commands/feature-continue.md +51 -0
  164. package/presets/claude/php-hexagonal/commands/feature-start.md +30 -0
  165. package/presets/claude/php-hexagonal/commands/task-continue.md +50 -0
  166. package/presets/claude/php-hexagonal/commands/task.md +53 -0
  167. package/presets/claude/php-hexagonal/commands/technical-retro.md +62 -0
  168. package/presets/claude/php-hexagonal/hooks/README.md +16 -0
  169. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +582 -0
  170. package/presets/claude/php-hexagonal/hooks/examples/README.md +18 -0
  171. package/presets/claude/php-hexagonal/hooks/examples/format-edited.example.sh +11 -0
  172. package/presets/claude/php-hexagonal/hooks/examples/secret-guard.example.sh +10 -0
  173. package/presets/claude/php-hexagonal/hooks/examples/test-on-save.example.sh +19 -0
  174. package/presets/claude/php-hexagonal/hooks/guard-shell-command.sh +80 -0
  175. package/presets/claude/php-hexagonal/mcp.json +11 -0
  176. package/presets/claude/php-hexagonal/rules/README.md +67 -0
  177. package/presets/claude/php-hexagonal/rules/api-and-data/README.md +14 -0
  178. package/presets/claude/php-hexagonal/rules/api-and-data/adapters-driven.md +38 -0
  179. package/presets/claude/php-hexagonal/rules/api-and-data/adapters-driving.md +38 -0
  180. package/presets/claude/php-hexagonal/rules/api-and-data/api-grpc.md +29 -0
  181. package/presets/claude/php-hexagonal/rules/api-and-data/api-http.md +36 -0
  182. package/presets/claude/php-hexagonal/rules/api-and-data/messaging-adapters.md +37 -0
  183. package/presets/claude/php-hexagonal/rules/api-and-data/persistence-adapters.md +33 -0
  184. package/presets/claude/php-hexagonal/rules/architecture/README.md +16 -0
  185. package/presets/claude/php-hexagonal/rules/architecture/application-usecases.md +31 -0
  186. package/presets/claude/php-hexagonal/rules/architecture/boundaries.md +34 -0
  187. package/presets/claude/php-hexagonal/rules/architecture/composition-root.md +33 -0
  188. package/presets/claude/php-hexagonal/rules/architecture/domain-layer.md +37 -0
  189. package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +53 -0
  190. package/presets/claude/php-hexagonal/rules/architecture/module-public-api.md +31 -0
  191. package/presets/claude/php-hexagonal/rules/architecture/ports-interfaces.md +34 -0
  192. package/presets/claude/php-hexagonal/rules/architecture/reference-features.md +39 -0
  193. package/presets/claude/php-hexagonal/rules/stack/README.md +10 -0
  194. package/presets/claude/php-hexagonal/rules/stack/php-app-core.md +35 -0
  195. package/presets/claude/php-hexagonal/rules/stack/php-conventions.md +51 -0
  196. package/presets/claude/php-hexagonal/rules/testing/README.md +11 -0
  197. package/presets/claude/php-hexagonal/rules/testing/e2e.md +35 -0
  198. package/presets/claude/php-hexagonal/rules/testing/integration.md +31 -0
  199. package/presets/claude/php-hexagonal/rules/testing/unit.md +32 -0
  200. package/presets/claude/php-hexagonal/rules/tooling-and-review/README.md +21 -0
  201. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +26 -0
  202. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +183 -0
  203. package/presets/claude/php-hexagonal/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  204. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +53 -0
  205. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +60 -0
  206. package/presets/claude/php-hexagonal/rules/tooling-and-review/design-guidance.md +111 -0
  207. package/presets/claude/php-hexagonal/rules/tooling-and-review/php-tooling.md +39 -0
  208. package/presets/claude/php-hexagonal/rules/tooling-and-review/post-change-test.md +31 -0
  209. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +36 -0
  210. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +69 -0
  211. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  212. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +41 -0
  213. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +50 -0
  214. package/presets/claude/php-hexagonal/rules/tooling-and-review/security-php.md +29 -0
  215. package/presets/claude/php-hexagonal/rules/tooling-and-review/technical-retro.md +22 -0
  216. package/presets/claude/php-hexagonal/rules/ui-and-accessibility/README.md +5 -0
  217. package/presets/claude/php-hexagonal/skills/README.md +5 -0
  218. package/presets/claude/php-hexagonal/skills/ci-investigation/SKILL.md +11 -0
  219. package/presets/claude/php-hexagonal/skills/code-review/SKILL.md +25 -0
  220. package/presets/claude/php-hexagonal/skills/debug-investigation/SKILL.md +15 -0
  221. package/presets/claude/php-hexagonal/skills/feature-delivery/SKILL.md +30 -0
  222. package/presets/claude/php-hexagonal/skills/integration-testing/SKILL.md +15 -0
  223. package/presets/claude/php-hexagonal/skills/technical-retro/SKILL.md +54 -0
  224. package/presets/claude/php-hexagonal/skills/unit-testing/SKILL.md +14 -0
  225. package/presets/claude/php-hexagonal/skills/write-adr/SKILL.md +41 -0
  226. package/presets/claude/php-hexagonal/team/README.md +37 -0
  227. package/presets/claude/php-hexagonal/team/conventions.md +21 -0
  228. package/presets/claude/php-hexagonal/team/fixtures/bugfix-standard.json +37 -0
  229. package/presets/claude/php-hexagonal/team/fixtures/feature-full.json +25 -0
  230. package/presets/claude/php-hexagonal/team/fixtures/feature-light.json +17 -0
  231. package/presets/claude/php-laravel/CLAUDE.md +20 -0
  232. package/presets/claude/php-laravel/MCP.md +5 -0
  233. package/presets/claude/php-laravel/README.md +30 -0
  234. package/presets/claude/php-laravel/REPO_AGENTS.md +47 -0
  235. package/presets/claude/php-laravel/agents/README.md +32 -0
  236. package/presets/claude/php-laravel/agents/api-contract-reviewer.md +23 -0
  237. package/presets/claude/php-laravel/agents/build-verifier.md +45 -0
  238. package/presets/claude/php-laravel/agents/ci-investigator.md +21 -0
  239. package/presets/claude/php-laravel/agents/code-reviewer.md +40 -0
  240. package/presets/claude/php-laravel/agents/codebase-analyzer.md +28 -0
  241. package/presets/claude/php-laravel/agents/debugger.md +29 -0
  242. package/presets/claude/php-laravel/agents/feature-developer.md +47 -0
  243. package/presets/claude/php-laravel/agents/integration-test-generator.md +22 -0
  244. package/presets/claude/php-laravel/agents/integration-test-healer.md +22 -0
  245. package/presets/claude/php-laravel/agents/integration-test-planner.md +22 -0
  246. package/presets/claude/php-laravel/agents/migration-specialist.md +31 -0
  247. package/presets/claude/php-laravel/agents/performance-auditor.md +22 -0
  248. package/presets/claude/php-laravel/agents/qa-tester.md +30 -0
  249. package/presets/claude/php-laravel/agents/security-reviewer.md +32 -0
  250. package/presets/claude/php-laravel/agents/solution-architect.md +29 -0
  251. package/presets/claude/php-laravel/agents/task-analyst.md +25 -0
  252. package/presets/claude/php-laravel/agents/task-router.md +92 -0
  253. package/presets/claude/php-laravel/agents/tech-writer.md +15 -0
  254. package/presets/claude/php-laravel/agents/unit-test-generator.md +21 -0
  255. package/presets/claude/php-laravel/agents/unit-test-healer.md +13 -0
  256. package/presets/claude/php-laravel/agents/unit-test-planner.md +26 -0
  257. package/presets/claude/php-laravel/commands/README.md +13 -0
  258. package/presets/claude/php-laravel/commands/feature-continue.md +51 -0
  259. package/presets/claude/php-laravel/commands/feature-start.md +30 -0
  260. package/presets/claude/php-laravel/commands/task-continue.md +50 -0
  261. package/presets/claude/php-laravel/commands/task.md +53 -0
  262. package/presets/claude/php-laravel/commands/technical-retro.md +62 -0
  263. package/presets/claude/php-laravel/hooks/README.md +16 -0
  264. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +582 -0
  265. package/presets/claude/php-laravel/hooks/examples/README.md +18 -0
  266. package/presets/claude/php-laravel/hooks/examples/format-edited.example.sh +11 -0
  267. package/presets/claude/php-laravel/hooks/examples/secret-guard.example.sh +10 -0
  268. package/presets/claude/php-laravel/hooks/examples/test-on-save.example.sh +19 -0
  269. package/presets/claude/php-laravel/hooks/guard-shell-command.sh +80 -0
  270. package/presets/claude/php-laravel/mcp.json +11 -0
  271. package/presets/claude/php-laravel/rules/README.md +67 -0
  272. package/presets/claude/php-laravel/rules/api-and-data/README.md +3 -0
  273. package/presets/claude/php-laravel/rules/api-and-data/eloquent-persistence.md +31 -0
  274. package/presets/claude/php-laravel/rules/api-and-data/events-listeners.md +31 -0
  275. package/presets/claude/php-laravel/rules/api-and-data/form-requests.md +29 -0
  276. package/presets/claude/php-laravel/rules/api-and-data/http-layer.md +32 -0
  277. package/presets/claude/php-laravel/rules/api-and-data/jobs-queues.md +41 -0
  278. package/presets/claude/php-laravel/rules/api-and-data/policies-authorization.md +29 -0
  279. package/presets/claude/php-laravel/rules/api-and-data/routes-api.md +29 -0
  280. package/presets/claude/php-laravel/rules/architecture/README.md +3 -0
  281. package/presets/claude/php-laravel/rules/architecture/actions-services.md +30 -0
  282. package/presets/claude/php-laravel/rules/architecture/boundaries.md +34 -0
  283. package/presets/claude/php-laravel/rules/architecture/domain-layer.md +24 -0
  284. package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +51 -0
  285. package/presets/claude/php-laravel/rules/architecture/module-public-api.md +29 -0
  286. package/presets/claude/php-laravel/rules/architecture/reference-features.md +40 -0
  287. package/presets/claude/php-laravel/rules/architecture/service-providers.md +28 -0
  288. package/presets/claude/php-laravel/rules/stack/README.md +3 -0
  289. package/presets/claude/php-laravel/rules/stack/laravel-app-core.md +32 -0
  290. package/presets/claude/php-laravel/rules/stack/laravel-conventions.md +38 -0
  291. package/presets/claude/php-laravel/rules/testing/README.md +3 -0
  292. package/presets/claude/php-laravel/rules/testing/e2e.md +34 -0
  293. package/presets/claude/php-laravel/rules/testing/integration.md +30 -0
  294. package/presets/claude/php-laravel/rules/testing/unit.md +30 -0
  295. package/presets/claude/php-laravel/rules/tooling-and-review/README.md +3 -0
  296. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +21 -0
  297. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +180 -0
  298. package/presets/claude/php-laravel/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  299. package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +52 -0
  300. package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +58 -0
  301. package/presets/claude/php-laravel/rules/tooling-and-review/design-guidance.md +111 -0
  302. package/presets/claude/php-laravel/rules/tooling-and-review/php-tooling.md +37 -0
  303. package/presets/claude/php-laravel/rules/tooling-and-review/post-change-test.md +29 -0
  304. package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +33 -0
  305. package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +66 -0
  306. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +36 -0
  307. package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +38 -0
  308. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +47 -0
  309. package/presets/claude/php-laravel/rules/tooling-and-review/security-php.md +58 -0
  310. package/presets/claude/php-laravel/rules/tooling-and-review/technical-retro.md +17 -0
  311. package/presets/claude/php-laravel/rules/ui-and-accessibility/README.md +3 -0
  312. package/presets/claude/php-laravel/skills/README.md +5 -0
  313. package/presets/claude/php-laravel/skills/ci-investigation/SKILL.md +11 -0
  314. package/presets/claude/php-laravel/skills/code-review/SKILL.md +25 -0
  315. package/presets/claude/php-laravel/skills/debug-investigation/SKILL.md +15 -0
  316. package/presets/claude/php-laravel/skills/feature-delivery/SKILL.md +30 -0
  317. package/presets/claude/php-laravel/skills/integration-testing/SKILL.md +15 -0
  318. package/presets/claude/php-laravel/skills/technical-retro/SKILL.md +54 -0
  319. package/presets/claude/php-laravel/skills/unit-testing/SKILL.md +14 -0
  320. package/presets/claude/php-laravel/skills/write-adr/SKILL.md +41 -0
  321. package/presets/claude/php-laravel/team/README.md +17 -0
  322. package/presets/claude/php-laravel/team/conventions.md +21 -0
  323. package/presets/claude/php-laravel/team/fixtures/bugfix-standard.json +12 -0
  324. package/presets/claude/php-laravel/team/fixtures/feature-full.json +15 -0
  325. package/presets/claude/php-laravel/team/fixtures/feature-light.json +8 -0
  326. package/presets/cursor/go/agents/build-verifier.md +2 -2
  327. package/presets/cursor/go/agents/task-router.md +4 -0
  328. package/presets/cursor/go/commands/task-continue.md +17 -16
  329. package/presets/cursor/go/commands/task.md +4 -0
  330. package/presets/cursor/go/commands/technical-retro.md +4 -0
  331. package/presets/cursor/go/hooks/chain-team-phases.sh +226 -26
  332. package/presets/cursor/go/rules/README.md +6 -0
  333. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +4 -0
  334. package/presets/cursor/go/rules/preset-layering.mdc +1 -1
  335. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +18 -5
  336. package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
  337. package/presets/cursor/go/rules/preset-twin-sync.mdc +6 -0
  338. package/presets/cursor/go/rules/technical-retro.mdc +2 -0
  339. package/presets/cursor/go/team/README.md +8 -0
  340. package/presets/cursor/ios-swift/agents/build-verifier.md +3 -3
  341. package/presets/cursor/ios-swift/agents/task-router.md +4 -0
  342. package/presets/cursor/ios-swift/commands/task-continue.md +17 -16
  343. package/presets/cursor/ios-swift/commands/task.md +4 -0
  344. package/presets/cursor/ios-swift/commands/technical-retro.md +4 -0
  345. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +226 -26
  346. package/presets/cursor/ios-swift/rules/README.md +6 -0
  347. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +4 -0
  348. package/presets/cursor/ios-swift/rules/preset-layering.mdc +1 -1
  349. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +18 -5
  350. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
  351. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +6 -0
  352. package/presets/cursor/ios-swift/rules/technical-retro.mdc +2 -0
  353. package/presets/cursor/ios-swift/team/README.md +8 -0
  354. package/presets/cursor/java/agents/build-verifier.md +3 -3
  355. package/presets/cursor/java/agents/task-router.md +4 -0
  356. package/presets/cursor/java/commands/task-continue.md +17 -16
  357. package/presets/cursor/java/commands/task.md +4 -0
  358. package/presets/cursor/java/commands/technical-retro.md +4 -0
  359. package/presets/cursor/java/hooks/chain-team-phases.sh +226 -26
  360. package/presets/cursor/java/rules/README.md +6 -0
  361. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +4 -0
  362. package/presets/cursor/java/rules/preset-layering.mdc +1 -1
  363. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +18 -5
  364. package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -1
  365. package/presets/cursor/java/rules/preset-twin-sync.mdc +6 -0
  366. package/presets/cursor/java/rules/technical-retro.mdc +2 -0
  367. package/presets/cursor/java/team/README.md +8 -0
  368. package/presets/cursor/mcp-ts/AGENTS.md +25 -0
  369. package/presets/cursor/mcp-ts/BUGBOT.md +9 -0
  370. package/presets/cursor/mcp-ts/MCP.md +37 -0
  371. package/presets/cursor/mcp-ts/README.md +19 -0
  372. package/presets/cursor/mcp-ts/REPO_AGENTS.md +49 -0
  373. package/presets/cursor/mcp-ts/agents/README.md +21 -0
  374. package/presets/cursor/mcp-ts/agents/build-verifier.md +39 -0
  375. package/presets/cursor/mcp-ts/agents/feature-developer.md +47 -0
  376. package/presets/cursor/mcp-ts/agents/security-reviewer.md +21 -0
  377. package/presets/cursor/mcp-ts/agents/solution-architect.md +23 -0
  378. package/presets/cursor/mcp-ts/agents/task-analyst.md +25 -0
  379. package/presets/cursor/mcp-ts/agents/task-router.md +77 -0
  380. package/presets/cursor/mcp-ts/commands/README.md +11 -0
  381. package/presets/cursor/mcp-ts/commands/feature-continue.md +19 -0
  382. package/presets/cursor/mcp-ts/commands/feature-start.md +33 -0
  383. package/presets/cursor/mcp-ts/commands/task-continue.md +50 -0
  384. package/presets/cursor/mcp-ts/commands/task.md +53 -0
  385. package/presets/cursor/mcp-ts/commands/technical-retro.md +85 -0
  386. package/presets/cursor/mcp-ts/hooks/README.md +12 -0
  387. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +546 -0
  388. package/presets/cursor/mcp-ts/hooks/examples/README.md +11 -0
  389. package/presets/cursor/mcp-ts/hooks/examples/format-edited.example.sh +16 -0
  390. package/presets/cursor/mcp-ts/hooks/examples/secret-guard.example.sh +10 -0
  391. package/presets/cursor/mcp-ts/hooks/examples/test-on-save.example.sh +25 -0
  392. package/presets/cursor/mcp-ts/hooks/guard-shell-command.sh +79 -0
  393. package/presets/cursor/mcp-ts/hooks.json +17 -0
  394. package/presets/cursor/mcp-ts/mcp.json +11 -0
  395. package/presets/cursor/mcp-ts/rules/README.md +58 -0
  396. package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +21 -0
  397. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +163 -0
  398. package/presets/cursor/mcp-ts/rules/anti-sycophancy-discipline.mdc +35 -0
  399. package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +53 -0
  400. package/presets/cursor/mcp-ts/rules/code-review-mr.mdc +50 -0
  401. package/presets/cursor/mcp-ts/rules/design-guidance.mdc +108 -0
  402. package/presets/cursor/mcp-ts/rules/feature-delivery-workflow.mdc +43 -0
  403. package/presets/cursor/mcp-ts/rules/mcp-auth-secrets.mdc +45 -0
  404. package/presets/cursor/mcp-ts/rules/mcp-contract-testing.mdc +43 -0
  405. package/presets/cursor/mcp-ts/rules/mcp-server-boundaries.mdc +29 -0
  406. package/presets/cursor/mcp-ts/rules/mcp-tool-design.mdc +38 -0
  407. package/presets/cursor/mcp-ts/rules/mcp-transport-packaging.mdc +44 -0
  408. package/presets/cursor/mcp-ts/rules/mcp-ts-app-core.mdc +28 -0
  409. package/presets/cursor/mcp-ts/rules/mcp-ts-conventions.mdc +30 -0
  410. package/presets/cursor/mcp-ts/rules/mcp-ts-tooling.mdc +32 -0
  411. package/presets/cursor/mcp-ts/rules/post-change-test.mdc +26 -0
  412. package/presets/cursor/mcp-ts/rules/preset-layering.mdc +36 -0
  413. package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +69 -0
  414. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +39 -0
  415. package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +41 -0
  416. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +50 -0
  417. package/presets/cursor/mcp-ts/rules/reference-features.mdc +34 -0
  418. package/presets/cursor/mcp-ts/rules/security-mcp.mdc +53 -0
  419. package/presets/cursor/mcp-ts/rules/technical-retro.mdc +16 -0
  420. package/presets/cursor/mcp-ts/rules/tests-unit.mdc +31 -0
  421. package/presets/cursor/mcp-ts/skills/README.md +12 -0
  422. package/presets/cursor/mcp-ts/skills/code-review/SKILL.md +10 -0
  423. package/presets/cursor/mcp-ts/skills/debug-investigation/SKILL.md +11 -0
  424. package/presets/cursor/mcp-ts/skills/feature-delivery/SKILL.md +29 -0
  425. package/presets/cursor/mcp-ts/skills/unit-testing/SKILL.md +16 -0
  426. package/presets/cursor/mcp-ts/team/README.md +25 -0
  427. package/presets/cursor/mcp-ts/team/conventions.md +14 -0
  428. package/presets/cursor/mcp-ts/team/fixtures/bugfix-standard.json +32 -0
  429. package/presets/cursor/mcp-ts/team/fixtures/feature-full.json +33 -0
  430. package/presets/cursor/mcp-ts/team/fixtures/feature-light.json +34 -0
  431. package/presets/cursor/next/agents/build-verifier.md +3 -3
  432. package/presets/cursor/next/agents/task-router.md +4 -0
  433. package/presets/cursor/next/commands/task-continue.md +17 -16
  434. package/presets/cursor/next/commands/task.md +4 -0
  435. package/presets/cursor/next/commands/technical-retro.md +4 -0
  436. package/presets/cursor/next/hooks/chain-team-phases.sh +230 -26
  437. package/presets/cursor/next/rules/README.md +6 -0
  438. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +4 -0
  439. package/presets/cursor/next/rules/preset-layering.mdc +1 -1
  440. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +18 -5
  441. package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
  442. package/presets/cursor/next/rules/preset-twin-sync.mdc +6 -0
  443. package/presets/cursor/next/rules/technical-retro.mdc +2 -0
  444. package/presets/cursor/next/team/README.md +19 -0
  445. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  446. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  447. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  448. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  449. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  450. package/presets/cursor/next/team/fixtures/metrics.example.json +54 -0
  451. package/presets/cursor/php-hexagonal/AGENTS.md +39 -0
  452. package/presets/cursor/php-hexagonal/BUGBOT.md +11 -0
  453. package/presets/cursor/php-hexagonal/MCP.md +15 -0
  454. package/presets/cursor/php-hexagonal/README.md +26 -0
  455. package/presets/cursor/php-hexagonal/REPO_AGENTS.md +46 -0
  456. package/presets/cursor/php-hexagonal/agents/README.md +36 -0
  457. package/presets/cursor/php-hexagonal/agents/api-contract-reviewer.md +23 -0
  458. package/presets/cursor/php-hexagonal/agents/build-verifier.md +45 -0
  459. package/presets/cursor/php-hexagonal/agents/ci-investigator.md +21 -0
  460. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +40 -0
  461. package/presets/cursor/php-hexagonal/agents/codebase-analyzer.md +28 -0
  462. package/presets/cursor/php-hexagonal/agents/debugger.md +29 -0
  463. package/presets/cursor/php-hexagonal/agents/feature-developer.md +47 -0
  464. package/presets/cursor/php-hexagonal/agents/integration-test-generator.md +22 -0
  465. package/presets/cursor/php-hexagonal/agents/integration-test-healer.md +22 -0
  466. package/presets/cursor/php-hexagonal/agents/integration-test-planner.md +22 -0
  467. package/presets/cursor/php-hexagonal/agents/migration-specialist.md +31 -0
  468. package/presets/cursor/php-hexagonal/agents/performance-auditor.md +22 -0
  469. package/presets/cursor/php-hexagonal/agents/qa-tester.md +24 -0
  470. package/presets/cursor/php-hexagonal/agents/security-reviewer.md +20 -0
  471. package/presets/cursor/php-hexagonal/agents/solution-architect.md +28 -0
  472. package/presets/cursor/php-hexagonal/agents/task-analyst.md +25 -0
  473. package/presets/cursor/php-hexagonal/agents/task-router.md +73 -0
  474. package/presets/cursor/php-hexagonal/agents/tech-writer.md +15 -0
  475. package/presets/cursor/php-hexagonal/agents/unit-test-generator.md +21 -0
  476. package/presets/cursor/php-hexagonal/agents/unit-test-healer.md +13 -0
  477. package/presets/cursor/php-hexagonal/agents/unit-test-planner.md +26 -0
  478. package/presets/cursor/php-hexagonal/commands/README.md +54 -0
  479. package/presets/cursor/php-hexagonal/commands/feature-continue.md +19 -0
  480. package/presets/cursor/php-hexagonal/commands/feature-start.md +33 -0
  481. package/presets/cursor/php-hexagonal/commands/task-continue.md +50 -0
  482. package/presets/cursor/php-hexagonal/commands/task.md +53 -0
  483. package/presets/cursor/php-hexagonal/commands/technical-retro.md +85 -0
  484. package/presets/cursor/php-hexagonal/hooks/README.md +12 -0
  485. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +582 -0
  486. package/presets/cursor/php-hexagonal/hooks/examples/README.md +18 -0
  487. package/presets/cursor/php-hexagonal/hooks/examples/format-edited.example.sh +11 -0
  488. package/presets/cursor/php-hexagonal/hooks/examples/secret-guard.example.sh +10 -0
  489. package/presets/cursor/php-hexagonal/hooks/examples/test-on-save.example.sh +19 -0
  490. package/presets/cursor/php-hexagonal/hooks/guard-shell-command.sh +80 -0
  491. package/presets/cursor/php-hexagonal/hooks.json +17 -0
  492. package/presets/cursor/php-hexagonal/mcp.json +11 -0
  493. package/presets/cursor/php-hexagonal/rules/README.md +106 -0
  494. package/presets/cursor/php-hexagonal/rules/adapters-driven.mdc +41 -0
  495. package/presets/cursor/php-hexagonal/rules/adapters-driving.mdc +42 -0
  496. package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +20 -0
  497. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +177 -0
  498. package/presets/cursor/php-hexagonal/rules/anti-sycophancy-discipline.mdc +30 -0
  499. package/presets/cursor/php-hexagonal/rules/api-grpc.mdc +31 -0
  500. package/presets/cursor/php-hexagonal/rules/api-http.mdc +40 -0
  501. package/presets/cursor/php-hexagonal/rules/application-usecases.mdc +33 -0
  502. package/presets/cursor/php-hexagonal/rules/architecture-boundaries.mdc +36 -0
  503. package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +54 -0
  504. package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +54 -0
  505. package/presets/cursor/php-hexagonal/rules/composition-root.mdc +37 -0
  506. package/presets/cursor/php-hexagonal/rules/design-guidance.mdc +112 -0
  507. package/presets/cursor/php-hexagonal/rules/domain-layer.mdc +39 -0
  508. package/presets/cursor/php-hexagonal/rules/feature-delivery-workflow.mdc +47 -0
  509. package/presets/cursor/php-hexagonal/rules/messaging-adapters.mdc +38 -0
  510. package/presets/cursor/php-hexagonal/rules/module-public-api.mdc +32 -0
  511. package/presets/cursor/php-hexagonal/rules/persistence-adapters.mdc +35 -0
  512. package/presets/cursor/php-hexagonal/rules/php-app-core.mdc +37 -0
  513. package/presets/cursor/php-hexagonal/rules/php-conventions.mdc +53 -0
  514. package/presets/cursor/php-hexagonal/rules/php-tooling.mdc +38 -0
  515. package/presets/cursor/php-hexagonal/rules/ports-interfaces.mdc +37 -0
  516. package/presets/cursor/php-hexagonal/rules/post-change-test.mdc +30 -0
  517. package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +36 -0
  518. package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +69 -0
  519. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +39 -0
  520. package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +41 -0
  521. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +50 -0
  522. package/presets/cursor/php-hexagonal/rules/reference-features.mdc +40 -0
  523. package/presets/cursor/php-hexagonal/rules/security-php.mdc +33 -0
  524. package/presets/cursor/php-hexagonal/rules/technical-retro.mdc +16 -0
  525. package/presets/cursor/php-hexagonal/rules/tests-e2e.mdc +36 -0
  526. package/presets/cursor/php-hexagonal/rules/tests-integration.mdc +33 -0
  527. package/presets/cursor/php-hexagonal/rules/tests-unit.mdc +35 -0
  528. package/presets/cursor/php-hexagonal/skills/README.md +5 -0
  529. package/presets/cursor/php-hexagonal/skills/ci-investigation/SKILL.md +11 -0
  530. package/presets/cursor/php-hexagonal/skills/code-review/SKILL.md +25 -0
  531. package/presets/cursor/php-hexagonal/skills/debug-investigation/SKILL.md +15 -0
  532. package/presets/cursor/php-hexagonal/skills/feature-delivery/SKILL.md +30 -0
  533. package/presets/cursor/php-hexagonal/skills/integration-testing/SKILL.md +15 -0
  534. package/presets/cursor/php-hexagonal/skills/technical-retro/SKILL.md +54 -0
  535. package/presets/cursor/php-hexagonal/skills/unit-testing/SKILL.md +14 -0
  536. package/presets/cursor/php-hexagonal/skills/write-adr/SKILL.md +41 -0
  537. package/presets/cursor/php-hexagonal/team/README.md +41 -0
  538. package/presets/cursor/php-hexagonal/team/conventions.md +21 -0
  539. package/presets/cursor/php-hexagonal/team/fixtures/bugfix-standard.json +37 -0
  540. package/presets/cursor/php-hexagonal/team/fixtures/feature-full.json +25 -0
  541. package/presets/cursor/php-hexagonal/team/fixtures/feature-light.json +17 -0
  542. package/presets/cursor/php-laravel/AGENTS.md +39 -0
  543. package/presets/cursor/php-laravel/BUGBOT.md +9 -0
  544. package/presets/cursor/php-laravel/MCP.md +5 -0
  545. package/presets/cursor/php-laravel/README.md +33 -0
  546. package/presets/cursor/php-laravel/REPO_AGENTS.md +47 -0
  547. package/presets/cursor/php-laravel/agents/README.md +36 -0
  548. package/presets/cursor/php-laravel/agents/api-contract-reviewer.md +23 -0
  549. package/presets/cursor/php-laravel/agents/build-verifier.md +45 -0
  550. package/presets/cursor/php-laravel/agents/ci-investigator.md +21 -0
  551. package/presets/cursor/php-laravel/agents/code-reviewer.md +40 -0
  552. package/presets/cursor/php-laravel/agents/codebase-analyzer.md +28 -0
  553. package/presets/cursor/php-laravel/agents/debugger.md +29 -0
  554. package/presets/cursor/php-laravel/agents/feature-developer.md +47 -0
  555. package/presets/cursor/php-laravel/agents/integration-test-generator.md +22 -0
  556. package/presets/cursor/php-laravel/agents/integration-test-healer.md +22 -0
  557. package/presets/cursor/php-laravel/agents/integration-test-planner.md +22 -0
  558. package/presets/cursor/php-laravel/agents/migration-specialist.md +31 -0
  559. package/presets/cursor/php-laravel/agents/performance-auditor.md +22 -0
  560. package/presets/cursor/php-laravel/agents/qa-tester.md +30 -0
  561. package/presets/cursor/php-laravel/agents/security-reviewer.md +32 -0
  562. package/presets/cursor/php-laravel/agents/solution-architect.md +29 -0
  563. package/presets/cursor/php-laravel/agents/task-analyst.md +25 -0
  564. package/presets/cursor/php-laravel/agents/task-router.md +92 -0
  565. package/presets/cursor/php-laravel/agents/tech-writer.md +15 -0
  566. package/presets/cursor/php-laravel/agents/unit-test-generator.md +21 -0
  567. package/presets/cursor/php-laravel/agents/unit-test-healer.md +13 -0
  568. package/presets/cursor/php-laravel/agents/unit-test-planner.md +26 -0
  569. package/presets/cursor/php-laravel/commands/README.md +54 -0
  570. package/presets/cursor/php-laravel/commands/feature-continue.md +19 -0
  571. package/presets/cursor/php-laravel/commands/feature-start.md +33 -0
  572. package/presets/cursor/php-laravel/commands/task-continue.md +50 -0
  573. package/presets/cursor/php-laravel/commands/task.md +53 -0
  574. package/presets/cursor/php-laravel/commands/technical-retro.md +85 -0
  575. package/presets/cursor/php-laravel/hooks/README.md +12 -0
  576. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +582 -0
  577. package/presets/cursor/php-laravel/hooks/examples/README.md +18 -0
  578. package/presets/cursor/php-laravel/hooks/examples/format-edited.example.sh +11 -0
  579. package/presets/cursor/php-laravel/hooks/examples/secret-guard.example.sh +10 -0
  580. package/presets/cursor/php-laravel/hooks/examples/test-on-save.example.sh +19 -0
  581. package/presets/cursor/php-laravel/hooks/guard-shell-command.sh +80 -0
  582. package/presets/cursor/php-laravel/hooks.json +17 -0
  583. package/presets/cursor/php-laravel/mcp.json +11 -0
  584. package/presets/cursor/php-laravel/rules/README.md +111 -0
  585. package/presets/cursor/php-laravel/rules/actions-services.mdc +33 -0
  586. package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +20 -0
  587. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +178 -0
  588. package/presets/cursor/php-laravel/rules/anti-sycophancy-discipline.mdc +30 -0
  589. package/presets/cursor/php-laravel/rules/architecture-boundaries.mdc +37 -0
  590. package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +54 -0
  591. package/presets/cursor/php-laravel/rules/code-review-mr.mdc +56 -0
  592. package/presets/cursor/php-laravel/rules/design-guidance.mdc +112 -0
  593. package/presets/cursor/php-laravel/rules/domain-layer.mdc +27 -0
  594. package/presets/cursor/php-laravel/rules/eloquent-persistence.mdc +34 -0
  595. package/presets/cursor/php-laravel/rules/events-listeners.mdc +34 -0
  596. package/presets/cursor/php-laravel/rules/feature-delivery-workflow.mdc +50 -0
  597. package/presets/cursor/php-laravel/rules/form-requests.mdc +32 -0
  598. package/presets/cursor/php-laravel/rules/http-layer.mdc +35 -0
  599. package/presets/cursor/php-laravel/rules/jobs-queues.mdc +44 -0
  600. package/presets/cursor/php-laravel/rules/laravel-app-core.mdc +35 -0
  601. package/presets/cursor/php-laravel/rules/laravel-conventions.mdc +41 -0
  602. package/presets/cursor/php-laravel/rules/module-public-api.mdc +31 -0
  603. package/presets/cursor/php-laravel/rules/php-tooling.mdc +39 -0
  604. package/presets/cursor/php-laravel/rules/policies-authorization.mdc +32 -0
  605. package/presets/cursor/php-laravel/rules/post-change-test.mdc +31 -0
  606. package/presets/cursor/php-laravel/rules/preset-layering.mdc +36 -0
  607. package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +69 -0
  608. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +39 -0
  609. package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +41 -0
  610. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +50 -0
  611. package/presets/cursor/php-laravel/rules/reference-features.mdc +42 -0
  612. package/presets/cursor/php-laravel/rules/routes-api.mdc +32 -0
  613. package/presets/cursor/php-laravel/rules/security-php.mdc +61 -0
  614. package/presets/cursor/php-laravel/rules/service-providers.mdc +31 -0
  615. package/presets/cursor/php-laravel/rules/technical-retro.mdc +16 -0
  616. package/presets/cursor/php-laravel/rules/tests-e2e.mdc +36 -0
  617. package/presets/cursor/php-laravel/rules/tests-integration.mdc +33 -0
  618. package/presets/cursor/php-laravel/rules/tests-unit.mdc +33 -0
  619. package/presets/cursor/php-laravel/skills/README.md +5 -0
  620. package/presets/cursor/php-laravel/skills/ci-investigation/SKILL.md +11 -0
  621. package/presets/cursor/php-laravel/skills/code-review/SKILL.md +25 -0
  622. package/presets/cursor/php-laravel/skills/debug-investigation/SKILL.md +15 -0
  623. package/presets/cursor/php-laravel/skills/feature-delivery/SKILL.md +30 -0
  624. package/presets/cursor/php-laravel/skills/integration-testing/SKILL.md +15 -0
  625. package/presets/cursor/php-laravel/skills/technical-retro/SKILL.md +54 -0
  626. package/presets/cursor/php-laravel/skills/unit-testing/SKILL.md +14 -0
  627. package/presets/cursor/php-laravel/skills/write-adr/SKILL.md +41 -0
  628. package/presets/cursor/php-laravel/team/README.md +17 -0
  629. package/presets/cursor/php-laravel/team/conventions.md +21 -0
  630. package/presets/cursor/php-laravel/team/fixtures/bugfix-standard.json +12 -0
  631. package/presets/cursor/php-laravel/team/fixtures/feature-full.json +15 -0
  632. package/presets/cursor/php-laravel/team/fixtures/feature-light.json +8 -0
@@ -0,0 +1,45 @@
1
+ ---
2
+ description: MCP env config, remote auth, redaction, secret handling
3
+ globs:
4
+ - **/auth/**/*
5
+ - **/config/**/*
6
+ - **/.env*
7
+ - **/secrets/**/*
8
+ alwaysApply: false
9
+ ---
10
+
11
+ # MCP auth and secrets
12
+
13
+ ## Local stdio
14
+
15
+ - Prefer env-based configuration for API keys and tokens; never commit live secrets.
16
+ - Redact secrets in logs, error strings, and tool results.
17
+ - Handlers receive only the credentials they need via narrow capability adapters — not `process.env` wholesale.
18
+
19
+ ## Remote / HTTP servers
20
+
21
+ When remote transport is enabled (see `mcp-transport-packaging`):
22
+
23
+ - Choose an auth mode explicitly (none only for trusted local-only; bearer/OAuth when exposed).
24
+ - Fail closed when required auth config is missing in non-dev environments.
25
+ - **Per-request authorization (required for bearer/OAuth):** on every request, validate token **issuer**, **audience**, **expiry**, and **scopes/roles** before tool/resource/prompt dispatch. Reject with a safe error if any check fails.
26
+ - Place the authenticated principal (subject + granted scopes) into a **trusted request context** owned by the transport/auth layer — handlers must not re-parse raw `Authorization` headers.
27
+ - Authorize each tool/resource against that context (capability ≠ “any authenticated caller”).
28
+ - Validate and canonicalize untrusted inputs at the boundary before handlers run.
29
+ - **TLS required** for any non-localhost exposure (or a trusted TLS-terminating proxy with a documented trust boundary). Never send bearer/OAuth tokens in plaintext over the network. Bind `127.0.0.1` for local remote-dev; treat `0.0.0.0` as exposed.
30
+ - Safe errors: no token, cookie, or raw header echo in HTTP or tool error bodies.
31
+ - OAuth redirect URIs: allowlist exact redirect targets — reject open redirects.
32
+
33
+ ## Forbidden
34
+
35
+ - Hardcoded API keys/tokens in source or example configs with live-looking values.
36
+ - Returning raw Authorization headers, cookies, or private keys in tool output.
37
+ - Broad filesystem or network tools that inherit ambient credentials without AC.
38
+ - Trusting client-supplied identity claims without server-side token validation.
39
+ - Putting live tokens into shipped client `mcp.json` / `.mcp.json`.
40
+
41
+ ## Tests
42
+
43
+ - Negative fixtures: logs/results must not contain bearer tokens or secret env values.
44
+ - Misconfigured auth refuses to start or rejects requests (fail closed).
45
+ - Expired / wrong-audience / insufficient-scope tokens are rejected before handlers run.
@@ -0,0 +1,43 @@
1
+ ---
2
+ description: MCP schema snapshots, contract fixtures, optional Inspector smoke
3
+ globs:
4
+ - **/*.{test,spec}.{ts,tsx,js}
5
+ - **/fixtures/**/*
6
+ - src/tools/**/*
7
+ - src/resources/**/*
8
+ - src/prompts/**/*
9
+ alwaysApply: false
10
+ ---
11
+
12
+ # MCP contract testing
13
+
14
+ Protect tool/resource/prompt **schemas and protocol behavior** — not browser E2E and not Go/Java adapter integration suites.
15
+
16
+ ## What to cover
17
+
18
+ 1. **Schema snapshots / fixtures** — registered input/output JSON Schema (or SDK registration result) matches the intended contract.
19
+ 2. **Handler unit tests** — validated inputs → expected results/errors (table-driven).
20
+ 3. **Compatibility** — additive changes OK; breaking field renames/removals need versioning or new tool names.
21
+ 4. **Inspector smoke (optional)** — MCP Inspector CLI may be used as evidence; it is **not** a required Phase 1 gate.
22
+
23
+ ## Workflow (Phase 1)
24
+
25
+ - `feature-developer` owns contract verification inline (no `contract-test-*` agents yet).
26
+ - Prefer repository test runner discovered via `mcp-ts-tooling`.
27
+ - Store fixtures next to tools/tests (`*.fixture.json`, schema snapshots) per repo convention.
28
+
29
+ ## Security negatives (when capability touches FS / net / auth)
30
+
31
+ Require at least one deny fixture per exposed capability:
32
+
33
+ - FS: path traversal / outside-root rejected; secret paths not readable without AC.
34
+ - Net: blocked host / metadata IP rejected; allowlisted host OK.
35
+ - Auth: expired / wrong-audience / insufficient-scope rejected before handler; results must not echo tokens (`mcp-auth-secrets`).
36
+
37
+ Align shapes with `tests-unit` and `security-mcp`.
38
+
39
+ ## Anti-patterns
40
+
41
+ - Claiming "works in Inspector" without schema/unit coverage for the change.
42
+ - Testing only TypeScript types without runtime validation of invalid inputs.
43
+ - Requiring Playwright, XCUITest, or Next e2e paths.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: MCP server module boundaries: registration, handler, capability, lifecycle
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Границы MCP-сервера
7
+
8
+ Dependency direction:
9
+
10
+ ```text
11
+ MCP client → transport/entry → registration → schema + handler → scoped capability
12
+ ```
13
+
14
+ - **Registration** (`src/tools|resources|prompts`): owns protocol names, descriptions, schemas, result mapping. No unrelated side effects; no hidden validation skips.
15
+ - **Handlers**: receive **validated** inputs; depend on **narrow** capability adapters (FS paths, APIs). No process-wide secrets, arbitrary filesystem, or ambient client state.
16
+ - **Contracts**: tool/resource/prompt schemas are **versioned public interfaces**. Do not prescribe UI, DB controllers, or Go-style `domain/application/adapters` layouts.
17
+ - **Startup / transport** (`src/index.ts`): owns transport selection, lifecycle, fail-closed config. Do not duplicate startup inside tools.
18
+
19
+ # Edit bundles (load on matching paths)
20
+
21
+ - `src/tools|resources|prompts/**` → `mcp-tool-design` (+ `mcp-contract-testing` when changing schemas)
22
+ - `src/index.ts`, package/`bin` → `mcp-transport-packaging`
23
+ - auth/config/env → `mcp-auth-secrets` + `security-mcp`
24
+ - After `*.ts` edits → `post-change-test` (+ `mcp-ts-tooling`)
25
+
26
+ # Требование к агенту
27
+
28
+ - Keep registration, validation, and handlers separable — avoid a monolithic `index.ts`.
29
+ - Prefer least privilege for every tool capability.
@@ -0,0 +1,38 @@
1
+ ---
2
+ description: MCP tool/resource/prompt design: names, schemas, errors, least surprise
3
+ globs:
4
+ - src/tools/**/*
5
+ - src/resources/**/*
6
+ - src/prompts/**/*
7
+ alwaysApply: false
8
+ ---
9
+
10
+ # MCP tool design
11
+
12
+ Model-facing tools, resources, and prompts are **public contracts**. Optimize for least surprise for the calling model.
13
+
14
+ ## Names and descriptions
15
+
16
+ - Use stable, verb-oriented tool names (`read_file`, `list_tickets`) — not internal codenames.
17
+ - Descriptions must state **what** the tool does, **when** to use it, and key constraints (side effects, required scopes).
18
+ - Prefer enums / closed sets over free-form strings when the domain is finite.
19
+ - Document idempotency and destructive effects explicitly in the description.
20
+
21
+ ## Schemas (Zod-first authoring)
22
+
23
+ - Author validation with **Zod** (or the repo's schema library) for TypeScript types + runtime checks.
24
+ - MCP-facing input/output schemas are **JSON Schema-compatible protocol contracts**.
25
+ - Convert with an **SDK-supported** path — never pass a Zod object as the wire schema without verifying the installed `@modelcontextprotocol/sdk` API.
26
+ - When unsure: `// VERIFY: @modelcontextprotocol/sdk @ <version>` and look up docs (Context7).
27
+
28
+ ## Errors and results
29
+
30
+ - Map failures to clear, actionable error messages; do not leak stack traces, secrets, or absolute internal paths.
31
+ - Keep success payloads structured and stable; avoid dumping entire process env or large blobs by default.
32
+ - Version breaking schema changes (new tool name or documented major) rather than silently reshaping fields.
33
+
34
+ ## Anti-patterns
35
+
36
+ - Generic "execute_anything" / "run_shell" tools without AC and capability scoping.
37
+ - Duplicated ad-hoc schemas in registration and handler.
38
+ - Side effects inside registration helpers.
@@ -0,0 +1,44 @@
1
+ ---
2
+ description: MCP stdio lifecycle, optional remote transport, bin/npx packaging
3
+ globs:
4
+ - src/index.ts
5
+ - package.json
6
+ - **/Dockerfile
7
+ - **/docker-compose*.yml
8
+ alwaysApply: false
9
+ ---
10
+
11
+ # MCP transport and packaging
12
+
13
+ ## Default: stdio
14
+
15
+ - Local Cursor/Claude use → **stdio** transport from the server entry (`src/index.ts` or equivalent).
16
+ - Entry owns connect/listen lifecycle and graceful shutdown; tools must not open competing transports.
17
+ - Fail closed on missing required startup configuration.
18
+
19
+ ## Packaging
20
+
21
+ - Expose a `bin` / `npx`-friendly entry in `package.json` that runs the compiled or `tsx` entry as appropriate for the repo.
22
+ - Keep `files` / publish contents minimal; do not ship secrets, `.env`, or local credentials.
23
+ - Document install and run commands in the consumer README — not by registering a half-built server into shipped client MCP JSON.
24
+
25
+ ## Optional remote transport
26
+
27
+ - Streamable HTTP / SSE / remote hosting is **opt-in** — load this rule + `mcp-auth-secrets` + `security-mcp`.
28
+ - Require explicit AC for auth mode, network exposure, and rate limits.
29
+ - Before exposing remotely: implement **per-request** token validation (issuer/audience/expiry/scopes) and trusted request context per `mcp-auth-secrets`; treat retrieved content as untrusted per `security-mcp`.
30
+ - Do not mandate Docker/OAuth/Inspector for every stdio-only server.
31
+
32
+ ## Threat model by transport
33
+
34
+ | Mode | Trust boundary | Who can invoke tools | Required controls |
35
+ |------|----------------|----------------------|-------------------|
36
+ | **stdio** (default) | Same machine / IDE process | Host user + IDE agent session | Least-privilege tools; no network AuthN assumed; secrets via env; fail closed on missing config |
37
+ | **HTTP / SSE** (opt-in) | Network-reachable process | Any client that can reach bind address | **TLS required** for non-localhost (or trusted TLS-terminating proxy with documented boundary); localhost-only bind OK without TLS; auth fail-closed; per-request issuer/audience/expiry/scopes; rate limits; safe errors (no token echo) |
38
+
39
+ - Prefer bind `127.0.0.1` for local remote-dev; treat `0.0.0.0` as production exposure needing AC + TLS (or documented TLS-terminating proxy). Never expose bearer/OAuth over plaintext off-localhost.
40
+ - Stdio inherits host privileges — do not compensate by adding “execute anything” tools.
41
+
42
+ ## VERIFY
43
+
44
+ - Transport constructor and `Server` / `McpServer` APIs drift across SDK versions — verify against the installed package before inventing calls.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: TypeScript MCP stack, layout, stdio-first entry (mcp-ts preset)
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Стек и окружение
7
+
8
+ Версии Node, TypeScript и `@modelcontextprotocol/sdk` — **из `package.json` / lockfile целевого репозитория**. Рамка preset:
9
+
10
+ - **Язык / платформа:** TypeScript (Node); package manager — discover from lockfile / `packageManager`.
11
+ - **SDK:** official `@modelcontextprotocol/sdk` — verify APIs before use (`VERIFY:` markers when unsure).
12
+ - **Транспорт по умолчанию:** **stdio-first**; remote HTTP/auth — requestable rules only.
13
+ - **Точка входа:** `src/index.ts` (or repo equivalent) owns transport + lifecycle — not individual tools.
14
+ - **Тесты:** repository runner (Vitest/Jest/node:test); contract fixtures for schemas — see `mcp-contract-testing`.
15
+ - **Наблюдаемость:** only if already in repo — never log secrets or full tool payloads with credentials.
16
+
17
+ # Структура (suggested)
18
+
19
+ ```text
20
+ src/index.ts # transport + server lifecycle
21
+ src/tools/ # tool registration + handlers
22
+ src/resources/ # resource registration (if used)
23
+ src/prompts/ # prompt registration (if used)
24
+ src/**/schemas.ts # Zod authoring schemas
25
+ package.json # bin / main for stdio packaging
26
+ ```
27
+
28
+ Границы — **`mcp-server-boundaries`**. Tooling — requestable **`mcp-ts-tooling`**. После правок TS — **`post-change-test`**.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Strict TypeScript, Zod validation, safe errors, SDK verification for MCP
3
+ globs:
4
+ - src/**/*.ts
5
+ - src/**/*.tsx
6
+ alwaysApply: false
7
+ ---
8
+
9
+ # TypeScript conventions (MCP servers)
10
+
11
+ - Prefer **strict** TypeScript (`strict` true when adding a new tsconfig; do not weaken existing strictness without AC).
12
+ - Validate tool inputs with Zod (or repo schema lib) **before** side effects.
13
+ - Export narrow types for handler inputs inferred from schemas (`z.infer<typeof schema>`).
14
+ - Errors returned to clients: safe messages; log details server-side with redaction.
15
+ - Avoid `any`; prefer `unknown` + narrowing at boundaries.
16
+ - SDK calls: confirm symbols against installed `@modelcontextprotocol/sdk` — use `// VERIFY: @modelcontextprotocol/sdk @ <version>` when unsure.
17
+ - Do not invent hexagonal `internal/domain|application|adapters` layouts unless the target repo already uses them.
18
+
19
+ ## Registration flow
20
+
21
+ 1. Define Zod (or equivalent) input schema next to the tool.
22
+ 2. Map schema → JSON Schema / SDK registration shape the repo uses.
23
+ 3. Implement a pure handler that accepts validated args + narrow capability ports (FS/net/secrets).
24
+ 4. Register the tool once from the server entry (`src/index.ts` or a dedicated register module) — handlers must not open a second transport.
25
+ 5. Cover invalid inputs and happy path in colocated `*.spec.ts` / `*.test.ts` before packaging.
26
+
27
+ ## Errors and types
28
+
29
+ - Prefer typed result/error unions over throwing across the MCP boundary when the SDK pattern allows.
30
+ - Never put stack traces, env dumps, or tokens in tool results.
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: Discover package manager; typecheck/test/Inspector commands for MCP TS
3
+ globs:
4
+ - package.json
5
+ - tsconfig*.json
6
+ - **/vitest.config.*
7
+ - **/jest.config.*
8
+ - **/eslint.config.*
9
+ alwaysApply: false
10
+ ---
11
+
12
+ # Tooling (mcp-ts)
13
+
14
+ Discover package manager **before** running scripts:
15
+
16
+ 1. `packageManager` in `package.json`
17
+ 2. Lockfile: `yarn.lock` → yarn; `pnpm-lock.yaml` → pnpm; `package-lock.json` → npm; `bun.lock(b)` → bun
18
+ 3. Use **only** that manager for install/run
19
+
20
+ ## Typical gates (adapt to repo scripts)
21
+
22
+ | Gate | Discovery |
23
+ |------|-----------|
24
+ | Typecheck | `tsc --noEmit` or script `typecheck` / `build` that typechecks |
25
+ | Test | script `test` / `test:unit` / Vitest / Jest / `node:test` |
26
+ | Lint | project ESLint if configured — never invent Next `lint:js`/`lint:css` as required |
27
+ | Inspector | optional smoke — not required for every change |
28
+
29
+ ## Agent requirement
30
+
31
+ - Do not hard-code `yarn` if the repo uses pnpm/npm/bun.
32
+ - Never require Go tools (`go test` / `go vet`), `xcodebuild`, or Playwright as this stack's gate.
@@ -0,0 +1,26 @@
1
+ ---
2
+ description: Mandatory typecheck + tests after TypeScript MCP edits
3
+ alwaysApply: false
4
+ ---
5
+
6
+ # Post-change test (requestable, mandatory after TS MCP edits)
7
+
8
+ After changing TypeScript / package manifests in a consumer MCP server repo:
9
+
10
+ 1. Discover package manager (`mcp-ts-tooling`).
11
+ 2. Run **typecheck** (project script or `tsc --noEmit`).
12
+ 3. Run **tests** scoped to touched packages/files when possible; full suite before claiming done.
13
+ 4. Optional: MCP Inspector smoke for registration changes — not a hard gate.
14
+
15
+ ## Scope hints
16
+
17
+ - Schema-only changes: include contract/schema fixture tests.
18
+ - Handler changes: unit tests for valid/invalid inputs and error mapping.
19
+ - Packaging/`bin` changes: verify entry still starts under stdio (manual or smoke).
20
+
21
+ ## Agent requirement
22
+
23
+ - Do not claim completion without running the applicable gate (or noting why CI-only).
24
+ - Pipeline `build-verifier` enforces the same checklist.
25
+ - Skip only when the change is docs/config with no `*.ts` / package impact — state that explicitly.
26
+ - Never require Playwright, XCUITest, Next lint recipes, or Go toolchains.
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-layering)
3
+ globs:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ alwaysApply: false
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-layering.md -->
11
+
12
+ # Preset layering
13
+
14
+ Правила для **авторов пресетов** (`packages/ai-rules/presets/**`). Не always-on в consumer apps.
15
+
16
+ ## Слои
17
+
18
+ | Слой | Где | Что класть |
19
+ |------|-----|------------|
20
+ | **Core** | `presets/_shared/core/**` | Stack-agnostic prose + checklists; без frontmatter; без путей `app/**`, `Features/**`, Playwright, xcodebuild |
21
+ | **Stack** | `presets/{cursor\|claude}/<stack>/` | Domain/tooling, always-on trio стека, stack examples в **Stack notes** |
22
+ | **Platform** | Cursor `.mdc` / Claude `.md` | Frontmatter (`alwaysApply`/`globs` vs `paths:`), platform-only (`BUGBOT.md`, `CLAUDE.md`) |
23
+
24
+ ## Куда класть новое правило
25
+
26
+ 1. Общие принципы для всех стеков → **core** + адаптеры с `<!-- shared-core: … -->`.
27
+ 2. Только один из installable стеков (`next` / `ios-swift` / `go` / `java` / `mcp-ts` / `php-hexagonal` / `php-laravel`) → **stack-specific** (не в `_shared`).
28
+ 3. Только Cursor или только Claude packaging → platform artifact / frontmatter, не дублировать семантику.
29
+
30
+ ## SoT
31
+
32
+ - Packages path — SoT; root `.cursor/` — dogfood sync.
33
+ - Per stack: **Cursor** `presets/cursor/<stack>/` → Claude twin same PR.
34
+ - `_shared` **не** `--preset` и не копируется CLI `init`.
35
+
36
+ См. также: `preset-twin-sync`, `preset-token-budget`, `preset-pr-checklist`, `preset-no-cross-stack-leakage`.
@@ -0,0 +1,69 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-no-cross-stack-leakage)
3
+ globs:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ alwaysApply: false
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-no-cross-stack-leakage.md -->
11
+
12
+ # Preset no cross-stack leakage
13
+
14
+ Запрет протекания stack-specific имён, путей и handoff stems между пресетами.
15
+
16
+ ## Principles
17
+
18
+ - `next` must not require iOS-only agents/tooling (`xcuitest-*`, `xcodebuild` as required handoff, Keychain-only rules).
19
+ - `ios-swift` must not ship Playwright handoffs or Next lint recipes as required commands.
20
+ - `go` / `java` / `php-hexagonal` / `php-laravel` / `mcp-ts` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
21
+ - `mcp-ts` must not ship Go tool commands (`go test`, `go vet`, `golangci-lint`) or `integration-test-*` agents as required delivery gates.
22
+ - Shared core must not embed stack paths (`app/src/**`, `Features/**`, `playwright`, `xcodebuild`).
23
+
24
+ ## Forbidden in ios-swift hooks/agents (FAIL)
25
+
26
+ In ios-swift `chain-team-phases.sh` / agent handoffs (Cursor + Claude):
27
+
28
+ - `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`
29
+ - `app/__tests__/e2e` as a required path
30
+ - Positive yarn recipes `lint:js` / `lint:css` as commands to run (negation prose alone is weak — prefer zero occurrences)
31
+
32
+ Required instead: `xcuitest-test-*` stems; build-verifier mentions `xcodebuild` or `post-change-build` / `xcode-tooling`.
33
+
34
+ ## Forbidden in next hooks/agents (FAIL when present as required)
35
+
36
+ - `xcuitest-test-` as handoff stems
37
+ - Requiring `xcodebuild` / SwiftLint as the default post-change gate for Next app work
38
+
39
+ ## Forbidden in go / java / php-hexagonal / php-laravel hooks/agents (FAIL)
40
+
41
+ Shared backend-stack bans (`go`, `java`, `php-hexagonal`, and `php-laravel`):
42
+
43
+ - `playwright-test-`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
44
+ - Positive yarn recipes `lint:js` / `lint:css`
45
+ - `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
46
+ - Agent file `accessibility-reviewer` (no UI surface)
47
+
48
+ Required instead: `integration-test-*`; build-verifier / `post-change-test` plus stack tooling — `go-tooling` (`go test`, `go vet`), `java-tooling` (`mvn test` / `./gradlew test`), or `php-tooling` (`php artisan test` / `composer test` / `vendor/bin/phpunit`).
49
+
50
+ ## Forbidden in mcp-ts hooks/agents (FAIL)
51
+
52
+ Same UI/mobile bans as backend stacks, plus:
53
+
54
+ - `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
55
+ - Positive yarn recipes `lint:js` / `lint:css` as required gates
56
+ - `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
57
+ - Go tool commands as required MCP delivery gates: `go test`, `go vet`, `golangci-lint`
58
+ - Agent files: `playwright-test-*`, `xcuitest-test-*`, `integration-test-*`, `accessibility-reviewer`
59
+
60
+ Required instead: package-manager–discovered typecheck/test (`mcp-ts-tooling`, `post-change-test`); Phase 1 gates `build-verifier` + `security-reviewer`.
61
+
62
+ ## Soft / document
63
+
64
+ - Mentioning the other stack in **docs** comparing presets is OK.
65
+ - `build-verifier` may reference other stacks when validating **preset packaging** (`scope: preset-structure-validation`).
66
+
67
+ ## Chain fork
68
+
69
+ `hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, `java`, `mcp-ts`, `php-hexagonal`, and `php-laravel` (per platform).
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-pr-checklist)
3
+ globs:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ alwaysApply: false
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-pr-checklist.md -->
11
+
12
+ # Preset PR checklist
13
+
14
+ Чеклист для PR, затрагивающих `packages/ai-rules/presets/**` (и dogfood `.cursor/` sync).
15
+
16
+ ## Before merge
17
+
18
+ - [ ] **SoT:** правки в `packages/…` (не только root `.cursor/`)
19
+ - [ ] **Core:** если менялся `_shared/core/**` — обновлены все `<!-- shared-core: … -->` consumers (или documented intentional fork)
20
+ - [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel — см. `preset-twin-sync`)
21
+ - [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table актуален
22
+ - [ ] **Token budget:** alwaysApply / session-start ≤ 3; meta rules not always-on
23
+ - [ ] **Leakage:** нет чужих stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
24
+ - [ ] **Twin depth:** domain ≥15 lines; thin aliases documented
25
+ - [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
26
+ - [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
27
+ - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (or document intentional skip) when maintaining this monorepo
28
+ - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
29
+
30
+ ## Pointers
31
+
32
+ - Layering: `preset-layering`
33
+ - Sync: `preset-twin-sync`
34
+ - Budget: `preset-token-budget`
35
+ - Leakage: `preset-no-cross-stack-leakage`
36
+ - Validation: stack `agents/build-verifier.md` → preset-structure section
37
+ - Dogfood script: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`
38
+ - Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
39
+ - Orchestrator: when editing presets, load this checklist + twin-sync
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-token-budget)
3
+ globs:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ alwaysApply: false
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-token-budget.md -->
11
+
12
+ # Preset token budget
13
+
14
+ Инварианты загрузки правил в **установленном** пресете (consumer app).
15
+
16
+ ## Hard caps
17
+
18
+ | Platform | Always-on | Cap |
19
+ |----------|-----------|-----|
20
+ | Cursor | `alwaysApply: true` | **≤ 3** |
21
+ | Claude | rules **without** `paths:` | **ровно 3** |
22
+
23
+ **Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules). The intended session-start trio remains **exactly 3**; body budget sums **only those 3** rules.
24
+
25
+ Session-start body budget (где задокументировано): ≤140 строк суммарно (stretch ≤120).
26
+
27
+ ## Meta / author rules
28
+
29
+ Rules for preset authors (`preset-layering`, `preset-twin-sync`, …):
30
+
31
+ - **Never** `alwaysApply: true` on consumer installs.
32
+ - Cursor: `globs` limited to `packages/ai-rules/presets/**` (and dogfood `.cursor/**` where useful).
33
+ - Claude: `paths:` limited to `packages/ai-rules/presets/**` (and `.claude/**` dogfood if present).
34
+
35
+ ## Heavy workflows
36
+
37
+ Orchestrator, feature-delivery, code-review, post-change gates, domain globs — **requestable / paths**, not always-on.
38
+
39
+ ## Verifier
40
+
41
+ build-verifier **FAIL** if alwaysApply / session-start count exceeds 3 (Claude count **excludes `**/README.md`**), or if a `preset-*` meta rule is marked always-on.
@@ -0,0 +1,50 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-twin-sync)
3
+ globs:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ alwaysApply: false
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-twin-sync.md -->
11
+
12
+ # Preset twin sync
13
+
14
+ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
15
+
16
+ ## Matrix
17
+
18
+ | Stack | Cursor SoT | Claude derive | Mapping table |
19
+ |-------|------------|---------------|---------------|
20
+ | `next` | `presets/cursor/next/rules/*.mdc` | `presets/claude/next/rules/<topic>/` | **Required** in `claude/next/rules/README.md` |
21
+ | `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Keep in `claude/ios-swift/rules/README.md` |
22
+ | `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
23
+ | `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Keep in `claude/java/rules/README.md` |
24
+ | `mcp-ts` | `presets/cursor/mcp-ts/rules/*.mdc` | `presets/claude/mcp-ts/rules/<topic>/` | Keep in `claude/mcp-ts/rules/README.md` |
25
+ | `php-hexagonal` | `presets/cursor/php-hexagonal/rules/*.mdc` | `presets/claude/php-hexagonal/rules/<topic>/` | Keep in `claude/php-hexagonal/rules/README.md` |
26
+ | `php-laravel` | `presets/cursor/php-laravel/rules/*.mdc` | `presets/claude/php-laravel/rules/<topic>/` | Keep in `claude/php-laravel/rules/README.md` |
27
+
28
+ ## Same-PR checklist
29
+
30
+ 1. Edit Cursor rule first (body + frontmatter).
31
+ 2. Update Claude twin: body + `paths:` (from Cursor `globs:` / requestable triggers); drop `alwaysApply`.
32
+ 3. Update mapping table row if stem/path changed.
33
+ 4. If body embeds core (`<!-- shared-core: … -->`), sync core consumers across stacks when core changed.
34
+
35
+ ## Twin depth
36
+
37
+ - **Domain** rules: ≥15 body lines (FAIL if thin without documented alias reason).
38
+ - **Thin aliases** (`agent-team-intake`, `technical-retro`): may be shorter (soft) if they only point to a command/skill.
39
+
40
+ ## Severity (build-verifier)
41
+
42
+ - **next:** missing Claude twin for a changed Cursor rule → **FAIL** (mapping table required).
43
+ - **ios-swift:** missing Claude twin for a changed Cursor rule → **FAIL**.
44
+ - **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
45
+ - **java:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go; mapping table required).
46
+ - **mcp-ts:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java; mapping table required).
47
+ - **php-hexagonal:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java / mcp-ts; mapping table required).
48
+ - **php-laravel:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java / mcp-ts / php-hexagonal; mapping table required).
49
+
50
+ Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Reference paths for MCP server layout (dogfood-aligned Phase 1)
3
+ globs:
4
+ - src/**/*
5
+ alwaysApply: false
6
+ ---
7
+
8
+ <!-- shared-core: architecture/reference-features.template.md -->
9
+
10
+ # Reference features (mcp-ts) — Phase 1
11
+
12
+ Canonical layout matches `dogfood/mcp-ts-sample/` (consumer repos may rename; prefer the same shapes).
13
+
14
+ | Area | Example path | Glob hint |
15
+ |------|--------------|-----------|
16
+ | Entry / transport | `src/index.ts` | `src/index.ts` |
17
+ | Tools | `src/tools/echo.ts` | `src/tools/**` |
18
+ | Tool tests | `src/tools/echo.spec.ts` | `src/tools/**/*.{test,spec}.ts` |
19
+ | Resources | `src/resources/` (optional) | `src/resources/**` |
20
+ | Prompts | `src/prompts/` (optional) | `src/prompts/**` |
21
+ | Schemas | colocated next to tool (or `schemas.ts`) | `**/schemas.ts`, `src/tools/**` |
22
+ | Build output | `dist/index.js` | `dist/**` |
23
+
24
+ ## Living conventions
25
+
26
+ Post-init gotchas / patterns / decisions: **`.cursor/team/conventions.md`** (and Claude twin path if both tools installed).
27
+
28
+ ## Dogfood scenarios (Phase 1)
29
+
30
+ 1. `/task` add tool — contract → schema → handler → register → tests → package (`dogfood/mcp-ts-sample`).
31
+ 2. Schema validation bug — unit + contract fixtures on `src/tools/*.spec.ts`.
32
+ 3. Capability / secrets review — security-reviewer + `security-mcp` (e.g. FS allowlist tool when added).
33
+
34
+ Init (maintainer): `node packages/ai-rules/bin/cli.js init cursor --preset mcp-ts --cwd dogfood/mcp-ts-sample` — do not commit generated `.cursor/` into the sample unless the team decides otherwise.
@@ -0,0 +1,53 @@
1
+ ---
2
+ description: MCP security: injection boundaries, capability minimization, SSRF/secrets
3
+ globs:
4
+ - src/tools/**/*
5
+ - src/resources/**/*
6
+ - "**/auth/**/*"
7
+ - "**/config/**/*"
8
+ alwaysApply: false
9
+ ---
10
+
11
+ # Security (MCP servers)
12
+
13
+ - Treat tool **arguments** as **untrusted**. Validate with schemas; canonicalize paths/URLs.
14
+ - Minimize capabilities: no default "read any file" / "fetch any URL" without AC and allowlists.
15
+ - Secrets: env/secret manager only; redact in logs and tool results (`mcp-auth-secrets`).
16
+ - Least privilege: each tool gets the smallest capability adapter it needs — no ambient `process.env` dumps.
17
+
18
+ ## Path traversal (FAIL patterns)
19
+
20
+ - Resolve with `path.resolve` (or equivalent) then require the result stays under an approved root (`path.relative` must not start with `..`).
21
+ - Deny `../`, encoded variants (`%2e%2e`), and null-byte tricks before FS access.
22
+ - Follow symlinks only if the **final** realpath is still inside the root — otherwise reject.
23
+ - Unit shapes: `tool.rejectsPathTraversal`, `tool.rejectsSymlinkEscape`, `tool.acceptsInRoot`.
24
+
25
+ ## SSRF / outbound URL (FAIL patterns)
26
+
27
+ When tools fetch URLs:
28
+
29
+ - Allowlist hosts (or deny by default); block metadata IP `169.254.169.254`, link-local (`169.254.0.0/16`), loopback when not explicitly local-dev, and private ranges unless AC says otherwise.
30
+ - Do not follow redirects to a host outside the allowlist; re-validate after each hop.
31
+ - Prefer literal IPs from a resolved allowlist over trusting DNS alone when policy requires it.
32
+ - Unit shapes: `tool.deniesMetadataIp`, `tool.deniesBlockedHost`, `tool.allowsAllowlistedHost`.
33
+
34
+ ## Prompt injection and untrusted content
35
+
36
+ - Tool **descriptions** and **results** must not instruct the model to ignore safety; handlers must not execute model-supplied shell without an explicit, reviewed design.
37
+ - Treat **retrieved** tool/resource/prompt content (and any fetched remote payload) as **untrusted data**, not as authority:
38
+ - It must **not** expand tool capabilities, change auth/scopes, or trigger shell/network/FS side effects merely because the content contains instructions.
39
+ - Handlers decide actions from validated args + trusted request context only — never from natural-language directives inside resource bodies or prior tool output.
40
+ - Do not echo secrets found in untrusted content into logs or subsequent tool results.
41
+
42
+ ## Forbidden
43
+
44
+ - Shipping live credentials in examples or fixtures.
45
+ - Echoing `process.env` or Authorization headers into tool output.
46
+ - Fail-open auth when remote transport is enabled.
47
+ - Broad "run arbitrary command" tools without explicit AC and sandboxing.
48
+ - Letting tool/resource text escalate privileges or bypass schema/auth checks.
49
+
50
+ ## Agents
51
+
52
+ - `security-reviewer` on tool/auth/config/capability changes; then `post-change-test`.
53
+ - Phase 1: feature-developer must not skip schema validation to "move faster".