@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
@@ -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
  {
@@ -4,30 +4,15 @@
4
4
  "profile": "light",
5
5
  "summary": "Trivial single-file Swift 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": "Validation gate", "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
- },
13
+ { "agent": "task-analyst", "reason": "Explicit AC and single-file scope" },
14
+ { "agent": "code-reviewer", "reason": "Light profile" },
15
+ { "agent": "qa-tester", "reason": "No XCUITest AC" },
31
16
  {
32
17
  "agent": "playwright-test-planner",
33
18
  "reason": "iOS uses XCUITest; not needed for light"
@@ -16,11 +16,19 @@
16
16
 
17
17
  Файлы правил — обычный Markdown с опциональным YAML frontmatter (`paths:` для скоупа по путям), не формат `.mdc` Cursor.
18
18
 
19
+ ## Preset taxonomy & contributing
20
+
21
+ - **Layers:** Core → Stack → Platform — [`../../_shared/README.md`](../../_shared/README.md)
22
+ - **Contribution guide:** [`../../docs/PRESET-CONTRIBUTION.md`](../../docs/PRESET-CONTRIBUTION.md)
23
+ - **Cursor SoT:** `presets/cursor/next/` — этот пресет derived twin; правки Cursor first, same PR
24
+ - **Cursor→Claude map + core table:** [`rules/README.md`](./rules/README.md)
25
+ - **Author meta:** `tooling-and-review/preset-*.md` (`paths:` on `packages/ai-rules/presets/**` only)
26
+
19
27
  ## Agent team workflow
20
28
 
21
29
  Cursor-пресет и Claude-пресет используют один и тот же смысловой workflow:
22
30
 
23
31
  - `/task <desc>` → `task-router` → `pipeline.json`;
24
32
  - `/task-continue <slug>` → продолжение после human gate;
25
- - `.claude/agents/*.md` → 20 ролей: planning (router, analyst, architect, migration, api-contract), implementation (debugger, ci-investigator, developer), review (code, a11y, security, perf), testing (QA, unit trio, playwright trio), docs (tech-writer);
33
+ - `.claude/agents/*.md` → **21** ролей: planning (router, analyst, architect, migration, api-contract), implementation (debugger, ci-investigator, developer), review (code, a11y, security, perf), testing (QA, unit trio, playwright trio), docs (tech-writer), build (build-verifier);
26
34
  - `.claude/team/tasks/<slug>/` → handoff-артефакты (`brief.md`, `decomposition.md`, `review.md`, `migration-plan.md`, `ci-report.md`, `status.json`, …).
@@ -50,6 +50,22 @@
50
50
 
51
51
  Папка копируется в `.claude/agents/` при `ai-rules init claude --preset next`.
52
52
 
53
+ ## Model matrix (frontmatter `model`)
54
+
55
+ SoT по умолчанию — YAML `model` в каждом agent-файле. Опциональный `steps[].model` (`cheap` \| `standard` \| `strong`) переопределяет тир на шаге (см. `task-router.md`, `tooling-and-review/agent-team-orchestrator.md`).
56
+
57
+ | Tier | Default frontmatter | Agents |
58
+ |------|---------------------|--------|
59
+ | **cheap** | `fast` | `task-router`, `task-analyst`, `build-verifier`, `code-reviewer`, `tech-writer` |
60
+ | **standard** | `inherit` or `sonnet` | `feature-developer`, `debugger`, `ci-investigator`, `api-contract-reviewer`, `accessibility-reviewer`, `qa-tester`, `unit-test-*`, `playwright-test-*` (`sonnet` where already pinned) |
61
+ | **strong** | `opus` | `solution-architect`, `migration-specialist`, `security-reviewer`, `performance-auditor` |
62
+
63
+ **Notes**
64
+
65
+ - Claude Code aliases: `haiku` / `sonnet` / `opus` / `inherit` (full IDs also OK). Preset keeps `fast` for cheap agents for cross-tooling parity with Cursor; if ignored, prefer `haiku` locally.
66
+ - Resolution order (Claude Code): env `CLAUDE_CODE_SUBAGENT_MODEL` → per-invocation `model` → frontmatter → parent session.
67
+ - Never put `strong` on `build-verifier` / `tech-writer` / `task-router`.
68
+
53
69
  ## Оркестрация
54
70
 
55
71
  | Command | Назначение |
@@ -88,6 +104,7 @@
88
104
  | `scope` | no | e.g. `unit-in-dev`, `e2e-only`, `regression`, `full` |
89
105
  | `skipIf` | no | `debugger.fixed` \| `ci-investigator.resolved` |
90
106
  | `parallel` | no | When `true` and `agent` is array — invoke all in one turn |
107
+ | `model` | no | `cheap` \| `standard` \| `strong` — pipeline tier override; omit → agent frontmatter |
91
108
 
92
109
  ### Minimal template
93
110
 
@@ -108,26 +125,43 @@
108
125
  }
