@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
@@ -59,3 +59,9 @@ Claude topic `.md` files are **derived** from Cursor SoT `presets/cursor/go/rule
59
59
 
60
60
  `architecture/`, `stack/`, `api-and-data/`, `testing/`, `tooling-and-review/`.
61
61
  `ui-and-accessibility/` — README stub only (N/A backend).
62
+
63
+ ## Metrics policy mapping
64
+
65
+ | Shared core | Runtime integration | Loading |
66
+ |-------------|---------------------|---------|
67
+ | `agent-team/agent-task-metrics.md` | `agent-team-orchestrator` + `hooks/chain-team-phases.sh` | requestable/on-demand; never session-start |
@@ -40,7 +40,7 @@ Roster of specialists is **stack-specific** (agent names and write scopes differ
40
40
 
41
41
  **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`.
42
42
 
43
- Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`.
43
+ Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`; schema SoT: **agent-artifact-contracts**.
44
44
 
45
45
  ## Dynamic pipeline
46
46
 
@@ -66,6 +66,22 @@ flowchart TD
66
66
 
67
67
  **Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
68
68
 
69
+ 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.
70
+
71
+ ## Metrics lifecycle
72
+
73
+ 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`.
74
+
75
+ ## Artifact context index and receipts
76
+
77
+ Each slug has one `artifact-manifest.json`: `.cursor/team/tasks/<slug>/` or `.claude/team/tasks/<slug>/`. Schema SoT: **agent-artifact-contracts**.
78
+
79
+ - 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.
80
+ - Markdown remains detailed evidence; the manifest records producer, status, authoritative paths, timestamps, outcome, and evidence paths.
81
+ - Agents upsert only entries they own and preserve foreign entries. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges.
82
+ - 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.
83
+ - Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
84
+
69
85
  ## status.json (pipeline mode)
70
86
 
71
87
  ```json
@@ -76,10 +92,23 @@ flowchart TD
76
92
  "currentAgent": "task-analyst",
77
93
  "phase": "executing",
78
94
  "state": "in_progress",
79
- "awaitingHumanGate": false
95
+ "awaitingHumanGate": false,
96
+ "activeAttempts": {},
97
+ "lastCompletedAttempt": null,
98
+ "parallelCompleted": [],
99
+ "parallelOutcomes": {}
80
100
  }
81
101
  ```
82
102
 
103
+ | Field | Meaning |
104
+ |-------|---------|
105
+ | `activeAttempts` | Transient timing bridge keyed by `attemptId` |
106
+ | `lastCompletedAttempt` | Diagnostic pointer to the latest finished attempt |
107
+ | `parallelCompleted` | Agents that have stopped in the current parallel step |
108
+ | `parallelOutcomes` | Per-agent `{ outcome, attemptId, confidence }` for the current parallel join; cleared when the step advances or retries |
109
+
110
+ 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.
111
+
83
112
  | state | Meaning |
84
113
  |-------|---------|
85
114
  | `in_progress` | Current step running |
@@ -103,7 +132,7 @@ flowchart TD
103
132
  2. Read `pipeline.json` before every subagent invocation.
104
133
  3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
105
134
  4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
106
- 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`).
135
+ 5. Persist handoffs to disk and update the producer-owned terminal receipt in `artifact-manifest.json`; Markdown remains detailed evidence.
107
136
  6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
108
137
  7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
109
138
  8. When all steps complete, suggest `/technical-retro <slug>`.
@@ -128,7 +157,7 @@ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
128
157
  - **`strong`** → **never** pass `fast`; rely on agent pin or parent Max model.
129
158
  3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
130
159
 
