Skill v1.0.0
currentAutomated scan100/100version: "1.0.0" name: spec-compliance-review description: | This skill should be used after Codex implements a UI change and before visual acceptance review. It audits source code against project-specific visual specs, design tokens, component tree, design-system rules, OpenSpec implementation strategy, UI type, layout paradigm, and asset strategy. It reports violations without redesigning or modifying code. argument-hint: "[source-code-directory]"
Version: 2.0.0
spec-compliance-review
Audit implemented frontend code against the approved visual contract and design system.
This skill verifies that implementation code complies with:
03_visual_spec/04_visual_spec_review/05_design_system/- OpenSpec
design.mdandtasks.md - source / strictness rules
- UI Type, Layout Paradigm, and Asset Strategy
It does not modify code and does not perform screenshot-based visual acceptance.
Trigger Conditions
Use this skill when:
- Codex has produced or modified frontend implementation
- implementation is ready for code-level review
- visual acceptance has not yet started
- the user asks to check whether implementation complies with visual specs
- the user asks to review UI implementation against tokens, component tree, or design system
Required Inputs
Read implementation code:
src/app/components/styles/package.jsontailwind.config.*vite.config.*next.config.*playwright.config.*
Actual project paths may vary.
Read UI workflow files:
ui/03_visual_spec/visual-analysis.mdlayout-spec.mdcomponent-tree.mdDESIGN.mdtokens.jsonimplementation-risks.mdhuman-review-needed.mdui/04_visual_spec_review/spec-review-report.mdconflict-log.mdrevised-files-needed.mdui/05_design_system/MASTER.mdpages/target-page.mdux-checklist.mdcomponent-state-spec.mdresponsive-spec.mdaccessibility-spec.mdimplementation-constraints.md
Recommended OpenSpec files:
proposal.mdspec.mddesign.mdtasks.mdchange-summary.md
Preflight
If ui/04_visual_spec_review/spec-review-report.md says Fail, stop and output a blocked compliance report.
Do not audit implementation against failed visual specs.
Source of Truth
- PRD / OpenSpec
spec.md reference.pngvisual-analysis.md / UI Type Classificationlayout-spec.md / Layout Paradigmimplementation-risks.md / Asset Strategycomponent-tree.mdtokens.json05_design_system/- OpenSpec
design.mdandtasks.md - Implementation code
Main Workflow
- Run preflight.
- Read UI Type, Layout Paradigm, Asset Strategy, Rejected Assumptions, Forbidden Layouts, and Prohibited Components.
- Scan implementation files for token usage.
- Compare component structure against component-tree.md.
- Check UI Type / Layout Paradigm / Asset Strategy preservation.
- Check design-system states.
- Check responsive behavior from code and config.
- Check accessibility implementation.
- Check OpenSpec design/tasks compliance.
- Produce reports under
06_spec_review/.
Hard Rules
- Do not modify code.
- Do not modify visual spec files.
- Do not modify design system files.
- Do not modify OpenSpec files.
- Do not perform screenshot visual acceptance.
- Do not treat passing tests as sufficient.
- Do not treat internal spec consistency as sufficient.
- Do not override source / strictness labels.
- Do not let generic web guidelines override project-specific visual contract.
- If implementation changes UI Type, Layout Paradigm, or Asset Strategy, mark as error.
- If implementation adds Prohibited Components or Forbidden Layouts, mark as error.
Output
Write:
06_spec_review/compliance-report.mdviolation-list.jsonsource-traceability-report.mdforbidden-regression-report.mdrecommended-fixes.md
Supporting Files
Read these references directly:
references/compliance-workflow.mdreferences/review-checklists.mdreferences/token-compliance-rules.mdreferences/ui-type-layout-asset-rules.mdreferences/component-state-responsive-a11y-rules.mdreferences/openspec-compliance-rules.mdreferences/violation-schema.mdreferences/severity-rules.mdreferences/external-quality-gates.mdreferences/output-files.md
Examples:
examples/compliance-report.example.mdexamples/violation-list.example.jsonexamples/source-traceability-report.example.mdexamples/forbidden-regression-report.example.mdexamples/recommended-fixes.example.md