@bonesofspring/ai-rules 0.2.4 → 0.2.6

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 (327) hide show
  1. package/CHANGELOG.md +22 -5
  2. package/README.md +13 -1
  3. package/bin/cli.js +2 -0
  4. package/package.json +8 -1
  5. package/presets/_shared/README.md +47 -0
  6. package/presets/_shared/core/agent-team/agent-team-intake.md +9 -0
  7. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +142 -0
  8. package/presets/_shared/core/architecture/feature-delivery-workflow.md +46 -0
  9. package/presets/_shared/core/architecture/reference-features.template.md +31 -0
  10. package/presets/_shared/core/meta/preset-layering.md +25 -0
  11. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +43 -0
  12. package/presets/_shared/core/meta/preset-pr-checklist.md +28 -0
  13. package/presets/_shared/core/meta/preset-token-budget.md +30 -0
  14. package/presets/_shared/core/meta/preset-twin-sync.md +31 -0
  15. package/presets/_shared/core/quality/code-quality-and-refactoring.md +58 -0
  16. package/presets/_shared/core/quality/design-guidance.md +97 -0
  17. package/presets/_shared/core/review/code-review-mr.md +29 -0
  18. package/presets/_shared/core/review/technical-retro.md +7 -0
  19. package/presets/claude/go/CLAUDE.md +10 -0
  20. package/presets/claude/go/MCP.md +16 -0
  21. package/presets/claude/go/README.md +34 -0
  22. package/presets/claude/go/agents/README.md +15 -0
  23. package/presets/claude/go/agents/api-contract-reviewer.md +23 -0
  24. package/presets/claude/go/agents/build-verifier.md +30 -0
  25. package/presets/claude/go/agents/ci-investigator.md +17 -0
  26. package/presets/claude/go/agents/code-reviewer.md +40 -0
  27. package/presets/claude/go/agents/debugger.md +25 -0
  28. package/presets/claude/go/agents/feature-developer.md +30 -0
  29. package/presets/claude/go/agents/integration-test-generator.md +22 -0
  30. package/presets/claude/go/agents/integration-test-healer.md +22 -0
  31. package/presets/claude/go/agents/integration-test-planner.md +22 -0
  32. package/presets/claude/go/agents/migration-specialist.md +31 -0
  33. package/presets/claude/go/agents/performance-auditor.md +22 -0
  34. package/presets/claude/go/agents/qa-tester.md +24 -0
  35. package/presets/claude/go/agents/security-reviewer.md +20 -0
  36. package/presets/claude/go/agents/solution-architect.md +28 -0
  37. package/presets/claude/go/agents/task-analyst.md +25 -0
  38. package/presets/claude/go/agents/task-router.md +69 -0
  39. package/presets/claude/go/agents/tech-writer.md +15 -0
  40. package/presets/claude/go/agents/unit-test-generator.md +21 -0
  41. package/presets/claude/go/agents/unit-test-healer.md +13 -0
  42. package/presets/claude/go/agents/unit-test-planner.md +26 -0
  43. package/presets/claude/go/commands/README.md +13 -0
  44. package/presets/claude/go/commands/feature-continue.md +51 -0
  45. package/presets/claude/go/commands/feature-start.md +30 -0
  46. package/presets/claude/go/commands/task-continue.md +49 -0
  47. package/presets/claude/go/commands/task.md +49 -0
  48. package/presets/claude/go/commands/technical-retro.md +58 -0
  49. package/presets/claude/go/hooks/README.md +10 -0
  50. package/presets/claude/go/hooks/chain-team-phases.sh +381 -0
  51. package/presets/claude/go/hooks/guard-shell-command.sh +79 -0
  52. package/presets/claude/go/mcp.json +12 -0
  53. package/presets/claude/go/rules/README.md +60 -0
  54. package/presets/claude/go/rules/api-and-data/README.md +14 -0
  55. package/presets/claude/go/rules/api-and-data/adapters-driven.md +34 -0
  56. package/presets/claude/go/rules/api-and-data/adapters-driving.md +35 -0
  57. package/presets/claude/go/rules/api-and-data/api-grpc.md +27 -0
  58. package/presets/claude/go/rules/api-and-data/api-http.md +26 -0
  59. package/presets/claude/go/rules/api-and-data/messaging-adapters.md +21 -0
  60. package/presets/claude/go/rules/api-and-data/persistence-adapters.md +28 -0
  61. package/presets/claude/go/rules/architecture/README.md +16 -0
  62. package/presets/claude/go/rules/architecture/application-usecases.md +29 -0
  63. package/presets/claude/go/rules/architecture/boundaries.md +29 -0
  64. package/presets/claude/go/rules/architecture/composition-root.md +28 -0
  65. package/presets/claude/go/rules/architecture/domain-layer.md +32 -0
  66. package/presets/claude/go/rules/architecture/feature-delivery.md +51 -0
  67. package/presets/claude/go/rules/architecture/module-public-api.md +23 -0
  68. package/presets/claude/go/rules/architecture/ports-interfaces.md +34 -0
  69. package/presets/claude/go/rules/architecture/reference-features.md +30 -0
  70. package/presets/claude/go/rules/stack/README.md +10 -0
  71. package/presets/claude/go/rules/stack/go-app-core.md +31 -0
  72. package/presets/claude/go/rules/stack/go-conventions.md +24 -0
  73. package/presets/claude/go/rules/testing/README.md +11 -0
  74. package/presets/claude/go/rules/testing/e2e.md +18 -0
  75. package/presets/claude/go/rules/testing/integration.md +23 -0
  76. package/presets/claude/go/rules/testing/unit.md +24 -0
  77. package/presets/claude/go/rules/tooling-and-review/README.md +21 -0
  78. package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +25 -0
  79. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +161 -0
  80. package/presets/claude/go/rules/tooling-and-review/code-quality.md +72 -0
  81. package/presets/claude/go/rules/tooling-and-review/code-review.md +48 -0
  82. package/presets/claude/go/rules/tooling-and-review/design-guidance.md +110 -0
  83. package/presets/claude/go/rules/tooling-and-review/go-tooling.md +38 -0
  84. package/presets/claude/go/rules/tooling-and-review/post-change-test.md +32 -0
  85. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +36 -0
  86. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +58 -0
  87. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  88. package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +41 -0
  89. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +42 -0
  90. package/presets/claude/go/rules/tooling-and-review/security-go.md +22 -0
  91. package/presets/claude/go/rules/tooling-and-review/technical-retro.md +19 -0
  92. package/presets/claude/go/rules/ui-and-accessibility/README.md +3 -0
  93. package/presets/claude/go/skills/README.md +5 -0
  94. package/presets/claude/go/skills/ci-investigation/SKILL.md +11 -0
  95. package/presets/claude/go/skills/code-review/SKILL.md +16 -0
  96. package/presets/claude/go/skills/debug-investigation/SKILL.md +15 -0
  97. package/presets/claude/go/skills/feature-delivery/SKILL.md +26 -0
  98. package/presets/claude/go/skills/integration-testing/SKILL.md +15 -0
  99. package/presets/claude/go/skills/technical-retro/SKILL.md +10 -0
  100. package/presets/claude/go/skills/unit-testing/SKILL.md +14 -0
  101. package/presets/claude/go/team/README.md +27 -0
  102. package/presets/claude/go/team/fixtures/bugfix-standard.json +37 -0
  103. package/presets/claude/go/team/fixtures/feature-full.json +43 -0
  104. package/presets/claude/go/team/fixtures/feature-light.json +17 -0
  105. package/presets/claude/ios-swift/README.md +7 -0
  106. package/presets/claude/ios-swift/agents/README.md +16 -2
  107. package/presets/claude/ios-swift/agents/build-verifier.md +17 -8
  108. package/presets/claude/ios-swift/agents/code-reviewer.md +4 -0
  109. package/presets/claude/ios-swift/agents/debugger.md +4 -0
  110. package/presets/claude/ios-swift/agents/feature-developer.md +4 -0
  111. package/presets/claude/ios-swift/agents/migration-specialist.md +5 -1
  112. package/presets/claude/ios-swift/agents/performance-auditor.md +5 -1
  113. package/presets/claude/ios-swift/agents/qa-tester.md +4 -0
  114. package/presets/claude/ios-swift/agents/security-reviewer.md +1 -1
  115. package/presets/claude/ios-swift/agents/solution-architect.md +5 -1
  116. package/presets/claude/ios-swift/agents/task-analyst.md +4 -0
  117. package/presets/claude/ios-swift/agents/task-router.md +9 -0
  118. package/presets/claude/ios-swift/agents/unit-test-generator.md +4 -0
  119. package/presets/claude/ios-swift/agents/unit-test-healer.md +4 -0
  120. package/presets/claude/ios-swift/agents/unit-test-planner.md +4 -0
  121. package/presets/claude/ios-swift/rules/README.md +24 -2
  122. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +5 -0
  123. package/presets/claude/ios-swift/rules/architecture/reference-features.md +5 -0
  124. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +2 -2
  125. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +15 -0
  126. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +53 -20
  127. package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +29 -35
  128. package/presets/claude/ios-swift/rules/tooling-and-review/design-guidance.md +110 -0
  129. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +36 -0
  130. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +54 -0
  131. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  132. package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +41 -0
  133. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +42 -0
  134. package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +5 -3
  135. package/presets/claude/ios-swift/skills/code-review/SKILL.md +4 -0
  136. package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +4 -0
  137. package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +4 -0
  138. package/presets/claude/ios-swift/team/fixtures/feature-full.json +8 -25
  139. package/presets/claude/ios-swift/team/fixtures/feature-light.json +5 -20
  140. package/presets/claude/next/README.md +9 -1
  141. package/presets/claude/next/agents/README.md +38 -4
  142. package/presets/claude/next/agents/build-verifier.md +24 -0
  143. package/presets/claude/next/agents/code-reviewer.md +4 -0
  144. package/presets/claude/next/agents/debugger.md +4 -0
  145. package/presets/claude/next/agents/feature-developer.md +4 -0
  146. package/presets/claude/next/agents/migration-specialist.md +5 -1
  147. package/presets/claude/next/agents/performance-auditor.md +5 -1
  148. package/presets/claude/next/agents/qa-tester.md +4 -0
  149. package/presets/claude/next/agents/security-reviewer.md +1 -1
  150. package/presets/claude/next/agents/solution-architect.md +5 -1
  151. package/presets/claude/next/agents/task-analyst.md +4 -0
  152. package/presets/claude/next/agents/task-router.md +15 -1
  153. package/presets/claude/next/agents/unit-test-generator.md +4 -0
  154. package/presets/claude/next/agents/unit-test-healer.md +4 -0
  155. package/presets/claude/next/agents/unit-test-planner.md +4 -0
  156. package/presets/claude/next/rules/README.md +74 -21
  157. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +5 -0
  158. package/presets/claude/next/rules/architecture/reference-features.md +5 -0
  159. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +2 -0
  160. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +18 -1
  161. package/presets/claude/next/rules/tooling-and-review/code-quality.md +48 -20
  162. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +17 -8
  163. package/presets/claude/next/rules/tooling-and-review/design-guidance.md +110 -0
  164. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +36 -0
  165. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +54 -0
  166. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  167. package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +41 -0
  168. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +42 -0
  169. package/presets/claude/next/rules/tooling-and-review/technical-retro.md +16 -0
  170. package/presets/claude/next/skills/code-review/SKILL.md +4 -0
  171. package/presets/claude/next/skills/debug-investigation/SKILL.md +4 -0
  172. package/presets/claude/next/skills/feature-delivery/SKILL.md +4 -0
  173. package/presets/claude/next/team/fixtures/feature-full.json +4 -2
  174. package/presets/claude/next/team/fixtures/feature-light.json +2 -2
  175. package/presets/cursor/go/AGENTS.md +24 -0
  176. package/presets/cursor/go/BUGBOT.md +9 -0
  177. package/presets/cursor/go/MCP.md +16 -0
  178. package/presets/cursor/go/README.md +38 -0
  179. package/presets/cursor/go/agents/README.md +15 -0
  180. package/presets/cursor/go/agents/api-contract-reviewer.md +23 -0
  181. package/presets/cursor/go/agents/build-verifier.md +30 -0
  182. package/presets/cursor/go/agents/ci-investigator.md +17 -0
  183. package/presets/cursor/go/agents/code-reviewer.md +40 -0
  184. package/presets/cursor/go/agents/debugger.md +25 -0
  185. package/presets/cursor/go/agents/feature-developer.md +30 -0
  186. package/presets/cursor/go/agents/integration-test-generator.md +22 -0
  187. package/presets/cursor/go/agents/integration-test-healer.md +22 -0
  188. package/presets/cursor/go/agents/integration-test-planner.md +22 -0
  189. package/presets/cursor/go/agents/migration-specialist.md +31 -0
  190. package/presets/cursor/go/agents/performance-auditor.md +22 -0
  191. package/presets/cursor/go/agents/qa-tester.md +24 -0
  192. package/presets/cursor/go/agents/security-reviewer.md +20 -0
  193. package/presets/cursor/go/agents/solution-architect.md +28 -0
  194. package/presets/cursor/go/agents/task-analyst.md +25 -0
  195. package/presets/cursor/go/agents/task-router.md +69 -0
  196. package/presets/cursor/go/agents/tech-writer.md +15 -0
  197. package/presets/cursor/go/agents/unit-test-generator.md +21 -0
  198. package/presets/cursor/go/agents/unit-test-healer.md +13 -0
  199. package/presets/cursor/go/agents/unit-test-planner.md +26 -0
  200. package/presets/cursor/go/commands/README.md +54 -0
  201. package/presets/cursor/go/commands/feature-continue.md +19 -0
  202. package/presets/cursor/go/commands/feature-start.md +33 -0
  203. package/presets/cursor/go/commands/task-continue.md +49 -0
  204. package/presets/cursor/go/commands/task.md +49 -0
  205. package/presets/cursor/go/commands/technical-retro.md +81 -0
  206. package/presets/cursor/go/hooks/README.md +8 -0
  207. package/presets/cursor/go/hooks/chain-team-phases.sh +381 -0
  208. package/presets/cursor/go/hooks/guard-shell-command.sh +79 -0
  209. package/presets/cursor/go/hooks.json +17 -0
  210. package/presets/cursor/go/mcp.json +11 -0
  211. package/presets/cursor/go/rules/README.md +89 -0
  212. package/presets/cursor/go/rules/adapters-driven.mdc +35 -0
  213. package/presets/cursor/go/rules/adapters-driving.mdc +36 -0
  214. package/presets/cursor/go/rules/agent-team-intake.mdc +20 -0
  215. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +156 -0
  216. package/presets/cursor/go/rules/api-grpc.mdc +28 -0
  217. package/presets/cursor/go/rules/api-http.mdc +27 -0
  218. package/presets/cursor/go/rules/application-usecases.mdc +30 -0
  219. package/presets/cursor/go/rules/architecture-boundaries.mdc +30 -0
  220. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +73 -0
  221. package/presets/cursor/go/rules/code-review-mr.mdc +43 -0
  222. package/presets/cursor/go/rules/composition-root.mdc +29 -0
  223. package/presets/cursor/go/rules/design-guidance.mdc +111 -0
  224. package/presets/cursor/go/rules/domain-layer.mdc +33 -0
  225. package/presets/cursor/go/rules/feature-delivery-workflow.mdc +46 -0
  226. package/presets/cursor/go/rules/go-app-core.mdc +32 -0
  227. package/presets/cursor/go/rules/go-conventions.mdc +25 -0
  228. package/presets/cursor/go/rules/go-tooling.mdc +33 -0
  229. package/presets/cursor/go/rules/messaging-adapters.mdc +22 -0
  230. package/presets/cursor/go/rules/module-public-api.mdc +24 -0
  231. package/presets/cursor/go/rules/persistence-adapters.mdc +29 -0
  232. package/presets/cursor/go/rules/ports-interfaces.mdc +35 -0
  233. package/presets/cursor/go/rules/post-change-test.mdc +27 -0
  234. package/presets/cursor/go/rules/preset-layering.mdc +36 -0
  235. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +58 -0
  236. package/presets/cursor/go/rules/preset-pr-checklist.mdc +39 -0
  237. package/presets/cursor/go/rules/preset-token-budget.mdc +41 -0
  238. package/presets/cursor/go/rules/preset-twin-sync.mdc +42 -0
  239. package/presets/cursor/go/rules/reference-features.mdc +31 -0
  240. package/presets/cursor/go/rules/security-go.mdc +23 -0
  241. package/presets/cursor/go/rules/technical-retro.mdc +14 -0
  242. package/presets/cursor/go/rules/tests-e2e.mdc +19 -0
  243. package/presets/cursor/go/rules/tests-integration.mdc +24 -0
  244. package/presets/cursor/go/rules/tests-unit.mdc +25 -0
  245. package/presets/cursor/go/skills/README.md +5 -0
  246. package/presets/cursor/go/skills/ci-investigation/SKILL.md +11 -0
  247. package/presets/cursor/go/skills/code-review/SKILL.md +16 -0
  248. package/presets/cursor/go/skills/debug-investigation/SKILL.md +15 -0
  249. package/presets/cursor/go/skills/feature-delivery/SKILL.md +26 -0
  250. package/presets/cursor/go/skills/integration-testing/SKILL.md +15 -0
  251. package/presets/cursor/go/skills/technical-retro/SKILL.md +10 -0
  252. package/presets/cursor/go/skills/unit-testing/SKILL.md +14 -0
  253. package/presets/cursor/go/team/README.md +31 -0
  254. package/presets/cursor/go/team/fixtures/bugfix-standard.json +37 -0
  255. package/presets/cursor/go/team/fixtures/feature-full.json +43 -0
  256. package/presets/cursor/go/team/fixtures/feature-light.json +17 -0
  257. package/presets/cursor/ios-swift/README.md +7 -0
  258. package/presets/cursor/ios-swift/agents/README.md +16 -2
  259. package/presets/cursor/ios-swift/agents/build-verifier.md +17 -8
  260. package/presets/cursor/ios-swift/agents/code-reviewer.md +4 -0
  261. package/presets/cursor/ios-swift/agents/debugger.md +4 -0
  262. package/presets/cursor/ios-swift/agents/feature-developer.md +4 -0
  263. package/presets/cursor/ios-swift/agents/migration-specialist.md +5 -1
  264. package/presets/cursor/ios-swift/agents/performance-auditor.md +5 -1
  265. package/presets/cursor/ios-swift/agents/qa-tester.md +4 -0
  266. package/presets/cursor/ios-swift/agents/security-reviewer.md +1 -1
  267. package/presets/cursor/ios-swift/agents/solution-architect.md +5 -1
  268. package/presets/cursor/ios-swift/agents/task-analyst.md +4 -0
  269. package/presets/cursor/ios-swift/agents/task-router.md +9 -0
  270. package/presets/cursor/ios-swift/agents/unit-test-generator.md +4 -0
  271. package/presets/cursor/ios-swift/agents/unit-test-healer.md +4 -0
  272. package/presets/cursor/ios-swift/agents/unit-test-planner.md +4 -0
  273. package/presets/cursor/ios-swift/rules/README.md +23 -2
  274. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +2 -2
  275. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +16 -2
  276. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +53 -20
  277. package/presets/cursor/ios-swift/rules/code-review-mr.mdc +32 -0
  278. package/presets/cursor/ios-swift/rules/design-guidance.mdc +111 -0
  279. package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +6 -0
  280. package/presets/cursor/ios-swift/rules/preset-layering.mdc +36 -0
  281. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +54 -0
  282. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +39 -0
  283. package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +41 -0
  284. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +42 -0
  285. package/presets/cursor/ios-swift/rules/reference-features.mdc +6 -0
  286. package/presets/cursor/ios-swift/rules/technical-retro.mdc +4 -2
  287. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +4 -0
  288. package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +4 -0
  289. package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +4 -0
  290. package/presets/cursor/ios-swift/team/fixtures/feature-full.json +8 -25
  291. package/presets/cursor/ios-swift/team/fixtures/feature-light.json +6 -25
  292. package/presets/cursor/next/README.md +46 -0
  293. package/presets/cursor/next/agents/README.md +39 -4
  294. package/presets/cursor/next/agents/build-verifier.md +24 -0
  295. package/presets/cursor/next/agents/code-reviewer.md +4 -0
  296. package/presets/cursor/next/agents/debugger.md +4 -0
  297. package/presets/cursor/next/agents/feature-developer.md +4 -0
  298. package/presets/cursor/next/agents/migration-specialist.md +5 -1
  299. package/presets/cursor/next/agents/performance-auditor.md +5 -1
  300. package/presets/cursor/next/agents/qa-tester.md +4 -0
  301. package/presets/cursor/next/agents/security-reviewer.md +1 -1
  302. package/presets/cursor/next/agents/solution-architect.md +5 -1
  303. package/presets/cursor/next/agents/task-analyst.md +4 -0
  304. package/presets/cursor/next/agents/task-router.md +15 -1
  305. package/presets/cursor/next/agents/unit-test-generator.md +4 -0
  306. package/presets/cursor/next/agents/unit-test-healer.md +4 -0
  307. package/presets/cursor/next/agents/unit-test-planner.md +4 -0
  308. package/presets/cursor/next/commands/README.md +1 -1
  309. package/presets/cursor/next/rules/README.md +21 -1
  310. package/presets/cursor/next/rules/agent-team-intake.mdc +2 -0
  311. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +18 -2
  312. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +45 -18
  313. package/presets/cursor/next/rules/code-review-mr.mdc +32 -0
  314. package/presets/cursor/next/rules/design-guidance.mdc +111 -0
  315. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +6 -0
  316. package/presets/cursor/next/rules/preset-layering.mdc +36 -0
  317. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +54 -0
  318. package/presets/cursor/next/rules/preset-pr-checklist.mdc +39 -0
  319. package/presets/cursor/next/rules/preset-token-budget.mdc +41 -0
  320. package/presets/cursor/next/rules/preset-twin-sync.mdc +42 -0
  321. package/presets/cursor/next/rules/reference-features.mdc +6 -0
  322. package/presets/cursor/next/rules/technical-retro.mdc +5 -3
  323. package/presets/cursor/next/skills/code-review/SKILL.md +4 -0
  324. package/presets/cursor/next/skills/debug-investigation/SKILL.md +4 -0
  325. package/presets/cursor/next/skills/feature-delivery/SKILL.md +4 -0
  326. package/presets/cursor/next/team/fixtures/feature-full.json +4 -2
  327. package/presets/cursor/next/team/fixtures/feature-light.json +2 -2
