decklight 0.10.0 → 0.11.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 (117) hide show
  1. package/NOTICE +2 -0
  2. package/PLATFORM.md +17 -0
  3. package/README.md +53 -25
  4. package/SPEC.md +1239 -67
  5. package/cli/agents.mjs +139 -15
  6. package/cli/bundle.mjs +68 -2
  7. package/cli/cast.mjs +45 -14
  8. package/cli/check-fixes.mjs +12 -4
  9. package/cli/check-watch.mjs +151 -0
  10. package/cli/check.mjs +460 -71
  11. package/cli/code-editor.mjs +287 -0
  12. package/cli/commands.mjs +13 -2
  13. package/cli/commit-message.mjs +34 -7
  14. package/cli/commit-split.mjs +123 -23
  15. package/cli/decklight.mjs +11 -1
  16. package/cli/design-system-edit.mjs +37 -1
  17. package/cli/edit-address.mjs +184 -0
  18. package/cli/edit-git.mjs +21 -4
  19. package/cli/edit-handover.mjs +136 -25
  20. package/cli/edit-look.mjs +45 -1
  21. package/cli/edit-open.mjs +143 -0
  22. package/cli/edit-slides.mjs +1043 -67
  23. package/cli/edit-translate.mjs +243 -0
  24. package/cli/edit.mjs +3182 -267
  25. package/cli/editor-support.mjs +286 -0
  26. package/cli/enhance.mjs +148 -20
  27. package/cli/find-replace.mjs +142 -0
  28. package/cli/fix-review.mjs +368 -0
  29. package/cli/init.mjs +93 -19
  30. package/cli/keep-awake.mjs +68 -0
  31. package/cli/migrate-writing.mjs +214 -0
  32. package/cli/narrate.mjs +51 -10
  33. package/cli/open.mjs +29 -9
  34. package/cli/outside-edit.mjs +257 -0
  35. package/cli/paste.mjs +92 -0
  36. package/cli/pdf.mjs +61 -2
  37. package/cli/pptx-export.mjs +3 -1
  38. package/cli/publish.mjs +24 -3
  39. package/cli/record.mjs +19 -8
  40. package/cli/rewrite.mjs +265 -0
  41. package/cli/runtime-link.mjs +218 -17
  42. package/cli/serve.mjs +7 -4
  43. package/cli/setup.mjs +2 -2
  44. package/cli/skill-content.mjs +212 -8
  45. package/cli/skills/slide-writing.md +333 -0
  46. package/cli/skills/voiceover.md +423 -0
  47. package/cli/skills.mjs +36 -13
  48. package/cli/starter-full.mjs +353 -0
  49. package/cli/supervise.mjs +14 -0
  50. package/cli/theme.mjs +3 -2
  51. package/cli/translate-core.mjs +466 -0
  52. package/cli/translate-files.mjs +149 -0
  53. package/cli/translate.mjs +458 -0
  54. package/cli/util.mjs +25 -0
  55. package/cli/vocabulary-docs.mjs +138 -0
  56. package/dist/decklight.css +2087 -91
  57. package/dist/decklight.js +367 -203
  58. package/dist/decklight.js.map +4 -4
  59. package/docs/GLOSSARY.md +9 -2
  60. package/docs/WRITING_RESEARCH.md +327 -0
  61. package/package.json +5 -3
  62. package/themes/coastal.css +3 -0
  63. package/themes/metropolis.css +2 -0
  64. package/themes/reveal-blood.css +3 -0
  65. package/themes/reveal-league.css +2 -0
  66. package/themes/reveal-moon.css +2 -0
  67. package/themes/reveal-serif.css +1 -0
  68. package/themes/reveal-sky.css +1 -0
  69. package/themes/reveal-solarized.css +4 -0
  70. package/tools/brand-palette.mjs +6 -1
  71. package/tools/build-groups.mjs +28 -8
  72. package/tools/cdp.mjs +176 -0
  73. package/tools/chart-spec.mjs +242 -0
  74. package/tools/click-match.mjs +70 -0
  75. package/tools/code-options.mjs +174 -0
  76. package/tools/conversation.mjs +49 -0
  77. package/tools/deck-family.mjs +101 -0
  78. package/tools/deck-html.mjs +212 -15
  79. package/tools/design-system-format.mjs +15 -1
  80. package/tools/diagram-shapes.mjs +221 -0
  81. package/tools/elevenlabs-tts.mjs +62 -53
  82. package/tools/face-clip.mjs +96 -0
  83. package/tools/face-layout.mjs +94 -0
  84. package/tools/gemini-tts.mjs +1 -1
  85. package/tools/invisible-in-print.mjs +27 -0
  86. package/tools/lipsync-auto.mjs +197 -0
  87. package/tools/lipsync-config.mjs +16 -0
  88. package/tools/lipsync-engines.mjs +22 -4
  89. package/tools/lipsync-server.mjs +8 -5
  90. package/tools/lipsync.mjs +122 -30
  91. package/tools/local-voice.mjs +1 -1
  92. package/tools/mouth-file.mjs +26 -0
  93. package/tools/mouth.mjs +320 -0
  94. package/tools/narration-manifest.mjs +24 -4
  95. package/tools/narration-synth.mjs +96 -76
  96. package/tools/recording-impact.mjs +16 -1
  97. package/tools/sentences.mjs +7 -1
  98. package/tools/starters.mjs +402 -0
  99. package/tools/steps.mjs +118 -0
  100. package/tools/take-check.mjs +146 -0
  101. package/tools/template-theme.mjs +3 -1
  102. package/tools/test-impact.mjs +36 -12
  103. package/tools/theme-check.mjs +196 -1
  104. package/tools/tone-cue.mjs +108 -0
  105. package/tools/tts-cache.mjs +9 -3
  106. package/tools/tts-engines.mjs +100 -11
  107. package/tools/video-cache.mjs +93 -0
  108. package/tools/video-live.mjs +349 -0
  109. package/tools/video-options.mjs +11 -0
  110. package/tools/video.mjs +772 -127
  111. package/tools/viseme-fit.mjs +27 -0
  112. package/tools/viseme-match.mjs +77 -0
  113. package/tools/vocabulary.mjs +397 -0
  114. package/tools/voice-renumber.mjs +605 -0
  115. package/tools/voiceover-server.mjs +42 -11
  116. package/tools/voiceover.mjs +48 -20
  117. package/dist/build-info.json +0 -1
