@anvpx/motion 0.1.0 → 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.
- package/CATALOG.md +2 -2
- package/README.md +10 -8
- package/music/ambient-calm.wav +0 -0
- package/music/catalog.json +68 -0
- package/music/cinematic-deep.wav +0 -0
- package/music/documentary-reflective.wav +0 -0
- package/music/playful-light.wav +0 -0
- package/music/tech-pulse.wav +0 -0
- package/music/warm-human.wav +0 -0
- package/package.json +10 -9
- package/plugins/motion-kit/.claude-plugin/plugin.json +1 -1
- package/plugins/motion-kit/README.md +14 -6
- package/plugins/motion-kit/commands/mk-draft.md +2 -2
- package/plugins/motion-kit/commands/mk-new.md +4 -4
- package/plugins/motion-kit/commands/mk-render.md +2 -2
- package/plugins/motion-kit/skills/motion-kit/SKILL.md +44 -34
- package/plugins/motion-kit/skills/motion-kit/references/authoring-scene.md +15 -4
- package/plugins/motion-kit/skills/motion-kit/references/authoring-style.md +6 -4
- package/plugins/motion-kit/skills/motion-kit/references/common-mistakes.md +18 -15
- package/plugins/motion-kit/skills/motion-kit/references/content-pack.md +61 -73
- package/plugins/motion-kit/skills/motion-kit/references/craft-color.md +50 -0
- package/plugins/motion-kit/skills/motion-kit/references/craft-composition.md +52 -0
- package/plugins/motion-kit/skills/motion-kit/references/craft-critique.md +68 -0
- package/plugins/motion-kit/skills/motion-kit/references/craft-motion.md +55 -0
- package/plugins/motion-kit/skills/motion-kit/references/craft-narrative.md +54 -0
- package/plugins/motion-kit/skills/motion-kit/references/craft-sound.md +53 -0
- package/plugins/motion-kit/skills/motion-kit/references/craft-type.md +54 -0
- package/plugins/motion-kit/skills/motion-kit/references/critique-repair.md +46 -0
- package/plugins/motion-kit/skills/motion-kit/references/decision-packet.md +59 -0
- package/plugins/motion-kit/skills/motion-kit/references/direction.md +84 -0
- package/plugins/motion-kit/skills/motion-kit/references/free-storyboard.md +3 -3
- package/plugins/motion-kit/skills/motion-kit/references/intake.md +38 -12
- package/plugins/motion-kit/skills/motion-kit/references/knowledge-routing.md +58 -32
- package/plugins/motion-kit/skills/motion-kit/references/longform.md +65 -0
- package/plugins/motion-kit/skills/motion-kit/references/outline.md +27 -17
- package/plugins/motion-kit/skills/motion-kit/references/patterns.md +19 -19
- package/plugins/motion-kit/skills/motion-kit/references/quality-bar.md +30 -21
- package/plugins/motion-kit/skills/motion-kit/references/slop.md +13 -11
- package/plugins/motion-kit/skills/motion-kit/references/themes.md +15 -0
- package/plugins/motion-kit/skills/motion-kit/references/voice.md +41 -4
- package/plugins/motion-kit/skills/motion-kit/references/worked-decisions.md +178 -0
- package/skills/motion-kit/SKILL.md +44 -34
- package/skills/motion-kit/references/authoring-scene.md +15 -4
- package/skills/motion-kit/references/authoring-style.md +6 -4
- package/skills/motion-kit/references/common-mistakes.md +18 -15
- package/skills/motion-kit/references/content-pack.md +61 -73
- package/skills/motion-kit/references/craft-color.md +50 -0
- package/skills/motion-kit/references/craft-composition.md +52 -0
- package/skills/motion-kit/references/craft-critique.md +68 -0
- package/skills/motion-kit/references/craft-motion.md +55 -0
- package/skills/motion-kit/references/craft-narrative.md +54 -0
- package/skills/motion-kit/references/craft-sound.md +53 -0
- package/skills/motion-kit/references/craft-type.md +54 -0
- package/skills/motion-kit/references/critique-repair.md +46 -0
- package/skills/motion-kit/references/decision-packet.md +59 -0
- package/skills/motion-kit/references/direction.md +84 -0
- package/skills/motion-kit/references/free-storyboard.md +3 -3
- package/skills/motion-kit/references/intake.md +38 -12
- package/skills/motion-kit/references/knowledge-routing.md +58 -32
- package/skills/motion-kit/references/longform.md +65 -0
- package/skills/motion-kit/references/outline.md +27 -17
- package/skills/motion-kit/references/patterns.md +19 -19
- package/skills/motion-kit/references/quality-bar.md +30 -21
- package/skills/motion-kit/references/slop.md +13 -11
- package/skills/motion-kit/references/themes.md +15 -0
- package/skills/motion-kit/references/voice.md +41 -4
- package/skills/motion-kit/references/worked-decisions.md +178 -0
|
@@ -1,34 +1,43 @@
|
|
|
1
1
|
# Quality bar: what to check before you ask
|
|
2
2
|
|
|
3
|
-
The engine proves structure: schema, props, timing, lint, hashes. It cannot prove that the film is clear or worth watching.
|
|
3
|
+
The engine proves structure: schema, props, timing, lint, hashes. It cannot prove that the film is clear or worth watching. Review against `direction.md` and its intended viewer effect, using `craft-critique.md` for the evidence and revision method, and `critique-repair.md` for a time-located finding and its recheck. Look at actual frames rather than trusting the exit code.
|
|
4
4
|
|
|
5
5
|
## Inspect in this order
|
|
6
6
|
|
|
7
7
|
1. Open `<pack>/contact.png` at full size. Use the sheet for sequence and consistency, never for legibility.
|
|
8
8
|
2. Open each still at delivery size (`stills/`). Check the busiest and the emptiest frame, not only the hero.
|
|
9
|
-
3.
|
|
9
|
+
3. Inspect a still at the intended small-screen size (about 390 px is one useful phone-width check). If the headline or diagram cannot be read, adapt its grouping/scale for that delivery condition.
|
|
10
10
|
4. Compare the first and last still. The opening must earn attention; the close must land, not merely stop.
|
|
11
|
-
5.
|
|
12
|
-
6. Read `preview.json` for
|
|
11
|
+
5. Watch available motion at normal speed, then inspect the start, middle and settle of the hardest action and two transitions. Compare their timing with the intended beat table; stills alone cannot prove motion.
|
|
12
|
+
6. Listen to actual audible output when sound is in scope. Read `preview.json` for coverage, scene/still timings, lint and estimate. Record reviewed ranges and unpreviewed scenes, motion or audio. If the clip was skipped, say that only stills are available; never score unheard sound as passing.
|
|
13
13
|
|
|
14
14
|
If you cannot see images, say so. Read `preview.json`, ask the user to open the pack, and do not claim you inspected it.
|
|
15
15
|
|
|
16
|
+
## Picture continuity
|
|
17
|
+
|
|
18
|
+
`preview.json.continuity` scans the clip for near-white/near-black frames and
|
|
19
|
+
abrupt luminance jumps. `warn` means the cut is a visible flash/pop risk — a
|
|
20
|
+
bright card cutting to a dark stage, or a one-frame blank. Do not ask for
|
|
21
|
+
approval while it warns. Use a crossfade, match cut or shared anchor, or add a
|
|
22
|
+
bridge beat; re-preview until it is `ok`. A deliberate hard cut needs a stated
|
|
23
|
+
reason and a visual bridge, not silence.
|
|
24
|
+
|
|
16
25
|
## Ten checks
|
|
17
26
|
|
|
18
|
-
| # | Check
|
|
19
|
-
| --- |
|
|
20
|
-
| 1 |
|
|
21
|
-
| 2 |
|
|
22
|
-
| 3 | Hierarchy
|
|
23
|
-
| 4 | Legibility
|
|
24
|
-
| 5 | Line
|
|
25
|
-
| 6 | Contrast
|
|
26
|
-
| 7 |
|
|
27
|
-
| 8 | Motion with a purpose
|
|
28
|
-
| 9 | Rhythm
|
|
29
|
-
| 10 | Truth
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
| # | Check | Pass looks like |
|
|
28
|
+
| --- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
29
|
+
| 1 | Visual argument | Each beat advances a clear intention; a continuous authored scene may contain several related beats |
|
|
30
|
+
| 2 | Opening | Attention has a deliberate subject; speed and restraint fit the intended channel and tone |
|
|
31
|
+
| 3 | Hierarchy | The eye knows where to start; information roles have purposeful differences in scale, weight or placement |
|
|
32
|
+
| 4 | Legibility | Essential words and evidence remain readable at delivery size through the actual motion; no clipping/accidental overlap |
|
|
33
|
+
| 5 | Line breaks | Breaks preserve meaning and rhythm; longest real copy fits without squeezing it into an unreadable block |
|
|
34
|
+
| 6 | Contrast | Text survives the theme; AA is the floor, not the target; the accent also survives grayscale/CVD or carries a second channel |
|
|
35
|
+
| 7 | Art direction | Color/material/type choices reinforce the concept; useful complexity is distinguished from decorative habit |
|
|
36
|
+
| 8 | Motion with a purpose | Movement or stillness serves meaning; staging, continuity, overlap and rest make the important change legible |
|
|
37
|
+
| 9 | Rhythm | Orientation, change and reading holds fit the actual message, narration and sound; cuts have narrative reasons |
|
|
38
|
+
| 10 | Truth | Every number has a source; no invented stat, logo, quote or customer |
|
|
39
|
+
|
|
40
|
+
Use measurements as local checks, not universal aesthetic laws. Inspect real reading conditions, aspect/crop and platform overlays. Name the reference principle and purposeful divergence; do not turn a reference film into a layout to copy.
|
|
32
41
|
|
|
33
42
|
## Score the preview
|
|
34
43
|
|
|
@@ -42,17 +51,17 @@ Use a 1-5 local rubric; it is a conversation aid, not an industry benchmark.
|
|
|
42
51
|
| 4 | Deliberate: hierarchy, rhythm and surface reinforce the point |
|
|
43
52
|
| 5 | Distinctive: the treatment is inseparable from the message |
|
|
44
53
|
|
|
45
|
-
Score
|
|
54
|
+
Score reviewed dimensions: message, hierarchy, craft, motion, sound. Mark unreviewed or inapplicable dimensions N/A and explain; a still cannot establish a motion score, and unheard audio cannot establish a sound score. Fix every known 1 before asking. Improve the weakest observed dimension rather than adding decoration. Name any 2 and missing review evidence in the ask; the local score is not a professional-quality certification.
|
|
46
55
|
|
|
47
56
|
## Fix in this order
|
|
48
57
|
|
|
49
58
|
1. Broken or untrue: clipping, overlap, invented data, unreadable contrast.
|
|
50
|
-
2. The idea:
|
|
59
|
+
2. The idea: no clear intention, competing attention, or a relationship the viewer cannot infer.
|
|
51
60
|
3. Structure: the beat order, a missing setup, a close that does not land.
|
|
52
61
|
4. Hierarchy and scale: type too small, too many equal weights, a hero number spent twice.
|
|
53
62
|
5. Timing: dead holds, cuts on rest, a scene that ends before it is read.
|
|
54
63
|
6. Surface: colour, texture, decoration, effects.
|
|
55
|
-
7. Sound:
|
|
64
|
+
7. Sound: plan it with the direction and review it with picture; fix intelligibility and timing before decorative effects.
|
|
56
65
|
|
|
57
66
|
## When it still looks weak
|
|
58
67
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# What never ships
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Historical style heuristics attributed to a skill built on 53 frame-measured moments and rejected AI films. The underlying corpus and measurements are not qualified by this package. Use the observations to question an unchosen habit, not to define a permissible style.
|
|
4
4
|
|
|
5
5
|
These are style defaults and judgement calls, not engine rules: when the brief earns one of these deliberately, it is allowed — name the exception and its reason in the outline instead of following the list mechanically.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Examine unchosen defaults
|
|
8
8
|
|
|
9
9
|
1. **Page chrome:** a name in a corner, counters ("02 / 05"), timecodes, progress bars, corner brackets.
|
|
10
10
|
2. **Deck layouts:** a held left headline, a kicker above a headline, headline-left/device-right.
|
|
@@ -19,19 +19,21 @@ These are style defaults and judgement calls, not engine rules: when the brief e
|
|
|
19
19
|
11. **Self-certification:** claiming a gate passed without quoting its number.
|
|
20
20
|
12. **A film you did not look at.**
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## Historical motion hypotheses
|
|
23
23
|
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
- **
|
|
27
|
-
-
|
|
28
|
-
- **
|
|
29
|
-
-
|
|
30
|
-
-
|
|
24
|
+
These source-specific observations are starting points for a short, energetic treatment, not measured laws of animation. Their counts and ranges have not been independently reproduced here; preview alternatives against the direction.
|
|
25
|
+
|
|
26
|
+
- The source reports a median move of **10 frames (0.33 s)** and travel concentrated in the first 4-8 frames. Longer movement may be necessary for distance, weight or reading.
|
|
27
|
+
- Decelerating arrivals and accelerating exits can make a hand-off decisive. Spring count follows material and meaning rather than a per-film quota.
|
|
28
|
+
- The source reports **3,392 transform entries against 584 opacity fades**. That ratio does not disqualify a dissolve, atmospheric fade or a film built around opacity.
|
|
29
|
+
- An oversize arrival (the source's logo example starts around 3.5x) can express force. Growth from zero can instead communicate emergence when that is the intended idea.
|
|
30
|
+
- A living detail can sustain a held frame. Complete stillness and rest can also give information or emotion time to land.
|
|
31
|
+
- The source's **0.3-2.3 s cuts on motion** suit one pacing vocabulary. Cuts on rest, long takes and slow cinema remain valid choices.
|
|
32
|
+
- The source's **0.6-1.4 s end hold** and shrinking ending are options. Reading load, sound and narrative closure determine the actual hold and scale.
|
|
31
33
|
|
|
32
34
|
## Type sizes, as a fraction of frame height
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
Optional source examples: headline 7-11 % (9 typical) · support 5-7 % · hero number 22-29 % · wordmark 0.22-0.38 of width. They are not engine limits; choose and preview a hierarchy for the actual words, aspect and viewing conditions.
|
|
35
37
|
|
|
36
38
|
## Fix order when it looks wrong
|
|
37
39
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Themes and the 3D look
|
|
2
|
+
|
|
3
|
+
## Themes
|
|
4
|
+
|
|
5
|
+
The package ships 18 DTCG themes, light and dark: `bold`, `calm`, `data`, `editorial`, `fjord`, `playful`, `pop`, `tech`, `warm`.
|
|
6
|
+
|
|
7
|
+
`mk new` vendors the theme its blueprint uses under `themes/`. To use another, copy `<installed package>/shared/themes/<name>.json` (and its pair, for paired stills) into `themes/` beside the storyboard, then set `meta.theme` with `mk patch`. There is no `mk theme list`; this is the list.
|
|
8
|
+
|
|
9
|
+
For luxury or editorial work, `editorial-*` (serif, ink) and `warm-*` (cream, terracotta) read quieter; `bold-*` (amber on violet) and `tech-*` read louder. Name the choice; the theme is part of the approval hash when vendored.
|
|
10
|
+
|
|
11
|
+
## 3D
|
|
12
|
+
|
|
13
|
+
`scene3d` is a procedural WebGL diorama, not a GLB importer. `model` selects `knot` (default), `gem` (faceted stone), `sphere` or `torus`; `material` is `clay|gloss|metal|emissive`; `post` is `clean|bloom|cinematic|vintage`; `light`/`hdri` are `studio|sunset|night|soft` / `neutral|studio|sunset|night`.
|
|
14
|
+
|
|
15
|
+
For a luxury abstract hero, try `model: gem`, `material: metal`, `light: sunset`, `post: cinematic`, `hdri: sunset` on a dark theme. There is no model upload: use it for an abstract form, not a replica of a specific product. Without WebGL it falls back to a flat 2D canvas; say so when that matters.
|
|
@@ -9,10 +9,45 @@ Needs Python 3.12, espeak-ng and the voice extras; see `references/setup.md`. `m
|
|
|
9
9
|
## Narration
|
|
10
10
|
|
|
11
11
|
1. Add `"narration": "..."` to each base scene that speaks. Overlays are skipped. Write the words as they should be spoken, not as slide copy.
|
|
12
|
-
2.
|
|
13
|
-
3.
|
|
14
|
-
4.
|
|
15
|
-
5. `mk
|
|
12
|
+
2. **Write numbers as words.** The aligner matches letters; a token with no letters (`01`, `$480`, `1,200`) cannot be aligned and `mk voice` refuses before synthesis. Say "zero one", "four hundred eighty", "twelve hundred". The visual copy can keep digits.
|
|
13
|
+
3. The manifest is a non-overlapping speech sequence. The film keeps each scene's authored duration and places the wav at that scene's start; a scene that ends in silence is normal. Voice never compresses the authored picture.
|
|
14
|
+
4. Keep the words final before synthesis: `mk voice` needs the final script, and a later text edit invalidates the timing.
|
|
15
|
+
5. `mk voice storyboard.json --preset <id>` writes a voice TimingManifest; the stdout line names it. Choose a preset that fits the film; do not silently reuse one voice for every brief. `--speed 0.5-2.0` overrides the preset; `--voice <id>` remains for an approved raw Kokoro id.
|
|
16
|
+
| Preset | Voice | Style |
|
|
17
|
+
| ------------------- | ------------ | -------------------------- |
|
|
18
|
+
| `documentary-calm` | `af_heart` | calm, measured, warm |
|
|
19
|
+
| `warm-narrator` | `am_michael` | warm, conversational |
|
|
20
|
+
| `bright-explainer` | `af_bella` | bright, clear, energetic |
|
|
21
|
+
| `friendly-social` | `af_nicole` | friendly, practical |
|
|
22
|
+
| `authoritative` | `bm_george` | composed, precise, British |
|
|
23
|
+
| `deep-cinematic` | `am_fenrir` | deep, slow, cinematic |
|
|
24
|
+
| `british-editorial` | `bf_emma` | editorial, intimate |
|
|
25
|
+
| `japanese-calm` | `jf_alpha` | Japanese, calm |
|
|
26
|
+
6. The command preflights the narration against the scene duration and refuses before synthesis when it cannot fit, or when a number is not written out. The silence gate can also refuse words that land inside silence. Fix the script or the scene duration; never edit the manifest to hide it.
|
|
27
|
+
7. `mk qc` gates the manifest plus audio and reports PASS, WARN, FAIL or UNKNOWN. Quote its result; a synthetic file is not human-quality proof.
|
|
28
|
+
|
|
29
|
+
## Music
|
|
30
|
+
|
|
31
|
+
Music is opt-in; without `--music` the film is narration-only or silent. The installed package ships a catalog of synthesized CC0 beds at `music/catalog.json`; choose by mood and energy instead of reusing one file.
|
|
32
|
+
|
|
33
|
+
| Bed | Mood / energy | Use when |
|
|
34
|
+
| ------------------------ | --------------------- | ----------------------------------------- |
|
|
35
|
+
| `ambient-calm` | calm / low | reflective, human, quiet explanation |
|
|
36
|
+
| `cinematic-deep` | cinematic / medium | serious opening, reveal, documentary turn |
|
|
37
|
+
| `warm-human` | warm / low-medium | brand, human services, invitation |
|
|
38
|
+
| `tech-pulse` | tech / high | data, product, engineering |
|
|
39
|
+
| `playful-light` | playful / medium-high | friendly social, workshop, community |
|
|
40
|
+
| `documentary-reflective` | reflective / low | long-form documentary, history, science |
|
|
41
|
+
|
|
42
|
+
Legacy `bed-full.wav` remains for old callers; do not default to it. All beds are 32 s loops, mixed under narration with ducking; the renderer loops and trims to the film. Pass the identical bed, volume and licence to `mk preview`, `mk approve` and `mk render`:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
mk preview storyboard.json --audio .mk/<name>/voice-manifest.json --full \
|
|
46
|
+
--music node_modules/@anvpx/motion/music/cinematic-deep.wav --music-volume 0.35 \
|
|
47
|
+
--music-license node_modules/@anvpx/motion/music/LICENSE-CC0.txt
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Do not use two beds in one film unless the direction explicitly calls for a scored transition; a hard music cut is as damaging as a hard picture cut. Plan the score as intro / body / resolved ending.
|
|
16
51
|
|
|
17
52
|
## Captions
|
|
18
53
|
|
|
@@ -34,6 +69,8 @@ Needs Python 3.12, espeak-ng and the voice extras; see `references/setup.md`. `m
|
|
|
34
69
|
| Symptom | Do |
|
|
35
70
|
| ----------------------------------- | ----------------------------------------------------------------------- |
|
|
36
71
|
| `mk voice` not installed / exit 127 | `mk doctor`; give the install hint; ship silent only if the user agrees |
|
|
72
|
+
| token `"01"` has no letters | write the number as spoken ("zero one"); digits stay in the visual copy |
|
|
73
|
+
| word inside silence | rewrite the pause/sentence or lengthen that scene; never edit timings |
|
|
37
74
|
| narration refused before synthesis | shorten the words or lengthen that scene; never edit timings |
|
|
38
75
|
| `mk qc` WARN or UNKNOWN | report the exact state; do not call it PASS |
|
|
39
76
|
| `mk captions` omits words | tell the user which scene and how many; adjust the script or duration |
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Worked decisions: what a choice costs
|
|
2
|
+
|
|
3
|
+
Read this after a provisional direction exists, not before. These are three
|
|
4
|
+
annotated compositions from controlled authoring fixtures. They teach the
|
|
5
|
+
reasoning behind a shot, not a look to copy. Technical validity is not an
|
|
6
|
+
aesthetic verdict; no example was reviewed for professional quality.
|
|
7
|
+
|
|
8
|
+
## How to use a precedent
|
|
9
|
+
|
|
10
|
+
For each example, separate the **decision** from the surface. Ask:
|
|
11
|
+
|
|
12
|
+
1. What question did this composition answer?
|
|
13
|
+
2. What did it reject, and what did that cost?
|
|
14
|
+
3. Which mechanism carries the meaning (crop, route, scale, rhythm, sound)?
|
|
15
|
+
4. What would make the same mechanism wrong for another brief?
|
|
16
|
+
5. What is the smallest native realization, and what evidence would falsify it?
|
|
17
|
+
|
|
18
|
+
If your brief shares the question but not the audience, channel or tone, keep the
|
|
19
|
+
question and change the answer.
|
|
20
|
+
|
|
21
|
+
## Example 1 — an invitation, not an announcement
|
|
22
|
+
|
|
23
|
+
**Brief:** a public-library reading night; about 20 s; 16:9; quiet, adult,
|
|
24
|
+
local. The viewer should feel invited to a room, not sold a program.
|
|
25
|
+
|
|
26
|
+
**Question:** how can type feel discovered rather than announced?
|
|
27
|
+
|
|
28
|
+
**Rejected:** title, date, three bullet benefits, logo. It is accurate, but it
|
|
29
|
+
turns the film into a poster with a voice-over; the viewer is told, not drawn in.
|
|
30
|
+
|
|
31
|
+
**Chosen relationship:** a printed sheet is uncovered from a vertical crop on an
|
|
32
|
+
asymmetric left editorial grid. One large statement, one small mono label, and
|
|
33
|
+
a lot of paper. The reveal follows reading order.
|
|
34
|
+
|
|
35
|
+
**Why motion serves meaning:** the vertical crop is the invitation; the hold
|
|
36
|
+
after the statement is the pause before someone decides to come. A push-in or
|
|
37
|
+
orbit would add urgency the event does not want. Rest is part of the argument.
|
|
38
|
+
|
|
39
|
+
**Native realization:** a `custom` scene with a 12-column grid; the statement
|
|
40
|
+
spans columns 1-7 and the meta line sits at 1-4. On each `seek(t)`, derive one
|
|
41
|
+
progress value and assign clip-path and translate from it; never accumulate
|
|
42
|
+
from the previous frame.
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
// import { progress } from "../../runtime/compose.js";
|
|
46
|
+
export function createScene(root) {
|
|
47
|
+
const sheet = root.querySelector(".sheet");
|
|
48
|
+
return {
|
|
49
|
+
seek(t) {
|
|
50
|
+
const p = progress(t, 0.2, 0.9);
|
|
51
|
+
sheet.style.clipPath = `inset(${(1 - p) * 18}% 0 0 0)`;
|
|
52
|
+
sheet.style.transform = `translateY(${(1 - p) * 24}px)`;
|
|
53
|
+
},
|
|
54
|
+
dispose() {},
|
|
55
|
+
ready: Promise.resolve(),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Inspected evidence:** the pre-reveal frame, the 2 s settle frame, and a
|
|
61
|
+
phone-width crop of the statement. The fixture was reviewed as stills; its sound
|
|
62
|
+
was not synthesized or heard.
|
|
63
|
+
|
|
64
|
+
**Failure mode:** a reveal under about half a second reads as a glitch, and a
|
|
65
|
+
statement wider than its column measure loses the "uncovered page" reading.
|
|
66
|
+
**Counterexample:** a formal institutional brand may need symmetry and a crest;
|
|
67
|
+
the asymmetry would fight that identity.
|
|
68
|
+
**Adaptation exercise:** move the same brief to late-night radio. Which
|
|
69
|
+
mechanism survives (crop, hold, one statement), and what must change (type,
|
|
70
|
+
colour, sound)?
|
|
71
|
+
|
|
72
|
+
## Same brief, another concept
|
|
73
|
+
|
|
74
|
+
For the reading-night brief, a second concept is a single overhead view of a long
|
|
75
|
+
table with one lamp and one empty chair. The type is a small label on the table,
|
|
76
|
+
not a poster; the camera holds, and the only movement is the lamp warming up.
|
|
77
|
+
It answers a different viewer effect (intimacy, not discovery) and would use a
|
|
78
|
+
slow hold with no crop reveal. Neither concept is universally better: the word
|
|
79
|
+
"invitation" and the channel decide. If the client needs programme clarity, the
|
|
80
|
+
poster concept wins; if the event sells atmosphere, the table concept wins. The
|
|
81
|
+
two differ in composition and motion, not palette.
|
|
82
|
+
|
|
83
|
+
## Example 2 — causality along a route
|
|
84
|
+
|
|
85
|
+
**Brief:** explain how rain becomes drinking water in about 40 s for teenagers;
|
|
86
|
+
calm voice; visually clear. Facts are supplied; no number may be invented.
|
|
87
|
+
|
|
88
|
+
**Question:** how do you show a process without a four-step bullet list?
|
|
89
|
+
|
|
90
|
+
**Rejected:** four labeled stages in equal cards. It is correct and forgettable:
|
|
91
|
+
the viewer reads labels, not causality, and every stage has the same weight.
|
|
92
|
+
|
|
93
|
+
**Chosen relationship:** three spatial zones (catchment, treatment, reservoir)
|
|
94
|
+
connected by one route. The viewer follows water across the frame; labels
|
|
95
|
+
confirm what the movement already showed.
|
|
96
|
+
|
|
97
|
+
**Why motion serves meaning:** the path is the causal argument. A label arrives
|
|
98
|
+
after the path reaches its zone, so the viewer sees the connection before
|
|
99
|
+
naming it. A cut between stages would break the continuity the explanation
|
|
100
|
+
depends on.
|
|
101
|
+
|
|
102
|
+
**Native realization:** a `custom` scene with one SVG path. `getTotalLength`
|
|
103
|
+
and `getPointAtLength` are deterministic; drive a marker and each zone's
|
|
104
|
+
emphasis from one progress value.
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
// import { ease, progress } from "../../runtime/compose.js";
|
|
108
|
+
const route = root.querySelector("#route");
|
|
109
|
+
const marker = root.querySelector("#marker");
|
|
110
|
+
const length = route.getTotalLength();
|
|
111
|
+
|
|
112
|
+
export function createScene() {
|
|
113
|
+
return {
|
|
114
|
+
seek(t) {
|
|
115
|
+
const p = ease("in-out", progress(t, 0.4, 4.2));
|
|
116
|
+
const point = route.getPointAtLength(p * length);
|
|
117
|
+
marker.setAttribute("transform", `translate(${point.x} ${point.y})`);
|
|
118
|
+
},
|
|
119
|
+
dispose() {},
|
|
120
|
+
ready: Promise.resolve(),
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Inspected evidence:** the route midpoint, the first zone's label onset, and
|
|
126
|
+
the final held frame. The fixture was reviewed as stills; no quantitative water
|
|
127
|
+
claim and no audio-quality claim were made.
|
|
128
|
+
|
|
129
|
+
**Failure mode:** labels that appear before the path arrives let the viewer read
|
|
130
|
+
ahead and stop watching the mechanism; a path that moves too fast to track loses
|
|
131
|
+
the same causality. **Counterexample:** a non-spatial process such as an
|
|
132
|
+
approval workflow may need a timeline or state machine, not a map; forcing it
|
|
133
|
+
onto a route would invent geography.
|
|
134
|
+
**Adaptation exercise:** make a 9:16 version. Stack the zones vertically, keep
|
|
135
|
+
the single route, and decide what the marker does at the crop boundary.
|
|
136
|
+
|
|
137
|
+
## Example 3 — continuity is a decision, not a failure
|
|
138
|
+
|
|
139
|
+
**Brief:** episode two of an approved library series. Episode one used the
|
|
140
|
+
crop-reveal editorial system, a warm paper field and a mono label; the client
|
|
141
|
+
wants the series to be recognisable.
|
|
142
|
+
|
|
143
|
+
**Question:** how do you stay recognisably the same without repeating the first
|
|
144
|
+
composition?
|
|
145
|
+
|
|
146
|
+
**Chosen relationship:** preserve the identity axes (type scale, palette roles,
|
|
147
|
+
crop-reveal grammar, end card) and change the episode's central relationship
|
|
148
|
+
(a single poster becomes a schedule grid) and its shot order.
|
|
149
|
+
|
|
150
|
+
**Rejected:** a new palette each episode (breaks recognition), and an identical
|
|
151
|
+
board (the content no longer fits). Consistency is not a lack of ideas; it is a
|
|
152
|
+
chosen constraint.
|
|
153
|
+
|
|
154
|
+
**Why motion serves meaning:** the same reveal grammar signals "same series";
|
|
155
|
+
the new subject gives the viewer a reason to watch again. The end card is the
|
|
156
|
+
anchor, not a decorative repeat.
|
|
157
|
+
|
|
158
|
+
**Native realization:** reuse the existing authored scene's grid and motion
|
|
159
|
+
helpers; change the content layer and the relationship, not the identity tokens.
|
|
160
|
+
If the series is a strict brand template, use the template deliberately and say
|
|
161
|
+
so.
|
|
162
|
+
|
|
163
|
+
**Inspected evidence:** compare fingerprints across narrative, layout, type,
|
|
164
|
+
value/colour, motion, material, tempo and sound. Name which axes are identity
|
|
165
|
+
and which are episode content.
|
|
166
|
+
**Failure mode:** calling a palette swap "a new episode" while the composition
|
|
167
|
+
repeats; or forcing novelty and losing the recognition the client asked for.
|
|
168
|
+
**Counterexample:** a one-off campaign with no prior work should not invent
|
|
169
|
+
continuity it does not have.
|
|
170
|
+
**Adaptation exercise:** list the three axes you would keep for a third episode
|
|
171
|
+
and the three you would change. Explain each in one sentence.
|
|
172
|
+
|
|
173
|
+
## What these examples do not establish
|
|
174
|
+
|
|
175
|
+
They are authored technical fixtures, not a measured quality benchmark. They do
|
|
176
|
+
not prove that a weaker model will reproduce the reasoning, that a reviewer will
|
|
177
|
+
prefer the result, or that the same decisions fit another brand. A precedent
|
|
178
|
+
that only changes copy or colour has not answered its question.
|
|
@@ -6,32 +6,37 @@ 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.
|
|
9
|
+
`mk` = `npx -y @anvpx/motion@0.1.2`; 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.
|
|
15
|
-
3. `brief.md`: <= 8 facts, every number sourced
|
|
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
|
-
5. `mk preview
|
|
17
|
+
5. `mk preview --full` (add `--audio`/music when sound is in scope); open the printed `pack .../contact.png` and watch the full clip; ask. On yes only: `mk approve ...`, then `mk render ... --gated --verify`.
|
|
18
18
|
|
|
19
19
|
## Read when
|
|
20
20
|
|
|
21
|
-
| File
|
|
21
|
+
| File | Read when |
|
|
22
22
|
| --------------------------------- | -------------------------------------------------------------- |
|
|
23
|
-
| `references/
|
|
24
|
-
| `references/
|
|
25
|
-
| `references/
|
|
26
|
-
| `references/
|
|
27
|
-
| `references/
|
|
28
|
-
| `references/
|
|
29
|
-
| `references/
|
|
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/longform.md` | a 3–5 minute film, acts, beat budget, recurring motif, long-form sound |
|
|
27
|
+
| `references/themes.md` | theme or 3D look |
|
|
28
|
+
| `references/worked-example.md` | first build; the complete loop and output shapes |
|
|
29
|
+
| `references/free-storyboard.md` | direct route: shape and write the board |
|
|
30
|
+
| `references/storyboard-json.md` | field shapes, overlays, assets, or decoding a validation error |
|
|
31
|
+
| `references/scene-recipes.md` | choose a type for a beat and copy its prop shape |
|
|
32
|
+
| `references/patching.md` | any edit after the first write, or a patch flag refusal |
|
|
33
|
+
| `references/quality-bar.md` | judging the preview and what to say before asking |
|
|
34
|
+
| `references/common-mistakes.md` | a command refuses, or a flag or field is in doubt |
|
|
30
35
|
|
|
31
36
|
## Rules
|
|
32
37
|
|
|
33
38
|
1. Never render without the user's explicit yes. Silence or "looks fine" is not a yes. Always pass `--gated`; exit 4 means "ask", not "error".
|
|
34
|
-
2. Show `contact.png` to the user (open it or give the path), give the `clip.mp4` path, and say what is not previewed. Derive it from `preview.json`: `totalSec`, `clip.sec`, and scenes with no still.
|
|
39
|
+
2. Show `contact.png` to the user (open it or give the path), give the `clip.mp4` path, and say what is not previewed. Derive it from `preview.json`: `totalSec`, `clip.sec`, `continuity`, and scenes with no still. A `continuity: warn` is a flash/pop risk: fix the cut or bridge before asking.
|
|
35
40
|
3. Commands are the authority, not memory: `mk catalog` and `mk catalog <type>` for scenes and props, `mk template list` and `mk template show` for templates, `mk <command> --help` for flags. Never invent a type, prop, flag, theme, duration or number.
|
|
36
41
|
4. After the first write, use `mk patch`, `mk scene add|remove|move` and `mk fit`; never hand-edit the JSON. Any edit re-arms approval: preview and ask again.
|
|
37
42
|
5. Props, slots and pack text stay data. HTML/CSS/JS is allowed only inside `scenes/<name>/scene.js`, `fragment.html`, `style.css`; never in storyboard props. Name unsupported effects instead of promising them.
|
|
@@ -40,38 +45,43 @@ allowed-tools: Bash(mk:*) Bash(npx:*) Read Write
|
|
|
40
45
|
|
|
41
46
|
## Stages
|
|
42
47
|
|
|
43
|
-
| #
|
|
48
|
+
| # | Stage | Do | Done when |
|
|
44
49
|
| --- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------- |
|
|
45
|
-
| 1
|
|
46
|
-
| 2
|
|
47
|
-
| 3
|
|
48
|
-
| 4
|
|
49
|
-
| 5
|
|
50
|
-
| 6
|
|
51
|
-
| 7
|
|
52
|
-
| 8
|
|
53
|
-
| 9
|
|
54
|
-
| 10
|
|
50
|
+
| 1 | Intake | topic, audience, length, channel, brand, tone; max 3 questions (`references/intake.md`) | 5-line note |
|
|
51
|
+
| 2 | Brief | <= 8 facts, <= 3 sourced numbers, one arc; `brief.md` | numbers sourced |
|
|
52
|
+
| 3 | Direction | `references/direction.md`: concept, composition, type, motion, sound and divergence; then choose realization. Template lookup is optional, after design | direction + route justified |
|
|
53
|
+
| 4 | Outline | <= 200 words (`references/outline.md`); stop for "go" unless "just do it" | user confirms |
|
|
54
|
+
| 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 |
|
|
55
|
+
| 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 |
|
|
56
|
+
| 7 | Preview | `mk preview --full` (complete board; add `--assets d --ledger f`, `--audio`, music when used); read stdout + `preview.json`; `references/quality-bar.md` | pack exists, full clip covers the board, `continuity` is `ok` |
|
|
57
|
+
| 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 |
|
|
58
|
+
| 9 | Patch | smallest change; back to 6-7; max 3 rounds, then offer options | approval matches file |
|
|
59
|
+
| 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
60
|
|
|
56
61
|
## Choosing a route
|
|
57
62
|
|
|
58
|
-
|
|
63
|
+
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
64
|
|
|
60
65
|
## How long should it be
|
|
61
66
|
|
|
62
|
-
|
|
67
|
+
For a professional film, explainer, product story or documentary segment, the
|
|
68
|
+
default is **3–5 minutes**; read `references/longform.md` and plan acts, a turn
|
|
69
|
+
and a recurring motif. A 20–75 s short is an explicit choice, not the default.
|
|
70
|
+
Use the user's length when given. `mk fit --seconds N` adjusts timing, not
|
|
71
|
+
narrative depth: add or reshape beats with `mk scene add` when stretching would
|
|
72
|
+
create dead time.
|
|
63
73
|
|
|
64
|
-
## Voice and captions (opt-in)
|
|
74
|
+
## Voice, music and captions (opt-in)
|
|
65
75
|
|
|
66
|
-
`mk voice
|
|
76
|
+
`mk voice --preset <id>` -> `mk captions` -> `mk patch --ops`; same `--audio` for preview, approve and render. Write numbers as words (`01` -> "zero one"). Music is opt-in; choose a mood/energy bed from `music/catalog.json` (ambient, cinematic, warm, tech, playful, reflective), never `bed-full.wav` by default. Details: `references/voice.md`.
|
|
67
77
|
|
|
68
78
|
## Failures
|
|
69
79
|
|
|
70
|
-
| Symptom
|
|
80
|
+
| Symptom | Do |
|
|
71
81
|
| ---------------- | ------------------------------------------------------------------- |
|
|
72
|
-
| exit 4
|
|
73
|
-
| exit 5
|
|
74
|
-
| same error twice | stop patching; `mk catalog <type>` and rewrite that scene
|
|
75
|
-
| anything else
|
|
82
|
+
| exit 4 | not an error: stage 8 |
|
|
83
|
+
| exit 5 | fix the named scene, re-render once, then report |
|
|
84
|
+
| same error twice | stop patching; `mk catalog <type>` and rewrite that scene |
|
|
85
|
+
| anything else | `references/common-mistakes.md`, then `references/troubleshooting.md` |
|
|
76
86
|
|
|
77
|
-
Done =
|
|
87
|
+
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
|
|
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/
|
|
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
|
|
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
|
-
|
|
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.
|