@@ -3,10 +3,12 @@ description: Роль агента для проведения техничес
3
3
  alwaysApply: false
4
4
  ---
5
5
 
6
+ <!-- shared-core: review/technical-retro.md -->
7
+
6
8
  # Техническое ретро — rule alias
7
9
 
8
- Полный сценарий (включая блок **«Работа агентов»** для slug из `.cursor/team/tasks/`) — в slash-команде:
10
+ Полный сценарий (включая блок **«Работа агентов»** для slug из team tasks) — в slash-команде:
9
11
 
10
- **`.cursor/commands/technical-retro.md`** → `/technical-retro`
12
+ **`commands/technical-retro.md`** → `/technical-retro`
11
13
 
12
14
  Используй rule только если command недоступен. Не дублируй содержимое command в ответе — следуй command-файлу и skill `technical-retro`.
@@ -25,3 +25,7 @@ Use the local repository as the source of truth: `git status`, `git diff`, task
25
25
  Lead with findings ordered by severity. Each finding should include the file, the problem, impact, and a concrete fix direction. If there are no findings, say so and call out remaining test or validation risk.
26
26
 
27
27
  For agent team tasks, write `.cursor/team/tasks/<slug>/review.md` and set `status.json` to `completed` or `changes_requested`.
28
+
29
+ ## Design guidance
30
+
31
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -28,3 +28,7 @@ For agent team tasks, write `.cursor/team/tasks/<slug>/debug-report.md` with:
28
28
  Update `status.json` when complete.