109
126
  ```
110
127
 
111
- ### Example: parallel reviewers
128
+ ### Example: parallel reviewers + model tiers
112
129
 
113
130
  ```json
114
131
  {
115
132
  "intent": "feature",
133
+ "profile": "full",
116
134
  "steps": [
117
135
  { "agent": "task-analyst", "label": "Clarify" },
136
+ { "agent": "solution-architect", "label": "Design boundaries", "model": "strong" },
118
137
  { "agent": "feature-developer", "label": "Implement", "scope": "unit-in-dev" },
119
- { "agent": "build-verifier", "label": "Validation gate" },
138
+ { "agent": "build-verifier", "label": "Validation gate", "model": "cheap" },
120
139
  {
121
140
  "agent": ["accessibility-reviewer", "security-reviewer"],
122
141
  "parallel": true,
123
- "label": "A11y and security"
142
+ "label": "A11y and security",
143
+ "model": "strong"
124
144
  },
125
- { "agent": "code-reviewer", "label": "Review" }
145
+ { "agent": "code-reviewer", "label": "Review", "model": "cheap" }
126
146
  ],
127
147
  "humanGates": ["after:task-analyst"]
128
148
  }
129
149
  ```
130
150
 
151
+ ### Example: light profile with cheap models
152
+
153
+ ```json
154
+ {
155
+ "intent": "feature",
156
+ "profile": "light",
157
+ "steps": [
158
+ { "agent": "feature-developer", "label": "Implement", "model": "cheap" },
159
+ { "agent": "build-verifier", "label": "Validation gate", "model": "cheap" }
160
+ ],
161
+ "humanGates": []
162
+ }
163
+ ```
164
+
131
165
  ### Example: bugfix skipIf
132
166
 
133
167
  ```json
@@ -25,6 +25,30 @@ Use **`rules/tooling-and-review/package-manager.md`** for the repo package manag
25
25
 
26
26
  Prefer **`lint`** (= js + css + type-check) before handoff on large changes.
27
27
 
28
+ ## Preset-structure validation (when scope is preset / packages/ai-rules)
29
+
30
+ 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 source changes.
31
+
32
+ ### FAIL (all stacks)
33
+
34
+ 1. **Token budget:** Cursor `alwaysApply: true` count ≤ **3**; Claude rules without `paths:` === **3** (**exclude `**/README.md`** — Option A). Meta `preset-*` rules must **not** be session-start (must have `paths:`).
35
+ 2. **Leakage (next):** hooks/agents must not require `xcuitest-test-*` handoffs or `xcodebuild` as the default Next post-change gate. See `tooling-and-review/preset-no-cross-stack-leakage.md`.
36
+ 3. **Mapping / README:** `rules/README.md` must include a Cursor→Claude mapping table; document core→stack mapping when `_shared` consumers exist.
37
+ 4. **shared-core consumers:** if `_shared/core/**` changed, every file with matching `<!-- shared-core: … -->` in this PR must be updated (or intentional fork documented).
38
+ 5. **Twin presence:** Cursor rule change without Claude twin same PR → **FAIL** (next, ios-swift, and go). Domain twin body ≥15 lines; thin aliases may be shorter.
39
+ 6. **Session-start body budget:** sum body lines of the **3** intended session-start rules ≤ **120** (stretch ≤100); do **not** include `**/README.md` — record in validation-report; FAIL if grossly over.
40
+ 7. **Embed drift (soft by default):** run `packages/ai-rules/scripts/check-shared-core-drift.sh`. Document DRIFT; `AI_RULES_DRIFT_FAIL=1` to enforce. Lineage stems excluded from body equality.
41
+ 8. **Dogfood (monorepo soft):** prefer `packages/ai-rules/scripts/sync-dogfood-cursor.sh`; mass dogfood deletion without migration doc → risk / FAIL for maintainers.
42
+
43
+ ### Soft notes
44
+
45
+ - Thin aliases may be &lt;15 body lines.
46
+ - Embed vs lineage: `docs/PRESET-CONTRIBUTION.md`, `_shared/README.md`.
47
+
48
+ ### ios-swift-only checks
49
+
50
+ When ios-swift paths are also in the PR, apply ios-swift verifier checks (chain fork, Playwright leakage) — **FAIL**.
51
+
28
52
  ## Output
