Mark recap Case-B design retrofit done; log cleanup-execution learnings

- Flip recap's Case-B /design backfill from "in flight" -> done in
  ROADMAP/AGENTS: contract extracted + two-phase conformance cleanup
  shipped (recap app 0.2.161).
- Add three cleanup-execution Field notes to guides/design.md:
  CSS-value-position var-ify scoping, exclude standalone no-:root
  exports, border-radius-clamp capsule snapping.
- Note the standalone-export literal-hex exception in design-checker.md's
  Color dimension.
This commit is contained in:
Keysat
2026-06-17 09:42:28 -05:00
parent e2377f4c8c
commit 6f486c4475
4 changed files with 36 additions and 13 deletions
+4 -1
View File
@@ -40,7 +40,10 @@ A path to the repo to audit (default: the current working directory).
- **Color** — UI colors trace to a token in `tokens.tokens.json` (directly or via a CSS
custom property generated from it). Hardcoded hex/rgb values that don't match any token are
violations; off-palette colors are violations.
violations; off-palette colors are violations. **Exception — standalone generated documents**
(a share/print/email export that ships its own `<style>` with no `:root`): they legitimately use
literal hex because `var()` can't resolve without the token block, so audit them against the token
*values* and don't flag the literal hex itself as a violation.
- **Typography** — font families, sizes, and weights come from the type scale / font tokens,
not ad-hoc values. Headings and body follow the `DESIGN.md` typography rules.
- **Spacing & layout** — margins, padding, and gaps use the spacing scale; layout density and
+17
View File
@@ -302,6 +302,23 @@ us things. Brand facts never go here; only generalizable process/distillation kn
`_imports/` are correctly skipped; instead write `inspiration/README.md` pointing at the
harvested source files + the brand icon as the de-facto reference, and copy the icon into
`brand/`. That preserves the *why/where* record the folder convention exists for.
- *(Case-B cleanup-execution run, 2026-06-17, recap)* **Scope an inline-hex→`var()` sweep to
CSS-value position, not to `style=` attributes.** Convert a hex only where the character before
`#` is not a quote/backslash (i.e. it's preceded by `:`/space/`,`). That one rule auto-dodges the
spots that must stay literal — hex held in JS *logic* (`const c = …`, quoted ternary branches like
`${on ? "#1e293b" : …}`), SVG `fill=`/`stroke=` attributes, and `<meta theme-color>` — without a
hand-kept exclusion list, and it beats `style="…"` boundary-matching (which breaks on inner quotes
inside `${…}`). Verify after: every introduced `var()` resolves against `:root`, and 0 mapped hexes
remain in CSS-value position (proves no silent misses).
- *(Case-B cleanup-execution run, 2026-06-17, recap)* **Exclude standalone generated documents from
var-ification.** A self-contained export (share page, print/PDF view, email body) ships its own
`<style>` with no `:root`, so `var(--token)` won't resolve there — its literal hex is correct, not
drift. Identify those regions (by line range or by the builder fn) and skip them. Snapping off-scale
*values* inside them is still fine, since that's a literal change.
- *(Case-B cleanup-execution run, 2026-06-17, recap)* **`border-radius` clamps to half the shorter
side — use it to snap capsules for free.** A pill-shaped control (e.g. an 18px-tall count badge at
radius 9) renders identically at any radius ≥ half its height, so snapping *up* to the next scale
step (9→10) is on-scale **and** pixel-identical. Snap capsules up, not down, to avoid a visible change.
## Final report