{{command_prefix}}export
Turns a completed cycle's in-repo design output into a shareable artifact. Closes the gap that .design/*.md lives only in the repo - stakeholders not in code can't consume it. The format contract + source set live in ../../reference/export-formats.md; the Notion write-path in ../../connections/notion.md.
Steps
- Resolve the cycle.
<cycle-id>(or the current cycle from.design/STATE.md). Read the source set:EXPERIENCE.md(Phase 19.5),.design/DESIGN.md,.design/DESIGN-VERIFICATION.md,.design/DESIGN-AUDIT.md(if present), the decision log, and any Preview/Chromatic screenshots. - Redact (always) + pseudonymize (opt-in). Pass every section through
scripts/lib/redact.cjs(secrets). If--pseudonymize, additionally applyscripts/lib/pseudonymize.cjs(git identity / paths / hostname) for external sharing. HonorGDD_DISABLE_NOTIONfor the notion format. - Assemble per
--format:html(default) -node -e "require('scripts/lib/export/build-html.cjs').buildHtml({...})"→ a self-contained HTML (inline CSS, base64-embedded screenshots, no external refs). Write to.design/export/<cycle>.html.pdf- the samebuildHtml({ ..., print: true })(Paged.js-compatible@pageprint CSS). Write.design/export/<cycle>.print.html; instruct the user to render it via Paged.js / headless-Chrome (GDD ships no PDF runtime - D-02).notion- probe the Notion MCP (ToolSearch({query:"notion"})); ifavailable, create a page from the same source (nested toggles + image upload) perconnections/notion.md; ifnot_configured/disabled → degrade to thehtmlformat + a note.
--pr- hand the generated HTML preview toagents/pr-commenter.md(viaTask) to post as a PR comment (degrade-to-noop if no PR / pr-commenter unavailable).- Print the artifact path (and the Notion URL / PR comment status when applicable).
Do Not
- Do not add a PDF/markdown runtime dependency (
paged/puppeteer/pdfkit/a markdown lib) -build-html.cjsis pure and the PDF is render-it-yourself print HTML (D-02). - Do not emit an un-redacted artifact - redact is mandatory; pseudonymize is the external-sharing opt-in.
- Do not block on Notion/PR - both degrade to a noop / the html file.


