@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,165 @@
1
+ ---
2
+ description: Orchestrates the agent team via task-router and pipeline.json for mcp-ts presets
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ ---
7
+
8
+ <!-- shared-core: agent-team/agent-team-orchestrator.md -->
9
+
10
+ # Agent team orchestrator
11
+
12
+ Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.cursor/team/tasks/<slug>/` (Claude: `.claude/team/tasks/<slug>/`).
13
+
14
+ Work request без `/task` — см. **agent-team-intake** (когда предлагать router вместо прямого кодинга).
15
+
16
+ ## Entry points
17
+
18
+ | Command | When |
19
+ |---------|------|
20
+ | **`/task <desc>`** | **Preferred** — router → dynamic pipeline → first agent |
21
+ | `/task-continue <slug>` | After human gate or pause |
22
+ | `/feature-start <desc>` | Legacy: analyst-only start (no router) |
23
+ | `/feature-continue <slug>` | Alias of task-continue |
24
+ | `/technical-retro [slug]` | Retro with agent team block |
25
+
26
+ ## Roles (shared catalog)
27
+
28
+ Roster of specialists is **stack-specific** (agent names and write scopes differ). See **Stack notes** in the stack adapter for the live Roles table. Common patterns:
29
+
30
+ | Kind | Examples (names vary by stack) |
31
+ |------|--------------------------------|
32
+ | Planning | `task-router`, `task-analyst`, `solution-architect`, `migration-specialist` |
33
+ | Implementation | `feature-developer`, `debugger`, `ci-investigator` |
34
+ | Gates / review | `build-verifier`, `code-reviewer`, `security-reviewer`, `performance-auditor` (no `accessibility-reviewer`) |
35
+ | Tests | unit planner/generator/healer; e2e/UI planner/generator/healer (stack-native) |
36
+ | Docs | `tech-writer` |
37
+
38
+ **Cursor frontmatter:** all team pipeline agents use `readonly: false` so they can write team artifacts. Production/app restrictions live in the agent prompt body — do **not** set `readonly: true`.
39
+
40
+ Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`.
41
+
42
+ ## Dynamic pipeline
43
+
44
+ ```mermaid
45
+ flowchart TD
46
+ task["/task prompt"]
47
+ router["task-router"]
48
+ pipeline["pipeline.json"]
49
+ step0["steps 0..N"]
50
+ gate{"humanGates?"}
51
+ hook["subagentStop hook"]
52
+ retro["/technical-retro"]
53
+
54
+ task --> router
55
+ router --> pipeline
56
+ pipeline --> step0
57
+ step0 --> gate
58
+ gate -->|"/task-continue"| step0
59
+ step0 --> hook
60
+ hook --> step0
61
+ step0 --> retro
62
+ ```
63
+
64
+ **Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
65
+
66
+ ## Metrics lifecycle
67
+
68
+ Use the local `metrics.json` ledger described by **agent-task-metrics**: initialize attempts before invocation, let hooks record host-clock ends, and never guess a parallel completion from `currentAgent`.
69
+
70
+ ## status.json (pipeline mode)
71
+
72
+ ```json
73
+ {
74
+ "slug": "...",
75
+ "intent": "feature",
76
+ "pipelineIndex": 0,
77
+ "currentAgent": "task-analyst",
78
+ "phase": "executing",
79
+ "state": "in_progress",
80
+ "awaitingHumanGate": false
81
+ }
82
+ ```
83
+
84
+ | state | Meaning |
85
+ |-------|---------|
86
+ | `in_progress` | Current step running |
87
+ | `completed` | Current step done; hook advances |
88
+ | `awaiting_approval` | Human gate; wait for `/task-continue` |
89
+ | `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
90
+ | `validation_failed` | build-verifier failed; re-run developer then build-verifier |
91
+
92
+ ## Pipeline step options
93
+
94
+ | Field | Use |
95
+ |-------|-----|
96
+ | `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
97
+ | `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
98
+ | `scope` | e.g. `unit-in-dev`, `e2e-only`, `preset-artifacts-only` — passed to developer/qa |
99
+ | `model` | `cheap` \| `standard` \| `strong` — optional tier override |
100
+
101
+ ## Rules (strict)
102
+
103
+ 1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline).
104
+ 2. Read `pipeline.json` before every subagent invocation.
105
+ 3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
106
+ 4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
107
+ 5. Persist handoffs to disk (`brief.md`, `decomposition.md`, `debug-report.md`, `validation-report.md`, `architecture.md`, `migration-plan.md`, `ci-report.md`, `a11y-review.md`, `perf-report.md`, `security-review.md`, `api-contract-review.md`, `unit-test-plan.md`, `documentation.md`, `review.md`).
108
+ 6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
109
+ 7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
110
+ 8. When all steps complete, suggest `/technical-retro <slug>`.
111
+ 9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
112
+
113
+ ## Team artifact I/O (Cursor Shell sandbox)
114
+
115
+ - Create/update team task dirs with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC).
116
+ - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
117
+ - Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
118
+
119
+ ## Invoking agents
120
+
121
+ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
122
+
123
+ ### Model when invoking (Task)
124
+
125
+ 1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
126
+ 2. Map abstract tiers:
127
+ - **`cheap`** → pass Task `model: "fast"` when the tool accepts it (or rely on agent `fast`).
128
+ - **`standard`** → omit Task `model` (frontmatter `inherit` / mid default).
129
+ - **`strong`** → **never** pass `fast`; rely on agent pin or parent Max model.
130
+ 3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
131
+
132
+ After each agent completes, ensure `status.json` has `state: completed` (or `awaiting_approval` if gate applies).
133
+
134
+ ## Legacy mode
135
+
136
+ If `pipeline.json` is missing (old `/feature-start` tasks), fall back to fixed phases: analysis → development → review → testing. Hook supports both.
137
+
138
+ ## Skip pipeline when
139
+
140
+ Do **not** run `/task` + router for:
141
+
142
+ - Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** for deep traces; inline OK for trivial one-liners.
143
+ - Typo / one-file fix / trivial config with no architecture risk.
144
+ - User explicitly says «без pipeline», «просто сделай», or continues an active slug.
145
+ - Single-line `docs-only` with no code impact.
146
+
147
+ Borderline work requests — см. **agent-team-intake**.
148
+
149
+ ## Auto-detection (optional)
150
+
151
+ When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
152
+
153
+ ## Preset authoring
154
+
155
+ When the work edits `packages/ai-rules/presets/**` (or dogfood `.cursor/` sync of presets), follow meta-rules: **preset-pr-checklist**, **preset-twin-sync**, **preset-layering**, **preset-token-budget**, **preset-no-cross-stack-leakage**.
156
+
157
+ ## Stack notes
158
+
159
+ - Scope: TypeScript MCP server modules (`src/tools|resources|prompts`, `src/index.ts`) — not Next `app/src`, iOS `Features/`, or Go hexagonal trees.
160
+ - **Phase 1 roster only:** `task-router`, `task-analyst`, `solution-architect`, `feature-developer`, `build-verifier`, `security-reviewer`.
161
+ - **No** `accessibility-reviewer`, Playwright, XCUITest, `integration-test-*`, `contract-test-*`, or `codebase-analyzer` (Phase 2) — do not schedule them.
162
+ - **Explain-as-is override:** shared catalog mentions `codebase-analyzer` — in Phase 1 answer inline or load requestable MCP rules; do not invoke a missing agent.
163
+ - **Phase 1 artifacts:** `brief.md`, `decomposition.md`, `architecture.md`, `validation-report.md`, `security-review.md`; schema/style review via parent skill `code-review` → `review.md`. Shared-core names like `a11y-review.md`, `ci-report.md`, `unit-test-plan.md` are N/A until Phase 2 agents ship.
164
+ - **Review-only:** pipeline step = `security-reviewer` for threat/capability diffs; parent applies skill `code-review` for schema/contract/style (no `code-reviewer` agent in Phase 1).
165
+ - After TS changes, pipeline includes **build-verifier** with repository typecheck/test via `post-change-test` / `mcp-ts-tooling`.
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Anti-sycophancy discipline for code generation and review
3
+ paths:
4
+ - **/*.ts
5
+ - **/*.tsx
6
+ ---
7
+
8
+ <!-- shared-core: quality/anti-sycophancy-discipline.md -->
9
+
10
+ # Anti-sycophancy discipline (requestable)
11
+
12
+ 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`.
13
+
14
+ 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.
15
+ 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.
16
+ 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.
17
+ 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.
18
+ 5. **Distinguish compiling from correct:** Code that builds is not code that works. Confirm the unit does what its name promises, not only that types/compile succeed.
19
+ 6. **Preserve invariants in refactoring:** Before refactoring, enumerate the invariants the existing code holds and state them. After the refactor, verify each still holds.
20
+ 7. **Tests before refactor:** If no tests exist for code being refactored, propose a characterization test first. If the user declines, mark the refactor `UNTESTED` (behavior may have changed).
21
+ 8. **Resist manufactured urgency:** When the user invokes urgency ("ship it now"), name the trade-off once ("If we ship without X, here is what may break"), then comply. Do not repeat the warning or apologize in a loop.
22
+ 9. **Resist authority appeals:** Phrases like "leadership wants this" or "legal said it's fine" are not technical justifications. Evaluate on technical grounds.
23
+ 10. **Refuse softening of real risk:** When asked to make a concern sound less serious, refuse if softening would mask a real risk. If the risk is genuinely minor, comply and explain why.
24
+ 11. **Disagreement is not sycophancy:** If the user pushes back on a technically sound recommendation, hold the position. Update only on new evidence, not on emotional pressure or repetition.
25
+ 12. **No restated-code comments:** Never write comments that paraphrase what the code does. Comments explain WHY only when non-obvious (hidden constraint, workaround, surprising behavior).
26
+ 13. **No self-referential comments:** Never reference the task in code comments ("added for issue Y", "TODO from review"). Those belong in commits/PRs and rot as the codebase evolves.
27
+ 14. **Acknowledge uncertainty explicitly:** If you do not know, say so or "I would need to verify X". Do not invent a plausible-sounding answer.
28
+ 15. **Surface hidden trade-offs:** When generating code with architectural implications the user did not ask about (new dependency, async pattern, data-structure complexity), name the trade-off. Do not bury it.
29
+ 16. **Match verification to risk:** Trivial → syntax/type check. Logic → manual trace. Concurrency/state → written scenario. Skipping verification proportional to risk is the failure mode.
30
+ 17. **Honest status reporting:** When asked "is X done?", answer by what was **verified**, not what was attempted ("wrote code but did not run tests" when that is true).
31
+
32
+ ## Stack notes
33
+
34
+ - **Phase 1:** load for `feature-developer` and parent review flows only. `debugger` / `ci-investigator` are Phase-2 reserved — ignore those agent names in the shared prose above until they ship.
@@ -0,0 +1,52 @@
1
+ ---
2
+ description: Code quality and light refactoring for TypeScript MCP servers
3
+ ---
4
+
5
+ <!-- shared-core: quality/code-quality-and-refactoring.md -->
6
+
7
+ # Поддержка существующего стиля
8
+
9
+ - Следовать существующим паттернам (имена, структура, типизация / DI / error handling); минимизировать стилистический шум (лишний format/rename).
10
+ - Перед новым решением: искать аналог и **повторять подход**; проверять дизайн‑систему / UI‑пакеты; ходить только через **public API** (deep‑импорты — повод для рефакторинга).
11
+
12
+ # Принципы
13
+
14
+ - **KISS:** самое простое изменение в паттернах репозитория.
15
+ - **DRY + Rule of Three:** общее — только после 3-го повторения (ошибочная абстракция дороже дублирования).
16
+ - **YAGNI:** без API, флагов, слоёв «на будущее» без текущего требования.
17
+ - **SOLID:** S — один повод менять; O — композиция/новые реализации; L — контракт подтипа; I — узкие порты; D — абстракции (порты), детали в адаптерах стека.
18
+ - **CUPID:** Composable; Unix philosophy (одна ответственность); Predictable; Idiomatic (репо); Domain-based.
19
+ - **Composition over inheritance;** Law of Demeter — без цепочек `a.b.c.d`; через public API / facade.
20
+
21
+ # Рефакторинг при изменениях
22
+
23
+ - Лёгкий refactor OK, если меньше дублирования, выше читаемость, без ломки публичных контрактов.
24
+ - Примеры: общая утилита/хук/mapper/use case; сузить unsafe-типы; разбить крупный модуль; токены вместо «магии»; deep‑импорт → public API.
25
+ - Не делать «большой» рефакторинг на точечной задаче (структура/публичные имена без запроса). Крупное — минимальными шагами; код остаётся собираемым.
26
+
27
+ # Требование к агенту
28
+
29
+ - **Boy scout:** оставлять модуль немного лучше; не жертвовать архитектурой и слоями ради краткости.
30
+
31
+ ## Agent discipline (anti-sycophancy)
32
+
33
+ Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-discipline`**.
34
+
35
+ - Unverifiable third-party API → mark `// VERIFY: lib.symbol @ version` (or stack equivalent); never invent signatures.
36
+ - Before «is this correct?» — ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
37
+ - Refactor without tests → propose characterization test; if declined, label `UNTESTED`.
38
+ - Comments = WHY only when non-obvious; ban self-referential «added for issue Y».
39
+ - Urgency/authority: name the trade-off once, then comply — no apology loops.
40
+ - Match verification to risk; report by what was **verified**, not attempted.
41
+
42
+ Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
43
+
44
+ > Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
45
+ ## Stack notes
46
+
47
+ - **No UI layer in this preset** — ignore shared-core bullets about дизайн‑система / UI‑пакеты / CSS‑токены; apply public-API and boy-scout rules to MCP registration modules and handlers.
48
+ - Public surface: tool/resource/prompt names + JSON Schema-compatible contracts — avoid deep imports across unrelated modules.
49
+ - Prefer Zod for authoring validation; MCP-facing schemas are protocol JSON Schema (SDK-supported conversion) — never pass raw Zod objects as the wire contract without verification.
50
+ - Unverifiable SDK usage → `// VERIFY: @modelcontextprotocol/sdk @ <version>`.
51
+ - Post-change gate: **`post-change-test`** + **`mcp-ts-tooling`** (repository-discovered typecheck/test — not Next lint, not Go tools, not xcodebuild).
52
+ - Style: project ESLint/Prettier/tsc when configured — authoritative style gate; do not duplicate formatter recipes in prose.
@@ -0,0 +1,51 @@
1
+ ---
2
+ description: Code review requirements for MCP TypeScript MRs
3
+ paths:
4
+ - src/**/*
5
+ ---
6
+
7
+ <!-- shared-core: review/code-review-mr.md -->
8
+
9
+ # Code review merge requests
10
+
11
+ On-demand rule for review flows. **Procedure and output format:** skill `code-review`.
12
+
13
+ ## When to load
14
+
15
+ - User asks for review/MR/diff
16
+ - Pipeline step `code-reviewer`
17
+ - Platform automated review (e.g. BUGBOT) when present
18
+
19
+ ## Checklist references (abstract)
20
+
21
+ - Architecture layers and stack core rules
22
+ - Public imports / module boundaries
23
+ - UI conventions of the stack
24
+ - Unit and e2e/UI test conventions
25
+ - Post-change lint/build gate before final report
26
+ - Design smells **in MR diff scope** — load `design-guidance`; не разворачивать полный каталог Fowler вне диффа
27
+ - Pattern name (GoF) — только если репозиторий уже использует эту форму или match минимален
28
+ - Principles (KISS / DRY+Ro3 / YAGNI / SOLID / CUPID) — через always-on `code-quality-and-refactoring`, не дублировать эссе в review
29
+
30
+ Concrete rule stems — in **Stack notes**.
31
+
32
+ ## Constraints
33
+
34
+ - Focus on MR diff, not the whole repo.
35
+ - Use local `git diff` — do not invent hosting metadata.
36
+ - Boy scout rule: suggest fixes feasible within the MR scope.
37
+ - No «большие рефакторинги» without an explicit request (`code-quality-and-refactoring`).
38
+
39
+ ## Output contract
40
+
41
+ Procedure details live in skill `code-review`. Required shape:
42
+
43
+ - Each finding cites **`path:line`**, the problem, impact, and a concrete fix direction.
44
+ - Rank by severity: **`blocker` | `important` | `nit`** (list blocker → nit).
45
+ - Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
46
+ - End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
47
+ ## Stack notes
48
+
49
+ - Check MCP boundaries: registration vs handler vs capability; schema/contract stability; no secret leakage.
50
+ - Ban Playwright/XCUITest/Next-app path requirements in review comments for this stack.
51
+ - **Phase 1:** no `code-reviewer` agent — parent (or `/task` review-only) applies skill `code-review` and writes `review.md`. Pipeline step name `code-reviewer` is Phase 2.
@@ -0,0 +1,109 @@
1
+ ---
2
+ description: Design guidance (smells & patterns) for MCP TypeScript servers
3
+ paths:
4
+ - src/**/*
5
+ ---
6
+
7
+ <!-- shared-core: quality/design-guidance.md -->
8
+
9
+ # Design guidance (smells & patterns)
10
+
11
+ Словарь **code smells** (Fowler) и **design patterns** (GoF) для агентов при implement / review / debug.
12
+
13
+ Применять только в scope задачи или MR. Лёгкий refactor — да; «большой» rewrite без явного запроса — нет.
14
+
15
+ Называть паттерн **только если** репозиторий уже так делает или это минимальный match. Иначе — extract/split/move без ярлыка GoF.
16
+
17
+ Не заменяет always-on Principles в `code-quality-and-refactoring` (KISS, DRY + Rule of Three, YAGNI, SOLID, CUPID, composition, Demeter).
18
+
19
+ ## When to load
20
+
21
+ - **Feature delivery / implement** — оценка структуры модулей, границ и дублирования.
22
+ - **Code review** — smells и pattern fit **в диффе MR**, не по всему репо.
23
+ - **Debug** — root-cause похож на wrong abstraction, Feature Envy, Message Chains, Shotgun Surgery.
24
+ - **Light refactor only** — улучшения в рамках boy-scout / MR scope; не расширять задачу ради каталога.
25
+
26
+ Агенты и skills подгружают stem по one-liner wiring — не копировать этот каталог в промпт агента.
27
+
28
+ ## How to use (agent rules of thumb)
29
+
30
+ 1. Сначала сверить с Principles (always-on): проще ли решение, нет ли ранней абстракции, соблюдён ли public API.
31
+ 2. Затем отметить smells **в изменённых файлах** задачи/MR; предложить fix только если он укладывается в light refactor.
32
+ 3. Паттерн GoF — опциональный ярлык после того, как структура уже ясна; не начинать дизайн с выбора паттерна.
33
+ 4. Если smell и паттерн конфликтуют с границами слоёв стека — побеждают stack boundaries и existing repo patterns.
34
+ 5. Не требовать переименования «под GoF», если поведение уже корректно и читаемо.
35
+
36
+ ## Code smells (Fowler, curated ≤12)
37
+
38
+ Таблица: smell → detect hint → fix hint (одна линия каждый). Без механических меню рефакторинга.
39
+
40
+ | # | Smell | Detect | Fix hint |
41
+ |---|-------|--------|----------|
42
+ | 1 | Duplicate Code | одинаковая логика в ≥2 местах | dedupe после Rule of Three |
43
+ | 2 | Long Method / Long Module | единица делает слишком много | extract в рамках scope; без big rewrite |
44
+ | 3 | Feature Envy | метод чаще трогает чужие данные, чем свои | сдвинуть логику к данным / public API |
45
+ | 4 | Data Clumps | одни и те же группы аргументов кочуют вместе | сгруппировать в type / value object |
46
+ | 5 | Primitive Obsession | сырые string/int вместо доменных понятий | typed ids / value objects при нужде домена |
47
+ | 6 | Speculative Generality | неиспользуемые хуки, флаги, абстракции «на будущее» | удалить (YAGNI) |
48
+ | 7 | Message Chains | цепочки `a.b.c.d` | Demeter; facade / public API модуля |
49
+ | 8 | Middle Man | класс почти только прокидывает вызовы | убрать pass-through **или** оставить как boundary |
50
+ | 9 | Divergent Change | один модуль меняется по разным причинам | split по поводам изменения |
51
+ | 10 | Shotgun Surgery | одно смысловое изменение разъезжается по многим файлам | consolidate ответственность |
52
+ | 11 | Inappropriate Intimacy | доступ к чужим internals / private деталям | только public API / ports / facades |
53
+ | 12 | Refused Bequest / Parallel Inheritance | подтип игнорирует базу; зеркальные иерархии классов | composition; не плодить параллельные деревья |
54
+
55
+ **Skip Fowler (не в core):** Lazy Class, Incomplete Library Class, Comments-as-smell dogma, полный каталог 70+, пошаговые recipe-меню.
56
+
57
+ Приоритет при конфликте smells: Inappropriate Intimacy и Message Chains (границы модулей) > Duplicate Code (после Rule of Three) > Long Method внутри уже правильного модуля.
58
+
59
+ ## Design patterns (GoF, curated ≤8)
60
+
61
+ Suggest only when repo already uses the shape or the match is minimal. Prefer extract-function over naming Strategy ради ярлыка.
62
+
63
+ Паттерны ниже — **разрешённый минимум** для агентов; остальной GoF по умолчанию в Skip.
64
+
65
+ | Pattern | When to suggest | Anti-trigger |
66
+ |---------|-----------------|--------------|
67
+ | Strategy | взаимозаменяемые алгоритмы уже (или явно скоро) выбираются политикой | один алгоритм без ветвления политики |
68
+ | Adapter | обернуть внешний / чужой API под локальный port | лишняя обёртка вокруг своего же API |
69
+ | Facade | упростить multi-step subsystem за public API | facade превращается в god-object |
70
+ | Factory Method | полиморфное создание уже принято в стиле репо | factory на каждый тривиальный `new` |
71
+ | Decorator | аддитивное поведение без взрыва subclass-иерархий | decorator «для слоёв» без реальной нужды |
72
+ | Observer | events / subscriptions уже есть в архитектуре | самодельный pub/sub без прецедента в репо |
73
+ | Template Method | общий algorithm skeleton + вариативные hooks | наследование ради пары отличающихся строк |
74
+ | Composite | дерево однородных узлов (UI/domain), как уже в репо | Composite на плоский список без иерархии |
75
+
76
+ Если сомневаешься между двумя паттернами — выбери более простой extract/compose без имени; ярлык можно добавить на review, если репо уже так говорит.
77
+
78
+ ## Skip / avoid by default
79
+
80
+ | Catalog | Skip |
81
+ |---------|------|
82
+ | GoF | Singleton, Abstract Factory, Flyweight, Memento, Interpreter, Visitor, Bridge, Prototype |
83
+ | GoF (conditional) | Command, Chain of Responsibility, State — упоминать **только если** репо уже использует |
84
+ | Fowler | всё сверх 12 smells выше |
85
+ | DDD | Aggregates, bounded-context maps, event sourcing, CQRS — **не в core** |
86
+ | DDD (pointer) | ubiquitous language anti-pattern — расширять в `feature-delivery-workflow`, не здесь |
87
+ | GRASP | список Larman как отдельные правила — skip (перекрывается SOLID/CUPID) |
88
+ | Clean Code dogma | жёсткие caps на строки функции / «ровно один assert» — skip |
89
+
90
+ Не вводить второй stem (`refactoring-smells` / `design-patterns-for-agents`) — один каталог: `design-guidance`.
91
+
92
+ ## Out of scope for this stem
93
+
94
+ - Полный GoF (23) и полный Fowler catalog.
95
+ - Stack-specific рецепты (пути модулей, lint-команды) — только в **Stack notes** адаптера.
96
+ - Security, a11y, perf — отдельные review-правила; здесь только структурные smells/patterns.
97
+ - Четвёртое always-on правило — запрещено; этот stem только requestable / agent-load.
98
+
99
+ ## Cross-refs
100
+
101
+ - Always-on Principles: `code-quality-and-refactoring`.
102
+ - DIP / ports vs adapters: stack `architecture-boundaries` (детали стека — в Stack notes адаптеров).
103
+ - Ubiquitous language: `feature-delivery-workflow` (lineage).
104
+ - MR checklist (smells in scope; pattern name only if repo uses it): `code-review-mr`.
105
+ - Token / twin policy for authors: `preset-token-budget`, `preset-twin-sync` (meta, not consumer always-on).
106
+ ## Stack notes
107
+
108
+ - Apply smells to MCP registration modules, handlers, and schema duplication — not UI components.
109
+ - Prefer extract-handler / extract-schema over introducing hexagonal layers the repo does not use.
@@ -0,0 +1,31 @@
1
+ ---
2
+ description: Discover package manager; typecheck/test/Inspector commands for MCP TS
3
+ paths:
4
+ - package.json
5
+ - tsconfig*.json
6
+ - **/vitest.config.*
7
+ - **/jest.config.*
8
+ - **/eslint.config.*
9
+ ---
10
+
11
+ # Tooling (mcp-ts)
12
+
13
+ Discover package manager **before** running scripts:
14
+
15
+ 1. `packageManager` in `package.json`
16
+ 2. Lockfile: `yarn.lock` → yarn; `pnpm-lock.yaml` → pnpm; `package-lock.json` → npm; `bun.lock(b)` → bun
17
+ 3. Use **only** that manager for install/run
18
+
19
+ ## Typical gates (adapt to repo scripts)
20
+
21
+ | Gate | Discovery |
22
+ |------|-----------|
23
+ | Typecheck | `tsc --noEmit` or script `typecheck` / `build` that typechecks |
24
+ | Test | script `test` / `test:unit` / Vitest / Jest / `node:test` |
25
+ | Lint | project ESLint if configured — never invent Next `lint:js`/`lint:css` as required |
26
+ | Inspector | optional smoke — not required for every change |
27
+
28
+ ## Agent requirement
29
+
30
+ - Do not hard-code `yarn` if the repo uses pnpm/npm/bun.
31
+ - Never require Go tools (`go test` / `go vet`), `xcodebuild`, or Playwright as this stack's gate.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Mandatory typecheck + tests after TypeScript MCP edits
3
+ paths:
4
+ - src/**/*.ts
5
+ - src/**/*.tsx
6
+ - package.json
7
+ - **/*.{test,spec}.ts
8
+ ---
9
+
10
+ # Post-change test (requestable, mandatory after TS MCP edits)
11
+
12
+ After changing TypeScript / package manifests in a consumer MCP server repo:
13
+
14
+ 1. Discover package manager (`mcp-ts-tooling`).
15
+ 2. Run **typecheck** (project script or `tsc --noEmit`).
16
+ 3. Run **tests** scoped to touched packages/files when possible; full suite before claiming done.
17
+ 4. Optional: MCP Inspector smoke for registration changes — not a hard gate.
18
+
19
+ ## Scope hints
20
+
21
+ - Schema-only changes: include contract/schema fixture tests.
22
+ - Handler changes: unit tests for valid/invalid inputs and error mapping.
23
+ - Packaging/`bin` changes: verify entry still starts under stdio (manual or smoke).
24
+
25
+ ## Agent requirement
26
+
27
+ - Do not claim completion without running the applicable gate (or noting why CI-only).
28
+ - Pipeline `build-verifier` enforces the same checklist.
29
+ - Skip only when the change is docs/config with no `*.ts` / package impact — state that explicitly.
30
+ - Never require Playwright, XCUITest, Next lint recipes, or Go toolchains.
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-layering)
3
+ paths:
4
+ - packages/ai-rules/presets/**/*
5
+ - .claude/**/*
6
+ - .cursor/rules/**/*
7
+ - .cursor/team/tasks/**/*
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
+ paths:
4
+ - packages/ai-rules/presets/**/*
5
+ - .claude/**/*
6
+ - .cursor/rules/**/*
7
+ - .cursor/team/tasks/**/*
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
+ paths:
4
+ - packages/ai-rules/presets/**/*
5
+ - .claude/**/*
6
+ - .cursor/rules/**/*
7
+ - .cursor/team/tasks/**/*
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