@bonesofspring/ai-rules 0.2.5 → 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 (307) 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/build-verifier.md +17 -8
  107. package/presets/claude/ios-swift/agents/code-reviewer.md +4 -0
  108. package/presets/claude/ios-swift/agents/debugger.md +4 -0
  109. package/presets/claude/ios-swift/agents/feature-developer.md +4 -0
  110. package/presets/claude/ios-swift/agents/migration-specialist.md +4 -0
  111. package/presets/claude/ios-swift/agents/performance-auditor.md +4 -0
  112. package/presets/claude/ios-swift/agents/qa-tester.md +4 -0
  113. package/presets/claude/ios-swift/agents/solution-architect.md +4 -0
  114. package/presets/claude/ios-swift/agents/task-analyst.md +4 -0
  115. package/presets/claude/ios-swift/agents/unit-test-generator.md +4 -0
  116. package/presets/claude/ios-swift/agents/unit-test-healer.md +4 -0
  117. package/presets/claude/ios-swift/agents/unit-test-planner.md +4 -0
  118. package/presets/claude/ios-swift/rules/README.md +24 -2
  119. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +5 -0
  120. package/presets/claude/ios-swift/rules/architecture/reference-features.md +5 -0
  121. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +2 -2
  122. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +7 -0
  123. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +53 -20
  124. package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +29 -35
  125. package/presets/claude/ios-swift/rules/tooling-and-review/design-guidance.md +110 -0
  126. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +36 -0
  127. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +54 -0
  128. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  129. package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +41 -0
  130. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +42 -0
  131. package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +5 -3
  132. package/presets/claude/ios-swift/skills/code-review/SKILL.md +4 -0
  133. package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +4 -0
  134. package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +4 -0
  135. package/presets/claude/next/README.md +9 -1
  136. package/presets/claude/next/agents/build-verifier.md +24 -0
  137. package/presets/claude/next/agents/code-reviewer.md +4 -0
  138. package/presets/claude/next/agents/debugger.md +4 -0
  139. package/presets/claude/next/agents/feature-developer.md +4 -0
  140. package/presets/claude/next/agents/migration-specialist.md +4 -0
  141. package/presets/claude/next/agents/performance-auditor.md +4 -0
  142. package/presets/claude/next/agents/qa-tester.md +4 -0
  143. package/presets/claude/next/agents/solution-architect.md +4 -0
  144. package/presets/claude/next/agents/task-analyst.md +4 -0
  145. package/presets/claude/next/agents/unit-test-generator.md +4 -0
  146. package/presets/claude/next/agents/unit-test-healer.md +4 -0
  147. package/presets/claude/next/agents/unit-test-planner.md +4 -0
  148. package/presets/claude/next/rules/README.md +74 -21
  149. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +5 -0
  150. package/presets/claude/next/rules/architecture/reference-features.md +5 -0
  151. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +2 -0
  152. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +7 -0
  153. package/presets/claude/next/rules/tooling-and-review/code-quality.md +48 -20
  154. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +17 -8
  155. package/presets/claude/next/rules/tooling-and-review/design-guidance.md +110 -0
  156. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +36 -0
  157. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +54 -0
  158. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  159. package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +41 -0
  160. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +42 -0
  161. package/presets/claude/next/rules/tooling-and-review/technical-retro.md +16 -0
  162. package/presets/claude/next/skills/code-review/SKILL.md +4 -0
  163. package/presets/claude/next/skills/debug-investigation/SKILL.md +4 -0
  164. package/presets/claude/next/skills/feature-delivery/SKILL.md +4 -0
  165. package/presets/cursor/go/AGENTS.md +24 -0
  166. package/presets/cursor/go/BUGBOT.md +9 -0
  167. package/presets/cursor/go/MCP.md +16 -0
  168. package/presets/cursor/go/README.md +38 -0
  169. package/presets/cursor/go/agents/README.md +15 -0
  170. package/presets/cursor/go/agents/api-contract-reviewer.md +23 -0
  171. package/presets/cursor/go/agents/build-verifier.md +30 -0
  172. package/presets/cursor/go/agents/ci-investigator.md +17 -0
  173. package/presets/cursor/go/agents/code-reviewer.md +40 -0
  174. package/presets/cursor/go/agents/debugger.md +25 -0
  175. package/presets/cursor/go/agents/feature-developer.md +30 -0
  176. package/presets/cursor/go/agents/integration-test-generator.md +22 -0
  177. package/presets/cursor/go/agents/integration-test-healer.md +22 -0
  178. package/presets/cursor/go/agents/integration-test-planner.md +22 -0
  179. package/presets/cursor/go/agents/migration-specialist.md +31 -0
  180. package/presets/cursor/go/agents/performance-auditor.md +22 -0
  181. package/presets/cursor/go/agents/qa-tester.md +24 -0
  182. package/presets/cursor/go/agents/security-reviewer.md +20 -0
  183. package/presets/cursor/go/agents/solution-architect.md +28 -0
  184. package/presets/cursor/go/agents/task-analyst.md +25 -0
  185. package/presets/cursor/go/agents/task-router.md +69 -0
  186. package/presets/cursor/go/agents/tech-writer.md +15 -0
  187. package/presets/cursor/go/agents/unit-test-generator.md +21 -0
  188. package/presets/cursor/go/agents/unit-test-healer.md +13 -0
  189. package/presets/cursor/go/agents/unit-test-planner.md +26 -0
  190. package/presets/cursor/go/commands/README.md +54 -0
  191. package/presets/cursor/go/commands/feature-continue.md +19 -0
  192. package/presets/cursor/go/commands/feature-start.md +33 -0
  193. package/presets/cursor/go/commands/task-continue.md +49 -0
  194. package/presets/cursor/go/commands/task.md +49 -0
  195. package/presets/cursor/go/commands/technical-retro.md +81 -0
  196. package/presets/cursor/go/hooks/README.md +8 -0
  197. package/presets/cursor/go/hooks/chain-team-phases.sh +381 -0
  198. package/presets/cursor/go/hooks/guard-shell-command.sh +79 -0
  199. package/presets/cursor/go/hooks.json +17 -0
  200. package/presets/cursor/go/mcp.json +11 -0
  201. package/presets/cursor/go/rules/README.md +89 -0
  202. package/presets/cursor/go/rules/adapters-driven.mdc +35 -0
  203. package/presets/cursor/go/rules/adapters-driving.mdc +36 -0
  204. package/presets/cursor/go/rules/agent-team-intake.mdc +20 -0
  205. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +156 -0
  206. package/presets/cursor/go/rules/api-grpc.mdc +28 -0
  207. package/presets/cursor/go/rules/api-http.mdc +27 -0
  208. package/presets/cursor/go/rules/application-usecases.mdc +30 -0
  209. package/presets/cursor/go/rules/architecture-boundaries.mdc +30 -0
  210. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +73 -0
  211. package/presets/cursor/go/rules/code-review-mr.mdc +43 -0
  212. package/presets/cursor/go/rules/composition-root.mdc +29 -0
  213. package/presets/cursor/go/rules/design-guidance.mdc +111 -0
  214. package/presets/cursor/go/rules/domain-layer.mdc +33 -0
  215. package/presets/cursor/go/rules/feature-delivery-workflow.mdc +46 -0
  216. package/presets/cursor/go/rules/go-app-core.mdc +32 -0
  217. package/presets/cursor/go/rules/go-conventions.mdc +25 -0
  218. package/presets/cursor/go/rules/go-tooling.mdc +33 -0
  219. package/presets/cursor/go/rules/messaging-adapters.mdc +22 -0
  220. package/presets/cursor/go/rules/module-public-api.mdc +24 -0
  221. package/presets/cursor/go/rules/persistence-adapters.mdc +29 -0
  222. package/presets/cursor/go/rules/ports-interfaces.mdc +35 -0
  223. package/presets/cursor/go/rules/post-change-test.mdc +27 -0
  224. package/presets/cursor/go/rules/preset-layering.mdc +36 -0
  225. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +58 -0
  226. package/presets/cursor/go/rules/preset-pr-checklist.mdc +39 -0
  227. package/presets/cursor/go/rules/preset-token-budget.mdc +41 -0
  228. package/presets/cursor/go/rules/preset-twin-sync.mdc +42 -0
  229. package/presets/cursor/go/rules/reference-features.mdc +31 -0
  230. package/presets/cursor/go/rules/security-go.mdc +23 -0
  231. package/presets/cursor/go/rules/technical-retro.mdc +14 -0
  232. package/presets/cursor/go/rules/tests-e2e.mdc +19 -0
  233. package/presets/cursor/go/rules/tests-integration.mdc +24 -0
  234. package/presets/cursor/go/rules/tests-unit.mdc +25 -0
  235. package/presets/cursor/go/skills/README.md +5 -0
  236. package/presets/cursor/go/skills/ci-investigation/SKILL.md +11 -0
  237. package/presets/cursor/go/skills/code-review/SKILL.md +16 -0
  238. package/presets/cursor/go/skills/debug-investigation/SKILL.md +15 -0
  239. package/presets/cursor/go/skills/feature-delivery/SKILL.md +26 -0
  240. package/presets/cursor/go/skills/integration-testing/SKILL.md +15 -0
  241. package/presets/cursor/go/skills/technical-retro/SKILL.md +10 -0
  242. package/presets/cursor/go/skills/unit-testing/SKILL.md +14 -0
  243. package/presets/cursor/go/team/README.md +31 -0
  244. package/presets/cursor/go/team/fixtures/bugfix-standard.json +37 -0
  245. package/presets/cursor/go/team/fixtures/feature-full.json +43 -0
  246. package/presets/cursor/go/team/fixtures/feature-light.json +17 -0
  247. package/presets/cursor/ios-swift/README.md +7 -0
  248. package/presets/cursor/ios-swift/agents/build-verifier.md +17 -8
  249. package/presets/cursor/ios-swift/agents/code-reviewer.md +4 -0
  250. package/presets/cursor/ios-swift/agents/debugger.md +4 -0
  251. package/presets/cursor/ios-swift/agents/feature-developer.md +4 -0
  252. package/presets/cursor/ios-swift/agents/migration-specialist.md +4 -0
  253. package/presets/cursor/ios-swift/agents/performance-auditor.md +4 -0
  254. package/presets/cursor/ios-swift/agents/qa-tester.md +4 -0
  255. package/presets/cursor/ios-swift/agents/solution-architect.md +4 -0
  256. package/presets/cursor/ios-swift/agents/task-analyst.md +4 -0
  257. package/presets/cursor/ios-swift/agents/unit-test-generator.md +4 -0
  258. package/presets/cursor/ios-swift/agents/unit-test-healer.md +4 -0
  259. package/presets/cursor/ios-swift/agents/unit-test-planner.md +4 -0
  260. package/presets/cursor/ios-swift/rules/README.md +23 -2
  261. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +2 -2
  262. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +8 -2
  263. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +53 -20
  264. package/presets/cursor/ios-swift/rules/code-review-mr.mdc +32 -0
  265. package/presets/cursor/ios-swift/rules/design-guidance.mdc +111 -0
  266. package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +6 -0
  267. package/presets/cursor/ios-swift/rules/preset-layering.mdc +36 -0
  268. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +54 -0
  269. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +39 -0
  270. package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +41 -0
  271. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +42 -0
  272. package/presets/cursor/ios-swift/rules/reference-features.mdc +6 -0
  273. package/presets/cursor/ios-swift/rules/technical-retro.mdc +4 -2
  274. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +4 -0
  275. package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +4 -0
  276. package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +4 -0
  277. package/presets/cursor/next/README.md +46 -0
  278. package/presets/cursor/next/agents/build-verifier.md +24 -0
  279. package/presets/cursor/next/agents/code-reviewer.md +4 -0
  280. package/presets/cursor/next/agents/debugger.md +4 -0
  281. package/presets/cursor/next/agents/feature-developer.md +4 -0
  282. package/presets/cursor/next/agents/migration-specialist.md +4 -0
  283. package/presets/cursor/next/agents/performance-auditor.md +4 -0
  284. package/presets/cursor/next/agents/qa-tester.md +4 -0
  285. package/presets/cursor/next/agents/solution-architect.md +4 -0
  286. package/presets/cursor/next/agents/task-analyst.md +4 -0
  287. package/presets/cursor/next/agents/unit-test-generator.md +4 -0
  288. package/presets/cursor/next/agents/unit-test-healer.md +4 -0
  289. package/presets/cursor/next/agents/unit-test-planner.md +4 -0
  290. package/presets/cursor/next/commands/README.md +1 -1
  291. package/presets/cursor/next/rules/README.md +21 -1
  292. package/presets/cursor/next/rules/agent-team-intake.mdc +2 -0
  293. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +8 -2
  294. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +45 -18
  295. package/presets/cursor/next/rules/code-review-mr.mdc +32 -0
  296. package/presets/cursor/next/rules/design-guidance.mdc +111 -0
  297. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +6 -0
  298. package/presets/cursor/next/rules/preset-layering.mdc +36 -0
  299. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +54 -0
  300. package/presets/cursor/next/rules/preset-pr-checklist.mdc +39 -0
  301. package/presets/cursor/next/rules/preset-token-budget.mdc +41 -0
  302. package/presets/cursor/next/rules/preset-twin-sync.mdc +42 -0
  303. package/presets/cursor/next/rules/reference-features.mdc +6 -0
  304. package/presets/cursor/next/rules/technical-retro.mdc +5 -3
  305. package/presets/cursor/next/skills/code-review/SKILL.md +4 -0
  306. package/presets/cursor/next/skills/debug-investigation/SKILL.md +4 -0
  307. package/presets/cursor/next/skills/feature-delivery/SKILL.md +4 -0
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: integration-testing
3
+ description: Plans, generates, and heals Go integration and adapter contract tests (httptest, testcontainers). Use for integration-test-* agents or adapter/e2e coverage.
4
+ ---
5
+
6
+ # Integration testing (Go)
7
+
8
+ 1. Read `tests-integration` / `tests-e2e` rules and task brief.
9
+ 2. Prefer testing driven adapters behind ports; HTTP adapters with `httptest` + fakes.
10
+ 3. Use build tags / CI job split if the repo already does.
11
+ 4. Do not introduce Playwright or XCUITest.
12
+
13
+ ## Agents
14
+
15
+ `integration-test-planner` → `integration-test-generator` → `integration-test-healer` as needed.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: technical-retro
3
+ description: Facilitates technical retrospectives for tasks, sprints, incidents, releases, and agent-team pipelines. Use when the user asks for retro, postmortem, process review, or action items after delivery.
4
+ ---
5
+
6
+ # Technical Retro
7
+
8
+ Same structure as next technical-retro skill. For `/task` pipelines include router, analyst, developer, **build-verifier** (go test), reviewer, QA/integration tests, hooks, rules.
9
+
10
+ Preset feedback: propose updates to `.cursor/rules|agents|skills` — do not apply without approval.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: unit-testing
3
+ description: Plans, generates, and heals table-driven Go unit tests for domain, use cases, and mappers using *_test.go and tests-unit rules. Use for unit-test planning, generation, or healing.
4
+ ---
5
+
6
+ # Unit testing (Go)
7
+
8
+ 1. Prefer table-driven `testing` packages beside code under test.
9
+ 2. Fake outbound ports for use cases; no real DB/network.
10
+ 3. Follow `tests-unit.mdc`; heal with `unit-test-healer` when red.
11
+
12
+ ## Agents
13
+
14
+ `unit-test-planner` → `unit-test-generator` → `unit-test-healer`.
@@ -0,0 +1,31 @@
1
+ # Agent team artifacts (go)
2
+
3
+ Каталог артефактов пайплайна «команда агентов» для Go backend (hexagonal / ports & adapters).
4
+
5
+ ## Layout
6
+
7
+ ```
8
+ .cursor/team/ # Claude: .claude/team/
9
+ active-task.json
10
+ fixtures/
11
+ tasks/<slug>/
12
+ pipeline.json
13
+ status.json
14
+ brief.md
15
+ decomposition.md
16
+
17
+ ```
18
+
19
+ ## Fixtures
20
+
21
+ | Fixture | Notes |
22
+ |---------|-------|
23
+ | `feature-full.json` | Full profile; QA scope `e2e-only` = **adapter/integration tests** (not UI e2e); Playwright/XCUITest stems in `skipped` |
24
+ | `feature-light.json` | developer → build-verifier (`go test` / `go vet` / golangci-lint) |
25
+ | `bugfix-standard.json` | debugger → developer (skipIf) → verifier → reviewer |
26
+
27
+ **Never** schedule Playwright/XCUITest-only steps for this preset. Use `integration-test-*` (or QA with `e2e-only` = integration) for adapter-level coverage.
28
+
29
+ ## Creating task dirs
30
+
31
+ Bootstrap `tasks/<slug>/` by **writing** artifacts (Write tool), not Shell `mkdir`. Cursor sandbox → `Operation not permitted` otherwise (worse on Desktop/Documents).
@@ -0,0 +1,37 @@
1
+ {
2
+ "slug": "example-bugfix-standard",
3
+ "intent": "bugfix",
4
+ "profile": "standard",
5
+ "summary": "Regression fix with review",
6
+ "steps": [
7
+ {
8
+ "agent": "debugger",
9
+ "label": "Root cause"
10
+ },
11
+ {
12
+ "agent": "feature-developer",
13
+ "label": "Fix if needed",
14
+ "skipIf": "debugger.fixed"
15
+ },
16
+ {
17
+ "agent": "build-verifier",
18
+ "label": "go test / go vet / golangci-lint"
19
+ },
20
+ {
21
+ "agent": "code-reviewer",
22
+ "label": "Code review"
23
+ }
24
+ ],
25
+ "humanGates": [],
26
+ "autoChain": true,
27
+ "skipped": [
28
+ {
29
+ "agent": "playwright-test-planner",
30
+ "reason": "Go backend uses integration-test-* — not in this bugfix path"
31
+ },
32
+ {
33
+ "agent": "xcuitest-test-planner",
34
+ "reason": "Go backend uses integration-test-* — not in this bugfix path"
35
+ }
36
+ ]
37
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "slug": "example-feature-full",
3
+ "intent": "feature",
4
+ "profile": "full",
5
+ "summary": "Multi-layer Go use case with integration-test coverage",
6
+ "steps": [
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": "go test / go vet / golangci-lint", "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": "Integration tests", "scope": "e2e-only" }
14
+ ],
15
+ "humanGates": ["after:task-analyst"],
16
+ "autoChain": true,
17
+ "skipped": [
18
+ {
19
+ "agent": "playwright-test-planner",
20
+ "reason": "Go backend uses integration-test-* — not Playwright"
21
+ },
22
+ {
23
+ "agent": "playwright-test-generator",
24
+ "reason": "Go backend uses integration-test-*"
25
+ },
26
+ {
27
+ "agent": "playwright-test-healer",
28
+ "reason": "Go backend uses integration-test-*"
29
+ },
30
+ {
31
+ "agent": "xcuitest-test-planner",
32
+ "reason": "Go backend uses integration-test-* — not XCUITest"
33
+ },
34
+ {
35
+ "agent": "xcuitest-test-generator",
36
+ "reason": "Go backend uses integration-test-*"
37
+ },
38
+ {
39
+ "agent": "xcuitest-test-healer",
40
+ "reason": "Go backend uses integration-test-*"
41
+ }
42
+ ]
43
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "slug": "example-feature-light",
3
+ "intent": "feature",
4
+ "profile": "light",
5
+ "summary": "Trivial single-package change with explicit AC",
6
+ "steps": [
7
+ { "agent": "feature-developer", "label": "Implement", "model": "cheap" },
8
+ { "agent": "build-verifier", "label": "go test / go vet / golangci-lint", "model": "cheap" }
9
+ ],
10
+ "humanGates": [],
11
+ "autoChain": true,
12
+ "skipped": [
13
+ { "agent": "task-analyst", "reason": "Explicit AC and single-package scope" },
14
+ { "agent": "code-reviewer", "reason": "Light profile — non-trivial module/service changes should use standard" },
15
+ { "agent": "qa-tester", "reason": "No integration-test AC" }
16
+ ]
17
+ }
@@ -28,6 +28,13 @@ npx @bonesofspring/ai-rules init cursor --preset ios-swift
28
28
 
