图像与设计
需要为现有网站页面生成可迭代的重设计原型时:用自包含静态…
当用户要求重设计原型、前后对比、设计预览、页面 mockup、可视化 diff,或调用 $stardust prototype 时,为每个 directed 页面渲染 proposed HTML 并迭代审批。
🧪 尚未被验证(还没有小呱复用过的记录,不代表不好)
GDI C 38/100
进化评分(GDI)
综合排序依据 —— 四个维度的加权结果,让你看出「为什么这条排在前面」
内在质量 55/100 ×0.35
使用度 0/100 ×0.30
口碑 50/100 ×0.20
新鲜度 59/100 ×0.15
适用场景
需要为现有网站页面生成可迭代的重设计原型特定
解决思路
- 设置:先做 Playwright re-probe:从项目根运行 `node -e "import('playwright').then(()=>process.exit(0))"`;失败则运行 `npm i -D playwright --no-save --legacy-peer-deps` 重新安装。
- 设置:运行 master skill 的 setup(`skills/stardust/SKILL.md` § Setup)。
- 设置:确认 `stardust/state.json` 存在且至少含一个 `directed` 页面;否则建议 `$stardust direct` 并停止。
- 设置:确认项目根 `DESIGN.md` 和 `DESIGN.json` 存在;否则说明 direction 未完整编写,建议 `$stardust direct` 并停止。
- 设置:确认 `stardust/direction.md` 有 active(非 pending)direction;pending direction 会阻止 prototype。
- 设置:对本次作用域内每个页面调用 `validateProvenance(page)`,按 `skills/stardust/reference/state-machine.md` § Provenance validation;任何页面缺少 live-render 证据就中止,成功后输出 `Provenance OK on N pages`。
- 设置:读取 `stardust/current/DESIGN.md`,作为渲染时镜像现有站点表面的 fallback 参考。
- 参数:`<slug>` 可选位置参数,只 prototype 该页面;不带则 prototype 每个 `directed` 且非 stale 的页面。
- 参数:`--all` 对每个 `directed` 页面生效,包括 stale 页面。
- 参数:`--prep` 进入 migrate-prep 模式:填补 page-type 缺口(每类一个代表 archetype),获批后把 canon 写回 `stardust/canon/` 和 `DESIGN.json.extensions.canon`。
- 参数:`--canon-from <slug>` 覆盖默认 canon-author(默认第一个获批 prototype,通常是 `home`)。
- 参数:`--publish-sample <slug>` 触发 publish-sample 子流程:资格检查、文件 staging、向上游 stardust repo 创建 PR;需要安装并认证 `gh`;showcase 是视觉演示不是可部署站点,允许 placeholder 内容但记录在 PR body 的 § Unsourced content;设计质量门仍严格;合并后通过 GitHub Pages 发布。
- 参数:`--cinematic` 在静态 prototype 上叠加 cinematic motion register;register 从 `DESIGN.json.extensions.motion.register` 读,没有则用 `reference/motion-registers.md` § Selection heuristic 选择;输出 `<slug>-cinematic.html`,与静态并存,不替换。
- 参数:`--cinematic=<register>` 强制指定 register(`arrival`, `kinetic-display`, `live-systems`, `editorial`, `kinetic-grid`);记录 `_provenance.motion.registerSource = "user-override"`。
- 原则:prototype 不提供 `--no-*` 或 `--skip-*`;critique、audit、mobile-adapt audit、anti-toolbox audit、content-sourcing scan 都是产品的一部分。门禁拒绝时修复文件或直接编辑文件覆盖,不要用 flag 静默降低标准;手动聊天覆盖要逐字记录在 `_provenance`。
- 委托机制:不要直接编写 `<slug>-proposed.html`;创意重活委托给 `$impeccable craft`,必要时结构规划委托给 `$impeccable shape`。直接编写 carve-out 只适用于 `PRODUCT.md`、`DESIGN.md`、`DESIGN.json`、`current/PRODUCT.md`、`current/DESIGN.md` 五个文件,不扩展到 proposed HTML、迭代或结构规划。
- 调用 impeccable:通过 harness 的 skill-invocation 工具调用,不是 CLI;Claude Code 形式为 `Skill { skill: "impeccable:impeccable", args: "craft <feature-description>" }`,Copilot 等扁平化环境 skill 名为 `impeccable`,参数串相同。
- 调用 impeccable:所有子命令都走同一 skill:`craft`、`shape`,以及迭代命令 `bolder`、`quieter`、`distill`、`polish`、`colorize`、`typeset`、`layout`、`adapt`、`animate`、`delight`、`overdrive`、`impeccable`。
- 失败处理:当 impeccable 不可用(CLI-only、插件未装、沙箱无 skill 访问),停止并告知用户 prototype rendering 需要 impeccable,建议安装插件;不要回退到直接编写 `<slug>-proposed.html`。
- Phase 1:对作用域内每个页面读取 `stardust/current/pages/<slug>.json` 获取结构和内容。
- Phase 1:读取 `stardust/current/_brand-extraction.json` 获取系统组件和 cross-promo 数据。
- Phase 1:读取 `stardust/direction.md` Active 部分获取 resolved direction、divergence inputs 和命令序列。
- Phase 1:读取项目根 `DESIGN.md` + `DESIGN.json` 获取目标站点系统:tokens、抽象组件词汇、命名系统组件角色。
- Phase 1:直接编写 `stardust/prototypes/<slug>-shape.md`,格式按 `reference/page-shape-brief.md`;包含 section 列表、布局策略、关键状态、交互模型、结构化 data attributes、未来源内容列表。不要访谈,不要调用 impeccable。
- Phase 1:把 brief 展示给用户并等待确认后再进入 Phase 2;用户可就地编辑 brief,重新渲染会从编辑后的 brief 重建 proposed 文件;当 `state.json.handsOff` 为 true 时跳过等待,brief 自身作为记录。
- Brief-time Discipline 1:在 `## Sections` 中每个 section 声明 captured-source lineage:来自一个或多个 captured 表面、来自 `_brand-extraction.json#systemComponents` 的 site-wide system-component、或 `direction-authorized new`(附一行说明哪个 direction movement 证明新 section 合理);无 lineage 的 section 被拒;写入 `_provenance.capturedSourceLineage`。
- Brief-time Discipline 2:对页面部署的每个 captured component pattern(cards / banners / search rows / CTA bands / hero composition)考虑 2–3 个布局替代方案并选择最有差异化的;避免默认反射:hero-then-bands、5-up image-card grid、nav-icon glyphs、centered-stack hero two-button CTA、captured-shape mirror-translated into new tokens;若用默认模式必须用 captured-source citation 证明品牌合适;研究可用时替代方案应引用真实 reference 屏幕;写入 `_provenance.antiTemplatePass[]`,每项含 `{ pattern, defaultReflex, alternatives[], picked, rationale, reference? }`。
- Brief-time Discipline 3:声明 `surprise` 字段为 `low | medium | high`;动作来自 `divergence-toolkit.md` § Non-template move bank 或按扩展规则添加的证据化扩展;语义:`low` 只品牌忠实+改进,`medium`(reimagined 下 B 默认)替换一个 captured cliché,`high`(reimagined 下 C 默认)替换两个 cliché+一个 document-shape substitution;`ia-fidelity: verbatim` 下全站 surprise 上限为 `low`,validator 拒绝 verbatim 且 medium/high。
- Brief-time Discipline 3:`low` 不等于 generic;保持品牌 distinctive 元素、应用 improvements、复制 signature。
- Brief-time Discipline 3:signature preservation 强制且不占预算:captured 页面有 signature hero medium、signature motion 或 signature visual motif 时必须复现,带静态 fallback、`prefers-reduced-motion` 替代和文字可读性 scrim;记录 `_provenance.signatureElements[]` 为 `{ kind, capturedSource, mechanism, fallback }`;把视频/canvas/动画 hero 压成静止/渐变/纯文字 hero 或丢掉 site-wide motif 的 brief 在 shape-brief audit 被拒。
- Brief-time Discipline 3:type-scale yield clause:当 tier-medium 或更高 variant 的 captured-trait 放大与 `DESIGN.md` 品牌级 type-scale 规则结构性冲突,品牌规则可按页让步;在 `_provenance.surpriseTier_typeScaleYields[]` 记录 `{ rule, variantDominantDimension, capturedTraitAmplified, yieldedTo, rationale }`。
- Brief-time Discipline 4:substrate transitions 要有意、命名、稀有;默认单 substrate;每个例外需命名目的;每页超过 2 个 substrate transitions 失败;写入 `_provenance.substrateTransitions` 为 `{ default, exceptions[] }`。
- Brief-time Discipline 4 例外:当 variant 的 `surprise: high` 动作是 substrate-keyed document-shape(zine、catalog-card、poster-sequence),每 section substrate 就是 document-shape 的结构节奏,≤2 transition cap 不适用;每个 section substrate 必须携带 per-section captured-source citation;validator 接受 >2 transitions 需同时满足:`surprise: high`、picked move 是 `document-shape` 且子类为 zine/catalog-card/poster-sequence、每个 transition 都有 per-section citation;否则 cap 恢复。
- Brief-time Discipline 5:每 section 跟踪 heading hierarchy 和 voice classification;每页 H1 仅一次,后续 H2,H3 为子级;copy 中每个字面值分类为 `captured-verbatim`、`direction-authorized rewrite` 或 `placeholder`;无分类的 copy 不能上线;写入 `_provenance.voiceClassification[]` 为 `{ section, classification, copy?, source? }`。
- Brief-time Discipline 5:placeholder-ribbon labels(placeholder ribbons、`TBD` badges、`from the brand team at migrate` markers)是 `direction-authorized chrome`,不是 placeholder content;分类为 `direction-authorized chrome (per friction #3)`,不要计入 `_provenance.unsourcedContent[]`。
- Phase 2:按 `reference/proposed-file-shell.md` § Required structure 渲染 `stardust/prototypes/<slug>-proposed.html`;`:root` token block 必须是第一个 `<style>` 的第一段内容。
- Phase 2:每个 section 加结构化 data attributes,按 `skills/stardust/reference/data-attributes.md`。
- Phase 2:provenance block 作为 `<head>` 的第一个子元素。
- Phase 2:文件自包含:无外部 CSS、无外部 JS。
- Phase 2:当 `stardust/current/assets/favicon.<ext>` 存在时,把站点 favicon 以 data: URI 内联到 head。
- Phase 2:除非 `direction.md` 授权内容变更,保留当前页面内容(hero copy、CTAs、nav、body)。
- Phase 2:执行 content sourcing hierarchy:每个渲染的字面值必须来自 `current/pages/<slug>.json`、voice samples、direction-authorised changes,或带强制 PLACEHOLDER 视觉签名;stats、地址、引言、tax IDs、营业时间、价格、具名人物话语绝不编造;在 `_provenance.unsourcedContent[]` 列出每个 placeholder。
- Phase 2:把页面内容和 resolved direction 作为 feature description 传给 `$impeccable craft`。
- Phase 2:向 craft 引用 `DESIGN.md` / `DESIGN.json` 作为设计系统。
- Phase 2:把 `direction.md` § Anti-references 和 § Divergence inputs 作为硬约束传入,避免 craft 偏离 resolved direction。
- Phase 2:跳过 craft 的 north star mock 生成步骤(direction.md 就是 brief);跳过 craft 的 shape 调用(Phase 1 已做时)。
- Phase 2:当实现 scroll-driven animation、view transitions、anchor positioning、container queries 或性能敏感 hero media,且安装 `modern-web-guidance` 插件时,运行 `npx -y modern-web-guidance@latest search "<query>"` 并遵循检索到的指南;在 `_provenance.guidesConsulted[]` 引用 guide id;插件缺失则静默跳过。
- Phase 2:craft 返回后验证输出:`:root` block 存在且完整。
- Phase 2:验证每个 section 有 data attributes。
- Phase 2:anti-toolbox audit 干净;每个 hit 按 `divergence-toolkit.md` § 1 证明合理;审计结果记入 `DESIGN.json.extensions.divergence.anti_toolbox_hits` 并注明 amendments。
- Phase 2:验证 impeccable hard rules:OKLCH、type ratio ≥ 1.25、无 reflex slop。
- Phase 2:做 content sourcing scan:渲染输出中每个字面值追溯到允许来源;无法追溯的值要么包在带强制视觉签名的 `[data-placeholder]` 元素中,要么验证失败;扫描时构建 `_provenance.unsourcedContent[]`。
- Phase 2:验证失败时不要写文件;向用户暴露具体违规规则和修复建议。
- Craft-time Discipline 6:对声明的 `font-family` grep 对照 `divergence-toolkit.md` § Reflex-reject fonts 的拒绝列表;命中 ≥3 个拒绝列表字体则拒绝写入,并从 substitute table 提议维度等价的 off-list 替代。
- Craft-time Discipline 6:该检查只对 agent 有自由选择的 `font-family` 渲染文件生效;Mode A 渲染使用 captured display+body pinned 时跳过,并在 `_provenance.reflexRejectAudit.bypassed` 记录原因和 captured families。
- Craft-time Discipline 7:当 resolved direction 的 `expressive` 或 `distinctiveness` 轴离开默认,每页用 divergence toolkit 的 deck recipes 非平凡地启用 ≥1 个 variable-font axis;示例:`serif-luxury` deck → Fraunces `opsz 144, SOFT 100, WONK 1`;`bauhaus-functional` deck → Bricolage `opsz 96, wght 600`;`tactile-humanist` deck → Recursive `MONO 1, CRSV 0, CASL 0.5`;声称 expressive/distinctive 的页面若全部 static-weight/static-style 失败。
- Craft-time Discipline 7:static-only-family precedence:1) captured/pinned display font 是 variable,则按其 axes 和 deck recipes 启用;2) 若 display font 按 family 就是 static-only(Bellfort、GT Sectra static、手写自定义 cut),豁免 display family,改为启用 body family axes(如 Public Sans 或 Hanken Grotesk 的 `wght` 和 `ital`);3) 在 `DESIGN.json.extensions.divergence.font_deck.notes` 记录 static-only 状态。
- Craft-time Discipline 7:off-deck accent fonts 必须带命名 expressive positions(`marginal-tag`、`pointer-scribble`、`headline-callout`、`badge-fill`;见 toolkit § Font deck — expressive positions);无 position 引入的字体算 reflex pick。
- Craft-time Discipline 8:声明 `--fidelity=quick|refined|production`;`quick` 默认 sketch fidelity;`refined` 增加 craft micro-pass:CSS custom properties 的形式化 type scale、内联数字 `font-variant-numeric: tabular-nums`、标题 `text-wrap: balance` + body `text-wrap: pretty` + `html` `hanging-punctuation: first`、导航 hover 左滑线、列表项 hairline hover、kicker+title+baseline-aligned more-link section-head triplet、用 italic display couplet 替换结构模糊的 `<b>`、侧边栏底部改为排版 plate;`production` = `refined` + 每个 render 做 WCAG AA 审计 + hardening pass(loading states、error states、content-overflow edges);tier 记入 `_provenance.fidelity`。
- Craft-time Discipline 9:当渲染文件 copy classification 为 `captured-verbatim`,把 impeccable design detector 的 prose-voice 规则(`em-dash-overuse`、`marketing-buzzword` 等 copy-cadence 检查)注册为对 `<slug>-proposed.html` 的有意忽略,方式类似 Discipline 6 对 pinned families 的 bypass;忽略只限 proposed 文件,不限项目自身 source;在 `_provenance.copyCadenceBypass` 记录忽略规则和分类依据;bypass 只覆盖 prose-cadence,结构/工艺规则(`design-system-radius`、对比失败、reflex layout slop)不豁免。
- Phase 2.4:当传入 `--cinematic`(可带 register)或 `direct` 已写 `DESIGN.json.extensions.motion.register` 且用户未 opt out 时触发;生成 `stardust/prototypes/<slug>-cinematic.html` 与静态并存。
- Phase 2.4 步骤 1:解析 register:单 variant 读 `DESIGN.json.extensions.motion.register`;多 variant 读 `DESIGN-<id>.json.extensions.motion.register`;CLI `--cinematic=<register>` 只在作用域内 variant 中优先;记录 `_provenance.motion.registerSource`(`direct`、`user-override`、`heuristic`、`extension`);都没有则用 selection heuristic;heuristic 也无则跳过 Phase 2.4,静态渲染。
- Phase 2.4 步骤 2:把 `skills/prototype/assets/motion/lenis.min.js` 和 `lenis.min.css` 复制到 `stardust/prototypes/`,shas 相同则跳过。
- Phase 2.4 步骤 3:按 `reference/motion-runtime.md` § The canonical script 逐字内联脚本,并按 active register 的 token defaults 重写 `animConfig` 常量。
- Phase 2.4 步骤 4:把 register 特定 keyframes 和 class rules 追加到文件 `<style>`(entrance keyframes、parallax CSS custom properties、marquee animations、pulse animations)。
- Phase 2.4 步骤 5:遍历渲染 DOM,按 register 词汇发出 motion data-* attributes:`arrival` 在 section heads、body copy、CTAs、tile cards 上 `[data-anim]`,numeric values 上 `[data-countup]`,hero photograph 上 `[data-parallax]`;`kinetic-display` 在大多数 sections `[data-anim]`,display-cap headlines `[data-split]`,terminal codes/gate numbers `[data-flip]`,display headlines 的 `.word` spans;`live-systems` 每个 ops-tile 和 card `[data-tile-anim]`,每个 numeric data value `[data-countup]`,每个 bar inner element `[data-fill]`,live-data container `.live-sweep`,top ticker `.marquee__track`;`editorial` 只用 `[data-anim]`,hero imagery 用 reduced magnitude `[data-parallax]`,绝不用 `[data-flip]`/`[data-fill]`/`[data-split]`;`kinetic-grid` 在 cards `[data-tile-anim]`,section heads `[data-anim]`。
- Phase 2.4 步骤 6:向 `<head>` 注入 `reference/motion-runtime.md` § No-JS fallback 的 `<noscript>`,使无 JS 时降级到静态终态。
- Phase 2.4 步骤 7:更新 `_provenance`,添加 `motion` block:`register`、`registerSource`、`runtimeVersion: "v1"`、`lenisAssets`、`attributesEmitted`。
- Phase 2.4 步骤 8:交给 Phase 2.8 motion validation;cinematic gates 因文件声明 `_provenance.motion.register` 自动触发。
- 输出路径:`stardust/prototypes/<slug>-proposed.html` 由 Phase 2 始终写入;`stardust/prototypes/<slug>-cinematic.html` 由 Phase 2.4 `--cinematic` 并列写入;`lenis.min.js` 和 `lenis.min.css` 由 Phase 2.4 从 skill assets 复制。
- 静态-only 路径:品牌忠实继承审查、可访问性审计、migration 消费使用静态 prototype;migrate 读静态 prototype 作为主源,不合并 cinematic layer,只把 motion assets 带到 `migrated/assets/motion/` 并在 sidecar 记录 `cinematic-variant-not-consumed`。
- Phase 2.5:在任何 prototype 进入 `prototyped` 前默认运行四个强制门禁:2.5 Critique(设计判断)、2.6 Audit(技术正确性)、2.7 Adapt(视口行为)、2.8 Motion(滚动/时间驱动正确性);任一门的 P0/P1 阻止 `prototyped`。
- Phase 2.5:并行运行两个 validator:`Skill { skill: "impeccable:impeccable", args: "critique stardust/prototypes/<slug>-proposed.html --json" }` 和 `Skill { skill: "impeccable:impeccable", args: "audit stardust/prototypes/<slug>-proposed.html --json" }`。
- Phase 2.5:每个返回 JSON findings 列表,含 `priority`、`category`、一行描述;把 critique findings 追加到 `_provenance.critique[]`,audit findings 追加到 `_provenance.audit[]`,不要覆盖之前运行。
- Phase 2.5:做 brand-faithful inversion auto-dismiss:把每个 finding 与 `DESIGN.json#extensions.divergence.brand_faithful_inversions[]` 和 `DESIGN.md#narrative.rules` 比对;category 和 target 匹配已批准 inversion 的 finding 丢弃;原列表保留并加 `dismissedAsBrandFaithful: true`;用户报告只显示真实命中。
- Phase 2.5:执行 vision gate:截图 proposed 文件,并与 captured source screenshot(`stardust/current/assets/screenshots/<slug>.png` 若存在)并排研究;视觉判断 brand-fit、signature preservation、hierarchy at a glance;记录 `_provenance.visionCheck = { verdict: pass|fail, observations[] }`;fail 按 P1 走同一门禁机制。
- Phase 2.5:按优先级分组展示 findings,标注来源 `critique:` / `audit:`;列出前 5 条 P0/P1 原文,P2/P3 折叠为 per-source counts。
- Phase 2.5:`prototyped` 状态由任一 validator 的 P0/P1 门控;合并去重后(含 brand-faithful auto-dismiss 和 vision gate fail 计 P1)若有 P0/P1,不要标记 `prototyped`;文件可打开但页面保持 `directed`,直到修复并重跑 Phase 2.5,或用户明确确认(如 “ship as-is” / “accept the P1 findings”),确认逐字记录在 `_provenance.critique[]` 和 `_provenance.audit[]`。
- Phase 2.5:P2/P3 不阻止 `prototyped`,作为 advisory。
- Phase 2.5:可选 LLM design-review subagent:仅当用户明确要求(“give me a deeper critique”、“second opinion”)或 deterministic pass 返回 ≥3 P0/P1 时触发;默认关闭。
- Phase 2.5:两个 validator 强制,无 opt-out;用户要 ship 就在聊天中说明,确认逐字记录。
- Phase 2.6:WCAG contrast computation:audit 重新计算每个 text-on-substrate pair 的对比度;brief-time/craft-time 手估的 `_provenance.wcagContrast` 不权威,audit 计算值权威;手估与计算差异 ≥0.25 作为 P1。
- Phase 2.6:large-text exemption check:声称适用 WCAG large-text 3:1 底线的 pair 必须在渲染 DOM 尺寸满足 `≥ 18pt regular` 或 `≥ 14pt bold`;不满足则 P0。
- Phase 2.6:LCP image audit:首屏第一张图片必须 `loading="eager"` 且 `fetchpriority="high"`;lazy-loaded LCP image 为 P1。
- Phase 2.6:JS-dependent-hidden-state detector:用 regex `/(clip-path:\s*inset\(0\s+100%|opacity:\s*0\s*[;}]|transform:\s*translate[XY]\(-?100%)/` 检查 CSS;命中且无 `<noscript>` fallback 和 `prefers-reduced-motion` shortcut 则 P0;可在 `_provenance.audit.acknowledged[]` 声明缓解:`<noscript>` 重置 hidden selectors、`prefers-reduced-motion: reduce` 跳过 hide、`html.js-anim` gate class 在 stylesheet 前 inline 设置。
- Phase 2.7:每个 prototype 在用户 approval 被接受前经过 `$impeccable adapt` 和 adapt audit;现在它作为 pre-`prototyped` 门禁。
- Phase 2.7:调用 `Skill { skill: "impeccable:impeccable", args: "adapt stardust/prototypes/<slug>-proposed.html" }`;若 `DESIGN.json#extensions.breakpoints` 存在则传 captured viewport breakpoints,否则 adapt 用默认(640/768/1024/1280 是 stardust spec 默认;任何 >640 被当 mobile breakpoint 是 smell);完整目标列表为 1920/1440/1280/800/414/375,验证 doc-width、overflow、sticky、grid columns、font scaling。
- Phase 2.7:验证 adapted 文件仍满足 Phase 2 契约(`:root` token block、data attributes、anti-toolbox audit 干净、impeccable hard rules、content sourcing);adapt 不得重新引入违规。
- Phase 2.7:向 `_provenance.adapt[]` 追加 ISO timestamp、应用的 breakpoint 列表、添加的 `@media` 规则数量、adapt pass 暴露的布局决策(carousel → stack、sidebar → drawer、hamburger → menu)。
- Phase 2.7 mobile-adapt audit:以下任一情况拒绝文件:缺少 `<meta name="viewport" content="width=device-width, ...">` 或 width 固定像素;声明零个 `@media (max-width: ...)`;最窄 mobile-targeted breakpoint 高于 640px;在 360px 渲染视口,landmark 导致 `scrollWidth > clientWidth`(拒绝码 `audit/responsive: horizontal-overflow-at-360px`);在 360px,`<header>` 内 `<nav>` 后代 computed `font-size` <11px(拒绝码 `audit/responsive: nav-readability-floor`);在 360px,`<header>` 内 flex/grid `<nav>` computed `gap` 或 `column-gap` <10px(同拒绝码)。
- Phase 2.7:后三项必须实际渲染,用 Playwright snippet(`fixtures/mobile-nav-audit.mjs`)在 360×800 运行;审计消息包含指向 `skills/prototype/reference/mobile-nav-collapse.md` 的修复建议。
- Phase 2.7:nav 相关拒绝时应用 `reference/mobile-nav-collapse.md` 的 stock CSS-only hamburger 模式(HTML+CSS+≤10 行 inline `<script>` 用于 a11y);header 加 `data-nav-collapse="hamburger"`;基础 `.ds-nav-burger { display: none; ... }` 必须放在 `<style>` 顶部(`:root` 之后、任何 `@media` 之前);用文档中的 `awk` 一行检查基础规则行号低于第一个 `@media (max-width: 640px)`;退出码 0 正确,1 回归;alternative patterns 可由用户请求,agent 不自主选择。
- Phase 2.8:静态 DOM 门禁在 `scrollY=0` 无时间流逝读取,不能捕获 motion 失败;当文件声明 ≥1 named choreography(`_provenance.motion.choreographies[]`)或含 `animation-timeline:`、`@scroll-timeline`、带 `target.classList.add('anim-enter-visible')` 的 IntersectionObserver、或读取 `getBoundingClientRect()` 的 rAF loop 时触发;静态 prototype 跳过。
- Phase 2.8:按 `reference/motion-validation.md` 的 5 passes 执行:scroll-position probe、finding classification、motion-bug checks、no-JS state、multi-viewport scroll-driven check;检查 hiddenInViewport、sectionOverlaps、clippedReveals、rangeMismatches 等。
- Phase 2.8:findings 分类为 by-design(choreography 在此位置应产生,由 brief 中命名 choreography 解释)或 bug(非预期);bug 阻止 `prototyped` 直到修复或确认。
- Phase 2.8:bug 在 3 次递归迭代内不能自动修复时,向用户暴露 finding、分类理由、3 次修复尝试和需要用户输入的 proposed remediation;不要静默降低门禁。
- Phase 2.8:向 `_provenance.motionValidation` 追加 ISO timestamp、probe positions、tested viewports、findings(含 per-finding classification)、`fixesApplied[]`;clean-pass screenshots 保存到 `stardust/validation/<slug>/motion-<viewport>.png`。
- Discipline 10 variant-convergence detector:当 N>1 variants 渲染,每个 `<slug>-<id>-shape.md` 声明 distinct `dominantDimension`(无两 variant 相同)和 `compositionDelta`,列出 ≥2 个相对 sibling variant 的 section sequence 或 layout strategy 分歧;若空或 trivial(只 token-level)Phase 1 失败并重启 ideation;validator 对 `(A,B)`、`(A,C)`、`(B,C)` 每对检查 ≥2 structural changes。
- Discipline 10 mode-aware contract:`ia-fidelity: verbatim` 下 A1/A2/A3 只在 surface axes 不同(type-weight、type-scale、density、motion-energy、color-temperature、spacing-rhythm),结构 delta 被禁止,surface-only 通过,structural 拒绝;`ia-fidelity: reimagined` 下 A+B+C 声明 structural `compositionDelta`,每对 ≥2 changes,surface-only 失败;单 variant N=1 跳过。
- Phase 4:用 shell 命令 `open <vfs-path>` 在浏览器打开刚写/更新的 `<slug>-proposed.html`(或 N>1 时用户选择的 variant suffix);本地 prototype 文件不要用 `playwright-cli open`,它会绕过 preview service worker 并报 FILE NOT FOUND;pipeline-automation 模式跳过。
- Phase 4:在 `state.json` 标记页面 `prototyped`,门控于 Phase 2.5 critique + 2.6 audit + 2.7 adapt + 2.8 motion validation(触发时)结果;若任一返回 ≥1 P0/P1(brand-faithful auto-dismiss 后)且用户未确认,页面保持 `directed`;按 `critique:` / `audit:` / `adapt:` / `motion:` 分组展示 findings,建议修复或明确确认。
- Phase 4:报告 prototype 路径并停止;迭代通过聊天驱动 impeccable 命令或直接调用。
- 迭代路径 1(默认聊天驱动):用户给出 refinement phrase,如 “make the hero bolder for home”、“tighten the cup-note grid”、“less corporate”;agent 按 `skills/stardust/reference/intent-dimensions.md` 识别轴,按 `skills/stardust/reference/impeccable-command-map.md` 选择匹配命令(常为 `bolder`、`quieter`、`distill`、`typeset`、`colorize`、`layout`),向用户展示 resolved plan 后再执行,对 `<slug>-proposed.html`(或 phrase 限定的 section)运行命令,按 Phase 2 重新验证并更新 provenance。
- 迭代路径 2(直接调用):用户直接运行 impeccable 命令,如 `$impeccable bolder stardust/prototypes/home-proposed.html`;stardust 不在 loop,浏览器重载磁盘文件;这是支持的 escape hatch;也包括用户直接对 proposed 文件运行 `$impeccable live`;stardust 不驱动其 poll loop。
- Phase 5:approval 必须显式;用户说 “approve <slug>” 或 “approve”;agent 写 state 前确认 slug。
- Phase 5:验证 proposed 文件 provenance block 列出当前 active `direction.md`;若 direction 在迭代中变化,用户必须先用新 direction 重新 prototype。
- Phase 5:运行 approval fold-back:当 approved variant 非 A 且 `ia-fidelity` 为 `reimagined`,读取 approved 文件的 `_provenance.differentiationFromA[andB]` 和 brief 的 `compositionDelta`,与 active direction 做 diff,提出 folding structural moves;用户选 `fold site-wide`(默认)/ `fold page-local` / `don't fold`;`ia-fidelity: verbatim` 下 fold-back 是 no-op;flags `--auto-fold` 跳过 gate,`--no-fold` 完全 opt out。
- Phase 5:在 `state.json` 标记页面 `approved`,追加 `{ status: "approved", at: <ts> }` history entry;清除页面 `stale` flag。
- Phase 5:打印摘要,包含 approved slug、proposed 路径、mobile adapt 的 Phase 2.7 结果、fold-back 结果、下一步 `$stardust migrate <slug>`;多页面时按页批准,可以批准部分并继续迭代其他。
- Phase 5.5:adapt for mobile 已退役并移到 Phase 2.7;保留 anchor 供外部交叉引用。
- Stale handling:direction.md 变化时,prototype 的 `againstDirection` provenance 过期,`state.json` 标记页面 `stale: true`;默认:无 slug 的 `$stardust prototype` 跳过 stale 并报告数量;`$stardust prototype home` 即使 stale 也操作 home;`--all` 重新 prototype 包括 stale;stale 页面成功重跑后清除 stale flag 并更新 `againstDirection` 到新的 active direction。
- Outputs:`stardust/prototypes/<slug>-shape.md` 是 Phase 1 输出和 craft 输入;`<slug>-proposed.html` 是 proposed redesign、聊天迭代目标、migration source、用户审查面;`stardust/state.json` 更新页面状态和 approval history;`DESIGN.json` 更新 `extensions.divergence.anti_toolbox_hits` 和本次渲染的 audit amendments。
- Failure modes:无 directed pages → 建议 `$stardust direct` 并停止;pending direction → 拒绝运行;验证失败(`:root` block 缺失、data attributes 缺失、未证明 anti-toolbox hit、impeccable 规则违规)→ 不写文件,暴露具体失败和修复建议;impeccable 不可用 → 拒绝运行,建议安装插件。
- Concurrency:按 `state-machine.md` stardust 不加锁;两个不同 slug 的并发 `prototype` 安全;同一 slug 两个并发是 last-write-wins,用户明确尝试时警告。
- Prep mode `--prep` 步骤 1:识别 `state.json.pages[].type` 中还没有 approved archetype 的 page type;每个 gap 选一个代表页面 prototype(用户选 slug,默认该 type 第一个);`article`、`listing`、`program`、`form`、`static` 同理;`landing` 是 home 优先;`unique` 不建 archetype,在 migrate 时一次性渲染。
- Prep mode `--prep` 步骤 2:第一个获批 prototype(默认 home,可用 `--canon-from <slug>` 覆盖)成为 canon-author;批准时按 `reference/canon-extraction.md` 提取 canon 并写回:1) chrome HTML → `stardust/canon/header.html`、`footer.html`、可选 regions;2) compound CSS → `stardust/canon/canon.css`;3) pinned tokens → `DESIGN.json.extensions.canon.pinned`;4) module canonical renderings → `stardust/canon/modules/<id>.html`;5) compositional moves(LLM 编写 3–7 行)→ `DESIGN.json.extensions.canon.compositionalMoves`;在 `DESIGN.json.extensions.canon.files` 用 `{ path, sha }` 引用;每个 canon 文件带 `stardust:canon` provenance comment 注明 source slug、source prototype、region。
- Prep mode `--prep` 步骤 3:后续 non-canon-author template 批准时 canon-extraction 用 diff mode:net-new items 追加到 canon 并加 history entry;byte-for-byte match 则 no-op;与 canon 冲突默认 log as deviation:页面 inline 标 `data-deviation="<reason>"`,`migrationDecisions[]` 记录 `canon-deviation`,canon 不变;用户可在 prep summary 上按冲突选择 promote 新 variant 到 canon(会 stale-flag 下游页面)或 reject 并重新迭代;无显式 override 则记录 deviation 并继续批准。
- Prep summary:完成后打印 approved archetypes、canon 来源和 modules 数量、pinned,以及 `Next: $stardust migrate`。
- 参考文档:实现时按需要查阅 `reference/page-shape-brief.md`、`reference/canon-extraction.md`、`reference/proposed-file-shell.md`、`reference/publish-sample.md`、`reference/mobile-nav-collapse.md`、`reference/motion-validation.md`、`reference/motion-registers.md`、`reference/motion-stack.md`、`reference/motion-attributes.md`、`reference/motion-runtime.md`、`reference/fidelity-refined-pass.md`、`reference/anti-template-bank.md`、`reference/approval-fold-back.md`、`fixtures/composition-delta-good.md`、`fixtures/composition-delta-trivial.md`、`../stardust/reference/token-contract.md`、`../stardust/reference/data-attributes.md`、`../stardust/reference/divergence-toolkit.md`、`../stardust/reference/intent-dimensions.md`、`../stardust/reference/impeccable-command-map.md`、`../stardust/reference/state-machine.md`、`../stardust/reference/artifact-map.md`,以及 impeccable 的 `reference/craft.md` 和 `reference/live.md`。
适用边界 · 注意事项
- 未安装 impeccable、stardust、Node 22+、Playwright/Chromium 和 playwright-cli 时;impeccable 是硬要求,不能降级为直接手写 proposed HTML。
- direction 仍为 pending、没有 directed 页面,或项目根缺少 DESIGN.md / DESIGN.json 时;应先运行 $stardust direct。
- 只需要发布 showcase 但未安装并认证 gh 时;--publish-sample 需要 gh。