[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CY3SN97E5PV98PWK2MF278":3,"skill-same:01M6CY3SN97E5PV98PWK2MF278":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":13,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":47,"install":48,"resources":61},"01M6CY3SN97E5PV98PWK2MF278","html-artifact-composer",null,"Composes a self-contained, interactive HTML artifact (island-first, single file, token-layer themed, injection-safe) from a workflow command's structured plan payload. Invoked by a workflow command at its artifact-write step -- currently `\u002Fworkflows:plan` -- never by the user directly.","The-Rabak\u002Fcompound-engineering-plugin","The-Rabak","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F44833742?v=4","01M6CY211HB58Y8JNWWEV9FGN1","01M6CY2165MYWKS66VN01X82EB",1,"MIT","https:\u002F\u002Fgithub.com\u002FThe-Rabak\u002Fcompound-engineering-plugin\u002Fblob\u002Fmain\u002Fplugins\u002Fcompound-engineering\u002Fskills\u002Fhtml-artifact-composer\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"html artifact composer","artifact","html","interactive","token","structured","self","payload","never","user","safe","write","command","plan","first","injection","file","workflows","workflow","2026-11-10 10:12:30",false,"---\nname: html-artifact-composer\ndescription: \"Composes a self-contained, interactive HTML artifact (island-first, single file, token-layer themed, injection-safe) from a workflow command's structured plan payload. Invoked by a workflow command at its artifact-write step -- currently `\u002Fworkflows:plan` -- never by the user directly.\"\n---\n\n# HTML Artifact Composer\n\nThe **create** capability of the `html-artifacts` subsystem (`CONTEXT.md` → **Composer skill**). A workflow command invokes this skill at its artifact-write step with a structured payload; this skill turns that payload into one self-contained `.html` file and returns its path. It never talks to the user directly and never asks for design input.\n\n## Invocation — the calling command MUST run the composer in a fresh subagent\n\nAny command that reaches its artifact-write step (`\u002Fworkflows:plan` today; brainstorm\u002Farchitecture and other emitters as they migrate) **delegates composition to a fresh subagent — it does not run the composer inline in its own context.** By the write step the command has accumulated a large context (brainstorm input, gathering-helper reports, the planning\u002Fauthoring dialogue) that the projection does not need; running a single-file HTML generation on top of it bloats the orchestrator, degrades the generation, and drags that transcript into every later step. The payload is already the clean handoff, so the split is natural:\n\n1. **Orchestrator assembles the `payload`** (see Input contract) from its own steps. The payload alone must carry every fact the artifact will show — the one hard rule means nothing else could leak in anyway.\n2. **Orchestrator dispatches one fresh subagent** whose entire context is: an instruction to load and follow *this* `SKILL.md` (point it at the file — do **not** paste the skill body into the prompt; the skill is its instruction set), the `target_path`, the `payload`, and the design-DNA refs this skill loads. The subagent does the whole classify → project cycle.\n3. **The subagent returns only** the written artifact path (plus any missing-required-field report). On a missing-field report the orchestrator fills the field from its own steps and re-dispatches; it never lets the composer fabricate.\n\nOrchestrator owns *facts* (the payload); the composition subagent owns *projection* (the HTML) — the same delegation `\u002Fworkflows:work` uses for heavy units. Every future command that gains a composer write-step invokes it this way, by reference to this section, so the pattern stays single-sourced instead of drifting per command.\n\n## Required contract\n\nBefore composing anything, load:\n\n- `commands\u002Fworkflows\u002Freferences\u002Fhtml-artifacts\u002Fisland-contract.md` — the fixed-core schema (Tier 1 envelope + Tier 2 `plan` contract core), Tier 3\u002F4, the serialization primitive, and the field-coverage map. The island this skill writes MUST conform to it exactly.\n- `commands\u002Fworkflows\u002Freferences\u002Fhtml-artifacts\u002Fprimitives-catalog.md` — the invariant design DNA (token layer, TOC, tabs, accordion, exporters, injection-safe rendering, etc.) every artifact is built from.\n- `commands\u002Fworkflows\u002Freferences\u002Fhtml-artifacts\u002Fgallery-manifest.md` — the one-line-per-entry archetype\u002Frecipe index. This is the **only** gallery file read on every generation.\n\nIf any of these three cannot be loaded, stop and report the contract as unavailable instead of inventing a schema or a design.\n\n## Input contract\n\nThe caller (a workflow command) supplies:\n\n- `target_path` — where to write the artifact, e.g. `docs\u002Fplans\u002F2026-07-09-feat-csv-export-plan.html`.\n- `payload` — an object covering every Tier 1 envelope field and every Tier 2 `plan` contract-core field required by `island-contract.md`'s `REQUIRED_FIXED_CORE_KEYS`, plus the Tier 3 prose fields and any Tier 4 `ext{}` content the command has already gathered. The caller is responsible for gathering this content (WHY anchor, execution slices, TDD\u002Fevidence contract, etc.); this skill is responsible only for turning it into a conformant island and a faithful HTML projection — it does not invent missing facts.\n\nIf the payload is missing a required fixed-core field, stop and report exactly which field is missing rather than fabricating a placeholder value.\n\n## Workflow: classify → select\u002Fcompose → draft-bespoke → project\n\n### 1. Classify\n\nAssign the artifact a primary `type` (already present on the payload, e.g. `plan`) and a small set of tags describing what it actually contains: does it have execution slices (`vertical-slices` tag), a pipeline\u002Farchitecture diagram worth drawing, exception\u002Fwaiver arrays worth a risk table, a milestone sequence worth a timeline? Classification is grounded in what the **payload** actually carries — never tag for an archetype the payload has no data to back.\n\n### 2. Select \u002F compose\n\nRead `gallery-manifest.md` (and only that file) and match rows by `type`\u002F`tags[]`. A `plan` payload with execution slices, at least one TDD exception or constitution waiver, and more than one slice typically matches:\n\n- `implementation-plan` (always, for a `plan`-kind payload — it is the anchor archetype for this document family)\n- `milestone-grid` when `slices[]` has more than one entry with meaningful `depends_on` chains\n- `risk-table` when `tdd.exceptions[]` or `constitution.waivers` is non-empty\n- `flowchart` only when the payload's `ext{}` content includes an actual pipeline\u002Farchitecture graph to draw\n\nLoad **only** the matched exemplar\u002Frecipe file(s) from `archetypes\u002F`\u002F`recipes\u002F` — never the whole gallery. Compose their primitives into one document; do not literally copy an exemplar's sample content, only its structural pattern. A matched archetype is a **floor, not a ceiling**: you are expected to recompose, reorder, augment, and add novel island-backed sections beyond it, and to vary that composition between artifacts — see \"Design for engagement\" below. Matching tells you what the content *is*, not what the finished piece must *look like*.\n\n### 3. Draft bespoke (when nothing fits)\n\nIf no manifest row's `type`\u002F`tags[]` combination fits the payload, draft a throwaway template directly from `primitives-catalog.md`'s primitives, following the nearest recipe sheet's \"Bespoke-drafting note\" as a blueprint for structure. A bespoke template still obeys every invariant below — bespoke means \"no pre-built archetype,\" not \"invariants optional.\"\n\n### 4. Project (island-first, always)\n\nGeneration order is fixed, in this order, every time:\n\n1. **Author the island first.** Build the complete JSON object matching `island-contract.md` exactly: every Tier 1 + Tier 2 required field from the payload, the Tier 3 prose fields verbatim, any Tier 4 `ext{}` content the bespoke\u002Fbespoke-bridging sections need, and `render_meta` (see below). Do this before writing a single line of visible HTML.\n2. **Serialize it with the T01 primitive.** `JSON.stringify(island)`, then replace `\u003C` → `\\u003C`, `>` → `\\u003E`, `\u002F` → `\\u002F`, U+2028 → `\\u2028`, U+2029 → `\\u2029`. Do **not** use HTML-entity escaping (`&lt;`) for the island — it is not reversible inside a `\u003Cscript type=\"application\u002Fjson\">` element (see `island-contract.md`'s \"Serialization primitive\" section for why). Embed the result verbatim in `\u003Cscript type=\"application\u002Fjson\" id=\"artifact-data\">…\u003C\u002Fscript>`.\n3. **Project the visible HTML from the island you just wrote**, using the composed primitives. Every decision-bearing fact that appears in the visible HTML must be read from the island object built in step 1 — never introduced fresh while writing HTML. This is **the one hard rule**: facts flow island → HTML only; the HTML may add unlimited presentation (layout, color, SVG, animation, novel sections) but never a fact the island doesn't carry.\n4. **Escape every prose fact for display.** Any island text rendered as visible HTML must be HTML-entity-escaped (`&`, `\u003C`, `>`) at render time — this is what keeps a hostile payload (`\u003C\u002Fscript>`, `\u003Cimg onerror=...>`) inert in the visible view even though it is preserved verbatim (and safely) inside the island. This escape is for text-node content only: island prose must never be interpolated into a quoted HTML attribute value (`title=\"…\"`, `aria-label=\"…\"`, `data-*=\"…\"`, `alt=\"…\"`) — the 3-entity set does not cover `\"`\u002F`'`, so a payload like `x\" onmouseover=\"alert(1)` would survive verbatim there as attribute-injection XSS. Render prose only as element text content; if a fact needs to label an element, put it in the element's text, never its attribute.\n5. **Mold-breaking content goes in `ext{}`, never as HTML-only prose.** If the composed layout wants to show something no Tier 1\u002F2\u002F3 field carries, add it to the island's `ext{}` region first, then render it from there. An HTML section with no corresponding island field anywhere (fixed-core or `ext`) is a contract violation, not creative freedom.\n6. **Wire the three exporters** against the same island script tag (`primitives-catalog.md` → \"The three exporters\"). Copy-as-JSON must read the island script's raw `textContent` and copy it verbatim — never re-`JSON.stringify` the parsed object, which would not guarantee byte-identity with what was written.\n7. **Populate `render_meta`** with every archetype id actually composed (in the order composed) and a `design_seed` string that is **distinct per artifact but stable within one** (e.g. `\u003Ctype>-\u003Cname>-\u003Cdate>-\u003Ca-short-distinct-suffix>`) — so re-projection reproduces *this* design while different artifacts get different visual identities rather than one shared house stamp. The composer writes this field but never reads it back; the `html-artifact-mutator` skill (v2) is the reader — a content-class mutation's re-projection reuses this exact recorded `{ archetypes, design_seed }` to hold the design stable across edits instead of re-classifying from scratch.\n\n## Design for engagement — variety and flair\n\nThese artifacts exist for one reason: to make a human *want* to open a dense document and actually read it. A projection that is perfectly faithful but visually flat has already failed that job, even when every fact is present. Here, presentation is not decoration — it is the point. Approach each artifact as a piece of design work, not a template to fill.\n\n- **Your presentation freedom is total, and safe to spend.** Downstream consumers read only the JSON island, never the rendered HTML — so nothing you do to the *look* can break a reader or the equivalence contract. Above the island contract and the invariants below, there is no house style to conform to. Compose boldly.\n- **Make each artifact its own.** Do not converge on one layout that every document comes out wearing. Two different plans should *feel* visibly different — a different structural rhythm, a different way of leading the eye, a visual personality that fits *this* content. Let `design_seed` stand for a genuine per-artifact aesthetic commitment, not a constant. This is the closest thing to \"turning up the temperature\" that a projection skill has: deliberate variation, chosen fresh each time.\n- **Draw the structure instead of describing it.** When content has a shape — a dependency chain, a pipeline, a hierarchy, a before\u002Fafter, a sequence, a set of trade-offs — consider rendering it as an inline SVG diagram, flowchart, or figure rather than one more paragraph. A picture earns engagement prose cannot. Anything that carries facts reads them from the island (the one hard rule still holds); purely decorative flourishes carry no facts and are free.\n- **Break up the walls of text.** Long prose is where engagement goes to die. Give it rhythm and entry points: lift key phrases into callouts or asides, use progressive disclosure for depth, vary section shapes instead of stacking identical `\u003Cp>` blocks, and use whitespace, sidebars, and visual hierarchy so the eye always has somewhere to land. A dense `ext{}` block is a candidate for a diagram or a staged reveal, not a 400-word slab.\n- **Restraint is part of taste.** Flair serves engagement, never spectacle. It must never bury a fact, fight readability or accessibility, or tempt you to invent something the island doesn't carry. When a section is genuinely plain, a clean and quiet layout is the *right* creative choice — variety means fitting the design to the content, not forcing ornament onto it.\n- **No checklist on purpose.** There is deliberately no prescribed set of moves here, because a fixed recipe would make every artifact converge again. Resist reaching for the same handful of devices every time; read what this specific document is about and give it the design it deserves.\n\n## Invariants enforced on every artifact, no exceptions\n\n- **Badge markup for `type`\u002F`status`\u002F`date` — the one narrow carve-out from \"Design for engagement\" above.** These three scalar fields MUST render as a `\u003Cspan class=\"badge\">{value}\u003C\u002Fspan>` element — exactly one per field, holding the HTML-entity-escaped value as its text content. Every other layout, wording, and visual choice around them stays free; only this specific markup is fixed, so the `html-artifact-mutator` skill's scalar fast-path can find exactly one element to patch in place instead of falling back to an appended \"Related Artifacts\" section.\n- **Single self-contained file.** No external `http(s)` `src`\u002F`href`\u002F`@import`\u002F`url()`; no `\u003Clink>` tag; one `\u003Cstyle>` block; the JSON island plus one component\u002Fexporter `\u003Cscript>` block.\n- **Token layer.** Every color\u002Fspacing\u002Fradius decision flows from a `:root` custom-property block with a light\u002Fdark override — never a hardcoded design choice. This is what makes the output consistent and effortless for the user (SC5): the composer never asks the user for a design decision.\n- **JSON island via the T01 primitive**, exactly as described above.\n- **The three exporters**, always present, always wired to the same island.\n- **Responsive.** At least one `@media` breakpoint; navigation collapses gracefully on narrow viewports.\n- **Accessible.** Real ARIA roles\u002Flabels on tabs\u002Faccordion\u002Ftoggle; semantic elements preferred over div soup.\n- **Injection-safe.** Verified by the composer itself before finishing: does a hostile payload embedded anywhere in the payload survive as literal, executable markup anywhere in the output? If yes, fix the escaping before returning — do not ship and hope a downstream test catches it.\n\n## Self-check before returning\n\n1. Re-read the projected HTML section by section. For every decision-bearing fact, can you point to the exact island field it came from? If not, either add the fact to the island (with `ext{}` backing if no fixed-core field fits) or remove it from the HTML.\n2. Confirm the file has no external dependency of any kind.\n3. Confirm the exporters are wired and copy-as-JSON reads the island's raw `textContent`.\n4. Confirm `render_meta.archetypes` lists exactly the archetypes actually composed, and `render_meta.design_seed` is set.\n5. Write the file to `target_path` and return that path to the caller. Do not print the full HTML into the conversation — the caller only needs the path.\n\n## Guardrails\n\n- Never ask the user a design question (color, font, layout preference). Zero user design input is a success criterion (SC5), not a fallback for when the composer is unsure.\n- Never load the gallery wholesale — classify against `gallery-manifest.md` first, then load only the matched files.\n- Never build or invoke a runnable `serialize`\u002F`extract` module. The escaping primitive is authored directly into the artifact's inline `\u003Cscript>` each time (per `primitives-catalog.md`); the only place a reusable JS implementation of it is allowed to live is `tests\u002Fsupport\u002Fisland-spec.ts`, which this skill never imports.\n- Never mutate an existing artifact's island in place — that is the `html-artifact-mutator` skill's job, not this skill's.\n- Never write a fact into the HTML that required guessing; if the payload is missing something the projection needs, stop and report the missing field to the caller instead of inventing it.\n","# HTML Artifact Composer\n\nThe **create** capability of the `html-artifacts` subsystem (`CONTEXT.md` → **Composer skill**). A workflow command invokes this skill at its artifact-write step with a structured payload; this skill turns that payload into one self-contained `.html` file and returns its path. It never talks to the user directly and never asks for design input.\n\n## Invocation — the calling command MUST run the composer in a fresh subagent\n\nAny command that reaches its artifact-write step (`\u002Fworkflows:plan` today; brainstorm\u002Farchitecture and other emitters as they migrate) **delegates composition to a fresh subagent — it does not run the composer inline in its own context.** By the write step the command has accumulated a large context (brainstorm input, gathering-helper reports, the planning\u002Fauthoring dialogue) that the projection does not need; running a single-file HTML generation on top of it bloats the orchestrator, degrades the generation, and drags that transcript into every later step. The payload is already the clean handoff, so the split is natural:\n\n1. **Orchestrator assembles the `payload`** (see Input contract) from its own steps. The payload alone must carry every fact the artifact will show — the one hard rule means nothing else could leak in anyway.\n2. **Orchestrator dispatches one fresh subagent** whose entire context is: an instruction to load and follow *this* `SKILL.md` (point it at the file — do **not** paste the skill body into the prompt; the skill is its instruction set), the `target_path`, the `payload`, and the design-DNA refs this skill loads. The subagent does the whole classify → project cycle.\n3. **The subagent returns only** the written artifact path (plus any missing-required-field report). On a missing-field report the orchestrator fills the field from its own steps and re-dispatches; it never lets the composer fabricate.\n\nOrchestrator owns *facts* (the payload); the composition subagent owns *projection* (the HTML) — the same delegation `\u002Fworkflows:work` uses for heavy units. Every future command that gains a composer write-step invokes it this way, by reference to this section, so the pattern stays single-sourced instead of drifting per command.\n\n## Required contract\n\nBefore composing anything, load:\n\n- `commands\u002Fworkflows\u002Freferences\u002Fhtml-artifacts\u002Fisland-contract.md` — the fixed-core schema (Tier 1 envelope + Tier 2 `plan` contract core), Tier 3\u002F4, the serialization primitive, and the field-coverage map. The island this skill writes MUST conform to it exactly.\n- `commands\u002Fworkflows\u002Freferences\u002Fhtml-artifacts\u002Fprimitives-catalog.md` — the invariant design DNA (token layer, TOC, tabs, accordion, exporters, injection-safe rendering, etc.) every artifact is built from.\n- `commands\u002Fworkflows\u002Freferences\u002Fhtml-artifacts\u002Fgallery-manifest.md` — the one-line-per-entry archetype\u002Frecipe index. This is the **only** gallery file read on every generation.\n\nIf any of these three cannot be loaded, stop and report the contract as unavailable instead of inventing a schema or a design.\n\n## Input contract\n\nThe caller (a workflow command) supplies:\n\n- `target_path` — where to write the artifact, e.g. `docs\u002Fplans\u002F2026-07-09-feat-csv-export-plan.html`.\n- `payload` — an object covering every Tier 1 envelope field and every Tier 2 `plan` contract-core field required by `island-contract.md`'s `REQUIRED_FIXED_CORE_KEYS`, plus the Tier 3 prose fields and any Tier 4 `ext{}` content the command has already gathered. The caller is responsible for gathering this content (WHY anchor, execution slices, TDD\u002Fevidence contract, etc.); this skill is responsible only for turning it into a conformant island and a faithful HTML projection — it does not invent missing facts.\n\nIf the payload is missing a required fixed-core field, stop and report exactly which field is missing rather than fabricating a placeholder value.\n\n## Workflow: classify → select\u002Fcompose → draft-bespoke → project\n\n### 1. Classify\n\nAssign the artifact a primary `type` (already present on the payload, e.g. `plan`) and a small set of tags describing what it actually contains: does it have execution slices (`vertical-slices` tag), a pipeline\u002Farchitecture diagram worth drawing, exception\u002Fwaiver arrays worth a risk table, a milestone sequence worth a timeline? Classification is grounded in what the **payload** actually carries — never tag for an archetype the payload has no data to back.\n\n### 2. Select \u002F compose\n\nRead `gallery-manifest.md` (and only that file) and match rows by `type`\u002F`tags[]`. A `plan` payload with execution slices, at least one TDD exception or constitution waiver, and more than one slice typically matches:\n\n- `implementation-plan` (always, for a `plan`-kind payload — it is the anchor archetype for this document family)\n- `milestone-grid` when `slices[]` has more than one entry with meaningful `depends_on` chains\n- `risk-table` when `tdd.exceptions[]` or `constitution.waivers` is non-empty\n- `flowchart` only when the payload's `ext{}` content includes an actual pipeline\u002Farchitecture graph to draw\n\nLoad **only** the matched exemplar\u002Frecipe file(s) from `archetypes\u002F`\u002F`recipes\u002F` — never the whole gallery. Compose their primitives into one document; do not literally copy an exemplar's sample content, only its structural pattern. A matched archetype is a **floor, not a ceiling**: you are expected to recompose, reorder, augment, and add novel island-backed sections beyond it, and to vary that composition between artifacts — see \"Design for engagement\" below. Matching tells you what the content *is*, not what the finished piece must *look like*.\n\n### 3. Draft bespoke (when nothing fits)\n\nIf no manifest row's `type`\u002F`tags[]` combination fits the payload, draft a throwaway template directly from `primitives-catalog.md`'s primitives, following the nearest recipe sheet's \"Bespoke-drafting note\" as a blueprint for structure. A bespoke template still obeys every invariant below — bespoke means \"no pre-built archetype,\" not \"invariants optional.\"\n\n### 4. Project (island-first, always)\n\nGeneration order is fixed, in this order, every time:\n\n1. **Author the island first.** Build the complete JSON object matching `island-contract.md` exactly: every Tier 1 + Tier 2 required field from the payload, the Tier 3 prose fields verbatim, any Tier 4 `ext{}` content the bespoke\u002Fbespoke-bridging sections need, and `render_meta` (see below). Do this before writing a single line of visible HTML.\n2. **Serialize it with the T01 primitive.** `JSON.stringify(island)`, then replace `\u003C` → `\\u003C`, `>` → `\\u003E`, `\u002F` → `\\u002F`, U+2028 → `\\u2028`, U+2029 → `\\u2029`. Do **not** use HTML-entity escaping (`&lt;`) for the island — it is not reversible inside a `\u003Cscript type=\"application\u002Fjson\">` element (see `island-contract.md`'s \"Serialization primitive\" section for why). Embed the result verbatim in `\u003Cscript type=\"application\u002Fjson\" id=\"artifact-data\">…\u003C\u002Fscript>`.\n3. **Project the visible HTML from the island you just wrote**, using the composed primitives. Every decision-bearing fact that appears in the visible HTML must be read from the island object built in step 1 — never introduced fresh while writing HTML. This is **the one hard rule**: facts flow island → HTML only; the HTML may add unlimited presentation (layout, color, SVG, animation, novel sections) but never a fact the island doesn't carry.\n4. **Escape every prose fact for display.** Any island text rendered as visible HTML must be HTML-entity-escaped (`&`, `\u003C`, `>`) at render time — this is what keeps a hostile payload (`\u003C\u002Fscript>`, `\u003Cimg onerror=...>`) inert in the visible view even though it is preserved verbatim (and safely) inside the island. This escape is for text-node content only: island prose must never be interpolated into a quoted HTML attribute value (`title=\"…\"`, `aria-label=\"…\"`, `data-*=\"…\"`, `alt=\"…\"`) — the 3-entity set does not cover `\"`\u002F`'`, so a payload like `x\" onmouseover=\"alert(1)` would survive verbatim there as attribute-injection XSS. Render prose only as element text content; if a fact needs to label an element, put it in the element's text, never its attribute.\n5. **Mold-breaking content goes in `ext{}`, never as HTML-only prose.** If the composed layout wants to show something no Tier 1\u002F2\u002F3 field carries, add it to the island's `ext{}` region first, then render it from there. An HTML section with no corresponding island field anywhere (fixed-core or `ext`) is a contract violation, not creative freedom.\n6. **Wire the three exporters** against the same island script tag (`primitives-catalog.md` → \"The three exporters\"). Copy-as-JSON must read the island script's raw `textContent` and copy it verbatim — never re-`JSON.stringify` the parsed object, which would not guarantee byte-identity with what was written.\n7. **Populate `render_meta`** with every archetype id actually composed (in the order composed) and a `design_seed` string that is **distinct per artifact but stable within one** (e.g. `\u003Ctype>-\u003Cname>-\u003Cdate>-\u003Ca-short-distinct-suffix>`) — so re-projection reproduces *this* design while different artifacts get different visual identities rather than one shared house stamp. The composer writes this field but never reads it back; the `html-artifact-mutator` skill (v2) is the reader — a content-class mutation's re-projection reuses this exact recorded `{ archetypes, design_seed }` to hold the design stable across edits instead of re-classifying from scratch.\n\n## Design for engagement — variety and flair\n\nThese artifacts exist for one reason: to make a human *want* to open a dense document and actually read it. A projection that is perfectly faithful but visually flat has already failed that job, even when every fact is present. Here, presentation is not decoration — it is the point. Approach each artifact as a piece of design work, not a template to fill.\n\n- **Your presentation freedom is total, and safe to spend.** Downstream consumers read only the JSON island, never the rendered HTML — so nothing you do to the *look* can break a reader or the equivalence contract. Above the island contract and the invariants below, there is no house style to conform to. Compose boldly.\n- **Make each artifact its own.** Do not converge on one layout that every document comes out wearing. Two different plans should *feel* visibly different — a different structural rhythm, a different way of leading the eye, a visual personality that fits *this* content. Let `design_seed` stand for a genuine per-artifact aesthetic commitment, not a constant. This is the closest thing to \"turning up the temperature\" that a projection skill has: deliberate variation, chosen fresh each time.\n- **Draw the structure instead of describing it.** When content has a shape — a dependency chain, a pipeline, a hierarchy, a before\u002Fafter, a sequence, a set of trade-offs — consider rendering it as an inline SVG diagram, flowchart, or figure rather than one more paragraph. A picture earns engagement prose cannot. Anything that carries facts reads them from the island (the one hard rule still holds); purely decorative flourishes carry no facts and are free.\n- **Break up the walls of text.** Long prose is where engagement goes to die. Give it rhythm and entry points: lift key phrases into callouts or asides, use progressive disclosure for depth, vary section shapes instead of stacking identical `\u003Cp>` blocks, and use whitespace, sidebars, and visual hierarchy so the eye always has somewhere to land. A dense `ext{}` block is a candidate for a diagram or a staged reveal, not a 400-word slab.\n- **Restraint is part of taste.** Flair serves engagement, never spectacle. It must never bury a fact, fight readability or accessibility, or tempt you to invent something the island doesn't carry. When a section is genuinely plain, a clean and quiet layout is the *right* creative choice — variety means fitting the design to the content, not forcing ornament onto it.\n- **No checklist on purpose.** There is deliberately no prescribed set of moves here, because a fixed recipe would make every artifact converge again. Resist reaching for the same handful of devices every time; read what this specific document is about and give it the design it deserves.\n\n## Invariants enforced on every artifact, no exceptions\n\n- **Badge markup for `type`\u002F`status`\u002F`date` — the one narrow carve-out from \"Design for engagement\" above.** These three scalar fields MUST render as a `\u003Cspan class=\"badge\">{value}\u003C\u002Fspan>` element — exactly one per field, holding the HTML-entity-escaped value as its text content. Every other layout, wording, and visual choice around them stays free; only this specific markup is fixed, so the `html-artifact-mutator` skill's scalar fast-path can find exactly one element to patch in place instead of falling back to an appended \"Related Artifacts\" section.\n- **Single self-contained file.** No external `http(s)` `src`\u002F`href`\u002F`@import`\u002F`url()`; no `\u003Clink>` tag; one `\u003Cstyle>` block; the JSON island plus one component\u002Fexporter `\u003Cscript>` block.\n- **Token layer.** Every color\u002Fspacing\u002Fradius decision flows from a `:root` custom-property block with a light\u002Fdark override — never a hardcoded design choice. This is what makes the output consistent and effortless for the user (SC5): the composer never asks the user for a design decision.\n- **JSON island via the T01 primitive**, exactly as described above.\n- **The three exporters**, always present, always wired to the same island.\n- **Responsive.** At least one `@media` breakpoint; navigation collapses gracefully on narrow viewports.\n- **Accessible.** Real ARIA roles\u002Flabels on tabs\u002Faccordion\u002Ftoggle; semantic elements preferred over div soup.\n- **Injection-safe.** Verified by the composer itself before finishing: does a hostile payload embedded anywhere in the payload survive as literal, executable markup anywhere in the output? If yes, fix the escaping before returning — do not ship and hope a downstream test catches it.\n\n## Self-check before returning\n\n1. Re-read the projected HTML section by section. For every decision-bearing fact, can you point to the exact island field it came from? If not, either add the fact to the island (with `ext{}` backing if no fixed-core field fits) or remove it from the HTML.\n2. Confirm the file has no external dependency of any kind.\n3. Confirm the exporters are wired and copy-as-JSON reads the island's raw `textContent`.\n4. Confirm `render_meta.archetypes` lists exactly the archetypes actually composed, and `render_meta.design_seed` is set.\n5. Write the file to `target_path` and return that path to the caller. Do not print the full HTML into the conversation — the caller only needs the path.\n\n## Guardrails\n\n- Never ask the user a design question (color, font, layout preference). Zero user design input is a success criterion (SC5), not a fallback for when the composer is unsure.\n- Never load the gallery wholesale — classify against `gallery-manifest.md` first, then load only the matched files.\n- Never build or invoke a runnable `serialize`\u002F`extract` module. The escaping primitive is authored directly into the artifact's inline `\u003Cscript>` each time (per `primitives-catalog.md`); the only place a reusable JS implementation of it is allowed to live is `tests\u002Fsupport\u002Fisland-spec.ts`, which this skill never imports.\n- Never mutate an existing artifact's island in place — that is the `html-artifact-mutator` skill's job, not this skill's.\n- Never write a fact into the HTML that required guessing; if the payload is missing something the projection needs, stop and report the missing field to the caller instead of inventing it.\n",{"name":5,"description":7},"main","4c70ff7e10e692dfcc6d7877a6e57dd08df94d9b","plugins\u002Fcompound-engineering\u002Fskills\u002Fhtml-artifact-composer","https:\u002F\u002Fgithub.com\u002FThe-Rabak\u002Fcompound-engineering-plugin","https:\u002F\u002Fgithub.com\u002FThe-Rabak","2026-07-28 15:25:35",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add The-Rabak\u002Fcompound-engineering-plugin --skill html-artifact-composer",{"tool":54,"command":55},"bunx","bunx skills add The-Rabak\u002Fcompound-engineering-plugin --skill html-artifact-composer",{"tool":57,"command":58},"pnpm","pnpm dlx skills add The-Rabak\u002Fcompound-engineering-plugin --skill html-artifact-composer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FThe-Rabak\u002Fcompound-engineering-plugin\u002Fblob\u002Fmain\u002Fplugins\u002Fcompound-engineering\u002Fskills\u002Fhtml-artifact-composer\u002FSKILL.md",true,[],[63,75,83,92,100,107],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":37},"01M6CY858Z5RCC30TKAVBDJ6SZ","skill-one","Shared reusable skill.","https:\u002F\u002Fgithub.com\u002FThe-Rabak\u002Fcompound-engineering-plugin\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsample-portable-plugin\u002Fskills\u002Fskill-one\u002FSKILL.md",[],[70,71,72,73,74],"skill one","shared","reusable","haiku","gpt",{"skillNo":76,"name":65,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":37},"01M6CY843KQG3FQF6259420CCD","Sample skill","https:\u002F\u002Fgithub.com\u002FThe-Rabak\u002Fcompound-engineering-plugin\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsample-plugin\u002Fskills\u002Fskill-one\u002FSKILL.md",[],[70,81,82],"sample","sample skill",{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":37},"01M6CY82607GGPWR5H25SY74H2","disabled-skill","A skill with model invocation disabled","https:\u002F\u002Fgithub.com\u002FThe-Rabak\u002Fcompound-engineering-plugin\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsample-plugin\u002Fskills\u002Fdisabled-skill\u002FSKILL.md",[],[90,91],"disabled skill","model",{"skillNo":93,"name":94,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":37},"01M6CY80RWMK81T97A2Q5KAFAF","default-skill","https:\u002F\u002Fgithub.com\u002FThe-Rabak\u002Fcompound-engineering-plugin\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcustom-paths\u002Fskills\u002Fdefault-skill\u002FSKILL.md",[],[98,99],"default skill","default",{"skillNo":101,"name":102,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":37},"01M6CY7ZK2PMV75ES90W6YYD4S","custom-skill","https:\u002F\u002Fgithub.com\u002FThe-Rabak\u002Fcompound-engineering-plugin\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcustom-paths\u002Fcustom-skills\u002Fcustom-skill\u002FSKILL.md",[],[106],"custom skill",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":37},"01M6CY7V6C7HFCNJEVNFT1X00T","workflow-next-step","This skill should be used at the end of core compound-engineering workflows to inspect completed artifacts, show the workflow progress checklist, and give the exact next-session command with inputs.","https:\u002F\u002Fgithub.com\u002FThe-Rabak\u002Fcompound-engineering-plugin\u002Fblob\u002Fmain\u002Fportable\u002Fcompound-engineering\u002Fskills\u002Fworkflow-next-step\u002FSKILL.md",[],[36,114,115,116,117,118,119,30,120,121,122,35],"next","workflow next step","compound","show","checklist","session","engineering","artifacts","core"]