@bonesofspring/ai-rules 0.2.7 → 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 (227) hide show
  1. package/CHANGELOG.md +18 -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 +1 -1
  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/claude/go/agents/build-verifier.md +5 -5
  11. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
  12. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -8
  13. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  14. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +2 -0
  15. package/presets/claude/go/team/fixtures/feature-full.json +5 -23
  16. package/presets/claude/ios-swift/agents/build-verifier.md +6 -7
  17. package/presets/claude/ios-swift/rules/stack/ios-app-core.md +5 -28
  18. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +1 -1
  19. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -4
  20. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  21. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +2 -0
  22. package/presets/claude/java/CLAUDE.md +29 -0
  23. package/presets/claude/java/MCP.md +13 -0
  24. package/presets/claude/java/README.md +26 -0
  25. package/presets/claude/java/REPO_AGENTS.md +45 -0
  26. package/presets/claude/java/agents/README.md +32 -0
  27. package/presets/claude/java/agents/api-contract-reviewer.md +23 -0
  28. package/presets/claude/java/agents/build-verifier.md +45 -0
  29. package/presets/claude/java/agents/ci-investigator.md +17 -0
  30. package/presets/claude/java/agents/code-reviewer.md +40 -0
  31. package/presets/claude/java/agents/codebase-analyzer.md +28 -0
  32. package/presets/claude/java/agents/debugger.md +25 -0
  33. package/presets/claude/java/agents/feature-developer.md +43 -0
  34. package/presets/claude/java/agents/integration-test-generator.md +22 -0
  35. package/presets/claude/java/agents/integration-test-healer.md +22 -0
  36. package/presets/claude/java/agents/integration-test-planner.md +22 -0
  37. package/presets/claude/java/agents/migration-specialist.md +31 -0
  38. package/presets/claude/java/agents/performance-auditor.md +22 -0
  39. package/presets/claude/java/agents/qa-tester.md +24 -0
  40. package/presets/claude/java/agents/security-reviewer.md +20 -0
  41. package/presets/claude/java/agents/solution-architect.md +28 -0
  42. package/presets/claude/java/agents/task-analyst.md +25 -0
  43. package/presets/claude/java/agents/task-router.md +69 -0
  44. package/presets/claude/java/agents/tech-writer.md +15 -0
  45. package/presets/claude/java/agents/unit-test-generator.md +21 -0
  46. package/presets/claude/java/agents/unit-test-healer.md +13 -0
  47. package/presets/claude/java/agents/unit-test-planner.md +26 -0
  48. package/presets/claude/java/commands/README.md +13 -0
  49. package/presets/claude/java/commands/feature-continue.md +51 -0
  50. package/presets/claude/java/commands/feature-start.md +30 -0
  51. package/presets/claude/java/commands/task-continue.md +49 -0
  52. package/presets/claude/java/commands/task.md +49 -0
  53. package/presets/claude/java/commands/technical-retro.md +58 -0
  54. package/presets/claude/java/hooks/README.md +16 -0
  55. package/presets/claude/java/hooks/chain-team-phases.sh +381 -0
  56. package/presets/claude/java/hooks/examples/README.md +18 -0
  57. package/presets/claude/java/hooks/examples/format-edited.example.sh +11 -0
  58. package/presets/claude/java/hooks/examples/secret-guard.example.sh +10 -0
  59. package/presets/claude/java/hooks/examples/test-on-save.example.sh +18 -0
  60. package/presets/claude/java/hooks/guard-shell-command.sh +80 -0
  61. package/presets/claude/java/mcp.json +11 -0
  62. package/presets/claude/java/rules/README.md +60 -0
  63. package/presets/claude/java/rules/api-and-data/README.md +14 -0
  64. package/presets/claude/java/rules/api-and-data/adapters-driven.md +38 -0
  65. package/presets/claude/java/rules/api-and-data/adapters-driving.md +38 -0
  66. package/presets/claude/java/rules/api-and-data/api-grpc.md +29 -0
  67. package/presets/claude/java/rules/api-and-data/api-http.md +36 -0
  68. package/presets/claude/java/rules/api-and-data/messaging-adapters.md +24 -0
  69. package/presets/claude/java/rules/api-and-data/persistence-adapters.md +33 -0
  70. package/presets/claude/java/rules/architecture/README.md +16 -0
  71. package/presets/claude/java/rules/architecture/application-usecases.md +32 -0
  72. package/presets/claude/java/rules/architecture/boundaries.md +29 -0
  73. package/presets/claude/java/rules/architecture/composition-root.md +31 -0
  74. package/presets/claude/java/rules/architecture/domain-layer.md +38 -0
  75. package/presets/claude/java/rules/architecture/feature-delivery.md +52 -0
  76. package/presets/claude/java/rules/architecture/module-public-api.md +31 -0
  77. package/presets/claude/java/rules/architecture/ports-interfaces.md +34 -0
  78. package/presets/claude/java/rules/architecture/reference-features.md +34 -0
  79. package/presets/claude/java/rules/stack/README.md +10 -0
  80. package/presets/claude/java/rules/stack/java-app-core.md +32 -0
  81. package/presets/claude/java/rules/stack/java-conventions.md +52 -0
  82. package/presets/claude/java/rules/testing/README.md +11 -0
  83. package/presets/claude/java/rules/testing/e2e.md +22 -0
  84. package/presets/claude/java/rules/testing/integration.md +27 -0
  85. package/presets/claude/java/rules/testing/unit.md +33 -0
  86. package/presets/claude/java/rules/tooling-and-review/README.md +21 -0
  87. package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +26 -0
  88. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +179 -0
  89. package/presets/claude/java/rules/tooling-and-review/code-quality.md +83 -0
  90. package/presets/claude/java/rules/tooling-and-review/code-review.md +59 -0
  91. package/presets/claude/java/rules/tooling-and-review/design-guidance.md +110 -0
  92. package/presets/claude/java/rules/tooling-and-review/java-tooling.md +36 -0
  93. package/presets/claude/java/rules/tooling-and-review/post-change-test.md +32 -0
  94. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +36 -0
  95. package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +56 -0
  96. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  97. package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +41 -0
  98. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +44 -0
  99. package/presets/claude/java/rules/tooling-and-review/security-java.md +29 -0
  100. package/presets/claude/java/rules/tooling-and-review/technical-retro.md +20 -0
  101. package/presets/claude/java/rules/ui-and-accessibility/README.md +5 -0
  102. package/presets/claude/java/skills/README.md +5 -0
  103. package/presets/claude/java/skills/ci-investigation/SKILL.md +11 -0
  104. package/presets/claude/java/skills/code-review/SKILL.md +25 -0
  105. package/presets/claude/java/skills/debug-investigation/SKILL.md +15 -0
  106. package/presets/claude/java/skills/feature-delivery/SKILL.md +30 -0
  107. package/presets/claude/java/skills/integration-testing/SKILL.md +15 -0
  108. package/presets/claude/java/skills/technical-retro/SKILL.md +54 -0
  109. package/presets/claude/java/skills/unit-testing/SKILL.md +14 -0
  110. package/presets/claude/java/skills/write-adr/SKILL.md +41 -0
  111. package/presets/claude/java/team/README.md +27 -0
  112. package/presets/claude/java/team/conventions.md +21 -0
  113. package/presets/claude/java/team/fixtures/bugfix-standard.json +37 -0
  114. package/presets/claude/java/team/fixtures/feature-full.json +25 -0
  115. package/presets/claude/java/team/fixtures/feature-light.json +17 -0
  116. package/presets/claude/next/agents/build-verifier.md +4 -4
  117. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +1 -1
  118. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -4
  119. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  120. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +2 -0
  121. package/presets/cursor/go/agents/build-verifier.md +5 -5
  122. package/presets/cursor/go/rules/preset-layering.mdc +1 -1
  123. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +6 -8
  124. package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
  125. package/presets/cursor/go/rules/preset-twin-sync.mdc +2 -0
  126. package/presets/cursor/go/team/fixtures/feature-full.json +5 -23
  127. package/presets/cursor/ios-swift/agents/build-verifier.md +6 -7
  128. package/presets/cursor/ios-swift/rules/ios-app-core.mdc +5 -28
  129. package/presets/cursor/ios-swift/rules/preset-layering.mdc +1 -1
  130. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +6 -4
  131. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
  132. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +2 -0
  133. package/presets/cursor/java/AGENTS.md +37 -0
  134. package/presets/cursor/java/BUGBOT.md +11 -0
  135. package/presets/cursor/java/MCP.md +15 -0
  136. package/presets/cursor/java/README.md +26 -0
  137. package/presets/cursor/java/REPO_AGENTS.md +45 -0
  138. package/presets/cursor/java/agents/README.md +36 -0
  139. package/presets/cursor/java/agents/api-contract-reviewer.md +23 -0
  140. package/presets/cursor/java/agents/build-verifier.md +45 -0
  141. package/presets/cursor/java/agents/ci-investigator.md +17 -0
  142. package/presets/cursor/java/agents/code-reviewer.md +40 -0
  143. package/presets/cursor/java/agents/codebase-analyzer.md +28 -0
  144. package/presets/cursor/java/agents/debugger.md +25 -0
  145. package/presets/cursor/java/agents/feature-developer.md +43 -0
  146. package/presets/cursor/java/agents/integration-test-generator.md +22 -0
  147. package/presets/cursor/java/agents/integration-test-healer.md +22 -0
  148. package/presets/cursor/java/agents/integration-test-planner.md +22 -0
  149. package/presets/cursor/java/agents/migration-specialist.md +31 -0
  150. package/presets/cursor/java/agents/performance-auditor.md +22 -0
  151. package/presets/cursor/java/agents/qa-tester.md +24 -0
  152. package/presets/cursor/java/agents/security-reviewer.md +20 -0
  153. package/presets/cursor/java/agents/solution-architect.md +28 -0
  154. package/presets/cursor/java/agents/task-analyst.md +25 -0
  155. package/presets/cursor/java/agents/task-router.md +69 -0
  156. package/presets/cursor/java/agents/tech-writer.md +15 -0
  157. package/presets/cursor/java/agents/unit-test-generator.md +21 -0
  158. package/presets/cursor/java/agents/unit-test-healer.md +13 -0
  159. package/presets/cursor/java/agents/unit-test-planner.md +26 -0
  160. package/presets/cursor/java/commands/README.md +54 -0
  161. package/presets/cursor/java/commands/feature-continue.md +19 -0
  162. package/presets/cursor/java/commands/feature-start.md +33 -0
  163. package/presets/cursor/java/commands/task-continue.md +49 -0
  164. package/presets/cursor/java/commands/task.md +49 -0
  165. package/presets/cursor/java/commands/technical-retro.md +81 -0
  166. package/presets/cursor/java/hooks/README.md +12 -0
  167. package/presets/cursor/java/hooks/chain-team-phases.sh +381 -0
  168. package/presets/cursor/java/hooks/examples/README.md +18 -0
  169. package/presets/cursor/java/hooks/examples/format-edited.example.sh +11 -0
  170. package/presets/cursor/java/hooks/examples/secret-guard.example.sh +10 -0
  171. package/presets/cursor/java/hooks/examples/test-on-save.example.sh +18 -0
  172. package/presets/cursor/java/hooks/guard-shell-command.sh +80 -0
  173. package/presets/cursor/java/hooks.json +17 -0
  174. package/presets/cursor/java/mcp.json +11 -0
  175. package/presets/cursor/java/rules/README.md +97 -0
  176. package/presets/cursor/java/rules/adapters-driven.mdc +40 -0
  177. package/presets/cursor/java/rules/adapters-driving.mdc +40 -0
  178. package/presets/cursor/java/rules/agent-team-intake.mdc +20 -0
  179. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +173 -0
  180. package/presets/cursor/java/rules/api-grpc.mdc +31 -0
  181. package/presets/cursor/java/rules/api-http.mdc +38 -0
  182. package/presets/cursor/java/rules/application-usecases.mdc +34 -0
  183. package/presets/cursor/java/rules/architecture-boundaries.mdc +30 -0
  184. package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +84 -0
  185. package/presets/cursor/java/rules/code-review-mr.mdc +54 -0
  186. package/presets/cursor/java/rules/composition-root.mdc +33 -0
  187. package/presets/cursor/java/rules/design-guidance.mdc +112 -0
  188. package/presets/cursor/java/rules/domain-layer.mdc +40 -0
  189. package/presets/cursor/java/rules/feature-delivery-workflow.mdc +47 -0
  190. package/presets/cursor/java/rules/java-app-core.mdc +33 -0
  191. package/presets/cursor/java/rules/java-conventions.mdc +54 -0
  192. package/presets/cursor/java/rules/java-tooling.mdc +34 -0
  193. package/presets/cursor/java/rules/messaging-adapters.mdc +26 -0
  194. package/presets/cursor/java/rules/module-public-api.mdc +33 -0
  195. package/presets/cursor/java/rules/persistence-adapters.mdc +35 -0
  196. package/presets/cursor/java/rules/ports-interfaces.mdc +36 -0
  197. package/presets/cursor/java/rules/post-change-test.mdc +30 -0
  198. package/presets/cursor/java/rules/preset-layering.mdc +36 -0
  199. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +56 -0
  200. package/presets/cursor/java/rules/preset-pr-checklist.mdc +39 -0
  201. package/presets/cursor/java/rules/preset-token-budget.mdc +41 -0
  202. package/presets/cursor/java/rules/preset-twin-sync.mdc +44 -0
  203. package/presets/cursor/java/rules/reference-features.mdc +36 -0
  204. package/presets/cursor/java/rules/security-java.mdc +31 -0
  205. package/presets/cursor/java/rules/technical-retro.mdc +14 -0
  206. package/presets/cursor/java/rules/tests-e2e.mdc +24 -0
  207. package/presets/cursor/java/rules/tests-integration.mdc +29 -0
  208. package/presets/cursor/java/rules/tests-unit.mdc +35 -0
  209. package/presets/cursor/java/skills/README.md +5 -0
  210. package/presets/cursor/java/skills/ci-investigation/SKILL.md +11 -0
  211. package/presets/cursor/java/skills/code-review/SKILL.md +25 -0
  212. package/presets/cursor/java/skills/debug-investigation/SKILL.md +15 -0
  213. package/presets/cursor/java/skills/feature-delivery/SKILL.md +30 -0
  214. package/presets/cursor/java/skills/integration-testing/SKILL.md +15 -0
  215. package/presets/cursor/java/skills/technical-retro/SKILL.md +54 -0
  216. package/presets/cursor/java/skills/unit-testing/SKILL.md +14 -0
  217. package/presets/cursor/java/skills/write-adr/SKILL.md +41 -0
  218. package/presets/cursor/java/team/README.md +31 -0
  219. package/presets/cursor/java/team/conventions.md +21 -0
  220. package/presets/cursor/java/team/fixtures/bugfix-standard.json +37 -0
  221. package/presets/cursor/java/team/fixtures/feature-full.json +25 -0
  222. package/presets/cursor/java/team/fixtures/feature-light.json +17 -0
  223. package/presets/cursor/next/agents/build-verifier.md +4 -4
  224. package/presets/cursor/next/rules/preset-layering.mdc +1 -1
  225. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +6 -4
  226. package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
  227. package/presets/cursor/next/rules/preset-twin-sync.mdc +2 -0