29
29
  Requestable (не always-on): `post-change-build`, `xcode-tooling`, `agent-team-*`, `code-review-mr`, `feature-delivery-workflow`, `reference-features`.
30
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)
37
+
31
38
  ## Sync with Claude
32
39
 
33
40
  SoT = этот Cursor-пресет. После правок `.mdc` / agents / skills — обновить twin в `presets/claude/ios-swift/` **в том же PR**.
@@ -26,17 +26,26 @@ Never require yarn/`lint:js`/Playwright for iOS app work.
26
26
 
27
27
  ## Preset-structure validation (when scope is preset / packages/ai-rules)
28
28
 
29
- When validating **ios-swift preset** changes (or `scope: preset-structure-validation`), **also** run these checks and **FAIL** on any mismatch:
30
-
31
- 1. **Chain fork check:** `hooks/chain-team-phases.sh` must **not** be byte-identical to `presets/cursor/next/hooks/chain-team-phases.sh` (Claude: vs `presets/claude/next/hooks/…`).
32
- 2. **Forbidden handoff strings** in ios-swift `chain-team-phases.sh` (Cursor + Claude): `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`, and positive yarn lint recipes (`lint:js` / `lint:css` as commands to run — negation prose alone is not enough; prefer zero occurrences).
33
- 3. **Required handoff stems:** `AGENT_HANDOFF` must include `xcuitest-test-planner` (or generator/healer) and `build-verifier` text must mention `xcodebuild` or `post-change-build` / `xcode-tooling`.
34
- 4. **Roster:** 21 agent stems; no `playwright-test-*` files under ios-swift `agents/`.
35
- 5. **Token budget:** Cursor `alwaysApply: true` count 3; Claude rules without `paths:` === 3.
29
+ When validating **ios-swift preset** changes (or `scope: preset-structure-validation` / `preset-artifacts-only`), **also** run these checks. Skip xcodebuild if there are **no** Swift app changes.
30
+
31
+ ### FAIL (all stacks + ios-specific)
32
+
33
+ 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`.
34
+ 2. **Chain fork check:** `hooks/chain-team-phases.sh` must **not** be byte-identical to `presets/cursor/next/hooks/chain-team-phases.sh` (Claude: vs `presets/claude/next/hooks/…`).
35
+ 3. **Forbidden handoff strings** in ios-swift `chain-team-phases.sh` (Cursor + Claude): `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`, and positive yarn lint recipes (`lint:js` / `lint:css` as commands to run — negation prose alone is not enough; prefer zero occurrences). See `preset-no-cross-stack-leakage.mdc`.
36
+ 4. **Required handoff stems:** `AGENT_HANDOFF` must include `xcuitest-test-planner` (or generator/healer) and `build-verifier` text must mention `xcodebuild` or `post-change-build` / `xcode-tooling`.
37
+ 5. **Roster:** 21 agent stems; no `playwright-test-*` files under ios-swift `agents/`.
38
+ 6. **Twin presence (hard):** Cursor rule change → Claude twin present **same PR** — **FAIL** if missing (next, ios-swift, and go).
39
+ 7. **Mapping / README:** `claude/ios-swift/rules/README.md` mapping table present; core→stack mapping documented when `_shared` consumers exist.
40
+ 8. **shared-core consumers:** if `_shared/core/**` changed, every matching `<!-- shared-core: … -->` consumer in this PR must be updated (or intentional fork documented).
41
+ 9. **Session-start body budget:** sum of the **3** intended always-on / session-start rule bodies ≤ **120** lines (stretch ≤100); do **not** include `**/README.md` — record in report.
42
+ 10. **Embed drift (soft by default):** `packages/ai-rules/scripts/check-shared-core-drift.sh`; `AI_RULES_DRIFT_FAIL=1` to enforce.
43
+ 11. **Dogfood (monorepo soft):** `packages/ai-rules/scripts/sync-dogfood-cursor.sh`; mass deletion without migration doc → risk / FAIL for maintainers.
36
44
 
37
45
  ### Soft rules (do not FAIL alone)
38
46
 
39
- - **AC-19 thin aliases:** `agent-team-intake` and similar thin requestable aliases may be &lt;15 body lines if they mirror next’s thin-alias pattern. Enforce ≥15 strictly on **domain** rules (navigation, persistence, security, modules, networking, UI).
47
+ - **Thin aliases:** `agent-team-intake`, `technical-retro` may be &lt;15 body lines. Enforce ≥15 on **domain** rules (navigation, persistence, security, modules, networking, UI).
48
+ - Embed vs lineage modes: `docs/PRESET-CONTRIBUTION.md`, `_shared/README.md`.
40
49
 
41
50
  ## Output
42
51
 
@@ -73,3 +73,7 @@ Update `status.json`:
73
73
  If **REQUEST_CHANGES**, set `"state": "changes_requested"` (hook will re-invoke feature-developer).
74
74
 
75
75
  Do not mix this output with retrospective facilitation — keep review and retro separate.
76
+
77
+ ## Design guidance
78
+
79
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -70,3 +70,7 @@ Update `status.json`:
70
70
  Handoff summary: root cause, recommended fix, files touched (if any), `fixApplied`.
71
71
 
72
72
  Do not perform formal code review or write XCUITest plans — those are separate agents.
73
+
74
+ ## Design guidance
75
+
76
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -33,3 +33,7 @@ When copying from `next` into `ios-swift` (or another stack):
33
33
  ## On completion
34
34
 
35
35
  `status.json`: `currentAgent: feature-developer`, `state: completed`. Handoff by layer + gaps for verifier/reviewer. No formal code review.
36
+
37
+ ## Design guidance
38
+
39
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -71,3 +71,7 @@ Update `status.json`:
71
71
  ```
