@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
@@ -0,0 +1,31 @@
1
+ ---
2
+ description: Reference paths for Go hexagonal layout (fill after init)
3
+ globs:
4
+ - internal/**/*
5
+ - cmd/**/*
6
+ alwaysApply: false
7
+ ---
8
+
9
+ <!-- shared-core: architecture/reference-features.template.md -->
10
+
11
+ # Reference features (Go)
12
+
13
+ Fill TBD paths after adopting this preset in a real service repo.
14
+
15
+ | Area | Example path (TBD) | Glob hint |
16
+ |------|--------------------|-----------|
17
+ | Domain | `internal/domain/` | `**/domain/**` |
18
+ | Application / ports | `internal/application/` | `**/application/**` |
19
+ | HTTP adapter | `internal/adapters/http/` | `**/adapters/http/**` |
20
+ | Persistence | `internal/adapters/persistence/` | `**/adapters/persistence/**` |
21
+ | Composition root | `cmd/<service>/`, `internal/app/` | `cmd/**`, `internal/app/**` |
22
+ | Unit tests | `*_test.go` beside packages | `**/*_test.go` |
23
+ | Integration | `**/integration/` | `**/*_integration_test.go` |
24
+
25
+ ## Dogfood scenarios
26
+
27
+ 1. `/task` new use case — domain → ports → adapters → wire → `post-change-test`.
28
+ 2. Bug in handler mapping — debugger + httptest unit.
29
+ 3. Repository contract — integration-test trio.
30
+ 4. OpenAPI/proto drift — api-contract-reviewer.
31
+ 5. Secrets in logs — security-reviewer + `security-go`.
@@ -0,0 +1,23 @@
1
+ ---
2
+ description: Security basics for Go backends (secrets, auth, PII, TLS)
3
+ globs:
4
+ - "**/middleware/**/*"
5
+ - "**/auth/**/*"
6
+ - "**/config/**/*"
7
+ alwaysApply: false
8
+ ---
9
+
10
+
11
+ # Security (Go)
12
+
13
+ - Secrets from env/secret manager — never commit keys; do not log tokens/passwords.
14
+ - Validate and canonicalize untrusted input at the driving adapter edge.
15
+ - Prefer prepared statements / parameterized queries in persistence adapters.
16
+ - TLS and secure cookie/header defaults when exposing HTTP.
17
+ - AuthN/AuthZ in middleware or driving adapters; pass identity into use cases as domain value (user ID / claims), not raw headers.
18
+ - Minimize PII in logs; redact where needed.
19
+
20
+ ## Config
21
+
22
+ - Distinguish public vs secret config fields in types.
23
+ - Fail closed when auth is misconfigured in production builds.
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: Technical retro alias — use /technical-retro command
3
+ alwaysApply: false
4
+ ---
5
+
6
+ <!-- shared-core: review/technical-retro.md -->
7
+
8
+ # Техническое ретро — rule alias
9
+
10
+ Полный сценарий (включая блок **«Работа агентов»** для slug из team tasks) — в slash-команде:
11
+
12
+ **`commands/technical-retro.md`** → `/technical-retro`
13
+
14
+ Используй rule только если command недоступен. Не дублируй содержимое command в ответе — следуй command-файлу и skill `technical-retro`.
@@ -0,0 +1,19 @@
1
+ ---
2
+ description: End-to-end HTTP smoke tests for Go services
3
+ globs:
4
+ - "**/e2e/**/*_test.go"
5
+ - "**/*_e2e_test.go"
6
+ alwaysApply: false
7
+ ---
8
+
9
+
10
+ # E2E / HTTP smoke
11
+
12
+ - Black-box against a running server (httptest with full composition root, or localhost in CI).
13
+ - Cover critical paths only; prefer integration + unit for breadth.
14
+ - Stable test data; avoid depending on wall-clock flakiness.
15
+ - Do not use browser/Playwright tooling in this preset.
16
+
17
+ ## Placement
18
+
19
+ - `e2e/` package or `*_e2e_test.go` with build tags if needed.
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: Integration / adapter contract tests for Go hexagonal services
3
+ globs:
4
+ - "**/integration/**/*_test.go"
5
+ - "**/*_integration_test.go"
6
+ alwaysApply: false
7
+ ---
8
+
9
+
10
+ # Integration tests
11
+
12
+ - Exercise driven adapters against real infra doubles (testcontainers, docker compose test DB, miniredis, etc.).
13
+ - Or exercise HTTP adapter with `httptest` + wired use case + fake/real ports — still no full prod cluster required.
14
+ - Build tags (`//go:build integration`) if the repo separates CI jobs.
15
+ - Keep fixtures deterministic; clean up data between tests.
16
+
17
+ ## Scope
18
+
19
+ - Contract of a port implementation (repo save/load roundtrip).
20
+ - Not a substitute for domain unit tests.
21
+
22
+ ## Agents
23
+
24
+ - Planning/generation: `integration-test-{planner,generator,healer}` + skill `integration-testing`.
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Unit testing conventions for Go hexagonal services
3
+ globs:
4
+ - "**/*_test.go"
5
+ alwaysApply: false
6
+ ---
7
+
8
+
9
+ # Unit tests
10
+
11
+ - Table-driven tests; clear arrange/act/assert.
12
+ - Domain and application: mock/fake **ports** only — no real DB/network.
13
+ - Prefer fakes over heavy mocking frameworks when simple.
14
+ - Skip integration/e2e files matching `*_integration_test.go`, `*_e2e_test.go`, or dirs `integration/`, `e2e/` — those use other rules.
15
+
16
+ ## Forbidden smells
17
+
18
+ - `gin.Context` / `http.Request` in domain tests.
19
+ - SQL or live HTTP in use-case unit tests.
20
+ - Brittle tests on unexported adapter internals without need.
21
+ - Structural smells vocabulary (Feature Envy, Message Chains, …): see requestable `design-guidance` — do not duplicate the catalog here.
22
+
23
+ ## Naming
24
+
25
+ - `TestUseCase_DoX` / `TestEntity_Invariant`.
@@ -0,0 +1,5 @@
1
+ # Skills (preset go)
2
+
3
+ 7 skills: `feature-delivery`, `unit-testing`, `integration-testing`, `ci-investigation`, `debug-investigation`, `code-review`, `technical-retro`.
4
+
5
+ No `playwright-e2e` / `xcuitest-e2e`.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: ci-investigation
3
+ description: Investigates failing CI checks on PRs and branches — go test, vet, lint, integration, preset-structure — with local reproduction and minimal fixes. Use when CI is red or for ci-fix pipeline tasks.
4
+ ---
5
+
6
+ # CI investigation (Go)
7
+
8
+ 1. Identify job + log excerpt.
9
+ 2. Reproduce locally with the same commands.
10
+ 3. Minimal fix; for ai-rules preset PRs run `yarn check:preset-structure`.
11
+ 4. Do not treat Playwright/xcodebuild/`lint:js` as default Go gates.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: code-review
3
+ description: Reviews pull requests and branch diffs for Go hexagonal services using architecture, ports/adapters, networking, and testing standards. Use when the user asks for review or when code-reviewer runs.
4
+ ---
5
+
6
+ # Code review (Go)
7
+
8
+ 1. Diff-first; load `code-review-mr.mdc` + hexagonal rules.
9
+ 2. Check layer leaks, port ownership, composition root purity, tests, security-sensitive bits.
10
+ 3. Write `review.md` with APPROVE or REQUEST_CHANGES.
11
+
12
+ Never require iOS/Next-only gates (XCUITest, Playwright, `lint:js`).
13
+
14
+ ## Design guidance
15
+
16
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: debug-investigation
3
+ description: Investigates bugs, failing tests, and unexpected behavior in Go services with runtime evidence before applying minimal fixes. Use for bugfix tasks, debugger agent runs, or regressions.
4
+ ---
5
+
6
+ # Debug investigation (Go)
7
+
8
+ 1. Capture failing `go test` / logs / stack traces.
9
+ 2. Hypothesize layer (domain vs adapter vs wiring).
10
+ 3. Minimal fix + regression test when appropriate.
11
+ 4. Document in `debug-report.md`.
12
+
13
+ ## Design guidance
14
+
15
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: feature-delivery
3
+ description: Delivers Go hexagonal backend features end-to-end across domain, application/ports, adapters, composition root, tests, and post-change-test validation. Use when implementing or extending a feature, especially through /task or feature-developer.
4
+ ---
5
+
6
+ # Feature Delivery (Go hexagonal)
7
+
8
+ 1. Read brief, AC, and decomposition.
9
+ 2. Follow `feature-delivery-workflow.mdc` + `reference-features.mdc`: domain → application/ports → driven adapters → driving adapters → composition root → tests.
10
+ 3. Wire DI only in `cmd/` / `internal/app`.
11
+ 4. Add unit tests for domain/use cases; integration tests for risky adapters.
12
+ 5. After Go edits: **invoke** `post-change-test.mdc` (+ `go-tooling.mdc`).
13
+
14
+ ## Do / Don't
15
+
16
+ - **Do** keep ports owned by application; map wire types at adapters.
17
+ - **Don't** put SQL/business rules in HTTP handlers or frameworks in domain.
18
+ - **Don't** use Playwright, XCUITest, or yarn lint as this stack's gate.
19
+
20
+ ## Handoff
21
+
22
+ Summarize by layer + validation. Update `.cursor/team/tasks/<slug>/status.json`.
23
+
24
+ ## Design guidance
25
+
26
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -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**.
@@ -29,6 +29,18 @@ When copying next pipeline templates: put Playwright stems in `skipped` with rea
29
29
 