131
- After each agent completes, ensure `status.json` has `state: completed` (or `awaiting_approval` if gate applies).
160
+ 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`.
132
161
 
133
162
  ## Legacy mode
134
163
 
@@ -24,7 +24,7 @@ paths:
24
24
  ## Куда класть новое правило
25
25
 
26
26
  1. Общие принципы для всех стеков → **core** + адаптеры с `<!-- shared-core: … -->`.
27
- 2. Только один из installable стеков (`next` / `ios-swift` / `go` / `java`) → **stack-specific** (не в `_shared`).
27
+ 2. Только один из installable стеков (`next` / `ios-swift` / `go` / `java` / `mcp-ts` / `php-hexagonal` / `php-laravel`) → **stack-specific** (не в `_shared`).
28
28
  3. Только Cursor или только Claude packaging → platform artifact / frontmatter, не дублировать семантику.
29
29
 
30
30
  ## SoT
@@ -17,7 +17,7 @@ paths:
17
17
 
18
18
  - `next` must not require iOS-only agents/tooling (`xcuitest-*`, `xcodebuild` as required handoff, Keychain-only rules).
19
19
  - `ios-swift` must not ship Playwright handoffs or Next lint recipes as required commands.
20
- - `go` / `java` / `mcp-ts` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
20
+ - `go` / `java` / `php-hexagonal` / `php-laravel` / `mcp-ts` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
21
21
  - `mcp-ts` must not ship Go tool commands (`go test`, `go vet`, `golangci-lint`) or `integration-test-*` agents as required delivery gates.
22
22
  - Shared core must not embed stack paths (`app/src/**`, `Features/**`, `playwright`, `xcodebuild`).
23
23
 
@@ -36,16 +36,16 @@ Required instead: `xcuitest-test-*` stems; build-verifier mentions `xcodebuild`
36
36
  - `xcuitest-test-` as handoff stems
37
37
  - Requiring `xcodebuild` / SwiftLint as the default post-change gate for Next app work
38
38
 
39
- ## Forbidden in go / java hooks/agents (FAIL)
39
+ ## Forbidden in go / java / php-hexagonal / php-laravel hooks/agents (FAIL)
40
40
 
41
- Shared backend-stack bans (both `go` and `java`):
41
+ Shared backend-stack bans (`go`, `java`, `php-hexagonal`, and `php-laravel`):
42
42
 
43
43
  - `playwright-test-`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
44
44
  - Positive yarn recipes `lint:js` / `lint:css`
45
45
  - `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
46
46
  - Agent file `accessibility-reviewer` (no UI surface)
47
47
 
48
- Required instead: `integration-test-*`; build-verifier / `post-change-test` plus stack tooling — `go-tooling` (`go test`, `go vet`) or `java-tooling` (`mvn test` / `./gradlew test`).
48
+ Required instead: `integration-test-*`; build-verifier / `post-change-test` plus stack tooling — `go-tooling` (`go test`, `go vet`), `java-tooling` (`mvn test` / `./gradlew test`), or `php-tooling` (`php artisan test` / `composer test` / `vendor/bin/phpunit`).
49
49
 
50
50
  ## Forbidden in mcp-ts hooks/agents (FAIL)
51
51
 
@@ -66,4 +66,4 @@ Required instead: package-manager–discovered typecheck/test (`mcp-ts-tooling`,
66
66
 
67
67
  ## Chain fork
68
68
 
69
- `hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, `java`, and `mcp-ts` (per platform).
69
+ `hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, `java`, `mcp-ts`, `php-hexagonal`, and `php-laravel` (per platform).
@@ -17,7 +17,7 @@ paths:
17
17
 
18
18
  - [ ] **SoT:** правки в `packages/…` (не только root `.cursor/`)
19
19
  - [ ] **Core:** если менялся `_shared/core/**` — обновлены все `<!-- shared-core: … -->` consumers (или documented intentional fork)
20
- - [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, go, and java — см. `preset-twin-sync`)
20
+ - [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel — см. `preset-twin-sync`)
21
21
  - [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table актуален
22
22
  - [ ] **Token budget:** alwaysApply / session-start ≤ 3; meta rules not always-on
23
23
  - [ ] **Leakage:** нет чужих stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
@@ -22,6 +22,8 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
22
22
  | `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
23
23
  | `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Keep in `claude/java/rules/README.md` |
24
24
  | `mcp-ts` | `presets/cursor/mcp-ts/rules/*.mdc` | `presets/claude/mcp-ts/rules/<topic>/` | Keep in `claude/mcp-ts/rules/README.md` |
25
+ | `php-hexagonal` | `presets/cursor/php-hexagonal/rules/*.mdc` | `presets/claude/php-hexagonal/rules/<topic>/` | Keep in `claude/php-hexagonal/rules/README.md` |
26
+ | `php-laravel` | `presets/cursor/php-laravel/rules/*.mdc` | `presets/claude/php-laravel/rules/<topic>/` | Keep in `claude/php-laravel/rules/README.md` |
25
27
 
26
28
  ## Same-PR checklist
27
29
 
@@ -42,5 +44,7 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
42
44
  - **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
43
45
  - **java:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go; mapping table required).
44
46
  - **mcp-ts:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java; mapping table required).
47
+ - **php-hexagonal:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java / mcp-ts; mapping table required).
48
+ - **php-laravel:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java / mcp-ts / php-hexagonal; mapping table required).
45
49
 
46
50
  Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
@@ -16,4 +16,6 @@ paths:
16
16
 
17
17
  **`commands/technical-retro.md`** → `/technical-retro`
18
18
 
19
+ When a task has `metrics.json`, use the local aggregation script and state the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not score malformed artifacts or gate wait as agent work.
20
+
19
21
  Используй rule только если command недоступен. Не дублируй содержимое command в ответе — следуй command-файлу и skill `technical-retro`.
@@ -25,3 +25,22 @@
25
25
  | `bugfix-standard.json` | debugger → developer (skipIf) → verifier → reviewer |
26
26
 
27
27
  **Never** schedule Playwright/XCUITest-only steps for this preset. Use `integration-test-*` (or QA with `e2e-only` = integration) for adapter-level coverage.
28
+
29
+ ## Artifact manifest and receipts
30
+
31
+ Each slug stores one context index at `.claude/team/tasks/<slug>/artifact-manifest.json`. Schema v1 is defined by shared core `agent-team/agent-artifact-contracts.md`: every entry declares its producer, status, authoritative paths, acceptance-criteria IDs, decomposition task IDs, timestamps, and a terminal completion receipt.
32
+
33
+ Producer/consumer rules:
34
+
35
+ - Read the manifest first and use only the authoritative inputs needed by the current step; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` when it is missing or stale, and report that gap.
36
+ - Producers upsert only their stable entry IDs, preserve foreign entries, and finish with `completed`, `blocked`, `changes_requested`, or `validation_failed` receipt evidence.
37
+ - The router owns `pipeline.json` and its routing entry; analyst, developer, verifier, and reviewer own their named outputs and receipts. Consumers do not edit another producer's receipt.
38
+ - Agents do not mutate `status.json` or `metrics.json`. The orchestration runtime/hook is their single writer. Parallel receipt merges are serialized by the parent/orchestrator.
39
+
40
+ ## Local metrics ledger
41
+
42
+ `metrics.json` is an append-only schema-v1 event ledger for one task run. It contains only allowlisted IDs, task dimensions, timestamps, outcomes, and attribution confidence—never prompts, secrets, file paths, or contents. The orchestration runtime writes `task_started` / `attempt_started`; the hook records host-clock completion and human-gate edges under a per-task lock with temp-and-rename.
43
+
44
+ `status.json.activeAttempts` is a transient timing bridge keyed by `attemptId`; `lastCompletedAttempt` is diagnostic; `parallelOutcomes` holds per-agent outcomes for the current parallel join until the step advances. For parallel stops, the hook must use a stable payload identity or the sole active attempt. Otherwise an explicit `.metrics-receipts.json` receipt is fallback data marked `source: agent`, `attributionConfidence: fallback`; it must never guess from `currentAgent`.
45
+
46
+ Aggregate with `node packages/ai-rules/scripts/aggregate-agent-task-metrics.mjs --team-root .claude/team`. It reports role/agent count, completed count, total/average duration, distinct completed run IDs, separate human-gate wait, and incomplete artifacts.
@@ -35,7 +35,7 @@ When validating **ios-swift preset** changes (or `scope: preset-structure-valida
35
35
  3. **Forbidden handoff strings** in ios-swift `chain-team-phases.sh`: `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`, positive `lint:js` / `lint:css` recipes. See `tooling-and-review/preset-no-cross-stack-leakage.md`.
36
36
  4. **Required handoff stems:** `AGENT_HANDOFF` must include `xcuitest-test-planner` (or generator/healer); build-verifier mentions `xcodebuild` or `post-change-build` / `xcode-tooling`.
37
37
  5. **Roster:** 21 agent stems; no `playwright-test-*` under ios-swift `agents/`.
38
- 6. **Twin presence (hard):** Cursor rule change → Claude twin same PR — **FAIL** if missing (next, ios-swift, go, and java).
38
+ 6. **Twin presence (hard):** Cursor rule change → Claude twin same PR — **FAIL** if missing (next, ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel).
39
39
  7. **Mapping / README:** Cursor→Claude mapping table present; core→stack mapping when `_shared` consumers exist.
40
40
  8. **shared-core consumers:** if `_shared/core/**` changed, update all `<!-- shared-core: … -->` consumers (or document intentional fork).
41
41
  9. **Session-start body budget:** sum of the **3** intended session-start rule bodies ≤ **140** lines (stretch ≤120); do **not** include `**/README.md` — record in report.
@@ -47,9 +47,9 @@ When validating **ios-swift preset** changes (or `scope: preset-structure-valida
47
47
  - **Thin aliases:** `agent-team-intake`, `technical-retro` may be &lt;15 body lines. Enforce ≥15 on **domain** rules.
