@bonesofspring/ai-rules 0.2.7 → 0.2.9

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 (273) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/README.md +4 -2
  3. package/bin/cli.js +2 -0
  4. package/package.json +1 -1
  5. package/presets/_shared/README.md +2 -2
  6. package/presets/_shared/core/meta/preset-layering.md +1 -1
  7. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +6 -4
  8. package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
  9. package/presets/_shared/core/meta/preset-twin-sync.md +2 -0
  10. package/presets/_shared/core/quality/anti-sycophancy-discipline.md +21 -0
  11. package/presets/_shared/core/quality/code-quality-and-refactoring.md +21 -52
  12. package/presets/claude/go/agents/build-verifier.md +5 -5
  13. package/presets/claude/go/agents/ci-investigator.md +4 -0
  14. package/presets/claude/go/agents/debugger.md +4 -0
  15. package/presets/claude/go/agents/feature-developer.md +4 -0
  16. package/presets/claude/go/rules/README.md +1 -0
  17. package/presets/claude/go/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  18. package/presets/claude/go/rules/tooling-and-review/code-quality.md +22 -53
  19. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
  20. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -8
  21. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  22. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +2 -0
  23. package/presets/claude/go/team/fixtures/feature-full.json +5 -23
  24. package/presets/claude/ios-swift/agents/build-verifier.md +6 -7
  25. package/presets/claude/ios-swift/agents/ci-investigator.md +4 -0
  26. package/presets/claude/ios-swift/agents/debugger.md +4 -0
  27. package/presets/claude/ios-swift/agents/feature-developer.md +4 -0
  28. package/presets/claude/ios-swift/rules/README.md +2 -0
  29. package/presets/claude/ios-swift/rules/stack/ios-app-core.md +5 -28
  30. package/presets/claude/ios-swift/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  31. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +23 -54
  32. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +1 -1
  33. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -4
  34. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  35. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +2 -0
  36. package/presets/claude/java/CLAUDE.md +29 -0
  37. package/presets/claude/java/MCP.md +13 -0
  38. package/presets/claude/java/README.md +26 -0
  39. package/presets/claude/java/REPO_AGENTS.md +45 -0
  40. package/presets/claude/java/agents/README.md +32 -0
  41. package/presets/claude/java/agents/api-contract-reviewer.md +23 -0
  42. package/presets/claude/java/agents/build-verifier.md +45 -0
  43. package/presets/claude/java/agents/ci-investigator.md +21 -0
  44. package/presets/claude/java/agents/code-reviewer.md +40 -0
  45. package/presets/claude/java/agents/codebase-analyzer.md +28 -0
  46. package/presets/claude/java/agents/debugger.md +29 -0
  47. package/presets/claude/java/agents/feature-developer.md +47 -0
  48. package/presets/claude/java/agents/integration-test-generator.md +22 -0
  49. package/presets/claude/java/agents/integration-test-healer.md +22 -0
  50. package/presets/claude/java/agents/integration-test-planner.md +22 -0
  51. package/presets/claude/java/agents/migration-specialist.md +31 -0
  52. package/presets/claude/java/agents/performance-auditor.md +22 -0
  53. package/presets/claude/java/agents/qa-tester.md +24 -0
  54. package/presets/claude/java/agents/security-reviewer.md +20 -0
  55. package/presets/claude/java/agents/solution-architect.md +28 -0
  56. package/presets/claude/java/agents/task-analyst.md +25 -0
  57. package/presets/claude/java/agents/task-router.md +69 -0
  58. package/presets/claude/java/agents/tech-writer.md +15 -0
  59. package/presets/claude/java/agents/unit-test-generator.md +21 -0
  60. package/presets/claude/java/agents/unit-test-healer.md +13 -0
  61. package/presets/claude/java/agents/unit-test-planner.md +26 -0
  62. package/presets/claude/java/commands/README.md +13 -0
  63. package/presets/claude/java/commands/feature-continue.md +51 -0
  64. package/presets/claude/java/commands/feature-start.md +30 -0
  65. package/presets/claude/java/commands/task-continue.md +49 -0
  66. package/presets/claude/java/commands/task.md +49 -0
  67. package/presets/claude/java/commands/technical-retro.md +58 -0
  68. package/presets/claude/java/hooks/README.md +16 -0
  69. package/presets/claude/java/hooks/chain-team-phases.sh +381 -0
  70. package/presets/claude/java/hooks/examples/README.md +18 -0
  71. package/presets/claude/java/hooks/examples/format-edited.example.sh +11 -0
  72. package/presets/claude/java/hooks/examples/secret-guard.example.sh +10 -0
  73. package/presets/claude/java/hooks/examples/test-on-save.example.sh +18 -0
  74. package/presets/claude/java/hooks/guard-shell-command.sh +80 -0
  75. package/presets/claude/java/mcp.json +11 -0
  76. package/presets/claude/java/rules/README.md +61 -0
  77. package/presets/claude/java/rules/api-and-data/README.md +14 -0
  78. package/presets/claude/java/rules/api-and-data/adapters-driven.md +38 -0
  79. package/presets/claude/java/rules/api-and-data/adapters-driving.md +38 -0
  80. package/presets/claude/java/rules/api-and-data/api-grpc.md +29 -0
  81. package/presets/claude/java/rules/api-and-data/api-http.md +36 -0
  82. package/presets/claude/java/rules/api-and-data/messaging-adapters.md +24 -0
  83. package/presets/claude/java/rules/api-and-data/persistence-adapters.md +33 -0
  84. package/presets/claude/java/rules/architecture/README.md +16 -0
  85. package/presets/claude/java/rules/architecture/application-usecases.md +32 -0
  86. package/presets/claude/java/rules/architecture/boundaries.md +29 -0
  87. package/presets/claude/java/rules/architecture/composition-root.md +31 -0
  88. package/presets/claude/java/rules/architecture/domain-layer.md +38 -0
  89. package/presets/claude/java/rules/architecture/feature-delivery.md +52 -0
  90. package/presets/claude/java/rules/architecture/module-public-api.md +31 -0
  91. package/presets/claude/java/rules/architecture/ports-interfaces.md +34 -0
  92. package/presets/claude/java/rules/architecture/reference-features.md +34 -0
  93. package/presets/claude/java/rules/stack/README.md +10 -0
  94. package/presets/claude/java/rules/stack/java-app-core.md +32 -0
  95. package/presets/claude/java/rules/stack/java-conventions.md +52 -0
  96. package/presets/claude/java/rules/testing/README.md +11 -0
  97. package/presets/claude/java/rules/testing/e2e.md +22 -0
  98. package/presets/claude/java/rules/testing/integration.md +27 -0
  99. package/presets/claude/java/rules/testing/unit.md +33 -0
  100. package/presets/claude/java/rules/tooling-and-review/README.md +21 -0
  101. package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +26 -0
  102. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +179 -0
  103. package/presets/claude/java/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  104. package/presets/claude/java/rules/tooling-and-review/code-quality.md +52 -0
  105. package/presets/claude/java/rules/tooling-and-review/code-review.md +59 -0
  106. package/presets/claude/java/rules/tooling-and-review/design-guidance.md +110 -0
  107. package/presets/claude/java/rules/tooling-and-review/java-tooling.md +36 -0
  108. package/presets/claude/java/rules/tooling-and-review/post-change-test.md +32 -0
  109. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +36 -0
  110. package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +56 -0
  111. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  112. package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +41 -0
  113. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +44 -0
  114. package/presets/claude/java/rules/tooling-and-review/security-java.md +29 -0
  115. package/presets/claude/java/rules/tooling-and-review/technical-retro.md +20 -0
  116. package/presets/claude/java/rules/ui-and-accessibility/README.md +5 -0
  117. package/presets/claude/java/skills/README.md +5 -0
  118. package/presets/claude/java/skills/ci-investigation/SKILL.md +11 -0
  119. package/presets/claude/java/skills/code-review/SKILL.md +25 -0
  120. package/presets/claude/java/skills/debug-investigation/SKILL.md +15 -0
  121. package/presets/claude/java/skills/feature-delivery/SKILL.md +30 -0
  122. package/presets/claude/java/skills/integration-testing/SKILL.md +15 -0
  123. package/presets/claude/java/skills/technical-retro/SKILL.md +54 -0
  124. package/presets/claude/java/skills/unit-testing/SKILL.md +14 -0
  125. package/presets/claude/java/skills/write-adr/SKILL.md +41 -0
  126. package/presets/claude/java/team/README.md +27 -0
  127. package/presets/claude/java/team/conventions.md +21 -0
  128. package/presets/claude/java/team/fixtures/bugfix-standard.json +37 -0
  129. package/presets/claude/java/team/fixtures/feature-full.json +25 -0
  130. package/presets/claude/java/team/fixtures/feature-light.json +17 -0
  131. package/presets/claude/next/agents/build-verifier.md +4 -4
  132. package/presets/claude/next/agents/ci-investigator.md +4 -0
  133. package/presets/claude/next/agents/debugger.md +4 -0
  134. package/presets/claude/next/agents/feature-developer.md +8 -0
  135. package/presets/claude/next/rules/README.md +5 -1
  136. package/presets/claude/next/rules/anti-hallucination/react-next-anti-hallucination.md +67 -0
  137. package/presets/claude/next/rules/stack/next-app-router.md +2 -0
  138. package/presets/claude/next/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  139. package/presets/claude/next/rules/tooling-and-review/code-quality.md +25 -55
  140. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +1 -1
  141. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -4
  142. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  143. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +2 -0
  144. package/presets/claude/next/skills/feature-delivery/SKILL.md +4 -0
  145. package/presets/cursor/go/agents/build-verifier.md +5 -5
  146. package/presets/cursor/go/agents/ci-investigator.md +4 -0
  147. package/presets/cursor/go/agents/debugger.md +4 -0
  148. package/presets/cursor/go/agents/feature-developer.md +4 -0
  149. package/presets/cursor/go/rules/README.md +3 -1
  150. package/presets/cursor/go/rules/anti-sycophancy-discipline.mdc +30 -0
  151. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +21 -52
  152. package/presets/cursor/go/rules/preset-layering.mdc +1 -1
  153. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +6 -8
  154. package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
  155. package/presets/cursor/go/rules/preset-twin-sync.mdc +2 -0
  156. package/presets/cursor/go/team/fixtures/feature-full.json +5 -23
  157. package/presets/cursor/ios-swift/agents/build-verifier.md +6 -7
  158. package/presets/cursor/ios-swift/agents/ci-investigator.md +4 -0
  159. package/presets/cursor/ios-swift/agents/debugger.md +4 -0
  160. package/presets/cursor/ios-swift/agents/feature-developer.md +4 -0
  161. package/presets/cursor/ios-swift/rules/README.md +3 -1
  162. package/presets/cursor/ios-swift/rules/anti-sycophancy-discipline.mdc +30 -0
  163. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +21 -52
  164. package/presets/cursor/ios-swift/rules/ios-app-core.mdc +5 -28
  165. package/presets/cursor/ios-swift/rules/preset-layering.mdc +1 -1
  166. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +6 -4
  167. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
  168. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +2 -0
  169. package/presets/cursor/java/AGENTS.md +37 -0
  170. package/presets/cursor/java/BUGBOT.md +11 -0
  171. package/presets/cursor/java/MCP.md +15 -0
  172. package/presets/cursor/java/README.md +26 -0
  173. package/presets/cursor/java/REPO_AGENTS.md +45 -0
  174. package/presets/cursor/java/agents/README.md +36 -0
  175. package/presets/cursor/java/agents/api-contract-reviewer.md +23 -0
  176. package/presets/cursor/java/agents/build-verifier.md +45 -0
  177. package/presets/cursor/java/agents/ci-investigator.md +21 -0
  178. package/presets/cursor/java/agents/code-reviewer.md +40 -0
  179. package/presets/cursor/java/agents/codebase-analyzer.md +28 -0
  180. package/presets/cursor/java/agents/debugger.md +29 -0
  181. package/presets/cursor/java/agents/feature-developer.md +47 -0
  182. package/presets/cursor/java/agents/integration-test-generator.md +22 -0
  183. package/presets/cursor/java/agents/integration-test-healer.md +22 -0
  184. package/presets/cursor/java/agents/integration-test-planner.md +22 -0
  185. package/presets/cursor/java/agents/migration-specialist.md +31 -0
  186. package/presets/cursor/java/agents/performance-auditor.md +22 -0
  187. package/presets/cursor/java/agents/qa-tester.md +24 -0
  188. package/presets/cursor/java/agents/security-reviewer.md +20 -0
  189. package/presets/cursor/java/agents/solution-architect.md +28 -0
  190. package/presets/cursor/java/agents/task-analyst.md +25 -0
  191. package/presets/cursor/java/agents/task-router.md +69 -0
  192. package/presets/cursor/java/agents/tech-writer.md +15 -0
  193. package/presets/cursor/java/agents/unit-test-generator.md +21 -0
  194. package/presets/cursor/java/agents/unit-test-healer.md +13 -0
  195. package/presets/cursor/java/agents/unit-test-planner.md +26 -0
  196. package/presets/cursor/java/commands/README.md +54 -0
  197. package/presets/cursor/java/commands/feature-continue.md +19 -0
  198. package/presets/cursor/java/commands/feature-start.md +33 -0
  199. package/presets/cursor/java/commands/task-continue.md +49 -0
  200. package/presets/cursor/java/commands/task.md +49 -0
  201. package/presets/cursor/java/commands/technical-retro.md +81 -0
  202. package/presets/cursor/java/hooks/README.md +12 -0
  203. package/presets/cursor/java/hooks/chain-team-phases.sh +381 -0
  204. package/presets/cursor/java/hooks/examples/README.md +18 -0
  205. package/presets/cursor/java/hooks/examples/format-edited.example.sh +11 -0
  206. package/presets/cursor/java/hooks/examples/secret-guard.example.sh +10 -0
  207. package/presets/cursor/java/hooks/examples/test-on-save.example.sh +18 -0
  208. package/presets/cursor/java/hooks/guard-shell-command.sh +80 -0
  209. package/presets/cursor/java/hooks.json +17 -0
  210. package/presets/cursor/java/mcp.json +11 -0
  211. package/presets/cursor/java/rules/README.md +99 -0
  212. package/presets/cursor/java/rules/adapters-driven.mdc +40 -0
  213. package/presets/cursor/java/rules/adapters-driving.mdc +40 -0
  214. package/presets/cursor/java/rules/agent-team-intake.mdc +20 -0
  215. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +173 -0
  216. package/presets/cursor/java/rules/anti-sycophancy-discipline.mdc +30 -0
  217. package/presets/cursor/java/rules/api-grpc.mdc +31 -0
  218. package/presets/cursor/java/rules/api-http.mdc +38 -0
  219. package/presets/cursor/java/rules/application-usecases.mdc +34 -0
  220. package/presets/cursor/java/rules/architecture-boundaries.mdc +30 -0
  221. package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +53 -0
  222. package/presets/cursor/java/rules/code-review-mr.mdc +54 -0
  223. package/presets/cursor/java/rules/composition-root.mdc +33 -0
  224. package/presets/cursor/java/rules/design-guidance.mdc +112 -0
  225. package/presets/cursor/java/rules/domain-layer.mdc +40 -0
  226. package/presets/cursor/java/rules/feature-delivery-workflow.mdc +47 -0
  227. package/presets/cursor/java/rules/java-app-core.mdc +33 -0
  228. package/presets/cursor/java/rules/java-conventions.mdc +54 -0
  229. package/presets/cursor/java/rules/java-tooling.mdc +34 -0
  230. package/presets/cursor/java/rules/messaging-adapters.mdc +26 -0
  231. package/presets/cursor/java/rules/module-public-api.mdc +33 -0
  232. package/presets/cursor/java/rules/persistence-adapters.mdc +35 -0
  233. package/presets/cursor/java/rules/ports-interfaces.mdc +36 -0
  234. package/presets/cursor/java/rules/post-change-test.mdc +30 -0
  235. package/presets/cursor/java/rules/preset-layering.mdc +36 -0
  236. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +56 -0
  237. package/presets/cursor/java/rules/preset-pr-checklist.mdc +39 -0
  238. package/presets/cursor/java/rules/preset-token-budget.mdc +41 -0
  239. package/presets/cursor/java/rules/preset-twin-sync.mdc +44 -0
  240. package/presets/cursor/java/rules/reference-features.mdc +36 -0
  241. package/presets/cursor/java/rules/security-java.mdc +31 -0
  242. package/presets/cursor/java/rules/technical-retro.mdc +14 -0
  243. package/presets/cursor/java/rules/tests-e2e.mdc +24 -0
  244. package/presets/cursor/java/rules/tests-integration.mdc +29 -0
  245. package/presets/cursor/java/rules/tests-unit.mdc +35 -0
  246. package/presets/cursor/java/skills/README.md +5 -0
  247. package/presets/cursor/java/skills/ci-investigation/SKILL.md +11 -0
  248. package/presets/cursor/java/skills/code-review/SKILL.md +25 -0
  249. package/presets/cursor/java/skills/debug-investigation/SKILL.md +15 -0
  250. package/presets/cursor/java/skills/feature-delivery/SKILL.md +30 -0
  251. package/presets/cursor/java/skills/integration-testing/SKILL.md +15 -0
  252. package/presets/cursor/java/skills/technical-retro/SKILL.md +54 -0
  253. package/presets/cursor/java/skills/unit-testing/SKILL.md +14 -0
  254. package/presets/cursor/java/skills/write-adr/SKILL.md +41 -0
  255. package/presets/cursor/java/team/README.md +31 -0
  256. package/presets/cursor/java/team/conventions.md +21 -0
  257. package/presets/cursor/java/team/fixtures/bugfix-standard.json +37 -0
  258. package/presets/cursor/java/team/fixtures/feature-full.json +25 -0
  259. package/presets/cursor/java/team/fixtures/feature-light.json +17 -0
  260. package/presets/cursor/next/agents/build-verifier.md +4 -4
  261. package/presets/cursor/next/agents/ci-investigator.md +4 -0
  262. package/presets/cursor/next/agents/debugger.md +4 -0
  263. package/presets/cursor/next/agents/feature-developer.md +8 -0
  264. package/presets/cursor/next/rules/README.md +4 -2
  265. package/presets/cursor/next/rules/anti-sycophancy-discipline.mdc +30 -0
  266. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +21 -52
  267. package/presets/cursor/next/rules/next-app-router.mdc +2 -0
  268. package/presets/cursor/next/rules/preset-layering.mdc +1 -1
  269. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +6 -4
  270. package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
  271. package/presets/cursor/next/rules/preset-twin-sync.mdc +2 -0
  272. package/presets/cursor/next/rules/react-next-anti-hallucination.mdc +66 -0
  273. package/presets/cursor/next/skills/feature-delivery/SKILL.md +4 -0