@@ -0,0 +1,381 @@
1
+ #!/usr/bin/env bash
2
+ # preset: java (hexagonal) — chain handoffs use integration-test-* + post-change-test + java-tooling
3
+ # Chains agent team steps from pipeline.json after subagentStop.
4
+ # Falls back to legacy phase-based flow when pipeline.json is absent.
5
+
6
+ set -euo pipefail
7
+
8
+ input=$(cat)
9
+
10
+ INPUT="$input" node <<'NODE'
11
+ const fs = require('fs');
12
+ const path = require('path');
13
+
14
+ const TEAM_ROOT = path.join(process.cwd(), '.cursor', 'team');
15
+
16
+ const inputRaw = process.env.INPUT || '';
17
+ let hookInput;
18
+ try {
19
+ hookInput = JSON.parse(inputRaw);
20
+ } catch {
21
+ process.stdout.write('{}');
22
+ process.exit(0);
23
+ }
24
+
25
+ if (hookInput.status !== 'completed') {
26
+ process.stdout.write('{}');
27
+ process.exit(0);
28
+ }
29
+
30
+ const activePath = path.join(TEAM_ROOT, 'active-task.json');
31
+
32
+ if (!fs.existsSync(activePath)) {
33
+ process.stdout.write('{}');
34
+ process.exit(0);
35
+ }
36
+
37
+ let active;
38
+ try {
39
+ active = JSON.parse(fs.readFileSync(activePath, 'utf8'));
40
+ } catch {
41
+ process.stdout.write('{}');
42
+ process.exit(0);
43
+ }
44
+
45
+ const slug = active.slug;
46
+ if (!slug) {
47
+ process.stdout.write('{}');
48
+ process.exit(0);
49
+ }
50
+
51
+ const taskDir = path.join(TEAM_ROOT, 'tasks', slug);
52
+ const statusPath = path.join(taskDir, 'status.json');
53
+ const pipelinePath = path.join(taskDir, 'pipeline.json');
54
+
55
+ if (!fs.existsSync(statusPath)) {
56
+ process.stdout.write('{}');
57
+ process.exit(0);
58
+ }
59
+
60
+ let status;
61
+ try {
62
+ status = JSON.parse(fs.readFileSync(statusPath, 'utf8'));
63
+ } catch {
64
+ process.stdout.write('{}');
65
+ process.exit(0);
66
+ }
67
+
68
+ const now = new Date().toISOString();
69
+
70
+ function writeStatus(next) {
71
+ status = { ...status, ...next, slug, updatedAt: now };
72
+ fs.writeFileSync(statusPath, JSON.stringify(status, null, 2) + '\n');
73
+ }
74
+
75
+ function out(message) {
76
+ process.stdout.write(JSON.stringify({ followup_message: message }));
77
+ }
78
+
79
+ function readArtifact(name) {
80
+ const p = path.join(taskDir, name);
81
+ if (!fs.existsSync(p)) return '';
82
+ try {
83
+ return fs.readFileSync(p, 'utf8');
84
+ } catch {
85
+ return '';
86
+ }
87
+ }
88
+
89
+ function getStepAgents(step) {
90
+ if (!step) return [];
91
+ return Array.isArray(step.agent) ? step.agent : [step.agent];
92
+ }
93
+
94
+ function skipIfMatches(skipIf, dir) {
95
+ if (!skipIf) return false;
96
+ if (skipIf === 'debugger.fixed') {
97
+ const text = readArtifact('debug-report.md');
98
+ return /fixApplied:\s*true/i.test(text) || /\*\*Fix applied:\*\*\s*true/i.test(text);
99
+ }
100
+ if (skipIf === 'ci-investigator.resolved') {
101
+ const text = readArtifact('ci-report.md');
102
+ return /fixApplied:\s*true/i.test(text) || /## Verdict\s*\nPASS/i.test(text);
103
+ }
104
+ return false;
105
+ }
106
+
107
+ function findNextExecutableStep(steps, startIdx, dir) {
108
+ for (let i = startIdx; i < steps.length; i++) {
109
+ if (!skipIfMatches(steps[i].skipIf, dir)) {
110
+ return { step: steps[i], index: i };
111
+ }
112
+ }
113
+ return null;
114
+ }
115
+
116
+ const AGENT_HANDOFF = {
117
+ 'task-analyst': (s) =>
118
+ `Invoke task-analyst for slug "${s}". Write brief.md and decomposition.md under .cursor/team/tasks/${s}/. ` +
119
+ `Set status.json: phase executing, state awaiting_approval if human gate applies. Do not use legacy phase analysis.`,
120
+ debugger: (s) =>
121
+ `Invoke debugger subagent for slug "${s}". Investigate root cause with mvn test / ./gradlew test/logs; write debug-report.md with fixApplied: true/false. ` +
122
+ `Update status.json when done.`,
123
+ 'solution-architect': (s) =>
124
+ `Invoke solution-architect for slug "${s}". Read brief.md; write architecture.md for Java hexagonal layers. Update status.json when done.`,
125
+ 'migration-specialist': (s) =>
126
+ `Invoke migration-specialist for slug "${s}". Read brief.md; write migration-plan.md for Java build/toolchain. Update status.json when done.`,
127
+ 'api-contract-reviewer': (s) =>
128
+ `Invoke api-contract-reviewer (readonly) for slug "${s}". Review OpenAPI/Protobuf vs adapters; write api-contract-review.md. Update status.json when done.`,
129
+ 'ci-investigator': (s) =>
130
+ `Invoke ci-investigator for slug "${s}". Diagnose CI failure (mvn test / ./gradlew test/vet/lint or preset-structure); write ci-report.md; apply minimal fix. ` +
131
+ `Use ci-investigation skill. Update status.json when done.`,
132
+ 'feature-developer': (s) =>
133
+ `Invoke feature-developer for slug "${s}". Read brief.md, decomposition.md, validation-report.md, review.md, architecture.md, migration-plan.md, api-contract-review.md, debug-report.md if present. ` +
134
+ `Follow feature-delivery-workflow.mdc and reference-features.mdc. Prefer src/main/java domain|application|adapters and configuration/*Application.java composition root. ` +
135
+ `Include parameterized/JUnit mvn test / ./gradlew test coverage for domain/use cases before handoff. Update status.json when done.`,
136
+ 'build-verifier': (s) =>
137
+ `Invoke build-verifier (readonly) for slug "${s}". Follow java-tooling.mdc and post-change-test.mdc. ` +
138
+ `Run mvn test / ./gradlew test and configured static analysis if present in repo/CI — never yarn/ESLint/Stylelint. ` +
139
+ `For preset packaging: yarn check:preset-structure. Write validation-report.md. Set state completed or validation_failed. Do not edit production code.`,
140
+ 'performance-auditor': (s) =>
141
+ `Invoke performance-auditor (readonly) for slug "${s}". Audit Java hot paths/allocs/DB N+1/profiler/JFR risks; write perf-report.md. Update status.json when done.`,
142
+ 'code-reviewer': (s) =>
143
+ `Invoke code-reviewer subagent (readonly) for slug "${s}". Review git diff vs brief.md per code-review-mr.mdc (hexagonal boundaries). ` +
144
+ `Update status.json when done.`,
145
+ 'security-reviewer': (s) =>
146
+ `Invoke security-reviewer (readonly) for slug "${s}". Follow security-java.mdc; write security-review.md. Update status.json when done.`,
147
+ 'qa-tester': (s, scope) =>
148
+ `Invoke qa-tester for slug "${s}"${scope ? ` (scope: ${scope})` : ''}. ` +
149
+ `Add/update JUnit unit and integration tests per brief. Follow tests-unit.mdc, tests-integration.mdc, and skill integration-testing. Update status.json when done.`,
150
+ 'unit-test-planner': (s) =>
151
+ `Invoke unit-test-planner for slug "${s}". Write unit-test-plan.md for parameterized/JUnit mvn test / ./gradlew test. Use unit-testing skill. Update status.json when done.`,
152
+ 'unit-test-generator': (s) =>
153
+ `Invoke unit-test-generator for slug "${s}". Implement *Test.java / *Tests.java from unit-test-plan.md under src/test/java. Use unit-testing skill. Update status.json when done.`,
154
+ 'unit-test-healer': (s) =>
155
+ `Invoke unit-test-healer for slug "${s}". Fix failing unit tests. Use unit-testing and debug-investigation skills. Update status.json when done.`,
156
+ 'integration-test-planner': (s) =>
157
+ `Invoke integration-test-planner for slug "${s}". Create/update integration test plans (MockMvc/Testcontainers/testcontainers/adapter contracts). ` +
158
+ `Follow tests-integration.mdc and the integration-testing skill. Do not use browser e2e tooling. Update status.json when done.`,
159
+ 'integration-test-generator': (s) =>
160
+ `Invoke integration-test-generator for slug "${s}". Generate/update *IT.java / *IntegrationTest.java from plans. ` +
161
+ `Follow tests-integration.mdc and the integration-testing skill. Do not use browser e2e tooling. Update status.json when done.`,
162
+ 'integration-test-healer': (s) =>
163
+ `Invoke integration-test-healer for slug "${s}". Fix failing/flaky integration tests while preserving plan assertions. ` +
164
+ `Follow tests-integration.mdc, integration-testing, and debug-investigation. Do not use browser e2e tooling. Update status.json when done.`,
165
+ 'tech-writer': (s) =>
166
+ `Invoke tech-writer for slug "${s}". Write documentation.md from task artifacts. Update status.json when done.`,
167
+ };
168
+
169
+ const REVIEW_AGENTS = new Set([
170
+ 'code-reviewer',
171
+ 'security-reviewer',
172
+ 'api-contract-reviewer',
173
+ ]);
174
+
175
+
176
+ function handoffForAgent(agent, scope) {
177
+ const fn = AGENT_HANDOFF[agent];
178
+ return fn ? fn(slug, scope) : `Invoke ${agent} subagent for slug "${slug}". Update status.json when done.`;
179
+ }
180
+
181
+ function handoffForParallelStep(step) {
182
+ const agents = getStepAgents(step);
183
+ return (
184
+ `Invoke IN PARALLEL (one message, multiple Task calls): ${agents.join(' AND ')} for slug "${slug}". ` +
185
+ `Each agent writes its artifact and appends itself to status.json parallelCompleted when done.`
186
+ );
187
+ }
188
+
189
+ function hasGateAfter(agent, humanGates) {
190
+ return Array.isArray(humanGates) && humanGates.includes(`after:${agent}`);
191
+ }
192
+
193
+ function hasGateAfterStep(step, humanGates) {
194
+ return getStepAgents(step).some((a) => hasGateAfter(a, humanGates));
195
+ }
196
+
197
+ function legacyFlow() {
198
+ if (status.phase === 'analysis') {
199
+ process.stdout.write('{}');
200
+ process.exit(0);
201
+ }
202
+ if (status.phase === 'development' && (status.state === 'completed' || status.state === 'in_progress')) {
203
+ writeStatus({ phase: 'executing', state: 'in_progress', currentAgent: 'build-verifier' });
204
+ out(handoffForAgent('build-verifier'));
205
+ process.exit(0);
206
+ }
207
+ if (status.currentAgent === 'build-verifier' && status.state === 'completed') {
208
+ writeStatus({ phase: 'executing', state: 'in_progress', currentAgent: 'code-reviewer' });
209
+ out(handoffForAgent('code-reviewer'));
210
+ process.exit(0);
211
+ }
212
+ if (status.phase === 'review' && status.state === 'completed') {
213
+ writeStatus({ phase: 'executing', state: 'in_progress', currentAgent: 'qa-tester' });
214
+ out(handoffForAgent('qa-tester'));
215
+ process.exit(0);
216
+ }
217
+ if (status.state === 'changes_requested' && REVIEW_AGENTS.has(status.currentAgent)) {
218
+ writeStatus({
219
+ currentAgent: 'feature-developer',
220
+ state: 'in_progress',
221
+ phase: 'executing',
222
+ retryAfterFix: status.currentAgent,
223
+ });
224
+ out(
225
+ handoffForAgent('feature-developer') +
226
+ ` After fixes, re-run ${status.currentAgent}.`,
227
+ );
228
+ process.exit(0);
229
+ }
230
+ if (status.state === 'validation_failed' && status.currentAgent === 'build-verifier') {
231
+ writeStatus({
232
+ currentAgent: 'feature-developer',
233
+ state: 'in_progress',
234
+ phase: 'executing',
235
+ retryAfterFix: 'build-verifier',
236
+ });
237
+ out(
238
+ handoffForAgent('feature-developer') +
239
+ ` Read validation-report.md. After fixes, re-run build-verifier.`,
240
+ );
241
+ process.exit(0);
242
+ }
243
+ if (status.state === 'completed' && status.retryAfterFix) {
244
+ const retry = status.retryAfterFix;
245
+ writeStatus({ currentAgent: retry, state: 'in_progress', retryAfterFix: null });
246
+ out(handoffForAgent(retry));
247
+ process.exit(0);
248
+ }
249
+ if (status.phase === 'testing' && status.state === 'completed') {
250
+ writeStatus({ phase: 'done', state: 'completed' });
251
+ out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
252
+ process.exit(0);
253
+ }
254
+ process.stdout.write('{}');
255
+ process.exit(0);
256
+ }
257
+
258
+ if (!fs.existsSync(pipelinePath)) {
259
+ legacyFlow();
260
+ }
261
+
262
+ let pipeline;
263
+ try {
264
+ pipeline = JSON.parse(fs.readFileSync(pipelinePath, 'utf8'));
265
+ } catch {
266
+ legacyFlow();
267
+ }
268
+
269
+ const steps = pipeline.steps || [];
270
+ if (steps.length === 0 || pipeline.autoChain === false) {
271
+ process.stdout.write('{}');
272
+ process.exit(0);
273
+ }
274
+
275
+ if (status.awaitingHumanGate || status.state === 'awaiting_approval') {
276
+ process.stdout.write('{}');
277
+ process.exit(0);
278
+ }
279
+
280
+ if (status.state === 'changes_requested' && REVIEW_AGENTS.has(status.currentAgent)) {
281
+ const reviewer = status.currentAgent;
282
+ writeStatus({
283
+ currentAgent: 'feature-developer',
284
+ state: 'in_progress',
285
+ phase: 'executing',
286
+ retryAfterFix: reviewer,
287
+ });
288
+ out(
289
+ handoffForAgent('feature-developer') +
290
+ ` After fixes, re-run ${reviewer}.`,
291
+ );
292
+ process.exit(0);
293
+ }
294
+
295
+ if (status.state === 'validation_failed' && status.currentAgent === 'build-verifier') {
296
+ writeStatus({
297
+ currentAgent: 'feature-developer',
298
+ state: 'in_progress',
299
+ phase: 'executing',
300
+ retryAfterFix: 'build-verifier',
301
+ });
302
+ out(
303
+ handoffForAgent('feature-developer') +
304
+ ` Read validation-report.md. After fixes, re-run build-verifier.`,
305
+ );
306
+ process.exit(0);
307
+ }
308
+
309
+ if (status.state === 'completed' && status.retryAfterFix) {
310
+ const retry = status.retryAfterFix;
311
+ writeStatus({ currentAgent: retry, state: 'in_progress', retryAfterFix: null });
312
+ out(handoffForAgent(retry));
313
+ process.exit(0);
314
+ }
315
+
316
+ const idx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
317
+ const currentStep = steps[idx];
318
+ if (!currentStep) {
319
+ writeStatus({ phase: 'done', state: 'completed', currentAgent: null });
320
+ out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
321
+ process.exit(0);
322
+ }
323
+
324
+ const completedAgent = status.currentAgent || getStepAgents(currentStep)[0];
325
+ const stepAgents = getStepAgents(currentStep);
326
+
327
+ if (currentStep.parallel && stepAgents.length > 1) {
328
+ const done = [...(status.parallelCompleted || [])];
329
+ if (completedAgent && !done.includes(completedAgent)) {
330
+ done.push(completedAgent);
331
+ }
332
+ writeStatus({ parallelCompleted: done });
333
+ const remaining = stepAgents.filter((a) => !done.includes(a));
334
+ if (remaining.length > 0) {
335
+ process.stdout.write('{}');
336
+ process.exit(0);
337
+ }
338
+ writeStatus({ parallelCompleted: [] });
339
+ }
340
+
341
+ if (hasGateAfterStep(currentStep, pipeline.humanGates)) {
342
+ writeStatus({
343
+ awaitingHumanGate: true,
344
+ state: 'awaiting_approval',
345
+ currentAgent: completedAgent,
346
+ });
347
+ process.stdout.write('{}');
348
+ process.exit(0);
349
+ }
350
+
351
+ const next = findNextExecutableStep(steps, idx + 1, taskDir);
352
+ if (!next) {
353
+ writeStatus({
354
+ pipelineIndex: steps.length,
355
+ phase: 'done',
356
+ state: 'completed',
357
+ currentAgent: null,
358
+ awaitingHumanGate: false,
359
+ });
360
+ out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
361
+ process.exit(0);
362
+ }
363
+
364
+ const { step: nextStep, index: nextIdx } = next;
365
+ const nextAgents = getStepAgents(nextStep);
366
+
367
+ writeStatus({
368
+ pipelineIndex: nextIdx,
369
+ currentAgent: nextAgents[0],
370
+ phase: 'executing',
371
+ state: 'in_progress',
372
+ awaitingHumanGate: false,
373
+ parallelCompleted: [],
374
+ });
375
+
376
+ if (nextStep.parallel && nextAgents.length > 1) {
377
+ out(handoffForParallelStep(nextStep));
378
+ } else {
379
+ out(handoffForAgent(nextAgents[0], nextStep.scope));
380
+ }
381
+ NODE
@@ -0,0 +1,18 @@
1
+ # Hooks cookbook (examples)
2
+
3
+ Optional scripts under `hooks/examples/`. **Not** referenced from default `hooks.json` (only `guard-shell-command.sh` + `chain-team-phases.sh`).
4
+
5
+ | Script | Purpose |
6
+ |--------|---------|
7
+ | `secret-guard.example.sh` | Fail if staged diff looks like secrets |
8
+ | `format-edited.example.sh` | Stack formatter / linter on edited files |
9
+ | `test-on-save.example.sh` | Scoped tests for the stack |
10
+
11
+ ## Wiring (Cursor)
12
+
13
+ 1. Copy an example into `hooks/` (drop `.example` suffix), e.g. `cp hooks/examples/secret-guard.example.sh hooks/secret-guard.sh`.
14
+ 2. `chmod +x hooks/secret-guard.sh`.
15
+ 3. Add a hook entry in `.cursor/hooks.json` (e.g. `beforeShellExecution` or `afterFileEdit` — see Cursor hooks docs).
16
+ 4. Keep cookbook scripts **out** of the default preset `hooks.json` when contributing back upstream.
17
+
18
+ Stack: **go** — recipes must stay stack-safe (no cross-stack lint/test commands).
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bash
2
+ # Optional: project formatter / configured static analysis on edited Java sources.
3
+ # NOT in default hooks.json. Discover formatter from repo/CI — do not invent one.
4
+ set -euo pipefail
5
+ changed=$(git diff --name-only --diff-filter=ACMR HEAD 2>/dev/null | grep '\.java$' || true)
6
+ if [[ -n "${changed:-}" ]]; then
7
+ # Prefer repo wrapper / Spotless / formatter already configured — placeholders only:
8
+ # ./mvnw spotless:apply OR ./gradlew spotlessApply OR google-java-format -i $changed
9
+ true
10
+ fi
11
+ exit 0
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ # Optional cookbook: block committing likely secrets in staged diffs.
3
+ # NOT wired in default hooks.json — copy to hooks/ and register manually.
4
+ set -euo pipefail
5
+ PATTERN='(AKIA[0-9A-Z]{16}|-----BEGIN (RSA |OPENSSH )?PRIVATE KEY-----|api[_-]?key\s*[:=]\s*['\''\"][^'\''\"]{12,})'
6
+ if git diff --cached -U0 2>/dev/null | grep -Eiq "$PATTERN"; then
7
+ echo "secret-guard: possible secret in staged diff — review before commit" >&2
8
+ exit 1
9
+ fi
10
+ exit 0
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ # Optional: scoped Maven/Gradle test after Java edits.
3
+ # NOT in default hooks.json. Prefer wrappers when present.
4
+ set -euo pipefail
5
+ changed=$(git diff --name-only --diff-filter=ACMR HEAD 2>/dev/null | grep '\.java$' || true)
6
+ if [[ -z "${changed:-}" ]]; then
7
+ exit 0
8
+ fi
9
+ if [[ -x ./mvnw ]]; then
10
+ ./mvnw -q test 2>/dev/null || true
11
+ elif [[ -x ./gradlew ]]; then
12
+ ./gradlew -q test 2>/dev/null || true
13
+ elif [[ -f pom.xml ]]; then
14
+ mvn -q test 2>/dev/null || true
15
+ elif [[ -f build.gradle || -f build.gradle.kts ]]; then
16
+ gradle -q test 2>/dev/null || true
17
+ fi
18
+ exit 0
@@ -0,0 +1,80 @@
1
+ #!/usr/bin/env bash
2
+ # Lightweight shell guard for Java hexagonal preset projects.
3
+ # Java: do NOT blanket-block mvn test / ./gradlew test / compiler/IDE inspections / configured static analysis / repo static analysis.
4
+ # Package-manager mismatch checks apply only when a JS lockfile/package.json exists.
5
+
6
+ set -euo pipefail
7
+ # JAVA_PRESET_GUARD: allow mvn/gradlew test; no Playwright/XCUITest assumptions
8
+
9
+ input=$(cat)
10
+
11
+ INPUT="$input" node <<'NODE'
12
+ const fs = require('fs');
13
+
14
+ const raw = process.env.INPUT || '';
15
+ let event;
16
+ try {
17
+ event = JSON.parse(raw);
18
+ } catch {
19
+ process.stdout.write('{ "permission": "allow" }');
20
+ process.exit(0);
21
+ }
22
+
23
+ const command = String(event.command || event.input?.command || '');
24
+ if (!command.trim()) {
25
+ process.stdout.write('{ "permission": "allow" }');
26
+ process.exit(0);
27
+ }
28
+
29
+ function out(permission, userMessage, agentMessage) {
30
+ process.stdout.write(JSON.stringify({
31
+ permission,
32
+ user_message: userMessage,
33
+ agent_message: agentMessage || userMessage,
34
+ }));
35
+ }
36
+
37
+ const dangerousGit = /\bgit\s+(reset\s+--hard|clean\s+-[^\n]*f|push\s+--force|push\s+-f|checkout\s+--\s+)/;
38
+ if (dangerousGit.test(command)) {
39
+ out(
40
+ 'ask',
41
+ 'This command looks destructive for git state. Review it before continuing.',
42
+ 'A project hook flagged a destructive git command. Ask the user before running it.',
43
+ );
44
+ process.exit(0);
45
+ }
46
+
47
+ const managerByFile = [
48
+ ['yarn.lock', 'yarn'],
49
+ ['pnpm-lock.yaml', 'pnpm'],
50
+ ['package-lock.json', 'npm'],
51
+ ].find(([file]) => fs.existsSync(file));
52
+
53
+ let expected = managerByFile?.[1];
54
+ if (!expected && fs.existsSync('package.json')) {
55
+ try {
56
+ const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
57
+ const pm = typeof pkg.packageManager === 'string' ? pkg.packageManager : '';
58
+ expected = pm.split('@')[0] || undefined;
59
+ } catch {
60
+ // Ignore invalid package.json in the hook; the agent can diagnose it later.
61
+ }
62
+ }
63
+
64
+ if (!expected) {
65
+ process.stdout.write('{ "permission": "allow" }');
66
+ process.exit(0);
67
+ }
68
+
69
+ const used = command.match(/(^|[;&|]\s*)(npm|yarn|pnpm)\s+/)?.[2];
70
+ if (used && used !== expected) {
71
+ out(
72
+ 'ask',
73
+ `This repository appears to use ${expected}, but the command uses ${used}. Confirm before continuing.`,
74
+ `Use ${expected} for package scripts and installs unless the user explicitly approves ${used}.`,
75
+ );
76
+ process.exit(0);
77
+ }
78
+
79
+ process.stdout.write('{ "permission": "allow" }');
80
+ NODE
@@ -0,0 +1,17 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "beforeShellExecution": [
5
+ {
6
+ "command": ".cursor/hooks/guard-shell-command.sh",
7
+ "failClosed": true
8
+ }
9
+ ],
10
+ "subagentStop": [
11
+ {
12
+ "command": ".cursor/hooks/chain-team-phases.sh",
13
+ "loop_limit": 15
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "mcpServers": {
3
+ "context7": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "@upstash/context7-mcp"
8
+ ]
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,97 @@
1
+ # Rules (preset java)
2
+
3
+ ## alwaysApply (3)
4
+
5
+ | Rule | Role |
6
+ |------|------|
7
+ | `java-app-core` | Stack + layout (Spring Boot hexagonal default) |
8
+ | `architecture-boundaries` | Hexagonal invariants |
9
+ | `code-quality-and-refactoring` | Shared quality + Java notes |
10
+
11
+ **Session-start body budget:** sum of the 3 always-on bodies ≤ **120** lines (stretch ≤100).
12
+
13
+ ## Twin depth (Cursor↔Claude)
14
+
15
+ - **Domain** rules: target ≥15 non-empty body lines (FAIL soft when undocumented stubs).
16
+ - **Thin aliases** (may be shorter): `agent-team-intake`, `technical-retro`.
17
+ - **Documented stubs** (v1): `api-grpc`, `messaging-adapters` — catalog Depth=`stub`; bodies carry an in-file stub banner + when-to-use.
18
+
19
+ ## Loading strategy
20
+
21
+ - **`alwaysApply: true`** (Cursor) / **без `paths:`** (Claude) — только базовые инварианты (**3**): `java-app-core`, `architecture-boundaries`, `code-quality-and-refactoring`
22
+ - **On-demand / requestable** — `post-change-test`, `java-tooling`, `agent-team-intake`, `agent-team-orchestrator`, hexagonal domain/adapters, tests, feature-delivery-workflow, reference-features, `technical-retro`
23
+ - **Preset author meta** (globs `packages/ai-rules/presets/**`, never alwaysApply): `preset-layering`, `preset-twin-sync`, `preset-token-budget`, `preset-pr-checklist`, `preset-no-cross-stack-leakage`
24
+ - **Skills** — Phase C (deferred): `feature-delivery`, `code-review`, `integration-testing`, …
25
+
26
+ ### Hexagonal edit bundles
27
+
28
+ | When editing | Load |
29
+ |--------------|------|
30
+ | `**/domain/**` | `domain-layer` + `architecture-boundaries` |
31
+ | `**/application/**` | `application-usecases` + `ports-interfaces` |
32
+ | `**/adapters/inbound/**` or `**/adapters/http|grpc/**` | `adapters-driving` + `api-http` / `api-grpc` + `architecture-boundaries` |
33
+ | `**/adapters/outbound/**` or `**/adapters/persistence|messaging/**` | `adapters-driven` + `persistence-adapters` / `messaging-adapters` |
34
+ | `**/configuration/**`, `*Application.java` | `composition-root` |
35
+ | After `*.java` edits | `post-change-test` (+ `java-tooling`) |
36
+
37
+ ## Shared core → stack mapping
38
+
39
+ SoT prose: `packages/ai-rules/presets/_shared/core/**` (see `_shared/README.md`). Adapters carry `<!-- shared-core: … -->`.
40
+
41
+ | Shared core | This stack adapter | Mode | Delta |
42
+ |-------------|--------------------|------|-------|
43
+ | `quality/code-quality-and-refactoring.md` | `code-quality-and-refactoring.mdc` | embed | Stack notes: Java packages/ports, exceptions, `post-change-test` |
44
+ | `quality/design-guidance.md` | `design-guidance.mdc` | embed | requestable smells/GoF; Java Stack notes |
45
+ | `agent-team/agent-team-orchestrator.md` | `agent-team-orchestrator.mdc` | lineage | Roles (`integration-test-*`); preset PR pointer |
46
+ | `agent-team/agent-team-intake.md` | `agent-team-intake.mdc` | embed | thin alias |
47
+ | `architecture/feature-delivery-workflow.md` | `feature-delivery-workflow.mdc` | lineage | Java hexagonal checklist |
48
+ | `architecture/reference-features.template.md` | `reference-features.mdc` | lineage | `src/main/java/**` path table |
49
+ | `review/code-review-mr.md` | `code-review-mr.mdc` | embed | Java checklist |
50
+ | `review/technical-retro.md` | `technical-retro.mdc` | embed | thin alias |
51
+ | `meta/preset-*.md` | `preset-*.mdc` | embed | author-only globs (incl. `preset-no-cross-stack-leakage`) |
52
+
53
+ Claude twins + Cursor→Claude map: `presets/claude/java/rules/README.md`. Cross-stack leakage policy: `preset-no-cross-stack-leakage`.
54
+
55
+ ## Catalog
56
+
57
+ | Stem | Depth | Notes |
58
+ |------|-------|-------|
59
+ | `java-app-core` | full | always-on |
60
+ | `architecture-boundaries` | full | always-on |
61
+ | `code-quality-and-refactoring` | full | always-on + shared embed |
62
+ | `design-guidance` | full | requestable embed; Java Stack notes |
63
+ | `feature-delivery-workflow` | full | Java hexagonal checklist + matrix |
64
+ | `reference-features` | full | Java path table filled |
65
+ | `agent-team-orchestrator` | full | Roles table (21) + Java handoffs / `integration-test-*` |
66
+ | `code-review-mr` | full | Java Stack notes checklist |
67
+ | `preset-*` (×5) | full | author meta |
68
+ | `agent-team-intake` | thin-alias | |
69
+ | `technical-retro` | thin-alias | |
70
+ | `api-grpc` | stub | optional transport; stub banner + when-to-use |
71
+ | `domain-layer` | full | framework-free domain |
72
+ | `application-usecases` | full | |
73
+ | `ports-interfaces` | full | |
74
+ | `adapters-driven` | full | outbound persistence/cache/messaging |
75
+ | `adapters-driving` | full | inbound HTTP/gRPC/CLI |
76
+ | `composition-root` | full | Spring `@Configuration` + plain Java bootstrap |
77
+ | `api-http` | full | Spring MVC/Jakarta; DTO validation/mapping |
78
+ | `persistence-adapters` | full | JPA/JDBC; entities do not leak upward |
79
+ | `messaging-adapters` | stub | optional; stub banner + when-to-use |
80
+ | `module-public-api` | full | package/module boundaries |
81
+ | `java-conventions` | full | records, exceptions, naming, no invented APIs |
82
+ | `java-tooling` | full | requestable Maven/Gradle detect |
83
+ | `post-change-test` | full | requestable gate |
84
+ | `security-java` | full | secrets, validation; Spring Security pointer only |
85
+ | `tests-unit` | full | JUnit 5, AssertJ if present, Mockito optional |
86
+ | `tests-integration` | full | Testcontainers, Spring slices when needed |
87
+ | `tests-e2e` | full | optional smoke; prefer integration-test-* |
88
+
89
+ **Всего topic `.mdc`:** 28 domain + 5 preset-meta (без README) = 33.
90
+
91
+ ## Defaults (human-locked)
92
+
93
+ - Spring Boot hexagonal = public default; plain Java / Quarkus / Micronaut / Jakarta = documented variants
94
+ - Layer-first single-module = default; multi-module = documented variant
95
+ - gRPC/messaging = documented stubs in v1
96
+ - MCP = Context7 only
97
+ - Static analysis = discover from repo/CI (no mandated Checkstyle/SpotBugs/Error Prone)