Commit Graph

5 Commits

Author SHA1 Message Date
36f7b9f7b9 feat(adapter): plain-css second-adapter smoke — proves the IR seam (WHYNOT-WP-0002 T10)
A deliberately-unfinished second adapter that consumes the same ir/ and honours
the same adapters/ADAPTER_CONTRACT.md (token full-gen + write-once stubs + drift
roll-up shape + exit codes), with zero changes to ir/. Every IR component is
'new' for a fresh stack → 10 class stubs + tokens.css (80 props). Not a usable
plain-CSS kit — the deliverable is confidence the boundary holds so the
architecture can be lifted into a coulomb-level tool later. make adapt-plain-css.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 09:21:16 +02:00
e4e3fe069c feat(adapter): make parity-lit — contract + visual parity (WHYNOT-WP-0002 T08)
Render every <wn-*> in a real browser (Playwright, --no-sandbox; reuses an
external static server when present) and write the adapter-contract parity result
to adapters/lit/parity/_parity.json:

- Contract parity: element must upgrade + carry no attribute-mismatch vs IR
  (computed statically via scaffold.componentDrift, avoiding runtime
  type-coercion false positives). prop-missing is a coverage note, not a failure.
- Visual parity: render smoke (non-empty + positive box) + per-component
  screenshot artifact (gitignored). Pixel-exact regression stays with the
  Playwright baseline suite; IR exemplars are gallery cards, not single-component
  baselines, so they are the human reference, not an auto pixel gate.
- Result: 10 components, contractFail=0 visualFail=0, PipelineStrip skipped
  (wn-pipeline-strip rename drift). Exit 4 on failure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 09:16:13 +02:00
552d8fe926 feat(adapter): Lit component scaffold + drift report (WHYNOT-WP-0002 T07)
Extend make adapt-lit beyond tokens: parse src/elements/*.js, compare each IR
component contract against its <wn-*> element, and emit per-component drift
reports + a machine roll-up (adapters/lit/drift/), with write-once stubs
(adapters/lit/stubs/) for genuinely new components. Never overwrites
hand-authored sources.

- Severity split: actionable drift (prop-missing, attribute-mismatch,
  variant-axis-missing, tag-mismatch) gates with exit 3; non-portable + prop-extra
  are informational (the IR carries React style/onClick; Lit is richer than the
  minimal designbook) and don't gate.
- Current state: 7 ok, 3 actionable drift for human triage — PipelineStrip
  (wn-pipeline-strip vs hand-authored wn-pipeline rename), PageHeader (actions is
  a slot, not a prop), Sidebar (IR 'current' axis absent on the element).
- _report.json reuses generatedAt/irRef when drift is unchanged (no git churn).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 09:03:22 +02:00
0d688ca94a feat(designbook): technology-neutral IR + stack-adapter pipeline (WHYNOT-WP-0002 T01-T06)
Author the design language once in the canonical React designbook and project it
one-way onto each stack: React -> designbook/ -> ir/ -> adapters/<stack>/.

Phase 0 — contracts & governance (T01-T03):
- ir/SCHEMA.md + ir/schema/{component,tokens}.schema.json — neutral IR contract
  (W3C DTCG tokens; React prop -> HTML attribute mapping; non-portable props flagged).
- adapters/ADAPTER_CONTRACT.md — inputs, drift-report + parity-result shapes,
  idempotency rules, CI exit codes (0 ok / 2 usage / 3 drift / 4 parity / 5 internal).
- .claude/rules/designbook-propagation.md + DesignSystemIntroduction.md §5.1 —
  one-way directionality + drift-resolution workflow.

T04 — canonical React designbook + the missing pull tool:
- The bundled /design-sync skill only PUSHES repo->cloud; it cannot populate
  designbook/. Added scripts/designbook_pull.py + `make designbook-pull`, which drives
  the local claude binary headless (acceptEdits) so DesignSync fetch+write runs in a
  subprocess (contents never hit the orchestrator's context). Pulled 44 files;
  excludes the _whynot-design-seed/ self-copy. Corrected the docs that wrongly called
  /design-sync the pull.

T05 — IR extractor (scripts/ir-extract.mjs + `make ir`):
- ir/tokens.json (80 tokens, DTCG, var() -> {ref} alias resolution); ir/components/*.json
  (10 contracts parsed from .jsx signatures: enum/boolean/number inference, prop->attr
  map, style/callback marked non-portable); ir/exemplars/*.

T06 — Lit token adapter (adapters/lit/ + `make adapt-lit`):
- Full-gen tokens into src/styles/colors_and_type.css :root (marker-bounded, idempotent
  no-op on re-run; hand-authored type CSS preserved).

NOTE: token regen synced Lit to canonical React — fonts IBM Plex -> system stacks and 8
status tokens added. This is a VISUAL change: review and run `pnpm test:visual:update`
before merge. Remaining: T07 scaffold+drift, T08 parity, T09 runbook, T10 2nd-adapter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 12:36:24 +02:00
80252baf53 version 0.2.0 replaces fromer version!
Some checks failed
ci / check (push) Has been cancelled
ci / release (push) Has been cancelled
2026-05-25 19:32:22 +02:00