@bonesofspring/ai-rules 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/CHANGELOG.md +22 -5
  2. package/README.md +13 -1
  3. package/bin/cli.js +2 -0
  4. package/package.json +8 -1
  5. package/presets/_shared/README.md +47 -0
  6. package/presets/_shared/core/agent-team/agent-team-intake.md +9 -0
  7. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +142 -0
  8. package/presets/_shared/core/architecture/feature-delivery-workflow.md +46 -0
  9. package/presets/_shared/core/architecture/reference-features.template.md +31 -0
  10. package/presets/_shared/core/meta/preset-layering.md +25 -0
  11. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +43 -0
  12. package/presets/_shared/core/meta/preset-pr-checklist.md +28 -0
  13. package/presets/_shared/core/meta/preset-token-budget.md +30 -0
  14. package/presets/_shared/core/meta/preset-twin-sync.md +31 -0
  15. package/presets/_shared/core/quality/code-quality-and-refactoring.md +58 -0
  16. package/presets/_shared/core/quality/design-guidance.md +97 -0
  17. package/presets/_shared/core/review/code-review-mr.md +29 -0
  18. package/presets/_shared/core/review/technical-retro.md +7 -0
  19. package/presets/claude/go/CLAUDE.md +10 -0
  20. package/presets/claude/go/MCP.md +16 -0
  21. package/presets/claude/go/README.md +34 -0
  22. package/presets/claude/go/agents/README.md +15 -0
  23. package/presets/claude/go/agents/api-contract-reviewer.md +23 -0
  24. package/presets/claude/go/agents/build-verifier.md +30 -0
  25. package/presets/claude/go/agents/ci-investigator.md +17 -0
  26. package/presets/claude/go/agents/code-reviewer.md +40 -0
  27. package/presets/claude/go/agents/debugger.md +25 -0
  28. package/presets/claude/go/agents/feature-developer.md +30 -0
  29. package/presets/claude/go/agents/integration-test-generator.md +22 -0
  30. package/presets/claude/go/agents/integration-test-healer.md +22 -0
  31. package/presets/claude/go/agents/integration-test-planner.md +22 -0
  32. package/presets/claude/go/agents/migration-specialist.md +31 -0
  33. package/presets/claude/go/agents/performance-auditor.md +22 -0
  34. package/presets/claude/go/agents/qa-tester.md +24 -0
  35. package/presets/claude/go/agents/security-reviewer.md +20 -0
  36. package/presets/claude/go/agents/solution-architect.md +28 -0
  37. package/presets/claude/go/agents/task-analyst.md +25 -0
  38. package/presets/claude/go/agents/task-router.md +69 -0
  39. package/presets/claude/go/agents/tech-writer.md +15 -0
  40. package/presets/claude/go/agents/unit-test-generator.md +21 -0
  41. package/presets/claude/go/agents/unit-test-healer.md +13 -0
  42. package/presets/claude/go/agents/unit-test-planner.md +26 -0
  43. package/presets/claude/go/commands/README.md +13 -0
  44. package/presets/claude/go/commands/feature-continue.md +51 -0
  45. package/presets/claude/go/commands/feature-start.md +30 -0
  46. package/presets/claude/go/commands/task-continue.md +49 -0
  47. package/presets/claude/go/commands/task.md +49 -0
  48. package/presets/claude/go/commands/technical-retro.md +58 -0
  49. package/presets/claude/go/hooks/README.md +10 -0
  50. package/presets/claude/go/hooks/chain-team-phases.sh +381 -0
  51. package/presets/claude/go/hooks/guard-shell-command.sh +79 -0
  52. package/presets/claude/go/mcp.json +12 -0
  53. package/presets/claude/go/rules/README.md +60 -0
  54. package/presets/claude/go/rules/api-and-data/README.md +14 -0
  55. package/presets/claude/go/rules/api-and-data/adapters-driven.md +34 -0
  56. package/presets/claude/go/rules/api-and-data/adapters-driving.md +35 -0
  57. package/presets/claude/go/rules/api-and-data/api-grpc.md +27 -0
  58. package/presets/claude/go/rules/api-and-data/api-http.md +26 -0
  59. package/presets/claude/go/rules/api-and-data/messaging-adapters.md +21 -0
  60. package/presets/claude/go/rules/api-and-data/persistence-adapters.md +28 -0
  61. package/presets/claude/go/rules/architecture/README.md +16 -0
  62. package/presets/claude/go/rules/architecture/application-usecases.md +29 -0
  63. package/presets/claude/go/rules/architecture/boundaries.md +29 -0
  64. package/presets/claude/go/rules/architecture/composition-root.md +28 -0
  65. package/presets/claude/go/rules/architecture/domain-layer.md +32 -0
  66. package/presets/claude/go/rules/architecture/feature-delivery.md +51 -0
  67. package/presets/claude/go/rules/architecture/module-public-api.md +23 -0
  68. package/presets/claude/go/rules/architecture/ports-interfaces.md +34 -0
  69. package/presets/claude/go/rules/architecture/reference-features.md +30 -0
  70. package/presets/claude/go/rules/stack/README.md +10 -0
  71. package/presets/claude/go/rules/stack/go-app-core.md +31 -0
  72. package/presets/claude/go/rules/stack/go-conventions.md +24 -0
  73. package/presets/claude/go/rules/testing/README.md +11 -0
  74. package/presets/claude/go/rules/testing/e2e.md +18 -0
  75. package/presets/claude/go/rules/testing/integration.md +23 -0
  76. package/presets/claude/go/rules/testing/unit.md +24 -0
  77. package/presets/claude/go/rules/tooling-and-review/README.md +21 -0
  78. package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +25 -0
  79. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +161 -0
  80. package/presets/claude/go/rules/tooling-and-review/code-quality.md +72 -0
  81. package/presets/claude/go/rules/tooling-and-review/code-review.md +48 -0
  82. package/presets/claude/go/rules/tooling-and-review/design-guidance.md +110 -0
  83. package/presets/claude/go/rules/tooling-and-review/go-tooling.md +38 -0
  84. package/presets/claude/go/rules/tooling-and-review/post-change-test.md +32 -0
  85. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +36 -0
  86. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +58 -0
  87. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  88. package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +41 -0
  89. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +42 -0
  90. package/presets/claude/go/rules/tooling-and-review/security-go.md +22 -0
  91. package/presets/claude/go/rules/tooling-and-review/technical-retro.md +19 -0
  92. package/presets/claude/go/rules/ui-and-accessibility/README.md +3 -0
  93. package/presets/claude/go/skills/README.md +5 -0
  94. package/presets/claude/go/skills/ci-investigation/SKILL.md +11 -0
  95. package/presets/claude/go/skills/code-review/SKILL.md +16 -0
  96. package/presets/claude/go/skills/debug-investigation/SKILL.md +15 -0
  97. package/presets/claude/go/skills/feature-delivery/SKILL.md +26 -0
  98. package/presets/claude/go/skills/integration-testing/SKILL.md +15 -0
  99. package/presets/claude/go/skills/technical-retro/SKILL.md +10 -0
  100. package/presets/claude/go/skills/unit-testing/SKILL.md +14 -0
  101. package/presets/claude/go/team/README.md +27 -0
  102. package/presets/claude/go/team/fixtures/bugfix-standard.json +37 -0
  103. package/presets/claude/go/team/fixtures/feature-full.json +43 -0
  104. package/presets/claude/go/team/fixtures/feature-light.json +17 -0
  105. package/presets/claude/ios-swift/README.md +7 -0
  106. package/presets/claude/ios-swift/agents/build-verifier.md +17 -8
  107. package/presets/claude/ios-swift/agents/code-reviewer.md +4 -0
  108. package/presets/claude/ios-swift/agents/debugger.md +4 -0
  109. package/presets/claude/ios-swift/agents/feature-developer.md +4 -0
  110. package/presets/claude/ios-swift/agents/migration-specialist.md +4 -0
  111. package/presets/claude/ios-swift/agents/performance-auditor.md +4 -0
  112. package/presets/claude/ios-swift/agents/qa-tester.md +4 -0
  113. package/presets/claude/ios-swift/agents/solution-architect.md +4 -0
  114. package/presets/claude/ios-swift/agents/task-analyst.md +4 -0
  115. package/presets/claude/ios-swift/agents/unit-test-generator.md +4 -0
  116. package/presets/claude/ios-swift/agents/unit-test-healer.md +4 -0
  117. package/presets/claude/ios-swift/agents/unit-test-planner.md +4 -0
  118. package/presets/claude/ios-swift/rules/README.md +24 -2
  119. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +5 -0
  120. package/presets/claude/ios-swift/rules/architecture/reference-features.md +5 -0
  121. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +2 -2
  122. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +7 -0
  123. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +53 -20
  124. package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +29 -35
  125. package/presets/claude/ios-swift/rules/tooling-and-review/design-guidance.md +110 -0
  126. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +36 -0
  127. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +54 -0
  128. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  129. package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +41 -0
  130. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +42 -0
  131. package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +5 -3
  132. package/presets/claude/ios-swift/skills/code-review/SKILL.md +4 -0
  133. package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +4 -0
  134. package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +4 -0
  135. package/presets/claude/next/README.md +9 -1
  136. package/presets/claude/next/agents/build-verifier.md +24 -0
  137. package/presets/claude/next/agents/code-reviewer.md +4 -0
  138. package/presets/claude/next/agents/debugger.md +4 -0
  139. package/presets/claude/next/agents/feature-developer.md +4 -0
  140. package/presets/claude/next/agents/migration-specialist.md +4 -0
  141. package/presets/claude/next/agents/performance-auditor.md +4 -0
  142. package/presets/claude/next/agents/qa-tester.md +4 -0
  143. package/presets/claude/next/agents/solution-architect.md +4 -0
  144. package/presets/claude/next/agents/task-analyst.md +4 -0
  145. package/presets/claude/next/agents/unit-test-generator.md +4 -0
  146. package/presets/claude/next/agents/unit-test-healer.md +4 -0
  147. package/presets/claude/next/agents/unit-test-planner.md +4 -0
  148. package/presets/claude/next/rules/README.md +74 -21
  149. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +5 -0
  150. package/presets/claude/next/rules/architecture/reference-features.md +5 -0
  151. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +2 -0
  152. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +7 -0
  153. package/presets/claude/next/rules/tooling-and-review/code-quality.md +48 -20
  154. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +17 -8
  155. package/presets/claude/next/rules/tooling-and-review/design-guidance.md +110 -0
  156. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +36 -0
  157. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +54 -0
  158. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  159. package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +41 -0
  160. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +42 -0
  161. package/presets/claude/next/rules/tooling-and-review/technical-retro.md +16 -0
  162. package/presets/claude/next/skills/code-review/SKILL.md +4 -0
  163. package/presets/claude/next/skills/debug-investigation/SKILL.md +4 -0
  164. package/presets/claude/next/skills/feature-delivery/SKILL.md +4 -0
  165. package/presets/cursor/go/AGENTS.md +24 -0
  166. package/presets/cursor/go/BUGBOT.md +9 -0
  167. package/presets/cursor/go/MCP.md +16 -0
  168. package/presets/cursor/go/README.md +38 -0
  169. package/presets/cursor/go/agents/README.md +15 -0
  170. package/presets/cursor/go/agents/api-contract-reviewer.md +23 -0
  171. package/presets/cursor/go/agents/build-verifier.md +30 -0
  172. package/presets/cursor/go/agents/ci-investigator.md +17 -0
  173. package/presets/cursor/go/agents/code-reviewer.md +40 -0
  174. package/presets/cursor/go/agents/debugger.md +25 -0
  175. package/presets/cursor/go/agents/feature-developer.md +30 -0
  176. package/presets/cursor/go/agents/integration-test-generator.md +22 -0
  177. package/presets/cursor/go/agents/integration-test-healer.md +22 -0
  178. package/presets/cursor/go/agents/integration-test-planner.md +22 -0
  179. package/presets/cursor/go/agents/migration-specialist.md +31 -0
  180. package/presets/cursor/go/agents/performance-auditor.md +22 -0
  181. package/presets/cursor/go/agents/qa-tester.md +24 -0
  182. package/presets/cursor/go/agents/security-reviewer.md +20 -0
  183. package/presets/cursor/go/agents/solution-architect.md +28 -0
  184. package/presets/cursor/go/agents/task-analyst.md +25 -0
  185. package/presets/cursor/go/agents/task-router.md +69 -0
  186. package/presets/cursor/go/agents/tech-writer.md +15 -0
  187. package/presets/cursor/go/agents/unit-test-generator.md +21 -0
  188. package/presets/cursor/go/agents/unit-test-healer.md +13 -0
  189. package/presets/cursor/go/agents/unit-test-planner.md +26 -0
  190. package/presets/cursor/go/commands/README.md +54 -0
  191. package/presets/cursor/go/commands/feature-continue.md +19 -0
  192. package/presets/cursor/go/commands/feature-start.md +33 -0
  193. package/presets/cursor/go/commands/task-continue.md +49 -0
  194. package/presets/cursor/go/commands/task.md +49 -0
  195. package/presets/cursor/go/commands/technical-retro.md +81 -0
  196. package/presets/cursor/go/hooks/README.md +8 -0
  197. package/presets/cursor/go/hooks/chain-team-phases.sh +381 -0
  198. package/presets/cursor/go/hooks/guard-shell-command.sh +79 -0
  199. package/presets/cursor/go/hooks.json +17 -0
  200. package/presets/cursor/go/mcp.json +11 -0
  201. package/presets/cursor/go/rules/README.md +89 -0
  202. package/presets/cursor/go/rules/adapters-driven.mdc +35 -0
  203. package/presets/cursor/go/rules/adapters-driving.mdc +36 -0
  204. package/presets/cursor/go/rules/agent-team-intake.mdc +20 -0
  205. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +156 -0
  206. package/presets/cursor/go/rules/api-grpc.mdc +28 -0
  207. package/presets/cursor/go/rules/api-http.mdc +27 -0
  208. package/presets/cursor/go/rules/application-usecases.mdc +30 -0
  209. package/presets/cursor/go/rules/architecture-boundaries.mdc +30 -0
  210. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +73 -0
  211. package/presets/cursor/go/rules/code-review-mr.mdc +43 -0
  212. package/presets/cursor/go/rules/composition-root.mdc +29 -0
  213. package/presets/cursor/go/rules/design-guidance.mdc +111 -0
  214. package/presets/cursor/go/rules/domain-layer.mdc +33 -0
  215. package/presets/cursor/go/rules/feature-delivery-workflow.mdc +46 -0
  216. package/presets/cursor/go/rules/go-app-core.mdc +32 -0
  217. package/presets/cursor/go/rules/go-conventions.mdc +25 -0
  218. package/presets/cursor/go/rules/go-tooling.mdc +33 -0
  219. package/presets/cursor/go/rules/messaging-adapters.mdc +22 -0
  220. package/presets/cursor/go/rules/module-public-api.mdc +24 -0
  221. package/presets/cursor/go/rules/persistence-adapters.mdc +29 -0
  222. package/presets/cursor/go/rules/ports-interfaces.mdc +35 -0
  223. package/presets/cursor/go/rules/post-change-test.mdc +27 -0
  224. package/presets/cursor/go/rules/preset-layering.mdc +36 -0
  225. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +58 -0
  226. package/presets/cursor/go/rules/preset-pr-checklist.mdc +39 -0
  227. package/presets/cursor/go/rules/preset-token-budget.mdc +41 -0
  228. package/presets/cursor/go/rules/preset-twin-sync.mdc +42 -0
  229. package/presets/cursor/go/rules/reference-features.mdc +31 -0
  230. package/presets/cursor/go/rules/security-go.mdc +23 -0
  231. package/presets/cursor/go/rules/technical-retro.mdc +14 -0
  232. package/presets/cursor/go/rules/tests-e2e.mdc +19 -0
  233. package/presets/cursor/go/rules/tests-integration.mdc +24 -0
  234. package/presets/cursor/go/rules/tests-unit.mdc +25 -0
  235. package/presets/cursor/go/skills/README.md +5 -0
  236. package/presets/cursor/go/skills/ci-investigation/SKILL.md +11 -0
  237. package/presets/cursor/go/skills/code-review/SKILL.md +16 -0
  238. package/presets/cursor/go/skills/debug-investigation/SKILL.md +15 -0
  239. package/presets/cursor/go/skills/feature-delivery/SKILL.md +26 -0
  240. package/presets/cursor/go/skills/integration-testing/SKILL.md +15 -0
  241. package/presets/cursor/go/skills/technical-retro/SKILL.md +10 -0
  242. package/presets/cursor/go/skills/unit-testing/SKILL.md +14 -0
  243. package/presets/cursor/go/team/README.md +31 -0
  244. package/presets/cursor/go/team/fixtures/bugfix-standard.json +37 -0
  245. package/presets/cursor/go/team/fixtures/feature-full.json +43 -0
  246. package/presets/cursor/go/team/fixtures/feature-light.json +17 -0
  247. package/presets/cursor/ios-swift/README.md +7 -0
  248. package/presets/cursor/ios-swift/agents/build-verifier.md +17 -8
  249. package/presets/cursor/ios-swift/agents/code-reviewer.md +4 -0
  250. package/presets/cursor/ios-swift/agents/debugger.md +4 -0
  251. package/presets/cursor/ios-swift/agents/feature-developer.md +4 -0
  252. package/presets/cursor/ios-swift/agents/migration-specialist.md +4 -0
  253. package/presets/cursor/ios-swift/agents/performance-auditor.md +4 -0
  254. package/presets/cursor/ios-swift/agents/qa-tester.md +4 -0
  255. package/presets/cursor/ios-swift/agents/solution-architect.md +4 -0
  256. package/presets/cursor/ios-swift/agents/task-analyst.md +4 -0
  257. package/presets/cursor/ios-swift/agents/unit-test-generator.md +4 -0
  258. package/presets/cursor/ios-swift/agents/unit-test-healer.md +4 -0
  259. package/presets/cursor/ios-swift/agents/unit-test-planner.md +4 -0
  260. package/presets/cursor/ios-swift/rules/README.md +23 -2
  261. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +2 -2
  262. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +8 -2
  263. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +53 -20
  264. package/presets/cursor/ios-swift/rules/code-review-mr.mdc +32 -0
  265. package/presets/cursor/ios-swift/rules/design-guidance.mdc +111 -0
  266. package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +6 -0
  267. package/presets/cursor/ios-swift/rules/preset-layering.mdc +36 -0
  268. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +54 -0
  269. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +39 -0
  270. package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +41 -0
  271. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +42 -0
  272. package/presets/cursor/ios-swift/rules/reference-features.mdc +6 -0
  273. package/presets/cursor/ios-swift/rules/technical-retro.mdc +4 -2
  274. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +4 -0
  275. package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +4 -0
  276. package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +4 -0
  277. package/presets/cursor/next/README.md +46 -0
  278. package/presets/cursor/next/agents/build-verifier.md +24 -0
  279. package/presets/cursor/next/agents/code-reviewer.md +4 -0
  280. package/presets/cursor/next/agents/debugger.md +4 -0
  281. package/presets/cursor/next/agents/feature-developer.md +4 -0
  282. package/presets/cursor/next/agents/migration-specialist.md +4 -0
  283. package/presets/cursor/next/agents/performance-auditor.md +4 -0
  284. package/presets/cursor/next/agents/qa-tester.md +4 -0
  285. package/presets/cursor/next/agents/solution-architect.md +4 -0
  286. package/presets/cursor/next/agents/task-analyst.md +4 -0
  287. package/presets/cursor/next/agents/unit-test-generator.md +4 -0
  288. package/presets/cursor/next/agents/unit-test-healer.md +4 -0
  289. package/presets/cursor/next/agents/unit-test-planner.md +4 -0
  290. package/presets/cursor/next/commands/README.md +1 -1
  291. package/presets/cursor/next/rules/README.md +21 -1
  292. package/presets/cursor/next/rules/agent-team-intake.mdc +2 -0
  293. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +8 -2
  294. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +45 -18
  295. package/presets/cursor/next/rules/code-review-mr.mdc +32 -0
  296. package/presets/cursor/next/rules/design-guidance.mdc +111 -0
  297. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +6 -0
  298. package/presets/cursor/next/rules/preset-layering.mdc +36 -0
  299. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +54 -0
  300. package/presets/cursor/next/rules/preset-pr-checklist.mdc +39 -0
  301. package/presets/cursor/next/rules/preset-token-budget.mdc +41 -0
  302. package/presets/cursor/next/rules/preset-twin-sync.mdc +42 -0
  303. package/presets/cursor/next/rules/reference-features.mdc +6 -0
  304. package/presets/cursor/next/rules/technical-retro.mdc +5 -3
  305. package/presets/cursor/next/skills/code-review/SKILL.md +4 -0
  306. package/presets/cursor/next/skills/debug-investigation/SKILL.md +4 -0
  307. package/presets/cursor/next/skills/feature-delivery/SKILL.md +4 -0
