@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
package/docs/OPENCODE.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# OpenCode adapter
|
|
2
|
+
|
|
3
|
+
Experimental preset for [OpenCode](https://opencode.ai/). Platform id is **`opencode`**. Consumer files land under **`.opencode/`** (native agents / skills / commands) plus root **`AGENTS.md`** and **`opencode.json`**.
|
|
4
|
+
|
|
5
|
+
All **10** installable stacks are in `releasedStacks`: `next`, `nuxt`, `svelte`, `ios-swift`, `android-kotlin`, `go`, `java`, `mcp-ts`, `php-hexagonal`, `php-laravel`.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
From the **target project root** (where `app/` or `package.json` lives):
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx @bonesofspring/ai-rules init opencode --preset next
|
|
13
|
+
npx @bonesofspring/ai-rules init opencode --preset go
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
All four platforms at once: `npx @bonesofspring/ai-rules init multi --preset <stack>`.
|
|
17
|
+
|
|
18
|
+
What lands:
|
|
19
|
+
|
|
20
|
+
| Source (package) | Consumer path |
|
|
21
|
+
|------------------|---------------|
|
|
22
|
+
| `REPO_AGENTS.md` | `./AGENTS.md` (native always-on + load map) |
|
|
23
|
+
| `OPENCODE.md` | `.opencode/AGENTS.md` (OpenCode load map) |
|
|
24
|
+
| `rules/`, `agents/`, `skills/`, `commands/`, `hooks/` | `.opencode/<dir>/` |
|
|
25
|
+
| `team/` | `.ai.local/team/` (shared pipeline artifacts; not `.opencode/team/`) |
|
|
26
|
+
| `opencode.json` | `./opencode.json` (merge `mcp` only) |
|
|
27
|
+
|
|
28
|
+
Remove only what this install owns:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx @bonesofspring/ai-rules clean opencode
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`clean opencode` is **manifest-owned**: unchanged hashes are removed; files you edited stay. Without a valid `.opencode/.ai-rules-install.json`, clean is fail-safe (nothing removed). Extra keys in `opencode.json` (models, permissions, user MCP servers) are preserved.
|
|
35
|
+
|
|
36
|
+
The CLI **never** writes `~/.config/opencode/**`.
|
|
37
|
+
|
|
38
|
+
Quad-install with Cursor, Claude, or Mavis: `init multi --preset next` copies the **same** root `AGENTS.md` (last `init` still overwrites; content does not change). `clean opencode` leaves that file if another tool install remains. `/task` pipelines are **shared** — artifacts live under `.ai.local/team/` (not removed by `clean`).
|
|
39
|
+
|
|
40
|
+
## How to load
|
|
41
|
+
|
|
42
|
+
OpenCode has **no** `.mdc` `alwaysApply` / `globs` engine. Do **not** rely on `opencode.json` `instructions` as the only always-on path (V2 may ignore it).
|
|
43
|
+
|
|
44
|
+
| Kind | How it loads |
|
|
45
|
+
|------|----------------|
|
|
46
|
+
| Essential rules | Root `AGENTS.md` lists four paths — **Read immediately** |
|
|
47
|
+
| Other rules | Lazy `Read` of `.opencode/rules/<stem>.md` when the task matches |
|
|
48
|
+
| Agents | Native `.opencode/agents/*.md` (`@name` / Task). `mode: subagent` |
|
|
49
|
+
| Skills | Native `.opencode/skills/<name>/SKILL.md` (`skill` tool) |
|
|
50
|
+
| Commands | Native `/task`, `/task-continue`, `/technical-retro`, `/spec-start` |
|
|
51
|
+
| MCP | `opencode.json` → `mcp` |
|
|
52
|
+
|
|
53
|
+
**Every turn:** read root `AGENTS.md`, then `.opencode/AGENTS.md`, then the four essential rules. Probe `.ai.local` (see [`LOCAL-OVERLAY.md`](./LOCAL-OVERLAY.md)).
|
|
54
|
+
|
|
55
|
+
Do not pin a model in this preset — use the operator’s OpenCode provider config.
|
|
56
|
+
|
|
57
|
+
## Task pipeline (semi-auto)
|
|
58
|
+
|
|
59
|
+
File-based orchestration under `.ai.local/team/` mirrors Cursor/Claude:
|
|
60
|
+
|
|
61
|
+
1. Start work with `/task` (`.opencode/commands/task.md`).
|
|
62
|
+
2. Producers write artifacts and upsert `artifact-manifest.json` receipts.
|
|
63
|
+
3. **Do not** mutate `status.json` / `metrics.json` lifecycle fields from agent prompts — the chain runner owns them.
|
|
64
|
+
4. After each producer receipt, run:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
printf '%s\n' '{"status":"completed","attemptId":"<from-status.json>"}' \
|
|
68
|
+
| bash .opencode/hooks/chain-team-phases.sh
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Human gates pause with `awaitingHumanGate: true`. Resume with `/task-continue`. There is **no** shipped `hooks.json` or OpenCode plugin in v1.
|
|
72
|
+
|
|
73
|
+
Full team layout: `.ai.local/team/README.md`.
|
|
74
|
+
|
|
75
|
+
## MCP
|
|
76
|
+
|
|
77
|
+
Preset servers merge into project **`opencode.json`** `mcp`:
|
|
78
|
+
|
|
79
|
+
- Cursor `command` + `args` → `{ "type": "local", "command": [...] }`
|
|
80
|
+
- Cursor `url` → `{ "type": "remote", "url": "..." }`
|
|
81
|
+
|
|
82
|
+
Extra local servers survive re-init when the file is valid JSON. See `.opencode/MCP.md` and rule `mcp-usage.md`.
|
|
83
|
+
|
|
84
|
+
## Capability summary
|
|
85
|
+
|
|
86
|
+
Labels from official OpenCode docs (live CLI probe not yet run). Full matrix: [`OPENCODE-COMPATIBILITY.md`](./OPENCODE-COMPATIBILITY.md).
|
|
87
|
+
|
|
88
|
+
| Area | Status | What we do |
|
|
89
|
+
|------|--------|------------|
|
|
90
|
+
| Root `AGENTS.md` | **confirmed** (docs) | Native always-on; reference rules explicitly |
|
|
91
|
+
| `.opencode/agents` / `skills` / `commands` | **confirmed** (docs) | Native discovery |
|
|
92
|
+
| `opencode.json` MCP | **confirmed** (docs) | Merge `mcp` |
|
|
93
|
+
| Glob / alwaysApply rules | **no-equivalent** | Lazy Read catalog under `.opencode/rules/` |
|
|
94
|
+
| `hooks.json` / subagentStop | **unknown** | Manual `chain-team-phases.sh` |
|
|
95
|
+
| Native Team lifecycle | **partial** | File pipeline is SoT; hook is single lifecycle writer |
|
|
96
|
+
|
|
97
|
+
Do not pin OpenCode CLI or TUI versions in the contract.
|
|
98
|
+
|
|
99
|
+
## Local overlay
|
|
100
|
+
|
|
101
|
+
`.ai.local/rules/*.md` at repo root (or monorepo parents) override preset rules. See [`LOCAL-OVERLAY.md`](./LOCAL-OVERLAY.md).
|
|
102
|
+
|
|
103
|
+
## Maintainer docs
|
|
104
|
+
|
|
105
|
+
| Doc | Purpose |
|
|
106
|
+
|-----|---------|
|
|
107
|
+
| [`presets/opencode/README.md`](../presets/opencode/README.md) | Source tree, contract, validation scripts |
|
|
108
|
+
| [`presets/opencode/platform-contract.json`](../presets/opencode/platform-contract.json) | `releasedStacks`, paths, capability statuses |
|
|
109
|
+
| [`OPENCODE-COMPATIBILITY.md`](./OPENCODE-COMPATIBILITY.md) | Evidence and go/no-go |
|
|
110
|
+
| [`PRESET-CONTRIBUTION.md`](./PRESET-CONTRIBUTION.md) | Sibling adapter authoring |
|
|
111
|
+
|
|
112
|
+
Validate after preset edits:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
cd packages/ai-rules
|
|
116
|
+
bash scripts/check-preset-structure.sh
|
|
117
|
+
node scripts/check-opencode-platform-contract.mjs --self-test
|
|
118
|
+
node scripts/check-opencode-adapter-map.mjs --self-test
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Released stacks
|
|
122
|
+
|
|
123
|
+
`init opencode --preset <stack>` and `init multi --preset <stack>` install OpenCode for every stack in `presets/opencode/platform-contract.json` `releasedStacks` (all 10). Per-stack always-on rules and `permission.edit` allow-lists live in `scripts/lib/stack-platform-profiles.mjs`. Derive with `node scripts/generate-opencode.mjs --stack <stack>` from Cursor SoT — never from Claude.
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
# Preset contribution guide
|
|
2
|
+
|
|
3
|
+
How to develop and evolve installable presets in `@bonesofspring/ai-rules` (`packages/ai-rules/presets/**`).
|
|
4
|
+
|
|
5
|
+
**Audience:** maintainers editing preset rules, agents, skills, hooks, or platform artifacts — not consumer app developers using `ai-rules init` in their projects.
|
|
6
|
+
|
|
7
|
+
Related docs:
|
|
8
|
+
|
|
9
|
+
- Package install surface: [`../README.md`](../README.md)
|
|
10
|
+
- Shared core taxonomy: [`../presets/_shared/README.md`](../presets/_shared/README.md)
|
|
11
|
+
- Regression audit / ADRs: repo `.ai.local/team/tasks/preset-regression-audit/` (`architecture.md`, `documentation.md`)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Rule taxonomy (three layers)
|
|
16
|
+
|
|
17
|
+
Every preset artifact belongs to one of these layers. Do not mix semantics across layers.
|
|
18
|
+
|
|
19
|
+
| Layer | Path | What belongs here |
|
|
20
|
+
|-------|------|-------------------|
|
|
21
|
+
| **Core** | `presets/_shared/core/**` | Stack-agnostic prose and checklists. No Cursor/Claude frontmatter. No stack paths (`app/src/**`, `Features/**`, Playwright, `xcodebuild`). |
|
|
22
|
+
| **Stack** | `presets/{cursor\|claude}/<stack>/` | Domain rules, stack always-on trio, stack tooling, stack examples in a delimited `## Stack notes` section. |
|
|
23
|
+
| **Platform** | Same stack tree | Adapter packaging: Cursor `.mdc` (`alwaysApply` / `globs`) vs Claude `.md` (`paths:`). Platform-only files (`BUGBOT.md`, `AGENTS.md`, `CLAUDE.md`, `hooks.json`). |
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
Core (_shared/core) → shared principles
|
|
27
|
+
↓ embed / copy + marker
|
|
28
|
+
Stack (cursor|claude/<stack>) → domain + stack deltas
|
|
29
|
+
↓ frontmatter / layout
|
|
30
|
+
Platform adapter → .mdc | .md + platform-only artifacts
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Classification quick check:**
|
|
34
|
+
|
|
35
|
+
- Applies to all stacks with only example differences → **core** + stack adapters.
|
|
36
|
+
- Only one installable stack (`next` / `nuxt` / `svelte` / `ios-swift` / `android-kotlin` / `go` / `java` / `mcp-ts` / `php-hexagonal` / `php-laravel`) → **stack-specific** (never in `_shared`).
|
|
37
|
+
- Only Cursor or only Claude file shape → **platform** (do not duplicate semantics in the other platform).
|
|
38
|
+
|
|
39
|
+
Meta-rules for **preset authors** live in `core/meta/` and are packaged into each stack with globs limited to `packages/ai-rules/presets/**` (never `alwaysApply` / session-start in consumer installs).
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Source of truth (SoT)
|
|
44
|
+
|
|
45
|
+
| Concern | SoT | Notes |
|
|
46
|
+
|---------|-----|-------|
|
|
47
|
+
| Preset content | `packages/ai-rules/presets/**` | **Not** repo root `.cursor/` — dogfood is a synced working copy. |
|
|
48
|
+
| Per stack | `presets/cursor/<stack>/` | Cursor `.mdc` is SoT for that stack. |
|
|
49
|
+
| Claude twins | `presets/claude/<stack>/` | Derived in the **same PR** as Cursor changes. |
|
|
50
|
+
| Shared core | `presets/_shared/core/**` | Edit core first; update all `<!-- shared-core: … -->` consumers in the same PR. |
|
|
51
|
+
| Monorepo dogfood | Root `.cursor/` | Sync **from** packages on release / dogfood PR (typically `cursor/next` + author meta globs). |
|
|
52
|
+
|
|
53
|
+
Twin-sync matrix:
|
|
54
|
+
|
|
55
|
+
| Stack | Cursor SoT | Claude derive | Mapping table |
|
|
56
|
+
|-------|------------|---------------|---------------|
|
|
57
|
+
| `next` | `presets/cursor/next/rules/*.mdc` | `presets/claude/next/rules/<topic>/` | Required in `claude/next/rules/README.md` |
|
|
58
|
+
| `nuxt` | `presets/cursor/nuxt/rules/*.mdc` | `presets/claude/nuxt/rules/<topic>/` | Required in `claude/nuxt/rules/README.md` |
|
|
59
|
+
| `svelte` | `presets/cursor/svelte/rules/*.mdc` | `presets/claude/svelte/rules/<topic>/` | Required in `claude/svelte/rules/README.md` |
|
|
60
|
+
| `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Required in `claude/ios-swift/rules/README.md` |
|
|
61
|
+
| `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Required in `claude/go/rules/README.md` |
|
|
62
|
+
| `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Required in `claude/java/rules/README.md` |
|
|
63
|
+
| `mcp-ts` | `presets/cursor/mcp-ts/rules/*.mdc` | `presets/claude/mcp-ts/rules/<topic>/` | Required in `claude/mcp-ts/rules/README.md` |
|
|
64
|
+
| `php-hexagonal` | `presets/cursor/php-hexagonal/rules/*.mdc` | `presets/claude/php-hexagonal/rules/<topic>/` | Required in `claude/php-hexagonal/rules/README.md` |
|
|
65
|
+
| `php-laravel` | `presets/cursor/php-laravel/rules/*.mdc` | `presets/claude/php-laravel/rules/<topic>/` | Required in `claude/php-laravel/rules/README.md` |
|
|
66
|
+
| `android-kotlin` | `presets/cursor/android-kotlin/rules/*.mdc` | `presets/claude/android-kotlin/rules/<topic>/` | Required in `claude/android-kotlin/rules/README.md` |
|
|
67
|
+
|
|
68
|
+
Claude topic folders (all stacks): `architecture/`, `stack/`, `api-and-data/`, `ui-and-accessibility/`, `testing/`, `tooling-and-review/`.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Shared core sync workflow
|
|
73
|
+
|
|
74
|
+
1. Change prose under `presets/_shared/core/<area>/<stem>.md`.
|
|
75
|
+
2. Find consumers: `rg 'shared-core: <path>' packages/ai-rules/presets`.
|
|
76
|
+
3. Update every adapter (**all adapters**: stacks × 2 platforms, when the rule is shared) in the **same PR** — see **sync modes** below.
|
|
77
|
+
4. Keep stack-specific content only in adapters (embed: `## Stack notes`; lineage: full stack body).
|
|
78
|
+
5. Update stack `rules/README.md` core→stack mapping if stems or paths changed.
|
|
79
|
+
6. Sync dogfood: `packages/ai-rules/scripts/sync-dogfood-cursor.sh` when maintaining this monorepo.
|
|
80
|
+
|
|
81
|
+
Sync marker (after frontmatter in platform files):
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<!-- shared-core: quality/code-quality-and-refactoring.md -->
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Sync modes
|
|
88
|
+
|
|
89
|
+
| Mode | When to use | Adapter shape | Drift check |
|
|
90
|
+
|------|-------------|---------------|-------------|
|
|
91
|
+
| **Embed (A)** | Shared principles with small stack examples | Core prose copied into adapter + `## Stack notes` for deltas only | `check-shared-core-drift.sh` compares body (minus frontmatter / Stack notes) to core |
|
|
92
|
+
| **Lineage (B)** | Stack checklist / paths dominate; core stays abstract | Marker present; body is stack-specific (Next `app/**`, iOS `Features/**`, etc.) | Script lists consumers only — **no** body equality |
|
|
93
|
+
|
|
94
|
+
**Embed stems (reference):** `quality/code-quality-and-refactoring`, `quality/design-guidance`, `quality/mcp-usage`, all `meta/preset-*`, `review/code-review-mr`, `review/technical-retro`, `agent-team/agent-team-intake`, `architecture/product-specs`, `architecture/product-specs-authoring`.
|
|
95
|
+
|
|
96
|
+
**Lineage stems (reference):** `architecture/feature-delivery-workflow`, `architecture/reference-features.template`, `agent-team/agent-team-orchestrator`.
|
|
97
|
+
|
|
98
|
+
Intentional fork / mode change: document in PR (and optionally in validation-report).
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Token budget (consumer installs)
|
|
103
|
+
|
|
104
|
+
Hard caps for **installed** presets (not author meta-rules):
|
|
105
|
+
|
|
106
|
+
| Platform | Always-on mechanism | Cap |
|
|
107
|
+
|----------|---------------------|-----|
|
|
108
|
+
| Cursor | `alwaysApply: true` | **3–5** (extra slots include `ai-local-overlay.mdc`) |
|
|
109
|
+
| Claude | rules **without** `paths:` | **3–5** |
|
|
110
|
+
| Mavis | `adapter-map` `loadMode: root-entry` | **3–5** |
|
|
111
|
+
| OpenCode | `adapter-map` `loadMode: root-entry` | **3–5** |
|
|
112
|
+
|
|
113
|
+
Caps are **aligned** across platforms (min **3**, max **5**); slots beyond the base invariants are reserved for `ai-local-overlay`.
|
|
114
|
+
|
|
115
|
+
**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).
|
|
116
|
+
|
|
117
|
+
Session-start body budget (where documented): ≤200 lines total (stretch ≤170).
|
|
118
|
+
|
|
119
|
+
**Author meta-rules** (`preset-layering`, `preset-twin-sync`, `preset-token-budget`, `preset-pr-checklist`, `preset-no-cross-stack-leakage`):
|
|
120
|
+
|
|
121
|
+
- **Never** `alwaysApply: true` / never among the Claude session-start rules.
|
|
122
|
+
- Cursor: `globs` → `packages/ai-rules/presets/**` (+ dogfood `.cursor/**` where useful).
|
|
123
|
+
- Claude: `paths:` → `packages/ai-rules/presets/**/*` **plus** dogfood `.claude/**/*` (and optionally `.cursor/rules/**/*`, `.ai.local/team/tasks/**/*` for parity with Cursor meta globs).
|
|
124
|
+
|
|
125
|
+
`build-verifier` in each stack documents preset-structure **FAIL** checks for budget and meta loading.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## PR checklist
|
|
130
|
+
|
|
131
|
+
Before merging any PR touching `packages/ai-rules/presets/**` (or dogfood `.cursor/` sync):
|
|
132
|
+
|
|
133
|
+
Use the packaged rule **`preset-pr-checklist`** (Cursor: `preset-pr-checklist.mdc`; Claude: `tooling-and-review/preset-pr-checklist.md`) or the checklist in `presets/_shared/core/meta/preset-pr-checklist.md`.
|
|
134
|
+
|
|
135
|
+
Summary:
|
|
136
|
+
|
|
137
|
+
- [ ] SoT: edits in `packages/…`, not only root `.cursor/`
|
|
138
|
+
- [ ] Core: if `_shared/core/**` changed → all `shared-core` consumers updated (or fork documented)
|
|
139
|
+
- [ ] Twin: Cursor change → Claude twin in **same PR** (**FAIL** if missing on next, nuxt, svelte, ios-swift, android-kotlin, go, java, mcp-ts, php-hexagonal, and php-laravel)
|
|
140
|
+
- [ ] Mapping: `claude/<stack>/rules/README.md` table current
|
|
141
|
+
- [ ] Token budget: Cursor/Claude always-on **3–5** (extra slots = `ai-local-overlay`); body sum ≤200 (stretch ≤170); meta rules not always-on
|
|
142
|
+
- [ ] Leakage: no cross-stack agent stems (`preset-no-cross-stack-leakage`)
|
|
143
|
+
- [ ] Twin depth: domain rules ≥15 body lines; thin aliases documented
|
|
144
|
+
- [ ] README / catalog updated when stems added
|
|
145
|
+
- [ ] CHANGELOG / package README if public install surface changes
|
|
146
|
+
- [ ] Dogfood: `scripts/sync-dogfood-cursor.sh` (or intentional skip documented)
|
|
147
|
+
- [ ] Embed drift: `scripts/check-shared-core-drift.sh` after core/embed edits
|
|
148
|
+
- [ ] Structure gates: `yarn check:preset-structure` (or `bash scripts/check-preset-structure.sh`) passes
|
|
149
|
+
|
|
150
|
+
Validation: stack `agents/build-verifier.md` → **preset-structure validation** section; CI workflow `preset-structure.yml`.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## CLI: `_shared` is not a preset
|
|
155
|
+
|
|
156
|
+
`ai-rules init` copies only under:
|
|
157
|
+
|
|
158
|
+
- `presets/cursor/<name>/`
|
|
159
|
+
- `presets/claude/<name>/`
|
|
160
|
+
- `presets/mavis/<name>/` (generated; see the Mavis sibling adapter below)
|
|
161
|
+
- `presets/opencode/<name>/` (generated; see the OpenCode sibling adapter below)
|
|
162
|
+
|
|
163
|
+
`presets/_shared/` is a **sibling** of the four platform trees — it is **never** copied wholesale to consumer projects.
|
|
164
|
+
|
|
165
|
+
- Do **not** pass `_shared` as `--preset`.
|
|
166
|
+
- Do **not** nest `_shared` under `cursor/` or `claude/` (would break ignore semantics).
|
|
167
|
+
|
|
168
|
+
**Exception — docs/specs seed:** when consumer `docs/specs/` is **absent**, `init` copies `presets/_shared/assets/docs-specs/INDEX.md` + `_templates/*` into `<cwd>/docs/specs/` (idempotent; **never overwrite** an existing INDEX). When the tree already exists, skip seed entirely.
|
|
169
|
+
|
|
170
|
+
List installable presets: directories directly under `presets/cursor/` and `presets/claude/` (e.g. `next`, `nuxt`, `svelte`, `ios-swift`, `android-kotlin`, `go`, `java`, `mcp-ts`, `php-hexagonal`, `php-laravel`).
|
|
171
|
+
|
|
172
|
+
### Mavis sibling adapter
|
|
173
|
+
|
|
174
|
+
`presets/mavis/` is a third platform sibling (id **`mavis`**, runtime **`mcode`**). Consumer files land under **`.mavis/`** (ai-rules-owned; not a MiniMax-native discovery path). Machine-readable declaration: `presets/mavis/platform-contract.json` (architecture §3.4). Validate with `node scripts/check-mavis-platform-contract.mjs` (add `--self-test` for fixtures).
|
|
175
|
+
|
|
176
|
+
**Released:** all 10 installable stacks — `npx @bonesofspring/ai-rules init mavis --preset <stack>` (and `init multi --preset <stack>`). Do not add `mcode` / `minimax` CLI aliases. Do not derive Mavis sources from Claude. Capability statuses must link to `docs/MAVIS-COMPATIBILITY.md`; `unknown` / `no-equivalent` capabilities must not declare a native path. Do not pin desktop or CLI patch versions in the contract.
|
|
177
|
+
|
|
178
|
+
Consumer guide: [`MAVIS.md`](./MAVIS.md). Compatibility evidence: [`MAVIS-COMPATIBILITY.md`](./MAVIS-COMPATIBILITY.md). Adapter authoring: [`presets/mavis/README.md`](../presets/mavis/README.md).
|
|
179
|
+
|
|
180
|
+
### OpenCode sibling adapter
|
|
181
|
+
|
|
182
|
+
`presets/opencode/` is a fourth platform sibling (id **`opencode`**, runtime **`opencode`**). Consumer files land under **`.opencode/`** (native agents / skills / commands) plus root `AGENTS.md` and `opencode.json`. Machine-readable declaration: `presets/opencode/platform-contract.json`. Validate with `node scripts/check-opencode-platform-contract.mjs` (add `--self-test` for fixtures).
|
|
183
|
+
|
|
184
|
+
**Released:** all 10 installable stacks — `npx @bonesofspring/ai-rules init opencode --preset <stack>` (and `init multi --preset <stack>`). Do not derive OpenCode sources from Claude. Capability statuses must link to `docs/OPENCODE-COMPATIBILITY.md`; `unknown` / `no-equivalent` capabilities must not declare a native path. Do not pin OpenCode CLI versions in the contract. Do not write `~/.config/opencode/**`.
|
|
185
|
+
|
|
186
|
+
Consumer guide: [`OPENCODE.md`](./OPENCODE.md). Compatibility evidence: [`OPENCODE-COMPATIBILITY.md`](./OPENCODE-COMPATIBILITY.md). Adapter authoring: [`presets/opencode/README.md`](../presets/opencode/README.md).
|
|
187
|
+
|
|
188
|
+
### Product specs authoring surface
|
|
189
|
+
|
|
190
|
+
| Piece | Path / note |
|
|
191
|
+
|-------|-------------|
|
|
192
|
+
| Discovery stem | `_shared/core/architecture/product-specs.md` — **Consume** mode; requestable (`alwaysApply: false` / Claude `paths: docs/specs/**/*`) |
|
|
193
|
+
| Authoring stem | `_shared/core/architecture/product-specs-authoring.md` — **Generate / Bootstrap**; same requestability; split keeps discovery lean |
|
|
194
|
+
| Assets SoT | `_shared/assets/docs-specs/` — INDEX stub, `_templates/{page,feature}.md`, optional `schemas/frontmatter-v1.schema.json` |
|
|
195
|
+
| CLI seed | `init` copies assets when consumer `docs/specs/` **absent**; never overwrite existing INDEX; skip if directory exists (even empty) |
|
|
196
|
+
| Skill | `skills/spec-authoring/` (stacks with `feature-delivery`) — template ensure, frontmatter/body fill, INDEX same-changeset |
|
|
197
|
+
| Discovery skill | `skills/spec-discovery/` — requestable; 11 methods + claim ledger; author-mode research-before-spec only (not default `/task`) |
|
|
198
|
+
| Command | `/spec-start` → task-analyst author mode → human gate (no dedicated `spec-author` agent) |
|
|
199
|
+
| Agents | **task-analyst** primary author; **tech-writer** post-sync (9 stacks; **mcp-ts analyst-only**); **feature-developer** consumes approved specs as SoT |
|
|
200
|
+
| Validation | code-reviewer **WARN** drift / **FAIL** broken INDEX or missing required FM on touched specs; build-verifier **FAIL** missing assets/twins/requestable; optional `scripts/check-product-specs.sh` (**WARN** default, **`--strict`** FAIL; ships in the npm `files` tarball). Checker is bash INDEX/keys/headings — it does **not** evaluate `frontmatter-v1.schema.json` |
|
|
201
|
+
| Dogfood | `dogfood/mcp-ts-sample/docs/specs/` — mcp-ts field semantics (`routes` = tool names) |
|
|
202
|
+
|
|
203
|
+
When adding or changing either stem: update **both** ×20 adapters, README mapping rows, and run `check:shared-core-drift` + `check:preset-structure`.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## How to add a new stack preset
|
|
208
|
+
|
|
209
|
+
**Reference implementation:** `go` / `java` / `php-hexagonal` / **`php-laravel`** — backend twins under [`presets/cursor/`](../presets/cursor/) + Claude. Closest template for layered backends is **`java`** (dual tooling discovery + framework variants) or **`go`**; do not copy `next` UI/store surface wholesale. For **frontend** stacks, scaffold from **`next`**, **`nuxt`**, or **`svelte`** (React/RTK vs Vue/Pinia vs SvelteKit/`store-svelte`); recent additions **`nuxt`** (Nuxt 3 root layout, `vue-performance`) and **`svelte`** (SvelteKit `src/` layout, `svelte-performance`, script gate **`check`**) mirror `next` agent-team depth.
|
|
210
|
+
|
|
211
|
+
**PHP stacks (coexistence):**
|
|
212
|
+
|
|
213
|
+
| Install id | When to use |
|
|
214
|
+
|------------|-------------|
|
|
215
|
+
| **`php-laravel`** | Laravel backend/API — Eloquent, Form Requests, Policies, `routes/api.php`, `php artisan test`. Agents follow Laravel-first conventions (thin controllers, Actions/Services). |
|
|
216
|
+
| **`php-hexagonal`** | Framework-agnostic or multi-framework PHP — strict ports & adapters (`Domain` / `Application` / `Adapters` / `Composition`); Slim/Symfony/plain PHP edge. |
|
|
217
|
+
|
|
218
|
+
Distinct CLI ids; neither renames nor replaces the other. Comparison prose in stack READMEs is OK; do not mix hexagonal path invariants into Laravel always-on bodies.
|
|
219
|
+
|
|
220
|
+
Recent additions: **`android-kotlin`** (scaffolded from `ios-swift` agent-team + `java` CA/Gradle patterns; instrumentation-test trio; vendor-neutral placeholders); **`php-hexagonal`** (scaffolded from `java`, Composer/PHPUnit gates; dogfood `dogfood/php-hexagonal`); **`php-laravel`** (scaffolded from `php-hexagonal`, Laravel-first rules; dogfood `dogfood/php-laravel` — full `laravel/framework`).
|
|
221
|
+
|
|
222
|
+
1. **Copy structure** from the closest existing stack (flat Cursor `rules/*.mdc`, Claude topic folders). For PHP/Go backends, start from `java` or `go` skeleton and rewrite Stack notes / tooling.
|
|
223
|
+
2. **Define always-on set** (Cursor/Claude 3–5 — extra slots reserved for `ai-local-overlay`) — stack-specific cores plus `ai-local-overlay` on Cursor. Embed shared quality from `_shared/core` where applicable. `go` uses `go-app-core`, `architecture-boundaries`, `code-quality-and-refactoring`, `ai-local-overlay`.
|
|
224
|
+
3. **Stack-specific rules** — domain, tooling, post-change gate, agents/skills with stack-appropriate names (no Playwright stems on iOS/go, no XCUITest stems on Next/go, no xcodebuild/ESLint as required handoffs on go, etc.).
|
|
225
|
+
4. **Embed core** — add `<!-- shared-core: … -->` adapters for shared stems; fill `## Stack notes` with stack examples only in adapters (Go: hexagonal layers; Android: Activity/Compose paths).
|
|
226
|
+
5. **Claude twin** — create topic `.md` files + **Cursor→Claude mapping table** in `claude/<stack>/rules/README.md`. `go` ships `ui-and-accessibility/README.md` as N/A stub only.
|
|
227
|
+
6. **Meta-rules** — add five `preset-*.mdc` / `preset-*.md` wrappers with preset-path globs (same as existing stacks).
|
|
228
|
+
7. **build-verifier** — include preset-structure checks + stack leakage list.
|
|
229
|
+
8. **Platform artifacts** — see next section.
|
|
230
|
+
9. **Structure scripts** — add stack name to `STACKS` in `check-preset-twin-map.sh`, `check-preset-token-budget.sh`, `check-preset-leakage.sh`; fork `chain-team-phases.sh` byte-wise from other stacks.
|
|
231
|
+
10. **Platform registration** — add the stack to `STACK_PROFILES` in `scripts/lib/stack-platform-profiles.mjs`, to `releasedStacks` in both `presets/mavis/platform-contract.json` and `presets/opencode/platform-contract.json`, then generate the derived trees: `node scripts/generate-mavis.mjs --stack <name>` and `node scripts/generate-opencode.mjs --stack <name>`. Verify with `node scripts/check-generated-drift.mjs`.
|
|
232
|
+
11. **Document** — stack `README.md`, `rules/README.md` core→stack table, twin row in this guide, link `_shared/README.md`.
|
|
233
|
+
12. **Package README** — list new preset name under install examples for all four platforms (`init cursor|claude|mavis|opencode --preset <name>`).
|
|
234
|
+
|
|
235
|
+
Twin policy: Cursor SoT per stack; Claude derived same PR from day one.
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Impact tags (domain rules)
|
|
240
|
+
|
|
241
|
+
Optional YAML frontmatter key for teachable / high-stakes domain rules (especially next rules with Incorrect/Correct samples):
|
|
242
|
+
|
|
243
|
+
```yaml
|
|
244
|
+
impact: HIGH # CRITICAL | HIGH | MEDIUM | LOW
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
| Level | When to use |
|
|
248
|
+
|-------|-------------|
|
|
249
|
+
| `CRITICAL` | Correctness, security, or hard layer boundaries — violations break the product or leak data |
|
|
250
|
+
| `HIGH` | Architecture / imports / public API contracts agents must not invent around |
|
|
251
|
+
| `MEDIUM` | Team conventions that matter for consistency but are not boundary-critical |
|
|
252
|
+
| `LOW` | Style / nit preferences (prefer linters when possible) |
|
|
253
|
+
|
|
254
|
+
**Rules:**
|
|
255
|
+
|
|
256
|
+
- Key is exactly `impact` (lowercase); values uppercase enum only.
|
|
257
|
+
- Cursor: same frontmatter as `description` / `globs` / `alwaysApply`.
|
|
258
|
+
- Claude twins: **mirror the same `impact:` key/value** in YAML frontmatter (with `paths:`).
|
|
259
|
+
- **Do not** use a body `## Impact` block — frontmatter only.
|
|
260
|
+
- **Forbidden** in `_shared/core/**` (core has no frontmatter).
|
|
261
|
+
- Structure scripts ignore unknown YAML keys; `check:preset-structure` does **not** require `impact`. Opt-in `yarn check:rule-eval` may require it for golden stems.
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## How to add a platform-only artifact
|
|
266
|
+
|
|
267
|
+
Artifacts that do not have a semantic twin on the other platform:
|
|
268
|
+
|
|
269
|
+
| Artifact | Platform | Location in preset | Installed to |
|
|
270
|
+
|----------|----------|----------------------|--------------|
|
|
271
|
+
| `REPO_AGENTS.md` | Both | `presets/{cursor\|claude}/<stack>/REPO_AGENTS.md` | `<cwd>/AGENTS.md` |
|
|
272
|
+
| `BUGBOT.md` | Cursor only | `presets/cursor/<stack>/BUGBOT.md` | `.cursor/BUGBOT.md` |
|
|
273
|
+
| `AGENTS.md` | Cursor only | `presets/cursor/<stack>/AGENTS.md` | `.cursor/AGENTS.md` |
|
|
274
|
+
| `hooks.json` | Cursor only | `presets/cursor/<stack>/hooks.json` | `.cursor/hooks.json` |
|
|
275
|
+
| `CLAUDE.md` | Claude only | `presets/claude/<stack>/CLAUDE.md` | `.claude/CLAUDE.md` |
|
|
276
|
+
|
|
277
|
+
**`REPO_AGENTS.md` authoring skeleton** (required section order; bodies per-stack):
|
|
278
|
+
|
|
279
|
+
```markdown
|
|
280
|
+
# <Stack display name> — agent instructions
|
|
281
|
+
## Cross-tool setup
|
|
282
|
+
## Presence-based load (next: if `.cursor/` / `.claude/` / `.mavis/` / `.opencode/` exists)
|
|
283
|
+
## Pipelines are shared (slug lives under `.ai.local/team/tasks/<slug>/`)
|
|
284
|
+
## Commands (test / lint / build)
|
|
285
|
+
## Security basics
|
|
286
|
+
## Tool entry points
|
|
287
|
+
## Living conventions
|
|
288
|
+
## Local overlay (`.ai.local/`) — MANDATORY
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
Living gotchas go in **`.ai.local/conventions.md`** (pointer only in root `AGENTS.md`). Do not load `.ai.local/team/**` as overlay rules. Keep root file lean (≤ ~80 lines). For **next**, Cursor/Claude/Mavis/OpenCode `REPO_AGENTS.md` must be byte-identical. CLI: `repoRootFiles` maps `REPO_AGENTS.md` → `AGENTS.md` (overwrite on init; `clean` removes it only when no other tool install remains). Do **not** put `REPO_AGENTS.md` in `toolRootFiles`.
|
|
292
|
+
|
|
293
|
+
**Do not** duplicate Bugbot review prose into Claude — use skill `code-review` + `tooling-and-review/code-review.md` on Claude.
|
|
294
|
+
|
|
295
|
+
When adding a platform-only file:
|
|
296
|
+
|
|
297
|
+
1. Place it at the preset root (same level as `rules/`, `agents/`).
|
|
298
|
+
2. Mention in stack `README.md` that there is no cross-platform twin.
|
|
299
|
+
3. Ensure `ai-rules clean` documents the path if it becomes CLI-managed (see package README).
|
|
300
|
+
4. No `shared-core` marker — platform packaging only.
|
|
301
|
+
|
|
302
|
+
Hooks scripts may fork per stack (e.g. ios-swift `chain-team-phases.sh` must not be byte-identical to next’s).
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Where to put a new rule
|
|
307
|
+
|
|
308
|
+
1. **Shared principle for all stacks?** → `_shared/core/` → adapters in each stack with marker + Stack notes.
|
|
309
|
+
2. **One stack only?** → `presets/cursor/<stack>/rules/<stem>.mdc` + Claude twin under the correct topic folder.
|
|
310
|
+
3. **Preset author workflow?** → `_shared/core/meta/` + `preset-*.mdc` / `tooling-and-review/preset-*.md` with preset globs only.
|
|
311
|
+
4. **Heavy workflow (orchestrator, feature-delivery, code-review)?** → requestable / `paths:` / globs — **not** always-on.
|
|
312
|
+
|
|
313
|
+
See packaged **`preset-layering`** and **`preset-no-cross-stack-leakage`** for details.
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Layout asymmetry (intentional P1)
|
|
318
|
+
|
|
319
|
+
- **Cursor:** flat `rules/*.mdc` (topic folders optional P2).
|
|
320
|
+
- **Claude:** topic subfolders under `rules/`.
|
|
321
|
+
|
|
322
|
+
Parity is by **stem and mapping table**, not identical directory shape. Use `claude/<stack>/rules/README.md` as the Cursor→Claude index.
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## Meta-rules reference (authors)
|
|
327
|
+
|
|
328
|
+
| Stem | Core source | Purpose |
|
|
329
|
+
|------|-------------|---------|
|
|
330
|
+
| `preset-layering` | `core/meta/preset-layering.md` | Core → Stack → Platform |
|
|
331
|
+
| `preset-twin-sync` | `core/meta/preset-twin-sync.md` | SoT, same-PR twins, mapping |
|
|
332
|
+
| `preset-token-budget` | `core/meta/preset-token-budget.md` | ≤3 always-on, meta loading |
|
|
333
|
+
| `preset-pr-checklist` | `core/meta/preset-pr-checklist.md` | Merge checklist |
|
|
334
|
+
| `preset-no-cross-stack-leakage` | `core/meta/preset-no-cross-stack-leakage.md` | Forbidden cross-stack strings |
|
|
335
|
+
|
|
336
|
+
Load these when editing files under `packages/ai-rules/presets/**`, `.cursor/**` dogfood, or `.claude/**` dogfood.
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Dogfood & structure scripts (this monorepo)
|
|
341
|
+
|
|
342
|
+
| Script / npm | Purpose |
|
|
343
|
+
|--------------|---------|
|
|
344
|
+
| `scripts/sync-dogfood-cursor.sh` | Copy `presets/cursor/<preset>/` → root `.cursor/` (`AI_RULES_DOGFOOD_PRESET`, default `next`). Also copies `REPO_AGENTS.md` → repo-root `AGENTS.md`. Seeds `.ai.local/team` templates; preserves `.ai.local/team/tasks/`. |
|
|
345
|
+
| `scripts/check-shared-core-drift.sh` / `yarn check:shared-core-drift` | Check embed-mode adapters vs core; lists lineage consumers. Soft by default; set `AI_RULES_DRIFT_FAIL=1` (or use `check:preset-structure`) to exit non-zero on drift. |
|
|
346
|
+
| `scripts/check-preset-twin-map.sh` / `yarn check:preset-twin-map` | **FAIL** if Cursor `.mdc` missing from Claude mapping table, twin file missing, or orphan topic `.md` (excl. `**/README.md`). Stacks: `next`, `nuxt`, `svelte`, `ios-swift`, `android-kotlin`, `go`, `java`, `mcp-ts`, `php-hexagonal`, `php-laravel`. |
|
|
347
|
+
| `scripts/check-preset-token-budget.sh` / `yarn check:preset-token-budget` | **FAIL** if Cursor `alwaysApply: true` or Claude no-`paths:` (excl. README) count is outside **3–5**, `preset-*` always-on, or intended body sum > **200**. Stacks include `nuxt`, `svelte`. |
|
|
348
|
+
| `scripts/check-preset-leakage.sh` / `yarn check:preset-leakage` | **FAIL** on forbidden stems in `hooks/**/*.sh` (recursive), wrong-stack agent filenames, or **positive** (non-negation) agent body mentions; **FAIL** if chain scripts are byte-identical across stacks. Explicit **negation** of forbidden stems in agent bodies is **suppressed** (INFO summary count only — not a merge blocker). Non-negation mentions in `build-verifier` → **WARN only**. |
|
|
349
|
+
| `scripts/check-preset-structure.sh` / `yarn check:preset-structure` | Orchestrator: twin-map + token-budget + leakage + shared-core drift (**all hard**; drift via `AI_RULES_DRIFT_FAIL=1`). Does **not** run rule-eval. |
|
|
350
|
+
| `scripts/check-product-specs.sh` / `yarn check:product-specs` | Opt-in consumer tree check: frontmatter v1 keys + required body headings on `docs/specs/**` (bash; does **not** run JSON Schema). Ships in the npm package `files` (`scripts/`). **WARN** by default; **`--strict`** exits non-zero. |
|
|
351
|
+
| `yarn check:product-specs:dogfood` | Same script against monorepo `dogfood/mcp-ts-sample`. Soft WARN inside `check:preset-structure` + CI step (`continue-on-error`); not a hard consumer CI gate. |
|
|
352
|
+
| `scripts/check-rule-eval.mjs` / `yarn check:rule-eval` | Opt-in: validates Incorrect/Correct pairs + `impact:` on **next-only** golden stems (`eval/next/manifest.json`). Backend / ios / php-hexagonal / php-laravel stems are out of scope until a stack adds `eval/<stack>/`. Not part of `check:preset-structure`. |
|
|
353
|
+
|
|
354
|
+
Run from `packages/ai-rules/`:
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
yarn check:preset-structure
|
|
358
|
+
# or
|
|
359
|
+
bash scripts/check-preset-structure.sh
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
CI: [`.github/workflows/preset-structure.yml`](../../../.github/workflows/preset-structure.yml) runs the orchestrator on PRs touching `packages/ai-rules/**`.
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Building blocks — what to add where
|
|
367
|
+
|
|
368
|
+
When packaging a new habit for agents, pick **one** primary artifact. Prefer the lightest option that fits.
|
|
369
|
+
|
|
370
|
+
| Artifact | Invocation | Purpose | Context impact |
|
|
371
|
+
|----------|------------|---------|----------------|
|
|
372
|
+
| **Always-on / session-start rule** | Auto | Persistent standards every session | Always in context — **budget 3–5** |
|
|
373
|
+
| **Requestable / globs / `paths:` rule** | On match or demand | Domain/tooling for relevant files | Loaded when paths match |
|
|
374
|
+
| **Slash command** | Manual (or orchestrated) | Reusable prompt template with parameters | One interaction |
|
|
375
|
+
| **Skill (`SKILL.md`)** | Auto or agent-followed | Multi-step procedure / checklist | Loaded into current agent context |
|
|
376
|
+
| **Subagent (`agents/*.md`)** | Auto/Manual | Separate persona + (often) fresh context | Separate system prompt / context |
|
|
377
|
+
| **`.ai.local/conventions.md`** | Pointer from AGENTS | Living gotchas after init (consumer-owned) | Not always-on; fill post-init |
|
|
378
|
+
| **Hook** | Tool lifecycle | Mechanical enforce (format, secret guard) | Outside model prose |
|
|
379
|
+
|
|
380
|
+
## Skill authoring craft (SDO)
|
|
381
|
+
|
|
382
|
+
Skills are behavior-shaping, not essays. When adding or editing `skills/**/SKILL.md`:
|
|
383
|
+
|
|
384
|
+
1. **SDO (`description` = WHEN, not WHAT).** Frontmatter `description` must start with trigger/symptoms (`Use when…`). Do **not** summarize the workflow there — agents skip reading `SKILL.md` and follow the truncated blurb.
|
|
385
|
+
2. **Positive recipes over composition bans.** Write the required output shape (`Your dispatch must contain 1…5`). Bare “don’t restate / don’t narrate” often backfires. Keep **discrete** prohibitions (don’t run tests; don’t edit `status.json`) and **recognition tables** (Red Flags / rationalizations).
|
|
386
|
+
3. **No nuance clauses on hard gates.** `unless it matters` re-opens negotiation. If a rule is strict, keep it strict.
|
|
387
|
+
4. **Size.** Prefer `SKILL.md` under **~500 lines**. Move 100+ line references and scripts beside the skill. If a skill exceeds 500, split — do not grow it.
|
|
388
|
+
5. **Test the failure, then the wording.** Pressure-test with a subagent *without* the skill, capture the excuse, then write the minimal counter. One skill at a time.
|
|
389
|
+
|
|
390
|
+
Author-only: this section is **not** copied by `init`.
|
|
391
|
+
|
|
392
|
+
### B1–B5 stems (all stacks)
|
|
393
|
+
|
|
394
|
+
| Stem | Drift mode | Why | Consumers |
|
|
395
|
+
|------|------------|-----|-----------|
|
|
396
|
+
| `quality/debug-investigation.md` | **embed** | Skill file is core prose + `## Stack notes` only | `skills/debug-investigation/SKILL.md` (10 stacks × 2) |
|
|
397
|
+
| `quality/verification-before-completion.md` | **lineage** | Section snippet inside fat `build-verifier` / `feature-developer` | those agents (debugger 3-fix is inline, not this stem) |
|
|
398
|
+
| `review/receiving-code-review.md` | **lineage** | Section snippet inside fat `code-review` skill | skill + implementer line on `feature-developer`, `debugger`, `ci-investigator` |
|
|
399
|
+
| `agent-team/task-classification.md` | **lineage** | Section snippet inside fat `task-analyst` / `task-router` | those agents |
|
|
400
|
+
|
|
401
|
+
`check-shared-core-drift.sh` embed mode compares the **entire** adapter (minus frontmatter, marker, `## Stack notes`) to the core file. Fat agents cannot be embed consumers. Do **not** put `<!-- shared-core: quality/debug-investigation.md -->` on `debugger.md`. Every `debugger.md` (including backend `go` / `java` / `php-*`) must still **point at** skill `debug-investigation` at the top of the agent body so the 4-phase embed loads.
|
|
402
|
+
|
|
403
|
+
Do **not** edit `quality/anti-sycophancy-discipline.md` for receiving-CR until a dedicated ×10 embed PR.
|
|
404
|
+
|
|
405
|
+
**Decision hints**
|
|
406
|
+
|
|
407
|
+
- Persistent coding standard for all work → always-on **only** if it fits the budget (Cursor/Claude 3–5); else requestable/globs.
|
|
408
|
+
- Repeated multi-step workflow → **skill** (or command that points at a skill).
|
|
409
|
+
- Needs unbiased fresh eyes / role isolation → **subagent** (e.g. `code-reviewer`, `codebase-analyzer`).
|
|
410
|
+
- Project-specific gotcha after a wrong turn → **`.ai.local/conventions.md`** first; graduate to rule/skill after **3+** repetitions (Rule of Three).
|
|
411
|
+
- Mechanical style/safety → **hook example**, not a prose style bible.
|
|
412
|
+
|
|
413
|
+
Do **not** put heavy workflows (orchestrator, feature-delivery, code-review) in always-on rules.
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## Router fixtures vs classifier tests
|
|
418
|
+
|
|
419
|
+
UI stacks ship `team/fixtures/` documenting expected pipelines (`feature-with-figma-url.json`, `feature-with-ux-no-figma.json`, `mockup-review-standalone.json`, `ux-design-standalone.json`, `mockup-review-fail-embedded-status.json`). These files are **shape examples**; they do **not** execute `task-router` heuristics.
|
|
420
|
+
|
|
421
|
+
When changing intent detection — especially `figma.com` + UX-review wording → `mockup-review` **before** `ux-design` **before** `review-only` — update those fixtures and replay the classifier by hand. v1 has no automated prompt→intent test.
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
## Optional follow-ups
|
|
426
|
+
|
|
427
|
+
- CLI codegen / auto twin sync
|
|
428
|
+
- Physical Cursor topic folders mirroring Claude
|
|
429
|
+
- Mass rewrite of stack domain rule bodies
|
|
430
|
+
- Dedicated `preset-verifier` agent (today: `build-verifier` preset-structure section + structure scripts)
|
|
431
|
+
- ~~Tighten leakage WARN heuristics~~ — done: negation mentions suppressed; fixture `skipped` must list Phase-1 roster agents only (`mcp-ts` policy)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Preset English style guide (B0)
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
All installable preset prose is **English**: shared core, stack adapters (Cursor SoT + Claude twins), agents, skills, commands, hooks comments, and package-facing docs under `packages/ai-rules/presets/**`.
|
|
6
|
+
|
|
7
|
+
Prose-only change: do not rename stems, paths, frontmatter keys, or CLI surfaces for translation.
|
|
8
|
+
|
|
9
|
+
## Exception taxonomy (E1–E8)
|
|
10
|
+
|
|
11
|
+
| ID | Kind | Policy | Example |
|
|
12
|
+
|----|------|--------|---------|
|
|
13
|
+
| **E1** | Technical identifiers | Always keep | Rule stems, agent names, npm scripts, env vars |
|
|
14
|
+
| **E2** | Paths, globs, frontmatter keys | Always keep | `alwaysApply: true`, `globs:`, `paths:` |
|
|
15
|
+
| **E3** | Embed markers & schema tokens | Always keep | `<!-- shared-core: … -->`, JSON field names |
|
|
16
|
+
| **E4** | Quoted product/UI / user-phrasing | Keep original + EN gloss | `«Сохранить» (Save)` <!-- i18n-keep: E4 --> |
|
|
17
|
+
| **E5** | Locale demo fixtures | Keep target locale | Cyrillic in a hypothetical i18n fixture |
|
|
18
|
+
| **E6** | Proper nouns / trademarks | Always keep | Next.js, Pinia, SwiftLint |
|
|
19
|
+
| **E7** | Stack CLI output (verbatim) | Keep if cited as evidence | Untranslated linter message quote |
|
|
20
|
+
| **E8** | Author RU in runtime team tasks | Out of scope | Existing `.ai.local/team/tasks/**` — no retroactive translation |
|
|
21
|
+
|
|
22
|
+
E1–E3 and E6 never need a marker (they are not “other-language prose”). E8 is scoped out of audits that target presets.
|
|
23
|
+
|
|
24
|
+
## Keep marker
|
|
25
|
+
|
|
26
|
+
When retaining non-English under **E4**, **E5**, or **E7**, place within ±3 lines of the match:
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<!-- i18n-keep: E4|E5|E7 -->
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Use the matching ID only (e.g. `<!-- i18n-keep: E4 -->`).
|
|
33
|
+
|
|
34
|
+
**Audit:** `npm run check:preset-i18n` (hard) or soft `bash scripts/check-preset-i18n.sh` — unmarked Cyrillic in scoped trees is a FAIL in hard mode. Markers may sit within ±3 lines of the match.
|
|
35
|
+
|
|
36
|
+
## E4 gloss template (canonical)
|
|
37
|
+
|
|
38
|
+
When citing non-English user/product phrasing, use **original first, English gloss in parentheses**:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
«оригинал» (English gloss)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Examples:
|
|
45
|
+
|
|
46
|
+
- Intent signals: `«добавь» (add), «новая» (new)`
|
|
47
|
+
- Skip phrases: `«без pipeline» (no pipeline), «просто сделай» (just do it)`
|
|
48
|
+
- Inline pairs: `«как работает X» / "how does X work"` (guillemets for the original; ASCII quotes for English)
|
|
49
|
+
|
|
50
|
+
Do **not** use EN-first “also RU: …” or `«RU» / "EN"` as the default in new prose. Prefer the forms above for Cursor SoT and Claude twins.
|
|
51
|
+
|
|
52
|
+
English-only reason strings (no locale copy) use ASCII quotes: `"iOS uses XCUITest"`, not guillemets.
|
|
53
|
+
|
|
54
|
+
## Stack-class bilingual policy
|
|
55
|
+
|
|
56
|
+
| Class | Stacks | User-signal tables / `/task` examples |
|
|
57
|
+
|-------|--------|----------------------------------------|
|
|
58
|
+
| **Bilingual (RU+EN)** | `next`, `nuxt`, `php-hexagonal`, `php-laravel`, `go`, `java` | Include RU user phrasing with E4 glosses (canonical template) |
|
|
59
|
+
| **EN-primary** | `svelte`, `ios-swift`, `mcp-ts` | EN signals/examples are enough; add E4 RU glosses only when the consuming product expects RU prompts |
|
|
60
|
+
|
|
61
|
+
E5 fixtures (test titles, JSDoc locale demos) follow the **repo product locale**. Prefer tagging fixtures **E5** (not E4). When showing a Cyrillic fixture, an EN gloss on the same line is optional but recommended for bilingual stacks.
|
|
62
|
+
|
|
63
|
+
## Glossary
|
|
64
|
+
|
|
65
|
+
| Term | Meaning |
|
|
66
|
+
|------|---------|
|
|
67
|
+
| **SoT** | Source of truth. Packages path `packages/ai-rules/presets/**`; per stack, Cursor `.mdc` before Claude twin. Prefer **SoT** after first expansion in a doc; “source of truth” is fine in running prose. |
|
|
68
|
+
| **always-on** | Loaded every session: Cursor `alwaysApply: true`; Claude rules without `paths:` (3–5 — see `preset-token-budget`). |
|
|
69
|
+
| **requestable** | Loaded on demand (globs / paths / agent wiring), not session-start. |
|
|
70
|
+
| **FAIL / PASS** | Verifier outcomes (`build-verifier`, drift scripts). Preserve casing in checklists. |
|
|
71
|
+
| **must** | Hard requirement; violation is FAIL or blocking. Prefer this word for normative gates. |
|
|
72
|
+
| **should** | Strong default; document intentional deviation. |
|
|
73
|
+
| **may / can** | Optional / allowed. |
|
|
74
|
+
| **required** | Prefer for **loading** behavior (“required after edits” = agent must load/run the rule). Prefer **must** for checklist obligations (“Errors — must fix”). Avoid **mandatory** in new prose. |
|
|
75
|
+
|
|
76
|
+
Modality mapping when translating: должен → **must**; следует → **should**; можно → **may** / **can** as context fits. <!-- i18n-keep: E5 -->
|
|
77
|
+
|
|
78
|
+
## Translation order
|
|
79
|
+
|
|
80
|
+
1. **Core** — `presets/_shared/core/**` (no `<!-- shared-core -->` markers in core files).
|
|
81
|
+
2. **Embeds** — update all `<!-- shared-core: … -->` consumers to match EN core bodies (same PR as core when possible); `scripts/sync-shared-core-embeds.sh` for EMBED-mode stems.
|
|
82
|
+
3. **Cursor SoT** — `presets/cursor/<stack>/` rule/agent/skill/command bodies.
|
|
83
|
+
4. **Claude twin** — `presets/claude/<stack>/` equivalent semantics **same PR** (`preset-twin-sync`).
|
|
84
|
+
5. **Dogfood sync** — `packages/ai-rules/scripts/sync-dogfood-cursor.sh` after Cursor SoT changes in this monorepo.
|
|
85
|
+
|
|
86
|
+
Also: `check-shared-core-drift.sh` for embed-mode stems; stack README mapping tables when stems move; `check-preset-i18n` via `check-preset-structure` / CI.
|
|
87
|
+
|
|
88
|
+
## Related
|
|
89
|
+
|
|
90
|
+
- Contribution workflow: [`PRESET-CONTRIBUTION.md`](./PRESET-CONTRIBUTION.md)
|
|
91
|
+
- Meta rules: `preset-layering`, `preset-twin-sync`, `preset-token-budget`, `preset-pr-checklist`, `preset-no-cross-stack-leakage`
|