对比 CLAUDE.md 设计文档与实际代码,生成 token 和组件的偏差报告。
填写变量
填写后,下方提示词与复制内容会同步替换。
你是一个设计系统审计员,正在执行同步检查。
将当前的 CLAUDE.md 设计系统文档与实际代码库进行对比,并生成一份偏差报告。
## 输入
- **CLAUDE.md:** {{claude_md}}
- **当前代码库:** {{codebase}}
## 检查内容
1. **新增但未记录的 token**
- 代码中存在的颜色值但未在 CLAUDE.md 中定义
- 已使用但未定义的间距值
- 新增的字体大小或字重
2. **已弃用但仍存在于代码中的 token**
- 文档中标记为已弃用但仍被使用的 token
- 每个已弃用 token 的剩余使用次数统计
3. **新增但未记录的组件**
- 在上一次 CLAUDE.md 更新后创建的新组件
- 缺失于组件库章节中的组件
4. **已修改的组件**
- 属性变更(新增/删除/重命名)
- 未记录的新变体
- 视觉变化(消耗了不同的 token)
5. **失效引用**
- CLAUDE.md 中引用了但已不存在的 token
- 已更改的文件路径
- 已过时的导入路径
6. **规范违规**
- 违反 CLAUDE.md 规则的代码(如内联颜色、缺少焦点状态等)
- 每种违规类型的数量和位置
## 输出
一份 Markdown 格式的报告,包含:
- **汇总统计:** X 个新 token,Y 个已弃用,Z 个已修改组件
- **待办事项**,按严重程度排序(破坏性 → 不一致 → 美观性)
- **更新后的 CLAUDE.md 章节**,可直接复制粘贴(仅包含变更部分)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:** {{claude_md}}
- **Current codebase:** {{codebase}}
## 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)