@bonesofspring/ai-rules 0.2.11 → 0.2.13

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 (593) hide show
  1. package/CHANGELOG.md +42 -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-artifact-contracts.md +114 -0
  7. package/presets/_shared/core/agent-team/agent-task-metrics.md +30 -0
  8. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +71 -4
  9. package/presets/_shared/core/meta/preset-layering.md +1 -1
  10. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +5 -5
  11. package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
  12. package/presets/_shared/core/meta/preset-twin-sync.md +4 -0
  13. package/presets/_shared/core/review/technical-retro.md +2 -0
  14. package/presets/claude/go/agents/build-verifier.md +11 -4
  15. package/presets/claude/go/agents/code-reviewer.md +8 -1
  16. package/presets/claude/go/agents/feature-developer.md +8 -1
  17. package/presets/claude/go/agents/task-analyst.md +8 -1
  18. package/presets/claude/go/agents/task-router.md +35 -3
  19. package/presets/claude/go/commands/task-continue.md +17 -16
  20. package/presets/claude/go/commands/task.md +11 -5
  21. package/presets/claude/go/commands/technical-retro.md +4 -0
  22. package/presets/claude/go/hooks/chain-team-phases.sh +411 -69
  23. package/presets/claude/go/rules/README.md +6 -0
  24. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +33 -4
  25. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
  26. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
  27. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  28. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +4 -0
  29. package/presets/claude/go/rules/tooling-and-review/technical-retro.md +2 -0
  30. package/presets/claude/go/team/README.md +19 -0
  31. package/presets/claude/ios-swift/agents/build-verifier.md +11 -4
  32. package/presets/claude/ios-swift/agents/code-reviewer.md +9 -14
  33. package/presets/claude/ios-swift/agents/feature-developer.md +8 -1
  34. package/presets/claude/ios-swift/agents/task-analyst.md +8 -1
  35. package/presets/claude/ios-swift/agents/task-router.md +33 -1
  36. package/presets/claude/ios-swift/commands/task-continue.md +17 -16
  37. package/presets/claude/ios-swift/commands/task.md +11 -5
  38. package/presets/claude/ios-swift/commands/technical-retro.md +4 -0
  39. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +393 -70
  40. package/presets/claude/ios-swift/rules/README.md +6 -0
  41. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +36 -1
  42. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +1 -1
  43. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
  44. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  45. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +4 -0
  46. package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +2 -0
  47. package/presets/claude/ios-swift/team/README.md +19 -0
  48. package/presets/claude/java/agents/build-verifier.md +11 -4
  49. package/presets/claude/java/agents/code-reviewer.md +8 -1
  50. package/presets/claude/java/agents/feature-developer.md +8 -1
  51. package/presets/claude/java/agents/task-analyst.md +8 -1
  52. package/presets/claude/java/agents/task-router.md +33 -1
  53. package/presets/claude/java/commands/task-continue.md +17 -16
  54. package/presets/claude/java/commands/task.md +11 -5
  55. package/presets/claude/java/commands/technical-retro.md +4 -0
  56. package/presets/claude/java/hooks/chain-team-phases.sh +411 -69
  57. package/presets/claude/java/rules/README.md +6 -0
  58. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +33 -4
  59. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +1 -1
  60. package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
  61. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  62. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +4 -0
  63. package/presets/claude/java/rules/tooling-and-review/technical-retro.md +2 -0
  64. package/presets/claude/java/team/README.md +19 -0
  65. package/presets/claude/mcp-ts/agents/build-verifier.md +11 -4
  66. package/presets/claude/mcp-ts/agents/feature-developer.md +7 -1
  67. package/presets/claude/mcp-ts/agents/task-analyst.md +8 -1
  68. package/presets/claude/mcp-ts/agents/task-router.md +35 -3
  69. package/presets/claude/mcp-ts/commands/task-continue.md +21 -20
  70. package/presets/claude/mcp-ts/commands/task.md +11 -5
  71. package/presets/claude/mcp-ts/commands/technical-retro.md +4 -0
  72. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +397 -55
  73. package/presets/claude/mcp-ts/rules/README.md +6 -0
  74. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +33 -4
  75. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +1 -1
  76. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
  77. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  78. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +4 -0
  79. package/presets/claude/mcp-ts/rules/tooling-and-review/technical-retro.md +2 -4
  80. package/presets/claude/mcp-ts/team/README.md +19 -0
  81. package/presets/claude/next/agents/accessibility-reviewer.md +6 -12
  82. package/presets/claude/next/agents/api-contract-reviewer.md +6 -12
  83. package/presets/claude/next/agents/build-verifier.md +10 -14
  84. package/presets/claude/next/agents/ci-investigator.md +7 -13
  85. package/presets/claude/next/agents/code-reviewer.md +9 -14
  86. package/presets/claude/next/agents/debugger.md +6 -12
  87. package/presets/claude/next/agents/feature-developer.md +8 -1
  88. package/presets/claude/next/agents/migration-specialist.md +6 -12
  89. package/presets/claude/next/agents/performance-auditor.md +5 -11
  90. package/presets/claude/next/agents/qa-tester.md +6 -12
  91. package/presets/claude/next/agents/security-reviewer.md +6 -12
  92. package/presets/claude/next/agents/solution-architect.md +6 -12
  93. package/presets/claude/next/agents/task-analyst.md +10 -16
  94. package/presets/claude/next/agents/task-router.md +33 -1
  95. package/presets/claude/next/agents/tech-writer.md +6 -13
  96. package/presets/claude/next/agents/unit-test-generator.md +6 -10
  97. package/presets/claude/next/agents/unit-test-healer.md +6 -10
  98. package/presets/claude/next/agents/unit-test-planner.md +5 -11
  99. package/presets/claude/next/commands/task-continue.md +17 -16
  100. package/presets/claude/next/commands/task.md +11 -5
  101. package/presets/claude/next/commands/technical-retro.md +4 -0
  102. package/presets/claude/next/hooks/chain-team-phases.sh +413 -70
  103. package/presets/claude/next/rules/README.md +6 -0
  104. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +32 -3
  105. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +1 -1
  106. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
  107. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  108. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +4 -0
  109. package/presets/claude/next/rules/tooling-and-review/technical-retro.md +2 -0
  110. package/presets/claude/next/team/README.md +32 -1
  111. package/presets/claude/next/team/fixtures/artifact-manifest.example.json +61 -0
  112. package/presets/claude/next/team/fixtures/bugfix-standard.json +10 -0
  113. package/presets/claude/next/team/fixtures/feature-full.json +10 -0
  114. package/presets/claude/next/team/fixtures/feature-light.json +10 -0
  115. package/presets/claude/php-hexagonal/CLAUDE.md +31 -0
  116. package/presets/claude/php-hexagonal/MCP.md +15 -0
  117. package/presets/claude/php-hexagonal/README.md +26 -0
  118. package/presets/claude/php-hexagonal/REPO_AGENTS.md +46 -0
  119. package/presets/claude/php-hexagonal/agents/README.md +32 -0
  120. package/presets/claude/php-hexagonal/agents/api-contract-reviewer.md +23 -0
  121. package/presets/claude/php-hexagonal/agents/build-verifier.md +52 -0
  122. package/presets/claude/php-hexagonal/agents/ci-investigator.md +21 -0
  123. package/presets/claude/php-hexagonal/agents/code-reviewer.md +47 -0
  124. package/presets/claude/php-hexagonal/agents/codebase-analyzer.md +28 -0
  125. package/presets/claude/php-hexagonal/agents/debugger.md +29 -0
  126. package/presets/claude/php-hexagonal/agents/feature-developer.md +54 -0
  127. package/presets/claude/php-hexagonal/agents/integration-test-generator.md +22 -0
  128. package/presets/claude/php-hexagonal/agents/integration-test-healer.md +22 -0
  129. package/presets/claude/php-hexagonal/agents/integration-test-planner.md +22 -0
  130. package/presets/claude/php-hexagonal/agents/migration-specialist.md +31 -0
  131. package/presets/claude/php-hexagonal/agents/performance-auditor.md +22 -0
  132. package/presets/claude/php-hexagonal/agents/qa-tester.md +24 -0
  133. package/presets/claude/php-hexagonal/agents/security-reviewer.md +20 -0
  134. package/presets/claude/php-hexagonal/agents/solution-architect.md +28 -0
  135. package/presets/claude/php-hexagonal/agents/task-analyst.md +32 -0
  136. package/presets/claude/php-hexagonal/agents/task-router.md +101 -0
  137. package/presets/claude/php-hexagonal/agents/tech-writer.md +15 -0
  138. package/presets/claude/php-hexagonal/agents/unit-test-generator.md +21 -0
  139. package/presets/claude/php-hexagonal/agents/unit-test-healer.md +13 -0
  140. package/presets/claude/php-hexagonal/agents/unit-test-planner.md +26 -0
  141. package/presets/claude/php-hexagonal/commands/README.md +13 -0
  142. package/presets/claude/php-hexagonal/commands/feature-continue.md +51 -0
  143. package/presets/claude/php-hexagonal/commands/feature-start.md +30 -0
  144. package/presets/claude/php-hexagonal/commands/task-continue.md +50 -0
  145. package/presets/claude/php-hexagonal/commands/task.md +55 -0
  146. package/presets/claude/php-hexagonal/commands/technical-retro.md +62 -0
  147. package/presets/claude/php-hexagonal/hooks/README.md +16 -0
  148. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +724 -0
  149. package/presets/claude/php-hexagonal/hooks/examples/README.md +18 -0
  150. package/presets/claude/php-hexagonal/hooks/examples/format-edited.example.sh +11 -0
  151. package/presets/claude/php-hexagonal/hooks/examples/secret-guard.example.sh +10 -0
  152. package/presets/claude/php-hexagonal/hooks/examples/test-on-save.example.sh +19 -0
  153. package/presets/claude/php-hexagonal/hooks/guard-shell-command.sh +80 -0
  154. package/presets/claude/php-hexagonal/mcp.json +11 -0
  155. package/presets/claude/php-hexagonal/rules/README.md +67 -0
  156. package/presets/claude/php-hexagonal/rules/api-and-data/README.md +14 -0
  157. package/presets/claude/php-hexagonal/rules/api-and-data/adapters-driven.md +38 -0
  158. package/presets/claude/php-hexagonal/rules/api-and-data/adapters-driving.md +38 -0
  159. package/presets/claude/php-hexagonal/rules/api-and-data/api-grpc.md +29 -0
  160. package/presets/claude/php-hexagonal/rules/api-and-data/api-http.md +36 -0
  161. package/presets/claude/php-hexagonal/rules/api-and-data/messaging-adapters.md +37 -0
  162. package/presets/claude/php-hexagonal/rules/api-and-data/persistence-adapters.md +33 -0
  163. package/presets/claude/php-hexagonal/rules/architecture/README.md +16 -0
  164. package/presets/claude/php-hexagonal/rules/architecture/application-usecases.md +31 -0
  165. package/presets/claude/php-hexagonal/rules/architecture/boundaries.md +34 -0
  166. package/presets/claude/php-hexagonal/rules/architecture/composition-root.md +33 -0
  167. package/presets/claude/php-hexagonal/rules/architecture/domain-layer.md +37 -0
  168. package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +53 -0
  169. package/presets/claude/php-hexagonal/rules/architecture/module-public-api.md +31 -0
  170. package/presets/claude/php-hexagonal/rules/architecture/ports-interfaces.md +34 -0
  171. package/presets/claude/php-hexagonal/rules/architecture/reference-features.md +39 -0
  172. package/presets/claude/php-hexagonal/rules/stack/README.md +10 -0
  173. package/presets/claude/php-hexagonal/rules/stack/php-app-core.md +35 -0
  174. package/presets/claude/php-hexagonal/rules/stack/php-conventions.md +51 -0
  175. package/presets/claude/php-hexagonal/rules/testing/README.md +11 -0
  176. package/presets/claude/php-hexagonal/rules/testing/e2e.md +35 -0
  177. package/presets/claude/php-hexagonal/rules/testing/integration.md +31 -0
  178. package/presets/claude/php-hexagonal/rules/testing/unit.md +32 -0
  179. package/presets/claude/php-hexagonal/rules/tooling-and-review/README.md +21 -0
  180. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +26 -0
  181. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +208 -0
  182. package/presets/claude/php-hexagonal/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  183. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +53 -0
  184. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +60 -0
  185. package/presets/claude/php-hexagonal/rules/tooling-and-review/design-guidance.md +111 -0
  186. package/presets/claude/php-hexagonal/rules/tooling-and-review/php-tooling.md +39 -0
  187. package/presets/claude/php-hexagonal/rules/tooling-and-review/post-change-test.md +31 -0
  188. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +36 -0
  189. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +69 -0
  190. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  191. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +41 -0
  192. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +50 -0
  193. package/presets/claude/php-hexagonal/rules/tooling-and-review/security-php.md +29 -0
  194. package/presets/claude/php-hexagonal/rules/tooling-and-review/technical-retro.md +22 -0
  195. package/presets/claude/php-hexagonal/rules/ui-and-accessibility/README.md +5 -0
  196. package/presets/claude/php-hexagonal/skills/README.md +5 -0
  197. package/presets/claude/php-hexagonal/skills/ci-investigation/SKILL.md +11 -0
  198. package/presets/claude/php-hexagonal/skills/code-review/SKILL.md +25 -0
  199. package/presets/claude/php-hexagonal/skills/debug-investigation/SKILL.md +15 -0
  200. package/presets/claude/php-hexagonal/skills/feature-delivery/SKILL.md +30 -0
  201. package/presets/claude/php-hexagonal/skills/integration-testing/SKILL.md +15 -0
  202. package/presets/claude/php-hexagonal/skills/technical-retro/SKILL.md +54 -0
  203. package/presets/claude/php-hexagonal/skills/unit-testing/SKILL.md +14 -0
  204. package/presets/claude/php-hexagonal/skills/write-adr/SKILL.md +41 -0
  205. package/presets/claude/php-hexagonal/team/README.md +48 -0
  206. package/presets/claude/php-hexagonal/team/conventions.md +21 -0
  207. package/presets/claude/php-hexagonal/team/fixtures/bugfix-standard.json +37 -0
  208. package/presets/claude/php-hexagonal/team/fixtures/feature-full.json +25 -0
  209. package/presets/claude/php-hexagonal/team/fixtures/feature-light.json +17 -0
  210. package/presets/claude/php-laravel/CLAUDE.md +20 -0
  211. package/presets/claude/php-laravel/MCP.md +5 -0
  212. package/presets/claude/php-laravel/README.md +30 -0
  213. package/presets/claude/php-laravel/REPO_AGENTS.md +47 -0
  214. package/presets/claude/php-laravel/agents/README.md +32 -0
  215. package/presets/claude/php-laravel/agents/api-contract-reviewer.md +23 -0
  216. package/presets/claude/php-laravel/agents/build-verifier.md +52 -0
  217. package/presets/claude/php-laravel/agents/ci-investigator.md +21 -0
  218. package/presets/claude/php-laravel/agents/code-reviewer.md +47 -0
  219. package/presets/claude/php-laravel/agents/codebase-analyzer.md +28 -0
  220. package/presets/claude/php-laravel/agents/debugger.md +29 -0
  221. package/presets/claude/php-laravel/agents/feature-developer.md +54 -0
  222. package/presets/claude/php-laravel/agents/integration-test-generator.md +22 -0
  223. package/presets/claude/php-laravel/agents/integration-test-healer.md +22 -0
  224. package/presets/claude/php-laravel/agents/integration-test-planner.md +22 -0
  225. package/presets/claude/php-laravel/agents/migration-specialist.md +31 -0
  226. package/presets/claude/php-laravel/agents/performance-auditor.md +22 -0
  227. package/presets/claude/php-laravel/agents/qa-tester.md +30 -0
  228. package/presets/claude/php-laravel/agents/security-reviewer.md +32 -0
  229. package/presets/claude/php-laravel/agents/solution-architect.md +29 -0
  230. package/presets/claude/php-laravel/agents/task-analyst.md +32 -0
  231. package/presets/claude/php-laravel/agents/task-router.md +120 -0
  232. package/presets/claude/php-laravel/agents/tech-writer.md +15 -0
  233. package/presets/claude/php-laravel/agents/unit-test-generator.md +21 -0
  234. package/presets/claude/php-laravel/agents/unit-test-healer.md +13 -0
  235. package/presets/claude/php-laravel/agents/unit-test-planner.md +26 -0
  236. package/presets/claude/php-laravel/commands/README.md +13 -0
  237. package/presets/claude/php-laravel/commands/feature-continue.md +51 -0
  238. package/presets/claude/php-laravel/commands/feature-start.md +30 -0
  239. package/presets/claude/php-laravel/commands/task-continue.md +50 -0
  240. package/presets/claude/php-laravel/commands/task.md +55 -0
  241. package/presets/claude/php-laravel/commands/technical-retro.md +62 -0
  242. package/presets/claude/php-laravel/hooks/README.md +16 -0
  243. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +724 -0
  244. package/presets/claude/php-laravel/hooks/examples/README.md +18 -0
  245. package/presets/claude/php-laravel/hooks/examples/format-edited.example.sh +11 -0
  246. package/presets/claude/php-laravel/hooks/examples/secret-guard.example.sh +10 -0
  247. package/presets/claude/php-laravel/hooks/examples/test-on-save.example.sh +19 -0
  248. package/presets/claude/php-laravel/hooks/guard-shell-command.sh +80 -0
  249. package/presets/claude/php-laravel/mcp.json +11 -0
  250. package/presets/claude/php-laravel/rules/README.md +67 -0
  251. package/presets/claude/php-laravel/rules/api-and-data/README.md +3 -0
  252. package/presets/claude/php-laravel/rules/api-and-data/eloquent-persistence.md +31 -0
  253. package/presets/claude/php-laravel/rules/api-and-data/events-listeners.md +31 -0
  254. package/presets/claude/php-laravel/rules/api-and-data/form-requests.md +29 -0
  255. package/presets/claude/php-laravel/rules/api-and-data/http-layer.md +32 -0
  256. package/presets/claude/php-laravel/rules/api-and-data/jobs-queues.md +41 -0
  257. package/presets/claude/php-laravel/rules/api-and-data/policies-authorization.md +29 -0
  258. package/presets/claude/php-laravel/rules/api-and-data/routes-api.md +29 -0
  259. package/presets/claude/php-laravel/rules/architecture/README.md +3 -0
  260. package/presets/claude/php-laravel/rules/architecture/actions-services.md +30 -0
  261. package/presets/claude/php-laravel/rules/architecture/boundaries.md +34 -0
  262. package/presets/claude/php-laravel/rules/architecture/domain-layer.md +24 -0
  263. package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +51 -0
  264. package/presets/claude/php-laravel/rules/architecture/module-public-api.md +29 -0
  265. package/presets/claude/php-laravel/rules/architecture/reference-features.md +40 -0
  266. package/presets/claude/php-laravel/rules/architecture/service-providers.md +28 -0
  267. package/presets/claude/php-laravel/rules/stack/README.md +3 -0
  268. package/presets/claude/php-laravel/rules/stack/laravel-app-core.md +32 -0
  269. package/presets/claude/php-laravel/rules/stack/laravel-conventions.md +38 -0
  270. package/presets/claude/php-laravel/rules/testing/README.md +3 -0
  271. package/presets/claude/php-laravel/rules/testing/e2e.md +34 -0
  272. package/presets/claude/php-laravel/rules/testing/integration.md +30 -0
  273. package/presets/claude/php-laravel/rules/testing/unit.md +30 -0
  274. package/presets/claude/php-laravel/rules/tooling-and-review/README.md +3 -0
  275. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +21 -0
  276. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +205 -0
  277. package/presets/claude/php-laravel/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  278. package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +52 -0
  279. package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +58 -0
  280. package/presets/claude/php-laravel/rules/tooling-and-review/design-guidance.md +111 -0
  281. package/presets/claude/php-laravel/rules/tooling-and-review/php-tooling.md +37 -0
  282. package/presets/claude/php-laravel/rules/tooling-and-review/post-change-test.md +29 -0
  283. package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +33 -0
  284. package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +66 -0
  285. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +36 -0
  286. package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +38 -0
  287. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +47 -0
  288. package/presets/claude/php-laravel/rules/tooling-and-review/security-php.md +58 -0
  289. package/presets/claude/php-laravel/rules/tooling-and-review/technical-retro.md +17 -0
  290. package/presets/claude/php-laravel/rules/ui-and-accessibility/README.md +3 -0
  291. package/presets/claude/php-laravel/skills/README.md +5 -0
  292. package/presets/claude/php-laravel/skills/ci-investigation/SKILL.md +11 -0
  293. package/presets/claude/php-laravel/skills/code-review/SKILL.md +25 -0
  294. package/presets/claude/php-laravel/skills/debug-investigation/SKILL.md +15 -0
  295. package/presets/claude/php-laravel/skills/feature-delivery/SKILL.md +30 -0
  296. package/presets/claude/php-laravel/skills/integration-testing/SKILL.md +15 -0
  297. package/presets/claude/php-laravel/skills/technical-retro/SKILL.md +54 -0
  298. package/presets/claude/php-laravel/skills/unit-testing/SKILL.md +14 -0
  299. package/presets/claude/php-laravel/skills/write-adr/SKILL.md +41 -0
  300. package/presets/claude/php-laravel/team/README.md +28 -0
  301. package/presets/claude/php-laravel/team/conventions.md +21 -0
  302. package/presets/claude/php-laravel/team/fixtures/bugfix-standard.json +12 -0
  303. package/presets/claude/php-laravel/team/fixtures/feature-full.json +15 -0
  304. package/presets/claude/php-laravel/team/fixtures/feature-light.json +8 -0
  305. package/presets/cursor/go/agents/build-verifier.md +10 -3
  306. package/presets/cursor/go/agents/code-reviewer.md +8 -1
  307. package/presets/cursor/go/agents/feature-developer.md +8 -1
  308. package/presets/cursor/go/agents/task-analyst.md +8 -1
  309. package/presets/cursor/go/agents/task-router.md +33 -1
  310. package/presets/cursor/go/commands/task-continue.md +17 -16
  311. package/presets/cursor/go/commands/task.md +11 -5
  312. package/presets/cursor/go/commands/technical-retro.md +4 -0
  313. package/presets/cursor/go/hooks/chain-team-phases.sh +411 -69
  314. package/presets/cursor/go/rules/README.md +6 -0
  315. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +33 -4
  316. package/presets/cursor/go/rules/preset-layering.mdc +1 -1
  317. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +5 -5
  318. package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
  319. package/presets/cursor/go/rules/preset-twin-sync.mdc +4 -0
  320. package/presets/cursor/go/rules/technical-retro.mdc +2 -0
  321. package/presets/cursor/go/team/README.md +19 -0
  322. package/presets/cursor/ios-swift/agents/build-verifier.md +11 -4
  323. package/presets/cursor/ios-swift/agents/code-reviewer.md +9 -14
  324. package/presets/cursor/ios-swift/agents/feature-developer.md +8 -1
  325. package/presets/cursor/ios-swift/agents/task-analyst.md +8 -1
  326. package/presets/cursor/ios-swift/agents/task-router.md +33 -1
  327. package/presets/cursor/ios-swift/commands/task-continue.md +17 -16
  328. package/presets/cursor/ios-swift/commands/task.md +11 -5
  329. package/presets/cursor/ios-swift/commands/technical-retro.md +4 -0
  330. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +411 -70
  331. package/presets/cursor/ios-swift/rules/README.md +6 -0
  332. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +26 -1
  333. package/presets/cursor/ios-swift/rules/preset-layering.mdc +1 -1
  334. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +5 -5
  335. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
  336. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +4 -0
  337. package/presets/cursor/ios-swift/rules/technical-retro.mdc +2 -0
  338. package/presets/cursor/ios-swift/team/README.md +19 -0
  339. package/presets/cursor/java/agents/build-verifier.md +11 -4
  340. package/presets/cursor/java/agents/code-reviewer.md +8 -1
  341. package/presets/cursor/java/agents/feature-developer.md +8 -1
  342. package/presets/cursor/java/agents/task-analyst.md +8 -1
  343. package/presets/cursor/java/agents/task-router.md +33 -1
  344. package/presets/cursor/java/commands/task-continue.md +17 -16
  345. package/presets/cursor/java/commands/task.md +11 -5
  346. package/presets/cursor/java/commands/technical-retro.md +4 -0
  347. package/presets/cursor/java/hooks/chain-team-phases.sh +411 -69
  348. package/presets/cursor/java/rules/README.md +6 -0
  349. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +33 -4
  350. package/presets/cursor/java/rules/preset-layering.mdc +1 -1
  351. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +5 -5
  352. package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -1
  353. package/presets/cursor/java/rules/preset-twin-sync.mdc +4 -0
  354. package/presets/cursor/java/rules/technical-retro.mdc +2 -0
  355. package/presets/cursor/java/team/README.md +19 -0
  356. package/presets/cursor/mcp-ts/agents/build-verifier.md +10 -3
  357. package/presets/cursor/mcp-ts/agents/feature-developer.md +7 -1
  358. package/presets/cursor/mcp-ts/agents/task-analyst.md +8 -1
  359. package/presets/cursor/mcp-ts/agents/task-router.md +33 -1
  360. package/presets/cursor/mcp-ts/commands/task-continue.md +19 -18
  361. package/presets/cursor/mcp-ts/commands/task.md +11 -5
  362. package/presets/cursor/mcp-ts/commands/technical-retro.md +4 -0
  363. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +397 -55
  364. package/presets/cursor/mcp-ts/rules/README.md +6 -0
  365. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +33 -4
  366. package/presets/cursor/mcp-ts/rules/preset-layering.mdc +1 -1
  367. package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +5 -5
  368. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +1 -1
  369. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +4 -0
  370. package/presets/cursor/mcp-ts/rules/technical-retro.mdc +2 -4
  371. package/presets/cursor/mcp-ts/team/README.md +19 -0
  372. package/presets/cursor/next/agents/accessibility-reviewer.md +7 -14
  373. package/presets/cursor/next/agents/api-contract-reviewer.md +7 -14
  374. package/presets/cursor/next/agents/build-verifier.md +10 -15
  375. package/presets/cursor/next/agents/ci-investigator.md +7 -14
  376. package/presets/cursor/next/agents/code-reviewer.md +9 -14
  377. package/presets/cursor/next/agents/debugger.md +6 -12
  378. package/presets/cursor/next/agents/feature-developer.md +8 -1
  379. package/presets/cursor/next/agents/migration-specialist.md +7 -14
  380. package/presets/cursor/next/agents/performance-auditor.md +6 -13
  381. package/presets/cursor/next/agents/qa-tester.md +6 -13
  382. package/presets/cursor/next/agents/security-reviewer.md +7 -14
  383. package/presets/cursor/next/agents/solution-architect.md +6 -12
  384. package/presets/cursor/next/agents/task-analyst.md +10 -16
  385. package/presets/cursor/next/agents/task-router.md +33 -1
  386. package/presets/cursor/next/agents/tech-writer.md +6 -13
  387. package/presets/cursor/next/agents/unit-test-generator.md +6 -11
  388. package/presets/cursor/next/agents/unit-test-healer.md +6 -11
  389. package/presets/cursor/next/agents/unit-test-planner.md +6 -13
  390. package/presets/cursor/next/commands/task-continue.md +17 -16
  391. package/presets/cursor/next/commands/task.md +11 -5
  392. package/presets/cursor/next/commands/technical-retro.md +4 -0
  393. package/presets/cursor/next/hooks/chain-team-phases.sh +417 -70
  394. package/presets/cursor/next/rules/README.md +6 -0
  395. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +33 -4
  396. package/presets/cursor/next/rules/preset-layering.mdc +1 -1
  397. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +5 -5
  398. package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
  399. package/presets/cursor/next/rules/preset-twin-sync.mdc +4 -0
  400. package/presets/cursor/next/rules/technical-retro.mdc +2 -0
  401. package/presets/cursor/next/team/README.md +33 -2
  402. package/presets/cursor/next/team/fixtures/artifact-manifest.example.json +61 -0
  403. package/presets/cursor/next/team/fixtures/bugfix-standard.json +10 -0
  404. package/presets/cursor/next/team/fixtures/feature-full.json +10 -0
  405. package/presets/cursor/next/team/fixtures/feature-light.json +10 -0
  406. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  407. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  408. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  409. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  410. package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  411. package/presets/cursor/next/team/fixtures/metrics.example.json +54 -0
  412. package/presets/cursor/php-hexagonal/AGENTS.md +39 -0
  413. package/presets/cursor/php-hexagonal/BUGBOT.md +11 -0
  414. package/presets/cursor/php-hexagonal/MCP.md +15 -0
  415. package/presets/cursor/php-hexagonal/README.md +26 -0
  416. package/presets/cursor/php-hexagonal/REPO_AGENTS.md +46 -0
  417. package/presets/cursor/php-hexagonal/agents/README.md +36 -0
  418. package/presets/cursor/php-hexagonal/agents/api-contract-reviewer.md +23 -0
  419. package/presets/cursor/php-hexagonal/agents/build-verifier.md +52 -0
  420. package/presets/cursor/php-hexagonal/agents/ci-investigator.md +21 -0
  421. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +47 -0
  422. package/presets/cursor/php-hexagonal/agents/codebase-analyzer.md +28 -0
  423. package/presets/cursor/php-hexagonal/agents/debugger.md +29 -0
  424. package/presets/cursor/php-hexagonal/agents/feature-developer.md +54 -0
  425. package/presets/cursor/php-hexagonal/agents/integration-test-generator.md +22 -0
  426. package/presets/cursor/php-hexagonal/agents/integration-test-healer.md +22 -0
  427. package/presets/cursor/php-hexagonal/agents/integration-test-planner.md +22 -0
  428. package/presets/cursor/php-hexagonal/agents/migration-specialist.md +31 -0
  429. package/presets/cursor/php-hexagonal/agents/performance-auditor.md +22 -0
  430. package/presets/cursor/php-hexagonal/agents/qa-tester.md +24 -0
  431. package/presets/cursor/php-hexagonal/agents/security-reviewer.md +20 -0
  432. package/presets/cursor/php-hexagonal/agents/solution-architect.md +28 -0
  433. package/presets/cursor/php-hexagonal/agents/task-analyst.md +32 -0
  434. package/presets/cursor/php-hexagonal/agents/task-router.md +101 -0
  435. package/presets/cursor/php-hexagonal/agents/tech-writer.md +15 -0
  436. package/presets/cursor/php-hexagonal/agents/unit-test-generator.md +21 -0
  437. package/presets/cursor/php-hexagonal/agents/unit-test-healer.md +13 -0
  438. package/presets/cursor/php-hexagonal/agents/unit-test-planner.md +26 -0
  439. package/presets/cursor/php-hexagonal/commands/README.md +54 -0
  440. package/presets/cursor/php-hexagonal/commands/feature-continue.md +19 -0
  441. package/presets/cursor/php-hexagonal/commands/feature-start.md +33 -0
  442. package/presets/cursor/php-hexagonal/commands/task-continue.md +50 -0
  443. package/presets/cursor/php-hexagonal/commands/task.md +55 -0
  444. package/presets/cursor/php-hexagonal/commands/technical-retro.md +85 -0
  445. package/presets/cursor/php-hexagonal/hooks/README.md +12 -0
  446. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +724 -0
  447. package/presets/cursor/php-hexagonal/hooks/examples/README.md +18 -0
  448. package/presets/cursor/php-hexagonal/hooks/examples/format-edited.example.sh +11 -0
  449. package/presets/cursor/php-hexagonal/hooks/examples/secret-guard.example.sh +10 -0
  450. package/presets/cursor/php-hexagonal/hooks/examples/test-on-save.example.sh +19 -0
  451. package/presets/cursor/php-hexagonal/hooks/guard-shell-command.sh +80 -0
  452. package/presets/cursor/php-hexagonal/hooks.json +17 -0
  453. package/presets/cursor/php-hexagonal/mcp.json +11 -0
  454. package/presets/cursor/php-hexagonal/rules/README.md +106 -0
  455. package/presets/cursor/php-hexagonal/rules/adapters-driven.mdc +41 -0
  456. package/presets/cursor/php-hexagonal/rules/adapters-driving.mdc +42 -0
  457. package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +20 -0
  458. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +202 -0
  459. package/presets/cursor/php-hexagonal/rules/anti-sycophancy-discipline.mdc +30 -0
  460. package/presets/cursor/php-hexagonal/rules/api-grpc.mdc +31 -0
  461. package/presets/cursor/php-hexagonal/rules/api-http.mdc +40 -0
  462. package/presets/cursor/php-hexagonal/rules/application-usecases.mdc +33 -0
  463. package/presets/cursor/php-hexagonal/rules/architecture-boundaries.mdc +36 -0
  464. package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +54 -0
  465. package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +54 -0
  466. package/presets/cursor/php-hexagonal/rules/composition-root.mdc +37 -0
  467. package/presets/cursor/php-hexagonal/rules/design-guidance.mdc +112 -0
  468. package/presets/cursor/php-hexagonal/rules/domain-layer.mdc +39 -0
  469. package/presets/cursor/php-hexagonal/rules/feature-delivery-workflow.mdc +47 -0
  470. package/presets/cursor/php-hexagonal/rules/messaging-adapters.mdc +38 -0
  471. package/presets/cursor/php-hexagonal/rules/module-public-api.mdc +32 -0
  472. package/presets/cursor/php-hexagonal/rules/persistence-adapters.mdc +35 -0
  473. package/presets/cursor/php-hexagonal/rules/php-app-core.mdc +37 -0
  474. package/presets/cursor/php-hexagonal/rules/php-conventions.mdc +53 -0
  475. package/presets/cursor/php-hexagonal/rules/php-tooling.mdc +38 -0
  476. package/presets/cursor/php-hexagonal/rules/ports-interfaces.mdc +37 -0
  477. package/presets/cursor/php-hexagonal/rules/post-change-test.mdc +30 -0
  478. package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +36 -0
  479. package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +69 -0
  480. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +39 -0
  481. package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +41 -0
  482. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +50 -0
  483. package/presets/cursor/php-hexagonal/rules/reference-features.mdc +40 -0
  484. package/presets/cursor/php-hexagonal/rules/security-php.mdc +33 -0
  485. package/presets/cursor/php-hexagonal/rules/technical-retro.mdc +16 -0
  486. package/presets/cursor/php-hexagonal/rules/tests-e2e.mdc +36 -0
  487. package/presets/cursor/php-hexagonal/rules/tests-integration.mdc +33 -0
  488. package/presets/cursor/php-hexagonal/rules/tests-unit.mdc +35 -0
  489. package/presets/cursor/php-hexagonal/skills/README.md +5 -0
  490. package/presets/cursor/php-hexagonal/skills/ci-investigation/SKILL.md +11 -0
  491. package/presets/cursor/php-hexagonal/skills/code-review/SKILL.md +25 -0
  492. package/presets/cursor/php-hexagonal/skills/debug-investigation/SKILL.md +15 -0
  493. package/presets/cursor/php-hexagonal/skills/feature-delivery/SKILL.md +30 -0
  494. package/presets/cursor/php-hexagonal/skills/integration-testing/SKILL.md +15 -0
  495. package/presets/cursor/php-hexagonal/skills/technical-retro/SKILL.md +54 -0
  496. package/presets/cursor/php-hexagonal/skills/unit-testing/SKILL.md +14 -0
  497. package/presets/cursor/php-hexagonal/skills/write-adr/SKILL.md +41 -0
  498. package/presets/cursor/php-hexagonal/team/README.md +52 -0
  499. package/presets/cursor/php-hexagonal/team/conventions.md +21 -0
  500. package/presets/cursor/php-hexagonal/team/fixtures/bugfix-standard.json +37 -0
  501. package/presets/cursor/php-hexagonal/team/fixtures/feature-full.json +25 -0
  502. package/presets/cursor/php-hexagonal/team/fixtures/feature-light.json +17 -0
  503. package/presets/cursor/php-laravel/AGENTS.md +39 -0
  504. package/presets/cursor/php-laravel/BUGBOT.md +9 -0
  505. package/presets/cursor/php-laravel/MCP.md +5 -0
  506. package/presets/cursor/php-laravel/README.md +33 -0
  507. package/presets/cursor/php-laravel/REPO_AGENTS.md +47 -0
  508. package/presets/cursor/php-laravel/agents/README.md +36 -0
  509. package/presets/cursor/php-laravel/agents/api-contract-reviewer.md +23 -0
  510. package/presets/cursor/php-laravel/agents/build-verifier.md +52 -0
  511. package/presets/cursor/php-laravel/agents/ci-investigator.md +21 -0
  512. package/presets/cursor/php-laravel/agents/code-reviewer.md +47 -0
  513. package/presets/cursor/php-laravel/agents/codebase-analyzer.md +28 -0
  514. package/presets/cursor/php-laravel/agents/debugger.md +29 -0
  515. package/presets/cursor/php-laravel/agents/feature-developer.md +54 -0
  516. package/presets/cursor/php-laravel/agents/integration-test-generator.md +22 -0
  517. package/presets/cursor/php-laravel/agents/integration-test-healer.md +22 -0
  518. package/presets/cursor/php-laravel/agents/integration-test-planner.md +22 -0
  519. package/presets/cursor/php-laravel/agents/migration-specialist.md +31 -0
  520. package/presets/cursor/php-laravel/agents/performance-auditor.md +22 -0
  521. package/presets/cursor/php-laravel/agents/qa-tester.md +30 -0
  522. package/presets/cursor/php-laravel/agents/security-reviewer.md +32 -0
  523. package/presets/cursor/php-laravel/agents/solution-architect.md +29 -0
  524. package/presets/cursor/php-laravel/agents/task-analyst.md +32 -0
  525. package/presets/cursor/php-laravel/agents/task-router.md +120 -0
  526. package/presets/cursor/php-laravel/agents/tech-writer.md +15 -0
  527. package/presets/cursor/php-laravel/agents/unit-test-generator.md +21 -0
  528. package/presets/cursor/php-laravel/agents/unit-test-healer.md +13 -0
  529. package/presets/cursor/php-laravel/agents/unit-test-planner.md +26 -0
  530. package/presets/cursor/php-laravel/commands/README.md +54 -0
  531. package/presets/cursor/php-laravel/commands/feature-continue.md +19 -0
  532. package/presets/cursor/php-laravel/commands/feature-start.md +33 -0
  533. package/presets/cursor/php-laravel/commands/task-continue.md +50 -0
  534. package/presets/cursor/php-laravel/commands/task.md +55 -0
  535. package/presets/cursor/php-laravel/commands/technical-retro.md +85 -0
  536. package/presets/cursor/php-laravel/hooks/README.md +12 -0
  537. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +724 -0
  538. package/presets/cursor/php-laravel/hooks/examples/README.md +18 -0
  539. package/presets/cursor/php-laravel/hooks/examples/format-edited.example.sh +11 -0
  540. package/presets/cursor/php-laravel/hooks/examples/secret-guard.example.sh +10 -0
  541. package/presets/cursor/php-laravel/hooks/examples/test-on-save.example.sh +19 -0
  542. package/presets/cursor/php-laravel/hooks/guard-shell-command.sh +80 -0
  543. package/presets/cursor/php-laravel/hooks.json +17 -0
  544. package/presets/cursor/php-laravel/mcp.json +11 -0
  545. package/presets/cursor/php-laravel/rules/README.md +111 -0
  546. package/presets/cursor/php-laravel/rules/actions-services.mdc +33 -0
  547. package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +20 -0
  548. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +203 -0
  549. package/presets/cursor/php-laravel/rules/anti-sycophancy-discipline.mdc +30 -0
  550. package/presets/cursor/php-laravel/rules/architecture-boundaries.mdc +37 -0
  551. package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +54 -0
  552. package/presets/cursor/php-laravel/rules/code-review-mr.mdc +56 -0
  553. package/presets/cursor/php-laravel/rules/design-guidance.mdc +112 -0
  554. package/presets/cursor/php-laravel/rules/domain-layer.mdc +27 -0
  555. package/presets/cursor/php-laravel/rules/eloquent-persistence.mdc +34 -0
  556. package/presets/cursor/php-laravel/rules/events-listeners.mdc +34 -0
  557. package/presets/cursor/php-laravel/rules/feature-delivery-workflow.mdc +50 -0
  558. package/presets/cursor/php-laravel/rules/form-requests.mdc +32 -0
  559. package/presets/cursor/php-laravel/rules/http-layer.mdc +35 -0
  560. package/presets/cursor/php-laravel/rules/jobs-queues.mdc +44 -0
  561. package/presets/cursor/php-laravel/rules/laravel-app-core.mdc +35 -0
  562. package/presets/cursor/php-laravel/rules/laravel-conventions.mdc +41 -0
  563. package/presets/cursor/php-laravel/rules/module-public-api.mdc +31 -0
  564. package/presets/cursor/php-laravel/rules/php-tooling.mdc +39 -0
  565. package/presets/cursor/php-laravel/rules/policies-authorization.mdc +32 -0
  566. package/presets/cursor/php-laravel/rules/post-change-test.mdc +31 -0
  567. package/presets/cursor/php-laravel/rules/preset-layering.mdc +36 -0
  568. package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +69 -0
  569. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +39 -0
  570. package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +41 -0
  571. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +50 -0
  572. package/presets/cursor/php-laravel/rules/reference-features.mdc +42 -0
  573. package/presets/cursor/php-laravel/rules/routes-api.mdc +32 -0
  574. package/presets/cursor/php-laravel/rules/security-php.mdc +61 -0
  575. package/presets/cursor/php-laravel/rules/service-providers.mdc +31 -0
  576. package/presets/cursor/php-laravel/rules/technical-retro.mdc +16 -0
  577. package/presets/cursor/php-laravel/rules/tests-e2e.mdc +36 -0
  578. package/presets/cursor/php-laravel/rules/tests-integration.mdc +33 -0
  579. package/presets/cursor/php-laravel/rules/tests-unit.mdc +33 -0
  580. package/presets/cursor/php-laravel/skills/README.md +5 -0
  581. package/presets/cursor/php-laravel/skills/ci-investigation/SKILL.md +11 -0
  582. package/presets/cursor/php-laravel/skills/code-review/SKILL.md +25 -0
  583. package/presets/cursor/php-laravel/skills/debug-investigation/SKILL.md +15 -0
  584. package/presets/cursor/php-laravel/skills/feature-delivery/SKILL.md +30 -0
  585. package/presets/cursor/php-laravel/skills/integration-testing/SKILL.md +15 -0
  586. package/presets/cursor/php-laravel/skills/technical-retro/SKILL.md +54 -0
  587. package/presets/cursor/php-laravel/skills/unit-testing/SKILL.md +14 -0
  588. package/presets/cursor/php-laravel/skills/write-adr/SKILL.md +41 -0
  589. package/presets/cursor/php-laravel/team/README.md +28 -0
  590. package/presets/cursor/php-laravel/team/conventions.md +21 -0
  591. package/presets/cursor/php-laravel/team/fixtures/bugfix-standard.json +12 -0
  592. package/presets/cursor/php-laravel/team/fixtures/feature-full.json +15 -0
  593. package/presets/cursor/php-laravel/team/fixtures/feature-light.json +8 -0
