Critical rules
- No libraries, CDNs, frameworks, build steps, remote fonts, or network
requests in the deck itself. It must open directly from a local
index.html. - Never rebuild
core/slides.js. Navigation, key handling and thedata-enter/data-exitcontract are fixed. Extend by layering onSlidesRuntime.controller, the waycore/morph.jsdoes. If the runtime itself must change, mirror it inscripts/slides-runtime.test.mjs. - Never edit
core/slides.cssper deck. It owns structure, archetype layout and the reveal presets. Override intheme.css, or indeck.css. - Fonts must be inlined as data URIs (
tools/fonts.mjs).@font-facefiles are blocked overfile://, so a deck opened by double-click loses them. - Never invent facts, statistics, quotes, images, or licenses. Verify current claims against primary sources, cite them, and record where every asset came from.
- Derive tokens and content from the subject; derive the look from a template. Do not invent a new layout system mid-pass.
- Write semantic HTML: real headings, lists, figures, one
<section class="slide">per slide in DOM order. - "Use the space" ≠ stretching boxes to fill the viewport. It means stable hierarchy, content-sized modules, comfortable gaps, and intentional margin.
- Verify before reporting done.
npm run qafor the deck,npm run auditafter any recording. Never call a deck or an export finished on the strength of having looked at it. - User-owned copy is sacred. After the user edits text, change layout and CSS only — never rewrite their wording unless asked.
Workflow
- Inspect everything supplied — content, data, brand, delivery mode, and any script or captions the deck must back.
- Ask one grouped question covering only the real gaps. Always include the
look unless the user named a template or gave brand direction that settles
it. Defaults in brackets if you must proceed on assumptions:
- Look:
dark-marker(courses, tutorials) |light-editorial(talks, reports) |midnight-tech(developer content) |bold-keynote(pitches) |minimal-mono(research talks) — one line each, and say which you'd pick - Delivery: live talk | recorded video/tutorial | self-paced send
- Density: sparse keynote | tutorial-comfortable
- Look:
- Research unknown or current facts before writing any slide body.
- Outline the deck as titles only, each title the slide's takeaway rather than a topic label, and check that the sequence alone carries the message before writing any body copy.
- Scaffold the deck:
assets/core/→core/,assets/skeleton.html→index.html- the chosen
assets/templates/<name>/→theme.css,fonts.json assets/tools/→tools/,assets/starter/*→ deck root (gitignore→.gitignore)- create an empty
deck.css npm install && node tools/fonts.mjsnpm run devrenders every archetype the template offers — read it before writing slides.
- Adapt tokens only to the subject, then write the slides. Read
references/web-slides.mdfor the DOM, composition and archetype contract, andreferences/motion.mdbefore setting any reveal or preset. - Verify:
npm run qa, and fix everything it reports. - Export if asked —
references/export.md:npm run pdf,npm run record/record:2k/record:4k, thennpm run audit. When the deck backs a recorded voiceover, time the reveals from the caption file in a sidecar, never in the markup. - Report the files, how to open them, the controls, the template used, every assumption, and sources for any researched claim or asset.
Resources
| Path | Read when |
|---|---|
references/web-slides.md |
Before editing markup — DOM/state contract, composition, archetypes, presets |
references/templates.md |
Choosing, adapting, or authoring a template; the token contract |
references/motion.md |
Adding any reveal, preset, morph, or animation |
references/export.md |
Producing a PDF or video, or timing reveals to narration |
assets/optional/ |
router.js — hash deep links; copy in only when asked (web-slides.md) |
scripts/slides-runtime.test.mjs |
Guards the runtime contract; run after any change to it |
Assets and provenance
- Logos: take the vendor's own site icon first; aggregators go stale. Verify
the mark is current, record every source in a
CREDITS.mdbeside the files, and never draw an approximation of a real logo. - Light-on-dark app icons need a full-bleed tile (
.tool__tile--dark), not a white one.
Constraints
- Do not add presenter consoles, autoplay, URL routing, or touch gestures
unless asked. When URL routing is asked for, copy
assets/optional/router.jsrather than writing one — the jump-without-replaying-a-morph handling is the hard part.