48
48
  - Embed vs lineage: `docs/PRESET-CONTRIBUTION.md`, `_shared/README.md`.
49
49
 
50
- 12. **Root AGENTS template:** each installable preset (`cursor|claude` × `next|ios-swift|go|java`) must ship `REPO_AGENTS.md` when validating preset packaging → **FAIL** if missing.
50
+ 12. **Root AGENTS template:** each installable preset (`cursor|claude` × `next|ios-swift|go|java|mcp-ts|php-hexagonal`) must ship `REPO_AGENTS.md` when validating preset packaging → **FAIL** if missing.
51
51
  13. **Hooks cookbook:** default `hooks.json` must **not** reference `hooks/examples/` → **FAIL** if it does.
52
- 14. **No react-performance on ios/go/java:** skill directory / required handoff must be absent under ios-swift, go, and java → **FAIL** (leakage). Prefer `check:preset-leakage`.
52
+ 14. **No react-performance on ios/go/java:** skill directory / required handoff must be absent under ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel → **FAIL** (leakage). Prefer `check:preset-leakage`.
53
53
  15. **Rule eval (WARN):** `scripts/check-rule-eval.mjs` / `yarn check:rule-eval` should exist for maintainers; smoke optional. Hard fail only when the opt-in eval job runs — not part of default `check:preset-structure`.
