- 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.
3.7 KiB
prefix, inner_loop, message_types
| prefix | inner_loop | message_types | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| AUDIT | false |
|
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 |
- Extract session path from task description
- Detect audit type from subject: "token" -> Token audit, "component" -> Component audit, "final" -> Final audit, "sync" -> Sync point audit
- Read design intelligence for anti-patterns and ux_guidelines
- Read design artifacts: design-tokens.json (token/component audit), component-specs/.md (component/final audit), build/**/ (final audit only)
- 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
-
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
-
Update
<session>/wisdom/.msg/meta.jsonunderreviewernamespace:- Read existing -> merge
{ "reviewer": { audit_id, score, critical_count, signal, is_sync_point, audit_type, timestamp } }-> write back
- Read existing -> merge