diff --git a/.claude/commands/archon/archon-ui-consistency-review.md b/.claude/commands/archon/archon-ui-consistency-review.md new file mode 100644 index 00000000..181afde5 --- /dev/null +++ b/.claude/commands/archon/archon-ui-consistency-review.md @@ -0,0 +1,314 @@ +--- +description: Analyze UI components for reusability, Radix usage, primitives, and styling consistency +argument-hint: +allowed-tools: Read, Grep, Glob, Write +thinking: auto +--- + +# UI Consistency Review for Archon + +**Review scope**: $ARGUMENTS + +I'll analyze the UI components and generate a detailed report on consistency, reusability, and adherence to the Archon design system. + +## Analysis Framework + +### Design System Standards + +**Archon uses:** +- **Primitives**: `/src/features/ui/primitives/` - Reusable Radix components with glassmorphism styling +- **Card Variants**: + - Base glass card + - Edge-lit cards: `` + - Outer glow cards + - Inner glow cards +- **Navigation**: PillNavigation component for all pill-style navigation +- **Glassmorphism**: `backdrop-blur-sm` (minimal), frosted glass backgrounds +- **Colors**: Semantic colors (Primary blue #3b82f6, Success, Warning, Error) + accents + +### Scoring Criteria + +**1. Reusability (1-10)** +- 10: Uses shared primitives, no hardcoded styles +- 7-9: Mostly reusable, minor hardcoding +- 4-6: Mix of primitives and custom code +- 1-3: Completely custom, duplicates existing patterns + +**2. Radix Component Usage (1-10)** +- 10: Uses Radix primitives for ALL interactive elements (Select, Checkbox, Switch, Tabs, Dialog, etc.) +- 7-9: Mostly Radix, few native HTML elements +- 4-6: Mix of Radix and native elements +- 1-3: Primarily native HTML elements + +**3. Primitives Usage (1-10)** +- 10: Uses Card, Button, Input primitives with proper props +- 7-9: Uses most primitives, some custom styling +- 4-6: Mix of primitives and manual styling +- 1-3: Hardcoded styling, doesn't use primitives + +**4. Styling Consistency (1-10)** +- 10: Matches design system exactly (colors, blur, edge-lit patterns) +- 7-9: Close match, minor deviations +- 4-6: Significant inconsistencies +- 1-3: Completely different styling approach + +## Review Process + +### Step 1: Identify Components + +Scan the provided path for: +- React components (`.tsx` files) +- Component usage patterns +- Imports from primitives vs manual styling + +### Step 2: Analyze Each Component + +For each component, check: + +**Primitives Usage:** +```tsx +// GOOD - Uses Card primitive with props +... + +// BAD - Hardcoded edge glow +
+
+
+ ... +
+``` + +**Radix Usage:** +```tsx +// GOOD - Radix Select primitive +import { Select, SelectTrigger, SelectContent, SelectItem } from '@/features/ui/primitives/select'; + +// BAD - Native HTML + +``` + +**Reusable Patterns:** +```tsx +// GOOD - Shared PillNavigation component + + +// BAD - Custom hardcoded pill navigation +
+ {items.map(item =>
+``` + +### Step 3: Generate Scores + +Calculate scores for each component based on: +- Count of primitive vs hardcoded elements +- Radix usage vs native HTML +- Styling duplication vs reuse +- Pattern consistency + +### Step 4: Identify Issues + +Common anti-patterns to flag: + +**Hardcoded Edge-Lit Cards:** +```tsx +// BAD - Manual implementation (like KnowledgeCard currently) +
+
+
+
+ +// GOOD - Use Card primitive + +``` + +**Native HTML Form Elements:** +```tsx +// BAD +, + +// GOOD +\|