29
29
 
30
30
  Do not use browser/Playwright tooling — this is an Xcode stack.
31
+
32
+ ## Design guidance
33
+
34
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -25,3 +25,7 @@ When editing **ai-rules ios-swift preset** sources (agents, hooks, rules) rather
25
25
  ## Handoff
26
26
 
27
27
  Summarize by layer, validation results, and known gaps. Agent team: update `.cursor/team/tasks/<slug>/status.json`.
28
+
29
+ ## Design guidance
30
+
31
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -4,32 +4,15 @@
4
4
  "profile": "full",
5
5
  "summary": "Multi-layer Feature with XCUITest coverage",
6
6
  "steps": [
7
- {
8
- "agent": "task-analyst",
9
- "label": "Clarify and decompose"
10
- },
11
- {
12
- "agent": "feature-developer",
13
- "label": "Implement + unit tests",
14
- "scope": "unit-in-dev"
15
- },
16
- {
17
- "agent": "build-verifier",
18
- "label": "xcodebuild + lint + unit smoke"
19
- },
20
- {
21
- "agent": "code-reviewer",
22
- "label": "Code review"
23
- },
24
- {
25
- "agent": "qa-tester",
26
- "label": "XCUITest",
27
- "scope": "e2e-only"
28
- }
29
- ],
30
- "humanGates": [
31
- "after:task-analyst"
7
+ { "agent": "task-analyst", "label": "Clarify and decompose" },
8
+ { "agent": "solution-architect", "label": "Design boundaries", "model": "strong" },
9
+ { "agent": "feature-developer", "label": "Implement + unit tests", "scope": "unit-in-dev" },
10
+ { "agent": "build-verifier", "label": "xcodebuild + lint + unit smoke", "model": "cheap" },
11
+ { "agent": "security-reviewer", "label": "Security review", "model": "strong" },
12
+ { "agent": "code-reviewer", "label": "Code review", "model": "cheap" },
13
+ { "agent": "qa-tester", "label": "XCUITest", "scope": "e2e-only" }
32
14
  ],