29
53
 
30
54
  Write `.claude/team/tasks/<slug>/validation-report.md`:
@@ -61,3 +61,7 @@ Update `status.json`:
61
61
  If **REQUEST_CHANGES**, set `"state": "changes_requested"` (hook will re-invoke feature-developer).
62
62
 
63
63
  Do not mix this output with retrospective facilitation — keep review and retro separate.
64
+
65
+ ## Design guidance
66
+
67
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -61,3 +61,7 @@ Update `status.json`:
61
61
  Handoff summary: root cause, recommended fix, files touched (if any).
62
62
 
63
63
  Do not perform formal code review or write e2e plans — those are separate agents.
64
+
65
+ ## Design guidance
66
+
67
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -25,3 +25,7 @@ You are a senior frontend developer working in a Next.js monorepo with strict la
25
25
  Update `status.json` (`currentAgent`: `feature-developer`, `state`: `completed`). Handoff: tasks done, files by layer, unit specs, validation result, gaps for build-verifier/reviewer.
26
26
 
27
27
  Do not perform formal code review — that is the code-reviewer subagent's job.
28
+
29
+ ## Design guidance
30
+
31
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -1,7 +1,7 @@
1
1
  ---
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. Produces migration-plan.md only; never writes production code.
4
- model: inherit
4
+ model: opus
5
5
  ---
6
6
 
7
7
  You are a migration specialist for a Next.js frontend with strict layer boundaries.