@@ -17,7 +17,7 @@ alwaysApply: false
17
17
 
18
18
  - [ ] **SoT:** правки в `packages/…` (не только root `.cursor/`)
19
19
  - [ ] **Core:** если менялся `_shared/core/**` — обновлены все `<!-- shared-core: … -->` consumers (или documented intentional fork)
20
- - [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, and go — см. `preset-twin-sync`)
20
+ - [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, go, and java — см. `preset-twin-sync`)
21
21
  - [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table актуален
22
22
  - [ ] **Token budget:** alwaysApply / session-start ≤ 3; meta rules not always-on
23
23
  - [ ] **Leakage:** нет чужих stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
@@ -20,6 +20,7 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
20
20
  | `next` | `presets/cursor/next/rules/*.mdc` | `presets/claude/next/rules/<topic>/` | **Required** in `claude/next/rules/README.md` |
21
21
  | `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Keep in `claude/ios-swift/rules/README.md` |
22
22
  | `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
23
+ | `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Keep in `claude/java/rules/README.md` |
23
24
 
24
25
  ## Same-PR checklist
25
26
 
@@ -38,5 +39,6 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
38
39
  - **next:** missing Claude twin for a changed Cursor rule → **FAIL** (mapping table required).
39
40
  - **ios-swift:** missing Claude twin for a changed Cursor rule → **FAIL**.
40
41
  - **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
42
+ - **java:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go; mapping table required).
41
43
 
42
44
  Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
@@ -0,0 +1,37 @@
1
+ # Java hexagonal stack — Cursor agent team
2
+
3
+ **Repo-root agents:** see [`AGENTS.md`](../../AGENTS.md) at the project root (cross-tool setup, commands, security, living conventions pointers).
4
+
5
+ | Задача | Куда смотреть |
6
+ |--------|----------------|
7
+ | Новая work-задача | `/task` → `commands/task.md` + `agent-team-orchestrator.mdc` |
8
+ | Фича end-to-end | skill `feature-delivery` + `feature-delivery-workflow.mdc` |
9
+ | Стек и слои | `java-app-core.mdc`, `architecture-boundaries.mdc` |
10
+ | После правок Java | `post-change-test.mdc` (+ `java-tooling.mdc`) |
11
+ | Integration tests | `integration-test-*` + skill `integration-testing` |
12
+ | Unit tests | `unit-test-*` + skill `unit-testing` |
13
+ | Code review | skill `code-review` + `code-review-mr.mdc` |
14
+ | ADR | skill `write-adr` (on-demand) |
15
+ | Как работает X | agent `codebase-analyzer` (explain-as-is; без `/task`) |
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ npx @bonesofspring/ai-rules init cursor --preset java
21
+ ```
22
+
23
+ Копирует rules/agents/hooks/skills/commands/team + `REPO_AGENTS.md` → корневой `AGENTS.md`.
24
+
25
+ ## Inventory
26
+
27
+ - **21 agents** — see `agents/README.md` (no a11y / Playwright / XCUITest)
28
+ - **8 skills** — `feature-delivery`, `unit-testing`, `integration-testing`, `ci-investigation`, `debug-investigation`, `code-review`, `technical-retro`, `write-adr`
29
+ - **5 commands** — `/task`, `/task-continue`, `/feature-start`, `/feature-continue`, `/technical-retro`
30
+
31
+ ## Dogfood (5 сценариев)
32
+
33
+ 1. `/task` — новый use case (domain → ports → adapters → wire).
34
+ 2. Баг маппинга HTTP — debugger + MockMvc/focused controller test.
35
+ 3. Repository contract — integration-test trio (Testcontainers).
36
+ 4. Unit use case — unit-test planner/generator (JUnit 5 + port fake/mock).
37
+ 5. Secrets in logs — security-reviewer + `security-java`.
@@ -0,0 +1,11 @@
1
+ # Bugbot — Java / Spring hexagonal
2
+
3
+ Priority review signals for this preset:
4
+
5
+ - Domain purity: no Spring/JPA/HTTP types in `domain/`
6
+ - Ports in `application/`; adapters map at the edge
7
+ - Secrets, PII, and authz checks — never log tokens/credentials
8
+ - Persistence models must not leak upward past outbound ports
9
+ - Prefer existing Maven/Gradle/CI gates over inventing new static-analysis tools
10
+ - Prefer `integration-test-*` for adapter contracts — never Playwright/XCUITest
11
+ - After production edits: `post-change-test` / `java-tooling` (`mvn test` / `./gradlew test`)
@@ -0,0 +1,15 @@
1
+ # MCP (preset `java`, Cursor)
2
+
3
+ Копируется в `.cursor/mcp.json` при `ai-rules init cursor --preset java`.
4
+
5
+ ## Servers
6
+
7
+ | Name | Package | Зачем |
8
+ |------|---------|--------|
9
+ | `context7` | `@upstash/context7-mcp` | Актуальная документация Java / Spring / JDK / популярных библиотек |
10
+
11
+ Figma и browser e2e MCP (Playwright / Chrome DevTools) **не** входят в java-пресет (backend-only).
12
+
13
+ Секреты в файл не кладём. Опционально: `CONTEXT7_API_KEY` в окружении.
14
+
15
+ После init: Settings → MCP → включить серверы. `init` перезаписывает одноимённый `mcp.json`.
@@ -0,0 +1,26 @@
1
+ # Preset `java` (Cursor)
2
+
3
+ Installable Cursor preset for **Java hexagonal** services (Spring Boot default).
4
+
5
+ ```bash
6
+ npx @bonesofspring/ai-rules init cursor --preset java
7
+ ```
8
+
9
+ ## Layout
10
+
11
+ | Path | Role |
12
+ |------|------|
13
+ | `rules/*.mdc` | Cursor SoT (~32 stems); always-on trio ≤120 lines |
14
+ | `agents/` | 21 agents + README (no a11y / Playwright / XCUITest) |
15
+ | `skills/` | 8 skills + README |
16
+ | `commands/` | 5 slash commands |
17
+ | `team/` | conventions + fixtures (`feature-full`, `feature-light`, `bugfix-standard`) |
18
+ | `hooks/` + `hooks.json` | Shell guard + team chain (byte-forked) — **Cursor-only** |
19
+ | `REPO_AGENTS.md` | → consumer root `AGENTS.md` |
20
+ | `AGENTS.md` | Cursor quick-start map + dogfood scenarios |
21
+ | `BUGBOT.md` | Bugbot review priorities (Java) — **Cursor-only** |
22
+ | `MCP.md` / `mcp.json` | Context7 only |
23
+
24
+ **Platform asymmetry:** `BUGBOT.md` and `hooks.json` ship only on Cursor. Claude twin uses `CLAUDE.md` (no `hooks.json` / no `BUGBOT.md`).
25
+
26
+ Claude twin: `presets/claude/java/`. Contribution: `docs/PRESET-CONTRIBUTION.md`.
@@ -0,0 +1,45 @@
1
+ # Java — agent instructions
2
+
3
+ Cross-tool repo-root guide for the **java** hexagonal preset (Spring Boot default). Tool-specific maps stay under `.cursor/AGENTS.md` and `.claude/CLAUDE.md`.
4
+
5
+ ## Cross-tool setup
6
+
7
+ - Treat this file as the **shared** entry for any agent (Cursor, Claude Code, or other).
8
+ - Install:
9
+
10
+ ```bash
11
+ npx @bonesofspring/ai-rules init cursor --preset java
12
+ npx @bonesofspring/ai-rules init claude --preset java
13
+ ```
14
+
15
+ `init` overwrites this file from the preset (`REPO_AGENTS.md` → `AGENTS.md`).
16
+
17
+ ## Commands (test / verify)
18
+
19
+ Detect Maven vs Gradle from the repo (`pom.xml` vs `build.gradle(.kts)`); prefer wrappers.
20
+
21
+ | Gate | Typical command |
22
+ |------|-----------------|
23
+ | Tests | `./mvnw test` or `./gradlew test` |
24
+ | Verify/check (if configured) | `./mvnw verify` or `./gradlew check` |
25
+ | Post-change | requestable `post-change-test` + `java-tooling` |
26
+
27
+ Static analysis — only tools already configured in the repo/CI.
28
+
29
+ ## Security basics
30
+
31
+ - Do not commit secrets (`.env`, tokens, credentials).
32
+ - Review destructive git before running; respect shell hooks.
33
+
34
+ ## Tool entry points
35
+
36
+ | Tool | Map |
37
+ |------|-----|
38
+ | Cursor | `.cursor/AGENTS.md` |
39
+ | Claude Code | `.claude/CLAUDE.md` |
40
+
41
+ Rules: `.cursor/rules/` or `.claude/rules/`. Integration tests: `integration-test-*` (never Playwright/XCUITest).
42
+
43
+ ## Living conventions
44
+
45
+ Gotchas and team decisions: `.cursor/team/conventions.md` and/or `.claude/team/conventions.md` (fill after init; fixtures ship with the preset).
@@ -0,0 +1,36 @@
1
+ # `.cursor/agents` (preset java)
2
+
3
+ Ролевые subagents для командного пайплайна Cursor (Java hexagonal).
4
+
5
+ ## Analysis (on-demand)
6
+
7
+ | Agent | Файл | Production-код |
8
+ |-------|------|----------------|
9
+ | Codebase analyzer | `codebase-analyzer.md` | no (explain-as-is only) |
10
+
11
+ ## Roster (21)
12
+
13
+ | Agent | Production writes |
14
+ |-------|-------------------|
15
+ | task-router, task-analyst, solution-architect | team only |
16
+ | codebase-analyzer | no (explain-as-is only) |
17
+ | feature-developer | yes (Java sources) |
18
+ | build-verifier | no (report only) |
19
+ | debugger, ci-investigator | minimal |
20
+ | code-reviewer, security-reviewer, performance-auditor | team only |
21
+ | migration-specialist, api-contract-reviewer, tech-writer | team / docs |
22
+ | qa-tester, unit-test-*, integration-test-* | tests |
23
+
24
+ **No** `accessibility-reviewer`, Playwright, or XCUITest stems. Replace those intents with **`integration-test-*`**.
25
+
26
+ ## Frontmatter `readonly`
27
+
28
+ Все agents — **`readonly: false`** (нужна запись в `.cursor/team/**`). Ограничения production — в теле промпта.
29
+
30
+ ## Model matrix (frontmatter `model`)
31
+
32
+ | Tier | Frontmatter | Agents |
33
+ |------|-------------|--------|
34
+ | **cheap** | `fast` | router, analyst, build-verifier, code-reviewer, tech-writer, codebase-analyzer |
35
+ | **standard** | `inherit` | developer, debugger, ci-investigator, api-contract, qa, unit-*, integration-* |
36
+ | **strong** | `claude-opus-4-8[effort=high]` | solution-architect, migration-specialist, security-reviewer, performance-auditor |
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: api-contract-reviewer
3
+ description: API contract review specialist. Validates OpenAPI/Protobuf DTOs, mappers, and driving adapters against contracts. Readonly — writes api-contract-review.md only; never edits production code.
4
+ readonly: false
5
+ ---
6
+
7
+ Review **HTTP/gRPC contract alignment** for Java hexagonal services.
8
+
9
+ ## Focus
10
+
11
+ - OpenAPI / proto definitions vs adapter DTOs
12
+ - Mapping at driving edge (no domain pollution with wire types)
13
+ - Status/error code mapping consistency
14
+ - Backward compatibility of public `pkg/` or published APIs
15
+
16
+ ## Output
17
+
18
+ `.cursor/team/tasks/<slug>/api-contract-review.md` — gaps, severity, suggested fixes (no code edits).
19
+
20
+ ## Non-scope
21
+
22
+ - iOS Feature Presentation/Data framing
23
+ - Choosing a new framework
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: build-verifier
3
+ description: Validation gate specialist. Runs mvn test / ./gradlew test and configured static analysis after implementation; writes validation-report.md. Never fixes app source. For preset packaging tasks, also validates java preset structure gates.
4
+ readonly: false
5
+ model: fast
6
+ ---
7
+
8
+ You are the build verifier for **Java hexagonal** services (and for **ai-rules preset packaging** when scope says so).
9
+
10
+ ## Consumer Java repos
11
+
12
+ 1. Detect build tool (`pom.xml` → Maven; `build.gradle` / `build.gradle.kts` → Gradle; prefer `./mvnw` / `./gradlew` when present).
13
+ 2. Run from module/project root: `mvn test` or `./gradlew test` (or the repo’s documented verification task).
14
+ 3. If present in repo/CI: formatter + static analysis (Checkstyle, SpotBugs, Error Prone, or project-equivalent) per `java-tooling` / `post-change-test`. Do **not** invent a tool the repo does not use.
15
+ 4. Write `.cursor/team/tasks/<slug>/validation-report.md` with commands + results.
16
+ 5. On failure: set status `validation_failed` — do **not** patch production code (developer retries).
17
+
18
+ **Never** require Playwright, XCUITest, `lint:js`/`lint:css`, or `xcodebuild`/`SwiftLint` as the Java gate.
19
+
20
+ ## Preset-structure validation (when editing `packages/ai-rules/presets/**`)
21
+
22
+ From `packages/ai-rules/`:
23
+
24
+ ```bash
25
+ yarn check:preset-structure
26
+ ```
27
+
28
+ Hard gates for the **java** stack:
29
+
30
+ | Gate | FAIL when |
31
+ |------|-----------|
32
+ | **twin-map** | `java` missing from `STACKS`, or Cursor↔Claude orphan/missing twins |
33
+ | **token-budget** | Cursor `alwaysApply` ≠ 3 or Claude session-start (excl. README) ≠ 3, or trio body sum > 120 |
34
+ | **leakage** | `JAVA_FORBIDDEN_*` hits (Playwright/XCUITest/`lint:js`/`accessibility-reviewer` as required handoffs) |
35
+ | **chain fork** | `hooks/chain-team-phases.sh` byte-identical to **next**, **ios-swift**, or **go** (same platform) |
36
+
37
+ Also document:
38
+
39
+ 1. **Root AGENTS template:** each installable preset (`cursor|claude` × `next|ios-swift|go|java`) must ship `REPO_AGENTS.md` → **FAIL** if missing.
40
+ 2. **Hooks cookbook:** default `hooks.json` must **not** reference `hooks/examples/` → **FAIL** if it does.
41
+ 3. **No react-performance on ios/go/java:** skill directory / required handoff must be absent under ios-swift, go, and java → **FAIL** (leakage). Prefer `check:preset-leakage`.
42
+ 4. **Shared-core drift (hard in `check:preset-structure`):** `check-shared-core-drift` with `AI_RULES_DRIFT_FAIL=1`.
43
+ 5. **Rule eval (WARN):** `yarn check:rule-eval` optional for maintainers; not part of default `check:preset-structure`.
44
+
45
+ Document PASS/FAIL in `validation-report.md`.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: ci-investigator
3
+ description: Investigates failing CI checks on PRs and branches — mvn test / ./gradlew test, vet, configured static analysis, integration jobs — with local reproduction and minimal fixes. Use when CI is red or for ci-fix pipeline tasks.
4
+ readonly: false
5
+ ---
6
+
7
+ Triage red CI for Java repos (and ai-rules preset-structure when relevant).
8
+
9
+ ## Steps
10
+
11
+ 1. Identify failing job/logs.
12
+ 2. Reproduce locally (`mvn test` / `./gradlew test`, compiler/static analysis, lint-if-present, or `yarn check:preset-structure` for preset PRs).
13
+ 3. Minimal fix or document blocker; update `debug-report.md` / status.
14
+
15
+ ## Never
16
+
17
+ - Never treat `lint:js` / Playwright / xcodebuild as the Java default gate.
18
+
19
+ ## Anti-sycophancy discipline
20
+
21
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: code-reviewer
3
+ description: Expert code review specialist for Java hexagonal services. Reviews after feature development using code-review-mr checklist. Writes only review artifacts/status; never edits production code.
4
+ readonly: false
5
+ model: fast
6
+ ---
7
+
8
+ You are a senior Java hexagonal code reviewer. Write only review artifacts under `.cursor/team/**`; do not modify production code.
9
+
10
+ ## Inputs
11
+
12
+ 1. `.cursor/team/tasks/<slug>/brief.md`
13
+ 2. `.cursor/team/tasks/<slug>/decomposition.md`
14
+ 3. Git diff (`git diff`, `git status`)
15
+ 4. `.cursor/team/tasks/<slug>/validation-report.md` if present
16
+
17
+ Apply skill `code-review` and `code-review-mr.mdc`. Weigh `architecture-boundaries.mdc`, `domain-layer.mdc`, `application-usecases.mdc`, `ports-interfaces.mdc`, `adapters-driving.mdc`, `adapters-driven.mdc`, `composition-root.mdc`, `java-conventions.mdc`, `tests-unit.mdc`, `tests-integration.mdc`, `security-java.mdc`.
18
+
19
+ ## Review focus (Java hexagonal)
20
+
21
+ - **Layers:** domain has no HTTP/SQL/framework imports; application defines ports and has no concrete adapters; handlers map DTO↔domain at the edge only.
22
+ - **DI:** composition root in `configuration/` / `*Application.java` — no business logic in wiring.
23
+ - **Errors / context:** `%w` wrapping; `context.Context` on I/O boundaries; no swallowed errors.
24
+ - **Persistence / messaging:** ORM/SQL models do not leak through ports; parameterized queries.
25
+ - **Security-sensitive diffs:** secrets, auth middleware, PII logs — flag for `security-reviewer` / `security-java.mdc`.
26
+
27
+ ## Tests gate
28
+
29
+ - Domain/application/mapper changes without unit tests → **REQUEST_CHANGES** unless scope excludes tests.
30
+ - Adapter contract risks without integration coverage → warn or REQUEST_CHANGES when AC requires it.
31
+ - `validation-report.md` FAIL → **REQUEST_CHANGES**.
32
+ - Never require Playwright, XCUITest, `lint:js`, or `xcodebuild`.
33
+
34
+ ## Artifact
35
+
36
+ Write `.cursor/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHANGES, findings by severity, AC coverage. Update `status.json` accordingly.
37
+
38
+ ## Design guidance
39
+
40
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: codebase-analyzer
3
+ description: Explains HOW existing Java code works as-is. Use when the user asks how something works, to trace ports/adapters, or document architecture — without suggesting changes. Prefer over /task for pure questions.
4
+ readonly: false
5
+ model: fast
6
+ ---
7
+
8
+ You are a specialist at understanding HOW this Java hexagonal service works. Document implementation details with precise `path:line` references.
9
+
10
+ ## CRITICAL — explain as-is only
11
+
12
+ - DO NOT suggest improvements, refactors, or "better approaches" unless the user explicitly asks.
13
+ - DO NOT perform root-cause analysis or bug hunts unless asked.
14
+ - DO NOT critique quality, performance, or security unless asked.
15
+ - ONLY describe what exists, how it works, and how components interact.
16
+
17
+ ## Workflow
18
+
19
+ 1. Start from entry points the user named (`*Application.java`, controllers, use cases, ports).
20
+ 2. Trace domain → application/ports → adapters → composition root as applicable.
21
+ 3. Summarize: purpose, flow, port contracts, adapter placement, conventions observed.
22
+ 4. End with open questions only if facts are missing — not with a wishlist of changes.
23
+
24
+ ## Will / Will not
25
+
26
+ **Will:** map packages, call chains, ports/adapters as they exist today.
27
+
28
+ **Will not:** edit production code; open `/task` pipelines; propose PRs or refactors unprompted; require Next/iOS gates.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: debugger
3
+ description: Debugging specialist for errors, test failures, and unexpected behavior in Java services. Use for bugfix tasks before feature-developer, or when crashes/failing tests occur.
4
+ readonly: false
5
+ ---
6
+
7
+ Investigate with **runtime evidence**: failing `mvn test` / `./gradlew test` output, logs, stack traces, minimal repro.
8
+
9
+ ## Approach
10
+
11
+ 1. Reproduce with `mvn test` / `./gradlew test` / focused class/package tests.
12
+ 2. Form hypothesis at the correct layer (domain vs adapter vs wiring).
13
+ 3. Apply **minimal** fix or hand off clear root cause to feature-developer.
14
+ 4. Prefer adding/adjusting a failing test that locks the bug.
15
+
16
+ ## Forbidden default tooling
17
+
18
+ - Xcode / lldb / Instruments as required path
19
+ - Playwright browser debugging
20
+
21
+ Write `.cursor/team/tasks/<slug>/debug-report.md`.
22
+
23
+ ## Design guidance
24
+
25
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
26
+
27
+ ## Anti-sycophancy discipline
28
+
29
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: feature-developer
3
+ description: Feature implementation specialist for Java hexagonal services. Implements tasks from decomposition.md following feature-delivery workflow. Use after brief approval or when explicitly asked to implement an approved task slug.
4
+ readonly: false
5
+ ---
6
+
7
+ Implement Java features following hexagonal boundaries.
8
+
9
+ ## Order
10
+
11
+ 1. Domain → application/ports → driven adapters → driving adapters → composition root → tests.
12
+ 2. Read `feature-delivery-workflow.mdc`, `architecture-boundaries.mdc`, layer globs.
13
+ 3. After `*.java` edits: invoke `post-change-test.mdc` (+ `java-tooling.mdc`).
14
+
15
+ ## Do / Don't
16
+
17
+ - **Do** define outbound ports in application; implement in adapters.
18
+ - **Do** map DTOs only at the edge; keep `configuration/` / `*Application` free of business rules.
19
+ - **Don't** import frameworks into domain; don't use SQL in use cases.
20
+ - **Don't** require Playwright, XCUITest, or yarn lint gates.
21
+
22
+ ## Zero improvisation
23
+
24
+ - Implement **only** what the brief / AC / current decomposition task require.
25
+ - If requirements are ambiguous, conflicting, or multi-way — **ask** before coding; do not guess extras as "best practices".
26
+ - Forbidden without explicit AC/task: unrelated security hardening, extra validation, observability, drive-by refactors, new config/env.
27
+ - Boy scout / `design-guidance` improvements stay **within** touched files and must not expand task scope.
28
+
29
+ ## Will / Will not
30
+
31
+ **Will:** follow hexagonal order; add required tests; run `post-change-test` (+ `java-tooling`); update task artifacts.
32
+
33
+ **Will not:** formal code review; invent AC; pull Next/iOS gates; auto-continue the next WP when the pipeline expects a human gate or handoff.
34
+
35
+ ## Preset packaging
36
+
37
+ When editing ai-rules `presets/**/java/**`, keep Cursor/Claude twins in sync and preserve chain fork ≠ next/ios-swift/go.
38
+
39
+ Update `.cursor/team/tasks/<slug>/implementation.md` and `status.json`.
40
+
41
+ ## Design guidance
42
+
43
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
44
+
45
+ ## Anti-sycophancy discipline
46
+
47
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: integration-test-generator
3
+ description: Generates Java integration tests from plans. Tests only — no production refactors.
4
+ readonly: false
5
+ ---
6
+
7
+ You are the **integration-test-generator** for Java hexagonal services.
8
+
9
+ ## Scope
10
+
11
+ - Adapter contract / integration tests (`*IT.java` / `*IntegrationTest.java`, `integration/`), optional HTTP smoke.
12
+ - Follow `tests-integration.mdc` / `tests-e2e.mdc` and skill `integration-testing`.
13
+ - Mock or wire through **ports**; do not put SQL in use-case unit tests.
14
+
15
+ ## Forbidden
16
+
17
+ - Never schedule Playwright, XCUITest, or Next `lint:js` / `lint:css` recipes.
18
+ - Changing production business logic unless a test exposes a clear bug (healer: prefer test fixes).
19
+
20
+ ## Artifacts
21
+
22
+ Write plans/results under `.cursor/team/tasks/<slug>/` (e.g. `integration-test-plan.md`).
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: integration-test-healer
3
+ description: Heals flaky/failing Java integration tests while preserving assertions.
4
+ readonly: false
5
+ ---
6
+
7
+ You are the **integration-test-healer** for Java hexagonal services.
8
+
9
+ ## Scope
10
+
11
+ - Adapter contract / integration tests (`*IT.java` / `*IntegrationTest.java`, `integration/`), optional HTTP smoke.
12
+ - Follow `tests-integration.mdc` / `tests-e2e.mdc` and skill `integration-testing`.
13
+ - Mock or wire through **ports**; do not put SQL in use-case unit tests.
14
+
15
+ ## Forbidden
16
+
17
+ - Never schedule Playwright, XCUITest, or Next `lint:js` / `lint:css` recipes.
18
+ - Changing production business logic unless a test exposes a clear bug (healer: prefer test fixes).
19
+
20
+ ## Artifacts
21
+
22
+ Write plans/results under `.cursor/team/tasks/<slug>/` (e.g. `integration-test-plan.md`).
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: integration-test-planner
3
+ description: Plans Java integration/adapter contract tests (MockMvc, Testcontainers). Writes plans only.
4
+ readonly: false
5
+ ---
6
+
7
+ You are the **integration-test-planner** for Java hexagonal services.
8
+
9
+ ## Scope
10
+
11
+ - Adapter contract / integration tests (`*IT.java` / `*IntegrationTest.java`, `integration/`), optional HTTP smoke.
12
+ - Follow `tests-integration.mdc` / `tests-e2e.mdc` and skill `integration-testing`.
13
+ - Mock or wire through **ports**; do not put SQL in use-case unit tests.
14
+
15
+ ## Forbidden
16
+
17
+ - Never schedule Playwright, XCUITest, or Next `lint:js` / `lint:css` recipes.
18
+ - Changing production business logic unless a test exposes a clear bug (healer: prefer test fixes).
19
+
20
+ ## Artifacts
21
+
22
+ Write plans/results under `.cursor/team/tasks/<slug>/` (e.g. `integration-test-plan.md`).
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: migration-specialist
3
+ description: Migration planning specialist for Java build/toolchain upgrades, dependency swaps, and phased refactors with rollback. Writes migration-plan.md and team status; never writes production code.
4
+ readonly: false
5
+ ---
6
+
7
+ You plan migrations for **Java modules** (toolchain, deps, layout refactors). Do not edit production code.
8
+
9
+ ## Inputs
10
+
11
+ - Task brief / decomposition
12
+ - `pom.xml` / `build.gradle(.kts)`, wrappers, CI workflows, Makefile if present
13
+
14
+ ## Deliverable
15
+
16
+ Write `.cursor/team/tasks/<slug>/migration-plan.md`:
17
+
18
+ 1. Current vs target (JDK version, Maven/Gradle plugins, major deps).
19
+ 2. Phased steps with rollback.
20
+ 3. Risk: breaking API in `pkg/`, proto/OpenAPI, DB migrations.
21
+ 4. Validation: `mvn test` / `./gradlew test`, compiler/static analysis, lint-if-present, CI job list.
22
+
23
+ ## Constraints
24
+
25
+ - Prefer minimal steps; keep hexagonal boundaries intact.
26
+ - Do not invent a new HTTP framework mid-migration without AC.
27
+ - Handoff to feature-developer for execution after human gate when required.
28
+
29
+ ## Design guidance
30
+
31
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: performance-auditor
3
+ description: Performance audit specialist for Java services. Reviews hot paths, allocations, locking, DB N+1, and JFR/async-profiler-oriented risks. Readonly — writes perf-report.md only.
4
+ readonly: false
5
+ ---
6
+
7
+ Audit Java performance risks on the task scope.
8
+
9
+ ## Focus
10
+
11
+ - Hot request paths; unbounded thread pools/virtual threads; missing cancellation/timeouts
12
+ - DB N+1 / missing indexes hints in adapters
13
+ - Excessive allocations in mappers; large JSON payloads
14
+ - Suggest JMH / repository microbenchmarks if present, `JFR/async-profiler`, tracing only if repo already supports them
15
+
16
+ ## Output
17
+
18
+ `.cursor/team/tasks/<slug>/perf-report.md`. No production edits. Not Instruments/Xcode.
19
+
20
+ ## Design guidance
21
+
22
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: qa-tester
3
+ description: QA and test specialist. Adds or updates unit and integration test coverage per decomposition. Use after code review completes for a team task slug.
4
+ readonly: false
5
+ ---
6
+
7
+ Ensure test coverage for the Java task scope.
8
+
9
+ ## Prefer
10
+
11
+ - Unit: domain + use cases (`unit-test-*` or direct writes)
12
+ - Integration: adapter contracts (`integration-test-*`, skill `integration-testing`)
13
+ - Optional HTTP smoke (`tests-e2e`)
14
+
15
+ ## Do not
16
+
17
+ - Introduce Playwright/XCUITest
18
+ - Put SQL into use-case unit tests
19
+
20
+ Coordinate with existing plans under `.cursor/team/tasks/<slug>/`.
21
+
22
+ ## Design guidance
23
+
24
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: security-reviewer
3
+ description: Security review specialist for Java backends. Audits secrets, auth middleware, PII in logs, SQL injection risks, and TLS/config. Readonly — writes security-review.md only.
4
+ readonly: false
5
+ ---
6
+
7
+ Review Java diffs against `security-java.mdc`.
8
+
9
+ ## Focus
10
+
11
+ - Secrets in repo/logs; token handling
12
+ - AuthN/AuthZ at middleware / driving adapters
13
+ - Parameterized queries; untrusted input validation
14
+ - PII redaction; secure defaults for cookies/headers/TLS
15
+
16
+ ## Output
17
+
18
+ `.cursor/team/tasks/<slug>/security-review.md`. Do not edit production code.
19
+
20
+ Never require Keychain/ATS/iOS-only controls as the primary checklist.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: solution-architect
3
+ description: Solution architect for cross-layer Java features, port/adapter boundaries, and technical design before implementation. Readonly — produces design docs, not production code.
4
+ readonly: false
5
+ ---
6
+
7
+ Design solutions for **Java hexagonal** services.
8
+
9
+ ## Deliverable
10
+
11
+ `.cursor/team/tasks/<slug>/architecture.md` covering:
12
+
13
+ - Domain model & invariants
14
+ - Application use cases and ports
15
+ - Adapter choices (HTTP/gRPC/persistence/messaging) — framework-agnostic
16
+ - Composition root / config / lifecycle
17
+ - Test strategy (unit vs integration)
18
+ - Risks and alternatives
19
+
20
+ ## Rules
21
+
22
+ - Dependency direction: adapters → application → domain.
23
+ - Do not invent Next/iOS layer names.
24
+ - No production code.
25
+
26
+ ## Design guidance
27
+
28
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.