@bonesofspring/ai-rules 0.2.26 → 0.2.27
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 +7 -0
- package/LICENSE +21 -0
- package/README.md +1 -1
- package/bin/cli.js +262 -44
- package/bin/lib/safe-path.js +93 -0
- package/bin/lib/seed-ai-local-team.js +5 -0
- package/bin/mavis-install.js +35 -8
- package/bin/opencode-install.js +34 -11
- package/docs/LOCAL-OVERLAY.md +186 -0
- package/docs/MAVIS-COMPATIBILITY.md +174 -0
- package/docs/MAVIS.md +120 -0
- package/docs/OPENCODE-COMPATIBILITY.md +54 -0
- package/docs/OPENCODE.md +123 -0
- package/docs/PRESET-CONTRIBUTION.md +431 -0
- package/docs/PRESET-ENGLISH-STYLE.md +91 -0
- package/docs/specs/INDEX.md +9 -0
- package/docs/specs/_templates/feature.md +32 -0
- package/docs/specs/_templates/page.md +47 -0
- package/package.json +6 -1
- package/presets/_shared/core/meta/preset-layering.md +1 -1
- package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
- package/presets/_shared/core/meta/preset-token-budget.md +10 -10
- package/presets/_shared/core/quality/code-quality-and-refactoring.md +6 -0
- package/presets/claude/android-kotlin/agents/build-verifier.md +2 -2
- package/presets/claude/android-kotlin/commands/task.md +1 -1
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +32 -3
- package/presets/claude/android-kotlin/hooks/examples/README.md +5 -3
- package/presets/claude/android-kotlin/hooks/examples/test-on-save.example.sh +6 -4
- package/presets/claude/android-kotlin/rules/README.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +6 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/mcp-usage.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-layering.md +2 -2
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-token-budget.md +11 -11
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/android-kotlin/rules/ui-and-accessibility/compose.md +2 -0
- package/presets/claude/go/CLAUDE.md +1 -1
- package/presets/claude/go/agents/build-verifier.md +1 -1
- package/presets/claude/go/commands/task.md +1 -1
- package/presets/claude/go/hooks/chain-team-phases.sh +32 -3
- package/presets/claude/go/hooks/examples/README.md +5 -3
- package/presets/claude/go/rules/README.md +1 -1
- package/presets/claude/go/rules/api-and-data/adapters-driven.md +3 -3
- package/presets/claude/go/rules/api-and-data/adapters-driving.md +2 -2
- package/presets/claude/go/rules/api-and-data/api-grpc.md +2 -2
- package/presets/claude/go/rules/api-and-data/api-http.md +3 -3
- package/presets/claude/go/rules/api-and-data/messaging-adapters.md +1 -1
- package/presets/claude/go/rules/api-and-data/persistence-adapters.md +2 -2
- package/presets/claude/go/rules/architecture/application-usecases.md +1 -1
- package/presets/claude/go/rules/architecture/domain-layer.md +1 -1
- package/presets/claude/go/rules/architecture/feature-delivery.md +1 -1
- package/presets/claude/go/rules/architecture/ports-interfaces.md +2 -2
- package/presets/claude/go/rules/stack/go-conventions.md +1 -1
- package/presets/claude/go/rules/testing/e2e.md +2 -2
- package/presets/claude/go/rules/testing/integration.md +2 -2
- package/presets/claude/go/rules/testing/unit.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/code-quality.md +6 -0
- package/presets/claude/go/rules/tooling-and-review/code-review.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/go-tooling.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/mcp-usage.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/post-change-test.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +10 -10
- package/presets/claude/go/rules/tooling-and-review/security-go.md +3 -3
- package/presets/claude/go/rules/tooling-and-review/technical-retro.md +1 -1
- package/presets/claude/ios-swift/agents/build-verifier.md +3 -3
- package/presets/claude/ios-swift/commands/task.md +1 -1
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +32 -3
- package/presets/claude/ios-swift/hooks/examples/README.md +5 -3
- package/presets/claude/ios-swift/rules/README.md +1 -1
- package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +3 -3
- package/presets/claude/ios-swift/rules/architecture/reference-features.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +6 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/mcp-usage.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/post-change-build.md +2 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +2 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +11 -11
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/ios-swift/rules/ui-and-accessibility/swiftui.md +7 -0
- package/presets/claude/java/CLAUDE.md +2 -2
- package/presets/claude/java/agents/build-verifier.md +1 -1
- package/presets/claude/java/commands/task.md +1 -1
- package/presets/claude/java/hooks/chain-team-phases.sh +32 -3
- package/presets/claude/java/hooks/examples/README.md +5 -3
- package/presets/claude/java/rules/README.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/code-quality.md +6 -0
- package/presets/claude/java/rules/tooling-and-review/mcp-usage.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +10 -10
- package/presets/claude/mcp-ts/CLAUDE.md +1 -1
- package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/claude/mcp-ts/commands/task.md +1 -1
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +32 -3
- package/presets/claude/mcp-ts/rules/README.md +1 -1
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-auth-secrets.md +4 -4
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-contract-testing.md +2 -2
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-tool-design.md +1 -1
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-transport-packaging.md +2 -2
- package/presets/claude/mcp-ts/rules/architecture/mcp-server-boundaries.md +1 -1
- package/presets/claude/mcp-ts/rules/testing/unit.md +2 -2
- package/presets/claude/mcp-ts/rules/tooling-and-review/anti-sycophancy-discipline.md +2 -2
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +6 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/mcp-ts-tooling.md +3 -3
- package/presets/claude/mcp-ts/rules/tooling-and-review/post-change-test.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +1 -1
- 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-token-budget.md +10 -10
- package/presets/claude/mcp-ts/rules/tooling-and-review/security-mcp.md +1 -1
- package/presets/claude/next/README.md +1 -1
- package/presets/claude/next/agents/build-verifier.md +2 -2
- package/presets/claude/next/commands/task.md +1 -1
- package/presets/claude/next/hooks/chain-team-phases.sh +32 -3
- package/presets/claude/next/hooks/examples/README.md +5 -3
- package/presets/claude/next/rules/README.md +1 -1
- package/presets/claude/next/rules/api-and-data/api-services.md +6 -4
- package/presets/claude/next/rules/api-and-data/store-rtk.md +6 -5
- package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +4 -0
- package/presets/claude/next/rules/architecture/reference-features.md +1 -1
- package/presets/claude/next/rules/stack/next-app-core.md +2 -1
- package/presets/claude/next/rules/testing/tests-unit.md +1 -0
- package/presets/claude/next/rules/tooling-and-review/code-quality.md +6 -0
- package/presets/claude/next/rules/tooling-and-review/preset-layering.md +2 -2
- package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +11 -11
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +37 -1
- package/presets/claude/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
- package/presets/claude/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
- package/presets/claude/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
- package/presets/claude/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
- package/presets/claude/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
- package/presets/claude/next/team/fixtures/metrics.example.json +54 -0
- package/presets/claude/nuxt/agents/build-verifier.md +2 -2
- package/presets/claude/nuxt/commands/task.md +1 -1
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +32 -3
- package/presets/claude/nuxt/hooks/examples/README.md +5 -3
- package/presets/claude/nuxt/hooks/examples/format-edited.example.sh +8 -7
- package/presets/claude/nuxt/hooks/examples/test-on-save.example.sh +8 -3
- package/presets/claude/nuxt/rules/README.md +1 -1
- package/presets/claude/nuxt/rules/architecture/layer-barrel-exports.md +1 -1
- package/presets/claude/nuxt/rules/architecture/reference-features.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +6 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +2 -2
- package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/nuxt/rules/tooling-and-review/preset-token-budget.md +11 -11
- package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/nuxt/rules/ui-and-accessibility/vue-ui.md +7 -0
- package/presets/claude/nuxt/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
- package/presets/claude/nuxt/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
- package/presets/claude/nuxt/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
- package/presets/claude/nuxt/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
- package/presets/claude/nuxt/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
- package/presets/claude/nuxt/team/fixtures/metrics.example.json +54 -0
- package/presets/claude/php-hexagonal/CLAUDE.md +2 -2
- package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/claude/php-hexagonal/commands/task.md +1 -1
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +32 -3
- package/presets/claude/php-hexagonal/hooks/examples/README.md +5 -3
- package/presets/claude/php-hexagonal/rules/README.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +6 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/mcp-usage.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +1 -1
- 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-token-budget.md +10 -10
- package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
- package/presets/claude/php-laravel/commands/task.md +1 -1
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +32 -3
- package/presets/claude/php-laravel/hooks/examples/README.md +5 -3
- package/presets/claude/php-laravel/rules/README.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +6 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/mcp-usage.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +1 -1
- 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-token-budget.md +10 -10
- package/presets/claude/svelte/agents/build-verifier.md +2 -2
- package/presets/claude/svelte/commands/task.md +1 -1
- package/presets/claude/svelte/hooks/chain-team-phases.sh +32 -3
- package/presets/claude/svelte/hooks/examples/README.md +5 -3
- package/presets/claude/svelte/rules/README.md +1 -1
- package/presets/claude/svelte/rules/api-and-data/store-svelte.md +1 -1
- package/presets/claude/svelte/rules/architecture/layer-barrel-exports.md +1 -1
- package/presets/claude/svelte/rules/architecture/reference-features.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +6 -0
- package/presets/claude/svelte/rules/tooling-and-review/mcp-usage.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +2 -2
- package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/svelte/rules/tooling-and-review/preset-token-budget.md +11 -11
- package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/svelte/rules/ui-and-accessibility/no-rest-props-spread.md +1 -1
- package/presets/claude/svelte/rules/ui-and-accessibility/svelte-ui.md +7 -0
- package/presets/claude/svelte/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
- package/presets/claude/svelte/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
- package/presets/claude/svelte/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
- package/presets/claude/svelte/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
- package/presets/claude/svelte/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
- package/presets/claude/svelte/team/fixtures/metrics.example.json +54 -0
- package/presets/cursor/android-kotlin/agents/build-verifier.md +2 -2
- package/presets/cursor/android-kotlin/commands/task.md +1 -1
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +32 -3
- package/presets/cursor/android-kotlin/hooks/examples/test-on-save.example.sh +6 -4
- package/presets/cursor/android-kotlin/rules/README.md +1 -1
- package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +6 -0
- package/presets/cursor/android-kotlin/rules/compose-ui.mdc +2 -0
- package/presets/cursor/android-kotlin/rules/preset-layering.mdc +2 -2
- package/presets/cursor/android-kotlin/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/android-kotlin/rules/preset-token-budget.mdc +11 -11
- package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/go/README.md +1 -1
- package/presets/cursor/go/agents/build-verifier.md +1 -1
- package/presets/cursor/go/commands/task.md +1 -1
- package/presets/cursor/go/hooks/chain-team-phases.sh +32 -3
- package/presets/cursor/go/rules/README.md +2 -2
- package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +6 -0
- package/presets/cursor/go/rules/preset-layering.mdc +1 -1
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/go/rules/preset-token-budget.mdc +10 -10
- package/presets/cursor/ios-swift/README.md +1 -1
- package/presets/cursor/ios-swift/agents/build-verifier.md +3 -3
- package/presets/cursor/ios-swift/commands/task.md +1 -1
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +32 -3
- package/presets/cursor/ios-swift/rules/README.md +2 -2
- package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +6 -0
- package/presets/cursor/ios-swift/rules/preset-layering.mdc +2 -2
- package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +11 -11
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/ios-swift/rules/reference-features.mdc +1 -1
- package/presets/cursor/ios-swift/rules/swiftui-ui.mdc +7 -0
- package/presets/cursor/java/AGENTS.md +1 -1
- package/presets/cursor/java/agents/build-verifier.md +1 -1
- package/presets/cursor/java/commands/task.md +1 -1
- package/presets/cursor/java/hooks/chain-team-phases.sh +32 -3
- package/presets/cursor/java/rules/README.md +2 -2
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +6 -0
- package/presets/cursor/java/rules/preset-layering.mdc +1 -1
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/java/rules/preset-token-budget.mdc +10 -10
- package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/cursor/mcp-ts/commands/task.md +1 -1
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +32 -3
- package/presets/cursor/mcp-ts/rules/README.md +2 -2
- package/presets/cursor/mcp-ts/rules/anti-sycophancy-discipline.mdc +2 -2
- package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +6 -0
- package/presets/cursor/mcp-ts/rules/mcp-auth-secrets.mdc +4 -4
- package/presets/cursor/mcp-ts/rules/mcp-contract-testing.mdc +2 -2
- package/presets/cursor/mcp-ts/rules/mcp-server-boundaries.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/mcp-tool-design.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/mcp-transport-packaging.mdc +2 -2
- package/presets/cursor/mcp-ts/rules/mcp-ts-tooling.mdc +3 -3
- package/presets/cursor/mcp-ts/rules/preset-layering.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +10 -10
- package/presets/cursor/mcp-ts/rules/security-mcp.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/tests-unit.mdc +2 -2
- package/presets/cursor/next/README.md +2 -2
- package/presets/cursor/next/agents/build-verifier.md +2 -2
- package/presets/cursor/next/commands/task.md +1 -1
- package/presets/cursor/next/hooks/chain-team-phases.sh +32 -3
- package/presets/cursor/next/rules/README.md +1 -1
- package/presets/cursor/next/rules/api-services.mdc +6 -4
- package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +6 -0
- package/presets/cursor/next/rules/feature-delivery-workflow.mdc +4 -0
- package/presets/cursor/next/rules/next-app-core.mdc +2 -1
- package/presets/cursor/next/rules/preset-layering.mdc +2 -2
- package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/next/rules/preset-token-budget.mdc +11 -11
- package/presets/cursor/next/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/next/rules/react-ui.mdc +37 -1
- package/presets/cursor/next/rules/reference-features.mdc +1 -1
- package/presets/cursor/next/rules/store-rtk.mdc +6 -5
- package/presets/cursor/next/rules/tests-unit.mdc +1 -0
- package/presets/cursor/nuxt/README.md +1 -1
- package/presets/cursor/nuxt/agents/build-verifier.md +2 -2
- package/presets/cursor/nuxt/commands/task.md +1 -1
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +32 -3
- package/presets/cursor/nuxt/hooks/examples/format-edited.example.sh +8 -7
- package/presets/cursor/nuxt/hooks/examples/test-on-save.example.sh +8 -3
- package/presets/cursor/nuxt/rules/anti-sycophancy-discipline.mdc +1 -1
- package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +6 -0
- package/presets/cursor/nuxt/rules/design-guidance.mdc +1 -1
- package/presets/cursor/nuxt/rules/layer-barrel-exports.mdc +1 -1
- package/presets/cursor/nuxt/rules/preset-layering.mdc +2 -2
- package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/nuxt/rules/preset-token-budget.mdc +11 -11
- package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/nuxt/rules/reference-features.mdc +1 -1
- package/presets/cursor/nuxt/rules/vue-ui.mdc +7 -0
- package/presets/cursor/php-hexagonal/AGENTS.md +1 -1
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/cursor/php-hexagonal/commands/task.md +1 -1
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +32 -3
- package/presets/cursor/php-hexagonal/rules/README.md +2 -2
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +6 -0
- package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +1 -1
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +10 -10
- package/presets/cursor/php-laravel/AGENTS.md +1 -1
- package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
- package/presets/cursor/php-laravel/commands/task.md +1 -1
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +32 -3
- package/presets/cursor/php-laravel/rules/README.md +2 -2
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +6 -0
- package/presets/cursor/php-laravel/rules/preset-layering.mdc +1 -1
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +10 -10
- package/presets/cursor/svelte/README.md +1 -1
- package/presets/cursor/svelte/agents/build-verifier.md +2 -2
- package/presets/cursor/svelte/commands/task.md +1 -1
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +32 -3
- package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +6 -0
- package/presets/cursor/svelte/rules/layer-barrel-exports.mdc +1 -1
- package/presets/cursor/svelte/rules/preset-layering.mdc +2 -2
- package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/svelte/rules/preset-token-budget.mdc +11 -11
- package/presets/cursor/svelte/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/svelte/rules/reference-features.mdc +1 -1
- package/presets/cursor/svelte/rules/svelte-ui.mdc +7 -0
- package/presets/mavis/android-kotlin/adapter-map.json +1 -1
- package/presets/mavis/android-kotlin/agents/build-verifier.md +2 -2
- package/presets/mavis/android-kotlin/commands/spec-start.md +2 -2
- package/presets/mavis/android-kotlin/commands/task.md +6 -6
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +32 -3
- package/presets/mavis/android-kotlin/rules/code-quality-and-refactoring.md +14 -0
- package/presets/mavis/android-kotlin/rules/code-review-mr.md +39 -0
- package/presets/mavis/android-kotlin/rules/compose-ui.md +2 -0
- package/presets/mavis/android-kotlin/rules/design-guidance.md +5 -0
- package/presets/mavis/android-kotlin/rules/mcp-usage.md +8 -0
- package/presets/mavis/android-kotlin/rules/mockup-review.md +4 -0
- package/presets/mavis/android-kotlin/rules/preset-layering.md +1 -1
- package/presets/mavis/android-kotlin/rules/preset-no-cross-stack-leakage.md +4 -0
- package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/android-kotlin/rules/preset-token-budget.md +10 -10
- package/presets/mavis/android-kotlin/rules/product-specs-authoring.md +6 -0
- package/presets/mavis/android-kotlin/rules/product-specs.md +5 -0
- package/presets/mavis/android-kotlin/rules/ux-design.md +4 -0
- package/presets/mavis/android-kotlin/skills/debug-investigation/SKILL.md +39 -0
- package/presets/mavis/go/adapter-map.json +1 -1
- package/presets/mavis/go/agents/build-verifier.md +1 -1
- package/presets/mavis/go/commands/spec-start.md +2 -2
- package/presets/mavis/go/commands/task.md +6 -6
- package/presets/mavis/go/hooks/chain-team-phases.sh +32 -3
- package/presets/mavis/go/rules/agent-team-intake.md +4 -0
- package/presets/mavis/go/rules/code-quality-and-refactoring.md +15 -0
- package/presets/mavis/go/rules/code-review-mr.md +7 -0
- package/presets/mavis/go/rules/design-guidance.md +5 -0
- package/presets/mavis/go/rules/mcp-usage.md +7 -0
- package/presets/mavis/go/rules/preset-layering.md +1 -1
- package/presets/mavis/go/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/go/rules/preset-token-budget.md +10 -10
- package/presets/mavis/go/rules/product-specs-authoring.md +6 -0
- package/presets/mavis/go/rules/product-specs.md +6 -0
- package/presets/mavis/go/skills/debug-investigation/SKILL.md +20 -0
- package/presets/mavis/ios-swift/adapter-map.json +1 -1
- package/presets/mavis/ios-swift/agents/build-verifier.md +3 -3
- package/presets/mavis/ios-swift/commands/spec-start.md +2 -2
- package/presets/mavis/ios-swift/commands/task.md +6 -6
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +32 -3
- package/presets/mavis/ios-swift/rules/code-quality-and-refactoring.md +14 -0
- package/presets/mavis/ios-swift/rules/code-review-mr.md +39 -0
- package/presets/mavis/ios-swift/rules/design-guidance.md +5 -0
- package/presets/mavis/ios-swift/rules/feature-delivery-workflow.md +66 -0
- package/presets/mavis/ios-swift/rules/mcp-usage.md +8 -0
- package/presets/mavis/ios-swift/rules/mockup-review.md +4 -0
- package/presets/mavis/ios-swift/rules/preset-layering.md +1 -1
- package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/ios-swift/rules/preset-token-budget.md +10 -10
- package/presets/mavis/ios-swift/rules/product-specs-authoring.md +6 -0
- package/presets/mavis/ios-swift/rules/product-specs.md +5 -0
- package/presets/mavis/ios-swift/rules/reference-features.md +49 -0
- package/presets/mavis/ios-swift/rules/swiftui-ui.md +7 -0
- package/presets/mavis/ios-swift/rules/ux-design.md +4 -0
- package/presets/mavis/ios-swift/skills/debug-investigation/SKILL.md +39 -0
- package/presets/mavis/java/adapter-map.json +1 -1
- package/presets/mavis/java/agents/build-verifier.md +1 -1
- package/presets/mavis/java/commands/spec-start.md +2 -2
- package/presets/mavis/java/commands/task.md +6 -6
- package/presets/mavis/java/hooks/chain-team-phases.sh +32 -3
- package/presets/mavis/java/rules/agent-team-intake.md +4 -0
- package/presets/mavis/java/rules/code-quality-and-refactoring.md +15 -0
- package/presets/mavis/java/rules/code-review-mr.md +9 -0
- package/presets/mavis/java/rules/design-guidance.md +6 -0
- package/presets/mavis/java/rules/mcp-usage.md +6 -0
- package/presets/mavis/java/rules/preset-layering.md +1 -1
- package/presets/mavis/java/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/java/rules/preset-token-budget.md +10 -10
- package/presets/mavis/java/rules/product-specs-authoring.md +6 -0
- package/presets/mavis/java/rules/product-specs.md +6 -0
- package/presets/mavis/java/skills/debug-investigation/SKILL.md +20 -0
- package/presets/mavis/mcp-ts/adapter-map.json +1 -1
- package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/mavis/mcp-ts/commands/spec-start.md +2 -2
- package/presets/mavis/mcp-ts/commands/task.md +6 -6
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +32 -3
- package/presets/mavis/mcp-ts/rules/agent-team-intake.md +5 -0
- package/presets/mavis/mcp-ts/rules/anti-sycophancy-discipline.md +4 -0
- package/presets/mavis/mcp-ts/rules/code-quality-and-refactoring.md +15 -0
- package/presets/mavis/mcp-ts/rules/code-review-mr.md +6 -0
- package/presets/mavis/mcp-ts/rules/design-guidance.md +5 -0
- package/presets/mavis/mcp-ts/rules/mcp-usage.md +7 -0
- package/presets/mavis/mcp-ts/rules/preset-layering.md +1 -1
- package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/mcp-ts/rules/preset-token-budget.md +10 -10
- package/presets/mavis/mcp-ts/rules/product-specs-authoring.md +6 -0
- package/presets/mavis/mcp-ts/rules/product-specs.md +6 -0
- package/presets/mavis/mcp-ts/skills/debug-investigation/SKILL.md +15 -0
- package/presets/mavis/next/adapter-map.json +1 -1
- package/presets/mavis/next/agents/build-verifier.md +2 -2
- package/presets/mavis/next/commands/spec-start.md +2 -2
- package/presets/mavis/next/commands/task.md +6 -6
- package/presets/mavis/next/hooks/chain-team-phases.sh +32 -3
- package/presets/mavis/next/rules/api-services.md +6 -4
- package/presets/mavis/next/rules/code-quality-and-refactoring.md +13 -0
- package/presets/mavis/next/rules/code-review-mr.md +13 -0
- package/presets/mavis/next/rules/design-guidance.md +5 -0
- package/presets/mavis/next/rules/feature-delivery-workflow.md +85 -0
- package/presets/mavis/next/rules/mcp-usage.md +9 -0
- package/presets/mavis/next/rules/mockup-review.md +4 -0
- package/presets/mavis/next/rules/next-app-core.md +2 -1
- package/presets/mavis/next/rules/preset-layering.md +1 -1
- package/presets/mavis/next/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/next/rules/preset-token-budget.md +10 -10
- package/presets/mavis/next/rules/product-specs-authoring.md +6 -0
- package/presets/mavis/next/rules/product-specs.md +6 -0
- package/presets/mavis/next/rules/react-ui.md +37 -1
- package/presets/mavis/next/rules/reference-features.md +36 -0
- package/presets/mavis/next/rules/store-rtk.md +6 -5
- package/presets/mavis/next/rules/tests-e2e-structure.md +15 -0
- package/presets/mavis/next/rules/tests-unit.md +33 -0
- package/presets/mavis/next/rules/ux-design.md +4 -0
- package/presets/mavis/next/skills/debug-investigation/SKILL.md +28 -0
- package/presets/mavis/nuxt/adapter-map.json +1 -1
- package/presets/mavis/nuxt/agents/build-verifier.md +2 -2
- package/presets/mavis/nuxt/commands/spec-start.md +2 -2
- package/presets/mavis/nuxt/commands/task.md +6 -6
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +32 -3
- package/presets/mavis/nuxt/rules/code-quality-and-refactoring.md +13 -0
- package/presets/mavis/nuxt/rules/code-review-mr.md +13 -0
- package/presets/mavis/nuxt/rules/design-guidance.md +5 -0
- package/presets/mavis/nuxt/rules/feature-delivery-workflow.md +82 -0
- package/presets/mavis/nuxt/rules/mcp-usage.md +9 -0
- package/presets/mavis/nuxt/rules/mockup-review.md +4 -0
- package/presets/mavis/nuxt/rules/preset-layering.md +1 -1
- package/presets/mavis/nuxt/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/nuxt/rules/preset-token-budget.md +10 -10
- package/presets/mavis/nuxt/rules/product-specs-authoring.md +6 -0
- package/presets/mavis/nuxt/rules/product-specs.md +5 -0
- package/presets/mavis/nuxt/rules/reference-features.md +36 -0
- package/presets/mavis/nuxt/rules/tests-e2e-structure.md +16 -0
- package/presets/mavis/nuxt/rules/tests-unit.md +11 -0
- package/presets/mavis/nuxt/rules/ux-design.md +4 -0
- package/presets/mavis/nuxt/rules/vue-ui.md +7 -0
- package/presets/mavis/nuxt/skills/debug-investigation/SKILL.md +30 -0
- package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
- package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/mavis/php-hexagonal/commands/spec-start.md +2 -2
- package/presets/mavis/php-hexagonal/commands/task.md +6 -6
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +32 -3
- package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +4 -0
- package/presets/mavis/php-hexagonal/rules/code-quality-and-refactoring.md +15 -0
- package/presets/mavis/php-hexagonal/rules/code-review-mr.md +9 -0
- package/presets/mavis/php-hexagonal/rules/design-guidance.md +6 -0
- package/presets/mavis/php-hexagonal/rules/mcp-usage.md +6 -0
- package/presets/mavis/php-hexagonal/rules/preset-layering.md +1 -1
- package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/php-hexagonal/rules/preset-token-budget.md +10 -10
- package/presets/mavis/php-hexagonal/rules/product-specs-authoring.md +6 -0
- package/presets/mavis/php-hexagonal/rules/product-specs.md +6 -0
- package/presets/mavis/php-hexagonal/skills/debug-investigation/SKILL.md +20 -0
- package/presets/mavis/php-laravel/adapter-map.json +1 -1
- package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
- package/presets/mavis/php-laravel/commands/spec-start.md +2 -2
- package/presets/mavis/php-laravel/commands/task.md +6 -6
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +32 -3
- package/presets/mavis/php-laravel/rules/agent-team-intake.md +4 -0
- package/presets/mavis/php-laravel/rules/code-quality-and-refactoring.md +15 -0
- package/presets/mavis/php-laravel/rules/code-review-mr.md +10 -0
- package/presets/mavis/php-laravel/rules/design-guidance.md +6 -0
- package/presets/mavis/php-laravel/rules/mcp-usage.md +6 -0
- package/presets/mavis/php-laravel/rules/preset-layering.md +1 -1
- package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/php-laravel/rules/preset-token-budget.md +10 -10
- package/presets/mavis/php-laravel/rules/product-specs-authoring.md +6 -0
- package/presets/mavis/php-laravel/rules/product-specs.md +6 -0
- package/presets/mavis/php-laravel/skills/debug-investigation/SKILL.md +20 -0
- package/presets/mavis/svelte/adapter-map.json +1 -1
- package/presets/mavis/svelte/agents/build-verifier.md +2 -2
- package/presets/mavis/svelte/commands/spec-start.md +2 -2
- package/presets/mavis/svelte/commands/task.md +6 -6
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +32 -3
- package/presets/mavis/svelte/rules/code-quality-and-refactoring.md +13 -0
- package/presets/mavis/svelte/rules/code-review-mr.md +13 -0
- package/presets/mavis/svelte/rules/design-guidance.md +5 -0
- package/presets/mavis/svelte/rules/feature-delivery-workflow.md +54 -0
- package/presets/mavis/svelte/rules/mcp-usage.md +9 -0
- package/presets/mavis/svelte/rules/mockup-review.md +4 -0
- package/presets/mavis/svelte/rules/preset-layering.md +1 -1
- package/presets/mavis/svelte/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/svelte/rules/preset-token-budget.md +10 -10
- package/presets/mavis/svelte/rules/product-specs-authoring.md +6 -0
- package/presets/mavis/svelte/rules/product-specs.md +5 -0
- package/presets/mavis/svelte/rules/reference-features.md +37 -0
- package/presets/mavis/svelte/rules/svelte-ui.md +7 -0
- package/presets/mavis/svelte/rules/tests-e2e-structure.md +16 -0
- package/presets/mavis/svelte/rules/tests-unit.md +11 -0
- package/presets/mavis/svelte/rules/ux-design.md +4 -0
- package/presets/mavis/svelte/skills/debug-investigation/SKILL.md +30 -0
- package/presets/opencode/android-kotlin/adapter-map.json +1 -1
- package/presets/opencode/android-kotlin/agents/build-verifier.md +2 -2
- package/presets/opencode/android-kotlin/commands/spec-start.md +1 -1
- package/presets/opencode/android-kotlin/commands/task-continue.md +1 -1
- package/presets/opencode/android-kotlin/commands/task.md +1 -1
- package/presets/opencode/android-kotlin/commands/technical-retro.md +1 -1
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +32 -3
- package/presets/opencode/android-kotlin/rules/code-quality-and-refactoring.md +14 -0
- package/presets/opencode/android-kotlin/rules/code-review-mr.md +39 -0
- package/presets/opencode/android-kotlin/rules/compose-ui.md +2 -0
- package/presets/opencode/android-kotlin/rules/design-guidance.md +5 -0
- package/presets/opencode/android-kotlin/rules/mcp-usage.md +8 -0
- package/presets/opencode/android-kotlin/rules/mockup-review.md +4 -0
- package/presets/opencode/android-kotlin/rules/preset-layering.md +1 -1
- package/presets/opencode/android-kotlin/rules/preset-no-cross-stack-leakage.md +4 -0
- package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/android-kotlin/rules/preset-token-budget.md +10 -10
- package/presets/opencode/android-kotlin/rules/product-specs-authoring.md +6 -0
- package/presets/opencode/android-kotlin/rules/product-specs.md +5 -0
- package/presets/opencode/android-kotlin/rules/ux-design.md +4 -0
- package/presets/opencode/android-kotlin/skills/ci-investigation/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/skills/code-review/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/skills/debug-investigation/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/skills/instrumentation-ui-e2e/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/skills/mockup-review/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/skills/spec-authoring/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/skills/spec-discovery/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/skills/ux-design/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/skills/write-adr/SKILL.md +1 -1
- package/presets/opencode/go/adapter-map.json +1 -1
- package/presets/opencode/go/agents/build-verifier.md +1 -1
- package/presets/opencode/go/commands/spec-start.md +1 -1
- package/presets/opencode/go/commands/task-continue.md +1 -1
- package/presets/opencode/go/commands/task.md +1 -1
- package/presets/opencode/go/commands/technical-retro.md +1 -1
- package/presets/opencode/go/hooks/chain-team-phases.sh +32 -3
- package/presets/opencode/go/rules/agent-team-intake.md +4 -0
- package/presets/opencode/go/rules/code-quality-and-refactoring.md +15 -0
- package/presets/opencode/go/rules/code-review-mr.md +7 -0
- package/presets/opencode/go/rules/design-guidance.md +5 -0
- package/presets/opencode/go/rules/mcp-usage.md +7 -0
- package/presets/opencode/go/rules/preset-layering.md +1 -1
- package/presets/opencode/go/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/go/rules/preset-token-budget.md +10 -10
- package/presets/opencode/go/rules/product-specs-authoring.md +6 -0
- package/presets/opencode/go/rules/product-specs.md +6 -0
- package/presets/opencode/go/skills/ci-investigation/SKILL.md +1 -1
- package/presets/opencode/go/skills/code-review/SKILL.md +1 -1
- package/presets/opencode/go/skills/debug-investigation/SKILL.md +1 -1
- package/presets/opencode/go/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/go/skills/integration-testing/SKILL.md +1 -1
- package/presets/opencode/go/skills/spec-authoring/SKILL.md +1 -1
- package/presets/opencode/go/skills/spec-discovery/SKILL.md +1 -1
- package/presets/opencode/go/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/go/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/go/skills/write-adr/SKILL.md +1 -1
- package/presets/opencode/ios-swift/adapter-map.json +1 -1
- package/presets/opencode/ios-swift/agents/build-verifier.md +3 -3
- package/presets/opencode/ios-swift/commands/spec-start.md +1 -1
- package/presets/opencode/ios-swift/commands/task-continue.md +1 -1
- package/presets/opencode/ios-swift/commands/task.md +1 -1
- package/presets/opencode/ios-swift/commands/technical-retro.md +1 -1
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +32 -3
- package/presets/opencode/ios-swift/rules/code-quality-and-refactoring.md +14 -0
- package/presets/opencode/ios-swift/rules/code-review-mr.md +39 -0
- package/presets/opencode/ios-swift/rules/design-guidance.md +5 -0
- package/presets/opencode/ios-swift/rules/feature-delivery-workflow.md +66 -0
- package/presets/opencode/ios-swift/rules/mcp-usage.md +8 -0
- package/presets/opencode/ios-swift/rules/mockup-review.md +4 -0
- package/presets/opencode/ios-swift/rules/preset-layering.md +1 -1
- package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/ios-swift/rules/preset-token-budget.md +10 -10
- package/presets/opencode/ios-swift/rules/product-specs-authoring.md +6 -0
- package/presets/opencode/ios-swift/rules/product-specs.md +5 -0
- package/presets/opencode/ios-swift/rules/reference-features.md +49 -0
- package/presets/opencode/ios-swift/rules/swiftui-ui.md +7 -0
- package/presets/opencode/ios-swift/rules/ux-design.md +4 -0
- package/presets/opencode/ios-swift/skills/ci-investigation/SKILL.md +1 -1
- package/presets/opencode/ios-swift/skills/code-review/SKILL.md +1 -1
- package/presets/opencode/ios-swift/skills/debug-investigation/SKILL.md +1 -1
- package/presets/opencode/ios-swift/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/ios-swift/skills/mockup-review/SKILL.md +1 -1
- package/presets/opencode/ios-swift/skills/spec-authoring/SKILL.md +1 -1
- package/presets/opencode/ios-swift/skills/spec-discovery/SKILL.md +1 -1
- package/presets/opencode/ios-swift/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/ios-swift/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/ios-swift/skills/ux-design/SKILL.md +1 -1
- package/presets/opencode/ios-swift/skills/write-adr/SKILL.md +1 -1
- package/presets/opencode/ios-swift/skills/xcuitest-e2e/SKILL.md +1 -1
- package/presets/opencode/java/adapter-map.json +1 -1
- package/presets/opencode/java/agents/build-verifier.md +1 -1
- package/presets/opencode/java/commands/spec-start.md +1 -1
- package/presets/opencode/java/commands/task-continue.md +1 -1
- package/presets/opencode/java/commands/task.md +1 -1
- package/presets/opencode/java/commands/technical-retro.md +1 -1
- package/presets/opencode/java/hooks/chain-team-phases.sh +32 -3
- package/presets/opencode/java/rules/agent-team-intake.md +4 -0
- package/presets/opencode/java/rules/code-quality-and-refactoring.md +15 -0
- package/presets/opencode/java/rules/code-review-mr.md +9 -0
- package/presets/opencode/java/rules/design-guidance.md +6 -0
- package/presets/opencode/java/rules/mcp-usage.md +6 -0
- package/presets/opencode/java/rules/preset-layering.md +1 -1
- package/presets/opencode/java/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/java/rules/preset-token-budget.md +10 -10
- package/presets/opencode/java/rules/product-specs-authoring.md +6 -0
- package/presets/opencode/java/rules/product-specs.md +6 -0
- package/presets/opencode/java/skills/ci-investigation/SKILL.md +1 -1
- package/presets/opencode/java/skills/code-review/SKILL.md +1 -1
- package/presets/opencode/java/skills/debug-investigation/SKILL.md +1 -1
- package/presets/opencode/java/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/java/skills/integration-testing/SKILL.md +1 -1
- package/presets/opencode/java/skills/spec-authoring/SKILL.md +1 -1
- package/presets/opencode/java/skills/spec-discovery/SKILL.md +1 -1
- package/presets/opencode/java/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/java/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/java/skills/write-adr/SKILL.md +1 -1
- package/presets/opencode/mcp-ts/adapter-map.json +1 -1
- package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/opencode/mcp-ts/commands/spec-start.md +1 -1
- package/presets/opencode/mcp-ts/commands/task-continue.md +1 -1
- package/presets/opencode/mcp-ts/commands/task.md +1 -1
- package/presets/opencode/mcp-ts/commands/technical-retro.md +1 -1
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +32 -3
- package/presets/opencode/mcp-ts/rules/agent-team-intake.md +5 -0
- package/presets/opencode/mcp-ts/rules/anti-sycophancy-discipline.md +4 -0
- package/presets/opencode/mcp-ts/rules/code-quality-and-refactoring.md +15 -0
- package/presets/opencode/mcp-ts/rules/code-review-mr.md +6 -0
- package/presets/opencode/mcp-ts/rules/design-guidance.md +5 -0
- package/presets/opencode/mcp-ts/rules/mcp-usage.md +7 -0
- package/presets/opencode/mcp-ts/rules/preset-layering.md +1 -1
- package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/mcp-ts/rules/preset-token-budget.md +10 -10
- package/presets/opencode/mcp-ts/rules/product-specs-authoring.md +6 -0
- package/presets/opencode/mcp-ts/rules/product-specs.md +6 -0
- package/presets/opencode/mcp-ts/skills/code-review/SKILL.md +1 -1
- package/presets/opencode/mcp-ts/skills/debug-investigation/SKILL.md +1 -1
- package/presets/opencode/mcp-ts/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/mcp-ts/skills/spec-authoring/SKILL.md +1 -1
- package/presets/opencode/mcp-ts/skills/spec-discovery/SKILL.md +1 -1
- package/presets/opencode/mcp-ts/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/next/adapter-map.json +1 -1
- package/presets/opencode/next/agents/build-verifier.md +2 -2
- package/presets/opencode/next/commands/spec-start.md +1 -1
- package/presets/opencode/next/commands/task-continue.md +1 -1
- package/presets/opencode/next/commands/task.md +1 -1
- package/presets/opencode/next/commands/technical-retro.md +1 -1
- package/presets/opencode/next/hooks/chain-team-phases.sh +32 -3
- package/presets/opencode/next/rules/api-services.md +6 -4
- package/presets/opencode/next/rules/code-quality-and-refactoring.md +13 -0
- package/presets/opencode/next/rules/code-review-mr.md +13 -0
- package/presets/opencode/next/rules/design-guidance.md +5 -0
- package/presets/opencode/next/rules/feature-delivery-workflow.md +85 -0
- package/presets/opencode/next/rules/mcp-usage.md +9 -0
- package/presets/opencode/next/rules/mockup-review.md +4 -0
- package/presets/opencode/next/rules/next-app-core.md +2 -1
- package/presets/opencode/next/rules/preset-layering.md +1 -1
- package/presets/opencode/next/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/next/rules/preset-token-budget.md +10 -10
- package/presets/opencode/next/rules/product-specs-authoring.md +6 -0
- package/presets/opencode/next/rules/product-specs.md +6 -0
- package/presets/opencode/next/rules/react-ui.md +37 -1
- package/presets/opencode/next/rules/reference-features.md +36 -0
- package/presets/opencode/next/rules/store-rtk.md +6 -5
- package/presets/opencode/next/rules/tests-e2e-structure.md +15 -0
- package/presets/opencode/next/rules/tests-unit.md +33 -0
- package/presets/opencode/next/rules/ux-design.md +4 -0
- package/presets/opencode/next/skills/ci-investigation/SKILL.md +1 -1
- package/presets/opencode/next/skills/code-review/SKILL.md +1 -1
- package/presets/opencode/next/skills/debug-investigation/SKILL.md +1 -1
- package/presets/opencode/next/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/next/skills/mockup-review/SKILL.md +1 -1
- package/presets/opencode/next/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/opencode/next/skills/react-performance/SKILL.md +1 -1
- package/presets/opencode/next/skills/spec-authoring/SKILL.md +1 -1
- package/presets/opencode/next/skills/spec-discovery/SKILL.md +1 -1
- package/presets/opencode/next/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/next/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/next/skills/ux-design/SKILL.md +1 -1
- package/presets/opencode/next/skills/write-adr/SKILL.md +1 -1
- package/presets/opencode/nuxt/adapter-map.json +1 -1
- package/presets/opencode/nuxt/agents/build-verifier.md +2 -2
- package/presets/opencode/nuxt/commands/spec-start.md +1 -1
- package/presets/opencode/nuxt/commands/task-continue.md +1 -1
- package/presets/opencode/nuxt/commands/task.md +1 -1
- package/presets/opencode/nuxt/commands/technical-retro.md +1 -1
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +32 -3
- package/presets/opencode/nuxt/rules/code-quality-and-refactoring.md +13 -0
- package/presets/opencode/nuxt/rules/code-review-mr.md +13 -0
- package/presets/opencode/nuxt/rules/design-guidance.md +5 -0
- package/presets/opencode/nuxt/rules/feature-delivery-workflow.md +82 -0
- package/presets/opencode/nuxt/rules/mcp-usage.md +9 -0
- package/presets/opencode/nuxt/rules/mockup-review.md +4 -0
- package/presets/opencode/nuxt/rules/preset-layering.md +1 -1
- package/presets/opencode/nuxt/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/nuxt/rules/preset-token-budget.md +10 -10
- package/presets/opencode/nuxt/rules/product-specs-authoring.md +6 -0
- package/presets/opencode/nuxt/rules/product-specs.md +5 -0
- package/presets/opencode/nuxt/rules/reference-features.md +36 -0
- package/presets/opencode/nuxt/rules/tests-e2e-structure.md +16 -0
- package/presets/opencode/nuxt/rules/tests-unit.md +11 -0
- package/presets/opencode/nuxt/rules/ux-design.md +4 -0
- package/presets/opencode/nuxt/rules/vue-ui.md +7 -0
- package/presets/opencode/nuxt/skills/ci-investigation/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/code-review/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/debug-investigation/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/mockup-review/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/spec-authoring/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/spec-discovery/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/ux-design/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/vue-performance/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/write-adr/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
- package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/opencode/php-hexagonal/commands/spec-start.md +1 -1
- package/presets/opencode/php-hexagonal/commands/task-continue.md +1 -1
- package/presets/opencode/php-hexagonal/commands/task.md +1 -1
- package/presets/opencode/php-hexagonal/commands/technical-retro.md +1 -1
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +32 -3
- package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +4 -0
- package/presets/opencode/php-hexagonal/rules/code-quality-and-refactoring.md +15 -0
- package/presets/opencode/php-hexagonal/rules/code-review-mr.md +9 -0
- package/presets/opencode/php-hexagonal/rules/design-guidance.md +6 -0
- package/presets/opencode/php-hexagonal/rules/mcp-usage.md +6 -0
- package/presets/opencode/php-hexagonal/rules/preset-layering.md +1 -1
- package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/php-hexagonal/rules/preset-token-budget.md +10 -10
- package/presets/opencode/php-hexagonal/rules/product-specs-authoring.md +6 -0
- package/presets/opencode/php-hexagonal/rules/product-specs.md +6 -0
- package/presets/opencode/php-hexagonal/skills/ci-investigation/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/skills/code-review/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/skills/debug-investigation/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/skills/integration-testing/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/skills/spec-authoring/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/skills/spec-discovery/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/skills/write-adr/SKILL.md +1 -1
- package/presets/opencode/php-laravel/adapter-map.json +1 -1
- package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
- package/presets/opencode/php-laravel/commands/spec-start.md +1 -1
- package/presets/opencode/php-laravel/commands/task-continue.md +1 -1
- package/presets/opencode/php-laravel/commands/task.md +1 -1
- package/presets/opencode/php-laravel/commands/technical-retro.md +1 -1
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +32 -3
- package/presets/opencode/php-laravel/rules/agent-team-intake.md +4 -0
- package/presets/opencode/php-laravel/rules/code-quality-and-refactoring.md +15 -0
- package/presets/opencode/php-laravel/rules/code-review-mr.md +10 -0
- package/presets/opencode/php-laravel/rules/design-guidance.md +6 -0
- package/presets/opencode/php-laravel/rules/mcp-usage.md +6 -0
- package/presets/opencode/php-laravel/rules/preset-layering.md +1 -1
- package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/php-laravel/rules/preset-token-budget.md +10 -10
- package/presets/opencode/php-laravel/rules/product-specs-authoring.md +6 -0
- package/presets/opencode/php-laravel/rules/product-specs.md +6 -0
- package/presets/opencode/php-laravel/skills/ci-investigation/SKILL.md +1 -1
- package/presets/opencode/php-laravel/skills/code-review/SKILL.md +1 -1
- package/presets/opencode/php-laravel/skills/debug-investigation/SKILL.md +1 -1
- package/presets/opencode/php-laravel/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/php-laravel/skills/integration-testing/SKILL.md +1 -1
- package/presets/opencode/php-laravel/skills/spec-authoring/SKILL.md +1 -1
- package/presets/opencode/php-laravel/skills/spec-discovery/SKILL.md +1 -1
- package/presets/opencode/php-laravel/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/php-laravel/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/php-laravel/skills/write-adr/SKILL.md +1 -1
- package/presets/opencode/svelte/adapter-map.json +1 -1
- package/presets/opencode/svelte/agents/build-verifier.md +2 -2
- package/presets/opencode/svelte/commands/spec-start.md +1 -1
- package/presets/opencode/svelte/commands/task-continue.md +1 -1
- package/presets/opencode/svelte/commands/task.md +1 -1
- package/presets/opencode/svelte/commands/technical-retro.md +1 -1
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +32 -3
- package/presets/opencode/svelte/rules/code-quality-and-refactoring.md +13 -0
- package/presets/opencode/svelte/rules/code-review-mr.md +13 -0
- package/presets/opencode/svelte/rules/design-guidance.md +5 -0
- package/presets/opencode/svelte/rules/feature-delivery-workflow.md +54 -0
- package/presets/opencode/svelte/rules/mcp-usage.md +9 -0
- package/presets/opencode/svelte/rules/mockup-review.md +4 -0
- package/presets/opencode/svelte/rules/preset-layering.md +1 -1
- package/presets/opencode/svelte/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/svelte/rules/preset-token-budget.md +10 -10
- package/presets/opencode/svelte/rules/product-specs-authoring.md +6 -0
- package/presets/opencode/svelte/rules/product-specs.md +5 -0
- package/presets/opencode/svelte/rules/reference-features.md +37 -0
- package/presets/opencode/svelte/rules/svelte-ui.md +7 -0
- package/presets/opencode/svelte/rules/tests-e2e-structure.md +16 -0
- package/presets/opencode/svelte/rules/tests-unit.md +11 -0
- package/presets/opencode/svelte/rules/ux-design.md +4 -0
- package/presets/opencode/svelte/skills/ci-investigation/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/code-review/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/debug-investigation/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/mockup-review/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/spec-authoring/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/spec-discovery/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/svelte-performance/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/ux-design/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/write-adr/SKILL.md +1 -1
- package/scripts/capture-cli-golden.mjs +8 -5
- package/scripts/check-frontmatter.mjs +83 -0
- package/scripts/check-generated-drift.mjs +106 -0
- package/scripts/check-mavis-token-budget.mjs +1 -1
- package/scripts/check-opencode-token-budget.mjs +1 -1
- package/scripts/check-preset-structure.sh +27 -0
- package/scripts/check-preset-token-budget.sh +16 -17
- package/scripts/check-shared-core-drift.sh +10 -5
- package/scripts/close-agent-task-human-gate.mjs +6 -4
- package/scripts/fixtures/cli-golden/claude/next.json +24 -18
- package/scripts/fixtures/cli-golden/cursor/next.json +17 -17
- package/scripts/fixtures/cli-golden/mavis/android-kotlin.json +18 -18
- package/scripts/fixtures/cli-golden/mavis/go.json +15 -15
- package/scripts/fixtures/cli-golden/mavis/ios-swift.json +19 -19
- package/scripts/fixtures/cli-golden/mavis/java.json +15 -15
- package/scripts/fixtures/cli-golden/mavis/mcp-ts.json +16 -16
- package/scripts/fixtures/cli-golden/mavis/next.json +24 -24
- package/scripts/fixtures/cli-golden/mavis/nuxt.json +21 -21
- package/scripts/fixtures/cli-golden/mavis/php-hexagonal.json +15 -15
- package/scripts/fixtures/cli-golden/mavis/php-laravel.json +15 -15
- package/scripts/fixtures/cli-golden/mavis/svelte.json +21 -21
- package/scripts/fixtures/cli-golden/opencode/android-kotlin.json +31 -31
- package/scripts/fixtures/cli-golden/opencode/go.json +26 -26
- package/scripts/fixtures/cli-golden/opencode/ios-swift.json +32 -32
- package/scripts/fixtures/cli-golden/opencode/java.json +26 -26
- package/scripts/fixtures/cli-golden/opencode/mcp-ts.json +23 -23
- package/scripts/fixtures/cli-golden/opencode/next.json +38 -38
- package/scripts/fixtures/cli-golden/opencode/nuxt.json +35 -35
- package/scripts/fixtures/cli-golden/opencode/php-hexagonal.json +26 -26
- package/scripts/fixtures/cli-golden/opencode/php-laravel.json +26 -26
- package/scripts/fixtures/cli-golden/opencode/svelte.json +35 -35
- package/scripts/lib/generate-adapter-common.mjs +11 -0
- package/scripts/lib/generate-mavis-adapter.mjs +20 -10
- package/scripts/lib/generate-opencode-adapter.mjs +19 -4
- package/scripts/test-agent-task-metrics-hooks.mjs +5 -5
- package/scripts/test-chain-team-phases-coverage.mjs +176 -1
- package/scripts/test-cli-init-clean.mjs +165 -34
- package/scripts/test-mavis-context-budget.mjs +1 -1
- package/scripts/test-opencode-context-budget.mjs +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task
|
|
3
|
-
description: Route a natural-language task through the agent-team pipeline: task-router, pipeline.json, and the first planned specialist.
|
|
3
|
+
description: "Route a natural-language task through the agent-team pipeline: task-router, pipeline.json, and the first planned specialist."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Task — unified entry point (router + pipeline)
|
|
@@ -43,7 +43,10 @@ try {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const slug = active.slug;
|
|
46
|
-
|
|
46
|
+
// Reject non-kebab / traversal slugs: the runtime writes status.json and
|
|
47
|
+
// metrics.json under tasks/<slug>, so an unchecked slug could escape the tree.
|
|
48
|
+
const SLUG_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
49
|
+
if (typeof slug !== 'string' || slug.length > 48 || !SLUG_RE.test(slug)) {
|
|
47
50
|
process.stdout.write('{}');
|
|
48
51
|
process.exit(0);
|
|
49
52
|
}
|
|
@@ -70,6 +73,9 @@ function waitForMetricsLock() {
|
|
|
70
73
|
// and never blocked on the lock file, so two concurrent subagentStop events
|
|
71
74
|
// could both acquire the lock and corrupt metrics.json. Retry EEXIST with a
|
|
72
75
|
// 10 ms sleep up to 200 attempts (2 s ceiling). On any other error, throw.
|
|
76
|
+
// A lock left behind by a killed process is reclaimed once its mtime is older
|
|
77
|
+
// than STALE_LOCK_MS, so one crash cannot brick the task forever.
|
|
78
|
+
const STALE_LOCK_MS = 30000;
|
|
73
79
|
for (let attempt = 0; attempt < 200; attempt += 1) {
|
|
74
80
|
try {
|
|
75
81
|
const fd = fs.openSync(METRICS_LOCK, 'wx');
|
|
@@ -77,6 +83,13 @@ function waitForMetricsLock() {
|
|
|
77
83
|
return;
|
|
78
84
|
} catch (error) {
|
|
79
85
|
if (!error || error.code !== 'EEXIST') throw error;
|
|
86
|
+
try {
|
|
87
|
+
const lockStat = fs.statSync(METRICS_LOCK);
|
|
88
|
+
if (Date.now() - lockStat.mtimeMs > STALE_LOCK_MS) {
|
|
89
|
+
fs.unlinkSync(METRICS_LOCK);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
} catch {}
|
|
80
93
|
const until = Date.now() + 10;
|
|
81
94
|
while (Date.now() < until) { /* 10 ms busy-wait */ }
|
|
82
95
|
}
|
|
@@ -490,7 +503,10 @@ function legacyFlow() {
|
|
|
490
503
|
|
|
491
504
|
|
|
492
505
|
if (hookInput.action === 'end_human_gate') {
|
|
493
|
-
|
|
506
|
+
// Only advance when a gate was actually open. A duplicate or retried
|
|
507
|
+
// end_human_gate must be a no-op, not a silent pipeline skip.
|
|
508
|
+
const gateWasOpen = Boolean(status.activeHumanGateEventId) || status.awaitingHumanGate === true;
|
|
509
|
+
status.awaitingHumanGate = false;
|
|
494
510
|
// A2 (retro §8): pin a single runId per pipeline so subsequent events don't
|
|
495
511
|
// fragment the metrics ledger across multiple runId sequences. Prefer
|
|
496
512
|
// metrics.json.task.runId when metrics already exist, then status.metricsRunId,
|
|
@@ -517,7 +533,7 @@ if (hookInput.action === 'end_human_gate') {
|
|
|
517
533
|
});
|
|
518
534
|
delete status.activeHumanGateEventId;
|
|
519
535
|
}
|
|
520
|
-
if (hookInput.activateNext && fs.existsSync(pipelinePath)) {
|
|
536
|
+
if (gateWasOpen && hookInput.activateNext && fs.existsSync(pipelinePath)) {
|
|
521
537
|
let resumePipeline = null;
|
|
522
538
|
try { resumePipeline = JSON.parse(fs.readFileSync(pipelinePath, 'utf8')); } catch {}
|
|
523
539
|
if (resumePipeline) {
|
|
@@ -539,6 +555,19 @@ if (hookInput.action === 'end_human_gate') {
|
|
|
539
555
|
else out(handoffForAgent(resumeAgents[0], resumeNext.step.scope, resumeNext.step));
|
|
540
556
|
process.exit(0);
|
|
541
557
|
}
|
|
558
|
+
// Gate on the final step: no executable step remains. Complete the
|
|
559
|
+
// pipeline instead of leaving it in_progress forever.
|
|
560
|
+
status.state = 'completed';
|
|
561
|
+
completeTaskMetrics();
|
|
562
|
+
writeStatus({
|
|
563
|
+
pipelineIndex: resumeSteps.length,
|
|
564
|
+
phase: 'done',
|
|
565
|
+
state: 'completed',
|
|
566
|
+
currentAgent: null,
|
|
567
|
+
awaitingHumanGate: false,
|
|
568
|
+
});
|
|
569
|
+
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
570
|
+
process.exit(0);
|
|
542
571
|
}
|
|
543
572
|
}
|
|
544
573
|
// A2 (retro §8): if gate closes the final human gate of the pipeline
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Rules (preset go)
|
|
2
2
|
|
|
3
|
-
## alwaysApply (3)
|
|
3
|
+
## alwaysApply (3–5)
|
|
4
4
|
|
|
5
5
|
| Rule | Role |
|
|
6
6
|
|------|------|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| `architecture-boundaries` | Hexagonal invariants |
|
|
9
9
|
| `code-quality-and-refactoring` | Shared quality + Go notes |
|
|
10
10
|
|
|
11
|
-
**Session-start body budget:** sum of the
|
|
11
|
+
**Session-start body budget:** sum of the intended always-on bodies ≤ **200** lines (stretch ≤170).
|
|
12
12
|
|
|
13
13
|
## Twin depth (Cursor↔Claude)
|
|
14
14
|
|
|
@@ -19,6 +19,12 @@ alwaysApply: true
|
|
|
19
19
|
- **CUPID:** Composable; Unix philosophy (one responsibility); Predictable; Idiomatic (repo); Domain-based.
|
|
20
20
|
- **Composition over inheritance;** Law of Demeter — no `a.b.c.d` chains; via public API / facade.
|
|
21
21
|
|
|
22
|
+
# Over-abstraction guardrails
|
|
23
|
+
|
|
24
|
+
- **No unnecessary constants:** do not hoist a one-off literal, string, or boolean into a named constant. Inline it, or use an existing token/enum when the value is meaningful and reused. Named constants are for shared, semantic, or repeated values.
|
|
25
|
+
- **No invented utilities:** do not add a `utils`/helper for a single call site or a thin pass-through wrapper. Inline it or extend the existing helper; a new shared utility is justified only after the Rule of Three.
|
|
26
|
+
- **Decompose over conditionals:** a unit (function, component, hook) that accumulates several branches (`if` / ternary / `switch`) should be split into smaller units with one reason to change instead of piling up conditions.
|
|
27
|
+
|
|
22
28
|
# Refactoring during changes
|
|
23
29
|
|
|
24
30
|
- Light refactor is OK if it reduces duplication, improves readability, and does not break public contracts.
|
|
@@ -18,7 +18,7 @@ Rules for **preset authors** (`packages/ai-rules/presets/**`). Not always-on in
|
|
|
18
18
|
| Layer | Where | What to put |
|
|
19
19
|
|-------|-------|-------------|
|
|
20
20
|
| **Core** | `presets/_shared/core/**` | Stack-agnostic prose + checklists; no frontmatter; no paths `app/**`, `Features/**`, Playwright, xcodebuild |
|
|
21
|
-
| **Stack** | `presets/{cursor\|claude\|mavis\|opencode}/<stack>/` | Domain/tooling, stack always-on
|
|
21
|
+
| **Stack** | `presets/{cursor\|claude\|mavis\|opencode}/<stack>/` | Domain/tooling, stack always-on set (3–5), stack examples in **Stack notes** |
|
|
22
22
|
| **Platform** | Cursor `.mdc` / Claude `.md` / Mavis `.md` / OpenCode `.md` | Frontmatter (`alwaysApply`/`globs` vs `paths:` vs OpenCode `mode`/`permission`), platform-only (`BUGBOT.md`, `CLAUDE.md`) |
|
|
23
23
|
|
|
24
24
|
## Where to put a new rule
|
|
@@ -21,7 +21,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
21
21
|
- [ ] **Mavis derive:** mapped `cursor/<stack>/` change → `mavis/<stack>/` + `adapter-map.json` **same PR** when the stack is in `releasedStacks` (run `generate-mavis.mjs --stack <stack>` + `check-mavis-adapter-map.mjs`; see `preset-twin-sync` § Mavis derivation)
|
|
22
22
|
- [ ] **OpenCode derive:** mapped `cursor/<stack>/` change → `opencode/<stack>/` + `adapter-map.json` **same PR** when the stack is in `releasedStacks` (run `generate-opencode.mjs --stack <stack>` + `check-opencode-adapter-map.mjs`; see `preset-twin-sync` § OpenCode derivation)
|
|
23
23
|
- [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table is current
|
|
24
|
-
- [ ] **Token budget:** Cursor `alwaysApply`
|
|
24
|
+
- [ ] **Token budget:** Cursor `alwaysApply` and Claude session-start both **3–5** (extra slots reserved for `ai-local-overlay`); body sum ≤200 (stretch ≤170); meta rules not always-on
|
|
25
25
|
- [ ] **Local overlay coverage:** every installable stack ships `ai-local-overlay.mdc` (Cursor) and `ai-local-overlay.md` (Claude) with `MANDATORY` + acknowledgement format + `docs/LOCAL-OVERLAY.md` pointer; Claude twin listed in `claude/<stack>/rules/README.md` mapping table. Run `packages/ai-rules/scripts/check-local-overlay.sh`.
|
|
26
26
|
- [ ] **Leakage:** no foreign stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
|
|
27
27
|
- [ ] **Hook-only lifecycle:** `status.json` / `metrics.json` writes happen only inside `hooks/`; agents read but never rewrite lifecycle fields. Run `packages/ai-rules/scripts/check-hook-only-lifecycle.sh`.
|
|
@@ -17,19 +17,19 @@ Invariants for rule loading in an **installed** preset (consumer app).
|
|
|
17
17
|
|
|
18
18
|
| Platform | Always-on | Cap |
|
|
19
19
|
|----------|-----------|-----|
|
|
20
|
-
| Cursor | `alwaysApply: true` |
|
|
21
|
-
| Claude | rules **without** `paths:` | **
|
|
22
|
-
| Mavis | `adapter-map` rules with `loadMode: root-entry` |
|
|
23
|
-
| OpenCode | `adapter-map` rules with `loadMode: root-entry` |
|
|
20
|
+
| Cursor | `alwaysApply: true` | **3–5** |
|
|
21
|
+
| Claude | rules **without** `paths:` | **3–5** |
|
|
22
|
+
| Mavis | `adapter-map` rules with `loadMode: root-entry` | **3–5** |
|
|
23
|
+
| OpenCode | `adapter-map` rules with `loadMode: root-entry` | **3–5** |
|
|
24
24
|
|
|
25
|
-
**
|
|
25
|
+
Caps are **aligned** across platforms: minimum **3** (base invariants), maximum **5**. Slots beyond the base invariants are reserved for `ai-local-overlay` (consumer-owned `.ai.local/` rules). If you do not need local overlay, demote that rule to `globs: ["**/.ai.local/**"]` / Claude `paths:`, or a non-root load mode on Mavis / OpenCode.
|
|
26
26
|
|
|
27
|
-
**Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules).
|
|
27
|
+
**Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules). Body budget sums only the intended session-start rules (≤5).
|
|
28
28
|
|
|
29
29
|
Session-start body budget:
|
|
30
|
-
- Claude
|
|
31
|
-
- Cursor
|
|
32
|
-
- Mavis / OpenCode: ≤
|
|
30
|
+
- Claude session-start: ≤200 lines total (stretch ≤170).
|
|
31
|
+
- Cursor always-on: ≤200 lines total (stretch ≤170).
|
|
32
|
+
- Mavis / OpenCode: ≤5 root-entry rule files; combined root `AGENTS.md` + platform entry ≤200 nonempty lines. Do not dump the full rule catalog into `AGENTS.md`.
|
|
33
33
|
|
|
34
34
|
## Meta / author rules
|
|
35
35
|
|
|
@@ -45,4 +45,4 @@ Orchestrator, feature-delivery, code-review, post-change gates, domain globs —
|
|
|
45
45
|
|
|
46
46
|
## Verifier
|
|
47
47
|
|
|
48
|
-
build-verifier **FAIL** if Cursor `alwaysApply` count
|
|
48
|
+
build-verifier **FAIL** if Cursor `alwaysApply` count or Claude session-start count is outside **3–5** (Claude count **excludes `**/README.md`**), or if a `preset-*` meta rule is marked always-on.
|
|
@@ -13,4 +13,4 @@ npx @bonesofspring/ai-rules init cursor --preset ios-swift
|
|
|
13
13
|
| `rules/`, `agents/`, `skills/`, `commands/`, `hooks/` | `.cursor/<dir>/` |
|
|
14
14
|
| `team/` | **`.ai.local/team/`** (templates; slugs preserved) |
|
|
15
15
|
|
|
16
|
-
Always-on (
|
|
16
|
+
Always-on (3–5): `ios-app-core`, `architecture-boundaries`, `code-quality-and-refactoring`, `ai-local-overlay`. UI tests: `xcuitest-e2e`. Twin: `presets/claude/ios-swift/`. Catalog: [`rules/README.md`](./rules/README.md).
|
|
@@ -36,15 +36,15 @@ When validating **ios-swift preset** changes (or `scope: preset-structure-valida
|
|
|
36
36
|
|
|
37
37
|
### FAIL (all stacks + ios-specific)
|
|
38
38
|
|
|
39
|
-
1. **Token budget:** Cursor `alwaysApply: true` count
|
|
39
|
+
1. **Token budget:** Cursor `alwaysApply: true` count 3–5; Claude rules without `paths:` 3–5 (**exclude `**/README.md`** — Option A). Meta `preset-*` rules must **not** be `alwaysApply: true`.
|
|
40
40
|
2. **Chain fork check:** `hooks/chain-team-phases.sh` must **not** be byte-identical to `presets/cursor/next/hooks/chain-team-phases.sh` (Claude: vs `presets/claude/next/hooks/…`).
|
|
41
41
|
3. **Forbidden handoff strings** in ios-swift `chain-team-phases.sh` (Cursor + Claude): `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`, and positive yarn lint recipes (`lint:js` / `lint:css` as commands to run — negation prose alone is not enough; prefer zero occurrences). See `preset-no-cross-stack-leakage.mdc`.
|
|
42
42
|
4. **Required handoff stems:** `AGENT_HANDOFF` must include `xcuitest-test-planner` (or generator/healer) and `build-verifier` text must mention `xcodebuild` or `post-change-build` / `xcode-tooling`.
|
|
43
|
-
5. **Roster:**
|
|
43
|
+
5. **Roster:** 24 agent stems; no `playwright-test-*` files under ios-swift `agents/`.
|
|
44
44
|
6. **Twin presence (hard):** Cursor rule change → Claude twin present **same PR** — **FAIL** if missing (next, nuxt, svelte, ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel).
|
|
45
45
|
7. **Mapping / README:** `claude/ios-swift/rules/README.md` mapping table present; core→stack mapping documented when `_shared` consumers exist.
|
|
46
46
|
8. **shared-core consumers:** if `_shared/core/**` changed, every matching `<!-- shared-core: … -->` consumer in this PR must be updated (or intentional fork documented).
|
|
47
|
-
9. **Session-start body budget:** sum of the
|
|
47
|
+
9. **Session-start body budget:** sum of the intended always-on / session-start rule bodies ≤ **200** lines (stretch ≤170); do **not** include `**/README.md` — record in report.
|
|
48
48
|
10. **Embed drift (hard in `check:preset-structure`):** `packages/ai-rules/scripts/check-shared-core-drift.sh` with `AI_RULES_DRIFT_FAIL=1`.
|
|
49
49
|
11. **Dogfood (monorepo soft):** `packages/ai-rules/scripts/sync-dogfood-cursor.sh`; mass deletion without migration doc → risk / FAIL for maintainers.
|
|
50
50
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task
|
|
3
|
-
description: Route a natural-language task through the agent-team pipeline: task-router, pipeline.json, and the first planned specialist.
|
|
3
|
+
description: "Route a natural-language task through the agent-team pipeline: task-router, pipeline.json, and the first planned specialist."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Task — single entry point (router + pipeline)
|
|
@@ -42,7 +42,10 @@ try {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
const slug = active.slug;
|
|
45
|
-
|
|
45
|
+
// Reject non-kebab / traversal slugs: the runtime writes status.json and
|
|
46
|
+
// metrics.json under tasks/<slug>, so an unchecked slug could escape the tree.
|
|
47
|
+
const SLUG_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
48
|
+
if (typeof slug !== 'string' || slug.length > 48 || !SLUG_RE.test(slug)) {
|
|
46
49
|
process.stdout.write('{}');
|
|
47
50
|
process.exit(0);
|
|
48
51
|
}
|
|
@@ -69,6 +72,9 @@ function waitForMetricsLock() {
|
|
|
69
72
|
// and never blocked on the lock file, so two concurrent subagentStop events
|
|
70
73
|
// could both acquire the lock and corrupt metrics.json. Retry EEXIST with a
|
|
71
74
|
// 10 ms sleep up to 200 attempts (2 s ceiling). On any other error, throw.
|
|
75
|
+
// A lock left behind by a killed process is reclaimed once its mtime is older
|
|
76
|
+
// than STALE_LOCK_MS, so one crash cannot brick the task forever.
|
|
77
|
+
const STALE_LOCK_MS = 30000;
|
|
72
78
|
for (let attempt = 0; attempt < 200; attempt += 1) {
|
|
73
79
|
try {
|
|
74
80
|
const fd = fs.openSync(METRICS_LOCK, 'wx');
|
|
@@ -76,6 +82,13 @@ function waitForMetricsLock() {
|
|
|
76
82
|
return;
|
|
77
83
|
} catch (error) {
|
|
78
84
|
if (!error || error.code !== 'EEXIST') throw error;
|
|
85
|
+
try {
|
|
86
|
+
const lockStat = fs.statSync(METRICS_LOCK);
|
|
87
|
+
if (Date.now() - lockStat.mtimeMs > STALE_LOCK_MS) {
|
|
88
|
+
fs.unlinkSync(METRICS_LOCK);
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
} catch {}
|
|
79
92
|
const until = Date.now() + 10;
|
|
80
93
|
while (Date.now() < until) { /* 10 ms busy-wait */ }
|
|
81
94
|
}
|
|
@@ -495,7 +508,10 @@ function legacyFlow() {
|
|
|
495
508
|
|
|
496
509
|
|
|
497
510
|
if (hookInput.action === 'end_human_gate') {
|
|
498
|
-
|
|
511
|
+
// Only advance when a gate was actually open. A duplicate or retried
|
|
512
|
+
// end_human_gate must be a no-op, not a silent pipeline skip.
|
|
513
|
+
const gateWasOpen = Boolean(status.activeHumanGateEventId) || status.awaitingHumanGate === true;
|
|
514
|
+
status.awaitingHumanGate = false;
|
|
499
515
|
// A2 (retro §8): pin a single runId per pipeline so subsequent events don't
|
|
500
516
|
// fragment the metrics ledger across multiple runId sequences. Prefer
|
|
501
517
|
// metrics.json.task.runId when metrics already exist, then status.metricsRunId,
|
|
@@ -522,7 +538,7 @@ if (hookInput.action === 'end_human_gate') {
|
|
|
522
538
|
});
|
|
523
539
|
delete status.activeHumanGateEventId;
|
|
524
540
|
}
|
|
525
|
-
if (hookInput.activateNext && fs.existsSync(pipelinePath)) {
|
|
541
|
+
if (gateWasOpen && hookInput.activateNext && fs.existsSync(pipelinePath)) {
|
|
526
542
|
let resumePipeline = null;
|
|
527
543
|
try { resumePipeline = JSON.parse(fs.readFileSync(pipelinePath, 'utf8')); } catch {}
|
|
528
544
|
if (resumePipeline) {
|
|
@@ -544,6 +560,19 @@ if (hookInput.action === 'end_human_gate') {
|
|
|
544
560
|
else out(handoffForAgent(resumeAgents[0], resumeNext.step.scope, resumeNext.step));
|
|
545
561
|
process.exit(0);
|
|
546
562
|
}
|
|
563
|
+
// Gate on the final step: no executable step remains. Complete the
|
|
564
|
+
// pipeline instead of leaving it in_progress forever.
|
|
565
|
+
status.state = 'completed';
|
|
566
|
+
completeTaskMetrics();
|
|
567
|
+
writeStatus({
|
|
568
|
+
pipelineIndex: resumeSteps.length,
|
|
569
|
+
phase: 'done',
|
|
570
|
+
state: 'completed',
|
|
571
|
+
currentAgent: null,
|
|
572
|
+
awaitingHumanGate: false,
|
|
573
|
+
});
|
|
574
|
+
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
575
|
+
process.exit(0);
|
|
547
576
|
}
|
|
548
577
|
}
|
|
549
578
|
// A2 (retro §8): if gate closes the final human gate of the pipeline
|
|
@@ -13,7 +13,7 @@ Cursor Rule format:
|
|
|
13
13
|
|
|
14
14
|
### Preset ios-swift — rule map
|
|
15
15
|
|
|
16
|
-
**alwaysApply budget:**
|
|
16
|
+
**alwaysApply budget:** **3–5** always-on rules and **≤200** body lines (after YAML) total (stretch ≤170). New alwaysApply only together with shrinking the existing budget.
|
|
17
17
|
|
|
18
18
|
| File | Scope | Topic |
|
|
19
19
|
|------|--------|------|
|
|
@@ -81,7 +81,7 @@ When editing `**/Presentation/**` or `**/DesignSystem/**`: load `swiftui-ui` + `
|
|
|
81
81
|
### Loading strategy
|
|
82
82
|
|
|
83
83
|
```text
|
|
84
|
-
alwaysApply (3)
|
|
84
|
+
alwaysApply (3–5)
|
|
85
85
|
└─ ios-app-core + architecture-boundaries + code-quality
|
|
86
86
|
|
|
87
87
|
requestable
|
|
@@ -19,6 +19,12 @@ alwaysApply: true
|
|
|
19
19
|
- **CUPID:** Composable; Unix philosophy (one responsibility); Predictable; Idiomatic (repo); Domain-based.
|
|
20
20
|
- **Composition over inheritance;** Law of Demeter — no `a.b.c.d` chains; via public API / facade.
|
|
21
21
|
|
|
22
|
+
# Over-abstraction guardrails
|
|
23
|
+
|
|
24
|
+
- **No unnecessary constants:** do not hoist a one-off literal, string, or boolean into a named constant. Inline it, or use an existing token/enum when the value is meaningful and reused. Named constants are for shared, semantic, or repeated values.
|
|
25
|
+
- **No invented utilities:** do not add a `utils`/helper for a single call site or a thin pass-through wrapper. Inline it or extend the existing helper; a new shared utility is justified only after the Rule of Three.
|
|
26
|
+
- **Decompose over conditionals:** a unit (function, component, hook) that accumulates several branches (`if` / ternary / `switch`) should be split into smaller units with one reason to change instead of piling up conditions.
|
|
27
|
+
|
|
22
28
|
# Refactoring during changes
|
|
23
29
|
|
|
24
30
|
- Light refactor is OK if it reduces duplication, improves readability, and does not break public contracts.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Preset authoring: Core → Stack → Platform layering. Use when editing packages/ai-rules/presets/**.
|
|
2
|
+
description: "Preset authoring: Core → Stack → Platform layering. Use when editing packages/ai-rules/presets/**."
|
|
3
3
|
globs:
|
|
4
4
|
- packages/ai-rules/presets/**/*
|
|
5
5
|
- .cursor/rules/**/*
|
|
@@ -18,7 +18,7 @@ Rules for **preset authors** (`packages/ai-rules/presets/**`). Not always-on in
|
|
|
18
18
|
| Layer | Where | What to put |
|
|
19
19
|
|-------|-------|-------------|
|
|
20
20
|
| **Core** | `presets/_shared/core/**` | Stack-agnostic prose + checklists; no frontmatter; no paths `app/**`, `Features/**`, Playwright, xcodebuild |
|
|
21
|
-
| **Stack** | `presets/{cursor\|claude\|mavis\|opencode}/<stack>/` | Domain/tooling, stack always-on
|
|
21
|
+
| **Stack** | `presets/{cursor\|claude\|mavis\|opencode}/<stack>/` | Domain/tooling, stack always-on set (3–5), stack examples in **Stack notes** |
|
|
22
22
|
| **Platform** | Cursor `.mdc` / Claude `.md` / Mavis `.md` / OpenCode `.md` | Frontmatter (`alwaysApply`/`globs` vs `paths:` vs OpenCode `mode`/`permission`), platform-only (`BUGBOT.md`, `CLAUDE.md`) |
|
|
23
23
|
|
|
24
24
|
## Where to put a new rule
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Preset authoring: PR checklist for twin sync, budget, leakage, README. Use on preset PRs.
|
|
2
|
+
description: "Preset authoring: PR checklist for twin sync, budget, leakage, README. Use on preset PRs."
|
|
3
3
|
globs:
|
|
4
4
|
- packages/ai-rules/presets/**/*
|
|
5
5
|
- .cursor/rules/**/*
|
|
@@ -21,7 +21,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
21
21
|
- [ ] **Mavis derive:** mapped `cursor/<stack>/` change → `mavis/<stack>/` + `adapter-map.json` **same PR** when the stack is in `releasedStacks` (run `generate-mavis.mjs --stack <stack>` + `check-mavis-adapter-map.mjs`; see `preset-twin-sync` § Mavis derivation)
|
|
22
22
|
- [ ] **OpenCode derive:** mapped `cursor/<stack>/` change → `opencode/<stack>/` + `adapter-map.json` **same PR** when the stack is in `releasedStacks` (run `generate-opencode.mjs --stack <stack>` + `check-opencode-adapter-map.mjs`; see `preset-twin-sync` § OpenCode derivation)
|
|
23
23
|
- [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table is current
|
|
24
|
-
- [ ] **Token budget:** Cursor `alwaysApply`
|
|
24
|
+
- [ ] **Token budget:** Cursor `alwaysApply` and Claude session-start both **3–5** (extra slots reserved for `ai-local-overlay`); body sum ≤200 (stretch ≤170); meta rules not always-on
|
|
25
25
|
- [ ] **Local overlay coverage:** every installable stack ships `ai-local-overlay.mdc` (Cursor) and `ai-local-overlay.md` (Claude) with `MANDATORY` + acknowledgement format + `docs/LOCAL-OVERLAY.md` pointer; Claude twin listed in `claude/<stack>/rules/README.md` mapping table. Run `packages/ai-rules/scripts/check-local-overlay.sh`.
|
|
26
26
|
- [ ] **Leakage:** no foreign stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
|
|
27
27
|
- [ ] **Hook-only lifecycle:** `status.json` / `metrics.json` writes happen only inside `hooks/`; agents read but never rewrite lifecycle fields. Run `packages/ai-rules/scripts/check-hook-only-lifecycle.sh`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Preset authoring: ≤3 always-on / session-start; meta rules never alwaysApply.
|
|
2
|
+
description: "Preset authoring: ≤3 always-on / session-start; meta rules never alwaysApply."
|
|
3
3
|
globs:
|
|
4
4
|
- packages/ai-rules/presets/**/*
|
|
5
5
|
- .cursor/rules/**/*
|
|
@@ -17,19 +17,19 @@ Invariants for rule loading in an **installed** preset (consumer app).
|
|
|
17
17
|
|
|
18
18
|
| Platform | Always-on | Cap |
|
|
19
19
|
|----------|-----------|-----|
|
|
20
|
-
| Cursor | `alwaysApply: true` |
|
|
21
|
-
| Claude | rules **without** `paths:` | **
|
|
22
|
-
| Mavis | `adapter-map` rules with `loadMode: root-entry` |
|
|
23
|
-
| OpenCode | `adapter-map` rules with `loadMode: root-entry` |
|
|
20
|
+
| Cursor | `alwaysApply: true` | **3–5** |
|
|
21
|
+
| Claude | rules **without** `paths:` | **3–5** |
|
|
22
|
+
| Mavis | `adapter-map` rules with `loadMode: root-entry` | **3–5** |
|
|
23
|
+
| OpenCode | `adapter-map` rules with `loadMode: root-entry` | **3–5** |
|
|
24
24
|
|
|
25
|
-
**
|
|
25
|
+
Caps are **aligned** across platforms: minimum **3** (base invariants), maximum **5**. Slots beyond the base invariants are reserved for `ai-local-overlay` (consumer-owned `.ai.local/` rules). If you do not need local overlay, demote that rule to `globs: ["**/.ai.local/**"]` / Claude `paths:`, or a non-root load mode on Mavis / OpenCode.
|
|
26
26
|
|
|
27
|
-
**Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules).
|
|
27
|
+
**Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules). Body budget sums only the intended session-start rules (≤5).
|
|
28
28
|
|
|
29
29
|
Session-start body budget:
|
|
30
|
-
- Claude
|
|
31
|
-
- Cursor
|
|
32
|
-
- Mavis / OpenCode: ≤
|
|
30
|
+
- Claude session-start: ≤200 lines total (stretch ≤170).
|
|
31
|
+
- Cursor always-on: ≤200 lines total (stretch ≤170).
|
|
32
|
+
- Mavis / OpenCode: ≤5 root-entry rule files; combined root `AGENTS.md` + platform entry ≤200 nonempty lines. Do not dump the full rule catalog into `AGENTS.md`.
|
|
33
33
|
|
|
34
34
|
## Meta / author rules
|
|
35
35
|
|
|
@@ -45,4 +45,4 @@ Orchestrator, feature-delivery, code-review, post-change gates, domain globs —
|
|
|
45
45
|
|
|
46
46
|
## Verifier
|
|
47
47
|
|
|
48
|
-
build-verifier **FAIL** if Cursor `alwaysApply` count
|
|
48
|
+
build-verifier **FAIL** if Cursor `alwaysApply` count or Claude session-start count is outside **3–5** (Claude count **excludes `**/README.md`**), or if a `preset-*` meta rule is marked always-on.
|
|
@@ -17,7 +17,7 @@ alwaysApply: false
|
|
|
17
17
|
|
|
18
18
|
Before implementing, find a Feature of the same type and **mirror its structure**; do not invent a new file organization.
|
|
19
19
|
|
|
20
|
-
Taxonomy / shared core: [`presets/_shared/README.md`](
|
|
20
|
+
Taxonomy / shared core: [`presets/_shared/README.md`](../../../_shared/README.md) · [Preset contribution guide](../../../../docs/PRESET-CONTRIBUTION.md).
|
|
21
21
|
|
|
22
22
|
## Reference table
|
|
23
23
|
|
|
@@ -14,6 +14,13 @@ alwaysApply: false
|
|
|
14
14
|
- Before a new custom control — look for a component in `DesignSystem/` or existing features.
|
|
15
15
|
- Extract repeated UI logic into `ViewModifier`, `@ViewBuilder` helpers, or subviews.
|
|
16
16
|
|
|
17
|
+
# Conditional rendering
|
|
18
|
+
|
|
19
|
+
- Prefer **decomposition over conditionals**: a `body` with several `if` / `switch` branches should compose small subviews, not nest conditions inline.
|
|
20
|
+
- Keep the condition in the parent; subviews receive resolved state.
|
|
21
|
+
- For loading / empty / error, use dedicated subviews or a small `@ViewBuilder` helper.
|
|
22
|
+
- A `mode` / `variant` flag that renders two unrelated layouts is **two** views, not one.
|
|
23
|
+
|
|
17
24
|
# ViewModel and binding
|
|
18
25
|
|
|
19
26
|
- ViewModel — `@MainActor`, `@Observable` (iOS 17+) or `ObservableObject` — as adopted in the project.
|
|
@@ -24,7 +24,7 @@ Copies rules/agents/hooks/skills/commands + seeds `.ai.local/team/` + `REPO_AGEN
|
|
|
24
24
|
|
|
25
25
|
## Inventory
|
|
26
26
|
|
|
27
|
-
- **
|
|
27
|
+
- **22 agents** — see `agents/README.md` (no a11y / Playwright / XCUITest)
|
|
28
28
|
- **10 skills** — `feature-delivery`, `spec-authoring`, `spec-discovery`, `unit-testing`, `integration-testing`, `ci-investigation`, `debug-investigation`, `code-review`, `technical-retro`, `write-adr`
|
|
29
29
|
- **3 commands** — `/task`, `/task-continue`, `/technical-retro`
|
|
30
30
|
|
|
@@ -36,7 +36,7 @@ Hard gates for the **java** stack:
|
|
|
36
36
|
| Gate | FAIL when |
|
|
37
37
|
|------|-----------|
|
|
38
38
|
| **twin-map** | `java` missing from `STACKS`, or Cursor↔Claude orphan/missing twins |
|
|
39
|
-
| **token-budget** | Cursor
|
|
39
|
+
| **token-budget** | Cursor/Claude always-on count outside 3–5 (extra slots = `ai-local-overlay`), or body sum > 200 |
|
|
40
40
|
| **leakage** | `JAVA_FORBIDDEN_*` hits (Playwright/XCUITest/`lint:js`/`accessibility-reviewer` / `mockup-reviewer` as required handoffs) |
|
|
41
41
|
| **chain fork** | `hooks/chain-team-phases.sh` byte-identical to **next**, **ios-swift**, **go**, **mcp-ts**, **php-hexagonal**, or **php-laravel** (same platform) |
|
|
42
42
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task
|
|
3
|
-
description: Route a natural-language task through the agent-team pipeline: task-router, pipeline.json, and the first planned specialist.
|
|
3
|
+
description: "Route a natural-language task through the agent-team pipeline: task-router, pipeline.json, and the first planned specialist."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Task — unified entry point (router + pipeline)
|
|
@@ -43,7 +43,10 @@ try {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const slug = active.slug;
|
|
46
|
-
|
|
46
|
+
// Reject non-kebab / traversal slugs: the runtime writes status.json and
|
|
47
|
+
// metrics.json under tasks/<slug>, so an unchecked slug could escape the tree.
|
|
48
|
+
const SLUG_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
49
|
+
if (typeof slug !== 'string' || slug.length > 48 || !SLUG_RE.test(slug)) {
|
|
47
50
|
process.stdout.write('{}');
|
|
48
51
|
process.exit(0);
|
|
49
52
|
}
|
|
@@ -70,6 +73,9 @@ function waitForMetricsLock() {
|
|
|
70
73
|
// and never blocked on the lock file, so two concurrent subagentStop events
|
|
71
74
|
// could both acquire the lock and corrupt metrics.json. Retry EEXIST with a
|
|
72
75
|
// 10 ms sleep up to 200 attempts (2 s ceiling). On any other error, throw.
|
|
76
|
+
// A lock left behind by a killed process is reclaimed once its mtime is older
|
|
77
|
+
// than STALE_LOCK_MS, so one crash cannot brick the task forever.
|
|
78
|
+
const STALE_LOCK_MS = 30000;
|
|
73
79
|
for (let attempt = 0; attempt < 200; attempt += 1) {
|
|
74
80
|
try {
|
|
75
81
|
const fd = fs.openSync(METRICS_LOCK, 'wx');
|
|
@@ -77,6 +83,13 @@ function waitForMetricsLock() {
|
|
|
77
83
|
return;
|
|
78
84
|
} catch (error) {
|
|
79
85
|
if (!error || error.code !== 'EEXIST') throw error;
|
|
86
|
+
try {
|
|
87
|
+
const lockStat = fs.statSync(METRICS_LOCK);
|
|
88
|
+
if (Date.now() - lockStat.mtimeMs > STALE_LOCK_MS) {
|
|
89
|
+
fs.unlinkSync(METRICS_LOCK);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
} catch {}
|
|
80
93
|
const until = Date.now() + 10;
|
|
81
94
|
while (Date.now() < until) { /* 10 ms busy-wait */ }
|
|
82
95
|
}
|
|
@@ -490,7 +503,10 @@ function legacyFlow() {
|
|
|
490
503
|
|
|
491
504
|
|
|
492
505
|
if (hookInput.action === 'end_human_gate') {
|
|
493
|
-
|
|
506
|
+
// Only advance when a gate was actually open. A duplicate or retried
|
|
507
|
+
// end_human_gate must be a no-op, not a silent pipeline skip.
|
|
508
|
+
const gateWasOpen = Boolean(status.activeHumanGateEventId) || status.awaitingHumanGate === true;
|
|
509
|
+
status.awaitingHumanGate = false;
|
|
494
510
|
// A2 (retro §8): pin a single runId per pipeline so subsequent events don't
|
|
495
511
|
// fragment the metrics ledger across multiple runId sequences. Prefer
|
|
496
512
|
// metrics.json.task.runId when metrics already exist, then status.metricsRunId,
|
|
@@ -517,7 +533,7 @@ if (hookInput.action === 'end_human_gate') {
|
|
|
517
533
|
});
|
|
518
534
|
delete status.activeHumanGateEventId;
|
|
519
535
|
}
|
|
520
|
-
if (hookInput.activateNext && fs.existsSync(pipelinePath)) {
|
|
536
|
+
if (gateWasOpen && hookInput.activateNext && fs.existsSync(pipelinePath)) {
|
|
521
537
|
let resumePipeline = null;
|
|
522
538
|
try { resumePipeline = JSON.parse(fs.readFileSync(pipelinePath, 'utf8')); } catch {}
|
|
523
539
|
if (resumePipeline) {
|
|
@@ -539,6 +555,19 @@ if (hookInput.action === 'end_human_gate') {
|
|
|
539
555
|
else out(handoffForAgent(resumeAgents[0], resumeNext.step.scope, resumeNext.step));
|
|
540
556
|
process.exit(0);
|
|
541
557
|
}
|
|
558
|
+
// Gate on the final step: no executable step remains. Complete the
|
|
559
|
+
// pipeline instead of leaving it in_progress forever.
|
|
560
|
+
status.state = 'completed';
|
|
561
|
+
completeTaskMetrics();
|
|
562
|
+
writeStatus({
|
|
563
|
+
pipelineIndex: resumeSteps.length,
|
|
564
|
+
phase: 'done',
|
|
565
|
+
state: 'completed',
|
|
566
|
+
currentAgent: null,
|
|
567
|
+
awaitingHumanGate: false,
|
|
568
|
+
});
|
|
569
|
+
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
570
|
+
process.exit(0);
|
|
542
571
|
}
|
|
543
572
|
}
|
|
544
573
|
// A2 (retro §8): if gate closes the final human gate of the pipeline
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Rules (preset java)
|
|
2
2
|
|
|
3
|
-
## alwaysApply (3)
|
|
3
|
+
## alwaysApply (3–5)
|
|
4
4
|
|
|
5
5
|
| Rule | Role |
|
|
6
6
|
|------|------|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| `architecture-boundaries` | Hexagonal invariants |
|
|
9
9
|
| `code-quality-and-refactoring` | Shared quality + Java notes |
|
|
10
10
|
|
|
11
|
-
**Session-start body budget:** sum of the
|
|
11
|
+
**Session-start body budget:** sum of the intended always-on bodies ≤ **200** lines (stretch ≤170).
|
|
12
12
|
|
|
13
13
|
## Twin depth (Cursor↔Claude)
|
|
14
14
|
|
|
@@ -178,7 +178,7 @@ When the work edits `packages/ai-rules/presets/**` (or dogfood `.cursor/` sync o
|
|
|
178
178
|
|
|
179
179
|
## Stack notes
|
|
180
180
|
|
|
181
|
-
### Roles (Java hexagonal —
|
|
181
|
+
### Roles (Java hexagonal — 22 agents)
|
|
182
182
|
|
|
183
183
|
| Kind | Agents | Writes |
|
|
184
184
|
|------|--------|--------|
|
|
@@ -19,6 +19,12 @@ alwaysApply: true
|
|
|
19
19
|
- **CUPID:** Composable; Unix philosophy (one responsibility); Predictable; Idiomatic (repo); Domain-based.
|
|
20
20
|
- **Composition over inheritance;** Law of Demeter — no `a.b.c.d` chains; via public API / facade.
|
|
21
21
|
|
|
22
|
+
# Over-abstraction guardrails
|
|
23
|
+
|
|
24
|
+
- **No unnecessary constants:** do not hoist a one-off literal, string, or boolean into a named constant. Inline it, or use an existing token/enum when the value is meaningful and reused. Named constants are for shared, semantic, or repeated values.
|
|
25
|
+
- **No invented utilities:** do not add a `utils`/helper for a single call site or a thin pass-through wrapper. Inline it or extend the existing helper; a new shared utility is justified only after the Rule of Three.
|
|
26
|
+
- **Decompose over conditionals:** a unit (function, component, hook) that accumulates several branches (`if` / ternary / `switch`) should be split into smaller units with one reason to change instead of piling up conditions.
|
|
27
|
+
|
|
22
28
|
# Refactoring during changes
|
|
23
29
|
|
|
24
30
|
- Light refactor is OK if it reduces duplication, improves readability, and does not break public contracts.
|
|
@@ -18,7 +18,7 @@ Rules for **preset authors** (`packages/ai-rules/presets/**`). Not always-on in
|
|
|
18
18
|
| Layer | Where | What to put |
|
|
19
19
|
|-------|-------|-------------|
|
|
20
20
|
| **Core** | `presets/_shared/core/**` | Stack-agnostic prose + checklists; no frontmatter; no paths `app/**`, `Features/**`, Playwright, xcodebuild |
|
|
21
|
-
| **Stack** | `presets/{cursor\|claude\|mavis\|opencode}/<stack>/` | Domain/tooling, stack always-on
|
|
21
|
+
| **Stack** | `presets/{cursor\|claude\|mavis\|opencode}/<stack>/` | Domain/tooling, stack always-on set (3–5), stack examples in **Stack notes** |
|
|
22
22
|
| **Platform** | Cursor `.mdc` / Claude `.md` / Mavis `.md` / OpenCode `.md` | Frontmatter (`alwaysApply`/`globs` vs `paths:` vs OpenCode `mode`/`permission`), platform-only (`BUGBOT.md`, `CLAUDE.md`) |
|
|
23
23
|
|
|
24
24
|
## Where to put a new rule
|
|
@@ -21,7 +21,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
21
21
|
- [ ] **Mavis derive:** mapped `cursor/<stack>/` change → `mavis/<stack>/` + `adapter-map.json` **same PR** when the stack is in `releasedStacks` (run `generate-mavis.mjs --stack <stack>` + `check-mavis-adapter-map.mjs`; see `preset-twin-sync` § Mavis derivation)
|
|
22
22
|
- [ ] **OpenCode derive:** mapped `cursor/<stack>/` change → `opencode/<stack>/` + `adapter-map.json` **same PR** when the stack is in `releasedStacks` (run `generate-opencode.mjs --stack <stack>` + `check-opencode-adapter-map.mjs`; see `preset-twin-sync` § OpenCode derivation)
|
|
23
23
|
- [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table is current
|
|
24
|
-
- [ ] **Token budget:** Cursor `alwaysApply`
|
|
24
|
+
- [ ] **Token budget:** Cursor `alwaysApply` and Claude session-start both **3–5** (extra slots reserved for `ai-local-overlay`); body sum ≤200 (stretch ≤170); meta rules not always-on
|
|
25
25
|
- [ ] **Local overlay coverage:** every installable stack ships `ai-local-overlay.mdc` (Cursor) and `ai-local-overlay.md` (Claude) with `MANDATORY` + acknowledgement format + `docs/LOCAL-OVERLAY.md` pointer; Claude twin listed in `claude/<stack>/rules/README.md` mapping table. Run `packages/ai-rules/scripts/check-local-overlay.sh`.
|
|
26
26
|
- [ ] **Leakage:** no foreign stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
|
|
27
27
|
- [ ] **Hook-only lifecycle:** `status.json` / `metrics.json` writes happen only inside `hooks/`; agents read but never rewrite lifecycle fields. Run `packages/ai-rules/scripts/check-hook-only-lifecycle.sh`.
|