You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6fefd08
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(stardust): reskin's canon bridge records canon and modules in stardust/migration.json
canon-from-reskin.mjs (the reskin -> migrate bridge) wrote canon and the
module catalog into DESIGN.json extensions; they are migration settings and
now go to stardust/migration.json like the rest of the prep cascade's (other
keys of the file are kept). reskin-preflight reads them there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
constdesignMd=`# DESIGN\n\n> Generated by stardust:reskin/canon-from-reskin at ${at} from \`${rel(opt.tokens)}\` (donor: \`${donorUrl}\`). The donor is the design authority; this file restates its tokens for migrate. Do not hand-edit — re-run the bridge.\n\n## Tokens\n\n| token | value |\n|---|---|\n${flat.map(([k,v])=>`| \`${k}\` | \`${v}\` |`).join('\n')}\n\n## Canon\n\n- Source archetype: \`${slug}\` (approved ${approvedAt})\n- Files: ${Object.entries(files).map(([k,f])=>`${k} \`${f.path}\``).join(' · ')}\n- Pinned: ${Object.entries(pinned).map(([k,v])=>`\`${k}\`=${v}`).join(' · ')}\n\n## Compositional moves\n\n${moves.map((m)=>`- ${m}`).join('\n')}\n`;
Copy file name to clipboardExpand all lines: plugins/stardust/skills/reskin/scripts/reskin-preflight.mjs
+12-9Lines changed: 12 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@
14
14
* (its merged :root or any rule), in a style attribute of the canon markup, or one of
15
15
* stream-render's MARKUP_VARS; WARN for undefined ones read only with a fallback
16
16
* FAIL DESIGN.json source.kind is "donor" (written by the bridge, not by direct)
17
-
* FAIL DESIGN.json extensions.canon.files match the canon files on disk (no hand edit, no overwrite)
17
+
* FAIL stardust/migration.json canon.files match the canon files on disk (no hand edit, no overwrite)
18
18
* FAIL direction.md carries an "## Active" direction
19
19
* FAIL dynamic-features.md exists and every feature row has a disposition
20
-
* FAIL every module a typed page's mapping uses has a canon skeleton (DESIGN.json extensions.modules)
20
+
* FAIL every module a typed page's mapping uses has a canon skeleton (stardust/migration.json modules)
21
21
* FAIL no agent approval outside hands-off (approvedBy hands-off/autopilot/agent needs state.handsOff and "hands-off")
22
22
* FAIL the reskin predicate: each type's archetype is gated in reskin/ledger.json (reskin-ledger.mjs) —
23
23
* its deployed evidence's codeStamp still the project's code (deployed-gate stamp) —
@@ -156,15 +156,18 @@ export function preflight(read, { dir = 'stardust', stamp = null } = {}) {
156
156
elseok('canon',`${dir}/canon/canon.css opens with :root`);
157
157
158
158
constdesign=json('DESIGN.json');
159
+
constmigration=json(`${dir}/migration.json`);
159
160
if(!design)fail('design',`DESIGN.json ${design===undefined ? 'is missing' : 'is not valid JSON'} — run canon-from-reskin.mjs`);
160
161
else{
161
162
if(design.source?.kind==='donor')ok('design','DESIGN.json is donor-sourced');
162
163
elsefail('design',`DESIGN.json source.kind is ${design.source?.kind ? `"${design.source.kind}"` : 'unset'} — something other than the bridge wrote it (direct / extract --prep?); re-run canon-from-reskin.mjs --force`);
163
-
constfiles=design.extensions?.canon?.files;
164
-
if(!files)fail('canon-record','DESIGN.json has no extensions.canon.files');
164
+
}
165
+
{
166
+
constfiles=migration?.canon?.files;
167
+
if(!files)fail('canon-record',`${dir}/migration.json has no canon.files — run canon-from-reskin.mjs`);
if(undef.length)fail('canon-tokens',`${dir}/canon/canon.css reads ${undef.length} custom propert${undef.length===1 ? 'y' : 'ies'} defined nowhere, without a fallback: ${undef.join(', ')} — re-run canon-from-reskin.mjs --force (it merges every :root block of the archetype into canon.css's :root)`);
@@ -206,8 +209,8 @@ export function preflight(read, { dir = 'stardust', stamp = null } = {}) {
206
209
207
210
// Every module a typed page's mapping uses needs a canon skeleton, or migrate has nothing to render it with.
0 commit comments