@bonesofspring/ai-rules 0.2.6 → 0.2.8

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 (405) hide show
  1. package/CHANGELOG.md +65 -1
  2. package/README.md +13 -5
  3. package/bin/cli.js +30 -1
  4. package/package.json +3 -2
  5. package/presets/_shared/README.md +1 -1
  6. package/presets/_shared/core/agent-team/agent-team-intake.md +1 -1
  7. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +1 -1
  8. package/presets/_shared/core/architecture/reference-features.template.md +12 -0
  9. package/presets/_shared/core/meta/preset-layering.md +1 -1
  10. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +6 -4
  11. package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
  12. package/presets/_shared/core/meta/preset-twin-sync.md +2 -0
  13. package/presets/_shared/core/quality/code-quality-and-refactoring.md +11 -0
  14. package/presets/_shared/core/review/code-review-mr.md +9 -0
  15. package/presets/claude/go/CLAUDE.md +5 -1
  16. package/presets/claude/go/README.md +5 -1
  17. package/presets/claude/go/REPO_AGENTS.md +48 -0
  18. package/presets/claude/go/agents/README.md +19 -2
  19. package/presets/claude/go/agents/build-verifier.md +6 -1
  20. package/presets/claude/go/agents/codebase-analyzer.md +28 -0
  21. package/presets/claude/go/agents/feature-developer.md +13 -0
  22. package/presets/claude/go/hooks/README.md +6 -0
  23. package/presets/claude/go/hooks/examples/README.md +18 -0
  24. package/presets/claude/go/hooks/examples/format-edited.example.sh +9 -0
  25. package/presets/claude/go/hooks/examples/secret-guard.example.sh +10 -0
  26. package/presets/claude/go/hooks/examples/test-on-save.example.sh +11 -0
  27. package/presets/claude/go/rules/api-and-data/api-http.md +10 -3
  28. package/presets/claude/go/rules/architecture/reference-features.md +4 -0
  29. package/presets/claude/go/rules/stack/go-conventions.md +30 -3
  30. package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +1 -1
  31. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  32. package/presets/claude/go/rules/tooling-and-review/code-quality.md +12 -1
  33. package/presets/claude/go/rules/tooling-and-review/code-review.md +9 -0
  34. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
  35. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -8
  36. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  37. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +2 -0
  38. package/presets/claude/go/skills/README.md +2 -2
  39. package/presets/claude/go/skills/code-review/SKILL.md +11 -2
  40. package/presets/claude/go/skills/feature-delivery/SKILL.md +4 -0
  41. package/presets/claude/go/skills/technical-retro/SKILL.md +46 -2
  42. package/presets/claude/go/skills/write-adr/SKILL.md +41 -0
  43. package/presets/claude/go/team/conventions.md +21 -0
  44. package/presets/claude/go/team/fixtures/feature-full.json +5 -23
  45. package/presets/claude/ios-swift/CLAUDE.md +4 -1
  46. package/presets/claude/ios-swift/README.md +5 -1
  47. package/presets/claude/ios-swift/REPO_AGENTS.md +46 -0
  48. package/presets/claude/ios-swift/agents/README.md +3 -2
  49. package/presets/claude/ios-swift/agents/build-verifier.md +7 -2
  50. package/presets/claude/ios-swift/agents/codebase-analyzer.md +28 -0
  51. package/presets/claude/ios-swift/agents/feature-developer.md +13 -0
  52. package/presets/claude/ios-swift/hooks/README.md +6 -0
  53. package/presets/claude/ios-swift/hooks/examples/README.md +18 -0
  54. package/presets/claude/ios-swift/hooks/examples/format-edited.example.sh +13 -0
  55. package/presets/claude/ios-swift/hooks/examples/secret-guard.example.sh +10 -0
  56. package/presets/claude/ios-swift/hooks/examples/test-on-save.example.sh +8 -0
  57. package/presets/claude/ios-swift/rules/architecture/reference-features.md +4 -0
  58. package/presets/claude/ios-swift/rules/stack/ios-app-core.md +5 -28
  59. package/presets/claude/ios-swift/rules/stack/swift-conventions.md +12 -2
  60. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +1 -1
  61. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  62. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +12 -1
  63. package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +47 -0
  64. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +1 -1
  65. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -4
  66. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  67. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +2 -0
  68. package/presets/claude/ios-swift/rules/ui-and-accessibility/swiftui.md +8 -0
  69. package/presets/claude/ios-swift/skills/README.md +1 -0
  70. package/presets/claude/ios-swift/skills/code-review/SKILL.md +10 -2
  71. package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +4 -0
  72. package/presets/claude/ios-swift/skills/technical-retro/SKILL.md +46 -2
  73. package/presets/claude/ios-swift/skills/write-adr/SKILL.md +41 -0
  74. package/presets/claude/ios-swift/team/conventions.md +21 -0
  75. package/presets/claude/java/CLAUDE.md +29 -0
  76. package/presets/claude/java/MCP.md +13 -0
  77. package/presets/claude/java/README.md +26 -0
  78. package/presets/claude/java/REPO_AGENTS.md +45 -0
  79. package/presets/claude/java/agents/README.md +32 -0
  80. package/presets/claude/java/agents/api-contract-reviewer.md +23 -0
  81. package/presets/claude/java/agents/build-verifier.md +45 -0
  82. package/presets/claude/java/agents/ci-investigator.md +17 -0
  83. package/presets/claude/java/agents/code-reviewer.md +40 -0
  84. package/presets/claude/java/agents/codebase-analyzer.md +28 -0
  85. package/presets/claude/java/agents/debugger.md +25 -0
  86. package/presets/claude/java/agents/feature-developer.md +43 -0
  87. package/presets/claude/java/agents/integration-test-generator.md +22 -0
  88. package/presets/claude/java/agents/integration-test-healer.md +22 -0
  89. package/presets/claude/java/agents/integration-test-planner.md +22 -0
  90. package/presets/claude/java/agents/migration-specialist.md +31 -0
  91. package/presets/claude/java/agents/performance-auditor.md +22 -0
  92. package/presets/claude/java/agents/qa-tester.md +24 -0
  93. package/presets/claude/java/agents/security-reviewer.md +20 -0
  94. package/presets/claude/java/agents/solution-architect.md +28 -0
  95. package/presets/claude/java/agents/task-analyst.md +25 -0
  96. package/presets/claude/java/agents/task-router.md +69 -0
  97. package/presets/claude/java/agents/tech-writer.md +15 -0
  98. package/presets/claude/java/agents/unit-test-generator.md +21 -0
  99. package/presets/claude/java/agents/unit-test-healer.md +13 -0
  100. package/presets/claude/java/agents/unit-test-planner.md +26 -0
  101. package/presets/claude/java/commands/README.md +13 -0
  102. package/presets/claude/java/commands/feature-continue.md +51 -0
  103. package/presets/claude/java/commands/feature-start.md +30 -0
  104. package/presets/claude/java/commands/task-continue.md +49 -0
  105. package/presets/claude/java/commands/task.md +49 -0
  106. package/presets/claude/java/commands/technical-retro.md +58 -0
  107. package/presets/claude/java/hooks/README.md +16 -0
  108. package/presets/claude/java/hooks/chain-team-phases.sh +381 -0
  109. package/presets/claude/java/hooks/examples/README.md +18 -0
  110. package/presets/claude/java/hooks/examples/format-edited.example.sh +11 -0
  111. package/presets/claude/java/hooks/examples/secret-guard.example.sh +10 -0
  112. package/presets/claude/java/hooks/examples/test-on-save.example.sh +18 -0
  113. package/presets/claude/java/hooks/guard-shell-command.sh +80 -0
  114. package/presets/claude/java/mcp.json +11 -0
  115. package/presets/claude/java/rules/README.md +60 -0
  116. package/presets/claude/java/rules/api-and-data/README.md +14 -0
  117. package/presets/claude/java/rules/api-and-data/adapters-driven.md +38 -0
  118. package/presets/claude/java/rules/api-and-data/adapters-driving.md +38 -0
  119. package/presets/claude/java/rules/api-and-data/api-grpc.md +29 -0
  120. package/presets/claude/java/rules/api-and-data/api-http.md +36 -0
  121. package/presets/claude/java/rules/api-and-data/messaging-adapters.md +24 -0
  122. package/presets/claude/java/rules/api-and-data/persistence-adapters.md +33 -0
  123. package/presets/claude/java/rules/architecture/README.md +16 -0
  124. package/presets/claude/java/rules/architecture/application-usecases.md +32 -0
  125. package/presets/claude/java/rules/architecture/boundaries.md +29 -0
  126. package/presets/claude/java/rules/architecture/composition-root.md +31 -0
  127. package/presets/claude/java/rules/architecture/domain-layer.md +38 -0
  128. package/presets/claude/java/rules/architecture/feature-delivery.md +52 -0
  129. package/presets/claude/java/rules/architecture/module-public-api.md +31 -0
  130. package/presets/claude/java/rules/architecture/ports-interfaces.md +34 -0
  131. package/presets/claude/java/rules/architecture/reference-features.md +34 -0
  132. package/presets/claude/java/rules/stack/README.md +10 -0
  133. package/presets/claude/java/rules/stack/java-app-core.md +32 -0
  134. package/presets/claude/java/rules/stack/java-conventions.md +52 -0
  135. package/presets/claude/java/rules/testing/README.md +11 -0
  136. package/presets/claude/java/rules/testing/e2e.md +22 -0
  137. package/presets/claude/java/rules/testing/integration.md +27 -0
  138. package/presets/claude/java/rules/testing/unit.md +33 -0
  139. package/presets/claude/java/rules/tooling-and-review/README.md +21 -0
  140. package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +26 -0
  141. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +179 -0
  142. package/presets/claude/java/rules/tooling-and-review/code-quality.md +83 -0
  143. package/presets/claude/java/rules/tooling-and-review/code-review.md +59 -0
  144. package/presets/claude/java/rules/tooling-and-review/design-guidance.md +110 -0
  145. package/presets/claude/java/rules/tooling-and-review/java-tooling.md +36 -0
  146. package/presets/claude/java/rules/tooling-and-review/post-change-test.md +32 -0
  147. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +36 -0
  148. package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +56 -0
  149. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  150. package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +41 -0
  151. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +44 -0
  152. package/presets/claude/java/rules/tooling-and-review/security-java.md +29 -0
  153. package/presets/claude/java/rules/tooling-and-review/technical-retro.md +20 -0
  154. package/presets/claude/java/rules/ui-and-accessibility/README.md +5 -0
  155. package/presets/claude/java/skills/README.md +5 -0
  156. package/presets/claude/java/skills/ci-investigation/SKILL.md +11 -0
  157. package/presets/claude/java/skills/code-review/SKILL.md +25 -0
  158. package/presets/claude/java/skills/debug-investigation/SKILL.md +15 -0
  159. package/presets/claude/java/skills/feature-delivery/SKILL.md +30 -0
  160. package/presets/claude/java/skills/integration-testing/SKILL.md +15 -0
  161. package/presets/claude/java/skills/technical-retro/SKILL.md +54 -0
  162. package/presets/claude/java/skills/unit-testing/SKILL.md +14 -0
  163. package/presets/claude/java/skills/write-adr/SKILL.md +41 -0
  164. package/presets/claude/java/team/README.md +27 -0
  165. package/presets/claude/java/team/conventions.md +21 -0
  166. package/presets/claude/java/team/fixtures/bugfix-standard.json +37 -0
  167. package/presets/claude/java/team/fixtures/feature-full.json +25 -0
  168. package/presets/claude/java/team/fixtures/feature-light.json +17 -0
  169. package/presets/claude/next/CLAUDE.md +5 -1
  170. package/presets/claude/next/README.md +6 -1
  171. package/presets/claude/next/REPO_AGENTS.md +48 -0
  172. package/presets/claude/next/agents/README.md +7 -1
  173. package/presets/claude/next/agents/build-verifier.md +7 -2
  174. package/presets/claude/next/agents/codebase-analyzer.md +28 -0
  175. package/presets/claude/next/agents/feature-developer.md +13 -0
  176. package/presets/claude/next/agents/security-reviewer.md +4 -2
  177. package/presets/claude/next/hooks/README.md +6 -0
  178. package/presets/claude/next/hooks/examples/README.md +18 -0
  179. package/presets/claude/next/hooks/examples/format-edited.example.sh +11 -0
  180. package/presets/claude/next/hooks/examples/secret-guard.example.sh +10 -0
  181. package/presets/claude/next/hooks/examples/test-on-save.example.sh +8 -0
  182. package/presets/claude/next/rules/README.md +2 -1
  183. package/presets/claude/next/rules/api-and-data/api-services.md +22 -0
  184. package/presets/claude/next/rules/api-and-data/http-client.md +21 -0
  185. package/presets/claude/next/rules/api-and-data/store-rtk.md +20 -0
  186. package/presets/claude/next/rules/architecture/architecture-boundaries.md +28 -0
  187. package/presets/claude/next/rules/architecture/layer-barrel-exports.md +15 -0
  188. package/presets/claude/next/rules/architecture/public-imports.md +14 -0
  189. package/presets/claude/next/rules/architecture/reference-features.md +4 -0
  190. package/presets/claude/next/rules/stack/arrow-functions.md +13 -28
  191. package/presets/claude/next/rules/stack/next-app-router.md +13 -1
  192. package/presets/claude/next/rules/testing/tests-unit.md +13 -0
  193. package/presets/claude/next/rules/tooling-and-review/README.md +2 -1
  194. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +1 -1
  195. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  196. package/presets/claude/next/rules/tooling-and-review/code-quality.md +12 -2
  197. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +22 -0
  198. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +1 -1
  199. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -4
  200. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  201. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +2 -0
  202. package/presets/claude/next/rules/tooling-and-review/security-next.md +57 -0
  203. package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +21 -0
  204. package/presets/claude/next/skills/README.md +2 -0
  205. package/presets/claude/next/skills/code-review/SKILL.md +10 -2
  206. package/presets/claude/next/skills/feature-delivery/SKILL.md +4 -0
  207. package/presets/claude/next/skills/react-performance/SKILL.md +44 -0
  208. package/presets/claude/next/skills/technical-retro/SKILL.md +19 -5
  209. package/presets/claude/next/skills/write-adr/SKILL.md +41 -0
  210. package/presets/claude/next/team/conventions.md +21 -0
  211. package/presets/cursor/go/AGENTS.md +6 -0
  212. package/presets/cursor/go/README.md +6 -5
  213. package/presets/cursor/go/REPO_AGENTS.md +48 -0
  214. package/presets/cursor/go/agents/README.md +23 -2
  215. package/presets/cursor/go/agents/build-verifier.md +6 -1
  216. package/presets/cursor/go/agents/codebase-analyzer.md +28 -0
  217. package/presets/cursor/go/agents/feature-developer.md +13 -0
  218. package/presets/cursor/go/commands/README.md +1 -1
  219. package/presets/cursor/go/hooks/README.md +4 -0
  220. package/presets/cursor/go/hooks/examples/README.md +18 -0
  221. package/presets/cursor/go/hooks/examples/format-edited.example.sh +9 -0
  222. package/presets/cursor/go/hooks/examples/secret-guard.example.sh +10 -0
  223. package/presets/cursor/go/hooks/examples/test-on-save.example.sh +11 -0
  224. package/presets/cursor/go/rules/README.md +2 -2
  225. package/presets/cursor/go/rules/agent-team-intake.mdc +1 -1
  226. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +1 -1
  227. package/presets/cursor/go/rules/api-http.mdc +10 -3
  228. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +12 -1
  229. package/presets/cursor/go/rules/code-review-mr.mdc +9 -0
  230. package/presets/cursor/go/rules/go-conventions.mdc +30 -3
  231. package/presets/cursor/go/rules/preset-layering.mdc +1 -1
  232. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +6 -8
  233. package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
  234. package/presets/cursor/go/rules/preset-twin-sync.mdc +2 -0
  235. package/presets/cursor/go/rules/reference-features.mdc +4 -0
  236. package/presets/cursor/go/skills/README.md +2 -2
  237. package/presets/cursor/go/skills/code-review/SKILL.md +10 -1
  238. package/presets/cursor/go/skills/feature-delivery/SKILL.md +4 -0
  239. package/presets/cursor/go/skills/technical-retro/SKILL.md +46 -2
  240. package/presets/cursor/go/skills/write-adr/SKILL.md +41 -0
  241. package/presets/cursor/go/team/conventions.md +21 -0
  242. package/presets/cursor/go/team/fixtures/feature-full.json +5 -23
  243. package/presets/cursor/ios-swift/AGENTS.md +5 -2
  244. package/presets/cursor/ios-swift/README.md +6 -5
  245. package/presets/cursor/ios-swift/REPO_AGENTS.md +46 -0
  246. package/presets/cursor/ios-swift/agents/README.md +3 -2
  247. package/presets/cursor/ios-swift/agents/build-verifier.md +7 -2
  248. package/presets/cursor/ios-swift/agents/codebase-analyzer.md +28 -0
  249. package/presets/cursor/ios-swift/agents/feature-developer.md +13 -0
  250. package/presets/cursor/ios-swift/commands/README.md +1 -1
  251. package/presets/cursor/ios-swift/hooks/README.md +4 -0
  252. package/presets/cursor/ios-swift/hooks/examples/README.md +18 -0
  253. package/presets/cursor/ios-swift/hooks/examples/format-edited.example.sh +13 -0
  254. package/presets/cursor/ios-swift/hooks/examples/secret-guard.example.sh +10 -0
  255. package/presets/cursor/ios-swift/hooks/examples/test-on-save.example.sh +8 -0
  256. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +1 -1
  257. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +1 -1
  258. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +12 -1
  259. package/presets/cursor/ios-swift/rules/code-review-mr.mdc +9 -0
  260. package/presets/cursor/ios-swift/rules/ios-app-core.mdc +5 -28
  261. package/presets/cursor/ios-swift/rules/preset-layering.mdc +1 -1
  262. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +6 -4
  263. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
  264. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +2 -0
  265. package/presets/cursor/ios-swift/rules/reference-features.mdc +4 -0
  266. package/presets/cursor/ios-swift/rules/swift-conventions.mdc +12 -2
  267. package/presets/cursor/ios-swift/rules/swiftui-ui.mdc +8 -0
  268. package/presets/cursor/ios-swift/skills/README.md +1 -0
  269. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +10 -2
  270. package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +4 -0
  271. package/presets/cursor/ios-swift/skills/technical-retro/SKILL.md +46 -2
  272. package/presets/cursor/ios-swift/skills/write-adr/SKILL.md +41 -0
  273. package/presets/cursor/ios-swift/team/conventions.md +21 -0
  274. package/presets/cursor/java/AGENTS.md +37 -0
  275. package/presets/cursor/java/BUGBOT.md +11 -0
  276. package/presets/cursor/java/MCP.md +15 -0
  277. package/presets/cursor/java/README.md +26 -0
  278. package/presets/cursor/java/REPO_AGENTS.md +45 -0
  279. package/presets/cursor/java/agents/README.md +36 -0
  280. package/presets/cursor/java/agents/api-contract-reviewer.md +23 -0
  281. package/presets/cursor/java/agents/build-verifier.md +45 -0
  282. package/presets/cursor/java/agents/ci-investigator.md +17 -0
  283. package/presets/cursor/java/agents/code-reviewer.md +40 -0
  284. package/presets/cursor/java/agents/codebase-analyzer.md +28 -0
  285. package/presets/cursor/java/agents/debugger.md +25 -0
  286. package/presets/cursor/java/agents/feature-developer.md +43 -0
  287. package/presets/cursor/java/agents/integration-test-generator.md +22 -0
  288. package/presets/cursor/java/agents/integration-test-healer.md +22 -0
  289. package/presets/cursor/java/agents/integration-test-planner.md +22 -0
  290. package/presets/cursor/java/agents/migration-specialist.md +31 -0
  291. package/presets/cursor/java/agents/performance-auditor.md +22 -0
  292. package/presets/cursor/java/agents/qa-tester.md +24 -0
  293. package/presets/cursor/java/agents/security-reviewer.md +20 -0
  294. package/presets/cursor/java/agents/solution-architect.md +28 -0
  295. package/presets/cursor/java/agents/task-analyst.md +25 -0
  296. package/presets/cursor/java/agents/task-router.md +69 -0
  297. package/presets/cursor/java/agents/tech-writer.md +15 -0
  298. package/presets/cursor/java/agents/unit-test-generator.md +21 -0
  299. package/presets/cursor/java/agents/unit-test-healer.md +13 -0
  300. package/presets/cursor/java/agents/unit-test-planner.md +26 -0
  301. package/presets/cursor/java/commands/README.md +54 -0
  302. package/presets/cursor/java/commands/feature-continue.md +19 -0
  303. package/presets/cursor/java/commands/feature-start.md +33 -0
  304. package/presets/cursor/java/commands/task-continue.md +49 -0
  305. package/presets/cursor/java/commands/task.md +49 -0
  306. package/presets/cursor/java/commands/technical-retro.md +81 -0
  307. package/presets/cursor/java/hooks/README.md +12 -0
  308. package/presets/cursor/java/hooks/chain-team-phases.sh +381 -0
  309. package/presets/cursor/java/hooks/examples/README.md +18 -0
  310. package/presets/cursor/java/hooks/examples/format-edited.example.sh +11 -0
  311. package/presets/cursor/java/hooks/examples/secret-guard.example.sh +10 -0
  312. package/presets/cursor/java/hooks/examples/test-on-save.example.sh +18 -0
  313. package/presets/cursor/java/hooks/guard-shell-command.sh +80 -0
  314. package/presets/cursor/java/hooks.json +17 -0
  315. package/presets/cursor/java/mcp.json +11 -0
  316. package/presets/cursor/java/rules/README.md +97 -0
  317. package/presets/cursor/java/rules/adapters-driven.mdc +40 -0
  318. package/presets/cursor/java/rules/adapters-driving.mdc +40 -0
  319. package/presets/cursor/java/rules/agent-team-intake.mdc +20 -0
  320. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +173 -0
  321. package/presets/cursor/java/rules/api-grpc.mdc +31 -0
  322. package/presets/cursor/java/rules/api-http.mdc +38 -0
  323. package/presets/cursor/java/rules/application-usecases.mdc +34 -0
  324. package/presets/cursor/java/rules/architecture-boundaries.mdc +30 -0
  325. package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +84 -0
  326. package/presets/cursor/java/rules/code-review-mr.mdc +54 -0
  327. package/presets/cursor/java/rules/composition-root.mdc +33 -0
  328. package/presets/cursor/java/rules/design-guidance.mdc +112 -0
  329. package/presets/cursor/java/rules/domain-layer.mdc +40 -0
  330. package/presets/cursor/java/rules/feature-delivery-workflow.mdc +47 -0
  331. package/presets/cursor/java/rules/java-app-core.mdc +33 -0
  332. package/presets/cursor/java/rules/java-conventions.mdc +54 -0
  333. package/presets/cursor/java/rules/java-tooling.mdc +34 -0
  334. package/presets/cursor/java/rules/messaging-adapters.mdc +26 -0
  335. package/presets/cursor/java/rules/module-public-api.mdc +33 -0
  336. package/presets/cursor/java/rules/persistence-adapters.mdc +35 -0
  337. package/presets/cursor/java/rules/ports-interfaces.mdc +36 -0
  338. package/presets/cursor/java/rules/post-change-test.mdc +30 -0
  339. package/presets/cursor/java/rules/preset-layering.mdc +36 -0
  340. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +56 -0
  341. package/presets/cursor/java/rules/preset-pr-checklist.mdc +39 -0
  342. package/presets/cursor/java/rules/preset-token-budget.mdc +41 -0
  343. package/presets/cursor/java/rules/preset-twin-sync.mdc +44 -0
  344. package/presets/cursor/java/rules/reference-features.mdc +36 -0
  345. package/presets/cursor/java/rules/security-java.mdc +31 -0
  346. package/presets/cursor/java/rules/technical-retro.mdc +14 -0
  347. package/presets/cursor/java/rules/tests-e2e.mdc +24 -0
  348. package/presets/cursor/java/rules/tests-integration.mdc +29 -0
  349. package/presets/cursor/java/rules/tests-unit.mdc +35 -0
  350. package/presets/cursor/java/skills/README.md +5 -0
  351. package/presets/cursor/java/skills/ci-investigation/SKILL.md +11 -0
  352. package/presets/cursor/java/skills/code-review/SKILL.md +25 -0
  353. package/presets/cursor/java/skills/debug-investigation/SKILL.md +15 -0
  354. package/presets/cursor/java/skills/feature-delivery/SKILL.md +30 -0
  355. package/presets/cursor/java/skills/integration-testing/SKILL.md +15 -0
  356. package/presets/cursor/java/skills/technical-retro/SKILL.md +54 -0
  357. package/presets/cursor/java/skills/unit-testing/SKILL.md +14 -0
  358. package/presets/cursor/java/skills/write-adr/SKILL.md +41 -0
  359. package/presets/cursor/java/team/README.md +31 -0
  360. package/presets/cursor/java/team/conventions.md +21 -0
  361. package/presets/cursor/java/team/fixtures/bugfix-standard.json +37 -0
  362. package/presets/cursor/java/team/fixtures/feature-full.json +25 -0
  363. package/presets/cursor/java/team/fixtures/feature-light.json +17 -0
  364. package/presets/cursor/next/AGENTS.md +5 -2
  365. package/presets/cursor/next/README.md +7 -6
  366. package/presets/cursor/next/REPO_AGENTS.md +48 -0
  367. package/presets/cursor/next/agents/README.md +7 -1
  368. package/presets/cursor/next/agents/build-verifier.md +7 -2
  369. package/presets/cursor/next/agents/codebase-analyzer.md +28 -0
  370. package/presets/cursor/next/agents/feature-developer.md +13 -0
  371. package/presets/cursor/next/agents/security-reviewer.md +4 -2
  372. package/presets/cursor/next/commands/README.md +1 -1
  373. package/presets/cursor/next/hooks/README.md +4 -0
  374. package/presets/cursor/next/hooks/examples/README.md +18 -0
  375. package/presets/cursor/next/hooks/examples/format-edited.example.sh +11 -0
  376. package/presets/cursor/next/hooks/examples/secret-guard.example.sh +10 -0
  377. package/presets/cursor/next/hooks/examples/test-on-save.example.sh +8 -0
  378. package/presets/cursor/next/rules/README.md +4 -3
  379. package/presets/cursor/next/rules/agent-team-intake.mdc +1 -1
  380. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +1 -1
  381. package/presets/cursor/next/rules/api-services.mdc +21 -0
  382. package/presets/cursor/next/rules/architecture-boundaries.mdc +27 -0
  383. package/presets/cursor/next/rules/arrow-functions.mdc +13 -28
  384. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +12 -2
  385. package/presets/cursor/next/rules/code-review-mr.mdc +11 -13
  386. package/presets/cursor/next/rules/http-client.mdc +21 -0
  387. package/presets/cursor/next/rules/layer-barrel-exports.mdc +15 -0
  388. package/presets/cursor/next/rules/next-app-router.mdc +13 -1
  389. package/presets/cursor/next/rules/preset-layering.mdc +1 -1
  390. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +6 -4
  391. package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
  392. package/presets/cursor/next/rules/preset-twin-sync.mdc +2 -0
  393. package/presets/cursor/next/rules/public-imports.mdc +14 -0
  394. package/presets/cursor/next/rules/react-ui.mdc +20 -0
  395. package/presets/cursor/next/rules/reference-features.mdc +4 -0
  396. package/presets/cursor/next/rules/security-next.mdc +57 -0
  397. package/presets/cursor/next/rules/store-rtk.mdc +19 -0
  398. package/presets/cursor/next/rules/tests-unit.mdc +12 -0
  399. package/presets/cursor/next/skills/README.md +2 -0
  400. package/presets/cursor/next/skills/code-review/SKILL.md +10 -2
  401. package/presets/cursor/next/skills/feature-delivery/SKILL.md +4 -0
  402. package/presets/cursor/next/skills/react-performance/SKILL.md +44 -0
  403. package/presets/cursor/next/skills/technical-retro/SKILL.md +19 -5
  404. package/presets/cursor/next/skills/write-adr/SKILL.md +41 -0
  405. package/presets/cursor/next/team/conventions.md +21 -0
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Inbound and outbound port interfaces for Java hexagonal services
3
+ paths:
4
+ - "**/ports/**/*"
5
+ - "application/**/*port*"
6
+ - "**/application/**/*port*"
7
+ ---
8
+
9
+ # Ports (interfaces)
10
+
11
+ ## Outbound (driven)
12
+
13
+ - Repository, cache, publisher, clock, ID generator, external client — defined by **application** (owner of the need).
14
+ - Signatures use **domain** types (or small application DTOs), never JPA `@Entity`, JDBC `ResultSet`, or broker message types.
15
+ - Keep interfaces small (ISP); prefer role interfaces over god-repos (`OrderRepository` vs `EverythingRepository`).
16
+ - Do not put Spring Data / JPA repository interfaces in domain; if Spring Data is used, it stays in the outbound adapter and implements (or is wrapped by) the application port.
17
+
18
+ ## Inbound (driving)
19
+
20
+ - Optional interface wrapping use cases for multiple drivers (HTTP + gRPC + CLI + messaging consumer).
21
+ - Drivers depend on inbound ports / use-case APIs — not on each other.
22
+ - Prefer a concrete use-case class when only one driver exists; extract an interface when a second driver appears (Rule of Three / YAGNI).
23
+
24
+ ## Naming
25
+
26
+ - `saveOrder`, `findOrderById`, `publishOrderPlaced` — verb-oriented; match neighboring package style.
27
+ - Implementation types live in adapters (`JpaOrderRepository`, `JdbcOrderRepository`), not beside the interface in domain.
28
+
29
+ ## Anti-patterns
30
+
31
+ - Ports returning untyped `Map<String, Object>`, raw `JsonNode`, or framework entities.
32
+ - Putting port interfaces inside adapter packages (wrong owner — adapters implement, application defines).
33
+ - Leakage of `EntityManager`, `@Entity`, `JdbcTemplate`, or Redis types through port method signatures.
34
+ - One mega-port “for convenience” that every use case depends on.
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Reference paths for Java hexagonal layout (fill after init)
3
+ paths:
4
+ - "src/main/java/**/*"
5
+ - "**/configuration/**"
6
+ - "**/*Application.java"
7
+ ---
8
+ <!-- shared-core: architecture/reference-features.template.md -->
9
+
10
+ # Reference features (Java)
11
+
12
+ Fill concrete paths after adopting this preset in a real service repo. Defaults below match layer-first single-module; adjust for feature-first / multi-module variants.
13
+
14
+ | Area | Example path | Glob hint |
15
+ |------|--------------|-----------|
16
+ | Domain | `src/main/java/<base>/domain/` | `**/domain/**` |
17
+ | Application / ports | `src/main/java/<base>/application/` | `**/application/**` |
18
+ | HTTP adapter | `src/main/java/<base>/adapters/inbound/http/` | `**/adapters/inbound/http/**`, `**/adapters/http/**` |
19
+ | Persistence | `src/main/java/<base>/adapters/outbound/persistence/` | `**/adapters/outbound/persistence/**`, `**/adapters/persistence/**` |
20
+ | Composition root | `…/configuration/`, `*Application.java` | `**/configuration/**`, `**/*Application.java` |
21
+ | Unit tests | `src/test/java/**/*Test.java` | `**/*Test.java`, `**/src/test/java/**` |
22
+ | Integration | `*IT.java` / `*IntegrationTest.java` | `**/*IT.java`, `**/integration/**` |
23
+
24
+ ## Living conventions
25
+
26
+ Post-init gotchas / patterns / decisions: **`.cursor/team/conventions.md`** (and the twin tool path if both Cursor and Claude are installed). Consumer-owned; not always-on. See root `AGENTS.md` § Living conventions.
27
+
28
+ ## Dogfood scenarios
29
+
30
+ 1. `/task` new use case — domain → ports → adapters → wire → `post-change-test`.
31
+ 2. Bug in handler mapping — debugger + MockMvc / controller unit.
32
+ 3. Repository contract — integration-test trio + Testcontainers.
33
+ 4. OpenAPI/proto drift — api-contract-reviewer.
34
+ 5. Secrets in logs — security-reviewer + `security-java`.
@@ -0,0 +1,10 @@
1
+ # Stack
2
+
3
+ Язык, платформа и базовый каркас сервиса. Index only — тела в topic `.md`.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`java-app-core.md`](./java-app-core.md) | `java-app-core.mdc` |
8
+ | [`java-conventions.md`](./java-conventions.md) | `java-conventions.mdc` |
9
+
10
+ Sync: change Cursor → update Claude twin same PR. Full map: [`../README.md`](../README.md).
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: Java/Spring Boot hexagonal stack, module layout, and agent entry points
3
+ ---
4
+
5
+
6
+ # Стек и окружение
7
+
8
+ Версии JDK, Spring Boot и зависимостей — **из `pom.xml` / `build.gradle(.kts)` целевого репозитория**. Рамка preset:
9
+
10
+ - **Язык / платформа:** Java (Maven или Gradle; wrappers `./mvnw` / `./gradlew` предпочтительны).
11
+ - **Default:** Spring Boot **hexagonal** (ports & adapters); domain не знает Spring/JPA/HTTP.
12
+ - **Variants (documented):** plain Java, Quarkus, Micronaut, Jakarta EE — те же границы пакетов.
13
+ - **Layout default:** layer-first single-module; multi-module — documented variant.
14
+ - **Тесты:** JUnit 5 + AssertJ; integration — Testcontainers; REST Assured — optional smoke.
15
+ - **HTTP:** Spring MVC / Jakarta at the edge (примеры, не жёсткий мандат framework).
16
+ - **Static analysis:** discover from repo/CI — do not mandate Checkstyle/SpotBugs/Error Prone.
17
+
18
+ # Структура (default: layer-first)
19
+
20
+ ```text
21
+ src/main/java/<base>/
22
+ domain/
23
+ application/ # use cases + ports
24
+ adapters/inbound/http/
25
+ adapters/outbound/persistence|messaging|external/
26
+ configuration/ # Spring @Configuration / plain composition
27
+ src/test/java/<base>/
28
+ ```
29
+
30
+ **Feature-first variant:** `<feature>/{domain,application,adapters}` — same dependency direction.
31
+
32
+ Границы — **`architecture/boundaries.md`**. Tooling — requestable **`tooling-and-review/java-tooling.md`**. После правок Java — **`tooling-and-review/post-change-test.md`**.
@@ -0,0 +1,52 @@
1
+ ---
2
+ description: Idiomatic Java conventions for this hexagonal preset
3
+ paths:
4
+ - "**/*.java"
5
+ ---
6
+
7
+ # Java conventions
8
+
9
+ - Follow Effective Java and the repository's formatter / static-analysis config when present.
10
+ - Prefer `record` / immutable value types for DTOs and domain VOs when the repo already uses them.
11
+ - Naming: `PascalCase` types, `camelCase` methods/fields, lowercase package segments; match neighboring packages.
12
+ - Prefer package-private by default; expose only what other modules need via public types.
13
+ - Prefer parameterized JUnit 5 tests (`@ParameterizedTest`) when covering multiple cases.
14
+ - Do not invent library APIs — verify symbols against `pom.xml` / `build.gradle(.kts)` and existing imports (`// VERIFY:` when unsure).
15
+
16
+ ## Errors / exceptions
17
+
18
+ - Prefer unchecked exceptions (`RuntimeException` subtypes) for domain/application failures unless the repo's public API requires checked exceptions.
19
+ - Chain causes (`new X(msg, cause)`); never empty-catch without logging or rethrowing.
20
+ - Prefer domain-specific exception types for structured cases; avoid broad `catch (Exception)`.
21
+ - Map to HTTP/gRPC statuses only in adapters — do not throw `ResponseStatusException` from domain.
22
+
23
+ ## Interfaces / ports
24
+
25
+ - Depend on interfaces (ports) at the call site; return concrete types from factories when simple.
26
+ - Keep interfaces small (ISP); define ports in application, not on every adapter class «just in case».
27
+
28
+ ## Packages
29
+
30
+ - Avoid `util`/`common` dumping grounds — name by domain capability.
31
+ - Keep `@SpringBootApplication` / configuration / `main` thin (see `composition-root`).
32
+ - No static mutable request state; no business logic in static initializers.
33
+
34
+ ## Concurrency
35
+
36
+ - Prefer executor / structured patterns already used in the repo; document cancellation (interrupt, reactive cancel, request-scoped cancel).
37
+ - Do not start unbounded threads/executors from handlers without a shutdown/supervision story.
38
+ - Match existing package patterns for locks / concurrent collections — do not invent frameworks.
39
+
40
+ ## Anti-hallucination
41
+
42
+ | ❌ Avoid | ✅ Prefer |
43
+ |---------|----------|
44
+ | Empty `catch` / ignored failures | Handle, wrap with cause, or declare |
45
+ | Interfaces on every class «just in case» | Ports at consumer / call site |
46
+ | Invented modules not in `pom.xml` / `build.gradle` | Add dependency explicitly or copy existing import |
47
+ | Raw `Object` / untyped `Map` where a typed type fits | Generics / records / domain types used by the repo |
48
+ | Business logic in static initializers | Wire in composition root / Spring config |
49
+
50
+ ## Agent requirement
51
+
52
+ New Java code must stay idiomatic and verifiable against `pom.xml` / `build.gradle` and neighboring packages. Less guessed code is better than more.
@@ -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,22 @@
1
+ ---
2
+ description: End-to-end HTTP smoke tests for Java services (optional)
3
+ paths:
4
+ - "**/e2e/**/*.java"
5
+ - "**/*E2ETest.java"
6
+ - "**/*SmokeTest.java"
7
+ ---
8
+
9
+ # E2E / HTTP smoke (optional)
10
+
11
+ > Prefer **`tests-integration`** + `integration-test-*` for adapter contracts. E2E smoke is optional breadth — do not build a browser suite.
12
+
13
+ - Black-box against a running server (`@SpringBootTest` + Testcontainers with full composition root, or localhost in CI).
14
+ - Cover critical paths only; prefer integration + unit for breadth.
15
+ - REST Assured / WebTestClient are optional HTTP smoke tools when already in the repo — not a mandated framework.
16
+ - Stable test data; avoid depending on wall-clock flakiness.
17
+ - Do **not** use browser/Playwright/XCUITest tooling in this preset.
18
+
19
+ ## Placement
20
+
21
+ - `e2e/` package or `*E2ETest.java` / `*SmokeTest.java` under `src/test/java` if the repo separates smoke jobs.
22
+ - Keep Failsafe/Gradle smoke tags honest — do not mark unit tests as e2e.
@@ -0,0 +1,27 @@
1
+ ---
2
+ description: Integration / adapter contract tests for Java hexagonal services
3
+ paths:
4
+ - "**/*IT.java"
5
+ - "**/*IntegrationTest.java"
6
+ - "**/integration/**"
7
+ - "**/src/test/java/**/*IT.java"
8
+ ---
9
+
10
+ # Integration tests
11
+
12
+ - Exercise driven adapters against real infra doubles (**Testcontainers**, docker compose test DB, WireMock, etc.).
13
+ - Or exercise HTTP adapter with `MockMvc` / WebTestClient / Spring Boot **test slices** + wired use case + fake/real ports — still no full prod cluster required.
14
+ - Use Surefire/Failsafe (or Gradle test filters) if the repo separates CI unit vs integration jobs.
15
+ - Keep fixtures deterministic; clean up data between tests.
16
+ - Prefer testing through the **port implementation** (save/load roundtrip) over asserting on private JPA internals.
17
+
18
+ ## Scope
19
+
20
+ - Contract of a port implementation (repo save/load, outbound client mapping).
21
+ - Not a substitute for domain unit tests.
22
+ - Full `@SpringBootTest` only when slices cannot prove the contract.
23
+
24
+ ## Agents
25
+
26
+ - Planning/generation: `integration-test-{planner,generator,healer}` + skill `integration-testing` (Phase C surface).
27
+ - Prefer integration-test agents over inventing browser e2e for backend contracts.
@@ -0,0 +1,33 @@
1
+ ---
2
+ description: Unit testing conventions for Java hexagonal services
3
+ paths:
4
+ - "**/*Test.java"
5
+ - "**/*Tests.java"
6
+ - "**/src/test/java/**"
7
+ ---
8
+
9
+ # Unit tests
10
+
11
+ - Prefer **JUnit 5**; clear arrange/act/assert (or Given/When/Then).
12
+ - Domain and application: mock/fake **ports** only — no real DB/network.
13
+ - Prefer fakes over heavy mocking when simple; **Mockito** is optional when the repo already uses it.
14
+ - Prefer **AssertJ** fluent assertions when already on the classpath; otherwise JUnit assertions are fine.
15
+ - Skip integration/e2e files matching `*IT.java`, `*IntegrationTest.java`, `*E2ETest.java`, `*SmokeTest.java`, or dirs `integration/`, `e2e/` — those use other rules.
16
+
17
+ ## Scope
18
+
19
+ - Domain factories/invariants; application use cases with port fakes; pure mappers.
20
+ - Adapter unit tests may use `MockMvc` + mocked use case — still no live DB.
21
+
22
+ ## Forbidden smells
23
+
24
+ - `HttpServletRequest` / `ServerHttpRequest` / Spring MVC types in **domain** tests.
25
+ - SQL or live HTTP in use-case unit tests.
26
+ - Brittle tests on package-private adapter internals without need.
27
+ - Loading a full `@SpringBootTest` for a pure domain/unit case.
28
+ - Structural smells vocabulary (Feature Envy, Message Chains, …): see requestable `design-guidance` — do not duplicate the catalog here.
29
+
30
+ ## Naming
31
+
32
+ - `UseCaseDoXTest` / `EntityInvariantTest` (or `*Tests` if the repo already uses that suffix).
33
+ - Match Surefire patterns the CI already uses.
@@ -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
+ | [`java-tooling.md`](./java-tooling.md) | `java-tooling.mdc` |
11
+ | [`security-java.md`](./security-java.md) | `security-java.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,26 @@
1
+ ---
2
+ description: Suggest /task for Java backend work requests
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - "**/*.java"
7
+ - src/main/java/**/*
8
+ - "**/configuration/**"
9
+ - "**/*Application.java"
10
+ ---
11
+
12
+ <!-- shared-core: agent-team/agent-team-intake.md -->
13
+
14
+ # Agent team intake
15
+
16
+ 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:
17
+
18
+ 1. Prefer **`/task <their request>`** or invoke **task-router** first.
19
+ 2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
20
+ 3. Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
21
+
22
+ Exceptions: user explicitly says «без pipeline», «просто сделай», or continues an active slug.
23
+
24
+ ## Stack notes
25
+
26
+ - Scope: Java services (`src/main/java/**`, `configuration/`, `*Application.java`) — hexagonal ports/adapters — not Playwright/XCUITest UI flows.
@@ -0,0 +1,179 @@
1
+ ---
2
+ description: Orchestrates the agent team via task-router and pipeline.json for Java presets
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - "**/*.java"
7
+ - src/main/java/**/*
8
+ - "**/configuration/**"
9
+ - "**/*Application.java"
10
+ ---
11
+
12
+ <!-- shared-core: agent-team/agent-team-orchestrator.md -->
13
+
14
+ # Agent team orchestrator
15
+
16
+ Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.cursor/team/tasks/<slug>/` (Claude: `.claude/team/tasks/<slug>/`).
17
+
18
+ Work request без `/task` — см. **agent-team-intake** (когда предлагать router вместо прямого кодинга).
19
+
20
+ ## Entry points
21
+
22
+ | Command | When |
23
+ |---------|------|
24
+ | **`/task <desc>`** | **Preferred** — router → dynamic pipeline → first agent |
25
+ | `/task-continue <slug>` | After human gate or pause |
26
+ | `/feature-start <desc>` | Legacy: analyst-only start (no router) |
27
+ | `/feature-continue <slug>` | Alias of task-continue |
28
+ | `/technical-retro [slug]` | Retro with agent team block |
29
+
30
+ ## Roles (shared catalog)
31
+
32
+ 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:
33
+
34
+ | Kind | Examples (names vary by stack) |
35
+ |------|--------------------------------|
36
+ | Planning | `task-router`, `task-analyst`, `solution-architect`, `migration-specialist` |
37
+ | Implementation | `feature-developer`, `debugger`, `ci-investigator` |
38
+ | Gates / review | `build-verifier`, `code-reviewer`, `security-reviewer`, `performance-auditor` (no `accessibility-reviewer`) |
39
+ | Tests | unit planner/generator/healer; e2e/UI planner/generator/healer (stack-native) |
40
+ | Docs | `tech-writer` |
41
+
42
+ **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`.
43
+
44
+ Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`.
45
+
46
+ ## Dynamic pipeline
47
+
48
+ ```mermaid
49
+ flowchart TD
50
+ task["/task prompt"]
51
+ router["task-router"]
52
+ pipeline["pipeline.json"]
53
+ step0["steps 0..N"]
54
+ gate{"humanGates?"}
55
+ hook["subagentStop hook"]
56
+ retro["/technical-retro"]
57
+
58
+ task --> router
59
+ router --> pipeline
60
+ pipeline --> step0
61
+ step0 --> gate
62
+ gate -->|"/task-continue"| step0
63
+ step0 --> hook
64
+ hook --> step0
65
+ step0 --> retro
66
+ ```
67
+
68
+ **Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
69
+
70
+ ## status.json (pipeline mode)
71
+
72
+ ```json
73
+ {
74
+ "slug": "...",
75
+ "intent": "feature",
76
+ "pipelineIndex": 0,
77
+ "currentAgent": "task-analyst",
78
+ "phase": "executing",
79
+ "state": "in_progress",
80
+ "awaitingHumanGate": false
81
+ }
82
+ ```
83
+
84
+ | state | Meaning |
85
+ |-------|---------|
86
+ | `in_progress` | Current step running |
87
+ | `completed` | Current step done; hook advances |
88
+ | `awaiting_approval` | Human gate; wait for `/task-continue` |
89
+ | `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
90
+ | `validation_failed` | build-verifier failed; re-run developer then build-verifier |
91
+
92
+ ## Pipeline step options
93
+
94
+ | Field | Use |
95
+ |-------|-----|
96
+ | `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
97
+ | `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
98
+ | `scope` | e.g. `unit-in-dev`, `e2e-only`, `preset-artifacts-only` — passed to developer/qa |
99
+ | `model` | `cheap` \| `standard` \| `strong` — optional tier override |
100
+
101
+ ## Rules (strict)
102
+
103
+ 1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline).
104
+ 2. Read `pipeline.json` before every subagent invocation.
105
+ 3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
106
+ 4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
107
+ 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`).
108
+ 6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
109
+ 7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
110
+ 8. When all steps complete, suggest `/technical-retro <slug>`.
111
+ 9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
112
+
113
+ ## Team artifact I/O (Cursor Shell sandbox)
114
+
115
+ - 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).
116
+ - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
117
+ - Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
118
+
119
+ ## Invoking agents
120
+
121
+ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
122
+
123
+ ### Model when invoking (Task)
124
+
125
+ 1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
126
+ 2. Map abstract tiers:
127
+ - **`cheap`** → pass Task `model: "fast"` when the tool accepts it (or rely on agent `fast`).
128
+ - **`standard`** → omit Task `model` (frontmatter `inherit` / mid default).
129
+ - **`strong`** → **never** pass `fast`; rely on agent pin or parent Max model.
130
+ 3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
131
+
132
+ After each agent completes, ensure `status.json` has `state: completed` (or `awaiting_approval` if gate applies).
133
+
134
+ ## Legacy mode
135
+
136
+ If `pipeline.json` is missing (old `/feature-start` tasks), fall back to fixed phases: analysis → development → review → testing. Hook supports both.
137
+
138
+ ## Skip pipeline when
139
+
140
+ Do **not** run `/task` + router for:
141
+
142
+ - Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** for deep traces; inline OK for trivial one-liners.
143
+ - Typo / one-file fix / trivial config with no architecture risk.
144
+ - User explicitly says «без pipeline», «просто сделай», or continues an active slug.
145
+ - Single-line `docs-only` with no code impact.
146
+
147
+ Borderline work requests — см. **agent-team-intake**.
148
+
149
+ ## Auto-detection (optional)
150
+
151
+ When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
152
+
153
+ ## Preset authoring
154
+
155
+ 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**.
156
+
157
+ ## Stack notes
158
+
159
+ ### Roles (Java hexagonal — 21 agents)
160
+
161
+ | Kind | Agents | Writes |
162
+ |------|--------|--------|
163
+ | Planning | `task-router`, `task-analyst`, `solution-architect` | team only |
164
+ | Analysis | `codebase-analyzer` | explain-as-is only |
165
+ | Implementation | `feature-developer`, `debugger`, `ci-investigator` | sources / minimal |
166
+ | Gates | `build-verifier` | `validation-report.md` only |
167
+ | Review | `code-reviewer`, `security-reviewer`, `performance-auditor`, `api-contract-reviewer`, `migration-specialist` | team / plans |
168
+ | Docs | `tech-writer` | docs |
169
+ | Unit tests | `unit-test-{planner,generator,healer}`, `qa-tester` | tests |
170
+ | Integration | `integration-test-{planner,generator,healer}` | adapter/IT tests |
171
+
172
+ **No** `accessibility-reviewer`, Playwright, or XCUITest. Replace those intents with **`integration-test-*`**.
173
+
174
+ ### Handoffs / gates
175
+
176
+ - Scope: Java hexagonal (`src/main/java` domain|application|adapters, `configuration/` / `*Application.java`) — not Next `app/src` or iOS `Features/`.
177
+ - After Java code changes, pipeline includes **build-verifier** with `mvn test` / `./gradlew test` + `post-change-test` / `java-tooling` (static analysis only if repo/CI already configures it).
178
+ - Chain hook handoffs: `integration-test-*`, `post-change-test`, `java-tooling` — never `lint:js`, Playwright, XCUITest, or `xcodebuild`.
179
+ - Skills: `feature-delivery`, `unit-testing`, `integration-testing`, `ci-investigation`, `debug-investigation`, `code-review`, `technical-retro`, `write-adr`.
@@ -0,0 +1,83 @@
1
+ ---
2
+ description: Code quality and light refactoring for Java 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
+ ## Agent discipline (anti-sycophancy)
65
+
66
+ - Unverifiable third-party API → mark `// VERIFY: lib.symbol @ version` (or stack equivalent) and surface uncertainty; never invent signatures.
67
+ - Before «is this correct?» — list ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
68
+ - Refactor without tests → propose a characterization test first; if declined, label `UNTESTED`.
69
+ - Comments = WHY only when non-obvious; ban self-referential «added for issue Y» comments.
70
+ - Urgency/authority pressure: name the technical trade-off once, then comply — no apology loops.
71
+ - Match verification depth to risk; report status by what was **verified**, not attempted.
72
+
73
+ Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**; do not invent a parallel style bible in this core body.
74
+
75
+ > Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
76
+ ## Stack notes
77
+
78
+ - **No UI layer in this preset** — ignore shared-core bullets about дизайн‑система / UI‑пакеты / CSS‑токены; apply public-API and boy-scout rules to Java packages/ports instead.
79
+ - Public API between packages: exported types in module API or explicit ports — avoid deep imports of another feature's internals.
80
+ - Prefer checked/unchecked exceptions with clear translation at adapter edges; do not leak persistence exceptions upward.
81
+ - Interfaces belong at **ports** (consumer side), not on every class; prefer composition over inheritance.
82
+ - Post-change gate: **`post-change-test.mdc`** + **`java-tooling.mdc`** (not yarn lint / xcodebuild / Playwright).
83
+ - Style/static analysis: use **repository/CI** formatter and checks — do not invent a parallel Checkstyle/SpotBugs bible in rules.
@@ -0,0 +1,59 @@
1
+ ---
2
+ description: Code review checklist for Java hexagonal merge requests
3
+ paths:
4
+ - .cursor/team/**/*
5
+ - .claude/team/**/*
6
+ - "**/*.java"
7
+ - src/main/java/**/*
8
+ - src/test/java/**/*
9
+ - "**/configuration/**"
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
+ ## Output contract
44
+
45
+ Procedure details live in skill `code-review`. Required shape:
46
+
47
+ - Each finding cites **`path:line`**, the problem, impact, and a concrete fix direction.
48
+ - Rank by severity: **`blocker` | `important` | `nit`** (list blocker → nit).
49
+ - Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
50
+ - End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
51
+
52
+ ## Stack notes
53
+
54
+ - Hexagonal boundaries: `architecture-boundaries`, `domain-layer`, ports vs adapters; Spring/JPA only at edges.
55
+ - HTTP DTO validation/mapping and persistence entity isolation: `api-http`, `persistence-adapters`.
56
+ - Composition root (`configuration/`, `*Application.java`) has no business logic.
57
+ - Tests: `tests-unit` (JUnit 5), `tests-integration` (Testcontainers); post-change: `post-change-test` / `java-tooling`.
58
+ - Security: secrets/PII/`security-java`; Spring Security config stays out of domain.
59
+ - Never require Playwright, XCUITest, `lint:js`, or `xcodebuild` for Java MRs.