decklight 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/PLATFORM.md +666 -0
  2. package/README.md +224 -150
  3. package/SPEC.md +732 -886
  4. package/cli/agent-review.mjs +245 -0
  5. package/cli/agents.mjs +25 -5
  6. package/cli/associate.mjs +12 -12
  7. package/cli/audit.mjs +42 -10
  8. package/cli/banner.mjs +41 -17
  9. package/cli/bundle-audio.mjs +183 -0
  10. package/cli/bundle.mjs +383 -31
  11. package/cli/cast.mjs +7 -7
  12. package/cli/check.mjs +961 -0
  13. package/cli/clone-deck.mjs +179 -0
  14. package/cli/commands.mjs +345 -0
  15. package/cli/comments.mjs +64 -18
  16. package/cli/commit-flow.mjs +44 -19
  17. package/cli/commit-message.mjs +51 -74
  18. package/cli/commit-split.mjs +601 -0
  19. package/cli/deck-refs.mjs +59 -0
  20. package/cli/deck-routes.mjs +67 -0
  21. package/cli/deckfile.mjs +3 -5
  22. package/cli/decklight.mjs +68 -289
  23. package/cli/design-system-deps.mjs +209 -0
  24. package/cli/design-system-edit.mjs +194 -0
  25. package/cli/design-system-refs.mjs +409 -0
  26. package/cli/design-system.mjs +429 -0
  27. package/cli/doctor.mjs +115 -0
  28. package/cli/edit-git.mjs +353 -0
  29. package/cli/edit-handover.mjs +445 -0
  30. package/cli/edit-look.mjs +388 -0
  31. package/cli/edit-slides.mjs +683 -0
  32. package/cli/edit.mjs +2126 -842
  33. package/cli/enhance.mjs +483 -0
  34. package/cli/extension.mjs +10 -10
  35. package/cli/font-refs.mjs +273 -0
  36. package/cli/font.mjs +246 -0
  37. package/cli/git-tree.mjs +1 -1
  38. package/cli/git.mjs +65 -11
  39. package/cli/import.mjs +56 -10
  40. package/cli/init.mjs +400 -234
  41. package/cli/library.mjs +127 -0
  42. package/cli/loader.mjs +3 -1
  43. package/cli/marketplace.mjs +215 -21
  44. package/cli/narrate.mjs +176 -0
  45. package/cli/open-browser.mjs +63 -0
  46. package/cli/open.mjs +943 -0
  47. package/cli/pdf.mjs +41 -13
  48. package/cli/pkg.mjs +44 -2
  49. package/cli/plugin.mjs +43 -41
  50. package/cli/port-conflict.mjs +53 -23
  51. package/cli/pptx-export.mjs +71 -26
  52. package/cli/publish.mjs +8 -4
  53. package/cli/qr.mjs +1 -1
  54. package/cli/record.mjs +14 -12
  55. package/cli/remote.mjs +11 -11
  56. package/cli/restore.mjs +11 -4
  57. package/cli/review-ref.mjs +125 -0
  58. package/cli/review-remote.mjs +92 -48
  59. package/cli/review-routes.mjs +254 -0
  60. package/cli/review-store.mjs +47 -7
  61. package/cli/review-submit.mjs +47 -57
  62. package/cli/runtime-link.mjs +560 -0
  63. package/cli/serve.mjs +235 -44
  64. package/cli/setup.mjs +112 -0
  65. package/cli/sign.mjs +1 -1
  66. package/cli/skill-content.mjs +190 -33
  67. package/cli/skills.mjs +107 -24
  68. package/cli/start.mjs +110 -0
  69. package/cli/supervise.mjs +6 -6
  70. package/cli/theme-refs.mjs +515 -0
  71. package/cli/theme.mjs +181 -137
  72. package/cli/trust.mjs +83 -0
  73. package/cli/units.mjs +39 -42
  74. package/cli/update-check.mjs +1 -5
  75. package/cli/upgrade.mjs +194 -28
  76. package/cli/upstream.mjs +4 -3
  77. package/cli/util.mjs +4 -4
  78. package/cli/wizard.mjs +6 -6
  79. package/dist/build-info.json +1 -1
  80. package/dist/decklight.css +1126 -49
  81. package/dist/decklight.js +212 -115
  82. package/dist/decklight.js.map +4 -4
  83. package/docs/GLOSSARY.md +141 -0
  84. package/docs/architecture.svg +17 -17
  85. package/package.json +4 -2
  86. package/themes/README.md +9 -8
  87. package/themes/reveal-solarized.css +10 -0
  88. package/tools/args.mjs +20 -0
  89. package/tools/atomic-write.mjs +48 -0
  90. package/tools/brand-palette.mjs +717 -0
  91. package/tools/bridge.mjs +1 -1
  92. package/tools/build-groups.mjs +42 -0
  93. package/tools/color.mjs +48 -0
  94. package/tools/deck-html.mjs +396 -11
  95. package/tools/design-system-format.mjs +753 -0
  96. package/tools/elevenlabs-tts.mjs +110 -17
  97. package/tools/exec.mjs +35 -2
  98. package/tools/extension-check.mjs +31 -7
  99. package/tools/font-format.mjs +190 -0
  100. package/tools/font-stacks.mjs +24 -0
  101. package/tools/gemini-tts.mjs +3 -0
  102. package/tools/lipsync-config.mjs +103 -0
  103. package/tools/lipsync-engines.mjs +205 -2
  104. package/tools/lipsync-server.mjs +264 -41
  105. package/tools/lipsync.mjs +37 -18
  106. package/tools/local-voice.mjs +32 -42
  107. package/tools/narration-manifest.mjs +196 -0
  108. package/tools/narration-synth.mjs +416 -0
  109. package/tools/pptx.mjs +776 -19
  110. package/tools/publish-targets.mjs +1 -1
  111. package/tools/publish-voices.mjs +3 -3
  112. package/tools/recording-impact.mjs +7 -3
  113. package/tools/render-theme.mjs +33 -0
  114. package/tools/review-anchor.mjs +28 -12
  115. package/tools/semver.mjs +40 -0
  116. package/tools/sentences.mjs +180 -0
  117. package/tools/shot.mjs +14 -7
  118. package/tools/site-voices.mjs +232 -0
  119. package/tools/template-theme.mjs +1 -1
  120. package/tools/test-impact.mjs +19 -10
  121. package/tools/theme-check.mjs +30 -3
  122. package/tools/tts-cache.mjs +4 -3
  123. package/tools/tts-engines.mjs +38 -20
  124. package/tools/tts-setup.mjs +7 -7
  125. package/tools/video-options.mjs +34 -0
  126. package/tools/video.mjs +461 -48
  127. package/tools/voiceover-server.mjs +185 -104
  128. package/tools/voiceover.mjs +119 -261
  129. package/tools/zip.mjs +1 -1
  130. package/cli/dev.mjs +0 -623
  131. package/cli/present.mjs +0 -853
  132. package/cli/review.mjs +0 -361
  133. package/tools/publish-site-voices.mjs +0 -75
