Design Source-of-Truth Conformance デザイン定義準拠
Skill7 starsChanged 5 months agoMITView on GitHub
リポジトリに DESIGN.md やデザイントークン定義が存在する場合に、新規 UI 実装の色・余白・フォントサイズ・角丸・シャドウがその定義済みスケールに準拠しているかを照合する。定義が無ければ実行しない
In this repository140 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- static/llms.txtllms.txt
- ask-codexSkill
- river-review-disciplineSkill
- skill-creatorSkill
- skill-ops-plannerSkill
- skill-optimizerSkill
- commandsSkill
- adversarial-reviewSkill
- review-teamSkill
- river-review-architectureSkill
- river-review-codeSkill
- river-review-docsSkill
- river-review-frontendSkill
- river-review-performanceSkill
- river-review-security-auditSkill
- river-review-securitySkill
- river-reviewSkill
- river-review-testingSkill
- unknown-coverage-reviewSkill
- Coverage and Failure Path GapsSkill
- Flaky Test Risk CheckSkill
- GitHub Actions Workflow Security ReviewSkill
- Standard Review Policy for DownstreamSkill
- Test Assertion Effectiveness 常に PASS するテストの検出Skill
- Test Presence for Changed CodeSkill
- Test Naming and StructureSkill
- テスト観点レビュー(差分ドリブン)Skill
- a11y Accessible Name BasicsSkill
- Agent Skill Bridge ReviewSkill
- Altitude Generalization GuardSkill
- API Compatibility and Test Gap ReviewSkill
- Assumption Resolution Trace Plan の前提解消トレーサビリティSkill
- Async Correctness 非同期処理の正しさ検証Skill
- Behavior-Structure Separation 振る舞い変更と構造変更の分離・外部挙動維持Skill
- Closure Scope Retention GuardSkill
- Component Variants / States Documentation コンポーネント状態の文書化Skill
- Configuration File ReviewSkill
- Cross-File Leakage リファクタ後の caller 側残骸検出Skill
- Design System Component Reuse GuardSkill
- Design Token EnforcementSkill
- Detector Detection Power 検査器の検出力の検証Skill
- Documentation Hygiene ドキュメント衛生Skill
- End-to-End Wiring 末端到達・貫通の検証Skill
- Existing-Pattern Conformance 既存パターン準拠の確認Skill
- Firebase Security Rules ReviewSkill
- Fix Scope Integrity 指摘対応ループのスコープ逸脱・前提破壊検出Skill
- GitHubレビューコメント対応(修正案つき)Skill
- Hallucinated Reference 幻覚的参照の実在確認Skill
- Hello Skill (Always-On Sample)Skill
- i18n Unused Key ReviewSkill
- Impact Evidence Coverage 影響・失敗系・外部依存の証拠充足Skill
- Independent Review SynthesisSkill
- Invisible Unicode Injection Scan 不可視 Unicode コード注入検出Skill
- Knowledge-to-Code Alignment 新知識のコード反映・設計知識の保全Skill
- Laravel Eloquent N+1 and Query Efficiency ReviewSkill
- Laravel Mass Assignment and Authorization ReviewSkill
- The first 60 shown.
The file
Files
Pattern declaration
Primary pattern: Reviewer Secondary patterns: Inversion Why: 定義済みスケールとの照合は決定論で判定できる部分が大きいが、まず参照すべきデザイン定義(DESIGN.md / トークン)の所在を grep で特定する必要がある。定義が無ければ実行を止めるゲートが必要。
Goal / 目的
- リポジトリにデザイン定義のソース(
DESIGN.md/design-tokens.*/tailwind.config.*の theme / CSS custom properties など)が存在する場合に、新規 UI 実装の値がその定義済みスケールに準拠しているかを照合する。 - 「トークンは存在するのに、定義外のスケール(例: spacing が 4/8/12 と定義されているのに
10px)を新規導入した」逸脱を検出する。
Non-goals / 扱わないこと
- デザイン定義が存在しないリポジトリでの生値ハードコード検出(
design-token-enforcementの領域。本スキルは定義との照合に限定する)。 - 既存コンポーネントの再利用可否(
design-system-component-reuseの領域)。 - アクセシビリティやインタラクティブ状態(a11y / loading-state 系の領域)。
Pre-execution Gate / 実行前ゲート
このスキルは以下の条件がすべて満たされない限り NO_REVIEW を返す。
- リポジトリにデザイン定義のソース(
DESIGN.md/ デザイントークン定義 /tailwind.config.*の theme など)がcode_searchで実在確認できる - 差分に UI 実装の値(色・余白・フォントサイズ・角丸・シャドウ)の追加・変更が含まれている
- inputContext に diff が含まれ、
code_search(grep)が利用可能である
ゲート不成立時の出力: NO_REVIEW: design-source-conformance — 参照すべきデザイン定義または UI 値の変更が検出されない
False-positive guards / 抑制条件
- デザイン定義が grep で見つからない場合は指摘しない(生値検出は token-enforcement に委ねる)。
- 定義済みスケールに含まれる値は指摘しない(準拠している実装は対象外)。
- 定義からの逸脱が差分内で根拠とともに明記されている場合は抑制する(意図的な例外)。
- スケール外でも、定義が明示的に任意値を許容している領域は対象外とする。
Rule / ルール
検出ロジック
- 定義の特定:
code_searchでデザイン定義のソースを特定し、色・余白・フォントサイズ・角丸・シャドウの定義済みスケールを読み取る。 - 値の照合: 差分の新規 UI 値が、定義済みスケールに含まれるか照合する。含まれない値(off-scale)を逸脱候補とする。
- 報告: 逸脱値と参照した定義箇所を両方
<file>:<line>で示し、最も近い定義済みスケール値への置き換えを提案する。
制約
- 検出は最大 5 件。スケール逸脱の影響が大きいもの(広く使われる色・余白)を優先する。
- 各指摘に「逸脱値」「参照した定義」「準拠候補」を必ず含める。
- 定義の読み取りは grep で再現可能にする(検索語を明示する)。
Evidence / 根拠の取り方
- 逸脱値と参照定義は両方
<file>:<line>に紐づけ、推測でスケールを述べない。 - 「定義ではこのスケール / 新実装はこの値」を対比し、off-scale を具体的に示す。
Output / 出力フォーマット
すべて日本語。
(design-source-conformance):1: [要約] 最も重大なスケール逸脱は〈1文〉
<file>:<line>: [スケール逸脱1] <タイトル>
定義: <参照したスケール>(検索語: `<grep pattern>`, <file>:<line>)
新実装: <off-scale な値>(<file>:<line>)
影響: <デザイン不整合 / トークン体系の形骸化>
Fix: <最も近い定義済みスケール値への置き換え、または逸脱の根拠を明文化>評価指標(Evaluation)
- 合格基準: デザイン定義が grep 再現可能な検索語 +
<file>:<line>で示され、off-scale の逸脱が具体的に説明されている。 - 不合格基準: デザイン定義が無いリポジトリへの指摘、定義済みスケール内の値への難癖、生値検出への越境、根拠ある意図的逸脱への指摘。
人間に返す条件(Human Handoff)
- デザイン定義が複数あり、どれを正典とするかの合意が必要な場合。
- スケール拡張(新しい値を定義へ追加する)の是非が設計判断を要する場合。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

