audit_swiftui
Audit SwiftUI source against Apple's Human Interface Guidelines. Flags hardcoded .font(.system(size:)) below ~13pt and tiny semantic fonts (.caption/.caption2), hardcoded Color(red:green:blue:)/hex instead of asset-catalog or semantic system colors, an empty/undefined AccentColor, interactive frames below 44×44pt, and ad-hoc spacing off the 4/8-pt grid. Rewards semantic Dynamic Type fonts, semantic system colors, SF Symbols, and flexible frames. iOS-native checks only — no web/CSS rules. Returns pass/fail per check with fix instructions. Taste-profile bindings are not available on the hosted (remote) endpoint (per-user state is a later phase). Omit 'project'/'profile' to run the stateless SwiftUI audit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | SwiftUI source — a single file/view as a string, or an array of file contents. Concatenated before analysis. | |
| strict | No | Strict mode — also count warnings as failures for grading. Default: false | |
| profile | No | Taste profile owning the binding. Omit to search all stored profiles for one bound to the project. | |
| project | No | Project identifier — resolves a saved taste surface binding (see bind_taste_surface). When the binding carries design_notes, each note is verified against the source (animation/material/haptic/font APIs) and returned in note_assessments; missing notes count toward the grade. | |
| accent_color_contents | No | Optional raw Contents.json of AccentColor.colorset. When provided, the tool verifies AccentColor actually defines color components (flags an empty/undefined accent color as an error). |