Skip to content

Add Design Intent Governance#1

Merged
philo-kim merged 3 commits into
mainfrom
feat/design-intent-governance
May 27, 2026
Merged

Add Design Intent Governance#1
philo-kim merged 3 commits into
mainfrom
feat/design-intent-governance

Conversation

@philo-kim

Copy link
Copy Markdown
Owner

Summary

Land Design Intent Governance — the previously empty
spec/features/design-intent-governance/ slot — as a complete addition
covering spec, guide, template, example, and enforcement script.

Three commits, one PR:

  1. Add design intent governance spec, template, and example
    REQ-DESIGN-GOV-001..007, templates/user-design-translation.md,
    examples/design-intent-translation/.
  2. Add intent-to-UI translation guide and index entries
    guide/intent-to-ui-translation.md, AGENTS.md / README.md /
    ROADMAP.md / CHANGELOG.md updates.
  3. Add design-spec coupling check script
    scripts/check-design-spec-coupling.mjs wired into npm run check.

What this addresses

ILS previously stopped at backend-style governance (L0/L1/L2/L3 + evidence
boundary). It had no story for how accepted intent connects to concrete UI
properties on user-facing surfaces, and the
spec/features/design-intent-governance/ slot was reserved but empty.

This PR fills that gap with method-level guidance and an enforceable
guardrail, validated by a real-world adoption in 2026-05 (a multi-role
consumer mobile app: 22 feature specs classified by story class, 14
hand-authored design translations, the coupling check enforced in CI).

Concepts introduced

  • Story class (user / system / mixed / method) at file-level
    default with per-REQ override, so a single feature file can mix user and
    system REQs without misclassifying the file.
  • Design translation as the explicit middle layer between accepted L2
    behavior and rendered UI properties — copy, color token, icon, position,
    shape, motion, semantic label.
  • governingSpec: frontmatter on each translation as the coupling
    authority for the lint.
  • Trail vs authority separation — design systems, mockup indexes, and
    code-path catalogs are trails that follow spec/ authority, not
    authorities themselves. REQ-DESIGN-GOV-007 records
    design_trail_authority_drift when a trail unilaterally declares product
    behavior.
  • Drift sources (wrong_intent / missing_intent / weak_translation /
    wrong_implementation / missing_evidence / decision_gap) aligned
    with the existing implementation gap taxonomy.
  • noIntentChange: true commit marker for pure-expression design
    changes (copy / color / icon / spacing) that don't change governing
    intent.

Test plan

  • npm run check passes locally — 21 project tests, 15 example tests,
    49 generated REQ stubs all green.
  • node scripts/check-design-spec-coupling.mjs no-ops in the upstream
    repo (no translations directory present, the configured behavior).
  • node scripts/check-design-spec-coupling.mjs --dir=examples/design-intent-translation/translations
    correctly reports no changes against main.
  • Coupling check exit code verified in adopter project (Buzyrun
    Flutter): fails when only translation changes, passes when paired
    with governing spec or noIntentChange: true commit marker.

Out of scope

  • Specific design systems (Material / HIG / custom).
  • Per-route or per-screen ledger formats — projects may add these locally
    (the validating adopter does), but the method does not mandate one.
  • Visual audit, accessibility audit, or golden-image tooling — these are
    project-specific evidence mechanisms downstream of this governance.

ROADMAP / CHANGELOG

ROADMAP.md 0.3 milestone updated; CHANGELOG.md Unreleased section records
the addition.

philo-kim added 3 commits May 27, 2026 12:48
Fill the previously empty `spec/features/design-intent-governance/` slot with
`REQ-DESIGN-GOV-001..007`. The spec defines:

- story-class classification (user/system/mixed/method) at file-level default
  and per-REQ override.
- intent-to-UI design translation as the bridge between accepted intent and
  concrete UI properties (region → element → variant → property).
- `governingSpec:` frontmatter on translations as the coupling authority.
- trail vs authority separation for external design references (design
  systems, code-path catalogs, mockup indexes) — trails follow spec.
- `design_translation_gap` and `design_trail_authority_drift` review labels.

Add `templates/user-design-translation.md` with the 9-section structure
projects fill per surface.

Add a small worked example under `examples/design-intent-translation/`
(coupon-checkout review surface) that demonstrates file-level storyClass,
per-REQ override, paired translation with governingSpec, and property fit
matrix with drift-source classification.

Index the new feature in `spec/README.md`.

Field-validated by a real-world adoption in 2026-05 (multi-role consumer
mobile app, 22 feature specs classified, 14 translations written, coupling
check in CI).
Add `guide/intent-to-ui-translation.md` — the conceptual companion to the
design-intent-governance spec. It explains:

- Where design translation sits in the ILS layer model (after L0/L1/L2/L3,
  before code+evidence).
- Story-class classification with file-default + per-REQ override.
- The UI object tree shape (surface/story → region → element → variant →
  property) and why measurement happens at the property leaf.
- Property fit judgments (fit / weak / drift / violation / not_applicable).
- Drift source classification (wrong_intent / missing_intent /
  weak_translation / wrong_implementation / missing_evidence / decision_gap)
  aligned with the existing implementation gap taxonomy from
  `guide/spec-as-product-standard.md`.
- Authority vs trail distinction for external design references.
- The pairing rule: design translation changes must be paired with a
  governingSpec change OR a `noIntentChange: true` commit marker.
- Adoption order — story-class metadata first, then highest-risk surface
  translation, then coupling check in CI.

Index it in `AGENTS.md` load order (item 9, for tasks touching user-facing
surfaces) and in `README.md` resource list.

Record the addition in `ROADMAP.md` 0.3 milestone and `CHANGELOG.md`
Unreleased section.
Enforce `REQ-DESIGN-GOV-004` and `REQ-DESIGN-GOV-005` programmatically:
when a hand-authored design translation under the configured translations
directory changes, the diff must include either (a) a change in at least one
of its declared `governingSpec:` files, or (b) a commit message in the same
PR carrying `noIntentChange: true`. Otherwise the check fails with a
`design_translation_gap` report naming the missing pairing.

Translation directory resolution (in order of precedence):
  1. `--dir=<path>` CLI flag
  2. `DESIGN_TRANSLATIONS_DIR` environment variable
  3. Auto-detect from four conventional paths
     (`docs/design/translations`, `docs/design/v3/governance/translations`,
     `docs/translations`, `design/translations`)
  4. No-op exit when no translations directory exists (REQ-DESIGN-GOV-005
     does not apply to projects without user-facing design translations)

The check also honors `BASE_REF` and `GITHUB_BASE_REF` so it integrates
cleanly with GitHub Actions PR workflows without configuration.

Wire it into the project `check` aggregate. Regenerate requirement test
stubs and verification report so design-intent-governance REQs appear in
generated artifacts.
@philo-kim philo-kim merged commit d4a652a into main May 27, 2026
2 checks passed
@philo-kim philo-kim deleted the feat/design-intent-governance branch May 27, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant