@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,21 @@
1
+ ---
2
+ description: Messaging driven/driving adapters for Go hexagonal services
3
+ paths:
4
+ - **/adapters/messaging/**/*
5
+ ---
6
+
7
+
8
+ # Messaging adapters
9
+
10
+ - **Publisher** (driven): implements outbound port; serializes domain events / integration events.
11
+ - **Consumer** (driving): deserializes → calls use case / inbound port; ack/nack policy here.
12
+ - Idempotency keys and retry/DLQ are adapter concerns; document at-least-once assumptions.
13
+ - Do not put broker client types in domain or application signatures.
14
+
15
+ ## Event shapes
16
+
17
+ - Prefer explicit event structs in application or a small `events` package used by ports — map to wire format in the adapter.
18
+
19
+ ## Tests
20
+
21
+ - Unit-test mapping with fakes; integration against embedded/broker test duals when the repo has them.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: Persistence driven adapters (SQL/repos) for Go hexagonal services
3
+ paths:
4
+ - **/adapters/persistence/**/*
5
+ - **/*repository*.go
6
+ ---
7
+
8
+
9
+ # Persistence adapters
10
+
11
+ - Implement outbound repository ports from application.
12
+ - Use parameterized queries; map rows → domain entities inside the adapter.
13
+ - Transactions: expose via port (`Transactional`, `UnitOfWork`) implemented here — use cases call the port, not `*sql.Tx` directly.
14
+ - Migrations live with infra (separate package/dir) — not in domain.
15
+
16
+ ## Mapping
17
+
18
+ - Persistence models (db tags) stay private to the adapter package when possible.
19
+ - Nullability and DB defaults converted to domain values explicitly.
20
+
21
+ ## Forbidden
22
+
23
+ - Importing persistence from domain or leaking `*sql.DB` through port APIs.
24
+ - Building SQL strings in use cases.
25
+
26
+ ## Tests
27
+
28
+ - Integration tests with testcontainers / test DB preferred for repos; unit-test mappers with fixtures.
@@ -0,0 +1,16 @@
1
+ # Architecture
2
+
3
+ Hexagonal boundaries and delivery. Index only.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`boundaries.md`](./boundaries.md) | `architecture-boundaries.mdc` |
8
+ | [`feature-delivery.md`](./feature-delivery.md) | `feature-delivery-workflow.mdc` |
9
+ | [`reference-features.md`](./reference-features.md) | `reference-features.mdc` |
10
+ | [`domain-layer.md`](./domain-layer.md) | `domain-layer.mdc` |
11
+ | [`application-usecases.md`](./application-usecases.md) | `application-usecases.mdc` |
12
+ | [`ports-interfaces.md`](./ports-interfaces.md) | `ports-interfaces.mdc` |
13
+ | [`composition-root.md`](./composition-root.md) | `composition-root.mdc` |
14
+ | [`module-public-api.md`](./module-public-api.md) | `module-public-api.mdc` |
15
+
16
+ Full map: [`../README.md`](../README.md).
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Application use cases and orchestration in Go hexagonal services
3
+ paths:
4
+ - internal/application/**/*
5
+ - **/application/**/*
6
+ ---
7
+
8
+
9
+ # Application / use cases
10
+
11
+ - One use case ≈ one application service method (command/query).
12
+ - Depend on **outbound ports** (interfaces), not concrete repos/clients.
13
+ - Orchestrate domain; transaction boundaries via ports (`UnitOfWork`) when needed — still no SQL here.
14
+ - Accept `context.Context` on public methods; propagate to ports.
15
+
16
+ ## Forbidden
17
+
18
+ - Importing `adapters/*`, SQL drivers, HTTP frameworks.
19
+ - Embedding `*sql.DB`, Redis clients, or handler types in use-case structs.
20
+ - Business rules that belong in domain entities (keep use cases thin).
21
+
22
+ ## Structure
23
+
24
+ - Prefer `application/<usecase>.go` + `ports.go` (or `ports/`) colocated.
25
+ - Inbound port = interface the driving adapter calls (optional if use-case struct is the API).
26
+
27
+ ## Tests
28
+
29
+ - Mock outbound ports; assert domain outcomes and port interactions — no real DB.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Hexagonal layer boundaries for Go backends (domain, application, ports, adapters)
3
+ ---
4
+
5
+
6
+ # Границы слоёв (hexagonal)
7
+
8
+ - **Domain** (`internal/domain`, `**/domain`):
9
+ - Может: entities, value objects, domain services, domain errors; stdlib / same BC domain.
10
+ - Не должен: HTTP/gRPC/CLI frameworks, SQL/ORM/drivers, Redis/Kafka clients, transport DTO/`encoding/json` API shapes.
11
+ - **Application** (`internal/application`, `**/application`):
12
+ - Может: use cases; **define ports** (inbound/outbound interfaces) with domain types in signatures.
13
+ - Не должен: concrete adapters, SQL strings, framework handler types (`gin.Context`, `http.Request` as domain input).
14
+ - **Ports**: interfaces only — no adapter implementations in port packages.
15
+ - **Driving adapters** (`adapters/http|grpc`, CLI): map DTO ↔ application/domain at the edge; no business rules/SQL in handlers.
16
+ - **Driven adapters** (`persistence|cache|messaging|external`): implement outbound ports; map rows/messages → domain; do not leak persistence models upward.
17
+ - **Composition root** (`cmd/`, `internal/app`): wires the graph; no business logic.
18
+
19
+ # Зависимости
20
+
21
+ - Направление: **adapters → application → domain**.
22
+ - Driven adapters implement outbound ports defined by application.
23
+ - Domain never imports adapters or frameworks.
24
+ - Cross-feature access — only via public ports / `pkg` API, not deep imports of another feature's internals.
25
+
26
+ # Требование к агенту
27
+
28
+ - Класть файлы в правильный слой; не «коротить» слои ради скорости.
29
+ - DI только в composition root.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: Composition root and DI wiring for Go hexagonal services
3
+ paths:
4
+ - cmd/**/*
5
+ - internal/app/**/*
6
+ ---
7
+
8
+
9
+ # Composition root
10
+
11
+ - Construct adapters, use cases, and servers in `cmd/<service>` and/or `internal/app`.
12
+ - Wire interfaces to implementations explicitly (manual DI preferred unless repo already uses a container).
13
+ - Load config once; fail fast on missing required settings.
14
+ - Lifecycle: graceful shutdown via `context` cancel + server `Shutdown`.
15
+
16
+ ## Allowed here
17
+
18
+ - Import all layers for wiring only.
19
+ - Process-wide loggers/metrics providers.
20
+
21
+ ## Forbidden
22
+
23
+ - Business rules, SQL queries, HTTP routing tables with domain logic.
24
+ - Global mutable singletons for repos without clear init (prefer explicit deps).
25
+
26
+ ## Tests
27
+
28
+ - Optional smoke that wiring builds (compile-time / construction test); heavy logic stays in unit/integration tests.
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: Domain layer invariants for Go hexagonal services
3
+ paths:
4
+ - internal/domain/**/*
5
+ - **/domain/**/*
6
+ ---
7
+
8
+
9
+ # Domain layer
10
+
11
+ - Pure business types and rules; no I/O.
12
+ - Prefer small value objects with validation constructors (`NewX` / `ParseX` that return typed errors).
13
+ - Domain errors are typed (sentinel or structured); map to HTTP/gRPC statuses only in adapters.
14
+ - Domain services orchestrate entities without calling outbound ports (ports live in application).
15
+ - Keep invariants close to the type that owns them; avoid anemic bags of fields with all logic in use cases.
16
+
17
+ ## Forbidden imports
18
+
19
+ - `net/http`, `database/sql`, ORM packages, Redis/Kafka clients, router frameworks (`gin`, `chi` as handler deps).
20
+ - Transport DTOs and `json` tags that mirror API contracts (keep API shapes in adapters).
21
+ - Framework `context` cancellation plumbing as a substitute for domain deadlines (prefer explicit types).
22
+
23
+ ## Allowed
24
+
25
+ - `context` only if domain API genuinely needs deadlines (prefer application to pass primitives).
26
+ - Stdlib: `time`, `errors`, `fmt`, `slices`, `maps`, etc.
27
+ - Cross-aggregate references by ID, not by loading other aggregates via ports.
28
+
29
+ ## Tests
30
+
31
+ - Table-driven unit tests; no DB, no `httptest`, no framework contexts.
32
+ - Cover invalid constructor inputs and invariant violations explicitly.
@@ -0,0 +1,51 @@
1
+ ---
2
+ description: End-to-end delivery checklist for Go hexagonal features
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - **/*.go
7
+ - internal/**/*
8
+ - cmd/**/*
9
+ ---
10
+
11
+ <!-- shared-core: architecture/feature-delivery-workflow.md -->
12
+
13
+ # Feature delivery (Go hexagonal)
14
+
15
+ Order of work:
16
+
17
+ 1. **Domain** — entities/VOs/errors (`domain-layer`).
18
+ 2. **Application + ports** — use case + outbound interfaces (`application-usecases`, `ports-interfaces`).
19
+ 3. **Driven adapters** — persistence/cache/messaging implementing ports.
20
+ 4. **Driving adapters** — HTTP/gRPC/CLI mapping DTOs.
21
+ 5. **Composition root** — wire in `cmd/` / `internal/app`.
22
+ 6. **Tests** — unit (domain/app) → integration (adapters) → optional e2e smoke.
23
+ 7. **Gate** — `post-change-test` (+ `go-tooling`).
24
+
25
+ ```mermaid
26
+ flowchart LR
27
+ D[Domain] --> A[Application+Ports]
28
+ A --> Drv[Driven adapters]
29
+ Drv --> A
30
+ HTTP[Driving HTTP] --> A
31
+ CR[Composition root] --> HTTP
32
+ CR --> A
33
+ CR --> Drv
34
+ ```
35
+
36
+ ## Matrix
37
+
38
+ | Path | Rules |
39
+ |------|-------|
40
+ | `**/domain/**` | `domain-layer`, `architecture-boundaries` |
41
+ | `**/application/**` | `application-usecases`, `ports-interfaces` |
42
+ | `**/adapters/http/**` | `adapters-driving`, `api-http` |
43
+ | `**/adapters/persistence/**` | `adapters-driven`, `persistence-adapters` |
44
+ | `cmd/**`, `internal/app/**` | `composition-root` |
45
+ | After `*.go` edits | `post-change-test` |
46
+
47
+ ## Anti-patterns
48
+
49
+ - Framework types in domain; SQL in use cases; DI inside handlers; skipping port interfaces “for speed”.
50
+ - **Ubiquitous language:** Domain names/boundaries reflect the feature domain — do not mix transport/framework terms into domain without need.
51
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,23 @@
1
+ ---
2
+ description: Public module API (pkg/) and internal boundaries for Go services
3
+ paths:
4
+ - pkg/**/*
5
+ - go.mod
6
+ ---
7
+
8
+
9
+ # Module public API
10
+
11
+ - Anything under `pkg/` is a compatibility surface — change carefully; prefer additive APIs.
12
+ - Service-private code stays in `internal/`.
13
+ - Do not import another module's `internal/` (compiler enforces for separate modules).
14
+ - Document breaking Go API changes in CHANGELOG when the repo publishes libraries.
15
+
16
+ ## go.mod
17
+
18
+ - Module path and Go version are SoT for toolchain.
19
+ - Prefer minimal direct deps; pin via `go.mod` / `go.sum`.
20
+
21
+ ## Cross-feature
22
+
23
+ - Inside one module, features communicate via application ports or small `pkg` facades — not by importing sibling feature adapter packages.
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Inbound and outbound port interfaces for Go hexagonal services
3
+ paths:
4
+ - **/ports/**/*
5
+ - internal/application/**/*port*
6
+ - **/application/**/*port*
7
+ ---
8
+
9
+
10
+ # Ports (interfaces)
11
+
12
+ ## Outbound (driven)
13
+
14
+ - Repository, cache, publisher, clock, ID generator, external client — defined by **application**.
15
+ - Signatures use **domain** types (or small application DTOs), never ORM models.
16
+ - Keep interfaces small (ISP); prefer role interfaces over god-repos.
17
+ - Accept `context.Context` as the first parameter when the call may block or cancel.
18
+
19
+ ## Inbound (driving)
20
+
21
+ - Optional interface wrapping use cases for multiple drivers (HTTP + gRPC + CLI).
22
+ - Drivers depend on inbound ports / use-case APIs — not on each other.
23
+ - Prefer a concrete use-case struct when only one driver exists; extract an interface when a second driver appears.
24
+
25
+ ## Naming
26
+
27
+ - `SaveOrder`, `FindOrderByID`, `PublishOrderPlaced` — verb-oriented.
28
+ - Implementation types live in adapters (`PostgresOrderRepository`), not beside the interface in domain.
29
+
30
+ ## Anti-patterns
31
+
32
+ - Ports returning `map[string]any` or `json.RawMessage` without need.
33
+ - Putting port interfaces inside adapter packages (wrong owner).
34
+ - Leakage of SQL/`driver.Valuer` types through port method signatures.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Reference paths for Go hexagonal layout (fill after init)
3
+ paths:
4
+ - internal/**/*
5
+ - cmd/**/*
6
+ ---
7
+
8
+ <!-- shared-core: architecture/reference-features.template.md -->
9
+
10
+ # Reference features (Go)
11
+
12
+ Fill TBD paths after adopting this preset in a real service repo.
13
+
14
+ | Area | Example path (TBD) | Glob hint |
15
+ |------|--------------------|-----------|
16
+ | Domain | `internal/domain/` | `**/domain/**` |
17
+ | Application / ports | `internal/application/` | `**/application/**` |
18
+ | HTTP adapter | `internal/adapters/http/` | `**/adapters/http/**` |
19
+ | Persistence | `internal/adapters/persistence/` | `**/adapters/persistence/**` |
20
+ | Composition root | `cmd/<service>/`, `internal/app/` | `cmd/**`, `internal/app/**` |
21
+ | Unit tests | `*_test.go` beside packages | `**/*_test.go` |
22
+ | Integration | `**/integration/` | `**/*_integration_test.go` |
23
+
24
+ ## Dogfood scenarios
25
+
26
+ 1. `/task` new use case — domain → ports → adapters → wire → `post-change-test`.
27
+ 2. Bug in handler mapping — debugger + httptest unit.
28
+ 3. Repository contract — integration-test trio.
29
+ 4. OpenAPI/proto drift — api-contract-reviewer.
30
+ 5. Secrets in logs — security-reviewer + `security-go`.
@@ -0,0 +1,10 @@
1
+ # Stack
2
+
3
+ Язык, платформа и базовый каркас сервиса. Index only — тела в topic `.md`.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`go-app-core.md`](./go-app-core.md) | `go-app-core.mdc` |
8
+ | [`go-conventions.md`](./go-conventions.md) | `go-conventions.mdc` |
9
+
10
+ Sync: change Cursor → update Claude twin same PR. Full map: [`../README.md`](../README.md).
@@ -0,0 +1,31 @@
1
+ ---
2
+ description: Go backend stack, module layout, and agent entry points (hexagonal preset)
3
+ ---
4
+
5
+
6
+ # Стек и окружение
7
+
8
+ Версии Go, toolchain и зависимостей — **из `go.mod` / `go.work` целевого репозитория**. Рамка preset:
9
+
10
+ - **Язык / платформа:** Go (module mode); min version — из `go` directive в `go.mod`.
11
+ - **Архитектура:** hexagonal (ports & adapters); слой domain не знает HTTP/SQL/брокеры.
12
+ - **Точки входа:** `cmd/<service>/main.go` → composition root.
13
+ - **Concurrency:** `context.Context` в API границ; не хранить Context в структурах дольше запроса.
14
+ - **Тесты:** `testing` + table-driven; integration за адаптерами; e2e HTTP smoke — по необходимости.
15
+ - **HTTP:** framework-agnostic (`net/http`, chi/gin/echo — примеры, не мандат).
16
+ - **Наблюдаемость:** только если уже в репо — централизованно (логи/metrics/tracing).
17
+
18
+ # Структура (default: layer-first)
19
+
20
+ ```text
21
+ cmd/<service>/main.go
22
+ internal/domain/
23
+ internal/application/ # use cases + ports
24
+ internal/adapters/http|grpc|persistence|cache|messaging/
25
+ internal/app/ # optional DI wiring
26
+ pkg/ # optional public library API
27
+ ```
28
+
29
+ **Feature-first variant** allowed: `internal/<feature>/{domain,application,adapters}` — same dependency direction.
30
+
31
+ Границы — **`architecture-boundaries.mdc`**. Tooling — requestable **`go-tooling.mdc`**. После правок Go — **`post-change-test.mdc`**.
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: Idiomatic Go conventions for this hexagonal preset
3
+ paths:
4
+ - **/*.go
5
+ ---
6
+
7
+
8
+ # Go conventions
9
+
10
+ - Follow [Effective Go](https://go.dev/doc/effective_go) and repo `golangci-lint` / `staticcheck` when present.
11
+ - Accept `context.Context` as first param on I/O and use-case methods.
12
+ - Wrap errors: `fmt.Errorf("…: %w", err)`; avoid panics in library/service code.
13
+ - Prefer `camelCase` unexported, `PascalCase` exported; package names short and lowercase.
14
+ - Do not expose `internal/` outside the module.
15
+ - Prefer table-driven tests; use `t.Parallel` only when safe.
16
+
17
+ ## Packages
18
+
19
+ - Avoid `util`/`common` dumping grounds — name by domain capability.
20
+ - Keep `main` packages thin (see composition-root).
21
+
22
+ ## Concurrency
23
+
24
+ - Document cancelation; do not start unbounded goroutines from handlers without supervision.
@@ -0,0 +1,11 @@
1
+ # Testing
2
+
3
+ Unit, integration, e2e smoke. Index only.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`unit.md`](./unit.md) | `tests-unit.mdc` |
8
+ | [`integration.md`](./integration.md) | `tests-integration.mdc` |
9
+ | [`e2e.md`](./e2e.md) | `tests-e2e.mdc` |
10
+
11
+ Full map: [`../README.md`](../README.md).
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: End-to-end HTTP smoke tests for Go services
3
+ paths:
4
+ - **/e2e/**/*_test.go
5
+ - **/*_e2e_test.go
6
+ ---
7
+
8
+
9
+ # E2E / HTTP smoke
10
+
11
+ - Black-box against a running server (httptest with full composition root, or localhost in CI).
12
+ - Cover critical paths only; prefer integration + unit for breadth.
13
+ - Stable test data; avoid depending on wall-clock flakiness.
14
+ - Do not use browser/Playwright tooling in this preset.
15
+
16
+ ## Placement
17
+
18
+ - `e2e/` package or `*_e2e_test.go` with build tags if needed.
@@ -0,0 +1,23 @@
1
+ ---
2
+ description: Integration / adapter contract tests for Go hexagonal services
3
+ paths:
4
+ - **/integration/**/*_test.go
5
+ - **/*_integration_test.go
6
+ ---
7
+
8
+
9
+ # Integration tests
10
+
11
+ - Exercise driven adapters against real infra doubles (testcontainers, docker compose test DB, miniredis, etc.).
12
+ - Or exercise HTTP adapter with `httptest` + wired use case + fake/real ports — still no full prod cluster required.
13
+ - Build tags (`//go:build integration`) if the repo separates CI jobs.
14
+ - Keep fixtures deterministic; clean up data between tests.
15
+
16
+ ## Scope
17
+
18
+ - Contract of a port implementation (repo save/load roundtrip).
19
+ - Not a substitute for domain unit tests.
20
+
21
+ ## Agents
22
+
23
+ - Planning/generation: `integration-test-{planner,generator,healer}` + skill `integration-testing`.
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: Unit testing conventions for Go hexagonal services
3
+ paths:
4
+ - **/*_test.go
5
+ ---
6
+
7
+
8
+ # Unit tests
9
+
10
+ - Table-driven tests; clear arrange/act/assert.
11
+ - Domain and application: mock/fake **ports** only — no real DB/network.
12
+ - Prefer fakes over heavy mocking frameworks when simple.
13
+ - Skip integration/e2e files matching `*_integration_test.go`, `*_e2e_test.go`, or dirs `integration/`, `e2e/` — those use other rules.
14
+
15
+ ## Forbidden smells
16
+
17
+ - `gin.Context` / `http.Request` in domain tests.
18
+ - SQL or live HTTP in use-case unit tests.
19
+ - Brittle tests on unexported adapter internals without need.
20
+ - Structural smells vocabulary (Feature Envy, Message Chains, …): see requestable `design-guidance` — do not duplicate the catalog here.
21
+
22
+ ## Naming
23
+
24
+ - `TestUseCase_DoX` / `TestEntity_Invariant`.
@@ -0,0 +1,21 @@
1
+ # Tooling and review
2
+
3
+ Качество, review, test gate, security, agent-team, retro, preset meta. Index only.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`code-quality.md`](./code-quality.md) | `code-quality-and-refactoring.mdc` |
8
+ | [`code-review.md`](./code-review.md) | `code-review-mr.mdc` |
9
+ | [`post-change-test.md`](./post-change-test.md) | `post-change-test.mdc` |
10
+ | [`go-tooling.md`](./go-tooling.md) | `go-tooling.mdc` |
11
+ | [`security-go.md`](./security-go.md) | `security-go.mdc` |
12
+ | [`agent-team-intake.md`](./agent-team-intake.md) | `agent-team-intake.mdc` |
13
+ | [`agent-team-orchestrator.md`](./agent-team-orchestrator.md) | `agent-team-orchestrator.mdc` |
14
+ | [`technical-retro.md`](./technical-retro.md) | `technical-retro.mdc` |
15
+ | [`preset-layering.md`](./preset-layering.md) | `preset-layering.mdc` |
16
+ | [`preset-twin-sync.md`](./preset-twin-sync.md) | `preset-twin-sync.mdc` |
17
+ | [`preset-token-budget.md`](./preset-token-budget.md) | `preset-token-budget.mdc` |
18
+ | [`preset-pr-checklist.md`](./preset-pr-checklist.md) | `preset-pr-checklist.mdc` |
19
+ | [`preset-no-cross-stack-leakage.md`](./preset-no-cross-stack-leakage.md) | `preset-no-cross-stack-leakage.mdc` |
20
+
21
+ Sync: change Cursor → update Claude twin same PR. Full map: [`../README.md`](../README.md).
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Suggest /task for Go backend work requests
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - **/*.go
7
+ - internal/**/*
8
+ - cmd/**/*
9
+ ---
10
+
11
+ <!-- shared-core: agent-team/agent-team-intake.md -->
12
+
13
+ # Agent team intake
14
+
15
+ 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:
16
+
17
+ 1. Prefer **`/task <their request>`** or invoke **task-router** first.
18
+ 2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
19
+ 3. Pure questions («как работает X», «объясни») — answer normally, no `/task`.
20
+
21
+ Exceptions: user explicitly says «без pipeline», «просто сделай», or continues an active slug.
22
+
23
+ ## Stack notes
24
+
25
+ - Scope: Go services (`cmd/`, `internal/**`) — hexagonal ports/adapters — not Playwright/XCUITest UI flows.