Files
Claude-Code-Workflow/.codex/skills/team-uidesign/roles/reviewer/role.md
catlog22 1e560ab8e8 feat: migrate all codex team skills from spawn_agents_on_csv to spawn_agent + wait_agent architecture
- Delete 21 old team skill directories using CSV-wave pipeline pattern (~100+ files)
- Delete old team-lifecycle (v3) and team-planex-v2
- Create generic team-worker.toml and team-supervisor.toml (replacing tlv4-specific TOMLs)
- Convert 19 team skills from Claude Code format (Agent/SendMessage/TaskCreate)
  to Codex format (spawn_agent/wait_agent/tasks.json/request_user_input)
- Update team-lifecycle-v4 to use generic agent types (team_worker/team_supervisor)
- Convert all coordinator role files: dispatch.md, monitor.md, role.md
- Convert all worker role files: remove run_in_background, fix Bash syntax
- Convert all specs/pipelines.md references
- Final state: 20 team skills, 217 .md files, zero Claude Code API residuals

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 16:54:48 +08:00

3.7 KiB

role, prefix, inner_loop, message_types
role prefix inner_loop message_types
reviewer AUDIT false
state_update

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