@bonesofspring/ai-rules 0.2.15 → 0.2.16

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 (258) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +3 -1
  3. package/bin/cli.js +2 -0
  4. package/package.json +1 -1
  5. package/presets/_shared/core/meta/preset-layering.md +1 -1
  6. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +25 -12
  7. package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
  8. package/presets/_shared/core/meta/preset-twin-sync.md +2 -0
  9. package/presets/claude/android-kotlin/CLAUDE.md +38 -0
  10. package/presets/claude/android-kotlin/MCP.md +16 -0
  11. package/presets/claude/android-kotlin/README.md +32 -0
  12. package/presets/claude/android-kotlin/REPO_AGENTS.md +48 -0
  13. package/presets/claude/android-kotlin/agents/README.md +44 -0
  14. package/presets/claude/android-kotlin/agents/accessibility-reviewer.md +60 -0
  15. package/presets/claude/android-kotlin/agents/api-contract-reviewer.md +70 -0
  16. package/presets/claude/android-kotlin/agents/build-verifier.md +67 -0
  17. package/presets/claude/android-kotlin/agents/ci-investigator.md +74 -0
  18. package/presets/claude/android-kotlin/agents/code-reviewer.md +74 -0
  19. package/presets/claude/android-kotlin/agents/codebase-analyzer.md +28 -0
  20. package/presets/claude/android-kotlin/agents/debugger.md +77 -0
  21. package/presets/claude/android-kotlin/agents/feature-developer.md +63 -0
  22. package/presets/claude/android-kotlin/agents/instrumentation-test-generator.md +19 -0
  23. package/presets/claude/android-kotlin/agents/instrumentation-test-healer.md +19 -0
  24. package/presets/claude/android-kotlin/agents/instrumentation-test-planner.md +19 -0
  25. package/presets/claude/android-kotlin/agents/migration-specialist.md +74 -0
  26. package/presets/claude/android-kotlin/agents/performance-auditor.md +67 -0
  27. package/presets/claude/android-kotlin/agents/qa-tester.md +66 -0
  28. package/presets/claude/android-kotlin/agents/security-reviewer.md +65 -0
  29. package/presets/claude/android-kotlin/agents/solution-architect.md +21 -0
  30. package/presets/claude/android-kotlin/agents/task-analyst.md +36 -0
  31. package/presets/claude/android-kotlin/agents/task-router.md +103 -0
  32. package/presets/claude/android-kotlin/agents/tech-writer.md +61 -0
  33. package/presets/claude/android-kotlin/agents/unit-test-generator.md +55 -0
  34. package/presets/claude/android-kotlin/agents/unit-test-healer.md +54 -0
  35. package/presets/claude/android-kotlin/agents/unit-test-planner.md +65 -0
  36. package/presets/claude/android-kotlin/commands/README.md +51 -0
  37. package/presets/claude/android-kotlin/commands/feature-continue.md +19 -0
  38. package/presets/claude/android-kotlin/commands/feature-start.md +33 -0
  39. package/presets/claude/android-kotlin/commands/task-continue.md +50 -0
  40. package/presets/claude/android-kotlin/commands/task.md +56 -0
  41. package/presets/claude/android-kotlin/commands/technical-retro.md +85 -0
  42. package/presets/claude/android-kotlin/hooks/README.md +16 -0
  43. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +705 -0
  44. package/presets/claude/android-kotlin/hooks/examples/README.md +18 -0
  45. package/presets/claude/android-kotlin/hooks/examples/format-edited.example.sh +13 -0
  46. package/presets/claude/android-kotlin/hooks/examples/secret-guard.example.sh +10 -0
  47. package/presets/claude/android-kotlin/hooks/examples/test-on-save.example.sh +8 -0
  48. package/presets/claude/android-kotlin/hooks/guard-shell-command.sh +80 -0
  49. package/presets/claude/android-kotlin/mcp.json +12 -0
  50. package/presets/claude/android-kotlin/rules/README.md +63 -0
  51. package/presets/claude/android-kotlin/rules/api-and-data/README.md +10 -0
  52. package/presets/claude/android-kotlin/rules/api-and-data/networking.md +30 -0
  53. package/presets/claude/android-kotlin/rules/api-and-data/persistence.md +29 -0
  54. package/presets/claude/android-kotlin/rules/architecture/README.md +9 -0
  55. package/presets/claude/android-kotlin/rules/architecture/boundaries.md +27 -0
  56. package/presets/claude/android-kotlin/rules/architecture/di-dagger-feature-holders.md +34 -0
  57. package/presets/claude/android-kotlin/rules/architecture/feature-delivery.md +41 -0
  58. package/presets/claude/android-kotlin/rules/architecture/module-public-api.md +29 -0
  59. package/presets/claude/android-kotlin/rules/architecture/reference-features.md +28 -0
  60. package/presets/claude/android-kotlin/rules/stack/README.md +6 -0
  61. package/presets/claude/android-kotlin/rules/stack/android-app-core.md +27 -0
  62. package/presets/claude/android-kotlin/rules/stack/kotlin-conventions.md +30 -0
  63. package/presets/claude/android-kotlin/rules/testing/README.md +10 -0
  64. package/presets/claude/android-kotlin/rules/testing/ui.md +28 -0
  65. package/presets/claude/android-kotlin/rules/testing/unit.md +29 -0
  66. package/presets/claude/android-kotlin/rules/tooling-and-review/README.md +19 -0
  67. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +18 -0
  68. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +127 -0
  69. package/presets/claude/android-kotlin/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  70. package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +52 -0
  71. package/presets/claude/android-kotlin/rules/tooling-and-review/code-review.md +88 -0
  72. package/presets/claude/android-kotlin/rules/tooling-and-review/design-guidance.md +110 -0
  73. package/presets/claude/android-kotlin/rules/tooling-and-review/gradle-tooling.md +30 -0
  74. package/presets/claude/android-kotlin/rules/tooling-and-review/post-change-build.md +34 -0
  75. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-layering.md +36 -0
  76. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-no-cross-stack-leakage.md +100 -0
  77. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  78. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-token-budget.md +41 -0
  79. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +56 -0
  80. package/presets/claude/android-kotlin/rules/tooling-and-review/security-android.md +29 -0
  81. package/presets/claude/android-kotlin/rules/tooling-and-review/technical-retro.md +18 -0
  82. package/presets/claude/android-kotlin/rules/ui-and-accessibility/README.md +7 -0
  83. package/presets/claude/android-kotlin/rules/ui-and-accessibility/compose.md +31 -0
  84. package/presets/claude/android-kotlin/rules/ui-and-accessibility/navigation.md +30 -0
  85. package/presets/claude/android-kotlin/rules/ui-and-accessibility/viewmodels.md +27 -0
  86. package/presets/claude/android-kotlin/skills/README.md +14 -0
  87. package/presets/claude/android-kotlin/skills/ci-investigation/SKILL.md +39 -0
  88. package/presets/claude/android-kotlin/skills/code-review/SKILL.md +39 -0
  89. package/presets/claude/android-kotlin/skills/debug-investigation/SKILL.md +34 -0
  90. package/presets/claude/android-kotlin/skills/feature-delivery/SKILL.md +35 -0
  91. package/presets/claude/android-kotlin/skills/instrumentation-ui-e2e/SKILL.md +17 -0
  92. package/presets/claude/android-kotlin/skills/technical-retro/SKILL.md +54 -0
  93. package/presets/claude/android-kotlin/skills/unit-testing/SKILL.md +32 -0
  94. package/presets/claude/android-kotlin/skills/write-adr/SKILL.md +41 -0
  95. package/presets/claude/android-kotlin/team/README.md +54 -0
  96. package/presets/claude/android-kotlin/team/conventions.md +17 -0
  97. package/presets/claude/android-kotlin/team/fixtures/bugfix-standard.json +47 -0
  98. package/presets/claude/android-kotlin/team/fixtures/feature-full.json +97 -0
  99. package/presets/claude/android-kotlin/team/fixtures/feature-light.json +38 -0
  100. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
  101. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
  102. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  103. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +2 -0
  104. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +1 -1
  105. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
  106. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  107. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +2 -0
  108. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +1 -1
  109. package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
  110. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  111. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +2 -0
  112. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +1 -1
  113. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
  114. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  115. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +2 -0
  116. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +1 -1
  117. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
  118. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  119. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +2 -0
  120. package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +1 -1
  121. package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
  122. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  123. package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +2 -0
  124. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +1 -1
  125. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
  126. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  127. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +2 -0
  128. package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +1 -1
  129. package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
  130. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  131. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +2 -0
  132. package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +1 -1
  133. package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
  134. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  135. package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +2 -0
  136. package/presets/cursor/android-kotlin/AGENTS.md +50 -0
  137. package/presets/cursor/android-kotlin/BUGBOT.md +16 -0
  138. package/presets/cursor/android-kotlin/MCP.md +16 -0
  139. package/presets/cursor/android-kotlin/README.md +35 -0
  140. package/presets/cursor/android-kotlin/REPO_AGENTS.md +48 -0
  141. package/presets/cursor/android-kotlin/agents/README.md +44 -0
  142. package/presets/cursor/android-kotlin/agents/accessibility-reviewer.md +60 -0
  143. package/presets/cursor/android-kotlin/agents/api-contract-reviewer.md +70 -0
  144. package/presets/cursor/android-kotlin/agents/build-verifier.md +67 -0
  145. package/presets/cursor/android-kotlin/agents/ci-investigator.md +74 -0
  146. package/presets/cursor/android-kotlin/agents/code-reviewer.md +74 -0
  147. package/presets/cursor/android-kotlin/agents/codebase-analyzer.md +28 -0
  148. package/presets/cursor/android-kotlin/agents/debugger.md +77 -0
  149. package/presets/cursor/android-kotlin/agents/feature-developer.md +63 -0
  150. package/presets/cursor/android-kotlin/agents/instrumentation-test-generator.md +19 -0
  151. package/presets/cursor/android-kotlin/agents/instrumentation-test-healer.md +19 -0
  152. package/presets/cursor/android-kotlin/agents/instrumentation-test-planner.md +19 -0
  153. package/presets/cursor/android-kotlin/agents/migration-specialist.md +74 -0
  154. package/presets/cursor/android-kotlin/agents/performance-auditor.md +67 -0
  155. package/presets/cursor/android-kotlin/agents/qa-tester.md +66 -0
  156. package/presets/cursor/android-kotlin/agents/security-reviewer.md +65 -0
  157. package/presets/cursor/android-kotlin/agents/solution-architect.md +21 -0
  158. package/presets/cursor/android-kotlin/agents/task-analyst.md +36 -0
  159. package/presets/cursor/android-kotlin/agents/task-router.md +103 -0
  160. package/presets/cursor/android-kotlin/agents/tech-writer.md +61 -0
  161. package/presets/cursor/android-kotlin/agents/unit-test-generator.md +55 -0
  162. package/presets/cursor/android-kotlin/agents/unit-test-healer.md +54 -0
  163. package/presets/cursor/android-kotlin/agents/unit-test-planner.md +65 -0
  164. package/presets/cursor/android-kotlin/commands/README.md +51 -0
  165. package/presets/cursor/android-kotlin/commands/feature-continue.md +19 -0
  166. package/presets/cursor/android-kotlin/commands/feature-start.md +33 -0
  167. package/presets/cursor/android-kotlin/commands/task-continue.md +50 -0
  168. package/presets/cursor/android-kotlin/commands/task.md +56 -0
  169. package/presets/cursor/android-kotlin/commands/technical-retro.md +85 -0
  170. package/presets/cursor/android-kotlin/hooks/README.md +12 -0
  171. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +723 -0
  172. package/presets/cursor/android-kotlin/hooks/examples/README.md +18 -0
  173. package/presets/cursor/android-kotlin/hooks/examples/format-edited.example.sh +13 -0
  174. package/presets/cursor/android-kotlin/hooks/examples/secret-guard.example.sh +10 -0
  175. package/presets/cursor/android-kotlin/hooks/examples/test-on-save.example.sh +8 -0
  176. package/presets/cursor/android-kotlin/hooks/guard-shell-command.sh +80 -0
  177. package/presets/cursor/android-kotlin/hooks.json +17 -0
  178. package/presets/cursor/android-kotlin/mcp.json +11 -0
  179. package/presets/cursor/android-kotlin/rules/README.md +61 -0
  180. package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +16 -0
  181. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +124 -0
  182. package/presets/cursor/android-kotlin/rules/android-app-core.mdc +28 -0
  183. package/presets/cursor/android-kotlin/rules/anti-sycophancy-discipline.mdc +30 -0
  184. package/presets/cursor/android-kotlin/rules/architecture-boundaries.mdc +28 -0
  185. package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +53 -0
  186. package/presets/cursor/android-kotlin/rules/code-review-mr.mdc +84 -0
  187. package/presets/cursor/android-kotlin/rules/compose-ui.mdc +32 -0
  188. package/presets/cursor/android-kotlin/rules/design-guidance.mdc +111 -0
  189. package/presets/cursor/android-kotlin/rules/di-dagger-feature-holders.mdc +35 -0
  190. package/presets/cursor/android-kotlin/rules/feature-delivery-workflow.mdc +36 -0
  191. package/presets/cursor/android-kotlin/rules/gradle-tooling.mdc +31 -0
  192. package/presets/cursor/android-kotlin/rules/kotlin-conventions.mdc +31 -0
  193. package/presets/cursor/android-kotlin/rules/module-public-api.mdc +30 -0
  194. package/presets/cursor/android-kotlin/rules/navigation-feature-launcher.mdc +31 -0
  195. package/presets/cursor/android-kotlin/rules/networking-data.mdc +31 -0
  196. package/presets/cursor/android-kotlin/rules/persistence-data.mdc +30 -0
  197. package/presets/cursor/android-kotlin/rules/post-change-build.mdc +30 -0
  198. package/presets/cursor/android-kotlin/rules/preset-layering.mdc +36 -0
  199. package/presets/cursor/android-kotlin/rules/preset-no-cross-stack-leakage.mdc +100 -0
  200. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +39 -0
  201. package/presets/cursor/android-kotlin/rules/preset-token-budget.mdc +41 -0
  202. package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +56 -0
  203. package/presets/cursor/android-kotlin/rules/reference-features.mdc +29 -0
  204. package/presets/cursor/android-kotlin/rules/security-android.mdc +30 -0
  205. package/presets/cursor/android-kotlin/rules/state-and-viewmodels.mdc +28 -0
  206. package/presets/cursor/android-kotlin/rules/technical-retro.mdc +16 -0
  207. package/presets/cursor/android-kotlin/rules/tests-ui.mdc +29 -0
  208. package/presets/cursor/android-kotlin/rules/tests-unit.mdc +30 -0
  209. package/presets/cursor/android-kotlin/skills/README.md +14 -0
  210. package/presets/cursor/android-kotlin/skills/ci-investigation/SKILL.md +39 -0
  211. package/presets/cursor/android-kotlin/skills/code-review/SKILL.md +39 -0
  212. package/presets/cursor/android-kotlin/skills/debug-investigation/SKILL.md +34 -0
  213. package/presets/cursor/android-kotlin/skills/feature-delivery/SKILL.md +35 -0
  214. package/presets/cursor/android-kotlin/skills/instrumentation-ui-e2e/SKILL.md +17 -0
  215. package/presets/cursor/android-kotlin/skills/technical-retro/SKILL.md +54 -0
  216. package/presets/cursor/android-kotlin/skills/unit-testing/SKILL.md +32 -0
  217. package/presets/cursor/android-kotlin/skills/write-adr/SKILL.md +41 -0
  218. package/presets/cursor/android-kotlin/team/README.md +54 -0
  219. package/presets/cursor/android-kotlin/team/conventions.md +17 -0
  220. package/presets/cursor/android-kotlin/team/fixtures/bugfix-standard.json +47 -0
  221. package/presets/cursor/android-kotlin/team/fixtures/feature-full.json +97 -0
  222. package/presets/cursor/android-kotlin/team/fixtures/feature-light.json +38 -0
  223. package/presets/cursor/go/rules/preset-layering.mdc +1 -1
  224. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +25 -12
  225. package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
  226. package/presets/cursor/go/rules/preset-twin-sync.mdc +2 -0
  227. package/presets/cursor/ios-swift/rules/preset-layering.mdc +1 -1
  228. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +25 -12
  229. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
  230. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +2 -0
  231. package/presets/cursor/java/rules/preset-layering.mdc +1 -1
  232. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +25 -12
  233. package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -1
  234. package/presets/cursor/java/rules/preset-twin-sync.mdc +2 -0
  235. package/presets/cursor/mcp-ts/rules/preset-layering.mdc +1 -1
  236. package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +25 -12
  237. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +1 -1
  238. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +2 -0
  239. package/presets/cursor/next/rules/preset-layering.mdc +1 -1
  240. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +25 -12
  241. package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
  242. package/presets/cursor/next/rules/preset-twin-sync.mdc +2 -0
  243. package/presets/cursor/nuxt/rules/preset-layering.mdc +1 -1
  244. package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +25 -12
  245. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +1 -1
  246. package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +2 -0
  247. package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +1 -1
  248. package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +25 -12
  249. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +1 -1
  250. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +2 -0
  251. package/presets/cursor/php-laravel/rules/preset-layering.mdc +1 -1
  252. package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +25 -12
  253. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +1 -1
  254. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +2 -0
  255. package/presets/cursor/svelte/rules/preset-layering.mdc +1 -1
  256. package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +25 -12
  257. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +1 -1
  258. package/presets/cursor/svelte/rules/preset-twin-sync.mdc +2 -0