15
+ "humanGates": ["after:task-analyst"],
33
16
  "autoChain": true,
34
17
  "skipped": [
35
18
  {
@@ -2,35 +2,16 @@
2
2
  "slug": "example-feature-light",
3
3
  "intent": "feature",
4
4
  "profile": "light",
5
- "summary": "Trivial single-file Swift change with explicit AC",
5
+ "summary": "Trivial single-file change with explicit AC",
6
6
  "steps": [
7
- {
8
- "agent": "feature-developer",
9
- "label": "Implement"
10
- },
11
- {
12
- "agent": "build-verifier",
13
- "label": "Validation gate"
14
- }
7
+ { "agent": "feature-developer", "label": "Implement", "model": "cheap" },
8
+ { "agent": "build-verifier", "label": "xcodebuild + lint + unit smoke", "model": "cheap" }
15
9
  ],
16
10
  "humanGates": [],
17
11
  "autoChain": true,
18
12
  "skipped": [
19
- {
20
- "agent": "task-analyst",
21
- "reason": "Explicit AC and single-file scope"
22
- },
23
- {
24
- "agent": "code-reviewer",
25
- "reason": "Light profile"
26
- },
27
- {
28
- "agent": "qa-tester",
29
- "reason": "No XCUITest AC"
30
- },
31
- {
32
- "agent": "playwright-test-planner",
33
- "reason": "iOS uses XCUITest; not needed for light"
34
- }
13
+ { "agent": "task-analyst", "reason": "Explicit AC and single-file scope" },
14
+ { "agent": "code-reviewer", "reason": "Light profile — non-trivial app changes should use standard" },
15
+ { "agent": "qa-tester", "reason": "No e2e AC" }
35
16
  ]
36
17
  }
@@ -0,0 +1,46 @@
1
+ # Next.js preset (Cursor)
2
+
3
+ Правила и agent-team surface для Next.js / React / TypeScript.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npx @bonesofspring/ai-rules init cursor --preset next
9
+ ```
10
+
11
+ Копирует:
12
+
13
+ | Path | Содержание |
14
+ |------|------------|
15
+ | `AGENTS.md` | Quick-start |
16
+ | `BUGBOT.md` | Cursor Bugbot review priorities (Next) |
17
+ | `rules/**` | `.mdc` + README (alwaysApply ≤3) |
18
+ | `agents/**` | **21** ролей (+ README) |
19
+ | `skills/**` | 7 skills (в т.ч. `playwright-e2e`) |
20
+ | `commands/**` | task, task-continue, feature-start/continue, technical-retro |
21
+ | `hooks.json` + `hooks/**` | guard-shell + chain-team-phases |
22
+ | `team/**` | fixtures + README |
23
+ | `mcp.json` + `MCP.md` | Context7 + Figma MCP → `.cursor/mcp.json` |
24
+
25
+ ## alwaysApply (≤3)
26
+
27
+ `next-app-core`, `package-manager`, `code-quality-and-refactoring`.
28
+
29
+ Requestable (не always-on): `post-change-lint`, `agent-team-*`, `code-review-mr`, `feature-delivery-workflow`, `reference-features`, domain globs.
30
+
31
+ ## Preset taxonomy & contributing
32
+
33
+ - **Layers:** Core → Stack → Platform — [`../../_shared/README.md`](../../_shared/README.md)
34
+ - **Contribution guide:** [`../../docs/PRESET-CONTRIBUTION.md`](../../docs/PRESET-CONTRIBUTION.md) (SoT, twins, token budget, PR checklist)
35
+ - **Author meta-rules:** `preset-*.mdc` (globs `packages/ai-rules/presets/**`, never alwaysApply)
36
+ - **Core→stack mapping:** [`rules/README.md`](./rules/README.md) § Shared core
37
+
38
+ ## Sync with Claude
39
+
40
+ SoT = этот Cursor-пресет. После правок `.mdc` / agents / skills — обновить twin в `presets/claude/next/` **в том же PR**.
41
+
42
+ `BUGBOT.md` — **Cursor-only** (нет Claude twin); для Claude Code — skill `code-review` + `tooling-and-review/code-review.md`.
43
+
44
+ Claude→Cursor map: `presets/claude/next/rules/README.md`.
45
+
46
+ См. также `AGENTS.md`.
@@ -56,6 +56,23 @@
56
56
 
57
57
  Ограничение «не трогать production / `app/**`» задаётся **в теле промпта**, не флагом `readonly`. В Cursor `readonly: true` блокирует *любые* file edits (включая team) — для team-агентов это ломает пайплайн.
58
58
 
59
+ ## Model matrix (frontmatter `model`)
60
+
61
+ SoT по умолчанию — YAML `model` в каждом agent-файле. Опциональный `steps[].model` (`cheap` \| `standard` \| `strong`) переопределяет тир на шаге пайплайна (см. `task-router.md`, `agent-team-orchestrator.mdc`).
62
+
63
+ | Tier | Default frontmatter | Agents |
64
+ |------|---------------------|--------|
65
+ | **cheap** | `fast` | `task-router`, `task-analyst`, `build-verifier`, `code-reviewer`, `tech-writer` |
66
+ | **standard** | `inherit` | `feature-developer`, `debugger`, `ci-investigator`, `api-contract-reviewer`, `accessibility-reviewer`, `qa-tester`, `unit-test-*`, `playwright-test-*` |
67
+ | **strong** | `claude-opus-4-8[effort=high]` | `solution-architect`, `migration-specialist`, `security-reviewer`, `performance-auditor` |
68
+
69
+ **Notes**
70
+
71
+ - `inherit` = модель parent-чата (обычно сильнее `fast`).
72
+ - Strong pin uses Cursor bracket options (`[effort=high]`). If the ID is blocked by plan/admin, Cursor falls back to a compatible model.
73
+ - Alternate strong pin when Opus unavailable: `composer-2.5[fast=false]` (edit frontmatter locally).
74
+ - Never put `strong` on `build-verifier` / `tech-writer` / `task-router`.
75
+
59
76
  ## Оркестрация
60
77
 
61
78
  | Command | Назначение |
@@ -94,6 +111,7 @@
94
111
  | `scope` | no | e.g. `unit-in-dev`, `e2e-only`, `regression`, `full` |
95
112
  | `skipIf` | no | `debugger.fixed` \| `ci-investigator.resolved` |
96
113
  | `parallel` | no | When `true` and `agent` is array — invoke all in one turn |
114
+ | `model` | no | `cheap` \| `standard` \| `strong` — pipeline tier override; omit → agent frontmatter |
97
115
 
98
116
  ### Minimal template
99
117
 
@@ -114,26 +132,43 @@
114
132
  }
115
133
  ```
116
134
 
117
- ### Example: parallel reviewers
135
+ ### Example: parallel reviewers + model tiers
118
136
 
119
137
  ```json
120
138
  {
121
139
  "intent": "feature",
140
+ "profile": "full",
122
141
  "steps": [
123
142
  { "agent": "task-analyst", "label": "Clarify" },
143
+ { "agent": "solution-architect", "label": "Design boundaries", "model": "strong" },
124
144
  { "agent": "feature-developer", "label": "Implement", "scope": "unit-in-dev" },
125
- { "agent": "build-verifier", "label": "Validation gate" },
145
+ { "agent": "build-verifier", "label": "Validation gate", "model": "cheap" },
126
146
  {
127
147
  "agent": ["accessibility-reviewer", "security-reviewer"],
128
148
  "parallel": true,
129
- "label": "A11y and security"
149
+ "label": "A11y and security",
150
+ "model": "strong"
130
151
  },
131
- { "agent": "code-reviewer", "label": "Review" }
152
+ { "agent": "code-reviewer", "label": "Review", "model": "cheap" }
132
153
  ],
133
154
  "humanGates": ["after:task-analyst"]
134
155
  }
135
156
  ```
136
157
 
158
+ ### Example: light profile with cheap models
159
+
160
+ ```json
161
+ {
162
+ "intent": "feature",
163
+ "profile": "light",
164
+ "steps": [
165
+ { "agent": "feature-developer", "label": "Implement", "model": "cheap" },
166
+ { "agent": "build-verifier", "label": "Validation gate", "model": "cheap" }
167
+ ],
168
+ "humanGates": []
169
+ }
170
+ ```
171
+
137
172
  ### Example: bugfix skipIf
138
173
 
139
174
  ```json
@@ -26,6 +26,30 @@ Use **`package-manager.mdc`** for the repo package manager.
26
26
 
27
27
  Prefer **`lint`** (= js + css + type-check) before handoff on large changes.
28
28
 
29
+ ## Preset-structure validation (when scope is preset / packages/ai-rules)
30
+
31
+ When validating **preset packaging** changes (paths under `packages/ai-rules/presets/**`, or `scope: preset-structure-validation` / `preset-artifacts-only`), run these checks. Skip app lint if there are **no** `app/**` changes.
32
+
33
+ ### FAIL (all stacks)
34
+
35
+ 1. **Token budget:** Cursor `alwaysApply: true` count ≤ **3**; Claude rules without `paths:` === **3** (**exclude `**/README.md`** — Option A). Meta `preset-*` rules must **not** be `alwaysApply: true`.
36
+ 2. **Leakage (next):** hooks/agents must not require `xcuitest-test-*` handoffs or `xcodebuild` as the default Next post-change gate. See `preset-no-cross-stack-leakage.mdc`.
37
+ 3. **Mapping / README:** `claude/next/rules/README.md` must include a Cursor→Claude mapping table; stack `rules/README.md` should document core→stack mapping when `_shared` consumers exist.
38
+ 4. **shared-core consumers:** if `_shared/core/**` changed, every file with matching `<!-- shared-core: … -->` in this PR must be updated (or intentional fork documented in validation-report).
39
+ 5. **Twin presence:** Cursor rule change without Claude twin same PR → **FAIL** (next, ios-swift, and go). Domain twin body ≥15 lines; thin aliases (`agent-team-intake`, `technical-retro`) may be shorter.
40
+ 6. **Session-start body budget (soft→document, FAIL if grossly over):** sum body lines of the **3** intended always-on / session-start rules ≤ **120** (stretch ≤100); do **not** include `**/README.md`. Record the sum in validation-report.
41
+ 7. **Embed drift (soft by default):** run `packages/ai-rules/scripts/check-shared-core-drift.sh`. Document DRIFT; set `AI_RULES_DRIFT_FAIL=1` only when enforcing. Lineage stems are excluded from body equality.
42
+ 8. **Dogfood (monorepo soft):** if root `.cursor/` is in the PR, prefer sync via `packages/ai-rules/scripts/sync-dogfood-cursor.sh`; mass deletion of tracked dogfood without migration doc → note as risk / FAIL for maintainers.
43
+
44
+ ### Soft notes
45
+
46
+ - Thin aliases may be &lt;15 body lines.
47
+ - Embed vs lineage modes: see `docs/PRESET-CONTRIBUTION.md` and `_shared/README.md`.
48
+
49
+ ### ios-swift-only checks
50
+
51
+ Not required for next-only PRs. When both stacks touched, also apply ios-swift verifier checks (chain fork, Playwright leakage, XCUITest stems) — **FAIL**.
52
+
29
53
  ## Output
30
54
 
31
55
  Write `.cursor/team/tasks/<slug>/validation-report.md`:
@@ -62,3 +62,7 @@ Update `status.json`:
62
62
  If **REQUEST_CHANGES**, set `"state": "changes_requested"` (hook will re-invoke feature-developer).
63
63
 
64
64
  Do not mix this output with retrospective facilitation — keep review and retro separate.
65
+
66
+ ## Design guidance
67
+
68
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -62,3 +62,7 @@ Update `status.json`:
62
62
  Handoff summary: root cause, recommended fix, files touched (if any).
63
63
 
64
64
  Do not perform formal code review or write e2e plans — those are separate agents.
65
+
66
+ ## Design guidance
67
+
68
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -26,3 +26,7 @@ You are a senior frontend developer working in a Next.js monorepo with strict la
26
26
  Update `status.json` (`currentAgent`: `feature-developer`, `state`: `completed`). Handoff: tasks done, files by layer, unit specs, validation result, gaps for build-verifier/reviewer.
27
27
 
28
28
  Do not perform formal code review — that is the code-reviewer subagent's job.
29
+
30
+ ## Design guidance
31
+
32
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -2,7 +2,7 @@
2
2
  name: migration-specialist
3
3
  description: Migration planning specialist for library upgrades, Next.js major versions, HTTP client swaps, and phased refactors with rollback. Writes migration-plan.md and team status; never writes production code.
4
4
  readonly: false
5
- model: inherit
5
+ model: claude-opus-4-8[effort=high]
6
6
  ---
7
7
 
8
8
  You are a migration specialist for a Next.js frontend with strict layer boundaries.
@@ -69,3 +69,7 @@ Update `status.json`:
69
69
  ```
70
70
 
71
71
  Hand off: orchestrator runs human gate (if configured), then `feature-developer` executes phases from the plan.
72
+
73
+ ## Design guidance
74
+
75
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -2,7 +2,7 @@
2
2
  name: performance-auditor
3
3
  description: Performance audit specialist. Reviews bundle size, lazy loading, render patterns, data fetching waterfalls, and Core Web Vitals risks. Readonly — writes perf-report.md only; never edits production code.
4
4
  readonly: false
5
- model: inherit
5
+ model: claude-opus-4-8[effort=high]
6
6
  ---
7
7
 
8
8
  You are a frontend performance auditor for a Next.js React application.
@@ -68,3 +68,7 @@ Update `status.json`:
68
68
  For standalone `perf-audit` intent, suggest `/technical-retro` or a follow-up `/task` to implement fixes.
69
69
 
70
70
  Do not modify production code.
71
+
72
+ ## Design guidance
73
+
74
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -56,3 +56,7 @@ Provide summary:
56
56
  - Test run results
57
57
  - Gaps vs acceptance criteria
58
58
  - Suggest `/technical-retro` with the slug when done
59
+
60
+ ## Design guidance
61
+
62
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -2,7 +2,7 @@
2
2
  name: security-reviewer
3
3
  description: Security review specialist. Audits auth flows, token handling, XSS risks, secrets in diff, and unsafe DOM/API usage. Readonly — writes security-review.md only; never edits production code.
4
4
  readonly: false
5
- model: inherit
5
+ model: claude-opus-4-8[effort=high]
6
6
  ---
7
7
 
8
8
  You are a frontend security reviewer for a Next.js TypeScript application.
@@ -2,7 +2,7 @@
2
2
  name: solution-architect
3
3
  description: Solution architect for cross-layer features, API boundaries, and technical design before implementation. Use for spike intent or when router adds architect step for complex features. Readonly — produces design docs, not production code.
4
4
  readonly: false
5
- model: inherit
5
+ model: claude-opus-4-8[effort=high]
6
6
  ---
7
7
 
8
8
  You are a solution architect for a Next.js frontend with strict layer boundaries (types, api, store, ui).
@@ -69,3 +69,7 @@ Update `status.json`:
69
69
  For `spike` intent with human gate after architect: set `"state": "awaiting_approval"` if design needs user sign-off.
70
70
 
71
71
  Handoff: summary of design decisions and recommended next steps for developer.
72
+
73
+ ## Design guidance
74
+
75
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -110,3 +110,7 @@ When DoR is reached and artifacts are saved:
110
110
  3. **Stop** and ask the user to review artifacts. Tell them to run `/task-continue <slug>` after approval or reply with corrections.
111
111
 
112
112
  Do not invoke the developer or any implementation subagent.
113
+
114
+ ## Design guidance (optional)
115
+
116
+ - Optional: Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit — only when decomposing refactor/architecture tasks (not default).
@@ -65,7 +65,21 @@ Fixtures: `.cursor/team/fixtures/` (feature-full, feature-light, bugfix-standard
65
65
  - Add **tech-writer** when docs/changelog requested.
66
66
  - **Always build-verifier** after developer (or after ci-investigator/debugger if they changed code) for `feature`, `bugfix`, `refactor`, `migration`, `a11y`.
67
67
  - **skipIf:** `debugger.fixed` on developer (bugfix); `ci-investigator.resolved` (ci-fix).
68
- - **Model:** `inherit` when 4+ steps or cross-layer uncertainty.
68
+
69
+ ## Model tiers (`steps[].model`)
70
+
71
+ Optional per-step field: `"model": "cheap" | "standard" | "strong"`. Omit → agent frontmatter default (see **Model matrix** in `agents/README.md`).
72
+
73
+ | When | What to write |
74
+ |------|----------------|
75
+ | `profile: light` | set `cheap` on **all** steps (exception: unclear bug root cause on `debugger` → `strong`) |
76
+ | `profile: standard` | omit (frontmatter defaults) |
77
+ | `profile: full` | set `strong` on `solution-architect`, `migration-specialist`, `security-reviewer`, `performance-auditor` when present; omit others |
78
+ | `intent: spike` | set `strong` on `solution-architect` (and analyst may stay default/`cheap`) |
79
+ | `intent: perf-audit` / security-heavy feature | `strong` on auditor/reviewer step |
80
+ | Always | **never** `strong` on `build-verifier`, `tech-writer`, `task-router` |
81
+
82
+ Cursor mapping when orchestrator invokes Task: `cheap` → pass `model: "fast"` if the tool accepts it; `standard`/`strong` → **do not** pass `fast` (rely on agent frontmatter pin / inherit).
69
83
 
70
84
  ## humanGates (defaults)
71
85
 
@@ -37,3 +37,7 @@ Update `status.json`:
37
37
  "updatedAt": "<ISO8601>"
38
38
  }
39
39
  ```
40
+
41
+ ## Design guidance
42
+
43
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -38,3 +38,7 @@ Update `status.json`:
38
38
  "updatedAt": "<ISO8601>"
39
39
  }
40
40
  ```
41
+
42
+ ## Design guidance
43
+
44
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -62,3 +62,7 @@ Update `status.json`:
62
62
  ```
63
63
 
64
64
  Do not write `*.spec.ts` files — that is `unit-test-generator`'s job.
65
+
66
+ ## Design guidance
67
+
68
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -42,7 +42,7 @@ Slash-команды копируются в `.cursor/commands/` при `ai-rule
42
42
 
43
43
  ## Связанные файлы
44
44
 
45
- - Subagents: `../agents/` (20 ролей, включая `task-router.md`)
45
+ - Subagents: `../agents/` (**21** ролей, включая `task-router.md`)
46
46
  - Оркестратор: `../rules/agent-team-orchestrator.mdc`
47
47
  - Skills: `../skills/` (`feature-delivery`, `code-review`, `debug-investigation`, `ci-investigation`, `unit-testing`, `playwright-e2e`, `technical-retro`)
48
48
  - Артефакты: `../team/README.md` (`pipeline.json`, `status.json`)
@@ -21,9 +21,28 @@
21
21
 
22
22
  - **`alwaysApply: true`** (Cursor) / **без `paths:`** (Claude) — только базовые инварианты (**3**):
23
23
  - `next-app-core`, `package-manager`, `code-quality-and-refactoring`
24
- - **On-demand / requestable** — `post-change-lint` (**обязателен после правок кода**, не always-on), `agent-team-intake` (через orchestrator/commands), `agent-team-orchestrator`, architecture, imports, UI, tests, feature-delivery-workflow, reference-features, next-app-router, react-a11y-coding
24
+ - **On-demand / requestable** — `post-change-lint` (**обязателен после правок кода**, не always-on), `agent-team-intake` (через orchestrator/commands), `agent-team-orchestrator`, architecture, imports, UI, tests, feature-delivery-workflow, `design-guidance`, reference-features, next-app-router, react-a11y-coding, `technical-retro`
25
+ - **Preset author meta** (globs `packages/ai-rules/presets/**`, never alwaysApply): `preset-layering`, `preset-twin-sync`, `preset-token-budget`, `preset-pr-checklist`, `preset-no-cross-stack-leakage`
25
26
  - **Skills** — длинные процедуры (`feature-delivery`, `code-review`, …)
26
27
 
28
+ ### Shared core → stack mapping
29
+
30
+ SoT prose: `packages/ai-rules/presets/_shared/core/**` (see `_shared/README.md`). Adapters carry `<!-- shared-core: … -->`.
31
+
32
+ | Shared core | This stack adapter | Delta |
33
+ |-------------|--------------------|-------|
34
+ | `quality/code-quality-and-refactoring.md` | `code-quality-and-refactoring.mdc` | Stack notes: ESLint/stylelint, CSS tokens |
35
+ | `quality/design-guidance.md` | `design-guidance.mdc` | requestable smells/GoF; globs `app/src/**/*.{ts,tsx}` |
36
+ | `agent-team/agent-team-orchestrator.md` | `agent-team-orchestrator.mdc` | Roles (Playwright trio); preset PR pointer |
37
+ | `agent-team/agent-team-intake.md` | `agent-team-intake.mdc` | thin |
38
+ | `architecture/feature-delivery-workflow.md` | `feature-delivery-workflow.mdc` | Next layer checklist |
39
+ | `architecture/reference-features.template.md` | `reference-features.mdc` | `app/src/**` table |
40
+ | `review/code-review-mr.md` | `code-review-mr.mdc` | Next checklist refs |
41
+ | `review/technical-retro.md` | `technical-retro.mdc` | thin alias |
42
+ | `meta/preset-*.md` | `preset-*.mdc` | author-only globs |
43
+
44
+ Claude twins + Cursor→Claude map: `presets/claude/next/rules/README.md`.
45
+
27
46
  ### UI edit bundle (consolidated globs)
28
47
 
29
48
  При правке `app/src/ui/**/*.tsx` подгружается **уменьшенный** набор (не весь `app/src/**`):
@@ -56,6 +75,7 @@
56
75
  | `agent-team-intake.mdc` | Подсказка `/task` при work-запросе (on-demand, через orchestrator) |
57
76
  | `package-manager.mdc` | Перед `install` / `run` в терминале определить менеджер пакетов репо (lockfile, `packageManager`) и использовать только его |
58
77
  | `agent-team-orchestrator.mdc` | `/task`, router, `pipeline.json`, build-verifier, parallel steps |
78
+ | `preset-pr-checklist.mdc` (+ sibling `preset-*`) | Чеклист PR авторов пресетов (twin, budget, leakage) |
59
79
  | `next-app-core.mdc` | Стек, слои, карта каталогов (alwaysApply) |
60
80
  | `post-change-lint.mdc` | Прогон ESLint + Stylelint после изменений кода (**requestable**, обязателен после code edits) |
61
81
  | `architecture-boundaries-ui.mdc` | Slim границы UI при правках компонентов |
@@ -3,6 +3,8 @@ description: Use when user posts a work request without /task — suggest or use
3
3
  alwaysApply: false
4
4
  ---
5
5
 
6
+ <!-- shared-core: agent-team/agent-team-intake.md -->
7
+
6
8
  # Agent team intake
7
9
 
8
10
  When the user message looks like a **work request** (implement, add, fix, refactor, review MR, write tests, spike) — not a question about how code works:
@@ -3,6 +3,8 @@ description: Orchestrates the agent team via task-router and pipeline.json. Use
3
3
  alwaysApply: false
4
4
  ---
5
5
 
6
+ <!-- shared-core: agent-team/agent-team-orchestrator.md -->
7
+
6
8
  # Agent team orchestrator
7
9
 
8
10
  Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.cursor/team/tasks/<slug>/`.
@@ -19,7 +21,9 @@ Work request без `/task` — см. **`agent-team-intake.mdc`** (когда п
19
21
  | `/feature-continue <slug>` | Alias of task-continue |
20
22
  | `/technical-retro [slug]` | Retro with agent team block |
21
23
 
22
- ## Roles
24
+ ## Stack notes
25
+
26
+ ### Roles
23
27
 
24
28
  | Agent | App / prod writes | Typical intent |
25
29
  |-------|-------------------|----------------|
@@ -31,7 +35,7 @@ Work request без `/task` — см. **`agent-team-intake.mdc`** (когда п
31
35
  | `debugger` | minimal fix | bugfix |
32
36
  | `ci-investigator` | minimal CI fix | ci-fix — minimal CI repair |
33
37
  | `feature-developer` | yes | feature, bugfix, refactor, migration, a11y |
34
- | `build-verifier` | no (team only) | lint/type-check/unit gate after developer |
38
+ | `build-verifier` | no (team only) | lint/type-check/unit gate after developer; preset-structure when editing presets |
35
39
  | `accessibility-reviewer` | no (team only) | a11y, UI-heavy feature |
36
40
  | `performance-auditor` | no (team only) | perf-audit, perf-sensitive feature |
37
41
  | `code-reviewer` | no (team only) | most pipelines, review-only |
@@ -49,6 +53,8 @@ Work request без `/task` — см. **`agent-team-intake.mdc`** (когда п
49
53
 
50
54
  Full prompts: `.cursor/agents/*.md`. Artifact conventions: `.cursor/team/README.md`.
51
55
 
56
+ When editing `packages/ai-rules/presets/**`, follow **`preset-pr-checklist.mdc`** (+ twin-sync / layering / token-budget / leakage meta-rules).
57
+
52
58
  ## Dynamic pipeline
53
59
 
54
60
  ```mermaid
@@ -102,6 +108,7 @@ flowchart TD
102
108
  | `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
103
109
  | `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
104
110
  | `scope` | e.g. `unit-in-dev`, `e2e-only` — passed to developer/qa |
111
+ | `model` | `cheap` \| `standard` \| `strong` — optional tier override (see below) |
105
112
 
106
113
  ## Rules (strict)
107
114
 
@@ -125,6 +132,15 @@ flowchart TD
125
132
 
126
133
  Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
127
134
 
135
+ ### Model when invoking (Task)
136
+
137
+ 1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
138
+ 2. Map abstract tiers:
139
+ - **`cheap`** → pass Task `model: "fast"` when the tool accepts it (or rely on agent `fast`).
140
+ - **`standard`** → omit Task `model` (frontmatter `inherit` / mid default).
141
+ - **`strong`** → **never** pass `fast`; rely on agent pin (`claude-opus-4-8[effort=high]`) or parent Max model. If Task allows an explicit model ID from the allowed list, prefer the strong agent’s frontmatter ID.
142
+ 3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
143
+
128
144
  After each agent completes, ensure `status.json` has `state: completed` (or `awaiting_approval` if gate applies).
129
145
 
130
146
  ## Legacy mode