@bonesofspring/ai-rules 0.2.30 → 0.2.32
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 +11 -0
- package/docs/LOCAL-OVERLAY.md +14 -0
- package/package.json +1 -1
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +6 -4
- package/presets/_shared/core/agent-team/agent-task-metrics.md +14 -1
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +3 -1
- package/presets/claude/android-kotlin/agents/accessibility-reviewer.md +2 -2
- package/presets/claude/android-kotlin/agents/api-contract-reviewer.md +2 -2
- package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/claude/android-kotlin/agents/ci-investigator.md +2 -2
- package/presets/claude/android-kotlin/agents/code-reviewer.md +2 -2
- package/presets/claude/android-kotlin/agents/debugger.md +2 -2
- package/presets/claude/android-kotlin/agents/feature-developer.md +2 -2
- package/presets/claude/android-kotlin/agents/migration-specialist.md +2 -2
- package/presets/claude/android-kotlin/agents/mockup-reviewer.md +2 -2
- package/presets/claude/android-kotlin/agents/openspec-author.md +2 -2
- package/presets/claude/android-kotlin/agents/performance-auditor.md +2 -2
- package/presets/claude/android-kotlin/agents/qa-tester.md +2 -2
- package/presets/claude/android-kotlin/agents/security-reviewer.md +2 -2
- package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/claude/android-kotlin/agents/task-router.md +1 -1
- package/presets/claude/android-kotlin/agents/tech-writer.md +2 -2
- package/presets/claude/android-kotlin/agents/unit-test-generator.md +2 -2
- package/presets/claude/android-kotlin/agents/unit-test-healer.md +2 -2
- package/presets/claude/android-kotlin/agents/unit-test-planner.md +2 -2
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/go/agents/build-verifier.md +2 -2
- package/presets/claude/go/agents/code-reviewer.md +2 -2
- package/presets/claude/go/agents/feature-developer.md +2 -2
- package/presets/claude/go/agents/openspec-author.md +2 -2
- package/presets/claude/go/agents/task-analyst.md +1 -1
- package/presets/claude/go/agents/task-router.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
- package/presets/claude/ios-swift/agents/build-verifier.md +2 -2
- package/presets/claude/ios-swift/agents/code-reviewer.md +2 -2
- package/presets/claude/ios-swift/agents/feature-developer.md +2 -2
- package/presets/claude/ios-swift/agents/mockup-reviewer.md +2 -2
- package/presets/claude/ios-swift/agents/openspec-author.md +2 -2
- package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
- package/presets/claude/ios-swift/agents/task-router.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/java/agents/build-verifier.md +2 -2
- package/presets/claude/java/agents/code-reviewer.md +2 -2
- package/presets/claude/java/agents/feature-developer.md +2 -2
- package/presets/claude/java/agents/openspec-author.md +2 -2
- package/presets/claude/java/agents/task-analyst.md +1 -1
- package/presets/claude/java/agents/task-router.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
- package/presets/claude/mcp-ts/agents/build-verifier.md +2 -2
- package/presets/claude/mcp-ts/agents/feature-developer.md +2 -2
- package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/claude/mcp-ts/agents/task-router.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
- package/presets/claude/next/REPO_AGENTS.md +11 -1
- package/presets/claude/next/agents/accessibility-reviewer.md +2 -2
- package/presets/claude/next/agents/api-contract-reviewer.md +2 -2
- package/presets/claude/next/agents/build-verifier.md +3 -2
- package/presets/claude/next/agents/ci-investigator.md +2 -2
- package/presets/claude/next/agents/code-reviewer.md +3 -2
- package/presets/claude/next/agents/debugger.md +2 -2
- package/presets/claude/next/agents/feature-developer.md +3 -2
- package/presets/claude/next/agents/migration-specialist.md +2 -2
- package/presets/claude/next/agents/mockup-reviewer.md +2 -2
- package/presets/claude/next/agents/openspec-author.md +4 -2
- package/presets/claude/next/agents/performance-auditor.md +2 -2
- package/presets/claude/next/agents/qa-tester.md +2 -2
- package/presets/claude/next/agents/security-reviewer.md +2 -2
- package/presets/claude/next/agents/solution-architect.md +2 -2
- package/presets/claude/next/agents/task-analyst.md +8 -1
- package/presets/claude/next/agents/task-router.md +2 -1
- package/presets/claude/next/agents/tech-writer.md +2 -2
- package/presets/claude/next/agents/unit-test-generator.md +2 -2
- package/presets/claude/next/agents/unit-test-healer.md +2 -2
- package/presets/claude/next/agents/unit-test-planner.md +2 -2
- package/presets/claude/next/hooks/chain-team-phases.sh +46 -1
- package/presets/claude/next/rules/README.md +3 -0
- package/presets/claude/next/rules/anti-hallucination/react-next-anti-hallucination.md +10 -0
- package/presets/claude/next/rules/api-and-data/store-rtk.md +6 -0
- package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +5 -1
- package/presets/claude/next/rules/architecture/product-specs-authoring.md +1 -0
- package/presets/claude/next/rules/architecture/product-specs.md +1 -0
- package/presets/claude/next/rules/architecture/reference-features.md +5 -0
- package/presets/claude/next/rules/stack/next-app-core.md +3 -0
- package/presets/claude/next/rules/stack/next-static-export.md +36 -0
- package/presets/claude/next/rules/testing/tests-e2e-structure.md +1 -0
- package/presets/claude/next/rules/testing/tests-unit.md +1 -0
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
- package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +16 -2
- package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +4 -0
- package/presets/claude/next/rules/tooling-and-review/mcp-usage.md +1 -0
- package/presets/claude/next/rules/tooling-and-review/post-change-lint.md +4 -0
- package/presets/claude/next/rules/tooling-and-review/security-next.md +13 -0
- package/presets/claude/next/rules/ui-and-accessibility/component-catalog-gate.md +39 -0
- package/presets/claude/next/rules/ui-and-accessibility/design-tokens-binding.md +1 -1
- package/presets/claude/next/rules/ui-and-accessibility/forms-validation.md +35 -0
- package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +19 -1
- package/presets/claude/next/team/fixtures/feature-with-ux-no-figma.json +3 -4
- package/presets/claude/nuxt/agents/accessibility-reviewer.md +2 -2
- package/presets/claude/nuxt/agents/api-contract-reviewer.md +2 -2
- package/presets/claude/nuxt/agents/build-verifier.md +2 -2
- package/presets/claude/nuxt/agents/ci-investigator.md +2 -2
- package/presets/claude/nuxt/agents/code-reviewer.md +2 -2
- package/presets/claude/nuxt/agents/debugger.md +2 -2
- package/presets/claude/nuxt/agents/feature-developer.md +2 -2
- package/presets/claude/nuxt/agents/migration-specialist.md +2 -2
- package/presets/claude/nuxt/agents/mockup-reviewer.md +2 -2
- package/presets/claude/nuxt/agents/openspec-author.md +2 -2
- package/presets/claude/nuxt/agents/performance-auditor.md +2 -2
- package/presets/claude/nuxt/agents/qa-tester.md +2 -2
- package/presets/claude/nuxt/agents/security-reviewer.md +2 -2
- package/presets/claude/nuxt/agents/solution-architect.md +2 -2
- package/presets/claude/nuxt/agents/task-analyst.md +1 -1
- package/presets/claude/nuxt/agents/task-router.md +1 -1
- package/presets/claude/nuxt/agents/tech-writer.md +2 -2
- package/presets/claude/nuxt/agents/unit-test-generator.md +2 -2
- package/presets/claude/nuxt/agents/unit-test-healer.md +2 -2
- package/presets/claude/nuxt/agents/unit-test-planner.md +2 -2
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
- package/presets/claude/php-hexagonal/agents/build-verifier.md +2 -2
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +2 -2
- package/presets/claude/php-hexagonal/agents/feature-developer.md +2 -2
- package/presets/claude/php-hexagonal/agents/openspec-author.md +2 -2
- package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/claude/php-hexagonal/agents/task-router.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
- package/presets/claude/php-laravel/agents/build-verifier.md +2 -2
- package/presets/claude/php-laravel/agents/code-reviewer.md +2 -2
- package/presets/claude/php-laravel/agents/feature-developer.md +2 -2
- package/presets/claude/php-laravel/agents/openspec-author.md +2 -2
- package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
- package/presets/claude/php-laravel/agents/task-router.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
- package/presets/claude/svelte/agents/accessibility-reviewer.md +2 -2
- package/presets/claude/svelte/agents/api-contract-reviewer.md +2 -2
- package/presets/claude/svelte/agents/build-verifier.md +2 -2
- package/presets/claude/svelte/agents/ci-investigator.md +2 -2
- package/presets/claude/svelte/agents/code-reviewer.md +2 -2
- package/presets/claude/svelte/agents/debugger.md +2 -2
- package/presets/claude/svelte/agents/feature-developer.md +2 -2
- package/presets/claude/svelte/agents/migration-specialist.md +2 -2
- package/presets/claude/svelte/agents/mockup-reviewer.md +2 -2
- package/presets/claude/svelte/agents/openspec-author.md +2 -2
- package/presets/claude/svelte/agents/performance-auditor.md +2 -2
- package/presets/claude/svelte/agents/qa-tester.md +2 -2
- package/presets/claude/svelte/agents/security-reviewer.md +2 -2
- package/presets/claude/svelte/agents/solution-architect.md +2 -2
- package/presets/claude/svelte/agents/task-analyst.md +1 -1
- package/presets/claude/svelte/agents/task-router.md +1 -1
- package/presets/claude/svelte/agents/tech-writer.md +2 -2
- package/presets/claude/svelte/agents/unit-test-generator.md +2 -2
- package/presets/claude/svelte/agents/unit-test-healer.md +2 -2
- package/presets/claude/svelte/agents/unit-test-planner.md +2 -2
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +3 -1
- package/presets/cursor/android-kotlin/agents/accessibility-reviewer.md +2 -2
- package/presets/cursor/android-kotlin/agents/api-contract-reviewer.md +2 -2
- package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/cursor/android-kotlin/agents/ci-investigator.md +2 -2
- package/presets/cursor/android-kotlin/agents/code-reviewer.md +2 -2
- package/presets/cursor/android-kotlin/agents/debugger.md +2 -2
- package/presets/cursor/android-kotlin/agents/feature-developer.md +2 -2
- package/presets/cursor/android-kotlin/agents/migration-specialist.md +2 -2
- package/presets/cursor/android-kotlin/agents/mockup-reviewer.md +2 -2
- package/presets/cursor/android-kotlin/agents/openspec-author.md +2 -2
- package/presets/cursor/android-kotlin/agents/performance-auditor.md +2 -2
- package/presets/cursor/android-kotlin/agents/qa-tester.md +2 -2
- package/presets/cursor/android-kotlin/agents/security-reviewer.md +2 -2
- package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/cursor/android-kotlin/agents/task-router.md +1 -1
- package/presets/cursor/android-kotlin/agents/tech-writer.md +2 -2
- package/presets/cursor/android-kotlin/agents/unit-test-generator.md +2 -2
- package/presets/cursor/android-kotlin/agents/unit-test-healer.md +2 -2
- package/presets/cursor/android-kotlin/agents/unit-test-planner.md +2 -2
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/go/agents/build-verifier.md +2 -2
- package/presets/cursor/go/agents/code-reviewer.md +2 -2
- package/presets/cursor/go/agents/feature-developer.md +2 -2
- package/presets/cursor/go/agents/openspec-author.md +2 -2
- package/presets/cursor/go/agents/task-analyst.md +1 -1
- package/presets/cursor/go/agents/task-router.md +1 -1
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +3 -1
- package/presets/cursor/ios-swift/agents/build-verifier.md +2 -2
- package/presets/cursor/ios-swift/agents/code-reviewer.md +2 -2
- package/presets/cursor/ios-swift/agents/feature-developer.md +2 -2
- package/presets/cursor/ios-swift/agents/mockup-reviewer.md +2 -2
- package/presets/cursor/ios-swift/agents/openspec-author.md +2 -2
- package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
- package/presets/cursor/ios-swift/agents/task-router.md +1 -1
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/java/agents/build-verifier.md +2 -2
- package/presets/cursor/java/agents/code-reviewer.md +2 -2
- package/presets/cursor/java/agents/feature-developer.md +2 -2
- package/presets/cursor/java/agents/openspec-author.md +2 -2
- package/presets/cursor/java/agents/task-analyst.md +1 -1
- package/presets/cursor/java/agents/task-router.md +1 -1
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +3 -1
- package/presets/cursor/mcp-ts/agents/build-verifier.md +2 -2
- package/presets/cursor/mcp-ts/agents/feature-developer.md +2 -2
- package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/cursor/mcp-ts/agents/task-router.md +1 -1
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +3 -1
- package/presets/cursor/next/REPO_AGENTS.md +11 -1
- package/presets/cursor/next/agents/accessibility-reviewer.md +2 -2
- package/presets/cursor/next/agents/api-contract-reviewer.md +2 -2
- package/presets/cursor/next/agents/build-verifier.md +3 -2
- package/presets/cursor/next/agents/ci-investigator.md +2 -2
- package/presets/cursor/next/agents/code-reviewer.md +3 -2
- package/presets/cursor/next/agents/debugger.md +2 -2
- package/presets/cursor/next/agents/feature-developer.md +3 -2
- package/presets/cursor/next/agents/migration-specialist.md +2 -2
- package/presets/cursor/next/agents/mockup-reviewer.md +2 -2
- package/presets/cursor/next/agents/openspec-author.md +4 -2
- package/presets/cursor/next/agents/performance-auditor.md +2 -2
- package/presets/cursor/next/agents/qa-tester.md +2 -2
- package/presets/cursor/next/agents/security-reviewer.md +2 -2
- package/presets/cursor/next/agents/solution-architect.md +2 -2
- package/presets/cursor/next/agents/task-analyst.md +8 -1
- package/presets/cursor/next/agents/task-router.md +2 -1
- package/presets/cursor/next/agents/tech-writer.md +2 -2
- package/presets/cursor/next/agents/unit-test-generator.md +2 -2
- package/presets/cursor/next/agents/unit-test-healer.md +2 -2
- package/presets/cursor/next/agents/unit-test-planner.md +2 -2
- package/presets/cursor/next/ai-local/rules-library/agent-artifacts-no-local-paths.md +41 -8
- package/presets/cursor/next/ai-local/rules-library/agent-pipeline-gates.md +19 -0
- package/presets/cursor/next/ai-local/rules-library/analytics-events.md +18 -0
- package/presets/cursor/next/ai-local/rules-library/api-contract-source.md +14 -0
- package/presets/cursor/next/ai-local/rules-library/artifact-lifecycle.md +17 -0
- package/presets/cursor/next/ai-local/rules-library/code-style.md +68 -0
- package/presets/cursor/next/ai-local/rules-library/component-child-decomposition.md +81 -0
- package/presets/cursor/next/ai-local/rules-library/feature-flags-experiments.md +15 -0
- package/presets/cursor/next/ai-local/rules-library/mcp-required-for-ui-layout.md +1 -1
- package/presets/cursor/next/ai-local/rules-library/no-react-fc.md +46 -0
- package/presets/cursor/next/ai-local/rules-library/no-test-driven-behavior-change.md +1 -1
- package/presets/cursor/next/ai-local/rules-library/pwa-service-worker.md +15 -0
- package/presets/cursor/next/ai-local/rules-library/qa-test-cases.md +14 -0
- package/presets/cursor/next/ai-local/rules-library/router-pages.md +4 -2
- package/presets/cursor/next/ai-local/rules-library/single-source-copy-constants.md +3 -1
- package/presets/cursor/next/ai-local/rules-library/storybook-catalog-structure.md +62 -0
- package/presets/cursor/next/ai-local/rules-library/storybook-cleanup-temp-screenshots.md +40 -0
- package/presets/cursor/next/ai-local/rules-library/storybook-csf-authoring.md +100 -0
- package/presets/cursor/next/ai-local/rules-library/storybook-dev-compare-figma.md +67 -0
- package/presets/cursor/next/ai-local/rules-library/storybook-keep-tests-current.md +75 -0
- package/presets/cursor/next/ai-local/rules-library/storybook-modals.md +64 -0
- package/presets/cursor/next/ai-local/rules-library/storybook-no-app-node-modules.md +40 -0
- package/presets/cursor/next/ai-local/rules-library/storybook-ui-quality-gate.md +38 -0
- package/presets/cursor/next/ai-local/rules-library/task-levels.md +28 -0
- package/presets/cursor/next/ai-local/rules-library/ui-change-review-gate.md +14 -0
- package/presets/cursor/next/hooks/chain-team-phases.sh +46 -1
- package/presets/cursor/next/rules/README.md +4 -1
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +3 -1
- package/presets/cursor/next/rules/ai-local-overlay.mdc +16 -2
- package/presets/cursor/next/rules/code-review-mr.mdc +4 -0
- package/presets/cursor/next/rules/component-catalog-gate.mdc +38 -0
- package/presets/cursor/next/rules/design-tokens-binding.mdc +1 -1
- package/presets/cursor/next/rules/feature-delivery-workflow.mdc +5 -1
- package/presets/cursor/next/rules/forms-validation.mdc +33 -0
- package/presets/cursor/next/rules/mcp-usage.mdc +1 -0
- package/presets/cursor/next/rules/next-app-core.mdc +3 -0
- package/presets/cursor/next/rules/next-static-export.mdc +35 -0
- package/presets/cursor/next/rules/post-change-lint.mdc +4 -0
- package/presets/cursor/next/rules/product-specs-authoring.mdc +1 -0
- package/presets/cursor/next/rules/product-specs.mdc +1 -0
- package/presets/cursor/next/rules/react-next-anti-hallucination.mdc +10 -0
- package/presets/cursor/next/rules/react-ui.mdc +19 -1
- package/presets/cursor/next/rules/reference-features.mdc +5 -0
- package/presets/cursor/next/rules/security-next.mdc +12 -0
- package/presets/cursor/next/rules/store-rtk.mdc +6 -0
- package/presets/cursor/next/rules/tests-e2e-structure.mdc +1 -0
- package/presets/cursor/next/rules/tests-unit.mdc +1 -0
- package/presets/cursor/next/team/fixtures/feature-with-ux-no-figma.json +3 -4
- package/presets/cursor/nuxt/agents/accessibility-reviewer.md +2 -2
- package/presets/cursor/nuxt/agents/api-contract-reviewer.md +2 -2
- package/presets/cursor/nuxt/agents/build-verifier.md +2 -2
- package/presets/cursor/nuxt/agents/ci-investigator.md +2 -2
- package/presets/cursor/nuxt/agents/code-reviewer.md +2 -2
- package/presets/cursor/nuxt/agents/debugger.md +2 -2
- package/presets/cursor/nuxt/agents/feature-developer.md +2 -2
- package/presets/cursor/nuxt/agents/migration-specialist.md +2 -2
- package/presets/cursor/nuxt/agents/mockup-reviewer.md +2 -2
- package/presets/cursor/nuxt/agents/openspec-author.md +2 -2
- package/presets/cursor/nuxt/agents/performance-auditor.md +2 -2
- package/presets/cursor/nuxt/agents/qa-tester.md +2 -2
- package/presets/cursor/nuxt/agents/security-reviewer.md +2 -2
- package/presets/cursor/nuxt/agents/solution-architect.md +2 -2
- package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
- package/presets/cursor/nuxt/agents/task-router.md +1 -1
- package/presets/cursor/nuxt/agents/tech-writer.md +2 -2
- package/presets/cursor/nuxt/agents/unit-test-generator.md +2 -2
- package/presets/cursor/nuxt/agents/unit-test-healer.md +2 -2
- package/presets/cursor/nuxt/agents/unit-test-planner.md +2 -2
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +3 -1
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +2 -2
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +2 -2
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +2 -2
- package/presets/cursor/php-hexagonal/agents/openspec-author.md +2 -2
- package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/cursor/php-hexagonal/agents/task-router.md +1 -1
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +3 -1
- package/presets/cursor/php-laravel/agents/build-verifier.md +2 -2
- package/presets/cursor/php-laravel/agents/code-reviewer.md +2 -2
- package/presets/cursor/php-laravel/agents/feature-developer.md +2 -2
- package/presets/cursor/php-laravel/agents/openspec-author.md +2 -2
- package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
- package/presets/cursor/php-laravel/agents/task-router.md +1 -1
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +3 -1
- package/presets/cursor/svelte/agents/accessibility-reviewer.md +2 -2
- package/presets/cursor/svelte/agents/api-contract-reviewer.md +2 -2
- package/presets/cursor/svelte/agents/build-verifier.md +2 -2
- package/presets/cursor/svelte/agents/ci-investigator.md +2 -2
- package/presets/cursor/svelte/agents/code-reviewer.md +2 -2
- package/presets/cursor/svelte/agents/debugger.md +2 -2
- package/presets/cursor/svelte/agents/feature-developer.md +2 -2
- package/presets/cursor/svelte/agents/migration-specialist.md +2 -2
- package/presets/cursor/svelte/agents/mockup-reviewer.md +2 -2
- package/presets/cursor/svelte/agents/openspec-author.md +2 -2
- package/presets/cursor/svelte/agents/performance-auditor.md +2 -2
- package/presets/cursor/svelte/agents/qa-tester.md +2 -2
- package/presets/cursor/svelte/agents/security-reviewer.md +2 -2
- package/presets/cursor/svelte/agents/solution-architect.md +2 -2
- package/presets/cursor/svelte/agents/task-analyst.md +1 -1
- package/presets/cursor/svelte/agents/task-router.md +1 -1
- package/presets/cursor/svelte/agents/tech-writer.md +2 -2
- package/presets/cursor/svelte/agents/unit-test-generator.md +2 -2
- package/presets/cursor/svelte/agents/unit-test-healer.md +2 -2
- package/presets/cursor/svelte/agents/unit-test-planner.md +2 -2
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +3 -1
- package/presets/mavis/android-kotlin/adapter-map.json +1 -1
- package/presets/mavis/android-kotlin/agents/accessibility-reviewer.md +2 -2
- package/presets/mavis/android-kotlin/agents/api-contract-reviewer.md +2 -2
- package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/mavis/android-kotlin/agents/ci-investigator.md +2 -2
- package/presets/mavis/android-kotlin/agents/code-reviewer.md +2 -2
- package/presets/mavis/android-kotlin/agents/debugger.md +2 -2
- package/presets/mavis/android-kotlin/agents/feature-developer.md +2 -2
- package/presets/mavis/android-kotlin/agents/migration-specialist.md +2 -2
- package/presets/mavis/android-kotlin/agents/mockup-reviewer.md +2 -2
- package/presets/mavis/android-kotlin/agents/openspec-author.md +2 -2
- package/presets/mavis/android-kotlin/agents/performance-auditor.md +2 -2
- package/presets/mavis/android-kotlin/agents/qa-tester.md +2 -2
- package/presets/mavis/android-kotlin/agents/security-reviewer.md +2 -2
- package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/mavis/android-kotlin/agents/task-router.md +1 -1
- package/presets/mavis/android-kotlin/agents/tech-writer.md +2 -2
- package/presets/mavis/android-kotlin/agents/unit-test-generator.md +2 -2
- package/presets/mavis/android-kotlin/agents/unit-test-healer.md +2 -2
- package/presets/mavis/android-kotlin/agents/unit-test-planner.md +2 -2
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +3 -1
- package/presets/mavis/android-kotlin/rules/code-review-mr.md +6 -6
- package/presets/mavis/go/adapter-map.json +1 -1
- package/presets/mavis/go/agents/build-verifier.md +2 -2
- package/presets/mavis/go/agents/code-reviewer.md +2 -2
- package/presets/mavis/go/agents/feature-developer.md +2 -2
- package/presets/mavis/go/agents/openspec-author.md +2 -2
- package/presets/mavis/go/agents/task-analyst.md +1 -1
- package/presets/mavis/go/agents/task-router.md +1 -1
- package/presets/mavis/go/rules/agent-team-orchestrator.md +3 -1
- package/presets/mavis/go/rules/code-quality-and-refactoring.md +1 -1
- package/presets/mavis/ios-swift/adapter-map.json +1 -1
- package/presets/mavis/ios-swift/agents/build-verifier.md +2 -2
- package/presets/mavis/ios-swift/agents/code-reviewer.md +2 -2
- package/presets/mavis/ios-swift/agents/feature-developer.md +2 -2
- package/presets/mavis/ios-swift/agents/mockup-reviewer.md +2 -2
- package/presets/mavis/ios-swift/agents/openspec-author.md +2 -2
- package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
- package/presets/mavis/ios-swift/agents/task-router.md +1 -1
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +3 -1
- package/presets/mavis/ios-swift/rules/code-quality-and-refactoring.md +1 -1
- package/presets/mavis/ios-swift/rules/code-review-mr.md +6 -6
- package/presets/mavis/ios-swift/rules/feature-delivery-workflow.md +14 -14
- package/presets/mavis/ios-swift/rules/reference-features.md +3 -3
- package/presets/mavis/java/adapter-map.json +1 -1
- package/presets/mavis/java/agents/build-verifier.md +2 -2
- package/presets/mavis/java/agents/code-reviewer.md +2 -2
- package/presets/mavis/java/agents/feature-developer.md +2 -2
- package/presets/mavis/java/agents/openspec-author.md +2 -2
- package/presets/mavis/java/agents/task-analyst.md +1 -1
- package/presets/mavis/java/agents/task-router.md +1 -1
- package/presets/mavis/java/rules/agent-team-orchestrator.md +3 -1
- package/presets/mavis/java/rules/code-quality-and-refactoring.md +1 -1
- package/presets/mavis/mcp-ts/adapter-map.json +1 -1
- package/presets/mavis/mcp-ts/agents/build-verifier.md +2 -2
- package/presets/mavis/mcp-ts/agents/feature-developer.md +2 -2
- package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/mavis/mcp-ts/agents/task-router.md +1 -1
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +3 -1
- package/presets/mavis/next/REPO_AGENTS.md +11 -1
- package/presets/mavis/next/adapter-map.json +192 -8
- package/presets/mavis/next/agents/accessibility-reviewer.md +2 -2
- package/presets/mavis/next/agents/api-contract-reviewer.md +2 -2
- package/presets/mavis/next/agents/build-verifier.md +3 -2
- package/presets/mavis/next/agents/ci-investigator.md +2 -2
- package/presets/mavis/next/agents/code-reviewer.md +3 -2
- package/presets/mavis/next/agents/debugger.md +2 -2
- package/presets/mavis/next/agents/feature-developer.md +3 -2
- package/presets/mavis/next/agents/migration-specialist.md +2 -2
- package/presets/mavis/next/agents/mockup-reviewer.md +2 -2
- package/presets/mavis/next/agents/openspec-author.md +4 -2
- package/presets/mavis/next/agents/performance-auditor.md +2 -2
- package/presets/mavis/next/agents/qa-tester.md +2 -2
- package/presets/mavis/next/agents/security-reviewer.md +2 -2
- package/presets/mavis/next/agents/solution-architect.md +2 -2
- package/presets/mavis/next/agents/task-analyst.md +8 -1
- package/presets/mavis/next/agents/task-router.md +2 -1
- package/presets/mavis/next/agents/tech-writer.md +2 -2
- package/presets/mavis/next/agents/unit-test-generator.md +2 -2
- package/presets/mavis/next/agents/unit-test-healer.md +2 -2
- package/presets/mavis/next/agents/unit-test-planner.md +2 -2
- package/presets/mavis/next/ai-local/rules-library/agent-artifacts-no-local-paths.md +41 -8
- package/presets/mavis/next/ai-local/rules-library/agent-pipeline-gates.md +19 -0
- package/presets/mavis/next/ai-local/rules-library/analytics-events.md +18 -0
- package/presets/mavis/next/ai-local/rules-library/api-contract-source.md +14 -0
- package/presets/mavis/next/ai-local/rules-library/artifact-lifecycle.md +17 -0
- package/presets/mavis/next/ai-local/rules-library/code-style.md +68 -0
- package/presets/mavis/next/ai-local/rules-library/component-child-decomposition.md +81 -0
- package/presets/mavis/next/ai-local/rules-library/feature-flags-experiments.md +15 -0
- package/presets/mavis/next/ai-local/rules-library/mcp-required-for-ui-layout.md +1 -1
- package/presets/mavis/next/ai-local/rules-library/no-react-fc.md +46 -0
- package/presets/mavis/next/ai-local/rules-library/no-test-driven-behavior-change.md +1 -1
- package/presets/mavis/next/ai-local/rules-library/pwa-service-worker.md +15 -0
- package/presets/mavis/next/ai-local/rules-library/qa-test-cases.md +14 -0
- package/presets/mavis/next/ai-local/rules-library/router-pages.md +4 -2
- package/presets/mavis/next/ai-local/rules-library/single-source-copy-constants.md +3 -1
- package/presets/mavis/next/ai-local/rules-library/storybook-catalog-structure.md +62 -0
- package/presets/mavis/next/ai-local/rules-library/storybook-cleanup-temp-screenshots.md +40 -0
- package/presets/mavis/next/ai-local/rules-library/storybook-csf-authoring.md +100 -0
- package/presets/mavis/next/ai-local/rules-library/storybook-dev-compare-figma.md +67 -0
- package/presets/mavis/next/ai-local/rules-library/storybook-keep-tests-current.md +75 -0
- package/presets/mavis/next/ai-local/rules-library/storybook-modals.md +64 -0
- package/presets/mavis/next/ai-local/rules-library/storybook-no-app-node-modules.md +40 -0
- package/presets/mavis/next/ai-local/rules-library/storybook-ui-quality-gate.md +38 -0
- package/presets/mavis/next/ai-local/rules-library/task-levels.md +28 -0
- package/presets/mavis/next/ai-local/rules-library/ui-change-review-gate.md +14 -0
- package/presets/mavis/next/hooks/chain-team-phases.sh +46 -1
- package/presets/mavis/next/rules/agent-team-orchestrator.md +3 -1
- package/presets/mavis/next/rules/ai-local-overlay.md +16 -2
- package/presets/mavis/next/rules/code-quality-and-refactoring.md +2 -2
- package/presets/mavis/next/rules/code-review-mr.md +11 -7
- package/presets/mavis/next/rules/component-catalog-gate.md +31 -0
- package/presets/mavis/next/rules/design-tokens-binding.md +1 -1
- package/presets/mavis/next/rules/feature-delivery-workflow.md +22 -18
- package/presets/mavis/next/rules/forms-validation.md +26 -0
- package/presets/mavis/next/rules/mcp-usage.md +1 -0
- package/presets/mavis/next/rules/mockup-review.md +1 -1
- package/presets/mavis/next/rules/next-app-core.md +3 -0
- package/presets/mavis/next/rules/next-static-export.md +28 -0
- package/presets/mavis/next/rules/post-change-lint.md +4 -0
- package/presets/mavis/next/rules/product-specs-authoring.md +1 -0
- package/presets/mavis/next/rules/product-specs.md +1 -0
- package/presets/mavis/next/rules/react-next-anti-hallucination.md +10 -0
- package/presets/mavis/next/rules/react-ui.md +19 -1
- package/presets/mavis/next/rules/reference-features.md +7 -2
- package/presets/mavis/next/rules/security-next.md +12 -0
- package/presets/mavis/next/rules/store-rtk.md +6 -0
- package/presets/mavis/next/rules/tests-e2e-structure.md +2 -1
- package/presets/mavis/next/rules/tests-unit.md +1 -0
- package/presets/mavis/next/team/fixtures/feature-with-ux-no-figma.json +3 -4
- package/presets/mavis/nuxt/adapter-map.json +1 -1
- package/presets/mavis/nuxt/agents/accessibility-reviewer.md +2 -2
- package/presets/mavis/nuxt/agents/api-contract-reviewer.md +2 -2
- package/presets/mavis/nuxt/agents/build-verifier.md +2 -2
- package/presets/mavis/nuxt/agents/ci-investigator.md +2 -2
- package/presets/mavis/nuxt/agents/code-reviewer.md +2 -2
- package/presets/mavis/nuxt/agents/debugger.md +2 -2
- package/presets/mavis/nuxt/agents/feature-developer.md +2 -2
- package/presets/mavis/nuxt/agents/migration-specialist.md +2 -2
- package/presets/mavis/nuxt/agents/mockup-reviewer.md +2 -2
- package/presets/mavis/nuxt/agents/openspec-author.md +2 -2
- package/presets/mavis/nuxt/agents/performance-auditor.md +2 -2
- package/presets/mavis/nuxt/agents/qa-tester.md +2 -2
- package/presets/mavis/nuxt/agents/security-reviewer.md +2 -2
- package/presets/mavis/nuxt/agents/solution-architect.md +2 -2
- package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
- package/presets/mavis/nuxt/agents/task-router.md +1 -1
- package/presets/mavis/nuxt/agents/tech-writer.md +2 -2
- package/presets/mavis/nuxt/agents/unit-test-generator.md +2 -2
- package/presets/mavis/nuxt/agents/unit-test-healer.md +2 -2
- package/presets/mavis/nuxt/agents/unit-test-planner.md +2 -2
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +3 -1
- package/presets/mavis/nuxt/rules/code-review-mr.md +6 -6
- package/presets/mavis/nuxt/rules/feature-delivery-workflow.md +15 -15
- package/presets/mavis/nuxt/rules/reference-features.md +2 -2
- package/presets/mavis/nuxt/rules/tests-e2e-structure.md +1 -1
- package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
- package/presets/mavis/php-hexagonal/agents/build-verifier.md +2 -2
- package/presets/mavis/php-hexagonal/agents/code-reviewer.md +2 -2
- package/presets/mavis/php-hexagonal/agents/feature-developer.md +2 -2
- package/presets/mavis/php-hexagonal/agents/openspec-author.md +2 -2
- package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/mavis/php-hexagonal/agents/task-router.md +1 -1
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +3 -1
- package/presets/mavis/php-hexagonal/rules/code-quality-and-refactoring.md +1 -1
- package/presets/mavis/php-laravel/adapter-map.json +1 -1
- package/presets/mavis/php-laravel/agents/build-verifier.md +2 -2
- package/presets/mavis/php-laravel/agents/code-reviewer.md +2 -2
- package/presets/mavis/php-laravel/agents/feature-developer.md +2 -2
- package/presets/mavis/php-laravel/agents/openspec-author.md +2 -2
- package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
- package/presets/mavis/php-laravel/agents/task-router.md +1 -1
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +3 -1
- package/presets/mavis/php-laravel/rules/code-quality-and-refactoring.md +1 -1
- package/presets/mavis/svelte/adapter-map.json +1 -1
- package/presets/mavis/svelte/agents/accessibility-reviewer.md +2 -2
- package/presets/mavis/svelte/agents/api-contract-reviewer.md +2 -2
- package/presets/mavis/svelte/agents/build-verifier.md +2 -2
- package/presets/mavis/svelte/agents/ci-investigator.md +2 -2
- package/presets/mavis/svelte/agents/code-reviewer.md +2 -2
- package/presets/mavis/svelte/agents/debugger.md +2 -2
- package/presets/mavis/svelte/agents/feature-developer.md +2 -2
- package/presets/mavis/svelte/agents/migration-specialist.md +2 -2
- package/presets/mavis/svelte/agents/mockup-reviewer.md +2 -2
- package/presets/mavis/svelte/agents/openspec-author.md +2 -2
- package/presets/mavis/svelte/agents/performance-auditor.md +2 -2
- package/presets/mavis/svelte/agents/qa-tester.md +2 -2
- package/presets/mavis/svelte/agents/security-reviewer.md +2 -2
- package/presets/mavis/svelte/agents/solution-architect.md +2 -2
- package/presets/mavis/svelte/agents/task-analyst.md +1 -1
- package/presets/mavis/svelte/agents/task-router.md +1 -1
- package/presets/mavis/svelte/agents/tech-writer.md +2 -2
- package/presets/mavis/svelte/agents/unit-test-generator.md +2 -2
- package/presets/mavis/svelte/agents/unit-test-healer.md +2 -2
- package/presets/mavis/svelte/agents/unit-test-planner.md +2 -2
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +3 -1
- package/presets/mavis/svelte/rules/code-review-mr.md +6 -6
- package/presets/mavis/svelte/rules/feature-delivery-workflow.md +1 -1
- package/presets/mavis/svelte/rules/reference-features.md +2 -2
- package/presets/mavis/svelte/rules/tests-e2e-structure.md +1 -1
- package/presets/opencode/android-kotlin/adapter-map.json +1 -1
- package/presets/opencode/android-kotlin/agents/accessibility-reviewer.md +2 -2
- package/presets/opencode/android-kotlin/agents/api-contract-reviewer.md +2 -2
- package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/opencode/android-kotlin/agents/ci-investigator.md +2 -2
- package/presets/opencode/android-kotlin/agents/code-reviewer.md +2 -2
- package/presets/opencode/android-kotlin/agents/debugger.md +2 -2
- package/presets/opencode/android-kotlin/agents/feature-developer.md +2 -2
- package/presets/opencode/android-kotlin/agents/migration-specialist.md +2 -2
- package/presets/opencode/android-kotlin/agents/mockup-reviewer.md +2 -2
- package/presets/opencode/android-kotlin/agents/openspec-author.md +2 -2
- package/presets/opencode/android-kotlin/agents/performance-auditor.md +2 -2
- package/presets/opencode/android-kotlin/agents/qa-tester.md +2 -2
- package/presets/opencode/android-kotlin/agents/security-reviewer.md +2 -2
- package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/opencode/android-kotlin/agents/task-router.md +1 -1
- package/presets/opencode/android-kotlin/agents/tech-writer.md +2 -2
- package/presets/opencode/android-kotlin/agents/unit-test-generator.md +2 -2
- package/presets/opencode/android-kotlin/agents/unit-test-healer.md +2 -2
- package/presets/opencode/android-kotlin/agents/unit-test-planner.md +2 -2
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +3 -1
- package/presets/opencode/android-kotlin/rules/code-review-mr.md +6 -6
- package/presets/opencode/go/adapter-map.json +1 -1
- package/presets/opencode/go/agents/build-verifier.md +2 -2
- package/presets/opencode/go/agents/code-reviewer.md +2 -2
- package/presets/opencode/go/agents/feature-developer.md +2 -2
- package/presets/opencode/go/agents/openspec-author.md +2 -2
- package/presets/opencode/go/agents/task-analyst.md +1 -1
- package/presets/opencode/go/agents/task-router.md +1 -1
- package/presets/opencode/go/rules/agent-team-orchestrator.md +3 -1
- package/presets/opencode/go/rules/code-quality-and-refactoring.md +1 -1
- package/presets/opencode/ios-swift/adapter-map.json +1 -1
- package/presets/opencode/ios-swift/agents/build-verifier.md +2 -2
- package/presets/opencode/ios-swift/agents/code-reviewer.md +2 -2
- package/presets/opencode/ios-swift/agents/feature-developer.md +2 -2
- package/presets/opencode/ios-swift/agents/mockup-reviewer.md +2 -2
- package/presets/opencode/ios-swift/agents/openspec-author.md +2 -2
- package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
- package/presets/opencode/ios-swift/agents/task-router.md +1 -1
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +3 -1
- package/presets/opencode/ios-swift/rules/code-quality-and-refactoring.md +1 -1
- package/presets/opencode/ios-swift/rules/code-review-mr.md +6 -6
- package/presets/opencode/ios-swift/rules/feature-delivery-workflow.md +14 -14
- package/presets/opencode/ios-swift/rules/reference-features.md +3 -3
- package/presets/opencode/java/adapter-map.json +1 -1
- package/presets/opencode/java/agents/build-verifier.md +2 -2
- package/presets/opencode/java/agents/code-reviewer.md +2 -2
- package/presets/opencode/java/agents/feature-developer.md +2 -2
- package/presets/opencode/java/agents/openspec-author.md +2 -2
- package/presets/opencode/java/agents/task-analyst.md +1 -1
- package/presets/opencode/java/agents/task-router.md +1 -1
- package/presets/opencode/java/rules/agent-team-orchestrator.md +3 -1
- package/presets/opencode/java/rules/code-quality-and-refactoring.md +1 -1
- package/presets/opencode/mcp-ts/adapter-map.json +1 -1
- package/presets/opencode/mcp-ts/agents/build-verifier.md +2 -2
- package/presets/opencode/mcp-ts/agents/feature-developer.md +2 -2
- package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/opencode/mcp-ts/agents/task-router.md +1 -1
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +3 -1
- package/presets/opencode/next/REPO_AGENTS.md +11 -1
- package/presets/opencode/next/adapter-map.json +192 -8
- package/presets/opencode/next/agents/accessibility-reviewer.md +2 -2
- package/presets/opencode/next/agents/api-contract-reviewer.md +2 -2
- package/presets/opencode/next/agents/build-verifier.md +3 -2
- package/presets/opencode/next/agents/ci-investigator.md +2 -2
- package/presets/opencode/next/agents/code-reviewer.md +3 -2
- package/presets/opencode/next/agents/debugger.md +2 -2
- package/presets/opencode/next/agents/feature-developer.md +3 -2
- package/presets/opencode/next/agents/migration-specialist.md +2 -2
- package/presets/opencode/next/agents/mockup-reviewer.md +2 -2
- package/presets/opencode/next/agents/openspec-author.md +4 -2
- package/presets/opencode/next/agents/performance-auditor.md +2 -2
- package/presets/opencode/next/agents/qa-tester.md +2 -2
- package/presets/opencode/next/agents/security-reviewer.md +2 -2
- package/presets/opencode/next/agents/solution-architect.md +2 -2
- package/presets/opencode/next/agents/task-analyst.md +8 -1
- package/presets/opencode/next/agents/task-router.md +2 -1
- package/presets/opencode/next/agents/tech-writer.md +2 -2
- package/presets/opencode/next/agents/unit-test-generator.md +2 -2
- package/presets/opencode/next/agents/unit-test-healer.md +2 -2
- package/presets/opencode/next/agents/unit-test-planner.md +2 -2
- package/presets/opencode/next/ai-local/rules-library/agent-artifacts-no-local-paths.md +41 -8
- package/presets/opencode/next/ai-local/rules-library/agent-pipeline-gates.md +19 -0
- package/presets/opencode/next/ai-local/rules-library/analytics-events.md +18 -0
- package/presets/opencode/next/ai-local/rules-library/api-contract-source.md +14 -0
- package/presets/opencode/next/ai-local/rules-library/artifact-lifecycle.md +17 -0
- package/presets/opencode/next/ai-local/rules-library/code-style.md +68 -0
- package/presets/opencode/next/ai-local/rules-library/component-child-decomposition.md +81 -0
- package/presets/opencode/next/ai-local/rules-library/feature-flags-experiments.md +15 -0
- package/presets/opencode/next/ai-local/rules-library/mcp-required-for-ui-layout.md +1 -1
- package/presets/opencode/next/ai-local/rules-library/no-react-fc.md +46 -0
- package/presets/opencode/next/ai-local/rules-library/no-test-driven-behavior-change.md +1 -1
- package/presets/opencode/next/ai-local/rules-library/pwa-service-worker.md +15 -0
- package/presets/opencode/next/ai-local/rules-library/qa-test-cases.md +14 -0
- package/presets/opencode/next/ai-local/rules-library/router-pages.md +4 -2
- package/presets/opencode/next/ai-local/rules-library/single-source-copy-constants.md +3 -1
- package/presets/opencode/next/ai-local/rules-library/storybook-catalog-structure.md +62 -0
- package/presets/opencode/next/ai-local/rules-library/storybook-cleanup-temp-screenshots.md +40 -0
- package/presets/opencode/next/ai-local/rules-library/storybook-csf-authoring.md +100 -0
- package/presets/opencode/next/ai-local/rules-library/storybook-dev-compare-figma.md +67 -0
- package/presets/opencode/next/ai-local/rules-library/storybook-keep-tests-current.md +75 -0
- package/presets/opencode/next/ai-local/rules-library/storybook-modals.md +64 -0
- package/presets/opencode/next/ai-local/rules-library/storybook-no-app-node-modules.md +40 -0
- package/presets/opencode/next/ai-local/rules-library/storybook-ui-quality-gate.md +38 -0
- package/presets/opencode/next/ai-local/rules-library/task-levels.md +28 -0
- package/presets/opencode/next/ai-local/rules-library/ui-change-review-gate.md +14 -0
- package/presets/opencode/next/hooks/chain-team-phases.sh +46 -1
- package/presets/opencode/next/rules/agent-team-orchestrator.md +3 -1
- package/presets/opencode/next/rules/ai-local-overlay.md +16 -2
- package/presets/opencode/next/rules/code-quality-and-refactoring.md +2 -2
- package/presets/opencode/next/rules/code-review-mr.md +11 -7
- package/presets/opencode/next/rules/component-catalog-gate.md +31 -0
- package/presets/opencode/next/rules/design-tokens-binding.md +1 -1
- package/presets/opencode/next/rules/feature-delivery-workflow.md +22 -18
- package/presets/opencode/next/rules/forms-validation.md +26 -0
- package/presets/opencode/next/rules/mcp-usage.md +1 -0
- package/presets/opencode/next/rules/mockup-review.md +1 -1
- package/presets/opencode/next/rules/next-app-core.md +3 -0
- package/presets/opencode/next/rules/next-static-export.md +28 -0
- package/presets/opencode/next/rules/post-change-lint.md +4 -0
- package/presets/opencode/next/rules/product-specs-authoring.md +1 -0
- package/presets/opencode/next/rules/product-specs.md +1 -0
- package/presets/opencode/next/rules/react-next-anti-hallucination.md +10 -0
- package/presets/opencode/next/rules/react-ui.md +19 -1
- package/presets/opencode/next/rules/reference-features.md +7 -2
- package/presets/opencode/next/rules/security-next.md +12 -0
- package/presets/opencode/next/rules/store-rtk.md +6 -0
- package/presets/opencode/next/rules/tests-e2e-structure.md +2 -1
- package/presets/opencode/next/rules/tests-unit.md +1 -0
- package/presets/opencode/next/team/fixtures/feature-with-ux-no-figma.json +3 -4
- package/presets/opencode/nuxt/adapter-map.json +1 -1
- package/presets/opencode/nuxt/agents/accessibility-reviewer.md +2 -2
- package/presets/opencode/nuxt/agents/api-contract-reviewer.md +2 -2
- package/presets/opencode/nuxt/agents/build-verifier.md +2 -2
- package/presets/opencode/nuxt/agents/ci-investigator.md +2 -2
- package/presets/opencode/nuxt/agents/code-reviewer.md +2 -2
- package/presets/opencode/nuxt/agents/debugger.md +2 -2
- package/presets/opencode/nuxt/agents/feature-developer.md +2 -2
- package/presets/opencode/nuxt/agents/migration-specialist.md +2 -2
- package/presets/opencode/nuxt/agents/mockup-reviewer.md +2 -2
- package/presets/opencode/nuxt/agents/openspec-author.md +2 -2
- package/presets/opencode/nuxt/agents/performance-auditor.md +2 -2
- package/presets/opencode/nuxt/agents/qa-tester.md +2 -2
- package/presets/opencode/nuxt/agents/security-reviewer.md +2 -2
- package/presets/opencode/nuxt/agents/solution-architect.md +2 -2
- package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
- package/presets/opencode/nuxt/agents/task-router.md +1 -1
- package/presets/opencode/nuxt/agents/tech-writer.md +2 -2
- package/presets/opencode/nuxt/agents/unit-test-generator.md +2 -2
- package/presets/opencode/nuxt/agents/unit-test-healer.md +2 -2
- package/presets/opencode/nuxt/agents/unit-test-planner.md +2 -2
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +3 -1
- package/presets/opencode/nuxt/rules/code-review-mr.md +6 -6
- package/presets/opencode/nuxt/rules/feature-delivery-workflow.md +15 -15
- package/presets/opencode/nuxt/rules/reference-features.md +2 -2
- package/presets/opencode/nuxt/rules/tests-e2e-structure.md +1 -1
- package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
- package/presets/opencode/php-hexagonal/agents/build-verifier.md +2 -2
- package/presets/opencode/php-hexagonal/agents/code-reviewer.md +2 -2
- package/presets/opencode/php-hexagonal/agents/feature-developer.md +2 -2
- package/presets/opencode/php-hexagonal/agents/openspec-author.md +2 -2
- package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/opencode/php-hexagonal/agents/task-router.md +1 -1
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +3 -1
- package/presets/opencode/php-hexagonal/rules/code-quality-and-refactoring.md +1 -1
- package/presets/opencode/php-laravel/adapter-map.json +1 -1
- package/presets/opencode/php-laravel/agents/build-verifier.md +2 -2
- package/presets/opencode/php-laravel/agents/code-reviewer.md +2 -2
- package/presets/opencode/php-laravel/agents/feature-developer.md +2 -2
- package/presets/opencode/php-laravel/agents/openspec-author.md +2 -2
- package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
- package/presets/opencode/php-laravel/agents/task-router.md +1 -1
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +3 -1
- package/presets/opencode/php-laravel/rules/code-quality-and-refactoring.md +1 -1
- package/presets/opencode/svelte/adapter-map.json +1 -1
- package/presets/opencode/svelte/agents/accessibility-reviewer.md +2 -2
- package/presets/opencode/svelte/agents/api-contract-reviewer.md +2 -2
- package/presets/opencode/svelte/agents/build-verifier.md +2 -2
- package/presets/opencode/svelte/agents/ci-investigator.md +2 -2
- package/presets/opencode/svelte/agents/code-reviewer.md +2 -2
- package/presets/opencode/svelte/agents/debugger.md +2 -2
- package/presets/opencode/svelte/agents/feature-developer.md +2 -2
- package/presets/opencode/svelte/agents/migration-specialist.md +2 -2
- package/presets/opencode/svelte/agents/mockup-reviewer.md +2 -2
- package/presets/opencode/svelte/agents/openspec-author.md +2 -2
- package/presets/opencode/svelte/agents/performance-auditor.md +2 -2
- package/presets/opencode/svelte/agents/qa-tester.md +2 -2
- package/presets/opencode/svelte/agents/security-reviewer.md +2 -2
- package/presets/opencode/svelte/agents/solution-architect.md +2 -2
- package/presets/opencode/svelte/agents/task-analyst.md +1 -1
- package/presets/opencode/svelte/agents/task-router.md +1 -1
- package/presets/opencode/svelte/agents/tech-writer.md +2 -2
- package/presets/opencode/svelte/agents/unit-test-generator.md +2 -2
- package/presets/opencode/svelte/agents/unit-test-healer.md +2 -2
- package/presets/opencode/svelte/agents/unit-test-planner.md +2 -2
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +3 -1
- package/presets/opencode/svelte/rules/code-review-mr.md +6 -6
- package/presets/opencode/svelte/rules/feature-delivery-workflow.md +1 -1
- package/presets/opencode/svelte/rules/reference-features.md +2 -2
- package/presets/opencode/svelte/rules/tests-e2e-structure.md +1 -1
- package/scripts/check-generated-drift.mjs +42 -2
- package/scripts/check-local-overlay.sh +39 -0
- package/scripts/fixtures/cli-golden/claude/next.json +44 -41
- package/scripts/fixtures/cli-golden/cursor/next.json +69 -46
- package/scripts/fixtures/cli-golden/mavis/android-kotlin.json +21 -21
- package/scripts/fixtures/cli-golden/mavis/go.json +8 -8
- package/scripts/fixtures/cli-golden/mavis/ios-swift.json +12 -12
- package/scripts/fixtures/cli-golden/mavis/java.json +8 -8
- package/scripts/fixtures/cli-golden/mavis/mcp-ts.json +5 -5
- package/scripts/fixtures/cli-golden/mavis/next.json +70 -47
- package/scripts/fixtures/cli-golden/mavis/nuxt.json +25 -25
- package/scripts/fixtures/cli-golden/mavis/php-hexagonal.json +8 -8
- package/scripts/fixtures/cli-golden/mavis/php-laravel.json +8 -8
- package/scripts/fixtures/cli-golden/mavis/svelte.json +25 -25
- package/scripts/fixtures/cli-golden/opencode/android-kotlin.json +21 -21
- package/scripts/fixtures/cli-golden/opencode/go.json +8 -8
- package/scripts/fixtures/cli-golden/opencode/ios-swift.json +12 -12
- package/scripts/fixtures/cli-golden/opencode/java.json +8 -8
- package/scripts/fixtures/cli-golden/opencode/mcp-ts.json +5 -5
- package/scripts/fixtures/cli-golden/opencode/next.json +70 -47
- package/scripts/fixtures/cli-golden/opencode/nuxt.json +25 -25
- package/scripts/fixtures/cli-golden/opencode/php-hexagonal.json +8 -8
- package/scripts/fixtures/cli-golden/opencode/php-laravel.json +8 -8
- package/scripts/fixtures/cli-golden/opencode/svelte.json +25 -25
- package/scripts/lib/generate-adapter-common.mjs +17 -0
- package/scripts/lib/generate-mavis-adapter.mjs +9 -3
- package/scripts/lib/generate-opencode-adapter.mjs +9 -3
|
@@ -137,7 +137,21 @@ function mutateMetrics(mutator) {
|
|
|
137
137
|
try { metrics = JSON.parse(fs.readFileSync(METRICS_PATH, 'utf8')); } catch {
|
|
138
138
|
const runId = status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
139
139
|
status.metricsRunId = runId;
|
|
140
|
-
|
|
140
|
+
// Resolve profile from pipeline.json (preferred) or status.json, falling back to 'unknown'.
|
|
141
|
+
// The router/agent must never write profile into status.json — pipeline.json is the SoT.
|
|
142
|
+
let profile = 'unknown';
|
|
143
|
+
try {
|
|
144
|
+
if (fs.existsSync(pipelinePath)) {
|
|
145
|
+
const pipe = JSON.parse(fs.readFileSync(pipelinePath, 'utf8'));
|
|
146
|
+
if (pipe && (pipe.profile === 'light' || pipe.profile === 'standard' || pipe.profile === 'full')) {
|
|
147
|
+
profile = pipe.profile;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
} catch {}
|
|
151
|
+
if (profile === 'unknown' && (status.profile === 'light' || status.profile === 'standard' || status.profile === 'full')) {
|
|
152
|
+
profile = status.profile;
|
|
153
|
+
}
|
|
154
|
+
metrics = { schemaVersion: 1, task: { runId, slug, preset: 'ai-rules', stack: STACK, platform: PLATFORM, intent: status.intent || 'unknown', profile }, events: [] };
|
|
141
155
|
metrics.events.push({ eventId: `${runId}:task_started`, type: 'task_started', at: now, source: 'hook', attributionConfidence: 'high' });
|
|
142
156
|
}
|
|
143
157
|
mutator(metrics);
|
|
@@ -221,9 +235,33 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
221
235
|
if (!fs.existsSync(manifestPath)) return { outcome: null, receiptRequired: false };
|
|
222
236
|
try {
|
|
223
237
|
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
238
|
+
// Guard: the schema key is `artifacts` (see agent-artifact-contracts.md). A top-level
|
|
239
|
+
// `entries` key is a silent bug — producer wrote to a wrong field, hook would not
|
|
240
|
+
// see the receipt, and the step hangs in `awaiting_artifact_receipt`. Warn loudly.
|
|
241
|
+
if (manifest && typeof manifest === 'object' && !Array.isArray(manifest.artifacts) && Array.isArray(manifest.entries)) {
|
|
242
|
+
process.stderr.write(`WARNING: ${manifestPath} has top-level "entries" but no "artifacts" array; reading only "artifacts" per schema. The producer likely upserted into the wrong key. See agent-artifact-contracts.md (Schema field name).` + '\n');
|
|
243
|
+
} else if (manifest && typeof manifest === 'object' && Array.isArray(manifest.entries) && Array.isArray(manifest.artifacts)) {
|
|
244
|
+
process.stderr.write(`WARNING: ${manifestPath} has both "artifacts" and "entries" keys; reading only "artifacts" per schema. Foreign "entries" content is ignored.` + '\n');
|
|
245
|
+
}
|
|
224
246
|
const artifacts = Array.isArray(manifest.artifacts) ? manifest.artifacts : [];
|
|
225
247
|
const expectedOutputId = artifactOutputIdFor(step, agent);
|
|
226
248
|
const attemptStartedAt = Date.parse(resolved.entry.startedAt);
|
|
249
|
+
// Pre-scan: warn on the silent-bug classes the filter below would otherwise drop.
|
|
250
|
+
// A receipt with a non-matching attemptId is dropped silently; without this warning,
|
|
251
|
+
// the step hangs in `awaiting_artifact_receipt` with no signal of why. Same for
|
|
252
|
+
// receipts whose terminal timestamp is older than the active attempt (stale retry).
|
|
253
|
+
const activeIds = new Set(Object.keys(status.activeAttempts || {}));
|
|
254
|
+
for (const entry of artifacts) {
|
|
255
|
+
if (!entry || entry.producer !== agent || !entry.receipt || typeof entry.receipt.outcome !== 'string') continue;
|
|
256
|
+
const rid = entry.receipt.attemptId;
|
|
257
|
+
if (typeof rid === 'string' && rid !== resolved.attemptId && !activeIds.has(rid)) {
|
|
258
|
+
process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${entry.id}" carries attemptId "${rid}" that does not match the active attempt "${resolved.attemptId}". The receipt is being dropped; step will hang in \`awaiting_artifact_receipt\` unless the producer retries. Common cause: agent reused an attemptId from a prior failed attempt. See agent-artifact-contracts.md (Receipt binding).` + '\n');
|
|
259
|
+
}
|
|
260
|
+
const terminalAt = Date.parse(entry.timestamps?.completedAt || entry.timestamps?.updatedAt || '');
|
|
261
|
+
if (Number.isFinite(attemptStartedAt) && Number.isFinite(terminalAt) && terminalAt < attemptStartedAt) {
|
|
262
|
+
process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${entry.id}" has timestamps.completedAt older than the active attempt's startedAt. Likely a stale receipt from a previous attempt; it is being dropped. See agent-artifact-contracts.md (Receipt binding).` + '\n');
|
|
263
|
+
}
|
|
264
|
+
}
|
|
227
265
|
const owned = artifacts
|
|
228
266
|
.filter((entry) => {
|
|
229
267
|
if (!entry || entry.producer !== agent || !entry.receipt || typeof entry.receipt.outcome !== 'string') return false;
|
|
@@ -238,6 +276,13 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
238
276
|
const tb = Date.parse(b.timestamps?.completedAt || b.timestamps?.updatedAt || 0) || 0;
|
|
239
277
|
return tb - ta;
|
|
240
278
|
});
|
|
279
|
+
// Bonus: warn if the active attempt's receipts all lack attemptId in a non-parallel step.
|
|
280
|
+
// The orchestrator always provides attemptId, so a missing one means the agent dropped it
|
|
281
|
+
// (model output, JSON.stringify omission, etc.). boundByOutput still binds the receipt by
|
|
282
|
+
// expectedOutputId, so this is not fatal — but it is a contract violation worth flagging.
|
|
283
|
+
if (owned.length > 0 && owned[0].receipt.attemptId == null && !(step && step.parallel && Array.isArray(getStepAgents(step)) && getStepAgents(step).length > 1)) {
|
|
284
|
+
process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${owned[0].id}" lacks entry.receipt.attemptId on a non-parallel step. The receipt is bound by output-id fallback; the agent should always include the attemptId the orchestrator provides. See agent-artifact-contracts.md (Receipt binding).` + '\n');
|
|
285
|
+
}
|
|
241
286
|
return { outcome: owned[0]?.receipt?.outcome || null, receiptRequired: true };
|
|
242
287
|
} catch {
|
|
243
288
|
return { outcome: null, receiptRequired: false };
|
|
@@ -44,6 +44,7 @@ When editing `app/src/ui/**/*.tsx`, a **reduced** set loads:
|
|
|
44
44
|
| `design-guidance.mdc` | `tooling-and-review/design-guidance.md` |
|
|
45
45
|
| `mcp-usage.mdc` | `tooling-and-review/mcp-usage.md` |
|
|
46
46
|
| `next-app-router.mdc` | `stack/next-app-router.md` |
|
|
47
|
+
| `next-static-export.mdc` | `stack/next-static-export.md` |
|
|
47
48
|
| `arrow-functions.mdc` | `stack/arrow-functions.md` |
|
|
48
49
|
| `types-jsdoc.mdc` | `stack/types-jsdoc.md` |
|
|
49
50
|
| `no-type-assertion-as-import-export.mdc` | `stack/no-type-assertion.md` |
|
|
@@ -62,6 +63,8 @@ When editing `app/src/ui/**/*.tsx`, a **reduced** set loads:
|
|
|
62
63
|
| `store-rtk.mdc` | `api-and-data/store-rtk.md` |
|
|
63
64
|
| `react-ui.mdc` | `ui-and-accessibility/react-ui.md` |
|
|
64
65
|
| `design-tokens-binding.mdc` | `ui-and-accessibility/design-tokens-binding.md` | Figma → repo token binding (typography/color/spacing/imagery); per-element parity + self-check |
|
|
66
|
+
| `component-catalog-gate.mdc` | `ui-and-accessibility/component-catalog-gate.md` | Storybook/catalog is the UI dev + visual-review surface; stories ship with the change |
|
|
67
|
+
| `forms-validation.mdc` | `ui-and-accessibility/forms-validation.md` | Forms via the repo form library + DS fields + shared validators |
|
|
65
68
|
| `react-a11y-coding.mdc` | `ui-and-accessibility/react-a11y-coding.md` |
|
|
66
69
|
| `no-props-spread.mdc` | `ui-and-accessibility/no-props-spread.md` |
|
|
67
70
|
| `css-property-order-stylelint.mdc` | `ui-and-accessibility/css-property-order.md` |
|
|
@@ -11,6 +11,13 @@ These rows **OVERRIDE** generation for the listed patterns. Before inventing an
|
|
|
11
11
|
|
|
12
12
|
App Router–specific rows (async `params` / `cookies()`, invented auth helpers, etc.) stay in **`stack/next-app-router.md`**. This rule covers broader React / RTK / Next phantom imports and boundary mistakes across `app/**`.
|
|
13
13
|
|
|
14
|
+
## 0. Installed Next ships its own docs (read them first)
|
|
15
|
+
|
|
16
|
+
The installed `next` may bundle version-pinned agent docs and a managed `AGENTS.md` block written by `next dev`:
|
|
17
|
+
|
|
18
|
+
- Docs: `node_modules/next/dist/docs/` (`01-app`, `02-pages`, `03-architecture`, …). Prefer these over blog posts and over training data for framework APIs — they match the installed major.
|
|
19
|
+
- Managed block: `<!-- BEGIN:nextjs-agent-rules -->` in `AGENTS.md` (see `node_modules/next/dist/server/lib/generate-agent-files.js`). **Do not delete it** — `next dev` re-creates it; commit it with your change to keep the tree clean.
|
|
20
|
+
|
|
14
21
|
## 1. Phantom / wrong Next imports
|
|
15
22
|
|
|
16
23
|
| ❌ Avoid | ✅ Prefer |
|
|
@@ -56,6 +63,9 @@ App Router–specific rows (async `params` / `cookies()`, invented auth helpers,
|
|
|
56
63
|
| `Router.push` / Pages `withRouter` patterns in `app/` UI | App Router navigation helpers already used in `app/src/ui/**` |
|
|
57
64
|
| Client `fetch` / raw HTTP from UI or `page.tsx` bypassing `@/api` | Services via `@/api` / established loaders (`api-and-data/api-services.md`, `api-and-data/http-client.md`) |
|
|
58
65
|
| Invented `next/link` props that siblings never use (e.g. fake prefetch enums) | Match existing `<Link>` usage; verify against installed Next |
|
|
66
|
+
| `getServerSideProps` / `getInitialProps`, `pages/api/**`, `route.ts`, `middleware.ts` in an `output: 'export'` repo | build-time `getStaticProps` / `getStaticPaths` or client store/thunk fetch (`stack/next-static-export.md`) |
|
|
67
|
+
| Hardcoded `/` root for links / assets when the repo uses `basePath` / `assetPrefix` | Derive from `basePath` / `assetPrefix` |
|
|
68
|
+
| `next/image` `loader` / `sizes` / `quality` expecting the optimizer in a repo with `images.unoptimized: true` | The repo's image primitive; no optimizer assumptions |
|
|
59
69
|
|
|
60
70
|
## 6. Version drift
|
|
61
71
|
|
|
@@ -49,6 +49,12 @@ impact: HIGH
|
|
|
49
49
|
- avoid duplicating entity descriptions in multiple places.
|
|
50
50
|
- **Domain boundary**: in **state**, store domain models; the client **response wrapper** type is acceptable as a thunk **return type** or interim before mapping — without duplicating DTOs in state fields unnecessarily (aligned with `api-and-data/api-services.md` and `api-and-data/http-client.md`).
|
|
51
51
|
|
|
52
|
+
# Middleware and cross-slice orchestration
|
|
53
|
+
|
|
54
|
+
- Cross-cutting side effects (analytics, captcha, file lifecycle, cross-slice sync) live in **listener middleware** at `app/src/store/middleware/<Domain>Middleware/`, registered in the store factory — follow the repo's `prepend`/`concat` order.
|
|
55
|
+
- A slice **must not import another slice**. When two domains must react to each other, orchestrate in middleware or a dedicated `_complexSlices/<Domain>` module (`_utilsSlices` for pure helpers) — never a direct slice→slice import.
|
|
56
|
+
- Prefer a thunk for a single request/response; prefer middleware for reactions that span slices or emit analytics.
|
|
57
|
+
|
|
52
58
|
# Slice testing
|
|
53
59
|
|
|
54
60
|
- For important slices:
|
|
@@ -8,6 +8,10 @@ paths:
|
|
|
8
8
|
|
|
9
9
|
When the prompt or `brief.md` contains a `figma.com` URL, **mockup review** (`mockup-reviewer` / skill `mockup-review`) must complete — or the user must continue past FAIL/`BLOCKED_MCP` via `/task-continue` — **before UI implementation**. Non-UI tasks no-op this gate. When required-signal and **no** `figma.com`, **`ux-design.md`** (on the analysis manifest entry) must exist and not be `INCOMPLETE` before UI work — else **blocked**, hand back to `task-analyst`. Parallel to the mockup gate.
|
|
10
10
|
|
|
11
|
+
**UI-scope gate (no Figma).** When the scope touches `app/src/ui/**` or the component-catalog root on `feature` / `refactor`, a terminal `mockup-review.md` is required **even without** a `figma.com` URL — reviewed against the AC / `ux-design.md`. Where the repo ships a component catalog, stories ship with the UI and `build-verifier` runs the catalog suite green (`ui-and-accessibility/component-catalog-gate.md`).
|
|
12
|
+
|
|
13
|
+
**Consumer context.** When `.ai/context/**` exists, read it before deriving architecture, domain vocabulary, or test placement.
|
|
14
|
+
|
|
11
15
|
## Style discovery (mandatory)
|
|
12
16
|
|
|
13
17
|
Before writing a new file in a layer, open **1–2 analog files** in the same layer and mirror: export shape, name prefixes (`T` / `I` where the repo uses them), file suffixes (`.apiMethods.ts`, `.endpoints.ts`, `.data.ts`, `.hooks.ts`, `styles.ts`), mapper / selector / thunk naming, and barrel shape. Record the analogs in the handoff. Where this preset's examples differ from the repo, **the repo wins**.
|
|
@@ -16,7 +20,7 @@ Before writing a new file in a layer, open **1–2 analog files** in the same la
|
|
|
16
20
|
|
|
17
21
|
When the prompt or `brief.md` contains a Figma URL with a node id (`?node-id=…`), `mockup-reviewer` must walk the node subtree via Figma MCP and emit **two sections** in `mockup-review.md`:
|
|
18
22
|
|
|
19
|
-
- `## Design contract` — Figma variables, text styles, components/assets used by the subtree, with the repo mapping (`@sds/tokens-colors` / `@sds/brand-colors` / `@sds/tokens-typography` / `@sds/tokens` / DS components /
|
|
23
|
+
- `## Design contract` — Figma variables, text styles, components/assets used by the subtree, with the repo mapping (`@sds/tokens-colors` / `@sds/brand-colors` / `@sds/tokens-typography` / `@sds/tokens` / DS components / the project image primitive with Figma-derived `src/width/height`). This is the binding table the developer uses for typography, color, spacing, and imagery.
|
|
20
24
|
- `## Node decomposition (AC-2)` — the child→component map (with a `Bindings` column for the Figma design bindings).
|
|
21
25
|
|
|
22
26
|
`feature-developer` must **not** start UI implementation until both sections are present, and must load requestable `ui-and-accessibility/design-tokens-binding.md` to bind every value to a Figma variable / text style / repo token (raw `#…` / `px` are a finding). The full procedure and verdict rule live in the `mockup-reviewer` agent prompt and the `mockup-review` Stack notes.
|
|
@@ -119,5 +119,6 @@ Block handoff via `open_questions` until fixed:
|
|
|
119
119
|
## Stack notes
|
|
120
120
|
|
|
121
121
|
- Author via skill `spec-authoring`; templates from package assets / consumer `docs/specs/_templates/`.
|
|
122
|
+
- **Glossary & contrast (mandatory):** before authoring, read the repo glossary (`openspec/config.yaml` `context:`, `.ai/context/**`, domain README). Each generated spec maps product terms to code symbols + record types and adds one **contrast** requirement/scenario against the nearest confusable symbol. Declare **compliance impact** (None | Affected) for any spec touching medical/personal data or analytics.
|
|
122
123
|
- Field semantics match discovery stem (`routes` = URL paths; `e2e` = Playwright).
|
|
123
124
|
- Requestable — not always-on / session-start.
|
|
@@ -63,5 +63,6 @@ Same-changeset INDEX updates, frontmatter v1, required body headings, templates,
|
|
|
63
63
|
## Stack notes
|
|
64
64
|
|
|
65
65
|
- `routes`: app URL paths. `ui` / `store`: presentation + RTK/store paths (e.g. `app/src/ui/pages/...`). `e2e`: Playwright paths under `app/__tests__/e2e/**` (or repo equivalent).
|
|
66
|
+
- **Domain glossary & contrast:** read the repo glossary first (e.g. `openspec/config.yaml` `context:`). Every spec that names a domain states a **term → code symbol + record type** mapping and includes one **contrast** scenario naming the nearest confusable symbol/page (e.g. an in-person-consultation spec contrasts `OfflineConsultation*` with `OnlineConsultationPage`). This prevents the highest-frequency domain-confusion bug in these repos.
|
|
66
67
|
- Dogfood example (emedcard-web AnalysisPage): `docs/specs/domains/analysis/analysis-page.md`.
|
|
67
68
|
- Requestable / `docs/specs/**` globs — not always-on / session-start.
|
|
@@ -27,6 +27,11 @@ Replace **TBD** with real paths after team agreement (or on `ai-rules init` in t
|
|
|
27
27
|
| Types module | **TBD** `app/src/types/<example>/` | domain types, JSDoc, barrel export |
|
|
28
28
|
| Unit tests | **TBD** mirrored under `app/__tests__/unit/<rel>` | `*.spec.ts`, describe/it naming |
|
|
29
29
|
| E2E area | **TBD** `app/__tests__/e2e/<Area>/` | `*.cases.md`, page objects, `_shared/` |
|
|
30
|
+
| Scaffold | **TBD** `app/src/boilerplate/**` | new-component skeleton (copy, then rename) |
|
|
31
|
+
| Global singletons | **TBD** `app/src/ui/components/_singletons/**` | app-root-mounted containers (modals, sync, flags) |
|
|
32
|
+
| Layout / guard | **TBD** `app/src/ui/layouts/**`, `app/src/ui/guards/**` | route wrapping (auth, chrome) |
|
|
33
|
+
| Cross-feature hooks | **TBD** `app/src/core/**` | reusable feature hooks used across pages |
|
|
34
|
+
| Internal slices | **TBD** `app/src/store/slices/_complexSlices/**`, `_utilsSlices/**` | cross-slice orchestration / pure helpers — **no** direct slice→slice imports |
|
|
30
35
|
|
|
31
36
|
## How to use
|
|
32
37
|
|
|
@@ -8,6 +8,9 @@ Concrete versions come **from `package.json` and configs of the target repositor
|
|
|
8
8
|
- `app/tsconfig.json`: `paths: { "@/*": ["./src/*"] }` (`baseUrl` may be absent with TS ≥5 / `moduleResolution: bundler` — check the file, do not add it blindly).
|
|
9
9
|
- **Requirement:** `@/*` instead of relative imports that climb the tree.
|
|
10
10
|
- **Router mode:** detect from the repo before adding routes — App Router (`app/src/app/**`, `page.tsx`) vs Pages Router (`app/src/pages/**`, `_app.tsx`). Do **not** assume App Router; follow the mode already in use (`stack/next-app-router.md`, `stack/navigation-router.md`).
|
|
11
|
+
- **Deployment model:** read `output` in `next.config.*`. With `output: 'export'` the app is a static SPA — no server runtime, no API routes / middleware / SSR (`stack/next-static-export.md`).
|
|
12
|
+
- **Consumer context:** when `.ai/context/**` exists, read it for the repo's compressed architecture, domain glossary, and test-placement conventions before deriving them yourself.
|
|
13
|
+
- **Env access:** read `NEXT_PUBLIC_*` through the repo's config module (e.g. `@/config`); new public keys must also be listed in `next.config.*` `env`. Never read `process.env` inside components.
|
|
11
14
|
|
|
12
15
|
# Architectural layers
|
|
13
16
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Static-export / SPA Next.js (output 'export') — no server runtime; what is unavailable and what to use instead
|
|
3
|
+
impact: HIGH
|
|
4
|
+
paths:
|
|
5
|
+
- app/next.config.*
|
|
6
|
+
- app/src/pages/**/*
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Static export (Next.js `output: 'export'`)
|
|
10
|
+
|
|
11
|
+
Detect the deployment model **before** writing data-fetching or routing code: read `output` in `next.config.*`. With `output: 'export'` the build produces a static SPA — there is no server runtime at request time.
|
|
12
|
+
|
|
13
|
+
## Unavailable
|
|
14
|
+
|
|
15
|
+
- `getServerSideProps`, `getInitialProps`.
|
|
16
|
+
- API routes (`pages/api/**`, App Router `route.ts`) and `middleware.ts`.
|
|
17
|
+
- Server Actions; server `cookies()` / `headers()`.
|
|
18
|
+
- ISR / `revalidate` / `dynamic = 'force-dynamic'`.
|
|
19
|
+
- The image optimizer when `images.unoptimized: true` (`next/image` `loader` / `sizes` buy nothing).
|
|
20
|
+
|
|
21
|
+
## Available / preferred
|
|
22
|
+
|
|
23
|
+
- `getStaticProps` / `getStaticPaths` run at **build** time only.
|
|
24
|
+
- Runtime data comes from the browser: store thunk → `@/api` service (`store-rtk.md`, `api-services.md`).
|
|
25
|
+
- Auth / session are enforced by the BFF plus a client route guard — not by a Next server.
|
|
26
|
+
- `basePath` / `assetPrefix`: build local links and asset URLs from those values; never hardcode `/`.
|
|
27
|
+
|
|
28
|
+
## Agent requirement
|
|
29
|
+
|
|
30
|
+
- Copy the data-fetch and navigation pattern from a sibling page under `app/src/pages/**`; do not port SSR/RSC examples from docs or blogs into a static-export repo.
|
|
31
|
+
- If a requested feature implies a server runtime, mark it **N/A — static export** and propose the client/BFF alternative instead of writing server code.
|
|
32
|
+
|
|
33
|
+
## Related
|
|
34
|
+
|
|
35
|
+
- `react-next-anti-hallucination.md` — phantom-import banlist for this deployment model.
|
|
36
|
+
- `navigation-router-stack.md` — Pages Router vs App Router.
|
|
@@ -77,6 +77,7 @@ Bad (no capital after period; or wrong locale for configured ESLint):
|
|
|
77
77
|
## Stack notes
|
|
78
78
|
|
|
79
79
|
- Runner: Playwright (`@playwright/test`).
|
|
80
|
+
- Consolidated QA docs (`docs/qa/**`): when present they are a derived view of the spec + `*.cases.md` (route table, `as-is`/`target` marking, PREFIX map). Cite the source per case and keep them in sync on behaviour change — do not treat them as a second SoT.
|
|
80
81
|
- E2E folder: `app/__tests__/e2e/**`.
|
|
81
82
|
- Placement mirrors source paths: `app/src/<rel>` → `app/__tests__/e2e/<rel>`. Use the deepest folder of the source under test; page-wide scenarios mirror the page folder.
|
|
82
83
|
- Scenario plans: `*.cases.md` files — canonical source of scenarios.
|
|
@@ -87,6 +87,7 @@ Bad (no capital after period; or wrong locale for configured ESLint):
|
|
|
87
87
|
- `app/src/mocks/**` — shared fixtures and MSW handlers live here (or repo equivalent).
|
|
88
88
|
- Unit-test placement mirrors source paths: `app/src/<rel>` → `app/__tests__/unit/<rel>`. Do not colocate `*.spec.ts(x)` or `*.test.ts(x)` under `app/src/**`.
|
|
89
89
|
- HTTP-client behavior tests live under the mirrored `app/__tests__/unit/lib/clients/**` path (prefer `*.spec.ts`).
|
|
90
|
+
- Prefer the package script over a bare runner (`yarn test`, not `npx jest`): scripts carry env (`TZ`), coverage, and reporters that CI depends on.
|
|
90
91
|
- UI tests live under the mirrored `app/__tests__/unit/ui/**` path. Import the source under test through the `@/` alias.
|
|
91
92
|
- `## Stack notes` content is stripped by `scripts/check-shared-core-drift.sh` before byte-comparing this file against `_shared/core/testing/testing-principles.md`; keep prose above (core content) verbatim against the core file.
|
|
92
93
|
|
|
@@ -91,7 +91,7 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Sc
|
|
|
91
91
|
|
|
92
92
|
- Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
|
|
93
93
|
- Markdown remains detailed evidence; the manifest records producer, status, authoritative paths, timestamps, outcome, and evidence paths.
|
|
94
|
-
- Agents upsert only
|
|
94
|
+
- Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges. The top-level array key is `artifacts` — not `entries`; see `agent-artifact-contracts.md` for the schema callout.
|
|
95
95
|
- The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite state, gate, retry, attempt, timestamp, or metrics fields.
|
|
96
96
|
- Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
|
|
97
97
|
|
|
@@ -129,6 +129,8 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
129
129
|
| `awaiting_approval` | Human gate; wait for `/task-continue` |
|
|
130
130
|
| `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
|
|
131
131
|
| `validation_failed` | build-verifier failed; re-run developer then build-verifier |
|
|
132
|
+
| `blocked` | Pipeline / step cannot proceed (e.g. `pipeline_parse_error`, completion of a parallel step whose producer's receipt was missing — see `agent-artifact-contracts.md` § Completion receipts) |
|
|
133
|
+
| `awaiting_artifact_receipt` | Producer stopped but the bound or assigned-output receipt was missing or stale; hook keeps the attempt active and does not advance. See `agent-artifact-contracts.md` (Schema field name + Receipt binding) for the silent-bug class that lands here. |
|
|
132
134
|
|
|
133
135
|
## Pipeline step options
|
|
134
136
|
|
|
@@ -12,8 +12,9 @@ This rule is mandatory. **You MUST** obey it on every turn, without exception.
|
|
|
12
12
|
1. **Probe** — before answering, run `ls -la .ai.local` from the repository root.
|
|
13
13
|
2. **Walk** — if `.ai.local/` exists at multiple levels (monorepo), read every level from root to leaf. **Deeper wins** in practice: more specific rules appear later in the assembled context and take precedence.
|
|
14
14
|
3. **Apply** — treat every `.ai.local/rules/*.md` and `.ai.local/conventions.md` as a higher-priority rule for this repo. Do **not** load `.ai.local/team/**` as rules (shared pipeline artifacts). The block below ("Authoring `.ai.local/rules/*.md`") defines the conventions.
|
|
15
|
-
4. **
|
|
16
|
-
5. **
|
|
15
|
+
4. **Activate seeds** — if `.ai.local/rules-library/<seed>.md` exists and matches the current task scope, treat it as the applicable local rule and tell the owner to move it into `.ai.local/rules/`. Seeds are **staged-inactive** templates shipped by `init` (e.g. `router-pages`, `no-react-fc`, `storybook-ui-quality-gate`, `component-child-decomposition`); they do **not** apply until moved.
|
|
16
|
+
5. **Conflict** — if a local rule conflicts with a preset rule, **the local rule wins**. If a local rule body contains `override: kill <preset-rule-name>`, drop that preset rule from your context window entirely.
|
|
17
|
+
6. **Acknowledge** — when answering a user question, briefly state which `.ai.local/` rules apply to the current task (one line is enough). Format: `Using .ai.local: <rule-name>(, <rule-name>)*`. If no `.ai.local/` exists, do NOT mention this rule.
|
|
17
18
|
|
|
18
19
|
If `.ai.local/` does not exist → **no-op**, do not error. Do not produce any log line about its absence.
|
|
19
20
|
|
|
@@ -29,6 +30,18 @@ Each `.ai.local/rules/<name>.md` is a plain-markdown rule body. The model parses
|
|
|
29
30
|
|
|
30
31
|
Keep files ≤ 120 lines. Match the style of preset rules (short sections, bullets, code examples).
|
|
31
32
|
|
|
33
|
+
## What `init` overwrites vs preserves
|
|
34
|
+
|
|
35
|
+
`init` manages the tool trees; they are **not** the home of durable project config.
|
|
36
|
+
|
|
37
|
+
| Overwritten / merged by `init` | Preserved |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `.cursor/**`, `.claude/**`, `.mavis/**`, `.opencode/**` (rules, agents, skills, commands, hooks) | `.ai.local/**` |
|
|
40
|
+
| root `AGENTS.md` (from `REPO_AGENTS.md`) | `docs/specs/**`, `openspec/**` |
|
|
41
|
+
| tool MCP config (`.cursor/mcp.json`; `opencode.json` — `mcp` merged, other blocks may be rewritten) | repo-root `.mcp.json`, `.ai/context/**`, `.ai.local/rules/**` |
|
|
42
|
+
|
|
43
|
+
Put durable project-owned agent config and authoritative specs **outside** the tool trees (`.ai.local/`, `.ai/context/`, repo-root `.mcp.json`). After any re-init, verify consumer-owned blocks you added to a managed file (e.g. `opencode.json` `instructions` / `permission.bash`) survived.
|
|
44
|
+
|
|
32
45
|
## Limitations (read this)
|
|
33
46
|
|
|
34
47
|
- Cursor, Claude, Mavis, and OpenCode do **not** natively read `.ai.local/`. This rule is a **prompt-only** mechanism: it asks you, the model, to read and apply the files. Reliability is high but not 100%.
|
|
@@ -40,4 +53,5 @@ Keep files ≤ 120 lines. Match the style of preset rules (short sections, bulle
|
|
|
40
53
|
|
|
41
54
|
- Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package.
|
|
42
55
|
- Living gotchas: `.ai.local/conventions.md`. Pipeline artifacts: `.ai.local/team/` (do not load as rules).
|
|
56
|
+
- Staged seeds: `.ai.local/rules-library/**` (move a matching seed into `.ai.local/rules/` to activate).
|
|
43
57
|
- Root `AGENTS.md` reinforces this rule with a `MANDATORY` section.
|
|
@@ -69,3 +69,7 @@ When the diff touches UI / layout / styling (paths under `app/src/ui/**`, global
|
|
|
69
69
|
- Findings: `path:line` + Figma node id + viewport + severity. Emit a `## Figma parity (UI)` section in `review.md`.
|
|
70
70
|
- **Storybook visual baselines are not a substitute.** Approving a UI MR on Storybook baselines alone is not acceptable when a Figma reference exists.
|
|
71
71
|
- Missing or `unable_to_compare` parity section on a UI-touching MR with a Figma reference → `REQUEST_CHANGES`. Unbound raw values where a token exists (typography / color / spacing / imagery) → `blocker` / `important`. The full gate lives in the `code-reviewer` agent prompt; this rule cross-references it.
|
|
72
|
+
|
|
73
|
+
### Spec / docs sync (behaviour change)
|
|
74
|
+
|
|
75
|
+
When the diff changes documented `app/src/**` behaviour and the repo carries a spec tree (`docs/specs/**`, `openspec/specs/**`, `docs/qa/**`, or `*.cases.md`), the same changeset must update the linked page / spec / QA case (or record an explicit open-question gap). A missing update on an **AC-named** surface → `REQUEST_CHANGES`; on a non-AC surface → `important`. Do not treat `docs/specs` and `openspec` as substitutes for each other — keep both in sync.
|
|
@@ -93,6 +93,7 @@ Policy is stack-class-specific — see adapter **Stack notes**. If a Figma **plu
|
|
|
93
93
|
|
|
94
94
|
## Stack notes
|
|
95
95
|
|
|
96
|
+
- **Installed Next docs first:** the installed `next` may ship version-pinned agent docs at `node_modules/next/dist/docs/` and a managed `AGENTS.md` block. Prefer them for framework APIs (they match the installed major) — reach for Context7 only when they are insufficient or absent.
|
|
96
97
|
- Pipeline **`mockup-reviewer`** is the only agent that reads Figma for mockup review. See `mockup-review`.
|
|
97
98
|
- Shipped besides Context7: browser automation MCP (`playwright` / `playwright-test` / `user-playwright`) and `chrome-devtools`.
|
|
98
99
|
- **Split:** Playwright MCP → e2e agents (planner/generator/healer), selector checks, spec reproduction. Chrome DevTools MCP → `debugger` / `performance-auditor` against a **running app** (console, network, traces). Not a substitute for e2e.
|
|
@@ -19,6 +19,10 @@ Exceptions: documentation edits outside `app/`, CI configs, `.claude/rules/**`,
|
|
|
19
19
|
|
|
20
20
|
**Pipeline exception:** if the task runs through the agent team and the next step is `build-verifier`, the developer may limit lint/type-check to **changed files**; full run is `build-verifier`’s duty. In single-agent mode (no pipeline) — always a full run.
|
|
21
21
|
|
|
22
|
+
**Secondary packages:** when the repo has more than one package with a manifest (e.g. `app/` + `storybook/`), run each package's own scripts from its own directory. Do not conflate runners (app unit runner vs catalog runner).
|
|
23
|
+
|
|
24
|
+
**Run the package script, not a bare runner:** prefer `yarn lint:js` / `yarn test` over `npx eslint` / `npx jest`. Scripts carry env (`TZ`), coverage, and reporters that CI depends on; a bare runner can diverge from CI.
|
|
25
|
+
|
|
22
26
|
## Required commands
|
|
23
27
|
|
|
24
28
|
Working directory — **`app/`**. Package manager — **`tooling-and-review/package-manager.md`**.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Next.js frontend security — secrets, auth, XSS, Server Actions, env
|
|
3
|
+
impact: CRITICAL
|
|
3
4
|
paths:
|
|
4
5
|
- "app/src/**/*.{ts,tsx}"
|
|
5
6
|
- "app/**/app/**/*.{ts,tsx}"
|
|
@@ -14,6 +15,8 @@ paths:
|
|
|
14
15
|
|
|
15
16
|
Coding-time checklist. Full audit → agent `security-reviewer` + skill `code-review`.
|
|
16
17
|
|
|
18
|
+
**Deployment model first.** Read `output` in `next.config.*`. With `output: 'export'` there is **no server tier**: the Server Actions / route handlers / middleware items below are **N/A**. The applicable subset is Secrets & env, XSS, redirects, data exposure, and third-party scripts — and auth/session are enforced by the BFF plus a client route guard.
|
|
19
|
+
|
|
17
20
|
## Secrets and env
|
|
18
21
|
|
|
19
22
|
- Never put service / secret keys in `NEXT_PUBLIC_*` or client bundles (`sk_`, private API keys, DB URLs).
|
|
@@ -26,6 +29,7 @@ Coding-time checklist. Full audit → agent `security-reviewer` + skill `code-re
|
|
|
26
29
|
- Middleware may refresh sessions; do not treat middleware alone as authorization.
|
|
27
30
|
- Prefer httpOnly secure cookies over `localStorage` for tokens when the repo pattern allows.
|
|
28
31
|
- Never trust client-only session claims without a server verify step used by the project.
|
|
32
|
+
- **Static-export / SPA repos:** there is no server session verify — use the repo's client route guard plus BFF-issued httpOnly cookies; do not invent a server verifier.
|
|
29
33
|
|
|
30
34
|
## Mutations and input
|
|
31
35
|
|
|
@@ -51,6 +55,15 @@ Coding-time checklist. Full audit → agent `security-reviewer` + skill `code-re
|
|
|
51
55
|
| Invented auth helpers not in `package.json` / codebase | Copy patterns from existing auth routes |
|
|
52
56
|
| Putting secrets in `NEXT_PUBLIC_*` | Server-only env + server modules |
|
|
53
57
|
| Auth only in middleware | Server `getUser` / session verify in layout/page/action |
|
|
58
|
+
| Server session verifier / Server Action in a static-export repo | Client route guard + BFF-issued httpOnly cookie |
|
|
59
|
+
|
|
60
|
+
## Compliance / personal data (regulated apps)
|
|
61
|
+
|
|
62
|
+
For apps that ship medical or personal data (e.g. GDPR / local data-protection law):
|
|
63
|
+
|
|
64
|
+
- Logs, traces, analytics payloads, error reports, and third-party scripts must **not** carry PD, full record text, raw auth tokens, or full URL search params.
|
|
65
|
+
- Flag every new third-party script and every change to the SSR/cookie payload shape for review.
|
|
66
|
+
- Any change touching PD, medical data, analytics, or third-party scripts declares a **compliance impact** block (None | Affected) in its L2+ artifact; when unclear, default to Affected and block.
|
|
54
67
|
|
|
55
68
|
## Agent requirement
|
|
56
69
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Component catalog (Storybook/Ladle) is the required UI dev + visual-review surface — stories ship with the UI change
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
paths:
|
|
5
|
+
- app/src/ui/**/*
|
|
6
|
+
- storybook/**/*
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Component catalog gate (UI quality)
|
|
10
|
+
|
|
11
|
+
When the repo ships a **component catalog** (Storybook, Ladle, Chromatic, or a `stories/` tree), it is the required surface for developing and reviewing UI. A route screenshot, a source-only review, or unit tests without stories is **not** enough.
|
|
12
|
+
|
|
13
|
+
## Scope
|
|
14
|
+
|
|
15
|
+
- Triggers: a new `app/src/ui/**` component / page / block / modal, or a visual/interaction refactor (layout, styles, tokens, copy, hover/open, empty / error / loading).
|
|
16
|
+
- Skip: types / API / store / mocks with no render or style change.
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
|
|
20
|
+
- **Stories ship with the UI**, in the same change — not after.
|
|
21
|
+
- **Compare against the design source** (Figma, else the AC): the catalog is the canvas, the design is the truth. Visual baselines are a **regression detector**, not a design spec — fix the implementation first, then update the baseline.
|
|
22
|
+
- **Package isolation:** when the catalog is its own package (own `package.json` / lockfile / `node_modules`), it resolves dependencies from **its own** `node_modules` — never the app's. Missing package ⇒ add it to the catalog manifest; never alias into the app.
|
|
23
|
+
- **Clean up** temp screenshots you created this turn; keep only intentional baselines and product assets.
|
|
24
|
+
- Keep catalog tests green — do not finish with red or stale baselines.
|
|
25
|
+
|
|
26
|
+
## Stack notes
|
|
27
|
+
|
|
28
|
+
- Catalog: Storybook. Developer loop: read Figma → implement → preview the story → screenshot → compare → fix → **update baselines last**.
|
|
29
|
+
- Run the catalog runner from the catalog directory (e.g. its own Vitest project), not the app's unit runner.
|
|
30
|
+
|
|
31
|
+
## Handoff
|
|
32
|
+
|
|
33
|
+
- `feature-developer`: a UI work package in a catalog repo is **not done** without a story and a green catalog test run.
|
|
34
|
+
- `code-reviewer`: a UI-touching MR with a catalog present and no story → `REQUEST_CHANGES`.
|
|
35
|
+
|
|
36
|
+
## Related
|
|
37
|
+
|
|
38
|
+
- `design-tokens-binding.md` — Figma → repo token binding for the implementation.
|
|
39
|
+
- `mockup-review.md` — the reviewer-side parity gate.
|
|
@@ -29,7 +29,7 @@ The implementation must mirror the Figma mockup token-for-token. Raw design valu
|
|
|
29
29
|
|
|
30
30
|
## Imagery & icons
|
|
31
31
|
|
|
32
|
-
- **Images:** use the Figma asset source from `get_design_context` / the node’s image fill. Repo: `next/image`
|
|
32
|
+
- **Images:** use the Figma asset source from `get_design_context` / the node’s image fill. Repo: **the project’s image primitive** — check the nearest component in the same layer (often a plain `<img>` or a DS image component; `next/image` only where the config keeps the optimizer enabled). Derive `src`, `width`, `height` from Figma. Do not use a placeholder, do not invent a URL, do not change aspect ratio.
|
|
33
33
|
- **Icons:** use the `@sds/icon` (or project DS) symbol name from the Figma component instance / metadata. Do not invent icon names. The Figma node’s component name (e.g. `Icon / chevron-right`) maps to the DS symbol.
|
|
34
34
|
- `alt` text from the Figma node name when meaningful; otherwise from the design context copy.
|
|
35
35
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forms and validation — use the repo's form library + design-system fields + shared validators, not ad-hoc state
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
paths:
|
|
5
|
+
- app/src/**/*Form*.tsx
|
|
6
|
+
- app/src/**/*Form*.ts
|
|
7
|
+
- app/src/**/*Modal*.tsx
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Forms and validation
|
|
11
|
+
|
|
12
|
+
Use the form solution already in the repo (`package.json` + the nearest form component). Do not hand-roll form state with `useState` when a form library is present.
|
|
13
|
+
|
|
14
|
+
## Rules
|
|
15
|
+
|
|
16
|
+
- One form-hook instance per form; register design-system fields through the library's controller/wrapper (controlled) — not a raw `<input>` when a DS field exists.
|
|
17
|
+
- Validate with the repo's resolver/schema library and reuse the shared validators under the repo's validation utils — never re-implement email / phone / date / length rules inline.
|
|
18
|
+
- Masked inputs (phone, date, card) go through the repo's mask library, not ad-hoc regex on change.
|
|
19
|
+
- Disable submit while `!isValid` / `isSubmitting`; surface field errors from the form library's error state.
|
|
20
|
+
- Keep side effects out of field components: the form owns `onSubmit`; data flows to store/API through the repo's layers (`architecture/architecture-boundaries-ui.md`).
|
|
21
|
+
|
|
22
|
+
## Accessibility
|
|
23
|
+
|
|
24
|
+
- Every field has a visible label and an associated error message; do not rely on placeholder-only labels.
|
|
25
|
+
- Field errors are announced and tied to the input; keep the DS field's wiring instead of a bespoke error node.
|
|
26
|
+
|
|
27
|
+
## Stack notes
|
|
28
|
+
|
|
29
|
+
- Library: `react-hook-form` + `yup` resolver; `mode: 'onTouched'`.
|
|
30
|
+
- DS fields: `app/src/ui/components/_form/**`; shared validators: `app/src/lib/utils/validations/**`; masks: `imask` / `react-imask`.
|
|
31
|
+
|
|
32
|
+
## Related
|
|
33
|
+
|
|
34
|
+
- `ui-and-accessibility/react-ui.md` — component structure and decomposition.
|
|
35
|
+
- `architecture/architecture-boundaries-ui.md` — no API/DTO in UI.
|
|
@@ -24,6 +24,24 @@ impact: HIGH
|
|
|
24
24
|
- No nested ternaries in JSX. For not-ready / empty / error, use an early return or a dedicated `EmptyState` / `ErrorState` component.
|
|
25
25
|
- A `variant` / `mode` flag that renders two unrelated layouts is **two** components, not one.
|
|
26
26
|
|
|
27
|
+
# One component / one styled element — one purpose
|
|
28
|
+
|
|
29
|
+
- Each component **and** each styled element serves exactly **one** purpose. Do not drive two distinct shapes (different padding, slot set, alignment, visual identity) from a `variant` / `is…` flag or branchy styles.
|
|
30
|
+
- Two call sites that need visibly different markup → two named components (or two named styled exports). Share the base via a small primitive (`BaseCard` styled block + two thin extensions), not a universal branchy `Card`.
|
|
31
|
+
- A flag that flips a single non-layout property (`compact`, `disabled`) is fine; a flag that flips layout, slots, or visual identity is not — split it.
|
|
32
|
+
|
|
33
|
+
# CSS-in-JS interpolation functions
|
|
34
|
+
|
|
35
|
+
- Inside `${…}` interpolations of a styled template (`styled.*`), do **not** write an inline arrow (`${({ tone }) => …}` or `${({ gap }) => gap}`). Reference a **module-level function** that takes the styled props: `${getPromoStatusColor}`.
|
|
36
|
+
- Name it `get` + the value (`getColor`, `getGap`, `getPromoStatusColor`); keep the prop type shared between the styled generic and the function parameter.
|
|
37
|
+
- A module-level function is debuggable, type-checkable in isolation, and reusable across sibling styled blocks; an inline arrow compiles to an untestable one-shot.
|
|
38
|
+
|
|
39
|
+
# Async UI states
|
|
40
|
+
|
|
41
|
+
- Loading, empty, error, and load-failed are **distinct** states — render each explicitly; do not collapse them into one spinner/blank branch.
|
|
42
|
+
- Prefer a **per-block skeleton** over a page-level spinner, and reuse the repo's existing primitives (`Skeleton`, `EmptyState`, `ErrorState`, load-failed stub, global `ErrorBoundary`) instead of inventing new ones.
|
|
43
|
+
- Error boundaries are usually mounted once at the app root; add a local boundary only when the repo already does so for that region.
|
|
44
|
+
|
|
27
45
|
## Incorrect
|
|
28
46
|
|
|
29
47
|
```tsx
|
|
@@ -99,7 +117,7 @@ For a reusable component:
|
|
|
99
117
|
- **Forbidden** to import another component's `styles` (`../Other/styles`, `../../styles`). Allowed: `./styles`, shared primitives from `@/ui/components/...` or design-system packages.
|
|
100
118
|
- CSS / `styled` order — Stylelint idiomatic-order: `ui-and-accessibility/css-property-order.md` (loads on `styles.ts` / `.css`).
|
|
101
119
|
- For visuals use **the style stack and tokens already in the project** (variables, theme, shared classes, design package).
|
|
102
|
-
- **Token binding (Figma → repo):** typography, color, spacing, radius, shadow, and imagery must bind to the project token module and the design system (`@sds/tokens-*` / `@sds/brand-colors` / DS components like `Text variant="…"`, `@sds/icon`,
|
|
120
|
+
- **Token binding (Figma → repo):** typography, color, spacing, radius, shadow, and imagery must bind to the project token module and the design system (`@sds/tokens-*` / `@sds/brand-colors` / DS components like `Text variant="…"`, `@sds/icon`, the project image primitive). Raw `#…` / `rgb(…)` / `px` where a token exists is a finding. The full discipline — including the per-element parity checklist and the developer self-check vs Figma — is in **`ui-and-accessibility/design-tokens-binding.md`**. When a Figma reference exists, the `mockup-review.md` `## Design contract` section is the binding table; use it.
|
|
103
121
|
- Avoid:
|
|
104
122
|
- inline styles except simple cases;
|
|
105
123
|
- duplicating styling already covered by shared primitives;
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
"slug": "example-feature-with-ux-no-figma",
|
|
3
3
|
"intent": "feature",
|
|
4
4
|
"profile": "standard",
|
|
5
|
-
"summary": "
|
|
5
|
+
"summary": "UI-scope feature with required-signal UX and no Figma URL — task-analyst loads skill ux-design; UI scope forces mockup-reviewer (reviewed against AC / ux-design.md)",
|
|
6
6
|
"steps": [
|
|
7
7
|
{ "agent": "task-analyst", "label": "Clarify, UX design, decompose" },
|
|
8
|
+
{ "agent": "mockup-reviewer", "label": "UI review vs AC / ux-design" },
|
|
8
9
|
{ "agent": "feature-developer", "label": "Implement" },
|
|
9
10
|
{ "agent": "build-verifier", "label": "Validation gate", "model": "cheap" },
|
|
10
11
|
{ "agent": "code-reviewer", "label": "Code review", "model": "cheap" }
|
|
11
12
|
],
|
|
12
13
|
"humanGates": ["after:task-analyst"],
|
|
13
14
|
"autoChain": true,
|
|
14
|
-
"skipped": [
|
|
15
|
-
{ "agent": "mockup-reviewer", "reason": "No figma.com URL; analyst skill ux-design covers behavioral UX" }
|
|
16
|
-
]
|
|
15
|
+
"skipped": []
|
|
17
16
|
}
|
|
@@ -74,8 +74,8 @@ Shipped browser split: Playwright MCP for e2e specs/selectors; Chrome DevTools M
|
|
|
74
74
|
|
|
75
75
|
## Artifact contract
|
|
76
76
|
|
|
77
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
78
|
-
- **Owned outputs:** `a11y-review.md`; upsert only the manifest
|
|
77
|
+
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, implementation or UI diff scope, and prior review artifacts when present.
|
|
78
|
+
- **Owned outputs:** `a11y-review.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `a11y-review`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
79
79
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
|
|
80
80
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
81
81
|
|
|
@@ -72,8 +72,8 @@ For feature-developer before or during implementation.
|
|
|
72
72
|
|
|
73
73
|
## Artifact contract
|
|
74
74
|
|
|
75
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
76
|
-
- **Owned outputs:** `api-contract-review.md`; upsert only the manifest
|
|
75
|
+
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, architecture when present, and changed types/API/mocks against the contract docs.
|
|
76
|
+
- **Owned outputs:** `api-contract-review.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `api-contract-review`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
77
77
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
|
|
78
78
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
79
79
|
|
|
@@ -117,7 +117,7 @@ Do not fix code — report only. Do not advance to code-reviewer until PASS.
|
|
|
117
117
|
|
|
118
118
|
## Artifact contract
|
|
119
119
|
|
|
120
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
121
|
-
- **Owned outputs:** `validation-report.md`; upsert only the manifest
|
|
120
|
+
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, implementation evidence, pipeline scope, and changed files.
|
|
121
|
+
- **Owned outputs:** `validation-report.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `validation`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
122
122
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `validation_failed`. Bind it to the supplied `attemptId` when present.
|
|
123
123
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -90,8 +90,8 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
|
|
|
90
90
|
|
|
91
91
|
## Artifact contract
|
|
92
92
|
|
|
93
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
94
|
-
- **Owned outputs:** `ci-report.md` plus any minimal fix paths; upsert only the manifest
|
|
93
|
+
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition when present, failing check context, and prior validation/debug artifacts.
|
|
94
|
+
- **Owned outputs:** `ci-report.md` plus any minimal fix paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `ci`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
95
95
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
96
96
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
97
97
|
|
|
@@ -80,7 +80,7 @@ Do not mix this output with retrospective facilitation — keep review and retro
|
|
|
80
80
|
|
|
81
81
|
## Artifact contract
|
|
82
82
|
|
|
83
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
84
|
-
- **Owned outputs:** `review.md`; upsert only the manifest
|
|
83
|
+
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, implementation, validation evidence, and the scoped git diff.
|
|
84
|
+
- **Owned outputs:** `review.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `review`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
85
85
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
|
|
86
86
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|