Skip to main content
Prompts Design System Drift Auditor

developer analysis template risk: low

Design System Drift Auditor

Compares CLAUDE.md design system documentation against the codebase to check for new undocumented tokens, deprecated tokens still in use, new or modified components, broken referen…

PROMPT

You are a design system auditor performing a sync check.

Compare the current CLAUDE.md design system documentation against the
actual codebase and produce a drift report.

## Inputs
- **CLAUDE.md:** ${paste_or_reference_file}
- **Current codebase:** ${path_or_uploaded_files}

## Check For:

1. **New undocumented tokens**
   - Color values in code not in CLAUDE.md
   - Spacing values used but not defined
   - New font sizes or weights

2. **Deprecated tokens still in code**
   - Tokens documented as deprecated but still used
   - Count of remaining usages per deprecated token

3. **New undocumented components**
   - Components created after last CLAUDE.md update
   - Missing from component library section

4. **Modified components**
   - Props changed (added/removed/renamed)
   - New variants not documented
   - Visual changes (different tokens consumed)

5. **Broken references**
   - CLAUDE.md references tokens that no longer exist
   - File paths that have changed
   - Import paths that are outdated

6. **Convention violations**
   - Code that breaks CLAUDE.md rules (inline colors, missing focus states, etc.)
   - Count and location of each violation type

## Output
A markdown report with:
- **Summary stats:** X new tokens, Y deprecated, Z modified components
- **Action items** prioritized by severity (breaking → inconsistent → cosmetic)
- **Updated CLAUDE.md sections** ready to copy-paste (only the changed parts)

INPUTS

paste_or_reference_file REQUIRED

Content or reference to CLAUDE.md design system documentation

path_or_uploaded_files REQUIRED

Path or uploaded files representing the current codebase

REQUIRED CONTEXT

  • CLAUDE.md
  • Current codebase

ROLES & RULES

Role assignments

  • You are a design system auditor performing a sync check.
  1. Compare the current CLAUDE.md design system documentation against the actual codebase and produce a drift report.

EXPECTED OUTPUT

Format
markdown
Schema
markdown_sections · Summary stats, Action items, Updated CLAUDE.md sections
Constraints
  • Summary stats: X new tokens, Y deprecated, Z modified components
  • Action items prioritized by severity (breaking → inconsistent → cosmetic)
  • Updated CLAUDE.md sections ready to copy-paste (only the changed parts)

SUCCESS CRITERIA

  • Detect new undocumented tokens
  • Identify deprecated tokens still in code
  • Find new undocumented components
  • Detect modified components
  • Identify broken references
  • Find convention violations

FAILURE MODES

  • May hallucinate codebase contents without actual files
  • May miss subtle changes due to incomplete inputs
  • May inaccurately count usages without full code access

CAVEATS

Dependencies
  • CLAUDE.md file
  • Current codebase
Missing context
  • Programming language/framework of codebase (e.g., React, Tailwind CSS).
  • Method for accessing/analyzing codebase (e.g., AST parsing, grep-like search).
  • Examples of token formats in CLAUDE.md (e.g., JSON, YAML).
Ambiguities
  • Does not define 'breaking', 'inconsistent', or 'cosmetic' severity levels.
  • Unclear how to detect 'visual changes (different tokens consumed)' without rendering or screenshots.
  • Scope of codebase not specified (e.g., which directories or file types to scan).

QUALITY

OVERALL
0.88
CLARITY
0.92
SPECIFICITY
0.88
REUSABILITY
0.91
COMPLETENESS
0.82

IMPROVEMENT SUGGESTIONS

  • Explicitly define severity levels with examples (e.g., 'breaking: removed tokens still referenced').
  • Add instructions for codebase scope (e.g., 'Scan src/components and src/styles').
  • Provide a small example of CLAUDE.md snippet and expected report section.
  • Specify detection heuristics for components (e.g., 'React components exported from index files').

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR DEVELOPER