@bonesofspring/ai-rules 0.2.11 → 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 (530) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +5 -1
  3. package/bin/cli.js +4 -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 +5 -5
  10. package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
  11. package/presets/_shared/core/meta/preset-twin-sync.md +4 -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 +5 -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 +4 -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 +5 -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 +4 -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 +5 -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 +4 -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/agents/build-verifier.md +2 -2
  56. package/presets/claude/mcp-ts/agents/task-router.md +4 -0
  57. package/presets/claude/mcp-ts/commands/task-continue.md +21 -20
  58. package/presets/claude/mcp-ts/commands/task.md +4 -0
  59. package/presets/claude/mcp-ts/commands/technical-retro.md +4 -0
  60. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +226 -26
  61. package/presets/claude/mcp-ts/rules/README.md +6 -0
  62. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +4 -0
  63. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +1 -1
  64. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
  65. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  66. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +4 -0
  67. package/presets/claude/mcp-ts/rules/tooling-and-review/technical-retro.md +2 -4
  68. package/presets/claude/mcp-ts/team/README.md +8 -0
  69. package/presets/claude/next/agents/build-verifier.md +3 -3
  70. package/presets/claude/next/agents/task-router.md +4 -0
  71. package/presets/claude/next/commands/task-continue.md +17 -16
  72. package/presets/claude/next/commands/task.md +4 -0
  73. package/presets/claude/next/commands/technical-retro.md +4 -0
  74. package/presets/claude/next/hooks/chain-team-phases.sh +226 -26
  75. package/presets/claude/next/rules/README.md +6 -0
  76. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +4 -0
  77. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +1 -1
  78. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
  79. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  80. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +4 -0
  81. package/presets/claude/next/rules/tooling-and-review/technical-retro.md +2 -0
  82. package/presets/claude/next/team/README.md +19 -0
  83. package/presets/claude/php-hexagonal/CLAUDE.md +31 -0
  84. package/presets/claude/php-hexagonal/MCP.md +15 -0
  85. package/presets/claude/php-hexagonal/README.md +26 -0
  86. package/presets/claude/php-hexagonal/REPO_AGENTS.md +46 -0
  87. package/presets/claude/php-hexagonal/agents/README.md +32 -0
  88. package/presets/claude/php-hexagonal/agents/api-contract-reviewer.md +23 -0
  89. package/presets/claude/php-hexagonal/agents/build-verifier.md +45 -0
  90. package/presets/claude/php-hexagonal/agents/ci-investigator.md +21 -0
  91. package/presets/claude/php-hexagonal/agents/code-reviewer.md +40 -0
  92. package/presets/claude/php-hexagonal/agents/codebase-analyzer.md +28 -0
  93. package/presets/claude/php-hexagonal/agents/debugger.md +29 -0
  94. package/presets/claude/php-hexagonal/agents/feature-developer.md +47 -0
  95. package/presets/claude/php-hexagonal/agents/integration-test-generator.md +22 -0
  96. package/presets/claude/php-hexagonal/agents/integration-test-healer.md +22 -0
  97. package/presets/claude/php-hexagonal/agents/integration-test-planner.md +22 -0
  98. package/presets/claude/php-hexagonal/agents/migration-specialist.md +31 -0
  99. package/presets/claude/php-hexagonal/agents/performance-auditor.md +22 -0
  100. package/presets/claude/php-hexagonal/agents/qa-tester.md +24 -0
  101. package/presets/claude/php-hexagonal/agents/security-reviewer.md +20 -0
  102. package/presets/claude/php-hexagonal/agents/solution-architect.md +28 -0
  103. package/presets/claude/php-hexagonal/agents/task-analyst.md +25 -0
  104. package/presets/claude/php-hexagonal/agents/task-router.md +73 -0
  105. package/presets/claude/php-hexagonal/agents/tech-writer.md +15 -0
  106. package/presets/claude/php-hexagonal/agents/unit-test-generator.md +21 -0
  107. package/presets/claude/php-hexagonal/agents/unit-test-healer.md +13 -0
  108. package/presets/claude/php-hexagonal/agents/unit-test-planner.md +26 -0
  109. package/presets/claude/php-hexagonal/commands/README.md +13 -0
  110. package/presets/claude/php-hexagonal/commands/feature-continue.md +51 -0
  111. package/presets/claude/php-hexagonal/commands/feature-start.md +30 -0
  112. package/presets/claude/php-hexagonal/commands/task-continue.md +50 -0
  113. package/presets/claude/php-hexagonal/commands/task.md +53 -0
  114. package/presets/claude/php-hexagonal/commands/technical-retro.md +62 -0
  115. package/presets/claude/php-hexagonal/hooks/README.md +16 -0
  116. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +582 -0
  117. package/presets/claude/php-hexagonal/hooks/examples/README.md +18 -0
  118. package/presets/claude/php-hexagonal/hooks/examples/format-edited.example.sh +11 -0
  119. package/presets/claude/php-hexagonal/hooks/examples/secret-guard.example.sh +10 -0
  120. package/presets/claude/php-hexagonal/hooks/examples/test-on-save.example.sh +19 -0
  121. package/presets/claude/php-hexagonal/hooks/guard-shell-command.sh +80 -0
  122. package/presets/claude/php-hexagonal/mcp.json +11 -0
  123. package/presets/claude/php-hexagonal/rules/README.md +67 -0
  124. package/presets/claude/php-hexagonal/rules/api-and-data/README.md +14 -0
  125. package/presets/claude/php-hexagonal/rules/api-and-data/adapters-driven.md +38 -0
  126. package/presets/claude/php-hexagonal/rules/api-and-data/adapters-driving.md +38 -0
  127. package/presets/claude/php-hexagonal/rules/api-and-data/api-grpc.md +29 -0
  128. package/presets/claude/php-hexagonal/rules/api-and-data/api-http.md +36 -0
  129. package/presets/claude/php-hexagonal/rules/api-and-data/messaging-adapters.md +37 -0
  130. package/presets/claude/php-hexagonal/rules/api-and-data/persistence-adapters.md +33 -0
  131. package/presets/claude/php-hexagonal/rules/architecture/README.md +16 -0
  132. package/presets/claude/php-hexagonal/rules/architecture/application-usecases.md +31 -0
  133. package/presets/claude/php-hexagonal/rules/architecture/boundaries.md +34 -0
  134. package/presets/claude/php-hexagonal/rules/architecture/composition-root.md +33 -0
  135. package/presets/claude/php-hexagonal/rules/architecture/domain-layer.md +37 -0
  136. package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +53 -0
  137. package/presets/claude/php-hexagonal/rules/architecture/module-public-api.md +31 -0
  138. package/presets/claude/php-hexagonal/rules/architecture/ports-interfaces.md +34 -0
  139. package/presets/claude/php-hexagonal/rules/architecture/reference-features.md +39 -0
  140. package/presets/claude/php-hexagonal/rules/stack/README.md +10 -0
  141. package/presets/claude/php-hexagonal/rules/stack/php-app-core.md +35 -0
  142. package/presets/claude/php-hexagonal/rules/stack/php-conventions.md +51 -0
  143. package/presets/claude/php-hexagonal/rules/testing/README.md +11 -0
  144. package/presets/claude/php-hexagonal/rules/testing/e2e.md +35 -0
  145. package/presets/claude/php-hexagonal/rules/testing/integration.md +31 -0
  146. package/presets/claude/php-hexagonal/rules/testing/unit.md +32 -0
  147. package/presets/claude/php-hexagonal/rules/tooling-and-review/README.md +21 -0
  148. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +26 -0
  149. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +183 -0
  150. package/presets/claude/php-hexagonal/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  151. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +53 -0
  152. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +60 -0
  153. package/presets/claude/php-hexagonal/rules/tooling-and-review/design-guidance.md +111 -0
  154. package/presets/claude/php-hexagonal/rules/tooling-and-review/php-tooling.md +39 -0
  155. package/presets/claude/php-hexagonal/rules/tooling-and-review/post-change-test.md +31 -0
  156. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +36 -0
  157. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +69 -0
  158. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  159. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +41 -0
  160. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +50 -0
  161. package/presets/claude/php-hexagonal/rules/tooling-and-review/security-php.md +29 -0
  162. package/presets/claude/php-hexagonal/rules/tooling-and-review/technical-retro.md +22 -0
  163. package/presets/claude/php-hexagonal/rules/ui-and-accessibility/README.md +5 -0
  164. package/presets/claude/php-hexagonal/skills/README.md +5 -0
  165. package/presets/claude/php-hexagonal/skills/ci-investigation/SKILL.md +11 -0
  166. package/presets/claude/php-hexagonal/skills/code-review/SKILL.md +25 -0
  167. package/presets/claude/php-hexagonal/skills/debug-investigation/SKILL.md +15 -0
  168. package/presets/claude/php-hexagonal/skills/feature-delivery/SKILL.md +30 -0
  169. package/presets/claude/php-hexagonal/skills/integration-testing/SKILL.md +15 -0
  170. package/presets/claude/php-hexagonal/skills/technical-retro/SKILL.md +54 -0
  171. package/presets/claude/php-hexagonal/skills/unit-testing/SKILL.md +14 -0
  172. package/presets/claude/php-hexagonal/skills/write-adr/SKILL.md +41 -0
  173. package/presets/claude/php-hexagonal/team/README.md +37 -0
  174. package/presets/claude/php-hexagonal/team/conventions.md +21 -0
  175. package/presets/claude/php-hexagonal/team/fixtures/bugfix-standard.json +37 -0
  176. package/presets/claude/php-hexagonal/team/fixtures/feature-full.json +25 -0
  177. package/presets/claude/php-hexagonal/team/fixtures/feature-light.json +17 -0
  178. package/presets/claude/php-laravel/CLAUDE.md +20 -0
  179. package/presets/claude/php-laravel/MCP.md +5 -0
  180. package/presets/claude/php-laravel/README.md +30 -0
  181. package/presets/claude/php-laravel/REPO_AGENTS.md +47 -0
  182. package/presets/claude/php-laravel/agents/README.md +32 -0
  183. package/presets/claude/php-laravel/agents/api-contract-reviewer.md +23 -0
  184. package/presets/claude/php-laravel/agents/build-verifier.md +45 -0
  185. package/presets/claude/php-laravel/agents/ci-investigator.md +21 -0
  186. package/presets/claude/php-laravel/agents/code-reviewer.md +40 -0
  187. package/presets/claude/php-laravel/agents/codebase-analyzer.md +28 -0
  188. package/presets/claude/php-laravel/agents/debugger.md +29 -0
  189. package/presets/claude/php-laravel/agents/feature-developer.md +47 -0
  190. package/presets/claude/php-laravel/agents/integration-test-generator.md +22 -0
  191. package/presets/claude/php-laravel/agents/integration-test-healer.md +22 -0
  192. package/presets/claude/php-laravel/agents/integration-test-planner.md +22 -0
  193. package/presets/claude/php-laravel/agents/migration-specialist.md +31 -0
  194. package/presets/claude/php-laravel/agents/performance-auditor.md +22 -0
  195. package/presets/claude/php-laravel/agents/qa-tester.md +30 -0
  196. package/presets/claude/php-laravel/agents/security-reviewer.md +32 -0
  197. package/presets/claude/php-laravel/agents/solution-architect.md +29 -0
  198. package/presets/claude/php-laravel/agents/task-analyst.md +25 -0
  199. package/presets/claude/php-laravel/agents/task-router.md +92 -0
  200. package/presets/claude/php-laravel/agents/tech-writer.md +15 -0
  201. package/presets/claude/php-laravel/agents/unit-test-generator.md +21 -0
  202. package/presets/claude/php-laravel/agents/unit-test-healer.md +13 -0
  203. package/presets/claude/php-laravel/agents/unit-test-planner.md +26 -0
  204. package/presets/claude/php-laravel/commands/README.md +13 -0
  205. package/presets/claude/php-laravel/commands/feature-continue.md +51 -0
  206. package/presets/claude/php-laravel/commands/feature-start.md +30 -0
  207. package/presets/claude/php-laravel/commands/task-continue.md +50 -0
  208. package/presets/claude/php-laravel/commands/task.md +53 -0
  209. package/presets/claude/php-laravel/commands/technical-retro.md +62 -0
  210. package/presets/claude/php-laravel/hooks/README.md +16 -0
  211. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +582 -0
  212. package/presets/claude/php-laravel/hooks/examples/README.md +18 -0
  213. package/presets/claude/php-laravel/hooks/examples/format-edited.example.sh +11 -0
  214. package/presets/claude/php-laravel/hooks/examples/secret-guard.example.sh +10 -0
  215. package/presets/claude/php-laravel/hooks/examples/test-on-save.example.sh +19 -0
  216. package/presets/claude/php-laravel/hooks/guard-shell-command.sh +80 -0
  217. package/presets/claude/php-laravel/mcp.json +11 -0
  218. package/presets/claude/php-laravel/rules/README.md +67 -0
  219. package/presets/claude/php-laravel/rules/api-and-data/README.md +3 -0
  220. package/presets/claude/php-laravel/rules/api-and-data/eloquent-persistence.md +31 -0
  221. package/presets/claude/php-laravel/rules/api-and-data/events-listeners.md +31 -0
  222. package/presets/claude/php-laravel/rules/api-and-data/form-requests.md +29 -0
  223. package/presets/claude/php-laravel/rules/api-and-data/http-layer.md +32 -0
  224. package/presets/claude/php-laravel/rules/api-and-data/jobs-queues.md +41 -0
  225. package/presets/claude/php-laravel/rules/api-and-data/policies-authorization.md +29 -0
  226. package/presets/claude/php-laravel/rules/api-and-data/routes-api.md +29 -0
  227. package/presets/claude/php-laravel/rules/architecture/README.md +3 -0
  228. package/presets/claude/php-laravel/rules/architecture/actions-services.md +30 -0
  229. package/presets/claude/php-laravel/rules/architecture/boundaries.md +34 -0
  230. package/presets/claude/php-laravel/rules/architecture/domain-layer.md +24 -0
  231. package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +51 -0
  232. package/presets/claude/php-laravel/rules/architecture/module-public-api.md +29 -0
  233. package/presets/claude/php-laravel/rules/architecture/reference-features.md +40 -0
  234. package/presets/claude/php-laravel/rules/architecture/service-providers.md +28 -0
  235. package/presets/claude/php-laravel/rules/stack/README.md +3 -0
  236. package/presets/claude/php-laravel/rules/stack/laravel-app-core.md +32 -0
  237. package/presets/claude/php-laravel/rules/stack/laravel-conventions.md +38 -0
  238. package/presets/claude/php-laravel/rules/testing/README.md +3 -0
  239. package/presets/claude/php-laravel/rules/testing/e2e.md +34 -0
  240. package/presets/claude/php-laravel/rules/testing/integration.md +30 -0
  241. package/presets/claude/php-laravel/rules/testing/unit.md +30 -0
  242. package/presets/claude/php-laravel/rules/tooling-and-review/README.md +3 -0
  243. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +21 -0
  244. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +180 -0
  245. package/presets/claude/php-laravel/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  246. package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +52 -0
  247. package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +58 -0
  248. package/presets/claude/php-laravel/rules/tooling-and-review/design-guidance.md +111 -0
  249. package/presets/claude/php-laravel/rules/tooling-and-review/php-tooling.md +37 -0
  250. package/presets/claude/php-laravel/rules/tooling-and-review/post-change-test.md +29 -0
  251. package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +33 -0
  252. package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +66 -0
  253. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +36 -0
  254. package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +38 -0
  255. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +47 -0
  256. package/presets/claude/php-laravel/rules/tooling-and-review/security-php.md +58 -0
  257. package/presets/claude/php-laravel/rules/tooling-and-review/technical-retro.md +17 -0
  258. package/presets/claude/php-laravel/rules/ui-and-accessibility/README.md +3 -0
  259. package/presets/claude/php-laravel/skills/README.md +5 -0
  260. package/presets/claude/php-laravel/skills/ci-investigation/SKILL.md +11 -0
  261. package/presets/claude/php-laravel/skills/code-review/SKILL.md +25 -0
  262. package/presets/claude/php-laravel/skills/debug-investigation/SKILL.md +15 -0
  263. package/presets/claude/php-laravel/skills/feature-delivery/SKILL.md +30 -0
  264. package/presets/claude/php-laravel/skills/integration-testing/SKILL.md +15 -0
  265. package/presets/claude/php-laravel/skills/technical-retro/SKILL.md +54 -0
  266. package/presets/claude/php-laravel/skills/unit-testing/SKILL.md +14 -0
  267. package/presets/claude/php-laravel/skills/write-adr/SKILL.md +41 -0
  268. package/presets/claude/php-laravel/team/README.md +17 -0
  269. package/presets/claude/php-laravel/team/conventions.md +21 -0
  270. package/presets/claude/php-laravel/team/fixtures/bugfix-standard.json +12 -0
  271. package/presets/claude/php-laravel/team/fixtures/feature-full.json +15 -0
  272. package/presets/claude/php-laravel/team/fixtures/feature-light.json +8 -0
  273. package/presets/cursor/go/agents/build-verifier.md +2 -2
  274. package/presets/cursor/go/agents/task-router.md +4 -0
  275. package/presets/cursor/go/commands/task-continue.md +17 -16
  276. package/presets/cursor/go/commands/task.md +4 -0
  277. package/presets/cursor/go/commands/technical-retro.md +4 -0
  278. package/presets/cursor/go/hooks/chain-team-phases.sh +226 -26
  279. package/presets/cursor/go/rules/README.md +6 -0
  280. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +4 -0
  281. package/presets/cursor/go/rules/preset-layering.mdc +1 -1
  282. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +5 -5
  283. package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
  284. package/presets/cursor/go/rules/preset-twin-sync.mdc +4 -0
  285. package/presets/cursor/go/rules/technical-retro.mdc +2 -0
  286. package/presets/cursor/go/team/README.md +8 -0
  287. package/presets/cursor/ios-swift/agents/build-verifier.md +3 -3
  288. package/presets/cursor/ios-swift/agents/task-router.md +4 -0
  289. package/presets/cursor/ios-swift/commands/task-continue.md +17 -16
  290. package/presets/cursor/ios-swift/commands/task.md +4 -0
  291. package/presets/cursor/ios-swift/commands/technical-retro.md +4 -0
  292. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +226 -26
  293. package/presets/cursor/ios-swift/rules/README.md +6 -0
  294. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +4 -0
  295. package/presets/cursor/ios-swift/rules/preset-layering.mdc +1 -1
  296. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +5 -5
  297. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
  298. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +4 -0
  299. package/presets/cursor/ios-swift/rules/technical-retro.mdc +2 -0
  300. package/presets/cursor/ios-swift/team/README.md +8 -0
  301. package/presets/cursor/java/agents/build-verifier.md +3 -3
  302. package/presets/cursor/java/agents/task-router.md +4 -0
  303. package/presets/cursor/java/commands/task-continue.md +17 -16
  304. package/presets/cursor/java/commands/task.md +4 -0
  305. package/presets/cursor/java/commands/technical-retro.md +4 -0
  306. package/presets/cursor/java/hooks/chain-team-phases.sh +226 -26
  307. package/presets/cursor/java/rules/README.md +6 -0
  308. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +4 -0
  309. package/presets/cursor/java/rules/preset-layering.mdc +1 -1
  310. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +5 -5
  311. package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -1
  312. package/presets/cursor/java/rules/preset-twin-sync.mdc +4 -0
  313. package/presets/cursor/java/rules/technical-retro.mdc +2 -0
  314. package/presets/cursor/java/team/README.md +8 -0
  315. package/presets/cursor/mcp-ts/agents/build-verifier.md +2 -2
  316. package/presets/cursor/mcp-ts/agents/task-router.md +4 -0
  317. package/presets/cursor/mcp-ts/commands/task-continue.md +19 -18
  318. package/presets/cursor/mcp-ts/commands/task.md +4 -0
  319. package/presets/cursor/mcp-ts/commands/technical-retro.md +4 -0
  320. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +226 -26
  321. package/presets/cursor/mcp-ts/rules/README.md +6 -0
  322. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +4 -0
  323. package/presets/cursor/mcp-ts/rules/preset-layering.mdc +1 -1
  324. package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +5 -5
  325. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +1 -1
  326. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +4 -0
  327. package/presets/cursor/mcp-ts/rules/technical-retro.mdc +2 -4
  328. package/presets/cursor/mcp-ts/team/README.md +8 -0
  329. package/presets/cursor/next/agents/build-verifier.md +3 -3
  330. package/presets/cursor/next/agents/task-router.md +4 -0
  331. package/presets/cursor/next/commands/task-continue.md +17 -16
  332. package/presets/cursor/next/commands/task.md +4 -0
  333. package/presets/cursor/next/commands/technical-retro.md +4 -0
  334. package/presets/cursor/next/hooks/chain-team-phases.sh +230 -26
  335. package/presets/cursor/next/rules/README.md +6 -0
  336. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +4 -0
  337. package/presets/cursor/next/rules/preset-layering.mdc +1 -1
  338. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +5 -5
  339. package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
  340. package/presets/cursor/next/rules/preset-twin-sync.mdc +4 -0
  341. package/presets/cursor/next/rules/technical-retro.mdc +2 -0
  342. package/presets/cursor/next/team/README.md +19 -0
  343. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  344. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  345. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  346. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  347. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  348. package/presets/cursor/next/team/fixtures/metrics.example.json +54 -0
  349. package/presets/cursor/php-hexagonal/AGENTS.md +39 -0
  350. package/presets/cursor/php-hexagonal/BUGBOT.md +11 -0
  351. package/presets/cursor/php-hexagonal/MCP.md +15 -0
  352. package/presets/cursor/php-hexagonal/README.md +26 -0
  353. package/presets/cursor/php-hexagonal/REPO_AGENTS.md +46 -0
  354. package/presets/cursor/php-hexagonal/agents/README.md +36 -0
  355. package/presets/cursor/php-hexagonal/agents/api-contract-reviewer.md +23 -0
  356. package/presets/cursor/php-hexagonal/agents/build-verifier.md +45 -0
  357. package/presets/cursor/php-hexagonal/agents/ci-investigator.md +21 -0
  358. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +40 -0
  359. package/presets/cursor/php-hexagonal/agents/codebase-analyzer.md +28 -0
  360. package/presets/cursor/php-hexagonal/agents/debugger.md +29 -0
  361. package/presets/cursor/php-hexagonal/agents/feature-developer.md +47 -0
  362. package/presets/cursor/php-hexagonal/agents/integration-test-generator.md +22 -0
  363. package/presets/cursor/php-hexagonal/agents/integration-test-healer.md +22 -0
  364. package/presets/cursor/php-hexagonal/agents/integration-test-planner.md +22 -0
  365. package/presets/cursor/php-hexagonal/agents/migration-specialist.md +31 -0
  366. package/presets/cursor/php-hexagonal/agents/performance-auditor.md +22 -0
  367. package/presets/cursor/php-hexagonal/agents/qa-tester.md +24 -0
  368. package/presets/cursor/php-hexagonal/agents/security-reviewer.md +20 -0
  369. package/presets/cursor/php-hexagonal/agents/solution-architect.md +28 -0
  370. package/presets/cursor/php-hexagonal/agents/task-analyst.md +25 -0
  371. package/presets/cursor/php-hexagonal/agents/task-router.md +73 -0
  372. package/presets/cursor/php-hexagonal/agents/tech-writer.md +15 -0
  373. package/presets/cursor/php-hexagonal/agents/unit-test-generator.md +21 -0
  374. package/presets/cursor/php-hexagonal/agents/unit-test-healer.md +13 -0
  375. package/presets/cursor/php-hexagonal/agents/unit-test-planner.md +26 -0
  376. package/presets/cursor/php-hexagonal/commands/README.md +54 -0
  377. package/presets/cursor/php-hexagonal/commands/feature-continue.md +19 -0
  378. package/presets/cursor/php-hexagonal/commands/feature-start.md +33 -0
  379. package/presets/cursor/php-hexagonal/commands/task-continue.md +50 -0
  380. package/presets/cursor/php-hexagonal/commands/task.md +53 -0
  381. package/presets/cursor/php-hexagonal/commands/technical-retro.md +85 -0
  382. package/presets/cursor/php-hexagonal/hooks/README.md +12 -0
  383. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +582 -0
  384. package/presets/cursor/php-hexagonal/hooks/examples/README.md +18 -0
  385. package/presets/cursor/php-hexagonal/hooks/examples/format-edited.example.sh +11 -0
  386. package/presets/cursor/php-hexagonal/hooks/examples/secret-guard.example.sh +10 -0
  387. package/presets/cursor/php-hexagonal/hooks/examples/test-on-save.example.sh +19 -0
  388. package/presets/cursor/php-hexagonal/hooks/guard-shell-command.sh +80 -0
  389. package/presets/cursor/php-hexagonal/hooks.json +17 -0
  390. package/presets/cursor/php-hexagonal/mcp.json +11 -0
  391. package/presets/cursor/php-hexagonal/rules/README.md +106 -0
  392. package/presets/cursor/php-hexagonal/rules/adapters-driven.mdc +41 -0
  393. package/presets/cursor/php-hexagonal/rules/adapters-driving.mdc +42 -0
  394. package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +20 -0
  395. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +177 -0
  396. package/presets/cursor/php-hexagonal/rules/anti-sycophancy-discipline.mdc +30 -0
  397. package/presets/cursor/php-hexagonal/rules/api-grpc.mdc +31 -0
  398. package/presets/cursor/php-hexagonal/rules/api-http.mdc +40 -0
  399. package/presets/cursor/php-hexagonal/rules/application-usecases.mdc +33 -0
  400. package/presets/cursor/php-hexagonal/rules/architecture-boundaries.mdc +36 -0
  401. package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +54 -0
  402. package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +54 -0
  403. package/presets/cursor/php-hexagonal/rules/composition-root.mdc +37 -0
  404. package/presets/cursor/php-hexagonal/rules/design-guidance.mdc +112 -0
  405. package/presets/cursor/php-hexagonal/rules/domain-layer.mdc +39 -0
  406. package/presets/cursor/php-hexagonal/rules/feature-delivery-workflow.mdc +47 -0
  407. package/presets/cursor/php-hexagonal/rules/messaging-adapters.mdc +38 -0
  408. package/presets/cursor/php-hexagonal/rules/module-public-api.mdc +32 -0
  409. package/presets/cursor/php-hexagonal/rules/persistence-adapters.mdc +35 -0
  410. package/presets/cursor/php-hexagonal/rules/php-app-core.mdc +37 -0
  411. package/presets/cursor/php-hexagonal/rules/php-conventions.mdc +53 -0
  412. package/presets/cursor/php-hexagonal/rules/php-tooling.mdc +38 -0
  413. package/presets/cursor/php-hexagonal/rules/ports-interfaces.mdc +37 -0
  414. package/presets/cursor/php-hexagonal/rules/post-change-test.mdc +30 -0
  415. package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +36 -0
  416. package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +69 -0
  417. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +39 -0
  418. package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +41 -0
  419. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +50 -0
  420. package/presets/cursor/php-hexagonal/rules/reference-features.mdc +40 -0
  421. package/presets/cursor/php-hexagonal/rules/security-php.mdc +33 -0
  422. package/presets/cursor/php-hexagonal/rules/technical-retro.mdc +16 -0
  423. package/presets/cursor/php-hexagonal/rules/tests-e2e.mdc +36 -0
  424. package/presets/cursor/php-hexagonal/rules/tests-integration.mdc +33 -0
  425. package/presets/cursor/php-hexagonal/rules/tests-unit.mdc +35 -0
  426. package/presets/cursor/php-hexagonal/skills/README.md +5 -0
  427. package/presets/cursor/php-hexagonal/skills/ci-investigation/SKILL.md +11 -0
  428. package/presets/cursor/php-hexagonal/skills/code-review/SKILL.md +25 -0
  429. package/presets/cursor/php-hexagonal/skills/debug-investigation/SKILL.md +15 -0
  430. package/presets/cursor/php-hexagonal/skills/feature-delivery/SKILL.md +30 -0
  431. package/presets/cursor/php-hexagonal/skills/integration-testing/SKILL.md +15 -0
  432. package/presets/cursor/php-hexagonal/skills/technical-retro/SKILL.md +54 -0
  433. package/presets/cursor/php-hexagonal/skills/unit-testing/SKILL.md +14 -0
  434. package/presets/cursor/php-hexagonal/skills/write-adr/SKILL.md +41 -0
  435. package/presets/cursor/php-hexagonal/team/README.md +41 -0
  436. package/presets/cursor/php-hexagonal/team/conventions.md +21 -0
  437. package/presets/cursor/php-hexagonal/team/fixtures/bugfix-standard.json +37 -0
  438. package/presets/cursor/php-hexagonal/team/fixtures/feature-full.json +25 -0
  439. package/presets/cursor/php-hexagonal/team/fixtures/feature-light.json +17 -0
  440. package/presets/cursor/php-laravel/AGENTS.md +39 -0
  441. package/presets/cursor/php-laravel/BUGBOT.md +9 -0
  442. package/presets/cursor/php-laravel/MCP.md +5 -0
  443. package/presets/cursor/php-laravel/README.md +33 -0
  444. package/presets/cursor/php-laravel/REPO_AGENTS.md +47 -0
  445. package/presets/cursor/php-laravel/agents/README.md +36 -0
  446. package/presets/cursor/php-laravel/agents/api-contract-reviewer.md +23 -0
  447. package/presets/cursor/php-laravel/agents/build-verifier.md +45 -0
  448. package/presets/cursor/php-laravel/agents/ci-investigator.md +21 -0
  449. package/presets/cursor/php-laravel/agents/code-reviewer.md +40 -0
  450. package/presets/cursor/php-laravel/agents/codebase-analyzer.md +28 -0
  451. package/presets/cursor/php-laravel/agents/debugger.md +29 -0
  452. package/presets/cursor/php-laravel/agents/feature-developer.md +47 -0
  453. package/presets/cursor/php-laravel/agents/integration-test-generator.md +22 -0
  454. package/presets/cursor/php-laravel/agents/integration-test-healer.md +22 -0
  455. package/presets/cursor/php-laravel/agents/integration-test-planner.md +22 -0
  456. package/presets/cursor/php-laravel/agents/migration-specialist.md +31 -0
  457. package/presets/cursor/php-laravel/agents/performance-auditor.md +22 -0
  458. package/presets/cursor/php-laravel/agents/qa-tester.md +30 -0
  459. package/presets/cursor/php-laravel/agents/security-reviewer.md +32 -0
  460. package/presets/cursor/php-laravel/agents/solution-architect.md +29 -0
  461. package/presets/cursor/php-laravel/agents/task-analyst.md +25 -0
  462. package/presets/cursor/php-laravel/agents/task-router.md +92 -0
  463. package/presets/cursor/php-laravel/agents/tech-writer.md +15 -0
  464. package/presets/cursor/php-laravel/agents/unit-test-generator.md +21 -0
  465. package/presets/cursor/php-laravel/agents/unit-test-healer.md +13 -0
  466. package/presets/cursor/php-laravel/agents/unit-test-planner.md +26 -0
  467. package/presets/cursor/php-laravel/commands/README.md +54 -0
  468. package/presets/cursor/php-laravel/commands/feature-continue.md +19 -0
  469. package/presets/cursor/php-laravel/commands/feature-start.md +33 -0
  470. package/presets/cursor/php-laravel/commands/task-continue.md +50 -0
  471. package/presets/cursor/php-laravel/commands/task.md +53 -0
  472. package/presets/cursor/php-laravel/commands/technical-retro.md +85 -0
  473. package/presets/cursor/php-laravel/hooks/README.md +12 -0
  474. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +582 -0
  475. package/presets/cursor/php-laravel/hooks/examples/README.md +18 -0
  476. package/presets/cursor/php-laravel/hooks/examples/format-edited.example.sh +11 -0
  477. package/presets/cursor/php-laravel/hooks/examples/secret-guard.example.sh +10 -0
  478. package/presets/cursor/php-laravel/hooks/examples/test-on-save.example.sh +19 -0
  479. package/presets/cursor/php-laravel/hooks/guard-shell-command.sh +80 -0
  480. package/presets/cursor/php-laravel/hooks.json +17 -0
  481. package/presets/cursor/php-laravel/mcp.json +11 -0
  482. package/presets/cursor/php-laravel/rules/README.md +111 -0
  483. package/presets/cursor/php-laravel/rules/actions-services.mdc +33 -0
  484. package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +20 -0
  485. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +178 -0
  486. package/presets/cursor/php-laravel/rules/anti-sycophancy-discipline.mdc +30 -0
  487. package/presets/cursor/php-laravel/rules/architecture-boundaries.mdc +37 -0
  488. package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +54 -0
  489. package/presets/cursor/php-laravel/rules/code-review-mr.mdc +56 -0
  490. package/presets/cursor/php-laravel/rules/design-guidance.mdc +112 -0
  491. package/presets/cursor/php-laravel/rules/domain-layer.mdc +27 -0
  492. package/presets/cursor/php-laravel/rules/eloquent-persistence.mdc +34 -0
  493. package/presets/cursor/php-laravel/rules/events-listeners.mdc +34 -0
  494. package/presets/cursor/php-laravel/rules/feature-delivery-workflow.mdc +50 -0
  495. package/presets/cursor/php-laravel/rules/form-requests.mdc +32 -0
  496. package/presets/cursor/php-laravel/rules/http-layer.mdc +35 -0
  497. package/presets/cursor/php-laravel/rules/jobs-queues.mdc +44 -0
  498. package/presets/cursor/php-laravel/rules/laravel-app-core.mdc +35 -0
  499. package/presets/cursor/php-laravel/rules/laravel-conventions.mdc +41 -0
  500. package/presets/cursor/php-laravel/rules/module-public-api.mdc +31 -0
  501. package/presets/cursor/php-laravel/rules/php-tooling.mdc +39 -0
  502. package/presets/cursor/php-laravel/rules/policies-authorization.mdc +32 -0
  503. package/presets/cursor/php-laravel/rules/post-change-test.mdc +31 -0
  504. package/presets/cursor/php-laravel/rules/preset-layering.mdc +36 -0
  505. package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +69 -0
  506. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +39 -0
  507. package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +41 -0
  508. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +50 -0
  509. package/presets/cursor/php-laravel/rules/reference-features.mdc +42 -0
  510. package/presets/cursor/php-laravel/rules/routes-api.mdc +32 -0
  511. package/presets/cursor/php-laravel/rules/security-php.mdc +61 -0
  512. package/presets/cursor/php-laravel/rules/service-providers.mdc +31 -0
  513. package/presets/cursor/php-laravel/rules/technical-retro.mdc +16 -0
  514. package/presets/cursor/php-laravel/rules/tests-e2e.mdc +36 -0
  515. package/presets/cursor/php-laravel/rules/tests-integration.mdc +33 -0
  516. package/presets/cursor/php-laravel/rules/tests-unit.mdc +33 -0
  517. package/presets/cursor/php-laravel/skills/README.md +5 -0
  518. package/presets/cursor/php-laravel/skills/ci-investigation/SKILL.md +11 -0
  519. package/presets/cursor/php-laravel/skills/code-review/SKILL.md +25 -0
  520. package/presets/cursor/php-laravel/skills/debug-investigation/SKILL.md +15 -0
  521. package/presets/cursor/php-laravel/skills/feature-delivery/SKILL.md +30 -0
  522. package/presets/cursor/php-laravel/skills/integration-testing/SKILL.md +15 -0
  523. package/presets/cursor/php-laravel/skills/technical-retro/SKILL.md +54 -0
  524. package/presets/cursor/php-laravel/skills/unit-testing/SKILL.md +14 -0
  525. package/presets/cursor/php-laravel/skills/write-adr/SKILL.md +41 -0
  526. package/presets/cursor/php-laravel/team/README.md +17 -0
  527. package/presets/cursor/php-laravel/team/conventions.md +21 -0
  528. package/presets/cursor/php-laravel/team/fixtures/bugfix-standard.json +12 -0
  529. package/presets/cursor/php-laravel/team/fixtures/feature-full.json +15 -0
  530. package/presets/cursor/php-laravel/team/fixtures/feature-light.json +8 -0