@@ -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: **android-kotlin** — recipes must stay stack-safe (no cross-stack lint/test commands).
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env bash
2
+ # Optional cookbook: ktlint / detekt on edited Kotlin files.
3
+ # NOT wired in default hooks.json — copy into a custom hook if desired.
4
+
5
+ set -euo pipefail
6
+
7
+ if command -v ktlint >/dev/null 2>&1; then
8
+ git diff --name-only --diff-filter=ACMR HEAD 2>/dev/null | grep -E '\.(kt|kts)$' | while read -r f; do
9
+ [[ -f "$f" ]] && ktlint -F "$f" || true
10
+ done
11
+ fi
12
+
13
+ # detekt — only if the repo already configures it; do not invent a gate here.
@@ -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,8 @@
1
+ #!/usr/bin/env bash
2
+ # Optional: ./gradlew test slice for the active scheme (adjust SCHEME/DEST).
3
+ # NOT in default hooks.json. No Playwright / yarn lint.
4
+ set -euo pipefail
5
+ SCHEME="${XCODE_SCHEME:-App}"
6
+ DEST="${XCODE_DESTINATION:-platform=Android Simulator,name=iPhone 16}"
7
+ ./gradlew test -scheme "$SCHEME" -destination "$DEST" -quiet 2>/dev/null || true
8
+ exit 0
@@ -0,0 +1,80 @@
1
+ #!/usr/bin/env bash
2
+ # Lightweight shell guard for Android Kotlin preset projects.
3
+ # Android: 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
+ # ANDROID_PRESET_GUARD: allow ./gradlew compile/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,12 @@
1
+ {
2
+ "mcpServers": {
3
+ "context7": {
4
+ "command": "npx",
5
+ "args": ["-y", "@upstash/context7-mcp"]
6
+ },
7
+ "figma": {
8
+ "type": "http",
9
+ "url": "https://mcp.figma.com/mcp"
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,63 @@
1
+ # `.claude/rules` (preset android-kotlin)
2
+
3
+ In Claude Code all `.md` files under `rules/` are **discovered recursively**. Bodies are **derived** from Cursor SoT; indexes are not a second SoT.
4
+
5
+ ## SoT sync
6
+
7
+ | Principle | Detail |
8
+ |-----------|--------|
9
+ | **SoT** | `presets/cursor/android-kotlin/rules/*.mdc` — edit here first |
10
+ | **Derive** | Claude topic `.md` = body + `paths:` (from Cursor `globs:` / requestable triggers) |
11
+ | **Drop** | Cursor-only keys (`alwaysApply`); keep short `description` |
12
+ | **Checklist** | change Cursor → update Claude twin **same PR** (**FAIL** if missing — see `preset-twin-sync` / build-verifier) |
13
+
14
+ ## Loading budget
15
+
16
+ - **Session-start (no `paths:`):** exactly **3** — `android-app-core`, `boundaries`, `code-quality` (≤140 body lines total)
17
+ - **Everything else** — with `paths:`
18
+ - **Soft twin depth:** domain rules ≥15 body lines; thin aliases (`agent-team-intake`, `technical-retro`) may be shorter
19
+
20
+ ## Cursor → Claude mapping
21
+
22
+ | Cursor `.mdc` (SoT) | Claude topic |
23
+ |---------------------|--------------|
24
+ | `android-app-core.mdc` | `stack/android-app-core.md` |
25
+ | `kotlin-conventions.mdc` | `stack/kotlin-conventions.md` |
26
+ | `architecture-boundaries.mdc` | `architecture/boundaries.md` |
27
+ | `feature-delivery-workflow.mdc` | `architecture/feature-delivery.md` |
28
+ | `reference-features.mdc` | `architecture/reference-features.md` |
29
+ | `module-public-api.mdc` | `architecture/module-public-api.md` |
30
+ | `di-dagger-feature-holders.mdc` | `architecture/di-dagger-feature-holders.md` |
31
+ | `networking-data.mdc` | `api-and-data/networking.md` |
32
+ | `persistence-data.mdc` | `api-and-data/persistence.md` |
33
+ | `compose-ui.mdc` | `ui-and-accessibility/compose.md` |
34
+ | `state-and-viewmodels.mdc` | `ui-and-accessibility/viewmodels.md` |
35
+ | `navigation-feature-launcher.mdc` | `ui-and-accessibility/navigation.md` |
36
+ | `tests-unit.mdc` | `testing/unit.md` |
37
+ | `tests-ui.mdc` | `testing/ui.md` |
38
+ | `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
39
+ | `anti-sycophancy-discipline.mdc` | `tooling-and-review/anti-sycophancy-discipline.md` |
40
+ | `design-guidance.mdc` | `tooling-and-review/design-guidance.md` |
41
+ | `code-review-mr.mdc` | `tooling-and-review/code-review.md` |
42
+ | `post-change-build.mdc` | `tooling-and-review/post-change-build.md` |
43
+ | `gradle-tooling.mdc` | `tooling-and-review/gradle-tooling.md` |
44
+ | `security-android.mdc` | `tooling-and-review/security-android.md` |
45
+ | `agent-team-intake.mdc` | `tooling-and-review/agent-team-intake.md` |
46
+ | `agent-team-orchestrator.mdc` | `tooling-and-review/agent-team-orchestrator.md` |
47
+ | `technical-retro.mdc` | `tooling-and-review/technical-retro.md` |
48
+ | `preset-layering.mdc` | `tooling-and-review/preset-layering.md` |
49
+ | `preset-twin-sync.mdc` | `tooling-and-review/preset-twin-sync.md` |
50
+ | `preset-token-budget.mdc` | `tooling-and-review/preset-token-budget.md` |
51
+ | `preset-pr-checklist.mdc` | `tooling-and-review/preset-pr-checklist.md` |
52
+ | `preset-no-cross-stack-leakage.mdc` | `tooling-and-review/preset-no-cross-stack-leakage.md` |
53
+
54
+ ## Folders
55
+
56
+ | Folder | About |
57
+ |--------|--------|
58
+ | `stack/` | Stack, Kotlin conventions |
59
+ | `architecture/` | Boundaries, feature-delivery, reference-features, module API, DI |
60
+ | `api-and-data/` | Networking, persistence |
61
+ | `testing/` | JVM unit, instrumentation UI |
62
+ | `ui-and-accessibility/` | Compose, ViewModels, navigation |
63
+ | `tooling-and-review/` | Quality, review, build, security, tooling, agent-team, retro, **preset meta** |
@@ -0,0 +1,10 @@
1
+ # API and data
2
+
3
+ Networking layer, persistence, DTOs, mappers. Index only — bodies live in topic `.md` files.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`networking.md`](./networking.md) | `networking-data.mdc` |
8
+ | [`persistence.md`](./persistence.md) | `persistence-data.mdc` |
9
+
10
+ Sync: change Cursor → update Claude twin same PR. Full map: [`../README.md`](../README.md).
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Networking and DTO→domain mapping in the data layer
3
+ paths:
4
+ - "**/data/**"
5
+ - "**/network/**"
6
+ ---
7
+
8
+ # Networking / data
9
+
10
+ - HTTP clients, serializers, and DTOs live in the **data** layer (or data packages under `features/<name>/impl`).
11
+ - Map DTO → domain at the data boundary; domain and presentation must not see transport DTOs.
12
+ - Prefer the stack already in the repo (OkHttp, Ktor, Retrofit, etc.) — do not introduce a second client “for cleanliness”.
13
+ - Errors: translate transport failures into domain/application error types used by the feature.
14
+ - Timeouts, interceptors, and auth headers follow existing client configuration.
15
+
16
+ # Boundaries
17
+
18
+ - No Compose / ViewModel imports in networking code.
19
+ - No business rules beyond mapping and orchestration already established in repositories/use cases.
20
+
21
+ # Agent requirements
22
+
23
+ - Colocate new endpoints/mappers next to analogs.
24
+ - Secrets and TLS policy — see `tooling-and-review/security-android`; never hard-code tokens.
25
+
26
+ # Resilience
27
+
28
+ - Retries/backoff only when the repo already has a shared policy — do not invent per-call retries.
29
+ - Cancellation must propagate with coroutines; do not swallow `CancellationException`.
30
+ - Pagination/cursors follow neighboring repository patterns.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Local persistence and datastore patterns in the data layer
3
+ paths:
4
+ - "**/data/local/**"
5
+ - "**/database/**"
6
+ ---
7
+
8
+ # Persistence / local data
9
+
10
+ - Room / DataStore / SQLDelight / file cache — **use what the repo already uses**.
11
+ - Persistence models stay in data; map to domain entities before crossing upward.
12
+ - Migrations and schema changes follow existing migration patterns and CI checks.
13
+ - Do not block the main thread; use the repo’s dispatcher / coroutine patterns.
14
+
15
+ # Boundaries
16
+
17
+ - Domain defines repository ports; data implements them with local + remote sources as needed.
18
+ - UI must not query DAOs directly.
19
+
20
+ # Agent requirements
21
+
22
+ - Prefer the narrowest change that preserves schema compatibility.
23
+ - Cover mappers and critical repository branches with JVM unit tests when feasible.
24
+
25
+ # Consistency
26
+
27
+ - Transactions follow existing DAO/helper patterns.
28
+ - Cache invalidation belongs with the repository that owns the source of truth.
29
+ - Prefer idempotent writes when syncing remote → local.
@@ -0,0 +1,9 @@
1
+ # architecture
2
+
3
+ | File | Cursor SoT |
4
+ |------|------------|
5
+ | [`boundaries.md`](./boundaries.md) | `architecture-boundaries.mdc` |
6
+ | [`feature-delivery.md`](./feature-delivery.md) | `feature-delivery-workflow.mdc` |
7
+ | [`reference-features.md`](./reference-features.md) | `reference-features.mdc` |
8
+ | [`module-public-api.md`](./module-public-api.md) | `module-public-api.mdc` |
9
+ | [`di-dagger-feature-holders.md`](./di-dagger-feature-holders.md) | `di-dagger-feature-holders.mdc` |
@@ -0,0 +1,27 @@
1
+ ---
2
+ description: Clean Architecture boundaries, api/impl modules, and DI summary for Android
3
+ ---
4
+
5
+ # Layer boundaries
6
+
7
+ - **Presentation** (Compose, ViewModels): may use domain entities/use-case ports and design-system; must not import data HTTP clients/DTOs or map DTO→domain.
8
+ - **Domain**: may use shared core types; must not import Android UI, networking, or concrete repositories.
9
+ - **Data**: implements domain ports; must not import Compose/ViewModels.
10
+
11
+ # Module boundaries (api / impl)
12
+
13
+ - Direction: **presentation → domain ← data** inside `features/<name>/impl/`.
14
+ - Other features depend only on **`features/<name>/api`** (public contracts / launcher ports) — never deep-import `impl`.
15
+ - App shells under `applications/` wire graphs; navigation across features via public launcher-style ports.
16
+ - Shared kernels live under `core/` — do not put feature business rules there.
17
+
18
+ # DI summary
19
+
20
+ - Feature-scoped **Dagger** holders/components (see `architecture/di-dagger-feature-holders`).
21
+ - **No Hilt by default** unless the consumer repo already standardized on it.
22
+ - ViewModels receive ports/use cases, not concrete data types.
23
+
24
+ # Agent requirement
25
+
26
+ - Place files in matching layers/modules; do not short-circuit api/impl for speed.
27
+ - Load `architecture/module-public-api` and `ui-and-accessibility/navigation` when editing public contracts.
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Feature-scoped Dagger holders/components; no Hilt by default
3
+ paths:
4
+ - "**/di/**"
5
+ - "**/*Holder*.kt"
6
+ - "**/*Component*.kt"
7
+ ---
8
+
9
+ # Dagger feature holders
10
+
11
+ - Prefer **feature-scoped** Dagger components / holders owned by `features/<name>/impl` (or the repo’s equivalent DI package).
12
+ - Expose only what the feature needs; do not create god-components that wire the whole app.
13
+ - App shells under `applications/` provide application-wide dependencies; features pull those via component dependencies / holder APIs already used in the repo.
14
+ - ViewModels and use cases are constructed via the holder/component — not via static globals.
15
+
16
+ # No Hilt by default
17
+
18
+ - **Do not introduce Hilt** unless the consumer repository already standardized on it.
19
+ - If the repo is Dagger-manual / holders, keep that pattern; do not “migrate to Hilt” as drive-by work.
20
+
21
+ # Boundaries
22
+
23
+ - DI graph assembly may import adapters for wiring only — no business rules inside modules/components.
24
+ - Other features consume public `api` contracts, not another feature’s DI internals.
25
+
26
+ # Agent requirements
27
+
28
+ - Follow neighboring `*Holder*` / `*Component*` patterns before inventing a new DI shape.
29
+ - Local holder type names belong in consumer `team/conventions.md`, not in this preset.
30
+
31
+ # Testing
32
+
33
+ - Provide test/fake holders or override bindings using the repo’s existing test DI pattern.
34
+ - Do not construct production graphs inside unit tests when a lightweight fake port suffices.
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: End-to-end checklist for Android features (domain → data → DI → presentation)
3
+ paths:
4
+ - .claude/commands/**/*
5
+ - .claude/agents/**/*
6
+ - .claude/team/tasks/**/*
7
+ - "features/**"
8
+ - "**/*.{kt,kts}"
9
+ ---
10
+
11
+ <!-- shared-core: architecture/feature-delivery-workflow.md -->
12
+
13
+ # Feature delivery (Android Kotlin)
14
+
15
+ Deliver features in layer order. Prefer neighboring `features/<name>/` analogs.
16
+
17
+ ## Checklist
18
+
19
+ 1. **Public API** — contracts / launcher ports in `features/<name>/api` when other modules will depend on them (`architecture/module-public-api`).
20
+ 2. **Domain** — entities, use-case ports; no Android UI / HTTP DTOs (`architecture/boundaries`).
21
+ 3. **Data** — repository implementations, DTO mappers, persistence (`api-and-data/networking`, `api-and-data/persistence`).
22
+ 4. **DI** — feature Dagger holder/component wiring (`architecture/di-dagger-feature-holders`); **no Hilt by default**.
23
+ 5. **Presentation** — ViewModel MVI/UDF + Compose screens (`ui-and-accessibility/viewmodels`, `ui-and-accessibility/compose`).
24
+ 6. **Navigation** — wire launcher ports / host (`ui-and-accessibility/navigation`).
25
+ 7. **Tests** — JVM unit tests; instrumentation when UI AC requires (`testing/unit`, `testing/ui`).
26
+ 8. **Gate** — invoke **`tooling-and-review/post-change-build`** + **`tooling-and-review/gradle-tooling`**.
27
+
28
+ ## Layer → rule matrix
29
+
30
+ | Layer | Rules |
31
+ |-------|-------|
32
+ | api / contracts | `module-public-api`, `navigation` |
33
+ | domain / data | `boundaries`, `networking`, `persistence` |
34
+ | di | `di-dagger-feature-holders` |
35
+ | presentation | `viewmodels`, `compose` |
36
+ | tests | `unit`, `ui`, skill `instrumentation-ui-e2e` |
37
+
38
+ ## Agent requirements
39
+
40
+ - Skill `feature-delivery` owns the end-to-end path; do not skip api/impl boundaries for speed.
41
+ - Local type names only in consumer `team/conventions.md`.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Public api module contracts for Android multimodule features
3
+ paths:
4
+ - "**/api/**"
5
+ - "**/*Api.kt"
6
+ ---
7
+
8
+ # Module public API
9
+
10
+ - `features/<name>/api` (or equivalent) holds **public** contracts: models safe to share, navigation/launcher ports, public facades.
11
+ - Implementation details stay in `impl` — other modules must not depend on `impl`.
12
+ - Prefer stable, minimal surfaces; expanding a public API is a deliberate contract change.
13
+ - Do not leak DTOs, database entities, or Compose UI types through `api` unless the repo already does so intentionally.
14
+
15
+ # Cross-feature access
16
+
17
+ - Consume another feature only via its `api` artifacts (Gradle dependency on the api module).
18
+ - Navigation between features uses launcher-style ports declared in `api` (`ui-and-accessibility/navigation`).
19
+
20
+ # Agent requirements
21
+
22
+ - When adding a symbol used outside the feature, place it in `api` and keep `impl` private.
23
+ - Breaking api changes need explicit AC / review — do not silently widen visibility.
24
+
25
+ # Versioning mindset
26
+
27
+ - Treat api module changes as consumer-facing even inside a monorepo.
28
+ - Prefer additive changes; renames/removals need migration notes in the task brief.
29
+ - Keep Gradle `api` vs `implementation` dependencies consistent with visibility intent.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: Placeholder reference feature paths for Android multimodule repos
3
+ paths:
4
+ - "features/**"
5
+ ---
6
+
7
+ # Reference features (placeholders)
8
+
9
+ Use these **placeholder** paths when pointing agents at analogs. Replace with real module names in the consumer repo (and optionally document local names in `team/conventions.md`).
10
+
11
+ | Concern | Placeholder path |
12
+ |---------|------------------|
13
+ | App shell | `applications/<app>/` |
14
+ | Shared kernel | `core/` |
15
+ | Feature public API | `features/<name>/api/` |
16
+ | Feature implementation | `features/<name>/impl/` |
17
+ | DI holders | `features/<name>/impl/**/di/` |
18
+ | Presentation | `features/<name>/impl/**/presentation/` |
19
+ | Data | `features/<name>/impl/**/data/` |
20
+ | Convention plugins | `build-logic/` |
21
+ | Version catalog | `gradle/libs.versions.toml` |
22
+ | JVM tests | `**/src/test/**` |
23
+ | Instrumentation | `**/src/androidTest/**` |
24
+
25
+ # Agent requirements
26
+
27
+ - Copy patterns from the closest neighboring feature — do not invent a parallel layout.
28
+ - Never cite private consumer monorepo or vendor names in shared preset text.
@@ -0,0 +1,6 @@
1
+ # stack
2
+
3
+ | File | Cursor SoT |
4
+ |------|------------|
5
+ | [`android-app-core.md`](./android-app-core.md) | `android-app-core.mdc` |
6
+ | [`kotlin-conventions.md`](./kotlin-conventions.md) | `kotlin-conventions.mdc` |
@@ -0,0 +1,27 @@
1
+ ---
2
+ description: Core principles, stack, and structure for an Android Kotlin multimodule app (preset)
3
+ ---
4
+
5
+ # Stack and environment
6
+
7
+ Versions come **from the consumer repo** (`gradle/libs.versions.toml`, AGP, Kotlin plugin, CI). Frame: Kotlin, Android Gradle Plugin; Jetpack Compose Material 3 + project design-system preferred; coroutines/Flow; product flavors/variants as configured; JVM unit tests + `androidTest` instrumentation; networking/persistence — as already chosen in the repo.
8
+
9
+ # Project structure (placeholders)
10
+
11
+ ```text
12
+ applications/ # app shells / product entry modules
13
+ core/ # shared kernels / design-system host
14
+ features/<name>/
15
+ api/ # public contracts, navigation ports
16
+ impl/ # data / domain / presentation / di
17
+ build-logic/ # convention plugins (includeBuild)
18
+ gradle/libs.versions.toml
19
+ gradlew | documented wrapper
20
+ ```
21
+
22
+ Place new files next to analogs. Boundaries/DI — **`architecture/boundaries`**. Tooling — **`tooling-and-review/gradle-tooling`**. After Kotlin/Android edits — **invoke** **`tooling-and-review/post-change-build`**.
23
+
24
+ # Agent work
25
+
26
+ - Features: `architecture/feature-delivery`; UI tests: skill `instrumentation-ui-e2e` + `instrumentation-test-*`.
27
+ - Local type names (ViewModel base, DI holders, design-system package) — consumer `team/conventions.md` only.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Kotlin style, null-safety, and coroutine conventions for Android
3
+ paths:
4
+ - "**/*.{kt,kts}"
5
+ ---
6
+
7
+ # Kotlin conventions
8
+
9
+ - Prefer idiomatic Kotlin already used in neighboring files (naming, package layout, visibility).
10
+ - **Null-safety:** avoid `!!` in production paths; use `?.`, `?:`, early `return`, or typed errors.
11
+ - Prefer `val` / immutability for state snapshots; mutate only behind clear owners (ViewModel, repository).
12
+ - Coroutines: structured concurrency (`viewModelScope` / supervised scopes); cancel cooperatively; no fire-and-forget globals.
13
+ - Flow/StateFlow for streams; collect in lifecycle-aware scopes (Compose / lifecycle owners).
14
+ - Sealed classes/interfaces for UI events and domain errors when the repo pattern uses them.
15
+ - Do not invent new style tooling — follow ktlint/detekt/Android Lint **if** configured in the repo.
16
+
17
+ # Agent requirements
18
+
19
+ - Match neighboring module conventions before introducing a new pattern.
20
+ - Unverifiable third-party APIs → `// VERIFY:` comment (see `tooling-and-review/anti-sycophancy-discipline`).
21
+
22
+ # Packages and visibility
23
+
24
+ - Prefer `internal` for feature-impl helpers; public only at `api` module boundaries.
25
+ - Avoid wildcard imports that fight the repo’s ktlint/detekt settings.
26
+ - Extension functions stay near the type they extend or in established util packages.
27
+
28
+ # Errors
29
+
30
+ - Prefer typed results / sealed errors already used in the feature over bare exceptions in domain code.
@@ -0,0 +1,10 @@
1
+ # Testing
2
+
3
+ Unit (JUnit 4/5, repo default) and UI (Android instrumentation). Index only — bodies live in topic `.md` files.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`unit.md`](./unit.md) | `tests-unit.mdc` |
8
+ | [`ui.md`](./ui.md) | `tests-ui.mdc` |
9
+
10
+ Sync: change Cursor → update Claude twin same PR. Full map: [`../README.md`](../README.md).
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: Android instrumentation UI tests (androidTest)
3
+ paths:
4
+ - "**/androidTest/**"
5
+ ---
6
+
7
+ # UI tests (instrumentation)
8
+
9
+ - Default agent surface: **Android instrumentation** under `androidTest` (devices/emulators/CI as configured).
10
+ - Discover the concrete framework from the consumer repo (Espresso, Compose UI Test, or project-chosen alternatives) — do not mandate a single library in always-on rules.
11
+ - Stable semantics / test tags / content descriptions aligned with presentation conventions.
12
+ - Keep tests behavior-focused; avoid brittle sleep-based synchronization when idling strategies exist.
13
+
14
+ # Agent team
15
+
16
+ - Plan/generate/heal via `instrumentation-test-{planner,generator,healer}` and skill `instrumentation-ui-e2e`.
17
+ - Do **not** require Playwright, XCUITest, or yarn `lint:js`/`lint:css` as Android UI-test handoffs.
18
+
19
+ # Agent requirements
20
+
21
+ - Prefer page objects / robot patterns already used in the repo.
22
+ - Wire flavors/variants via Gradle tasks discovered in `tooling-and-review/gradle-tooling`.
23
+
24
+ # Data & isolation
25
+
26
+ - Use test fixtures/fakes already adopted by the module; avoid hitting production backends.
27
+ - Clean state between tests when sharing an app process.
28
+ - Record the Gradle task used (`connected*` / managed device) in the plan/receipt.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: JVM unit test conventions for Android Kotlin modules
3
+ paths:
4
+ - "**/test/**"
5
+ - "**/*Test.kt"
6
+ ---
7
+
8
+ # Unit tests (JVM)
9
+
10
+ - Prefer fast JVM unit tests under `src/test` for domain, mappers, ViewModel reducers, and pure use cases.
11
+ - Use the repo’s stack (JUnit4/5, MockK, Turbine, Truth/AssertJ — **as already configured**).
12
+ - Fake ports over heavy Android instrumentation for logic tests.
13
+ - Name tests after behavior; keep arrange/act/assert clear.
14
+
15
+ # Scope
16
+
17
+ - Do not require device/emulator for pure logic.
18
+ - UI flows belong in `androidTest` / instrumentation agents — see `testing/ui`.
19
+
20
+ # Agent requirements
21
+
22
+ - Agents `unit-test-*` + skill `unit-testing` own planning/generation/healing.
23
+ - After production edits, run the narrowest `./gradlew …Test` suite via `tooling-and-review/post-change-build` / `tooling-and-review/gradle-tooling`.
24
+
25
+ # Flakes & determinism
26
+
27
+ - Control clocks/dispatchers when testing coroutines/Flow.
28
+ - Avoid relying on real Android framework types in JVM tests unless Robolectric is already standard.
29
+ - Prefer table-driven cases for mapper edge inputs.
@@ -0,0 +1,19 @@
1
+ # Tooling and review
2
+
3
+ Quality, review, build, security, agent-team, retro. Index only — bodies live in topic `.md` files.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`code-quality.md`](./code-quality.md) | `code-quality-and-refactoring.mdc` |
8
+ | [`code-review.md`](./code-review.md) | `code-review-mr.mdc` |
9
+ | [`post-change-build.md`](./post-change-build.md) | `post-change-build.mdc` |
10
+ | [`gradle-tooling.md`](./gradle-tooling.md) | `gradle-tooling.mdc` |
11
+ | [`security-android.md`](./security-android.md) | `security-android.mdc` |
12
+ | [`agent-team-orchestrator.md`](./agent-team-orchestrator.md) | `agent-team-orchestrator.mdc` |
13
+ | [`agent-team-intake.md`](./agent-team-intake.md) | `agent-team-intake.mdc` |
14
+ | [`technical-retro.md`](./technical-retro.md) | `technical-retro.mdc` |
15
+ | [`design-guidance.md`](./design-guidance.md) | `design-guidance.mdc` |
16
+ | [`anti-sycophancy-discipline.md`](./anti-sycophancy-discipline.md) | `anti-sycophancy-discipline.mdc` |
17
+ | `preset-*.md` | `preset-*.mdc` |
18
+
19
+ Sync: change Cursor → update Claude twin same PR. Full map: [`../README.md`](../README.md).
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Use when user posts a work request without /task — suggest or use /task to run the agent team router. Lightweight intake hint only.
3
+ paths:
4
+ - .claude/commands/**/*
5
+ - .claude/team/**/*
6
+ ---
7
+
8
+ <!-- shared-core: agent-team/agent-team-intake.md -->
9
+
10
+ # Agent team intake
11
+
12
+ When the user message looks like a **work request** (implement, add, fix, refactor, review MR, write tests, spike) — not a question about how code works:
13
+
14
+ 1. Prefer **`/task <their request>`** or invoke **task-router** first.
15
+ 2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
16
+ 3. Pure questions (“how does X work”, “explain”) — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
17
+
18
+ Exceptions: user explicitly says “no pipeline”, “just do it”, or continues an active slug.