@litfamily/litgravity 0.1.1 → 0.1.2

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 (246) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +17 -3
  3. package/README_ko-KR.md +17 -3
  4. package/package.json +1 -1
  5. package/plugin/hooks/lib/lanes.mjs +65 -0
  6. package/plugin/hooks/lib/motion.mjs +34 -5
  7. package/plugin/hooks/lib/reentry.mjs +7 -0
  8. package/plugin/hooks/lib/rewind/brief.mjs +332 -0
  9. package/plugin/hooks/lib/rewind/collect.mjs +328 -0
  10. package/plugin/hooks/lib/rewind/gauge.mjs +55 -0
  11. package/plugin/hooks/lib/rewind/next-step.mjs +77 -0
  12. package/plugin/hooks/lib/rewind/redact.mjs +60 -0
  13. package/plugin/hooks/lib/rewind/transcripts.mjs +211 -0
  14. package/plugin/hooks/lib/routes.mjs +79 -5
  15. package/plugin/hooks/lib/workflow-stack.mjs +213 -0
  16. package/plugin/hooks/post-tool-use.mjs +37 -1
  17. package/plugin/hooks/pre-invocation.mjs +91 -2
  18. package/plugin/hooks/session-start.mjs +26 -3
  19. package/plugin/hooks/stop.mjs +22 -2
  20. package/plugin/hud/looks.mjs +29 -0
  21. package/plugin/hud/render.mjs +234 -12
  22. package/plugin/plugin.json +1 -1
  23. package/plugin/skills/frontend-ui-ux/SKILL.md +12 -1
  24. package/plugin/skills/frontend-ui-ux/kit/components.css +417 -0
  25. package/plugin/skills/frontend-ui-ux/kit/fonts.json +22 -0
  26. package/plugin/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
  27. package/plugin/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
  28. package/plugin/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
  29. package/plugin/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
  30. package/plugin/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
  31. package/plugin/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
  32. package/plugin/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
  33. package/plugin/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
  34. package/plugin/skills/frontend-ui-ux/kit/ui.js +226 -0
  35. package/plugin/skills/frontend-ui-ux/references/house-styles.md +234 -0
  36. package/plugin/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
  37. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-lock.mjs +196 -0
  38. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +30 -9
  39. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +20 -8
  40. package/plugin/skills/frontend-ui-ux/scripts/interface-probe.mjs +42 -9
  41. package/plugin/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
  42. package/plugin/skills/lit-adhd/SKILL.md +157 -0
  43. package/plugin/skills/lit-adhd/references/card-examples.md +101 -0
  44. package/plugin/skills/lit-adhd/references/status-taxonomy.md +32 -0
  45. package/plugin/skills/lit-adhd/scripts/rewind.mjs +5 -0
  46. package/plugin/skills/lit-diagram-drawer/SKILL.md +5 -3
  47. package/plugin/skills/lit-diagram-drawer/references/drawing-rules.md +1 -1
  48. package/plugin/skills/lit-diagram-drawer/references/style-guide.md +21 -12
  49. package/plugin/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
  50. package/plugin/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
  51. package/plugin/skills/lit-diagram-drawer/references/type-tree.md +3 -3
  52. package/plugin/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
  53. package/plugin/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +1 -2
  54. package/plugin/skills/lit-diagram-drawer/scripts/visual-quality.mjs +1 -2
  55. package/plugin/skills/lit-docx/SKILL.md +3 -3
  56. package/plugin/skills/lit-handoff/SKILL.md +1 -0
  57. package/plugin/skills/lit-hijack/SKILL.md +263 -0
  58. package/plugin/skills/lit-hijack/references/capture-and-provenance.md +100 -0
  59. package/plugin/skills/lit-hijack/references/clean-room-build.md +75 -0
  60. package/plugin/skills/lit-hijack/references/distil-and-licence.md +67 -0
  61. package/plugin/skills/lit-hijack/references/gap-and-port-design.md +100 -0
  62. package/plugin/skills/lit-hijack/references/parity-and-report.md +85 -0
  63. package/plugin/skills/lit-hijack/scripts/hijack.mjs +953 -0
  64. package/plugin/skills/lit-plan/SKILL.md +1 -1
  65. package/plugin/skills/lit-pptx/SKILL.md +8 -8
  66. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
  67. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
  68. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
  69. package/plugin/skills/lit-pptx/fonts/provenance.json +32 -1
  70. package/plugin/skills/lit-pptx/references/agents/analyst.md +34 -56
  71. package/plugin/skills/lit-pptx/references/agents/antithesis.md +49 -67
  72. package/plugin/skills/lit-pptx/references/agents/architect.md +38 -51
  73. package/plugin/skills/lit-pptx/references/agents/critic.md +25 -41
  74. package/plugin/skills/lit-pptx/references/agents/synthesizer.md +37 -46
  75. package/plugin/skills/lit-pptx/references/agents/thesis.md +29 -49
  76. package/plugin/skills/lit-pptx/references/anti-slop-checklist.md +119 -145
  77. package/plugin/skills/lit-pptx/references/authoring-guide.md +187 -278
  78. package/plugin/skills/lit-pptx/references/consensus-protocol.md +99 -97
  79. package/plugin/skills/lit-pptx/references/data-display-cookbook.md +36 -137
  80. package/plugin/skills/lit-pptx/references/density-and-fill.md +147 -216
  81. package/plugin/skills/lit-pptx/references/design-system-azure.md +56 -85
  82. package/plugin/skills/lit-pptx/references/direction-step.md +134 -176
  83. package/plugin/skills/lit-pptx/references/examples/01-pitch-signal-ko.md +114 -115
  84. package/plugin/skills/lit-pptx/references/examples/02-pitch-studio-ko.md +66 -66
  85. package/plugin/skills/lit-pptx/references/examples/03-business-review-ledger-ko.md +63 -63
  86. package/plugin/skills/lit-pptx/references/examples/04-business-review-night-en.md +96 -96
  87. package/plugin/skills/lit-pptx/references/examples/05-research-talk-paper-en.md +81 -81
  88. package/plugin/skills/lit-pptx/references/examples/06-lecture-chalk-ko.md +103 -103
  89. package/plugin/skills/lit-pptx/references/examples/07-data-review-night-en.md +100 -98
  90. package/plugin/skills/lit-pptx/references/examples/08-image-led-atlas-ko.md +76 -76
  91. package/plugin/skills/lit-pptx/references/examples/09-briefing-gazette-ko.md +96 -96
  92. package/plugin/skills/lit-pptx/references/examples/10-status-update-ledger-ko.md +80 -80
  93. package/plugin/skills/lit-pptx/references/examples/11-portfolio-studio-en.md +72 -72
  94. package/plugin/skills/lit-pptx/references/examples/12-research-tutorial-chalk-en.md +95 -95
  95. package/plugin/skills/lit-pptx/references/examples/13-engineering-review-computational-brutalism-ko.md +173 -0
  96. package/plugin/skills/lit-pptx/references/examples/14-launch-pitch-neo-brutalism-ko.md +154 -0
  97. package/plugin/skills/lit-pptx/references/examples/15-design-lecture-bauhaus-ko.md +139 -0
  98. package/plugin/skills/lit-pptx/references/examples/16-community-programme-riso-ko.md +158 -0
  99. package/plugin/skills/lit-pptx/references/examples/17-public-data-briefing-newsroom-ko.md +179 -0
  100. package/plugin/skills/lit-pptx/references/interview-protocol.md +83 -102
  101. package/plugin/skills/lit-pptx/references/layout-families.md +161 -265
  102. package/plugin/skills/lit-pptx/references/stages/autopilot.md +30 -70
  103. package/plugin/skills/lit-pptx/references/stages/interview.md +36 -68
  104. package/plugin/skills/lit-pptx/references/stages/plan.md +26 -67
  105. package/plugin/skills/lit-pptx/references/title-treatments.md +93 -145
  106. package/plugin/skills/lit-pptx/references/tonalities/atlas.md +95 -108
  107. package/plugin/skills/lit-pptx/references/tonalities/bauhaus.md +140 -0
  108. package/plugin/skills/lit-pptx/references/tonalities/chalk.md +107 -122
  109. package/plugin/skills/lit-pptx/references/tonalities/computational-brutalism.md +150 -0
  110. package/plugin/skills/lit-pptx/references/tonalities/gazette.md +87 -111
  111. package/plugin/skills/lit-pptx/references/tonalities/ledger.md +96 -125
  112. package/plugin/skills/lit-pptx/references/tonalities/neo-brutalism.md +161 -0
  113. package/plugin/skills/lit-pptx/references/tonalities/newsroom.md +144 -0
  114. package/plugin/skills/lit-pptx/references/tonalities/night.md +104 -131
  115. package/plugin/skills/lit-pptx/references/tonalities/paper.md +114 -130
  116. package/plugin/skills/lit-pptx/references/tonalities/riso.md +137 -0
  117. package/plugin/skills/lit-pptx/references/tonalities/signal.md +96 -103
  118. package/plugin/skills/lit-pptx/references/tonalities/studio.md +81 -112
  119. package/plugin/skills/lit-pptx/scripts/compile-deck.js +4 -6
  120. package/plugin/skills/lit-pptx/scripts/craft_extras.py +135 -91
  121. package/plugin/skills/lit-pptx/scripts/deck_craft.py +1 -1
  122. package/plugin/skills/lit-pptx/scripts/embed_fonts.py +13 -1
  123. package/plugin/skills/lit-pptx/scripts/layout_inventory.py +1 -1
  124. package/plugin/skills/lit-pptx/scripts/learn_template.py +1 -1
  125. package/plugin/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
  126. package/plugin/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
  127. package/plugin/skills/lit-pptx/scripts/lib/render-pack.js +370 -563
  128. package/plugin/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
  129. package/plugin/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
  130. package/plugin/skills/lit-pptx/scripts/qa_deck.py +6 -6
  131. package/plugin/skills/lit-pptx/scripts/render_pages.py +31 -0
  132. package/plugin/skills/lit-pptx/scripts/validate_pptx.py +1 -1
  133. package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v1.md +167 -191
  134. package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v2.md +117 -166
  135. package/plugin/skills/lit-pptx/specs/template-enrollment-contract.md +307 -330
  136. package/plugin/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
  137. package/plugin/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
  138. package/plugin/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
  139. package/plugin/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +99 -0
  140. package/plugin/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
  141. package/plugin/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
  142. package/plugin/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
  143. package/plugin/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
  144. package/plugin/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
  145. package/plugin/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
  146. package/plugin/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
  147. package/plugin/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
  148. package/plugin/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
  149. package/plugin/skills/lit-schematic/SKILL.md +114 -0
  150. package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
  151. package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
  152. package/plugin/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
  153. package/plugin/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
  154. package/plugin/skills/lit-schematic/references/cutaway-outputs.md +70 -0
  155. package/plugin/skills/lit-schematic/references/isometric-craft.md +101 -0
  156. package/plugin/skills/lit-schematic/references/journal-figures.md +72 -0
  157. package/plugin/skills/lit-schematic/references/kit-api.md +134 -0
  158. package/plugin/skills/lit-schematic/references/pfd-and-layout.md +53 -0
  159. package/plugin/skills/lit-schematic/references/pid-drafting.md +103 -0
  160. package/plugin/skills/lit-schematic/references/pid-symbols.md +163 -0
  161. package/plugin/skills/lit-schematic/references/verification.md +100 -0
  162. package/plugin/skills/lit-schematic/scripts/doctor.mjs +57 -0
  163. package/plugin/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
  164. package/plugin/skills/lit-schematic/scripts/lib/fonts.mjs +27 -0
  165. package/plugin/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
  166. package/plugin/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
  167. package/plugin/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
  168. package/plugin/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
  169. package/plugin/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
  170. package/plugin/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
  171. package/plugin/skills/lit-schematic/scripts/lib/png.mjs +132 -0
  172. package/plugin/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
  173. package/plugin/skills/lit-schematic/scripts/lib/route.mjs +218 -0
  174. package/plugin/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
  175. package/plugin/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
  176. package/plugin/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
  177. package/plugin/skills/lit-schematic/scripts/motion.mjs +129 -0
  178. package/plugin/skills/lit-schematic/scripts/qa.mjs +92 -0
  179. package/plugin/skills/lit-schematic/scripts/render.mjs +233 -0
  180. package/plugin/skills/lit-schematic/scripts/scaffold.mjs +60 -0
  181. package/plugin/skills/lit-scientific-visualization/SKILL.md +17 -6
  182. package/plugin/skills/lit-typographic-motion/SKILL.md +58 -48
  183. package/plugin/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +13 -2
  184. package/plugin/skills/lit-typographic-motion/engine/blender/runner.py +218 -0
  185. package/plugin/skills/lit-typographic-motion/engine/core/presets.mjs +1 -1
  186. package/plugin/skills/lit-typographic-motion/engine/node/analysis.mjs +65 -1
  187. package/plugin/skills/lit-typographic-motion/engine/node/assets.mjs +298 -0
  188. package/plugin/skills/lit-typographic-motion/engine/node/blender.mjs +143 -0
  189. package/plugin/skills/lit-typographic-motion/engine/node/board.mjs +136 -0
  190. package/plugin/skills/lit-typographic-motion/engine/node/brief.mjs +7 -1
  191. package/plugin/skills/lit-typographic-motion/engine/node/chrome.mjs +9 -12
  192. package/plugin/skills/lit-typographic-motion/engine/node/cover-assets.mjs +5 -3
  193. package/plugin/skills/lit-typographic-motion/engine/node/cover-capture.mjs +7 -6
  194. package/plugin/skills/lit-typographic-motion/engine/node/cover-treatment.mjs +37 -4
  195. package/plugin/skills/lit-typographic-motion/engine/node/cover.mjs +19 -8
  196. package/plugin/skills/lit-typographic-motion/engine/node/done.mjs +45 -6
  197. package/plugin/skills/lit-typographic-motion/engine/node/frame-worker.mjs +7 -5
  198. package/plugin/skills/lit-typographic-motion/engine/node/gallery.mjs +121 -0
  199. package/plugin/skills/lit-typographic-motion/engine/node/host.mjs +34 -0
  200. package/plugin/skills/lit-typographic-motion/engine/node/house.mjs +44 -0
  201. package/plugin/skills/lit-typographic-motion/engine/node/look.mjs +34 -20
  202. package/plugin/skills/lit-typographic-motion/engine/node/pipeline.mjs +19 -9
  203. package/plugin/skills/lit-typographic-motion/engine/node/scaffold.mjs +210 -0
  204. package/plugin/skills/lit-typographic-motion/engine/node/score.mjs +639 -0
  205. package/plugin/skills/lit-typographic-motion/engine/node/sound-cli.mjs +21 -4
  206. package/plugin/skills/lit-typographic-motion/engine/node/sound.mjs +127 -29
  207. package/plugin/skills/lit-typographic-motion/engine/node/stage-capture.mjs +7 -6
  208. package/plugin/skills/lit-typographic-motion/engine/node/stage-gate.mjs +59 -5
  209. package/plugin/skills/lit-typographic-motion/engine/node/stage-qa.mjs +141 -9
  210. package/plugin/skills/lit-typographic-motion/engine/node/stage-serve.mjs +28 -5
  211. package/plugin/skills/lit-typographic-motion/engine/node/stage.mjs +82 -14
  212. package/plugin/skills/lit-typographic-motion/engine/node/styles.mjs +213 -0
  213. package/plugin/skills/lit-typographic-motion/engine/node/treatment.mjs +311 -10
  214. package/plugin/skills/lit-typographic-motion/engine/stage/cover-init.js +14 -2
  215. package/plugin/skills/lit-typographic-motion/engine/stage/init.js +11 -1
  216. package/plugin/skills/lit-typographic-motion/engine/stage/qa.js +6 -1
  217. package/plugin/skills/lit-typographic-motion/engine/stage/stage-kit.js +83 -0
  218. package/plugin/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
  219. package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
  220. package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
  221. package/plugin/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
  222. package/plugin/skills/lit-typographic-motion/recipes/hero-3d/expected.json +69 -0
  223. package/plugin/skills/lit-typographic-motion/recipes/hero-3d/index.html +139 -0
  224. package/plugin/skills/lit-typographic-motion/recipes/orbit-loop/expected.json +6 -4
  225. package/plugin/skills/lit-typographic-motion/recipes/painted-light/expected.json +4 -2
  226. package/plugin/skills/lit-typographic-motion/recipes/weight-tide/expected.json +7 -5
  227. package/plugin/skills/lit-typographic-motion/references/cover.md +394 -443
  228. package/plugin/skills/lit-typographic-motion/references/craft-loop.md +57 -87
  229. package/plugin/skills/lit-typographic-motion/references/depth.md +122 -0
  230. package/plugin/skills/lit-typographic-motion/references/look.md +94 -129
  231. package/plugin/skills/lit-typographic-motion/references/runtime.md +58 -91
  232. package/plugin/skills/lit-typographic-motion/references/sound.md +130 -99
  233. package/plugin/skills/lit-typographic-motion/references/stage.md +190 -215
  234. package/plugin/skills/lit-typographic-motion/references/studio.md +245 -0
  235. package/plugin/skills/lit-typographic-motion/references/style-bibles.md +108 -97
  236. package/plugin/skills/lit-typographic-motion/references/treatment.md +191 -143
  237. package/plugin/skills/lit-typographic-motion/scripts/motion-doctor.mjs +17 -5
  238. package/plugin/skills/lit-typographic-motion/scripts/motion.mjs +47 -7
  239. package/plugin/skills/lit-typographic-motion/styles/paper.json +41 -0
  240. package/plugin/skills/lit-typographic-motion/styles/swiss-signal.json +41 -0
  241. package/plugin/skills/lit-typographic-motion/styles/terminalcore.json +42 -0
  242. package/plugin/skills/lit-typographic-motion/styles/tidal.json +41 -0
  243. package/plugin/skills/litresearch/SKILL.md +1 -0
  244. package/plugin/skills/readme-studio/SKILL.md +2 -0
  245. package/plugin/skills/review-work/SKILL.md +1 -1
  246. package/plugin/skills/start-work/SKILL.md +1 -1