@@ -0,0 +1,161 @@
1
+ ---
2
+ description: Orchestrates the agent team via task-router and pipeline.json for Go presets
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - **/*.go
7
+ - internal/**/*
8
+ - cmd/**/*
9
+ ---
10
+
11
+ <!-- shared-core: agent-team/agent-team-orchestrator.md -->
12
+
13
+ # Agent team orchestrator
14
+
15
+ Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.cursor/team/tasks/<slug>/` (Claude: `.claude/team/tasks/<slug>/`).
16
+
17
+ Work request без `/task` — см. **agent-team-intake** (когда предлагать router вместо прямого кодинга).
18
+
19
+ ## Entry points
20
+
21
+ | Command | When |
22
+ |---------|------|
23
+ | **`/task <desc>`** | **Preferred** — router → dynamic pipeline → first agent |
24
+ | `/task-continue <slug>` | After human gate or pause |
25
+ | `/feature-start <desc>` | Legacy: analyst-only start (no router) |
26
+ | `/feature-continue <slug>` | Alias of task-continue |
27
+ | `/technical-retro [slug]` | Retro with agent team block |
28
+
29
+ ## Roles (shared catalog)
30
+
31
+ Roster of specialists is **stack-specific** (agent names and write scopes differ). See **Stack notes** in the stack adapter for the live Roles table. Common patterns:
32
+
33
+ | Kind | Examples (names vary by stack) |
34
+ |------|--------------------------------|
35
+ | Planning | `task-router`, `task-analyst`, `solution-architect`, `migration-specialist` |
36
+ | Implementation | `feature-developer`, `debugger`, `ci-investigator` |
37
+ | Gates / review | `build-verifier`, `code-reviewer`, `security-reviewer`, `performance-auditor` (no `accessibility-reviewer`) |
38
+ | Tests | unit planner/generator/healer; e2e/UI planner/generator/healer (stack-native) |
39
+ | Docs | `tech-writer` |
40
+
41
+ **Cursor frontmatter:** all team pipeline agents use `readonly: false` so they can write team artifacts. Production/app restrictions live in the agent prompt body — do **not** set `readonly: true`.
42
+
43
+ Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`.
44
+
45
+ ## Dynamic pipeline
46
+
47
+ ```mermaid
48
+ flowchart TD
49
+ task["/task prompt"]
50
+ router["task-router"]
51
+ pipeline["pipeline.json"]
52
+ step0["steps 0..N"]
53
+ gate{"humanGates?"}
54
+ hook["subagentStop hook"]
55
+ retro["/technical-retro"]
56
+
57
+ task --> router
58
+ router --> pipeline
59
+ pipeline --> step0
60
+ step0 --> gate
61
+ gate -->|"/task-continue"| step0
62
+ step0 --> hook
63
+ hook --> step0
64
+ step0 --> retro
65
+ ```
66
+
67
+ **Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
68
+
69
+ ## status.json (pipeline mode)
70
+
71
+ ```json
72
+ {
73
+ "slug": "...",
74
+ "intent": "feature",
75
+ "pipelineIndex": 0,
76
+ "currentAgent": "task-analyst",
77
+ "phase": "executing",
78
+ "state": "in_progress",
79
+ "awaitingHumanGate": false
80
+ }
81
+ ```
82
+
83
+ | state | Meaning |
84
+ |-------|---------|
85
+ | `in_progress` | Current step running |
86
+ | `completed` | Current step done; hook advances |
87
+ | `awaiting_approval` | Human gate; wait for `/task-continue` |
88
+ | `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
89
+ | `validation_failed` | build-verifier failed; re-run developer then build-verifier |
90
+
91
+ ## Pipeline step options
92
+
93
+ | Field | Use |
94
+ |-------|-----|
95
+ | `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
96
+ | `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
97
+ | `scope` | e.g. `unit-in-dev`, `e2e-only`, `preset-artifacts-only` — passed to developer/qa |
98
+ | `model` | `cheap` \| `standard` \| `strong` — optional tier override |
99
+
100
+ ## Rules (strict)
101
+
102
+ 1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline).
103
+ 2. Read `pipeline.json` before every subagent invocation.
104
+ 3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
105
+ 4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
106
+ 5. Persist handoffs to disk (`brief.md`, `decomposition.md`, `debug-report.md`, `validation-report.md`, `architecture.md`, `migration-plan.md`, `ci-report.md`, `a11y-review.md`, `perf-report.md`, `security-review.md`, `api-contract-review.md`, `unit-test-plan.md`, `documentation.md`, `review.md`).
107
+ 6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
108
+ 7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
109
+ 8. When all steps complete, suggest `/technical-retro <slug>`.
110
+ 9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
111
+
112
+ ## Team artifact I/O (Cursor Shell sandbox)
113
+
114
+ - Create/update team task dirs with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC).
115
+ - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
116
+ - Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
117
+
118
+ ## Invoking agents
119
+
120
+ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
121
+
122
+ ### Model when invoking (Task)
123
+
124
+ 1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
125
+ 2. Map abstract tiers:
126
+ - **`cheap`** → pass Task `model: "fast"` when the tool accepts it (or rely on agent `fast`).
127
+ - **`standard`** → omit Task `model` (frontmatter `inherit` / mid default).
128
+ - **`strong`** → **never** pass `fast`; rely on agent pin or parent Max model.
129
+ 3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
130
+
131
+ After each agent completes, ensure `status.json` has `state: completed` (or `awaiting_approval` if gate applies).
132
+
133
+ ## Legacy mode
134
+
135
+ If `pipeline.json` is missing (old `/feature-start` tasks), fall back to fixed phases: analysis → development → review → testing. Hook supports both.
136
+
137
+ ## Skip pipeline when
138
+
139
+ Do **not** run `/task` + router for:
140
+
141
+ - Pure questions («как работает X», «объясни»).
142
+ - Typo / one-file fix / trivial config with no architecture risk.
143
+ - User explicitly says «без pipeline», «просто сделай», or continues an active slug.
144
+ - Single-line `docs-only` with no code impact.
145
+
146
+ Borderline work requests — см. **agent-team-intake**.
147
+
148
+ ## Auto-detection (optional)
149
+
150
+ When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
151
+
152
+ ## Preset authoring
153
+
154
+ When the work edits `packages/ai-rules/presets/**` (or dogfood `.cursor/` sync of presets), follow meta-rules: **preset-pr-checklist**, **preset-twin-sync**, **preset-layering**, **preset-token-budget**, **preset-no-cross-stack-leakage**.
155
+
156
+ ## Stack notes
157
+
158
+ - Scope: Go hexagonal modules (`internal/`, `cmd/`) — not Next `app/src` or iOS `Features/`.
159
+ - **No `accessibility-reviewer`** agent (no UI surface) — do not schedule it; `task-router` bans it. Gates: `build-verifier`, `code-reviewer`, `security-reviewer`, `performance-auditor`.
160
+ - E2E/integration intents use **`integration-test-*`** agents — never Playwright or XCUITest.
161
+ - After Go code changes, pipeline includes **build-verifier** with `go test` / `post-change-test`.
@@ -0,0 +1,72 @@
1
+ ---
2
+ description: Code quality and light refactoring for Go hexagonal services
3
+ ---
4
+
5
+ <!-- shared-core: quality/code-quality-and-refactoring.md -->
6
+
7
+ # Поддержка существующего стиля
8
+
9
+ - Новые изменения должны:
10
+ - следовать существующим паттернам (имена, структура, типизация / DI / error handling стека);
11
+ - минимизировать «стилистический шум» (лишние правки форматирования, rename без нужды).
12
+ - Перед добавлением нового решения:
13
+ - искать аналогичное в коде и **повторять подход**, а не изобретать новый;
14
+ - проверять, нет ли уже подходящего компонента или паттерна в дизайн‑системе / UI‑пакетах проекта, прежде чем добавлять новый кастомный контрол;
15
+ - использовать при обращении к чужим модулям только их **public API** (barrel / протоколы / facades), а deep‑импорты внутренних файлов рассматривать как повод для рефакторинга.
16
+
17
+ # Принципы
18
+
19
+ - **KISS:** выбирать самое простое изменение, которое совпадает с паттернами репозитория; не изобретать новый стиль «с нуля».
20
+ - **DRY + Rule of Three:** устранять дублирование логики; выносить общее **только после 3-го** повторения — ошибочная абстракция дороже дублирования.
21
+ - **YAGNI:** не добавлять API, флаги, слои и обобщения «на будущее» без текущего требования.
22
+ - **SOLID** (agent-actionable, не эссе):
23
+ - **S** — один модуль / один повод менять; дробить god-файлы в рамках лёгкого refactor.
24
+ - **O** — расширять через композицию/новые реализации, не раздувая существующие ветки «на всякий случай».
25
+ - **L** — подтип не ломает контракт базового типа/протокола.
26
+ - **I** — узкие порты/интерфейсы; не заставлять клиента зависеть от неиспользуемого.
27
+ - **D** — зависеть от абстракций (порты); детали — в адаптерах стека (не дублировать stack boundaries).
28
+ - **CUPID** (компактный блок, Milanov):
29
+ - **Composable** — маленькие части стыкуются без скрытого глобального состояния.
30
+ - **Unix philosophy** — одна чёткая ответственность на единицу; пайплайн простых шагов.
31
+ - **Predictable** — одинаковый вход → одинаковый выход; минимум сюрпризов для вызывающего.
32
+ - **Idiomatic** — следовать идиомам языка и **существующим** конвенциям репо.
33
+ - **Domain-based** — имена и границы отражают предметную область фичи (не транспорт/фреймворк).
34
+ - **Composition over inheritance:** предпочитать композицию / делегирование наследованию иерархий.
35
+ - **Law of Demeter (hint):** не строить цепочки `a.b.c.d`; ходить через public API / facade модуля.
36
+
37
+ # Рефакторинг при изменениях
38
+
39
+ - Разрешён лёгкий refactor, если он:
40
+ - уменьшает дублирование;
41
+ - повышает читаемость;
42
+ - не ломает публичные контракты модулей.
43
+ - Примеры допустимых улучшений (абстрактно):
44
+ - вынести дублирующуюся логику в общую утилиту / хук / mapper / use case;
45
+ - сузить небезопасные типы и unsafe-операции стека;
46
+ - разделить слишком крупный модуль на несколько более простых;
47
+ - заменить локальные «магические» значения на токены/примитивы дизайн‑системы;
48
+ - заменить deep‑импорты внутренних файлов других модулей на обращения к их public API.
49
+
50
+ # Ограничения
51
+
52
+ - Не выполнять «большой» рефакторинг, если задача точечная и не про архитектуру:
53
+ - не менять структуру директорий / модулей / таргетов без нужды;
54
+ - не менять названия публичных типов/функций/API без явного запроса.
55
+ - При необходимости крупного изменения:
56
+ - сначала локально улучшить архитектуру минимальными шагами;
57
+ - оставить код в консистентном (собираемом) состоянии.
58
+
59
+ # Требование к агенту
60
+
61
+ - **Boy scout rule:** оставлять модуль немного лучше, чем до изменения (простые, безопасные улучшения).
62
+ - Не жертвовать архитектурой и слоями ради краткости реализации.
63
+
64
+ > Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
65
+
66
+ ## Stack notes
67
+
68
+ - **No UI layer in this preset** — ignore shared-core bullets about дизайн‑система / UI‑пакеты / CSS‑токены; apply public-API and boy-scout rules to Go packages/ports instead.
69
+ - Public API between packages: exported types/funcs in `pkg/` or explicit ports — avoid deep imports of another feature's `internal`.
70
+ - Prefer wrapping errors with `%w`; check with `errors.Is` / `errors.As`.
71
+ - Interfaces belong at **ports** (consumer side), not on every struct.
72
+ - Post-change gate: **`post-change-test.md`** + **`go-tooling.md`** (not yarn lint / xcodebuild).
@@ -0,0 +1,48 @@
1
+ ---
2
+ description: Code review checklist for Go hexagonal merge requests
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - **/*.go
7
+ - internal/**/*
8
+ - cmd/**/*
9
+ ---
10
+
11
+ <!-- shared-core: review/code-review-mr.md -->
12
+
13
+ # Code review merge requests
14
+
15
+ On-demand rule for review flows. **Procedure and output format:** skill `code-review`.
16
+
17
+ ## When to load
18
+
19
+ - User asks for review/MR/diff
20
+ - Pipeline step `code-reviewer`
21
+ - Platform automated review (e.g. BUGBOT) when present
22
+
23
+ ## Checklist references (abstract)
24
+
25
+ - Architecture layers and stack core rules
26
+ - Public imports / module boundaries
27
+ - UI conventions of the stack
28
+ - Unit and e2e/UI test conventions
29
+ - Post-change lint/build gate before final report
30
+ - Design smells **in MR diff scope** — load `design-guidance`; не разворачивать полный каталог Fowler вне диффа
31
+ - Pattern name (GoF) — только если репозиторий уже использует эту форму или match минимален
32
+ - Principles (KISS / DRY+Ro3 / YAGNI / SOLID / CUPID) — через always-on `code-quality-and-refactoring`, не дублировать эссе в review
33
+
34
+ Concrete rule stems — in **Stack notes**.
35
+
36
+ ## Constraints
37
+
38
+ - Focus on MR diff, not the whole repo.
39
+ - Use local `git diff` — do not invent hosting metadata.
40
+ - Boy scout rule: suggest fixes feasible within the MR scope.
41
+ - No «большие рефакторинги» without an explicit request (`code-quality-and-refactoring`).
42
+
43
+ ## Stack notes
44
+
45
+ - Hexagonal boundaries: `architecture-boundaries`, `domain-layer`, ports vs adapters.
46
+ - HTTP/persistence mapping only at edges; composition root has no business logic.
47
+ - Tests: `tests-unit`, `tests-integration`; post-change: `post-change-test` / `go-tooling`.
48
+ - Never require Playwright, XCUITest, `lint:js`, or `xcodebuild` for Go MRs.
@@ -0,0 +1,110 @@
1
+ ---
2
+ description: Design smells (Fowler) and curated GoF patterns for agents. Load when assessing structure, smells, or pattern fit.
3
+ paths:
4
+ - "**/*.go"
5
+ ---
6
+
7
+ <!-- shared-core: quality/design-guidance.md -->
8
+
9
+ # Design guidance (smells & patterns)
10
+
11
+ Словарь **code smells** (Fowler) и **design patterns** (GoF) для агентов при implement / review / debug.
12
+
13
+ Применять только в scope задачи или MR. Лёгкий refactor — да; «большой» rewrite без явного запроса — нет.
14
+
15
+ Называть паттерн **только если** репозиторий уже так делает или это минимальный match. Иначе — extract/split/move без ярлыка GoF.
16
+
17
+ Не заменяет always-on Principles в `code-quality-and-refactoring` (KISS, DRY + Rule of Three, YAGNI, SOLID, CUPID, composition, Demeter).
18
+
19
+ ## When to load
20
+
21
+ - **Feature delivery / implement** — оценка структуры модулей, границ и дублирования.
22
+ - **Code review** — smells и pattern fit **в диффе MR**, не по всему репо.
23
+ - **Debug** — root-cause похож на wrong abstraction, Feature Envy, Message Chains, Shotgun Surgery.
24
+ - **Light refactor only** — улучшения в рамках boy-scout / MR scope; не расширять задачу ради каталога.
25
+
26
+ Агенты и skills подгружают stem по one-liner wiring — не копировать этот каталог в промпт агента.
27
+
28
+ ## How to use (agent rules of thumb)
29
+
30
+ 1. Сначала сверить с Principles (always-on): проще ли решение, нет ли ранней абстракции, соблюдён ли public API.
31
+ 2. Затем отметить smells **в изменённых файлах** задачи/MR; предложить fix только если он укладывается в light refactor.
32
+ 3. Паттерн GoF — опциональный ярлык после того, как структура уже ясна; не начинать дизайн с выбора паттерна.
33
+ 4. Если smell и паттерн конфликтуют с границами слоёв стека — побеждают stack boundaries и existing repo patterns.
34
+ 5. Не требовать переименования «под GoF», если поведение уже корректно и читаемо.
35
+
36
+ ## Code smells (Fowler, curated ≤12)
37
+
38
+ Таблица: smell → detect hint → fix hint (одна линия каждый). Без механических меню рефакторинга.
39
+
40
+ | # | Smell | Detect | Fix hint |
41
+ |---|-------|--------|----------|
42
+ | 1 | Duplicate Code | одинаковая логика в ≥2 местах | dedupe после Rule of Three |
43
+ | 2 | Long Method / Long Module | единица делает слишком много | extract в рамках scope; без big rewrite |
44
+ | 3 | Feature Envy | метод чаще трогает чужие данные, чем свои | сдвинуть логику к данным / public API |
45
+ | 4 | Data Clumps | одни и те же группы аргументов кочуют вместе | сгруппировать в type / value object |
46
+ | 5 | Primitive Obsession | сырые string/int вместо доменных понятий | typed ids / value objects при нужде домена |
47
+ | 6 | Speculative Generality | неиспользуемые хуки, флаги, абстракции «на будущее» | удалить (YAGNI) |
48
+ | 7 | Message Chains | цепочки `a.b.c.d` | Demeter; facade / public API модуля |
49
+ | 8 | Middle Man | класс почти только прокидывает вызовы | убрать pass-through **или** оставить как boundary |
50
+ | 9 | Divergent Change | один модуль меняется по разным причинам | split по поводам изменения |
51
+ | 10 | Shotgun Surgery | одно смысловое изменение разъезжается по многим файлам | consolidate ответственность |
52
+ | 11 | Inappropriate Intimacy | доступ к чужим internals / private деталям | только public API / ports / facades |
53
+ | 12 | Refused Bequest / Parallel Inheritance | подтип игнорирует базу; зеркальные иерархии классов | composition; не плодить параллельные деревья |
54
+
55
+ **Skip Fowler (не в core):** Lazy Class, Incomplete Library Class, Comments-as-smell dogma, полный каталог 70+, пошаговые recipe-меню.
56
+
57
+ Приоритет при конфликте smells: Inappropriate Intimacy и Message Chains (границы модулей) > Duplicate Code (после Rule of Three) > Long Method внутри уже правильного модуля.
58
+
59
+ ## Design patterns (GoF, curated ≤8)
60
+
61
+ Suggest only when repo already uses the shape or the match is minimal. Prefer extract-function over naming Strategy ради ярлыка.
62
+
63
+ Паттерны ниже — **разрешённый минимум** для агентов; остальной GoF по умолчанию в Skip.
64
+
65
+ | Pattern | When to suggest | Anti-trigger |
66
+ |---------|-----------------|--------------|
67
+ | Strategy | взаимозаменяемые алгоритмы уже (или явно скоро) выбираются политикой | один алгоритм без ветвления политики |
68
+ | Adapter | обернуть внешний / чужой API под локальный port | лишняя обёртка вокруг своего же API |
69
+ | Facade | упростить multi-step subsystem за public API | facade превращается в god-object |
70
+ | Factory Method | полиморфное создание уже принято в стиле репо | factory на каждый тривиальный `new` |
71
+ | Decorator | аддитивное поведение без взрыва subclass-иерархий | decorator «для слоёв» без реальной нужды |
72
+ | Observer | events / subscriptions уже есть в архитектуре | самодельный pub/sub без прецедента в репо |
73
+ | Template Method | общий algorithm skeleton + вариативные hooks | наследование ради пары отличающихся строк |
74
+ | Composite | дерево однородных узлов (UI/domain), как уже в репо | Composite на плоский список без иерархии |
75
+
76
+ Если сомневаешься между двумя паттернами — выбери более простой extract/compose без имени; ярлык можно добавить на review, если репо уже так говорит.
77
+
78
+ ## Skip / avoid by default
79
+
80
+ | Catalog | Skip |
81
+ |---------|------|
82
+ | GoF | Singleton, Abstract Factory, Flyweight, Memento, Interpreter, Visitor, Bridge, Prototype |
83
+ | GoF (conditional) | Command, Chain of Responsibility, State — упоминать **только если** репо уже использует |
84
+ | Fowler | всё сверх 12 smells выше |
85
+ | DDD | Aggregates, bounded-context maps, event sourcing, CQRS — **не в core** |
86
+ | DDD (pointer) | ubiquitous language anti-pattern — расширять в `feature-delivery-workflow`, не здесь |
87
+ | GRASP | список Larman как отдельные правила — skip (перекрывается SOLID/CUPID) |
88
+ | Clean Code dogma | жёсткие caps на строки функции / «ровно один assert» — skip |
89
+
90
+ Не вводить второй stem (`refactoring-smells` / `design-patterns-for-agents`) — один каталог: `design-guidance`.
91
+
92
+ ## Out of scope for this stem
93
+
94
+ - Полный GoF (23) и полный Fowler catalog.
95
+ - Stack-specific рецепты (пути модулей, lint-команды) — только в **Stack notes** адаптера.
96
+ - Security, a11y, perf — отдельные review-правила; здесь только структурные smells/patterns.
97
+ - Четвёртое always-on правило — запрещено; этот stem только requestable / agent-load.
98
+
99
+ ## Cross-refs
100
+
101
+ - Always-on Principles: `code-quality-and-refactoring`.
102
+ - DIP / ports vs adapters: stack `architecture-boundaries` (детали стека — в Stack notes адаптеров).
103
+ - Ubiquitous language: `feature-delivery-workflow` (lineage).
104
+ - MR checklist (smells in scope; pattern name only if repo uses it): `code-review-mr`.
105
+ - Token / twin policy for authors: `preset-token-budget`, `preset-twin-sync` (meta, not consumer always-on).
106
+
107
+ ## Stack notes
108
+
109
+ - Strategy via func values / small interfaces at **ports**; adapters implement, domain stays free of frameworks.
110
+ - Suggest Facade at package public API; avoid Singleton in favor of composition root wiring.
@@ -0,0 +1,38 @@
1
+ ---
2
+ description: Go toolchain commands (test, vet, lint, race) — requestable
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - **/*.go
7
+ - internal/**/*
8
+ - cmd/**/*
9
+ ---
10
+
11
+
12
+ # Go tooling (requestable)
13
+
14
+ Before running commands, read **`go.mod`** for module path and Go version.
15
+
16
+ ## Common commands
17
+
18
+ ```bash
19
+ go test ./...
20
+ go vet ./...
21
+ go test ./... -race
22
+ go test ./... -cover
23
+ ```
24
+
25
+ - If the repo has `golangci-lint` or `staticcheck`, use the project’s documented invocation (Makefile/taskfile).
26
+ - Do not invent a lint stack; prefer what CI already runs.
27
+ - Module ops: `go get`, `go mod tidy` only when deps change.
28
+ - Prefer `go test ./path/to/pkg` while iterating; widen to `./...` before handoff.
29
+
30
+ ## Race / cover
31
+
32
+ - Use `-race` for concurrent maps, workers, or shared caches.
33
+ - Coverage is optional unless the task or CI requires a threshold.
34
+
35
+ ## Related
36
+
37
+ - Mandatory after Go edits: **`post-change-test.md`**.
38
+ - Pipeline gate: `build-verifier` (same commands; no yarn lint / xcodebuild).
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: Mandatory verification after Go code edits (go test / vet / lint-if-present)
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - **/*.go
7
+ - internal/**/*
8
+ - cmd/**/*
9
+ ---
10
+
11
+
12
+ # Post-change test (requestable, mandatory after Go edits)
13
+
14
+ After changing `*.go` / `go.mod` in a consumer repo:
15
+
16
+ 1. `go test ./...` (or scoped packages touched).
17
+ 2. `go vet ./...`.
18
+ 3. If present: `golangci-lint run` and/or `staticcheck ./...` per repo docs.
19
+ 4. Optional: `go test ./... -race` for concurrency-sensitive changes (`go-tooling.md`).
20
+
21
+ ## Scope hints
22
+
23
+ - Prefer package-scoped tests while iterating; run `./...` before claiming the task done.
24
+ - If only `*_test.go` helpers changed, still run the package under test.
25
+ - Module/`go.mod` changes: run `go test ./...` after `go mod tidy`.
26
+
27
+ ## Agent requirement
28
+
29
+ - Do not claim completion without running the applicable gate (or noting why CI-only).
30
+ - Pipeline `build-verifier` enforces the same checklist.
31
+ - Record failing command output in the task artifact when the gate fails.
32
+ - Skip only when the change is docs/config with no `*.go` / `go.mod` impact — state that explicitly.
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-layering)
3
+ paths:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ - .claude/**/*
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-layering.md -->
11
+
12
+ # Preset layering
13
+
14
+ Правила для **авторов пресетов** (`packages/ai-rules/presets/**`). Не always-on в consumer apps.
15
+
16
+ ## Слои
17
+
18
+ | Слой | Где | Что класть |
19
+ |------|-----|------------|
20
+ | **Core** | `presets/_shared/core/**` | Stack-agnostic prose + checklists; без frontmatter; без путей `app/**`, `Features/**`, Playwright, xcodebuild |
21
+ | **Stack** | `presets/{cursor\|claude}/<stack>/` | Domain/tooling, always-on trio стека, stack examples в **Stack notes** |
22
+ | **Platform** | Cursor `.mdc` / Claude `.md` | Frontmatter (`alwaysApply`/`globs` vs `paths:`), platform-only (`BUGBOT.md`, `CLAUDE.md`) |
23
+
24
+ ## Куда класть новое правило
25
+
26
+ 1. Общие принципы для всех стеков → **core** + адаптеры с `<!-- shared-core: … -->`.
27
+ 2. Только один из installable стеков (`next` / `ios-swift` / `go`) → **stack-specific** (не в `_shared`).
28
+ 3. Только Cursor или только Claude packaging → platform artifact / frontmatter, не дублировать семантику.
29
+
30
+ ## SoT
31
+
32
+ - Packages path — SoT; root `.cursor/` — dogfood sync.
33
+ - Per stack: **Cursor** `presets/cursor/<stack>/` → Claude twin same PR.
34
+ - `_shared` **не** `--preset` и не копируется CLI `init`.
35
+
36
+ См. также: `preset-twin-sync`, `preset-token-budget`, `preset-pr-checklist`, `preset-no-cross-stack-leakage`.
@@ -0,0 +1,58 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-no-cross-stack-leakage)
3
+ paths:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ - .claude/**/*
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-no-cross-stack-leakage.md -->
11
+
12
+ # Preset no cross-stack leakage
13
+
14
+ Запрет протекания stack-specific имён, путей и handoff stems между пресетами.
15
+
16
+ ## Principles
17
+
18
+ - `next` must not require iOS-only agents/tooling (`xcuitest-*`, `xcodebuild` as required handoff, Keychain-only rules).
19
+ - `ios-swift` must not ship Playwright handoffs or Next lint recipes as required commands.
20
+ - `go` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
21
+ - Shared core must not embed stack paths (`app/src/**`, `Features/**`, `playwright`, `xcodebuild`).
22
+
23
+ ## Forbidden in ios-swift hooks/agents (FAIL)
24
+
25
+ In ios-swift `chain-team-phases.sh` / agent handoffs (Cursor + Claude):
26
+
27
+ - `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`
28
+ - `app/__tests__/e2e` as a required path
29
+ - Positive yarn recipes `lint:js` / `lint:css` as commands to run (negation prose alone is weak — prefer zero occurrences)
30
+
31
+ Required instead: `xcuitest-test-*` stems; build-verifier mentions `xcodebuild` or `post-change-build` / `xcode-tooling`.
32
+
33
+ ## Forbidden in next hooks/agents (FAIL when present as required)
34
+
35
+ - `xcuitest-test-` as handoff stems
36
+ - Requiring `xcodebuild` / SwiftLint as the default post-change gate for Next app work
37
+
38
+ ## Forbidden in go hooks/agents (FAIL)
39
+
40
+ - `playwright-test-`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
41
+ - Positive yarn recipes `lint:js` / `lint:css`
42
+ - `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
43
+ - Agent file `accessibility-reviewer` (no UI surface)
44
+
45
+ Required instead: `integration-test-*`; build-verifier / `post-change-test` / `go-tooling` (`go test`, `go vet`).
46
+
47
+ ## Soft / document
48
+
49
+ - Mentioning the other stack in **docs** comparing presets is OK.
50
+ - `build-verifier` may reference other stacks when validating **preset packaging** (`scope: preset-structure-validation`).
51
+
52
+ ## Chain fork
53
+
54
+ `hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, and `go` (per platform).
55
+
56
+ ## Stack notes
57
+
58
+ Forbidden positive handoffs on this stack are listed in core § go. Prefer `integration-test-*` and `post-change-test`.
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-pr-checklist)
3
+ paths:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ - .claude/**/*
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-pr-checklist.md -->
11
+
12
+ # Preset PR checklist
13
+
14
+ Чеклист для PR, затрагивающих `packages/ai-rules/presets/**` (и dogfood `.cursor/` sync).
15
+
16
+ ## Before merge
17
+
18
+ - [ ] **SoT:** правки в `packages/…` (не только root `.cursor/`)
19
+ - [ ] **Core:** если менялся `_shared/core/**` — обновлены все `<!-- shared-core: … -->` consumers (или documented intentional fork)
20
+ - [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, and go — см. `preset-twin-sync`)
21
+ - [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table актуален
22
+ - [ ] **Token budget:** alwaysApply / session-start ≤ 3; meta rules not always-on
23
+ - [ ] **Leakage:** нет чужих stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
24
+ - [ ] **Twin depth:** domain ≥15 lines; thin aliases documented
25
+ - [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
26
+ - [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
27
+ - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (or document intentional skip) when maintaining this monorepo
28
+ - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
29
+
30
+ ## Pointers
31
+
32
+ - Layering: `preset-layering`
33
+ - Sync: `preset-twin-sync`
34
+ - Budget: `preset-token-budget`
35
+ - Leakage: `preset-no-cross-stack-leakage`
36
+ - Validation: stack `agents/build-verifier.md` → preset-structure section
37
+ - Dogfood script: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`
38
+ - Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
39
+ - Orchestrator: when editing presets, load this checklist + twin-sync
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: Preset authoring meta-rule (preset-token-budget)
3
+ paths:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ - .claude/**/*
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-token-budget.md -->
11
+
12
+ # Preset token budget
13
+
14
+ Инварианты загрузки правил в **установленном** пресете (consumer app).
15
+
16
+ ## Hard caps
17
+
18
+ | Platform | Always-on | Cap |
19
+ |----------|-----------|-----|
20
+ | Cursor | `alwaysApply: true` | **≤ 3** |
21
+ | Claude | rules **without** `paths:` | **ровно 3** |
22
+
23
+ **Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules). The intended session-start trio remains **exactly 3**; body budget sums **only those 3** rules.
24
+
25
+ Session-start body budget (где задокументировано): ≤120 строк суммарно (stretch ≤100).
26
+
27
+ ## Meta / author rules
28
+
29
+ Rules for preset authors (`preset-layering`, `preset-twin-sync`, …):
30
+
31
+ - **Never** `alwaysApply: true` on consumer installs.
32
+ - Cursor: `globs` limited to `packages/ai-rules/presets/**` (and dogfood `.cursor/**` where useful).
33
+ - Claude: `paths:` limited to `packages/ai-rules/presets/**` (and `.claude/**` dogfood if present).
34
+
35
+ ## Heavy workflows
36
+
37
+ Orchestrator, feature-delivery, code-review, post-change gates, domain globs — **requestable / paths**, not always-on.
38
+
39
+ ## Verifier
40
+
41
+ build-verifier **FAIL** if alwaysApply / session-start count exceeds 3 (Claude count **excludes `**/README.md`**), or if a `preset-*` meta rule is marked always-on.