@bonesofspring/ai-rules 0.2.15 → 0.2.17
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 +31 -0
- package/README.md +22 -3
- package/bin/cli.js +41 -0
- package/package.json +3 -1
- package/presets/_shared/README.md +2 -2
- package/presets/_shared/assets/docs-specs/INDEX.md +9 -0
- package/presets/_shared/assets/docs-specs/_templates/feature.md +32 -0
- package/presets/_shared/assets/docs-specs/_templates/page.md +47 -0
- package/presets/_shared/assets/docs-specs/schemas/frontmatter-v1.schema.json +22 -0
- package/presets/_shared/core/architecture/product-specs-authoring.md +107 -0
- package/presets/_shared/core/architecture/product-specs.md +49 -0
- 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 +70 -0
- package/presets/claude/android-kotlin/agents/ci-investigator.md +74 -0
- package/presets/claude/android-kotlin/agents/code-reviewer.md +76 -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 +70 -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 +55 -0
- package/presets/claude/android-kotlin/agents/task-router.md +114 -0
- package/presets/claude/android-kotlin/agents/tech-writer.md +66 -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 +23 -0
- package/presets/claude/android-kotlin/commands/feature-start.md +41 -0
- package/presets/claude/android-kotlin/commands/spec-start.md +29 -0
- package/presets/claude/android-kotlin/commands/task-continue.md +53 -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 +65 -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 +45 -0
- package/presets/claude/android-kotlin/rules/architecture/module-public-api.md +29 -0
- package/presets/claude/android-kotlin/rules/architecture/product-specs-authoring.md +121 -0
- package/presets/claude/android-kotlin/rules/architecture/product-specs.md +62 -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 +129 -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 +36 -0
- package/presets/claude/android-kotlin/skills/instrumentation-ui-e2e/SKILL.md +17 -0
- package/presets/claude/android-kotlin/skills/spec-authoring/SKILL.md +26 -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/agents/build-verifier.md +3 -0
- package/presets/claude/go/agents/code-reviewer.md +2 -0
- package/presets/claude/go/agents/feature-developer.md +7 -0
- package/presets/claude/go/agents/task-analyst.md +19 -0
- package/presets/claude/go/agents/task-router.md +11 -0
- package/presets/claude/go/agents/tech-writer.md +5 -0
- package/presets/claude/go/commands/feature-continue.md +1 -0
- package/presets/claude/go/commands/feature-start.md +8 -0
- package/presets/claude/go/commands/spec-start.md +29 -0
- package/presets/claude/go/commands/task-continue.md +6 -3
- package/presets/claude/go/rules/README.md +2 -0
- package/presets/claude/go/rules/architecture/feature-delivery.md +4 -0
- package/presets/claude/go/rules/architecture/product-specs-authoring.md +121 -0
- package/presets/claude/go/rules/architecture/product-specs.md +63 -0
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +2 -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/go/skills/feature-delivery/SKILL.md +5 -4
- package/presets/claude/go/skills/spec-authoring/SKILL.md +26 -0
- package/presets/claude/ios-swift/agents/build-verifier.md +3 -0
- package/presets/claude/ios-swift/agents/code-reviewer.md +2 -0
- package/presets/claude/ios-swift/agents/feature-developer.md +7 -0
- package/presets/claude/ios-swift/agents/task-analyst.md +19 -0
- package/presets/claude/ios-swift/agents/task-router.md +11 -0
- package/presets/claude/ios-swift/agents/tech-writer.md +2 -15
- package/presets/claude/ios-swift/commands/feature-continue.md +4 -0
- package/presets/claude/ios-swift/commands/feature-start.md +8 -0
- package/presets/claude/ios-swift/commands/spec-start.md +29 -0
- package/presets/claude/ios-swift/commands/task-continue.md +6 -3
- package/presets/claude/ios-swift/rules/README.md +3 -0
- package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +4 -0
- package/presets/claude/ios-swift/rules/architecture/product-specs-authoring.md +121 -0
- package/presets/claude/ios-swift/rules/architecture/product-specs.md +62 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.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/ios-swift/skills/feature-delivery/SKILL.md +5 -4
- package/presets/claude/ios-swift/skills/spec-authoring/SKILL.md +26 -0
- package/presets/claude/java/agents/build-verifier.md +3 -0
- package/presets/claude/java/agents/code-reviewer.md +2 -0
- package/presets/claude/java/agents/feature-developer.md +7 -0
- package/presets/claude/java/agents/task-analyst.md +19 -0
- package/presets/claude/java/agents/task-router.md +11 -0
- package/presets/claude/java/agents/tech-writer.md +5 -0
- package/presets/claude/java/commands/feature-continue.md +1 -0
- package/presets/claude/java/commands/feature-start.md +8 -0
- package/presets/claude/java/commands/spec-start.md +29 -0
- package/presets/claude/java/commands/task-continue.md +6 -3
- package/presets/claude/java/rules/README.md +2 -0
- package/presets/claude/java/rules/architecture/feature-delivery.md +4 -0
- package/presets/claude/java/rules/architecture/product-specs-authoring.md +121 -0
- package/presets/claude/java/rules/architecture/product-specs.md +63 -0
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.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/java/skills/feature-delivery/SKILL.md +5 -4
- package/presets/claude/java/skills/spec-authoring/SKILL.md +26 -0
- package/presets/claude/mcp-ts/agents/build-verifier.md +3 -0
- package/presets/claude/mcp-ts/agents/feature-developer.md +7 -0
- package/presets/claude/mcp-ts/agents/task-analyst.md +21 -0
- package/presets/claude/mcp-ts/agents/task-router.md +11 -0
- package/presets/claude/mcp-ts/commands/feature-continue.md +4 -0
- package/presets/claude/mcp-ts/commands/feature-start.md +8 -0
- package/presets/claude/mcp-ts/commands/spec-start.md +29 -0
- package/presets/claude/mcp-ts/commands/task-continue.md +6 -3
- package/presets/claude/mcp-ts/rules/README.md +2 -0
- package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +4 -0
- package/presets/claude/mcp-ts/rules/architecture/product-specs-authoring.md +121 -0
- package/presets/claude/mcp-ts/rules/architecture/product-specs.md +63 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.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/mcp-ts/skills/feature-delivery/SKILL.md +4 -3
- package/presets/claude/mcp-ts/skills/spec-authoring/SKILL.md +26 -0
- package/presets/claude/next/agents/build-verifier.md +3 -0
- package/presets/claude/next/agents/code-reviewer.md +1 -0
- package/presets/claude/next/agents/feature-developer.md +7 -0
- package/presets/claude/next/agents/task-analyst.md +19 -0
- package/presets/claude/next/agents/task-router.md +11 -0
- package/presets/claude/next/agents/tech-writer.md +5 -0
- package/presets/claude/next/commands/feature-continue.md +1 -0
- package/presets/claude/next/commands/feature-start.md +8 -0
- package/presets/claude/next/commands/spec-start.md +29 -0
- package/presets/claude/next/commands/task-continue.md +6 -3
- package/presets/claude/next/rules/README.md +3 -0
- package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +4 -0
- package/presets/claude/next/rules/architecture/product-specs-authoring.md +121 -0
- package/presets/claude/next/rules/architecture/product-specs.md +63 -0
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.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/next/skills/feature-delivery/SKILL.md +4 -3
- package/presets/claude/next/skills/spec-authoring/SKILL.md +26 -0
- package/presets/claude/nuxt/agents/build-verifier.md +3 -0
- package/presets/claude/nuxt/agents/code-reviewer.md +2 -0
- package/presets/claude/nuxt/agents/feature-developer.md +7 -0
- package/presets/claude/nuxt/agents/task-analyst.md +19 -0
- package/presets/claude/nuxt/agents/task-router.md +11 -0
- package/presets/claude/nuxt/agents/tech-writer.md +5 -0
- package/presets/claude/nuxt/commands/feature-continue.md +4 -0
- package/presets/claude/nuxt/commands/feature-start.md +8 -0
- package/presets/claude/nuxt/commands/spec-start.md +29 -0
- package/presets/claude/nuxt/commands/task-continue.md +6 -3
- package/presets/claude/nuxt/rules/README.md +3 -0
- package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +4 -0
- package/presets/claude/nuxt/rules/architecture/product-specs-authoring.md +121 -0
- package/presets/claude/nuxt/rules/architecture/product-specs.md +62 -0
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.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/nuxt/skills/feature-delivery/SKILL.md +4 -3
- package/presets/claude/nuxt/skills/spec-authoring/SKILL.md +26 -0
- package/presets/claude/php-hexagonal/agents/build-verifier.md +3 -0
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +2 -0
- package/presets/claude/php-hexagonal/agents/feature-developer.md +7 -0
- package/presets/claude/php-hexagonal/agents/task-analyst.md +19 -0
- package/presets/claude/php-hexagonal/agents/task-router.md +11 -0
- package/presets/claude/php-hexagonal/agents/tech-writer.md +5 -0
- package/presets/claude/php-hexagonal/commands/feature-continue.md +1 -0
- package/presets/claude/php-hexagonal/commands/feature-start.md +8 -0
- package/presets/claude/php-hexagonal/commands/spec-start.md +29 -0
- package/presets/claude/php-hexagonal/commands/task-continue.md +6 -3
- package/presets/claude/php-hexagonal/rules/README.md +2 -0
- package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +4 -0
- package/presets/claude/php-hexagonal/rules/architecture/product-specs-authoring.md +121 -0
- package/presets/claude/php-hexagonal/rules/architecture/product-specs.md +63 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.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-hexagonal/skills/feature-delivery/SKILL.md +5 -4
- package/presets/claude/php-hexagonal/skills/spec-authoring/SKILL.md +26 -0
- package/presets/claude/php-laravel/agents/build-verifier.md +3 -0
- package/presets/claude/php-laravel/agents/code-reviewer.md +2 -0
- package/presets/claude/php-laravel/agents/feature-developer.md +7 -0
- package/presets/claude/php-laravel/agents/task-analyst.md +19 -0
- package/presets/claude/php-laravel/agents/task-router.md +11 -0
- package/presets/claude/php-laravel/agents/tech-writer.md +5 -0
- package/presets/claude/php-laravel/commands/feature-continue.md +1 -0
- package/presets/claude/php-laravel/commands/feature-start.md +8 -0
- package/presets/claude/php-laravel/commands/spec-start.md +29 -0
- package/presets/claude/php-laravel/commands/task-continue.md +6 -3
- package/presets/claude/php-laravel/rules/README.md +2 -0
- package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +4 -0
- package/presets/claude/php-laravel/rules/architecture/product-specs-authoring.md +121 -0
- package/presets/claude/php-laravel/rules/architecture/product-specs.md +63 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.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/php-laravel/skills/feature-delivery/SKILL.md +5 -4
- package/presets/claude/php-laravel/skills/spec-authoring/SKILL.md +26 -0
- package/presets/claude/svelte/agents/build-verifier.md +3 -0
- package/presets/claude/svelte/agents/code-reviewer.md +2 -0
- package/presets/claude/svelte/agents/feature-developer.md +7 -0
- package/presets/claude/svelte/agents/task-analyst.md +19 -0
- package/presets/claude/svelte/agents/task-router.md +11 -0
- package/presets/claude/svelte/agents/tech-writer.md +5 -0
- package/presets/claude/svelte/commands/feature-continue.md +4 -0
- package/presets/claude/svelte/commands/feature-start.md +8 -0
- package/presets/claude/svelte/commands/spec-start.md +29 -0
- package/presets/claude/svelte/commands/task-continue.md +6 -3
- package/presets/claude/svelte/rules/README.md +3 -0
- package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +4 -0
- package/presets/claude/svelte/rules/architecture/product-specs-authoring.md +121 -0
- package/presets/claude/svelte/rules/architecture/product-specs.md +62 -0
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.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/claude/svelte/skills/feature-delivery/SKILL.md +4 -3
- package/presets/claude/svelte/skills/spec-authoring/SKILL.md +26 -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 +70 -0
- package/presets/cursor/android-kotlin/agents/ci-investigator.md +74 -0
- package/presets/cursor/android-kotlin/agents/code-reviewer.md +76 -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 +70 -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 +55 -0
- package/presets/cursor/android-kotlin/agents/task-router.md +114 -0
- package/presets/cursor/android-kotlin/agents/tech-writer.md +66 -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 +23 -0
- package/presets/cursor/android-kotlin/commands/feature-start.md +41 -0
- package/presets/cursor/android-kotlin/commands/spec-start.md +29 -0
- package/presets/cursor/android-kotlin/commands/task-continue.md +53 -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 +64 -0
- package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +16 -0
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +126 -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 +40 -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/product-specs-authoring.mdc +123 -0
- package/presets/cursor/android-kotlin/rules/product-specs.mdc +64 -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 +36 -0
- package/presets/cursor/android-kotlin/skills/instrumentation-ui-e2e/SKILL.md +17 -0
- package/presets/cursor/android-kotlin/skills/spec-authoring/SKILL.md +26 -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/agents/build-verifier.md +3 -0
- package/presets/cursor/go/agents/code-reviewer.md +2 -0
- package/presets/cursor/go/agents/feature-developer.md +7 -0
- package/presets/cursor/go/agents/task-analyst.md +19 -0
- package/presets/cursor/go/agents/task-router.md +11 -0
- package/presets/cursor/go/agents/tech-writer.md +5 -0
- package/presets/cursor/go/commands/feature-continue.md +4 -0
- package/presets/cursor/go/commands/feature-start.md +8 -0
- package/presets/cursor/go/commands/spec-start.md +29 -0
- package/presets/cursor/go/commands/task-continue.md +6 -3
- package/presets/cursor/go/rules/README.md +4 -1
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +2 -0
- package/presets/cursor/go/rules/feature-delivery-workflow.mdc +4 -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/go/rules/product-specs-authoring.mdc +123 -0
- package/presets/cursor/go/rules/product-specs.mdc +65 -0
- package/presets/cursor/go/skills/feature-delivery/SKILL.md +5 -4
- package/presets/cursor/go/skills/spec-authoring/SKILL.md +26 -0
- package/presets/cursor/ios-swift/agents/build-verifier.md +3 -0
- package/presets/cursor/ios-swift/agents/code-reviewer.md +2 -0
- package/presets/cursor/ios-swift/agents/feature-developer.md +7 -0
- package/presets/cursor/ios-swift/agents/task-analyst.md +19 -0
- package/presets/cursor/ios-swift/agents/task-router.md +11 -0
- package/presets/cursor/ios-swift/agents/tech-writer.md +2 -15
- package/presets/cursor/ios-swift/commands/feature-continue.md +4 -0
- package/presets/cursor/ios-swift/commands/feature-start.md +8 -0
- package/presets/cursor/ios-swift/commands/spec-start.md +29 -0
- package/presets/cursor/ios-swift/commands/task-continue.md +6 -3
- package/presets/cursor/ios-swift/rules/README.md +4 -1
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +2 -0
- package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +4 -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/ios-swift/rules/product-specs-authoring.mdc +123 -0
- package/presets/cursor/ios-swift/rules/product-specs.mdc +64 -0
- package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +5 -4
- package/presets/cursor/ios-swift/skills/spec-authoring/SKILL.md +26 -0
- package/presets/cursor/java/agents/build-verifier.md +3 -0
- package/presets/cursor/java/agents/code-reviewer.md +2 -0
- package/presets/cursor/java/agents/feature-developer.md +7 -0
- package/presets/cursor/java/agents/task-analyst.md +19 -0
- package/presets/cursor/java/agents/task-router.md +11 -0
- package/presets/cursor/java/agents/tech-writer.md +5 -0
- package/presets/cursor/java/commands/feature-continue.md +4 -0
- package/presets/cursor/java/commands/feature-start.md +8 -0
- package/presets/cursor/java/commands/spec-start.md +29 -0
- package/presets/cursor/java/commands/task-continue.md +6 -3
- package/presets/cursor/java/rules/README.md +4 -1
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +2 -0
- package/presets/cursor/java/rules/feature-delivery-workflow.mdc +4 -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/java/rules/product-specs-authoring.mdc +123 -0
- package/presets/cursor/java/rules/product-specs.mdc +65 -0
- package/presets/cursor/java/skills/feature-delivery/SKILL.md +5 -4
- package/presets/cursor/java/skills/spec-authoring/SKILL.md +26 -0
- package/presets/cursor/mcp-ts/agents/build-verifier.md +3 -0
- package/presets/cursor/mcp-ts/agents/feature-developer.md +7 -0
- package/presets/cursor/mcp-ts/agents/task-analyst.md +21 -0
- package/presets/cursor/mcp-ts/agents/task-router.md +11 -0
- package/presets/cursor/mcp-ts/commands/feature-continue.md +4 -0
- package/presets/cursor/mcp-ts/commands/feature-start.md +8 -0
- package/presets/cursor/mcp-ts/commands/spec-start.md +29 -0
- package/presets/cursor/mcp-ts/commands/task-continue.md +6 -3
- package/presets/cursor/mcp-ts/rules/README.md +2 -0
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +2 -0
- package/presets/cursor/mcp-ts/rules/feature-delivery-workflow.mdc +4 -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/mcp-ts/rules/product-specs-authoring.mdc +123 -0
- package/presets/cursor/mcp-ts/rules/product-specs.mdc +65 -0
- package/presets/cursor/mcp-ts/skills/feature-delivery/SKILL.md +4 -3
- package/presets/cursor/mcp-ts/skills/spec-authoring/SKILL.md +26 -0
- package/presets/cursor/next/agents/build-verifier.md +3 -0
- package/presets/cursor/next/agents/code-reviewer.md +1 -0
- package/presets/cursor/next/agents/feature-developer.md +7 -0
- package/presets/cursor/next/agents/task-analyst.md +19 -0
- package/presets/cursor/next/agents/task-router.md +11 -0
- package/presets/cursor/next/agents/tech-writer.md +5 -0
- package/presets/cursor/next/commands/feature-continue.md +4 -0
- package/presets/cursor/next/commands/feature-start.md +8 -0
- package/presets/cursor/next/commands/spec-start.md +29 -0
- package/presets/cursor/next/commands/task-continue.md +6 -3
- package/presets/cursor/next/rules/README.md +3 -1
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +2 -0
- package/presets/cursor/next/rules/feature-delivery-workflow.mdc +4 -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/next/rules/product-specs-authoring.mdc +123 -0
- package/presets/cursor/next/rules/product-specs.mdc +65 -0
- package/presets/cursor/next/skills/feature-delivery/SKILL.md +4 -3
- package/presets/cursor/next/skills/spec-authoring/SKILL.md +26 -0
- package/presets/cursor/nuxt/agents/build-verifier.md +3 -0
- package/presets/cursor/nuxt/agents/code-reviewer.md +2 -0
- package/presets/cursor/nuxt/agents/feature-developer.md +7 -0
- package/presets/cursor/nuxt/agents/task-analyst.md +19 -0
- package/presets/cursor/nuxt/agents/task-router.md +11 -0
- package/presets/cursor/nuxt/agents/tech-writer.md +5 -0
- package/presets/cursor/nuxt/commands/feature-continue.md +4 -0
- package/presets/cursor/nuxt/commands/feature-start.md +8 -0
- package/presets/cursor/nuxt/commands/spec-start.md +29 -0
- package/presets/cursor/nuxt/commands/task-continue.md +6 -3
- package/presets/cursor/nuxt/rules/README.md +3 -1
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +2 -0
- package/presets/cursor/nuxt/rules/feature-delivery-workflow.mdc +4 -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/nuxt/rules/product-specs-authoring.mdc +123 -0
- package/presets/cursor/nuxt/rules/product-specs.mdc +64 -0
- package/presets/cursor/nuxt/skills/feature-delivery/SKILL.md +4 -3
- package/presets/cursor/nuxt/skills/spec-authoring/SKILL.md +26 -0
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +3 -0
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +2 -0
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +7 -0
- package/presets/cursor/php-hexagonal/agents/task-analyst.md +19 -0
- package/presets/cursor/php-hexagonal/agents/task-router.md +11 -0
- package/presets/cursor/php-hexagonal/agents/tech-writer.md +5 -0
- package/presets/cursor/php-hexagonal/commands/feature-continue.md +4 -0
- package/presets/cursor/php-hexagonal/commands/feature-start.md +8 -0
- package/presets/cursor/php-hexagonal/commands/spec-start.md +29 -0
- package/presets/cursor/php-hexagonal/commands/task-continue.md +6 -3
- package/presets/cursor/php-hexagonal/rules/README.md +4 -1
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +2 -0
- package/presets/cursor/php-hexagonal/rules/feature-delivery-workflow.mdc +4 -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-hexagonal/rules/product-specs-authoring.mdc +123 -0
- package/presets/cursor/php-hexagonal/rules/product-specs.mdc +65 -0
- package/presets/cursor/php-hexagonal/skills/feature-delivery/SKILL.md +5 -4
- package/presets/cursor/php-hexagonal/skills/spec-authoring/SKILL.md +26 -0
- package/presets/cursor/php-laravel/agents/build-verifier.md +3 -0
- package/presets/cursor/php-laravel/agents/code-reviewer.md +2 -0
- package/presets/cursor/php-laravel/agents/feature-developer.md +7 -0
- package/presets/cursor/php-laravel/agents/task-analyst.md +19 -0
- package/presets/cursor/php-laravel/agents/task-router.md +11 -0
- package/presets/cursor/php-laravel/agents/tech-writer.md +5 -0
- package/presets/cursor/php-laravel/commands/feature-continue.md +4 -0
- package/presets/cursor/php-laravel/commands/feature-start.md +8 -0
- package/presets/cursor/php-laravel/commands/spec-start.md +29 -0
- package/presets/cursor/php-laravel/commands/task-continue.md +6 -3
- package/presets/cursor/php-laravel/rules/README.md +4 -1
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +2 -0
- package/presets/cursor/php-laravel/rules/feature-delivery-workflow.mdc +4 -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/php-laravel/rules/product-specs-authoring.mdc +123 -0
- package/presets/cursor/php-laravel/rules/product-specs.mdc +65 -0
- package/presets/cursor/php-laravel/skills/feature-delivery/SKILL.md +5 -4
- package/presets/cursor/php-laravel/skills/spec-authoring/SKILL.md +26 -0
- package/presets/cursor/svelte/agents/build-verifier.md +3 -0
- package/presets/cursor/svelte/agents/code-reviewer.md +2 -0
- package/presets/cursor/svelte/agents/feature-developer.md +7 -0
- package/presets/cursor/svelte/agents/task-analyst.md +19 -0
- package/presets/cursor/svelte/agents/task-router.md +11 -0
- package/presets/cursor/svelte/agents/tech-writer.md +5 -0
- package/presets/cursor/svelte/commands/feature-continue.md +4 -0
- package/presets/cursor/svelte/commands/feature-start.md +8 -0
- package/presets/cursor/svelte/commands/spec-start.md +29 -0
- package/presets/cursor/svelte/commands/task-continue.md +6 -3
- package/presets/cursor/svelte/rules/README.md +3 -1
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +2 -0
- package/presets/cursor/svelte/rules/feature-delivery-workflow.mdc +4 -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
- package/presets/cursor/svelte/rules/product-specs-authoring.mdc +123 -0
- package/presets/cursor/svelte/rules/product-specs.mdc +64 -0
- package/presets/cursor/svelte/skills/feature-delivery/SKILL.md +4 -3
- package/presets/cursor/svelte/skills/spec-authoring/SKILL.md +26 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Hooks cookbook (examples)
|
|
2
|
+
|
|
3
|
+
Optional scripts under `hooks/examples/`. **Not** referenced from default `hooks.json` (only `guard-shell-command.sh` + `chain-team-phases.sh`).
|
|
4
|
+
|
|
5
|
+
| Script | Purpose |
|
|
6
|
+
|--------|---------|
|
|
7
|
+
| `secret-guard.example.sh` | Fail if staged diff looks like secrets |
|
|
8
|
+
| `format-edited.example.sh` | Stack formatter / linter on edited files |
|
|
9
|
+
| `test-on-save.example.sh` | Scoped tests for the stack |
|
|
10
|
+
|
|
11
|
+
## Wiring (Cursor)
|
|
12
|
+
|
|
13
|
+
1. Copy an example into `hooks/` (drop `.example` suffix), e.g. `cp hooks/examples/secret-guard.example.sh hooks/secret-guard.sh`.
|
|
14
|
+
2. `chmod +x hooks/secret-guard.sh`.
|
|
15
|
+
3. Add a hook entry in `.cursor/hooks.json` (e.g. `beforeShellExecution` or `afterFileEdit` — see Cursor hooks docs).
|
|
16
|
+
4. Keep cookbook scripts **out** of the default preset `hooks.json` when contributing back upstream.
|
|
17
|
+
|
|
18
|
+
Stack: **android-kotlin** — recipes must stay stack-safe (no cross-stack lint/test commands).
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional cookbook: ktlint / detekt on edited Kotlin files.
|
|
3
|
+
# NOT wired in default hooks.json — copy into a custom hook if desired.
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
if command -v ktlint >/dev/null 2>&1; then
|
|
8
|
+
git diff --name-only --diff-filter=ACMR HEAD 2>/dev/null | grep -E '\.(kt|kts)$' | while read -r f; do
|
|
9
|
+
[[ -f "$f" ]] && ktlint -F "$f" || true
|
|
10
|
+
done
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
# detekt — only if the repo already configures it; do not invent a gate here.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional cookbook: block committing likely secrets in staged diffs.
|
|
3
|
+
# NOT wired in default hooks.json — copy to hooks/ and register manually.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
PATTERN='(AKIA[0-9A-Z]{16}|-----BEGIN (RSA |OPENSSH )?PRIVATE KEY-----|api[_-]?key\s*[:=]\s*['\''\"][^'\''\"]{12,})'
|
|
6
|
+
if git diff --cached -U0 2>/dev/null | grep -Eiq "$PATTERN"; then
|
|
7
|
+
echo "secret-guard: possible secret in staged diff — review before commit" >&2
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
exit 0
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional: ./gradlew test slice for the active scheme (adjust SCHEME/DEST).
|
|
3
|
+
# NOT in default hooks.json. No Playwright / yarn lint.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
SCHEME="${XCODE_SCHEME:-App}"
|
|
6
|
+
DEST="${XCODE_DESTINATION:-platform=Android Simulator,name=iPhone 16}"
|
|
7
|
+
./gradlew test -scheme "$SCHEME" -destination "$DEST" -quiet 2>/dev/null || true
|
|
8
|
+
exit 0
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Lightweight shell guard for Android Kotlin preset projects.
|
|
3
|
+
# Android: do NOT blanket-block mvn test / ./gradlew test / compiler/IDE inspections / configured static analysis / repo static analysis.
|
|
4
|
+
# Package-manager mismatch checks apply only when a JS lockfile/package.json exists.
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
# ANDROID_PRESET_GUARD: allow ./gradlew compile/test; no Playwright/XCUITest assumptions
|
|
8
|
+
|
|
9
|
+
input=$(cat)
|
|
10
|
+
|
|
11
|
+
INPUT="$input" node <<'NODE'
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
|
|
14
|
+
const raw = process.env.INPUT || '';
|
|
15
|
+
let event;
|
|
16
|
+
try {
|
|
17
|
+
event = JSON.parse(raw);
|
|
18
|
+
} catch {
|
|
19
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const command = String(event.command || event.input?.command || '');
|
|
24
|
+
if (!command.trim()) {
|
|
25
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function out(permission, userMessage, agentMessage) {
|
|
30
|
+
process.stdout.write(JSON.stringify({
|
|
31
|
+
permission,
|
|
32
|
+
user_message: userMessage,
|
|
33
|
+
agent_message: agentMessage || userMessage,
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const dangerousGit = /\bgit\s+(reset\s+--hard|clean\s+-[^\n]*f|push\s+--force|push\s+-f|checkout\s+--\s+)/;
|
|
38
|
+
if (dangerousGit.test(command)) {
|
|
39
|
+
out(
|
|
40
|
+
'ask',
|
|
41
|
+
'This command looks destructive for git state. Review it before continuing.',
|
|
42
|
+
'A project hook flagged a destructive git command. Ask the user before running it.',
|
|
43
|
+
);
|
|
44
|
+
process.exit(0);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const managerByFile = [
|
|
48
|
+
['yarn.lock', 'yarn'],
|
|
49
|
+
['pnpm-lock.yaml', 'pnpm'],
|
|
50
|
+
['package-lock.json', 'npm'],
|
|
51
|
+
].find(([file]) => fs.existsSync(file));
|
|
52
|
+
|
|
53
|
+
let expected = managerByFile?.[1];
|
|
54
|
+
if (!expected && fs.existsSync('package.json')) {
|
|
55
|
+
try {
|
|
56
|
+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
|
57
|
+
const pm = typeof pkg.packageManager === 'string' ? pkg.packageManager : '';
|
|
58
|
+
expected = pm.split('@')[0] || undefined;
|
|
59
|
+
} catch {
|
|
60
|
+
// Ignore invalid package.json in the hook; the agent can diagnose it later.
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (!expected) {
|
|
65
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
66
|
+
process.exit(0);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const used = command.match(/(^|[;&|]\s*)(npm|yarn|pnpm)\s+/)?.[2];
|
|
70
|
+
if (used && used !== expected) {
|
|
71
|
+
out(
|
|
72
|
+
'ask',
|
|
73
|
+
`This repository appears to use ${expected}, but the command uses ${used}. Confirm before continuing.`,
|
|
74
|
+
`Use ${expected} for package scripts and installs unless the user explicitly approves ${used}.`,
|
|
75
|
+
);
|
|
76
|
+
process.exit(0);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
80
|
+
NODE
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# `.claude/rules` (preset android-kotlin)
|
|
2
|
+
|
|
3
|
+
In Claude Code all `.md` files under `rules/` are **discovered recursively**. Bodies are **derived** from Cursor SoT; indexes are not a second SoT.
|
|
4
|
+
|
|
5
|
+
## SoT sync
|
|
6
|
+
|
|
7
|
+
| Principle | Detail |
|
|
8
|
+
|-----------|--------|
|
|
9
|
+
| **SoT** | `presets/cursor/android-kotlin/rules/*.mdc` — edit here first |
|
|
10
|
+
| **Derive** | Claude topic `.md` = body + `paths:` (from Cursor `globs:` / requestable triggers) |
|
|
11
|
+
| **Drop** | Cursor-only keys (`alwaysApply`); keep short `description` |
|
|
12
|
+
| **Checklist** | change Cursor → update Claude twin **same PR** (**FAIL** if missing — see `preset-twin-sync` / build-verifier) |
|
|
13
|
+
|
|
14
|
+
## Loading budget
|
|
15
|
+
|
|
16
|
+
- **Session-start (no `paths:`):** exactly **3** — `android-app-core`, `boundaries`, `code-quality` (≤140 body lines total)
|
|
17
|
+
- **Everything else** — with `paths:`
|
|
18
|
+
- **Soft twin depth:** domain rules ≥15 body lines; thin aliases (`agent-team-intake`, `technical-retro`) may be shorter
|
|
19
|
+
|
|
20
|
+
## Cursor → Claude mapping
|
|
21
|
+
|
|
22
|
+
| Cursor `.mdc` (SoT) | Claude topic |
|
|
23
|
+
|---------------------|--------------|
|
|
24
|
+
| `android-app-core.mdc` | `stack/android-app-core.md` |
|
|
25
|
+
| `kotlin-conventions.mdc` | `stack/kotlin-conventions.md` |
|
|
26
|
+
| `architecture-boundaries.mdc` | `architecture/boundaries.md` |
|
|
27
|
+
| `feature-delivery-workflow.mdc` | `architecture/feature-delivery.md` |
|
|
28
|
+
| `reference-features.mdc` | `architecture/reference-features.md` |
|
|
29
|
+
| `product-specs.mdc` | `architecture/product-specs.md` |
|
|
30
|
+
| `product-specs-authoring.mdc` | `architecture/product-specs-authoring.md` | Generate/Bootstrap; requestable |
|
|
31
|
+
| `module-public-api.mdc` | `architecture/module-public-api.md` |
|
|
32
|
+
| `di-dagger-feature-holders.mdc` | `architecture/di-dagger-feature-holders.md` |
|
|
33
|
+
| `networking-data.mdc` | `api-and-data/networking.md` |
|
|
34
|
+
| `persistence-data.mdc` | `api-and-data/persistence.md` |
|
|
35
|
+
| `compose-ui.mdc` | `ui-and-accessibility/compose.md` |
|
|
36
|
+
| `state-and-viewmodels.mdc` | `ui-and-accessibility/viewmodels.md` |
|
|
37
|
+
| `navigation-feature-launcher.mdc` | `ui-and-accessibility/navigation.md` |
|
|
38
|
+
| `tests-unit.mdc` | `testing/unit.md` |
|
|
39
|
+
| `tests-ui.mdc` | `testing/ui.md` |
|
|
40
|
+
| `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
|
|
41
|
+
| `anti-sycophancy-discipline.mdc` | `tooling-and-review/anti-sycophancy-discipline.md` |
|
|
42
|
+
| `design-guidance.mdc` | `tooling-and-review/design-guidance.md` |
|
|
43
|
+
| `code-review-mr.mdc` | `tooling-and-review/code-review.md` |
|
|
44
|
+
| `post-change-build.mdc` | `tooling-and-review/post-change-build.md` |
|
|
45
|
+
| `gradle-tooling.mdc` | `tooling-and-review/gradle-tooling.md` |
|
|
46
|
+
| `security-android.mdc` | `tooling-and-review/security-android.md` |
|
|
47
|
+
| `agent-team-intake.mdc` | `tooling-and-review/agent-team-intake.md` |
|
|
48
|
+
| `agent-team-orchestrator.mdc` | `tooling-and-review/agent-team-orchestrator.md` |
|
|
49
|
+
| `technical-retro.mdc` | `tooling-and-review/technical-retro.md` |
|
|
50
|
+
| `preset-layering.mdc` | `tooling-and-review/preset-layering.md` |
|
|
51
|
+
| `preset-twin-sync.mdc` | `tooling-and-review/preset-twin-sync.md` |
|
|
52
|
+
| `preset-token-budget.mdc` | `tooling-and-review/preset-token-budget.md` |
|
|
53
|
+
| `preset-pr-checklist.mdc` | `tooling-and-review/preset-pr-checklist.md` |
|
|
54
|
+
| `preset-no-cross-stack-leakage.mdc` | `tooling-and-review/preset-no-cross-stack-leakage.md` |
|
|
55
|
+
|
|
56
|
+
## Folders
|
|
57
|
+
|
|
58
|
+
| Folder | About |
|
|
59
|
+
|--------|--------|
|
|
60
|
+
| `stack/` | Stack, Kotlin conventions |
|
|
61
|
+
| `architecture/` | Boundaries, feature-delivery, reference-features, module API, DI |
|
|
62
|
+
| `api-and-data/` | Networking, persistence |
|
|
63
|
+
| `testing/` | JVM unit, instrumentation UI |
|
|
64
|
+
| `ui-and-accessibility/` | Compose, ViewModels, navigation |
|
|
65
|
+
| `tooling-and-review/` | Quality, review, build, security, tooling, agent-team, retro, **preset meta** |
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# API and data
|
|
2
|
+
|
|
3
|
+
Networking layer, persistence, DTOs, mappers. Index only — bodies live in topic `.md` files.
|
|
4
|
+
|
|
5
|
+
| File | Cursor SoT |
|
|
6
|
+
|------|------------|
|
|
7
|
+
| [`networking.md`](./networking.md) | `networking-data.mdc` |
|
|
8
|
+
| [`persistence.md`](./persistence.md) | `persistence-data.mdc` |
|
|
9
|
+
|
|
10
|
+
Sync: change Cursor → update Claude twin same PR. Full map: [`../README.md`](../README.md).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Networking and DTO→domain mapping in the data layer
|
|
3
|
+
paths:
|
|
4
|
+
- "**/data/**"
|
|
5
|
+
- "**/network/**"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Networking / data
|
|
9
|
+
|
|
10
|
+
- HTTP clients, serializers, and DTOs live in the **data** layer (or data packages under `features/<name>/impl`).
|
|
11
|
+
- Map DTO → domain at the data boundary; domain and presentation must not see transport DTOs.
|
|
12
|
+
- Prefer the stack already in the repo (OkHttp, Ktor, Retrofit, etc.) — do not introduce a second client “for cleanliness”.
|
|
13
|
+
- Errors: translate transport failures into domain/application error types used by the feature.
|
|
14
|
+
- Timeouts, interceptors, and auth headers follow existing client configuration.
|
|
15
|
+
|
|
16
|
+
# Boundaries
|
|
17
|
+
|
|
18
|
+
- No Compose / ViewModel imports in networking code.
|
|
19
|
+
- No business rules beyond mapping and orchestration already established in repositories/use cases.
|
|
20
|
+
|
|
21
|
+
# Agent requirements
|
|
22
|
+
|
|
23
|
+
- Colocate new endpoints/mappers next to analogs.
|
|
24
|
+
- Secrets and TLS policy — see `tooling-and-review/security-android`; never hard-code tokens.
|
|
25
|
+
|
|
26
|
+
# Resilience
|
|
27
|
+
|
|
28
|
+
- Retries/backoff only when the repo already has a shared policy — do not invent per-call retries.
|
|
29
|
+
- Cancellation must propagate with coroutines; do not swallow `CancellationException`.
|
|
30
|
+
- Pagination/cursors follow neighboring repository patterns.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Local persistence and datastore patterns in the data layer
|
|
3
|
+
paths:
|
|
4
|
+
- "**/data/local/**"
|
|
5
|
+
- "**/database/**"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Persistence / local data
|
|
9
|
+
|
|
10
|
+
- Room / DataStore / SQLDelight / file cache — **use what the repo already uses**.
|
|
11
|
+
- Persistence models stay in data; map to domain entities before crossing upward.
|
|
12
|
+
- Migrations and schema changes follow existing migration patterns and CI checks.
|
|
13
|
+
- Do not block the main thread; use the repo’s dispatcher / coroutine patterns.
|
|
14
|
+
|
|
15
|
+
# Boundaries
|
|
16
|
+
|
|
17
|
+
- Domain defines repository ports; data implements them with local + remote sources as needed.
|
|
18
|
+
- UI must not query DAOs directly.
|
|
19
|
+
|
|
20
|
+
# Agent requirements
|
|
21
|
+
|
|
22
|
+
- Prefer the narrowest change that preserves schema compatibility.
|
|
23
|
+
- Cover mappers and critical repository branches with JVM unit tests when feasible.
|
|
24
|
+
|
|
25
|
+
# Consistency
|
|
26
|
+
|
|
27
|
+
- Transactions follow existing DAO/helper patterns.
|
|
28
|
+
- Cache invalidation belongs with the repository that owns the source of truth.
|
|
29
|
+
- Prefer idempotent writes when syncing remote → local.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# architecture
|
|
2
|
+
|
|
3
|
+
| File | Cursor SoT |
|
|
4
|
+
|------|------------|
|
|
5
|
+
| [`boundaries.md`](./boundaries.md) | `architecture-boundaries.mdc` |
|
|
6
|
+
| [`feature-delivery.md`](./feature-delivery.md) | `feature-delivery-workflow.mdc` |
|
|
7
|
+
| [`reference-features.md`](./reference-features.md) | `reference-features.mdc` |
|
|
8
|
+
| [`module-public-api.md`](./module-public-api.md) | `module-public-api.mdc` |
|
|
9
|
+
| [`di-dagger-feature-holders.md`](./di-dagger-feature-holders.md) | `di-dagger-feature-holders.mdc` |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Clean Architecture boundaries, api/impl modules, and DI summary for Android
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Layer boundaries
|
|
6
|
+
|
|
7
|
+
- **Presentation** (Compose, ViewModels): may use domain entities/use-case ports and design-system; must not import data HTTP clients/DTOs or map DTO→domain.
|
|
8
|
+
- **Domain**: may use shared core types; must not import Android UI, networking, or concrete repositories.
|
|
9
|
+
- **Data**: implements domain ports; must not import Compose/ViewModels.
|
|
10
|
+
|
|
11
|
+
# Module boundaries (api / impl)
|
|
12
|
+
|
|
13
|
+
- Direction: **presentation → domain ← data** inside `features/<name>/impl/`.
|
|
14
|
+
- Other features depend only on **`features/<name>/api`** (public contracts / launcher ports) — never deep-import `impl`.
|
|
15
|
+
- App shells under `applications/` wire graphs; navigation across features via public launcher-style ports.
|
|
16
|
+
- Shared kernels live under `core/` — do not put feature business rules there.
|
|
17
|
+
|
|
18
|
+
# DI summary
|
|
19
|
+
|
|
20
|
+
- Feature-scoped **Dagger** holders/components (see `architecture/di-dagger-feature-holders`).
|
|
21
|
+
- **No Hilt by default** unless the consumer repo already standardized on it.
|
|
22
|
+
- ViewModels receive ports/use cases, not concrete data types.
|
|
23
|
+
|
|
24
|
+
# Agent requirement
|
|
25
|
+
|
|
26
|
+
- Place files in matching layers/modules; do not short-circuit api/impl for speed.
|
|
27
|
+
- Load `architecture/module-public-api` and `ui-and-accessibility/navigation` when editing public contracts.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Feature-scoped Dagger holders/components; no Hilt by default
|
|
3
|
+
paths:
|
|
4
|
+
- "**/di/**"
|
|
5
|
+
- "**/*Holder*.kt"
|
|
6
|
+
- "**/*Component*.kt"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Dagger feature holders
|
|
10
|
+
|
|
11
|
+
- Prefer **feature-scoped** Dagger components / holders owned by `features/<name>/impl` (or the repo’s equivalent DI package).
|
|
12
|
+
- Expose only what the feature needs; do not create god-components that wire the whole app.
|
|
13
|
+
- App shells under `applications/` provide application-wide dependencies; features pull those via component dependencies / holder APIs already used in the repo.
|
|
14
|
+
- ViewModels and use cases are constructed via the holder/component — not via static globals.
|
|
15
|
+
|
|
16
|
+
# No Hilt by default
|
|
17
|
+
|
|
18
|
+
- **Do not introduce Hilt** unless the consumer repository already standardized on it.
|
|
19
|
+
- If the repo is Dagger-manual / holders, keep that pattern; do not “migrate to Hilt” as drive-by work.
|
|
20
|
+
|
|
21
|
+
# Boundaries
|
|
22
|
+
|
|
23
|
+
- DI graph assembly may import adapters for wiring only — no business rules inside modules/components.
|
|
24
|
+
- Other features consume public `api` contracts, not another feature’s DI internals.
|
|
25
|
+
|
|
26
|
+
# Agent requirements
|
|
27
|
+
|
|
28
|
+
- Follow neighboring `*Holder*` / `*Component*` patterns before inventing a new DI shape.
|
|
29
|
+
- Local holder type names belong in consumer `team/conventions.md`, not in this preset.
|
|
30
|
+
|
|
31
|
+
# Testing
|
|
32
|
+
|
|
33
|
+
- Provide test/fake holders or override bindings using the repo’s existing test DI pattern.
|
|
34
|
+
- Do not construct production graphs inside unit tests when a lightweight fake port suffices.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: End-to-end checklist for Android features (domain → data → DI → presentation)
|
|
3
|
+
paths:
|
|
4
|
+
- .claude/commands/**/*
|
|
5
|
+
- .claude/agents/**/*
|
|
6
|
+
- .claude/team/tasks/**/*
|
|
7
|
+
- "features/**"
|
|
8
|
+
- "**/*.{kt,kts}"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<!-- shared-core: architecture/feature-delivery-workflow.md -->
|
|
12
|
+
|
|
13
|
+
# Feature delivery (Android Kotlin)
|
|
14
|
+
|
|
15
|
+
Deliver features in layer order. Prefer neighboring `features/<name>/` analogs.
|
|
16
|
+
|
|
17
|
+
## Checklist
|
|
18
|
+
|
|
19
|
+
1. **Public API** — contracts / launcher ports in `features/<name>/api` when other modules will depend on them (`architecture/module-public-api`).
|
|
20
|
+
2. **Domain** — entities, use-case ports; no Android UI / HTTP DTOs (`architecture/boundaries`).
|
|
21
|
+
3. **Data** — repository implementations, DTO mappers, persistence (`api-and-data/networking`, `api-and-data/persistence`).
|
|
22
|
+
4. **DI** — feature Dagger holder/component wiring (`architecture/di-dagger-feature-holders`); **no Hilt by default**.
|
|
23
|
+
5. **Presentation** — ViewModel MVI/UDF + Compose screens (`ui-and-accessibility/viewmodels`, `ui-and-accessibility/compose`).
|
|
24
|
+
6. **Navigation** — wire launcher ports / host (`ui-and-accessibility/navigation`).
|
|
25
|
+
7. **Tests** — JVM unit tests; instrumentation when UI AC requires (`testing/unit`, `testing/ui`).
|
|
26
|
+
8. **Gate** — invoke **`tooling-and-review/post-change-build`** + **`tooling-and-review/gradle-tooling`**.
|
|
27
|
+
|
|
28
|
+
## Layer → rule matrix
|
|
29
|
+
|
|
30
|
+
| Layer | Rules |
|
|
31
|
+
|-------|-------|
|
|
32
|
+
| api / contracts | `module-public-api`, `navigation` |
|
|
33
|
+
| domain / data | `boundaries`, `networking`, `persistence` |
|
|
34
|
+
| di | `di-dagger-feature-holders` |
|
|
35
|
+
| presentation | `viewmodels`, `compose` |
|
|
36
|
+
| tests | `unit`, `ui`, skill `instrumentation-ui-e2e` |
|
|
37
|
+
|
|
38
|
+
## Agent requirements
|
|
39
|
+
|
|
40
|
+
- Skill `feature-delivery` owns the end-to-end path; do not skip api/impl boundaries for speed.
|
|
41
|
+
- Local type names only in consumer `team/conventions.md`.
|
|
42
|
+
|
|
43
|
+
## Related
|
|
44
|
+
|
|
45
|
+
- Product behavior discovery: requestable **`product-specs`** (`docs/specs/INDEX.md`) — do not paste the discovery algorithm here.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Public api module contracts for Android multimodule features
|
|
3
|
+
paths:
|
|
4
|
+
- "**/api/**"
|
|
5
|
+
- "**/*Api.kt"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Module public API
|
|
9
|
+
|
|
10
|
+
- `features/<name>/api` (or equivalent) holds **public** contracts: models safe to share, navigation/launcher ports, public facades.
|
|
11
|
+
- Implementation details stay in `impl` — other modules must not depend on `impl`.
|
|
12
|
+
- Prefer stable, minimal surfaces; expanding a public API is a deliberate contract change.
|
|
13
|
+
- Do not leak DTOs, database entities, or Compose UI types through `api` unless the repo already does so intentionally.
|
|
14
|
+
|
|
15
|
+
# Cross-feature access
|
|
16
|
+
|
|
17
|
+
- Consume another feature only via its `api` artifacts (Gradle dependency on the api module).
|
|
18
|
+
- Navigation between features uses launcher-style ports declared in `api` (`ui-and-accessibility/navigation`).
|
|
19
|
+
|
|
20
|
+
# Agent requirements
|
|
21
|
+
|
|
22
|
+
- When adding a symbol used outside the feature, place it in `api` and keep `impl` private.
|
|
23
|
+
- Breaking api changes need explicit AC / review — do not silently widen visibility.
|
|
24
|
+
|
|
25
|
+
# Versioning mindset
|
|
26
|
+
|
|
27
|
+
- Treat api module changes as consumer-facing even inside a monorepo.
|
|
28
|
+
- Prefer additive changes; renames/removals need migration notes in the task brief.
|
|
29
|
+
- Keep Gradle `api` vs `implementation` dependencies consistent with visibility intent.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- docs/specs/**/*
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- shared-core: architecture/product-specs-authoring.md -->
|
|
7
|
+
|
|
8
|
+
# Product specs authoring
|
|
9
|
+
|
|
10
|
+
Load when **Generate** or **Bootstrap** is requested (`/spec-start`, router `spec-gen`, brief AC, or analyst author mode). Discovery-only work stays on **`product-specs`**.
|
|
11
|
+
|
|
12
|
+
## Modes
|
|
13
|
+
|
|
14
|
+
1. **Consume** — default; never invent INDEX/specs (see `product-specs`).
|
|
15
|
+
2. **Generate** — create/update page/feature specs + INDEX rows from brief AC, user intent, Figma, or code archaeology. Inventing *product* behavior is forbidden without a stated source (AC / user / UI copy / code-observed behavior labeled `status: draft` or `inferred`).
|
|
16
|
+
3. **Bootstrap** — create `INDEX.md` + `_templates/` copies + first domain spec under greenfield policy.
|
|
17
|
+
|
|
18
|
+
## Greenfield policy
|
|
19
|
+
|
|
20
|
+
Agents **may** create INDEX + first specs **only when** one of:
|
|
21
|
+
|
|
22
|
+
1. User runs `/spec-start` or explicitly asks to bootstrap `docs/specs`.
|
|
23
|
+
2. Brief/AC includes generation or bootstrap language.
|
|
24
|
+
3. Router detects `spec-gen` intent.
|
|
25
|
+
|
|
26
|
+
Otherwise: missing INDEX → optional tree; do **not** invent INDEX merely because discovery loaded.
|
|
27
|
+
|
|
28
|
+
## Conflict precedence
|
|
29
|
+
|
|
30
|
+
1. **Human gate** decision (approved brief/spec edits).
|
|
31
|
+
2. **Current task `brief.md` AC** — if AC contradicts an existing spec, analyst must reconcile (update spec as `draft` or revise AC) before developer; no silent contradiction.
|
|
32
|
+
3. **Approved `docs/specs/**`** — behavior SoT for feature-developer once gate passed.
|
|
33
|
+
4. **Code / `.ai/context`** — discovery evidence only; never override approved spec without gate.
|
|
34
|
+
|
|
35
|
+
Label inferred-from-code lines with `status: draft` until human promotes.
|
|
36
|
+
|
|
37
|
+
## INDEX.md contract (v1)
|
|
38
|
+
|
|
39
|
+
| Column | Required | Notes |
|
|
40
|
+
|--------|----------|-------|
|
|
41
|
+
| `id` | yes | Stable kebab/id matching frontmatter `id` |
|
|
42
|
+
| `type` | yes | `page` \| `feature` |
|
|
43
|
+
| `domain` | yes | Domain folder under `docs/specs/domains/<domain>/` |
|
|
44
|
+
| `title` | yes | Human label |
|
|
45
|
+
| `path` | yes | Repo-relative path to markdown file |
|
|
46
|
+
| `routes` | no | Summary; may duplicate frontmatter |
|
|
47
|
+
| `aliases` | no | Comma-separated PageName / deep-link aliases |
|
|
48
|
+
| `status` | no | `draft` \| `active` \| `deprecated` |
|
|
49
|
+
|
|
50
|
+
Layout: `docs/specs/domains/<domain>/<id>.md` (page) and optional `docs/specs/domains/<domain>/feature.md`. Adding/renaming/removing a linked file **must** update INDEX in the **same change set**.
|
|
51
|
+
|
|
52
|
+
## Frontmatter v1
|
|
53
|
+
|
|
54
|
+
| Field | Type | Required | Notes |
|
|
55
|
+
|-------|------|----------|-------|
|
|
56
|
+
| `id` | string | yes | Unique; matches INDEX |
|
|
57
|
+
| `type` | enum `page` \| `feature` | yes | Backend/MCP: prefer `feature` |
|
|
58
|
+
| `domain` | string | yes | |
|
|
59
|
+
| `routes` | string[] | yes (may be `[]`) | Web: URL paths; mobile: deep links/screens; backend: HTTP paths; mcp-ts: tool names |
|
|
60
|
+
| `ui` | string[] | yes (may be `[]`) | Component/screen refs; empty on backend/mcp |
|
|
61
|
+
| `store` | string[] | yes (may be `[]`) | Slice/module refs; empty when N/A |
|
|
62
|
+
| `api` | string[] | yes (may be `[]`) | Services/ports/tools |
|
|
63
|
+
| `aliases` | string[] | yes (may be `[]`) | |
|
|
64
|
+
| `e2e` | string[] | yes (may be `[]`) | Stack-appropriate test paths |
|
|
65
|
+
| `status` | enum | no | default `draft` on agent generate |
|
|
66
|
+
| `owners` | string[] | no | |
|
|
67
|
+
| `related` | string[] | no | Spec ids or paths |
|
|
68
|
+
|
|
69
|
+
Arrays are **always present** (empty allowed). Do not omit keys for N/A stacks.
|
|
70
|
+
|
|
71
|
+
## Body headings (minimum)
|
|
72
|
+
|
|
73
|
+
**`page` required:** Overview; Entry / actors; Primary flows; States (loading / empty / error / success as applicable — mark N/A explicitly); Acceptance criteria (links or bullets to brief AC / product source).
|
|
74
|
+
|
|
75
|
+
**`page` optional:** Analytics, Accessibility, Edge cases, Related specs.
|
|
76
|
+
|
|
77
|
+
**`feature` required:** Overview; Shared behavior / constraints; Related pages (links).
|
|
78
|
+
|
|
79
|
+
**`feature` optional:** Cross-cutting states, Analytics.
|
|
80
|
+
|
|
81
|
+
Compliant = valid frontmatter + all required headings present (non-empty prose or explicit `N/A`) + INDEX row with resolvable `path`.
|
|
82
|
+
|
|
83
|
+
## Templates & assets
|
|
84
|
+
|
|
85
|
+
**Package SoT:** `packages/ai-rules/presets/_shared/assets/docs-specs/` (`INDEX.md` stub, `_templates/page.md`, `_templates/feature.md`; optional `schemas/frontmatter-v1.schema.json`).
|
|
86
|
+
|
|
87
|
+
**CLI `init`:** when consumer `docs/specs/` is **absent**, copy INDEX stub + `_templates/*` (idempotent; **never overwrite** existing INDEX). When the tree already exists, skip seed entirely.
|
|
88
|
+
|
|
89
|
+
**Skill fallback:** if consumer `_templates/` missing during author mode, copy from package/skill assets before authoring.
|
|
90
|
+
|
|
91
|
+
## Author roles
|
|
92
|
+
|
|
93
|
+
| Role | Responsibility |
|
|
94
|
+
|------|----------------|
|
|
95
|
+
| **task-analyst** | Primary author (Generate + Bootstrap); INDEX bootstrap; brief **Related specs** + **Spec gaps / generation requested**; loads this stem + skill `spec-authoring` |
|
|
96
|
+
| **tech-writer** | Post-delivery sync where present; never invent product behavior without AC/code source |
|
|
97
|
+
| **feature-developer** | Consumes approved specs as SoT; mechanical INDEX/frontmatter fixes only on renames |
|
|
98
|
+
| **mcp-ts** | No tech-writer — author + post-sync via **task-analyst** only |
|
|
99
|
+
|
|
100
|
+
## Self-check before handoff (soft block)
|
|
101
|
+
|
|
102
|
+
Block handoff via `open_questions` until fixed:
|
|
103
|
+
|
|
104
|
+
- [ ] Required frontmatter keys present; arrays always present (may be `[]`)
|
|
105
|
+
- [ ] Required body headings present (or explicit `N/A`)
|
|
106
|
+
- [ ] INDEX row added/updated with resolvable `path` in the **same change set**
|
|
107
|
+
- [ ] Sources cited; invented product behavior absent (or labeled `draft` / `inferred`)
|
|
108
|
+
- [ ] Conflict with brief AC reconciled or flagged
|
|
109
|
+
|
|
110
|
+
## Related
|
|
111
|
+
|
|
112
|
+
- `product-specs` — discovery / consume
|
|
113
|
+
- Skill `spec-authoring` — procedural checklist
|
|
114
|
+
- Optional consumer script `scripts/check-product-specs.sh` (WARN default; `--strict` FAIL)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## Stack notes
|
|
118
|
+
|
|
119
|
+
- Author via skill `spec-authoring`; templates from package assets / consumer `docs/specs/_templates/`.
|
|
120
|
+
- Field semantics match discovery stem (`routes` = deep links; `e2e` = instrumentation). **No** web Playwright / iOS XCUITest recipes.
|
|
121
|
+
- Requestable — not always-on / session-start.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- docs/specs/**/*
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- shared-core: architecture/product-specs.md -->
|
|
7
|
+
|
|
8
|
+
# Product specs (docs/specs)
|
|
9
|
+
|
|
10
|
+
Product page/feature **behavior** specs live under the consumer repo `docs/specs/**`. This stem covers **discovery and presence** — not layer implementation order (see `feature-delivery-workflow`) and not code-structure mirroring (see `reference-features`).
|
|
11
|
+
|
|
12
|
+
**Authoring** (Generate / Bootstrap modes, INDEX/frontmatter v1, body checklist, greenfield, conflict precedence) → load **`product-specs-authoring`** when generation is requested (`/spec-start`, brief AC, or router `spec-gen`).
|
|
13
|
+
|
|
14
|
+
## Modes (summary)
|
|
15
|
+
|
|
16
|
+
| Mode | When | Behavior |
|
|
17
|
+
|------|------|----------|
|
|
18
|
+
| **Consume** (default) | INDEX exists or globs hit `docs/specs/**` without generate intent | Discover via INDEX; soft-fail on miss; **never invent** INDEX/specs |
|
|
19
|
+
| **Generate** | Explicit generate intent / AC / `/spec-start` with existing tree | Create/update page/feature specs + INDEX from stated sources |
|
|
20
|
+
| **Bootstrap** | Explicit bootstrap / `/spec-start` when tree absent | Create INDEX + templates + first domain spec |
|
|
21
|
+
|
|
22
|
+
Greenfield: agents may create INDEX/specs **only** on explicit intent, AC, or `/spec-start`. Missing INDEX alone does **not** authorize inventing the tree.
|
|
23
|
+
|
|
24
|
+
## Presence policy
|
|
25
|
+
|
|
26
|
+
- If `docs/specs/INDEX.md` is **missing** → the tree is **optional** (greenfield OK for *consume*). Continue with code/brief discovery; do not invent an INDEX solely because this stem loaded.
|
|
27
|
+
- If INDEX **exists** → it is the **required discovery path** for work that touches a listed page, feature, route, or alias.
|
|
28
|
+
|
|
29
|
+
## Discovery algorithm
|
|
30
|
+
|
|
31
|
+
1. Always start at `docs/specs/INDEX.md` when present.
|
|
32
|
+
2. Resolve the entry by: route, stable `id`, PageName / alias, or domain folder.
|
|
33
|
+
3. Read the linked page spec (and optional domain `feature.md` when the INDEX or page Related links it).
|
|
34
|
+
|
|
35
|
+
## Miss policy (INDEX present, row or file missing)
|
|
36
|
+
|
|
37
|
+
- Record the gap in `open_questions` / handoff gaps.
|
|
38
|
+
- Fall back to code discovery and consumer `.ai/context/**` when present.
|
|
39
|
+
- **Do not invent** product behavior, states, interactions, or contracts.
|
|
40
|
+
- Hard-fail / block only when the task’s acceptance criteria explicitly require a named spec that is absent (human/gate decision).
|
|
41
|
+
|
|
42
|
+
## Authoring pointer
|
|
43
|
+
|
|
44
|
+
Same-changeset INDEX updates, frontmatter v1, required body headings, templates, and conflict precedence live in **`product-specs-authoring`**. Do not paste the full checklist here.
|
|
45
|
+
|
|
46
|
+
## Non-goals
|
|
47
|
+
|
|
48
|
+
- Not a replacement for `.ai/context/**` (external AI Code Review glossary) or `reference-features` (file-layout mirror).
|
|
49
|
+
- Not Tessl / an external host as primary SoT.
|
|
50
|
+
- No stack filesystem path recipes in this core body — path examples belong only in adapter **Stack notes**.
|
|
51
|
+
|
|
52
|
+
## Related
|
|
53
|
+
|
|
54
|
+
- `product-specs-authoring` — generation modes, contracts, self-check.
|
|
55
|
+
- `reference-features` — code structure mirror (how to layout files), not product behavior.
|
|
56
|
+
- Consumer `.ai/context/**` when present — review/domain glossary; cross-link, do not replace.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## Stack notes
|
|
60
|
+
|
|
61
|
+
- `routes`: deep links / screen ids. `ui` / `store`: feature presentation / ViewModel (`features/**` or `features/<name>/impl/**/presentation/`) — **not** web `app/src/ui` or iOS `Features/**`. `e2e`: instrumentation test paths.
|
|
62
|
+
- Requestable / `docs/specs/**` globs — not always-on / session-start.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Placeholder reference feature paths for Android multimodule repos
|
|
3
|
+
paths:
|
|
4
|
+
- "features/**"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Reference features (placeholders)
|
|
8
|
+
|
|
9
|
+
Use these **placeholder** paths when pointing agents at analogs. Replace with real module names in the consumer repo (and optionally document local names in `team/conventions.md`).
|
|
10
|
+
|
|
11
|
+
| Concern | Placeholder path |
|
|
12
|
+
|---------|------------------|
|
|
13
|
+
| App shell | `applications/<app>/` |
|
|
14
|
+
| Shared kernel | `core/` |
|
|
15
|
+
| Feature public API | `features/<name>/api/` |
|
|
16
|
+
| Feature implementation | `features/<name>/impl/` |
|
|
17
|
+
| DI holders | `features/<name>/impl/**/di/` |
|
|
18
|
+
| Presentation | `features/<name>/impl/**/presentation/` |
|
|
19
|
+
| Data | `features/<name>/impl/**/data/` |
|
|
20
|
+
| Convention plugins | `build-logic/` |
|
|
21
|
+
| Version catalog | `gradle/libs.versions.toml` |
|
|
22
|
+
| JVM tests | `**/src/test/**` |
|
|
23
|
+
| Instrumentation | `**/src/androidTest/**` |
|
|
24
|
+
|
|
25
|
+
# Agent requirements
|
|
26
|
+
|
|
27
|
+
- Copy patterns from the closest neighboring feature — do not invent a parallel layout.
|
|
28
|
+
- Never cite private consumer monorepo or vendor names in shared preset text.
|