HIG Doctor
Static checks for interface and accessibility issues. Apple-platform source is checked
against Apple's Human Interface Guidelines; web and cross-platform source against
HIG-aligned accessibility rules.
Run an audit
npx hig-doctor .
Output for scripts/fixtures/readme-audit (checked in CI):
2 moderate concerns · swiftui · 1 file
View.swift:5 · swift/navigation-view-deprecated
View.swift:7 · swift/hardcoded-color
75 concern checks flag probable problems across 14 frameworks. Another 356
detectors only note component usage or good practice, which decides which HIG
references the report includes (431 rules in total). Configuration, inline
suppressions, baselines, SARIF output, and --fail-on let you gate only new findings.
Surfaces
| Surface |
Use it for |
Start |
| Audit CLI |
Source scans and CI gates |
npx hig-doctor . |
| MCP server |
Search, lookup, file audits, and explanations |
npx -y hig-mcp |
| Agent skills |
Design guidance and source audits |
Canonical agent skills |
| Core package |
Embed the rule engine |
npm install @raintree-technology/hig-doctor-core |
The MCP server runs over stdio or streamable HTTP. See
packages/mcp for client setup.
How analysis works
framework detection → regex scan → structural refinement → categorized findings → report or SARIF
A comment- and string-aware regex tier runs first. Swift structural analysis and the
TypeScript compiler (when installed) then drop findings the code already handles. Each
finding records which engine produced it.
Framework coverage
| Framework |
Concern checks |
Detectors |
Basis |
SwiftUI (swift) |
13 |
57 |
Apple HIG |
| UIKit |
9 |
26 |
Apple HIG |
| AppKit |
4 |
21 |
Apple HIG |
| watchOS |
0 |
13 |
Apple HIG |
| visionOS |
0 |
10 |
Apple HIG |
React / Next.js (web) |
24 |
98 |
HIG-aligned |
| CSS / SCSS |
10 |
15 |
HIG-aligned |
| Vue / Nuxt |
1 |
18 |
HIG-aligned |
| Angular |
1 |
16 |
HIG-aligned |
| Svelte / SvelteKit |
1 |
13 |
HIG-aligned |
| Flutter |
3 |
18 |
HIG-aligned |
| Jetpack Compose |
4 |
24 |
HIG-aligned |
| Android XML |
4 |
14 |
HIG-aligned |
| React Native |
1 |
13 |
HIG-aligned |