governance
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill: Governance
Skill:治理
Keep the system consistent as it grows. Apply versioning, contribution, and deprecation rules.
在设计系统发展过程中保持一致性。应用版本管理、贡献和弃用规则。
Steps
步骤
- Read (SemVer table, contribution workflow, deprecation policy, change comms).
workflows/governance.md - Classify the change: major (breaking — renamed/removed token or prop, changed anatomy/default), minor (additive — new token/component/variant/optional prop), patch (fix — contrast/bug/doc/value tweak in tolerance).
- For a new component/token: confirm it serves a real, repeated need (≥ 2 places) before promoting product → candidate → core. Design it to the full quality bar (→ Component Quality Bar).
.claude/rules/components.md - For a deprecation: mark with reason + replacement + removal version; keep working ≥ 1 minor cycle; provide a migration map (style); remove only in a major.
design-systems/crosswalk.md - Wire any new file into (File Reference Map + relevant table/router) and add a changelog entry.
CLAUDE.md
- 阅读 (包含SemVer对照表、贡献工作流、弃用策略、变更沟通相关内容)。
workflows/governance.md - 对变更进行分类:major(破坏性变更 —— 重命名/删除token或prop、更改组件结构/默认值)、minor(新增性变更 —— 新增token/组件/变体/可选prop)、patch(修复性变更 —— 对比度/bug/文档/在容差范围内的数值微调)。
- 对于新增的组件/token:先确认它能满足真实的、可复用的需求(至少在2个场景中使用),再按照「产品级 → 候选级 → 核心级」的路径晋升。需按照完整质量标准进行设计(参考 → 组件质量门槛(Component Quality Bar))。
.claude/rules/components.md - 对于弃用操作:需标注弃用原因、替代方案以及移除版本;至少在1个minor版本周期内保持可用;提供迁移指引(参考 的格式);仅可在major版本中执行移除。
design-systems/crosswalk.md - 将所有新增文件接入 (文件参考映射 + 相关表格/路由),并添加一条变更日志记录。
CLAUDE.md
Verification (definition of done)
验证标准(完成定义)
- Change has a SemVer level and a changelog entry.
- Removals have a deprecation window, a replacement, and a migration table.
- New spec meets the 8-state + a11y + token-mapping bar and is reachable via the router.
- passes; contrast re-checked if colors changed.
python3 scripts/validate_tokens.py
- 变更已明确SemVer级别并且有对应的变更日志记录。
- 移除操作有弃用窗口期、替代方案以及迁移对照表。
- 新增规范满足8种状态 + a11y + token映射的质量要求,并且可通过路由访问。
- 校验通过;若涉及颜色变更,需重新检查对比度。
python3 scripts/validate_tokens.py