@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,56 @@
1
+ ---
2
+ description: Preset authoring: Cursor SoT → Claude twin same PR. Use when editing preset rules.
3
+ globs:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ alwaysApply: false
8
+ ---
9
+
10
+ <!-- shared-core: meta/preset-twin-sync.md -->
11
+
12
+ # Preset twin sync
13
+
14
+ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
15
+
16
+ ## Matrix
17
+
18
+ | Stack | Cursor SoT | Claude derive | Mapping table |
19
+ |-------|------------|---------------|---------------|
20
+ | `next` | `presets/cursor/next/rules/*.mdc` | `presets/claude/next/rules/<topic>/` | **Required** in `claude/next/rules/README.md` |
21
+ | `nuxt` | `presets/cursor/nuxt/rules/*.mdc` | `presets/claude/nuxt/rules/<topic>/` | **Required** in `claude/nuxt/rules/README.md` |
22
+ | `svelte` | `presets/cursor/svelte/rules/*.mdc` | `presets/claude/svelte/rules/<topic>/` | **Required** in `claude/svelte/rules/README.md` |
23
+ | `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Keep in `claude/ios-swift/rules/README.md` |
24
+ | `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
25
+ | `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Keep in `claude/java/rules/README.md` |
26
+ | `mcp-ts` | `presets/cursor/mcp-ts/rules/*.mdc` | `presets/claude/mcp-ts/rules/<topic>/` | Keep in `claude/mcp-ts/rules/README.md` |
27
+ | `php-hexagonal` | `presets/cursor/php-hexagonal/rules/*.mdc` | `presets/claude/php-hexagonal/rules/<topic>/` | Keep in `claude/php-hexagonal/rules/README.md` |
28
+ | `php-laravel` | `presets/cursor/php-laravel/rules/*.mdc` | `presets/claude/php-laravel/rules/<topic>/` | Keep in `claude/php-laravel/rules/README.md` |
29
+ | `android-kotlin` | `presets/cursor/android-kotlin/rules/*.mdc` | `presets/claude/android-kotlin/rules/<topic>/` | Keep in `claude/android-kotlin/rules/README.md` |
30
+
31
+ ## Same-PR checklist
32
+
33
+ 1. Edit Cursor rule first (body + frontmatter).
34
+ 2. Update Claude twin: body + `paths:` (from Cursor `globs:` / requestable triggers); drop `alwaysApply`.
35
+ 3. Update mapping table row if stem/path changed.
36
+ 4. If body embeds core (`<!-- shared-core: … -->`), sync core consumers across stacks when core changed.
37
+
38
+ ## Twin depth
39
+
40
+ - **Domain** rules: ≥15 body lines (FAIL if thin without documented alias reason).
41
+ - **Thin aliases** (`agent-team-intake`, `technical-retro`): may be shorter (soft) if they only point to a command/skill.
42
+
43
+ ## Severity (build-verifier)
44
+
45
+ - **next:** missing Claude twin for a changed Cursor rule → **FAIL** (mapping table required).
46
+ - **nuxt:** missing Claude twin for a changed Cursor rule → **FAIL** (mapping table required).
47
+ - **svelte:** missing Claude twin for a changed Cursor rule → **FAIL** (mapping table required).
48
+ - **ios-swift:** missing Claude twin for a changed Cursor rule → **FAIL**.
49
+ - **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
50
+ - **java:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go; mapping table required).
51
+ - **mcp-ts:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java; mapping table required).
52
+ - **php-hexagonal:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java / mcp-ts; mapping table required).
53
+ - **php-laravel:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java / mcp-ts / php-hexagonal; mapping table required).
54
+ - **android-kotlin:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java / mcp-ts / php-*; mapping table required).
55
+
56
+ Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Placeholder reference feature paths for Android multimodule repos
3
+ globs:
4
+ - "features/**"
5
+ alwaysApply: false
6
+ ---
7
+
8
+ # Reference features (placeholders)
9
+
10
+ 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`).
11
+
12
+ | Concern | Placeholder path |
13
+ |---------|------------------|
14
+ | App shell | `applications/<app>/` |
15
+ | Shared kernel | `core/` |
16
+ | Feature public API | `features/<name>/api/` |
17
+ | Feature implementation | `features/<name>/impl/` |
18
+ | DI holders | `features/<name>/impl/**/di/` |
19
+ | Presentation | `features/<name>/impl/**/presentation/` |
20
+ | Data | `features/<name>/impl/**/data/` |
21
+ | Convention plugins | `build-logic/` |
22
+ | Version catalog | `gradle/libs.versions.toml` |
23
+ | JVM tests | `**/src/test/**` |
24
+ | Instrumentation | `**/src/androidTest/**` |
25
+
26
+ # Agent requirements
27
+
28
+ - Copy patterns from the closest neighboring feature — do not invent a parallel layout.
29
+ - Never cite private consumer monorepo or vendor names in shared preset text.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Android secrets, TLS, and build-wrapper security policy (generic)
3
+ globs:
4
+ - "**/network/**"
5
+ - "**/security/**"
6
+ - "**/*NetworkSecurity*"
7
+ alwaysApply: false
8
+ ---
9
+
10
+ # Security (Android, generic)
11
+
12
+ - **Secrets:** never commit API keys, keystore passwords, or tokens; use CI secrets / local untracked properties already used by the repo.
13
+ - **TLS:** prefer platform HTTPS defaults; network security config changes must be explicit and reviewed.
14
+ - **Storage:** sensitive tokens go to Android Keystore / encrypted storage patterns already in the repo — not plain `SharedPreferences`/files.
15
+ - **Build wrappers:** treat `gradlew` / documented wrappers as the supported entry; do not download unsigned wrapper JARs ad hoc.
16
+ - **Logging:** never log PII, tokens, or Authorization headers.
17
+
18
+ # Agent requirements
19
+
20
+ - `security-reviewer` on auth/storage/network changes.
21
+ - Do not weaken TLS or cleartext policy without explicit AC.
22
+
23
+ # IPC & exports
24
+
25
+ - Exported components and deep links must match existing permission/export patterns.
26
+ - Do not broaden `exported=true` or cleartext traffic without explicit AC.
27
+ - Certificate pinning — only when the repo already uses it; do not invent a pinning stack.
28
+
29
+ - Review ProGuard/R8 keep rules when touching reflection/serialization used for auth.
30
+ - Backup/export rules must not unintentionally expose encrypted stores.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: MVI/UDF state on the project ViewModel base
3
+ globs:
4
+ - "**/*ViewModel*.kt"
5
+ alwaysApply: false
6
+ ---
7
+
8
+ # State and ViewModels
9
+
10
+ - Follow the repo’s **MVI / unidirectional** pattern on the project ViewModel base (name lives in consumer `team/conventions.md`).
11
+ - Single source of UI state (StateFlow / immutable state holder); reduce via pure updates where practical.
12
+ - Expose intents/events for user actions; do not mutate state from composables directly.
13
+ - Side effects (navigation, one-shots) follow existing effect channels — do not invent a parallel bus.
14
+ - ViewModels depend on domain/use-case ports — not concrete data clients.
15
+
16
+ # Agent requirements
17
+
18
+ - Keep mapping/DTO work out of ViewModels when mappers already exist in data.
19
+ - Cover reducers/state transitions with JVM unit tests when non-trivial.
20
+ - Avoid `!!` and unchecked casts in state plumbing.
21
+
22
+ # Lifecycle
23
+
24
+ - Use `viewModelScope` (or the project equivalent); do not launch unstructured globals.
25
+ - Clear one-shot effects after handling to avoid replay on recomposition/rotation.
26
+ - Keep mapping of domain models → UI models next to existing presenters/mappers.
27
+
28
+ - Document non-obvious state machine transitions in the brief or a short KDoc on the reducer.
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Agent role for a technical retrospective (retro) of the team / sprint. On-demand — prefer the /technical-retro slash command.
3
+ alwaysApply: false
4
+ ---
5
+
6
+ <!-- shared-core: review/technical-retro.md -->
7
+
8
+ # Technical retro — rule alias
9
+
10
+ Full scenario (including the **“Agent work”** block for a slug from team tasks) lives in the slash command:
11
+
12
+ **`commands/technical-retro.md`** → `/technical-retro`
13
+
14
+ When a task has `metrics.json`, use the local aggregation script and state the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not score malformed artifacts or gate wait as agent work.
15
+
16
+ Use this rule only if the command is unavailable. Do not duplicate the command contents in the response — follow the command file and skill `technical-retro`.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Android instrumentation UI tests (androidTest)
3
+ globs:
4
+ - "**/androidTest/**"
5
+ alwaysApply: false
6
+ ---
7
+
8
+ # UI tests (instrumentation)
9
+
10
+ - Default agent surface: **Android instrumentation** under `androidTest` (devices/emulators/CI as configured).
11
+ - 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.
12
+ - Stable semantics / test tags / content descriptions aligned with presentation conventions.
13
+ - Keep tests behavior-focused; avoid brittle sleep-based synchronization when idling strategies exist.
14
+
15
+ # Agent team
16
+
17
+ - Plan/generate/heal via `instrumentation-test-{planner,generator,healer}` and skill `instrumentation-ui-e2e`.
18
+ - Do **not** require Playwright, XCUITest, or yarn `lint:js`/`lint:css` as Android UI-test handoffs.
19
+
20
+ # Agent requirements
21
+
22
+ - Prefer page objects / robot patterns already used in the repo.
23
+ - Wire flavors/variants via Gradle tasks discovered in `gradle-tooling`.
24
+
25
+ # Data & isolation
26
+
27
+ - Use test fixtures/fakes already adopted by the module; avoid hitting production backends.
28
+ - Clean state between tests when sharing an app process.
29
+ - Record the Gradle task used (`connected*` / managed device) in the plan/receipt.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: JVM unit test conventions for Android Kotlin modules
3
+ globs:
4
+ - "**/test/**"
5
+ - "**/*Test.kt"
6
+ alwaysApply: false
7
+ ---
8
+
9
+ # Unit tests (JVM)
10
+
11
+ - Prefer fast JVM unit tests under `src/test` for domain, mappers, ViewModel reducers, and pure use cases.
12
+ - Use the repo’s stack (JUnit4/5, MockK, Turbine, Truth/AssertJ — **as already configured**).
13
+ - Fake ports over heavy Android instrumentation for logic tests.
14
+ - Name tests after behavior; keep arrange/act/assert clear.
15
+
16
+ # Scope
17
+
18
+ - Do not require device/emulator for pure logic.
19
+ - UI flows belong in `androidTest` / instrumentation agents — see `tests-ui`.
20
+
21
+ # Agent requirements
22
+
23
+ - Agents `unit-test-*` + skill `unit-testing` own planning/generation/healing.
24
+ - After production edits, run the narrowest `./gradlew …Test` suite via `post-change-build` / `gradle-tooling`.
25
+
26
+ # Flakes & determinism
27
+
28
+ - Control clocks/dispatchers when testing coroutines/Flow.
29
+ - Avoid relying on real Android framework types in JVM tests unless Robolectric is already standard.
30
+ - Prefer table-driven cases for mapper edge inputs.
@@ -0,0 +1,14 @@
1
+ # `.cursor/skills` (preset android-kotlin)
2
+
3
+ | Skill | Purpose |
4
+ |-------|---------|
5
+ | `feature-delivery` | Domain → Data → VM → View → tests → post-change-build |
6
+ | `code-review` | Android MR checklist |
7
+ | `unit-testing` | JUnit 4/5 (repo default) |
8
+ | `instrumentation-ui-e2e` | Android instrumentation plan/generate/heal (← next `playwright-e2e`) |
9
+ | `debug-investigation` | Runtime evidence before fix |
10
+ | `ci-investigation` | Android CI red |
11
+ | `technical-retro` | Retro facilitation |
12
+ | `write-adr` | Architecture Decision Record (context / decision / consequences) |
13
+
14
+ Copied to `.cursor/skills/` on init.
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: ci-investigation
3
+ description: Investigates failing CI checks on PRs and branches — ./gradlew, ktlint/detekt, unit, Android instrumentation — with local reproduction and minimal fixes. Use when CI is red or for ci-fix pipeline tasks.
4
+ ---
5
+
6
+ # CI Investigation (Android)
7
+
8
+ ## Workflow
9
+
10
+ 1. Identify the **first failing check** (compile, lint, unit, Android instrumentation, signing, Gradle modules).
11
+ 2. Capture error output — ignore cascading failures until root cause is found.
12
+ 3. Reproduce locally with the same scheme/destination CI uses (`gradle-tooling.mdc`):
13
+ - `./gradlew build` / `./gradlew test`
14
+ - ktlint/detekt / ktlint format scripts as in repo CI
15
+ - affected Android instrumentation if UI job failed
16
+ 4. Inspect git diff for changed files related to the failure.
17
+ 5. Apply **minimal fix** — no unrelated refactors.
18
+
19
+ ## Artifact
20
+
21
+ Write `ci-report.md` under the task slug folder (`.cursor/team/tasks/<slug>/`):
22
+
23
+ - Failed check name and log excerpt
24
+ - Root cause classification
25
+ - Fix applied (or handoff to feature-developer)
26
+ - `resolved: true|false`
27
+ - Validation commands and results
28
+
29
+ ## Handoff Rules
30
+
31
+ - Config-only or one-line fixes → fix in place, re-run check.
32
+ - Missing tests or architecture work → document and route to `feature-developer` or `qa-tester`.
33
+ - Flaky Android instrumentation → prefer `instrumentation-test-healer` after ci-investigator identifies the case.
34
+
35
+ ## Validation
36
+
37
+ Always re-run the failing command locally before marking complete. If environment blocks execution (no simulator), state the exact command and blocker.
38
+
39
+ Never run yarn/`lint:js`/Playwright — wrong stack.
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: code-review
3
+ description: Reviews pull requests, merge requests, git diffs, and branch changes using Android architecture, Jetpack Compose, networking, and testing standards. Use when the user asks for review or when code-reviewer runs in an agent pipeline.
4
+ ---
5
+
6
+ # Code Review (Android)
7
+
8
+ ## Inputs
9
+
10
+ Use the local repository as the source of truth: `git status`, `git diff`, task artifacts under `.cursor/team/tasks/<slug>/` when present, and opened files. Do not invent hosting metadata such as labels, CI status, or reviewers.
11
+
12
+ ## Review Order
13
+
14
+ 1. Understand the intent and affected Feature layers (Presentation / Domain / Data).
15
+ 2. Check correctness and regressions first.
16
+ 3. Verify architecture boundaries (`architecture-boundaries.mdc`): View ≠ API/DTO; ViewModel ≠ Data impl; Domain ≠ Jetpack Compose; Data ≠ Presentation.
17
+ 4. Check DI composition in `applications/`, Gradle modules public API (`module-public-api.mdc`), and no deep-imports across Features.
18
+ 5. Review Kotlin concurrency and conventions (`kotlin-conventions.mdc`): `main-safe / viewModelScope`, typed errors, `!!`.
19
+ 6. Review Jetpack Compose thinness, Design System usage, `testTag` / semantics / contentDescription (`compose-ui.mdc`).
20
+ 7. Check tests: unit for mapper/domain/VM (`tests-unit.mdc`); Android instrumentation for user flows (`tests-ui.mdc`).
21
+ 8. **Reuse lens:** flag new helpers that duplicate existing Feature/shared utilities; prefer public module APIs over copy-paste.
22
+ 9. **Efficiency lens:** unnecessary work on main thread, redundant network/persistence, hot-path bloat, missing cancellation/cleanup.
23
+ 10. Report validation gaps: `./gradlew`, ktlint/detekt, or relevant tests not run (`gradle-tooling.mdc`, `post-change-build.mdc`).
24
+
25
+ ## Output
26
+
27
+ Lead with findings ordered by severity. Required shape (also in `code-review-mr`):
28
+
29
+ - Each finding: **`path:line`** — problem — impact — concrete fix direction.
30
+ - Severity: **`blocker` | `important` | `nit`** (list blocker → nit).
31
+ - Vague («looks risky») is not a finding — cite evidence or ask for surrounding context.
32
+ - End with a verdict line: **`Safe to merge | needs changes | reject`**.
33
+ - If there are no findings, say so and call out remaining test or validation risk.
34
+
35
+ For agent team tasks, write `.cursor/team/tasks/<slug>/review.md` and upsert the owned terminal receipt (`completed` or `changes_requested`); do not mutate `status.json`.
36
+
37
+ ## Design guidance
38
+
39
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: debug-investigation
3
+ description: Investigates bugs, failing tests, crashes, and incorrect behavior with runtime evidence before applying minimal fixes. Use for bugfix tasks, debugger agent runs, regressions, and flaky test diagnosis.
4
+ ---
5
+
6
+ # Debug Investigation (Android)
7
+
8
+ ## Process
9
+
10
+ 1. Reproduce the issue or collect the closest available evidence: Android Studio / AGP console, lldb backtrace, crash log, failing JUnit/Android instrumentation output, Profiler note, or user steps.
11
+ 2. Define expected vs actual behavior in one sentence.
12
+ 3. Trace the failing path through the smallest relevant Feature slice (Presentation → Domain → Data).
13
+ 4. Identify the root cause before editing. Avoid broad refactors during bugfixes.
14
+ 5. Apply the smallest fix that preserves existing architecture and public contracts.
15
+ 6. Add or update a regression JUnit when the behavior is domain/VM logic or likely to recur.
16
+ 7. Run the narrow failing check first (`./gradlew test` for the affected target), then broader build validation if needed (`gradle-tooling.mdc`).
17
+
18
+ ## Artifacts
19
+
20
+ For agent team tasks, write `.cursor/team/tasks/<slug>/debug-report.md` with:
21
+
22
+ - Reproduction steps or evidence source.
23
+ - Root cause.
24
+ - Fix scope (`fixApplied`).
25
+ - Regression coverage.
26
+ - Remaining risk.
27
+
28
+ Upsert the owned terminal receipt in `artifact-manifest.json` when complete; do not mutate `status.json`.
29
+
30
+ Do not use browser e2e tooling — this is an Android Studio / AGP stack.
31
+
32
+ ## Design guidance
33
+
34
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: feature-delivery
3
+ description: Delivers Android Kotlin/Jetpack Compose features end-to-end across Domain, Data, ViewModels, Views, tests, and post-change-build validation. Use when implementing or extending a feature, especially through /task or feature-developer.
4
+ ---
5
+
6
+ # Feature Delivery (Android)
7
+
8
+ 1. Read task brief, acceptance criteria, and decomposition if present.
9
+ 2. Read `feature-delivery-workflow.mdc` and `reference-features.mdc` — Domain → Data → ViewModel → View → tests; mirror the closest Feature.
10
+ 3. Wire DI in `applications/` composition root; keep Views thin; keep DTOs out of ViewModels.
11
+ 4. Add or update focused JUnit for mappers / use cases / ViewModels (`tests-unit.mdc`).
12
+ 5. After Kotlin edits: **invoke** `post-change-build.mdc` (+ `gradle-tooling.mdc`). Pipeline: scoped build OK if next step is `build-verifier`.
13
+
14
+ ## Do / Don't
15
+
16
+ - **Do** follow existing Feature folder layout and public module APIs.
17
+ - **Do** add Compose `testTag` + `contentDescription` for new interactive UI when UI tests / a11y are in scope.
18
+ - **Don't** invent alternate architecture or persistence stacks (e.g. MVI frameworks, Room vs SQLDelight) unless the repo already uses them.
19
+ - **Don't** use yarn, browser e2e, or `app/src` paths — wrong stack.
20
+
21
+ ## Scope discipline
22
+
23
+ Implement only the current AC / decomposition task. Clarify ambiguity before coding; do not add unrelated hardening, polish, or drive-by refactors. See `feature-developer` → **Zero improvisation**.
24
+
25
+ ## Preset packaging note
26
+
27
+ When editing **ai-rules android-kotlin preset** sources (agents, hooks, rules) rather than an app Feature: keep Cursor and Claude trees in sync where applicable, and **fork / verify hook handoffs** (`hooks/chain-team-phases.sh`, guard scripts, team path conventions) so Cursor (`.cursor/team`) and Claude (`.claude/team`) do not regress against each other or against the next preset templates.
28
+
29
+ ## Handoff
30
+
31
+ Summarize by layer, validation results, and known gaps. Agent team: upsert the owned terminal receipt in `artifact-manifest.json`; do not mutate `status.json`.
32
+
33
+ ## Design guidance
34
+
35
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: instrumentation-ui-e2e
3
+ description: Plan, generate, and heal Android instrumentation UI tests using androidTest sources, project robots/page objects, and Gradle-discovered tasks. Use for instrumentation planning, generation, or fixing flaky UI tests.
4
+ ---
5
+
6
+ # Instrumentation UI e2e (Android)
7
+
8
+ 1. Read brief/AC and existing `androidTest` analogs.
9
+ 2. Discover framework and helpers from the consumer repo (Espresso, Compose UI Test, or project-chosen alternatives).
10
+ 3. Prefer stable semantics / test tags aligned with presentation conventions (`compose-ui` / `tests-ui`).
11
+ 4. Plan → generate → heal via agents `instrumentation-test-{planner,generator,healer}`.
12
+ 5. Run the narrowest Gradle instrumentation task via `gradle-tooling` when the environment allows; otherwise document the command for CI.
13
+
14
+ ## Do not
15
+
16
+ - Require Playwright, XCUITest, or yarn frontend lint recipes.
17
+ - Mandate a single UI-test library by name in always-on rules — discovery stays repo-driven.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: technical-retro
3
+ description: Facilitates technical retrospectives for tasks, sprints, incidents, releases, and agent-team pipelines. Use when the user asks for retro, postmortem, process review, or action items after delivery.
4
+ ---
5
+
6
+ # Technical Retro
7
+
8
+ ## Inputs
9
+
10
+ Ask for missing period, focus, task slug, participants, or format constraints. If a slug is provided, read `.cursor/team/tasks/<slug>/` artifacts and local git status/diff. Do not invent facts not present in artifacts or the user's message.
11
+
12
+ ## Facilitation Principles
13
+
14
+ - Focus on process and system behavior, not blame.
15
+ - Separate facts, interpretations, and proposed actions.
16
+ - Balance what worked with what slowed delivery.
17
+ - Keep action items concrete, owned, and measurable.
18
+
19
+ ## Default Structure
20
+
21
+ 1. Goal and scope.
22
+ 2. Timeline or factual observations.
23
+ 3. What worked.
24
+ 4. What hurt quality, speed, or confidence.
25
+ 5. Root causes for the top one or two issues.
26
+ 6. Experiments and action items.
27
+
28
+ ## Agent Team Block
29
+
30
+ For `/task` pipelines, include router, analyst, developer, **build-verifier** (./gradlew), reviewer, QA/Android instrumentation, hooks, and rules.
31
+
32
+ ## Wrong-turn taxonomy (optional)
33
+
34
+ When artifacts or the user mention agent mistakes, tag incidents:
35
+
36
+ | Kind | Signal |
37
+ |------|--------|
38
+ | `correction` | User pushback («no», «don't», «actually») |
39
+ | `retry` | Same tool/approach 2+ times before success |
40
+ | `waste` | Many searches before the right file |
41
+ | `reversal` | Edit then revert / delete |
42
+ | `dead-end` | Env/tool failure (missing binary, wrong path) |
43
+
44
+ Severity: **high** (explicit correction / large waste) · **med** · **low**. Confidence 0–100 — be honest; low-confidence items are optional.
45
+
46
+ ## Preset feedback loop
47
+
48
+ If the same issue appeared in **2+** tasks (or **3+** for packaging a new rule/skill — Rule of Three), add section **Preset updates**:
49
+
50
+ - Proposed change to `.cursor/rules/`, `.cursor/agents/`, `.cursor/skills/`, or **`.cursor/team/conventions.md`** (prefer conventions for project gotchas)
51
+ - One concrete snippet or file path
52
+ - Whether it belongs in always-on vs globs vs skill vs conventions (see `PRESET-CONTRIBUTION` → Building blocks)
53
+
54
+ Do not apply preset or conventions changes without user approval.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: unit-testing
3
+ description: Plans, generates, and heals JUnit 4/5 (repo default) for mappers, use cases, and ViewModels using src/test and tests-unit rules. Use for unit test planning, generation, or fixing failing unit tests.
4
+ ---
5
+
6
+ # Unit Testing (Android)
7
+
8
+ ## Project Layout
9
+
10
+ - Unit targets: `src/test` (+ `androidTest` for instrumentation) colocated or parallel to Feature — **as in the Android Studio / AGP project**.
11
+ - Framework: JUnit 4/5 (repo default) — MockK, Turbine, Truth/AssertJ as already configured.
12
+ - Do **not** create Jest/Vitest `*.spec.ts` files.
13
+
14
+ Follow `tests-unit.mdc` (Cursor `.mdc` / Claude `testing/unit.md` depending on preset).
15
+
16
+ ## Planner
17
+
18
+ Write or update `.cursor/team/tasks/<slug>/unit-test-plan.md`.
19
+
20
+ Each scenario needs a Russian `test` / `@Test` title (capital letter after each sentence). Cover mappers, use cases, ViewModel state branches, and mocked client/repository behavior per AC.
21
+
22
+ ## Generator
23
+
24
+ Implement tests from `unit-test-plan.md` into the correct `src/test` source set. Reuse shared fixtures and interface mocks / fakes (MockK). Do not change production code.
25
+
26
+ ## Healer
27
+
28
+ Fix mocks, coroutine/dispatcher timing, and fixtures — preserve business assertions. Use `unit-test-plan.md` and `brief.md` as the behavior contract.
29
+
30
+ ## Validation
31
+
32
+ Run affected unit tests via `./gradlew test` (`gradle-tooling.mdc`) when feasible. Report command, pass/fail, and remaining gaps vs plan.
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: write-adr
3
+ description: Author an Architecture Decision Record (ADR) with Context, Decision, Consequences, and Links. Use when capturing a durable technical choice for the team.
4
+ ---
5
+
6
+ # Write ADR
7
+
8
+ On-demand skill for durable architecture decisions. Stack-agnostic sections — fill with project-specific paths and links.
9
+
10
+ ## When to use
11
+
12
+ - Choosing between non-trivial alternatives (storage, layering, library, API shape).
13
+ - Recording a decision that future agents/humans should not silently reverse.
14
+ - User asks for an ADR, decision log, or “why did we pick X”.
15
+
16
+ ## Template
17
+
18
+ Create (or append) a short markdown ADR in the repo’s agreed location (e.g. `docs/adr/`, `.cursor/team/`, wiki). Suggested filename: `NNNN-short-title.md`.
19
+
20
+ ```markdown
21
+ # ADR NNNN: <Title>
22
+
23
+ ## Context
24
+ What problem / constraint / force requires a decision?
25
+
26
+ ## Decision
27
+ What we chose (one clear option). Include rejected alternatives briefly if useful.
28
+
29
+ ## Consequences
30
+ Positive and negative outcomes; follow-up work; what becomes harder.
31
+
32
+ ## Links
33
+ Related PRs, issues, rules, prior ADRs, diagrams.
34
+ ```
35
+
36
+ ## Guidelines
37
+
38
+ - Prefer one decision per ADR.
39
+ - Keep Context factual; Decision imperative and short.
40
+ - Link living gotchas to `team/conventions.md` when the decision becomes a recurring local pattern.
41
+ - Do not put ADR bodies only in root `AGENTS.md` (overwrite on init).
@@ -0,0 +1,54 @@
1
+ # Agent team artifacts (android-kotlin)
2
+
3
+ Artifact directory for the Android agent-team pipeline.
4
+
5
+ ## Layout
6
+
7
+ ```
8
+ .cursor/team/ # Claude: .claude/team/
9
+ active-task.json
10
+ fixtures/
11
+ tasks/<slug>/
12
+ pipeline.json
13
+ status.json
14
+ brief.md
15
+ decomposition.md
16
+
17
+ ```
18
+
19
+ ## Fixtures
20
+
21
+ | Fixture | Notes |
22
+ |---------|-------|
23
+ | `feature-full.json` | Full profile; QA scope `e2e-only` = **Android instrumentation** |
24
+ | `feature-light.json` | developer → build-verifier |
25
+ | `bugfix-standard.json` | debugger → developer (skipIf) → verifier → reviewer |
26
+
27
+ ### `skipped[]` in fixtures
28
+
29
+ `pipeline.json` / fixture `skipped` is **documentation of forbidden or non-applicable template stems** from other stacks (Playwright, XCUITest, JVM `integration-test-*`) — **not** agents that ran and were skipped at runtime, and **not** steps to schedule. Routers must never promote these stems into `steps[]`. For UI-test-only intents use `instrumentation-test-*`.
30
+
31
+ **Never** schedule Playwright-only steps without skip rationale. Use `instrumentation-test-*` for UI-test-only intents.
32
+
33
+ ## Creating task dirs
34
+
35
+ Bootstrap `tasks/<slug>/` by **writing** artifacts (Write tool), not Shell `mkdir`. Cursor sandbox → `Operation not permitted` otherwise (worse on Desktop/Documents).
36
+
37
+ ## Artifact manifest and receipts
38
+
39
+ Each slug stores one context index at `.cursor/team/tasks/<slug>/artifact-manifest.json`. Schema v1 is defined by shared core `agent-team/agent-artifact-contracts.md`: every entry declares its producer, status, authoritative paths, acceptance-criteria IDs, decomposition task IDs, timestamps, and a terminal completion receipt.
40
+
41
+ Producer/consumer rules:
42
+
43
+ - Read the manifest first and use only the authoritative inputs needed by the current step; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` when it is missing or stale, and report that gap.
44
+ - Producers upsert only their stable entry IDs, preserve foreign entries, and finish with `completed`, `blocked`, `changes_requested`, or `validation_failed` receipt evidence.
45
+ - The router owns `pipeline.json` and its routing entry; analyst, developer, verifier, and reviewer own their named outputs and receipts. Consumers do not edit another producer's receipt.
46
+ - Agents do not mutate `status.json` or `metrics.json`. The orchestration runtime/hook is their single writer. Parallel receipt merges are serialized by the parent/orchestrator.
47
+
48
+ ## Local metrics ledger
49
+
50
+ `metrics.json` is an append-only schema-v1 event ledger for one task run. It contains only allowlisted IDs, task dimensions, timestamps, outcomes, and attribution confidence—never prompts, secrets, file paths, or contents. The orchestration runtime writes `task_started` / `attempt_started`; the hook records host-clock completion and human-gate edges under a per-task lock with temp-and-rename.
51
+
52
+ `status.json.activeAttempts` is a transient timing bridge keyed by `attemptId`; `lastCompletedAttempt` is diagnostic; `parallelOutcomes` holds per-agent outcomes for the current parallel join until the step advances. For parallel stops, the hook must use a stable payload identity or the sole active attempt. Otherwise an explicit `.metrics-receipts.json` receipt is fallback data marked `source: agent`, `attributionConfidence: fallback`; it must never guess from `currentAgent`.
53
+
54
+ Aggregate with `node packages/ai-rules/scripts/aggregate-agent-task-metrics.mjs --team-root .cursor/team`. It reports role/agent count, completed count, total/average duration, distinct completed run IDs, separate human-gate wait, and incomplete artifacts.
@@ -0,0 +1,17 @@
1
+ # Team conventions (consumer-local)
2
+
3
+ After installing this preset, document **local** names and paths here. Do not put vendor/brand names into the shared preset packages.
4
+
5
+ ## Suggested entries
6
+
7
+ | Concern | Local name / path |
8
+ |---------|-------------------|
9
+ | ViewModel base class | _(fill)_ |
10
+ | Feature DI holder / component types | _(fill)_ |
11
+ | Design-system package | _(fill)_ |
12
+ | App shell module(s) under `applications/` | _(fill)_ |
13
+ | Default product flavor / variant for local builds | _(fill)_ |
14
+ | Instrumentation test base / robot pattern | _(fill)_ |
15
+ | Documented Gradle wrapper (if not `./gradlew`) | _(fill)_ |
16
+
17
+ Keep this file consumer-owned; `ai-rules init` may overwrite other preset files but conventions are meant to accumulate local decisions.