Files
Paolo Mottadelli 33dd9037f3 stardust: mobile-nav collapse + drop before/after viewer (#127)
* stardust: mobile-nav collapse pattern + drop before/after viewer

Two related changes to stardust:prototype landing together.

Mobile-nav collapse (additive):
- New stock CSS-only hamburger pattern auto-applied by Phase 5.5
  when the Mobile-adapt audit refuses at 360px (overflow,
  sub-11px nav font, or sub-10px nav gap).
- New audit conditions documented in skills/prototype/SKILL.md
  § Mobile-adapt audit; checked at runtime via the Playwright
  snippet at skills/prototype/fixtures/mobile-nav-audit.mjs.
- Stock pattern doc at skills/prototype/reference/mobile-nav-collapse.md
  carries the copy-pasteable HTML+CSS+JS, the ARIA checklist,
  the post-injection source-order check, --no-hamburger opt-out,
  and the alternative-pattern vocabulary.
- New data-nav-collapse="hamburger" attribute (v2.2 additive) on
  <header> when the pattern is applied.
- Positive + negative fixtures verify the audit end-to-end.

Drop the per-page before/after viewer:
- Phase 3 (Compose the viewer) removed; the proposed file is
  opened directly in the browser.
- Approval is now chat-only: "approve <slug>" or "approve".
- skills/prototype/reference/before-after-shell.md renamed to
  proposed-file-shell.md and stripped to the proposed-file
  contract only (viewer half, iframe resolution chain, action
  buttons, and stash mechanic all dropped).
- state-machine.md prototypePath repointed at -proposed.html;
  doctor.md D-104 pairs -proposed.html with -shape.md;
  artifact-map.md drops the <slug>.html row; publish-sample.md
  simplifies variant discovery (no more "is not the viewer"
  disambiguation); evals/prototype-before-after rewritten to
  expect a single proposed file.

BREAKING CHANGE: stardust:prototype no longer composes the
before/after viewer at stardust/prototypes/<slug>.html.
Anyone scripting on top of that file existing on disk should
switch to stardust/prototypes/<slug>-proposed.html (the
prototypePath in state.json now points there directly). The
approval gesture moves from the viewer's Approve button to a
chat-only "approve <slug>" / "approve".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* stardust: bump version to 0.5.0

Minor bump for the breaking change in 370a208 (drop before/after
viewer; chat-only approval). Pre-1.0 semver: minor bump signals
a breaking change without claiming API stability.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 00:06:20 -07:00

2.7 KiB

Eval: incremental migrate (mixed approved + directed; idempotent re-run)

Setup

A project where extract + direct + partial prototype have completed:

  • stardust/state.json lists 5 pages:
    • home, pricing — approved (with proposed.html)
    • about, features, contact — directed (no prototype yet)
  • stardust/current/ populated.
  • Project-root PRODUCT.md, DESIGN.md, DESIGN.json exist.
  • stardust/direction.md has an active direction.
  • stardust/prototypes/ has the two approved pages' files.
  • No stardust/migrated/ yet.
  • Impeccable installed.

User prompt (run 1)

"$stardust migrate"

Expected behavior (run 1)

The stardust:migrate skill is invoked. It:

  1. Runs the master setup.
  2. Verifies state contract: directed pages exist, DESIGN.md exists, active direction exists.
  3. Prints the plan (5 in-scope, partitioned by render path) with DESIGN.md and DESIGN.json shas.
  4. For home and pricing (path A): reads each <slug>-proposed.html, refreshes the :root block from latest DESIGN.md, applies content-preservation rules, validates, writes to stardust/migrated/.
  5. For about, features, contact (path B): renders from scratch using current/pages/<slug>.json IA + DESIGN.json components, applying the resolved direction. Validates and writes.
  6. Maps slugs to nested index.html output paths:
    • home → migrated/index.html
    • pricing → migrated/pricing/index.html
    • about → migrated/about/index.html
    • features → migrated/features/index.html
    • contact → migrated/contact/index.html
  7. Each migrated page has :root, data attributes, provenance (with designMd/designJson/sourceCurrent/sourceProposed shas), content preserved, internal links rewritten to root-relative paths, asset references rewritten to /assets/....
  8. Copies stardust/current/assets/logo.<ext> and referenced media to stardust/migrated/assets/.
  9. Writes stardust/migrated/robots.txt and stardust/migrated/sitemap.xml derived from the migrated inventory.
  10. Updates state.json: 5 pages move to migrated, history entries appended.
  11. Prints summary: 5 migrated, 0 unchanged, 0 failed, asset count, deploy hint.

User prompt (run 2 — immediately after run 1, no other changes)

"$stardust migrate"

Expected behavior (run 2 — idempotent re-run)

  1. Zero file writes. Every page is sha-compared against DESIGN.md, DESIGN.json, current page, and proposed file (where applicable); all match, so all 5 are skipped.
  2. Summary: 0 migrated, 5 unchanged (idempotent skip), 0 failed.
  3. state.json is NOT updated for the unchanged pages (no new history entries).