@bonesofspring/ai-rules 0.2.12 → 0.2.14
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 +32 -0
- package/README.md +6 -2
- package/bin/cli.js +4 -0
- package/package.json +1 -1
- package/presets/_shared/README.md +1 -1
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +114 -0
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +64 -5
- package/presets/_shared/core/meta/preset-layering.md +1 -1
- package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +15 -1
- package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
- package/presets/_shared/core/meta/preset-twin-sync.md +4 -0
- package/presets/claude/go/agents/build-verifier.md +10 -3
- package/presets/claude/go/agents/code-reviewer.md +8 -1
- package/presets/claude/go/agents/feature-developer.md +8 -1
- package/presets/claude/go/agents/task-analyst.md +8 -1
- package/presets/claude/go/agents/task-router.md +33 -5
- package/presets/claude/go/commands/task.md +8 -6
- package/presets/claude/go/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/go/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/go/team/README.md +13 -2
- package/presets/claude/ios-swift/agents/build-verifier.md +10 -3
- package/presets/claude/ios-swift/agents/code-reviewer.md +9 -14
- package/presets/claude/ios-swift/agents/feature-developer.md +8 -1
- package/presets/claude/ios-swift/agents/task-analyst.md +8 -1
- package/presets/claude/ios-swift/agents/task-router.md +31 -3
- package/presets/claude/ios-swift/commands/task.md +8 -6
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +177 -54
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +33 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/ios-swift/team/README.md +13 -2
- package/presets/claude/java/agents/build-verifier.md +9 -2
- package/presets/claude/java/agents/code-reviewer.md +8 -1
- package/presets/claude/java/agents/feature-developer.md +8 -1
- package/presets/claude/java/agents/task-analyst.md +8 -1
- package/presets/claude/java/agents/task-router.md +31 -3
- package/presets/claude/java/commands/task.md +8 -6
- package/presets/claude/java/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/java/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/java/team/README.md +13 -2
- package/presets/claude/mcp-ts/agents/build-verifier.md +10 -3
- package/presets/claude/mcp-ts/agents/feature-developer.md +7 -1
- package/presets/claude/mcp-ts/agents/task-analyst.md +8 -1
- package/presets/claude/mcp-ts/agents/task-router.md +33 -5
- package/presets/claude/mcp-ts/commands/task.md +8 -6
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +181 -39
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/mcp-ts/team/README.md +13 -2
- package/presets/claude/next/agents/accessibility-reviewer.md +6 -12
- package/presets/claude/next/agents/api-contract-reviewer.md +6 -12
- package/presets/claude/next/agents/build-verifier.md +10 -14
- package/presets/claude/next/agents/ci-investigator.md +7 -13
- package/presets/claude/next/agents/code-reviewer.md +9 -14
- package/presets/claude/next/agents/debugger.md +6 -12
- package/presets/claude/next/agents/feature-developer.md +8 -1
- package/presets/claude/next/agents/migration-specialist.md +6 -12
- package/presets/claude/next/agents/performance-auditor.md +5 -11
- package/presets/claude/next/agents/qa-tester.md +6 -12
- package/presets/claude/next/agents/security-reviewer.md +6 -12
- package/presets/claude/next/agents/solution-architect.md +6 -12
- package/presets/claude/next/agents/task-analyst.md +10 -16
- package/presets/claude/next/agents/task-router.md +31 -3
- package/presets/claude/next/agents/tech-writer.md +6 -13
- package/presets/claude/next/agents/unit-test-generator.md +6 -10
- package/presets/claude/next/agents/unit-test-healer.md +6 -10
- package/presets/claude/next/agents/unit-test-planner.md +5 -11
- package/presets/claude/next/commands/task.md +8 -6
- package/presets/claude/next/hooks/chain-team-phases.sh +197 -54
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +29 -4
- package/presets/claude/next/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/next/team/README.md +15 -3
- package/presets/claude/next/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/claude/next/team/fixtures/bugfix-standard.json +10 -0
- package/presets/claude/next/team/fixtures/feature-full.json +10 -0
- package/presets/claude/next/team/fixtures/feature-light.json +10 -0
- package/presets/claude/nuxt/CLAUDE.md +39 -0
- package/presets/claude/nuxt/MCP.md +16 -0
- package/presets/claude/nuxt/README.md +39 -0
- package/presets/claude/nuxt/REPO_AGENTS.md +49 -0
- package/presets/claude/nuxt/agents/README.md +199 -0
- package/presets/claude/nuxt/agents/accessibility-reviewer.md +59 -0
- package/presets/claude/nuxt/agents/api-contract-reviewer.md +63 -0
- package/presets/claude/nuxt/agents/build-verifier.md +89 -0
- package/presets/claude/nuxt/agents/ci-investigator.md +60 -0
- package/presets/claude/nuxt/agents/code-reviewer.md +62 -0
- package/presets/claude/nuxt/agents/codebase-analyzer.md +28 -0
- package/presets/claude/nuxt/agents/debugger.md +65 -0
- package/presets/claude/nuxt/agents/feature-developer.md +59 -0
- package/presets/claude/nuxt/agents/migration-specialist.md +67 -0
- package/presets/claude/nuxt/agents/performance-auditor.md +66 -0
- package/presets/claude/nuxt/agents/playwright-test-generator.md +75 -0
- package/presets/claude/nuxt/agents/playwright-test-healer.md +61 -0
- package/presets/claude/nuxt/agents/playwright-test-planner.md +67 -0
- package/presets/claude/nuxt/agents/qa-tester.md +54 -0
- package/presets/claude/nuxt/agents/security-reviewer.md +60 -0
- package/presets/claude/nuxt/agents/solution-architect.md +68 -0
- package/presets/claude/nuxt/agents/task-analyst.md +109 -0
- package/presets/claude/nuxt/agents/task-router.md +140 -0
- package/presets/claude/nuxt/agents/tech-writer.md +54 -0
- package/presets/claude/nuxt/agents/unit-test-generator.md +37 -0
- package/presets/claude/nuxt/agents/unit-test-healer.md +38 -0
- package/presets/claude/nuxt/agents/unit-test-planner.md +60 -0
- package/presets/claude/nuxt/commands/README.md +13 -0
- package/presets/claude/nuxt/commands/feature-continue.md +51 -0
- package/presets/claude/nuxt/commands/feature-start.md +30 -0
- package/presets/claude/nuxt/commands/task-continue.md +50 -0
- package/presets/claude/nuxt/commands/task.md +56 -0
- package/presets/claude/nuxt/commands/technical-retro.md +62 -0
- package/presets/claude/nuxt/hooks/README.md +14 -0
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +723 -0
- package/presets/claude/nuxt/hooks/examples/README.md +18 -0
- package/presets/claude/nuxt/hooks/examples/format-edited.example.sh +11 -0
- package/presets/claude/nuxt/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/nuxt/hooks/examples/test-on-save.example.sh +8 -0
- package/presets/claude/nuxt/hooks/guard-shell-command.sh +77 -0
- package/presets/claude/nuxt/mcp.json +20 -0
- package/presets/claude/nuxt/rules/README.md +90 -0
- package/presets/claude/nuxt/rules/anti-hallucination/vue-nuxt-anti-hallucination.md +72 -0
- package/presets/claude/nuxt/rules/api-and-data/README.md +9 -0
- package/presets/claude/nuxt/rules/api-and-data/api-services.md +76 -0
- package/presets/claude/nuxt/rules/api-and-data/http-client.md +16 -0
- package/presets/claude/nuxt/rules/api-and-data/store-pinia.md +67 -0
- package/presets/claude/nuxt/rules/architecture/README.md +12 -0
- package/presets/claude/nuxt/rules/architecture/architecture-boundaries-ui.md +15 -0
- package/presets/claude/nuxt/rules/architecture/architecture-boundaries.md +98 -0
- package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +88 -0
- package/presets/claude/nuxt/rules/architecture/layer-barrel-exports.md +71 -0
- package/presets/claude/nuxt/rules/architecture/public-imports.md +60 -0
- package/presets/claude/nuxt/rules/architecture/reference-features.md +49 -0
- package/presets/claude/nuxt/rules/stack/README.md +12 -0
- package/presets/claude/nuxt/rules/stack/navigation-router-ui.md +14 -0
- package/presets/claude/nuxt/rules/stack/navigation-router.md +59 -0
- package/presets/claude/nuxt/rules/stack/no-type-assertion.md +61 -0
- package/presets/claude/nuxt/rules/stack/nuxt-app-core.md +43 -0
- package/presets/claude/nuxt/rules/stack/nuxt-pages-routing.md +39 -0
- package/presets/claude/nuxt/rules/stack/script-setup-conventions.md +12 -0
- package/presets/claude/nuxt/rules/stack/types-jsdoc.md +40 -0
- package/presets/claude/nuxt/rules/testing/README.md +11 -0
- package/presets/claude/nuxt/rules/testing/playwright-agents.md +78 -0
- package/presets/claude/nuxt/rules/testing/tests-e2e-structure.md +49 -0
- package/presets/claude/nuxt/rules/testing/tests-unit.md +75 -0
- package/presets/claude/nuxt/rules/tooling-and-review/README.md +15 -0
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +15 -0
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +191 -0
- package/presets/claude/nuxt/rules/tooling-and-review/anti-sycophancy-discipline.md +33 -0
- package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +49 -0
- package/presets/claude/nuxt/rules/tooling-and-review/code-review-mr.md +63 -0
- package/presets/claude/nuxt/rules/tooling-and-review/design-guidance.md +114 -0
- package/presets/claude/nuxt/rules/tooling-and-review/package-manager.md +16 -0
- package/presets/claude/nuxt/rules/tooling-and-review/post-change-lint.md +43 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +32 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +79 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +35 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-token-budget.md +39 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +50 -0
- package/presets/claude/nuxt/rules/tooling-and-review/security-nuxt.md +37 -0
- package/presets/claude/nuxt/rules/tooling-and-review/technical-retro.md +15 -0
- package/presets/claude/nuxt/rules/ui-and-accessibility/README.md +12 -0
- package/presets/claude/nuxt/rules/ui-and-accessibility/css-property-order.md +11 -0
- package/presets/claude/nuxt/rules/ui-and-accessibility/no-v-bind-spread.md +12 -0
- package/presets/claude/nuxt/rules/ui-and-accessibility/vue-a11y-coding.md +16 -0
- package/presets/claude/nuxt/rules/ui-and-accessibility/vue-ui.md +34 -0
- package/presets/claude/nuxt/skills/README.md +17 -0
- package/presets/claude/nuxt/skills/ci-investigation/SKILL.md +36 -0
- package/presets/claude/nuxt/skills/code-review/SKILL.md +38 -0
- package/presets/claude/nuxt/skills/debug-investigation/SKILL.md +32 -0
- package/presets/claude/nuxt/skills/feature-delivery/SKILL.md +34 -0
- package/presets/claude/nuxt/skills/playwright-e2e/SKILL.md +37 -0
- package/presets/claude/nuxt/skills/technical-retro/SKILL.md +54 -0
- package/presets/claude/nuxt/skills/unit-testing/SKILL.md +32 -0
- package/presets/claude/nuxt/skills/vue-performance/SKILL.md +53 -0
- package/presets/claude/nuxt/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/nuxt/team/README.md +136 -0
- package/presets/claude/nuxt/team/conventions.md +21 -0
- package/presets/claude/nuxt/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/claude/nuxt/team/fixtures/bugfix-standard.json +25 -0
- package/presets/claude/nuxt/team/fixtures/feature-full.json +28 -0
- package/presets/claude/nuxt/team/fixtures/feature-light.json +27 -0
- package/presets/claude/nuxt/team/tasks/.gitkeep +1 -0
- package/presets/claude/php-hexagonal/agents/build-verifier.md +10 -3
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +8 -1
- package/presets/claude/php-hexagonal/agents/feature-developer.md +8 -1
- package/presets/claude/php-hexagonal/agents/task-analyst.md +8 -1
- package/presets/claude/php-hexagonal/agents/task-router.md +31 -3
- package/presets/claude/php-hexagonal/commands/task.md +8 -6
- package/presets/claude/php-hexagonal/hooks/README.md +1 -1
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/php-hexagonal/team/README.md +13 -2
- package/presets/claude/php-laravel/agents/build-verifier.md +10 -3
- package/presets/claude/php-laravel/agents/code-reviewer.md +8 -1
- package/presets/claude/php-laravel/agents/feature-developer.md +8 -1
- package/presets/claude/php-laravel/agents/task-analyst.md +8 -1
- package/presets/claude/php-laravel/agents/task-router.md +31 -3
- package/presets/claude/php-laravel/commands/task.md +8 -6
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/php-laravel/team/README.md +13 -2
- package/presets/claude/svelte/CLAUDE.md +39 -0
- package/presets/claude/svelte/MCP.md +16 -0
- package/presets/claude/svelte/README.md +13 -0
- package/presets/claude/svelte/REPO_AGENTS.md +49 -0
- package/presets/claude/svelte/agents/README.md +199 -0
- package/presets/claude/svelte/agents/accessibility-reviewer.md +59 -0
- package/presets/claude/svelte/agents/api-contract-reviewer.md +63 -0
- package/presets/claude/svelte/agents/build-verifier.md +89 -0
- package/presets/claude/svelte/agents/ci-investigator.md +60 -0
- package/presets/claude/svelte/agents/code-reviewer.md +62 -0
- package/presets/claude/svelte/agents/codebase-analyzer.md +28 -0
- package/presets/claude/svelte/agents/debugger.md +65 -0
- package/presets/claude/svelte/agents/feature-developer.md +59 -0
- package/presets/claude/svelte/agents/migration-specialist.md +67 -0
- package/presets/claude/svelte/agents/performance-auditor.md +66 -0
- package/presets/claude/svelte/agents/playwright-test-generator.md +75 -0
- package/presets/claude/svelte/agents/playwright-test-healer.md +61 -0
- package/presets/claude/svelte/agents/playwright-test-planner.md +67 -0
- package/presets/claude/svelte/agents/qa-tester.md +54 -0
- package/presets/claude/svelte/agents/security-reviewer.md +60 -0
- package/presets/claude/svelte/agents/solution-architect.md +68 -0
- package/presets/claude/svelte/agents/task-analyst.md +109 -0
- package/presets/claude/svelte/agents/task-router.md +140 -0
- package/presets/claude/svelte/agents/tech-writer.md +54 -0
- package/presets/claude/svelte/agents/unit-test-generator.md +37 -0
- package/presets/claude/svelte/agents/unit-test-healer.md +38 -0
- package/presets/claude/svelte/agents/unit-test-planner.md +60 -0
- package/presets/claude/svelte/commands/README.md +13 -0
- package/presets/claude/svelte/commands/feature-continue.md +51 -0
- package/presets/claude/svelte/commands/feature-start.md +30 -0
- package/presets/claude/svelte/commands/task-continue.md +50 -0
- package/presets/claude/svelte/commands/task.md +56 -0
- package/presets/claude/svelte/commands/technical-retro.md +62 -0
- package/presets/claude/svelte/hooks/README.md +14 -0
- package/presets/claude/svelte/hooks/chain-team-phases.sh +723 -0
- package/presets/claude/svelte/hooks/examples/README.md +18 -0
- package/presets/claude/svelte/hooks/examples/format-edited.example.sh +13 -0
- package/presets/claude/svelte/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/svelte/hooks/examples/test-on-save.example.sh +14 -0
- package/presets/claude/svelte/hooks/guard-shell-command.sh +77 -0
- package/presets/claude/svelte/mcp.json +20 -0
- package/presets/claude/svelte/rules/README.md +90 -0
- package/presets/claude/svelte/rules/anti-hallucination/svelte-sveltekit-anti-hallucination.md +71 -0
- package/presets/claude/svelte/rules/api-and-data/README.md +9 -0
- package/presets/claude/svelte/rules/api-and-data/api-services.md +45 -0
- package/presets/claude/svelte/rules/api-and-data/http-client.md +17 -0
- package/presets/claude/svelte/rules/api-and-data/store-svelte.md +67 -0
- package/presets/claude/svelte/rules/architecture/README.md +12 -0
- package/presets/claude/svelte/rules/architecture/architecture-boundaries-ui.md +16 -0
- package/presets/claude/svelte/rules/architecture/architecture-boundaries.md +65 -0
- package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +61 -0
- package/presets/claude/svelte/rules/architecture/layer-barrel-exports.md +73 -0
- package/presets/claude/svelte/rules/architecture/public-imports.md +43 -0
- package/presets/claude/svelte/rules/architecture/reference-features.md +50 -0
- package/presets/claude/svelte/rules/stack/README.md +12 -0
- package/presets/claude/svelte/rules/stack/navigation-router-ui.md +26 -0
- package/presets/claude/svelte/rules/stack/navigation-router.md +41 -0
- package/presets/claude/svelte/rules/stack/no-type-assertion.md +59 -0
- package/presets/claude/svelte/rules/stack/svelte-app-core.md +44 -0
- package/presets/claude/svelte/rules/stack/svelte-script-conventions.md +33 -0
- package/presets/claude/svelte/rules/stack/sveltekit-routing.md +40 -0
- package/presets/claude/svelte/rules/stack/types-jsdoc.md +42 -0
- package/presets/claude/svelte/rules/testing/README.md +11 -0
- package/presets/claude/svelte/rules/testing/playwright-agents.md +80 -0
- package/presets/claude/svelte/rules/testing/tests-e2e-structure.md +51 -0
- package/presets/claude/svelte/rules/testing/tests-unit.md +40 -0
- package/presets/claude/svelte/rules/tooling-and-review/README.md +15 -0
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +17 -0
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +193 -0
- package/presets/claude/svelte/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
- package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +50 -0
- package/presets/claude/svelte/rules/tooling-and-review/code-review-mr.md +64 -0
- package/presets/claude/svelte/rules/tooling-and-review/design-guidance.md +110 -0
- package/presets/claude/svelte/rules/tooling-and-review/package-manager.md +17 -0
- package/presets/claude/svelte/rules/tooling-and-review/post-change-lint.md +44 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +36 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +83 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +39 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-token-budget.md +41 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +54 -0
- package/presets/claude/svelte/rules/tooling-and-review/security-sveltekit.md +41 -0
- package/presets/claude/svelte/rules/tooling-and-review/technical-retro.md +17 -0
- package/presets/claude/svelte/rules/ui-and-accessibility/README.md +12 -0
- package/presets/claude/svelte/rules/ui-and-accessibility/css-property-order.md +12 -0
- package/presets/claude/svelte/rules/ui-and-accessibility/no-rest-props-spread.md +32 -0
- package/presets/claude/svelte/rules/ui-and-accessibility/svelte-a11y-coding.md +28 -0
- package/presets/claude/svelte/rules/ui-and-accessibility/svelte-ui.md +38 -0
- package/presets/claude/svelte/skills/README.md +17 -0
- package/presets/claude/svelte/skills/ci-investigation/SKILL.md +36 -0
- package/presets/claude/svelte/skills/code-review/SKILL.md +38 -0
- package/presets/claude/svelte/skills/debug-investigation/SKILL.md +32 -0
- package/presets/claude/svelte/skills/feature-delivery/SKILL.md +34 -0
- package/presets/claude/svelte/skills/playwright-e2e/SKILL.md +37 -0
- package/presets/claude/svelte/skills/svelte-performance/SKILL.md +52 -0
- package/presets/claude/svelte/skills/technical-retro/SKILL.md +54 -0
- package/presets/claude/svelte/skills/unit-testing/SKILL.md +32 -0
- package/presets/claude/svelte/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/svelte/team/README.md +136 -0
- package/presets/claude/svelte/team/conventions.md +21 -0
- package/presets/claude/svelte/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/claude/svelte/team/fixtures/bugfix-standard.json +25 -0
- package/presets/claude/svelte/team/fixtures/feature-full.json +28 -0
- package/presets/claude/svelte/team/fixtures/feature-light.json +27 -0
- package/presets/claude/svelte/team/tasks/.gitkeep +1 -0
- package/presets/cursor/go/agents/build-verifier.md +9 -2
- package/presets/cursor/go/agents/code-reviewer.md +8 -1
- package/presets/cursor/go/agents/feature-developer.md +8 -1
- package/presets/cursor/go/agents/task-analyst.md +8 -1
- package/presets/cursor/go/agents/task-router.md +31 -3
- package/presets/cursor/go/commands/task.md +8 -6
- package/presets/cursor/go/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/go/rules/preset-layering.mdc +2 -1
- package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/go/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/go/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/go/team/README.md +13 -2
- package/presets/cursor/ios-swift/agents/build-verifier.md +10 -3
- package/presets/cursor/ios-swift/agents/code-reviewer.md +9 -14
- package/presets/cursor/ios-swift/agents/feature-developer.md +8 -1
- package/presets/cursor/ios-swift/agents/task-analyst.md +8 -1
- package/presets/cursor/ios-swift/agents/task-router.md +31 -3
- package/presets/cursor/ios-swift/commands/task.md +8 -6
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +195 -54
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +23 -2
- package/presets/cursor/ios-swift/rules/preset-layering.mdc +2 -1
- package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/ios-swift/team/README.md +13 -2
- package/presets/cursor/java/agents/build-verifier.md +9 -2
- package/presets/cursor/java/agents/code-reviewer.md +8 -1
- package/presets/cursor/java/agents/feature-developer.md +8 -1
- package/presets/cursor/java/agents/task-analyst.md +8 -1
- package/presets/cursor/java/agents/task-router.md +31 -3
- package/presets/cursor/java/commands/task.md +8 -6
- package/presets/cursor/java/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/java/rules/preset-layering.mdc +2 -1
- package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/java/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/java/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/java/team/README.md +13 -2
- package/presets/cursor/mcp-ts/agents/build-verifier.md +9 -2
- package/presets/cursor/mcp-ts/agents/feature-developer.md +7 -1
- package/presets/cursor/mcp-ts/agents/task-analyst.md +8 -1
- package/presets/cursor/mcp-ts/agents/task-router.md +31 -3
- package/presets/cursor/mcp-ts/commands/task.md +8 -6
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +181 -39
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/mcp-ts/rules/preset-layering.mdc +2 -1
- package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/mcp-ts/team/README.md +13 -2
- package/presets/cursor/next/agents/accessibility-reviewer.md +7 -14
- package/presets/cursor/next/agents/api-contract-reviewer.md +7 -14
- package/presets/cursor/next/agents/build-verifier.md +10 -15
- package/presets/cursor/next/agents/ci-investigator.md +7 -14
- package/presets/cursor/next/agents/code-reviewer.md +9 -14
- package/presets/cursor/next/agents/debugger.md +6 -12
- package/presets/cursor/next/agents/feature-developer.md +8 -1
- package/presets/cursor/next/agents/migration-specialist.md +7 -14
- package/presets/cursor/next/agents/performance-auditor.md +6 -13
- package/presets/cursor/next/agents/qa-tester.md +6 -13
- package/presets/cursor/next/agents/security-reviewer.md +7 -14
- package/presets/cursor/next/agents/solution-architect.md +6 -12
- package/presets/cursor/next/agents/task-analyst.md +10 -16
- package/presets/cursor/next/agents/task-router.md +31 -3
- package/presets/cursor/next/agents/tech-writer.md +6 -13
- package/presets/cursor/next/agents/unit-test-generator.md +6 -11
- package/presets/cursor/next/agents/unit-test-healer.md +6 -11
- package/presets/cursor/next/agents/unit-test-planner.md +6 -13
- package/presets/cursor/next/commands/task.md +8 -6
- package/presets/cursor/next/hooks/chain-team-phases.sh +197 -54
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/next/rules/preset-layering.mdc +2 -1
- package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/next/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/next/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/next/team/README.md +16 -4
- package/presets/cursor/next/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/cursor/next/team/fixtures/bugfix-standard.json +10 -0
- package/presets/cursor/next/team/fixtures/feature-full.json +10 -0
- package/presets/cursor/next/team/fixtures/feature-light.json +10 -0
- package/presets/cursor/nuxt/AGENTS.md +39 -0
- package/presets/cursor/nuxt/BUGBOT.md +14 -0
- package/presets/cursor/nuxt/MCP.md +16 -0
- package/presets/cursor/nuxt/README.md +47 -0
- package/presets/cursor/nuxt/REPO_AGENTS.md +49 -0
- package/presets/cursor/nuxt/agents/README.md +206 -0
- package/presets/cursor/nuxt/agents/accessibility-reviewer.md +60 -0
- package/presets/cursor/nuxt/agents/api-contract-reviewer.md +64 -0
- package/presets/cursor/nuxt/agents/build-verifier.md +90 -0
- package/presets/cursor/nuxt/agents/ci-investigator.md +61 -0
- package/presets/cursor/nuxt/agents/code-reviewer.md +63 -0
- package/presets/cursor/nuxt/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/nuxt/agents/debugger.md +66 -0
- package/presets/cursor/nuxt/agents/feature-developer.md +60 -0
- package/presets/cursor/nuxt/agents/migration-specialist.md +68 -0
- package/presets/cursor/nuxt/agents/performance-auditor.md +67 -0
- package/presets/cursor/nuxt/agents/playwright-test-generator.md +27 -0
- package/presets/cursor/nuxt/agents/playwright-test-healer.md +27 -0
- package/presets/cursor/nuxt/agents/playwright-test-planner.md +28 -0
- package/presets/cursor/nuxt/agents/qa-tester.md +55 -0
- package/presets/cursor/nuxt/agents/security-reviewer.md +61 -0
- package/presets/cursor/nuxt/agents/solution-architect.md +69 -0
- package/presets/cursor/nuxt/agents/task-analyst.md +110 -0
- package/presets/cursor/nuxt/agents/task-router.md +141 -0
- package/presets/cursor/nuxt/agents/tech-writer.md +55 -0
- package/presets/cursor/nuxt/agents/unit-test-generator.md +38 -0
- package/presets/cursor/nuxt/agents/unit-test-healer.md +39 -0
- package/presets/cursor/nuxt/agents/unit-test-planner.md +61 -0
- package/presets/cursor/nuxt/commands/README.md +51 -0
- package/presets/cursor/nuxt/commands/feature-continue.md +19 -0
- package/presets/cursor/nuxt/commands/feature-start.md +33 -0
- package/presets/cursor/nuxt/commands/task-continue.md +50 -0
- package/presets/cursor/nuxt/commands/task.md +56 -0
- package/presets/cursor/nuxt/commands/technical-retro.md +85 -0
- package/presets/cursor/nuxt/hooks/README.md +12 -0
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +727 -0
- package/presets/cursor/nuxt/hooks/examples/README.md +18 -0
- package/presets/cursor/nuxt/hooks/examples/format-edited.example.sh +11 -0
- package/presets/cursor/nuxt/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/nuxt/hooks/examples/test-on-save.example.sh +8 -0
- package/presets/cursor/nuxt/hooks/guard-shell-command.sh +77 -0
- package/presets/cursor/nuxt/hooks.json +17 -0
- package/presets/cursor/nuxt/mcp.json +19 -0
- package/presets/cursor/nuxt/rules/README.md +108 -0
- package/presets/cursor/nuxt/rules/agent-team-intake.mdc +16 -0
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +192 -0
- package/presets/cursor/nuxt/rules/anti-sycophancy-discipline.mdc +30 -0
- package/presets/cursor/nuxt/rules/api-services.mdc +79 -0
- package/presets/cursor/nuxt/rules/architecture-boundaries-ui.mdc +15 -0
- package/presets/cursor/nuxt/rules/architecture-boundaries.mdc +97 -0
- package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +51 -0
- package/presets/cursor/nuxt/rules/code-review-mr.mdc +58 -0
- package/presets/cursor/nuxt/rules/css-property-order-stylelint.mdc +12 -0
- package/presets/cursor/nuxt/rules/design-guidance.mdc +111 -0
- package/presets/cursor/nuxt/rules/feature-delivery-workflow.mdc +83 -0
- package/presets/cursor/nuxt/rules/http-client.mdc +15 -0
- package/presets/cursor/nuxt/rules/layer-barrel-exports.mdc +74 -0
- package/presets/cursor/nuxt/rules/navigation-router-stack.mdc +61 -0
- package/presets/cursor/nuxt/rules/navigation-router-ui.mdc +16 -0
- package/presets/cursor/nuxt/rules/no-type-assertion-as-import-export.mdc +60 -0
- package/presets/cursor/nuxt/rules/no-v-bind-spread.mdc +13 -0
- package/presets/cursor/nuxt/rules/nuxt-app-core.mdc +45 -0
- package/presets/cursor/nuxt/rules/nuxt-pages-routing.mdc +37 -0
- package/presets/cursor/nuxt/rules/package-manager.mdc +18 -0
- package/presets/cursor/nuxt/rules/playwright-agents.mdc +80 -0
- package/presets/cursor/nuxt/rules/post-change-lint.mdc +42 -0
- package/presets/cursor/nuxt/rules/preset-layering.mdc +37 -0
- package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +84 -0
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +40 -0
- package/presets/cursor/nuxt/rules/preset-token-budget.mdc +42 -0
- package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +55 -0
- package/presets/cursor/nuxt/rules/public-imports.mdc +62 -0
- package/presets/cursor/nuxt/rules/reference-features.mdc +49 -0
- package/presets/cursor/nuxt/rules/script-setup-conventions.mdc +13 -0
- package/presets/cursor/nuxt/rules/security-nuxt.mdc +34 -0
- package/presets/cursor/nuxt/rules/store-pinia.mdc +68 -0
- package/presets/cursor/nuxt/rules/technical-retro.mdc +16 -0
- package/presets/cursor/nuxt/rules/tests-e2e-structure.mdc +51 -0
- package/presets/cursor/nuxt/rules/tests-unit.mdc +78 -0
- package/presets/cursor/nuxt/rules/types-jsdoc.mdc +42 -0
- package/presets/cursor/nuxt/rules/vue-a11y-coding.mdc +15 -0
- package/presets/cursor/nuxt/rules/vue-nuxt-anti-hallucination.mdc +68 -0
- package/presets/cursor/nuxt/rules/vue-ui.mdc +33 -0
- package/presets/cursor/nuxt/skills/README.md +17 -0
- package/presets/cursor/nuxt/skills/ci-investigation/SKILL.md +36 -0
- package/presets/cursor/nuxt/skills/code-review/SKILL.md +38 -0
- package/presets/cursor/nuxt/skills/debug-investigation/SKILL.md +32 -0
- package/presets/cursor/nuxt/skills/feature-delivery/SKILL.md +34 -0
- package/presets/cursor/nuxt/skills/playwright-e2e/SKILL.md +37 -0
- package/presets/cursor/nuxt/skills/technical-retro/SKILL.md +54 -0
- package/presets/cursor/nuxt/skills/unit-testing/SKILL.md +32 -0
- package/presets/cursor/nuxt/skills/vue-performance/SKILL.md +53 -0
- package/presets/cursor/nuxt/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/nuxt/team/README.md +140 -0
- package/presets/cursor/nuxt/team/conventions.md +21 -0
- package/presets/cursor/nuxt/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/cursor/nuxt/team/fixtures/bugfix-standard.json +25 -0
- package/presets/cursor/nuxt/team/fixtures/feature-full.json +28 -0
- package/presets/cursor/nuxt/team/fixtures/feature-light.json +27 -0
- package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
- package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
- package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
- package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
- package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
- package/presets/cursor/nuxt/team/fixtures/metrics.example.json +54 -0
- package/presets/cursor/nuxt/team/tasks/.gitkeep +0 -0
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +9 -2
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +8 -1
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +8 -1
- package/presets/cursor/php-hexagonal/agents/task-analyst.md +8 -1
- package/presets/cursor/php-hexagonal/agents/task-router.md +31 -3
- package/presets/cursor/php-hexagonal/commands/task.md +8 -6
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +2 -1
- package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/php-hexagonal/team/README.md +13 -2
- package/presets/cursor/php-laravel/agents/build-verifier.md +9 -2
- package/presets/cursor/php-laravel/agents/code-reviewer.md +8 -1
- package/presets/cursor/php-laravel/agents/feature-developer.md +8 -1
- package/presets/cursor/php-laravel/agents/task-analyst.md +8 -1
- package/presets/cursor/php-laravel/agents/task-router.md +31 -3
- package/presets/cursor/php-laravel/commands/task.md +8 -6
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/php-laravel/rules/preset-layering.mdc +2 -1
- package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/php-laravel/team/README.md +13 -2
- package/presets/cursor/svelte/AGENTS.md +39 -0
- package/presets/cursor/svelte/BUGBOT.md +14 -0
- package/presets/cursor/svelte/MCP.md +16 -0
- package/presets/cursor/svelte/README.md +47 -0
- package/presets/cursor/svelte/REPO_AGENTS.md +49 -0
- package/presets/cursor/svelte/agents/README.md +206 -0
- package/presets/cursor/svelte/agents/accessibility-reviewer.md +60 -0
- package/presets/cursor/svelte/agents/api-contract-reviewer.md +64 -0
- package/presets/cursor/svelte/agents/build-verifier.md +90 -0
- package/presets/cursor/svelte/agents/ci-investigator.md +61 -0
- package/presets/cursor/svelte/agents/code-reviewer.md +63 -0
- package/presets/cursor/svelte/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/svelte/agents/debugger.md +66 -0
- package/presets/cursor/svelte/agents/feature-developer.md +60 -0
- package/presets/cursor/svelte/agents/migration-specialist.md +68 -0
- package/presets/cursor/svelte/agents/performance-auditor.md +67 -0
- package/presets/cursor/svelte/agents/playwright-test-generator.md +27 -0
- package/presets/cursor/svelte/agents/playwright-test-healer.md +27 -0
- package/presets/cursor/svelte/agents/playwright-test-planner.md +28 -0
- package/presets/cursor/svelte/agents/qa-tester.md +55 -0
- package/presets/cursor/svelte/agents/security-reviewer.md +61 -0
- package/presets/cursor/svelte/agents/solution-architect.md +69 -0
- package/presets/cursor/svelte/agents/task-analyst.md +110 -0
- package/presets/cursor/svelte/agents/task-router.md +141 -0
- package/presets/cursor/svelte/agents/tech-writer.md +55 -0
- package/presets/cursor/svelte/agents/unit-test-generator.md +38 -0
- package/presets/cursor/svelte/agents/unit-test-healer.md +39 -0
- package/presets/cursor/svelte/agents/unit-test-planner.md +61 -0
- package/presets/cursor/svelte/commands/README.md +51 -0
- package/presets/cursor/svelte/commands/feature-continue.md +19 -0
- package/presets/cursor/svelte/commands/feature-start.md +33 -0
- package/presets/cursor/svelte/commands/task-continue.md +50 -0
- package/presets/cursor/svelte/commands/task.md +56 -0
- package/presets/cursor/svelte/commands/technical-retro.md +85 -0
- package/presets/cursor/svelte/hooks/README.md +12 -0
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +727 -0
- package/presets/cursor/svelte/hooks/examples/README.md +18 -0
- package/presets/cursor/svelte/hooks/examples/format-edited.example.sh +13 -0
- package/presets/cursor/svelte/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/svelte/hooks/examples/test-on-save.example.sh +14 -0
- package/presets/cursor/svelte/hooks/guard-shell-command.sh +77 -0
- package/presets/cursor/svelte/hooks.json +17 -0
- package/presets/cursor/svelte/mcp.json +19 -0
- package/presets/cursor/svelte/rules/README.md +86 -0
- package/presets/cursor/svelte/rules/agent-team-intake.mdc +16 -0
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +192 -0
- package/presets/cursor/svelte/rules/anti-sycophancy-discipline.mdc +30 -0
- package/presets/cursor/svelte/rules/api-services.mdc +46 -0
- package/presets/cursor/svelte/rules/architecture-boundaries-ui.mdc +15 -0
- package/presets/cursor/svelte/rules/architecture-boundaries.mdc +61 -0
- package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +51 -0
- package/presets/cursor/svelte/rules/code-review-mr.mdc +58 -0
- package/presets/cursor/svelte/rules/css-property-order-stylelint.mdc +12 -0
- package/presets/cursor/svelte/rules/design-guidance.mdc +111 -0
- package/presets/cursor/svelte/rules/feature-delivery-workflow.mdc +55 -0
- package/presets/cursor/svelte/rules/http-client.mdc +16 -0
- package/presets/cursor/svelte/rules/layer-barrel-exports.mdc +74 -0
- package/presets/cursor/svelte/rules/navigation-router-stack.mdc +40 -0
- package/presets/cursor/svelte/rules/navigation-router-ui.mdc +25 -0
- package/presets/cursor/svelte/rules/no-rest-props-spread.mdc +32 -0
- package/presets/cursor/svelte/rules/no-type-assertion-as-import-export.mdc +60 -0
- package/presets/cursor/svelte/rules/package-manager.mdc +18 -0
- package/presets/cursor/svelte/rules/playwright-agents.mdc +80 -0
- package/presets/cursor/svelte/rules/post-change-lint.mdc +42 -0
- package/presets/cursor/svelte/rules/preset-layering.mdc +37 -0
- package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +84 -0
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +40 -0
- package/presets/cursor/svelte/rules/preset-token-budget.mdc +42 -0
- package/presets/cursor/svelte/rules/preset-twin-sync.mdc +55 -0
- package/presets/cursor/svelte/rules/public-imports.mdc +45 -0
- package/presets/cursor/svelte/rules/reference-features.mdc +51 -0
- package/presets/cursor/svelte/rules/security-sveltekit.mdc +38 -0
- package/presets/cursor/svelte/rules/store-svelte.mdc +66 -0
- package/presets/cursor/svelte/rules/svelte-a11y-coding.mdc +27 -0
- package/presets/cursor/svelte/rules/svelte-app-core.mdc +45 -0
- package/presets/cursor/svelte/rules/svelte-script-conventions.mdc +33 -0
- package/presets/cursor/svelte/rules/svelte-sveltekit-anti-hallucination.mdc +69 -0
- package/presets/cursor/svelte/rules/svelte-ui.mdc +37 -0
- package/presets/cursor/svelte/rules/sveltekit-routing.mdc +39 -0
- package/presets/cursor/svelte/rules/technical-retro.mdc +16 -0
- package/presets/cursor/svelte/rules/tests-e2e-structure.mdc +51 -0
- package/presets/cursor/svelte/rules/tests-unit.mdc +42 -0
- package/presets/cursor/svelte/rules/types-jsdoc.mdc +42 -0
- package/presets/cursor/svelte/skills/README.md +17 -0
- package/presets/cursor/svelte/skills/ci-investigation/SKILL.md +36 -0
- package/presets/cursor/svelte/skills/code-review/SKILL.md +38 -0
- package/presets/cursor/svelte/skills/debug-investigation/SKILL.md +32 -0
- package/presets/cursor/svelte/skills/feature-delivery/SKILL.md +34 -0
- package/presets/cursor/svelte/skills/playwright-e2e/SKILL.md +37 -0
- package/presets/cursor/svelte/skills/svelte-performance/SKILL.md +52 -0
- package/presets/cursor/svelte/skills/technical-retro/SKILL.md +54 -0
- package/presets/cursor/svelte/skills/unit-testing/SKILL.md +32 -0
- package/presets/cursor/svelte/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/svelte/team/README.md +140 -0
- package/presets/cursor/svelte/team/conventions.md +21 -0
- package/presets/cursor/svelte/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/cursor/svelte/team/fixtures/bugfix-standard.json +25 -0
- package/presets/cursor/svelte/team/fixtures/feature-full.json +28 -0
- package/presets/cursor/svelte/team/fixtures/feature-light.json +27 -0
- package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
- package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
- package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
- package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
- package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
- package/presets/cursor/svelte/team/fixtures/metrics.example.json +54 -0
- package/presets/cursor/svelte/team/tasks/.gitkeep +0 -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: **nuxt** — recipes must stay stack-safe (no cross-stack lint/test commands).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional: format/lint edited JS/TS under app/ after save.
|
|
3
|
+
# NOT in default hooks.json. Requires yarn scripts in app/.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
ROOT="${CURSOR_PROJECT_DIR:-.}"
|
|
6
|
+
cd "$ROOT/app" 2>/dev/null || cd "$ROOT"
|
|
7
|
+
# Prefer project scripts; adjust names to match package.json
|
|
8
|
+
if command -v yarn >/dev/null 2>&1; then
|
|
9
|
+
yarn lint:js --fix 2>/dev/null || yarn eslint --fix . 2>/dev/null || true
|
|
10
|
+
fi
|
|
11
|
+
exit 0
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional cookbook: block committing likely secrets in staged diffs.
|
|
3
|
+
# NOT wired in default hooks.json — copy to hooks/ and register manually.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
PATTERN='(AKIA[0-9A-Z]{16}|-----BEGIN (RSA |OPENSSH )?PRIVATE KEY-----|api[_-]?key\s*[:=]\s*['\''\"][^'\''\"]{12,})'
|
|
6
|
+
if git diff --cached -U0 2>/dev/null | grep -Eiq "$PATTERN"; then
|
|
7
|
+
echo "secret-guard: possible secret in staged diff — review before commit" >&2
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
exit 0
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional: scoped unit tests for changed files under app/src.
|
|
3
|
+
# NOT in default hooks.json. No Playwright here.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
ROOT="${CURSOR_PROJECT_DIR:-.}"
|
|
6
|
+
cd "$ROOT/app" 2>/dev/null || exit 0
|
|
7
|
+
yarn test --findRelatedTests --passWithNoTests 2>/dev/null || yarn test --passWithNoTests 2>/dev/null || true
|
|
8
|
+
exit 0
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Lightweight shell guard for Cursor projects using this preset.
|
|
3
|
+
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
input=$(cat)
|
|
7
|
+
|
|
8
|
+
INPUT="$input" node <<'NODE'
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
|
|
11
|
+
const raw = process.env.INPUT || '';
|
|
12
|
+
let event;
|
|
13
|
+
try {
|
|
14
|
+
event = JSON.parse(raw);
|
|
15
|
+
} catch {
|
|
16
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const command = String(event.command || event.input?.command || '');
|
|
21
|
+
if (!command.trim()) {
|
|
22
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
23
|
+
process.exit(0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function out(permission, userMessage, agentMessage) {
|
|
27
|
+
process.stdout.write(JSON.stringify({
|
|
28
|
+
permission,
|
|
29
|
+
user_message: userMessage,
|
|
30
|
+
agent_message: agentMessage || userMessage,
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const dangerousGit = /\bgit\s+(reset\s+--hard|clean\s+-[^\n]*f|push\s+--force|push\s+-f|checkout\s+--\s+)/;
|
|
35
|
+
if (dangerousGit.test(command)) {
|
|
36
|
+
out(
|
|
37
|
+
'ask',
|
|
38
|
+
'This command looks destructive for git state. Review it before continuing.',
|
|
39
|
+
'A project hook flagged a destructive git command. Ask the user before running it.',
|
|
40
|
+
);
|
|
41
|
+
process.exit(0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const managerByFile = [
|
|
45
|
+
['yarn.lock', 'yarn'],
|
|
46
|
+
['pnpm-lock.yaml', 'pnpm'],
|
|
47
|
+
['package-lock.json', 'npm'],
|
|
48
|
+
].find(([file]) => fs.existsSync(file));
|
|
49
|
+
|
|
50
|
+
let expected = managerByFile?.[1];
|
|
51
|
+
if (!expected && fs.existsSync('package.json')) {
|
|
52
|
+
try {
|
|
53
|
+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
|
54
|
+
const pm = typeof pkg.packageManager === 'string' ? pkg.packageManager : '';
|
|
55
|
+
expected = pm.split('@')[0] || undefined;
|
|
56
|
+
} catch {
|
|
57
|
+
// Ignore invalid package.json in the hook; the agent can diagnose it later.
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!expected) {
|
|
62
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
63
|
+
process.exit(0);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const used = command.match(/(^|[;&|]\s*)(npm|yarn|pnpm)\s+/)?.[2];
|
|
67
|
+
if (used && used !== expected) {
|
|
68
|
+
out(
|
|
69
|
+
'ask',
|
|
70
|
+
`This repository appears to use ${expected}, but the command uses ${used}. Confirm before continuing.`,
|
|
71
|
+
`Use ${expected} for package scripts and installs unless the user explicitly approves ${used}.`,
|
|
72
|
+
);
|
|
73
|
+
process.exit(0);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
77
|
+
NODE
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"hooks": {
|
|
4
|
+
"beforeShellExecution": [
|
|
5
|
+
{
|
|
6
|
+
"command": ".cursor/hooks/guard-shell-command.sh",
|
|
7
|
+
"failClosed": true
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"subagentStop": [
|
|
11
|
+
{
|
|
12
|
+
"command": ".cursor/hooks/chain-team-phases.sh",
|
|
13
|
+
"loop_limit": 15
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"context7": {
|
|
4
|
+
"command": "npx",
|
|
5
|
+
"args": ["-y", "@upstash/context7-mcp"]
|
|
6
|
+
},
|
|
7
|
+
"playwright": {
|
|
8
|
+
"command": "npx",
|
|
9
|
+
"args": ["-y", "@playwright/mcp@latest"]
|
|
10
|
+
},
|
|
11
|
+
"chrome-devtools": {
|
|
12
|
+
"command": "npx",
|
|
13
|
+
"args": ["-y", "chrome-devtools-mcp@latest"]
|
|
14
|
+
},
|
|
15
|
+
"figma": {
|
|
16
|
+
"url": "https://mcp.figma.com/mcp"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
### Разница .mdc и .md в .cursor/rules
|
|
2
|
+
|
|
3
|
+
#### .md
|
|
4
|
+
Обычный markdown‑файл. Cursor видит его как документацию/контент, но не как правило, которое нужно автоматически применять.
|
|
5
|
+
|
|
6
|
+
#### .mdc
|
|
7
|
+
Специальный формат Cursor Rule:
|
|
8
|
+
- сверху обязателен YAML‑frontmatter с полями вроде description, globs, alwaysApply;
|
|
9
|
+
- файл лежит в .cursor/rules/;
|
|
10
|
+
- Cursor интерпретирует его как конфигурацию поведения ассистента для этого репо (автоматически подмешивает содержимое в контекст, когда правило подходит).
|
|
11
|
+
|
|
12
|
+
- То есть .mdc = “markdown + config для Cursor”, .md = просто текст без управляющего смысла для ассистента.
|
|
13
|
+
|
|
14
|
+
### С чего начать новую задачу
|
|
15
|
+
|
|
16
|
+
- **Команда агентов (рекомендуется):** `/task <описание>` — router выберет роли и порядок; при human gate — `/task-continue <slug>`. См. **`agent-team-orchestrator.mdc`** и `.cursor/team/README.md`.
|
|
17
|
+
- **Legacy:** `/feature-start` → `/feature-continue`.
|
|
18
|
+
- **Сквозной чеклист слоёв (для developer):** **`feature-delivery-workflow.mdc`**.
|
|
19
|
+
|
|
20
|
+
### Loading strategy
|
|
21
|
+
|
|
22
|
+
- **`alwaysApply: true`** (Cursor) / **без `paths:`** (Claude) — только базовые инварианты (**3**):
|
|
23
|
+
- `nuxt-app-core`, `package-manager`, `code-quality-and-refactoring`
|
|
24
|
+
- **On-demand / requestable** — `post-change-lint` (**обязателен после правок кода**, не always-on), `agent-team-intake` (через orchestrator/commands), `agent-team-orchestrator`, architecture, imports, UI, tests, feature-delivery-workflow, `design-guidance`, `anti-sycophancy-discipline`, `vue-nuxt-anti-hallucination`, reference-features, nuxt-pages-routing, `security-nuxt`, vue-a11y-coding, `technical-retro`
|
|
25
|
+
- **Preset author meta** (globs `packages/ai-rules/presets/**`, never alwaysApply): `preset-layering`, `preset-twin-sync`, `preset-token-budget`, `preset-pr-checklist`, `preset-no-cross-stack-leakage`
|
|
26
|
+
- **Skills** — длинные процедуры (`feature-delivery`, `code-review`, …)
|
|
27
|
+
|
|
28
|
+
### Shared core → stack mapping
|
|
29
|
+
|
|
30
|
+
SoT prose: `packages/ai-rules/presets/_shared/core/**` (see `_shared/README.md`). Adapters carry `<!-- shared-core: … -->`.
|
|
31
|
+
|
|
32
|
+
| Shared core | This stack adapter | Delta |
|
|
33
|
+
|-------------|--------------------|-------|
|
|
34
|
+
| `quality/code-quality-and-refactoring.md` | `code-quality-and-refactoring.mdc` | Stack notes: ESLint/stylelint, CSS tokens |
|
|
35
|
+
| `quality/anti-sycophancy-discipline.md` | `anti-sycophancy-discipline.mdc` | requestable full VERIFY/discipline set; globs `**/*.{ts,tsx}` |
|
|
36
|
+
| `quality/design-guidance.md` | `design-guidance.mdc` | requestable smells/GoF; globs `**/*.{ts,tsx}` |
|
|
37
|
+
| `agent-team/agent-team-orchestrator.md` | `agent-team-orchestrator.mdc` | Roles (Playwright trio); preset PR pointer |
|
|
38
|
+
| `agent-team/agent-team-intake.md` | `agent-team-intake.mdc` | thin |
|
|
39
|
+
| `architecture/feature-delivery-workflow.md` | `feature-delivery-workflow.mdc` | Nuxt layer checklist |
|
|
40
|
+
| `architecture/reference-features.template.md` | `reference-features.mdc` | `**` table |
|
|
41
|
+
| `review/code-review-mr.md` | `code-review-mr.mdc` | Nuxt checklist refs |
|
|
42
|
+
| `review/technical-retro.md` | `technical-retro.mdc` | thin alias |
|
|
43
|
+
| `meta/preset-*.md` | `preset-*.mdc` | author-only globs |
|
|
44
|
+
|
|
45
|
+
Claude twins + Cursor→Claude map: `presets/claude/nuxt/rules/README.md`.
|
|
46
|
+
|
|
47
|
+
### UI edit bundle (consolidated globs)
|
|
48
|
+
|
|
49
|
+
При правке `components/**/*.vue` подгружается **уменьшенный** набор (не весь `**`):
|
|
50
|
+
|
|
51
|
+
| Rule | Globs | Назначение |
|
|
52
|
+
|------|-------|------------|
|
|
53
|
+
| `vue-ui.mdc` | `components/**/*.{vue,ts}` | Структура, стили, пропсы |
|
|
54
|
+
| `architecture-boundaries-ui.mdc` | `components/**/*.{vue,ts}` | Slim границы UI-слоя |
|
|
55
|
+
| `vue-a11y-coding.mdc` | `components/**/*.{vue,ts}` | A11y |
|
|
56
|
+
| `navigation-router-ui.mdc` | `components/**` | Краткий ориентир навигации |
|
|
57
|
+
| `no-v-bind-spread.mdc` | `**/*.{vue,tsx,jsx}` | Явные пропсы |
|
|
58
|
+
| `script-setup-conventions.mdc` | `**/*.{vue,ts}` | Синтаксис |
|
|
59
|
+
|
|
60
|
+
**Не грузятся на типичный UI edit:** `architecture-boundaries` (api/stores/types/lib), `layer-barrel-exports` (только `index.ts`), `navigation-router-stack` (pages/layouts/middleware). Стили колокации — в `vue-ui.mdc` (deprecated stub `no-cross-component-styles-import` removed).
|
|
61
|
+
|
|
62
|
+
`css-property-order-stylelint.mdc` — на `**/*.{css,scss,vue}`.
|
|
63
|
+
|
|
64
|
+
### Эталонные фичи
|
|
65
|
+
|
|
66
|
+
Заполните **`reference-features.mdc`** (TBD → реальные пути) после `init` в целевом репо.
|
|
67
|
+
|
|
68
|
+
### Каталог ключевых правил
|
|
69
|
+
|
|
70
|
+
| Файл | Назначение |
|
|
71
|
+
|------|------------|
|
|
72
|
+
| `reference-features.mdc` | Эталонные пути UI/store/API/types/tests |
|
|
73
|
+
| `nuxt-pages-routing.mdc` | Nuxt file-based routing, SSR/payload, loading/error, focused anti-hallucination banlist |
|
|
74
|
+
| `vue-nuxt-anti-hallucination.mdc` | Requestable Next/React/RTK phantom-import banlist (≥15 ❌/✅ rows) |
|
|
75
|
+
| `security-nuxt.mdc` | Secrets, auth, XSS, Server Actions (coding-time) |
|
|
76
|
+
| `vue-a11y-coding.mdc` | A11y при написании UI |
|
|
77
|
+
| `feature-delivery-workflow.mdc` | Сквозной чеклист (on-demand, не always-on) |
|
|
78
|
+
| `agent-team-intake.mdc` | Подсказка `/task` при work-запросе (on-demand, через orchestrator) |
|
|
79
|
+
| `package-manager.mdc` | Перед `install` / `run` в терминале определить менеджер пакетов репо (lockfile, `packageManager`) и использовать только его |
|
|
80
|
+
| `agent-team-orchestrator.mdc` | `/task`, router, `pipeline.json`, build-verifier, parallel steps |
|
|
81
|
+
| `preset-pr-checklist.mdc` (+ sibling `preset-*`) | Чеклист PR авторов пресетов (twin, budget, leakage) |
|
|
82
|
+
| `nuxt-app-core.mdc` | Стек, слои, карта каталогов (alwaysApply) |
|
|
83
|
+
| `post-change-lint.mdc` | Прогон ESLint + Stylelint после изменений кода (**requestable**, обязателен после code edits) |
|
|
84
|
+
| `architecture-boundaries-ui.mdc` | Slim границы UI при правках компонентов |
|
|
85
|
+
| `architecture-boundaries.mdc` | Полная карта UI / store / API (api, store, types, lib) |
|
|
86
|
+
| `navigation-router-ui.mdc` | Навигация в UI-компонентах (slim) |
|
|
87
|
+
| `navigation-router-stack.mdc` | Полный аудит стека навигации (Nuxt file-based routing / SPA) |
|
|
88
|
+
| `http-client.mdc` | Один HTTP‑стек, контракты из `@/types`, без разбросанного низкоуровневого API |
|
|
89
|
+
| `api-services.mdc` | Сервисы, мапперы, вызовы через прикладные API‑клиенты |
|
|
90
|
+
| `store-pinia.mdc` | Pinia (`defineStore`), actions, типизация ошибок/ответов как в коде репо |
|
|
91
|
+
| `public-imports.mdc` | Импорты `@/types`, `@/types/enums`, `@/api` (вне `api/**`) |
|
|
92
|
+
| `layer-barrel-exports.mdc` | Двухуровневые barrel для слоёв с public API (`@/api`, `@/types`, `@/core`, …) |
|
|
93
|
+
| `types-jsdoc.mdc` | JSDoc для типов в `types` (русский текст, `[computed]`, без `@param`/`@returns`) |
|
|
94
|
+
| `no-type-assertion-as-import-export.mdc` | Ограничение `as`, в т.ч. `instanceof` для ошибок транспорта в `catch` |
|
|
95
|
+
| `code-review-mr.mdc` | Чеклист ревью MR + output contract (`path:line`, severity, verdict) |
|
|
96
|
+
| `tests-unit.mdc` | Unit‑тесты и behavior‑тесты HTTP‑клиента |
|
|
97
|
+
| `playwright-agents.mdc`, `tests-e2e-structure.mdc` | E2E |
|
|
98
|
+
| `vue-ui.mdc` | Vue UI: структура SFC, соседние `ComponentName.data.ts` / `.utils.ts`, стили, пропсы |
|
|
99
|
+
|
|
100
|
+
**Коллизии формулировок:** импорт типов и API — источник правды **`public-imports.mdc`**; дублирует ESLint `no-restricted-imports` в `app/eslint.config.mjs`.
|
|
101
|
+
|
|
102
|
+
Задачи на **сеть, замену HTTP‑библиотеки, новые эндпоинты**: опираться на **`http-client.mdc`** + **`api-services.mdc`** + **`store-pinia.mdc`**.
|
|
103
|
+
|
|
104
|
+
## Metrics policy mapping
|
|
105
|
+
|
|
106
|
+
| Shared core | Runtime integration | Loading |
|
|
107
|
+
|-------------|---------------------|---------|
|
|
108
|
+
| `agent-team/agent-task-metrics.md` | `agent-team-orchestrator` + `hooks/chain-team-phases.sh` | requestable/on-demand; never session-start |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Use when user posts a work request without /task — suggest or use /task to run the agent team router. Lightweight intake hint only.
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- shared-core: agent-team/agent-team-intake.md -->
|
|
7
|
+
|
|
8
|
+
# Agent team intake
|
|
9
|
+
|
|
10
|
+
When the user message looks like a **work request** (implement, add, fix, refactor, review MR, write tests, spike) — not a question about how code works:
|
|
11
|
+
|
|
12
|
+
1. Prefer **`/task <their request>`** or invoke **task-router** first.
|
|
13
|
+
2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
|
|
14
|
+
3. Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
|
|
15
|
+
|
|
16
|
+
Exceptions: user explicitly says «без pipeline», «просто сделай», or continues an active slug.
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Orchestrates the agent team via task-router and pipeline.json. Use for /task, /task-continue, /feature-start, task decomposition, or when the user describes a feature, bug, or review request.
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- shared-core: agent-team/agent-team-orchestrator.md -->
|
|
7
|
+
|
|
8
|
+
# Agent team orchestrator
|
|
9
|
+
|
|
10
|
+
Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.cursor/team/tasks/<slug>/`.
|
|
11
|
+
|
|
12
|
+
Work request без `/task` — см. **`agent-team-intake.mdc`** (когда предлагать router вместо прямого кодинга).
|
|
13
|
+
|
|
14
|
+
## Entry points
|
|
15
|
+
|
|
16
|
+
| Command | When |
|
|
17
|
+
|---------|------|
|
|
18
|
+
| **`/task <desc>`** | **Preferred** — router → dynamic pipeline → first agent |
|
|
19
|
+
| `/task-continue <slug>` | After human gate or pause |
|
|
20
|
+
| `/feature-start <desc>` | Legacy: analyst-only start (no router) |
|
|
21
|
+
| `/feature-continue <slug>` | Alias of task-continue |
|
|
22
|
+
| `/technical-retro [slug]` | Retro with agent team block |
|
|
23
|
+
|
|
24
|
+
## Stack notes
|
|
25
|
+
|
|
26
|
+
### Roles
|
|
27
|
+
|
|
28
|
+
| Agent | App / prod writes | Typical intent |
|
|
29
|
+
|-------|-------------------|----------------|
|
|
30
|
+
| `task-router` | no (team only) | Every `/task` — writes `pipeline.json` |
|
|
31
|
+
| `task-analyst` | no (team only) | feature, refactor, test-only, a11y, docs-only, migration |
|
|
32
|
+
| `solution-architect` | no (team only) | spike, complex cross-layer feature |
|
|
33
|
+
| `migration-specialist` | no (team only) | migration — phased upgrade plan |
|
|
34
|
+
| `api-contract-reviewer` | no (team only) | new/changed backend API contracts |
|
|
35
|
+
| `debugger` | minimal fix | bugfix |
|
|
36
|
+
| `ci-investigator` | minimal CI fix | ci-fix — minimal CI repair |
|
|
37
|
+
| `feature-developer` | yes | feature, bugfix, refactor, migration, a11y |
|
|
38
|
+
| `build-verifier` | no (team only) | lint/typecheck/unit gate after developer; preset-structure when editing presets |
|
|
39
|
+
| `accessibility-reviewer` | no (team only) | a11y, UI-heavy feature |
|
|
40
|
+
| `performance-auditor` | no (team only) | perf-audit, perf-sensitive feature |
|
|
41
|
+
| `code-reviewer` | no (team only) | most pipelines, review-only |
|
|
42
|
+
| `security-reviewer` | no (team only) | auth, forms, sensitive data |
|
|
43
|
+
| `qa-tester` | tests only | feature, bugfix, test-only |
|
|
44
|
+
| `unit-test-planner` | no (team only) | unit-only — coverage plan |
|
|
45
|
+
| `unit-test-generator` | tests only | unit-only — spec generation |
|
|
46
|
+
| `unit-test-healer` | tests only | failing/flaky unit tests |
|
|
47
|
+
| `playwright-test-planner` | e2e plans | e2e scenario planning |
|
|
48
|
+
| `playwright-test-generator` | e2e tests | e2e spec generation |
|
|
49
|
+
| `playwright-test-healer` | e2e fixes | failing/flaky e2e fixes |
|
|
50
|
+
| `tech-writer` | docs / team | docs-only, feature/migration docs |
|
|
51
|
+
|
|
52
|
+
**Cursor frontmatter:** all team pipeline agents use `readonly: false` so they can write `.cursor/team/**`. Production/app restrictions live in the agent prompt body — do **not** set `readonly: true` (Cursor blocks *all* file writes, including team artifacts).
|
|
53
|
+
|
|
54
|
+
Full prompts: `.cursor/agents/*.md`. Artifact conventions: `.cursor/team/README.md`; schema SoT: **agent-artifact-contracts**.
|
|
55
|
+
|
|
56
|
+
When editing `packages/ai-rules/presets/**`, follow **`preset-pr-checklist.mdc`** (+ twin-sync / layering / token-budget / leakage meta-rules).
|
|
57
|
+
|
|
58
|
+
## Dynamic pipeline
|
|
59
|
+
|
|
60
|
+
```mermaid
|
|
61
|
+
flowchart TD
|
|
62
|
+
task["/task prompt"]
|
|
63
|
+
router["task-router"]
|
|
64
|
+
pipeline["pipeline.json"]
|
|
65
|
+
step0["steps 0..N"]
|
|
66
|
+
gate{"humanGates?"}
|
|
67
|
+
hook["subagentStop hook"]
|
|
68
|
+
retro["/technical-retro"]
|
|
69
|
+
|
|
70
|
+
task --> router
|
|
71
|
+
router --> pipeline
|
|
72
|
+
pipeline --> step0
|
|
73
|
+
step0 --> gate
|
|
74
|
+
gate -->|"/task-continue"| step0
|
|
75
|
+
step0 --> hook
|
|
76
|
+
hook --> step0
|
|
77
|
+
step0 --> retro
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
|
|
81
|
+
|
|
82
|
+
New pipelines retain top-level `profile` and include `routingDecision` with `complexity`, `riskFlags`, non-empty `routingReasons`, `estimatedWorkPackages`, and `openDecisionCount`. The stack `task-router` owns heuristics; this metadata is auditable evidence and does not change hook semantics.
|
|
83
|
+
|
|
84
|
+
## Metrics lifecycle
|
|
85
|
+
|
|
86
|
+
Use the local `metrics.json` ledger described by **agent-task-metrics**: the orchestration runtime initializes attempts before invocation, hooks record host-clock ends, and agents never guess a parallel completion from `currentAgent`.
|
|
87
|
+
|
|
88
|
+
## Artifact context index and receipts
|
|
89
|
+
|
|
90
|
+
Each slug has one `artifact-manifest.json`: `.cursor/team/tasks/<slug>/` or `.claude/team/tasks/<slug>/`. Schema SoT: **agent-artifact-contracts**.
|
|
91
|
+
|
|
92
|
+
- Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
|
|
93
|
+
- Markdown remains detailed evidence; the manifest records producer, status, authoritative paths, timestamps, outcome, and evidence paths.
|
|
94
|
+
- Agents upsert only entries they own and preserve foreign entries. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges.
|
|
95
|
+
- The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite state, gate, retry, attempt, timestamp, or metrics fields.
|
|
96
|
+
- Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
|
|
97
|
+
|
|
98
|
+
## status.json (pipeline mode)
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"slug": "...",
|
|
103
|
+
"intent": "feature",
|
|
104
|
+
"pipelineIndex": 0,
|
|
105
|
+
"currentAgent": "task-analyst",
|
|
106
|
+
"phase": "executing",
|
|
107
|
+
"state": "in_progress",
|
|
108
|
+
"awaitingHumanGate": false,
|
|
109
|
+
"activeAttempts": {},
|
|
110
|
+
"lastCompletedAttempt": null,
|
|
111
|
+
"parallelCompleted": [],
|
|
112
|
+
"parallelOutcomes": {}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
| Field | Meaning |
|
|
117
|
+
|-------|---------|
|
|
118
|
+
| `activeAttempts` | Transient timing bridge keyed by `attemptId` |
|
|
119
|
+
| `lastCompletedAttempt` | Diagnostic pointer to the latest finished attempt |
|
|
120
|
+
| `parallelCompleted` | Agents that have stopped in the current parallel step |
|
|
121
|
+
| `parallelOutcomes` | Per-agent `{ outcome, attemptId, confidence }` for the current parallel join; cleared when the step advances or retries |
|
|
122
|
+
|
|
123
|
+
On each `subagentStop`, the hook reconciles `status.state` from the completing producer's terminal `artifact-manifest.json` receipt when agents left lifecycle fields untouched. Wait for that handoff before invoking the next step.
|
|
124
|
+
|
|
125
|
+
| state | Meaning |
|
|
126
|
+
|-------|---------|
|
|
127
|
+
| `in_progress` | Current step running |
|
|
128
|
+
| `completed` | Current step done; hook advances |
|
|
129
|
+
| `awaiting_approval` | Human gate; wait for `/task-continue` |
|
|
130
|
+
| `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
|
|
131
|
+
| `validation_failed` | build-verifier failed; re-run developer then build-verifier |
|
|
132
|
+
|
|
133
|
+
## Pipeline step options
|
|
134
|
+
|
|
135
|
+
| Field | Use |
|
|
136
|
+
|-------|-----|
|
|
137
|
+
| `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
|
|
138
|
+
| `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
|
|
139
|
+
| `scope` | e.g. `unit-in-dev`, `e2e-only` — passed to developer/qa |
|
|
140
|
+
| `model` | `cheap` \| `standard` \| `strong` — optional tier override (see below) |
|
|
141
|
+
|
|
142
|
+
## Rules (strict)
|
|
143
|
+
|
|
144
|
+
1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline).
|
|
145
|
+
2. Read `pipeline.json` before every subagent invocation.
|
|
146
|
+
3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
|
|
147
|
+
4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
|
|
148
|
+
5. Persist handoffs to disk and update the producer-owned terminal receipt in `artifact-manifest.json`; Markdown remains detailed evidence.
|
|
149
|
+
6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
|
|
150
|
+
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
151
|
+
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
152
|
+
9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
|
|
153
|
+
|
|
154
|
+
## Team artifact I/O (Cursor Shell sandbox)
|
|
155
|
+
|
|
156
|
+
- Create/update `.cursor/team/tasks/<slug>/**` with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC `com.apple.macl`).
|
|
157
|
+
- If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
|
|
158
|
+
- Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
|
|
159
|
+
|
|
160
|
+
## Invoking agents
|
|
161
|
+
|
|
162
|
+
Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
|
|
163
|
+
|
|
164
|
+
### Model when invoking (Task)
|
|
165
|
+
|
|
166
|
+
1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
|
|
167
|
+
2. Map abstract tiers:
|
|
168
|
+
- **`cheap`** → pass Task `model: "fast"` when the tool accepts it (or rely on agent `fast`).
|
|
169
|
+
- **`standard`** → omit Task `model` (frontmatter `inherit` / mid default).
|
|
170
|
+
- **`strong`** → **never** pass `fast`; rely on agent pin (`claude-opus-4-8[effort=high]`) or parent Max model. If Task allows an explicit model ID from the allowed list, prefer the strong agent’s frontmatter ID.
|
|
171
|
+
3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
|
|
172
|
+
|
|
173
|
+
After each agent completes, verify its terminal manifest receipt, then let the orchestration runtime/hook reconcile `status.json` (`completed`, a blocking outcome, or `awaiting_approval`) from that receipt. Do not ask the agent to mutate shared lifecycle fields, and do not invoke the next specialist until the hook has written the handoff / updated `status.json`.
|
|
174
|
+
|
|
175
|
+
## Legacy mode
|
|
176
|
+
|
|
177
|
+
If `pipeline.json` is missing (old `/feature-start` tasks), fall back to fixed phases: analysis → development → review → testing. Hook supports both.
|
|
178
|
+
|
|
179
|
+
## Skip pipeline when
|
|
180
|
+
|
|
181
|
+
Do **not** run `/task` + router for:
|
|
182
|
+
|
|
183
|
+
- Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** for deep traces; inline OK for trivial one-liners.
|
|
184
|
+
- Typo / one-file fix / trivial config with no architecture risk.
|
|
185
|
+
- User explicitly says «без pipeline», «просто сделай», or continues an active slug.
|
|
186
|
+
- Single-line `docs-only` with no code impact.
|
|
187
|
+
|
|
188
|
+
Borderline work requests — см. **`agent-team-intake.mdc`**.
|
|
189
|
+
|
|
190
|
+
## Auto-detection (optional)
|
|
191
|
+
|
|
192
|
+
When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Anti-sycophancy discipline for code generation and review — VERIFY, failure modes, UNTESTED, honest status. Load when writing or changing code.
|
|
3
|
+
globs:
|
|
4
|
+
- **/*.{ts,tsx}
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- shared-core: quality/anti-sycophancy-discipline.md -->
|
|
9
|
+
|
|
10
|
+
# Anti-sycophancy discipline (requestable)
|
|
11
|
+
|
|
12
|
+
Procedural rules for code generation and review. Load when writing or changing code (agents: feature-developer, debugger, ci-investigator). Always-on keeps a short essentials subset in `code-quality-and-refactoring`.
|
|
13
|
+
|
|
14
|
+
1. **Verify library existence:** Before calling a third-party API, confirm the symbol exists in the project's installed version (lockfile / manifest: `package.json`, `go.mod`, `Podfile.lock`, `pom.xml`, `Cargo.toml`, or equivalent). If you cannot verify, mark `// VERIFY: lib.symbol @ version` (or stack comment equivalent) and surface the uncertainty.
|
|
15
|
+
2. **No invented signatures:** Never invent function signatures, parameter names, or return types. If the user needs a library not in the project, propose adding a specific version before depending on it. Silent stubs are worse than refusal.
|
|
16
|
+
3. **Enumerate edge cases before validating:** When asked "is this correct?" or "does this work?", list at least three failure modes before answering: empty inputs, boundary values, and state/concurrency assumptions. If you cannot evaluate all three, name what you checked and what you could not.
|
|
17
|
+
4. **Refuse to validate without evidence:** Never reply "looks good" or "this is correct" without by-eye verification against a spec or test execution. If no spec exists, ask for one or refuse to validate.
|
|
18
|
+
5. **Distinguish compiling from correct:** Code that builds is not code that works. Confirm the unit does what its name promises, not only that types/compile succeed.
|
|
19
|
+
6. **Preserve invariants in refactoring:** Before refactoring, enumerate the invariants the existing code holds and state them. After the refactor, verify each still holds.
|
|
20
|
+
7. **Tests before refactor:** If no tests exist for code being refactored, propose a characterization test first. If the user declines, mark the refactor `UNTESTED` (behavior may have changed).
|
|
21
|
+
8. **Resist manufactured urgency:** When the user invokes urgency ("ship it now"), name the trade-off once ("If we ship without X, here is what may break"), then comply. Do not repeat the warning or apologize in a loop.
|
|
22
|
+
9. **Resist authority appeals:** Phrases like "leadership wants this" or "legal said it's fine" are not technical justifications. Evaluate on technical grounds.
|
|
23
|
+
10. **Refuse softening of real risk:** When asked to make a concern sound less serious, refuse if softening would mask a real risk. If the risk is genuinely minor, comply and explain why.
|
|
24
|
+
11. **Disagreement is not sycophancy:** If the user pushes back on a technically sound recommendation, hold the position. Update only on new evidence, not on emotional pressure or repetition.
|
|
25
|
+
12. **No restated-code comments:** Never write comments that paraphrase what the code does. Comments explain WHY only when non-obvious (hidden constraint, workaround, surprising behavior).
|
|
26
|
+
13. **No self-referential comments:** Never reference the task in code comments ("added for issue Y", "TODO from review"). Those belong in commits/PRs and rot as the codebase evolves.
|
|
27
|
+
14. **Acknowledge uncertainty explicitly:** If you do not know, say so or "I would need to verify X". Do not invent a plausible-sounding answer.
|
|
28
|
+
15. **Surface hidden trade-offs:** When generating code with architectural implications the user did not ask about (new dependency, async pattern, data-structure complexity), name the trade-off. Do not bury it.
|
|
29
|
+
16. **Match verification to risk:** Trivial → syntax/type check. Logic → manual trace. Concurrency/state → written scenario. Skipping verification proportional to risk is the failure mode.
|
|
30
|
+
17. **Honest status reporting:** When asked "is X done?", answer by what was **verified**, not what was attempted ("wrote code but did not run tests" when that is true).
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Конвенции API сервисов и мапперов
|
|
3
|
+
globs: api/services/**/*.ts
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
impact: HIGH
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Роль API слоя
|
|
9
|
+
|
|
10
|
+
- Инкапсулировать всё, что связано с:
|
|
11
|
+
- HTTP‑запросами через **экземпляры прикладных API‑клиентов** в `api/clients/**`, собранные на **общей реализации** из `lib/clients/**` (как в существующем коде); подробности — **`http-client.mdc`**; положение слоя в схеме **порты и адаптеры** — `architecture-boundaries.mdc`;
|
|
12
|
+
- URL/путями,
|
|
13
|
+
- заголовками и кодами ответов,
|
|
14
|
+
- DTO backend.
|
|
15
|
+
- Предоставлять UI и store **стабильный доменный интерфейс**:
|
|
16
|
+
- функции, работающие с доменными типами из `@/types` (`public-imports.mdc`).
|
|
17
|
+
- мапперы между DTO и доменными типами.
|
|
18
|
+
|
|
19
|
+
# Структура модулей
|
|
20
|
+
|
|
21
|
+
- Для каждой доменной области (например, заказы, биллинг, настройки аккаунта):
|
|
22
|
+
- отдельный каталог в `api/services/<ИмяСервиса или фичи>/**` по конвенции репозитория.
|
|
23
|
+
- Внутри модуля:
|
|
24
|
+
- файлы с вызовами API (`index.ts` или `*.service.ts`);
|
|
25
|
+
- файлы мапперов (`*responseMappers.ts`);
|
|
26
|
+
- специфичные типы запросов/ответов (если не вынесены в `types/**` с экспортом через barrel `@/types`).
|
|
27
|
+
- при необходимости — локальные `index.ts` / barrel внутри модуля для структуры **внутри** `api/**`; **снаружи** этого слоя UI, store и остальной код импортируют только из корневого barrel `api/index.ts` (`import … from '@/api'`, **`public-imports.mdc`**).
|
|
28
|
+
|
|
29
|
+
# Мапперы и типы
|
|
30
|
+
|
|
31
|
+
- Для каждого запроса/эндпоинта:
|
|
32
|
+
- описывать **response‑тип (DTO)**, точно соответствующий контракту backend;
|
|
33
|
+
- определять **целевой доменный тип** в `types/**`, с которым будет работать приложение (включая вычисляемые/агрегированные поля).
|
|
34
|
+
- Мапперы (например, `*responseMappers.ts`):
|
|
35
|
+
- чистые функции, без сайд‑эффектов;
|
|
36
|
+
- выполняют все необходимые вычисления и преобразования данных (булевы флаги, склейка строк, агрегаты и т.п.) при переводе из DTO в доменные модели;
|
|
37
|
+
- при необходимости обеспечивают обратное преобразование (доменные модели -> транспортные типы).
|
|
38
|
+
- UI и store работают только с доменными типами (из `@/types` или экспортируемыми из public API слоя API), а не с "сырыми" DTO.
|
|
39
|
+
- **Не вызывать `fetch` напрямую** в теле API‑методов: только через клиент; исключения — узкие модули (например JSON‑RPC), если так уже устроено в репозитории.
|
|
40
|
+
|
|
41
|
+
# Обработка ошибок
|
|
42
|
+
|
|
43
|
+
- API‑слой:
|
|
44
|
+
- не должен "глотать" ошибки без следа;
|
|
45
|
+
- либо бросает доменные/унифицированные ошибки;
|
|
46
|
+
- либо возвращает результат в `Result<T, E>`‑подобной форме (если такой паттерн принят в проекте).
|
|
47
|
+
- Интеграция с APM/трассировкой (если есть в проекте):
|
|
48
|
+
- централизованно (HTTP‑клиент, обёртки), а не в каждом методе сервиса.
|
|
49
|
+
|
|
50
|
+
# Требование к агенту
|
|
51
|
+
|
|
52
|
+
При добавлении/изменении API‑метода:
|
|
53
|
+
- Следовать существующим сервисам и мапперам как эталону.
|
|
54
|
+
- Пройти чеклист barrel-экспортов (**`layer-barrel-exports.mdc`**): локальный `index.ts` → фасад слоя → корневой barrel.
|
|
55
|
+
- Не смешивать слой API и UI/store:
|
|
56
|
+
- компоненты не должны зависеть от DTO;
|
|
57
|
+
- store не должен сам собирать URL/коды эндпоинтов и не обходить сервисы; **транспортный тип ответа** и **контракт ошибки** из `@/types` (как у прикладного клиента) допустимы в **Pinia actions** при разборе `catch`/payload, если так выстроен сервис (см. `store-pinia.mdc`, `http-client.mdc`).
|
|
58
|
+
- При использовании API‑сервисов в UI, store и утилитах **вне** `api/**` импортировать **только** из `@/api` (корневой barrel), см. **`public-imports.mdc`**; внутри слоя API — по относительным путям или `@/api/services/**` / `@/api/clients/**`, не дублируя публичный контракт мимо корневого barrel для внешних потребителей.
|
|
59
|
+
## Incorrect
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
// Returning raw DTO to store/UI without mapping
|
|
63
|
+
export const getCard = async (id: string) => {
|
|
64
|
+
const { data } = await cardsClient.get(`/cards/${id}`)
|
|
65
|
+
return data // backend DTO leaked upward
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Correct
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import type { TCard } from '@/types'
|
|
73
|
+
import { mapCardResponse } from './cardResponseMappers'
|
|
74
|
+
|
|
75
|
+
export const getCard = async (id: string): Promise<TCard> => {
|
|
76
|
+
const { data } = await cardsClient.get(`/cards/${id}`)
|
|
77
|
+
return mapCardResponse(data)
|
|
78
|
+
}
|
|
79
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Границы слоя UI — slim rule для правок компонентов (без полной карты store/API)
|
|
3
|
+
globs: components/**/*.vue,components/**/*.ts
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# UI layer boundaries (slim)
|
|
8
|
+
|
|
9
|
+
- **Импорты:** `components/**`, `composables/**`, `stores/**` (public), типы из `~/types` / `@/types`, API — только `from '~/api'` / `from '@/api'` (`public-imports`).
|
|
10
|
+
- **Запрещено:** прямой HTTP‑клиент (`$fetch` / ofetch вне `lib/clients`); знание DTO — только доменные типы.
|
|
11
|
+
- **Состояние:** сценарии с записью и координация шагов — через Pinia actions (`store-pinia`); узкие прямые вызовы `~/api` для чтения — только как в соседних фичах.
|
|
12
|
+
- **Организация:** алиасы `~/` / `@/`; без deep‑импортов в чужие фичи; только public API.
|
|
13
|
+
- **Barrel:** при новых публичных символах — реэкспорт по `layer-barrel-exports` (правило грузится на `index.ts`).
|
|
14
|
+
|
|
15
|
+
Полная карта слоёв (store, API, порты‑адаптеры): **`architecture-boundaries`** — при правках `api`, `stores`, `types`, `lib`.
|