@@ -67,3 +67,7 @@ Update `status.json`:
67
67
  ```
68
68
 
69
69
  Hand off: orchestrator runs human gate (if configured), then `feature-developer` executes phases from the plan.
70
+
71
+ ## Design guidance
72
+
73
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -1,7 +1,7 @@
1
1
  ---
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. Writes perf-report.md only; never edits production code.
4
- model: inherit
4
+ model: opus
5
5
  ---
6
6
 
7
7
  You are a frontend performance auditor for a Next.js React application.
@@ -66,3 +66,7 @@ Update `status.json`:
66
66
  For standalone `perf-audit` intent, suggest `/technical-retro` or a follow-up `/task` to implement fixes.
67
67
 
68
68
  Do not modify production code.
69
+
70
+ ## Design guidance
71
+
72
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -54,3 +54,7 @@ Provide summary:
54
54
  - Test run results
55
55
  - Gaps vs acceptance criteria
56
56
  - Suggest `/technical-retro` with the slug when done
57
+
58
+ ## Design guidance
59
+
60
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -1,7 +1,7 @@
1
1
  ---
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. Writes security-review.md only; never edits production code.
4
- model: inherit
4
+ model: opus
5
5
  ---
6
6
 
7
7
  You are a frontend security reviewer for a Next.js TypeScript application.
@@ -1,7 +1,7 @@
1
1
  ---
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. Writes design docs only; never writes production code.
4
- model: inherit
4
+ model: opus
5
5
  ---
6
6
 
7
7
  You are a solution architect for a Next.js frontend with strict layer boundaries (types, api, store, ui).
@@ -68,3 +68,7 @@ Update `status.json`:
68
68
  For `spike` intent with human gate after architect: set `"state": "awaiting_approval"` if design needs user sign-off.
69
69
 
70
70
  Handoff: summary of design decisions and recommended next steps for developer.
71
+
72
+ ## Design guidance
73
+
74
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -109,3 +109,7 @@ When DoR is reached and artifacts are saved:
109
109
  3. **Stop** and ask the user to review artifacts. Tell them to run `/task-continue <slug>` after approval or reply with corrections.
110
110
 
111
111
  Do not invoke the developer or any implementation subagent.
112
+
113
+ ## Design guidance (optional)
114
+
115
+ - Optional: Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit — only when decomposing refactor/architecture tasks (not default).
@@ -64,7 +64,21 @@ Fixtures: `.claude/team/fixtures/` (feature-full, feature-light, bugfix-standard
64
64
  - Add **tech-writer** when docs/changelog requested.
65
65
  - **Always build-verifier** after developer (or after ci-investigator/debugger if they changed code) for `feature`, `bugfix`, `refactor`, `migration`, `a11y`.
66
66
  - **skipIf:** `debugger.fixed` on developer (bugfix); `ci-investigator.resolved` (ci-fix).
67
- - **Model:** `inherit` when 4+ steps or cross-layer uncertainty.
67
+
68
+ ## Model tiers (`steps[].model`)
69
+
70
+ Optional per-step field: `"model": "cheap" | "standard" | "strong"`. Omit → agent frontmatter default (see **Model matrix** in `agents/README.md`).
71
+
72
+ | When | What to write |
73
+ |------|----------------|
74
+ | `profile: light` | set `cheap` on **all** steps (exception: unclear bug root cause on `debugger` → `strong`) |
75
+ | `profile: standard` | omit (frontmatter defaults) |
76
+ | `profile: full` | set `strong` on `solution-architect`, `migration-specialist`, `security-reviewer`, `performance-auditor` when present; omit others |
77
+ | `intent: spike` | set `strong` on `solution-architect` (and analyst may stay default/`cheap`) |
78
+ | `intent: perf-audit` / security-heavy feature | `strong` on auditor/reviewer step |
79
+ | Always | **never** `strong` on `build-verifier`, `tech-writer`, `task-router` |
80
+
81
+ Claude Code mapping when orchestrator invokes Agent tool: `cheap` → `haiku` (or rely on frontmatter `fast`); `standard` → omit / `sonnet` / inherit; `strong` → pass `opus` (or rely on frontmatter `opus`). Prefer explicit per-invocation `model` when frontmatter is unreliable.
68
82
 
69
83
  ## humanGates (defaults)
70
84
 
@@ -35,3 +35,7 @@ Update `status.json`:
35
35
  "updatedAt": "<ISO8601>"
36
36
  }
37
37
  ```
38
+
39
+ ## Design guidance
40
+
41
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -36,3 +36,7 @@ Update `status.json`:
36
36
  "updatedAt": "<ISO8601>"
37
37
  }
38
38
  ```
39
+
40
+ ## Design guidance
41
+
42
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -60,3 +60,7 @@ Update `status.json`:
60
60
  ```
61
61
 
62
62
  Do not write `*.spec.ts` files — that is `unit-test-generator`'s job.
63
+
64
+ ## Design guidance
65
+
66
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -1,11 +1,21 @@
1
1
  # `.claude/rules` (preset next)
2
2
 
3
- В Claude Code все `.md` под `rules/` **обнаруживаются рекурсивно**. Правила без YAML frontmatter загружаются **в начале сессии**; с `paths:` **только при работе** с matching-файлами.
3
+ В Claude Code все `.md` под `rules/` **обнаруживаются рекурсивно**. Тела **derived** из Cursor SoT; индексыне второй SoT.
4
+
5
+ ## SoT sync
6
+
7
+ | Principle | Detail |
8
+ |-----------|--------|
9
+ | **SoT** | `presets/cursor/next/rules/*.mdc` — edit here first |
10
+ | **Derive** | Claude topic `.md` = body + `paths:` (from Cursor `globs:` / requestable triggers) |
11
+ | **Drop** | Cursor-only keys (`alwaysApply`); keep short `description` |
12
+ | **Checklist** | change Cursor → update Claude twin **same PR** (**FAIL** if missing — next, ios-swift, and go; see `preset-twin-sync` / build-verifier) |
13
+ | **Shared core** | `presets/_shared/core/**` — see `<!-- shared-core: … -->` markers; taxonomy in `_shared/README.md` |
4
14
 
