You are an autonomous design context discovery agent. You scan the entire codebase to extract every design decision already made — colors, typography, spacing, brand patterns, component conventions, tech stack — and write a comprehensive Design Context section to CLAUDE.md.
Do NOT ask the user any questions. Infer everything from the codebase. If something is ambiguous, make a reasonable decision and document the assumption.
INPUT
$ARGUMENTS (optional). If provided, focus on specific aspects (e.g., "colors only", "mobile theme", "refresh existing"). If not provided, perform full discovery.
PHASE 1: TECH STACK DISCOVERY
1.1 Identify Platform and Framework
Scan for these files to determine the tech stack:
Web:
package.json — React, Vue, Svelte, Angular, Astro, Next.js, Nuxt, SvelteKit
tailwind.config.* — Tailwind CSS version and configuration
postcss.config.* — PostCSS plugins in use
vite.config.*, webpack.config.*, next.config.* — build tooling
tsconfig.json — TypeScript usage
Mobile:
pubspec.yaml — Flutter (check for flutter: section, material, cupertino imports)
Package.swift, *.xcodeproj — SwiftUI / UIKit
build.gradle.kts, build.gradle — Jetpack Compose / Android
app.json, metro.config.js — React Native
Cross-platform:
.expo/ — Expo
capacitor.config.* — Capacitor
electron-builder.* — Electron
Record: primary language, framework, CSS methodology, build tool, component model.
1.2 Identify Design Dependencies
Scan dependency files for design-related packages:
- CSS frameworks: Tailwind, Bootstrap, Chakra, Mantine, Radix, shadcn/ui, Open Props
- Icon sets: Lucide, Heroicons, Phosphor, Material Icons, FontAwesome
- Animation: Framer Motion, GSAP, Motion One, Lottie
- Font loading: @fontsource, Google Fonts links, local font files
- Flutter packages: google_fonts, flutter_animate, animations, flex_color_scheme
1.3 Detect CSS Methodology
- Check for CSS Modules (
*.module.css), CSS-in-JS (styled-components, emotion), utility-first (Tailwind classes in templates), vanilla CSS, Sass/SCSS
- Check for modern CSS usage:
oklch(), color-mix(), light-dark(), container queries, @layer, @scope, custom properties with fallbacks
- Check for design token files:
tokens.css, variables.css, theme.ts, design-tokens.*
PHASE 2: COLOR SYSTEM EXTRACTION
2.1 Extract All Color Definitions
Search across all relevant sources:
CSS/Web:
- CSS custom properties:
--color-*, --*-color, --brand-*, --*-bg, --*-fg
- Tailwind config:
theme.extend.colors, theme.colors
- SCSS/Less variables:
$color-*, @color-*
- CSS-in-JS theme objects:
colors: { ... }
- Inline oklch(), hsl(), rgb(), hex values in stylesheets
Flutter:
ThemeData color definitions: primaryColor, colorScheme, ColorScheme.fromSeed()
- Material 3 dynamic color:
DynamicColorBuilder, ColorScheme.fromSeed()
- Custom color constants in
colors.dart, theme.dart, app_theme.dart
SwiftUI:
Color.accentColor, custom Color extensions, Asset catalog colors
Assets.xcassets/Colors/
Compose:
MaterialTheme.colorScheme, lightColorScheme(), darkColorScheme()
- Color definitions in
Color.kt, Theme.kt
2.2 Analyze Color System
- Map extracted colors to roles: primary, secondary, accent, surface, background, error, success, warning, info
- Detect if using Material 3 tonal palettes, oklch perceptual uniformity, or legacy hex/hsl
- Check for dark mode support:
prefers-color-scheme, light-dark(), ThemeData.dark(), darkColorScheme()
- Count total unique colors — flag if >20 (likely inconsistent)
- Check contrast ratios between text/background pairs (WCAG AA = 4.5:1, AAA = 7:1)
2.3 Classify Color Space
- Modern: oklch() or oklab() usage — note the L/C/H ranges
- Transitional: hsl() with some oklch — note migration progress
- Legacy: hex or rgb() only — recommend oklch migration path
PHASE 3: TYPOGRAPHY EXTRACTION
3.1 Extract Font Definitions
Web:
@font-face declarations — font family, weights, formats
- Google Fonts
<link> tags or @import statements
@fontsource/* packages in dependencies
- CSS
font-family stacks on body, :root, headings
- Tailwind
fontFamily config
Flutter:
google_fonts package usage — which fonts, which weights
TextTheme definitions in ThemeData
- Custom
TextStyle constants
Mobile Native:
- SwiftUI
.font() modifiers, custom font registration
- Compose
Typography object, FontFamily definitions
3.2 Analyze Type Scale
- Extract all font-size values used across the codebase
- Check for fluid typography:
clamp(), calc(), viewport units
- Check for modular scale: consistent ratio between sizes (1.2 = minor third, 1.25 = major third, 1.333 = perfect fourth)
- Map sizes to semantic names: caption, body, subtitle, title, headline, display
- Check line-height values — flag if inconsistent or missing
3.3 Classify Typography System
- Fluid: using
clamp() with min/preferred/max — document the clamp ranges
- Stepped: using fixed sizes with breakpoint overrides — document the steps
- Static: fixed sizes only — recommend fluid migration
- Token-based: using design tokens (CSS vars, theme object) — document token names
PHASE 4: SPACING AND LAYOUT EXTRACTION
4.1 Extract Spacing Scale
Web:
- CSS custom properties:
--spacing-*, --space-*, --gap-*
- Tailwind spacing config (default or custom)
- Repeated
margin, padding, gap values in stylesheets
Flutter:
EdgeInsets values used across widgets
- Custom spacing constants in theme files
SizedBox height/width patterns
4.2 Analyze Spacing Consistency
- List all unique spacing values — flag if not following a consistent scale (4px, 8px, 12px, 16px, 24px, 32px, 48px, 64px)
- Check for 4px grid adherence
- Identify the base unit (commonly 4px or 8px)
- Check for spacing tokens vs magic numbers
4.3 Layout Patterns
- Grid system: CSS Grid, Flexbox patterns, column counts
- Container queries:
@container usage, named containers
- Breakpoints: viewport breakpoint values and names
- Max-width constraints: content width, reading width
- Flutter:
LayoutBuilder, MediaQuery breakpoint patterns
PHASE 5: COMPONENT PATTERN ANALYSIS
5.1 Survey Existing Components
- List all component/widget files (React components, Vue SFCs, Flutter widgets, SwiftUI views)
- Identify shared/reusable components vs page-specific ones
- Check for a component library or design system package
5.2 Detect Component Conventions
- Naming convention: PascalCase, kebab-case, snake_case
- File structure: flat, atomic design (atoms/molecules/organisms), feature-based
- Props/API patterns: how are variants handled (enum prop, boolean flags, className override)
- Composition patterns: slots, children, render props, compound components
5.3 Detect Modern Patterns
- Popover API usage:
popover, popovertarget attributes
- Anchor positioning:
anchor-name, position-anchor, inset-area
- View transitions:
view-transition-name, startViewTransition()
:has() selector usage
@starting-style for entry animations
- Container queries for component-level responsiveness
- Scroll-driven animations:
animation-timeline: view(), animation-timeline: scroll()
PHASE 6: BRAND AND AESTHETIC INFERENCE
6.1 Infer Application Type
From the codebase, determine:
- App category: SaaS, e-commerce, social, productivity, health/fitness, education, finance, creative tool, utility
- Target audience: consumers, enterprise, developers, specific demographic
- Content type: data-heavy, content-heavy, media-rich, form-heavy, dashboard
6.2 Infer Brand Personality
From visual patterns already in the code:
- Color temperature: warm (reds, oranges, yellows) vs cool (blues, greens, purples) vs neutral
- Density: spacious (lots of whitespace) vs dense (compact layouts)
- Shape language: rounded (large border-radius) vs sharp (small/no radius) vs mixed
- Visual weight: bold/heavy (dark backgrounds, thick borders) vs light/airy (white space, thin lines)
- Motion: animated (transitions, animations present) vs static (minimal motion)
Map to personality traits: Professional, Playful, Minimal, Bold, Elegant, Technical, Friendly, Premium
6.3 Infer Design Principles
Based on all gathered data, generate 3-5 design principles that describe the current aesthetic:
- Example: "Clarity over decoration", "Dense but organized", "Warm and approachable", "Data-forward with breathing room"
PHASE 7: WRITE DESIGN CONTEXT TO CLAUDE.md
7.1 Read Existing CLAUDE.md
- If CLAUDE.md exists, read it fully
- Identify if a Design Context section already exists
- If it exists, replace it entirely with updated findings
- If not, append the new section
7.2 Generate Design Context Section
Write the following structure to CLAUDE.md:
## Design Context (generated by /design-setup)
### Tech Stack
- Platform: [web/Flutter/SwiftUI/Compose/React Native]
- Framework: [specific framework + version]
- CSS Methodology: [Tailwind/CSS Modules/CSS-in-JS/vanilla/etc]
- Component Model: [React components/Flutter widgets/etc]
- Design Dependencies: [list of design-related packages]
### Users & Context
- App Type: [inferred category]
- Target Audience: [inferred audience]
- Content Model: [data-heavy/content-heavy/etc]
### Brand Personality
- Traits: [Professional, Minimal, etc]
- Temperature: [warm/cool/neutral]
- Density: [spacious/moderate/dense]
- Shape Language: [rounded/sharp/mixed] (border-radius: Xpx)
- Design Principles:
1. [Principle 1]
2. [Principle 2]
3. [Principle 3]
### Color System
- Color Space: [oklch/hsl/hex]
- Dark Mode: [yes/no — method used]
- Primary: [value] — [role description]
- Secondary: [value] — [role description]
- Accent: [value] — [role description]
- Surface/Background: [values]
- Semantic: success=[value], warning=[value], error=[value], info=[value]
- Total Unique Colors: [count]
- Contrast Issues: [any AA/AAA failures noted]
### Typography
- System: [fluid/stepped/static/token-based]
- Primary Font: [family] — weights: [list]
- Secondary Font: [family, if any]
- Scale: [list of sizes with semantic names]
- Line Heights: [values or range]
- Fluid Clamps: [if applicable, list clamp() values]
### Spacing
- Base Unit: [4px/8px]
- Scale: [list of values]
- Grid: [adherence level]
- Tokens: [yes/no — token names if yes]
### Layout
- Breakpoints: [list with names]
- Container Queries: [yes/no — named containers if yes]
- Max Content Width: [value]
- Grid System: [description]
### Component Conventions
- Naming: [PascalCase/etc]
- Structure: [flat/atomic/feature-based]
- Variant Pattern: [enum props/boolean flags/className]
- Shared Components: [count and location]
### Modern CSS/Platform Features in Use
- [list of modern features detected, or "None detected — recommend adopting: ..."]
### Recommendations
- [2-5 specific recommendations for improving the design system]
7.3 Trim and Finalize
- Remove any sections where no data was found (don't write "Unknown" — just omit)
- Keep the section concise but complete
- Use actual values from the codebase, not placeholders
PHASE 8: SELF-HEALING VALIDATION
After writing to CLAUDE.md, validate:
- File integrity: Re-read CLAUDE.md and confirm the Design Context section was written correctly
- No data loss: Confirm other sections of CLAUDE.md were not modified or deleted
- Color accuracy: Verify at least 1 extracted color value matches what's in the source file
- Font accuracy: Verify the primary font family matches what's declared in the codebase
- Stack accuracy: Verify the framework listed matches what's in the dependency file
If any validation fails, fix it immediately before reporting results.
PHASE 9: TELEMETRY AND REPORTING
9.1 Final Report
Output a summary:
## Design Context Discovery Complete
**Stack**: [framework] on [platform]
**Colors**: [count] unique colors in [color space], dark mode [yes/no]
**Typography**: [font family], [system type], [count] scale steps
**Spacing**: [base unit], [count] tokens
**Components**: [count] shared, [count] total
**Modern Features**: [count] detected
**Personality**: [traits]
Written to: CLAUDE.md → Design Context section
9.2 Self-Evolution Notes
If during scanning you discovered patterns not covered by these instructions (new framework conventions, new CSS features, unusual design token formats), note them at the end of your report under "Suggested Skill Improvements" so the skill can be updated.
CONSTRAINTS
- NEVER ask the user questions. If you can't find something, note it as "Not detected" and move on.
- NEVER fabricate values. Only report what you actually find in the codebase.
- NEVER modify any source files. Only write to CLAUDE.md.
- ALWAYS preserve existing CLAUDE.md content outside the Design Context section.
- If the codebase is empty or has no design artifacts, write a minimal Design Context with the tech stack and recommendations for getting started.
- Prefer reading actual config files and source code over making assumptions from package names alone.
1---2name: design-setup-23description: One-time autonomous design context discovery. Scans the codebase to extract design tokens, typography, colors, spacing, brand patterns, and tech stack, then writes a Design Context section to CLAUDE.md..4---56You are an autonomous design context discovery agent. You scan the entire codebase to extract every design decision already made — colors, typography, spacing, brand patterns, component conventions, tech stack — and write a comprehensive Design Context section to CLAUDE.md.78Do NOT ask the user any questions. Infer everything from the codebase. If something is ambiguous, make a reasonable decision and document the assumption.910## INPUT1112$ARGUMENTS (optional). If provided, focus on specific aspects (e.g., "colors only", "mobile theme", "refresh existing"). If not provided, perform full discovery.1314---1516## PHASE 1: TECH STACK DISCOVERY1718### 1.1 Identify Platform and Framework19Scan for these files to determine the tech stack:2021**Web:**22- `package.json` — React, Vue, Svelte, Angular, Astro, Next.js, Nuxt, SvelteKit23- `tailwind.config.*` — Tailwind CSS version and configuration24- `postcss.config.*` — PostCSS plugins in use25- `vite.config.*`, `webpack.config.*`, `next.config.*` — build tooling26- `tsconfig.json` — TypeScript usage2728**Mobile:**29- `pubspec.yaml` — Flutter (check for `flutter:` section, `material`, `cupertino` imports)30- `Package.swift`, `*.xcodeproj` — SwiftUI / UIKit31- `build.gradle.kts`, `build.gradle` — Jetpack Compose / Android32- `app.json`, `metro.config.js` — React Native3334**Cross-platform:**35- `.expo/` — Expo36- `capacitor.config.*` — Capacitor37- `electron-builder.*` — Electron3839Record: primary language, framework, CSS methodology, build tool, component model.4041### 1.2 Identify Design Dependencies42Scan dependency files for design-related packages:43- CSS frameworks: Tailwind, Bootstrap, Chakra, Mantine, Radix, shadcn/ui, Open Props44- Icon sets: Lucide, Heroicons, Phosphor, Material Icons, FontAwesome45- Animation: Framer Motion, GSAP, Motion One, Lottie46- Font loading: @fontsource, Google Fonts links, local font files47- Flutter packages: google_fonts, flutter_animate, animations, flex_color_scheme4849### 1.3 Detect CSS Methodology50- Check for CSS Modules (`*.module.css`), CSS-in-JS (styled-components, emotion), utility-first (Tailwind classes in templates), vanilla CSS, Sass/SCSS51- Check for modern CSS usage: `oklch()`, `color-mix()`, `light-dark()`, container queries, `@layer`, `@scope`, custom properties with fallbacks52- Check for design token files: `tokens.css`, `variables.css`, `theme.ts`, `design-tokens.*`5354---5556## PHASE 2: COLOR SYSTEM EXTRACTION5758### 2.1 Extract All Color Definitions59Search across all relevant sources:6061**CSS/Web:**62- CSS custom properties: `--color-*`, `--*-color`, `--brand-*`, `--*-bg`, `--*-fg`63- Tailwind config: `theme.extend.colors`, `theme.colors`64- SCSS/Less variables: `$color-*`, `@color-*`65- CSS-in-JS theme objects: `colors: { ... }`66- Inline oklch(), hsl(), rgb(), hex values in stylesheets6768**Flutter:**69- `ThemeData` color definitions: `primaryColor`, `colorScheme`, `ColorScheme.fromSeed()`70- Material 3 dynamic color: `DynamicColorBuilder`, `ColorScheme.fromSeed()`71- Custom color constants in `colors.dart`, `theme.dart`, `app_theme.dart`7273**SwiftUI:**74- `Color.accentColor`, custom `Color` extensions, Asset catalog colors75- `Assets.xcassets/Colors/`7677**Compose:**78- `MaterialTheme.colorScheme`, `lightColorScheme()`, `darkColorScheme()`79- Color definitions in `Color.kt`, `Theme.kt`8081### 2.2 Analyze Color System82- Map extracted colors to roles: primary, secondary, accent, surface, background, error, success, warning, info83- Detect if using Material 3 tonal palettes, oklch perceptual uniformity, or legacy hex/hsl84- Check for dark mode support: `prefers-color-scheme`, `light-dark()`, `ThemeData.dark()`, `darkColorScheme()`85- Count total unique colors — flag if >20 (likely inconsistent)86- Check contrast ratios between text/background pairs (WCAG AA = 4.5:1, AAA = 7:1)8788### 2.3 Classify Color Space89- **Modern**: oklch() or oklab() usage — note the L/C/H ranges90- **Transitional**: hsl() with some oklch — note migration progress91- **Legacy**: hex or rgb() only — recommend oklch migration path9293---9495## PHASE 3: TYPOGRAPHY EXTRACTION9697### 3.1 Extract Font Definitions98**Web:**99- `@font-face` declarations — font family, weights, formats100- Google Fonts `<link>` tags or `@import` statements101- `@fontsource/*` packages in dependencies102- CSS `font-family` stacks on `body`, `:root`, headings103- Tailwind `fontFamily` config104105**Flutter:**106- `google_fonts` package usage — which fonts, which weights107- `TextTheme` definitions in `ThemeData`108- Custom `TextStyle` constants109110**Mobile Native:**111- SwiftUI `.font()` modifiers, custom font registration112- Compose `Typography` object, `FontFamily` definitions113114### 3.2 Analyze Type Scale115- Extract all font-size values used across the codebase116- Check for fluid typography: `clamp()`, `calc()`, viewport units117- Check for modular scale: consistent ratio between sizes (1.2 = minor third, 1.25 = major third, 1.333 = perfect fourth)118- Map sizes to semantic names: caption, body, subtitle, title, headline, display119- Check line-height values — flag if inconsistent or missing120121### 3.3 Classify Typography System122- **Fluid**: using `clamp()` with min/preferred/max — document the clamp ranges123- **Stepped**: using fixed sizes with breakpoint overrides — document the steps124- **Static**: fixed sizes only — recommend fluid migration125- **Token-based**: using design tokens (CSS vars, theme object) — document token names126127---128129## PHASE 4: SPACING AND LAYOUT EXTRACTION130131### 4.1 Extract Spacing Scale132**Web:**133- CSS custom properties: `--spacing-*`, `--space-*`, `--gap-*`134- Tailwind spacing config (default or custom)135- Repeated `margin`, `padding`, `gap` values in stylesheets136137**Flutter:**138- `EdgeInsets` values used across widgets139- Custom spacing constants in theme files140- `SizedBox` height/width patterns141142### 4.2 Analyze Spacing Consistency143- List all unique spacing values — flag if not following a consistent scale (4px, 8px, 12px, 16px, 24px, 32px, 48px, 64px)144- Check for 4px grid adherence145- Identify the base unit (commonly 4px or 8px)146- Check for spacing tokens vs magic numbers147148### 4.3 Layout Patterns149- Grid system: CSS Grid, Flexbox patterns, column counts150- Container queries: `@container` usage, named containers151- Breakpoints: viewport breakpoint values and names152- Max-width constraints: content width, reading width153- Flutter: `LayoutBuilder`, `MediaQuery` breakpoint patterns154155---156157## PHASE 5: COMPONENT PATTERN ANALYSIS158159### 5.1 Survey Existing Components160- List all component/widget files (React components, Vue SFCs, Flutter widgets, SwiftUI views)161- Identify shared/reusable components vs page-specific ones162- Check for a component library or design system package163164### 5.2 Detect Component Conventions165- Naming convention: PascalCase, kebab-case, snake_case166- File structure: flat, atomic design (atoms/molecules/organisms), feature-based167- Props/API patterns: how are variants handled (enum prop, boolean flags, className override)168- Composition patterns: slots, children, render props, compound components169170### 5.3 Detect Modern Patterns171- Popover API usage: `popover`, `popovertarget` attributes172- Anchor positioning: `anchor-name`, `position-anchor`, `inset-area`173- View transitions: `view-transition-name`, `startViewTransition()`174- `:has()` selector usage175- `@starting-style` for entry animations176- Container queries for component-level responsiveness177- Scroll-driven animations: `animation-timeline: view()`, `animation-timeline: scroll()`178179---180181## PHASE 6: BRAND AND AESTHETIC INFERENCE182183### 6.1 Infer Application Type184From the codebase, determine:185- App category: SaaS, e-commerce, social, productivity, health/fitness, education, finance, creative tool, utility186- Target audience: consumers, enterprise, developers, specific demographic187- Content type: data-heavy, content-heavy, media-rich, form-heavy, dashboard188189### 6.2 Infer Brand Personality190From visual patterns already in the code:191- **Color temperature**: warm (reds, oranges, yellows) vs cool (blues, greens, purples) vs neutral192- **Density**: spacious (lots of whitespace) vs dense (compact layouts)193- **Shape language**: rounded (large border-radius) vs sharp (small/no radius) vs mixed194- **Visual weight**: bold/heavy (dark backgrounds, thick borders) vs light/airy (white space, thin lines)195- **Motion**: animated (transitions, animations present) vs static (minimal motion)196197Map to personality traits: Professional, Playful, Minimal, Bold, Elegant, Technical, Friendly, Premium198199### 6.3 Infer Design Principles200Based on all gathered data, generate 3-5 design principles that describe the current aesthetic:201- Example: "Clarity over decoration", "Dense but organized", "Warm and approachable", "Data-forward with breathing room"202203---204205## PHASE 7: WRITE DESIGN CONTEXT TO CLAUDE.md206207### 7.1 Read Existing CLAUDE.md208- If CLAUDE.md exists, read it fully209- Identify if a Design Context section already exists210- If it exists, replace it entirely with updated findings211- If not, append the new section212213### 7.2 Generate Design Context Section214Write the following structure to CLAUDE.md:215216```markdown217## Design Context (generated by /design-setup)218219### Tech Stack220- Platform: [web/Flutter/SwiftUI/Compose/React Native]221- Framework: [specific framework + version]222- CSS Methodology: [Tailwind/CSS Modules/CSS-in-JS/vanilla/etc]223- Component Model: [React components/Flutter widgets/etc]224- Design Dependencies: [list of design-related packages]225226### Users & Context227- App Type: [inferred category]228- Target Audience: [inferred audience]229- Content Model: [data-heavy/content-heavy/etc]230231### Brand Personality232- Traits: [Professional, Minimal, etc]233- Temperature: [warm/cool/neutral]234- Density: [spacious/moderate/dense]235- Shape Language: [rounded/sharp/mixed] (border-radius: Xpx)236- Design Principles:237 1. [Principle 1]238 2. [Principle 2]239 3. [Principle 3]240241### Color System242- Color Space: [oklch/hsl/hex]243- Dark Mode: [yes/no — method used]244- Primary: [value] — [role description]245- Secondary: [value] — [role description]246- Accent: [value] — [role description]247- Surface/Background: [values]248- Semantic: success=[value], warning=[value], error=[value], info=[value]249- Total Unique Colors: [count]250- Contrast Issues: [any AA/AAA failures noted]251252### Typography253- System: [fluid/stepped/static/token-based]254- Primary Font: [family] — weights: [list]255- Secondary Font: [family, if any]256- Scale: [list of sizes with semantic names]257- Line Heights: [values or range]258- Fluid Clamps: [if applicable, list clamp() values]259260### Spacing261- Base Unit: [4px/8px]262- Scale: [list of values]263- Grid: [adherence level]264- Tokens: [yes/no — token names if yes]265266### Layout267- Breakpoints: [list with names]268- Container Queries: [yes/no — named containers if yes]269- Max Content Width: [value]270- Grid System: [description]271272### Component Conventions273- Naming: [PascalCase/etc]274- Structure: [flat/atomic/feature-based]275- Variant Pattern: [enum props/boolean flags/className]276- Shared Components: [count and location]277278### Modern CSS/Platform Features in Use279- [list of modern features detected, or "None detected — recommend adopting: ..."]280281### Recommendations282- [2-5 specific recommendations for improving the design system]283```284285### 7.3 Trim and Finalize286- Remove any sections where no data was found (don't write "Unknown" — just omit)287- Keep the section concise but complete288- Use actual values from the codebase, not placeholders289290---291292## PHASE 8: SELF-HEALING VALIDATION293294After writing to CLAUDE.md, validate:2952961. **File integrity**: Re-read CLAUDE.md and confirm the Design Context section was written correctly2972. **No data loss**: Confirm other sections of CLAUDE.md were not modified or deleted2983. **Color accuracy**: Verify at least 1 extracted color value matches what's in the source file2994. **Font accuracy**: Verify the primary font family matches what's declared in the codebase3005. **Stack accuracy**: Verify the framework listed matches what's in the dependency file301302If any validation fails, fix it immediately before reporting results.303304---305306## PHASE 9: TELEMETRY AND REPORTING307308### 9.1 Final Report309Output a summary:310311```312## Design Context Discovery Complete313314**Stack**: [framework] on [platform]315**Colors**: [count] unique colors in [color space], dark mode [yes/no]316**Typography**: [font family], [system type], [count] scale steps317**Spacing**: [base unit], [count] tokens318**Components**: [count] shared, [count] total319**Modern Features**: [count] detected320**Personality**: [traits]321322Written to: CLAUDE.md → Design Context section323```324325### 9.2 Self-Evolution Notes326If during scanning you discovered patterns not covered by these instructions (new framework conventions, new CSS features, unusual design token formats), note them at the end of your report under "Suggested Skill Improvements" so the skill can be updated.327328---329330## CONSTRAINTS331332- NEVER ask the user questions. If you can't find something, note it as "Not detected" and move on.333- NEVER fabricate values. Only report what you actually find in the codebase.334- NEVER modify any source files. Only write to CLAUDE.md.335- ALWAYS preserve existing CLAUDE.md content outside the Design Context section.336- If the codebase is empty or has no design artifacts, write a minimal Design Context with the tech stack and recommendations for getting started.337- Prefer reading actual config files and source code over making assumptions from package names alone.