@@ -0,0 +1,53 @@
1
+ ---
2
+ description: End-to-end delivery checklist for PHP hexagonal features
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - "**/*.php"
7
+ - src/**/*
8
+ - tests/**/*
9
+ - "**/Composition/**"
10
+ ---
11
+
12
+ <!-- shared-core: architecture/feature-delivery-workflow.md -->
13
+
14
+ # Feature delivery (PHP hexagonal)
15
+
16
+ Order of work:
17
+
18
+ 1. **Domain** — entities/VOs/errors (`domain-layer`).
19
+ 2. **Application + ports** — use case + outbound interfaces (`application-usecases`, `ports-interfaces`).
20
+ 3. **Driven adapters** — persistence/cache/messaging implementing ports (`adapters-driven`, `persistence-adapters`).
21
+ 4. **Driving adapters** — HTTP/gRPC/CLI mapping DTOs (`adapters-driving`, `api-http`; stubs for gRPC/messaging).
22
+ 5. **Composition root** — wire in `Composition/` / `Composition/*` (`composition-root`).
23
+ 6. **Tests** — unit (domain/app) → integration (adapters) → optional e2e smoke.
24
+ 7. **Gate** — `post-change-test` (+ `php-tooling`).
25
+
26
+ ```mermaid
27
+ flowchart LR
28
+ D[Domain] --> A[Application+Ports]
29
+ A --> Drv[Driven adapters]
30
+ Drv --> A
31
+ HTTP[Driving HTTP] --> A
32
+ CR[Composition root] --> HTTP
33
+ CR --> A
34
+ CR --> Drv
35
+ ```
36
+
37
+ ## Matrix
38
+
39
+ | Path | Rules |
40
+ |------|-------|
41
+ | `**/domain/**` | `domain-layer`, `architecture-boundaries` |
42
+ | `**/application/**` | `application-usecases`, `ports-interfaces` |
43
+ | `**/adapters/inbound/**`, `**/adapters/http/**` | `adapters-driving`, `api-http` / `api-grpc` |
44
+ | `**/adapters/outbound/**`, `**/adapters/persistence/**` | `adapters-driven`, `persistence-adapters` / `messaging-adapters` |
45
+ | `**/Composition/**`, `**/Composition/*` | `composition-root` |
46
+ | After `*.php` edits | `post-change-test` (+ `php-tooling`) |
47
+
48
+ ## Anti-patterns
49
+
50
+ - Framework types in domain; SQL/DQL in use cases; DI inside controllers; skipping port interfaces “for speed”; returning ORM entities as HTTP bodies.
51
+ - **Ubiquitous language:** Domain names/boundaries reflect the feature domain — do not mix transport/framework terms into domain without need.
52
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
53
+ - PHP framework edge is the default edge; plain PHP / Slim / Symfony HttpFoundation keep the same layer order with different wiring.
@@ -0,0 +1,31 @@
1
+ ---
2
+ description: Public module API and package boundaries for PHP services
3
+ paths:
4
+ - "**/composer.json"
5
+ - "**/src/**/*.php"
6
+ ---
7
+
8
+ # Module public API
9
+
10
+ - Published types under a package's public namespaces are a compatibility surface — change carefully; prefer additive APIs.
11
+ - Service-private code stays in implementation namespaces — do not treat every namespace as public API.
12
+ - Prefer narrow exports; expose only what other modules/features need.
13
+ - Do not deep-import another module's internal namespaces; depend on its published API / facade only.
14
+ - Document breaking PHP API changes in CHANGELOG when the repo publishes libraries.
15
+
16
+ ## Single-package default / multi-package variant
17
+
18
+ - **Default:** one Composer package with layer-first namespaces under `src/` (see `dogfood/php-hexagonal`).
19
+ - **Multi-package (Composer path repos / monorepo):** each package exposes a narrow public API; application ports may live in an `*-api` / `*-contracts` package; adapters depend inward. Do not invent multi-package scaffolding unless the repo already uses it.
20
+ - Path repositories / `"repositories": [{"type":"path",...}]` — treat each package's `composer.json` `autoload.psr-4` as that package's boundary SoT.
21
+
22
+ ## composer.json
23
+
24
+ - Package name, PHP version, and PSR-4 map are SoT for toolchain/autoload.
25
+ - Prefer minimal direct deps; pin via `composer.lock` the repo already uses.
26
+ - Dev-only tools (PHPUnit, PHPStan) stay in `require-dev` — not runtime public API.
27
+
28
+ ## Cross-feature
29
+
30
+ - Inside one package, features communicate via application ports or small public facades — not by importing sibling feature adapter namespaces (`Adapters/Inbound/...` of another feature).
31
+ - Domain and application types may be shared within the package; adapter DTOs stay local to that adapter.
@@ -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,208 @@
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`; schema SoT: **agent-artifact-contracts**.
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
+ New pipelines retain top-level `profile` and include `routingDecision` with `complexity`, `riskFlags`, non-empty `routingReasons`, `estimatedWorkPackages`, and `openDecisionCount`. The stack `task-router` owns heuristics; this metadata is auditable evidence and does not change hook semantics.
71
+
72
+ ## Metrics lifecycle
73
+
74
+ Use the local `metrics.json` ledger described by **agent-task-metrics**: the orchestration runtime initializes attempts before invocation, hooks record host-clock ends, and agents never guess a parallel completion from `currentAgent`.
75
+
76
+ ## Artifact context index and receipts
77
+
78
+ Each slug has one `artifact-manifest.json`: `.cursor/team/tasks/<slug>/` or `.claude/team/tasks/<slug>/`. Schema SoT: **agent-artifact-contracts**.
79
+
80
+ - Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
81
+ - Markdown remains detailed evidence; the manifest records producer, status, authoritative paths, timestamps, outcome, and evidence paths.
82
+ - Agents upsert only entries they own and preserve foreign entries. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges.
83
+ - The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite state, gate, retry, attempt, timestamp, or metrics fields.
84
+ - Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
85
+
86
+ ## status.json (pipeline mode)
87
+
88
+ ```json
89
+ {
90
+ "slug": "...",
91
+ "intent": "feature",
92
+ "pipelineIndex": 0,
93
+ "currentAgent": "task-analyst",
94
+ "phase": "executing",
95
+ "state": "in_progress",
96
+ "awaitingHumanGate": false,
97
+ "activeAttempts": {},
98
+ "lastCompletedAttempt": null,
99
+ "parallelCompleted": [],
100
+ "parallelOutcomes": {}
101
+ }
102
+ ```
103
+
104
+ | Field | Meaning |
105
+ |-------|---------|
106
+ | `activeAttempts` | Transient timing bridge keyed by `attemptId` |
107
+ | `lastCompletedAttempt` | Diagnostic pointer to the latest finished attempt |
108
+ | `parallelCompleted` | Agents that have stopped in the current parallel step |
109
+ | `parallelOutcomes` | Per-agent `{ outcome, attemptId, confidence }` for the current parallel join; cleared when the step advances or retries |
110
+
111
+ On each `subagentStop`, the hook reconciles `status.state` from the completing producer's terminal `artifact-manifest.json` receipt when agents left lifecycle fields untouched. Wait for that handoff before invoking the next step.
112
+
113
+ | state | Meaning |
114
+ |-------|---------|
115
+ | `in_progress` | Current step running |
116
+ | `completed` | Current step done; hook advances |
117
+ | `awaiting_approval` | Human gate; wait for `/task-continue` |
118
+ | `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
119
+ | `validation_failed` | build-verifier failed; re-run developer then build-verifier |
120
+
121
+ ## Pipeline step options
122
+
123
+ | Field | Use |
124
+ |-------|-----|
125
+ | `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
126
+ | `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
127
+ | `scope` | e.g. `unit-in-dev`, `e2e-only`, `preset-artifacts-only` — passed to developer/qa |
128
+ | `model` | `cheap` \| `standard` \| `strong` — optional tier override |
129
+
130
+ ## Rules (strict)
131
+
132
+ 1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline).
133
+ 2. Read `pipeline.json` before every subagent invocation.
134
+ 3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
135
+ 4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
136
+ 5. Persist handoffs to disk and update the producer-owned terminal receipt in `artifact-manifest.json`; Markdown remains detailed evidence.
137
+ 6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
138
+ 7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
139
+ 8. When all steps complete, suggest `/technical-retro <slug>`.
140
+ 9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
141
+
142
+ ## Team artifact I/O (Cursor Shell sandbox)
143
+
144
+ - 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).
145
+ - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
146
+ - Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
147
+
148
+ ## Invoking agents
149
+
150
+ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
151
+
152
+ ### Model when invoking (Task)
153
+
154
+ 1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
155
+ 2. Map abstract tiers:
156
+ - **`cheap`** → pass Task `model: "fast"` when the tool accepts it (or rely on agent `fast`).
157
+ - **`standard`** → omit Task `model` (frontmatter `inherit` / mid default).
158
+ - **`strong`** → **never** pass `fast`; rely on agent pin or parent Max model.
159
+ 3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
160
+
161
+ After each agent completes, verify its terminal manifest receipt, then let the orchestration runtime/hook reconcile `status.json` (`completed`, a blocking outcome, or `awaiting_approval`) from that receipt. Do not ask the agent to mutate shared lifecycle fields, and do not invoke the next specialist until the hook has written the handoff / updated `status.json`.
162
+
163
+ ## Legacy mode
164
+
165
+ If `pipeline.json` is missing (old `/feature-start` tasks), fall back to fixed phases: analysis → development → review → testing. Hook supports both.
166
+
167
+ ## Skip pipeline when
168
+
169
+ Do **not** run `/task` + router for:
170
+
171
+ - Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** for deep traces; inline OK for trivial one-liners.
172
+ - Typo / one-file fix / trivial config with no architecture risk.
173
+ - User explicitly says «без pipeline», «просто сделай», or continues an active slug.
174
+ - Single-line `docs-only` with no code impact.
175
+
176
+ Borderline work requests — см. **agent-team-intake**.
177
+
178
+ ## Auto-detection (optional)
179
+
180
+ When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
181
+
182
+ ## Preset authoring
183
+
184
+ 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**.
185
+
186
+ ## Stack notes
187
+
188
+ ### Roles (PHP hexagonal — 21 agents)
189
+
190
+ | Kind | Agents | Writes |
191
+ |------|--------|--------|
192
+ | Planning | `task-router`, `task-analyst`, `solution-architect` | team only |
193
+ | Analysis | `codebase-analyzer` | explain-as-is only |
194
+ | Implementation | `feature-developer`, `debugger`, `ci-investigator` | sources / minimal |
195
+ | Gates | `build-verifier` | `validation-report.md` only |
196
+ | Review | `code-reviewer`, `security-reviewer`, `performance-auditor`, `api-contract-reviewer`, `migration-specialist` | team / plans |
197
+ | Docs | `tech-writer` | docs |
198
+ | Unit tests | `unit-test-{planner,generator,healer}`, `qa-tester` | tests |
199
+ | Integration | `integration-test-{planner,generator,healer}` | adapter/IT tests |
200
+
201
+ **No** `accessibility-reviewer`, Playwright, or XCUITest. Replace those intents with **`integration-test-*`**.
202
+
203
+ ### Handoffs / gates
204
+
205
+ - Scope: PHP hexagonal (`src` domain|application|adapters, `Composition/` / `Composition/*`) — not Next `app/src` or iOS `Features/`.
206
+ - 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).
207
+ - Chain hook handoffs: `integration-test-*`, `post-change-test`, `php-tooling` — never `lint:js`, Playwright, XCUITest, or `xcodebuild`.
208
+ - Skills: `feature-delivery`, `unit-testing`, `integration-testing`, `ci-investigation`, `debug-investigation`, `code-review`, `technical-retro`, `write-adr`.