30
30
  Все agents — **`readonly: false`** (нужна запись в `.cursor/team/**`). Ограничения production — в теле промпта.
31
31
 
32
+ ## Model matrix (frontmatter `model`)
33
+
34
+ Same tiers as **cursor/next** (see that README for full notes). Defaults in this preset:
35
+
36
+ | Tier | Frontmatter | Agents |
37
+ |------|-------------|--------|
38
+ | **cheap** | `fast` | router, analyst, build-verifier, code-reviewer, tech-writer |
39
+ | **standard** | `inherit` | developer, debugger, ci-investigator, api-contract, a11y, qa, unit-*, xcuitest-* |
40
+ | **strong** | `claude-opus-4-8[effort=high]` | solution-architect, migration-specialist, security-reviewer, performance-auditor |
41
+
42
+ Optional `steps[].model`: `cheap` \| `standard` \| `strong` (router/orchestrator policy — same as next).
43
+
32
44
  ## Pipeline routing
33
45
 
34
46
  **SoT:** intent table / profiles — **`task-router.md`**. Schema — ниже (same as next).
@@ -43,8 +55,8 @@ When copying next pipeline templates: put Playwright stems in `skipped` with rea
43
55
  "steps": [
44
56
  { "agent": "task-analyst", "label": "Clarify and decompose" },
45
57
  { "agent": "feature-developer", "label": "Implement + unit tests", "scope": "unit-in-dev" },
46
- { "agent": "build-verifier", "label": "xcodebuild + lint + unit smoke" },
47
- { "agent": "code-reviewer", "label": "Code review" }
58
+ { "agent": "build-verifier", "label": "xcodebuild + lint + unit smoke", "model": "cheap" },
59
+ { "agent": "code-reviewer", "label": "Code review", "model": "cheap" }
48
60
  ],
