@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,80 @@
1
+ #!/usr/bin/env bash
2
+ # Lightweight shell guard for Laravel preset projects.
3
+ # PHP: do NOT blanket-block php artisan test / composer test / compiler/IDE inspections / configured static analysis / repo static analysis.
4
+ # Package-manager mismatch checks apply only when a JS lockfile/package.json exists.
5
+
6
+ set -euo pipefail
7
+ # PHP_PRESET_GUARD: allow composer/composer test; no Playwright/XCUITest assumptions
8
+
9
+ input=$(cat)
10
+
11
+ INPUT="$input" node <<'NODE'
12
+ const fs = require('fs');
13
+
14
+ const raw = process.env.INPUT || '';
15
+ let event;
16
+ try {
17
+ event = JSON.parse(raw);
18
+ } catch {
19
+ process.stdout.write('{ "permission": "allow" }');
20
+ process.exit(0);
21
+ }
22
+
23
+ const command = String(event.command || event.input?.command || '');
24
+ if (!command.trim()) {
25
+ process.stdout.write('{ "permission": "allow" }');
26
+ process.exit(0);
27
+ }
28
+
29
+ function out(permission, userMessage, agentMessage) {
30
+ process.stdout.write(JSON.stringify({
31
+ permission,
32
+ user_message: userMessage,
33
+ agent_message: agentMessage || userMessage,
34
+ }));
35
+ }
36
+
37
+ const dangerousGit = /\bgit\s+(reset\s+--hard|clean\s+-[^\n]*f|push\s+--force|push\s+-f|checkout\s+--\s+)/;
38
+ if (dangerousGit.test(command)) {
39
+ out(
40
+ 'ask',
41
+ 'This command looks destructive for git state. Review it before continuing.',
42
+ 'A project hook flagged a destructive git command. Ask the user before running it.',
43
+ );
44
+ process.exit(0);
45
+ }
46
+
47
+ const managerByFile = [
48
+ ['yarn.lock', 'yarn'],
49
+ ['pnpm-lock.yaml', 'pnpm'],
50
+ ['package-lock.json', 'npm'],
51
+ ].find(([file]) => fs.existsSync(file));
52
+
53
+ let expected = managerByFile?.[1];
54
+ if (!expected && fs.existsSync('package.json')) {
55
+ try {
56
+ const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
57
+ const pm = typeof pkg.packageManager === 'string' ? pkg.packageManager : '';
58
+ expected = pm.split('@')[0] || undefined;
59
+ } catch {
60
+ // Ignore invalid package.json in the hook; the agent can diagnose it later.
61
+ }
62
+ }
63
+
64
+ if (!expected) {
65
+ process.stdout.write('{ "permission": "allow" }');
66
+ process.exit(0);
67
+ }
68
+
69
+ const used = command.match(/(^|[;&|]\s*)(npm|yarn|pnpm)\s+/)?.[2];
70
+ if (used && used !== expected) {
71
+ out(
72
+ 'ask',
73
+ `This repository appears to use ${expected}, but the command uses ${used}. Confirm before continuing.`,
74
+ `Use ${expected} for package scripts and installs unless the user explicitly approves ${used}.`,
75
+ );
76
+ process.exit(0);
77
+ }
78
+
79
+ process.stdout.write('{ "permission": "allow" }');
80
+ NODE
@@ -0,0 +1,17 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "beforeShellExecution": [
5
+ {
6
+ "command": ".cursor/hooks/guard-shell-command.sh",
7
+ "failClosed": true
8
+ }
9
+ ],
10
+ "subagentStop": [
11
+ {
12
+ "command": ".cursor/hooks/chain-team-phases.sh",
13
+ "loop_limit": 15
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "mcpServers": {
3
+ "context7": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "@upstash/context7-mcp"
8
+ ]
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,111 @@
1
+ # Rules (preset php-laravel)
2
+
3
+ ## alwaysApply (3)
4
+
5
+ | Rule | Role |
6
+ |------|------|
7
+ | `laravel-app-core` | Stack + layout (Laravel `app/`, routes, artisan) |
8
+ | `architecture-boundaries` | Laravel layer invariants |
9
+ | `code-quality-and-refactoring` | Shared quality + Laravel Stack notes |
10
+
11
+ **Session-start body budget:** sum of the 3 always-on bodies ≤ **140** lines (stretch ≤120).
12
+
13
+ ## Twin depth (Cursor↔Claude)
14
+
15
+ - **Domain** rules: target ≥15 non-empty body lines (FAIL soft when undocumented stubs).
16
+ - **Thin aliases** (may be shorter): `agent-team-intake`, `technical-retro`, `domain-layer` (modular note only).
17
+ - **Not shipped in v1:** `api-grpc`, `messaging-adapters`, hexagonal ports/adapters stems (`ports-interfaces`, `adapters-*`, `composition-root`, `api-http`, `persistence-adapters`, `application-usecases`, `php-app-core`, `php-conventions`).
18
+
19
+ ## Loading strategy
20
+
21
+ - **`alwaysApply: true`** (Cursor) / **без `paths:`** (Claude) — только базовые инварианты (**3**): `laravel-app-core`, `architecture-boundaries`, `code-quality-and-refactoring`
22
+ - **On-demand / requestable** — `post-change-test`, `php-tooling`, Laravel domain rules, tests, feature-delivery-workflow, reference-features, `design-guidance`, `anti-sycophancy-discipline`, `technical-retro`, agent-team
23
+ - **Preset author meta** (globs `packages/ai-rules/presets/**`, never alwaysApply): `preset-layering`, `preset-twin-sync`, `preset-token-budget`, `preset-pr-checklist`, `preset-no-cross-stack-leakage`
24
+ - **Skills** — `feature-delivery`, `code-review`, `integration-testing`, `unit-testing`, …
25
+
26
+ ### Laravel edit bundles
27
+
28
+ | When editing | Load |
29
+ |--------------|------|
30
+ | `app/Http/**`, Resources | `http-layer` + `form-requests` + `architecture-boundaries` |
31
+ | `routes/**` | `routes-api` |
32
+ | `app/Models/**`, migrations | `eloquent-persistence` |
33
+ | `app/Actions/**`, `app/Services/**` | `actions-services` |
34
+ | `app/Providers/**` | `service-providers` |
35
+ | `app/Policies/**` | `policies-authorization` |
36
+ | `app/Jobs/**` | `jobs-queues` |
37
+ | `app/Events/**`, `app/Listeners/**` | `events-listeners` |
38
+ | After `*.php` edits | `post-change-test` (+ `php-tooling`) |
39
+
40
+ ## Shared core → stack mapping
41
+
42
+ SoT prose: `packages/ai-rules/presets/_shared/core/**` (see `_shared/README.md`). Adapters carry `<!-- shared-core: … -->`.
43
+
44
+ | Shared core | This stack adapter | Mode | Delta |
45
+ |-------------|--------------------|------|-------|
46
+ | `quality/code-quality-and-refactoring.md` | `code-quality-and-refactoring.mdc` | embed | Stack notes: Laravel Actions/Models/Providers, `post-change-test` |
47
+ | `quality/anti-sycophancy-discipline.md` | `anti-sycophancy-discipline.mdc` | embed | requestable full VERIFY/discipline set |
48
+ | `quality/design-guidance.md` | `design-guidance.mdc` | embed | requestable smells/GoF; Laravel Stack notes |
49
+ | `agent-team/agent-team-orchestrator.md` | `agent-team-orchestrator.mdc` | lineage | Roles (`integration-test-*`); preset PR pointer |
50
+ | `agent-team/agent-team-intake.md` | `agent-team-intake.mdc` | embed | thin alias |
51
+ | `architecture/feature-delivery-workflow.md` | `feature-delivery-workflow.mdc` | lineage | Laravel checklist |
52
+ | `architecture/reference-features.template.md` | `reference-features.mdc` | lineage | `dogfood/php-laravel` path table + scenarios |
53
+ | `review/code-review-mr.md` | `code-review-mr.mdc` | embed | Laravel checklist |
54
+ | `review/technical-retro.md` | `technical-retro.mdc` | embed | thin alias |
55
+ | `meta/preset-*.md` | `preset-*.mdc` | embed | author-only globs (incl. `preset-no-cross-stack-leakage`) |
56
+
57
+ Claude twins + Cursor→Claude map: `presets/claude/php-laravel/rules/README.md`. Cross-stack leakage policy: `preset-no-cross-stack-leakage`.
58
+
59
+ Compare with framework-agnostic hexagonal: installable id **`php-hexagonal`** (ports & adapters). This preset is **Laravel-first**.
60
+
61
+ ## Catalog
62
+
63
+ | Stem | Depth | Notes |
64
+ |------|-------|-------|
65
+ | `laravel-app-core` | full | always-on |
66
+ | `architecture-boundaries` | full | always-on |
67
+ | `code-quality-and-refactoring` | full | always-on + shared embed |
68
+ | `anti-sycophancy-discipline` | full | requestable embed |
69
+ | `design-guidance` | full | requestable embed; Laravel Stack notes |
70
+ | `feature-delivery-workflow` | full | Laravel checklist + matrix |
71
+ | `reference-features` | full | `dogfood/php-laravel` path table |
72
+ | `agent-team-orchestrator` | full | Roles table (21) + `integration-test-*` |
73
+ | `code-review-mr` | full | Laravel Stack notes checklist |
74
+ | `preset-*` (×5) | full | author meta |
75
+ | `agent-team-intake` | thin-alias | |
76
+ | `technical-retro` | thin-alias | |
77
+ | `domain-layer` | thin-alias | modular/`app/Domain` note only |
78
+ | `http-layer` | full | Controllers / Resources |
79
+ | `form-requests` | full | validation edge |
80
+ | `routes-api` | full | `routes/api.php` / `web.php` |
81
+ | `eloquent-persistence` | full | Models / migrations |
82
+ | `actions-services` | full | application logic |
83
+ | `service-providers` | full | container wiring |
84
+ | `policies-authorization` | full | Policies / gates |
85
+ | `jobs-queues` | full | queued Jobs |
86
+ | `events-listeners` | full | Events / Listeners |
87
+ | `laravel-conventions` | full | idiomatic Laravel/PHP |
88
+ | `module-public-api` | full | package/module boundaries |
89
+ | `php-tooling` | full | artisan / Composer / Pint discovery |
90
+ | `post-change-test` | full | requestable gate |
91
+ | `security-php` | full | Laravel auth/csrf/mass-assignment |
92
+ | `tests-unit` | full | PHPUnit / Pest |
93
+ | `tests-integration` | full | Feature tests; integration-test-* |
94
+ | `tests-e2e` | full | optional smoke |
95
+
96
+ **Всего topic `.mdc`:** 29 domain + 5 preset-meta (без README) = 34.
97
+
98
+ ## Defaults (human-locked)
99
+
100
+ - Laravel-first; flat `app/` default; Laravel **11+** / PHP **8.2+** baseline in Stack notes (read versions from target `composer.json`)
101
+ - gRPC / messaging adapter stems **dropped** in v1 (use Jobs/Queues/Events)
102
+ - Dogfood sample: `dogfood/php-laravel` (full Laravel via create-project)
103
+ - MCP = Context7 only
104
+ - Static analysis / format = discover from repo/CI
105
+ - Coexists with **`php-hexagonal`** — distinct install id; do not register legacy id `php`
106
+
107
+ ## Metrics policy mapping
108
+
109
+ | Shared core | Runtime integration | Loading |
110
+ |-------------|---------------------|---------|
111
+ | `agent-team/agent-task-metrics.md` | `agent-team-orchestrator` + `hooks/chain-team-phases.sh` | requestable/on-demand; never session-start |
@@ -0,0 +1,33 @@
1
+ ---
2
+ description: Laravel Actions and Services for application logic
3
+ globs:
4
+ - "**/Actions/**/*"
5
+ - "**/Services/**/*"
6
+ alwaysApply: false
7
+ ---
8
+
9
+
10
+ # Actions / Services
11
+
12
+ - Prefer **single-purpose Actions** (`CreateTodo`, `CompleteTodo`) for one use case; **Services** for multi-step orchestration shared across entry points.
13
+ - Accept primitives / arrays / domain value objects — **not** Form Requests or `Request` objects.
14
+ - Persist via Eloquent (or a justified repository); dispatch Jobs/Events for side effects.
15
+ - Keep methods small and named after the business verb; avoid god `TodoService` with every CRUD method unless the repo already uses that shape.
16
+ - Transaction boundaries: `DB::transaction` in the Action/Service when multiple writes must commit together.
17
+
18
+ ## Structure
19
+
20
+ - `app/Actions/<Feature>/CreateX.php` or flat `app/Actions/CreateX.php` — match neighbors.
21
+ - Invokable `__invoke` or explicit `handle` / `execute` — follow existing style; do not invent a new Action base class mid-feature.
22
+ - Repository interfaces only when multiple backends or heavy test seams justify them (fold of hexagonal ports — not required).
23
+
24
+ ## Testing
25
+
26
+ - Unit-test Actions with fakes/mocks when pure enough; Feature tests cover HTTP → Action → DB happy path.
27
+ - Assert Job/Event dispatch with `Bus::fake` / `Event::fake` when side effects are in scope.
28
+
29
+ ## Forbidden
30
+
31
+ - HTTP status codes / Resources inside Actions.
32
+ - Fat Actions that also validate Form Request rules (validation stays at HTTP edge).
33
+ - Skipping Actions to put business SQL directly in controllers “for speed”.
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: Suggest /task for PHP backend work requests
3
+ alwaysApply: false
4
+ ---
5
+
6
+ <!-- shared-core: agent-team/agent-team-intake.md -->
7
+
8
+ # Agent team intake
9
+
10
+ When the user message looks like a **work request** (implement, add, fix, refactor, review MR, write tests, spike) — not a question about how code works:
11
+
12
+ 1. Prefer **`/task <their request>`** or invoke **task-router** first.
13
+ 2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
14
+ 3. Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
15
+
16
+ Exceptions: user explicitly says «без pipeline», «просто сделай», or continues an active slug.
17
+
18
+ ## Stack notes
19
+
20
+ - Scope: Laravel (`app/**`, `routes/**`, `tests/**`) — Controllers, Actions/Services, Eloquent, Policies — not Playwright/XCUITest UI flows.
@@ -0,0 +1,178 @@
1
+ ---
2
+ description: Orchestrates the agent team via task-router and pipeline.json for PHP presets
3
+ alwaysApply: false
4
+ ---
5
+
6
+ <!-- shared-core: agent-team/agent-team-orchestrator.md -->
7
+
8
+ # Agent team orchestrator
9
+
10
+ Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.cursor/team/tasks/<slug>/` (Claude: `.claude/team/tasks/<slug>/`).
11
+
12
+ Work request без `/task` — см. **agent-team-intake** (когда предлагать router вместо прямого кодинга).
13
+
14
+ ## Entry points
15
+
16
+ | Command | When |
17
+ |---------|------|
18
+ | **`/task <desc>`** | **Preferred** — router → dynamic pipeline → first agent |
19
+ | `/task-continue <slug>` | After human gate or pause |
20
+ | `/feature-start <desc>` | Legacy: analyst-only start (no router) |
21
+ | `/feature-continue <slug>` | Alias of task-continue |
22
+ | `/technical-retro [slug]` | Retro with agent team block |
23
+
24
+ ## Roles (shared catalog)
25
+
26
+ 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:
27
+
28
+ | Kind | Examples (names vary by stack) |
29
+ |------|--------------------------------|
30
+ | Planning | `task-router`, `task-analyst`, `solution-architect`, `migration-specialist` |
31
+ | Implementation | `feature-developer`, `debugger`, `ci-investigator` |
32
+ | Gates / review | `build-verifier`, `code-reviewer`, `security-reviewer`, `performance-auditor` (no `accessibility-reviewer`) |
33
+ | Tests | unit planner/generator/healer; e2e/UI planner/generator/healer (stack-native) |
34
+ | Docs | `tech-writer` |
35
+
36
+ **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`.
37
+
38
+ Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`.
39
+
40
+ ## Dynamic pipeline
41
+
42
+ ```mermaid
43
+ flowchart TD
44
+ task["/task prompt"]
45
+ router["task-router"]
46
+ pipeline["pipeline.json"]
47
+ step0["steps 0..N"]
48
+ gate{"humanGates?"}
49
+ hook["subagentStop hook"]
50
+ retro["/technical-retro"]
51
+
52
+ task --> router
53
+ router --> pipeline
54
+ pipeline --> step0
55
+ step0 --> gate
56
+ gate -->|"/task-continue"| step0
57
+ step0 --> hook
58
+ hook --> step0
59
+ step0 --> retro
60
+ ```
61
+
62
+ **Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
63
+
64
+ ## Metrics lifecycle
65
+
66
+ 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`.
67
+
68
+ ## status.json (pipeline mode)
69
+
70
+ ```json
71
+ {
72
+ "slug": "...",
73
+ "intent": "feature",
74
+ "pipelineIndex": 0,
75
+ "currentAgent": "task-analyst",
76
+ "phase": "executing",
77
+ "state": "in_progress",
78
+ "awaitingHumanGate": false
79
+ }
80
+ ```
81
+
82
+ | state | Meaning |
83
+ |-------|---------|
84
+ | `in_progress` | Current step running |
85
+ | `completed` | Current step done; hook advances |
86
+ | `awaiting_approval` | Human gate; wait for `/task-continue` |
87
+ | `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
88
+ | `validation_failed` | build-verifier failed; re-run developer then build-verifier |
89
+
90
+ ## Pipeline step options
91
+
92
+ | Field | Use |
93
+ |-------|-----|
94
+ | `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
95
+ | `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
96
+ | `scope` | e.g. `unit-in-dev`, `e2e-only`, `preset-artifacts-only` — passed to developer/qa |
97
+ | `model` | `cheap` \| `standard` \| `strong` — optional tier override |
98
+
99
+ ## Rules (strict)
100
+
101
+ 1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline).
102
+ 2. Read `pipeline.json` before every subagent invocation.
103
+ 3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
104
+ 4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
105
+ 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`).
106
+ 6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
107
+ 7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
108
+ 8. When all steps complete, suggest `/technical-retro <slug>`.
109
+ 9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
110
+
111
+ ## Team artifact I/O (Cursor Shell sandbox)
112
+
113
+ - 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).
114
+ - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
115
+ - Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
116
+
117
+ ## Invoking agents
118
+
119
+ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
120
+
121
+ ### Model when invoking (Task)
122
+
123
+ 1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
124
+ 2. Map abstract tiers:
125
+ - **`cheap`** → pass Task `model: "fast"` when the tool accepts it (or rely on agent `fast`).
126
+ - **`standard`** → omit Task `model` (frontmatter `inherit` / mid default).
127
+ - **`strong`** → **never** pass `fast`; rely on agent pin or parent Max model.
128
+ 3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
129
+
130
+ After each agent completes, ensure `status.json` has `state: completed` (or `awaiting_approval` if gate applies).
131
+
132
+ ## Legacy mode
133
+
134
+ If `pipeline.json` is missing (old `/feature-start` tasks), fall back to fixed phases: analysis → development → review → testing. Hook supports both.
135
+
136
+ ## Skip pipeline when
137
+
138
+ Do **not** run `/task` + router for:
139
+
140
+ - Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** for deep traces; inline OK for trivial one-liners.
141
+ - Typo / one-file fix / trivial config with no architecture risk.
142
+ - User explicitly says «без pipeline», «просто сделай», or continues an active slug.
143
+ - Single-line `docs-only` with no code impact.
144
+
145
+ Borderline work requests — см. **agent-team-intake**.
146
+
147
+ ## Auto-detection (optional)
148
+
149
+ When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
150
+
151
+ ## Preset authoring
152
+
153
+ 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**.
154
+
155
+ ## Stack notes
156
+
157
+ ### Roles (Laravel — 21 agents)
158
+
159
+ | Kind | Agents | Writes |
160
+ |------|--------|--------|
161
+ | Planning | `task-router`, `task-analyst`, `solution-architect` | team only |
162
+ | Analysis | `codebase-analyzer` | explain-as-is only |
163
+ | Implementation | `feature-developer`, `debugger`, `ci-investigator` | sources / minimal |
164
+ | Gates | `build-verifier` | `validation-report.md` only |
165
+ | Review | `code-reviewer`, `security-reviewer`, `performance-auditor`, `api-contract-reviewer`, `migration-specialist` | team / plans |
166
+ | Docs | `tech-writer` | docs |
167
+ | Unit tests | `unit-test-{planner,generator,healer}`, `qa-tester` | tests |
168
+ | Integration | `integration-test-{planner,generator,healer}` | Feature / HTTP-DB tests |
169
+
170
+ **No** `accessibility-reviewer`, Playwright, or XCUITest. Replace those intents with **`integration-test-*`**.
171
+
172
+ ### Handoffs / gates
173
+
174
+ - Scope: Laravel (`app/Http/**`, `app/Actions|Services/**`, `app/Models/**`, `app/Providers/**`, `routes/**`, `tests/**`) — not Next `app/src` or iOS `Features/`.
175
+ - After PHP code changes, pipeline includes **build-verifier** with `php artisan test` / `composer test` + `post-change-test` / `php-tooling` (static analysis only if repo/CI already configures it).
176
+ - **Risk-based security-reviewer:** schedule when the task touches auth/Policies/Gates/middleware, routes/HTTP bootstrap, Form Requests, mass assignment, Jobs/queues, config/secrets, uploads, or PII logging — see `task-router` § Security-reviewer routing. Parallel with `code-reviewer` is OK; document skip with an auditable reason when those surfaces are unaffected.
177
+ - Chain hook handoffs: `integration-test-*`, `post-change-test`, `php-tooling` — never `lint:js`, Playwright, XCUITest, or `xcodebuild`.
178
+ - Skills: `feature-delivery`, `unit-testing`, `integration-testing`, `ci-investigation`, `debug-investigation`, `code-review`, `technical-retro`, `write-adr`.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Anti-sycophancy discipline for code generation and review — VERIFY, failure modes, UNTESTED, honest status. Load when writing or changing code.
3
+ globs:
4
+ - "**/*.php"
5
+ alwaysApply: false
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).
@@ -0,0 +1,37 @@
1
+ ---
2
+ description: Laravel layer boundaries (HTTP, Actions/Services, Eloquent, Policies, Providers)
3
+ alwaysApply: true
4
+ ---
5
+
6
+
7
+ # Границы слоёв (Laravel)
8
+
9
+ - **HTTP** (`app/Http/**`, Resources):
10
+ - Может: Controllers, Form Requests, API Resources, Middleware; map to Actions/Services; authorize via Policies.
11
+ - Не должен: fat business SQL; multi-step orchestration; queue side effects without Jobs/Events.
12
+ - **Actions / Services** (`app/Actions/**`, `app/Services/**`):
13
+ - Может: single-purpose Actions; multi-step Services; Eloquent / domain helpers; dispatch Jobs/Events.
14
+ - Не должен: `Request` / Form Request types; HTTP status mapping; controller concerns.
15
+ - **Eloquent** (`app/Models/**`, migrations):
16
+ - Может: persistence-focused models, casts, relations, scopes.
17
+ - Не должен: request/HTTP leakage; AuthZ role checks that belong in Policies.
18
+ - **Policies** (`app/Policies/**`): AuthZ via Policies / gates — not ad-hoc role checks in controllers.
19
+ - **Providers** (`app/Providers/**`): bindings/singletons only — no business rules.
20
+ - **Jobs / Events / Listeners**: deferred / async side effects — not a substitute for clear sync Actions.
21
+
22
+ # Зависимости
23
+
24
+ - Направление: **HTTP → Actions/Services → Eloquent**; Policies at HTTP edge; Providers wire the container.
25
+ - Cross-module access — public APIs / facades only (`module-public-api`); no deep sibling imports.
26
+
27
+ # Edit bundles (load on matching paths)
28
+
29
+ - `app/Http/**`, Resources → `http-layer` + `form-requests` + `architecture-boundaries`
30
+ - `routes/**` → `routes-api`; `app/Models/**`, migrations → `eloquent-persistence`
31
+ - `app/Actions/**`, `app/Services/**` → `actions-services`; `app/Providers/**` → `service-providers`
32
+ - `app/Policies/**` → `policies-authorization`; `app/Jobs/**` → `jobs-queues`
33
+ - `app/Events/**`, `app/Listeners/**` → `events-listeners`; after `*.php` → `post-change-test` (+ `php-tooling`)
34
+
35
+ # Требование к агенту
36
+
37
+ - Класть файлы в правильный слой; thin controllers; DI wiring только в Providers.
@@ -0,0 +1,54 @@
1
+ ---
2
+ description: Code quality and light refactoring for Laravel backends
3
+ alwaysApply: true
4
+ ---
5
+
6
+ <!-- shared-core: quality/code-quality-and-refactoring.md -->
7
+
8
+ # Поддержка существующего стиля
9
+
10
+ - Следовать существующим паттернам (имена, структура, типизация / DI / error handling); минимизировать стилистический шум (лишний format/rename).
11
+ - Перед новым решением: искать аналог и **повторять подход**; проверять дизайн‑систему / UI‑пакеты; ходить только через **public API** (deep‑импорты — повод для рефакторинга).
12
+
13
+ # Принципы
14
+
15
+ - **KISS:** самое простое изменение в паттернах репозитория.
16
+ - **DRY + Rule of Three:** общее — только после 3-го повторения (ошибочная абстракция дороже дублирования).
17
+ - **YAGNI:** без API, флагов, слоёв «на будущее» без текущего требования.
18
+ - **SOLID:** S — один повод менять; O — композиция/новые реализации; L — контракт подтипа; I — узкие порты; D — абстракции (порты), детали в адаптерах стека.
19
+ - **CUPID:** Composable; Unix philosophy (одна ответственность); Predictable; Idiomatic (репо); Domain-based.
20
+ - **Composition over inheritance;** Law of Demeter — без цепочек `a.b.c.d`; через public API / facade.
21
+
22
+ # Рефакторинг при изменениях
23
+
24
+ - Лёгкий refactor OK, если меньше дублирования, выше читаемость, без ломки публичных контрактов.
25
+ - Примеры: общая утилита/хук/mapper/use case; сузить unsafe-типы; разбить крупный модуль; токены вместо «магии»; deep‑импорт → public API.
26
+ - Не делать «большой» рефакторинг на точечной задаче (структура/публичные имена без запроса). Крупное — минимальными шагами; код остаётся собираемым.
27
+
28
+ # Требование к агенту
29
+
30
+ - **Boy scout:** оставлять модуль немного лучше; не жертвовать архитектурой и слоями ради краткости.
31
+
32
+ ## Agent discipline (anti-sycophancy)
33
+
34
+ Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-discipline`**.
35
+
36
+ - Unverifiable third-party API → mark `// VERIFY: lib.symbol @ version` (or stack equivalent); never invent signatures.
37
+ - Before «is this correct?» — ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
38
+ - Refactor without tests → propose characterization test; if declined, label `UNTESTED`.
39
+ - Comments = WHY only when non-obvious; ban self-referential «added for issue Y».
40
+ - Urgency/authority: name the trade-off once, then comply — no apology loops.
41
+ - Match verification to risk; report by what was **verified**, not attempted.
42
+
43
+ Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
44
+
45
+ > Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
46
+
47
+ ## Stack notes
48
+
49
+ - **No UI layer in this preset** — ignore shared-core bullets about дизайн‑система / UI‑пакеты / CSS‑токены; apply public-API and boy-scout rules to Laravel Actions/Models/Providers instead.
50
+ - Prefer thin controllers + single-purpose Actions; Services for multi-step orchestration — avoid fat controllers and god Services.
51
+ - Repository interfaces **only when justified** (multiple backends / test seams) — not required for every Eloquent model.
52
+ - Prefer Laravel exceptions + Form Request / Policy mapping at the HTTP edge; do not leak raw persistence exceptions as HTTP bodies.
53
+ - Post-change gate: **`post-change-test.mdc`** + **`php-tooling.mdc`** (`php artisan test` / `composer test` — not yarn lint / xcodebuild / Playwright).
54
+ - Style/static analysis: use **repository/CI** Pint/PHPStan/Psalm — do not invent a parallel bible in rules.
@@ -0,0 +1,56 @@
1
+ ---
2
+ description: Code review checklist for Laravel merge requests
3
+ alwaysApply: false
4
+ ---
5
+
6
+ <!-- shared-core: review/code-review-mr.md -->
7
+
8
+ # Code review merge requests
9
+
10
+ On-demand rule for review flows. **Procedure and output format:** skill `code-review`.
11
+
12
+ ## When to load
13
+
14
+ - User asks for review/MR/diff
15
+ - Pipeline step `code-reviewer`
16
+ - Platform automated review (e.g. BUGBOT) when present
17
+
18
+ ## Checklist references (abstract)
19
+
20
+ - Architecture layers and stack core rules
21
+ - Public imports / module boundaries
22
+ - UI conventions of the stack
23
+ - Unit and e2e/UI test conventions
24
+ - Post-change lint/build gate before final report
25
+ - Design smells **in MR diff scope** — load `design-guidance`; не разворачивать полный каталог Fowler вне диффа
26
+ - Pattern name (GoF) — только если репозиторий уже использует эту форму или match минимален
27
+ - Principles (KISS / DRY+Ro3 / YAGNI / SOLID / CUPID) — через always-on `code-quality-and-refactoring`, не дублировать эссе в review
28
+
29
+ Concrete rule stems — in **Stack notes**.
30
+
31
+ ## Constraints
32
+
33
+ - Focus on MR diff, not the whole repo.
34
+ - Use local `git diff` — do not invent hosting metadata.
35
+ - Boy scout rule: suggest fixes feasible within the MR scope.
36
+ - No «большие рефакторинги» without an explicit request (`code-quality-and-refactoring`).
37
+
38
+ ## Output contract
39
+
40
+ Procedure details live in skill `code-review`. Required shape:
41
+
42
+ - Each finding cites **`path:line`**, the problem, impact, and a concrete fix direction.
43
+ - Rank by severity: **`blocker` | `important` | `nit`** (list blocker → nit).
44
+ - Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
45
+ - End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
46
+
47
+ ## Stack notes
48
+
49
+ - Laravel boundaries: `architecture-boundaries` — HTTP → Actions/Services → Eloquent; Policies at the edge; Providers wire only.
50
+ - HTTP edge: `http-layer`, `form-requests`, `routes-api` — thin Controllers, Form Request validation, API Resources.
51
+ - Application + persistence: `actions-services`, `eloquent-persistence`, `policies-authorization`, `service-providers`.
52
+ - Paths: `app/Http/**`, `app/Actions|Services/**`, `app/Models/**`, `app/Policies/**`, `app/Providers/**`, `routes/**`.
53
+ - Tests: `tests-unit` (Actions/pure PHP); `tests-integration` (Feature HTTP/DB); post-change: `post-change-test` / `php-tooling`.
54
+ - Security: secrets/PII/`security-php`; AuthZ via Policies — not ad-hoc role checks in Controllers/Models.
55
+ - Never require Playwright, XCUITest, `lint:js`, or `xcodebuild` for Laravel MRs.
56
+