The quality model — CCAC

The .gui quality score measures the file, not the design. Like an HTML validator, it answers “is this a well-built file?” — never “is this a good-looking design?” The score is 100% local, offline, deterministic, and zero-AI: pure rule evaluation over the parsed tree and fixed vocabularies, so the same file scores the same everywhere, forever.

The gate

Before quality is measured, two binary conditions must hold. Valid — the file conforms to the spec; a file that fails is not a .gui file and is not scored. Intact — every reference resolves: $token names exist, asset src values point to real files in the package, component ids match declared components. A file can be syntactically valid and silently broken; intact catches that. Fail either and there is no report.

The four levels

LevelQuestion it answers
C CleanIs the file built without waste? No dead markup, no redundant nesting, no unused declarations.
C ConsistentDoes the file agree with itself? Declared tokens and styles actually used; one system, not three.
A AccessibleIs the file physically legible? WCAG 2.2 visual criteria — contrast, tap-target sizes, text sizes.
C ComprehensibleHow AI-ready is the file as semantics? The fraction of nodes documented by declared role= anchors, each read at face value as far as its reach allows.

Every level emits the same envelope — { "score": 0–100, "audits": [...] } — and the reference implementation is @dotgui/kit/score.

Advisory, never a gate

A low score is still a valid, packable file. The kit produces the measurement and takes no action; what happens next is the consuming tool's policy — a CI job might fail below a threshold, an app might show a badge, a batch pipeline might auto-discard. The test for what belongs in the score: would another designer disagree? Would I disagree next year? If yes, it's design taste and it stays out. Beauty, composition, and trendiness are deliberately not measured.