From 9e4c7eaf4ee772e257ed629900cbdb8079c88c2b Mon Sep 17 00:00:00 2001 From: sean-eskerium Date: Thu, 9 Oct 2025 13:35:24 -0400 Subject: [PATCH] Updating documentation and the review command refinement. --- .../archon/archon-ui-consistency-review.md | 155 +++++++++++------- .gitignore | 1 + CLAUDE.md | 4 + CONTRIBUTING.md | 17 +- 4 files changed, 112 insertions(+), 65 deletions(-) diff --git a/.claude/commands/archon/archon-ui-consistency-review.md b/.claude/commands/archon/archon-ui-consistency-review.md index c5c2fcf5..e361be6c 100644 --- a/.claude/commands/archon/archon-ui-consistency-review.md +++ b/.claude/commands/archon/archon-ui-consistency-review.md @@ -13,15 +13,25 @@ I'll analyze the UI components and generate a detailed report on consistency, re ## Review Process -### Step 1: Load UI Standards +### Step 1: Load Archon Design System Standards -**CRITICAL: First, read the UI standards document:** +Read the following documentation for design system standards: +- `PRPs/ai_docs/UI_STANDARDS.md` - Complete UI design standards (Tailwind v4, Radix, responsive patterns) +- `CLAUDE.md` - General development standards and patterns +- `archon-ui-main/src/features/ui/primitives/` - Available primitive components +- Existing codebase patterns as reference -``` -/Users/sean/Software/Archon/Archon/PRPs/ai_docs/UI_STANDARDS.md -``` - -This document contains ALL rules, patterns, anti-patterns, and examples. Use it as the single source of truth for the review. +The UI_STANDARDS.md document contains: +- Section 0: Project-wide Conventions +- Section 1: Radix Primitives +- Section 2: Tailwind CSS (v4) - includes anti-patterns for dynamic classes +- Section 3: Responsive Layout - includes horizontal scroll patterns +- Section 4: Light/Dark Themes +- Section 5: Component Reusability & Shared Primitives +- Section 6: Tailwind Tokens +- Section 7: Pre-Flight Checklist +- Section 8: Automated Scanning Patterns +- Section 9: Quick Reference ### Step 2: Scan Components @@ -32,34 +42,43 @@ Scan the provided path for: ### Step 3: Compare Against Standards -For each component, compare against UI_STANDARDS.md: -- Check all rules from each section (0-7) -- Identify violations of anti-patterns -- Score based on adherence to standards -- Note missing patterns that should be used +For each component, check against Archon design standards: +- Radix primitive usage (vs native HTML) +- Tailwind class patterns (no dynamic class construction) +- Responsive layout patterns (mobile-first with breakpoints) +- Component reusability (primitives vs custom implementations) +- Dark mode support +- Glassmorphism styling consistency ### Step 4: Automated Scans Run automated pattern detection to find common violations: ```bash -# Scan for violations (grep patterns will be in UI_STANDARDS.md) -# Examples: dynamic class construction, unconstrained scroll, non-responsive grids, etc. -``` +# Dynamic Tailwind class construction (BREAKING) +grep -r "\`bg-\${.*}\|\`text-\${.*}\|\`border-\${.*}" [path] --include="*.tsx" -Use the patterns and anti-patterns documented in UI_STANDARDS.md to guide the automated scans. +# Unconstrained horizontal scroll (BREAKING) +grep -r "overflow-x-auto" [path] --include="*.tsx" | grep -v "w-full" + +# Non-responsive grids (BREAKING) +grep -r "grid-cols-[2-9]" [path] --include="*.tsx" | grep -v "md:\|lg:\|sm:\|xl:" + +# Native HTML form elements (should use Radix) +grep -r "` to automatically check your components for compliance + +3. **Testing Your Changes** ```bash # Using Make (if installed) make test-fe - + # Or manually cd archon-ui-main && npm run test @@ -381,11 +390,11 @@ Test these things using both the UI and the MCP server. This process will be sim npm run test:ui ``` -3. **Development Server** +4. **Development Server** ```bash # Using Make for hybrid mode (if installed) make dev # Backend in Docker, frontend local - + # Or manually for faster iteration cd archon-ui-main && npm run dev # Still connects to Docker backend services