72
72
 
73
73
  Hand off: orchestrator runs human gate (if configured), then `feature-developer` executes phases from the plan.
74
+
75
+ ## Design guidance
76
+
77
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -70,3 +70,7 @@ Update `status.json`:
70
70
  For standalone `perf-audit` intent, suggest `/technical-retro` or a follow-up `/task` to implement fixes.
71
71
 
72
72
  Do not modify production code.
73
+
74
+ ## Design guidance
75
+
76
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -63,3 +63,7 @@ Provide summary:
63
63
  - Test run results
64
64
  - Gaps vs acceptance criteria
65
65
  - Suggest `/technical-retro` with the slug when done
66
+
67
+ ## Design guidance
68
+
69
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -15,3 +15,7 @@ You are a solution architect for **iOS Feature modules** (Presentation / Domain
15
15
  - Alternatives table + chosen design + risks; keep token-light.
16
16
 
17
17
  Handoff: architecture approved or awaiting gate → status update.
18
+
19
+ ## Design guidance
20
+
21
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -23,3 +23,7 @@ Ask only blocking questions (AC gaps, Feature scope, platforms, offline/auth, AP
23
23
  3. Update `status.json` → `awaiting_approval` if human gate after analyst.
24
24
 
25
25
  Do not invent architecture stacks (TCA, SwiftData, …) — frame «как в репо».
26
+
27
+ ## Design guidance (optional)
28
+
29
+ - Optional: Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit — only when decomposing refactor/architecture tasks (not default).
@@ -52,3 +52,7 @@ Update `status.json`:
52
52
  "updatedAt": "<ISO8601>"
53
53
  }
54
54
  ```
55
+
56
+ ## Design guidance
57
+
58
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -51,3 +51,7 @@ Update `status.json`:
51
51
  "updatedAt": "<ISO8601>"
52
52
  }
53
53
  ```
54
+
55
+ ## Design guidance
56
+
57
+ - 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 test source 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.
@@ -20,6 +20,7 @@
20
20
  | `ios-app-core.mdc` | **always** | Стек, структура, tips (+ pointers на tooling/build) |
21
21
  | `architecture-boundaries.mdc` | **always** | Границы Presentation / Domain / Data, DI |
22
22
  | `code-quality-and-refactoring.mdc` | **always** | Качество и лёгкий refactor |
23
+ | `design-guidance.mdc` | requestable | Smells/GoF (Fowler≤12, GoF≤8) |
23
24
  | `xcode-tooling.mdc` | requestable | Схемы, xcodebuild, SwiftLint/Format |
24
25
  | `post-change-build.mdc` | requestable | Сборка/lint после Swift edits (**обязателен** после code edits) |
25
26
  | `agent-team-intake.mdc` | requestable | Подсказка `/task` |
@@ -28,6 +29,7 @@
28
29
  | `code-review-mr.mdc` | requestable | Ревью MR/diff |
29
30
  | `reference-features.mdc` | globs Features/** | Эталоны Feature + dogfood |
30
31
  | `technical-retro.mdc` | requestable | Alias → `/technical-retro` |
32
+ | `preset-layering.mdc` (+ `preset-*`) | globs presets/** | Author meta (never alwaysApply) |
31
33
  | `swiftui-ui.mdc` | Presentation, DesignSystem | SwiftUI, a11y |
32
34
  | `navigation-coordinators.mdc` | Navigation / App | NavigationStack, deep links |
33
35
  | `networking-services.mdc` | Data, Network | API, DTO, mappers (HTTP only) |
@@ -39,10 +41,28 @@
39
41
  | `tests-unit.mdc` | `*Tests` | Unit |
40
42
  | `tests-ui.mdc` | `*UITests` | XCUITest (+ pointer to xcuitest agents/skill) |
41
43
 
42
- **Всего topic `.mdc`:** 21 (без README).
44
+ **Всего topic `.mdc`:** 21 domain + 5 preset-meta (без README).
43
45
 
44
46
  **Twin depth (Cursor↔Claude):** domain rules ≥15 body lines. Thin requestable **aliases** (`agent-team-intake`, `technical-retro`) могут быть короче — как в next (soft AC-19).
45
47
 
48
+ ### Shared core → stack mapping
49
+
50
+ SoT prose: `packages/ai-rules/presets/_shared/core/**`. Adapters: `<!-- shared-core: … -->`.
51
+
52
+ | Shared core | This stack adapter | Delta |
53
+ |-------------|--------------------|-------|
54
+ | `quality/code-quality-and-refactoring.md` | `code-quality-and-refactoring.mdc` | Stack notes: force unwrap, DesignSystem |
55
+ | `quality/design-guidance.md` | `design-guidance.mdc` | requestable smells/GoF |
56
+ | `agent-team/agent-team-orchestrator.md` | `agent-team-orchestrator.mdc` | Roles (XCUITest); preset PR pointer |
57
+ | `agent-team/agent-team-intake.md` | `agent-team-intake.mdc` | thin + iOS scope note |
58
+ | `architecture/feature-delivery-workflow.md` | `feature-delivery-workflow.mdc` | Feature modules checklist |
59
+ | `architecture/reference-features.template.md` | `reference-features.mdc` | `Features/**` table + dogfood |
60
+ | `review/code-review-mr.md` | `code-review-mr.mdc` | iOS checklist |
61
+ | `review/technical-retro.md` | `technical-retro.mdc` | thin alias |
62
+ | `meta/preset-*.md` | `preset-*.mdc` | author-only globs |
63
+
64
+ Claude map: `presets/claude/ios-swift/rules/README.md`. Taxonomy: `presets/_shared/README.md`.
65
+
46
66
  ### Presentation edit bundle
47
67
 
48
68
  При правке `**/Presentation/**` или `**/DesignSystem/**`: грузить `swiftui-ui` + `state-and-viewmodels` (+ `navigation-coordinators` при правке навигации). Не подмешивать orchestrator.
@@ -55,7 +75,8 @@ alwaysApply (3)
55
75
 
56
76
  requestable
57
77
  └─ orchestrator, intake, feature-delivery, code-review-mr,
58
- post-change-build, xcode-tooling, reference-features, technical-retro
78
+ post-change-build, xcode-tooling, reference-features, technical-retro,
79
+ preset-* (author meta on packages/ai-rules/presets/**)
59
80
 
60
81
  globs
61
82
  └─ swiftui, navigation, viewmodels, networking, persistence,
@@ -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:
@@ -12,5 +14,3 @@ When the user message looks like a **work request** (implement, add, fix, refact
12
14
  3. Pure questions («как работает X», «объясни») — answer normally, no `/task`.
13
15
 
14
16
  Exceptions: user explicitly says «без pipeline», «просто сделай», or continues an active slug.
15
-
16
- Scope: iOS/Swift Feature modules (`Features/`, Presentation/Domain/Data) — not `app/src` / Playwright.
@@ -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 (iOS)
24
+ ## Stack notes
25
+
26
+ ### Roles (iOS)
23
27
 
24
28
  | Agent | Prod writes | Typical intent |
25
29
  |-------|-------------|----------------|
@@ -31,7 +35,7 @@ Work request без `/task` — см. **`agent-team-intake.mdc`**.
31
35
  | `debugger` | minimal | bugfix |
32
36
  | `ci-investigator` | minimal CI | ci-fix |
33
37
  | `feature-developer` | yes | feature, bugfix, refactor, migration, a11y |
34
- | `build-verifier` | no | xcodebuild + SwiftLint/Format + unit smoke |
38
+ | `build-verifier` | no | xcodebuild + SwiftLint/Format + unit smoke; preset-structure for preset PRs |
35
39
  | `accessibility-reviewer` | no | VoiceOver / Dynamic Type |
36
40
  | `performance-auditor` | no | launch / Instruments |
37
41
  | `code-reviewer` | no | most pipelines, review-only |
@@ -47,6 +51,8 @@ Work request без `/task` — см. **`agent-team-intake.mdc`**.
47
51
 
48
52
  Full prompts: `.cursor/agents/*.md`. Artifacts: `.cursor/team/README.md`.
49
53
 
54
+ When editing `packages/ai-rules/presets/**`, follow **`preset-pr-checklist.mdc`** (+ twin-sync / layering / token-budget / leakage meta-rules).
55
+
50
56
  ## Dynamic pipeline
51
57
 
52
58
  **Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
@@ -3,37 +3,70 @@ description: Поддержка и улучшение качества кода
3
3
  alwaysApply: true
4
4
  ---
5
5
 
6
+ <!-- shared-core: quality/code-quality-and-refactoring.md -->
7
+
6
8
  # Поддержка существующего стиля
7
9
 
8
10
  - Новые изменения должны:
9
- - следовать существующим паттернам (имена, структура, DI, error handling);
10
- - минимизировать «стилистический шум» (лишний reformat, rename без нужды).
11
- - Перед новым решением:
12
- - искать аналог в коде и **повторять подход**;
13
- - проверять DesignSystem и существующие компоненты перед новым UI-контролом;
14
- - обращаться к другим фичам только через public API (протоколы, facades).
11
+ - следовать существующим паттернам (имена, структура, типизация / DI / error handling стека);
12
+ - минимизировать «стилистический шум» (лишние правки форматирования, rename без нужды).
13
+ - Перед добавлением нового решения:
14
+ - искать аналогичное в коде и **повторять подход**, а не изобретать новый;
15
+ - проверять, нет ли уже подходящего компонента или паттерна в дизайн‑системе / UI‑пакетах проекта, прежде чем добавлять новый кастомный контрол;
16
+ - использовать при обращении к чужим модулям только их **public API** (barrel / протоколы / facades), а deep‑импорты внутренних файлов рассматривать как повод для рефакторинга.
17
+
18
+ # Принципы
19
+
20
+ - **KISS:** выбирать самое простое изменение, которое совпадает с паттернами репозитория; не изобретать новый стиль «с нуля».
21
+ - **DRY + Rule of Three:** устранять дублирование логики; выносить общее **только после 3-го** повторения — ошибочная абстракция дороже дублирования.
22
+ - **YAGNI:** не добавлять API, флаги, слои и обобщения «на будущее» без текущего требования.
23
+ - **SOLID** (agent-actionable, не эссе):
24
+ - **S** — один модуль / один повод менять; дробить god-файлы в рамках лёгкого refactor.
25
+ - **O** — расширять через композицию/новые реализации, не раздувая существующие ветки «на всякий случай».
26
+ - **L** — подтип не ломает контракт базового типа/протокола.
27
+ - **I** — узкие порты/интерфейсы; не заставлять клиента зависеть от неиспользуемого.
28
+ - **D** — зависеть от абстракций (порты); детали — в адаптерах стека (не дублировать stack boundaries).
29
+ - **CUPID** (компактный блок, Milanov):
30
+ - **Composable** — маленькие части стыкуются без скрытого глобального состояния.
31
+ - **Unix philosophy** — одна чёткая ответственность на единицу; пайплайн простых шагов.
32
+ - **Predictable** — одинаковый вход → одинаковый выход; минимум сюрпризов для вызывающего.
33
+ - **Idiomatic** — следовать идиомам языка и **существующим** конвенциям репо.
34
+ - **Domain-based** — имена и границы отражают предметную область фичи (не транспорт/фреймворк).
35
+ - **Composition over inheritance:** предпочитать композицию / делегирование наследованию иерархий.
36
+ - **Law of Demeter (hint):** не строить цепочки `a.b.c.d`; ходить через public API / facade модуля.
15
37
 
16
38
  # Рефакторинг при изменениях
17
39
 
18
- - Допустим лёгкий refactor, если он:
40
+ - Разрешён лёгкий refactor, если он:
19
41
  - уменьшает дублирование;
20
42
  - повышает читаемость;
21
- - не ломает публичные контракты.
22
- - Примеры:
23
- - вынести дублирующийся mapper или validation;
24
- - заменить force unwrap на безопасные конструкции;
25
- - разбить перегруженный ViewModel на use cases;
26
- - заменить magic numbers/colors на design tokens;
27
- - убрать прямую зависимость View от Data в пользу протокола.
43
+ - не ломает публичные контракты модулей.
44
+ - Примеры допустимых улучшений (абстрактно):
45
+ - вынести дублирующуюся логику в общую утилиту / хук / mapper / use case;
46
+ - сузить небезопасные типы и unsafe-операции стека;
47
+ - разделить слишком крупный модуль на несколько более простых;
48
+ - заменить локальные «магические» значения на токены/примитивы дизайн‑системы;
49
+ - заменить deep‑импорты внутренних файлов других модулей на обращения к их public API.
28
50
 
29
51
  # Ограничения
30
52
 
31
- - Не делать «большой» рефакторинг при точечной задаче:
32
- - не менять структуру модулей/таргетов;
33
- - не переименовывать public API без запроса.
34
- - Крупные изменения минимальными шагами, код остаётся компилируемым.
53
+ - Не выполнять «большой» рефакторинг, если задача точечная и не про архитектуру:
54
+ - не менять структуру директорий / модулей / таргетов без нужды;
55
+ - не менять названия публичных типов/функций/API без явного запроса.
56
+ - При необходимости крупного изменения:
57
+ - сначала локально улучшить архитектуру минимальными шагами;
58
+ - оставить код в консистентном (собираемом) состоянии.
35
59
 
36
60
  # Требование к агенту
37
61
 
38
- - **Boy scout rule:** оставлять модуль чуть лучше (безопасность optional, typed errors, tests).
39
- - Не жертвовать слоями ради краткости.
62
+ - **Boy scout rule:** оставлять модуль немного лучше, чем до изменения (простые, безопасные улучшения).
63
+ - Не жертвовать архитектурой и слоями ради краткости реализации.
64
+
65
+ > Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
66
+
67
+ ## Stack notes
68
+
69
+ - Перед новым UI‑контролом проверять DesignSystem и существующие компоненты.
70
+ - Public API: протоколы и facades между фичами.
71
+ - Допустимые примеры: общий mapper/validation; заменить force unwrap; разбить перегруженный ViewModel на use cases; design tokens вместо magic numbers/colors; убрать прямую зависимость View от Data в пользу протокола.
72
+ - Post-change gate: **`post-change-build.mdc`** + `xcode-tooling.mdc` (не yarn lint).
@@ -3,8 +3,40 @@ description: Требования к code review для iOS merge requests. Use
3
3
  alwaysApply: false
4
4
  ---
5
5
 
6
+ <!-- shared-core: review/code-review-mr.md -->
7
+
6
8
  # Code review merge requests
7
9
 
10
+ On-demand rule for review flows. **Procedure and output format:** skill `code-review`.
11
+
12
+ ## When to load
13
+
14
+ - User asks for review/MR/diff
15
+ - Pipeline step `code-reviewer`
16
+ - Platform automated review (e.g. BUGBOT) when present
17
+
18
+ ## Checklist references (abstract)
19
+
20
+ - Architecture layers and stack core rules
21
+ - Public imports / module boundaries
22
+ - UI conventions of the stack
23
+ - Unit and e2e/UI test conventions
24
+ - Post-change lint/build gate before final report
25
+ - Design smells **in MR diff scope** — load `design-guidance`; не разворачивать полный каталог Fowler вне диффа
26
+ - Pattern name (GoF) — только если репозиторий уже использует эту форму или match минимален
27
+ - Principles (KISS / DRY+Ro3 / YAGNI / SOLID / CUPID) — через always-on `code-quality-and-refactoring`, не дублировать эссе в review
28
+
29
+ Concrete rule stems — in **Stack notes**.
30
+
31
+ ## Constraints
32
+
33
+ - Focus on MR diff, not the whole repo.
34
+ - Use local `git diff` — do not invent hosting metadata.
35
+ - Boy scout rule: suggest fixes feasible within the MR scope.
36
+ - No «большие рефакторинги» without an explicit request (`code-quality-and-refactoring`).
37
+
38
+ ## Stack notes
39
+
8
40
  On-demand правило для review-потоков (не always-on).
9
41
 
10
42
  - **Когда применять**