@@ -1,239 +1,214 @@
1
- # The stage path
2
-
3
- Load this once the treatment says `path: stage`. On this path the film is a web page you write, and the
4
- LitGravity renderer turns it into frames: it serves the page to a headless Chrome on a private origin,
5
- drives a virtual clock from zero, captures every frame in order, then encodes, replays and gates the
6
- result. You draw everything the treatment promised, the subject first. The kit described below supplies
7
- timing and reveal primitives and nothing pictorial, so no two stage films start from the same template.
8
-
9
- ## The page contract
10
-
11
- The page lives at `<dir>/stage/index.html`, next to the local files it uses (SVG, PNG, JPG, WebP, JS,
12
- CSS, WAV). Only that folder is served, under the origin `http://lit.stage`; a symlink that resolves
13
- outside it is a contract error.
14
-
15
- Two routes come from the renderer itself and are always available:
16
-
17
- - `<link rel="stylesheet" href="/lit/fonts.css">` declares the verified faces (table below).
18
- - `<script src="/lit/stage-kit.js"></script>` defines the global `LitStage`.
19
-
20
- The page hands the renderer its spec with `LitStage.define({ width, height, fps, duration, render })`, or
21
- by assigning the same object to `window.litStage`. `define` checks the spec as soon as it is called:
22
-
23
- - `width`×`height` is 1920×1080 for `format: 16:9` or 1080×1920 for `format: 9:16`, and must match the
24
- treatment. Any other size, or a capture whose real size differs, stops the run with exit 17.
25
- - `fps` is 60, or 30 when the treatment sets `fps: 30`. A mismatch with the treatment is exit 17.
26
- - `duration` is a positive number of seconds. The gate's MO-C-12 rule fails a film whose encoded length is
27
- more than 10 % away from `treatment.durationSec`; length belongs to the arc, so the page never trims it.
28
- - `render(t)` paints the frame at `t` seconds. The renderer calls it once per frame, in order from zero. The
29
- page runs no loop of its own.
30
-
31
- Copy lives in a single `COPY` object at the top of the page script, one entry per `copy.lines` line, word
32
- for word. That keeps edits in one place, and the text QA then has to find every line on screen; a line it
33
- cannot find is quoted in a `TEXT-COPY-FOUND` failure.
34
-
35
- A bare skeleton (every angle-bracket value is yours to fill):
1
+ # Stage path
2
+
3
+ Read this after the treatment sets `path: stage`, with `studio.md`. On the stage path you author the
4
+ film as a web page and the renderer captures it frame by frame, deterministically, then runs the gate.
5
+ The house style gives the frame: palette, type roles, layout zones, motion tokens and hand-offs, served
6
+ to the page as `/lit/style.css` and `/lit/style.js`. The subject, its drawing and its motion are yours.
7
+ Start every page from `motion.mjs scaffold --out <dir>`, which writes the structure from the treatment.
8
+
9
+ ## Contract
10
+
11
+ - Write `stage/index.html` inside the run's output directory, plus any local assets it needs:
12
+ SVG, PNG, JPG, WebP, JS, CSS and WAV files beside it. Nothing else is served.
13
+ - The page loads the fonts, the style and the kit from the renderer's own routes:
14
+ `<link rel="stylesheet" href="/lit/fonts.css">`, `<link rel="stylesheet" href="/lit/style.css">`,
15
+ `<script src="/lit/style.js"></script>` and `<script src="/lit/stage-kit.js"></script>`.
16
+ - Each shot's copy sits in its layout's type zone, in a type-role class and a colour class of the style;
17
+ the gate's style rules check the result (`studio.md`).
18
+ - The page calls `LitStage.define({ width, height, fps, duration, render })`, or sets
19
+ `window.litStage` to the same object. `render(t)` draws the frame at `t` seconds. The renderer
20
+ calls it once per frame, in order, from 0; the page never runs its own loop.
21
+ - Size is exactly 1920×1080 for `format: 16:9` or 1080×1920 for `format: 9:16`, matching the
22
+ treatment. A capture of any other size stops the run (exit 17).
23
+ - `fps` is 60. Use 30 only when the treatment says so, which it may only when the request asks for 30 fps.
24
+ - `duration` must land within ±10 % of `treatment.durationSec`, or the gate fails. Length comes
25
+ from the treatment's arc; do not trim the page to finish sooner.
26
+ - Put the copy in one `COPY` object at the top of `stage/index.html`, so it is easy to edit and
27
+ easy to find. Every `copy.lines` entry appears verbatim there, and the page must show each one:
28
+ the QA replay quotes any line it cannot find on screen (exit 17).
29
+
30
+ The scaffold writes the page; its shape, with placeholders only:
36
31
 
