@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,34 @@
1
+ ---
2
+ description: Inbound and outbound port interfaces for PHP hexagonal services
3
+ paths:
4
+ - "**/ports/**/*"
5
+ - "application/**/*port*"
6
+ - "**/application/**/*port*"
7
+ ---
8
+
9
+ # Ports (interfaces)
10
+
11
+ ## Outbound (driven)
12
+
13
+ - Repository, cache, publisher, clock, ID generator, external client — defined by **application** (owner of the need).
14
+ - Signatures use **domain** types (or small application DTOs), never Eloquent/Doctrine entities, PDO statement types, or broker message types.
15
+ - Keep interfaces small (ISP); prefer role interfaces over god-repos (`OrderRepository` vs `EverythingRepository`).
16
+ - Do not put ORM repository base classes in domain; if Eloquent/Doctrine is used, it stays in the outbound adapter and implements (or is wrapped by) the application port.
17
+
18
+ ## Inbound (driving)
19
+
20
+ - Optional interface wrapping use cases for multiple drivers (HTTP + gRPC + CLI + messaging consumer).
21
+ - Drivers depend on inbound ports / use-case APIs — not on each other.
22
+ - Prefer a concrete use-case class when only one driver exists; extract an interface when a second driver appears (Rule of Three / YAGNI).
23
+
24
+ ## Naming
25
+
26
+ - `saveOrder`, `findOrderById`, `publishOrderPlaced` — verb-oriented; match neighboring package style.
27
+ - Implementation types live in adapters (`DoctrineOrderRepository`, `PdoOrderRepository`), not beside the interface in domain.
28
+
29
+ ## Anti-patterns
30
+
31
+ - Ports returning untyped `array` bags or framework entities.
32
+ - Putting port interfaces inside adapter packages (wrong owner — adapters implement, application defines).
33
+ - Leakage of `EntityManager`, Eloquent models, or Redis types through port method signatures.
34
+ - One mega-port “for convenience” that every use case depends on.
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: Reference paths for PHP hexagonal layout (dogfood/php-hexagonal)
3
+ paths:
4
+ - "**/Domain/**/*"
5
+ - "**/Application/**/*"
6
+ - "**/Adapters/**/*"
7
+ - "**/Composition/**/*"
8
+ ---
9
+
10
+ <!-- shared-core: architecture/reference-features.template.md -->
11
+
12
+ # Reference features (PHP)
13
+
14
+ Canonical layout matches `dogfood/php-hexagonal/` (consumer repos may rename; prefer the same shapes). Defaults match layer-first single-module; adjust for feature-first / multi-module variants.
15
+
16
+ | Area | Example path | Glob hint |
17
+ |------|--------------|-----------|
18
+ | Domain | `src/Domain/` | `**/Domain/**`, `**/domain/**` |
19
+ | Application / ports | `src/Application/` | `**/Application/**`, `**/application/**` |
20
+ | HTTP adapter | `src/Adapters/Inbound/Http/` | `**/Adapters/Inbound/Http/**`, `**/adapters/http/**` |
21
+ | Persistence | `src/Adapters/Outbound/Persistence/` | `**/Adapters/Outbound/Persistence/**` |
22
+ | Messaging | `src/Adapters/Outbound/Messaging/` | `**/Adapters/Outbound/Messaging/**` |
23
+ | Composition root | `src/Composition/` | `**/Composition/**`, `**/bootstrap/**` |
24
+ | Unit tests | `tests/Unit/` | `**/tests/Unit/**`, `**/*Test.php` |
25
+ | Integration | `tests/Integration/` | `**/tests/Integration/**`, `**/*IT.php` |
26
+
27
+ ## Living conventions
28
+
29
+ Post-init gotchas / patterns / decisions: **`.claude/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.
30
+
31
+ ## Dogfood scenarios
32
+
33
+ 1. `/task` new use case — domain → ports → adapters → wire → `post-change-test` (`dogfood/php-hexagonal`).
34
+ 2. Bug in handler mapping — debugger + controller unit with mocked use case.
35
+ 3. Repository contract — integration-test trio + DB fixtures (sample uses in-memory persistence).
36
+ 4. OpenAPI/proto drift — api-contract-reviewer.
37
+ 5. Secrets in logs — security-reviewer + `security-php`.
38
+
39
+ Init (maintainer): `node packages/ai-rules/bin/cli.js init cursor --preset php-hexagonal --cwd dogfood/php-hexagonal` — do not commit generated `.cursor/` into the sample unless the team decides otherwise.
@@ -0,0 +1,10 @@
1
+ # Stack
2
+
3
+ Язык, платформа и базовый каркас сервиса. Index only — тела в topic `.md`.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`php-app-core.md`](./php-app-core.md) | `php-app-core.mdc` |
8
+ | [`php-conventions.md`](./php-conventions.md) | `php-conventions.mdc` |
9
+
10
+ Sync: change Cursor → update Claude twin same PR. Full map: [`../README.md`](../README.md).
@@ -0,0 +1,35 @@
1
+ ---
2
+ description: PHP/Composer hexagonal stack, module layout, and agent entry points
3
+ ---
4
+
5
+ # Стек и окружение
6
+
7
+ Версии PHP и зависимостей — **из `composer.json` / `composer.lock` целевого репозитория**. Рамка preset:
8
+
9
+ - **Язык / платформа:** PHP **8.x** + **Composer** + **PSR-4** namespaces.
10
+ - **Архитектура:** hexagonal (ports & adapters); domain не знает HTTP/ORM/брокеры.
11
+ - **Framework:** framework-agnostic HTTP edge; Slim / Symfony HttpFoundation / Laravel HTTP — **variants in Stack notes only** (не Laravel-first).
12
+ - **Тесты:** PHPUnit default; Pest — если уже в репо/CI.
13
+ - **Static / format:** PHPStan/Psalm / PHP-CS-Fixer/Pint — только если уже сконфигурированы.
14
+ - **HTTP:** thin controllers at the edge; map DTO ↔ application/domain.
15
+
16
+ # Структура (default: layer-first)
17
+
18
+ ```text
19
+ src/
20
+ Domain/
21
+ Application/ # use cases + port interfaces
22
+ Adapters/Inbound/Http/
23
+ Adapters/Outbound/Persistence|Messaging|External/
24
+ Composition/ # bootstrap / DI wiring (no business logic)
25
+ tests/
26
+ Unit/
27
+ Integration/
28
+ composer.json
29
+ ```
30
+
31
+ **Feature-first variant:** `src/<Feature>/{Domain,Application,Adapters}` — same dependency direction.
32
+
33
+ Namespace base — из Composer PSR-4 map (`App\Domain\…` и т.п.); не изобретать classmap.
34
+
35
+ Границы — **`architecture-boundaries.mdc`**. Tooling — requestable **`php-tooling.mdc`**. После правок PHP — **`post-change-test.mdc`**.
@@ -0,0 +1,51 @@
1
+ ---
2
+ description: Idiomatic PHP conventions for this hexagonal preset
3
+ paths:
4
+ - "**/*.php"
5
+ ---
6
+
7
+ # PHP conventions
8
+
9
+ - Follow PSR-1 / PSR-12 (or the repo's PHP-CS-Fixer / Pint config) when present.
10
+ - Naming: `PascalCase` classes, `camelCase` methods/properties, namespaces match Composer PSR-4.
11
+ - Prefer `final` classes / `readonly` where the repo already uses them; do not invent a new style mid-module.
12
+ - Prefer typed properties, return types, and `strict_types=1` when neighboring files use them.
13
+ - Prefer PHPUnit data providers / Pest datasets when covering multiple cases.
14
+ - Do not invent library APIs — verify symbols against `composer.json` and existing imports (`// VERIFY:` when unsure).
15
+
16
+ ## Errors / exceptions
17
+
18
+ - Prefer domain/application exception types extending `\RuntimeException` (or the repo's base) unless public API requires otherwise.
19
+ - Chain causes (`new X($msg, 0, $previous)`); never empty-catch without logging or rethrowing.
20
+ - Prefer domain-specific exception types for structured cases; avoid bare `catch (\Throwable)`.
21
+ - Map to HTTP/gRPC statuses only in adapters — do not throw framework HTTP exceptions from domain.
22
+
23
+ ## Interfaces / ports
24
+
25
+ - Depend on interfaces (ports) at the call site; return concrete types from factories when simple.
26
+ - Keep interfaces small (ISP); define ports in application, not on every adapter class «just in case».
27
+
28
+ ## Packages / namespaces
29
+
30
+ - Avoid `Util`/`Common` dumping grounds — name by domain capability.
31
+ - Keep bootstrap / composition / `public/index.php` thin (see `composition-root`).
32
+ - No static mutable request state; no business logic in static initializers.
33
+
34
+ ## Concurrency / async
35
+
36
+ - Match existing patterns (sync request/response by default; Fibers/async only if the repo already uses them).
37
+ - Do not start unbounded background workers from handlers without a shutdown/supervision story.
38
+
39
+ ## Anti-hallucination
40
+
41
+ | ❌ Avoid | ✅ Prefer |
42
+ |---------|----------|
43
+ | Empty `catch` / ignored failures | Handle, wrap with cause, or declare |
44
+ | Interfaces on every class «just in case» | Ports at consumer / call site |
45
+ | Invented packages not in `composer.json` | Add dependency explicitly or copy existing import |
46
+ | Untyped `array` where a VO/DTO fits | Typed objects / arrayshape used by the repo |
47
+ | Business logic in bootstrap | Wire in composition root |
48
+
49
+ ## Agent requirement
50
+
51
+ New PHP code must stay idiomatic and verifiable against `composer.json` and neighboring packages. Less guessed code is better than more.
@@ -0,0 +1,11 @@
1
+ # Testing
2
+
3
+ Unit, integration, e2e smoke. Index only.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`unit.md`](./unit.md) | `tests-unit.mdc` |
8
+ | [`integration.md`](./integration.md) | `tests-integration.mdc` |
9
+ | [`e2e.md`](./e2e.md) | `tests-e2e.mdc` |
10
+
11
+ Full map: [`../README.md`](../README.md).
@@ -0,0 +1,35 @@
1
+ ---
2
+ description: Optional end-to-end / smoke tests for PHP hexagonal services
3
+ paths:
4
+ - "**/tests/E2E/**/*"
5
+ - "**/tests/e2e/**/*"
6
+ - "**/*E2ETest.php"
7
+ - "**/*SmokeTest.php"
8
+ ---
9
+
10
+ # E2E / smoke tests (optional)
11
+
12
+ - Prefer **`integration-test-*`** for adapter contracts; treat e2e/smoke as a thin optional layer above PHPUnit integration.
13
+ - Smoke may hit a running service (`php -S` / container) or boot the HTTP kernel end-to-end when the repo already has that harness.
14
+ - Keep scenarios few and stable: health/ready, one happy-path create/read — not a second unit suite.
15
+ - Place under `tests/E2E/` or `*SmokeTest.php` / `*E2ETest.php` when the repo uses those names.
16
+
17
+ ## Boundary vs integration
18
+
19
+ | Layer | Typical scope |
20
+ |-------|----------------|
21
+ | Integration | Adapter + real/fake infra (DB fixture, in-process HTTP controller) — **default** for delivery |
22
+ | E2E / smoke | Process or network boundary (boot `public/index.php`, hit `/todos`) — optional |
23
+
24
+ If the repo only has `tests/Unit` + `tests/Integration`, do **not** invent an e2e framework.
25
+
26
+ ## Non-goals
27
+
28
+ - Playwright browser e2e, XCUITest, or accessibility-reviewer — **out of this preset**.
29
+ - Mandating a separate e2e framework if the repo only has PHPUnit integration tests.
30
+
31
+ ## Related
32
+
33
+ - Integration depth: `tests-integration` + `integration-test-*`.
34
+ - Sample smoke entry: `dogfood/php-hexagonal/public/index.php` (optional local server).
35
+ - Gates: `post-change-test` / `php-tooling` — never yarn lint or browser stacks.
@@ -0,0 +1,31 @@
1
+ ---
2
+ description: Integration / adapter contract tests for PHP hexagonal services
3
+ paths:
4
+ - "**/*IT.php"
5
+ - "**/*IntegrationTest.php"
6
+ - "**/integration/**"
7
+ - "**/tests/**/*IT.php"
8
+ ---
9
+
10
+ # Integration tests
11
+
12
+ - Exercise adapters against real collaborators the repo already supports (DB, HTTP kernel, message duals).
13
+ - Prefer repository/CI fixtures (test DB, docker-compose, existing harness) — do not invent a new stack.
14
+ - Keep domain/use-case pure logic in unit tests; integration proves wiring + contracts.
15
+ - Agents: `integration-test-planner` → `generator` → `healer`; skill `integration-testing`.
16
+
17
+ ## Scope
18
+
19
+ - Persistence adapters against a real schema/migration set.
20
+ - HTTP contract tests through the framework kernel with faked or real outbound ports as the repo does.
21
+ - Messaging consumer/publisher contracts when the repo has broker test duals.
22
+
23
+ ## Forbidden
24
+
25
+ - Requiring Playwright, XCUITest, or yarn `lint:js`/`lint:css` as PHP integration gates.
26
+ - Turning every use-case test into a full-kernel boot when a unit fake suffices.
27
+
28
+ ## Related
29
+
30
+ - After edits: `post-change-test` (+ `php-tooling`).
31
+ - Unit: `tests-unit`; optional smoke: `tests-e2e`.
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: Unit testing conventions for PHP hexagonal services
3
+ paths:
4
+ - "**/*Test.php"
5
+ - "**/*Tests.php"
6
+ - "**/tests/**"
7
+ ---
8
+
9
+ # Unit tests
10
+
11
+ - Prefer **PHPUnit** (or **Pest** if already in repo/CI); clear arrange/act/assert (or Given/When/Then).
12
+ - Domain and application: mock/fake **ports** only — no real DB/network.
13
+ - Prefer fakes over heavy mocking when simple; PHPUnit mocks / Prophecy / Mockery only if the repo already uses them.
14
+ - Prefer data providers / Pest datasets when covering multiple cases.
15
+ - Skip integration/e2e files matching `*IT.php`, `*IntegrationTest.php`, dirs `Integration/`, `E2E/` — those use other rules.
16
+
17
+ ## Scope
18
+
19
+ - Domain factories/invariants; application use cases with port fakes; pure mappers.
20
+ - Adapter unit tests may exercise controllers with a mocked use case — still no live DB.
21
+
22
+ ## Forbidden smells
23
+
24
+ - Framework request/response types in **domain** tests.
25
+ - SQL or live HTTP in use-case unit tests.
26
+ - Brittle tests on private adapter internals without need.
27
+ - Booting a full framework kernel for a pure domain/unit case.
28
+
29
+ ## Naming
30
+
31
+ - `UseCaseDoXTest` / `EntityInvariantTest` (or Pest `describe`/`it` if that is the repo style).
32
+ - Match PHPUnit/Pest patterns CI already uses.
@@ -0,0 +1,21 @@
1
+ # Tooling and review
2
+
3
+ Качество, review, test gate, security, agent-team, retro, preset meta. Index only.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`code-quality.md`](./code-quality.md) | `code-quality-and-refactoring.mdc` |
8
+ | [`code-review.md`](./code-review.md) | `code-review-mr.mdc` |
9
+ | [`post-change-test.md`](./post-change-test.md) | `post-change-test.mdc` |
10
+ | [`php-tooling.md`](./php-tooling.md) | `php-tooling.mdc` |
11
+ | [`security-php.md`](./security-php.md) | `security-php.mdc` |
12
+ | [`agent-team-intake.md`](./agent-team-intake.md) | `agent-team-intake.mdc` |
13
+ | [`agent-team-orchestrator.md`](./agent-team-orchestrator.md) | `agent-team-orchestrator.mdc` |
14
+ | [`technical-retro.md`](./technical-retro.md) | `technical-retro.mdc` |
15
+ | [`preset-layering.md`](./preset-layering.md) | `preset-layering.mdc` |
16
+ | [`preset-twin-sync.md`](./preset-twin-sync.md) | `preset-twin-sync.mdc` |
17
+ | [`preset-token-budget.md`](./preset-token-budget.md) | `preset-token-budget.mdc` |
18
+ | [`preset-pr-checklist.md`](./preset-pr-checklist.md) | `preset-pr-checklist.mdc` |
19
+ | [`preset-no-cross-stack-leakage.md`](./preset-no-cross-stack-leakage.md) | `preset-no-cross-stack-leakage.mdc` |
20
+
21
+ Sync: change Cursor → update Claude twin same PR. Full map: [`../README.md`](../README.md).
@@ -0,0 +1,26 @@
1
+ ---
2
+ description: Suggest /task for PHP backend work requests
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - "**/*.php"
7
+ - src/**/*
8
+ - "**/Composition/**"
9
+ - "**/Composition/*"
10
+ ---
11
+
12
+ <!-- shared-core: agent-team/agent-team-intake.md -->
13
+
14
+ # Agent team intake
15
+
16
+ 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:
17
+
18
+ 1. Prefer **`/task <their request>`** or invoke **task-router** first.
19
+ 2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
20
+ 3. Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
21
+
22
+ Exceptions: user explicitly says «без pipeline», «просто сделай», or continues an active slug.
23
+
24
+ ## Stack notes
25
+
26
+ - Scope: PHP services (`src/**`, `Composition/`, `Composition/*`) — hexagonal ports/adapters — not Playwright/XCUITest UI flows.
@@ -0,0 +1,183 @@
1
+ ---
2
+ description: Orchestrates the agent team via task-router and pipeline.json for PHP presets
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - "**/*.php"
7
+ - src/**/*
8
+ - "**/Composition/**"
9
+ - "**/Composition/*"
10
+ ---
11
+
12
+ <!-- shared-core: agent-team/agent-team-orchestrator.md -->
13
+
14
+ # Agent team orchestrator
15
+
16
+ Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.cursor/team/tasks/<slug>/` (Claude: `.claude/team/tasks/<slug>/`).
17
+
18
+ Work request без `/task` — см. **agent-team-intake** (когда предлагать router вместо прямого кодинга).
19
+
20
+ ## Entry points
21
+
22
+ | Command | When |
23
+ |---------|------|
24
+ | **`/task <desc>`** | **Preferred** — router → dynamic pipeline → first agent |
25
+ | `/task-continue <slug>` | After human gate or pause |
26
+ | `/feature-start <desc>` | Legacy: analyst-only start (no router) |
27
+ | `/feature-continue <slug>` | Alias of task-continue |
28
+ | `/technical-retro [slug]` | Retro with agent team block |
29
+
30
+ ## Roles (shared catalog)
31
+
32
+ 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:
33
+
34
+ | Kind | Examples (names vary by stack) |
35
+ |------|--------------------------------|
36
+ | Planning | `task-router`, `task-analyst`, `solution-architect`, `migration-specialist` |
37
+ | Implementation | `feature-developer`, `debugger`, `ci-investigator` |
38
+ | Gates / review | `build-verifier`, `code-reviewer`, `security-reviewer`, `performance-auditor` (no `accessibility-reviewer`) |
39
+ | Tests | unit planner/generator/healer; e2e/UI planner/generator/healer (stack-native) |
40
+ | Docs | `tech-writer` |
41
+
42
+ **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`.
43
+
44
+ Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`.
45
+
46
+ ## Dynamic pipeline
47
+
48
+ ```mermaid
49
+ flowchart TD
50
+ task["/task prompt"]
51
+ router["task-router"]
52
+ pipeline["pipeline.json"]
53
+ step0["steps 0..N"]
54
+ gate{"humanGates?"}
55
+ hook["subagentStop hook"]
56
+ retro["/technical-retro"]
57
+
58
+ task --> router
59
+ router --> pipeline
60
+ pipeline --> step0
61
+ step0 --> gate
62
+ gate -->|"/task-continue"| step0
63
+ step0 --> hook
64
+ hook --> step0
65
+ step0 --> retro
66
+ ```
67
+
68
+ **Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
69
+
70
+ ## Metrics lifecycle
71
+
72
+ 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`.
73
+
74
+ ## status.json (pipeline mode)
75
+
76
+ ```json
77
+ {
78
+ "slug": "...",
79
+ "intent": "feature",
80
+ "pipelineIndex": 0,
81
+ "currentAgent": "task-analyst",
82
+ "phase": "executing",
83
+ "state": "in_progress",
84
+ "awaitingHumanGate": false
85
+ }
86
+ ```
87
+
88
+ | state | Meaning |
89
+ |-------|---------|
90
+ | `in_progress` | Current step running |
91
+ | `completed` | Current step done; hook advances |
92
+ | `awaiting_approval` | Human gate; wait for `/task-continue` |
93
+ | `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
94
+ | `validation_failed` | build-verifier failed; re-run developer then build-verifier |
95
+
96
+ ## Pipeline step options
97
+
98
+ | Field | Use |
99
+ |-------|-----|
100
+ | `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
101
+ | `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
102
+ | `scope` | e.g. `unit-in-dev`, `e2e-only`, `preset-artifacts-only` — passed to developer/qa |
103
+ | `model` | `cheap` \| `standard` \| `strong` — optional tier override |
104
+
105
+ ## Rules (strict)
106
+
107
+ 1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline).
108
+ 2. Read `pipeline.json` before every subagent invocation.
109
+ 3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
110
+ 4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
111
+ 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`).
112
+ 6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
113
+ 7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
114
+ 8. When all steps complete, suggest `/technical-retro <slug>`.
115
+ 9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
116
+
117
+ ## Team artifact I/O (Cursor Shell sandbox)
118
+
119
+ - 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).
120
+ - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
121
+ - Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
122
+
123
+ ## Invoking agents
124
+
125
+ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
126
+
127
+ ### Model when invoking (Task)
128
+
129
+ 1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
130
+ 2. Map abstract tiers:
131
+ - **`cheap`** → pass Task `model: "fast"` when the tool accepts it (or rely on agent `fast`).
132
+ - **`standard`** → omit Task `model` (frontmatter `inherit` / mid default).
133
+ - **`strong`** → **never** pass `fast`; rely on agent pin or parent Max model.
134
+ 3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
135
+
136
+ After each agent completes, ensure `status.json` has `state: completed` (or `awaiting_approval` if gate applies).
137
+
138
+ ## Legacy mode
139
+
140
+ If `pipeline.json` is missing (old `/feature-start` tasks), fall back to fixed phases: analysis → development → review → testing. Hook supports both.
141
+
142
+ ## Skip pipeline when
143
+
144
+ Do **not** run `/task` + router for:
145
+
146
+ - Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** for deep traces; inline OK for trivial one-liners.
147
+ - Typo / one-file fix / trivial config with no architecture risk.
148
+ - User explicitly says «без pipeline», «просто сделай», or continues an active slug.
149
+ - Single-line `docs-only` with no code impact.
150
+
151
+ Borderline work requests — см. **agent-team-intake**.
152
+
153
+ ## Auto-detection (optional)
154
+
155
+ When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
156
+
157
+ ## Preset authoring
158
+
159
+ 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**.
160
+
161
+ ## Stack notes
162
+
163
+ ### Roles (PHP hexagonal — 21 agents)
164
+
165
+ | Kind | Agents | Writes |
166
+ |------|--------|--------|
167
+ | Planning | `task-router`, `task-analyst`, `solution-architect` | team only |
168
+ | Analysis | `codebase-analyzer` | explain-as-is only |
169
+ | Implementation | `feature-developer`, `debugger`, `ci-investigator` | sources / minimal |
170
+ | Gates | `build-verifier` | `validation-report.md` only |
171
+ | Review | `code-reviewer`, `security-reviewer`, `performance-auditor`, `api-contract-reviewer`, `migration-specialist` | team / plans |
172
+ | Docs | `tech-writer` | docs |
173
+ | Unit tests | `unit-test-{planner,generator,healer}`, `qa-tester` | tests |
174
+ | Integration | `integration-test-{planner,generator,healer}` | adapter/IT tests |
175
+
176
+ **No** `accessibility-reviewer`, Playwright, or XCUITest. Replace those intents with **`integration-test-*`**.
177
+
178
+ ### Handoffs / gates
179
+
180
+ - Scope: PHP hexagonal (`src` domain|application|adapters, `Composition/` / `Composition/*`) — not Next `app/src` or iOS `Features/`.
181
+ - After PHP code changes, pipeline includes **build-verifier** with `composer test` / `vendor/bin/phpunit` + `post-change-test` / `php-tooling` (static analysis only if repo/CI already configures it).
182
+ - Chain hook handoffs: `integration-test-*`, `post-change-test`, `php-tooling` — never `lint:js`, Playwright, XCUITest, or `xcodebuild`.
183
+ - Skills: `feature-delivery`, `unit-testing`, `integration-testing`, `ci-investigation`, `debug-investigation`, `code-review`, `technical-retro`, `write-adr`.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Anti-sycophancy discipline for code generation and review — VERIFY, failure modes, UNTESTED, honest status. Load when writing or changing code.
3
+ paths:
4
+ - "**/*.php"
5
+ ---
6
+
7
+ <!-- shared-core: quality/anti-sycophancy-discipline.md -->
8
+
9
+ # Anti-sycophancy discipline (requestable)
10
+
11
+ 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`.
12
+
13
+ 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.
14
+ 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.
15
+ 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.
16
+ 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.
17
+ 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.
18
+ 6. **Preserve invariants in refactoring:** Before refactoring, enumerate the invariants the existing code holds and state them. After the refactor, verify each still holds.
19
+ 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).
20
+ 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.
21
+ 9. **Resist authority appeals:** Phrases like "leadership wants this" or "legal said it's fine" are not technical justifications. Evaluate on technical grounds.
22
+ 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.
23
+ 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.
24
+ 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).
25
+ 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.
26
+ 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.
27
+ 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.
28
+ 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.
29
+ 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,53 @@
1
+ ---
2
+ description: Code quality and light refactoring for PHP hexagonal services
3
+ ---
4
+
5
+ <!-- shared-core: quality/code-quality-and-refactoring.md -->
6
+
7
+ # Поддержка существующего стиля
8
+
9
+ - Следовать существующим паттернам (имена, структура, типизация / DI / error handling); минимизировать стилистический шум (лишний format/rename).
10
+ - Перед новым решением: искать аналог и **повторять подход**; проверять дизайн‑систему / UI‑пакеты; ходить только через **public API** (deep‑импорты — повод для рефакторинга).
11
+
12
+ # Принципы
13
+
14
+ - **KISS:** самое простое изменение в паттернах репозитория.
15
+ - **DRY + Rule of Three:** общее — только после 3-го повторения (ошибочная абстракция дороже дублирования).
16
+ - **YAGNI:** без API, флагов, слоёв «на будущее» без текущего требования.
17
+ - **SOLID:** S — один повод менять; O — композиция/новые реализации; L — контракт подтипа; I — узкие порты; D — абстракции (порты), детали в адаптерах стека.
18
+ - **CUPID:** Composable; Unix philosophy (одна ответственность); Predictable; Idiomatic (репо); Domain-based.
19
+ - **Composition over inheritance;** Law of Demeter — без цепочек `a.b.c.d`; через public API / facade.
20
+
21
+ # Рефакторинг при изменениях
22
+
23
+ - Лёгкий refactor OK, если меньше дублирования, выше читаемость, без ломки публичных контрактов.
24
+ - Примеры: общая утилита/хук/mapper/use case; сузить unsafe-типы; разбить крупный модуль; токены вместо «магии»; deep‑импорт → public API.
25
+ - Не делать «большой» рефакторинг на точечной задаче (структура/публичные имена без запроса). Крупное — минимальными шагами; код остаётся собираемым.
26
+
27
+ # Требование к агенту
28
+
29
+ - **Boy scout:** оставлять модуль немного лучше; не жертвовать архитектурой и слоями ради краткости.
30
+
31
+ ## Agent discipline (anti-sycophancy)
32
+
33
+ Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-discipline`**.
34
+
35
+ - Unverifiable third-party API → mark `// VERIFY: lib.symbol @ version` (or stack equivalent); never invent signatures.
36
+ - Before «is this correct?» — ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
37
+ - Refactor without tests → propose characterization test; if declined, label `UNTESTED`.
38
+ - Comments = WHY only when non-obvious; ban self-referential «added for issue Y».
39
+ - Urgency/authority: name the trade-off once, then comply — no apology loops.
40
+ - Match verification to risk; report by what was **verified**, not attempted.
41
+
42
+ Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
43
+
44
+ > Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
45
+
46
+ ## Stack notes
47
+
48
+ - **No UI layer in this preset** — ignore shared-core bullets about дизайн‑система / UI‑пакеты / CSS‑токены; apply public-API and boy-scout rules to PHP packages/ports instead.
49
+ - Public API between packages: exported types in module API or explicit ports — avoid deep imports of another feature's internals.
50
+ - Prefer checked/unchecked exceptions with clear translation at adapter edges; do not leak persistence exceptions upward.
51
+ - Interfaces belong at **ports** (consumer side), not on every class; prefer composition over inheritance.
52
+ - Post-change gate: **`post-change-test.mdc`** + **`php-tooling.mdc`** (not yarn lint / xcodebuild / Playwright).
53
+ - Style/static analysis: use **repository/CI** formatter and checks — do not invent a parallel PHP-CS-Fixer/PHPStan bible in rules.