@bonesofspring/ai-rules 0.2.5 → 0.2.7

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 (407) hide show
  1. package/CHANGELOG.md +68 -4
  2. package/README.md +21 -3
  3. package/bin/cli.js +30 -1
  4. package/package.json +9 -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 +43 -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 +69 -0
  16. package/presets/_shared/core/quality/design-guidance.md +97 -0
  17. package/presets/_shared/core/review/code-review-mr.md +38 -0
  18. package/presets/_shared/core/review/technical-retro.md +7 -0
  19. package/presets/claude/go/CLAUDE.md +14 -0
  20. package/presets/claude/go/MCP.md +16 -0
  21. package/presets/claude/go/README.md +38 -0
  22. package/presets/claude/go/REPO_AGENTS.md +48 -0
  23. package/presets/claude/go/agents/README.md +32 -0
  24. package/presets/claude/go/agents/api-contract-reviewer.md +23 -0
  25. package/presets/claude/go/agents/build-verifier.md +35 -0
  26. package/presets/claude/go/agents/ci-investigator.md +17 -0
  27. package/presets/claude/go/agents/code-reviewer.md +40 -0
  28. package/presets/claude/go/agents/codebase-analyzer.md +28 -0
  29. package/presets/claude/go/agents/debugger.md +25 -0
  30. package/presets/claude/go/agents/feature-developer.md +43 -0
  31. package/presets/claude/go/agents/integration-test-generator.md +22 -0
  32. package/presets/claude/go/agents/integration-test-healer.md +22 -0
  33. package/presets/claude/go/agents/integration-test-planner.md +22 -0
  34. package/presets/claude/go/agents/migration-specialist.md +31 -0
  35. package/presets/claude/go/agents/performance-auditor.md +22 -0
  36. package/presets/claude/go/agents/qa-tester.md +24 -0
  37. package/presets/claude/go/agents/security-reviewer.md +20 -0
  38. package/presets/claude/go/agents/solution-architect.md +28 -0
  39. package/presets/claude/go/agents/task-analyst.md +25 -0
  40. package/presets/claude/go/agents/task-router.md +69 -0
  41. package/presets/claude/go/agents/tech-writer.md +15 -0
  42. package/presets/claude/go/agents/unit-test-generator.md +21 -0
  43. package/presets/claude/go/agents/unit-test-healer.md +13 -0
  44. package/presets/claude/go/agents/unit-test-planner.md +26 -0
  45. package/presets/claude/go/commands/README.md +13 -0
  46. package/presets/claude/go/commands/feature-continue.md +51 -0
  47. package/presets/claude/go/commands/feature-start.md +30 -0
  48. package/presets/claude/go/commands/task-continue.md +49 -0
  49. package/presets/claude/go/commands/task.md +49 -0
  50. package/presets/claude/go/commands/technical-retro.md +58 -0
  51. package/presets/claude/go/hooks/README.md +16 -0
  52. package/presets/claude/go/hooks/chain-team-phases.sh +381 -0
  53. package/presets/claude/go/hooks/examples/README.md +18 -0
  54. package/presets/claude/go/hooks/examples/format-edited.example.sh +9 -0
  55. package/presets/claude/go/hooks/examples/secret-guard.example.sh +10 -0
  56. package/presets/claude/go/hooks/examples/test-on-save.example.sh +11 -0
  57. package/presets/claude/go/hooks/guard-shell-command.sh +79 -0
  58. package/presets/claude/go/mcp.json +12 -0
  59. package/presets/claude/go/rules/README.md +60 -0
  60. package/presets/claude/go/rules/api-and-data/README.md +14 -0
  61. package/presets/claude/go/rules/api-and-data/adapters-driven.md +34 -0
  62. package/presets/claude/go/rules/api-and-data/adapters-driving.md +35 -0
  63. package/presets/claude/go/rules/api-and-data/api-grpc.md +27 -0
  64. package/presets/claude/go/rules/api-and-data/api-http.md +33 -0
  65. package/presets/claude/go/rules/api-and-data/messaging-adapters.md +21 -0
  66. package/presets/claude/go/rules/api-and-data/persistence-adapters.md +28 -0
  67. package/presets/claude/go/rules/architecture/README.md +16 -0
  68. package/presets/claude/go/rules/architecture/application-usecases.md +29 -0
  69. package/presets/claude/go/rules/architecture/boundaries.md +29 -0
  70. package/presets/claude/go/rules/architecture/composition-root.md +28 -0
  71. package/presets/claude/go/rules/architecture/domain-layer.md +32 -0
  72. package/presets/claude/go/rules/architecture/feature-delivery.md +51 -0
  73. package/presets/claude/go/rules/architecture/module-public-api.md +23 -0
  74. package/presets/claude/go/rules/architecture/ports-interfaces.md +34 -0
  75. package/presets/claude/go/rules/architecture/reference-features.md +34 -0
  76. package/presets/claude/go/rules/stack/README.md +10 -0
  77. package/presets/claude/go/rules/stack/go-app-core.md +31 -0
  78. package/presets/claude/go/rules/stack/go-conventions.md +51 -0
  79. package/presets/claude/go/rules/testing/README.md +11 -0
  80. package/presets/claude/go/rules/testing/e2e.md +18 -0
  81. package/presets/claude/go/rules/testing/integration.md +23 -0
  82. package/presets/claude/go/rules/testing/unit.md +24 -0
  83. package/presets/claude/go/rules/tooling-and-review/README.md +21 -0
  84. package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +25 -0
  85. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +161 -0
  86. package/presets/claude/go/rules/tooling-and-review/code-quality.md +83 -0
  87. package/presets/claude/go/rules/tooling-and-review/code-review.md +57 -0
  88. package/presets/claude/go/rules/tooling-and-review/design-guidance.md +110 -0
  89. package/presets/claude/go/rules/tooling-and-review/go-tooling.md +38 -0
  90. package/presets/claude/go/rules/tooling-and-review/post-change-test.md +32 -0
  91. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +36 -0
  92. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +58 -0
  93. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  94. package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +41 -0
  95. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +42 -0
  96. package/presets/claude/go/rules/tooling-and-review/security-go.md +22 -0
  97. package/presets/claude/go/rules/tooling-and-review/technical-retro.md +19 -0
  98. package/presets/claude/go/rules/ui-and-accessibility/README.md +3 -0
  99. package/presets/claude/go/skills/README.md +5 -0
  100. package/presets/claude/go/skills/ci-investigation/SKILL.md +11 -0
  101. package/presets/claude/go/skills/code-review/SKILL.md +25 -0
  102. package/presets/claude/go/skills/debug-investigation/SKILL.md +15 -0
  103. package/presets/claude/go/skills/feature-delivery/SKILL.md +30 -0
  104. package/presets/claude/go/skills/integration-testing/SKILL.md +15 -0
  105. package/presets/claude/go/skills/technical-retro/SKILL.md +54 -0
  106. package/presets/claude/go/skills/unit-testing/SKILL.md +14 -0
  107. package/presets/claude/go/skills/write-adr/SKILL.md +41 -0
  108. package/presets/claude/go/team/README.md +27 -0
  109. package/presets/claude/go/team/conventions.md +21 -0
  110. package/presets/claude/go/team/fixtures/bugfix-standard.json +37 -0
  111. package/presets/claude/go/team/fixtures/feature-full.json +43 -0
  112. package/presets/claude/go/team/fixtures/feature-light.json +17 -0
  113. package/presets/claude/ios-swift/CLAUDE.md +4 -1
  114. package/presets/claude/ios-swift/README.md +12 -1
  115. package/presets/claude/ios-swift/REPO_AGENTS.md +46 -0
  116. package/presets/claude/ios-swift/agents/README.md +3 -2
  117. package/presets/claude/ios-swift/agents/build-verifier.md +23 -8
  118. package/presets/claude/ios-swift/agents/code-reviewer.md +4 -0
  119. package/presets/claude/ios-swift/agents/codebase-analyzer.md +28 -0
  120. package/presets/claude/ios-swift/agents/debugger.md +4 -0
  121. package/presets/claude/ios-swift/agents/feature-developer.md +17 -0
  122. package/presets/claude/ios-swift/agents/migration-specialist.md +4 -0
  123. package/presets/claude/ios-swift/agents/performance-auditor.md +4 -0
  124. package/presets/claude/ios-swift/agents/qa-tester.md +4 -0
  125. package/presets/claude/ios-swift/agents/solution-architect.md +4 -0
  126. package/presets/claude/ios-swift/agents/task-analyst.md +4 -0
  127. package/presets/claude/ios-swift/agents/unit-test-generator.md +4 -0
  128. package/presets/claude/ios-swift/agents/unit-test-healer.md +4 -0
  129. package/presets/claude/ios-swift/agents/unit-test-planner.md +4 -0
  130. package/presets/claude/ios-swift/hooks/README.md +6 -0
  131. package/presets/claude/ios-swift/hooks/examples/README.md +18 -0
  132. package/presets/claude/ios-swift/hooks/examples/format-edited.example.sh +13 -0
  133. package/presets/claude/ios-swift/hooks/examples/secret-guard.example.sh +10 -0
  134. package/presets/claude/ios-swift/hooks/examples/test-on-save.example.sh +8 -0
  135. package/presets/claude/ios-swift/rules/README.md +24 -2
  136. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +5 -0
  137. package/presets/claude/ios-swift/rules/architecture/reference-features.md +9 -0
  138. package/presets/claude/ios-swift/rules/stack/swift-conventions.md +12 -2
  139. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +3 -3
  140. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +8 -1
  141. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +64 -20
  142. package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +42 -1
  143. package/presets/claude/ios-swift/rules/tooling-and-review/design-guidance.md +110 -0
  144. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +36 -0
  145. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +54 -0
  146. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  147. package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +41 -0
  148. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +42 -0
  149. package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +5 -3
  150. package/presets/claude/ios-swift/rules/ui-and-accessibility/swiftui.md +8 -0
  151. package/presets/claude/ios-swift/skills/README.md +1 -0
  152. package/presets/claude/ios-swift/skills/code-review/SKILL.md +14 -2
  153. package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +4 -0
  154. package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +8 -0
  155. package/presets/claude/ios-swift/skills/technical-retro/SKILL.md +46 -2
  156. package/presets/claude/ios-swift/skills/write-adr/SKILL.md +41 -0
  157. package/presets/claude/ios-swift/team/conventions.md +21 -0
  158. package/presets/claude/next/CLAUDE.md +5 -1
  159. package/presets/claude/next/README.md +14 -1
  160. package/presets/claude/next/REPO_AGENTS.md +48 -0
  161. package/presets/claude/next/agents/README.md +7 -1
  162. package/presets/claude/next/agents/build-verifier.md +29 -0
  163. package/presets/claude/next/agents/code-reviewer.md +4 -0
  164. package/presets/claude/next/agents/codebase-analyzer.md +28 -0
  165. package/presets/claude/next/agents/debugger.md +4 -0
  166. package/presets/claude/next/agents/feature-developer.md +17 -0
  167. package/presets/claude/next/agents/migration-specialist.md +4 -0
  168. package/presets/claude/next/agents/performance-auditor.md +4 -0
  169. package/presets/claude/next/agents/qa-tester.md +4 -0
  170. package/presets/claude/next/agents/security-reviewer.md +4 -2
  171. package/presets/claude/next/agents/solution-architect.md +4 -0
  172. package/presets/claude/next/agents/task-analyst.md +4 -0
  173. package/presets/claude/next/agents/unit-test-generator.md +4 -0
  174. package/presets/claude/next/agents/unit-test-healer.md +4 -0
  175. package/presets/claude/next/agents/unit-test-planner.md +4 -0
  176. package/presets/claude/next/hooks/README.md +6 -0
  177. package/presets/claude/next/hooks/examples/README.md +18 -0
  178. package/presets/claude/next/hooks/examples/format-edited.example.sh +11 -0
  179. package/presets/claude/next/hooks/examples/secret-guard.example.sh +10 -0
  180. package/presets/claude/next/hooks/examples/test-on-save.example.sh +8 -0
  181. package/presets/claude/next/rules/README.md +75 -21
  182. package/presets/claude/next/rules/api-and-data/api-services.md +22 -0
  183. package/presets/claude/next/rules/api-and-data/http-client.md +21 -0
  184. package/presets/claude/next/rules/api-and-data/store-rtk.md +20 -0
  185. package/presets/claude/next/rules/architecture/architecture-boundaries.md +28 -0
  186. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +5 -0
  187. package/presets/claude/next/rules/architecture/layer-barrel-exports.md +15 -0
  188. package/presets/claude/next/rules/architecture/public-imports.md +14 -0
  189. package/presets/claude/next/rules/architecture/reference-features.md +9 -0
  190. package/presets/claude/next/rules/stack/arrow-functions.md +13 -28
  191. package/presets/claude/next/rules/stack/next-app-router.md +13 -1
  192. package/presets/claude/next/rules/testing/tests-unit.md +13 -0
  193. package/presets/claude/next/rules/tooling-and-review/README.md +2 -1
  194. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +3 -1
  195. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +8 -1
  196. package/presets/claude/next/rules/tooling-and-review/code-quality.md +58 -20
  197. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +39 -8
  198. package/presets/claude/next/rules/tooling-and-review/design-guidance.md +110 -0
  199. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +36 -0
  200. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +54 -0
  201. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  202. package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +41 -0
  203. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +42 -0
  204. package/presets/claude/next/rules/tooling-and-review/security-next.md +57 -0
  205. package/presets/claude/next/rules/tooling-and-review/technical-retro.md +16 -0
  206. package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +21 -0
  207. package/presets/claude/next/skills/README.md +2 -0
  208. package/presets/claude/next/skills/code-review/SKILL.md +14 -2
  209. package/presets/claude/next/skills/debug-investigation/SKILL.md +4 -0
  210. package/presets/claude/next/skills/feature-delivery/SKILL.md +8 -0
  211. package/presets/claude/next/skills/react-performance/SKILL.md +44 -0
  212. package/presets/claude/next/skills/technical-retro/SKILL.md +19 -5
  213. package/presets/claude/next/skills/write-adr/SKILL.md +41 -0
  214. package/presets/claude/next/team/conventions.md +21 -0
  215. package/presets/cursor/go/AGENTS.md +30 -0
  216. package/presets/cursor/go/BUGBOT.md +9 -0
  217. package/presets/cursor/go/MCP.md +16 -0
  218. package/presets/cursor/go/README.md +39 -0
  219. package/presets/cursor/go/REPO_AGENTS.md +48 -0
  220. package/presets/cursor/go/agents/README.md +36 -0
  221. package/presets/cursor/go/agents/api-contract-reviewer.md +23 -0
  222. package/presets/cursor/go/agents/build-verifier.md +35 -0
  223. package/presets/cursor/go/agents/ci-investigator.md +17 -0
  224. package/presets/cursor/go/agents/code-reviewer.md +40 -0
  225. package/presets/cursor/go/agents/codebase-analyzer.md +28 -0
  226. package/presets/cursor/go/agents/debugger.md +25 -0
  227. package/presets/cursor/go/agents/feature-developer.md +43 -0
  228. package/presets/cursor/go/agents/integration-test-generator.md +22 -0
  229. package/presets/cursor/go/agents/integration-test-healer.md +22 -0
  230. package/presets/cursor/go/agents/integration-test-planner.md +22 -0
  231. package/presets/cursor/go/agents/migration-specialist.md +31 -0
  232. package/presets/cursor/go/agents/performance-auditor.md +22 -0
  233. package/presets/cursor/go/agents/qa-tester.md +24 -0
  234. package/presets/cursor/go/agents/security-reviewer.md +20 -0
  235. package/presets/cursor/go/agents/solution-architect.md +28 -0
  236. package/presets/cursor/go/agents/task-analyst.md +25 -0
  237. package/presets/cursor/go/agents/task-router.md +69 -0
  238. package/presets/cursor/go/agents/tech-writer.md +15 -0
  239. package/presets/cursor/go/agents/unit-test-generator.md +21 -0
  240. package/presets/cursor/go/agents/unit-test-healer.md +13 -0
  241. package/presets/cursor/go/agents/unit-test-planner.md +26 -0
  242. package/presets/cursor/go/commands/README.md +54 -0
  243. package/presets/cursor/go/commands/feature-continue.md +19 -0
  244. package/presets/cursor/go/commands/feature-start.md +33 -0
  245. package/presets/cursor/go/commands/task-continue.md +49 -0
  246. package/presets/cursor/go/commands/task.md +49 -0
  247. package/presets/cursor/go/commands/technical-retro.md +81 -0
  248. package/presets/cursor/go/hooks/README.md +12 -0
  249. package/presets/cursor/go/hooks/chain-team-phases.sh +381 -0
  250. package/presets/cursor/go/hooks/examples/README.md +18 -0
  251. package/presets/cursor/go/hooks/examples/format-edited.example.sh +9 -0
  252. package/presets/cursor/go/hooks/examples/secret-guard.example.sh +10 -0
  253. package/presets/cursor/go/hooks/examples/test-on-save.example.sh +11 -0
  254. package/presets/cursor/go/hooks/guard-shell-command.sh +79 -0
  255. package/presets/cursor/go/hooks.json +17 -0
  256. package/presets/cursor/go/mcp.json +11 -0
  257. package/presets/cursor/go/rules/README.md +89 -0
  258. package/presets/cursor/go/rules/adapters-driven.mdc +35 -0
  259. package/presets/cursor/go/rules/adapters-driving.mdc +36 -0
  260. package/presets/cursor/go/rules/agent-team-intake.mdc +20 -0
  261. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +156 -0
  262. package/presets/cursor/go/rules/api-grpc.mdc +28 -0
  263. package/presets/cursor/go/rules/api-http.mdc +34 -0
  264. package/presets/cursor/go/rules/application-usecases.mdc +30 -0
  265. package/presets/cursor/go/rules/architecture-boundaries.mdc +30 -0
  266. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +84 -0
  267. package/presets/cursor/go/rules/code-review-mr.mdc +52 -0
  268. package/presets/cursor/go/rules/composition-root.mdc +29 -0
  269. package/presets/cursor/go/rules/design-guidance.mdc +111 -0
  270. package/presets/cursor/go/rules/domain-layer.mdc +33 -0
  271. package/presets/cursor/go/rules/feature-delivery-workflow.mdc +46 -0
  272. package/presets/cursor/go/rules/go-app-core.mdc +32 -0
  273. package/presets/cursor/go/rules/go-conventions.mdc +52 -0
  274. package/presets/cursor/go/rules/go-tooling.mdc +33 -0
  275. package/presets/cursor/go/rules/messaging-adapters.mdc +22 -0
  276. package/presets/cursor/go/rules/module-public-api.mdc +24 -0
  277. package/presets/cursor/go/rules/persistence-adapters.mdc +29 -0
  278. package/presets/cursor/go/rules/ports-interfaces.mdc +35 -0
  279. package/presets/cursor/go/rules/post-change-test.mdc +27 -0
  280. package/presets/cursor/go/rules/preset-layering.mdc +36 -0
  281. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +58 -0
  282. package/presets/cursor/go/rules/preset-pr-checklist.mdc +39 -0
  283. package/presets/cursor/go/rules/preset-token-budget.mdc +41 -0
  284. package/presets/cursor/go/rules/preset-twin-sync.mdc +42 -0
  285. package/presets/cursor/go/rules/reference-features.mdc +35 -0
  286. package/presets/cursor/go/rules/security-go.mdc +23 -0
  287. package/presets/cursor/go/rules/technical-retro.mdc +14 -0
  288. package/presets/cursor/go/rules/tests-e2e.mdc +19 -0
  289. package/presets/cursor/go/rules/tests-integration.mdc +24 -0
  290. package/presets/cursor/go/rules/tests-unit.mdc +25 -0
  291. package/presets/cursor/go/skills/README.md +5 -0
  292. package/presets/cursor/go/skills/ci-investigation/SKILL.md +11 -0
  293. package/presets/cursor/go/skills/code-review/SKILL.md +25 -0
  294. package/presets/cursor/go/skills/debug-investigation/SKILL.md +15 -0
  295. package/presets/cursor/go/skills/feature-delivery/SKILL.md +30 -0
  296. package/presets/cursor/go/skills/integration-testing/SKILL.md +15 -0
  297. package/presets/cursor/go/skills/technical-retro/SKILL.md +54 -0
  298. package/presets/cursor/go/skills/unit-testing/SKILL.md +14 -0
  299. package/presets/cursor/go/skills/write-adr/SKILL.md +41 -0
  300. package/presets/cursor/go/team/README.md +31 -0
  301. package/presets/cursor/go/team/conventions.md +21 -0
  302. package/presets/cursor/go/team/fixtures/bugfix-standard.json +37 -0
  303. package/presets/cursor/go/team/fixtures/feature-full.json +43 -0
  304. package/presets/cursor/go/team/fixtures/feature-light.json +17 -0
  305. package/presets/cursor/ios-swift/AGENTS.md +5 -2
  306. package/presets/cursor/ios-swift/README.md +13 -5
  307. package/presets/cursor/ios-swift/REPO_AGENTS.md +46 -0
  308. package/presets/cursor/ios-swift/agents/README.md +3 -2
  309. package/presets/cursor/ios-swift/agents/build-verifier.md +23 -8
  310. package/presets/cursor/ios-swift/agents/code-reviewer.md +4 -0
  311. package/presets/cursor/ios-swift/agents/codebase-analyzer.md +28 -0
  312. package/presets/cursor/ios-swift/agents/debugger.md +4 -0
  313. package/presets/cursor/ios-swift/agents/feature-developer.md +17 -0
  314. package/presets/cursor/ios-swift/agents/migration-specialist.md +4 -0
  315. package/presets/cursor/ios-swift/agents/performance-auditor.md +4 -0
  316. package/presets/cursor/ios-swift/agents/qa-tester.md +4 -0
  317. package/presets/cursor/ios-swift/agents/solution-architect.md +4 -0
  318. package/presets/cursor/ios-swift/agents/task-analyst.md +4 -0
  319. package/presets/cursor/ios-swift/agents/unit-test-generator.md +4 -0
  320. package/presets/cursor/ios-swift/agents/unit-test-healer.md +4 -0
  321. package/presets/cursor/ios-swift/agents/unit-test-planner.md +4 -0
  322. package/presets/cursor/ios-swift/commands/README.md +1 -1
  323. package/presets/cursor/ios-swift/hooks/README.md +4 -0
  324. package/presets/cursor/ios-swift/hooks/examples/README.md +18 -0
  325. package/presets/cursor/ios-swift/hooks/examples/format-edited.example.sh +13 -0
  326. package/presets/cursor/ios-swift/hooks/examples/secret-guard.example.sh +10 -0
  327. package/presets/cursor/ios-swift/hooks/examples/test-on-save.example.sh +8 -0
  328. package/presets/cursor/ios-swift/rules/README.md +23 -2
  329. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +3 -3
  330. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +9 -3
  331. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +64 -20
  332. package/presets/cursor/ios-swift/rules/code-review-mr.mdc +41 -0
  333. package/presets/cursor/ios-swift/rules/design-guidance.mdc +111 -0
  334. package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +6 -0
  335. package/presets/cursor/ios-swift/rules/preset-layering.mdc +36 -0
  336. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +54 -0
  337. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +39 -0
  338. package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +41 -0
  339. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +42 -0
  340. package/presets/cursor/ios-swift/rules/reference-features.mdc +10 -0
  341. package/presets/cursor/ios-swift/rules/swift-conventions.mdc +12 -2
  342. package/presets/cursor/ios-swift/rules/swiftui-ui.mdc +8 -0
  343. package/presets/cursor/ios-swift/rules/technical-retro.mdc +4 -2
  344. package/presets/cursor/ios-swift/skills/README.md +1 -0
  345. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +14 -2
  346. package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +4 -0
  347. package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +8 -0
  348. package/presets/cursor/ios-swift/skills/technical-retro/SKILL.md +46 -2
  349. package/presets/cursor/ios-swift/skills/write-adr/SKILL.md +41 -0
  350. package/presets/cursor/ios-swift/team/conventions.md +21 -0
  351. package/presets/cursor/next/AGENTS.md +5 -2
  352. package/presets/cursor/next/README.md +47 -0
  353. package/presets/cursor/next/REPO_AGENTS.md +48 -0
  354. package/presets/cursor/next/agents/README.md +7 -1
  355. package/presets/cursor/next/agents/build-verifier.md +29 -0
  356. package/presets/cursor/next/agents/code-reviewer.md +4 -0
  357. package/presets/cursor/next/agents/codebase-analyzer.md +28 -0
  358. package/presets/cursor/next/agents/debugger.md +4 -0
  359. package/presets/cursor/next/agents/feature-developer.md +17 -0
  360. package/presets/cursor/next/agents/migration-specialist.md +4 -0
  361. package/presets/cursor/next/agents/performance-auditor.md +4 -0
  362. package/presets/cursor/next/agents/qa-tester.md +4 -0
  363. package/presets/cursor/next/agents/security-reviewer.md +4 -2
  364. package/presets/cursor/next/agents/solution-architect.md +4 -0
  365. package/presets/cursor/next/agents/task-analyst.md +4 -0
  366. package/presets/cursor/next/agents/unit-test-generator.md +4 -0
  367. package/presets/cursor/next/agents/unit-test-healer.md +4 -0
  368. package/presets/cursor/next/agents/unit-test-planner.md +4 -0
  369. package/presets/cursor/next/commands/README.md +1 -1
  370. package/presets/cursor/next/hooks/README.md +4 -0
  371. package/presets/cursor/next/hooks/examples/README.md +18 -0
  372. package/presets/cursor/next/hooks/examples/format-edited.example.sh +11 -0
  373. package/presets/cursor/next/hooks/examples/secret-guard.example.sh +10 -0
  374. package/presets/cursor/next/hooks/examples/test-on-save.example.sh +8 -0
  375. package/presets/cursor/next/rules/README.md +24 -3
  376. package/presets/cursor/next/rules/agent-team-intake.mdc +3 -1
  377. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +9 -3
  378. package/presets/cursor/next/rules/api-services.mdc +21 -0
  379. package/presets/cursor/next/rules/architecture-boundaries.mdc +27 -0
  380. package/presets/cursor/next/rules/arrow-functions.mdc +13 -28
  381. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +55 -18
  382. package/presets/cursor/next/rules/code-review-mr.mdc +39 -9
  383. package/presets/cursor/next/rules/design-guidance.mdc +111 -0
  384. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +6 -0
  385. package/presets/cursor/next/rules/http-client.mdc +21 -0
  386. package/presets/cursor/next/rules/layer-barrel-exports.mdc +15 -0
  387. package/presets/cursor/next/rules/next-app-router.mdc +13 -1
  388. package/presets/cursor/next/rules/preset-layering.mdc +36 -0
  389. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +54 -0
  390. package/presets/cursor/next/rules/preset-pr-checklist.mdc +39 -0
  391. package/presets/cursor/next/rules/preset-token-budget.mdc +41 -0
  392. package/presets/cursor/next/rules/preset-twin-sync.mdc +42 -0
  393. package/presets/cursor/next/rules/public-imports.mdc +14 -0
  394. package/presets/cursor/next/rules/react-ui.mdc +20 -0
  395. package/presets/cursor/next/rules/reference-features.mdc +10 -0
  396. package/presets/cursor/next/rules/security-next.mdc +57 -0
  397. package/presets/cursor/next/rules/store-rtk.mdc +19 -0
  398. package/presets/cursor/next/rules/technical-retro.mdc +5 -3
  399. package/presets/cursor/next/rules/tests-unit.mdc +12 -0
  400. package/presets/cursor/next/skills/README.md +2 -0
  401. package/presets/cursor/next/skills/code-review/SKILL.md +14 -2
  402. package/presets/cursor/next/skills/debug-investigation/SKILL.md +4 -0
  403. package/presets/cursor/next/skills/feature-delivery/SKILL.md +8 -0
  404. package/presets/cursor/next/skills/react-performance/SKILL.md +44 -0
  405. package/presets/cursor/next/skills/technical-retro/SKILL.md +19 -5
  406. package/presets/cursor/next/skills/write-adr/SKILL.md +41 -0
  407. package/presets/cursor/next/team/conventions.md +21 -0