54
54
 
55
55
  ## Output
@@ -75,4 +75,11 @@ PASS | FAIL
75
75
 
76
76
  ## On completion
77
77
 
78
- Update `status.json`: `currentAgent: build-verifier`, `state: completed` (or `validation_failed` on FAIL). Do not fix code — report only.
78
+ Write the owned validation receipt (`completed` or `validation_failed`). Do not fix code — report only; the runtime owns `status.json`.
79
+
80
+ ## Artifact contract
81
+
82
+ - **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, implementation evidence, pipeline scope, and changed files.
83
+ - **Owned outputs:** `validation-report.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `validation`) and preserve all foreign entries.
84
+ - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `validation_failed`. Bind it to the supplied `attemptId` when present.
85
+ - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
@@ -5,7 +5,7 @@ readonly: false
5
5
  model: fast
6
6
  ---
7
7
 
8
- You are a senior iOS / Swift / SwiftUI code reviewer. You may write only review artifacts under `.claude/team/**` and update task `status.json`; do not modify production code.
8
+ You are a senior iOS / Swift / SwiftUI code reviewer. You may write only review artifacts under `.claude/team/**` and terminal receipts; do not modify production code.
9
9
 
10
10
  ## Inputs
11
11
 
@@ -58,22 +58,17 @@ APPROVE | APPROVE_WITH_NOTES | REQUEST_CHANGES
58
58
 
59
59
  ## On completion
60
60
 
61
- Update `status.json`:
62
-
63
- ```json
64
- {
65
- "slug": "<slug>",
66
- "currentAgent": "code-reviewer",
67
- "phase": "executing",
68
- "state": "completed",
69
- "updatedAt": "<ISO8601>"
70
- }
71
- ```
72
-
73
- If **REQUEST_CHANGES**, set `"state": "changes_requested"` (hook will re-invoke feature-developer).
61
+ Write the owned terminal receipt described under **Artifact contract**. If **REQUEST_CHANGES**, emit receipt outcome `changes_requested`; the hook decides retry state.
74
62
 
75
63
  Do not mix this output with retrospective facilitation — keep review and retro separate.
76
64
 
77
65
  ## Design guidance
78
66
 
79
67
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
68
+
69
+ ## Artifact contract
70
+
71
+ - **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, implementation, validation evidence, and the scoped git diff.
72
+ - **Owned outputs:** `review.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `review`) and preserve all foreign entries.
73
+ - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
74
+ - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
@@ -45,7 +45,7 @@ When copying from `next` into `ios-swift` (or another stack):
45
45
 
46
46
  ## On completion
47
47
 
48
- `status.json`: `currentAgent: feature-developer`, `state: completed`. Handoff by layer + gaps for verifier/reviewer. No formal code review.
48
+ Emit the owned implementation receipt with outcome `completed`. Handoff by layer + gaps for verifier/reviewer. No formal code review.
49
49
 
50
50
  ## Design guidance
51
51
 
@@ -54,3 +54,10 @@ When copying from `next` into `ios-swift` (or another stack):
54
54
  ## Anti-sycophancy discipline
55
55
 
56
56
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
57
+
58
+ ## Artifact contract
59
+
60
+ - **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
61
+ - **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `implementation`) and preserve all foreign entries.
62
+ - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
63
+ - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
@@ -20,10 +20,17 @@ Ask only blocking questions (AC gaps, Feature scope, platforms, offline/auth, AP
20
20
 
21
21
  1. `brief.md` — goal, AC, out of scope, assumptions.
22
22
  2. `decomposition.md` — ordered WPs with Depends on / Done when; mark unit/UI test WPs.
23
- 3. Update `status.json` `awaiting_approval` if human gate after analyst.
23
+ 3. Emit the analysis receipt; the runtime applies the configured analyst human gate.
24
24
 
25
25
  Do not invent architecture stacks (TCA, SwiftData, …) — frame «как в репо».
26
26
 
27
27
  ## Design guidance (optional)
28
28
 
29
29
  - Optional: Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit — only when decomposing refactor/architecture tasks (not default).
30
+
31
+ ## Artifact contract
32
+
33
+ - **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
34
+ - **Owned outputs:** `brief.md` and `decomposition.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign entries.
35
+ - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
36
+ - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
@@ -40,6 +40,27 @@ You are a task router for an **iOS Swift/SwiftUI** agent team. You **do not** im
40
40
 
41
41
  **Never skip `build-verifier`** after developer when Swift/Xcode sources changed.
42
42
 
43
+ ## Routing decision rubric
44
+
45
+ Keep top-level `profile` and emit this top-level object in every new `pipeline.json`:
46
+
47
+ ```json
48
+ "routingDecision": {
49
+ "complexity": "low | moderate | high",
50
+ "riskFlags": [],
51
+ "routingReasons": ["Concrete request signal and its routing consequence."],
52
+ "estimatedWorkPackages": 1,
53
+ "openDecisionCount": 0
54
+ }
55
+ ```
56
+
57
+ - `low`: one bounded layer/file set, explicit AC, reversible, no risk flags/open decisions → `light` when verification policy permits.
58
+ - `moderate`: adjacent concerns or a regression/refactor with known boundaries → usually `standard`.
59
+ - `high`: cross-layer/public contract, security, migration/destructive or concurrency/state risk, broad UI-test surface, unclear AC, or multiple work packages → usually `full`.
60
+ - Use concrete flags: `public-contract`, `cross-layer`, `security-sensitive`, `migration`, `destructive`, `concurrency-state`, `external-dependency`, `unclear-acceptance-criteria`, `broad-test-surface`, `behavior-regression`.
61
+ - `routingReasons` must be non-empty and explain profile, gates, specialists, skips, or checkpoints; never write “standard by default.”
62
+ - `estimatedWorkPackages` is an integer ≥1; `openDecisionCount` is an integer ≥0. Do not lower complexity because implementation is familiar.
63
+
43
64
  ## Model tiers (`steps[].model`)
44
65
 
45
66
  Optional: `"model": "cheap" | "standard" | "strong"`. Same policy as **claude/next** `task-router.md`:
@@ -64,8 +85,19 @@ Fixtures: `.claude/team/fixtures/` (feature-full, feature-light, bugfix-standard
64
85
 
65
86
  ## Output
66
87
 
67
- Write `.claude/team/tasks/<slug>/pipeline.json` and initial `status.json` (write files; do not Shell-`mkdir` alone); set `.claude/team/active-task.json`.
88
+ Write `.claude/team/tasks/<slug>/pipeline.json` and initialize the routing entry in `artifact-manifest.json`; set `.claude/team/active-task.json`. The orchestration runtime creates and owns `status.json`.
68
89
 
69
90
  ## Handoff
70
91
 
71
92
  Intent + steps table + skipped + gates → invoke `steps[0].agent` (unless retro).
93
+
94
+ ## Runtime initialization
95
+
96
+ Return the routing receipt to the orchestrator. The orchestration runtime/hook exclusively initializes and updates `status.json`, `metrics.json`, attempt identities, and gate lifecycle; the router does not write those shared runtime files.
97
+
98
+ ## Artifact contract
99
+
100
+ - **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume the user request and any existing authoritative task/decision entries.
101
+ - **Owned outputs:** `pipeline.json` and the routing manifest entry; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `routing`) and preserve all foreign entries.
102
+ - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
103
+ - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
@@ -22,22 +22,19 @@ description: Continue an agent-team task after a human gate, pause, or review ch
22
22
  ## Алгоритм
23
23
 
24
24
  1. Запиши `.claude/team/active-task.json` → `{ "slug": "<slug>" }`.
25
- 2. Сбрось gate: `awaitingHumanGate: false`.
26
- 3. Определи **следующий шаг**:
27
- - После approval analyst/architect: `pipelineIndex + 1` следующий agent в `steps`.
28
- - После `changes_requested`: снова **feature-developer** (тот же index или найди developer в steps).
29
- 4. Обнови `status.json`:
30
- ```json
31
- {
32
- "pipelineIndex": <n>,
33
- "currentAgent": "<steps[n].agent>",
34
- "phase": "executing",
35
- "state": "in_progress",
36
- "awaitingHumanGate": false
37
- }
38
- ```
39
- 5. Вызови subagent для `currentAgent` с контекстом slug и артефактов.
40
- 6. Если hook `chain-team-phases.sh` включён в проекте и `autoChain: true`, он продолжит цепочку по `pipeline.json`; иначе продолжай следующий шаг вручную.
25
+ 2. **Human gate resume** (`awaitingHumanGate` / `awaiting_approval`):
26
+ 1. **Do not** manually increment `pipelineIndex` or invent `currentAgent` first.
27
+ 2. Close the gate + activate the next attempt via the **installed** hook (single authority for ledger + status):
28
+
29
+ ```bash
30
+ printf '%s\n' '{"status":"completed","action":"end_human_gate","activateNext":true}' | bash .claude/hooks/chain-team-phases.sh
31
+ ```
32
+
33
+ 3. Re-read `status.json` (and the hook `followup_message`).
34
+ 4. Invoke the subagent named in `status.currentAgent` / followup — do **not** advance the pipeline a second time.
35
+ 3. **Review `changes_requested`** (not a human gate): set `currentAgent` to `feature-developer` (same index / find developer in steps), `state: in_progress`, then invoke developer. Do **not** call `end_human_gate` unless `activeHumanGateEventId` is set.
36
+ 4. **Other resume**: restore `pipelineIndex` / `currentAgent` from status and invoke that agent.
37
+ 5. After the invoked agent completes, `chain-team-phases.sh` on `subagentStop` continues the chain when `autoChain: true`.
41
38
 
42
39
  ## Артефакты для handoff
43
40
 
@@ -47,3 +44,7 @@ description: Continue an agent-team task after a human gate, pause, or review ch
47
44
  | build-verifier | git diff, decomposition.md |
48
45
  | code-reviewer | brief.md, validation-report.md, git diff |
49
46
  | qa-tester | brief.md, decomposition.md, scope from pipeline step |
47
+
48
+ ## Metrics
49
+
50
+ On human-gate resume, the hook action above appends `human_gate_ended` under the per-task lock **before** any new `attempt_started`. Agents must not calculate durations.
@@ -25,14 +25,16 @@ description: Route a natural-language task through the agent-team pipeline: task
25
25
 
26
26
  ## Алгоритм
27
27
 
28
- 1. **Slug** — kebab-case из описания (≤48 символов). Создай `.claude/team/tasks/<slug>/` через запись файла (Write / Edit) — **не** полагайся на Shell `mkdir` как единственный способ создать каталог.
28
+ 1. **Slug** — kebab-case из описания (≤48 символов). Создай `.claude/team/tasks/<slug>/` через запись файла (Write / Edit); runtime/hook владеет `status.json` — **не** полагайся на Shell `mkdir` как единственный способ создать каталог.
29
29
  2. **Router** — вызови subagent **task-router** с описанием задачи и путём к slug.
30
30
  3. **План** — покажи пользователю таблицу из `pipeline.json`: intent, steps, skipped, humanGates.
31
31
  4. **Intent retro** — если `intent === "retro"`, выполни `/technical-retro` и **остановись**.
32
- 5. **Старт** — вызови subagent для `pipeline.steps[0].agent`:
33
- - передай slug, пути к артефактам, scope из step (если есть);
34
- - обнови `status.json`: `pipelineIndex: 0`, `currentAgent`, `state: in_progress`.
35
- 6. **Human gate** если после текущего шага есть gate в `humanGates` (`after:<agent>`), после завершения агента **остановись** и попроси `/task-continue <slug>` (или `/feature-continue <slug>`).
32
+ 5. **Старт** — после router:
33
+ - подтверди `pipeline.json` и `active-task.json`;
34
+ - **не** пиши lifecycle-поля `status.json` / `metrics.json` сам — их владеет orchestration runtime/hook (см. **agent-artifact-contracts**). Если `status.json` отсутствует, допустим только минимальный bootstrap (`slug`, `intent`, `pipelineIndex: 0`, `currentAgent: steps[0]`, `state: in_progress`) — **не** увеличивай `pipelineIndex` вручную;
35
+ - вызови subagent для `pipeline.steps[0].agent` (slug, пути к артефактам, scope).
36
+ 6. **После каждого агента** — дождись hook handoff / reconciliation terminal receipt → `status.state`; не запускай следующий шаг, пока `status.json` не отражает handoff (или пока нет `followup_message` от hook).
37
+ 7. **Human gate** — если после текущего шага есть gate в `humanGates` (`after:<agent>`), после завершения агента **остановись** и попроси `/task-continue <slug>` (или `/feature-continue <slug>`).
36
38
 
37
39
  ## Не делать
38
40
 
@@ -48,3 +50,7 @@ description: Route a natural-language task through the agent-team pipeline: task
48
50
  ## Legacy
49
51
 
50
52
  `/feature-start` и `/feature-continue` остаются совместимыми; для новых задач предпочитай `/task`.
53
+
54
+ ## Metrics
55
+
56
+ Runtime/hook owns `metrics.json` and `status.json` attempt ledgers. Before the first invocation ensure `task_started` and one `activeAttempts[attemptId]` + `attempt_started` exist (router/runtime bootstrap — parent must not invent parallel indices). On `/task-continue`, run the installed chain hook `end_human_gate` action (or wrapper) so `human_gate_ended` lands before the next attempt. Do not calculate durations in agents.
@@ -56,3 +56,7 @@ description: Facilitate a technical retrospective for a period, incident, releas
56
56
  - Не приписывать команде цитаты или факты, которых не было во входе.
57
57
  - Не выдавать юридические/HR‑рекомендации; при явных конфликтах или токсичности — мягко предложить эскалацию человеку, ответственному за команду, без детализации «наказаний».
58
58
  - Если пользователь просит только шаблон — выдать **шаблон повестки и доски** (колонки, таймбоксы) без выдуманного контента.
59
+
60
+ ### Metrics evidence
61
+
62
+ When `metrics.json` exists, run the local aggregation script and report the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not treat gate wait or malformed ledgers as agent duration.