@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.
- package/CHANGELOG.md +8 -0
- package/README.md +3 -1
- package/bin/cli.js +2 -0
- package/package.json +1 -1
- package/presets/_shared/core/meta/preset-layering.md +1 -1
- package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +25 -12
- package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
- package/presets/_shared/core/meta/preset-twin-sync.md +2 -0
- package/presets/claude/android-kotlin/CLAUDE.md +38 -0
- package/presets/claude/android-kotlin/MCP.md +16 -0
- package/presets/claude/android-kotlin/README.md +32 -0
- package/presets/claude/android-kotlin/REPO_AGENTS.md +48 -0
- package/presets/claude/android-kotlin/agents/README.md +44 -0
- package/presets/claude/android-kotlin/agents/accessibility-reviewer.md +60 -0
- package/presets/claude/android-kotlin/agents/api-contract-reviewer.md +70 -0
- package/presets/claude/android-kotlin/agents/build-verifier.md +67 -0
- package/presets/claude/android-kotlin/agents/ci-investigator.md +74 -0
- package/presets/claude/android-kotlin/agents/code-reviewer.md +74 -0
- package/presets/claude/android-kotlin/agents/codebase-analyzer.md +28 -0
- package/presets/claude/android-kotlin/agents/debugger.md +77 -0
- package/presets/claude/android-kotlin/agents/feature-developer.md +63 -0
- package/presets/claude/android-kotlin/agents/instrumentation-test-generator.md +19 -0
- package/presets/claude/android-kotlin/agents/instrumentation-test-healer.md +19 -0
- package/presets/claude/android-kotlin/agents/instrumentation-test-planner.md +19 -0
- package/presets/claude/android-kotlin/agents/migration-specialist.md +74 -0
- package/presets/claude/android-kotlin/agents/performance-auditor.md +67 -0
- package/presets/claude/android-kotlin/agents/qa-tester.md +66 -0
- package/presets/claude/android-kotlin/agents/security-reviewer.md +65 -0
- package/presets/claude/android-kotlin/agents/solution-architect.md +21 -0
- package/presets/claude/android-kotlin/agents/task-analyst.md +36 -0
- package/presets/claude/android-kotlin/agents/task-router.md +103 -0
- package/presets/claude/android-kotlin/agents/tech-writer.md +61 -0
- package/presets/claude/android-kotlin/agents/unit-test-generator.md +55 -0
- package/presets/claude/android-kotlin/agents/unit-test-healer.md +54 -0
- package/presets/claude/android-kotlin/agents/unit-test-planner.md +65 -0
- package/presets/claude/android-kotlin/commands/README.md +51 -0
- package/presets/claude/android-kotlin/commands/feature-continue.md +19 -0
- package/presets/claude/android-kotlin/commands/feature-start.md +33 -0
- package/presets/claude/android-kotlin/commands/task-continue.md +50 -0
- package/presets/claude/android-kotlin/commands/task.md +56 -0
- package/presets/claude/android-kotlin/commands/technical-retro.md +85 -0
- package/presets/claude/android-kotlin/hooks/README.md +16 -0
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +705 -0
- package/presets/claude/android-kotlin/hooks/examples/README.md +18 -0
- package/presets/claude/android-kotlin/hooks/examples/format-edited.example.sh +13 -0
- package/presets/claude/android-kotlin/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/android-kotlin/hooks/examples/test-on-save.example.sh +8 -0
- package/presets/claude/android-kotlin/hooks/guard-shell-command.sh +80 -0
- package/presets/claude/android-kotlin/mcp.json +12 -0
- package/presets/claude/android-kotlin/rules/README.md +63 -0
- package/presets/claude/android-kotlin/rules/api-and-data/README.md +10 -0
- package/presets/claude/android-kotlin/rules/api-and-data/networking.md +30 -0
- package/presets/claude/android-kotlin/rules/api-and-data/persistence.md +29 -0
- package/presets/claude/android-kotlin/rules/architecture/README.md +9 -0
- package/presets/claude/android-kotlin/rules/architecture/boundaries.md +27 -0
- package/presets/claude/android-kotlin/rules/architecture/di-dagger-feature-holders.md +34 -0
- package/presets/claude/android-kotlin/rules/architecture/feature-delivery.md +41 -0
- package/presets/claude/android-kotlin/rules/architecture/module-public-api.md +29 -0
- package/presets/claude/android-kotlin/rules/architecture/reference-features.md +28 -0
- package/presets/claude/android-kotlin/rules/stack/README.md +6 -0
- package/presets/claude/android-kotlin/rules/stack/android-app-core.md +27 -0
- package/presets/claude/android-kotlin/rules/stack/kotlin-conventions.md +30 -0
- package/presets/claude/android-kotlin/rules/testing/README.md +10 -0
- package/presets/claude/android-kotlin/rules/testing/ui.md +28 -0
- package/presets/claude/android-kotlin/rules/testing/unit.md +29 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/README.md +19 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +18 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +127 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +52 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/code-review.md +88 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/design-guidance.md +110 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/gradle-tooling.md +30 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/post-change-build.md +34 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-layering.md +36 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-no-cross-stack-leakage.md +100 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +39 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-token-budget.md +41 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +56 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/security-android.md +29 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/technical-retro.md +18 -0
- package/presets/claude/android-kotlin/rules/ui-and-accessibility/README.md +7 -0
- package/presets/claude/android-kotlin/rules/ui-and-accessibility/compose.md +31 -0
- package/presets/claude/android-kotlin/rules/ui-and-accessibility/navigation.md +30 -0
- package/presets/claude/android-kotlin/rules/ui-and-accessibility/viewmodels.md +27 -0
- package/presets/claude/android-kotlin/skills/README.md +14 -0
- package/presets/claude/android-kotlin/skills/ci-investigation/SKILL.md +39 -0
- package/presets/claude/android-kotlin/skills/code-review/SKILL.md +39 -0
- package/presets/claude/android-kotlin/skills/debug-investigation/SKILL.md +34 -0
- package/presets/claude/android-kotlin/skills/feature-delivery/SKILL.md +35 -0
- package/presets/claude/android-kotlin/skills/instrumentation-ui-e2e/SKILL.md +17 -0
- package/presets/claude/android-kotlin/skills/technical-retro/SKILL.md +54 -0
- package/presets/claude/android-kotlin/skills/unit-testing/SKILL.md +32 -0
- package/presets/claude/android-kotlin/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/android-kotlin/team/README.md +54 -0
- package/presets/claude/android-kotlin/team/conventions.md +17 -0
- package/presets/claude/android-kotlin/team/fixtures/bugfix-standard.json +47 -0
- package/presets/claude/android-kotlin/team/fixtures/feature-full.json +97 -0
- package/presets/claude/android-kotlin/team/fixtures/feature-light.json +38 -0
- package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/java/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/next/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +25 -12
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/cursor/android-kotlin/AGENTS.md +50 -0
- package/presets/cursor/android-kotlin/BUGBOT.md +16 -0
- package/presets/cursor/android-kotlin/MCP.md +16 -0
- package/presets/cursor/android-kotlin/README.md +35 -0
- package/presets/cursor/android-kotlin/REPO_AGENTS.md +48 -0
- package/presets/cursor/android-kotlin/agents/README.md +44 -0
- package/presets/cursor/android-kotlin/agents/accessibility-reviewer.md +60 -0
- package/presets/cursor/android-kotlin/agents/api-contract-reviewer.md +70 -0
- package/presets/cursor/android-kotlin/agents/build-verifier.md +67 -0
- package/presets/cursor/android-kotlin/agents/ci-investigator.md +74 -0
- package/presets/cursor/android-kotlin/agents/code-reviewer.md +74 -0
- package/presets/cursor/android-kotlin/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/android-kotlin/agents/debugger.md +77 -0
- package/presets/cursor/android-kotlin/agents/feature-developer.md +63 -0
- package/presets/cursor/android-kotlin/agents/instrumentation-test-generator.md +19 -0
- package/presets/cursor/android-kotlin/agents/instrumentation-test-healer.md +19 -0
- package/presets/cursor/android-kotlin/agents/instrumentation-test-planner.md +19 -0
- package/presets/cursor/android-kotlin/agents/migration-specialist.md +74 -0
- package/presets/cursor/android-kotlin/agents/performance-auditor.md +67 -0
- package/presets/cursor/android-kotlin/agents/qa-tester.md +66 -0
- package/presets/cursor/android-kotlin/agents/security-reviewer.md +65 -0
- package/presets/cursor/android-kotlin/agents/solution-architect.md +21 -0
- package/presets/cursor/android-kotlin/agents/task-analyst.md +36 -0
- package/presets/cursor/android-kotlin/agents/task-router.md +103 -0
- package/presets/cursor/android-kotlin/agents/tech-writer.md +61 -0
- package/presets/cursor/android-kotlin/agents/unit-test-generator.md +55 -0
- package/presets/cursor/android-kotlin/agents/unit-test-healer.md +54 -0
- package/presets/cursor/android-kotlin/agents/unit-test-planner.md +65 -0
- package/presets/cursor/android-kotlin/commands/README.md +51 -0
- package/presets/cursor/android-kotlin/commands/feature-continue.md +19 -0
- package/presets/cursor/android-kotlin/commands/feature-start.md +33 -0
- package/presets/cursor/android-kotlin/commands/task-continue.md +50 -0
- package/presets/cursor/android-kotlin/commands/task.md +56 -0
- package/presets/cursor/android-kotlin/commands/technical-retro.md +85 -0
- package/presets/cursor/android-kotlin/hooks/README.md +12 -0
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +723 -0
- package/presets/cursor/android-kotlin/hooks/examples/README.md +18 -0
- package/presets/cursor/android-kotlin/hooks/examples/format-edited.example.sh +13 -0
- package/presets/cursor/android-kotlin/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/android-kotlin/hooks/examples/test-on-save.example.sh +8 -0
- package/presets/cursor/android-kotlin/hooks/guard-shell-command.sh +80 -0
- package/presets/cursor/android-kotlin/hooks.json +17 -0
- package/presets/cursor/android-kotlin/mcp.json +11 -0
- package/presets/cursor/android-kotlin/rules/README.md +61 -0
- package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +16 -0
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +124 -0
- package/presets/cursor/android-kotlin/rules/android-app-core.mdc +28 -0
- package/presets/cursor/android-kotlin/rules/anti-sycophancy-discipline.mdc +30 -0
- package/presets/cursor/android-kotlin/rules/architecture-boundaries.mdc +28 -0
- package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +53 -0
- package/presets/cursor/android-kotlin/rules/code-review-mr.mdc +84 -0
- package/presets/cursor/android-kotlin/rules/compose-ui.mdc +32 -0
- package/presets/cursor/android-kotlin/rules/design-guidance.mdc +111 -0
- package/presets/cursor/android-kotlin/rules/di-dagger-feature-holders.mdc +35 -0
- package/presets/cursor/android-kotlin/rules/feature-delivery-workflow.mdc +36 -0
- package/presets/cursor/android-kotlin/rules/gradle-tooling.mdc +31 -0
- package/presets/cursor/android-kotlin/rules/kotlin-conventions.mdc +31 -0
- package/presets/cursor/android-kotlin/rules/module-public-api.mdc +30 -0
- package/presets/cursor/android-kotlin/rules/navigation-feature-launcher.mdc +31 -0
- package/presets/cursor/android-kotlin/rules/networking-data.mdc +31 -0
- package/presets/cursor/android-kotlin/rules/persistence-data.mdc +30 -0
- package/presets/cursor/android-kotlin/rules/post-change-build.mdc +30 -0
- package/presets/cursor/android-kotlin/rules/preset-layering.mdc +36 -0
- package/presets/cursor/android-kotlin/rules/preset-no-cross-stack-leakage.mdc +100 -0
- package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +39 -0
- package/presets/cursor/android-kotlin/rules/preset-token-budget.mdc +41 -0
- package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +56 -0
- package/presets/cursor/android-kotlin/rules/reference-features.mdc +29 -0
- package/presets/cursor/android-kotlin/rules/security-android.mdc +30 -0
- package/presets/cursor/android-kotlin/rules/state-and-viewmodels.mdc +28 -0
- package/presets/cursor/android-kotlin/rules/technical-retro.mdc +16 -0
- package/presets/cursor/android-kotlin/rules/tests-ui.mdc +29 -0
- package/presets/cursor/android-kotlin/rules/tests-unit.mdc +30 -0
- package/presets/cursor/android-kotlin/skills/README.md +14 -0
- package/presets/cursor/android-kotlin/skills/ci-investigation/SKILL.md +39 -0
- package/presets/cursor/android-kotlin/skills/code-review/SKILL.md +39 -0
- package/presets/cursor/android-kotlin/skills/debug-investigation/SKILL.md +34 -0
- package/presets/cursor/android-kotlin/skills/feature-delivery/SKILL.md +35 -0
- package/presets/cursor/android-kotlin/skills/instrumentation-ui-e2e/SKILL.md +17 -0
- package/presets/cursor/android-kotlin/skills/technical-retro/SKILL.md +54 -0
- package/presets/cursor/android-kotlin/skills/unit-testing/SKILL.md +32 -0
- package/presets/cursor/android-kotlin/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/android-kotlin/team/README.md +54 -0
- package/presets/cursor/android-kotlin/team/conventions.md +17 -0
- package/presets/cursor/android-kotlin/team/fixtures/bugfix-standard.json +47 -0
- package/presets/cursor/android-kotlin/team/fixtures/feature-full.json +97 -0
- package/presets/cursor/android-kotlin/team/fixtures/feature-light.json +38 -0
- package/presets/cursor/go/rules/preset-layering.mdc +1 -1
- package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +25 -12
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/go/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/ios-swift/rules/preset-layering.mdc +1 -1
- package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +25 -12
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/java/rules/preset-layering.mdc +1 -1
- package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +25 -12
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/java/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/mcp-ts/rules/preset-layering.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +25 -12
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/next/rules/preset-layering.mdc +1 -1
- package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +25 -12
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/next/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/nuxt/rules/preset-layering.mdc +1 -1
- package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +25 -12
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +1 -1
- package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +25 -12
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/php-laravel/rules/preset-layering.mdc +1 -1
- package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +25 -12
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/svelte/rules/preset-layering.mdc +1 -1
- package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +25 -12
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/svelte/rules/preset-twin-sync.mdc +2 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Preset authoring: PR checklist for twin sync, budget, leakage, README. Use on preset PRs.
|
|
3
|
+
paths:
|
|
4
|
+
- packages/ai-rules/presets/**/*
|
|
5
|
+
- .claude/**/*
|
|
6
|
+
- .cursor/rules/**/*
|
|
7
|
+
- .cursor/team/tasks/**/*
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<!-- shared-core: meta/preset-pr-checklist.md -->
|
|
11
|
+
|
|
12
|
+
# Preset PR checklist
|
|
13
|
+
|
|
14
|
+
Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.cursor/` sync).
|
|
15
|
+
|
|
16
|
+
## Before merge
|
|
17
|
+
|
|
18
|
+
- [ ] **SoT:** edits in `packages/…` (not only root `.cursor/`)
|
|
19
|
+
- [ ] **Core:** if `_shared/core/**` changed — all `<!-- shared-core: … -->` consumers updated (or documented intentional fork)
|
|
20
|
+
- [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, nuxt, svelte, ios-swift, android-kotlin, go, java, mcp-ts, php-hexagonal, and php-laravel — see `preset-twin-sync`)
|
|
21
|
+
- [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table is current
|
|
22
|
+
- [ ] **Token budget:** alwaysApply / session-start ≤ 3; meta rules not always-on
|
|
23
|
+
- [ ] **Leakage:** no foreign stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
|
|
24
|
+
- [ ] **Twin depth:** domain ≥15 lines; thin aliases documented
|
|
25
|
+
- [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
|
|
26
|
+
- [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
|
|
27
|
+
- [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (or document intentional skip) when maintaining this monorepo
|
|
28
|
+
- [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
|
|
29
|
+
|
|
30
|
+
## Pointers
|
|
31
|
+
|
|
32
|
+
- Layering: `preset-layering`
|
|
33
|
+
- Sync: `preset-twin-sync`
|
|
34
|
+
- Budget: `preset-token-budget`
|
|
35
|
+
- Leakage: `preset-no-cross-stack-leakage`
|
|
36
|
+
- Validation: stack `agents/build-verifier.md` → preset-structure section
|
|
37
|
+
- Dogfood script: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`
|
|
38
|
+
- Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
|
|
39
|
+
- Orchestrator: when editing presets, load this checklist + twin-sync
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Preset authoring: ≤3 always-on / session-start; meta rules never alwaysApply.
|
|
3
|
+
paths:
|
|
4
|
+
- packages/ai-rules/presets/**/*
|
|
5
|
+
- .claude/**/*
|
|
6
|
+
- .cursor/rules/**/*
|
|
7
|
+
- .cursor/team/tasks/**/*
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<!-- shared-core: meta/preset-token-budget.md -->
|
|
11
|
+
|
|
12
|
+
# Preset token budget
|
|
13
|
+
|
|
14
|
+
Invariants for rule loading in an **installed** preset (consumer app).
|
|
15
|
+
|
|
16
|
+
## Hard caps
|
|
17
|
+
|
|
18
|
+
| Platform | Always-on | Cap |
|
|
19
|
+
|----------|-----------|-----|
|
|
20
|
+
| Cursor | `alwaysApply: true` | **≤ 3** |
|
|
21
|
+
| Claude | rules **without** `paths:` | **exactly 3** |
|
|
22
|
+
|
|
23
|
+
**Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules). The intended session-start trio remains **exactly 3**; body budget sums **only those 3** rules.
|
|
24
|
+
|
|
25
|
+
Session-start body budget (where documented): ≤140 lines total (stretch ≤120).
|
|
26
|
+
|
|
27
|
+
## Meta / author rules
|
|
28
|
+
|
|
29
|
+
Rules for preset authors (`preset-layering`, `preset-twin-sync`, …):
|
|
30
|
+
|
|
31
|
+
- **Never** `alwaysApply: true` on consumer installs.
|
|
32
|
+
- Cursor: `globs` limited to `packages/ai-rules/presets/**` (and dogfood `.cursor/**` where useful).
|
|
33
|
+
- Claude: `paths:` limited to `packages/ai-rules/presets/**` (and `.claude/**` dogfood if present).
|
|
34
|
+
|
|
35
|
+
## Heavy workflows
|
|
36
|
+
|
|
37
|
+
Orchestrator, feature-delivery, code-review, post-change gates, domain globs — **requestable / paths**, not always-on.
|
|
38
|
+
|
|
39
|
+
## Verifier
|
|
40
|
+
|
|
41
|
+
build-verifier **FAIL** if alwaysApply / session-start count exceeds 3 (Claude count **excludes `**/README.md`**), or if a `preset-*` meta rule is marked always-on.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Preset authoring: Cursor SoT → Claude twin same PR. Use when editing preset rules.
|
|
3
|
+
paths:
|
|
4
|
+
- packages/ai-rules/presets/**/*
|
|
5
|
+
- .claude/**/*
|
|
6
|
+
- .cursor/rules/**/*
|
|
7
|
+
- .cursor/team/tasks/**/*
|
|
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: Android secrets, TLS, and build-wrapper security policy (generic)
|
|
3
|
+
paths:
|
|
4
|
+
- "**/network/**"
|
|
5
|
+
- "**/security/**"
|
|
6
|
+
- "**/*NetworkSecurity*"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Security (Android, generic)
|
|
10
|
+
|
|
11
|
+
- **Secrets:** never commit API keys, keystore passwords, or tokens; use CI secrets / local untracked properties already used by the repo.
|
|
12
|
+
- **TLS:** prefer platform HTTPS defaults; network security config changes must be explicit and reviewed.
|
|
13
|
+
- **Storage:** sensitive tokens go to Android Keystore / encrypted storage patterns already in the repo — not plain `SharedPreferences`/files.
|
|
14
|
+
- **Build wrappers:** treat `gradlew` / documented wrappers as the supported entry; do not download unsigned wrapper JARs ad hoc.
|
|
15
|
+
- **Logging:** never log PII, tokens, or Authorization headers.
|
|
16
|
+
|
|
17
|
+
# Agent requirements
|
|
18
|
+
|
|
19
|
+
- `security-reviewer` on auth/storage/network changes.
|
|
20
|
+
- Do not weaken TLS or cleartext policy without explicit AC.
|
|
21
|
+
|
|
22
|
+
# IPC & exports
|
|
23
|
+
|
|
24
|
+
- Exported components and deep links must match existing permission/export patterns.
|
|
25
|
+
- Do not broaden `exported=true` or cleartext traffic without explicit AC.
|
|
26
|
+
- Certificate pinning — only when the repo already uses it; do not invent a pinning stack.
|
|
27
|
+
|
|
28
|
+
- Review ProGuard/R8 keep rules when touching reflection/serialization used for auth.
|
|
29
|
+
- Backup/export rules must not unintentionally expose encrypted stores.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Agent role for a technical retrospective (retro) of the team / sprint. On-demand — prefer the /technical-retro slash command.
|
|
3
|
+
paths:
|
|
4
|
+
- .claude/commands/**/*
|
|
5
|
+
- .claude/team/**/*
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- shared-core: review/technical-retro.md -->
|
|
9
|
+
|
|
10
|
+
# Technical retro — rule alias
|
|
11
|
+
|
|
12
|
+
Full scenario (including the **“Agent work”** block for a slug from team tasks) lives in the slash command:
|
|
13
|
+
|
|
14
|
+
**`commands/technical-retro.md`** → `/technical-retro`
|
|
15
|
+
|
|
16
|
+
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.
|
|
17
|
+
|
|
18
|
+
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,7 @@
|
|
|
1
|
+
# ui-and-accessibility
|
|
2
|
+
|
|
3
|
+
| File | Cursor SoT |
|
|
4
|
+
|------|------------|
|
|
5
|
+
| [`compose.md`](./compose.md) | `compose-ui.mdc` |
|
|
6
|
+
| [`viewmodels.md`](./viewmodels.md) | `state-and-viewmodels.mdc` |
|
|
7
|
+
| [`navigation.md`](./navigation.md) | `navigation-feature-launcher.mdc` |
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Jetpack Compose Material 3 and design-system UI conventions
|
|
3
|
+
paths:
|
|
4
|
+
- "**/presentation/**"
|
|
5
|
+
- "**/ui/**"
|
|
6
|
+
- "**/*Screen*.kt"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Compose UI
|
|
10
|
+
|
|
11
|
+
- Prefer **Jetpack Compose Material 3** plus the project **design-system** components/tokens.
|
|
12
|
+
- Screens stay thin: collect state from ViewModels; emit intents/events upward; no repository/HTTP calls in composables.
|
|
13
|
+
- Reuse existing design-system building blocks before inventing one-off styling.
|
|
14
|
+
- Accessibility: content descriptions, semantics, focus order — match repo a11y conventions; `accessibility-reviewer` when UI changes.
|
|
15
|
+
- Previews/fakes for UI states when the module already uses them.
|
|
16
|
+
|
|
17
|
+
# Boundaries
|
|
18
|
+
|
|
19
|
+
- Composables depend on presentation state models — not data DTOs.
|
|
20
|
+
- Navigation calls go through feature launcher ports / nav APIs — see `ui-and-accessibility/navigation`.
|
|
21
|
+
|
|
22
|
+
# Agent requirements
|
|
23
|
+
|
|
24
|
+
- Place UI under presentation/ui packages next to analogs.
|
|
25
|
+
- Do not add a second design system or raw Material overrides that fight tokens.
|
|
26
|
+
|
|
27
|
+
# State rendering
|
|
28
|
+
|
|
29
|
+
- Render loading / empty / error / content from ViewModel state — no hidden local business rules.
|
|
30
|
+
- Hoist state as the repo does; avoid duplicating ViewModel state in remember blocks.
|
|
31
|
+
- Side-effect APIs (`LaunchedEffect`, etc.) only for UI concerns, not repository calls.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Cross-feature navigation via public launcher-style ports
|
|
3
|
+
paths:
|
|
4
|
+
- "**/navigation/**"
|
|
5
|
+
- "**/*Launcher*.kt"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Navigation / feature launchers
|
|
9
|
+
|
|
10
|
+
- Cross-feature navigation goes through **public launcher-style ports** declared in `features/<name>/api` (or equivalent).
|
|
11
|
+
- App shells / hosts implement or wire those ports; features must not deep-import another feature’s screens.
|
|
12
|
+
- Arguments and results are explicit, serializable contracts — avoid leaking impl types across modules.
|
|
13
|
+
- Intra-feature navigation may use the repo’s local NavHost/router patterns.
|
|
14
|
+
|
|
15
|
+
# Boundaries
|
|
16
|
+
|
|
17
|
+
- Do not navigate by hard-coded activity/class names across feature boundaries when a launcher port exists.
|
|
18
|
+
- Keep Compose destinations thin; navigation side effects originate from ViewModel effects or host wiring as in the repo.
|
|
19
|
+
|
|
20
|
+
# Agent requirements
|
|
21
|
+
|
|
22
|
+
- When adding a new entry point, extend the public api contract first, then wire the host.
|
|
23
|
+
- Document deep-link / flavor-specific entry points next to existing analogs.
|
|
24
|
+
|
|
25
|
+
# Testing & previews
|
|
26
|
+
|
|
27
|
+
- Host wiring should remain mockable in JVM tests where the repo already tests navigation ports.
|
|
28
|
+
- Do not embed feature impl screens into another feature’s navigation graph.
|
|
29
|
+
|
|
30
|
+
- Deep links and app-link filters stay with the host/`applications/` wiring unless the feature api owns them.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: MVI/UDF state on the project ViewModel base
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*ViewModel*.kt"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# State and ViewModels
|
|
8
|
+
|
|
9
|
+
- Follow the repo’s **MVI / unidirectional** pattern on the project ViewModel base (name lives in consumer `team/conventions.md`).
|
|
10
|
+
- Single source of UI state (StateFlow / immutable state holder); reduce via pure updates where practical.
|
|
11
|
+
- Expose intents/events for user actions; do not mutate state from composables directly.
|
|
12
|
+
- Side effects (navigation, one-shots) follow existing effect channels — do not invent a parallel bus.
|
|
13
|
+
- ViewModels depend on domain/use-case ports — not concrete data clients.
|
|
14
|
+
|
|
15
|
+
# Agent requirements
|
|
16
|
+
|
|
17
|
+
- Keep mapping/DTO work out of ViewModels when mappers already exist in data.
|
|
18
|
+
- Cover reducers/state transitions with JVM unit tests when non-trivial.
|
|
19
|
+
- Avoid `!!` and unchecked casts in state plumbing.
|
|
20
|
+
|
|
21
|
+
# Lifecycle
|
|
22
|
+
|
|
23
|
+
- Use `viewModelScope` (or the project equivalent); do not launch unstructured globals.
|
|
24
|
+
- Clear one-shot effects after handling to avoid replay on recomposition/rotation.
|
|
25
|
+
- Keep mapping of domain models → UI models next to existing presenters/mappers.
|
|
26
|
+
|
|
27
|
+
- Document non-obvious state machine transitions in the brief or a short KDoc on the reducer.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# `.claude/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 `.claude/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 (`tooling-and-review/gradle-tooling.md`):
|
|
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 (`.claude/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 `.claude/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.md`): View ≠ API/DTO; ViewModel ≠ Data impl; Domain ≠ Jetpack Compose; Data ≠ Presentation.
|
|
17
|
+
4. Check DI composition in `applications/`, Gradle modules public API (`architecture/module-public-api.md`), and no deep-imports across Features.
|
|
18
|
+
5. Review Kotlin concurrency and conventions (`stack/kotlin-conventions.md`): `main-safe / viewModelScope`, typed errors, `!!`.
|
|
19
|
+
6. Review Jetpack Compose thinness, Design System usage, `testTag` / semantics / contentDescription (`ui-and-accessibility/compose.md`).
|
|
20
|
+
7. Check tests: unit for mapper/domain/VM (`testing/unit.md`); Android instrumentation for user flows (`testing/ui.md`).
|
|
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 (`tooling-and-review/gradle-tooling.md`, `tooling-and-review/post-change-build.md`).
|
|
24
|
+
|
|
25
|
+
## Output
|
|
26
|
+
|
|
27
|
+
Lead with findings ordered by severity. Required shape (also in `code-review`):
|
|
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 `.claude/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 (`tooling-and-review/gradle-tooling.md`).
|
|
17
|
+
|
|
18
|
+
## Artifacts
|
|
19
|
+
|
|
20
|
+
For agent team tasks, write `.claude/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 `architecture/feature-delivery.md` and `architecture/reference-features.md` — 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 (`testing/unit.md`).
|
|
12
|
+
5. After Kotlin edits: **invoke** `tooling-and-review/post-change-build.md` (+ `tooling-and-review/gradle-tooling.md`). 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 (`ui-and-accessibility/compose` / `testing/ui`).
|
|
11
|
+
4. Plan → generate → heal via agents `instrumentation-test-{planner,generator,healer}`.
|
|
12
|
+
5. Run the narrowest Gradle instrumentation task via `tooling-and-review/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 `.claude/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 `.claude/rules/`, `.claude/agents/`, `.claude/skills/`, or **`.claude/team/conventions.md`** (prefer conventions for project gotchas)
|
|
51
|
+
- One concrete snippet or file path
|
|
52
|
+
- Whether it belongs in session-start vs `paths:` 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 `testing/unit.md` (Cursor `.mdc` / Claude `testing/unit.md` depending on preset).
|
|
15
|
+
|
|
16
|
+
## Planner
|
|
17
|
+
|
|
18
|
+
Write or update `.claude/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` (`tooling-and-review/gradle-tooling.md`) 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).
|