5
15
  ## Loading strategy
6
16
 
7
17
  - **Session start (no `paths:`):** ровно **3** — `next-app-core`, `package-manager`, `code-quality`
8
- - **On-demand (`paths:` or via commands):** `post-change-lint` (**обязателен после правок кода**), `agent-team-intake`, `agent-team-orchestrator`, `code-review-mr`, architecture, imports, UI, tests, feature-delivery-workflow, reference-features, next-app-router, react-a11y-coding
18
+ - **On-demand (`paths:` or via commands):** `post-change-lint` (**обязателен после правок кода**), `agent-team-intake`, `agent-team-orchestrator`, `code-review-mr`, architecture, imports, UI, tests, feature-delivery-workflow, `design-guidance`, reference-features, next-app-router, react-a11y-coding, `technical-retro`, **preset-*** meta (paths on `packages/ai-rules/presets/**`)
9
19
  - **Skills:** long workflows (`feature-delivery`, `code-review`, …)
10
20
 
11
21
  ### UI edit bundle (consolidated paths)
@@ -21,27 +31,70 @@
21
31
 
22
32
  **Не грузятся на типичный UI edit:** `architecture/architecture-boundaries.md` (api/store/types/lib), `architecture/layer-barrel-exports.md` (только `index.ts`), `stack/navigation-router.md` (только `app/src/app/**`). Стили колокации — в `react-ui.md` (не отдельный stub).
23
33
 
24
- ## С чего начать
34
+ ## Cursor Claude mapping
25
35
 