@@ -0,0 +1,333 @@
1
+ ---
2
+ name: decklight-slide-writing
3
+ description: Write, review or rewrite what is ON the slides of a Decklight deck so each slide makes one point with a visual and few words. Plans a deck's story as headlines, turns bullet walls into diagrams, numbers, charts and comparisons, and critiques slides as the viewer would see them. Use when asked to draft slides from a topic or material, to make slides less wordy or more visual, to review or improve slide content, or to plan a deck. English and French. The spoken script belongs to the decklight-voiceover skill.
4
+ ---
5
+
6
+ This skill is about what goes on a slide: the words, the picture, and what is
7
+ left for the voice. The `decklight` skill beside it is the contract for how a
8
+ deck is built (markup, builds, diagrams, themes); read that for syntax and use
9
+ this for judgement. The speaker notes are the `decklight-voiceover` skill's.
10
+ When a task covers both, plan once with the outline below and use both skills.
11
+
12
+ ## The rule everything else follows from
13
+
14
+ **The slide shows, the voice explains.** A slide makes one point and holds
15
+ the evidence for it: a diagram, a number, a chart, a picture, code. What its
16
+ headline says depends on the slide's job (see Write). The voice carries what a screen cannot: the reason, the link from the
17
+ previous slide, the example, the answer to the viewer's doubt.
18
+
19
+ Two consequences, both easy to get wrong:
20
+
21
+ - A slide that holds the full explanation leaves the voice nothing to do but
22
+ read it. That is the most common fault in a narrated deck.
23
+ - An empty slide is not the cure. A short headline and labels, worded
24
+ differently from the narration, help the viewer. A transcript hurts, and so
25
+ does nothing at all. The exact numbers, names and terms the viewer must
26
+ keep belong on screen.
27
+
28
+ ## Pick the mode
29
+
30
+ | The user wants | Mode |
31
+ |---|---|
32
+ | A new deck, or "what should this deck say" | **Plan**, then **Write** |
33
+ | Slides from an agreed outline or from material | **Write** |
34
+ | An opinion on existing slides | **Review**: report, change nothing |
35
+ | Existing slides improved | **Rewrite**: change in place |
36
+
37
+ Starting from nothing, always plan first, and show the plan before writing
38
+ slides unless the user asked for the deck in one go. Asked to "improve" a
39
+ deck with no further detail, review first, say what you found in a few lines,
40
+ then rewrite.
41
+
42
+ ## Plan: the story before the slides
43
+
44
+ Settle these before any slide exists. They are the same in the
45
+ `decklight-voiceover` skill, so slide and voice are designed together.
46
+
47
+ 1. **The viewer.** Who they are, what they already know, what they want from
48
+ this.
49
+ 2. **The throughline.** The deck's one idea in 15 words or fewer. If it will
50
+ not fit, the deck is about two things.
51
+ 3. **The deck type**, which sets where the answer sits (see the table below).
52
+ 4. **The ending.** What the viewer can do, decide or believe afterwards, as
53
+ one sentence they could repeat.
54
+ 5. **Per slide**, one row:
55
+
56
+ | Field | What goes in it |
57
+ |---|---|
58
+ | Idea | The slide's one point, as a full sentence |
59
+ | Viewer's question | What a sceptical viewer is wondering at this moment |
60
+ | The slide shows | The visual form, and the few words on it |
61
+ | The voice adds | The reason, link, example or caveat |
62
+ | Beats | What appears, in order, one build per beat |
63
+
64
+ Then test the plan:
65
+
66
+ - **Read the headlines in order, alone.** The labels and questions should
67
+ read as the path of the lesson, the claims as its conclusions. Together
68
+ they tell the story. A topic name on a slide whose job is a conclusion
69
+ ("Architecture" over a benchmark) is a gap, and so is a deck of labels
70
+ only: somewhere it has to land something.
71
+ - **The first slide after the title opens a problem, a question or a
72
+ surprising fact.** Not an agenda, not an introduction of the speaker.
73
+ - **Every slide serves the throughline** or is cut. Most material does not
74
+ make it in. That is the plan working.
75
+ - **Each new term is introduced before the slide that depends on it.**
76
+
77
+ If the material is really a document (it needs 150 words a page to make
78
+ sense, or the reader must study a table), say so: a written page plus a short
79
+ narrated summary serves the viewer better than a deck of dense slides.
80
+
81
+ ## Write: one point, one piece of evidence
82
+
83
+ **The headline depends on the slide's job.** Every headline is in sentence
84
+ case, with no full stop, two lines at most.
85
+
86
+ | The slide's job | Headline | Example |
87
+ |---|---|---|
88
+ | Build up a thing part by part, or open a problem | A short label, or a question that gives nothing away | "The reasoning loop", "What happens inside one call?" |
89
+ | Land a conclusion from evidence (a number, a comparison, a limit) | A claim: a sentence that could be false | "Twenty iterations is a ceiling, not a target" |
90
+ | Sum up | Claims, one per point the viewer keeps | Key takeaways, each a sentence |
91
+
92
+ - **How to choose.** If the voice is about to ask a question whose answer the
93
+ headline would state, the headline is a label or that question. A claim on
94
+ screen at beat zero gives away what the builds then spend five clicks
95
+ revealing, and a twelve-word sentence read during the voice's link from
96
+ the last slide is a sentence the viewer is not listening to.
97
+ - **A claim headline lands the point on its own.** "Caching cut the bill by
98
+ a third", not "Caching results": a viewer who reads only the headline
99
+ should get the point. This is also the headline a slide needs when it is
100
+ met without the voice (a PDF, the overview, seeking in a video).
101
+ - **On a build-up slide the claim may still appear, last**, once the picture
102
+ is complete and the voice has earned it: a closing line under the diagram,
103
+ `<p data-build>`, as the slide's final build (BUILD_AUTHORING). The label
104
+ stays as the headline.
105
+
106
+ **The body is evidence, not a restatement.** Ask what the bullets really are,
107
+ and draw that instead:
108
+
109
+ | What the bullets really are | Put this on the slide | Decklight tool |
110
+ |---|---|---|
111
+ | Steps, a flow, cause and effect | A diagram that builds step by step, labels on the parts | SVG_DIAGRAMS, `draw` builds (BUILD_ENTRANCES) |
112
+ | Parts of a system | A labelled diagram, four or fewer new things per step | `data-build` with `highlight` |
113
+ | One fact that carries the slide | One large number and a short label | A figure, `<div class="figure">`, alone on the slide (DECK_ANATOMY) |
114
+ | An agent at work: a user asks, it thinks, calls a tool, answers | The exchange as a transcript, a turn a click | A conversation, `<div class="conversation" data-build>` (DECK_ANATOMY) |
115
+ | A claim resting on data | One chart, a takeaway title, one highlighted series | CHARTS |
116
+ | A forecast, a normal range, a line crossing a limit | A line dashed from now with a band round it, a marked point, a threshold | `dashFrom`, `band`, `markers`, `threshold`, `now` in the chart's JSON (CHARTS) |
117
+ | Two options, before and after | A side-by-side with identical layout | `data-layout="split"` (COMPARISON_SLIDES) |
118
+ | A memorable line or a voice of authority | A short quote | A quote or statement slide |
119
+ | A concrete thing, place or feeling | A relevant full-bleed picture | `data-background-image`, `data-background-dim` |
120
+ | How to do something in code | A trimmed snippet, one region highlighted at a time, each named beside it | `data-lines` with `data-callouts` (CODE_AND_MATH) |
121
+ | How to do something in a terminal | A real recording | `decklight cast` (TERMINAL_RECORDINGS) |
122
+ | Truly parallel items | A list of at most four, revealed one at a time | `data-build` on the list |
123
+ | "Step 3 of 7" typed into a subtitle | A run of steps: the strip says where the slide is, and renumbers itself | `data-steps` on the first slide, `data-step` on the rest (DECK_ANATOMY) |
124
+
125
+ A list that is really several ideas is several slides.
126
+
127
+ **Budgets.** These are working defaults, not laws:
128
+
129
+ - About 20 words on a slide. Look hard at anything past 40.
130
+ - A list has at most four items, each one or two lines, built one at a time.
131
+ - At most four new things appear in one build step.
132
+ - If the title needs an "and", it is two slides (SLIDE_DENSITY).
133
+
134
+ **What earns more words on screen:** technical terms, symbols, code,
135
+ equations, numbers the viewer must keep, a second-language audience, and a
136
+ slide with no graphic at all. Code is evidence, not prose: cut every line not
137
+ needed for the point, keep the type large, highlight only the part being
138
+ talked about.
139
+
140
+ **Labels sit on the thing they name**, not in a legend the eye has to travel
141
+ to.
142
+
143
+ **Builds follow the voice.** Each thing appears when the voice reaches it, so
144
+ plan one build per beat of narration. If nothing new is being said, nothing
145
+ should move: viewers assume a change means something.
146
+
147
+ **The most important statement is the most prominent text.** Never a
148
+ sub-point under a reassuring title.
149
+
150
+ **Cut the decoration.** Anything that could be deleted without losing the
151
+ point should be: stock pictures that illustrate nothing, logos on every
152
+ slide, a second chart "for context".
153
+
154
+ **Never shrink type to make it fit.** Split the slide or move the sentence to
155
+ the notes.
156
+
157
+ A worked example. Before, a bullet wall:
158
+
159
+ ```html
160
+ <section>
161
+ <h2>Caching results</h2>
162
+ <ul>
163
+ <li>We added a cache in front of the database in March</li>
164
+ <li>The cache hit rate is now 94%</li>
165
+ <li>Database load dropped significantly as a result</li>
166
+ <li>Monthly costs went down by about a third</li>
167
+ </ul>
168
+ </section>
169
+ ```
170
+
171
+ After, a claim and its evidence, with the story moved to the voice:
172
+
173
+ ```html
174
+ <section>
175
+ <h2>Nineteen requests in twenty never reach the database</h2>
176
+ <div class="figure">
177
+ <p data-figure data-count>94%</p>
178
+ <p>cache hit rate since March</p>
179
+ </div>
180
+ <aside class="notes">
181
+ In March we put a cache in front of the database. Here's what it did.
182
+ [pause] Almost everything is answered before the database is even asked.
183
+ That's why the bill went down by a third.
184
+ </aside>
185
+ </section>
186
+ ```
187
+
188
+ (A figure: the value set large by the theme, its label under it, and
189
+ `data-count` counting it up as the slide arrives. Two or three facts of the
190
+ same weight go side by side in one `<div class="figures">`.)
191
+
192
+ That slide lands a conclusion, so its headline is the claim. A build-up slide
193
+ works the other way round. Before, the claim gives the diagram away at beat
194
+ zero:
195
+
196
+ ```html
197
+ <section>
198
+ <h2>Kafka keeps the events, Flink turns them into context for the agent</h2>
199
+ <svg viewBox="0 0 800 300" data-build>...</svg>
200
+ </section>
201
+ ```
202
+
203
+ After, a label at beat zero, the parts arriving with the voice, the claim as
204
+ the last build:
205
+
206
+ ```html
207
+ <section>
208
+ <h2>Where the agent's context comes from</h2>
209
+ <svg viewBox="0 0 800 300" data-build>
210
+ <g><!-- the events, in Kafka --></g>
211
+ <g><!-- Flink, joining them --></g>
212
+ <g><!-- the agent, reading the result --></g>
213
+ </svg>
214
+ <p data-build>Kafka keeps the events, Flink turns them into context</p>
215
+ <aside class="notes">
216
+ The agent answers from what it knows. So where does that come from?
217
+ [click]
218
+ It starts with every event the business produces, kept in Kafka.
219
+ [click]
220
+ Flink joins them as they arrive.
221
+ [click]
222
+ And the agent reads the result, fresh, on every call.
223
+ [click]
224
+ So the log keeps the facts, and the stream turns them into context.
225
+ </aside>
226
+ </section>
227
+ ```
228
+
229
+ ## Review: watch it as the viewer would
230
+
231
+ Go through the deck slide by slide **with the notes hidden first**, as a
232
+ viewer on mute would, then with the notes. Report against this list. Name
233
+ each slide by its title, quote the offending words, and give the specific
234
+ fix, never a general remark.
235
+
236
+ 1. Does the slide make one point, sayable in one sentence?
237
+ 2. Would a first-time viewer get it in about three seconds?
238
+ 3. Does the headline fit the slide's job, in two lines or fewer? A slide
239
+ that lands a conclusion needs a claim, not a topic label. A build-up
240
+ slide may carry a label or a question, and a claim headline there that
241
+ states what the builds reveal is a fault: it gives the answer away.
242
+ 4. Does the body show evidence for the headline, or does it restate what the
243
+ voice says?
244
+ 5. Does any on-screen sentence repeat a narration sentence word for word?
245
+ 6. About 20 words, at most 40? Lists of at most four items, two lines each?
246
+ 7. Could anything be deleted without losing the point?
247
+ 8. Is the most important element the most salient, with one emphasis at a
248
+ time?
249
+ 9. Do labels sit on the things they name?
250
+ 10. Does each element appear when the voice reaches it? Does anything move
251
+ without meaning?
252
+ 11. Was every term, symbol and acronym introduced already?
253
+ 12. Are the numbers, names and exact terms the viewer must keep on screen?
254
+ 13. Does a chart have a takeaway title, labelled axes and one highlight? Does
255
+ code show only the needed lines, large, with one highlighted region?
256
+ 14. Is the most consequential statement the most prominent text?
257
+ 15. Do the headlines, read in order, tell the whole story: the labels and
258
+ questions as the path, the claims as the conclusions? A deck of labels
259
+ only lands nothing.
260
+ 16. Decklight: no `crowded` warning, no overflow, no type shrunk by hand
261
+ anywhere on the slide, including inline styles on inner elements.
262
+
263
+ Run `npx decklight@latest check deck.html` for item 16 and for `[click]`
264
+ counts against builds. Items 2, 7, 8 and 14 need a rendered look: render the
265
+ deck (`npx decklight@latest pdf deck.html -o /tmp/check.pdf`) when you can,
266
+ and say so plainly when you could not.
267
+
268
+ End the review with the three changes that would help most, in order. A long
269
+ flat list of findings is itself a bullet wall.
270
+
271
+ ## Rewrite: change in place, lose nothing
272
+
273
+ - **Keep the idea.** A rewrite changes how a point is shown, not what the
274
+ author is claiming. A new claim, number or example is the author's to
275
+ approve: flag it.
276
+ - **Move, do not delete.** A sentence that leaves the slide goes into the
277
+ notes, where the voice can say it, unless it served nothing.
278
+ - **Name the relationship the bullets hide** (a sequence, a comparison, a
279
+ cause) and draw it.
280
+ - **Split a slide whose title needs an "and".**
281
+ - **Keep the build count where you can.** The notes are cut into beats by
282
+ `[click]`, one per build. If you add or remove builds, the notes must
283
+ change with them: do it with the `decklight-voiceover` skill, or tell the
284
+ user exactly which slides now need their beats redone. Run `check` and
285
+ clear every `clicks-vs-builds` warning before you finish.
286
+ - **Keep the terms the notes use.** If the slide's wording changes, the notes
287
+ should still call the thing by the same name.
288
+
289
+ For light-touch edits the deck's own writing tools do the mechanical part
290
+ (PRESENTING_WRITING in the reference): tightening a slide's text and bringing
291
+ it back in line with its script. They never add or restructure. This skill
292
+ does.
293
+
294
+ ## What changes with the deck type
295
+
296
+ | | Technical talk | Course or lesson | Demo or pitch | Internal update or decision |
297
+ |---|---|---|---|---|
298
+ | Where the answer sits | After the problem. Aim for intuition, not coverage | After the question: name it, show it, use it | The viewer's current pain first, then "today" against "with this" | First. Then two or three reasons, the risks, the ask |
299
+ | Default headline | A claim on a result, a label or question on a slide that builds a mechanism | A label or question for a concept being introduced, a claim for what the learner should keep | A claim: what the product does for the viewer | A claim, starting with the decision |
300
+ | Density | More text is earned by code, terms and equations | Strictest: one new concept per slide | Largest type, one number or picture per slide | Few words. Detail goes in a separate document |
301
+ | Typical evidence | Diagram, trimmed code, one benchmark | Worked example built step by step | The product doing the thing, one capability at a time | One chart, one table of options |
302
+ | Ending | Where the detail lives, what to try | What the learner can now do | One specific next step | The decision wanted, by when |
303
+
304
+ For lessons, short units work best: aim for under six minutes each.
305
+
306
+ ## French
307
+
308
+ Write French slides from the idea, never from the English wording.
309
+
310
+ - **Length.** French runs 15 to 25 percent longer, and a short headline can
311
+ double. Rewrite the headline until it fits. Do not shrink the type.
312
+ - **Titles in sentence case**: « Le cache divise la facture par trois », no
313
+ capital on every word.
314
+ - **Spacing.** A non-breaking space (U+00A0) before a colon and inside
315
+ « guillemets ». Before `;` `!` `?`, a narrow non-breaking space (U+202F) in
316
+ France and none in Quebec. Without them a line wraps and starts with a
317
+ lone « ? ». Ask which locale when it matters and the deck does not say.
318
+ - **Numbers.** Decimal comma, a space before the unit and the percent sign:
319
+ « 1,5 s », « 20 % », « 12 € ».
320
+ - **Technical terms.** Keep the English noun the viewer will see in the tool
321
+ (pull request, commit). Use the French word where it is truly in use
322
+ (bibliothèque, mise à jour, déployer). Lean more French for Quebec.
323
+ - **Tone.** Superlatives read as salesmanship. State the concrete benefit.
324
+ - Set `<html lang="fr">` so the deck's voices follow.
325
+
326
+ ## Before you call it done
327
+
328
+ - `npx decklight@latest check deck.html` is clean of `crowded` and
329
+ `clicks-vs-builds`.
330
+ - Nothing overflows (the `decklight` skill says how to render and check).
331
+ - The headlines, read alone and in order, tell the story, and no build-up
332
+ slide gives away in its headline what its builds reveal.
333
+ - No slide could be read aloud as its own narration.