@bonesofspring/ai-rules 0.2.29 → 0.2.31
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/package.json +5 -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 +2 -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 +4 -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 +2 -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 +4 -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 +4 -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 +2 -2
- package/presets/claude/next/agents/ci-investigator.md +2 -2
- package/presets/claude/next/agents/code-reviewer.md +37 -2
- package/presets/claude/next/agents/debugger.md +2 -2
- package/presets/claude/next/agents/feature-developer.md +14 -2
- package/presets/claude/next/agents/migration-specialist.md +2 -2
- package/presets/claude/next/agents/mockup-reviewer.md +29 -3
- package/presets/claude/next/agents/openspec-author.md +2 -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 +1 -1
- package/presets/claude/next/agents/task-router.md +1 -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 +2 -1
- package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +17 -0
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +4 -1
- package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +10 -0
- package/presets/claude/next/rules/tooling-and-review/mockup-review.md +9 -0
- package/presets/claude/next/rules/ui-and-accessibility/design-tokens-binding.md +42 -0
- package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +1 -0
- package/presets/claude/next/skills/code-review/SKILL.md +1 -0
- 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 +4 -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 +4 -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 +4 -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 +4 -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/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 +2 -2
- package/presets/cursor/next/agents/ci-investigator.md +2 -2
- package/presets/cursor/next/agents/code-reviewer.md +37 -2
- package/presets/cursor/next/agents/debugger.md +2 -2
- package/presets/cursor/next/agents/feature-developer.md +24 -2
- package/presets/cursor/next/agents/migration-specialist.md +2 -2
- package/presets/cursor/next/agents/mockup-reviewer.md +29 -3
- package/presets/cursor/next/agents/openspec-author.md +2 -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 +1 -1
- package/presets/cursor/next/agents/task-router.md +1 -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/hooks/chain-team-phases.sh +46 -1
- package/presets/cursor/next/rules/README.md +3 -1
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +3 -1
- package/presets/cursor/next/rules/code-review-mr.mdc +10 -0
- package/presets/cursor/next/rules/design-tokens-binding.mdc +41 -0
- package/presets/cursor/next/rules/feature-delivery-workflow.mdc +17 -0
- package/presets/cursor/next/rules/mockup-review.mdc +9 -0
- package/presets/cursor/next/rules/react-ui.mdc +1 -0
- package/presets/cursor/next/skills/code-review/SKILL.md +1 -0
- 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/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 +4 -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 +4 -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 +4 -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 +4 -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 +4 -1
- package/presets/mavis/next/adapter-map.json +9 -1
- 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 +2 -2
- package/presets/mavis/next/agents/ci-investigator.md +2 -2
- package/presets/mavis/next/agents/code-reviewer.md +37 -2
- package/presets/mavis/next/agents/debugger.md +2 -2
- package/presets/mavis/next/agents/feature-developer.md +24 -2
- package/presets/mavis/next/agents/migration-specialist.md +2 -2
- package/presets/mavis/next/agents/mockup-reviewer.md +29 -3
- package/presets/mavis/next/agents/openspec-author.md +2 -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 +1 -1
- package/presets/mavis/next/agents/task-router.md +1 -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/hooks/chain-team-phases.sh +46 -1
- package/presets/mavis/next/rules/agent-team-orchestrator.md +4 -1
- package/presets/mavis/next/rules/code-review-mr.md +10 -0
- package/presets/mavis/next/rules/design-tokens-binding.md +35 -0
- package/presets/mavis/next/rules/feature-delivery-workflow.md +17 -0
- package/presets/mavis/next/rules/mockup-review.md +9 -0
- package/presets/mavis/next/rules/react-ui.md +1 -0
- package/presets/mavis/next/skills/code-review/SKILL.md +1 -0
- 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 +4 -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 +4 -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 +4 -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 +4 -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 +4 -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 +4 -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 +4 -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 +4 -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 +4 -1
- package/presets/opencode/next/adapter-map.json +9 -1
- 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 +2 -2
- package/presets/opencode/next/agents/ci-investigator.md +2 -2
- package/presets/opencode/next/agents/code-reviewer.md +37 -2
- package/presets/opencode/next/agents/debugger.md +2 -2
- package/presets/opencode/next/agents/feature-developer.md +24 -2
- package/presets/opencode/next/agents/migration-specialist.md +2 -2
- package/presets/opencode/next/agents/mockup-reviewer.md +29 -3
- package/presets/opencode/next/agents/openspec-author.md +2 -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 +1 -1
- package/presets/opencode/next/agents/task-router.md +1 -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/hooks/chain-team-phases.sh +46 -1
- package/presets/opencode/next/rules/agent-team-orchestrator.md +4 -1
- package/presets/opencode/next/rules/code-review-mr.md +10 -0
- package/presets/opencode/next/rules/design-tokens-binding.md +35 -0
- package/presets/opencode/next/rules/feature-delivery-workflow.md +17 -0
- package/presets/opencode/next/rules/mockup-review.md +9 -0
- package/presets/opencode/next/rules/react-ui.md +1 -0
- package/presets/opencode/next/skills/code-review/SKILL.md +1 -0
- 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 +4 -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 +4 -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 +4 -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 +4 -1
- package/scripts/fixtures/cli-golden/claude/next.json +11 -10
- package/scripts/fixtures/cli-golden/cursor/next.json +10 -9
- package/scripts/fixtures/cli-golden/mavis/next.json +9 -8
- package/scripts/fixtures/cli-golden/opencode/next.json +9 -8
|
@@ -24,6 +24,35 @@ You **issue** reviews. Implementers acting on your findings must verify each ite
|
|
|
24
24
|
- User-flow changes without e2e plan/spec updates → note in warnings; REQUEST_CHANGES when AC requires e2e.
|
|
25
25
|
- If the MR touches `docs/specs/**`, load **`product-specs`** (+ **`product-specs-authoring`** when new/changed specs): **WARN** code/spec drift; **FAIL** broken INDEX `path` link or missing required frontmatter keys/arrays on touched spec files; required body headings missing → **FAIL** on touched files. Do not invent missing product behavior.
|
|
26
26
|
|
|
27
|
+
## UI / Figma parity gate (UI-touching MR)
|
|
28
|
+
|
|
29
|
+
When the diff touches **UI / layout / styling** — paths under `app/src/ui/**` (components, pages, styles, hooks used by UI), or edits to global layout/CSS/tokens, or renamed/reordered UI files — AND a Figma mockup reference exists in `brief.md` / `decomposition.md` (Figma URL, fileKey, or node id) **or** `mockup-review.md` is present in the task:
|
|
30
|
+
|
|
31
|
+
- **Do a detailed, pixel-accurate comparison** of the implementation against the mockup, **across every viewport the project uses**. The project’s accepted viewport set is the one declared in the `mockup-review` AC-8 / Stack notes (web buckets ~375 / ~768 / ~1280 mapped to small / medium / large) and/or the Storybook viewport toolbar in this repo — fetch the full set, do not sample.
|
|
32
|
+
- For each viewport: pull the Figma frame via Figma MCP `get_screenshot` (prefer the node-link if present) and capture the running app at the same width (Playwright MCP / Chrome DevTools MCP). Compare structure, spacing, typography, color, iconography, states, and interactive affordances. **Storybook visual baselines are not a substitute.**
|
|
33
|
+
|
|
34
|
+
### Per-element parity checklist (mandatory)
|
|
35
|
+
|
|
36
|
+
For every UI element in the diff scope, verify against the Figma node and the `mockup-review.md` `## Design contract` (when present) and the **`design-tokens-binding`** discipline. Findings cite **`path:line`** + Figma node id + viewport.
|
|
37
|
+
|
|
38
|
+
1. **Typography** — font-family, size, line-height, weight, letter-spacing, color. Must match the Figma text style / `tokens-typography` mapping. A `Text variant="…"` DS component is the safe mirror; a raw `font-size: 14px; line-height: 20px;` wrapper is a finding unless the Figma text style maps to a raw token (and the token is used, not a literal).
|
|
39
|
+
2. **Color** — fills, strokes, icon color, link color, placeholder color. Must bind to `@sds/tokens-colors` / `@sds/brand-colors` / the project token module (or the Figma variable mapped in the Design contract). Raw `#…` / `rgb(…)` is a finding. Hover / active / focus / disabled states must use the bound state color from the token set, not a literal.
|
|
40
|
+
3. **Spacing** — padding, gap, margin, border-radius. Must match the Figma spacing / radius variable (Design contract) or the repo spacing scale. Raw `padding: 16px;` is a finding if a token exists. Auto-layout intent (direction, gap, alignment) preserved — no reflow to absolute positioning without a brief reason.
|
|
41
|
+
4. **Imagery & icons** — image `src`, intrinsic `width`/`height`, aspect ratio match the Figma asset / `get_design_context` recommendation; rendered with `next/image` (or repo convention). Icons must use the `@sds/icon` (or DS) symbol name from the Figma component instance. A `placeholder`, an invented image URL, a guessed icon name, or a stretched aspect ratio is a finding. `alt` text matches the Figma node copy when meaningful.
|
|
42
|
+
5. **States** — empty / loading / error / success / disabled / validation visible in the Figma must be implemented. Missing states present in the mockup → `blocker`.
|
|
43
|
+
6. **Structure & responsive** — direction (row / column), alignment, wrap, overflow match the Figma. The implementation responds to the project viewport set without horizontal scroll or clipped content at any accepted width (unless the Figma explicitly clips).
|
|
44
|
+
7. **Auto-layout vs absolute** — for a region that is the only responsive evidence in Figma, the implementation must use flex / grid with the same gap / padding, not absolute positioning.
|
|
45
|
+
|
|
46
|
+
### Findings, severity, and section
|
|
47
|
+
|
|
48
|
+
- Findings cite `path:line` + Figma node id + viewport + severity. Layout / style deviations from the mockup → **`important`**; user-visible / broken / missing-state → **`blocker`**; latent / cosmetic → **`nit`**.
|
|
49
|
+
- Emit a `## Figma parity (UI)` section in `review.md` with the per-viewport verdict, a findings table, and screenshots / links. The section must reference the `## Design contract` from `mockup-review.md` and the **`design-tokens-binding`** discipline. **If you cannot perform the comparison** (no Figma URL in brief, or Figma MCP down with no manual screenshots) → still emit the section with verdict `unable_to_compare` and a one-line reason. **Never** skip the section on a UI-touching MR with a Figma reference.
|
|
50
|
+
- **Hard rules:**
|
|
51
|
+
- UI-touching MR with a Figma reference and a missing or `unable_to_compare` parity section → **REQUEST_CHANGES**.
|
|
52
|
+
- Unbound raw values where a token exists (typography / color / spacing / imagery) → `blocker` (user-visible) or `important` (latent). Do not approve on Storybook baselines alone.
|
|
53
|
+
|
|
54
|
+
The gate does **not** apply to MRs with no UI/layout diff and no Figma reference (e.g. pure store/reducer or test-only changes).
|
|
55
|
+
|
|
27
56
|
## Review artifact
|
|
28
57
|
|
|
29
58
|
Write `.ai.local/team/tasks/<slug>/review.md` with this format:
|
|
@@ -43,6 +72,12 @@ APPROVE | APPROVE_WITH_NOTES | REQUEST_CHANGES
|
|
|
43
72
|
## Suggestions (nice to have)
|
|
44
73
|
- ...
|
|
45
74
|
|
|
75
|
+
## Figma parity (UI)
|
|
76
|
+
- Viewports compared: …
|
|
77
|
+
- Per-viewport verdict: …
|
|
78
|
+
- Findings: `path:line` | node id | viewport | severity | note
|
|
79
|
+
- (If UI gate not applicable: `N/A — no UI diff / no Figma reference`.)
|
|
80
|
+
|
|
46
81
|
## AC coverage
|
|
47
82
|
| Criterion | Status | Notes |
|
|
48
83
|
|-----------|--------|-------|
|
|
@@ -62,7 +97,7 @@ Do not mix this output with retrospective facilitation — keep review and retro
|
|
|
62
97
|
|
|
63
98
|
## Artifact contract
|
|
64
99
|
|
|
65
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
66
|
-
- **Owned outputs:** `review.md`; upsert only the manifest
|
|
100
|
+
- **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.
|
|
101
|
+
- **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[]`.
|
|
67
102
|
- **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.
|
|
68
103
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -64,8 +64,8 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
|
|
|
64
64
|
|
|
65
65
|
## Artifact contract
|
|
66
66
|
|
|
67
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
68
|
-
- **Owned outputs:** `debug-report.md` plus any minimal fix paths; upsert only the manifest
|
|
67
|
+
- **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 evidence, and related prior artifacts.
|
|
68
|
+
- **Owned outputs:** `debug-report.md` plus any minimal fix paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `debug`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
69
69
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
70
70
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
71
71
|
|
|
@@ -14,6 +14,7 @@ You are a senior frontend developer working in a Next.js monorepo with strict la
|
|
|
14
14
|
3. Read `pipeline.json` for step context and scope.
|
|
15
15
|
4. Follow the **`feature-delivery` skill** (layer order, reference features, validation handoff).
|
|
16
16
|
5. **Verify carry-over at HEAD before applying** (refactor intent only). When the brief comes from a prior review's carry-over findings list, for each item run `git show HEAD:<path>` or `grep` to confirm the finding still applies at the current HEAD; if the file already contains the fix (carry-over was closed in a prior uncommitted batch), mark it as **NO-OP at HEAD** in `implementation.md` and skip the edit; if the file is unchanged, apply the fix and cite file:line. Target ≤2 NO-OP items per refactor pipeline.
|
|
17
|
+
6. **Figma node-link precondition.** If `brief.md` / `decomposition.md` / the prompt contains a Figma URL with a node id (`?node-id=…`), do **not** start UI implementation until `mockup-review.md` contains **both** a `## Design contract` section (Figma variables, text styles, components/assets with the repo mapping) **and** a `## Node decomposition (AC-2)` section (child→component map with bindings) for that node. If either section is missing or empty, emit `blocked` and hand back to the analyst / mockup-reviewer (or ask the user to re-run mockup-review). The Design contract is the binding table for typography / color / spacing / imagery; the Node decomposition is the component map. Load requestable rule **`design-tokens-binding`** before writing UI — bind every value to a Figma variable / text style / repo token; raw `#…` / `px` are a finding.
|
|
17
18
|
|
|
18
19
|
## Task execution rules
|
|
19
20
|
|
|
@@ -58,6 +59,27 @@ Do not perform formal code review — that is the code-reviewer subagent's job.
|
|
|
58
59
|
|
|
59
60
|
Before handoff, IDENTIFY→RUN→READ→VERIFY the scoped checks for this WP, THEN claim. Do not say the work is done without that evidence in the same turn. Full-project lint is `build-verifier`.
|
|
60
61
|
|
|
62
|
+
## UI self-check vs Figma (mandatory for UI WPs with a Figma reference)
|
|
63
|
+
|
|
64
|
+
When this WP touched UI / layout / styling (paths under `app/src/ui/**`, global layout/CSS/tokens) AND a Figma reference exists in `brief.md` / `decomposition.md` (or `mockup-review.md` is present):
|
|
65
|
+
|
|
66
|
+
1. **Render** the changed routes at **each project viewport** (the set from `mockup-review` AC-8 / Stack notes — web buckets ~375 / ~768 / ~1280 small/medium/large — and the repo’s Storybook viewport toolbar). Use Playwright MCP or Chrome DevTools MCP (the app must be running; if not, note the limitation and still perform the self-check as far as possible).
|
|
67
|
+
2. **Compare** each rendered viewport to the Figma `get_screenshot` (prefer the node-link). For each UI element in the diff scope, check the per-element parity list in the `code-reviewer` UI / Figma parity gate: typography, color, spacing, imagery, states, structure/responsive, auto-layout intent.
|
|
68
|
+
3. **Fix** obvious deviations before the implementation receipt (font family / size / line-height / color / spacing / image src+size / icon name / state). Bind to the Design contract; load **`design-tokens-binding`** if a value is missing.
|
|
69
|
+
4. **Record** a `## UI self-check vs Figma` block in `implementation.md`:
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
## UI self-check vs Figma
|
|
73
|
+
- Viewports checked: <e.g. 375, 768, 1280>
|
|
74
|
+
- MCP / app status: <ok | degraded: reason>
|
|
75
|
+
- Deviations fixed: `path:line` | node id | viewport | what | fix
|
|
76
|
+
- Remaining gaps / known limits: <… or none>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
If the app was not runnable or MCP was down, still emit the block with the limitation and what you could not check — the reviewer will gate.
|
|
80
|
+
|
|
81
|
+
This is the developer-side counterpart to the `code-reviewer` UI / Figma parity gate; together they close the fidelity loop (extract contract → bind → self-check → review-block on unbound).
|
|
82
|
+
|
|
61
83
|
## Anti-hallucination (Next / React / RTK)
|
|
62
84
|
|
|
63
85
|
- When editing `app/**/*.{ts,tsx}`, load / follow rule `react-next-anti-hallucination`.
|
|
@@ -102,7 +124,7 @@ Shipped browser split: Playwright MCP for e2e specs/selectors; Chrome DevTools M
|
|
|
102
124
|
|
|
103
125
|
## Artifact contract
|
|
104
126
|
|
|
105
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
106
|
-
- **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the manifest
|
|
127
|
+
- **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.md`, `decomposition.md`, current scope, and applicable prior findings.
|
|
128
|
+
- **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `implementation`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
107
129
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
108
130
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -62,8 +62,8 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
|
|
|
62
62
|
|
|
63
63
|
## Artifact contract
|
|
64
64
|
|
|
65
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
66
|
-
- **Owned outputs:** `migration-plan.md`; upsert only the manifest
|
|
65
|
+
- **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 and stack/version context from the repo.
|
|
66
|
+
- **Owned outputs:** `migration-plan.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `migration-plan`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
67
67
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
68
68
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
69
69
|
|
|
@@ -34,9 +34,35 @@ MCP unavailable or OAuth fail → verdict `BLOCKED_MCP`. Do not invent DS claims
|
|
|
34
34
|
|
|
35
35
|
Follow the requestable `mockup-review` checklist (DS components, tokens, quality, coverage, viewports). Do not duplicate that checklist here.
|
|
36
36
|
|
|
37
|
+
## Node-link input: child→component decomposition (AC-2, mandatory)
|
|
38
|
+
|
|
39
|
+
When the Figma URL (in prompt, `brief.md`, or `decomposition.md`) contains a node id (`?node-id=…` or `…/node/…`):
|
|
40
|
+
|
|
41
|
+
1. **Inspect the node subtree** via Figma MCP `get_metadata` for the exact node (not the whole file). Depth ≤3 named-frame levels; ≤12 child rows in the map.
|
|
42
|
+
2. **Classify each child node** as one of: library component instance (check `search_design_system` / library metadata), custom frame, text/icon/asset, container, layout-only, unknown. Skip pure decorative leaves unless they constrain the child component.
|
|
43
|
+
3. **Map each child node → target component** using repo conventions:
|
|
44
|
+
- existing `app/src/ui/**` component → name it (e.g. `RiskProfilePage/components/ProfileHealthCard`);
|
|
45
|
+
- attached library component (e.g. `@sds/*`) → name the library symbol and the local wrapper;
|
|
46
|
+
- no analog → mark `new: <ProposedName>` and the parent component it belongs to.
|
|
47
|
+
4. **Emit the map** in the report under `## Node decomposition (AC-2)` as a table (node id, node name, type, target component / action). Add a short prose summary of grouping / boundaries.
|
|
48
|
+
5. **Extract the Design contract** (mandatory for node-link input) and emit it as a separate `## Design contract` section, **above** the Node decomposition table — the developer reads it first:
|
|
49
|
+
- **Figma variables** (one `get_variable_defs` call per file): list the variables used by the subtree (color, spacing, radius, effect). Map each to the repo equivalent: `@sds/tokens-colors` / `@sds/brand-colors` / `@sds/tokens` / project token module (e.g. `var(--text-primary, …)`).
|
|
50
|
+
- **Text styles**: list the Figma text style names used (e.g. `Body/M`, `Heading/L`). Map to the repo typography component / token (`@sds/tokens-typography`, `Text variant="…"`, Linaria `var(--font-…, …)`).
|
|
51
|
+
- **Components / assets**: list library component instances (`@sds/*` symbol name), image fills (asset URL / `get_design_context` recommendation), and icons (`@sds/icon` symbol name).
|
|
52
|
+
- Call this once per file; do not dump the whole variable set — only what the subtree uses.
|
|
53
|
+
6. **Extend the AC-2 table** with a concise `Bindings` column (or a per-row note) capturing the text style, fill / spacing tokens, and asset source for that node. Keep the table scannable; put the long form in the Design contract section.
|
|
54
|
+
7. **Verdict rule.** Missing map **or** missing Design contract on a node-link input → verdict `FAIL` (mandatory pre-implementation step) unless MCP returned `BLOCKED_MCP`. Refusal to produce the map / contract on a node-link task is not an option — narrow the node with the user first (do not silently fall back to whole-file review).
|
|
55
|
+
|
|
56
|
+
The map and the Design contract are the implementation contract the developer reads before coding; the DS/tokens/quality/coverage/viewport dimensions still apply on top.
|
|
57
|
+
|
|
37
58
|
## Output
|
|
38
59
|
|
|
39
|
-
Write `.ai.local/team/tasks/<slug>/mockup-review.md` using the report headings in the `mockup-review` rule.
|
|
60
|
+
Write `.ai.local/team/tasks/<slug>/mockup-review.md` using the report headings in the `mockup-review` rule. When the input is a node-link, the report **must** additionally include:
|
|
61
|
+
|
|
62
|
+
- `## Design contract` (above Node decomposition) — Figma variables, text styles, components/assets used by the subtree, with the repo mapping (`@sds/tokens-*` / DS components / project token module). This is the binding table the developer uses for typography, color, spacing, and imagery.
|
|
63
|
+
- `## Node decomposition (AC-2)` — the child→component map (table) plus a short prose summary, with a `Bindings` column / per-row note for the Figma design bindings.
|
|
64
|
+
|
|
65
|
+
Both sections are the developer’s pre-implementation contract; do not omit either on a node-link input.
|
|
40
66
|
|
|
41
67
|
## Verdicts and receipts
|
|
42
68
|
|
|
@@ -52,8 +78,8 @@ Standalone FAIL must **not** set `changes_requested`. Embedded FAIL is a FAIL-on
|
|
|
52
78
|
|
|
53
79
|
## Artifact contract
|
|
54
80
|
|
|
55
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
56
|
-
- **Owned outputs:** `mockup-review.md`; upsert only the manifest
|
|
81
|
+
- **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 routing + analysis when present (standalone may have only the prompt + URL).
|
|
82
|
+
- **Owned outputs:** `mockup-review.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `mockup-review`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
57
83
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed`, `changes_requested`, or `blocked` per the table above. Bind it to the supplied `attemptId` when present.
|
|
58
84
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
59
85
|
|
|
@@ -122,8 +122,8 @@ If `scope` carries multiple phases (e.g. `openspec:<change-id>:propose+apply`),
|
|
|
122
122
|
|
|
123
123
|
## Artifact contract
|
|
124
124
|
|
|
125
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
126
|
-
- **Owned outputs:** `openspec/changes/<change-id>/**` (proposal.md, design.md, tasks.md, .openspec.yaml, specs/<capability>/spec.md delta) plus the team slot `openspec-change.md` in `.ai.local/team/tasks/<slug>/` when the orchestrator asks for a summary handoff. Preserve all foreign
|
|
125
|
+
- **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 and available architecture/migration/review artifacts.
|
|
126
|
+
- **Owned outputs:** `openspec/changes/<change-id>/**` (proposal.md, design.md, tasks.md, .openspec.yaml, specs/<capability>/spec.md delta) plus the team slot `openspec-change.md` in `.ai.local/team/tasks/<slug>/` when the orchestrator asks for a summary handoff. Preserve all foreign items in `manifest.artifacts[]`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `openspec-change`).
|
|
127
127
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths under `openspec/changes/<change-id>/**`, attach `openspec validate <change-id> --type change --strict` exit code + deltas-only summary, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
128
128
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
129
129
|
|
|
@@ -61,8 +61,8 @@ If Chrome DevTools MCP is ready and the app is running, use it for console/netwo
|
|
|
61
61
|
|
|
62
62
|
## Artifact contract
|
|
63
63
|
|
|
64
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
65
|
-
- **Owned outputs:** `perf-report.md`; upsert only the manifest
|
|
64
|
+
- **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 when present and the scoped git diff / routes under audit.
|
|
65
|
+
- **Owned outputs:** `perf-report.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `perf-report`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
66
66
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
67
67
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
68
68
|
|
|
@@ -38,8 +38,8 @@ When the task is mostly e2e, prefer invoking the dedicated `playwright-test-plan
|
|
|
38
38
|
|
|
39
39
|
## Artifact contract
|
|
40
40
|
|
|
41
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
42
|
-
- **Owned outputs:** changed/added test paths (and any QA notes written under the slug dir); upsert only the manifest
|
|
41
|
+
- **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, reviewer notes when present, and prior implementation/validation artifacts.
|
|
42
|
+
- **Owned outputs:** changed/added test paths (and any QA notes written under the slug dir); upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `qa-tester`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
43
43
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
44
44
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
45
45
|
|
|
@@ -51,8 +51,8 @@ PASS | PASS_WITH_NOTES | FAIL
|
|
|
51
51
|
|
|
52
52
|
## Artifact contract
|
|
53
53
|
|
|
54
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
55
|
-
- **Owned outputs:** `security-review.md`; upsert only the manifest
|
|
54
|
+
- **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, prior `review.md` when present, and the scoped git diff.
|
|
55
|
+
- **Owned outputs:** `security-review.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `security-review`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
56
56
|
- **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.
|
|
57
57
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
58
58
|
|
|
@@ -61,8 +61,8 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
|
|
|
61
61
|
|
|
62
62
|
## Artifact contract
|
|
63
63
|
|
|
64
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
65
|
-
- **Owned outputs:** `architecture.md`; upsert only the manifest
|
|
64
|
+
- **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 and applicable prior analysis artifacts.
|
|
65
|
+
- **Owned outputs:** `architecture.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `architecture`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
66
66
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
67
67
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
68
68
|
|
|
@@ -168,6 +168,6 @@ If the prompt/brief has a tracker URL (Linear/Jira/Notion/…) and that MCP is r
|
|
|
168
168
|
## Artifact contract
|
|
169
169
|
|
|
170
170
|
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
|
|
171
|
-
- **Owned outputs:** `brief.md` and `decomposition.md` (plus `ux-design.md` when produced); upsert only the manifest
|
|
171
|
+
- **Owned outputs:** `brief.md` and `decomposition.md` (plus `ux-design.md` when produced); upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
172
172
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
173
173
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -180,6 +180,6 @@ Return the routing receipt to the orchestrator. The orchestration runtime/hook e
|
|
|
180
180
|
## Artifact contract
|
|
181
181
|
|
|
182
182
|
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume the user request and any existing authoritative task/decision entries.
|
|
183
|
-
- **Owned outputs:** `pipeline.json` and the routing manifest
|
|
183
|
+
- **Owned outputs:** `pipeline.json` and the routing entry in `manifest.artifacts[]`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `routing`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
184
184
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
185
185
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -54,8 +54,8 @@ Post-delivery: when behavior or public docs changed and `docs/specs/` is in play
|
|
|
54
54
|
|
|
55
55
|
## Artifact contract
|
|
56
56
|
|
|
57
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
58
|
-
- **Owned outputs:** `documentation.md` (and any explicitly requested docs paths); upsert only the manifest
|
|
57
|
+
- **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 and available architecture/migration/review artifacts.
|
|
58
|
+
- **Owned outputs:** `documentation.md` (and any explicitly requested docs paths); upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `documentation`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
59
59
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
60
60
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
61
61
|
|
|
@@ -28,8 +28,8 @@ Run affected unit tests from `app/` when feasible. Report files changed, command
|
|
|
28
28
|
|
|
29
29
|
## Artifact contract
|
|
30
30
|
|
|
31
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
32
|
-
- **Owned outputs:** generated/updated `*.spec.ts` / `*.spec.tsx` paths; upsert only the manifest
|
|
31
|
+
- **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 `unit-test-plan.md`, brief/decomposition when present, and target modules.
|
|
32
|
+
- **Owned outputs:** generated/updated `*.spec.ts` / `*.spec.tsx` paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `unit-test-generator`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
33
33
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
34
34
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
35
35
|
|
|
@@ -29,8 +29,8 @@ Report root cause, files changed, validation result, and remaining risk.
|
|
|
29
29
|
|
|
30
30
|
## Artifact contract
|
|
31
31
|
|
|
32
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
33
|
-
- **Owned outputs:** healed `*.spec.ts` / `*.spec.tsx` paths (and minimal production fixes only when evidenced); upsert only the manifest
|
|
32
|
+
- **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 failing test evidence, `unit-test-plan.md` when present, and recent diff.
|
|
33
|
+
- **Owned outputs:** healed `*.spec.ts` / `*.spec.tsx` paths (and minimal production fixes only when evidenced); upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `unit-test-healer`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
34
34
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
35
35
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
36
36
|
|
|
@@ -49,8 +49,8 @@ Test titles in the plan must follow Russian capitalization rules from `tests-uni
|
|
|
49
49
|
|
|
50
50
|
## Artifact contract
|
|
51
51
|
|
|
52
|
-
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest
|
|
53
|
-
- **Owned outputs:** `unit-test-plan.md`; upsert only the manifest
|
|
52
|
+
- **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 and target modules under `app/src/**`.
|
|
53
|
+
- **Owned outputs:** `unit-test-plan.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `unit-test-planner`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
54
54
|
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
55
55
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
56
56
|
|
|
@@ -119,7 +119,21 @@ function mutateMetrics(mutator) {
|
|
|
119
119
|
try { metrics = JSON.parse(fs.readFileSync(METRICS_PATH, 'utf8')); } catch {
|
|
120
120
|
const runId = status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
121
121
|
status.metricsRunId = runId;
|
|
122
|
-
|
|
122
|
+
// Resolve profile from pipeline.json (preferred) or status.json, falling back to 'unknown'.
|
|
123
|
+
// The router/agent must never write profile into status.json — pipeline.json is the SoT.
|
|
124
|
+
let profile = 'unknown';
|
|
125
|
+
try {
|
|
126
|
+
if (fs.existsSync(pipelinePath)) {
|
|
127
|
+
const pipe = JSON.parse(fs.readFileSync(pipelinePath, 'utf8'));
|
|
128
|
+
if (pipe && (pipe.profile === 'light' || pipe.profile === 'standard' || pipe.profile === 'full')) {
|
|
129
|
+
profile = pipe.profile;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
} catch {}
|
|
133
|
+
if (profile === 'unknown' && (status.profile === 'light' || status.profile === 'standard' || status.profile === 'full')) {
|
|
134
|
+
profile = status.profile;
|
|
135
|
+
}
|
|
136
|
+
metrics = { schemaVersion: 1, task: { runId, slug, preset: 'ai-rules', stack: STACK, platform: PLATFORM, intent: status.intent || 'unknown', profile }, events: [] };
|
|
123
137
|
metrics.events.push({ eventId: `${runId}:task_started`, type: 'task_started', at: now, source: 'hook', attributionConfidence: 'high' });
|
|
124
138
|
}
|
|
125
139
|
mutator(metrics);
|
|
@@ -205,9 +219,33 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
205
219
|
if (!fs.existsSync(manifestPath)) return { outcome: null, receiptRequired: false };
|
|
206
220
|
try {
|
|
207
221
|
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
222
|
+
// Guard: the schema key is `artifacts` (see agent-artifact-contracts.md). A top-level
|
|
223
|
+
// `entries` key is a silent bug — producer wrote to a wrong field, hook would not
|
|
224
|
+
// see the receipt, and the step hangs in `awaiting_artifact_receipt`. Warn loudly.
|
|
225
|
+
if (manifest && typeof manifest === 'object' && !Array.isArray(manifest.artifacts) && Array.isArray(manifest.entries)) {
|
|
226
|
+
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');
|
|
227
|
+
} else if (manifest && typeof manifest === 'object' && Array.isArray(manifest.entries) && Array.isArray(manifest.artifacts)) {
|
|
228
|
+
process.stderr.write(`WARNING: ${manifestPath} has both "artifacts" and "entries" keys; reading only "artifacts" per schema. Foreign "entries" content is ignored.` + '\n');
|
|
229
|
+
}
|
|
208
230
|
const artifacts = Array.isArray(manifest.artifacts) ? manifest.artifacts : [];
|
|
209
231
|
const expectedOutputId = artifactOutputIdFor(step, agent);
|
|
210
232
|
const attemptStartedAt = Date.parse(resolved.entry.startedAt);
|
|
233
|
+
// Pre-scan: warn on the silent-bug classes the filter below would otherwise drop.
|
|
234
|
+
// A receipt with a non-matching attemptId is dropped silently; without this warning,
|
|
235
|
+
// the step hangs in `awaiting_artifact_receipt` with no signal of why. Same for
|
|
236
|
+
// receipts whose terminal timestamp is older than the active attempt (stale retry).
|
|
237
|
+
const activeIds = new Set(Object.keys(status.activeAttempts || {}));
|
|
238
|
+
for (const entry of artifacts) {
|
|
239
|
+
if (!entry || entry.producer !== agent || !entry.receipt || typeof entry.receipt.outcome !== 'string') continue;
|
|
240
|
+
const rid = entry.receipt.attemptId;
|
|
241
|
+
if (typeof rid === 'string' && rid !== resolved.attemptId && !activeIds.has(rid)) {
|
|
242
|
+
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');
|
|
243
|
+
}
|
|
244
|
+
const terminalAt = Date.parse(entry.timestamps?.completedAt || entry.timestamps?.updatedAt || '');
|
|
245
|
+
if (Number.isFinite(attemptStartedAt) && Number.isFinite(terminalAt) && terminalAt < attemptStartedAt) {
|
|
246
|
+
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');
|
|
247
|
+
}
|
|
248
|
+
}
|
|
211
249
|
const owned = artifacts
|
|
212
250
|
.filter((entry) => {
|
|
213
251
|
if (!entry || entry.producer !== agent || !entry.receipt || typeof entry.receipt.outcome !== 'string') return false;
|
|
@@ -222,6 +260,13 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
222
260
|
const tb = Date.parse(b.timestamps?.completedAt || b.timestamps?.updatedAt || 0) || 0;
|
|
223
261
|
return tb - ta;
|
|
224
262
|
});
|
|
263
|
+
// Bonus: warn if the active attempt's receipts all lack attemptId in a non-parallel step.
|
|
264
|
+
// The orchestrator always provides attemptId, so a missing one means the agent dropped it
|
|
265
|
+
// (model output, JSON.stringify omission, etc.). boundByOutput still binds the receipt by
|
|
266
|
+
// expectedOutputId, so this is not fatal — but it is a contract violation worth flagging.
|
|
267
|
+
if (owned.length > 0 && owned[0].receipt.attemptId == null && !(step && step.parallel && Array.isArray(getStepAgents(step)) && getStepAgents(step).length > 1)) {
|
|
268
|
+
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');
|
|
269
|
+
}
|
|
225
270
|
return { outcome: owned[0]?.receipt?.outcome || null, receiptRequired: true };
|
|
226
271
|
} catch {
|
|
227
272
|
return { outcome: null, receiptRequired: false };
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
- **`alwaysApply: true`** (Cursor) / **without `paths:`** (Claude) — base invariants (Cursor/Claude 3–5):
|
|
13
13
|
- Cursor: `next-app-core`, `package-manager`, `code-quality-and-refactoring`, `ai-local-overlay`
|
|
14
14
|
- Claude: `next-app-core`, `package-manager`, `code-quality`
|
|
15
|
-
- **On-demand / requestable** — `post-change-lint` (**required after code edits**, not always-on), `agent-team-intake` (via orchestrator/commands), `agent-team-orchestrator`, architecture, imports, UI, tests, feature-delivery-workflow, `design-guidance`, `mcp-usage`, `anti-sycophancy-discipline`, `react-next-anti-hallucination`, reference-features, product-specs, product-specs-authoring, next-app-router, `security-next`, react-a11y-coding, `technical-retro`, `mockup-review`, `ux-design`
|
|
15
|
+
- **On-demand / requestable** — `post-change-lint` (**required after code edits**, not always-on), `agent-team-intake` (via orchestrator/commands), `agent-team-orchestrator`, architecture, imports, UI, tests, feature-delivery-workflow, `design-guidance`, `mcp-usage`, `anti-sycophancy-discipline`, `react-next-anti-hallucination`, reference-features, product-specs, product-specs-authoring, next-app-router, `security-next`, react-a11y-coding, `technical-retro`, `mockup-review`, `ux-design`, `design-tokens-binding`
|
|
16
16
|
- **Preset author meta** (globs `packages/ai-rules/presets/**`, never alwaysApply): `preset-layering`, `preset-twin-sync`, `preset-token-budget`, `preset-pr-checklist`, `preset-no-cross-stack-leakage`
|
|
17
17
|
- **Skills** — long procedures (`feature-delivery`, `spec-authoring`, `spec-discovery`, `code-review`, …)
|
|
18
18
|
|
|
@@ -54,6 +54,7 @@ When editing `app/src/ui/**/*.tsx`, a **reduced** set loads (not all of `app/src
|
|
|
54
54
|
| `navigation-router-ui.mdc` | `app/src/ui/**/*.tsx` | Brief navigation guide |
|
|
55
55
|
| `no-props-spread.mdc` | `app/src/**/*.tsx` | Explicit props |
|
|
56
56
|
| `arrow-functions.mdc` | `app/src/**` | Syntax |
|
|
57
|
+
| `design-tokens-binding.mdc` | `app/src/ui/**/*.{ts,tsx,css}`, `app/src/styles/**` | Figma → repo token binding (typography/color/spacing/imagery); no raw values where a token exists |
|
|
57
58
|
|
|
58
59
|
**Not loaded on typical UI edit:** `architecture-boundaries` (api/store/types/lib), `layer-barrel-exports` (only `index.ts`), `navigation-router-stack` (only `app/src/app/**`). Colocated styles — in `react-ui.mdc` (deprecated stub `no-cross-component-styles-import` removed).
|
|
59
60
|
|
|
@@ -94,6 +95,7 @@ Fill **`reference-features.mdc`** (TBD → real paths) after `init` in the targe
|
|
|
94
95
|
| `tests-unit.mdc` | Unit tests and HTTP client behavior tests |
|
|
95
96
|
| `playwright-agents.mdc`, `tests-e2e-structure.mdc` | E2E |
|
|
96
97
|
| `react-ui.mdc` | React/Next UI: component structure, adjacent `ComponentName.data.ts` / `.utils.ts`, styles, props |
|
|
98
|
+
| `design-tokens-binding.mdc` | Figma → repo token binding (typography/color/spacing/imagery); per-element parity + self-check discipline; referenced by `feature-developer` and `code-reviewer` |
|
|
97
99
|
|
|
98
100
|
**Wording collisions:** type and API imports — source of truth **`public-imports.mdc`**; duplicates ESLint `no-restricted-imports` in `app/eslint.config.mjs`.
|
|
99
101
|
|
|
@@ -95,7 +95,7 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Sc
|
|
|
95
95
|
|
|
96
96
|
- 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.
|
|
97
97
|
- Markdown remains detailed evidence; the manifest records producer, status, authoritative paths, timestamps, outcome, and evidence paths.
|
|
98
|
-
- Agents upsert only
|
|
98
|
+
- Agents upsert only the items in `manifest.artifacts[]` they own and preserve foreign items. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges.
|
|
99
99
|
- 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.
|
|
100
100
|
- Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
|
|
101
101
|
|
|
@@ -133,6 +133,8 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
133
133
|
| `awaiting_approval` | Human gate; wait for `/task-continue` |
|
|
134
134
|
| `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
|
|
135
135
|
| `validation_failed` | build-verifier failed; re-run developer then build-verifier |
|
|
136
|
+
| `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) |
|
|
137
|
+
| `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. |
|
|
136
138
|
|
|
137
139
|
## Pipeline step options
|
|
138
140
|
|
|
@@ -56,3 +56,13 @@ On-demand rule for review flows. **Procedure and output format:** skill `code-re
|
|
|
56
56
|
- Security: `security-next.mdc`
|
|
57
57
|
- Tests: `tests-unit.mdc`, `playwright-agents.mdc`, `tests-e2e-structure.mdc`
|
|
58
58
|
- Lint gate before final report: `post-change-lint.mdc`
|
|
59
|
+
|
|
60
|
+
### UI / Figma parity (web)
|
|
61
|
+
|
|
62
|
+
When the diff touches UI / layout / styling (paths under `app/src/ui/**`, global layout/CSS/tokens) AND a Figma mockup is referenced in `brief.md` / `decomposition.md` (URL, fileKey, or node id) **or** `mockup-review.md` is present:
|
|
63
|
+
|
|
64
|
+
- The `code-reviewer` agent must perform a **detailed, pixel-accurate** comparison of the implementation against the mockup, **across every viewport the project uses** (the `mockup-review` AC-8 / Stack notes set — web buckets ~375 / ~768 / ~1280 small/medium/large — and the Storybook viewport toolbar in this repo). Figma frames via Figma MCP `get_screenshot`; the running app via Playwright MCP / Chrome DevTools MCP at the matching width.
|
|
65
|
+
- The comparison is a **per-element parity check** (typography / color / spacing / imagery / states / structure / auto-layout intent) per the `code-reviewer` UI / Figma parity gate. Bind to the `mockup-review.md` `## Design contract` and the **`design-tokens-binding.mdc`** discipline (`@sds/tokens-*` / DS components, no raw `#…` / `px` where a token exists).
|
|
66
|
+
- Findings: `path:line` + Figma node id + viewport + severity. Emit a `## Figma parity (UI)` section in `review.md`.
|
|
67
|
+
- **Storybook visual baselines are not a substitute.** Approving a UI MR on Storybook baselines alone is not acceptable when a Figma reference exists.
|
|
68
|
+
- 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.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Bind UI to Figma design tokens — typography, color, spacing, imagery. No raw design values when a token exists.
|
|
3
|
+
globs: app/src/ui/**/*.{ts,tsx,css},app/src/styles/**/*.{css,ts,tsx}
|
|
4
|
+
impact: HIGH
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Design-token binding (Figma → repo)
|
|
8
|
+
|
|
9
|
+
The implementation must mirror the Figma mockup token-for-token. Raw design values where a token exists are a finding. This rule is the web-stack discipline; the reporter (`mockup-reviewer`) emits the bindings, the implementer (`feature-developer`) binds, the reviewer (`code-reviewer`) blocks on unbound raw values.
|
|
10
|
+
|
|
11
|
+
## Typography
|
|
12
|
+
|
|
13
|
+
- Bind to the Figma **text style** used by the node — extract via Figma MCP `get_design_context` / `get_variable_defs` and the node metadata. Do not invent `font-size: 14px; line-height: 20px;` when a Figma text style exists.
|
|
14
|
+
- Repo mapping: font family, size, line-height, weight, letter-spacing → `@sds/tokens-typography` (or the project token module). In Linaria / styled: `font: var(--font-body-m, …)` / equivalent token.
|
|
15
|
+
- Prefer a typography variant / DS text component that already binds the token (e.g. `Text variant="body-m"`) over a styled wrapper with raw values.
|
|
16
|
+
|
|
17
|
+
## Color
|
|
18
|
+
|
|
19
|
+
- Bind to the Figma **fill / stroke variable** (`get_variable_defs`). Do not write raw `#…` or `rgb(…)`.
|
|
20
|
+
- Repo mapping: `@sds/tokens-colors`, `@sds/brand-colors`, or the project token module (`color: var(--text-primary, …)`).
|
|
21
|
+
- A raw value is allowed only with an inline `// token-pending: <Figma-variable-name>` comment and a follow-up to bind it. The reviewer treats unbound raw values as a finding.
|
|
22
|
+
|
|
23
|
+
## Spacing / radius / shadow
|
|
24
|
+
|
|
25
|
+
- Bind to Figma **spacing / radius / effect variables** or the repo spacing scale. Do not write raw `padding: 16px; gap: 12px;` if a token exists.
|
|
26
|
+
- Repo mapping: spacing tokens from `@sds/tokens` / the project scale; Linaria `css\`…\`` uses `var(--space-…, …)`.
|
|
27
|
+
- **Auto-layout intent:** respect Figma auto-layout (direction, gap, padding, alignment). Switching to absolute positioning for a region that is the only responsive evidence is a finding. `display: flex` with the same gap/padding is the safe mirror; do not reflow to a different layout without a reason in the brief.
|
|
28
|
+
|
|
29
|
+
## Imagery & icons
|
|
30
|
+
|
|
31
|
+
- **Images:** use the Figma asset source from `get_design_context` / the node’s image fill. Repo: `next/image` (or repo convention) with `src`, `width`, `height` derived from Figma. Do not use a placeholder, do not invent a URL, do not change aspect ratio.
|
|
32
|
+
- **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.
|
|
33
|
+
- `alt` text from the Figma node name when meaningful; otherwise from the design context copy.
|
|
34
|
+
|
|
35
|
+
## Self-check before handoff
|
|
36
|
+
|
|
37
|
+
For UI WPs with a Figma reference: render the page at each project viewport (Playwright MCP / Chrome DevTools MCP) and compare to the Figma `get_screenshot`. Fix obvious typography / color / spacing / imagery deviations before the implementation receipt. Record a short **UI self-check vs Figma** block in `implementation.md` (viewports checked, deviations fixed, remaining gaps, MCP / app status). If the app is not runnable or MCP is down, note the limitation — the reviewer will gate.
|
|
38
|
+
|
|
39
|
+
## Reviewer contract
|
|
40
|
+
|
|
41
|
+
The `code-reviewer` UI / Figma parity gate enforces this. A UI-touching MR with a Figma reference and unbound raw values where tokens exist → `blocker` (user-visible) or `important` (latent). Missing self-check on a UI WP with a Figma reference → `important`.
|
|
@@ -15,6 +15,23 @@ When the prompt or `brief.md` contains a `figma.com` URL, **mockup review** (`mo
|
|
|
15
15
|
|
|
16
16
|
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**.
|
|
17
17
|
|
|
18
|
+
## Figma node-link — child→component decomposition (mandatory pre-implementation)
|
|
19
|
+
|
|
20
|
+
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`:
|
|
21
|
+
|
|
22
|
+
- `## 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 / `next/image` with Figma-derived `src/width/height`). This is the binding table the developer uses for typography, color, spacing, and imagery.
|
|
23
|
+
- `## Node decomposition (AC-2)` — the child→component map (with a `Bindings` column for the Figma design bindings).
|
|
24
|
+
|
|
25
|
+
`feature-developer` must **not** start UI implementation until both sections are present, and must load requestable `design-tokens-binding.mdc` 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.
|
|
26
|
+
|
|
27
|
+
## UI MR — Figma parity gate (mandatory in code review)
|
|
28
|
+
|
|
29
|
+
When the MR touches UI / layout / styling (`app/src/ui/**`, global layout/CSS/tokens) and a Figma reference exists in `brief.md` / `decomposition.md` or `mockup-review.md` is present, `code-reviewer` must perform a **detailed, pixel-accurate** comparison of the implementation against the mockup across **every project viewport** (mockup-review AC-8 / Stack notes set and the repo’s Storybook viewport toolbar). The comparison is a per-element parity check (typography / color / spacing / imagery / states / structure / auto-layout intent) bound to the `## Design contract` and the `design-tokens-binding.mdc` discipline. Findings go in `## Figma parity (UI)` in `review.md`. **Storybook visual baselines are not a substitute.** Missing or `unable_to_compare` parity on a UI MR with a Figma reference → `REQUEST_CHANGES`. The full gate lives in the `code-reviewer` agent prompt and the `code-review-mr` Stack notes.
|
|
30
|
+
|
|
31
|
+
## UI self-check vs Figma (mandatory in implementation)
|
|
32
|
+
|
|
33
|
+
For UI WPs with a Figma reference, `feature-developer` performs a **self-check vs Figma** at each project viewport (Playwright MCP / Chrome DevTools MCP) before the implementation receipt, fixes obvious typography / color / spacing / imagery / state deviations, and records a `## UI self-check vs Figma` block in `implementation.md`. This is the developer-side counterpart to the parity gate and closes the fidelity loop (extract contract → bind → self-check → review-block).
|
|
34
|
+
|
|
18
35
|
Typical feature with backend data and shared state. Layer details — `architecture-boundaries.mdc`, `next-app-core.mdc`.
|
|
19
36
|
|
|
20
37
|
## Checklist (work order)
|
|
@@ -114,3 +114,12 @@ PASS | PASS_WITH_NOTES | FAIL | BLOCKED_MCP
|
|
|
114
114
|
## Stack notes
|
|
115
115
|
|
|
116
116
|
Illustrative web buckets (not enforced pixels): ~375 / ~768 / ~1280 mapped to small / medium / large.
|
|
117
|
+
|
|
118
|
+
### Node-link input (AC-2) — child→component decomposition + Design contract (mandatory)
|
|
119
|
+
|
|
120
|
+
When the Figma URL contains a node id (`?node-id=…`), `mockup-reviewer` must:
|
|
121
|
+
|
|
122
|
+
1. Walk the node subtree via Figma MCP `get_metadata` and emit a **Node→component map** (each child node id/name/type → target `app/src/ui/**` component, attached library component (e.g. `@sds/*`), or `new: <ProposedName>`). The map goes in `mockup-review.md` under `## Node decomposition (AC-2)` as a table plus a short prose summary, with a `Bindings` column / per-row note for the Figma design bindings.
|
|
123
|
+
2. Extract the **Design contract** (above the Node decomposition table): Figma variables used by the subtree (color, spacing, radius, effect — one `get_variable_defs` call per file), text styles used, and components / assets (library instances, image fills via `get_design_context`, icons). Each item mapped to the repo equivalent: `@sds/tokens-colors` / `@sds/brand-colors` / `@sds/tokens-typography` / `@sds/tokens` / DS component (`@sds/icon` symbol name, `Text variant="…"`) / `next/image` with Figma-derived `src/width/height`.
|
|
124
|
+
|
|
125
|
+
Both sections are the **pre-implementation contract** the developer reads before coding; the DS/tokens/quality/coverage/viewport dimensions still apply on top. Verdict: missing map **or** missing Design contract on a node-link input → `FAIL` (unless `BLOCKED_MCP`). The developer (`feature-developer`) must not start UI work until both sections are present, and must bind implementation to the Design contract (see `design-tokens-binding.mdc`).
|
|
@@ -97,6 +97,7 @@ For a reusable component:
|
|
|
97
97
|
- **Forbidden** to import another component's `styles` (`../Other/styles`, `../../styles`). Allowed: `./styles`, shared primitives from `@/ui/components/...` or design-system packages.
|
|
98
98
|
- CSS / `styled` order — Stylelint idiomatic-order: `css-property-order-stylelint.mdc` (loads on `styles.ts` / `.css`).
|
|
99
99
|
- For visuals use **the style stack and tokens already in the project** (variables, theme, shared classes, design package).
|
|
100
|
+
- **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`, `next/image`). 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 **`design-tokens-binding.mdc`**. When a Figma reference exists, the `mockup-review.md` `## Design contract` section is the binding table; use it.
|
|
100
101
|
- Avoid:
|
|
101
102
|
- inline styles except simple cases;
|
|
102
103
|
- duplicating styling already covered by shared primitives;
|
|
@@ -20,6 +20,7 @@ Use the local repository as the source of truth: `git status`, `git diff`, task
|
|
|
20
20
|
7. **Reuse lens:** flag new helpers that duplicate existing utilities; prefer adjacent shared modules over copy-paste.
|
|
21
21
|
8. **Efficiency lens:** unnecessary work, sequential ops that should be parallel, hot-path bloat, no-op store updates, overly broad reads.
|
|
22
22
|
9. Report validation gaps: lint, stylelint, type-check, or relevant tests not run.
|
|
23
|
+
10. **UI / Figma parity (when the diff touches UI/layout AND a Figma reference exists):** perform a detailed, pixel-accurate comparison of the implementation against the mockup across **every project viewport** (mockup-review AC-8 / Stack notes set and the repo’s Storybook viewport toolbar). Figma frames via Figma MCP `get_screenshot`; the running app via Playwright MCP / Chrome DevTools MCP at the matching width. Compare **per element** — typography, color, spacing, imagery, states, structure/responsive, auto-layout intent — bound to the `mockup-review.md` `## Design contract` and the `design-tokens-binding` discipline (`@sds/tokens-*` / DS components; raw `#…` / `px` where a token exists is a finding). Emit a `## Figma parity (UI)` section in `review.md`. **Storybook visual baselines are not a substitute.** Missing or `unable_to_compare` parity on a UI MR with a Figma reference → `REQUEST_CHANGES`. Unbound raw values → `blocker` / `important`.
|
|
23
24
|
|
|
24
25
|
## Output
|
|
25
26
|
|