Files
Claude-Code-Workflow/.claude/skills/team-uidesign/role-specs/reviewer.md
catlog22 26bda9c634 feat: Add coordinator commands and role specifications for UI design team
- Implemented the 'monitor' command for coordinator role to handle monitoring events, task completion, and pipeline management.
- Created role specifications for the coordinator, detailing responsibilities, command execution protocols, and session management.
- Added role specifications for the analyst, discussant, explorer, and synthesizer in the ultra-analyze skill, defining their context loading, analysis, and synthesis processes.
2026-03-03 23:35:41 +08:00

3.7 KiB

prefix, inner_loop, message_types
prefix inner_loop message_types
AUDIT false
success result fix error
audit_passed audit_result fix_required error

Design Auditor

Audit design tokens and component specs for consistency, accessibility compliance, completeness, quality, and industry best-practice adherence. Act as Critic in the designer<->reviewer Generator-Critic loop. Serve as sync point gatekeeper in dual-track pipelines.

Phase 2: Context & Artifact Loading

Input Source Required
Design artifacts /design/.json, /design/component-specs/.md Yes
Design intelligence /research/design-intelligence.json Yes
Audit history .msg/meta.json -> reviewer namespace No
Build artifacts /build/**/* Only for final audit
.msg/meta.json /wisdom/.msg/meta.json Yes
  1. Extract session path from task description
  2. Detect audit type from subject: "token" -> Token audit, "component" -> Component audit, "final" -> Final audit, "sync" -> Sync point audit
  3. Read design intelligence for anti-patterns and ux_guidelines
  4. Read design artifacts: design-tokens.json (token/component audit), component-specs/.md (component/final audit), build/**/ (final audit only)
  5. Load audit_history from meta.json for trend analysis

Phase 3: Audit Execution

Score 5 dimensions on 1-10 scale:

Dimension Weight Focus
Consistency 20% Token usage, naming conventions, visual uniformity
Accessibility 25% WCAG AA compliance, ARIA attributes, keyboard nav, contrast
Completeness 20% All states defined, responsive specs, edge cases
Quality 15% Token reference integrity, documentation clarity, maintainability
Industry Compliance 20% Anti-pattern avoidance, UX best practices, design intelligence adherence

Token Audit: Naming convention (kebab-case, semantic names), value patterns (consistent units), theme completeness (light+dark for all colors), contrast ratios (text on background >= 4.5:1), minimum font sizes (>= 12px), all categories present, W3C $type metadata, no duplicates.

Component Audit: Token references resolve, naming matches convention, ARIA roles defined, keyboard behavior specified, focus indicator defined, all 5 states present, responsive breakpoints specified, variants documented, clear descriptions.

Final Audit (cross-cutting): Token<->Component consistency (no hardcoded values), Code<->Design consistency (CSS variables match tokens, ARIA implemented as specified), cross-component consistency (spacing, color, interaction patterns).

Score calculation: overallScore = round(consistency*0.20 + accessibility*0.25 + completeness*0.20 + quality*0.15 + industryCompliance*0.20)

Signal determination:

Condition Signal
Score >= 8 AND critical_count === 0 audit_passed (GC CONVERGED)
Score >= 6 AND critical_count === 0 audit_result (GC REVISION NEEDED)
Score < 6 OR critical_count > 0 fix_required (CRITICAL FIX NEEDED)

Phase 4: Report & Output

  1. Write audit report to <session>/audit/audit-{NNN}.md:

    • Summary: overall score, signal, critical/high/medium counts
    • Sync Point Status (if applicable): PASSED/BLOCKED
    • Dimension Scores table (score/weight/weighted per dimension)
    • Critical/High/Medium issues with descriptions, locations, fix suggestions
    • GC Loop Status: signal, action required
    • Trend analysis (if audit_history exists): improving/stable/declining
  2. Update <session>/wisdom/.msg/meta.json under reviewer namespace:

    • Read existing -> merge { "reviewer": { audit_id, score, critical_count, signal, is_sync_point, audit_type, timestamp } } -> write back