@@ -2,6 +2,8 @@
2
2
 
3
3
  Краткая точка входа для Cursor. Подробные правила — `.cursor/rules/*.mdc`; сценарии — `.cursor/skills/**`.
4
4
 
5
+ **Repo-root agents:** see [`AGENTS.md`](../../AGENTS.md) at the project root (cross-tool setup, commands, security, living conventions pointers).
6
+
5
7
  See `.cursor/rules/README.md` for the full catalog and loading strategy.
6
8
 
7
9
  ## Quick start
@@ -17,6 +19,7 @@ See `.cursor/rules/README.md` for the full catalog and loading strategy.
17
19
  | Code review MR | skill `code-review` + `code-review-mr.mdc` |
18
20
  | UI-тесты | skill `xcuitest-e2e` + agents `xcuitest-test-*` |
19
21
  | Security / Keychain | `security-ios.mdc` |
22
+ | SwiftUI lifecycle | `swiftui-ui.mdc` (`.task`, ownership) |
20
23
  | Валидация перед review | agent `build-verifier` (для preset: ещё проверка chain≠next) |
21
24
  | Техническое ретро | `/technical-retro` + skill `technical-retro` |
22
25
 
@@ -32,7 +35,7 @@ See `.cursor/rules/README.md` for the full catalog and loading strategy.
32
35
 