package/README.md CHANGED
@@ -1,60 +1,80 @@
1
1
  # Decklight
2
2
 
3
- **The presentation library that presents itself.**
4
-
5
- A deck is a single HTML file — no build, no server, no framework. You describe a slide in plain English, your AI agent writes it, and because agents can't squint at a screen, every feature is **verifiable by a headless render**: clipped content flags itself, every theme passes machine-checked contrast gates, and terminal demos are recorded truth rather than screenshots.
6
-
7
- ## Why I built this
8
-
9
- I have lost more hours than I'd like to admit fighting my slides instead of writing them.
10
-
11
- Keynote pins me to one laptop and a proprietary file I can't diff. PowerPoint turns a two-line edit into a fifteen-minute wrestle with alignment guides. Google Slides makes me watch a spinner to move a box three pixels. And all three share the same original sin: the deck is a **binary blob**. You can't grep it, you can't code-review it, you can't hand it to a program and say "fix the contrast on slide 12." When something's wrong, *you* are the one clicking around at 11pm.
12
-
13
- I wanted the opposite of that. A deck that is **plain text** end to end — one HTML file you can read, diff, and email — with a runtime that has **zero dependencies** and runs straight off `file://`. Everything is text, so decks live happily in git, and anything that can read text can read your slides.
14
-
15
- But the real reason this project exists is the second half: I wanted a codebase where **bugs and features ship at the speed of light**, because the AI agents do the heavy lifting. Open an issue in the morning, and by lunch an agent has reproduced it, another has drafted a spec with real rendered mockups, and — once I give the nod — a third has implemented it, proven it with a screenshot, and merged it green. That's not a someday aspiration; it's [how this repo runs today](#how-decklight-itself-ships-at-agent-speed). Decklight is built the way it's meant to be used: humans decide *what*, agents handle *how*, and a wall of automated verification keeps everyone honest.
16
-
17
- > `SPEC.md` is the full contract and `demo/showcase.html` is the exhaustive self-demo. **This README is the quick tour.** For the two-minute version, open **`demo/intro.html`** — a short deck that explains what Decklight is, each slide live-demoing the feature it describes. See it all live at **[decklight.io](https://decklight.io)**.
18
-
19
- ## What you get
20
-
21
- - **Agent-native** — describe a slide to your favorite agent; `init` hands it a skill with the real contract, and overflow flags + contrast gates + headless-render assertions let it check its own work without eyes.
22
- - **One file, zero build** — author a single HTML file, double-click it, present. No toolchain, no server, no framework.
23
- - **Diagrams & graphics** — native, theme-aware inline SVG, not just bullet lists.
24
- - **Animation** — progressive builds, Magic Move between slides, and diagrams that draw themselves in.
25
- - **46 built-in themes** — every one passes WCAG contrast gates and codified palette rules; generate your own with a keystroke.
26
- - **Truthful terminals** — real PTY recordings replayed truthfully, never a video.
27
- - **Live narration** — text-to-speech presents the deck by itself, in sync, captions included.
28
- - **Coming from PowerPoint** — `import` brings the deck across (charts as data, hidden slides still hidden, the template's own palette as a theme), and `pdf` / `pptx` hand a file back to whoever still asks for one.
29
- - **Everything is text** — no binary formats, so decks diff cleanly in git and agents can read, review, and edit every byte.
30
- - **Safe to receive** — `decklight present` plays a deck you did not author read-only under a CSP, prints what the file will execute, and strips what it cannot account for. `publish` signs; a `.decklight` container is verified before it renders.
31
- - **Extensible without shipping code to the audience** — themes, templates, engines, importers and presenter chrome install from git-repo marketplaces anyone can host; build-time transforms run on your machine during `bundle`, so nothing executable travels with the deck.
3
+ A presentation library for people who would rather write their slides than
4
+ fight them. A deck is one HTML file. The runtime is one JS file, one CSS file
5
+ and a theme, with no dependencies and no build step. It opens straight from
6
+ `file://`, it diffs cleanly in git, and an AI agent can read, write and verify
7
+ every byte of it.
8
+
9
+ It is live at [decklight.io](https://decklight.io). The two-minute version is
10
+ `demo/intro.html`, the exhaustive one is `demo/showcase.html`, and the contract
11
+ everything is built against is [`SPEC.md`](SPEC.md), with the marketplace
12
+ and library half in [`PLATFORM.md`](PLATFORM.md).
13
+
14
+ ## Why
15
+
16
+ I got tired of decks being binary blobs. You can't grep a Keynote file, you
17
+ can't code-review a PowerPoint, and when slide 12 has a contrast problem at
18
+ 11pm, you're the one clicking around. I wanted a deck that is plain text end to
19
+ end, and a codebase where an agent can do most of the work because it can check
20
+ its own results: clipped content flags itself, every theme passes a
21
+ machine-checked contrast gate, and a headless render is the test.
22
+
23
+ That second half is also how this repo runs. Issues are triaged, reproduced,
24
+ specified and implemented by agents, and a human approves what ships.
25
+ [`CONTRIBUTING.md`](CONTRIBUTING.md) explains the loop if you're curious.
32
26
 
33
27
  ## Quick start
34
28
 
29
+ ```sh
30
+ npx decklight@latest init "My Talk" --dir my-talk
35
31
  ```
36
- npx decklight@latest init "My Deck"
37
- ```
38
32
 
39
- The `@latest` is load-bearing: `npx decklight` with no version reuses whatever
40
- `npx` already unpacked into `~/.npm/_npx/`, so the first version you run is the
41
- one you keep. If you have been running a bare `npx decklight` and it prints an
42
- old number, clear that cache with `npx clear-npx-cache` (or `rm -rf ~/.npm/_npx`)
43
- — or install it properly with `npm i -g decklight`.
33
+ That writes a `deck.html` in `my-talk/` (slides plus a two-line configuration
34
+ block, nothing else) plus a
35
+ `.claude/skills/decklight/` skill and an `AGENTS.md`, so Claude Code (or any
36
+ agent that reads `AGENTS.md`) has the real authoring contract on hand instead of
37
+ guessing from Reveal.js memory. Then it asks whether to open the deck in write
38
+ mode: live reload, edits from the browser, an AI agent on `A`, and git
39
+ underneath: your work snapshotted as you go, committed when you press `K`.
40
+ Say yes. Leave out `--dir` to start the deck in the current directory. Keep the
41
+ `@latest`: npx resolves it against the registry on every run, so you always
42
+ get the current release, whereas a bare `npx decklight` runs any decklight
43
+ already installed in the project or globally, however old.
44
+
45
+ Prefer npm's own scaffolding command? This does the same thing, naming the
46
+ deck after its folder ("My Talk"):
47
+
48
+ ```sh
49
+ npm create decklight my-talk
50
+ ```
44
51
 
45
- This scaffolds a self-contained `deck.html` (double-click it — no server) **and** a `.claude/skills/decklight/` skill + `AGENTS.md`, so Claude Code (or anything that reads `AGENTS.md`) has the full authoring contract on hand instead of guessing from Reveal.js memory. The skill is sliced straight from `SPEC.md`, so it never drifts from the runtime you actually installed.
52
+ After that you rarely need a command name:
46
53
 
47
- **Claude Code on the web** reaches the skill two ways. A committed `.claude/skills/decklight/` loads with the clone, so cloud sessions on that repo have it already — that is the per-project route and it needs nothing but a `git commit`. For every project at once, `decklight skills claude --pack` writes `decklight-skill.zip` to upload in your claude.ai skill settings. (`--global` installs into `~/.claude/skills/`, which local sessions read but cloud machines never see.)
54
+ ```sh
55
+ decklight # in a folder: start a deck, or pick one to open
56
+ decklight talk.html # open a deck: write mode, live reload, an AI agent on A
57
+ decklight talk.html --no-trust # open one you did not write: no-trust mode
58
+ decklight https://github.com/you/talk # clone a deck's repository and open it
59
+ decklight talk.pptx # bring a PowerPoint, Keynote or Slides deck across
60
+ decklight talk.decklight # play somebody else's deck, without trust
61
+ decklight bundle talk.html # one self-contained file to send — the runtime embedded
62
+ decklight doctor # what this machine can do, and how to get the rest
63
+ ```
48
64
 
49
- Prefer to write the HTML yourself? Here's the whole anatomy:
65
+ Type a command wrong and it tells you which one you meant. Or skip the scaffold
66
+ and write the HTML yourself. A deck you author is *data* (slides and a JSON
67
+ configuration block) and `decklight <deck>` adds the runtime as it serves it, in write mode and in `--no-trust`;
68
+ `bundle` embeds it when you hand the file over. This is the whole anatomy:
50
69
 
51
70
  ```html
52
71
  <!doctype html>
53
72
  <html lang="en">
54
73
  <head>
55
74
  <meta charset="utf-8">
56
- <link rel="stylesheet" href="decklight/dist/decklight.css">
57
- <link rel="stylesheet" href="decklight/themes/aurora.css">
75
+ <script type="application/json" data-decklight-config>
76
+ { "decklight": "0.9.0", "theme": "aurora", "transition": "fade" }
77
+ </script>
58
78
  </head>
59
79
  <body>
60
80
  <div class="decklight">
@@ -63,138 +83,192 @@ Prefer to write the HTML yourself? Here's the whole anatomy:
63
83
  <p>With an auto-detected subtitle</p>
64
84
  <ul data-build>
65
85
  <li>First point</li>
66
- <li>Second point — steps in on the next advance</li>
86
+ <li>Second point, revealed on the next advance</li>
67
87
  </ul>
68
- <aside class="notes">Speaker notes. ⟨CLICK⟩ markers align with builds.</aside>
88
+ <aside class="notes">Said before the first point. [click] Said as the first appears. [click] And as the second.</aside>
69
89
  </section>
70
90
  </div>
71
- <script src="decklight/dist/decklight.js"></script>
72
- <script>Decklight.init({ transition: 'fade' });</script>
73
91
  </body>
74
92
  </html>
75
93
  ```
76
94
 
77
- Open it in a browser — `file://` works for everything, no server needed.
78
-
79
- ## How authoring works
80
-
81
- The whole loop is agent-friendly and stays in one file end to end:
82
-
83
- 1. **`decklight init`** — scaffold a starter deck plus the agent skill above.
84
- 2. **Author** one HTML file: `<section>` slides, `data-build` reveals, inline SVG with theme tokens, `<aside class="notes">` split on `⟨CLICK⟩` (notes drive builds, captions, transcript **and** narration all at once).
85
- 3. **`decklight author deck.html`** — the whole live loop under one Ctrl-C: live-reload editing (from your editor or the browser), plus any narration/lip-sync bridges this machine can run (missing prerequisites are skipped with the fix printed, never a hard failure). In the browser: **`E`** edits notes back into the file, **`L`** cycles layouts, **`Z`/`⇧Z`** undo/redo, and **`A`** asks an installed coding agent — Claude Code, Codex, Gemini, Copilot, Aider and more, auto-detected from `$PATH` — to edit the deck headlessly; the page reloads when it saves. Edits auto-commit as you go.
86
- 4. **`decklight cast script.term.yaml`** — record a truthful terminal cast in a real PTY.
87
- 5. **`decklight bundle deck.html --themes all`** — flatten runtime, themes, casts and narration into one offline HTML file to hand off.
88
-
89
- ## Features at a glance
90
-
91
- | Feature | In one line | More |
92
- |---|---|---|
93
- | **Builds** | `data-build` on a container — each child is a step; the layout never jumps | [SPEC BUILDS](SPEC.md#builds--builds-keynote-style-reveal-calls-these-fragments) |
94
- | **SVG diagrams** | inline SVG authored with `var(--d-*)` tokens; recolors with every theme, strokes draw in | [SPEC SVG_DIAGRAMS](SPEC.md#svg_diagrams--svg-diagrams-first-class) |
95
- | **Motion** | slide transitions, Magic Move auto-animate, looping element effects — all respect reduced-motion | [SPEC MOTION](SPEC.md#motion--motion) |
96
- | **Theming** | 46 themes in 2 packs on one token contract; `T` picker, `⌃T` generates a contract-complete theme | [SPEC THEMING](SPEC.md#theming--the-token-contract) |
97
- | **Code** | highlight.js themed through `--hl-*` tokens; `data-lines` steps highlight ranges as builds | [SPEC CODE_AND_MATH](SPEC.md#code_and_math--code--math) |
98
- | **Math** | `data-math` renders `$$…$$` / `\(…\)` LaTeX to native MathML via bundled Temml — no webfonts, no build step | [SPEC CODE_AND_MATH](SPEC.md#code_and_math--code--math) |
99
- | **Terminals** | `decklight cast` captures real PTY output; replayed by typing then streaming, never a video | [SPEC TERMINAL_RECORDINGS](SPEC.md#terminal_recordings--terminal-recordings) |
100
- | **Presenting** | speaker view, rehearse cue cards, overview, command palette, slide finder — all on `file://` | [SPEC PRESENTING](SPEC.md#presenting--presenting--output) |
101
- | **Hidden slides** | `data-hidden` keeps a slide in the file and out of the talk — it keeps its number, `?all` presents it anyway | [SPEC DECK_ANATOMY](SPEC.md#deck_anatomy--deck-anatomy) |
102
- | **Rehearsal timings** | the speaker view records how long each slide actually took and writes it onto the deck; the next run paces against it | [SPEC PRESENTING](SPEC.md#presenting--presenting--output) |
103
- | **Narration** | TTS reads your notes in sync with builds — or **your own voice**, recorded beat by beat and pacing them the same way; the voice is the clock, captions + auto-advance | [SPEC PRESENTING](SPEC.md#presenting--presenting--output) |
104
- | **Review** | reviewers comment on slides and submit the review as a branch; git carries it, a comment finds its slide again after the deck moves, and the author is told a review is waiting | [SPEC REVIEW](SPEC.md#review--reviewer-comments) |
105
- | **Integrity** | read-only `present` under a real CSP header, an ingredients label of what a deck executes, Sigstore signing, the `.decklight` container | [SPEC PRESENTING](SPEC.md#presenting--presenting--output) |
106
- | **The durable record** | decklight commits as you write; `H` reads it back — every version previewed live, what each changed, one keystroke to restore | [SPEC PRESENTING](SPEC.md#presenting--presenting--output) |
107
- | **Marketplaces** | git-repo catalogs, registered not fetched; themes, templates, skills, voices, engines, importers, transforms and presenter plugins | [SPEC MARKETPLACE_REGISTRY](SPEC.md#marketplace_registry--marketplaces-registered-not-fetched) |
108
-
109
- ## CLI
110
-
111
- | Command | Purpose |
95
+ Nothing in that file executes. A deck that prefers to load the runtime
96
+ itself (`<script src="decklight/dist/decklight.js">` and a
97
+ `Decklight.init({ … })` call) is served exactly as written.
98
+
99
+ ## What's in the box
100
+
101
+ - **Editing in the browser.** In write mode, double-click any text (or a
102
+ code block, edited as plain source) to change it, drop a picture onto a
103
+ slide to add it, and add, duplicate, move or delete slides from the palette
104
+ or the right-click menu. Inside a diagram, a click selects one shape, wire
105
+ or label: `I` opens the inspector on it, with a Colors tab and a Type tab
106
+ (size, weight, the theme's font role, italic, alignment) that save as you
107
+ pick, and a picker that hovers shapes the way DevTools does, each boxed in
108
+ the theme's accent; a double-click retypes a label in place and `⌫` removes
109
+ just that shape. The notes, the inspector, the comments, the sources and the
110
+ agent ask share one panel beside the slide, with a tab for each, wherever
111
+ you left it. Every edit lands in the file and
112
+ `⌘Z` (`Ctrl+Z`) takes it back. `decklight check`
113
+ reports what an author or an agent would otherwise only see by looking:
114
+ clipped slides, crowded ones, missing images, notes whose [click] count
115
+ disagrees with the builds. In the deck, the palette's *Review: Check deck…* lists the
116
+ same, slide by slide.
117
+ - **Chapters.** `data-module` marks chapters, and `G` shows the outline.
118
+ - **Builds.** `data-build` on a container makes each child a step. The layout
119
+ never jumps.
120
+ - **Diagrams.** Inline SVG written with `var(--d-*)` tokens recolours with every
121
+ theme and can draw itself in, an arrowhead riding the tip and a dashed line
122
+ drawing dashed from its first frame.
123
+ - **Motion.** Slide transitions, Magic Move between slides, looping element
124
+ effects. All of it respects reduced-motion.
125
+ - **Themes.** 46 themes in 2 packs, every one behind WCAG contrast gates. `T`
126
+ picks one, `⌃T` generates a new one that passes the same gates.
127
+ - **Code and math.** highlight.js styled through theme tokens, LaTeX rendered
128
+ to MathML with bundled Temml. No webfonts, no build step.
129
+ - **Charts.** `data-chart` plus a small JSON block gives you a theme-aware SVG
130
+ chart: bar, line, area, pie, donut, scatter.
131
+ - **Terminals.** `decklight cast` records a real PTY session and the deck
132
+ replays it, typing and streaming. Never a video.
133
+ - **Narration.** Text-to-speech reads your notes in sync with the builds, or you
134
+ record your own voice one beat at a time. Captions and auto-advance come with
135
+ it. The notes are the script, and a script's own markers work as written:
136
+ `[pause]` holds a beat, `[long pause]` two, `[click]` cuts a beat, in any
137
+ spelling. ElevenLabs v4 (the default model) acts on audio tags
138
+ like `[whispers]` or `[laughs]`; any other voice leaves them out. Your agent
139
+ can add those tags, or write terse notes for the ear, as sentences a person
140
+ would say, and the notes editor shows before and after until you save.
141
+ ElevenLabs voices are listed by language, and the voice library finds a
142
+ native one for a translated deck. A synthesized recording tells you what it
143
+ cost: clips reused against clips sent to the engine.
144
+ - **A face for the voice.** `V` → Character: a 2D narrator whose lips follow
145
+ the voice, or a talking head made from your photo (or from a few seconds of
146
+ you filmed in the deck) lip-synced with Wav2Lip on your own machine, set up
147
+ once with `decklight setup face …`. `decklight narrate <deck> --face`
148
+ cuts the lip-sync into the recorded track, so it plays with nothing running.
149
+ - **Video.** `decklight video` renders the deck to mp4, mov or webm, narrated
150
+ by its track with subtitles in the file or beside it, and re-voices a slide
151
+ whose notes moved. The same export is a palette row, which can voice the
152
+ range with the live voice first.
153
+ - **Review.** Reviewers comment on slides, the review travels as a git branch,
154
+ and a comment finds its slide again after the deck has moved. The author
155
+ answers from inside the deck, and `I` shows what a slide is standing on:
156
+ its sources, written from inside the deck too.
157
+ - **In and out.** PowerPoint, Keynote and Google Slides come in, with charts as
158
+ data, SmartArt as diagrams, and what somebody drew (shapes, lines, groups,
159
+ rotation) as the drawing it was. PDF and PowerPoint go out for whoever
160
+ still asks, in the theme on screen.
161
+ - **Safe to receive.** A deck that runs code of its own is named before it
162
+ opens, and asked about: trust its source and it opens in write mode, decline
163
+ and it plays without trust under a CSP with that code stripped. `--no-trust`
164
+ forces the safe mode; `publish` signs what it ships.
165
+ - **Design systems.** A company's tokens, art and slide templates, referenced
166
+ by a deck from a marketplace and served into it, never copied: a slide names
167
+ a template, fills its slots, and follows the system when it changes. A design
168
+ system can also carry the brand itself: a palette of scales, its own themes
169
+ drawn only from it, and roles (`text-accent`, `surface-card`) that each theme
170
+ sets, so the deck is held to the brand and `T` recolours every role. *Look:
171
+ Design systems…* and *Slide: Use slide template…* in the palette, in write mode.
172
+ - **Extensible without shipping code to the audience.** Themes, skills,
173
+ speech engines and presenter plugins install from any git repo. Nothing
174
+ executable travels inside a deck.
175
+
176
+ Every item above has a SPEC section behind it. The index at the top of
177
+ `SPEC.md` maps the names to the sections. The words themselves (write mode, bundle, cast,
178
+ narrate, template, library, gate) are defined once in
179
+ [`docs/GLOSSARY.md`](docs/GLOSSARY.md).
180
+
181
+ ## The CLI
182
+
183
+ `decklight help <command>` prints the flags for any of these.
184
+
185
+ | Writing | |
112
186
  |---|---|
113
- | `decklight init ["Title"]` | scaffold a self-contained starter deck + an agent skill (run bare in a terminal, it asks for the title and offers a git repo; `--open` launches the deck, `--from <template>` starts from a marketplace template) |
114
- | `decklight skills [agent…]` | install the authoring skill for Claude, Codex, OpenCode or IBM Bob (detected, named, or `--all`; `--global` for every project; `--pack` zips it for upload) |
115
- | `decklight author deck.html` | **the whole authoring loop in one command** — live reload + every bridge this machine can run |
116
- | `decklight present deck.html` | **play a deck you did not author** — read-only over localhost under a CSP header, with an ingredients label and `--strict`; a deck in a clone can see its upstream and (with `--upstream-pull`) offer to fast-forward |
117
- | `decklight import talk.pptx` | bring a PowerPoint, Keynote or Google Slides deck across — bullets, tables, images, **charts as data** and notes; `--theme template` derives the deck's theme from the file's own palette and fonts (`.key` needs macOS; a Slides URL must be link-shared) |
118
- | `decklight cast script.term.yaml` | record a **terminal** cast in a real PTY (`refresh` re-runs them, `export` flattens to asciicast v2) |
119
- | `decklight record deck.html` | record the narration in **your own voice** — the deck reads you its notes one ⟨CLICK⟩ at a time, and `→` ends a beat *and* reveals the next build, so your voice paces the deck (`cast` records a terminal, `record` records you) |
120
- | `decklight review deck.html` | **leave comments on somebody's deck**, anchored to slides — a comment survives the slide moving, and says so when its slide changed or is gone |
121
- | `decklight review submit deck.html` | **send the review back** — pushes the comments (one file, never your own commits) to a `review/<you>-<date>` branch; `--pr` opens the pull request |
122
- | `decklight comments deck.html` | read what reviewers said, resolved against the deck as it is now (`--import` takes in a file from a reviewer with no clone; `--incoming` lists the reviews waiting on the remote — `M` in the deck reads and takes them in) |
123
- | `decklight history deck.html` | what decklight committed, which commits exist only on this machine, and how to push them |
124
- | `decklight restore deck.html` | list the commits that touched a deck, and put it back to any of them |
125
- | `decklight upgrade deck.html` | bring a self-contained deck's inlined runtime + themes up to the installed version |
126
- | `decklight bundle deck.html [--all]` | flatten to a self-contained single-file HTML (`--sign` attests it, `--deck` wraps it as `.decklight`) |
127
- | `decklight publish deck.html` | bundle and push to GitHub Pages — signed by default; Netlify and Vercel install as targets, and `--target folder` writes the site into a directory for any host that serves files |
128
- | `decklight pdf deck.html` | one slide per page, at its own size, in its theme — no print dialog (`--notes` is the presenter's copy, `--handout` three a page with ruled lines) |
129
- | `decklight pptx deck.html` | a PowerPoint file for whoever still asks for one — every slide a picture, the notes real notes; lossy on purpose |
130
- | `decklight voiceover deck.html` | batch-synthesize the narration into a folder with a live engine (piper/chirp/gemini/elevenlabs) — the headless counterpart of the deck's `V → Record this deck…` |
131
- | `decklight video deck.html` | render to one narrated mp4 — ⟨CLICK⟩ segments narrate the builds (`--voiceover` synthesizes the narration first) |
132
- | `decklight theme check\|add` | validate a theme against the token contract, or install one into a deck |
133
- | `decklight marketplace add owner/repo` | register a catalog — cloned once with **your** git credentials (so a private one works), then read from disk |
134
- | `decklight plugin add timer` | presenter chrome into **your** library: `present` loads it, `bundle` never does |
135
- | `decklight template\|importer\|transform\|engine\|voice\|agent add …` | the rest of the unit library — deck templates, import adapters, build-time transforms, speech engines, voices, agent descriptors |
136
- | `decklight extension check t.mjs` | the marketplace admission gate for a transform: lint, then a headless load of its output |
137
- | `decklight associate` | wire double-clicking a `.decklight` file to `decklight present` (per-user, no admin rights) |
138
- | `decklight tts` | live voice bridge — the player synthesizes narration through it |
139
- | `decklight lipsync` | lip-sync bridge — visemes (rhubarb) + a talking head (your GPU); `--veo` animates the portrait |
140
- | `decklight report-bug` | gather the version + environment facts a bug report needs, and print the issue URL |
141
-
142
- `decklight help` lists every command and flag — `refresh` and `export` are in [SPEC TERMINAL_RECORDINGS](SPEC.md#terminal_recordings--terminal-recordings), `present` and `lipsync` in [SPEC PRESENTING](SPEC.md#presenting--presenting--output). Drive a deck programmatically with the [JS API](SPEC.md#js_api--public-js-api). The runtime has **zero dependencies** (highlight.js and temml are bundled at build time); `node-pty` and `js-yaml` are CLI-only.
187
+ | `init ["Title"]` | scaffold a deck and the agent skill, then open it in write mode (`--no-open` keeps the browser closed) |
188
+ | `skills [agent…]` | install the authoring skill for Claude, Codex, OpenCode or IBM Bob; a skill older than this build is refreshed, and write mode names one at startup |
189
+ | `<deck.html \| url>` | the deck is the command. Write mode: live reload plus every bridge this machine can run, under one Ctrl-C (`--open` for the browser; a git URL clones the repo and opens the deck inside). In the browser editing is on: double-click text to edit it (`⌘B`, `⌘I`, `⌘E` for bold, italic and code while you do), drop a picture onto a slide, the bar's Layout for a layout, `S` for notes, `O` to rearrange slides; `Lock deck` in the palette turns changes off until you unlock |
190
+ | `check deck.html` | lint it headlessly: clipped slides, missing assets, [click] beats out of step with the builds (`--json`) |
191
+ | `narrate deck.html` | the narration into a folder beside the deck: an engine reads the notes, or you do with `--mic`, one [click] beat at a time (`--slides 7` for one slide); `--face` gives the recorded track its lip-sync, so the character plays it with nothing running |
192
+ | `cast script.term.yaml` | record a terminal session in a real PTY (`cast refresh` re-runs, `cast export` writes asciicast) |
193
+
194
+ | Sharing | |
195
+ |---|---|
196
+ | `<deck> --no-trust` | open a deck you didn't write in no-trust mode: every edit route refuses, it is served under a CSP, and what it will execute is listed first (`--audit` prints that label and exits; a repository URL clones it first, into the same clone write mode uses). Comments (`M`) work here too; a `.decklight` is without trust by nature |
197
+ | `bundle deck.html` | one self-contained HTML file (`--all` merges a playlist, `--sign`, `--deck`) |
198
+ | `publish deck.html` | bundle and push to GitHub Pages, Netlify, Vercel or a folder |
199
+ | `pdf deck.html` | one slide per page (`--notes`, `--handout`) |
200
+ | `pptx deck.html` | a PowerPoint file, every slide a picture, notes as notes |
201
+ | `video deck.html` | a narrated video: mp4, mov or webm, with subtitles in it or beside it (`--format`, `--quality`, `--subtitles`; `--slides 5-9` for part of it, `--voiceover` synthesizes first; also **Export a video…** in the deck's palette, which can voice it with the live voice first) |
202
+ | `enhance deck.html --slides 3` | add ElevenLabs v4 audio tags to the notes with the prompt ElevenLabs publishes: your agent drafts, decklight checks no word changed (`--all`, `--dry-run`) |
203
+ | `enhance deck.html --spoken --slides 3` | write terse notes for the ear, as sentences a person would say: your agent rewrites, decklight checks every `[click]` and `[pause]` survived |
204
+
205
+ | Keeping track | |
206
+ |---|---|
207
+ | `comments deck.html` | what reviewers said, resolved against the deck as it is now; `comments submit` sends a reviewer's comments back as a branch |
208
+ | `history deck.html` | what decklight committed and what is only on this machine |
209
+ | `restore deck.html` | put the deck back to any commit that touched it |
210
+ | `upgrade deck.html` | bring a bundled deck's inlined runtime up to this version (`--link` un-embeds it, so the deck is data again) |
211
+
212
+ | Bringing things in | |
213
+ |---|---|
214
+ | `import talk.pptx` | convert PowerPoint, Keynote or Google Slides (`--theme template` keeps its palette, `--shapes strict` draws only snapped diagrams) |
215
+ | `theme add\|remove\|list\|gate` | mark a marketplace theme for a deck to carry, or unmark it (`list` says which it carries); `gate` validates a theme file against the token contract, the gate a catalog runs |
216
+ | `marketplace add owner/repo` | register a catalog; it is cloned with your git credentials, then read from disk |
217
+ | `design-system add acme@acme-mkt talk.html` | reference a company's design system: its tokens, art and slide templates, served from the marketplace on this machine (`list`, `templates`, and `gate`, the gate a catalog runs) |
218
+ | `font add inter@type-mkt talk.html --use` | reference a typeface from a marketplace: its faces and licence travel with the deck and its bundle, offline; `--use` opens the deck in it (`list`, and `gate`, the gate a catalog runs) |
219
+ | `marketplace list` / `update <name>` | what each catalog offers, and what it now has newer than what you installed (`nord@acme 1.0.0 → 1.1.0`, and the command that takes it) |
220
+ | `library add <kind> <name>` | install into your own library: a `plugin` (presenter chrome over any deck you open, with or without trust; `bundle` never carries it), a `skill`, an `importer`, a `transform`, an `engine`, a `voice` or an `agent` (`remove`, `list [kind]`) |
221
+ | `library gate <kind> <path>` | the marketplace admission gate for a `transform` or a `plugin` |
222
+
223
+ | Odds and ends | |
224
+ |---|---|
225
+ | `setup voice` / `setup face` | set up live narration, or a talking head, once; every deck you open uses it |
226
+ | `trust list` / `trust forget <deck>` | the decks whose script you said you trust, and forgetting one so the next open asks again |
227
+ | `associate` | make double-clicking a `.decklight` file open it without trust |
228
+ | `report-bug` | print the version and environment facts a bug report needs |
229
+ | `doctor` | what this machine can do (Chrome, ffmpeg, git, agents…) and the install line for what it can't |
230
+
231
+ The runtime has zero dependencies. highlight.js and Temml are bundled at build
232
+ time; `node-pty`, `js-yaml`, `sigstore` and Playwright are optional and used by
233
+ the CLI only.
143
234
 
144
235
  ## Keys
145
236
 
146
237
  | Key | Action |
147
238
  |---|---|
148
239
  | `→` `←` `Space` | next / previous build or slide |
149
- | `S` | speaker view (again: rehearse cue cards) |
150
- | `T` | theme picker (type to filter) · `⌃T` generate a theme |
151
- | `⎵` | plays / pauses / resumes the voice once one is chosen — otherwise it advances, as always |
152
- | `V` | everything about the voice: tracks · live voice · character · record this deck · captions · speed |
153
- | `M` | review comments, grouped by who said them — `⏎` jumps to the slide, `R` marks one done · `⇧M` writes one |
154
- | `H` | the deck's history — every version previewed live, `⏎` restores one |
155
- | `/` | command palette · `G` find a slide |
156
- | `?` | help overlay — every key |
157
-
158
- ## Install on another machine
240
+ | `S` | this slide's speaker notes: editable in write mode, read-only under `--no-trust` |
241
+ | `⌥⏎` / `Alt+Enter` | speaker view: a second window with notes, next slide and timer (again: rehearse cue cards) |
242
+ | `T` | theme picker, `⌃T` generate a theme |
243
+ | `⎵` | play / pause the voice once one is chosen; otherwise it advances |
244
+ | `V` | everything about the voice: tracks, live voice, character, record, captions, speed |
245
+ | `M` | review comments: `⏎` jumps to the slide, `R` marks one done and again reopens it, `D` hides the done ones, `⌫` deletes one of yours; `⇧M` writes one |
246
+ | `K` | commit what you changed, with a message; `⌘Z` / `Ctrl+Z` undoes an edit; `⌘⏎` / `Ctrl+Enter` fullscreen, `⇧F` hides the arrows and slide number there |
247
+ | `H` | the deck's history, every version previewed live, `⏎` restores one |
248
+ | `I` | the inspector: everything about this slide, or the selected shape's colours and type; its sources |
249
+ | `/` | command palette: every action at the root, named `Category: Action` (`Voice: Live voice…`), filtered by any words you type; *Preferences: Settings…* holds the knobs (clock, progress bar, captions, voice speed, the editing bar). `G` finds a slide, `O` rearranges them, `A` asks the agent |
250
+ | `?` | every key |
251
+
252
+ ## Working from a checkout
159
253
 
160
254
  ```sh
161
255
  git clone https://github.com/decklight/decklight && cd decklight
162
- npm install # dev deps for building/recording; decks only need dist/ + themes/
163
- npm run build
256
+ npm install # also builds dist/
257
+ npm test # unit tests
258
+ npm run verify # build + headless render assertions, needs Chrome
164
259
  ```
165
260
 
166
- A deck references `dist/decklight.{js,css}` and one theme file — copy those three files (or a single `bundle`) and nothing else.
167
-
168
- ## How Decklight itself ships at agent-speed
169
-
170
- The whole point was a project where fixes and features land fast because agents do the work and automated verification keeps it safe. So the repo runs itself as a pipeline of small, single-purpose GitHub Actions — each one a Claude agent with exactly the powers it needs and no more:
171
-
172
- - **You open an issue.** An agent reads it *and the code it blames*, then either asks the missing questions or routes it — a bug goes to a reproduction agent (which actually builds `main` and tries it, posting screenshots of what it saw), a feature goes to a spec agent (which drafts acceptance criteria and renders real UI mockups for review).
173
- - **You approve.** Applying `ready-to-dev` is the one human gate. An implementation agent writes the code on a branch, proves it with `npm run verify` and a screenshot of the feature actually working, and opens a PR with that picture inline. You review the *screenshots*, not the merge button — the PR merges itself once CI is green.
174
- - **The loop keeps itself unstuck.** If CI goes red, a fix agent reads the failing logs and repairs the branch (capped, so it never argues with a red build forever). If `main` moves and a branch goes stale, a rebase agent replays it cleanly. A grooming pass reads the backlog daily and closes what the code already fixed — citing the exact `file:line` as proof.
175
-
176
- Every one of those agents runs under the same rule: on a public repo, an automated trigger never hands a push token to an agent reading text a stranger can write. The agents that need a shell run credential-less; the tokens live only in plain shell steps; a verification band — WCAG contrast gates, palette rules, headless-render assertions, property tests — holds all of it to `SPEC.md`. The `.github/workflows/` files each open with a header explaining *why* they're shaped the way they are; they're worth a read if you like this sort of thing.
177
-
178
- ## Architecture
261
+ A deck you author carries no runtime: `decklight <deck>` references
262
+ `dist/decklight.js`, `dist/decklight.css` and one theme file into it as they
263
+ serve it. To hand it over, `bundle`: one file, and nothing else to copy.
179
264
 
180
265
  <p align="center">
181
- <img src="docs/architecture.svg" width="860" alt="Decklight architecture: a single deck.html and a theme.css feed a zero-dependency browser runtime (engine, terminal player, svg/code/math, narration, overlays); three localhost servers sit beside it — decklight author for live-reload note editing, decklight tts bridging to Vertex AI Gemini TTS, and decklight review, which writes reviewer comments to a deck.review.jsonl sidecar carried by git and registers no editing routes at all; a node CLI records, refreshes, exports and bundles; and a verification band (WCAG gates, palette rules, headless render assertions, property tests) gates everything against SPEC.md.">
266
+ <img src="docs/architecture.svg" width="860" alt="Decklight architecture: one deck.html and a theme.css feed a zero-dependency browser runtime; the CLI, the deck server in its write and no-trust modes, and the tts bridge run beside it on localhost; a verification band of contrast gates, palette rules and headless render assertions holds everything to SPEC.md.">
182
267
  </p>
183
268
 
184
- One HTML file and one theme stylesheet feed a **zero-dependency browser runtime**; everything with native dependencies or credentials lives in **localhost tools** (the CLI, the `author` live-reload server, the `tts` bridge, and `review`, which can write one sidecar file and nothing else); and a **verification band** — contrast gates, palette rules, headless render assertions, property tests — holds all of it to the `SPEC.md` contract.
185
-
186
- ## Development
187
-
188
- `npm test` (unit + property tests) · `node test/render.mjs` (headless-Chrome render assertions) · `node test/contrast.mjs` (WCAG theme gates) · `npm run verify` for the lot. The house rule: every feature is verified end-to-end against a real render, not just unit-tested — see SPEC REPO_LAYOUT, and `CONTRIBUTING.md` for the DCO sign-off every commit needs.
189
-
190
- ## Links
191
-
192
- - **[decklight.io](https://decklight.io)** — the showcase deck, live and narrating itself
193
- - **`demo/intro.html`** — the short "what is Decklight" tour
194
- - **`demo/showcase.html`** — the full self-demo, every feature on its own slide
195
- - **[`SPEC.md`](SPEC.md)** — the authoring contract
196
- - **[`CONTRIBUTING.md`](CONTRIBUTING.md)** — how to contribute (DCO sign-off required)
269
+ Every commit needs a DCO sign-off (`git commit -s`). The rest of the process,
270
+ including how the agent loops work, is in [`CONTRIBUTING.md`](CONTRIBUTING.md).
197
271
 
198
272
  ## License
199
273
 
200
- Decklight is free and open source, released under the [Apache License 2.0](LICENSE). Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md).
274
+ [Apache 2.0](LICENSE).