26
- - **`commands/task.md`** router `pipeline.json` agents
27
- - **`architecture/reference-features.md`** — заполнить TBD после init
28
- - **`architecture/feature-delivery-workflow.md`** — порядок слоёв
36
+ | Cursor `.mdc` (SoT) | Claude topic |
37
+ |---------------------|--------------|
38
+ | `next-app-core.mdc` | `stack/next-app-core.md` |
39
+ | `package-manager.mdc` | `tooling-and-review/package-manager.md` |
40
+ | `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
41
+ | `design-guidance.mdc` | `tooling-and-review/design-guidance.md` |
42
+ | `next-app-router.mdc` | `stack/next-app-router.md` |
43
+ | `arrow-functions.mdc` | `stack/arrow-functions.md` |
44
+ | `types-jsdoc.mdc` | `stack/types-jsdoc.md` |
45
+ | `no-type-assertion-as-import-export.mdc` | `stack/no-type-assertion.md` |
46
+ | `navigation-router-stack.mdc` | `stack/navigation-router.md` |
47
+ | `navigation-router-ui.mdc` | `stack/navigation-router-ui.md` |
48
+ | `architecture-boundaries.mdc` | `architecture/architecture-boundaries.md` |
49
+ | `architecture-boundaries-ui.mdc` | `architecture/architecture-boundaries-ui.md` |
50
+ | `feature-delivery-workflow.mdc` | `architecture/feature-delivery-workflow.md` |
51
+ | `reference-features.mdc` | `architecture/reference-features.md` |
52
+ | `public-imports.mdc` | `architecture/public-imports.md` |
53
+ | `layer-barrel-exports.mdc` | `architecture/layer-barrel-exports.md` |
54
+ | `api-services.mdc` | `api-and-data/api-services.md` |
55
+ | `http-client.mdc` | `api-and-data/http-client.md` |
56
+ | `store-rtk.mdc` | `api-and-data/store-rtk.md` |
57
+ | `react-ui.mdc` | `ui-and-accessibility/react-ui.md` |
58
+ | `react-a11y-coding.mdc` | `ui-and-accessibility/react-a11y-coding.md` |
59
+ | `no-props-spread.mdc` | `ui-and-accessibility/no-props-spread.md` |
60
+ | `css-property-order-stylelint.mdc` | `ui-and-accessibility/css-property-order.md` |
61
+ | `tests-unit.mdc` | `testing/tests-unit.md` |
62
+ | `tests-e2e-structure.mdc` | `testing/tests-e2e-structure.md` |
63
+ | `playwright-agents.mdc` | `testing/playwright-agents.md` |
64
+ | `post-change-lint.mdc` | `tooling-and-review/post-change-lint.md` |
65
+ | `code-review-mr.mdc` | `tooling-and-review/code-review-mr.md` |
66
+ | `agent-team-intake.mdc` | `tooling-and-review/agent-team-intake.md` |
67
+ | `agent-team-orchestrator.mdc` | `tooling-and-review/agent-team-orchestrator.md` |
68
+ | `technical-retro.mdc` | `tooling-and-review/technical-retro.md` |
69
+ | `preset-layering.mdc` | `tooling-and-review/preset-layering.md` |
70
+ | `preset-twin-sync.mdc` | `tooling-and-review/preset-twin-sync.md` |
71
+ | `preset-token-budget.mdc` | `tooling-and-review/preset-token-budget.md` |
72
+ | `preset-pr-checklist.mdc` | `tooling-and-review/preset-pr-checklist.md` |
73
+ | `preset-no-cross-stack-leakage.mdc` | `tooling-and-review/preset-no-cross-stack-leakage.md` |
29
74
 
30
- ## Каталог (новые и ключевые)
75
+ ## Core stack mapping
31
76
 
32
- | Файл | Назначение |
33
- |------|------------|
34
- | `architecture/reference-features.md` | Эталонные пути UI/store/API |
35
- | `stack/next-app-router.md` | App Router, RSC |
36
- | `ui-and-accessibility/react-a11y-coding.md` | A11y при кодинге UI |
37
- | `architecture/feature-delivery-workflow.md` | Сквозной чеклист (paths) |
38
- | `architecture/architecture-boundaries-ui.md` | Slim границы UI при правках компонентов |
39
- | `architecture/architecture-boundaries.md` | Полная карта UI / store / API |
40
- | `stack/navigation-router-ui.md` | Навигация в UI-компонентах (slim) |
41
- | `stack/navigation-router.md` | Полный аудит стека навигации |
42
- | `tooling-and-review/agent-team-orchestrator.md` | Pipeline, build-verifier, parallel |
43
- | `agents/build-verifier.md` | Validation gate agent |
44
-
45
- Полный список — см. подпапки `architecture/`, `stack/`, `api-and-data/`, `ui-and-accessibility/`, `testing/`, `tooling-and-review/`.
77
+ | Shared core | Cursor adapter | Notes |
78
+ |-------------|----------------|-------|
79
+ | `quality/code-quality-and-refactoring.md` | `code-quality-and-refactoring.mdc` / `code-quality.md` | + Stack notes (ESLint/CSS) |
80
+ | `quality/design-guidance.md` | `design-guidance.mdc` / `design-guidance.md` | requestable smells/GoF |
81
+ | `agent-team/agent-team-orchestrator.md` | `agent-team-orchestrator.mdc` | Roles in Stack notes |
82
+ | `agent-team/agent-team-intake.md` | `agent-team-intake.mdc` | thin alias |
83
+ | `architecture/feature-delivery-workflow.md` | `feature-delivery-workflow.mdc` | Next layer checklist in Stack notes |
84
+ | `architecture/reference-features.template.md` | `reference-features.mdc` | path table in Stack notes |
85
+ | `review/code-review-mr.md` | `code-review-mr.mdc` | Next checklist refs |
86
+ | `review/technical-retro.md` | `technical-retro.mdc` | thin alias |
87
+ | `meta/preset-*.md` | `preset-*.mdc` | author globs only |
88
+
89
+ ## Folders
90
+
91
+ | Папка | О чём |
92
+ |-------|--------|
93
+ | `stack/` | Next core, router, conventions |
94
+ | `architecture/` | Границы, feature-delivery, reference-features, imports |
95
+ | `api-and-data/` | HTTP, services, store |
96
+ | `testing/` | Unit, e2e, Playwright |
97
+ | `ui-and-accessibility/` | React UI, a11y, props |
98
+ | `tooling-and-review/` | Quality, review, lint, agent-team, retro, **preset meta** |
46
99
 
47
100
  **Коллизии:** импорт типов и API — **`architecture/public-imports.md`**.
@@ -6,6 +6,9 @@ paths:
6
6
  - app/src/types/**/*
7
7
  ---
8
8
 
9
+ <!-- shared-core: architecture/feature-delivery-workflow.md -->
10
+
11
+
9
12
  # Доставка фичи (сквозной порядок)
10
13
 
11
14
  Типичная фича с данными с backend и общим состоянием. Детали слоёв — `architecture/architecture-boundaries.md`, `stack/next-app-core.md`.
@@ -64,6 +67,8 @@ flowchart LR
64
67
  - HTTP-клиент из компонента/thunk в обход сервиса.
65
68
  - Deep-import `@/api/services/**` из UI/store.
66
69
  - `{...props}` — `ui-and-accessibility/no-props-spread.md`.
70
+ - **Ubiquitous language:** имена Domain/типов отражают предметную область фичи — не смешивать транспорт/фреймворк-термины в домен без нужды.
71
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
67
72
 
68
73
  ## Матрица: зона → правила
69
74
 
@@ -6,10 +6,15 @@ paths:
6
6
  - app/src/types/**/*
