review_diff
Reviews added UI code lines by comparing a unified diff against design tokens and decisions, producing a CI verdict with file/line findings and suggestions.
Instructions
Review added UI-code lines in a unified diff against the project's own DESIGN.md tokens and active recorded design decisions. Returns a structured CI verdict with file/line findings and nearest-token suggestions. Agents should call this on every PR or diff that touches UI code before merge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | Yes | Unified diff to review (maximum 400KB). | |
| fail_on | No | Rule names to escalate to a failing CI verdict. Valid values: important, bare-hex-color, hardcoded-font-size, hardcoded-font-family, hardcoded-spacing. Diff-scoped: only newly added lines can fail. Default: advisory-only (verdict caps at warn). | |
| project | No | Project directory used to resolve DESIGN.md and match decision scopes. Omit when design_md is supplied and no project hint is needed. | |
| design_md | No | Inline DESIGN.md content. Overrides project file lookup when supplied. | |
| fail_on_governed | No | When true, findings a recorded decision governs become fail-eligible (severity error → verdict fail). Governance is a lexical scope+category association, NOT a verified contradiction of the decision — opt in as a team strict-mode signal, not a turnkey safe blocker. Combines with fail_on. Default: advisory-only. |