@@ -0,0 +1,69 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-no-cross-stack-leakage)
3
+ globs:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ alwaysApply: false
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-no-cross-stack-leakage.md -->
11
+
12
+ # Preset no cross-stack leakage
13
+
14
+ Запрет протекания stack-specific имён, путей и handoff stems между пресетами.
15
+
16
+ ## Principles
17
+
18
+ - `next` must not require iOS-only agents/tooling (`xcuitest-*`, `xcodebuild` as required handoff, Keychain-only rules).
19
+ - `ios-swift` must not ship Playwright handoffs or Next lint recipes as required commands.
20
+ - `go` / `java` / `php-hexagonal` / `php-laravel` / `mcp-ts` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
21
+ - `mcp-ts` must not ship Go tool commands (`go test`, `go vet`, `golangci-lint`) or `integration-test-*` agents as required delivery gates.
22
+ - Shared core must not embed stack paths (`app/src/**`, `Features/**`, `playwright`, `xcodebuild`).
23
+
24
+ ## Forbidden in ios-swift hooks/agents (FAIL)
25
+
26
+ In ios-swift `chain-team-phases.sh` / agent handoffs (Cursor + Claude):
27
+
28
+ - `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`
29
+ - `app/__tests__/e2e` as a required path
30
+ - Positive yarn recipes `lint:js` / `lint:css` as commands to run (negation prose alone is weak — prefer zero occurrences)
31
+
32
+ Required instead: `xcuitest-test-*` stems; build-verifier mentions `xcodebuild` or `post-change-build` / `xcode-tooling`.
33
+
34
+ ## Forbidden in next hooks/agents (FAIL when present as required)
35
+
36
+ - `xcuitest-test-` as handoff stems
37
+ - Requiring `xcodebuild` / SwiftLint as the default post-change gate for Next app work
38
+
39
+ ## Forbidden in go / java / php-hexagonal / php-laravel hooks/agents (FAIL)
40
+
41
+ Shared backend-stack bans (`go`, `java`, `php-hexagonal`, and `php-laravel`):
42
+
43
+ - `playwright-test-`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
44
+ - Positive yarn recipes `lint:js` / `lint:css`
45
+ - `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
46
+ - Agent file `accessibility-reviewer` (no UI surface)
47
+
48
+ Required instead: `integration-test-*`; build-verifier / `post-change-test` plus stack tooling — `go-tooling` (`go test`, `go vet`), `java-tooling` (`mvn test` / `./gradlew test`), or `php-tooling` (`php artisan test` / `composer test` / `vendor/bin/phpunit`).
49
+
50
+ ## Forbidden in mcp-ts hooks/agents (FAIL)
51
+
52
+ Same UI/mobile bans as backend stacks, plus:
53
+
54
+ - `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
55
+ - Positive yarn recipes `lint:js` / `lint:css` as required gates
56
+ - `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
57
+ - Go tool commands as required MCP delivery gates: `go test`, `go vet`, `golangci-lint`
58
+ - Agent files: `playwright-test-*`, `xcuitest-test-*`, `integration-test-*`, `accessibility-reviewer`
59
+
60
+ Required instead: package-manager–discovered typecheck/test (`mcp-ts-tooling`, `post-change-test`); Phase 1 gates `build-verifier` + `security-reviewer`.
61
+
62
+ ## Soft / document
63
+
64
+ - Mentioning the other stack in **docs** comparing presets is OK.
65
+ - `build-verifier` may reference other stacks when validating **preset packaging** (`scope: preset-structure-validation`).
66
+
67
+ ## Chain fork
68
+
69
+ `hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, `java`, `mcp-ts`, `php-hexagonal`, and `php-laravel` (per platform).
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-pr-checklist)
3
+ globs:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ alwaysApply: false
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-pr-checklist.md -->
11
+
12
+ # Preset PR checklist
13
+
14
+ Чеклист для PR, затрагивающих `packages/ai-rules/presets/**` (и dogfood `.cursor/` sync).
15
+
16
+ ## Before merge
17
+
18
+ - [ ] **SoT:** правки в `packages/…` (не только root `.cursor/`)
19
+ - [ ] **Core:** если менялся `_shared/core/**` — обновлены все `<!-- shared-core: … -->` consumers (или documented intentional fork)
20
+ - [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel — см. `preset-twin-sync`)
21
+ - [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table актуален
22
+ - [ ] **Token budget:** alwaysApply / session-start ≤ 3; meta rules not always-on
23
+ - [ ] **Leakage:** нет чужих stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
24
+ - [ ] **Twin depth:** domain ≥15 lines; thin aliases documented
25
+ - [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
26
+ - [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
27
+ - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (or document intentional skip) when maintaining this monorepo
28
+ - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
29
+
30
+ ## Pointers
31
+
32
+ - Layering: `preset-layering`
33
+ - Sync: `preset-twin-sync`
34
+ - Budget: `preset-token-budget`
35
+ - Leakage: `preset-no-cross-stack-leakage`
36
+ - Validation: stack `agents/build-verifier.md` → preset-structure section
37
+ - Dogfood script: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`
38
+ - Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
39
+ - Orchestrator: when editing presets, load this checklist + twin-sync
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-token-budget)
3
+ globs:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ alwaysApply: false
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-token-budget.md -->
11
+
12
+ # Preset token budget
13
+
14
+ Инварианты загрузки правил в **установленном** пресете (consumer app).
15
+
16
+ ## Hard caps
17
+
18
+ | Platform | Always-on | Cap |
19
+ |----------|-----------|-----|
20
+ | Cursor | `alwaysApply: true` | **≤ 3** |
21
+ | Claude | rules **without** `paths:` | **ровно 3** |
22
+
23
+ **Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules). The intended session-start trio remains **exactly 3**; body budget sums **only those 3** rules.
24
+
25
+ Session-start body budget (где задокументировано): ≤140 строк суммарно (stretch ≤120).
26
+
27
+ ## Meta / author rules
28
+
29
+ Rules for preset authors (`preset-layering`, `preset-twin-sync`, …):
30
+
31
+ - **Never** `alwaysApply: true` on consumer installs.
32
+ - Cursor: `globs` limited to `packages/ai-rules/presets/**` (and dogfood `.cursor/**` where useful).
33
+ - Claude: `paths:` limited to `packages/ai-rules/presets/**` (and `.claude/**` dogfood if present).
34
+
35
+ ## Heavy workflows
36
+
37
+ Orchestrator, feature-delivery, code-review, post-change gates, domain globs — **requestable / paths**, not always-on.
38
+
39
+ ## Verifier
40
+
41
+ build-verifier **FAIL** if alwaysApply / session-start count exceeds 3 (Claude count **excludes `**/README.md`**), or if a `preset-*` meta rule is marked always-on.
@@ -0,0 +1,50 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-twin-sync)
3
+ globs:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ alwaysApply: false
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-twin-sync.md -->
11
+
12
+ # Preset twin sync
13
+
14
+ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
15
+
16
+ ## Matrix
17
+
18
+ | Stack | Cursor SoT | Claude derive | Mapping table |
19
+ |-------|------------|---------------|---------------|
20
+ | `next` | `presets/cursor/next/rules/*.mdc` | `presets/claude/next/rules/<topic>/` | **Required** in `claude/next/rules/README.md` |
21
+ | `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Keep in `claude/ios-swift/rules/README.md` |
22
+ | `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
23
+ | `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Keep in `claude/java/rules/README.md` |
24
+ | `mcp-ts` | `presets/cursor/mcp-ts/rules/*.mdc` | `presets/claude/mcp-ts/rules/<topic>/` | Keep in `claude/mcp-ts/rules/README.md` |
25
+ | `php-hexagonal` | `presets/cursor/php-hexagonal/rules/*.mdc` | `presets/claude/php-hexagonal/rules/<topic>/` | Keep in `claude/php-hexagonal/rules/README.md` |
26
+ | `php-laravel` | `presets/cursor/php-laravel/rules/*.mdc` | `presets/claude/php-laravel/rules/<topic>/` | Keep in `claude/php-laravel/rules/README.md` |
27
+
28
+ ## Same-PR checklist
29
+
30
+ 1. Edit Cursor rule first (body + frontmatter).
31
+ 2. Update Claude twin: body + `paths:` (from Cursor `globs:` / requestable triggers); drop `alwaysApply`.
32
+ 3. Update mapping table row if stem/path changed.
33
+ 4. If body embeds core (`<!-- shared-core: … -->`), sync core consumers across stacks when core changed.
34
+
35
+ ## Twin depth
36
+
37
+ - **Domain** rules: ≥15 body lines (FAIL if thin without documented alias reason).
38
+ - **Thin aliases** (`agent-team-intake`, `technical-retro`): may be shorter (soft) if they only point to a command/skill.
39
+
40
+ ## Severity (build-verifier)
41
+
42
+ - **next:** missing Claude twin for a changed Cursor rule → **FAIL** (mapping table required).
43
+ - **ios-swift:** missing Claude twin for a changed Cursor rule → **FAIL**.
44
+ - **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
45
+ - **java:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go; mapping table required).
46
+ - **mcp-ts:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java; mapping table required).
47
+ - **php-hexagonal:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java / mcp-ts; mapping table required).
48
+ - **php-laravel:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java / mcp-ts / php-hexagonal; mapping table required).
49
+
50
+ Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
@@ -0,0 +1,42 @@
1
+ ---
2
+ description: Reference paths for Laravel layout (dogfood/php-laravel)
3
+ globs:
4
+ - "**/Http/**/*"
5
+ - "**/Actions/**/*"
6
+ - "**/Models/**/*"
7
+ - "**/routes/**/*"
8
+ alwaysApply: false
9
+ ---
10
+
11
+ <!-- shared-core: architecture/reference-features.template.md -->
12
+
13
+ # Reference features (Laravel)
14
+
15
+ Canonical layout matches `dogfood/php-laravel/` (consumer repos may rename; prefer the same shapes). Default = flat Laravel `app/`.
16
+
17
+ | Area | Example path | Glob hint |
18
+ |------|--------------|-----------|
19
+ | Controllers | `app/Http/Controllers/` | `**/Http/Controllers/**` |
20
+ | Form Requests | `app/Http/Requests/` | `**/Http/Requests/**` |
21
+ | Actions | `app/Actions/` | `**/Actions/**` |
22
+ | Models | `app/Models/` | `**/Models/**` |
23
+ | Policies | `app/Policies/` | `**/Policies/**` |
24
+ | Providers | `app/Providers/` | `**/Providers/**` |
25
+ | Jobs / Events | `app/Jobs/`, `app/Events/` | `**/Jobs/**`, `**/Events/**` |
26
+ | Routes | `routes/api.php` | `**/routes/**` |
27
+ | Feature tests | `tests/Feature/` | `**/tests/Feature/**` |
28
+ | Unit tests | `tests/Unit/` | `**/tests/Unit/**` |
29
+
30
+ ## Living conventions
31
+
32
+ Post-init gotchas / patterns / decisions: **`.cursor/team/conventions.md`** (and the twin tool path if both Cursor and Claude are installed). Consumer-owned; not always-on. See root `AGENTS.md` § Living conventions.
33
+
34
+ ## Dogfood scenarios
35
+
36
+ 1. `/task` new write endpoint — Form Request → Policy → Action → Model → Feature test (`dogfood/php-laravel`).
37
+ 2. Validation / 403 mapping — debugger + Feature test on Form Request / Policy.
38
+ 3. Async side effect — Job or Event on create with `Bus::fake` / `Event::fake`.
39
+ 4. OpenAPI drift — api-contract-reviewer (optional; not a required delivery gate).
40
+ 5. Secrets in logs — security-reviewer + `security-php`.
41
+
42
+ Init (maintainer): `node packages/ai-rules/bin/cli.js init cursor --preset php-laravel --cwd dogfood/php-laravel` — do not commit generated `.cursor/` into the sample unless the team decides otherwise.
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: Laravel routes (api.php / web.php) and middleware wiring
3
+ globs:
4
+ - "**/routes/**/*"
5
+ - "**/bootstrap/app.php"
6
+ alwaysApply: false
7
+ ---
8
+
9
+
10
+ # Routes (API / web)
11
+
12
+ - Prefer `routes/api.php` for JSON APIs and `routes/web.php` for session/cookie web — follow the target Laravel version's routing layout (`bootstrap/app.php` on Laravel 11+).
13
+ - Route → controller method (or invokable); keep closures only for trivial health/ping already used by the repo.
14
+ - Apply auth / throttle / middleware groups at the **route** layer (`auth:sanctum`, `auth:api`, etc. as already configured).
15
+ - Name routes when neighbors name them (`->name('todos.store')`); keep URI style consistent (`/api/todos` vs versioned `/api/v1/...`).
16
+ - Resource routes (`Route::apiResource`) OK when CRUD matches; otherwise explicit verbs.
17
+
18
+ ## Structure
19
+
20
+ - Feature-local route files only if the repo already splits (`routes/api/todos.php` required from `api.php`).
21
+ - Do not register business logic in route files.
22
+
23
+ ## Testing
24
+
25
+ - Feature tests hit named URIs or `route('…')` helpers matching production paths.
26
+ - Assert middleware (401/403) when AuthZ is in scope.
27
+
28
+ ## Forbidden
29
+
30
+ - Fat closures with Eloquent / Actions inlined in `routes/*.php`.
31
+ - Mixing Blade view routes into API delivery tasks without AC.
32
+ - Requiring Next/Playwright route conventions — Laravel only.
@@ -0,0 +1,61 @@
1
+ ---
2
+ description: Security baseline for Laravel backends (authz, CSRF, tokens, mass assignment)
3
+ globs:
4
+ - "**/Http/**/*"
5
+ - "**/routes/**/*"
6
+ - "**/Policies/**/*"
7
+ - "**/Models/**/*"
8
+ - "**/Jobs/**/*"
9
+ - "**/*Job.php"
10
+ - "**/config/**/*"
11
+ - "**/.env*"
12
+ alwaysApply: false
13
+ ---
14
+
15
+
16
+ # Security (Laravel / PHP)
17
+
18
+ Baseline for review and implementation. Prefer existing repo auth stack (Sanctum / session / Passport) — do not invent a second one. Livewire/Inertia are **not** required by this preset.
19
+
20
+ ## Mass assignment / input
21
+
22
+ - Validate untrusted input via **Form Requests**.
23
+ - Persist only from `$request->validated()` or `$request->safe()->only([...])` — never raw `$request->all()` into `create` / `update` / `fill`.
24
+ - Keep `$fillable` / `$guarded` tight on user-facing models. **FAIL** if mass-assignable fields include roles, ownership, or other privilege flags without explicit authorization.
25
+
26
+ ## Authorization
27
+
28
+ - Authorize via **Policies** / `Gate` (Form Request `authorize()`, controller `$this->authorize()`, or route middleware) — not ad-hoc role string checks scattered in Actions.
29
+ - **FAIL** if a mutating or sensitive read path skips Policy/Gate when neighbors authorize the same resource.
30
+
31
+ ## CSRF
32
+
33
+ - **Sanctum SPA cookie/session auth requires CSRF** (and the web/cookie middleware stack). Do not disable CSRF for SPA cookie routes.
34
+ - **Bearer-token APIs** (personal access tokens, API tokens without session cookies) are typically CSRF-exempt — follow `VerifyCsrfToken` / middleware already in the repo; do not invent blanket CSRF for pure token APIs.
35
+
36
+ ## Rate limiting
37
+
38
+ - Public and login/register/password-reset endpoints need rate limiting (`RateLimiter`, `throttle` middleware, or Fortify/Breeze defaults). **FAIL** if new public auth endpoints ship without a throttle when neighbors throttle similar routes.
39
+
40
+ ## API tokens (when Sanctum / tokens are used)
41
+
42
+ - Issue tokens with least-privilege **abilities**; set expiry when the repo pattern supports it; revoke on logout / compromise / rotation.
43
+ - Never log raw tokens, store them only as the framework expects (hashed), and do not return full token values after first issuance unless that is the product flow.
44
+
45
+ ## Production / secrets / config
46
+
47
+ - Production: `APP_DEBUG=false`. Secrets from env / secret manager — never commit keys, tokens, or `.env` with credentials.
48
+ - `APP_KEY`, DB credentials, mail tokens — env only; **fail closed** when misconfigured in production.
49
+ - Distinguish public vs secret config fields. Static analysis / secret scanners: run only if the repo/CI already wires them.
50
+
51
+ ## Queued jobs
52
+
53
+ - Authorize (or re-check entitlement) **at execution time** in `handle()` — do not trust dispatch-time auth alone for sensitive work.
54
+ - Queue only **minimal serializable payloads** (IDs / scalars). See `jobs-queues` for constructor vs `handle()` DI.
55
+
56
+ ## Data / queries / logs (brief)
57
+
58
+ - Prefer parameterized Eloquent / query builder — no string-concat SQL with user input.
59
+ - Minimize PII in logs; redact passwords, tokens, and secrets.
60
+ - File uploads (when present): validate mime/size, store outside the web root or via the repo's disk pattern, never trust client filenames as paths.
61
+ - Blade/XSS (when server views exist): escape by default (`{{ }}`); use `{!! !!}` only with a documented trusted source.
@@ -0,0 +1,31 @@
1
+ ---
2
+ description: Laravel Service Providers and container wiring
3
+ globs:
4
+ - "**/Providers/**/*"
5
+ - "**/bootstrap/providers.php"
6
+ alwaysApply: false
7
+ ---
8
+
9
+
10
+ # Service Providers
11
+
12
+ - Providers **wire** the container: bindings, singletons, interface → implementation, config publishing — **no business rules**.
13
+ - Prefer constructor injection into Actions/Controllers; bind interfaces only when the repo already uses them.
14
+ - Register policies via `AuthServiceProvider` / `Gate::policy` / auto-discovery as Laravel version + repo already do.
15
+ - Keep `boot()` side effects minimal (observers, macros) and match existing patterns.
16
+ - Laravel 11+: respect `bootstrap/providers.php` / application builder — do not invent a parallel registration path.
17
+
18
+ ## Forbidden
19
+
20
+ - Eloquent queries / use-case orchestration inside providers.
21
+ - Hard-coding environment secrets in provider source (use `config()` / env).
22
+ - Registering routes that belong in `routes/*.php` unless the repo already registers package routes that way.
23
+
24
+ ## Testing
25
+
26
+ - Prefer Feature tests that resolve bindings via the app container rather than unit-testing provider methods in isolation.
27
+ - When adding an interface binding, assert the concrete resolves in a Feature or container test if neighbors do.
28
+
29
+ ## Related
30
+
31
+ - Actions/Services consume bindings: `actions-services`; Policies: `policies-authorization`.
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Technical retro alias — use /technical-retro command
3
+ alwaysApply: false
4
+ ---
5
+
6
+ <!-- shared-core: review/technical-retro.md -->
7
+
8
+ # Техническое ретро — rule alias
9
+
10
+ Полный сценарий (включая блок **«Работа агентов»** для slug из team tasks) — в slash-команде:
11
+
12
+ **`commands/technical-retro.md`** → `/technical-retro`
13
+
14
+ When a task has `metrics.json`, use the local aggregation script and state the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not score malformed artifacts or gate wait as agent work.
15
+
16
+ Используй rule только если command недоступен. Не дублируй содержимое command в ответе — следуй command-файлу и skill `technical-retro`.
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Optional end-to-end / smoke tests for Laravel APIs
3
+ globs:
4
+ - "**/tests/E2E/**/*"
5
+ - "**/tests/e2e/**/*"
6
+ - "**/*E2ETest.php"
7
+ - "**/*SmokeTest.php"
8
+ alwaysApply: false
9
+ ---
10
+
11
+ # E2E / smoke tests (optional)
12
+
13
+ - Prefer **Feature tests** + `integration-test-*` for API contracts; treat e2e/smoke as a thin optional layer.
14
+ - Smoke may hit a running `php artisan serve` / container when the repo already has that harness.
15
+ - Keep scenarios few and stable: health/ready, one happy-path create — not a second unit suite.
16
+ - Place under `tests/E2E/` or `*SmokeTest.php` when the repo uses those names.
17
+
18
+ ## Boundary vs Feature
19
+
20
+ | Layer | Typical scope |
21
+ |-------|----------------|
22
+ | Feature / integration | In-process HTTP kernel + DB — **default** for delivery |
23
+ | E2E / smoke | Process or network boundary — optional |
24
+
25
+ If the repo only has `tests/Unit` + `tests/Feature`, do **not** invent a separate e2e framework.
26
+
27
+ ## Non-goals
28
+
29
+ - Playwright browser e2e, XCUITest, Blade/Livewire browser suites, or accessibility-reviewer — **out of this preset**.
30
+ - Mandating Dusk if the repo only has Feature tests.
31
+
32
+ ## Related
33
+
34
+ - Feature depth: `tests-integration` + `integration-test-*`.
35
+ - Sample: `dogfood/php-laravel` + `php artisan test`.
36
+ - Gates: `post-change-test` / `php-tooling` — never yarn lint or browser stacks.
@@ -0,0 +1,33 @@
1
+ ---
2
+ description: Feature/integration testing conventions for Laravel APIs
3
+ globs:
4
+ - "**/tests/Feature/**/*"
5
+ - "**/tests/Integration/**/*"
6
+ - "**/*FeatureTest.php"
7
+ - "**/*IT.php"
8
+ alwaysApply: false
9
+ ---
10
+
11
+
12
+ # Feature / integration tests
13
+
14
+ - Laravel **Feature** tests ≈ integration: HTTP kernel + DB (SQLite in-memory / file preferred).
15
+ - Prefer `RefreshDatabase` / repo harness — do not invent a new DB stack.
16
+ - Keep pure Action logic in Unit tests when valuable; Feature proves route → validation → AuthZ → persistence.
17
+ - Agents: `integration-test-planner` → `generator` → `healer`; skill `integration-testing`.
18
+
19
+ ## Scope
20
+
21
+ - API create/update/delete happy paths + 422/403 envelopes.
22
+ - Policy denial; Form Request validation; Job/Event fakes when async is in scope.
23
+ - Migration + factory fixtures matching production schema.
24
+
25
+ ## Forbidden
26
+
27
+ - Requiring Playwright, XCUITest, or yarn `lint:js`/`lint:css` as Laravel gates.
28
+ - Turning every unit case into a full Feature boot when a unit fake suffices.
29
+
30
+ ## Related
31
+
32
+ - After edits: `post-change-test` (+ `php-tooling`) → `php artisan test`.
33
+ - Unit: `tests-unit`; optional smoke: `tests-e2e`.
@@ -0,0 +1,33 @@
1
+ ---
2
+ description: Unit testing conventions for Laravel Actions and pure PHP
3
+ globs:
4
+ - "**/tests/Unit/**/*"
5
+ - "**/tests/unit/**/*"
6
+ - "**/*Test.php"
7
+ alwaysApply: false
8
+ ---
9
+
10
+
11
+ # Unit tests
12
+
13
+ - Prefer **PHPUnit** (or **Pest** if already in repo/CI); clear arrange/act/assert.
14
+ - Actions/Services: mock collaborators when pure enough — no full HTTP kernel required.
15
+ - Prefer fakes over heavy mocking when simple; Mockery only if the repo already uses it.
16
+ - Prefer data providers / Pest datasets when covering multiple cases.
17
+ - Skip Feature / integration files under `tests/Feature` — those use `tests-integration`.
18
+
19
+ ## Scope
20
+
21
+ - Action logic with faked Eloquent/repos; pure helpers; custom casts when non-trivial.
22
+ - Do not boot the full application for a pure unit case unless the repo's unit harness already does.
23
+
24
+ ## Forbidden smells
25
+
26
+ - Hitting real HTTP routes in Unit tests (use Feature tests).
27
+ - Brittle tests on private controller internals without need.
28
+ - Requiring Playwright / browser stacks.
29
+
30
+ ## Naming
31
+
32
+ - `CreateTodoTest` / `TodoPolicyTest` (or Pest `describe`/`it` if that is the repo style).
33
+ - Match PHPUnit/Pest patterns CI already uses.
@@ -0,0 +1,5 @@
1
+ # Skills (preset php-laravel)
2
+
3
+ 8 skills: `feature-delivery`, `unit-testing`, `integration-testing`, `ci-investigation`, `debug-investigation`, `code-review`, `technical-retro`, `write-adr`.
4
+
5
+ No `playwright-e2e` / `xcuitest-e2e` / `react-performance`.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: ci-investigation
3
+ description: Investigates failing CI checks on PRs and branches — composer test / vendor/bin/phpunit (Pest if present), optional PHPStan/Psalm, integration, preset-structure — with local reproduction and minimal fixes. Use when CI is red or for ci-fix pipeline tasks.
4
+ ---
5
+
6
+ # CI investigation (PHP)
7
+
8
+ 1. Identify job + log excerpt.
9
+ 2. Reproduce locally with the same commands.
10
+ 3. Minimal fix; for ai-rules preset PRs run `yarn check:preset-structure`.
11
+ 4. Do not treat Playwright/xcodebuild/`lint:js` as default PHP gates.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: code-review
3
+ description: Reviews pull requests and branch diffs for Laravel services using architecture, HTTP, Actions/Services, Eloquent, Policies, and testing standards. Use when the user asks for review or when code-reviewer runs.
4
+ ---
5
+
6
+ # Code review (Laravel)
7
+
8
+ 1. Diff-first; load `code-review-mr.mdc` + Laravel domain rules (`architecture-boundaries`, `http-layer`, `form-requests`, `actions-services`, `eloquent-persistence`, `service-providers`, `policies-authorization`).
9
+ 2. Check layer leaks (fat controllers, Form Requests in Models, AuthZ outside Policies), Provider purity, Feature/Unit tests, security-sensitive bits.
10
+ 3. **Reuse lens:** flag new helpers that duplicate existing packages/utilities; prefer shared Actions/Services over copy-paste.
11
+ 4. **Efficiency lens:** N+1 Eloquent, missing eager loads, unbounded queues, hot-path bloat, missing timeouts on HTTP clients.
12
+ 5. Write `review.md` using the output contract below.
13
+
14
+ ## Output
15
+
16
+ - Each finding: **`path:line`** — problem — impact — concrete fix direction.
17
+ - Severity: **`blocker` | `important` | `nit`** (list blocker → nit).
18
+ - End with a verdict line: **`Safe to merge | needs changes | reject`**.
19
+ - Map agent status: Safe to merge → `completed`; needs changes / reject → `changes_requested`.
20
+
21
+ Never require iOS/Next-only gates (XCUITest, Playwright, `lint:js`).
22
+
23
+ ## Design guidance
24
+
25
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: debug-investigation
3
+ description: Investigates bugs, failing tests, and unexpected behavior in PHP services with runtime evidence before applying minimal fixes. Use for bugfix tasks, debugger agent runs, or regressions.
4
+ ---
5
+
6
+ # Debug investigation (PHP)
7
+
8
+ 1. Capture failing `composer test` / `vendor/bin/phpunit` / logs / stack traces.
9
+ 2. Hypothesize layer (domain vs adapter vs wiring).
10
+ 3. Minimal fix + regression test when appropriate.
11
+ 4. Document in `debug-report.md`.
12
+
13
+ ## Design guidance
14
+
15
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: feature-delivery
3
+ description: Delivers Laravel backend features end-to-end across routes, Form Requests, Policies, Actions/Services, Eloquent, Jobs/Events, tests, and post-change-test validation. Use when implementing or extending a feature, especially through /task or feature-developer.
4
+ ---
5
+
6
+ # Feature Delivery (Laravel)
7
+
8
+ 1. Read brief, AC, and decomposition.
9
+ 2. Follow `feature-delivery-workflow.mdc` + `reference-features.mdc`: routes → Form Request/Policy → Action/Service → Eloquent → Controller/Resource → optional Job/Event → tests.
10
+ 3. Wire bindings only in Service Providers when needed.
11
+ 4. Add Feature tests for HTTP/DB paths; Unit tests for non-trivial Actions.
12
+ 5. After PHP edits: **invoke** `post-change-test.mdc` (+ `php-tooling.mdc`) → `php artisan test` / `composer test`.
13
+
14
+ ## Do / Don't
15
+
16
+ - **Do** keep controllers thin; validate at Form Requests; authorize via Policies.
17
+ - **Don't** put SQL/business rules in controllers or HTTP types in Models/Actions.
18
+ - **Don't** use Playwright, XCUITest, Blade/Livewire a11y, or yarn lint as this stack's gate.
19
+
20
+ ## Scope discipline
21
+
22
+ Implement only the current AC / decomposition task. Clarify ambiguity before coding; do not add unrelated hardening or drive-by refactors. See `feature-developer` → **Zero improvisation**.
23
+
24
+ ## Handoff
25
+
26
+ Summarize by layer + validation. Update `.cursor/team/tasks/<slug>/status.json`.
27
+
28
+ ## Design guidance
29
+
30
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: integration-testing
3
+ description: Plans, generates, and heals Laravel Feature/integration tests (HTTP kernel, DB fixtures, Job/Event fakes). Use for integration-test-* agents or Feature coverage.
4
+ ---
5
+
6
+ # Integration testing (Laravel)
7
+
8
+ 1. Read `tests-integration` / `tests-e2e` rules and task brief.
9
+ 2. Prefer Feature tests through the HTTP kernel (`$this->postJson` / actingAs); DB via `RefreshDatabase` / factories; fake external HTTP and `Bus::fake` / `Event::fake` when async is in scope.
10
+ 3. Use CI job split if the repo already does.
11
+ 4. Do not introduce Playwright or XCUITest.
12
+
13
+ ## Agents
14
+
15
+ `integration-test-planner` → `integration-test-generator` → `integration-test-healer` as needed.