7
7
  ---
8
8
 
9
+ <!-- shared-core: architecture/reference-features.template.md -->
10
+
11
+
9
12
  # Эталонные фичи (reference features)
10
13
 
11
14
  Перед реализацией найди фичу того же типа и **повтори её структуру**, не изобретая новую организацию файлов.
12
15
 
16
+ Taxonomy / shared core: [`presets/_shared/README.md`](../../../../_shared/README.md) · [Preset contribution guide](../../../../docs/PRESET-CONTRIBUTION.md).
17
+
13
18
  ## Таблица эталонов
14
19
 
15
20
  Замени **TBD** на реальные пути после договорённости в команде (или при `ai-rules init` в целевом репо):
@@ -4,6 +4,8 @@ paths:
4
4
  - .claude/team/**/*
5
5
  ---
6
6
 
7
+ <!-- shared-core: agent-team/agent-team-intake.md -->
8
+
7
9
  # Agent team intake
8
10
 
9
11
  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:
@@ -5,6 +5,9 @@ paths:
5
5
  - .claude/agents/**/*
6
6
  ---
7
7
 
8
+ <!-- shared-core: agent-team/agent-team-orchestrator.md -->
9
+
10
+
8
11
  # Agent team orchestrator
9
12
 
10
13
  Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.claude/team/tasks/<slug>/`.
@@ -102,6 +105,7 @@ flowchart TD
102
105
  | `skipIf` | `debugger.fixed` / `ci-investigator.resolved` |
103
106
  | `parallel: true` | `agent` array — invoke all in one parent turn |
104
107
  | `scope` | e.g. `unit-in-dev`, `e2e-only` |
108
+ | `model` | `cheap` \| `standard` \| `strong` — optional tier override |
105
109
 
106
110
  ## Rules (strict)
107
111
 
@@ -121,7 +125,16 @@ Create `.claude/team/tasks/<slug>/**` by writing files (Write/Edit). Avoid Shell
121
125
 
122
126
  ## Invoking agents
123
127
 
124
- Use the available Claude Code subagent mechanism. Pass: slug, artifact paths, step `scope` if set.
128
+ Use the available Claude Code subagent / Agent tool. Pass: slug, artifact paths, step `scope` if set.
129
+
130
+ ### Model when invoking
131
+
132
+ 1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
133
+ 2. Map abstract tiers for the Agent tool `model` param:
134
+ - **`cheap`** → `haiku` (or rely on frontmatter `fast`).
135
+ - **`standard`** → omit / `sonnet` / inherit.
136
+ - **`strong`** → `opus` (matches strong-agent frontmatter). Prefer explicit per-invocation `model` when frontmatter pins are flaky.
137
+ 3. Parallel steps: apply the step-level `model` to each agent (or omit → each frontmatter).
125
138
 
126
139
  After each agent completes, ensure `status.json` has `state: completed` (or `awaiting_approval` if gate applies).
127
140
 
@@ -143,3 +156,7 @@ Borderline work requests — см. **`tooling-and-review/agent-team-intake.md`**
143
156
  ## Auto-detection (optional)
144
157
 
145
158
  When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
159
+
160
+ ## Preset authoring
161
+
162
+ When editing `packages/ai-rules/presets/**`, follow **`tooling-and-review/preset-pr-checklist.md`** (+ twin-sync / layering / token-budget / leakage).