33
36
  - Реализация, багфикс, миграция, тесты, ревью MR, CI-fix — **предпочтительно через `/task`**.
34
37
  - Простой one-liner без архитектурного риска — можно без pipeline, если пользователь явно просит.
35
- - Вопросы «как работает X» — ответ без `/task`.
38
+ - Вопросы «как работает X» — agent `codebase-analyzer` (explain-as-is) или ответ без `/task`.
36
39
 
37
40
  ## Pipeline routing
38
41
 
@@ -44,4 +47,4 @@ Intent detection, profiles (`full` / `standard` / `light`), and default steps
44
47
  npx @bonesofspring/ai-rules init cursor --preset ios-swift
45
48
  ```
46
49
 
47
- Копирует rules, commands, agents, hooks, skills, team, `hooks.json`, `BUGBOT.md`, `AGENTS.md`, `MCP.md`, `mcp.json` → `.cursor/mcp.json`.
50
+ Копирует rules, commands, agents, hooks, skills, team, `hooks.json`, `BUGBOT.md`, `AGENTS.md` → `.cursor/AGENTS.md`, `MCP.md`, `mcp.json` → `.cursor/mcp.json`, плюс `REPO_AGENTS.md` → корневой `AGENTS.md`. Skill: `write-adr` (on-demand).
@@ -12,14 +12,15 @@ npx @bonesofspring/ai-rules init cursor --preset ios-swift
12
12
 
13
13
  | Path | Содержание |
14
14
  |------|------------|
15
- | `AGENTS.md` | Quick-start |
15
+ | `REPO_AGENTS.md` | → repo-root `AGENTS.md` (cross-tool) |
16
+ | `AGENTS.md` | → `.cursor/AGENTS.md` quick-start |
16
17
  | `BUGBOT.md` | Cursor Bugbot review priorities (iOS) |
17
18
  | `rules/**` | `.mdc` + README (alwaysApply ≤3) |
18
- | `agents/**` | **21** ролей (+ README rename map) |
19
- | `skills/**` | **7** skills (в т.ч. `xcuitest-e2e`) |
19
+ | `agents/**` | **22** ролей (+ README rename map; includes on-demand `codebase-analyzer`) |
20
+ | `skills/**` | **8** skills (incl. `xcuitest-e2e`, `write-adr`; no `react-performance`) |
20
21
  | `commands/**` | task, task-continue, feature-start/continue, technical-retro |
21
- | `hooks.json` + `hooks/**` | guard-shell + chain-team-phases |
22
- | `team/**` | fixtures + README |
22
+ | `hooks.json` + `hooks/**` | guard-shell + chain-team-phases; optional `hooks/examples/` |
23
+ | `team/**` | fixtures + `conventions.md` + README |
23
24
  | `mcp.json` + `MCP.md` | Context7 + Figma MCP → `.cursor/mcp.json` |
24
25
 
25
26
  ## alwaysApply (≤3)
@@ -28,6 +29,13 @@ npx @bonesofspring/ai-rules init cursor --preset ios-swift
28
29
 
29
30
  Requestable (не always-on): `post-change-build`, `xcode-tooling`, `agent-team-*`, `code-review-mr`, `feature-delivery-workflow`, `reference-features`.
30
31
 
32
+ ## Preset taxonomy & contributing
33
+
34
+ - **Layers:** Core → Stack → Platform — [`../../_shared/README.md`](../../_shared/README.md)
35
+ - **Contribution guide:** [`../../docs/PRESET-CONTRIBUTION.md`](../../docs/PRESET-CONTRIBUTION.md) (SoT, twins, token budget, PR checklist)
36
+ - **Author meta-rules:** `preset-*.mdc` (globs `packages/ai-rules/presets/**`, never alwaysApply)
37
+ - **Core→stack mapping:** [`rules/README.md`](./rules/README.md)
38
+
31
39
  ## Sync with Claude
32
40
 
33
41
  SoT = этот Cursor-пресет. После правок `.mdc` / agents / skills — обновить twin в `presets/claude/ios-swift/` **в том же PR**.
@@ -0,0 +1,46 @@
1
+ # iOS Swift — agent instructions
2
+
3
+ Cross-tool repo-root guide. Tool-specific maps stay under `.cursor/AGENTS.md` and `.claude/CLAUDE.md`.
4
+
5
+ ## Cross-tool setup
6
+
7
+ - Treat this file as the **shared** entry for any agent (Cursor, Claude Code, or other).
8
+ - Tool maps live in `.cursor/AGENTS.md` / `.claude/CLAUDE.md` when that tool is installed.
9
+ - Install:
10
+
11
+ ```bash
12
+ npx @bonesofspring/ai-rules init cursor --preset ios-swift
13
+ npx @bonesofspring/ai-rules init claude --preset ios-swift
14
+ ```
15
+
16
+ `init` overwrites this file from the preset (`REPO_AGENTS.md` → `AGENTS.md`). Living gotchas belong in `team/conventions.md`, not here.
17
+
18
+ ## Commands (test / lint / build)
19
+
20
+ | Gate | Typical command |
21
+ |------|-----------------|
22
+ | Build | `xcodebuild` (scheme/workspace as in project docs) |
23
+ | Lint | **SwiftLint** (config in repo; see `xcode-tooling` / conventions) |
24
+ | Format | SwiftFormat when configured |
25
+ | Tests | `xcodebuild test` slice for the changed target |
26
+
27
+ After code edits: invoke **`post-change-build`** (requestable). Full gate: agent `build-verifier`.
28
+
29
+ ## Security basics
30
+
31
+ - Do not commit secrets (API keys, Keychain dumps, `.env`).
32
+ - Review destructive git before running; respect shell hooks.
33
+ - Do not skip signing / CI gates unless the user explicitly asks.
34
+
35
+ ## Tool entry points
36
+
37
+ | Tool | Map |
38
+ |------|-----|
39
+ | Cursor | `.cursor/AGENTS.md` (optional if Cursor not installed) |
40
+ | Claude Code | `.claude/CLAUDE.md` (optional if Claude not installed) |
41
+
42
+ Rules: `.cursor/rules/` or `.claude/rules/`. Skills: `.cursor/skills/` or `.claude/skills/`.
43
+
44
+ ## Living conventions
45
+
46
+ Gotchas, local patterns, and team decisions: **`.cursor/team/conventions.md`** and/or **`.claude/team/conventions.md`** (fill after init).
@@ -13,11 +13,12 @@
13
13
 
14
14
  When copying next pipeline templates: put Playwright stems in `skipped` with reason «iOS uses XCUITest» and schedule xcuitest trio instead.
15
15
 
16
- ## Roster (21)
16
+ ## Roster (22)
17
17
 
18
18
  | Agent | Production-код |
19
19
  |-------|----------------|
20
20
  | task-router, task-analyst, solution-architect, migration-specialist, api-contract-reviewer | no |
21
+ | codebase-analyzer | no (explain-as-is only) |
21
22
  | feature-developer | yes |
22
23
  | build-verifier | no |
23
24
  | debugger, ci-investigator | minimal |
@@ -35,7 +36,7 @@ Same tiers as **cursor/next** (see that README for full notes). Defaults in this
35
36
 
36
37
  | Tier | Frontmatter | Agents |
37
38
  |------|-------------|--------|
38
- | **cheap** | `fast` | router, analyst, build-verifier, code-reviewer, tech-writer |
39
+ | **cheap** | `fast` | router, analyst, build-verifier, code-reviewer, tech-writer, codebase-analyzer |
39
40
  | **standard** | `inherit` | developer, debugger, ci-investigator, api-contract, a11y, qa, unit-*, xcuitest-* |
40
41
  | **strong** | `claude-opus-4-8[effort=high]` | solution-architect, migration-specialist, security-reviewer, performance-auditor |
41
42
 
@@ -26,17 +26,32 @@ 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`.
49
+
50
+
51
+ 9. **Root AGENTS template:** each installable preset (`cursor|claude` × `next|ios-swift|go`) must ship `REPO_AGENTS.md` when validating preset packaging → **FAIL** if missing.
52
+ 10. **Hooks cookbook:** default `hooks.json` must **not** reference `hooks/examples/` → **FAIL** if it does.
53
+ 11. **No react-performance on ios/go:** skill directory / required handoff must be absent under ios-swift and go → **FAIL** (leakage). Prefer `check:preset-leakage`.
54
+ 12. **Rule eval (WARN):** `scripts/check-rule-eval.mjs` / `yarn check:rule-eval` should exist for maintainers; smoke optional. Hard fail only when the opt-in eval job runs — not part of default `check:preset-structure`.
40
55
 
41
56
  ## Output
42
57
 
@@ -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.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: codebase-analyzer
3
+ description: Explains HOW existing iOS Swift/SwiftUI code works as-is. Use when the user asks how something works, to trace Feature layers, or document architecture — without suggesting changes. Prefer over /task for pure questions.
4
+ readonly: false
5
+ model: fast
6
+ ---
7
+
8
+ You are a specialist at understanding HOW this iOS codebase works. Document implementation details with precise `path:line` references.
9
+
10
+ ## CRITICAL — explain as-is only
11
+
12
+ - DO NOT suggest improvements, refactors, or "better approaches" unless the user explicitly asks.
13
+ - DO NOT perform root-cause analysis or bug hunts unless asked.
14
+ - DO NOT critique quality, performance, or security unless asked.
15
+ - ONLY describe what exists, how it works, and how components interact.
16
+
17
+ ## Workflow
18
+
19
+ 1. Start from entry points the user named (Feature folders, Views, ViewModels, Domain, Data).
20
+ 2. Trace Presentation → Domain → Data and composition root in `App/` as applicable.
21
+ 3. Summarize: purpose, flow, module/public API boundaries, conventions observed.
22
+ 4. End with open questions only if facts are missing — not with a wishlist of changes.
23
+
24
+ ## Will / Will not
25
+
26
+ **Will:** map files, call chains, Feature layers as they exist today.
27
+
28
+ **Will not:** edit production code; open `/task` pipelines; propose PRs or refactors unprompted; require Next/Playwright gates.
@@ -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.
@@ -20,6 +20,19 @@ You are a senior iOS developer (SwiftUI-first, SPM as in repo) with strict layer
20
20
  - Mark completed WPs in `decomposition.md`.
21
21
  - After Swift edits: **invoke** `post-change-build.mdc` (+ `xcode-tooling.mdc` for commands). If next step is `build-verifier`, scoped build/lint on changed targets is enough.
22
22
 
23
+ ## Zero improvisation
24
+
25
+ - Implement **only** what the brief / AC / current decomposition task require.
26
+ - If requirements are ambiguous, conflicting, or multi-way — **ask** before coding; do not guess extras as "best practices".
27
+ - Forbidden without explicit AC/task: unrelated Keychain/security hardening, extra validation, UI polish, logging, drive-by refactors, new config/env.
28
+ - Boy scout / `design-guidance` improvements stay **within** touched files and must not expand task scope.
29
+
30
+ ## Will / Will not
31
+
32
+ **Will:** follow Feature layer order and reference Features; add required unit tests; run the post-change build gate; update task artifacts.
33
+
34
+ **Will not:** formal code review; invent AC; pull Next/Playwright gates; auto-continue the next WP when the pipeline expects a human gate or handoff.
35
+
23
36
  ## Preset / cross-stack fork (when editing agents, skills, hooks)
24
37
 
25
38
  When copying from `next` into `ios-swift` (or another stack):
@@ -33,3 +46,7 @@ When copying from `next` into `ios-swift` (or another stack):
33
46
  ## On completion
34
47
 
35
48
  `status.json`: `currentAgent: feature-developer`, `state: completed`. Handoff by layer + gaps for verifier/reviewer. No formal code review.
49
+
50
+ ## Design guidance
51
+
52
+ - 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.
@@ -42,7 +42,7 @@ Slash-команды копируются в `.cursor/commands/` при `ai-rule
42
42
 
43
43
  ## Связанные файлы
44
44
 
45
- - Subagents: `../agents/` (21 ролей, включая `task-router.md` и `xcuitest-test-{planner,generator,healer}`)
45
+ - Subagents: `../agents/` (22 ролей, включая `task-router.md`, `codebase-analyzer.md`, и `xcuitest-test-{planner,generator,healer}`)
46
46
  - Оркестратор: `../rules/agent-team-orchestrator.mdc`
47
47
  - Skills: `../skills/` (`feature-delivery`, `code-review`, `debug-investigation`, `ci-investigation`, `unit-testing`, `xcuitest-e2e`, `technical-retro`)
48
48
  - Артефакты: `../team/README.md` (`pipeline.json`, `status.json`)
@@ -6,3 +6,7 @@
6
6
  | `chain-team-phases.sh` | Auto-chain pipeline steps on `subagentStop` |
7
7
 
8
8
  See root `hooks.json` for registration (`beforeShellExecution`, `subagentStop`).
9
+
10
+ ## Optional cookbook
11
+
12
+ See `hooks/examples/README.md` — secret-guard / format-edited / test-on-save. **Not** in default `hooks.json`.
@@ -0,0 +1,18 @@
1
+ # Hooks cookbook (examples)
2
+
3
+ Optional scripts under `hooks/examples/`. **Not** referenced from default `hooks.json` (only `guard-shell-command.sh` + `chain-team-phases.sh`).
4
+
5
+ | Script | Purpose |
6
+ |--------|---------|
7
+ | `secret-guard.example.sh` | Fail if staged diff looks like secrets |
8
+ | `format-edited.example.sh` | Stack formatter / linter on edited files |
9
+ | `test-on-save.example.sh` | Scoped tests for the stack |
10
+
11
+ ## Wiring (Cursor)
12
+
13
+ 1. Copy an example into `hooks/` (drop `.example` suffix), e.g. `cp hooks/examples/secret-guard.example.sh hooks/secret-guard.sh`.
14
+ 2. `chmod +x hooks/secret-guard.sh`.
15
+ 3. Add a hook entry in `.cursor/hooks.json` (e.g. `beforeShellExecution` or `afterFileEdit` — see Cursor hooks docs).
16
+ 4. Keep cookbook scripts **out** of the default preset `hooks.json` when contributing back upstream.
17
+
18
+ Stack: **ios-swift** — recipes must stay stack-safe (no cross-stack lint/test commands).
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env bash
2
+ # Optional: SwiftFormat / SwiftLint on edited .swift files.
3
+ # NOT in default hooks.json.
4
+ set -euo pipefail
5
+ if command -v swiftformat >/dev/null 2>&1; then
6
+ git diff --name-only --diff-filter=ACMR HEAD 2>/dev/null | grep '\.swift$' | while read -r f; do
7
+ [[ -f "$f" ]] && swiftformat "$f" || true
8
+ done
9
+ fi
10
+ if command -v swiftlint >/dev/null 2>&1; then
11
+ swiftlint lint --quiet 2>/dev/null || true
12
+ fi
13
+ exit 0
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ # Optional cookbook: block committing likely secrets in staged diffs.
3
+ # NOT wired in default hooks.json — copy to hooks/ and register manually.
4
+ set -euo pipefail
5
+ PATTERN='(AKIA[0-9A-Z]{16}|-----BEGIN (RSA |OPENSSH )?PRIVATE KEY-----|api[_-]?key\s*[:=]\s*['\''\"][^'\''\"]{12,})'
6
+ if git diff --cached -U0 2>/dev/null | grep -Eiq "$PATTERN"; then
7
+ echo "secret-guard: possible secret in staged diff — review before commit" >&2
8
+ exit 1
9
+ fi
10
+ exit 0
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ # Optional: xcodebuild test slice for the active scheme (adjust SCHEME/DEST).
3
+ # NOT in default hooks.json. No Playwright / yarn lint.
4
+ set -euo pipefail
5
+ SCHEME="${XCODE_SCHEME:-App}"
6
+ DEST="${XCODE_DESTINATION:-platform=iOS Simulator,name=iPhone 16}"
7
+ xcodebuild test -scheme "$SCHEME" -destination "$DEST" -quiet 2>/dev/null || true
8
+ exit 0
@@ -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,14 +3,14 @@ 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:
9
11
 
10
12
  1. Prefer **`/task <their request>`** or invoke **task-router** first.
11
13
  2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
12
- 3. Pure questions («как работает X», «объясни») — answer normally, no `/task`.
14
+ 3. Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/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.
@@ -88,6 +94,6 @@ Honor optional `steps[i].model` (`cheap` \| `standard` \| `strong`); else agent
88
94
 
89
95
  ## Skip pipeline when
90
96
 
91
- - Pure questions; typo / one-file trivial fix; user «без pipeline»; single-line docs-only.
97
+ - Pure questions («как работает X») — prefer **`codebase-analyzer`**; typo / one-file trivial fix; user «без pipeline»; single-line docs-only.
92
98
 
93
99
  Borderline — **`agent-team-intake.mdc`**.