Repository navigation
Add HIG universal principles extraction (P1) - #73
Merged
Merged
Conversation
changeroa
force-pushed
the
feat/audit-p1-hig-principles
branch
from
October 19, 2026 12:08
576d8cf to
52bf28f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
P1 from the HIG audit direction report: a dated, paraphrased extraction of Apple Human Interface Guidelines principles, published as a governed Platform Guides leaf plus a machine-readable record.
platform-guides/hig-universal-principles.json: 187 principles from a walk of the HIG documentation data (Foundations, Patterns, Components including every page in its eight groups, Inputs, Technologies). Each principle has a stable id (hig.<section>.<page>.<slug>), a paraphrased statement, a source URL, a class (universal147,adapt34,apple-specific6) with a reason, WCAG 2.2 success criteria, a Material 3 counterpart, a WAI-ARIA APG pattern where relevant, a verification question, andreviewed_on: 2026-10-19.extracted, 8covered(each with acovered_byprinciple id), and 46excluded(each with a reason, such as Apple hardware or a system surface with no web default). Getting Started is recorded as out of scope.platform-guides/hig-universal-principles.md: the human guide (boundary, method, classification rules, audit procedure, and per-section principle tables), registered like its neighbors.text_policy: paraphrase_and_link_only. No HIG prose is copied. Every statement and verification question was checked mechanically against the full text of all 149 fetched HIG pages and has no 7-word overlap; the few 6-word overlaps were reworded unless they were generic phrases. Theapple-interaction.mdno-imitation boundary is followed: Apple materials, system fonts, the symbol set, the macOS menu bar, and payment marks areapple-specificdo-not-imitate checks, never web defaults.Validator, test, and freshness
scripts/validate-hig-principles.mjschecks the JSON and the guide together. It fails on missing or unknown fields, unknown classes, duplicate or malformed ids, unknown WCAG/Material 3/APG keys, unused dictionary entries, source URLs that don't match the page, inventory pages with no principle or disposition, danglingcovered_bylinks, invalid dates, and principle ids missing from the guide.scripts/test-validate-hig-principles.mjsproves the failures with committed fixtures intests/fixtures/hig-principles/:missing-field.jsonmust produce exactlyfield_missing,unknown-class.jsonexactlyclass_unknown,duplicate-id.jsonexactlyid_duplicate, andvalid-minimal.jsonmust pass. Five in-memory mutations cover guide drift, danglingcovered_by, unknown WCAG criteria, unextracted pages, and source URL mismatches.scripts/audit-evidence-freshness.mjsgains aplatform_principle_extractionrecord kind. Its explicitreview_by(2027-04-19) is the threshold, withreview_duesemantics; the record'sreviewed_onis reported asverified_at. Records with a missing or invalidreview_by, or with a principlereviewed_onlater than the record's, are rejected.scripts/test-audit-evidence-freshness.mjsadds 5 cases (fresh, expiring, review_due blocking, missing review_by, future principle date), and.github/workflows/evidence-freshness.ymlnow audits the record..github/workflows/hig-principles.ymlruns the validator and self-test on every PR.validate.ymlis byte-sealed by the lifecycle sentinel calibration, so the steps could not be added there.Registration and generated files
DOMAINS.mdpage manifest,scripts/validate-domains.mjsand its test,platform-guides/index.md, aGOVERNANCE.mdsource-of-truth row, the admission policy (with its VersionID re-bound) plus schema and test counts (195 to 196) and the sealed path hash, thepackage.jsonfiles entry for the guide and thevalidate:hig-principlesandtest:hig-principlesscripts, and search-eval questionshig01,hig02(must-pass) andhig03(mismatch).stylegallery audit status(P5) #71 audit ledger and feat(expression): AI-slop UI anti-pattern catalog (P3) #70 anti-pattern catalog):material-registry.json,search-embeddings.json(196 documents), and the lifecycle a2a and ag-ui extension inventories viagenerateProtocolExtensionInventory. This follows the precedent in c4880d9. The inventories bindpackage.json,GOVERNANCE.md, and the package test.Governance classification
provenance_kind: local) that follows theapple-interaction.mdboundary. The JSON is its manual source record; it is not a generated artifact.layout/**,patterns/**,scripts/pattern-data.mjs, orCATALOG.md. No Expression or showcase changes.log.mdentry.Handoff
consumer_reference: not_applicable: this change adds platform-guidance knowledge and validators; it selects and changes no consumer-reference record.Design-terminology reliance: none. No term identifiers or relation types are used.
Before / After
stylegallery search(hybrid,--paths-only --limit 5). Before is a clean export oforigin/mainat a820e4c (search results are unaffected by #70); after is this branch.Search gate after (hybrid): must-pass 37/37 and
eval:searchexits 0. The newhig01,hig02, andhig03questions all hit.Verification (local, after rebase onto e776481)
All 123 commands passed: every command in the main
validate.ymljob, the search-eval, compiler, registrar, state-management, and story-examples workflow commands,bun run validate,bun run test,bun run test:audit,bun run validate:hig-principles,bun run test:hig-principles,bun run eval:search, and an advisory freshness audit of both records.