HIG Doctor

v0.2.4
io.github.raintree-technology/hig-doctor Checked 10 hours ago Published 3 days ago

Apple Human Interface Guidelines search, lookup, and project audits for AI coding agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

hig_list_skills

List all available Apple HIG skills with descriptions and reference topics. Use this first to discover what HIG guidance is available before calling hig_lookup.

hig_lookup

Fetch Apple HIG reference markdown. Provide a skill name (e.g. 'hig-foundations') to get the skill overview, or a skill+topic (e.g. skill='hig-foundations', topic='color') to get detailed reference for that topic. Content is from Apple's HIG, snapshot dated 2025-02-02. If you don't know which skill/topic to use, call hig_search instead.

ParameterTypeDescription
skill *stringSkill identifier, e.g. 'hig-foundations', 'hig-components-layout', 'hig-platforms'.
topicstringOptional topic within the skill, e.g. 'color', 'typography', 'accessibility', 'sidebars'. Call hig_list_skills first to see valid topics.

hig_audit

Audit a project directory for HIG and accessibility concerns. Scans source files across SwiftUI, UIKit, React, Vue, Svelte, Angular, Compose, Android XML, React Native, Flutter, CSS, and HTML. Returns severity counts (critical/serious/moderate), per-category breakdown, and a markdown report with code excerpts and HIG reference material. Honors hig-doctor.config.json, .hig-baseline.json, and inline hig-disable suppressions in the audited project.

ParameterTypeDescription
directory *stringAbsolute path to the project directory to audit. Must be a directory the server process can read.
fail_onstringOptional severity threshold. If set, the response includes gate_tripped=true when any concern at/above this severity is found.

hig_audit_file

Audit a single source file: the fast inner loop after writing or editing a file. Returns every finding with its rule ID, severity, line, fix guidance, and HIG citation. Use hig_explain_finding for deeper guidance on a specific rule.

ParameterTypeDescription
file *stringAbsolute path to the source file to audit.
fail_onstringOptional severity threshold for gate_tripped.

hig_explain_finding

Explain an audit finding: full rule metadata (severity, engine, fix guidance) plus an excerpt of the Apple HIG reference the rule cites. Pass the ruleId from hig_audit / hig_audit_file results (e.g. 'swift/hardcoded-color').

ParameterTypeDescription
rule_id *stringStable rule ID, e.g. 'swift/hardcoded-color', 'web/missing-alt'.