49
61
  "humanGates": ["after:task-analyst"],
50
62
  "autoChain": true,
@@ -52,4 +64,6 @@ When copying next pipeline templates: put Playwright stems in `skipped` with rea
52
64
  }
53
65
  ```
54
66
 
67
+ `steps[].model` optional: `cheap` \| `standard` \| `strong`.
68
+
55
69
  Копируется в `.cursor/agents/` при `ai-rules init cursor --preset ios-swift`.
@@ -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.
@@ -2,7 +2,7 @@
2
2
  name: migration-specialist
3
3
  description: Migration planning specialist for Xcode/iOS/SPM upgrades, dependency swaps, and phased refactors with rollback. Writes migration-plan.md and team status; never writes production code.
4
4
  readonly: false
5
- model: inherit
5
+ model: claude-opus-4-8[effort=high]
6
6
  ---
7
7
 
8
8
  You are a migration specialist for an **iOS Swift** codebase with Feature-module layer boundaries.
@@ -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.
@@ -2,7 +2,7 @@
2
2
  name: performance-auditor
3
3
  description: Performance audit specialist. Reviews launch path, main-thread work, SwiftUI body churn, list scrolling, image decoding, and Instruments-oriented risks. Readonly — writes perf-report.md only; never edits production code.
4
4
  readonly: false
5
- model: inherit
5
+ model: claude-opus-4-8[effort=high]
6
6
  ---
7
7
 
8
8
  You are an iOS performance auditor for a Swift/SwiftUI application.
@@ -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.
@@ -2,7 +2,7 @@
2
2
  name: security-reviewer
3
3
  description: Security review specialist. Audits Keychain/token handling, ATS, PII in logs, secrets in diff, and unsafe URL/deep-link handling. Readonly — writes security-review.md only; never edits production code.
4
4
  readonly: false
5
- model: inherit
5
+ model: claude-opus-4-8[effort=high]
6
6
  ---
7
7
 
8
8
  You are an iOS security reviewer for a Swift/SwiftUI application.
@@ -2,7 +2,7 @@
2
2
  name: solution-architect
3
3
  description: Solution architect for cross-layer features, API boundaries, and technical design before implementation. Use for spike intent or when router adds architect step for complex features. Readonly — produces design docs, not production code.
4
4
  readonly: false
5
- model: inherit
5
+ model: claude-opus-4-8[effort=high]
6
6
  ---
7
7
 
8
8
  You are a solution architect for **iOS Feature modules** (Presentation / Domain / Data). Write `architecture.md` under `.cursor/team/tasks/<slug>/`. No production code.
@@ -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).
@@ -40,6 +40,15 @@ You are a task router for an **iOS Swift/SwiftUI** agent team. You **do not** im
40
40
 
41
41
  **Never skip `build-verifier`** after developer when Swift/Xcode sources changed.
42
42
 
43
+ ## Model tiers (`steps[].model`)
44
+
45
+ Optional: `"model": "cheap" | "standard" | "strong"`. Same policy as **cursor/next** `task-router.md`:
46
+
47
+ - `light` → `cheap` on all steps (debugger unclear root cause → `strong`)
48
+ - `full` / `spike` / security|perf specialists → `strong` on architect, migration, security, perf steps
49
+ - never `strong` on build-verifier / tech-writer / task-router
50
+ - omit on `standard` → agent frontmatter (`fast` / `inherit` / `claude-opus-4-8[effort=high]`)
51
+
43
52
  Fixtures: `.cursor/team/fixtures/` (feature-full, feature-light, bugfix-standard).
44
53
 
45
54
  ## humanGates (defaults)
@@ -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.