diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 94a0b004..b607028a 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -13,7 +13,7 @@ "name": "stardust", "source": "./plugins/stardust", "description": "Redesign an existing website to make it better. Higher-level guided flow on top of impeccable.", - "version": "0.13.0", + "version": "0.13.2", "category": "design", "keywords": [ "design", diff --git a/plugins/stardust/.claude-plugin/plugin.json b/plugins/stardust/.claude-plugin/plugin.json index 895f7f87..8d002e87 100644 --- a/plugins/stardust/.claude-plugin/plugin.json +++ b/plugins/stardust/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "stardust", "description": "Redesign an existing website to make it better. Higher-level guided flow on top of impeccable.", - "version": "0.13.1", + "version": "0.13.2", "author": { "name": "Adobe" }, diff --git a/plugins/stardust/skills/deploy/IMPROVEMENTS.md b/plugins/stardust/skills/deploy/IMPROVEMENTS.md index ef4398aa..589a81e8 100644 --- a/plugins/stardust/skills/deploy/IMPROVEMENTS.md +++ b/plugins/stardust/skills/deploy/IMPROVEMENTS.md @@ -9,6 +9,19 @@ to the `samples/**` claude-design prototypes in this repo. Each test converts Status legend: ๐Ÿ”ด blocker / bug ยท ๐ŸŸ  missing guidance ยท ๐ŸŸก nice-to-have ยท โœ… implemented in skill. +> **โš ๏ธ AuthorKit-legacy findings.** `stardust:deploy` now targets the **vanilla +> `aem-boilerplate`** runtime; the AuthorKit runtime (and its bootstrap-onto-vanilla +> port) has been removed from the skill. The findings below that are specific to the +> AuthorKit runtime โ€” **#4** (lazy.js footer double-load), **#21/#26** (`postlcp.js` +> fragment className), **#40** (`body.appear` blank-render โ€” *inverted* under vanilla: +> the gate is now KEPT), **#81** (late static-fragment header CLS โ€” under vanilla the +> cause is the late header-*block* decoration, same reservation fix), **#84** (manual +> AuthorKit bootstrap / version drift โ€” the `bootstrap-authorkit.mjs` script and the +> Runtime-bootstrap section are deleted), plus the `.btn`/`body.session`/static-fragment +> guidance โ€” are retained **only** as history for anyone maintaining an existing +> AuthorKit site. They do NOT describe the current vanilla path. See SKILL.md's +> "Runtime" section for the supported contract. + --- ## Findings (wasatch-back deploy โ€” `stardust:deploy`) @@ -690,7 +703,13 @@ persistent ledger that skips already-live pages, retry/backoff on 000/429/5xx, append-only log, delivered-`.plain.html` verify before flip; idempotent re-run re-drives only FAILs). Wired into extract/SKILL.md, deploy/SKILL.md, rollout/SKILL.md. -### #84 ๐ŸŸ  AuthorKit bootstrap is manual + version-drifted โœ… +### #84 ๐ŸŸ  AuthorKit bootstrap is manual + version-drifted โ†’ โ›”๏ธ SUPERSEDED (AuthorKit removed) +**Update:** This finding (and its `bootstrap-authorkit.mjs` fix) is **obsolete**. The +deploy skill no longer ports the AuthorKit runtime at all โ€” vanilla `aem-boilerplate` +is the target, so there is nothing to bootstrap. `bootstrap-authorkit.mjs` has been +deleted and the Runtime-bootstrap section removed. The original finding is kept below +for history only. + **Where:** 5 sites. ~15 manual file ops with two silent-failing mandatory edits; "port from the latest test branch" is an unpinned moving target, and author-kit's runtime has drifted (static-fragment โ†’ block-based) so the documented edits can diff --git a/plugins/stardust/skills/deploy/SKILL.md b/plugins/stardust/skills/deploy/SKILL.md index 6e212888..ab682af7 100644 --- a/plugins/stardust/skills/deploy/SKILL.md +++ b/plugins/stardust/skills/deploy/SKILL.md @@ -15,66 +15,24 @@ The user has: - **`` document-content with everything inline-styled** (per-element `style="โ€ฆ"`). Harder โ€” you must lift inline styles into a scoped block stylesheet. - **React/JSX prototypes** (an HTML shell that mounts `.jsx` components at runtime). **Pre-render to static HTML first** (run it, or screenshot + read the JSX to reconstruct the DOM); you cannot decorate a shell that has no server-rendered `
`. The prototypes typically live under `stardust/prototypes/**` or a `samples//` folder โ€” don't hard-code the path; discover them. -2. An EDS project at the repo root โ€” `blocks/`, `styles/`, `scripts/`, `head.html`, plus existing blocks (`fragment`, `section-metadata`). If the project is **vanilla `aem-boilerplate`** rather than the AuthorKit runtime this skill assumes, run the **Runtime bootstrap** below first. +2. An EDS project at the repo root โ€” a **vanilla `aem-boilerplate`** checkout: `blocks/`, `styles/`, `scripts/` (`aem.js` + `scripts.js`), `head.html`, plus the stock blocks (`header`, `footer`, `fragment`, `section-metadata`). This is the runtime this skill targets โ€” no runtime porting step. See **Runtime** below for the (rare) case where you inherit a legacy AuthorKit project instead. 3. A goal to convert: prototypes โ†’ authorable EDS blocks + EDS content pages under `content/**`. If the user has prototypes but no EDS scaffolding, stop and ask whether to bootstrap. If they have EDS but no prototypes, this skill doesn't apply. -## Runtime bootstrap (vanilla aem-boilerplate targets) +## Runtime -This skill's runtime is the **AuthorKit** runtime (`ak.js` page boot, `postlcp.js` static header/footer fragments, `body.session` font gating, `decorateSession()`). The conversion steps below assume those files exist. They are **NOT** in this skill folder โ€” they live in the canonical AuthorKit repo (`github.com/aemsites/author-kit`). (The `sanitise.js` DA-write helper is bundled with this skill at `skills/deploy/scripts/sanitise.js`; it is not part of the ported runtime.) +This skill targets the **vanilla `aem-boilerplate`** runtime โ€” the stock `scripts/aem.js` + `scripts/scripts.js` page boot, real `header`/`footer` blocks, `decorateSections`/`decorateBlocks`/`decorateButtons`, and the standard `body { display: none } body.appear { display: block }` paint gate. **No runtime is ported in** โ€” you build everything as blocks + content on top of a clean boilerplate checkout. There is nothing to bootstrap before Step 1. -If the target project is a **vanilla `aem-boilerplate`** (it has `scripts/aem.js` + `scripts/scripts.js` and `header`/`footer` blocks, but no `ak.js`/`postlcp.js`), port the runtime before Step 1. +**Detect the runtime first (one-line gate).** If the repo has `scripts/aem.js` + `scripts/scripts.js` and `blocks/header`/`blocks/footer` โ†’ it's vanilla; follow this skill as written. If instead you find `scripts/ak.js` + `scripts/postlcp.js` and NO `blocks/header`/`blocks/footer` โ†’ you've inherited a legacy **AuthorKit** project; see the appendix below. -**Automate it (#6):** run `node skills/deploy/scripts/bootstrap-authorkit.mjs --target . [--from-sibling | --ref ]`. The script does the entire port below โ€” copies the PORT-IN set, removes the boilerplate set, applies AND verifies both mandatory edits (failing loud instead of the usual silent footer-error-box), patches the `body.appear` blank-render gate, and writes `.eslintignore`. Two source modes: -- **`--from-sibling ` (preferred in a multi-site repo):** copy the runtime from another EDS project in the workspace that is already bootstrapped (has `scripts/ak.js` with both edits). Offline, deterministic, and parity-safe with a known-good *deployed* runtime โ€” no re-fetch, no re-patch risk per site. This is the right default when several sites share one repo (e.g. 8 subfolder sites). -- **`--ref `:** fetch a **pinned** author-kit ref tarball and port from it. Pin a real commit/tag (the script's `AUTHORKIT_REF` constant or `--ref`), **not** a tracking branch โ€” author-kit's runtime has drifted (static-fragment โ†’ block-based header/footer), so an unpinned port can silently change what you get. If the fetched runtime no longer matches the static-fragment model the steps below describe (`loadStaticFragment`, `postlcp.js` injecting `fragments/{header,footer}.html` via `innerHTML`), pin an older known-good ref or use `--from-sibling`. +**Record the runtime as state.** Write `runtime: aem-boilerplate` into the conversion log (`stardust/eds-conversion-log.md`) so prototype/migrate and the `stardust:diff` probe key the class contract (`.button` vs `.btn`, `.default-content-wrapper` vs `.default-content`, header/footer blocks vs static fragments) off a declared field instead of re-guessing. The prototype renders a bespoke design-system vocabulary; this field is what lets deploy translate it onto the *real* runtime contract deterministically rather than drifting. -The manual manifest (what the script does, for reference / hand-porting). Fetch the author-kit tarball and copy: +(The `sanitise.js` DA-write helper is bundled with this skill at `skills/deploy/scripts/sanitise.js` โ€” it is runtime-independent.) -**Port in (from author-kit):** -``` -scripts/ak.js scripts/scripts.js scripts/postlcp.js scripts/lazy.js scripts/utils/* -tools/** # da/da.js (+ sidekick, quick-edit, scheduler โ€” keep so lazy.js/scripts.js imports resolve). sanitise.js is bundled with this skill, not ported. -deps/** # rum.js + lit (head.html loads deps/rum.js) -head.html # AuthorKit head: loads ak.js + scripts.js + styles.css + deps/rum.js -blocks/fragment blocks/section-metadata -.hlxignore -``` - -**Remove (boilerplate the AuthorKit runtime replaces):** -``` -scripts/aem.js scripts/delayed.js # replaced by ak.js + lazy.js -blocks/header blocks/footer # replaced by static fragments/{header,footer}.html (Step 6) -blocks/cards blocks/columns blocks/widget # unused demo blocks (delete to avoid stale aem.js imports) -styles/fonts.css styles/lazy-styles.css # @font-face goes in styles.css; AuthorKit head loads only styles.css -``` - -**After porting, two runtime edits are mandatory (do BOTH โ€” they're halves of one change):** -1. **`scripts/lazy.js` (#4):** the stock AuthorKit `lazy.js` lazy-loads `utils/footer.js`, which does `loadBlock(footer)` and collides with the static footer fragment (renders a visible "Error" box, since there is no `blocks/footer`). **Delete the `import('./utils/footer.js')โ€ฆ` line.** -2. **`scripts/postlcp.js` (#21):** deleting `utils/footer.js` also removed the only code that set the `