37
32
  ```html
38
33
  <!doctype html>
39
34
  <meta charset="utf-8">
40
35
  <link rel="stylesheet" href="/lit/fonts.css">
36
+ <link rel="stylesheet" href="/lit/style.css">
37
+ <script src="/lit/style.js"></script>
41
38
  <script src="/lit/stage-kit.js"></script>
42
- <style>html, body { margin: 0; width: <width>px; height: <height>px; overflow: hidden; background: <colour>; }</style>
43
39
  <body>
44
- <svg id="subject" viewBox="0 0 <width> <height>"><!-- the drawn subject --></svg>
45
- <h1 id="headline"></h1>
40
+ <section class="shot" data-shot="0">
41
+ <svg class="subject" data-zone="subject"></svg>
42
+ <div class="type" data-zone="type"><p class="lit-headline lit-ink" data-copy="0"></p></div>
43
+ </section>
46
44
  <script>
47
- const COPY = { headline: "<copy line>" };
48
- const { define, text, at, ease } = LitStage;
49
- const h = document.getElementById("headline");
50
- h.textContent = COPY.headline;
51
- text(h);
45
+ const COPY = ["<one copy line>"];
46
+ const { define, shot, place, tokens, text } = LitStage;
47
+ // place each shot's zones from LitTimeline, set the COPY lines, then:
48
+ const DRAW = [(s, svg, t) => { /* the subject of shot 1, from s.p, s.local, s.enter() */ }];
52
49
  define({ width: <width>, height: <height>, fps: 60, duration: <seconds>, render(t) {
53
- h.style.opacity = at(t, <start>, <seconds>, ease.standard);
50
+ const s = shot(t);
51
+ DRAW[s.index](s, document.querySelectorAll(".subject")[s.index], t);
54
52
  } });
55
53
  </script>
56
54
  </body>
57
55
  ```
