@anvpx/motion 0.1.0 → 0.1.1

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 (58) hide show
  1. package/CATALOG.md +2 -2
  2. package/README.md +10 -8
  3. package/package.json +9 -9
  4. package/plugins/motion-kit/.claude-plugin/plugin.json +1 -1
  5. package/plugins/motion-kit/README.md +14 -6
  6. package/plugins/motion-kit/commands/mk-draft.md +2 -2
  7. package/plugins/motion-kit/commands/mk-new.md +4 -4
  8. package/plugins/motion-kit/commands/mk-render.md +2 -2
  9. package/plugins/motion-kit/skills/motion-kit/SKILL.md +36 -32
  10. package/plugins/motion-kit/skills/motion-kit/references/authoring-scene.md +15 -4
  11. package/plugins/motion-kit/skills/motion-kit/references/authoring-style.md +6 -4
  12. package/plugins/motion-kit/skills/motion-kit/references/common-mistakes.md +1 -1
  13. package/plugins/motion-kit/skills/motion-kit/references/content-pack.md +61 -73
  14. package/plugins/motion-kit/skills/motion-kit/references/craft-color.md +50 -0
  15. package/plugins/motion-kit/skills/motion-kit/references/craft-composition.md +52 -0
  16. package/plugins/motion-kit/skills/motion-kit/references/craft-critique.md +68 -0
  17. package/plugins/motion-kit/skills/motion-kit/references/craft-motion.md +55 -0
  18. package/plugins/motion-kit/skills/motion-kit/references/craft-narrative.md +54 -0
  19. package/plugins/motion-kit/skills/motion-kit/references/craft-sound.md +53 -0
  20. package/plugins/motion-kit/skills/motion-kit/references/craft-type.md +54 -0
  21. package/plugins/motion-kit/skills/motion-kit/references/critique-repair.md +46 -0
  22. package/plugins/motion-kit/skills/motion-kit/references/decision-packet.md +59 -0
  23. package/plugins/motion-kit/skills/motion-kit/references/direction.md +84 -0
  24. package/plugins/motion-kit/skills/motion-kit/references/free-storyboard.md +3 -3
  25. package/plugins/motion-kit/skills/motion-kit/references/intake.md +38 -12
  26. package/plugins/motion-kit/skills/motion-kit/references/knowledge-routing.md +58 -32
  27. package/plugins/motion-kit/skills/motion-kit/references/outline.md +27 -17
  28. package/plugins/motion-kit/skills/motion-kit/references/patterns.md +19 -19
  29. package/plugins/motion-kit/skills/motion-kit/references/quality-bar.md +21 -21
  30. package/plugins/motion-kit/skills/motion-kit/references/slop.md +13 -11
  31. package/plugins/motion-kit/skills/motion-kit/references/themes.md +15 -0
  32. package/plugins/motion-kit/skills/motion-kit/references/voice.md +25 -4
  33. package/plugins/motion-kit/skills/motion-kit/references/worked-decisions.md +178 -0
  34. package/skills/motion-kit/SKILL.md +36 -32
  35. package/skills/motion-kit/references/authoring-scene.md +15 -4
  36. package/skills/motion-kit/references/authoring-style.md +6 -4
  37. package/skills/motion-kit/references/common-mistakes.md +1 -1
  38. package/skills/motion-kit/references/content-pack.md +61 -73
  39. package/skills/motion-kit/references/craft-color.md +50 -0
  40. package/skills/motion-kit/references/craft-composition.md +52 -0
  41. package/skills/motion-kit/references/craft-critique.md +68 -0
  42. package/skills/motion-kit/references/craft-motion.md +55 -0
  43. package/skills/motion-kit/references/craft-narrative.md +54 -0
  44. package/skills/motion-kit/references/craft-sound.md +53 -0
  45. package/skills/motion-kit/references/craft-type.md +54 -0
  46. package/skills/motion-kit/references/critique-repair.md +46 -0
  47. package/skills/motion-kit/references/decision-packet.md +59 -0
  48. package/skills/motion-kit/references/direction.md +84 -0
  49. package/skills/motion-kit/references/free-storyboard.md +3 -3
  50. package/skills/motion-kit/references/intake.md +38 -12
  51. package/skills/motion-kit/references/knowledge-routing.md +58 -32
  52. package/skills/motion-kit/references/outline.md +27 -17
  53. package/skills/motion-kit/references/patterns.md +19 -19
  54. package/skills/motion-kit/references/quality-bar.md +21 -21
  55. package/skills/motion-kit/references/slop.md +13 -11
  56. package/skills/motion-kit/references/themes.md +15 -0
  57. package/skills/motion-kit/references/voice.md +25 -4
  58. package/skills/motion-kit/references/worked-decisions.md +178 -0
package/CATALOG.md CHANGED
@@ -31,7 +31,7 @@ code | base | Code or terminal text typed or revealed line by line, with highlig
31
31
  kpi-grid | base | 2-6 headline numbers side by side, each with label, unit, change and trend arrow (good=down when a fall is good); values count up. | items
32
32
  chart | base | Animated bar, line or donut chart for ranking, trend or share, with values shown and an optional highlight. | kind
33
33
  table | base | Small data table or ranked list (2-5 columns, 2-8 rows) with row-by-row reveal and one optional highlighted row. | columns,rows
34
- scene3d | base | WebGL diorama (vendored three.js): post, light, material, environment presets; flat 2D canvas fallback without WebGL. 3D output is machine+GPU stable, not portable. | -
34
+ scene3d | base | WebGL diorama (vendored three.js): post, light, material, environment presets; model presets knot|gem|sphere|torus; flat 2D canvas fallback without WebGL. 3D output is machine+GPU stable, not portable. | -
35
35
  sticker | base | Pop-comic sticker slam: 1-5 short phrases slam in with outline type, tilt and a starburst; for hooks, myth-vs-fact and punchy shorts. | words
