Test
Validate the "$ARGUMENTS" prototype against the component contract and WCAG accessibility criteria.
Prerequisites
Read .metapowers/design/$ARGUMENTS/04-prototype.md. If this file does not exist, tell the user:
Phase 4 (Prototype) has not been completed for "$ARGUMENTS". Run
/design:prototype $ARGUMENTSfirst, or use--skip-checksto bypass.
If --skip-checks is present in $ARGUMENTS, skip this check and log to .metapowers/design/$ARGUMENTS/skip-log.md.
Process
Read context files:
- Read
.metapowers/design/$ARGUMENTS/02-define.mdfor the component contract - Read
.metapowers/design/$ARGUMENTS/04-prototype.mdfor prototype notes and component node ID - Read
plugins/design/shared/wcag-criteria.mdfor accessibility criteria
- Read
Run accessibility checks via MCP tools:
- Call
figma_a11y_lintwith the component's node ID to check text size, touch targets, image alt text - Call
figma_a11y_scorecardwith the component's node ID for an overall scorecard - Call
figma_a11y_focus_orderwith the component's node ID to validate tab order
- Call
Check color contrast:
- Call
figma_a11y_contrast_checkfor each foreground/background color pair used in the component - Call
figma_a11y_color_blind_simfor primary color pairs across protanopia, deuteranopia, tritanopia
- Call
Verify contract compliance. For each requirement in the component contract:
- Props: Are all specified props represented in the component?
- Variants: Does the component have all variant combinations?
- States: Are all states (hover, focus, active, disabled, error, loading) represented?
- Tokens: Are all visual values using design system tokens?
Generate the test report with:
- Contract compliance checklist (pass/fail per requirement)
- WCAG validation results (from lint and contrast checks)
- Color blindness simulation results
- Issues found with remediation suggestions
- Overall pass/fail status
Write the artifact to
.metapowers/design/$ARGUMENTS/05-test.md
Output
The test report written to .metapowers/design/$ARGUMENTS/05-test.md. Present to the user:
- Overall pass/fail status
- Number of issues found by category (contract, WCAG, color blindness)
- Critical issues requiring immediate attention
- Remediation suggestions for failed checks