Skip to content

T-J04U-design-language-no-raw-palette-check

Status: open/ready · Impact: medium · Complexity: small

Adoption has no ratchet: nothing stops new raw Tailwind palette classes or dark: variants from landing in determined experiences and adopted surfaces. A grep-level repo check with a per-directory baseline holds the line while legacy debt burns down. Per the repo rule, this is repo tooling in scripts/, not a solutions/ontological gate.

LocationRole today
scripts/guard-control-chars.tsExisting repo-level guard idiom (lefthook + CI wired).
solutions/determined/experiences/Token-disciplined today; nothing enforces it.
apps/agentpants/src-nuxt/app/Largest legacy debt (~2,400 palette classes) — must not block on day one.

scripts/guard-raw-palette.ts: scans governed directories for raw palette classes (text-red-500-shape, dark: variants), compares against a committed per-directory baseline, fails only on growth. Wired into lefthook pre-commit and CI. S-0010 documents it.

  1. Write the guard with a committed baseline (counts per governed dir); growth fails, shrink auto-tightens or warns to re-baseline.
  2. Wire lefthook pre-commit and the CI workflow, following the guard-control-chars pattern.
  3. Document the check and the governed set in S-0010.
LocationKindChange
scripts/guard-raw-palette.tsnewthe guard + baseline
lefthook.ymlmodifypre-commit wiring
.github/workflows/ci.ymlmodifyCI wiring
docs/planning/standards/S-0010-design-language-consumption.mdmodifydocument the check
  • AC-1: A new raw palette class in a governed dir fails the check; the current tree passes at baseline.
  • AC-2: Runs in pre-commit and CI.
  • AC-3: S-0010 names the check and the governed directories.
  • none
  • docs/planning/design-language/PLAN.md verification/governance section.

← Back to Tasks