58
56
 
59
- ## What `LitStage` offers
60
-
61
- Everything in the kit (`engine/stage/stage-kit.js`) is a pure function of its arguments, so the same `t`
62
- always yields the same picture.
63
-
64
- **Easing.** `ease` holds `linear` plus the `in`, `out` and `inOut` forms of `Quad`, `Cubic`, `Quart`,
65
- `Quint`, `Sine`, `Expo`, `Circ` and `Back` (`ease.outCubic`, `ease.inOutSine`, `ease.outBack` …), and five
66
- motion-design curves: `standard`, `emphasized`, `decelerate` (settle-heavy arrivals), `accelerate` (quick
67
- exits) and `css`. Each maps 0..1 onto 0..1 with exact ends. `cubicBezier(x1, y1, x2, y2)` builds your own.
68
-
69
- **Physics.** `spring({ stiffness, damping, mass, velocity })` returns an analytic position function from 0
70
- toward 1: `const s = spring({ damping: 14 }); el.style.scale = s(t - start);`. `spring.settle(opts)`
71
- returns how many seconds that spring needs to settle within 0.1 %, which is how you size the beat around it.
72
-
73
- **Timing.** `at(t, start, dur, ease)` gives clamped, eased local progress. `kf(t, keys)` interpolates
74
- keyframes `[{ t, v, ease }]` whose values may be numbers, number arrays or colours; `ease` on a key shapes
75
- the segment that starts at it, and the end values hold outside the keys. `stagger(i, each, { from, count })`
76
- offsets a set (`from` may be `"center"`). `seq([name, dur, offset?], …)` lays out named steps; a negative
77
- offset overlaps the previous step, and the result answers `p(name, t)`, `local(name, t)`,
78
- `active(name, t)`, `seg[name].start` and `duration`.
79
-
80
- **Randomness.** `rand(seed)` is a seeded generator; `rand.int(seed)(lo, hi)` and `rand.range(seed)(lo, hi)`
81
- are the integer and float forms. Use these for scatter, jitter and layout so a replay matches.
82
-
83
- **Text.** `splitText(el, { by })` with `by` = `grapheme`, `word`, `eojeol` or `line` replaces the element's
84
- text with `<span data-lit-part>` units (inline-block, so transforms apply; `line` units are blocks) and
85
- returns them. Passed a string, it returns the pieces. A Hangul syllable is never split, and `eojeol` keeps
86
- each space-separated Korean word whole.
87
-
88
- **Shapes and reveals.** `drawPath(pathEl, p)` draws an SVG stroke from 0 to 1. `morph(fromD, toD, { samples })`
89
- returns `p => d` between two single-subpath shapes (64 samples by default). `clipRect(el, p, { from })`
90
- reveals from `left`, `right`, `top`, `bottom` or `center`, and `wipe` is the same call. `clipCircle(el, p,
91
- { x, y })` opens an iris from a point in percent. `maskLinear(el, p, { angle, feather })` is a soft reveal
92
- along an angle.
93
-
94
- **Colour and arithmetic.** `mix(a, b, t, { space })` blends two colours in oklab (default) or sRGB, and
95
- `rgba(colour, alpha)` sets alpha. `clamp`, `lerp`, `invLerp`, `remap(x, a, b, c, d)` and
96
- `smoothstep(a, b, x)` cover the rest.
97
-
98
- **Registration.** `text(el, { decor })` marks an element as a text run; `text({ content, x, y, w, h })`
99
- registers canvas or WebGL text for the frame being drawn (see Text and the QA).
100
-
101
- ## Faces
102
-
103
- `/lit/fonts.css` declares only the verified faces, each with `font-display: block`, so no frame is ever
104
- captured in a fallback face. The family names are exact:
105
-
106
- | Family | Weights / widths | Use |
57
+ ## Kit
58
+
59
+ Every primitive is a pure function of its inputs. `LitStage` holds them all.
60
+
61
+ - Eases: `ease.outCubic(p)`, `ease.inOutSine(p)`, `ease.outBack(p)`, `ease.standard(p)`,
62
+ `ease.emphasized(p)`, `ease.decelerate(p)`, `ease.accelerate(p)`; each maps 0..1 to 0..1 with
63
+ exact ends.
64
+ - `cubicBezier(x1, y1, x2, y2)` returns an ease: `const e = cubicBezier(0.2, 0, 0, 1); e(0.5)`.
65
+ - `spring({ stiffness, damping, mass, velocity })` returns an analytic position from 0 to 1:
66
+ `const s = spring({ damping: 14 }); el.style.scale = s(t - <start>);`.
67
+ `spring.settle({ damping: 14 })` returns the seconds it needs to settle within 0.1 %.
68
+ - `kf(t, keys)`: `kf(t, [{ t: 0, v: 0, ease: "outCubic" }, { t: 1.2, v: 240 }])`. Values may be
69
+ numbers, number arrays or colours (`"#rrggbb"`, `"rgb(...)"`); `ease` on a key shapes the segment
70
+ that starts there; outside the keys the ends hold.
71
+ - `stagger(i, each, { from, count })`: `const d = stagger(i, 0.06, { from: "center", count: n });`.
72
+ - `at(t, start, dur, ease)` returns eased local progress, clamped to 0..1.
73
+ - `seq([name, dur, offset?], ...)`: `const tl = seq(["in", 0.6], ["hold", 1.8], ["out", 0.5, -0.2]);`
74
+ then `tl.p("in", t)`, `tl.local("hold", t)`, `tl.active("out", t)`, `tl.seg.out.start`,
75
+ `tl.duration`. A negative offset overlaps the previous step.
76
+ - `rand(seed)` returns a seeded generator: `const r = rand(<seed>); r();`. Also
77
+ `rand.int(<seed>)(1, 6)` and `rand.range(<seed>)(-8, 8)`.
78
+ - `splitText(el, { by })` with `by` = `grapheme`, `word`, `eojeol` or `line` replaces the element's
79
+ text with `<span data-lit-part>` units and returns them:
80
+ `splitText(el, { by: "eojeol" }).forEach((s, i) => { s.style.opacity = at(t, i * 0.08, 0.4); });`.
81
+ Units are inline-block so transforms apply. Given a string it returns the pieces. It never splits
82
+ a Hangul syllable, and `eojeol` keeps each space-separated word whole.
83
+ - `drawPath(pathEl, p)` draws an SVG stroke from 0 to 1: `drawPath(stroke, at(t, 1, 1.4, ease.inOutSine));`.
84
+ - `morph(fromD, toD, { samples })` returns `p => d` for two single-subpath shapes:
85
+ `const m = morph(shapeA, shapeB); pathEl.setAttribute("d", m(at(t, 2, 0.8)));`.
86
+ - `clipRect(el, p, { from })` reveals from `left`, `right`, `top`, `bottom` or `center`;
87
+ `wipe(el, p, { from })` is the same reveal.
88
+ - `clipCircle(el, p, { x, y })` opens an iris from `x`% `y`%.
89
+ - `maskLinear(el, p, { angle, feather })` makes a soft-edged reveal along an angle.
90
+ - `mix(a, b, t, { space })` blends two colours in oklab (default) or sRGB:
91
+ `el.style.background = mix(<colour a>, <colour b>, p);`. `rgba(colour, alpha)` sets alpha.
92
+ - `clamp`, `lerp`, `invLerp`, `remap(x, a, b, c, d)` and `smoothstep(a, b, x)` for arithmetic.
93
+ - `text(el, { decor })` marks a text run; `text({ content, x, y, w, h })` registers canvas text
94
+ (see Text).
95
+ - The style and the timeline (`studio.md`): `shot(t)` (the shot at `t`, with `p`, `local`,
96
+ `enter(delay, dur)`, `exit(dur)`), `zone(layout, part)` and `place(el, layout, part)` (a layout zone in
97
+ pixels), `tokens()` (the style's eases, durations, staggers and springs per object class).
98
+
99
+ ## Fonts
100
+
101
+ `/lit/fonts.css` declares only the product's verified faces, each with `font-display: block`, so
102
+ no frame is captured with a fallback face. Use these family names exactly:
103
+
104
+ | Family | Weights and widths | Scripts and role |
107
105
  | --- | --- | --- |
108
- | `"Pretendard"` | 400, 700 | Hangul and Latin, body and display; all Korean copy |
106
+ | `"Pretendard"` | 400, 700 | Hangul and Latin; body and display |
109
107
  | `"Archivo"` | 400, 700, 900 at `font-stretch` 75 %, 100 %, 125 % | Latin display |
110
108
  | `"VT323"` | 400 | Latin terminal voice |
111
109
  | `"Silkscreen"` | 400, 700 | Latin pixel voice |
112
110
  | `"Galmuri9"` | 400 | Hangul and Latin pixel voice |
113
111
  | `"MesloLGS NF"` | 400 | Latin monospace |
114
- | `"JetBrains Mono"` | variable `wght` 100–800 | Latin monospace with a fixed advance, so weight animation never reflows |
115
-
116
- A family outside this list falls back to a system face; the text QA reports it (`TEXT-FONTS`), and fails it
117
- when the run carries copy. Ask only for weights the family has, since the browser would fake a bold
118
- otherwise, and never animate letter-spacing or width on Hangul.
119
-
120
- ## Who owns time
121
-
122
- The renderer does. An init script installed before the page loads replaces the wall clock with a virtual
123
- one that advances only when the renderer steps a frame: `Date` (pinned to 2026-01-01 plus elapsed virtual
124
- time), `performance.now`, `setTimeout`, `setInterval`, `requestAnimationFrame`, `requestIdleCallback`,
125
- `document.timeline`, CSS animations and transitions, the Web Animations API with its promises, SVG SMIL and
126
- `Math.random` (seeded from the treatment). CSS keyframes, WAAPI chains and timers are therefore safe.
127
-
128
- What escapes the clock is not: `performance.timeOrigin`, `crypto.getRandomValues`, or anything else that
129
- reads real time or real entropy. The full render replays the page in a second, fresh Chrome from zero and
130
- compares sampled frames (the first, the last, every beat start and the beat midpoints) by the SHA-256 of
131
- their RGBA bytes. Any difference stops the run with exit 18 `STAGE_NONDETERMINISTIC`, naming the frame and
132
- the first differing 64×64 region. Variation comes from `LitStage.rand(seed)`.
133
-
134
- ## What a page may not contain
135
-
136
- - The elements `<video>`, `<audio>`, `<iframe>`, `<object>`, `<embed>` and `<frame>`; the APIs `Audio`,
137
- `AudioContext`, `OfflineAudioContext`, `Worker`, `SharedWorker` and service workers. Each is stubbed,
138
- recorded and turned into exit 17 with its name. Sound is planned in the treatment and muxed by the
139
- renderer; a page never plays any.
140
- - Any network: `WebSocket`, `WebTransport`, `RTCPeerConnection`, an absolute `http(s)://` URL, a
141
- protocol-relative `//…` URL, and preconnect or prefetch hints. The source scan and the live request log
142
- both end in exit 19 `STAGE_NETWORK_REQUEST` with the URL or API named.
143
- - Third-party libraries. Nothing is installed, downloaded or pasted into the stage folder. A script over
144
- 150 KB or carrying a `@license` banner is flagged as a likely library in the warnings.
145
- - Too many or animated rasters. At most 24 raster files (PNG, JPG, WebP, GIF) and 8 MB in total; ten or
146
- more rasters of the same pixel size are treated as a flipbook; any animated GIF, APNG or WebP is refused.
147
- All are exit 17. Rasters are textures and stills inside a drawn scene.
148
- - A film made some other way. A frame loop encoded by hand, a screen recording or an image sequence pushed
149
- through ffmpeg is not the deliverable, whatever it looks like. Every frame goes through this renderer.
150
-
151
- ## Text and the QA replay
152
-
153
- A third Chrome replays the clock for the text QA, so measuring never disturbs the master capture. It
154
- samples at 10 fps for presence and opacity, and at the QA samples (each beat midpoint, plus two settled
155
- frames at 75 % and 90 % of each beat) it renders the frame twice, once with an ink rule switched on, and
156
- measures the glyph pixels inside each text run's boxes.
157
-
158
- - A run is the text of a block element marked with `LitStage.text(el)`, or of the nearest block element,
159
- however it is split into spans.
160
- - Illustrative words inside a drawing (a label on a sketched device, numbers on a dial) are decor:
161
- `text(el, { decor: true })`. Decor is exempt from title-safe and the reading floor, its contrast only
162
- warns, it may never carry a copy line, and it may cover at most 25 % of the visible text area in a sample.
163
- - Canvas and WebGL text is invisible to the QA unless it is registered every frame with
164
- `LitStage.text({ content, x, y, w, h })`; unregistered canvas text is a `TEXT-CANVAS` warning that the
165
- look round must answer by eye.
166
-
167
- The rules it reports: `TEXT-COPY-FOUND` (every copy line seen), `TEXT-CONTRAST` (settled copy at 4.5:1,
168
- or 3:1 when the font size is at least 3 % of the frame's short side), `TEXT-TITLE-SAFE` (copy inside the
169
- central 90 %), `TEXT-READING` (each line readable at least its reading floor: 0.2 s per Hangul syllable
170
- plus a word rate of 3.3 per second, never under 0.9 s for a Latin line or 1.0 s for a Hangul one),
171
- `TEXT-DECOR`, `TEXT-FONTS`, `TEXT-CANVAS`, `TEXT-META-LABEL` (the request, a file name or a word like
172
- path, preset, gate, beat or treatment shown as a label) and `TEXT-PRESENCE` (at least half the beat
173
- midpoints show drawn content outside the text, so the film does more than name its subject).
174
-
175
- ## Effects and their limits
176
-
177
- `morph` refuses shapes with more than one subpath (`morph: multi-subpath paths are unsupported`); morph
178
- each subpath on its own or cross-fade. For WebGL, create the context with `preserveDrawingBuffer: true`;
179
- a page that asks for WebGL and gets none on any rung exits 11.
180
-
181
- Chrome rasterizes every tile in full on the CPU, so blurs, `backdrop-filter`, `mix-blend-mode`, shadows,
182
- SVG filters, SMIL, canvas `shadowBlur` and shaders all replay pixel for pixel. One known quirk remains: an
183
- element whose opacity and transform change together can land one level apart depending on which earlier
184
- frames were painted. The determinism replay therefore paints and captures every frame exactly like the
185
- master. A stills-only frame skips the paints between wanted frames and may differ from the master by that
186
- one level; that is expected and never a reason to change the page.
187
-
188
- ## Running it
112
+ | `"JetBrains Mono"` | 100–800 (variable `wght`) | Latin monospace with a fixed advance; weight motion never reflows |
113
+
114
+ Any other family falls back to a system face. The QA replay reports that, and fails it for copy
115
+ text. Set Korean copy in Pretendard. Never ask for a weight the family does not have (the browser
116
+ would synthesize a fake bold), and never animate tracking or width on Hangul.
117
+
118
+ ## Clock
119
+
120
+ The renderer owns time. It steps a virtual clock frame by frame from 0 and captures the frames in
121
+ order. `Date`, `performance.now`, `setTimeout`, `setInterval`, `requestAnimationFrame`,
122
+ `requestIdleCallback`, `document.timeline.currentTime`, CSS animations and transitions, the Web
123
+ Animations API (its `finished` promises included), SVG SMIL and `Math.random` (seeded from the
124
+ treatment) all follow that clock. So CSS keyframes, WAAPI chains and timers are safe to use.
125
+
126
+ Anything outside the clock is not. Never let `performance.timeOrigin`, `crypto.getRandomValues` or
127
+ any other real clock or entropy reach a visible value: a second capture in a fresh browser compares
128
+ sampled frames pixel by pixel, and a difference stops the run (exit 18) naming the frame and the
129
+ region. For variation, use `LitStage.rand(<seed>)`.
130
+
131
+ ## Forbidden
132
+
133
+ - Elements `<video>`, `<audio>`, `<iframe>`, `<object>`, `<embed>` and `<frame>`; the APIs
134
+ `new Audio()`, `AudioContext` and `OfflineAudioContext`; `Worker`, `SharedWorker` and service
135
+ workers. Each stops the run with exit 17, naming the element or API. Sound comes from the
136
+ treatment's `sound` plan, never from the page.
137
+ - Network of any kind: `WebSocket`, `WebTransport`, `RTCPeerConnection`, any absolute `http(s)://`
138
+ or protocol-relative (`//…`) URL, and preconnect or prefetch links. Each is exit 19. Everything
139
+ the page uses is local.
140
+ - Third-party libraries: never install, download or copy one into the stage directory. Use the kit
141
+ and your own code. The one exception is the pinned three.js build the renderer itself serves at
142
+ `/lit/three/` for a `depth: 3d` film (`depth.md`); import it through the import map, never from a
143
+ CDN.
144
+ - Rasters: at most 24 raster images and 8 MB in total. Ten or more rasters of the same size (a
145
+ flipbook), or any animated GIF, APNG or WebP, is exit 17. Rasters are textures and stills, never a
146
+ frame sequence.
147
+ - Hand-encoded films are not the deliverable: no frame loop encoded by hand, no screen recording,
148
+ no raster flipbook. Every frame passes through the renderer.
149
+
150
+ ## Text
151
+
152
+ The QA replay reads DOM text in a separate browser and never touches the master capture.
153
+
154
+ - Mark each copy element with `LitStage.text(el)`, or let its nearest block element carry the run.
155
+ A run is the text of that element, however it is split into spans.
156
+ - Illustrative text inside a drawn subject is decor: `text(el, { decor: true })`. Decor is exempt
157
+ from title-safe and the reading floor, its contrast is a warning only, it may never carry a copy
158
+ line, and it may cover at most 25 % of the visible text area in any sample.
159
+ - Canvas and WebGL text is invisible to the QA unless you register it every frame with
160
+ `LitStage.text({ content, x, y, w, h })`. Unregistered canvas text is reported as not measured.
161
+ - Copy stays inside the central 90 % of the frame, reaches 4.5:1 contrast (3:1 when its font size
162
+ is at least 3 % of the frame's short side), and stays readable for at least its reading floor.
163
+ - Copy stays on the style and in its shot's type zone, and no two text runs overlap: `TEXT-ON-STYLE`,
164
+ `TEXT-ZONE` and `TEXT-OVERLAP` (`studio.md`, Style rules in the gate). An empty frame of any colour
165
+ for more than 1 s fails `FLAT-FRAME`.
166
+ - Never put the request, the idea, a file name or an internal term on screen as a label.
167
+
168
+ ## Unsupported
169
+
170
+ - Morphs between shapes with more than one subpath: `morph` throws
171
+ `morph: multi-subpath paths are unsupported`. Morph each subpath separately, or cross-fade.
172
+ - Anything that reads the real clock or unseeded entropy for a visible value.
173
+ - Video and audio elements, and any page-side sound.
174
+ - No tested effect is non-deterministic on the stage renderer: CSS `filter: blur()`,
175
+ `backdrop-filter`, `mix-blend-mode`, `box-shadow`, SVG `feGaussianBlur` and SMIL, Canvas2D
176
+ `shadowBlur` and a WebGL shader all match a fresh replay pixel for pixel. The renderer rasterizes
177
+ every tile in full on the CPU (SwiftShader, no partial raster). An element whose opacity and
178
+ transform change together can still rasterize one level apart depending on which earlier frames
179
+ were painted and captured, so the determinism replay paints and captures every frame exactly as
180
+ the master does; stills-only frames may differ from the master by that one level. For WebGL, create the context with
181
+ `preserveDrawingBuffer: true`.
182
+ - That is the software rung. A `depth: 3d` treatment renders on the GPU rung instead (ANGLE on Metal
183
+ on macOS) and is held to the same determinism replay; when the GPU rung cannot start or has no
184
+ WebGL, the render falls back to the software rung and the report and manifest say so (`depth.md`).
185
+
186
+ ## Commands
187
+
188
+ `SKILL_ROOT` is the skill's directory; run the installed commands by absolute path.
189
189
 
190
190
  ```bash
191
- node "$SKILL_ROOT/scripts/motion.mjs" stage --out <dir> --round 1 --stills-only
192
- node "$SKILL_ROOT/scripts/motion.mjs" stage --out <dir> --round 2
191
+ node "$SKILL_ROOT/scripts/motion.mjs" stage --out <dir> --round <N> --stills-only
192
+ node "$SKILL_ROOT/scripts/motion.mjs" stage --out <dir> --round <N>
193
193
  ```
194
194
 
195
- The stills-only round writes `<dir>/stills/`: one PNG per beat midpoint, one transition strip per cut (the
196
- frames 6 before, at and 6 after the cut, side by side at half size), a 12-frame contact sheet, and
197
- `stills/index.json`. Nothing is encoded. Open those PNGs with `read_file` and record the round as
198
- `references/look.md` describes before the full render.
199
-
200
- The full render captures the master, encodes the MP4 (with the planned sound muxed), builds the preview
201
- WebP or GIF, the poster and the reduced-motion still, runs the determinism replay and the text QA in
202
- parallel, and writes `gate-report.txt`, `manifest.json` and `render.jsonl`. It runs detached and logs its
203
- phase to `<dir>/.run/progress.json`. If `run_command` returns before the render ends, read it with `command_status` or run the same command again: it attaches
204
- to the render already running and returns its result. Never cut the film short to finish sooner.
205
-
206
- ## The stage gate
207
-
208
- `gate-report.txt` ends with `QA gate: PASS` or lists the failed rule ids. The stage rules are:
209
-
210
- - `MO-C-03` the flash audit on the master and on the looping preview (at most 3 general and 3 red flashes
211
- in any one-second window). A failure withholds every export into `withheld/` as diagnostics.
212
- - `MO-C-10/11` the MP4 is the format's size, at least the minimum fps, `yuv420p`, BT.709 primaries,
213
- transfer and matrix, `tv` range.
214
- - `MO-C-12` the length is within ±10 % of `treatment.durationSec`.
215
- - `MO-C-13` the preview is at most 3 MB and the poster at most 1 MB (a master above 100 MB per 10 s warns).
216
- - `MO-C-14` the reduced-motion still (the final beat's midpoint) exists.
217
- - `MO-D-03` no empty near-black run longer than 2.4 s (1 s extra is allowed at the very start or end).
218
- - `MO-C-02` WebGL on the software rung, reported only when the page uses WebGL.
219
- - `MO-C-09` the determinism replay matched.
220
- - `MO-A-37..41` the film, preview, poster and reduced-motion still are all present.
221
- - The `TEXT-*` rules above and the `SOUND-*` rules from `references/sound.md`.
222
-
223
- No rule is waived to pass, and the flash audit is never weakened.
224
-
225
- ## Exit codes on this path
226
-
227
- | Exit | State | What to do |
228
- | --- | --- | --- |
229
- | 10 | `BLOCKED_NO_CHROME` | Install Chrome or set `CHROME_PATH`. |
230
- | 11 | `BLOCKED_NO_WEBGL2` | Only when the page asked for WebGL and no rung had it. |
231
- | 12 | `BLOCKED_NO_FFMPEG_FOR_VIDEO` | The stills and sheet exist; install ffmpeg for the film. |
232
- | 13 | `GATE_FAIL_QA` | Fix the named rule and render the next round. |
233
- | 14 | `BLOCKED_DEPS_NOT_PREWARMED` | The user runs `npx @litfamily/litgravity runtime install motion` in a terminal (or as an allowed `run_command`). |
234
- | 15 | `BLOCKED_FONT_FETCH` | A cached font is missing or fails its hash; same pre-warm command. |
235
- | 16 | `BLOCKED_TREATMENT_INVALID` | Fix the named treatment field. |
236
- | 17 | `STAGE_CONTRACT_ERROR` | Fix the element, API, raster, size, fps or missing copy the message names. |
237
- | 18 | `STAGE_NONDETERMINISTIC` | Drive the named frame's source from `t` or a seeded `rand`. |
238
- | 19 | `STAGE_NETWORK_REQUEST` | Remove the URL or connection; everything is local. |
239
- | 20 | `SOUND_INVALID` | Fix the bed or the track the message names. |
195
+ The first is the board round: every beat midpoint, a −6 / 0 / +6 frame transition strip per cut, a
196
+ 12-frame contact sheet, the storyboard `stills/board.png`, and the board check (the text QA replay with
197
+ the style rules) in `stills/check.json`; exit 13 `BOARD_CHECK_FAIL` names each failed rule. Nothing is
198
+ encoded. The second is the full render: the master, the preview, the poster, the reduced-motion still,
199
+ the determinism re-check, the text QA replay, the sound mux, the gate and the board again. Give the full render call a timeout of at least 600 s, and
200
+ never shorten the film to save render time.
201
+
202
+ | Exit | Meaning |
203
+ | --- | --- |
204
+ | 10 | No Chrome |
205
+ | 11 | The page asked for WebGL and none is available on any rung |
206
+ | 12 | No ffmpeg; the stills and the sheet are still written |
207
+ | 13 | Gate FAIL, or the board check failed on a stills-only render |
208
+ | 14 | Runtime not pre-warmed |
209
+ | 15 | A font is missing or its hash differs |
210
+ | 16 | Treatment invalid (names the field) |
211
+ | 17 | Stage contract error |
212
+ | 18 | Nondeterministic frame |
213
+ | 19 | Network request |
214
+ | 20 | Sound invalid |