36
36
  waveform | base | Audio waveform from precomputed peaks: bars rise as the playhead sweeps; for voice agents, podcasts and narrated reports. Peaks are storyboard data, never decoded audio. | peaks
37
37
  Detail: `mk catalog <type>`. Props are strict; unlisted keys are rejected.
@@ -275,7 +275,7 @@ props: {"title":"Top regions","columns":["Region","Revenue"],"rows":[["North","$
275
275
  ```
276
276
 
277
277
  ```
278
- scene3d (base): WebGL diorama (vendored three.js): post, light, material, environment presets; flat 2D canvas fallback without WebGL. 3D output is machine+GPU stable, not portable.
278
+ scene3d (base): WebGL diorama (vendored three.js): post, light, material, environment presets; model presets knot|gem|sphere|torus; flat 2D canvas fallback without WebGL. 3D output is machine+GPU stable, not portable.
279
279
  title text<=60
280
280
  caption text<=140
281
281
  model text
package/README.md CHANGED
@@ -3,13 +3,13 @@
3
3
  **Storyboard JSON in, animated video out.** motion-kit turns a small, validated document into an explainer, infographic or social clip and renders it locally with HyperFrames. Free and open source: no metering, no watermark, no account, no cloud.
4
4
 
5
5
  ```
6
- brief ──► storyboard.json ──► validate ──► preview ──► approve ──► render --gated
7
- (small, diffable) (schema+lint) (contact sheet, stills, clip)
6
+ brief ──► direction ──► storyboard.json ──► validate ──► preview ──► approve ──► render --gated
7
+ (design) (small, diffable) (schema+lint) (contact sheet, stills, clip)
8
8
  ```
9
9
 
10
10
  ## Why it is different
11
11
 
12
- - **The artifact is a document, not a program.** A storyboard is diffable, reviewable and patchable JSON, roughly 100–200 tokens per scene. Any LLM can write it; no React, no timeline code, no model output compiled into your video.
12
+ - **A small production document with room for original design.** Storyboards are diffable, reviewable and patchable JSON. Use catalog components where they fit, or author deterministic HTML/CSS/JS scenes for original compositions through the same build and approval path.
13
13
  - **Deterministic by construction.** Every scene is a pure function of time (`seek(t)`): no frame-rate clock, no unseeded randomness. Same-machine drafts are byte-identical.
14
14
  - **A real approval gate.** `mk preview` writes a review pack, `mk approve` records the user's yes, and `mk render --gated` refuses with exit 4 until the recorded approval matches the current inputs. Any edit re-arms it.
15
15
  - **Local and offline.** Rendering, linting, contact sheets and voice run on your machine. Confidential decks stay on disk.
@@ -25,12 +25,13 @@ Optional voice needs Python 3.12 plus Kokoro/faster-whisper; `mk doctor` tells y
25
25
  ## Quickstart
26
26
 
27
27
  ```sh
28
- npx -y @anvpx/motion@0.1.0 doctor
28
+ npx -y @anvpx/motion@0.1.1 doctor
29
29
 
30
30
  # Optional: make the rest shorter
31
- alias mk="npx -y @anvpx/motion@0.1.0" # bash/zsh
32
- function mk { npx -y @anvpx/motion@0.1.0 @args } # PowerShell
31
+ alias mk="npx -y @anvpx/motion@0.1.1" # bash/zsh
32
+ function mk { npx -y @anvpx/motion@0.1.1 @args } # PowerShell
33
33
 
34
+ # Optional template-assisted example, after deciding the visual direction:
34
35
  mk template list --for "how our pricing works"
35
36
  mk new explain/architecture --demo --out storyboard.json # --demo = example copy; --set k=v for yours
36
37
  mk validate storyboard.json
@@ -56,7 +57,7 @@ mk render storyboard.json --gated --verify
56
57
 
57
58
  ## How authoring works
58
59
 
59
- An agent picks the cheapest route that fits the brief: a template-assembled storyboard, a direct storyboard, or an authored custom scene when the catalog genuinely lacks the shot. The protocol lives in the skill (`skills/motion-kit/SKILL.md`) and in `docs/AGENT-WORKFLOW.md`. Users never write storyboards; the agent designs, shows a preview, and renders only after an explicit yes.
60
+ The agent first develops a visual argument in an authoring-only `direction.md`: concept, composition, typography, color, motion, sound and intended divergence from relevant prior work. It loads focused craft guidance for unresolved decisions, then chooses template-assisted, direct or authored realization by fit. Templates help repeat a brand system; authored scenes can carry the whole film when the brief calls for it. There is no template-exhaustion requirement or custom-scene quota. The protocol lives in the skill (`skills/motion-kit/SKILL.md`) and in `docs/AGENT-WORKFLOW.md`. Users never write storyboards; the agent designs, shows a preview, and renders only after an explicit yes.
60
61
 
61
62
  Claude Code users can install the bundled plugin with `mk plugin install`.
62
63
 
@@ -81,7 +82,8 @@ mk preview → user reviews contact.png / stills / clip → mk approve →
81
82
 
82
83
  ```sh
83
84
  pnpm install
84
- pnpm build # tsc -b plus staged runtime assets
85
+ pnpm build # tsc -b, runtime assets, generated package payloads
86
+ pnpm scaffold:check # fail if a generated copy drifted from its source
85
87
  pnpm check # typecheck + lint
86
88
  pnpm test # unit tests
87
89
  pnpm test:integration # needs Chrome
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anvpx/motion",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Storyboard JSON to animated video, rendered locally with HyperFrames: the mk CLI plus the full pipeline.",
5
5
  "license": "MIT",
6
6
  "author": "anvpx",
@@ -55,14 +55,14 @@
55
55
  "@fontsource/jetbrains-mono": "5.3.0",
56
56
  "@fontsource/source-serif-4": "5.3.1",
57
57
  "@fontsource/space-grotesk": "5.3.0",
58
- "@anvpx/motion-assets": "0.1.0",
59
- "@anvpx/motion-audio": "0.1.0",
60
- "@anvpx/motion-build": "0.1.0",
61
- "@anvpx/motion-cli": "0.1.0",
62
- "@anvpx/motion-scenes": "0.1.0",
63
- "@anvpx/motion-schema": "0.1.0",
64
- "@anvpx/motion-templates": "0.1.0",
65
- "@anvpx/motion-themes": "0.1.0",
58
+ "@anvpx/motion-assets": "0.1.1",
59
+ "@anvpx/motion-audio": "0.1.1",
60
+ "@anvpx/motion-build": "0.1.1",
61
+ "@anvpx/motion-cli": "0.1.1",
62
+ "@anvpx/motion-scenes": "0.1.1",
63
+ "@anvpx/motion-schema": "0.1.1",
64
+ "@anvpx/motion-templates": "0.1.1",
65
+ "@anvpx/motion-themes": "0.1.1",
66
66
  "hyperframes": "0.8.212",
67
67
  "postprocessing": "6.39.5",
68
68
  "three": "0.186.0",
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "description": "Brief-to-approved video via the pinned motion-kit CLI: storyboard, preview, gated render.",
3
3
  "name": "motion-kit",
4
- "version": "0.1.0"
4
+ "version": "0.1.1"
5
5
  }
@@ -2,23 +2,31 @@
2
2
 
3
3
  Plugin root: `plugins/motion-kit/` (chosen over a top-level `motion-kit-plugin/`
4
4
  folder name used by the plugin packaging convention;
5
- `npx -y @anvpx/motion@0.1.0 plugin install` copies this exact folder).
5
+ `npx -y @anvpx/motion@0.1.1 plugin install` copies this exact folder).
6
6
 
7
7
  ## Layout
8
8
 
9
9
  - `.claude-plugin/plugin.json` — manifest (`name`, `version`, `description` only;
10
10
  version tracks `@anvpx/motion`).
11
11
  - `commands/mk-new.md`, `mk-draft.md`, `mk-render.md` — thin wrappers. Every step
12
- calls `npx -y @anvpx/motion@0.1.0` (pinned; never unpinned `npx`).
12
+ calls `npx -y @anvpx/motion@0.1.1` (pinned; never unpinned `npx`).
13
13
  Surface as `/motion-kit:mk-new`, `/motion-kit:mk-draft`, `/motion-kit:mk-render`.
14
- - `skills/motion-kit/SKILL.md` — byte-identical copy of `skills/motion-kit/SKILL.md`.
15
- - `skills/motion-kit/references/` — the same lazy references, so every
16
- `references/*.md` link in the skill resolves after install.
14
+ - `skills/motion-kit/SKILL.md` — generated from the canonical skill by the
15
+ scaffold; do not edit it here.
16
+ - `skills/motion-kit/references/` — generated from the canonical reference set,
17
+ so every `references/*.md` link resolves after install.
18
+
19
+ ## Source ownership
20
+
21
+ The plugin's `.claude-plugin/`, `commands/` and this README are hand-maintained.
22
+ The `skills/motion-kit/` tree is generated. Edit the canonical skill and run
23
+ `pnpm scaffold`; `pnpm scaffold:check` fails on drift. The same scaffold
24
+ generates the core package's `skills/` and `plugins/` trees.
17
25
 
18
26
  ## Install
19
27
 
20
28
  ```bash
21
- npx -y @anvpx/motion@0.1.0 plugin install --out ./motion-kit-plugin
29
+ npx -y @anvpx/motion@0.1.1 plugin install --out ./motion-kit-plugin
22
30
  ```
23
31
 
24
32
  Verifies `skills/motion-kit/SKILL.md` sha256 matches after copy.
@@ -5,8 +5,8 @@ description: Preview a motion-kit storyboard (stills, contact sheet, draft clip)
5
5
  Run the pinned CLI for every step; never use an unpinned invocation.
6
6
 
7
7
  ```bash
8
- npx -y @anvpx/motion@0.1.0 preview storyboard.json
9
- npx -y @anvpx/motion@0.1.0 approve storyboard.json --note "<user words>"
8
+ npx -y @anvpx/motion@0.1.1 preview storyboard.json
9
+ npx -y @anvpx/motion@0.1.1 approve storyboard.json --note "<user words>"
10
10
  ```
11
11
 
12
12
  Follow `skills/motion-kit/SKILL.md` stages 7-8 (preview, show + approve).
@@ -5,10 +5,10 @@ description: Start a motion-kit video (intake, brief, template pick, storyboard)
5
5
  Run the pinned CLI for every step; never use an unpinned invocation.
6
6
 
7
7
  ```bash
8
- npx -y @anvpx/motion@0.1.0 template list --for "<one-line brief>"
9
- npx -y @anvpx/motion@0.1.0 template show <template>/<blueprint>
10
- npx -y @anvpx/motion@0.1.0 new <template>/<blueprint> --set k=v ... --out storyboard.json
11
- npx -y @anvpx/motion@0.1.0 validate storyboard.json
8
+ npx -y @anvpx/motion@0.1.1 template list --for "<one-line brief>"
9
+ npx -y @anvpx/motion@0.1.1 template show <template>/<blueprint>
10
+ npx -y @anvpx/motion@0.1.1 new <template>/<blueprint> --set k=v ... --out storyboard.json
11
+ npx -y @anvpx/motion@0.1.1 validate storyboard.json
12
12
  ```
13
13
 
14
14
  Follow `skills/motion-kit/SKILL.md` stages 1-6 (intake, brief, pick template,
@@ -5,8 +5,8 @@ description: Gated render of an approved motion-kit storyboard with verify
5
5
  Run the pinned CLI for every step; never use an unpinned invocation.
6
6
 
7
7
  ```bash
8
- npx -y @anvpx/motion@0.1.0 render storyboard.json --gated --verify
9
- npx -y @anvpx/motion@0.1.0 verify out/final.mp4 --storyboard storyboard.json
8
+ npx -y @anvpx/motion@0.1.1 render storyboard.json --gated --verify
9
+ npx -y @anvpx/motion@0.1.1 verify out/final.mp4 --storyboard storyboard.json
10
10
  ```
11
11
 
12
12
  Follow `skills/motion-kit/SKILL.md` stages 9-10 (patch, render). Exit 4 means
@@ -6,27 +6,31 @@ allowed-tools: Bash(mk:*) Bash(npx:*) Read Write
6
6
 
7
7
  # motion-kit: brief -> preview -> approved video
8
8
 
9
- `mk` = `npx -y @anvpx/motion@0.1.0`; alias it once per shell, or use the npx prefix in its place. The user describes the outcome; you author one storyboard JSON, show a short preview, and render only after an explicit yes.
9
+ `mk` = `npx -y @anvpx/motion@0.1.1`; alias it once per shell, or use the npx prefix in its place. The user describes the outcome; you author one storyboard JSON, show a short preview, and render only after an explicit yes.
10
10
 
11
11
  ## Start here
12
12
 
13
13
  1. `mk doctor` once; optional voice rows may be missing, required rows are not.
14
- 2. Ask <=3 questions (audience, length, must-have); default the rest (`references/intake.md`).
15
- 3. `brief.md`: <= 8 facts, every number sourced, then the content pack (`references/content-pack.md`); send a <= 200-word outline and wait for "go" (`references/outline.md`).
14
+ 2. Extract supplied facts and constraints; ask only material gaps (max 3, with defaults). A complete brief is not a questionnaire (`references/intake.md`).
15
+ 3. `brief.md`: <= 8 facts, every number sourced. Design `direction.md` before choosing scenes (`references/direction.md`); resolve one craft question at a time (`references/knowledge-routing.md`). Send a <= 200-word outline and wait for "go" (`references/outline.md`).
16
16
  4. Pick a route (below), instantiate, then `mk validate` until 0 errors. If `meta.theme` is not built-in (`default`, `dark`, `tech-dark`, `calm-dark`) and `themes/<name>.json` is absent, preview before calling this done. Storyboard-only request: stop here.
17
17
  5. `mk preview`; open the printed `pack .../contact.png`; ask. On yes only: `mk approve ...`, then `mk render ... --gated --verify`.
18
18
 
19
19
  ## Read when
20
20
 
21
- | File | Read when |
21
+ | File | Read when |
22
22
  | --------------------------------- | -------------------------------------------------------------- |
23
- | `references/worked-example.md` | first build; the complete loop and output shapes |
24
- | `references/free-storyboard.md` | direct route: shape and write the board |
25
- | `references/storyboard-json.md` | field shapes, overlays, assets, or decoding a validation error |
26
- | `references/scene-recipes.md` | choose a type for a beat and copy its prop shape |
27
- | `references/patching.md` | any edit after the first write, or a patch flag refusal |
28
- | `references/quality-bar.md` | judging the preview and what to say before asking |
29
- | `references/common-mistakes.md` | a command refuses, or a flag or field is in doubt |
23
+ | `references/direction.md` | invent the visual argument before choosing a realization route |
24
+ | `references/knowledge-routing.md` | one unresolved craft or technical decision; lazy craft-card index |
25
+ | `references/content-pack.md` | organize creative intent, beats, asset rights, audio and sourced facts |
26
+ | `references/themes.md` | theme or 3D look |
27
+ | `references/worked-example.md` | first build; the complete loop and output shapes |
28
+ | `references/free-storyboard.md` | direct route: shape and write the board |
29
+ | `references/storyboard-json.md` | field shapes, overlays, assets, or decoding a validation error |
30
+ | `references/scene-recipes.md` | choose a type for a beat and copy its prop shape |
31
+ | `references/patching.md` | any edit after the first write, or a patch flag refusal |
32
+ | `references/quality-bar.md` | judging the preview and what to say before asking |
33
+ | `references/common-mistakes.md` | a command refuses, or a flag or field is in doubt |
30
34
 
31
35
  ## Rules
32
36
 
@@ -40,38 +44,38 @@ allowed-tools: Bash(mk:*) Bash(npx:*) Read Write
40
44
 
41
45
  ## Stages
42
46
 
43
- | # | Stage | Do | Done when |
47
+ | # | Stage | Do | Done when |
44
48
  | --- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------- |
45
- | 1 | Intake | topic, audience, length, channel, brand, tone; max 3 questions (`references/intake.md`) | 5-line note |
46
- | 2 | Brief | <= 8 facts, <= 3 sourced numbers, one arc; `brief.md` | numbers sourced |
47
- | 3 | Route | `mk template list --for`; `mk template show` once each, max 2; `references/scene-recipes.md` for beat shapes. The ranker is keyword overlap, so read the description and not-for line; name route + reason | route chosen |
48
- | 4 | Outline | <= 200 words (`references/outline.md`); stop for "go" unless "just do it" | user confirms |
49
- | 5 | Instantiate | template: `mk new <t>/<bp> ...`; direct: `references/free-storyboard.md`; authored: `mk scene new` (`references/authoring-scene.md`); assets: `mk assets import` + `--assets`/`--ledger` | 0 errors; build exit 0 |
50
- | 6 | Fix | smallest `mk patch`; max 3 rounds; same error twice: `mk catalog <type>` + `references/troubleshooting.md`; unknown theme: built-in or `themes/<name>.json` | 0 errors, warnings read |
51
- | 7 | Preview | `mk preview` (<= 90 s; add `--assets d --ledger f` when used); read stdout + `preview.json`; `references/quality-bar.md` | pack exists |
52
- | 8 | Show + approve | contact + clip + 3-line summary + derived coverage; ask. On yes: `mk approve ... --note "<their words>"` (repeat the preview's `--out`/assets/audio flags) | explicit yes recorded |
53
- | 9 | Patch | smallest change; back to 6-7; max 3 rounds, then offer options | approval matches file |
54
- | 10 | Render | mp4: `mk render ... --gated --verify`; webm/mov/gif/png-sequence: `--format ... --gated`, omit `--verify` (mp4-only); add `--assets`/`--ledger`, `--resolution`, `--fps` | mp4: verify 0; other: output exists |
49
+ | 1 | Intake | topic, audience, length, channel, brand, tone; max 3 questions (`references/intake.md`) | 5-line note |
50
+ | 2 | Brief | <= 8 facts, <= 3 sourced numbers, one arc; `brief.md` | numbers sourced |
51
+ | 3 | Direction | `references/direction.md`: concept, composition, type, motion, sound and divergence; then choose realization. Template lookup is optional, after design | direction + route justified |
52
+ | 4 | Outline | <= 200 words (`references/outline.md`); stop for "go" unless "just do it" | user confirms |
53
+ | 5 | Instantiate | template: `mk new <t>/<bp> ...`; direct: `references/free-storyboard.md`; authored: `mk scene new` (`references/authoring-scene.md`); assets: `mk assets import` + `--assets`/`--ledger` | 0 errors; build exit 0 |
54
+ | 6 | Fix | smallest `mk patch`; max 3 rounds; same error twice: `mk catalog <type>` + `references/troubleshooting.md`; unknown theme: built-in or `themes/<name>.json` | 0 errors, warnings read |
55
+ | 7 | Preview | `mk preview` (<= 90 s; add `--assets d --ledger f` when used); read stdout + `preview.json`; `references/quality-bar.md` | pack exists |
56
+ | 8 | Show + approve | contact + clip + 3-line summary + derived coverage; ask. On yes: `mk approve ... --note "<their words>"` (repeat the preview's `--out`/assets/audio flags) | explicit yes recorded |
57
+ | 9 | Patch | smallest change; back to 6-7; max 3 rounds, then offer options | approval matches file |
58
+ | 10 | Render | mp4: `mk render ... --gated --verify`; webm/mov/gif/png-sequence: `--format ... --gated`, omit `--verify` (mp4-only); add `--assets`/`--ledger`, `--resolution`, `--fps` | mp4: verify 0; other: output exists |
55
59
 
56
60
  ## Choosing a route
57
61
 
58
- Template-assisted (`mk template list` -> `mk new`), direct storyboard (`references/free-storyboard.md`) and authored scene (`mk scene new`) are co-equal starts; pick by fit, not exhaustion. Use direct when the brief is clearer as JSON than any blueprint; use authored when the visual needs code. There is no per-video cap; an authored scene costs 1-3k tokens against ~120 for a catalog type. Never stretch a wrong blueprint, truncate a required fact to fit a slot, or refuse an authored scene. Name the route.
62
+ Design first, then choose template (`mk template list` -> `mk new`), direct (`references/free-storyboard.md`) or authored (`mk scene new`, `references/authoring-scene.md`) by fit. Templates help repeat a brand system; direct boards compose catalog components; authored scenes create original layouts and motion. Mix routes when useful. No per-video cap or template-exhaustion prerequisite. The catalog defines supported props, not the visual idea. Name the route and its limitations.
59
63
 
60
64
  ## How long should it be
61
65
 
62
- Use the user's length, else 45 s. Seconds: title 3-5, stat 4-6, bullets/flow 6-11, outro 3-5. `mk fit --seconds N` moves a board only about 1.4x; 25 s to 50 s needs more scenes first (`mk scene add`, about one per 7 s), then fit.
66
+ Use the user's length, else propose 45 s. Budget orientation, meaningful change and readable rest against real copy/narration; scene count follows the argument. `mk fit --seconds N` adjusts timing, not narrative depth. Add or reshape beats with `mk scene add` when stretching would create dead time.
63
67
 
64
- ## Voice and captions (opt-in)
68
+ ## Voice, music and captions (opt-in)
65
69
 
66
- `mk voice` -> `mk captions` -> `mk patch --ops`; the same `--audio` goes to preview, approve and render. Setup and failure paths: `references/voice.md`.
70
+ `mk voice` -> `mk captions` -> `mk patch --ops`; same `--audio` for preview, approve and render. Write numbers as words (`01` -> "zero one"). Music is opt-in; use `music/bed-full.wav`, not the silent `music/bed.wav`. Details: `references/voice.md`.
67
71
 
68
72
  ## Failures
69
73
 
70
- | Symptom | Do |
74
+ | Symptom | Do |
71
75
  | ---------------- | ------------------------------------------------------------------- |
72
- | exit 4 | not an error: stage 8 |
73
- | exit 5 | fix the named scene, re-render once, then report |
74
- | same error twice | stop patching; `mk catalog <type>` and rewrite that scene |
75
- | anything else | `references/common-mistakes.md`, then `references/troubleshooting.md` |
76
+ | exit 4 | not an error: stage 8 |
77
+ | exit 5 | fix the named scene, re-render once, then report |
78
+ | same error twice | stop patching; `mk catalog <type>` and rewrite that scene |
79
+ | anything else | `references/common-mistakes.md`, then `references/troubleshooting.md` |
76
80
 
77
- Done = the approval hash matches the rendered board, `mk verify` exit 0 is quoted, and you state what was not verified.
81
+ Done = approval hash matches, `mk verify` exit 0 is quoted, and unverified parts are named.
@@ -1,12 +1,12 @@
1
1
  # Authoring a scene (type: custom)
2
2
 
3
- A co-equal route, chosen when the visual the brief needs is not in the catalog and code expresses it more directly than a stack of catalog types. There is no per-video cap. The real costs, measured where available: ~1-3k tokens per authored scene against ~120 for a catalog type, no incremental cache (the cache key does not cover authored bytes), and review of the emitted files. Use it when the brief earns it; never to avoid learning a type.
3
+ A first-class route for original composition and motion. Start from the visual argument in `direction.md`, then use code when it expresses that idea well. There is no per-video cap or requirement to exhaust catalog/template options. Native and authored scenes can share a storyboard. Review the emitted files and test deterministic seek; do not promise a supported mechanism until its actual contract is checked.
4
4
 
5
5
  ## Files
6
6
 
7
7
  `scenes/<name>/scene.js` (exports `createScene`), `fragment.html` (no `<script>`, no `on*=`), `style.css` (optional; `#scene-root` is rewritten). The scaffold also writes `notes.md`; that is documentation, not part of the picture. These three code files are the only place HTML/CSS/JS is authored; storyboard props, template slots and pack instructions stay data.
8
8
 
9
- The scaffold's `scene.js` imports `../../runtime/mount.js` and calls `mountTimeline`; the build supplies that runtime. Keep the import and the exported `createScene` signature; replace the body, the fragment and the CSS with your scene. Do not copy runtime code into the scene.
9
+ The scaffold's `scene.js` imports `../../runtime/compose.js`; the build supplies that runtime. Replace its markup, CSS and motion with the direction's original composition while keeping the exported `createScene` contract. The starter demonstrates time-driven state, not a required title layout. Older scenes using `../../runtime/mount.js` and `mountTimeline` remain supported. Do not copy runtime implementations into the scene.
10
10
 
11
11
  A relative helper such as `./lib/format.js` is part of the scene: it must stay inside the scene directory (no `../`, no absolute or remote path), and it is emitted beside `scene.js`, linted with the scene and included in the approval hash. A helper-only edit re-arms the gate like any other scene edit.
12
12
 
@@ -18,6 +18,17 @@ Entry: `{ "type": "custom", "props": { "dir": "scenes/hero" } }`
18
18
 
19
19
  `createScene(root, config, ctx)` → `{ seek(t), dispose(), ready }`. `seek(t)` is a pure function of t. Start from `mk scene new hero`.
20
20
 
21
+ ## Small motion vocabulary, open composition
22
+
23
+ Import only the helpers you use from `../../runtime/compose.js`:
24
+
25
+ - `progress(t, start, duration)`: clamped 0..1; duration zero makes a cut at `t >= start`. Inputs must be finite, duration nonnegative.
26
+ - `interpolate(from, to, amount)`: numeric interpolation; an eased amount may overshoot.
27
+ - `stagger(index, step, start = 0)`: onset for a nonnegative integer index; a negative step reverses order.
28
+ - `ease(name, amount)` and `clamp01(amount)`: existing easing vocabulary (`linear`, `in`, `out`, `in-out`, `spring-soft`, `spring-snappy`).
29
+
30
+ Example: `const p = ease('out', progress(t, 0, 0.8));` then set an element's opacity and transform from `p` on every seek. The time values are illustrative, not pacing rules. Author your own layers, grids, masks, type lockups and relationships in HTML/CSS/JS; helpers impose no layout or visual style. Assign every animated property before onset, during action and after settle; never accumulate deltas from a prior seek. Initialize the scene state and release listeners/resources or temporary styles in `dispose`.
31
+
21
32
  ## Fails lint
22
33
 
23
34
  clocks (`Date.now`, `performance.now`, `new Date()`) · timers · `requestAnimationFrame` · `Math.random` · network/workers · `window.` · CSS `animation`/`transition`/`@keyframes`
@@ -26,7 +37,7 @@ A CSS animation runs on the browser clock, not `seek(t)`.
26
37
 
27
38
  ## Draw with tokens
28
39
 
29
- `var(--mk-color-bg)`, `var(--mk-color-fg)`, `var(--mk-color-accent)`, `var(--mk-font-*)`. Hard hexes break on a theme switch. The 5 % safe margin is already applied.
40
+ `var(--mk-color-bg)`, `var(--mk-color-fg)`, `var(--mk-color-accent)`, `var(--mk-font-*)`. Theme tokens support consistent art direction; authored geometry and motion remain yours. Hard hexes need deliberate theme-switch review. Inspect actual safe margins and delivery crop in preview rather than assuming a decorative full-bleed element makes text safe.
30
41
 
31
42
  ## Loop
32
43
 
@@ -34,4 +45,4 @@ A CSS animation runs on the browser clock, not `seek(t)`.
34
45
 
35
46
  ## Self-check
36
47
 
37
- Same t, same pixels? Theme switch safe? Fits 9:16? Would a catalog type do this with less code?
48
+ Seek A -> B -> A and compare state/pixels. Then seek in reverse order and outside the action interval. Theme switch safe? Fits the intended aspect, longest copy and busiest beat? Does the composition realize the direction? Could shared helpers reduce repeated mechanics without fixing the design? Static proof does not establish motion or sound quality.
@@ -1,10 +1,12 @@
1
- # Authoring a style (theme)
1
+ # Authoring theme tokens within a direction
2
+
3
+ A theme supplies palette/font tokens, not the whole visual system. Design composition, typography behavior, motion and sound in `direction.md`; use `craft-color.md` and `craft-type.md` for those decisions. A recolor of the same layout is useful brand adaptation, but is not by itself a new art direction.
2
4
 
3
5
  A theme is DTCG JSON. Copy the nearest vendored family from `shared/themes/` inside the installed `@anvpx/motion` package and change values only — renaming tokens breaks scenes.
4
6
 
5
7
  ## Tokens that matter
6
8
 
7
- `color.bg` and `color.bgEnd` (the page gradient; keep them close), `color.fg`, `color.accent` and `color.accent2` (once per scene), `color.card`, `color.divider`, `color.glow`, `font.sans`, `font.mono`, `radius`.
9
+ `color.bg` and `color.bgEnd` (the page gradient), `color.fg`, `color.accent`, `color.accent2`, `color.card`, `color.divider`, `color.glow`, `font.sans`, `font.mono`, `radius`. Assign roles from the direction and check contrast over every actual background state; token names do not require a gradient, glow or card motif in an authored composition.
8
10
 
9
11
  ## Enforced by the build
10
12
 
@@ -12,6 +14,6 @@ A theme is DTCG JSON. Copy the nearest vendored family from `shared/themes/` ins
12
14
  - Colour tokens reject `url()`, `var()` and `calc()` — values are literals.
13
15
  - Fonts must be one of the bundled families; never a CDN.
14
16
 
15
- ## Taste
17
+ ## Check the system
16
18
 
17
- One accent, one easing family, one type scale. A theme is a constraint: if two colours compete, the scene has no accent.
19
+ Keep hierarchy and semantic roles coherent. One accent or type family can be a strong choice; multiple categories or contrasting roles may need more. State the reason, then preview representative frames at delivery size. Native scene compositions stay fixed unless their props expose controls; use the authored route for original geometry and behavior. Preview, approve and render must resolve the same vendored theme bytes.
@@ -49,7 +49,7 @@ These are the failures that waste the most time. Each row is wrong -> right -> w
49
49
  | `mk assets import logo.png --dir assets` | Add `--licence MIT --source-url <url>` | Every imported asset needs provenance |
50
50
  | `mk voice` on a machine with no venv | `mk doctor`; install Python 3.12 + the voice extras, or ship silent | Voice is opt-in and fails closed |
51
51
  | `mk patch` path into a missing parent | Add the parent first, or target an existing path | Patch stops at the first op that cannot apply |
52
- | `npx -y @anvpx/motion@0.1.0` returns 404 | stop: the pinned package is unpublished; use a local checkout/tarball only if the user has one | no working bootstrap exists until release |
52
+ | `npx -y @anvpx/motion@0.1.1` returns 404 | stop: the pinned package is unpublished; use a local checkout/tarball only if the user has one | no working bootstrap exists until release |
53
53
 
54
54
  ## Windows
55
55
 
@@ -1,81 +1,69 @@
1
- # Content pack (before any storyboard)
2
-
3
- No storyboard until every item below is sourced or marked "placeholder".
4
- The pack is five lists; detail them with the user, then build.
5
-
6
- ## 1. Style (Style choice, not fact)
7
-
8
- Name the look in 8 words or less (e.g. "dark tech keynote"),
9
- plus 3 numbered rules and 3 banned template-look items
10
- (no glow, no decor gradients, no bounce-everything).
11
- Name the route you chose (template-assisted, direct storyboard or authored scene).
12
- When style is a real choice, name one non-default style + why,
13
- and one alternative. Packs are optional guidance only:
14
- read the pack index lazily (`packs/INDEX.md` beside the installed CLI), never inline a pack,
15
-
16
- ## Style menu (after lanshu, MIT; looks only, engines never)
17
-
18
- Twelve looks with native mappings; write and voice the narration to
19
- fit the chosen look. No native scene exists for pen writing, paper
20
- folds, comic stickers, chalk, or clay — those rows say closest.
21
-
22
- | Look | Native mapping | Best for | Arc (look plus way of telling) |
23
- | --------------- | --------------------------------- | ---------------------------- | ------------------------------ |
24
- | Editorial paper | calm-light title flow callout | serious, premium, business | claim, proof, consequence |
25
- | Tech HUD | dark flow stat | AI, infra, systems | problem, mechanism, result |
26
- | Notebook | closest: steps plus callout | step-by-step teaching | numbered steps, then a recap |
27
- | Paper pop-up | closest: media-frame layers | warm stories, processes | before, the turn, after |
28
- | Pop comic | closest: kinetic slam | punchy shorts, myth vs fact | myth, correction, slam |
29
- | Cinematic 3D | scene3d one-take | flagship, launches | reveal, orbit, resolve |
30
- | Drafting sheet | dark flow plus footnote callout | technical deep dives | spec, derivation, check |
31
- | Chalkboard | closest: kinetic plus recap outro | beginners, memory recaps | question, example, rule |
32
- | Clay town | closest: scene3d diorama | analogies for non-experts | analogy, walkthrough, takeaway |
33
- | Derivation | flow built step by step | principles, algorithms | given, transform, result |
34
- | Casefile | timeline plus callout evidence | post-mortems, incidents | incident, evidence, finding |
35
- | Sitcom | kinetic plus lower-third | abstract terms for newcomers | setup, confusion, resolution |
36
-
37
- The arc column is a beat order, not a formula: it suggests how to sequence
38
- the scenes, and the storyboard still has to earn the result on the contact
39
- sheet. No measured quality claim is attached to any row. Never persist pack
40
- refs in storyboards.
41
-
42
- ## 2. Patterns (from the CLI, never from memory)
43
-
44
- Scene and overlay picks come from `mk catalog` output only.
45
- One new visual idea per scene; a hook in the first second;
46
- karaoke captions (`caption` overlay) on every narrated scene,
47
- words taken from the voice manifest shifted to scene-relative times.
48
- Name unsupported effects instead of promising them.
49
-
50
- ## 3. UI (vendored pixels only)
51
-
52
- Screenshots and images live inside the project (remote refs fail
53
- closed at preview). Import each file instead of hand-writing the ledger:
1
+ # Content pack: evidence and creative intent
2
+
3
+ Before a storyboard, separate facts from design choices. Keep five short lists;
4
+ source claims and assets or mark them "placeholder". Develop the direction
5
+ yourself using the brief; ask only questions that change it, within intake's
6
+ three-question limit.
7
+
8
+ ## 1. Direction (a design choice, not a fact)
9
+
10
+ Use `direction.md` to invent a visual argument and record composition, type,
11
+ color/material, motion and sound choices with reasons. Explore an alternative
12
+ whose visual mechanism is meaningfully different. A look name is a useful label
13
+ after these decisions, not a menu to choose from. Describe what differs from
14
+ available recent work and what deliberately stays consistent.
15
+
16
+ Teach yourself the next missing decision through `knowledge-routing.md`.
17
+ Templates, patterns and qualified packs are optional references. Borrow a
18
+ principle when useful; build an original system when the brief calls for it.
19
+ Choose template/direct/authored realization after direction. No finished style
20
+ list defines the creative space.
21
+
22
+ ## 2. Beats (meaning before components)
23
+
24
+ For each beat, write the message, what changes on screen and why the next beat
25
+ follows. Give attention a clear subject; introduce information at a readable
26
+ pace. A hook can be a question, surprising relationship or sustained observation,
27
+ not necessarily a loud first-second effect.
28
+
29
+ Then map to supported components using `mk catalog`, or to original authored
30
+ HTML/CSS/JS through `authoring-scene.md`. Catalog layouts are components, not a
31
+ mandatory scene sequence. Choose caption treatment for reading conditions;
32
+ caption words/timing come from the voice manifest, shifted to scene-relative
33
+ times. Name unsupported mechanisms and investigate instead of promising them.
34
+
35
+ ## 3. Assets and UI (local files with rights)
36
+
37
+ Screenshots and images live inside the project; remote references fail closed
38
+ at preview. Import each file rather than hand-writing the ledger:
54
39
 
55
40
  ```bash
56
41
  mk assets import src/dashboard.png --dir assets --ledger assets.json --licence CC0-1.0 --source-url <url>
57
42
  ```
58
43
 
59
- The row is `path`, `sourceUrl`, `licence`, `attribution`, `sha256`; the
60
- prop points at the file relative to `--assets` (`"image": "dashboard.png"`).
61
- The ledger is the file you passed; if `--ledger` is omitted it defaults to
62
- `<dir>/assets.json`. Preview, approve and render repeat the same
63
- `--assets d --ledger f`.
64
- No screenshot and none available: rebuild the screen by hand per
65
- `references/faux-ui.md` (faux-UI rules after stageshow).
66
-
67
- ## 4. Sounds (approved words, licensed bed)
68
-
69
- Voice: one voice id + narration text per base scene, user-approved;
70
- narration sets scene durations, so words are final before voice.
71
- Narration is the clock: the evidence is an ASR round-trip of the final
72
- audio against that script, not a listen-through; fix a mismatch before
73
- any scene timing is set.
74
- Bed: one wav + license file + volume; a scored bed matches the
75
- timeline length so nothing loops audibly. Same `--audio`, `--music`,
76
- `--music-volume`, `--music-license` on preview, approve and render.
44
+ Use the actual license and source. The row contains `path`, `sourceUrl`,
45
+ `licence`, `attribution`, `sha256`; props reference files relative to
46
+ `--assets` (`"image": "dashboard.png"`). The ledger defaults to
47
+ `<dir>/assets.json` when `--ledger` is omitted. Preview, approve and render
48
+ repeat the same `--assets d --ledger f`. With no usable screenshot, build
49
+ truthful faux UI per `faux-ui.md`; do not imply it is a real product capture.
50
+
51
+ ## 4. Sound (intent, then verified audio)
52
+
53
+ Choose silence, narration, music and effects for their narrative roles
54
+ (`craft-sound.md`); none is mandatory. For voice, record voice id and approved
55
+ script per base scene before synthesis. Check final audio against that script;
56
+ ASR is useful mismatch evidence, listening checks pronunciation and intent.
57
+ Neither proves the other. Time picture/captions against the actual waveform.
58
+
59
+ For a bed, record local file, actual license, intended level and edit/loop plan.
60
+ Repeat the same `--audio`, `--music`, `--music-volume`,
61
+ `--music-license` on audible preview, approve and render. Use supported CLI
62
+ flags only; a sound-design plan does not add new effect/mix controls.
63
+ See `voice.md` for the concrete audio contract.
77
64
 
78
65
  ## 5. Facts (sourced or placeholder)
79
66
 
80
- At most 8 facts and 3 numbers, each with a source. Anything missing
81
- is written "placeholder" in the outline, never invented.
67
+ At most eight facts and three numbers, with units and sources. Missing information
68
+ stays "placeholder" in the outline. Style preferences are not evidence for factual
69
+ claims, and an attractive composition cannot repair an unsupported number.