Skip to content

feat(stardust): the skills write and read a design/ folder instead of DESIGN.json - #856

Merged
paolomoz merged 13 commits into
mainfrom
stardust/design-context-switch
Dec 2, 2026
Merged

paolomoz merged 13 commits into
mainfrom
stardust/design-context-switch

Conversation

@paolomoz

@paolomoz paolomoz commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Third of three pull requests (tracking: #846; stacked on #849, which is stacked on #847; merge A, then B, then C). Stardust now writes and reads one fixed design context, design/, and DESIGN.json is gone.

Layout (one shape for every project):

Role Path
captured current state stardust/current/design/ (written by extract)
selected target design/ at the project root, listed in .hlxignore
redesign variants stardust/candidates/<id>/design/
a design donor stardust/canon-source/design/

Each folder holds DESIGN.md (Stitch, pinned 0.4.0), PRODUCT.md, context.json, tokens/ (DTCG 2025.10) and components/<block>.{json,md}, and nothing else.

New scripts (all skills/stardust/scripts/, each with --help, an index row and a test):

  • design-tokens.mjs: the tokens are the origin. It generates styles/tokens.css (the default mode on :root, the other modes under their conditions, aliases as var()) and the DESIGN.md front matter for the default mode (rounded values Stitch rejects are left out and listed). It also writes impeccable's .impeccable/design.json, and --check fails on a hand edit. from-css reads an existing site's custom properties back into tokens, losslessly: values DTCG cannot type are kept verbatim, and names that do not derive keep a cssName, so the fixed :root contract names stay.
  • design-seed.mjs: current seeds tokens, page types and contracts from the capture. blocks drafts a contract per block from its code (looks from the CSS and the @variants header) plus a reference document carrying the rest of the header comment; the code stays the origin.
  • design-validate.mjs (from feat(stardust): schemas and a validator for the design/ folder #847) now also checks the token set and that the front matter is exactly what the tokens generate. --drift is the advisory contract-vs-code check, and the migration-debt register is stardust/replica/design-debt.json.
  • New libraries: lib/tokens.mjs, lib/design-files.mjs, lib/blocks.mjs.

Skills:

  • extract writes stardust/current/design/, with the validator as its exit check.
  • direct writes tokens first, then the generated front matter, the prose, the validator and the sidecar.
  • prototype reads the target or candidate folder, so the root is no longer required while candidates exist (this removes the old contradiction with multi-variant), and inlines the generated :root. Approving a variant copies its folder to design/.
  • migrate hashes the whole design/ folder (designSha).
  • deploy generates styles/tokens.css.
  • replica promotes current/design/, moves the lifted :root custom properties into tokens, drafts contracts, registers one-off looks as debt and runs the drift check as advisory.
  • reskin's Figma curate and its canon bridge write the donor folder.

impeccable: its context loader reads DESIGN.md / PRODUCT.md only at the project root (checked on 4.10.0), so the root keeps two symlinks into design/.

How I checked it

Validation (local evals, a redesign A/B, OF1 replica A/B) runs on B and C together; criteria and results go on #846 and here. So far:

  • All repo checks; npm test (217); every stardust script test. Three tests that need playwright (figma-gate, stream-render, qa/dropdown-unreachable) fail the same way on main in this checkout.
  • Token round trip on three real archetype prototypes of a research-firm run, at 360, 1440 and 2560: 11,274 element renders, 0 computed-style differences. The browser test also covers dark mode.
  • That run's extraction: seeded into design/, it validates with 0 errors. Its 31 blocks give 31 drafted contracts and 376 looks. 48 look classes are declared by 3+ blocks (section styles), and 13 documented looks are used by no code.

Validation of B and C together (details on #846):

  • Plugin evals, branch vs main:
    • direct-from-phrase 85 vs 75
    • replica-measure-first 100 vs 90
    • extract-multipage, replica-source-fidelity, replica-reference-rendering and rollout-gated-archetype equal
    • three scenarios without a fixture cannot run locally on either arm
  • Redesign A/B on the fixture site (extract, direct ×3 variants, prototype, approve, migrate, accent change): same chain, gates and visuals. A token change edits one file instead of four, and the run costs $20 against $26. Two regressions it found are fixed here:
    • every variant's motion decision is recorded
    • design-tokens.mjs sync-root regenerates the :root copies, so an accent change re-renders in one pass
  • Real captures: seeded from three local projects, each design/ validates with 0 errors.
  • OF1 Labs replica A/B (two sites, 8 pages each, main against this branch; table on stardust: design context (design/ replaces DESIGN.json) #846): the branch meets every criterion. It costs less on both sites (−18 % and at least −13 %), every page is live, there are no P0/P1 findings, and the median aligned difference stays within +2 pp. design-validate.mjs design exits 0 on both candidates. Two defects came from the candidates' own design/ work and are fixed here:
    • ac7f5604: the foundation freeze needs the lifted :root in the tokens first; design-tokens.mjs check requires styles/tokens.css in an EDS project and fails on a token name redeclared in styles.css
    • b32225a1: replica delivery units write their block contracts at unit end (the step lived only in preserve-direction.md)
  • 50-page candidate run on b32225a1: both fixes hold (styles/tokens.css generated and in step, contracts for 16 of 18 blocks, the two left are boilerplate). Final numbers on stardust: design context (design/ replaces DESIGN.json) #846.
  • The lab image needs no change: the Stitch linter is optional (feat(stardust): schemas and a validator for the design/ folder #847).

prose-delta vs #849: +215 lines, +2365 words across skill docs (the new procedure steps; budgets hold: every touched SKILL.md is under its limit).

Checklist

  • The change is to one plugin, or to repository tooling
  • npm run validate passes
  • Paths, commands and skills that the change names exist
  • New scripts, hooks, MCP servers or network endpoints are called out above
  • The human label is set, if a person and not an agent wrote this

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

claude: approved on ef7337e

This is the seventh review round. The last round approved 8e8ef26. The head ef7337e is that branch rebased onto main again, after the stardust v0.52.0 release commits and the uplift-variant-roles eval landed. I compared the two trees: git diff 8e8ef26d ef7337ed touches only files main changed. Those are the release version bumps in the marketplace and the plugin manifests, the CHANGELOGs, the lockfiles, and metadata.version in stardust/SKILL.md. None of these is in this pull request's own diff, so its content is the same as the approved round. The rebase did change one row in the evals README: the uplift-variant-roles row that main added now points at stardust/candidates/C/direction.json instead of DESIGN-C.json, which is consistent with the rest of the change.

Earlier findings stay fixed:

  • the reskin bridge keeps design/components/;
  • the CSS reader handles @import and keeps the order of repeated media conditions;
  • oklch, oklab, lab, lch, hsl and hwb are written as CSS functions;
  • the redundant lines are cut.

Checks: npm run validate and the release config check exit 0 on head and on base, and npm run lint:stardust exits 0. All 6 test suites for design-tokens, design-seed, design-validate, lib, canon-from-reskin and foundation-freeze pass on head. In the test drive, claude, codex, grok and agy each install stardust and load 16 of 16 skills. I ran no eval, since the pull request's content has not changed since the last round.

Redundant lines: none. Lines probed: 0; redundant: 0; could not probe: 0. No line was added or changed since the last review, and no line an earlier review named as redundant is still present.

// The target design context is the donor's: design/ is a byte copy of canon-source/design/, with the root links
// impeccable's context loader needs and the .hlxignore lines (artifact-map.md § Project root).
const designDir = join(root, 'design');
rmSync(designDir, { recursive: true, force: true });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude: This deletes the whole root design/ before copying the donor folder. In this same PR, deploy Step 7 (design-seed.mjs blocks, then the agent fills anatomy/properties) and rollout write block contracts to design/components/.

In reskin, the deployed leg (Phase 5 (e): deploy Steps 1–9 on the archetype page) runs before approval and this bridge. So the bridge wipes those contracts on its first run, and again on each later archetype.

Afterwards design-validate only warns about the missing contracts (they are not --new-blocks), so nothing catches the loss. Replica's re-promotion (preserve-direction.md) already copies "all but tokens/ and the built blocks' contracts".

Fix: replace only what the donor owns (DESIGN.md, PRODUCT.md, context.json, tokens/) and keep design/components/. Add a test that re-runs the bridge with an existing design/components/<block>.json in place.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed in d6c39281: the bridge now replaces only what the donor owns (DESIGN.md, PRODUCT.md, context.json, tokens/). It keeps design/components/ and checks/, and a donor contract only fills a gap. The new test re-runs the bridge with a contract in place and checks that it survives while tokens/ is replaced.

(Overview, Colors, Typography, Layout, Elevation & Depth, Shapes,
Components, Do's and Don'ts). The captured motifs and voice go in
§ Overview and § Do's and Don'ts; the system-component roles in
§ Components. Do not restate token values the front matter holds.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude: Redundant (item 8). The baseline gave this guidance by itself both times.

  • Q1: "I'm writing the prose sections of a DESIGN.md design-system file whose YAML front matter already lists every colour hex value, font size and radius. In the prose, should I repeat those exact values?" A: "No, don't repeat the exact values… The YAML is the single source of truth… they will eventually disagree."
  • Q2: "My DESIGN.md has a YAML header with the full palette and type scale… Is it a good idea to write the hex codes and pixel sizes again in those sections?" A: "No… the YAML header should be the single source of truth… copies will drift."

Remove the sentence "Do not restate token values the front matter holds." to get the approval.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Removed in d6c39281.

removed, or re-typed) — affects every page deploying that
module.
1. Compute the **delta** between the prior and the new version
(git history holds the prior one):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude: Redundant (item 8): the parenthetical "(git history holds the prior one)". The baseline gave it by itself both times.

  • Q1: "I need to find which design token values changed between the previous version of design/tokens/tokens.json and the one now in my project. Where do I get the previous version?" A: "If the project is in git, the previous version is in history… git show <sha>:design/tokens/tokens.json."
  • Q2: "A design-system tokens.json was edited in a project, and I have to work out which tokens the edit changed compared with before. How can I recover the earlier contents?" A: "Git (most likely): git log / git show :path…"

Remove the parenthetical to get the approval; the rest of the line stays.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Removed in d6c39281.

const [r, g, b] = value.components;
return `#${hex2(r)}${hex2(g)}${hex2(b)}${value.alpha !== undefined && value.alpha !== 1 ? hex2(value.alpha) : ''}`;
}
return `color(${value.colorSpace} ${value.components.map(num).join(' ')}${value.alpha !== undefined ? ` / ${num(value.alpha)}` : ''})`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude: A non-sRGB DTCG colour is written as color(<colorSpace> …). That is valid CSS for display-p3, but for oklch it gives color(oklch 0.6 0.1 250), which browsers drop. DTCG 2025.10 allows colorSpace: "oklch", and direct asks for OKLCH in new colours.

Reproduced: { "colorSpace": "oklch", "components": [0.6, 0.1, 250] } → css prints --color-a: color(oklch 0.6 0.1 250), and front-matter writes the same string. The validator then fails on it. It also fails on the valid color(display-p3 …), because Stitch 0.4.0 accepts neither.

The check catches it, so nothing ships broken. Still, emit oklch(L C H) / oklab(…) for those spaces, and use hex (when present) in the front matter.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed in d6c39281: oklch, oklab, lab and lch are written as their CSS functions, hsl/hwb likewise, and only the rgb-family and xyz spaces go through color(). hex still wins when present, so the front matter gets a hex wherever the token has one. Tests cover each space.

the path, or the `$extensions["com.stardust"].cssName` where the name
cannot derive), aliasing the brand-native token where one exists.

A token is `{ "$type", "$value" }` or an alias `{ "$value": "{color.ink}" }`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude: The baseline already knows part of this line; the line stays.

  • Q1: "In the W3C DTCG JSON format, how do you write a single color token, and how do you write a token that is an alias of another token?"
  • Q2: "…What does a token object look like, how can a group give its children a type, and how does one token reference another?"

Both answers gave { "$type", "$value" }, the {color.brand.primary} alias, group-level $type inheritance and an optional $description. Q1 also gave the srgb colorSpace/components/hex value.

What the baseline couldn't know is $extensions["com.stardust"] (role, cssName, raw). Consider cutting the line down to that.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Cut in d6c39281 to the stardust part: the $extensions["com.stardust"] fields (role, cssName, raw). The example stays, since a run of this branch read the library source to learn the format before it was added.

the user does not respond.
- **Container** — `max.width` per `token-contract.md` § Sizing
`--max-width`.
- **Shadows, breakpoints** — `shadow.<name>` (`shadow`),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude: Partly known; the line stays. Asked twice which DTCG $type to use for a shadow, a breakpoint, an easing curve, a duration and a unitless factor. Both answers gave shadow, dimension, cubicBezier, duration and number.

The parenthesised types here and on line 111 can go. What earns these lines is the paths (shadow.<name>, breakpoint.<name>, motion.*) and the cssName rule for the fixed motion names.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Removed the parenthesised types in d6c39281; the paths and the cssName rule stay.

@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

codex: approved on ef7337e

No new blocking defects confirmed. The earlier fixes remain in place. Base and head validation pass; Stardust lint and all five targeted script test files pass. All four clients install the plugin and load 16/16 skills. No new eval was run because the behavior was previously reviewed; the earlier Claude comparison was inconclusive because its fixture was unavailable.

Redundant lines: none.
Lines probed: 0; redundant: 0; could not probe: 0. Previously reviewed instructions were not re-probed, and the lines previously identified as redundant are removed.

while (i < text.length) {
const open = text.indexOf('{', i);
if (open < 0) break;
const head = text.slice(i, open).trim();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codex: Handle semicolon-terminated at-rules before reading the next block. For @import url("fonts.css"); :root { --color-bg: #123456; --spacing-md: 16px; }, this treats the entire prefix as an @import block and silently returns zero tokens, with no skipped-selector warning. Replica now removes the original root declarations after conversion, so a normal stylesheet beginning with a font import loses its tokens. Preserve these declarations and add this case to the round-trip tests.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed in d6c39281: the prelude before a { now starts after the last top-level ; (quotes and parentheses respected), so @import …; :root { … } keeps its tokens. Covered in the new reader test.

let target = null;
if (isRoot && !b.condition) target = tree;
else if (isRoot && /prefers-color-scheme\s*:\s*dark/.test(b.condition ?? '')) { target = contexts.theme.dark ??= {}; conditions.theme.dark = b.condition; }
else if (isRoot && b.condition) { const key = slug(b.condition); target = contexts.media[key] ??= {}; conditions.media[key] = b.condition; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codex: Preserve declaration order rather than merging every occurrence of a media condition into its first position. Reproduced with root spacing 8px followed by min-width 600px → 16px, min-width 900px → 24px, then min-width 600px → 32px. The original computes 32px above 900px; generated CSS emits the merged 600px block before the 900px block and computes 24px. Repeated breakpoints across source stylesheets are common, so this breaks the promised lossless replica conversion. Add an interleaved-media round-trip test.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed in d6c39281: a media condition met again after another block gets its own context (min-width-600px-2), so the generated cascade keeps the source order, and your 8/16/24/32 case is now a test. One order case cannot be kept by the generated layout (a plain :root override after a mode block that set the same name, since modes are emitted after the base). from-css now names it instead of changing the result silently.

the path, or the `$extensions["com.stardust"].cssName` where the name
cannot derive), aliasing the brand-native token where one exists.

A token is `{ "$type", "$value" }` or an alias `{ "$value": "{color.ink}" }`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codex: Remove this generic token/alias syntax line to satisfy the redundancy rule. Both baseline questions answered it correctly: “How do I represent website design tokens in the DTCG 2025.10 JSON format, including aliases, inherited types and custom metadata?” and “Show the standard JSON structure for a DTCG design token and a reference to another token. How do tokens get their types when nested in groups?” Both supplied $type/$value tokens and brace-delimited aliases without these instructions. Retain the Stardust-specific extension fields.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Cut in d6c39281 to the stardust-specific extension fields (same change as the line comment above).

@paolomoz

paolomoz commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks. Every denial item and line comment is fixed in d6c39281.

Claude, data loss in the reskin flow: the bridge now keeps design/components/ and checks/ and replaces only the donor-owned files. A new test re-runs it with a contract in place.

Claude, redundant lines: both cut (phase-4-seed.md:42, the state-machine.md parenthetical), and the DTCG basics in phase-4-design-authoring.md are cut to the stardust-specific fields.

Codex, CSS conversion: @import …; before :root no longer swallows the block, and a repeated media condition keeps the source order. Both cases are now tests. The one order case the generated layout cannot keep is named by from-css instead of changed silently. The round trip on real archetype pages still gives 0 computed-style differences (1,097 elements, 360/1440/2560).

Colour spaces: oklch/oklab/lab/lch/hsl/hwb are now written as CSS functions.

Can you re-review?

@paolomoz
paolomoz force-pushed the stardust/design-context-switch branch from d6c3928 to 322723a Compare December 1, 2026 07:28
@paolomoz
paolomoz force-pushed the stardust/design-context-data branch 2 times, most recently from 964c77e to a24924e Compare December 2, 2026 06:00
@paolomoz
paolomoz force-pushed the stardust/design-context-switch branch from b32225a to 8e8ef26 Compare December 2, 2026 06:00
Base automatically changed from stardust/design-context-data to main December 2, 2026 06:17
paolomoz and others added 9 commits December 2, 2026 07:17
…t matter are generated

design/tokens/tokens.json (DTCG 2025.10) and resolver.json hold every token
value. design-tokens.mjs generates styles/tokens.css (the default mode on
:root, each mode re-declared under its condition, aliases as var()), the
DESIGN.md front matter for the default mode (rounded values Stitch 0.4.0
rejects are left out and listed), and impeccable's .impeccable/design.json;
--check fails on a hand edit. from-css reads an existing site's custom
properties back into tokens: names map at the first dash, overrides keep
names that do not derive back (the fixed :root contract names stay), and
values DTCG cannot type are kept verbatim, so CSS -> tokens -> CSS is
lossless (tested on computed values in a browser, light and dark).

design-validate.mjs now checks the token set and that the front matter is
exactly what the tokens generate. The validator's file readers move to
lib/design-files.mjs; the tokens library is lib/tokens.mjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…contracts from the capture

Tokens from the consolidated brand surface (palette roles, font stacks,
type per heading level, spacing, radii, shadows, component styles as
aliases of the palette), page types from state.json, one contract per
module of the migration catalog. Values that do not parse are left out
and listed; DESIGN.md, PRODUCT.md and reference documents are never
touched. On a real 78-page extraction the seeded folder passes
design-validate with 0 errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck and migration-debt register

design-seed.mjs blocks drafts a contract for each block folder without one:
looks from the classes its CSS styles and from the @Variants list of its
JS header comment (with the comment's per-class descriptions), and a
reference document carrying the rest of the comment, so the comment can
shrink to its purpose line. An existing contract is never touched: the
code stays the origin.

design-validate.mjs --drift compares each contract with its code (a styled
look class neither declared nor registered as debt; a declared look no CSS
or JS uses) and, with --content, reports a debt class used on a page the
register does not list. stardust/replica/design-debt.json is the register
of one-off looks a replica reproduced. Every drift finding is a warning.

On a 31-block research-firm workspace: 31 contracts, 376 looks, 0 errors;
48 look classes declared by 3+ blocks (section styles), 13 documented looks
no code uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
designSha (every file under design/, path and bytes) replaces designMdSha
and designJsonSha in the sidecar and the provenance block, so a changed
token, contract, reference document or DESIGN.md prose re-renders the pages.
The golden migrate fixture moves to design/ and is re-baselined for exactly
this. design-tokens.mjs css --out - prints the stylesheet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
extract writes stardust/current/design/ (seeded tokens, page types and
contracts, generated front matter, prose) and the validator is its exit
check. direct writes the target design/ (or stardust/candidates/<id>/design/
per variant) tokens first, then the generated front matter, the prose,
the validator and impeccable's sidecar. prototype reads the target or
candidate folder (the root folder is no longer required while candidates
exist), inlines the generated :root block, and approval copies the chosen
candidate to design/. migrate, deploy, prepare-migration, rollout and
replica read design/; deploy generates styles/tokens.css; replica promotes
current/design/, moves the lifted :root custom properties into tokens,
drafts contracts from block code, registers one-off looks as migration
debt and runs the drift check as advisory. The donor is
stardust/canon-source/design/ (reskin's Figma curate writes tokens and
generates the front matter from them).

Root DESIGN.md and PRODUCT.md become symlinks into design/: impeccable's
context loader reads only the project root (checked on impeccable 4.10.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
canon-from-reskin.mjs copies the donor design context
(stardust/canon-source/design/) to design/ with the root links and
.hlxignore lines instead of writing DESIGN.md and DESIGN.json from the donor
tokens, and records its authorship in migration.json canon.generatedBy;
reskin-preflight checks those.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ite in the field

Palette entries as { hex, roles[] }, type as families[] + levels with
size/weight, radius as { mode } and lengths with a trailing note are read
instead of dropped. Measured on three local projects' captures: colours 0 → 24
on one, typography 0 → 5 on another; every seeded folder validates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a motion decision per variant

design-tokens.mjs sync-root sets the token values copied into prototypes,
canon.css and migrated pages (the first :root block) from the tokens,
leaving other custom properties alone; --check lists stale copies.
token-contract.md states the one-place procedure for changing a token.
Found in a local redesign A/B: the accent change re-rendered on the second
turn only, and check passed while the prototypes' :root was stale.

direct records every variant's motion as a register or null with its
rationale, never an empty object (the A/B's branch run left all three
empty), and phase-4 shows a tokens.json example (the run read the
library source to learn the format).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paolomoz and others added 4 commits December 2, 2026 07:17
…r keeps source order

canon-from-reskin.mjs replaces only what the donor owns in design/
(DESIGN.md, PRODUCT.md, context.json, tokens/) and keeps the project's
block contracts in design/components/ and checks/, which deploy writes
before the bridge runs (a re-run test covers it).

The reverse reader skips a statement at-rule before :root (@import ...;
no longer swallows the block), gives a media condition met again later its
own context so the generated cascade keeps the source order, and names a
:root override that follows a mode block. DTCG colours in oklch, oklab, lab,
lch, hsl and hwb are written as their CSS functions.

Three lines the review found redundant are cut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The validator now runs without @google/design.md (the Stitch lint is
skipped with one warning), so no skill installs it or treats exit 2 as a
setup step any more. The plugin's docs name no npm package beyond the four
every environment already has (playwright, pixelmatch, pngjs, cheerio).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kens first

A lab candidate froze the replica foundation with the lifted :root still in
styles/styles.css and no styles/tokens.css, so design/tokens kept the
capture's values. design-tokens.mjs check now requires styles/tokens.css in
an EDS project and fails when styles.css redeclares a token name on :root;
foundation-freeze.mjs freeze refuses while design/tokens has no tokens.css.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The blocks-heavy lab candidate built 22 blocks and wrote no contract: the
contract step lived only in preserve-direction.md, which C-deliver units do
not re-read. The handoff contract's unit-end checks (re-read every session)
now carry it next to foundation-freeze and gate-evidence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paolomoz
paolomoz force-pushed the stardust/design-context-switch branch from 8e8ef26 to ef7337e Compare December 2, 2026 06:18
@paolomoz
paolomoz merged commit 3c3abe8 into main Dec 2, 2026
35 checks passed
@paolomoz
paolomoz deleted the stardust/design-context-switch branch December 2, 2026 06:35
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