Art and animation, written as code. Illustrations, loops, interactive web art, launch-videos and scored films in dozens of styles, identical on every render.
TypeScript agent-skillsanimationcanvasclaude-codeclaude-pluginclaude-skillscodex-plugincreative-codecreative-codingcreative-toolsdeterministicgenerative-arthand-drawnillustrationlaunch-videomotion-designmotion-graphicspluginprocedural-generationskill
motion craft: cuts that carry motion, the shape of a score, a dealt deck of moves, a four-reading review
Alex Greenshpun99caf6449b6d
diff --git a/skills/anidoodle/SKILL.md b/skills/anidoodle/SKILL.mdindex 257361b..8a12dac 100644--- a/skills/anidoodle/SKILL.md+++ b/skills/anidoodle/SKILL.md@@ -83,7 +83,7 @@ a beat is 60 x fps / bpm frames, the bpm from the brief's score; one cue table hruns at load. (3) **Real reference** for anything that exists. (4) **ONE look still**, the hardestframe, critiqued in writing. ✋ **Approval.** (5) **ONE 8-second music sample.** ✋ **Approval.**(6) **Build the whole film**; mechanical checks run continuously. (7) **Review once** from the-rendered file: a contact sheet per beat, each cut as a pair, the dead-air numbers. One ranked fix+rendered file, as four readings with a scorecard (`references/workflows/review.md`). One ranked fixlist, one rebuild. (8) ✋ **Final approval.** Say what you verified and what you cannot.Three approval gates at most. Approval is a budget; spend it where being wrong is expensive.@@ -103,7 +103,7 @@ draws itself declares `kind: "drawing"` and is judged on a finer floor; a freeze`engine/` is the portable art core plus the tooling. `engine/src/canvas-core` knows nothingabout the DOM or any backend. `W`, `H`, `fps` and `durationFrames` come from the film's `meta`.Camera moves (pans, zooms, parallax, shake): `engine/src/canvas-core/camera.ts`, `references/camera.md`.-Seams between scenes: `references/motion-grammar.md`. `render.mjs --blur auto` renders with motion blur (subframes per frame+Seams between scenes: `references/motion-grammar.md` (cuts that carry motion: `seams.ts`; `tools/deck.mjs deal` deals each film different moves). `render.mjs --blur auto` renders with motion blur (subframes per framefrom its measured on-screen speed, averaged in linear light, `--shutter 180`); the default path is untouched.```bash@@ -127,7 +127,7 @@ node <skill>/engine/tools/soundfetch.mjs get piano rooms # on their yes (piano| `verify-export.mjs` | QA on the rendered file: frames, duration, score, A/V sync, true peak after the encode; opt-in first frame, loop seam, `--delivery` || `launch.mjs` | a launch film: `new <name>` scaffolds the spec; `ship <name> --shapes 16x9,9x16` renders, posters, captions, verifies and framechecks each (`framecheck.mjs`: no text cut by the frame's edge) || `test.mjs` (`npm test`) | unit suites in `engine/test/`, no browser |-| `music.mjs` | `vocab` prints a style's vocabulary; `check` gates your composed score (key, master, guards, stems, novelty, and which parts played recordings); `render`, `meter` |+| `music.mjs` | `vocab` prints a style's vocabulary; `check` gates your composed score (key, master, guards, stems, novelty, which parts played recordings) and prints its shape (ARC); `render`, `meter` || `soundfetch.mjs` | the sound pack: `list`, `get <id...\|all>`, `where`, `verify`, `remove <id>` || `sfx.mjs` | the sound-effects kit: `list`, `one`, `kit <dir>`, `test` |diff --git a/skills/anidoodle/engine/src/canvas-core/music/arc.ts b/skills/anidoodle/engine/src/canvas-core/music/arc.tsnew file mode 100644index 0000000..9f38b0c--- /dev/null+++ b/skills/anidoodle/engine/src/canvas-core/music/arc.ts@@ -0,0 +1,49 @@+// THE SHAPE OF A SCORE. craft.ts reads how a piece is WRITTEN; this reads how the finished sound+// MOVES over its length: where it is quiet, where it is loudest, and how it ends. A score can pass+// every other check and still feel like it wanders, because nothing in it is the high point and+// nothing in it is the rest. The shape that reads as one piece: a soft way in, a body, one clear+// loudest moment on the picture's payoff, and an ending that takes things away.+// Advisory, like craft: these are findings to answer, never a gate. A lullaby is flat on purpose.+// const a = arcReport([L, R], 48000, { loop: false, payoffS: 13.5 }); console.log(arcText(a));+import { loudness } from "./meter";++export type ArcFinding = { level: "warn" | "info"; msg: string; fix: string };+export type ArcReport = {+ durationS: number; loop: boolean;+ medianLu: number; // the piece's usual level: the median momentary loudness of everything above silence+ peakLu: number; peakS: number; peakAt: number; // the loudest moment, when, and how far through (0..1)+ peakOverMedian: number;+ introUnderBody: number; // how far the first 2.5 s sit under the median (positive = quieter)+ endUnderPeak: number; // how far the last second sits under the loudest moment+ seamJump: number; // loops: the level step from the last second to the first+ lra: number;+ findings: ArcFinding[];+};+const mean = (a: number[]) => { const p = a.map((l) => Math.pow(10, l / 10)); return 10 * Math.log10(p.reduce((x, y) => x + y, 0) / Math.max(1, p.length)); };+const SILENT = -70;++/** How the sound moves over the piece. `payoffS` is the second the picture pays off, when the film has one. */+export const arcReport = (chans: Float32Array[], sr: number, o: { loop?: boolean; payoffS?: number } = {}): ArcReport => {+ const l = loudness(chans, sr), m = l.momentary, hop = l.hopS, dur = chans[0].length / sr, loop = !!o.loop, at = (i: number) => i * hop + 0.2;+ const live = m.filter((x) => x > SILENT).sort((a, b) => a - b), medianLu = live.length ? live[Math.floor(live.length / 2)] : SILENT;+ let pi = 0; m.forEach((x, i) => { if (x > m[pi]) pi = i; });+ const peakLu = m.length ? m[pi] : SILENT, peakS = at(pi), peakAt = dur > 0 ? peakS / dur : 0, win = (a: number, b: number) => { const w = m.filter((_, i) => at(i) >= a && at(i) <= b); return w.length ? mean(w) : SILENT; };+ const introUnderBody = medianLu - win(0, 2.5), endUnderPeak = peakLu - win(dur - 1, dur), seamJump = m.length ? Math.abs(win(dur - 1, dur) - win(0, 1)) : 0;+ const f: ArcFinding[] = [], r1 = (x: number) => x.toFixed(1), pc = (x: number) => `${Math.round(x * 100)}%`;+ if (dur >= 8 && peakLu - medianLu < 2) f.push({ level: "warn", msg: `nothing is the high point: the loudest moment is only ${r1(peakLu - medianLu)} LU over the usual level`, fix: "hold something back (the low drum, the top octave, a doubling) until the payoff, and thin the bars before it" });+ if (dur >= 20 && l.lra < 5) f.push({ level: "warn", msg: `little contrast: the loudness range is ${r1(l.lra)} LU over ${r1(dur)} s`, fix: "a piece this long wants 5 to 8: give one section fewer parts, or a bar of near silence before the high point" });+ if (o.payoffS !== undefined && Math.abs(peakS - o.payoffS) > 1.5) f.push({ level: "warn", msg: `the loudest moment is at ${r1(peakS)} s, the picture pays off at ${r1(o.payoffS)} s`, fix: "move the fullest bar onto the payoff, or thin whatever is out-shouting it" });+ if (loop) { if (seamJump > 3) f.push({ level: "warn", msg: `the level steps ${r1(seamJump)} LU where the loop comes round`, fix: "end as thin as it begins, or begin as full as it ends" }); }+ else {+ if (dur >= 8 && introUnderBody < 0) f.push({ level: "info", msg: `it opens ${r1(-introUnderBody)} LU over its usual level: there is nothing left to build to`, fix: "open with fewer parts and no low drum, 5 to 12 LU under the body, for the first two or three seconds" });+ if (dur >= 8 && introUnderBody > 12) f.push({ level: "info", msg: `the first 2.5 s sit ${r1(introUnderBody)} LU under the rest: it reads as nothing happening yet`, fix: "frame 0 wants one sound with a reason (a drone, the first chord), even a soft one" });+ if (dur >= 8 && peakAt > 0.8) f.push({ level: "warn", msg: `the loudest moment is ${pc(peakAt)} of the way through: the ending out-shouts the film`, fix: "an ending resolves, it does not climb: stop on a bar line, leave a breath, then one soft element" });+ else if (dur >= 8 && endUnderPeak < 8) f.push({ level: "info", msg: `the last second is only ${r1(endUnderPeak)} LU under the loudest moment`, fix: "let the ending take parts away: the close sits 8 to 20 dB under the peak" });+ }+ return { durationS: dur, loop, medianLu, peakLu, peakS, peakAt, peakOverMedian: peakLu - medianLu, introUnderBody, endUnderPeak, seamJump, lra: l.lra, findings: f };+};++export const arcText = (a: ArcReport) => {+ const r1 = (x: number) => x.toFixed(1), head = `ARC usual ${r1(a.medianLu)} LUFS · loudest ${r1(a.peakLu)} at ${r1(a.peakS)} s (${Math.round(a.peakAt * 100)}% through, ${r1(a.peakOverMedian)} LU over) · range ${r1(a.lra)} LU · ${a.loop ? `loop seam step ${r1(a.seamJump)} LU` : `opens ${r1(a.introUnderBody)} LU under, ends ${r1(a.endUnderPeak)} LU under the peak`}`;+ return [head, ...(a.findings.length ? a.findings.map((f) => ` ${f.level.toUpperCase().padEnd(4)} ${f.msg}\n -> ${f.fix}`) : [" the shape holds: nothing to answer"])].join("\n");+};diff --git a/skills/anidoodle/engine/src/canvas-core/music/index.ts b/skills/anidoodle/engine/src/canvas-core/music/index.tsindex 29b7858..11b2c7e 100644--- a/skills/anidoodle/engine/src/canvas-core/music/index.ts+++ b/skills/anidoodle/engine/src/canvas-core/music/index.ts@@ -18,6 +18,7 @@ export * from "./vocabVoices";export * from "./compose";export * from "./novelty";export * from "./craft";+export * from "./arc";export * from "./craftTables";export * from "./calibration";export * as instruments from "./instruments";diff --git a/skills/anidoodle/engine/src/canvas-core/music/meter.ts b/skills/anidoodle/engine/src/canvas-core/music/meter.tsindex a411eae..986c64b 100644--- a/skills/anidoodle/engine/src/canvas-core/music/meter.ts+++ b/skills/anidoodle/engine/src/canvas-core/music/meter.ts@@ -53,7 +53,7 @@ export const loudness = (chans: Float32Array[], sr: number) => {const stG = stAbs.map(lufs).filter((l) => l > stRel).sort((a, b) => a - b);const pct = (p: number) => (stG.length ? stG[Math.min(stG.length - 1, Math.max(0, Math.round((p / 100) * (stG.length - 1))))] : NaN);const shortTerm = st.map(lufs);- return { integrated, lra: pct(95) - pct(10), shortMax: Math.max(...shortTerm), momentaryMax: Math.max(...blocks.map(lufs)), shortTerm, hopS: 0.1 };+ return { integrated, lra: pct(95) - pct(10), shortMax: Math.max(...shortTerm), momentaryMax: Math.max(...blocks.map(lufs)), shortTerm, momentary: blocks.map(lufs), hopS: 0.1 }; // momentary: one 400 ms block every hop, block i centred at i * hopS + 0.2 s};export const truePeak = (chans: Float32Array[]) => {diff --git a/skills/anidoodle/engine/src/canvas-core/seams.ts b/skills/anidoodle/engine/src/canvas-core/seams.tsnew file mode 100644index 0000000..93e904c--- /dev/null+++ b/skills/anidoodle/engine/src/canvas-core/seams.ts@@ -0,0 +1,105 @@+// SEAMS WITH NUMBERS. A cut between two moving shots reads as one move when the motion carries+// across it: the outgoing shot accelerates, the cut lands at its fastest frame, and the incoming+// shot opens already travelling the same way at the same speed, then comes to rest. This file is+// the arithmetic for that, and the checks that hold a film to it. It draws nothing: the numbers+// go into each scene's own camera (camera.ts), so nothing is ever slid across an empty frame.+// Which seam a story is asking for, and when none of these is, is references/motion-grammar.md.+//+// const m = matchedMove({ dir: 0, exitDist: 260, exitF: 12, entryF: 40 });+// sceneA camera look = restA + m.out(local, CUT) accelerates away over the 12 frames before CUT+// sceneB camera look = restB + m.in(local, CUT) arrives over the 40 frames after, at rest on restB+// const z = matchedZoom({ push: 1.2, exitF: 6, entryF: 15 });+// sceneA zoom = zoomA * z.out(local, CUT); sceneB zoom = zoomB * z.in(local, CUT); a flight through the cut+// checkSeam(velocityAt(lookA, CUT), velocityAt(lookB, CUT + 1), { W, fps }) findings, empty when it holds+// checkSeamPlan([{ type: "iris" }, { type: "matched cut" }, ...]) a seam used a third time+//+// Everything is a pure function of its arguments. Distances are in the units of the thing they+// are added to (world units for a camera's look), speeds in those units per frame.+import type { P } from "./core";+import { clamp, ramp } from "./launchKit";++export type Ease = (t: number) => number;+/** Slow start, fastest at the end: the curve of a move that leaves. */+export const easeIn: Ease = (t) => { const c = clamp(t); return c * c * c; };+/** Fastest at the start, zero slope at the end: the curve of a move that arrives. Its mirror image. */+export const easeOut: Ease = (t) => 1 - easeIn(1 - t);++/** Speed on the last frame of a move of `dist` over `frames` (its fastest, on easeIn). */+export const exitSpeed = (dist: number, frames: number, ease: Ease = easeIn) => dist * (ease(1) - ease(1 - 1 / frames));+/** How far an arriving move over `frames` must travel to start at `speed` per frame. */+export const entryDistance = (speed: number, frames: number, ease: Ease = easeOut) => speed / (ease(1 / frames) - ease(0));++export type MatchedMove = {+ speed: number; // per frame, on both sides of the cut+ entryDist: number; // how far out the incoming shot starts+ /** What to add to the outgoing camera's look: 0 until the exit begins, `exitDist` along `dir` at the cut. */+ out: (local: number, cut: number) => P;+ /** What to add to the incoming camera's look: `entryDist` short of rest at the cut, 0 from `entryF` frames after it. */+ in: (local: number, cut: number) => P;+};+/** A cut hidden in travel. `dir` is the direction of travel in radians (0 is +x); the two sides share it and the speed. */+export const matchedMove = (o: { dir?: number; exitDist: number; exitF: number; entryF: number }): MatchedMove => {+ if (!(o.exitF >= 2) || !(o.entryF >= 2)) throw new Error(`matchedMove: an exit and an entry need at least 2 frames each (got ${o.exitF} and ${o.entryF})`);+ const ux = Math.cos(o.dir ?? 0), uy = Math.sin(o.dir ?? 0), speed = exitSpeed(o.exitDist, o.exitF), entryDist = entryDistance(speed, o.entryF);+ return {+ speed, entryDist,+ out: (local, cut) => { const d = o.exitDist * easeIn(ramp(local, cut - o.exitF, cut)); return [ux * d, uy * d]; },+ in: (local, cut) => { const d = -entryDist * (1 - easeOut(ramp(local, cut, cut + o.entryF))); return [ux * d, uy * d]; },+ };+};++export type MatchedZoom = {+ rate: number; // change of log(zoom) per frame, on both sides of the cut+ from: number; // the scale the incoming shot opens at, relative to its rest+ /** Multiply the outgoing camera's zoom by this: 1 until the exit begins, `push` at the cut. */+ out: (local: number, cut: number) => number;+ /** Multiply the incoming camera's zoom by this: `from` at the cut, 1 from `entryF` frames after it. */+ in: (local: number, cut: number) => number;+};+/** A flight through the cut: the outgoing shot is pushed into, the incoming one opens already growing at the same rate. A zoom is a ratio, so both run in log space. */+export const matchedZoom = (o: { push?: number; exitF: number; entryF: number }): MatchedZoom => {+ const push = o.push ?? 1.2;+ if (!(push > 1)) throw new Error(`matchedZoom: push is how far the camera goes in, above 1 (got ${push})`);+ if (!(o.exitF >= 2) || !(o.entryF >= 2)) throw new Error(`matchedZoom: an exit and an entry need at least 2 frames each (got ${o.exitF} and ${o.entryF})`);+ const lp = Math.log(push), rate = exitSpeed(lp, o.exitF), lf = -entryDistance(rate, o.entryF);+ return {+ rate, from: Math.exp(lf),+ out: (local, cut) => Math.exp(lp * easeIn(ramp(local, cut - o.exitF, cut))),+ in: (local, cut) => Math.exp(lf * (1 - easeOut(ramp(local, cut, cut + o.entryF)))),+ };+};++/** Per-frame velocity of anything that moves, at frame f: where it is, less where it was. */+export const velocityAt = (pos: (f: number) => P, f: number): P => { const a = pos(f - 1), b = pos(f); return [b[0] - a[0], b[1] - a[1]]; };+/** The fastest an element should cross the frame, in screen px per frame: two and a half frame widths a second. Past it blur stops reading as motion and shows as a streak with stepped copies. */+export const speedCeiling = (W: number, fps: number) => (2.5 * W) / fps;++export type SeamFinding = { level: "warn" | "error"; msg: string; fix: string };+/**+ * Does motion carry across a cut? `a` is the screen velocity on the last frame before it, `b` on the+ * first frame after, both in screen px per frame. Empty when the seam holds.+ */+export const checkSeam = (a: P, b: P, o: { W: number; fps: number; rest?: number }): SeamFinding[] => {+ const out: SeamFinding[] = [], va = Math.hypot(a[0], a[1]), vb = Math.hypot(b[0], b[1]), rest = o.rest ?? 0.5, top = speedCeiling(o.W, o.fps), r1 = (v: number) => v.toFixed(1);+ if (va <= rest && vb <= rest) return out; // both at rest: a plain cut, judged by what it matches, not by this+ if (va <= rest || vb <= rest) out.push({ level: "error", msg: `one side of the cut is at rest and the other is moving (${r1(va)} then ${r1(vb)} px a frame): it reads as a jerk`, fix: "bring both sides to rest, or open the incoming shot at the outgoing speed (matchedMove)" });+ else {+ if (a[0] * b[0] + a[1] * b[1] <= 0) out.push({ level: "error", msg: "the direction of travel turns at the cut", fix: "keep one screen direction across the seam" });+ const ratio = vb / va;+ if (ratio < 0.7 || ratio > 1.4) out.push({ level: "warn", msg: `the speed ${ratio < 1 ? "drops" : "jumps"} at the cut (${r1(va)} then ${r1(vb)} px a frame)`, fix: "size the entry with entryDistance(exit speed, entry frames)" });+ }+ if (Math.max(va, vb) > top) out.push({ level: "warn", msg: `${r1(Math.max(va, vb))} px a frame is past what blur can carry at this size (about ${r1(top)})`, fix: "shorten the travel and hide the rest behind the cut, or make it a cut on the beat" });+ return out;+};++/** The seams a film plans, in order. `cut` is a plain or matched cut; `signature` marks the film's own move. */+export type PlannedSeam = { type: string; cut?: boolean; signature?: boolean };+/** A designed seam used a third time has turned into a preset. Cuts are exempt; the signature move gets three (open, middle, close). */+export const checkSeamPlan = (plan: PlannedSeam[]): SeamFinding[] => {+ const out: SeamFinding[] = [], n = new Map<string, { count: number; sig: boolean }>();+ for (const s of plan) { if (s.cut) continue; const e = n.get(s.type) ?? { count: 0, sig: false }; e.count++; e.sig ||= !!s.signature; n.set(s.type, e); }+ const sigs = [...n].filter(([, e]) => e.sig);+ if (sigs.length > 1) out.push({ level: "warn", msg: `${sigs.length} signature moves (${sigs.map(([t]) => t).join(", ")})`, fix: "a film has one move that is its own" });+ for (const [type, e] of n) { const max = e.sig ? 3 : 2; if (e.count > max) out.push({ level: "warn", msg: `"${type}" is used ${e.count} times`, fix: e.sig ? "the signature move belongs at the open, the middle and the close" : "use it for the two seams that matter most and give the others a seam of their own" }); }+ return out;+};diff --git a/skills/anidoodle/engine/test/arc.test.ts b/skills/anidoodle/engine/test/arc.test.tsnew file mode 100644index 0000000..d8ae126--- /dev/null+++ b/skills/anidoodle/engine/test/arc.test.ts@@ -0,0 +1,37 @@+// ARC TESTS. src/canvas-core/music/arc.ts reads the shape of a finished score from its loudness+// over time. Built signals with a known shape go in; the numbers and the findings must say so.+// node tools/test.mjs arc+import { arcReport, arcText } from "../src/canvas-core/music/arc";++export const name = "arc";+export const run = (ok: (cond: boolean, label: string) => void) => {+ const SR = 48000;+ // a steady tone whose level follows `db(t)`: loudness then tracks the envelope and nothing else+ const tone = (seconds: number, db: (t: number) => number) => { const n = Math.round(seconds * SR), x = new Float32Array(n); for (let i = 0; i < n; i++) { const t = i / SR; x[i] = Math.pow(10, db(t) / 20) * Math.sin(2 * Math.PI * 997 * t); } return [x, x]; };+ const has = (r: { findings: { msg: string }[] }, s: string) => r.findings.some((f) => f.msg.includes(s));++ // 1. a shaped piece: soft way in, a body, one high point on the payoff, an ending that drops away+ const shaped = arcReport(tone(24, (t) => (t < 2.5 ? -30 : t < 9 ? -22 : t < 12 ? -16 : t < 20 ? -22 : t < 22 ? -26 : -40)), SR, { payoffS: 10.5 });+ ok(shaped.peakS > 9 && shaped.peakS < 12, `the loudest moment is found inside the loud section (${shaped.peakS.toFixed(1)} s)`);+ ok(Math.abs(shaped.peakOverMedian - 6) < 0.6 && Math.abs(shaped.introUnderBody - 8) < 1, `the peak reads 6 LU over the body and the way in 8 LU under it (${shaped.peakOverMedian.toFixed(1)}, ${shaped.introUnderBody.toFixed(1)})`);+ ok(shaped.endUnderPeak > 20 && shaped.findings.length === 0, `a shaped piece has nothing to answer (the end sits ${shaped.endUnderPeak.toFixed(0)} LU under the peak)`);+ ok(arcText(shaped).includes("the shape holds") && arcText(shaped).startsWith("ARC"), "the report says so in one line");++ // 2. each way a score wanders is named+ const flat = arcReport(tone(24, () => -20), SR);+ ok(has(flat, "nothing is the high point") && has(flat, "little contrast"), "one level from start to finish: no high point, no contrast");+ ok(has(arcReport(tone(24, (t) => (t < 20 ? -24 : -14)), SR), "the ending out-shouts"), "the loudest moment in the last fifth is flagged");+ ok(has(arcReport(tone(24, (t) => (t < 2.5 ? -14 : t < 12 ? -22 : t < 14 ? -17 : t < 22 ? -22 : -40)), SR), "nothing left to build to"), "opening over the body's level is flagged");+ ok(has(arcReport(tone(24, (t) => (t < 2.5 ? -50 : t < 12 ? -22 : t < 14 ? -16 : t < 22 ? -22 : -40)), SR), "nothing happening yet"), "a first 2.5 s far under the rest is flagged");+ ok(has(arcReport(tone(24, (t) => (t < 2.5 ? -30 : t < 9 ? -22 : t < 12 ? -16 : -19)), SR), "only 3.0 LU under"), "an ending that barely comes down is flagged");+ ok(has(arcReport(tone(24, (t) => (t < 2.5 ? -30 : t < 9 ? -22 : t < 12 ? -16 : t < 22 ? -22 : -40)), SR, { payoffS: 18 }), "the picture pays off at 18.0 s"), "a high point away from the picture's payoff is flagged");++ // 3. a loop has no beginning and no end: only its seam and its contrast are read+ const loop = arcReport(tone(12, (t) => (t < 6 ? -24 : -18)), SR, { loop: true });+ ok(has(loop, "where the loop comes round") && !has(loop, "out-shouts") && !has(loop, "build to"), `a loop that ends 6 LU over where it starts is flagged at the seam only (${loop.seamJump.toFixed(1)} LU)`);+ ok(arcReport(tone(12, (t) => (t < 4 ? -24 : t < 8 ? -18 : -24)), SR, { loop: true }).findings.length === 0, "a loop that swells in the middle and returns has nothing to answer");++ // 4. short pieces and silence do not crash or nag+ ok(arcReport(tone(3, () => -20), SR).findings.length === 0, "a three-second sting is not asked for an arc");+ const quiet = arcReport([new Float32Array(SR * 2), new Float32Array(SR * 2)], SR); ok(Number.isFinite(quiet.peakS) && quiet.findings.length === 0, "silence gives finite numbers and no findings");+};diff --git a/skills/anidoodle/engine/test/seams.test.ts b/skills/anidoodle/engine/test/seams.test.tsnew file mode 100644index 0000000..dd3c06f--- /dev/null+++ b/skills/anidoodle/engine/test/seams.test.ts@@ -0,0 +1,56 @@+// SEAM TESTS. src/canvas-core/seams.ts is arithmetic, so the claim it makes (motion carries across+// the cut at one speed, in one direction, and comes to rest exactly) is held to numbers here.+// node tools/test.mjs seams+import { checkSeam, checkSeamPlan, easeIn, easeOut, entryDistance, exitSpeed, matchedMove, matchedZoom, speedCeiling, velocityAt } from "../src/canvas-core/seams";+import type { P } from "../src/canvas-core/core";++export const name = "seams";+export const run = (ok: (cond: boolean, label: string) => void) => {+ const near = (a: number, b: number, eps = 1e-9) => Math.abs(a - b) <= eps;+ const throws = (fn: () => unknown) => { try { fn(); return false; } catch { return true; } };+ const CUT = 100;++ // 1. the two curves are mirror images, and the helpers invert each other+ ok([0, 0.2, 0.5, 0.9, 1].every((t) => near(easeOut(t), 1 - easeIn(1 - t))) && easeIn(0) === 0 && easeOut(1) === 1, "easeOut is easeIn mirrored; both run 0 to 1");+ ok(near(entryDistance(exitSpeed(300, 24), 24), 300), "an entry as long as its exit travels the same distance");+ ok(exitSpeed(300, 12) > exitSpeed(300, 24), "a shorter exit over the same distance leaves faster");++ // 2. a matched move: one speed on both sides of the cut, in one direction, at rest at both ends+ for (const dir of [0, Math.PI, 0.6, -Math.PI / 2]) {+ const m = matchedMove({ dir, exitDist: 260, exitF: 12, entryF: 40 });+ // one continuous path for the test: the incoming shot's rest is wherever the outgoing one left off, plus the entry+ const pos = (f: number): P => { if (f <= CUT) return m.out(f, CUT); const e = m.in(f, CUT), end = m.out(CUT, CUT); return [end[0] + e[0] + m.entryDist * Math.cos(dir), end[1] + e[1] + m.entryDist * Math.sin(dir)]; };+ const a = velocityAt(pos, CUT), b = velocityAt(pos, CUT + 1), va = Math.hypot(a[0], a[1]), vb = Math.hypot(b[0], b[1]);+ ok(near(va, m.speed, 1e-6) && near(vb, m.speed, 1e-6), `dir ${dir.toFixed(2)}: ${va.toFixed(2)} px a frame into the cut, ${vb.toFixed(2)} out of it`);+ ok(near(Math.atan2(a[1], a[0]), Math.atan2(b[1], b[0]), 1e-6), `dir ${dir.toFixed(2)}: the direction of travel is the same on both sides`);+ ok(checkSeam(a, b, { W: 1920, fps: 30 }).length === 0, `dir ${dir.toFixed(2)}: checkSeam has nothing to say`);+ const s = m.out(CUT - 12, CUT), e = m.in(CUT + 40, CUT), late = m.in(CUT + 400, CUT), early = m.out(0, CUT);+ ok(near(Math.hypot(s[0], s[1]), 0) && near(Math.hypot(early[0], early[1]), 0) && near(Math.hypot(e[0], e[1]), 0) && near(Math.hypot(late[0], late[1]), 0), `dir ${dir.toFixed(2)}: at rest before the exit and from the end of the entry on`);+ const last = velocityAt((f) => m.in(f, CUT), CUT + 40); ok(Math.hypot(last[0], last[1]) < m.speed * 0.01, `dir ${dir.toFixed(2)}: it lands with no speed left`);+ }+ let mono = true; { const m = matchedMove({ exitDist: 260, exitF: 12, entryF: 40 }); for (let f = CUT - 12; f < CUT + 40; f++) if (f !== CUT && (f < CUT ? m.out(f + 1, CUT)[0] < m.out(f, CUT)[0] : m.in(f + 1, CUT)[0] < m.in(f, CUT)[0])) mono = false; }+ ok(mono, "neither side ever travels backwards");+ ok(throws(() => matchedMove({ exitDist: 100, exitF: 1, entryF: 20 })) && throws(() => matchedMove({ exitDist: 100, exitF: 10, entryF: 0 })), "a one-frame exit or a zero-frame entry is refused");++ // 3. a matched zoom: the same rate of growth on both sides, in log space, landing on 1+ const z = matchedZoom({ push: 1.2, exitF: 6, entryF: 15 });+ ok(near(z.out(CUT - 6, CUT), 1) && near(z.out(CUT, CUT), 1.2) && near(z.in(CUT, CUT), z.from) && near(z.in(CUT + 15, CUT), 1) && near(z.in(CUT + 99, CUT), 1), "zoom: 1 before, the push at the cut, `from` after it, 1 at rest");+ const rOut = Math.log(z.out(CUT, CUT) / z.out(CUT - 1, CUT)), rIn = Math.log(z.in(CUT + 1, CUT) / z.in(CUT, CUT));+ ok(near(rOut, z.rate, 1e-9) && near(rIn, z.rate, 1e-9), `zoom: growing ${(100 * (Math.exp(rOut) - 1)).toFixed(1)}% a frame into the cut and ${(100 * (Math.exp(rIn) - 1)).toFixed(1)}% out of it`);+ ok(z.from > 0.4 && z.from < 1, `zoom: the incoming shot opens at ${z.from.toFixed(2)} of its size, inside what a scene can be drawn at`);+ ok(throws(() => matchedZoom({ push: 0.9, exitF: 6, entryF: 15 })) && throws(() => matchedZoom({ exitF: 1, entryF: 15 })), "a push of 1 or less, or a one-frame exit, is refused");++ // 4. checkSeam names each way a cut between moving shots goes wrong+ const o = { W: 1920, fps: 30 }, has = (f: { msg: string }[], s: string) => f.some((x) => x.msg.includes(s));+ ok(checkSeam([0, 0], [0.2, 0], o).length === 0, "two shots at rest: nothing to match");+ ok(has(checkSeam([40, 0], [0, 0], o), "at rest") && has(checkSeam([0, 0], [40, 0], o), "at rest"), "one side at rest, one moving: flagged");+ ok(has(checkSeam([40, 0], [-40, 0], o), "turns") && has(checkSeam([40, 0], [0, 40], o), "turns"), "a reversal or a right-angle turn: flagged");+ ok(has(checkSeam([40, 0], [20, 0], o), "drops") && has(checkSeam([40, 0], [80, 0], o), "jumps") && checkSeam([40, 0], [46, 0], o).length === 0, "half or double the speed is flagged; 15% off is not");+ ok(near(speedCeiling(1920, 60), 80) && has(checkSeam([200, 0], [200, 0], o), "past what blur"), "the ceiling is 2.5 widths a second (80 px a frame at 1920 and 60 fps), and a move past it is flagged");++ // 5. the seam plan: a designed seam twice, the signature three times, cuts as often as wanted+ const p = (type: string, n: number, x: object = {}) => Array.from({ length: n }, () => ({ type, ...x }));+ ok(checkSeamPlan([...p("iris", 2), ...p("matched cut", 6, { cut: true }), ...p("ink bloom", 3, { signature: true })]).length === 0, "two irises, six cuts and the signature three times pass");+ ok(has(checkSeamPlan(p("iris", 3)), '"iris" is used 3 times') && has(checkSeamPlan(p("ink bloom", 4, { signature: true })), "4 times"), "a third iris and a fourth signature are flagged");+ ok(has(checkSeamPlan([...p("bloom", 1, { signature: true }), ...p("wipe", 1, { signature: true })]), "2 signature moves"), "two signature moves are flagged");+};diff --git a/skills/anidoodle/engine/tools/deck.mjs b/skills/anidoodle/engine/tools/deck.mjsnew file mode 100644index 0000000..fe04b5e--- /dev/null+++ b/skills/anidoodle/engine/tools/deck.mjs@@ -0,0 +1,82 @@+// DECK. Left to choose, a film reaches for the first move it remembers: the same push-in, the same+// bloom, the same end card. This deals from references/motion-deck.json instead, weighted toward+// what fits the film (its kind, its energy) and toward the quiet workhorses, and prints each card+// with its numbers. The seed is printed, so a deal can be repeated and written into the brief.+// A card is a prompt, never an order: keep it, adapt it to the subject and medium, or drop it and+// say why. Styles and motion are a grammar to compose from (references/motion-grammar.md).+// node tools/deck.mjs deal --kind story --energy high --seconds 27 [--seed 7] [--avoid id,id] [--json]+// node tools/deck.mjs deal --cat seam --n 3 --kind launch # three seams only+// node tools/deck.mjs list [--cat camera] # every card, one line each+// node tools/deck.mjs test # the deck and the dealer hold their own rules+// Weights: role (workhorse 3, accent 2, signature 1) x energy fit (same 1, "any" 0.7, other 0.25).+// A deal has one opening, one close, at most one signature card, and no card twice.+import { existsSync, readFileSync, readdirSync } from "node:fs";+import { dirname, join } from "node:path";+import { fileURLToPath } from "node:url";++const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", ".."), DECK = JSON.parse(readFileSync(join(ROOT, "references", "motion-deck.json"), "utf8"));+const CATS = ["open", "seam", "camera", "reveal", "type", "acting", "emphasis", "close"], MIDDLE = CATS.filter((c) => c !== "open" && c !== "close");+const KINDS = ["story", "drawing", "loop", "explainer", "infographic", "launch", "interactive"], ENERGY = ["calm", "medium", "high"], ROLE_W = { workhorse: 3, accent: 2, signature: 1 };+// mulberry32: the deal is a pure function of the seed+const rand = (seed) => { let a = seed >>> 0; return () => { a = (a + 0x6d2b79f5) >>> 0; let t = a; t = Math.imul(t ^ (t >>> 15), t | 1); t ^= t + Math.imul(t ^ (t >>> 7), t | 61); return ((t ^ (t >>> 14)) >>> 0) / 4294967296; }; };++export const fits = (m, kind) => !kind || m.kinds.includes("any") || m.kinds.includes(kind);+export const weight = (m, energy) => ROLE_W[m.role] * (!energy || m.energy === energy ? 1 : m.energy === "any" ? 0.7 : 0.25);+export const count = (seconds) => Math.max(4, Math.min(12, Math.round(seconds / 4)));+/** A deal: one opening, one close, the rest spread over the middle categories in a shuffled order. */+export const deal = ({ kind, energy, seconds = 20, seed = 1, n, cat, avoid = [] } = {}) => {+ const r = rand(seed), skip = new Set(avoid), picked = [];+ const pool = (c) => DECK.moves.filter((m) => m.cat === c && fits(m, kind) && !skip.has(m.id) && !picked.includes(m) && !(m.role === "signature" && picked.some((p) => p.role === "signature")));+ const draw = (c) => { const p = pool(c); if (!p.length) return false; let x = r() * p.reduce((s, m) => s + weight(m, energy), 0); for (const m of p) { x -= weight(m, energy); if (x <= 0) { picked.push(m); return true; } } picked.push(p[p.length - 1]); return true; };+ if (cat) { for (let i = 0; i < (n ?? 3); i++) if (!draw(cat)) break; return picked; }+ const total = n ?? count(seconds), order = MIDDLE.map((c) => [r(), c]).sort((a, b) => a[0] - b[0]).map((x) => x[1]);+ draw("open");+ for (let i = 0, dry = 0; picked.length < total - 1 && dry < order.length; i++) dry = draw(order[i % order.length]) ? 0 : dry + 1;+ draw("close");+ return picked.sort((a, b) => CATS.indexOf(a.cat) - CATS.indexOf(b.cat));+};++const card = (m) => ` ${m.id} [${m.cat} · ${m.role} · ${m.energy}]\n ${m.move}\n build: ${m.build}\n not when: ${m.not}`;+const selfTest = () => {+ let fails = 0; const say = (ok, label) => { if (!ok) fails++; console.log(` ${ok ? "PASS" : "FAIL"} ${label}`); };+ const M = DECK.moves, ids = M.map((m) => m.id);+ say(new Set(ids).size === ids.length, `${ids.length} cards, every id unique`);+ say(M.every((m) => CATS.includes(m.cat) && ROLE_W[m.role] && [...ENERGY, "any"].includes(m.energy) && m.kinds.length && m.kinds.every((k) => k === "any" || KINDS.includes(k))), "every card has a known category, role, energy and kind");+ say(M.every((m) => m.move.length > 40 && m.build.length > 20 && m.not.length > 15), "every card says what happens, how it is built, and when not to use it");+ say(CATS.every((c) => M.filter((m) => m.cat === c).length >= 3), "every category has at least three cards to choose between");+ // every file a card cites exists: a card that points at nothing is a rumour+ const have = new Set(); const walk = (d) => { for (const e of readdirSync(d, { withFileTypes: true })) { if (e.name === "node_modules" || e.name.startsWith(".")) continue; if (e.isDirectory()) walk(join(d, e.name)); else have.add(e.name); } };+ walk(join(ROOT, "references")); walk(join(ROOT, "engine", "src")); walk(join(ROOT, "engine", "tools"));+ const cited = [...new Set(M.flatMap((m) => `${m.build} ${m.not} ${m.move}`.match(/[A-Za-z0-9-]+\.(?:ts|mjs|md)\b/g) ?? []))], missing = cited.filter((f) => !have.has(f));+ say(!missing.length, `all ${cited.length} files the cards cite exist${missing.length ? ` missing: ${missing.join(", ")}` : ""}`);+ say(!/[—]/.test(JSON.stringify(DECK)), "no em dashes in the deck");+ const key = (d) => d.map((m) => m.id).join(",");+ say(key(deal({ kind: "story", energy: "high", seconds: 27, seed: 7 })) === key(deal({ kind: "story", energy: "high", seconds: 27, seed: 7 })), "the same seed deals the same hand");+ say(new Set(Array.from({ length: 40 }, (_, s) => key(deal({ kind: "story", energy: "high", seconds: 27, seed: s + 1 })))).size >= 30, "forty seeds deal at least thirty different hands");+ let rules = true, kinds = true, avoided = true, sizes = true;+ for (let s = 1; s <= 300; s++) for (const kind of KINDS) {+ const energy = ENERGY[s % 3], seconds = 6 + (s % 9) * 7, d = deal({ kind, energy, seconds, seed: s, avoid: ["cam-slow-push"] });+ if (d.filter((m) => m.cat === "open").length > 1 || d.filter((m) => m.cat === "close").length > 1 || d.filter((m) => m.role === "signature").length > 1 || new Set(d).size !== d.length) rules = false;+ if (!d.every((m) => fits(m, kind))) kinds = false; if (d.some((m) => m.id === "cam-slow-push")) avoided = false; if (d.length > count(seconds) || d.length < 3) sizes = false;+ }+ say(rules, "2100 deals: one opening, one close, at most one signature card, no card twice");+ say(kinds, "no deal holds a card its kind of film cannot use"); say(avoided, "an avoided card is never dealt"); say(sizes, "a deal is never larger than a card every four seconds, never under three");+ const tally = (energy) => { let hi = 0, n = 0; for (let s = 1; s <= 400; s++) for (const m of deal({ kind: "story", energy, seconds: 30, seed: s })) { n++; if (m.energy === "high") hi++; } return hi / n; };+ say(tally("high") > tally("calm") * 1.5, `a high-energy film is dealt more high-energy cards than a calm one (${(tally("high") * 100).toFixed(0)}% against ${(tally("calm") * 100).toFixed(0)}%)`);+ say(deal({ cat: "seam", n: 3, kind: "launch", seed: 3 }).every((m) => m.cat === "seam") && deal({ cat: "seam", n: 3, seed: 3 }).length === 3, "--cat deals from one category only");+ console.log(`\nDECK: ${fails ? "FAIL" : "PASS"}`); process.exit(fails ? 1 : 0);+};++if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {+ const [cmd, ...args] = process.argv.slice(2), val = (k) => { const i = args.indexOf(k); return i >= 0 ? args[i + 1] : undefined; }, num = (k) => (val(k) === undefined ? undefined : Number(val(k)));+ const die = (m) => { console.error(`deck: ${m}`); process.exit(2); };+ if (cmd === "test") selfTest();+ else if (cmd === "list") { const c = val("--cat"); for (const m of DECK.moves.filter((m) => !c || m.cat === c)) console.log(`${m.id.padEnd(30)} ${m.cat.padEnd(9)} ${m.role.padEnd(10)} ${m.energy.padEnd(7)} ${m.kinds.join(",")}`); }+ else if (cmd === "deal") {+ const kind = val("--kind"), energy = val("--energy"), c = val("--cat");+ if (kind && !KINDS.includes(kind)) die(`--kind is one of ${KINDS.join(", ")}`); if (energy && !ENERGY.includes(energy)) die(`--energy is one of ${ENERGY.join(", ")}`); if (c && !CATS.includes(c)) die(`--cat is one of ${CATS.join(", ")}`);+ const seed = num("--seed") ?? (Date.now() % 100000), o = { kind, energy, seconds: num("--seconds") ?? 20, seed, n: num("--n"), cat: c, avoid: (val("--avoid") ?? "").split(",").filter(Boolean) }, d = deal(o);+ if (args.includes("--json")) console.log(JSON.stringify({ ...o, cards: d }, null, 1));+ else { console.log(`DECK seed ${seed}${kind ? ` · ${kind}` : ""}${energy ? ` · ${energy}` : ""}${c ? ` · ${c} only` : ` · ${o.seconds} s`} · ${d.length} cards\n`); console.log(d.map(card).join("\n\n")); console.log(`\nKeep, adapt or drop each card, and say why in the brief. To repeat this deal: --seed ${seed}. To deal the next film a different hand: --avoid ${d.map((m) => m.id).join(",")}`); }+ } else die("usage: deck.mjs deal|list|test (see the header of this file)");+}diff --git a/skills/anidoodle/engine/tools/music.mjs b/skills/anidoodle/engine/tools/music.mjsindex 08c0105..8dc8004 100644--- a/skills/anidoodle/engine/tools/music.mjs+++ b/skills/anidoodle/engine/tools/music.mjs@@ -7,7 +7,7 @@// returning either); or the name of a shipped demo (listening references, never a film's score).//// node tools/music.mjs vocab [style] # the style vocabularies: palette, grooves, harmony, melody, arrangement-// node tools/music.mjs check <piece> [--fit --seconds N] # everything: key/mode, warnings, master, ghost/reverb/masking guards, stems, craft, novelty+// node tools/music.mjs check <piece> [--fit --seconds N] [--payoff S] # everything: key/mode, warnings, master, ghost/reverb/masking guards, stems, craft, arc (the shape; S = the second the picture pays off), novelty// node tools/music.mjs craft <piece> [more ...] [--json] # how it is WRITTEN: melody, harmony, rhythm, tension, mood fit (no render, advisory; errors fail)// node tools/music.mjs novelty <piece> [more ...] # vs every shipped piece (and pairwise when several); FAILS above the threshold or on a reused fragment// node tools/music.mjs list # shipped demos and fixtures@@ -232,6 +232,7 @@ const main = async () => {const r = piece.plan.loop ? M.renderLoop(piece, SR, { cache, stems: true }) : M.renderPiece(piece, SR, { seconds, tempo, cache, stems: true }); T("mix"); const g = await pending; // stems: the peak note names the parts that pile upconst ok = [report(M, r, piece, cache, g.bands), printStems(M, piece, tempo, seconds, cache, g.stems)?.ok !== false];T("report + stems"); { const cr = M.craftReport(piece, { centroidHz: M.centroid([r.L, r.R], SR).mean }); console.log(M.craftText(cr)); ok.push(!cr.findings.some((f) => f.level === "error")); } T("craft");+ { const pay = val("--payoff", undefined); console.log(M.arcText(M.arcReport([r.L, r.R], SR, { loop: !!piece.plan.loop, payoffS: pay }))); } // the shape of the finished sound: advisory, never fails the checkif (!pc.demo) { const fam = [args[0]]; ok.push(printNovelty(M, args[0], M.novelty(piece, M.DEMOS, fam), "shipped pieces")); }console.log(ok.every(Boolean) ? "CHECK PASS: now a human listens (an mp3 or wav on a page)" : "CHECK FAIL: fix the items above, then run check again");if (!ok.every(Boolean)) process.exitCode = 1; return;diff --git a/skills/anidoodle/references/motion-deck.json b/skills/anidoodle/references/motion-deck.jsonnew file mode 100644index 0000000..40f1bae--- /dev/null+++ b/skills/anidoodle/references/motion-deck.json@@ -0,0 +1,181 @@+{+ "about": "The motion deck: moves this engine can already make, each with its numbers. Dealt by engine/tools/deck.mjs so two films do not reach for the same three. A dealt card is a prompt to consider, in the film's own subject and medium: keep it, adapt it, or drop it and say why. Times are seconds, distances are fractions of the frame's width, so every card holds at any size and frame rate.",+ "roles": { "workhorse": "carries a film quietly, safe to use twice", "accent": "noticed when it happens, once or twice", "signature": "can be the one move that is this film's own, used at the open, the middle and the close" },+ "moves": [+ { "id": "open-mid-move", "cat": "open", "role": "workhorse", "energy": "any", "kinds": ["any"],+ "move": "Frame 0 is already composed and already moving: the film opens partway into a camera move or an action, never on a still that then starts.",+ "build": "A path camera whose move began before frame 0 (camera.ts, path: (f) => move(f + lead)), or a cycle opened at phase 0.3, so the first second has travel in it.",+ "not": "A piece that draws itself: there the empty page is the opening." },+ { "id": "open-iris-from-subject", "cat": "open", "role": "accent", "energy": "calm", "kinds": ["story", "loop", "launch", "explainer"],+ "move": "The film opens through a round opening that grows from the thing it is about, 0.5 to 0.8 s, evenly in log space so it does not crawl then snap.",+ "build": "iris(ctx, env, seam(f, 0, len), blank, scene, { center }) in transitions.ts; shape \"blot\" for an inked film.",+ "not": "Centred on nothing. Or when the close also irises and a seam in the middle does: the third one is a preset." },+ { "id": "open-detail-first", "cat": "open", "role": "accent", "energy": "calm", "kinds": ["story", "loop", "drawing"],+ "move": "Open so close on one detail (an eye, a hand, a nib) that the subject is not yet readable, then pull back over 1.5 to 3 s until it is.",+ "build": "Camera keys from zoom 4 to 6 down to 1 with monoZoom: true; divide stroke widths by weight(cam) so the close-up reads close, not enlarged (camera.md).",+ "not": "A detail that was not drawn to be seen at that size. Check the first frame at --scale 2." },+ { "id": "open-cold-action", "cat": "open", "role": "accent", "energy": "high", "kinds": ["story", "launch"],+ "move": "No establishing shot: the first frame is the middle of the action, and the wide shot comes second, as the answer to where we are.",+ "build": "Order the shots action, then wide; the score enters on frame 0 with one sound that has a reason.",+ "not": "A calm piece, or a subject the viewer cannot name from the close shot within a second." },++ { "id": "seam-matched-cut", "cat": "seam", "role": "workhorse", "energy": "high", "kinds": ["any"],+ "move": "A hard cut hidden in travel. The outgoing shot accelerates over 0.2 to 0.4 s, the cut lands on its fastest frame, the incoming shot opens at the same speed in the same direction and comes to rest over 0.8 to 1.4 s.",+ "build": "matchedMove({ dir, exitDist, exitF, entryF }) in seams.ts, added to each scene's camera look; hold it with checkSeam. Render with --blur auto.",+ "not": "Either shot has no room to travel, or the two travel different ways. Then both sides come to rest and it is a plain cut on a beat." },+ { "id": "seam-flight-through", "cat": "seam", "role": "accent", "energy": "high", "kinds": ["story", "launch", "explainer"],+ "move": "The camera flies into the outgoing shot and comes out in the next: a push of about 1.2 over 0.2 s, the cut, then the incoming shot growing from about two thirds of its size to rest over 0.5 s.",+ "build": "matchedZoom({ push, exitF, entryF }) in seams.ts multiplies each camera's zoom; the incoming scene must be painted wider than the frame, because it opens small.",+ "not": "The thing flown into is not what the next shot is about. Then it is a zoom laid over a join." },+ { "id": "seam-actor-carries", "cat": "seam", "role": "signature", "energy": "any", "kinds": ["any"],+ "move": "One object crosses the seam untouched while the world changes round it: same screen position, same size, same colour on the last frame of one scene and the first of the next.",+ "build": "Drive it from one function of the absolute frame that both scenes call (relay in motif.ts); checkRelay holds the two sides to 2 px.",+ "not": "The object has no reason to be in the second scene. A mascot that only watches is decoration." },+ { "id": "seam-shape-becomes", "cat": "seam", "role": "signature", "energy": "medium", "kinds": ["any"],+ "move": "A shape in the outgoing picture travels, stretches a little while moving, and becomes a shape of the next picture, landing on it exactly.",+ "build": "handoff({ from, to, t0, t1 }) in morph.ts; coverShape when the target is the whole page; checkShapes at the landing.",+ "not": "The two shapes share nothing the eye can follow (colour, edge, a rough outline). A morph between strangers is a wipe." },+ { "id": "seam-pick-and-grow", "cat": "seam", "role": "accent", "energy": "medium", "kinds": ["launch", "explainer", "story"],+ "move": "One item out of a set is chosen and grows until it is the next scene; the next scene's first frame is framed exactly like the item.",+ "build": "A camera punch-in that does not come back (launchGallery.ts); frame the incoming scene's first frame from the card's box.",+ "not": "The set was only built to be left." },+ { "id": "seam-cover-from-inside", "cat": "seam", "role": "accent", "energy": "medium", "kinds": ["launch", "story", "explainer"],+ "move": "Something already in the scene grows until it covers the frame, and when it clears the next scene is there. The next scene is complete underneath on every frame.",+ "build": "coverShape (morph.ts) on the scene's own shape, or the bloom in launchCut.ts; close it on the next picture's focal point.",+ "not": "An arbitrary shape brought in to hide the join, or the third time in one film." },+ { "id": "seam-brush", "cat": "seam", "role": "accent", "energy": "medium", "kinds": ["story", "drawing", "launch"],+ "move": "A loaded brush is pulled across in the direction the story is already moving, wet ink running ahead of the new picture, 0.6 to 0.9 s.",+ "build": "brushWipe(ctx, env, p, from, to, { angle, ink }) in transitions.ts.",+ "not": "A clean, set register. Or more than twice." },+ { "id": "seam-cut-on-beat", "cat": "seam", "role": "workhorse", "energy": "any", "kinds": ["any"],+ "move": "A plain hard cut with both sides at rest, on a strong beat, between two frames that match in one thing: a shape, a position, a direction of gaze.",+ "build": "No call. Put the cut frame on the cue table's downbeat and check the pair as stills: one thing sits in the same place on both.",+ "not": "Nothing matches, or the music has no beat there. Then use the gentle move." },+ { "id": "seam-one-canvas", "cat": "seam", "role": "workhorse", "energy": "calm", "kinds": ["explainer", "launch", "story", "interactive"],+ "move": "The scenes sit side by side in one layout larger than the frame and the camera travels between them; the route says how they relate.",+ "build": "One Camera for every plane (camera.ts); world-placed scenery so the view changes all the way (koiWorld.ts, webTour.ts).",+ "not": "The places are unrelated, or the trip between two stops is long and empty." },+ { "id": "seam-leave-as-arrived", "cat": "seam", "role": "workhorse", "energy": "any", "kinds": ["any"],+ "move": "A thing leaves the way it came, mirrored in time and shorter: what arrived over 0.5 s on a settling curve leaves over 0.25 s on an accelerating one, along the same path.",+ "build": "Run the entrance's own progress backwards through easeIn (seams.ts); if it was revealed from behind an edge it tucks back behind that edge where the edge is now.",+ "not": "The exit is the point of the scene. Then it gets a move of its own." },++ { "id": "cam-slow-push", "cat": "camera", "role": "workhorse", "energy": "calm", "kinds": ["any"],+ "move": "A hold that is never still: the camera pushes in 3 to 6 percent over the whole shot, so a quiet shot still changes every second.",+ "build": "Two Camera keys, zoom 1 to 1.04, ease \"linear\" for this one move only: an eased drift stops at both ends and the stop is the dead air.",+ "not": "A shot with a lot of its own motion. Two moves at once fight." },+ { "id": "cam-parallax-travel", "cat": "camera", "role": "workhorse", "energy": "medium", "kinds": ["story", "loop", "explainer"],+ "move": "The camera travels sideways and depth does the work: near things swing wide, far things barely stir, and something crosses the lens in front of the subject.",+ "build": "One Camera, planes at z from -0.3 (across the glass) to 4 or more (camera.md, depth planes). Never a hand-set drift per layer.",+ "not": "A flat style whose point is the flatness (a print, a diagram)." },+ { "id": "cam-follow-with-lag", "cat": "camera", "role": "workhorse", "energy": "medium", "kinds": ["story", "loop", "interactive"],+ "move": "The camera follows a moving subject a little late: the subject pulls ahead when it accelerates and the frame catches up when it slows, so speed is felt.",+ "build": "A path camera: path: (f) => ({ look: subject(f - lag), zoom }) with lag of 0.1 to 0.2 s; lead room in front of the subject.",+ "not": "The subject must stay pinned for a read (a face, a label)." },+ { "id": "cam-impact-shake", "cat": "camera", "role": "accent", "energy": "high", "kinds": ["story", "launch", "loop"],+ "move": "One impact rings through the frame: full strength on the hit, gone within a beat, with a little rotation.",+ "build": "cam.shake({ from, to, amp, seed, rot }) in camera.ts; amp is screen px, 0.8 to 1.5 percent of the width.",+ "not": "More than two a film, or on anything that is not a real contact." },+ { "id": "cam-pull-back-reveal", "cat": "camera", "role": "accent", "energy": "calm", "kinds": ["story", "explainer", "launch"],+ "move": "The camera pulls back and the thing we were looking at turns out to be a small part of something larger.",+ "build": "Camera keys in log2 zoom, monoZoom: true, 1.5 to 3 s; the large thing is painted in the world from the start, never faded in at the end.",+ "not": "The larger thing adds nothing to the story. Then it is only a zoom out." },+ { "id": "cam-rack-of-attention", "cat": "camera", "role": "accent", "energy": "calm", "kinds": ["story", "explainer", "launch"],+ "move": "Attention moves from one thing to another in the same frame without the camera moving: the first dims and softens its edges, the second gains contrast and line weight.",+ "build": "Draw both from one emphasis value 0..1: stroke weight, saturation and value contrast (no ctx.filter, the contract forbids it).",+ "not": "The two things are in different places in the story. That is a seam." },+ { "id": "cam-whip-to-rest", "cat": "camera", "role": "accent", "energy": "high", "kinds": ["story", "launch"],+ "move": "A fast pan to a new subject inside one scene that decays to rest on it: the last third of the move is the slow part.",+ "build": "Camera key with ease \"out\" over 0.4 to 0.7 s; keep the peak under speedCeiling(W, fps) (seams.ts) and render with --blur auto.",+ "not": "Past the ceiling. Then cut on the beat instead." },++ { "id": "reveal-drawn-on", "cat": "reveal", "role": "signature", "energy": "any", "kinds": ["any"],+ "move": "The thing is drawn into the picture in the order a hand would make it, the tool visible, each stroke taking the time its length asks for.",+ "build": "kind: \"drawing\" and the style plate's own draw order (workflows/drawing-process.md).",+ "not": "A fade standing in for drawing. If it cannot be drawn on, it arrives some other honest way." },+ { "id": "reveal-from-behind", "cat": "reveal", "role": "workhorse", "energy": "any", "kinds": ["any"],+ "move": "A thing comes out from behind something already in the picture (a hill, a card's edge, another figure), so the picture supplies the mask.",+ "build": "Clip with the occluder's own outline (pathShape in morph.ts) and move the thing out from under it on a settling curve, 0.4 to 0.7 s.",+ "not": "A mask in mid-air with nothing drawn where its edge is." },+ { "id": "reveal-by-light", "cat": "reveal", "role": "accent", "energy": "calm", "kinds": ["story", "loop"],+ "move": "The scene is there from the first frame but dark; light arrives (a door, a sun, a lamp) and the subject is found by it.",+ "build": "Paint the lit and unlit values of every surface and mix them by distance from the light's edge as it moves.",+ "not": "A style with no light in it (flat vector, a diagram)." },+ { "id": "reveal-assemble", "cat": "reveal", "role": "accent", "energy": "medium", "kinds": ["explainer", "launch", "story"],+ "move": "Parts arrive from the back to the front, each held above the stack with a wide soft shadow that closes as it lands, 0.08 to 0.12 s apart.",+ "build": "paperCraft.ts is the worked example; no more than about seven parts in flight at once.",+ "not": "Parts that are not real parts of the subject." },+ { "id": "reveal-count-during", "cat": "reveal", "role": "workhorse", "energy": "medium", "kinds": ["explainer", "launch", "infographic"],+ "move": "A number changes while the thing it counts is changing, and stops on the frame the action stops. Never after.",+ "build": "Drive the digits and the action from the same progress value (productUI.ts counts values this way).",+ "not": "A figure that is not true of the data on screen." },++ { "id": "type-written", "cat": "type", "role": "workhorse", "energy": "any", "kinds": ["launch", "explainer", "infographic"],+ "move": "A line is written by its tool, one stroke after another, at the speed of a hand, and holds long enough to be read twice.",+ "build": "writeOn or sentence in kinetic.ts; on its own frame, or over a calm area that passes the poster test (workflows/launch-video.md, Type).",+ "not": "Over a face, the focal detail or busy texture. In doubt the line gets its own frame." },+ { "id": "type-one-line-at-a-time", "cat": "type", "role": "workhorse", "energy": "medium", "kinds": ["launch", "explainer"],+ "move": "One line hands over to the next word by word, so there is never more than one full line on screen: the old line's words leave at twice the pace they came.",+ "build": "sentence() in kinetic.ts for the arriving line; run the leaving line's word progress backwards at half the entry stagger; the new line's first word starts on a beat.",+ "not": "Lines that must be compared. Those stay together." },+ { "id": "type-names-the-thing", "cat": "type", "role": "accent", "energy": "calm", "kinds": ["explainer", "launch", "infographic"],+ "move": "A dot lands on one thing, a line is drawn out from it, a short label is written at its end; the dot follows the thing, the label holds still.",+ "build": "drawCallout in callout.ts, pinned with cam.toScreen; one or two on screen.",+ "not": "The picture is busy where the label would sit and a backing would cover something that matters." },+ { "id": "type-label-becomes-heading", "cat": "type", "role": "signature", "energy": "medium", "kinds": ["explainer", "launch"],+ "move": "A label on one scene travels across the seam and lands as the heading of the next, on that scene's first frame.",+ "build": "A callout with handoff (callout.ts); the next scene draws it with drawLabel at the same pose; checkHandoff holds it to 2 px.",+ "not": "The label's words are not what the next scene is about." },+ { "id": "type-underline-then-point", "cat": "type", "role": "accent", "energy": "medium", "kinds": ["launch", "explainer"],+ "move": "The one word that matters is underlined by hand after the line has landed, 0.25 s, on a beat. Underlined, never struck through.",+ "build": "caption(..., \"underline\") in kinetic.ts, started when the line's progress reaches 1.",+ "not": "More than one word a line, or more than twice a film." },++ { "id": "act-anticipate", "cat": "acting", "role": "workhorse", "energy": "any", "kinds": ["story", "loop", "launch"],+ "move": "Before any large action the body goes the other way first: a crouch before a jump, a draw back before a throw, 0.15 to 0.3 s, a quarter of the action's size.",+ "build": "A held pose keyed before the action and blended through (a rig's mix between poses); bones keep their length (anatomy.md).",+ "not": "A machine, or a move meant to startle." },+ { "id": "act-follow-through", "cat": "acting", "role": "workhorse", "energy": "any", "kinds": ["story", "loop"],+ "move": "Loose parts arrive late and go further: a tail, hair, a sleeve follow the body by 0.05 to 0.1 s a segment, each segment wider than the one before.",+ "build": "Sample the driving angle at f - lag * i down the chain and scale its swing by 1 + 0.15 to 0.2 * i.",+ "not": "A stiff material. Wood and metal do not whip." },+ { "id": "act-settle", "cat": "acting", "role": "workhorse", "energy": "any", "kinds": ["any"],+ "move": "Nothing stops dead. A thing that lands goes a little past, comes back, and is at rest by 0.3 to 0.5 s; weight decides how far past.",+ "build": "One overshoot of 4 to 8 percent then a decay on easeOut; heavier things overshoot less and take longer.",+ "not": "Type meant to be read while it lands, and anything in a clean set register that should simply arrive." },+ { "id": "act-head-stays", "cat": "acting", "role": "accent", "energy": "high", "kinds": ["story", "loop"],+ "move": "In a run the body works hard and the head rides level: the eyes stay on one line while the spine folds and opens under them.",+ "build": "Solve the neck last, to a head height that does not follow the body (hold the head to a few px through a stride).",+ "not": "A bounce that is the joke (a toy, a rubber-hose character)." },+ { "id": "act-blink-and-breathe", "cat": "acting", "role": "workhorse", "energy": "calm", "kinds": ["story", "loop", "launch"],+ "move": "A character at rest is alive: the chest rises over 3 to 4 s, a blink of 0.1 to 0.15 s every few seconds at uneven gaps, an ear or a tail answers a sound.",+ "build": "Periodic over the loop length so the seam closes; blink times from rng(seed), never a fixed interval.",+ "not": "A portrait whose stillness is the point." },++ { "id": "emph-contact", "cat": "emphasis", "role": "accent", "energy": "high", "kinds": ["story", "loop", "launch"],+ "move": "A contact is shown where it happens: dust, a splash or a compressed shadow on the frame of the hit, clearing over 0.4 to 0.8 s.",+ "build": "Seeded particles born on the contact frame from the contact point; the sound effect cued to the same frame (music/sound-design.md).",+ "not": "A touch with no force in it." },+ { "id": "emph-world-answers", "cat": "emphasis", "role": "accent", "energy": "medium", "kinds": ["story", "loop"],+ "move": "The subject's action moves something else in the scene a moment later: grass bends in the wake, birds lift, water rings spread.",+ "build": "Drive the secondary thing from the primary's position at f - delay, falling off with distance.",+ "not": "A reaction that draws the eye off the subject at the moment that matters." },+ { "id": "emph-hold-the-result", "cat": "emphasis", "role": "workhorse", "energy": "calm", "kinds": ["any"],+ "move": "After the biggest change in the film the result is held, alive but unbroken, for 1 to 2 s before anything else happens.",+ "build": "A hold in the cue table after the payoff with only breathing motion in it (cam-slow-push, act-blink-and-breathe).",+ "not": "A loop under 6 s, where the hold would be most of it." },++ { "id": "close-returns-to-open", "cat": "close", "role": "signature", "energy": "any", "kinds": ["story", "loop", "launch"],+ "move": "The last frame is the first frame, earned: the film ends where it began and the viewer now knows what it means.",+ "build": "Draw the closing shot from the opening shot's own function at the same frame; for a loop, verify-export.mjs --loop holds the last frame to frame 0.",+ "not": "A film whose point is that things changed for good." },+ { "id": "close-subtract", "cat": "close", "role": "workhorse", "energy": "calm", "kinds": ["any"],+ "move": "The ending takes things away: motion slows, parts leave, the music stops on a bar line, a breath of near silence, then one soft sound on the last picture.",+ "build": "A section with fewer parts and no low drum, then one resolved note; music.mjs check prints the ARC line, which flags an ending that out-shouts the film.",+ "not": "A sting of a few seconds, which is all ending." },+ { "id": "close-mark-from-actor", "cat": "close", "role": "accent", "energy": "medium", "kinds": ["launch", "explainer"],+ "move": "The thing that travelled through the film lands as part of the mark, and the end card opens from it.",+ "build": "handoff (morph.ts) from the actor's last shape to the mark's shape; the wordmark written after it lands (logo in kinetic.ts).",+ "not": "A mark the actor does not resemble in any way." }+ ]+}diff --git a/skills/anidoodle/references/motion-grammar.md b/skills/anidoodle/references/motion-grammar.mdindex dfb74c4..cea8c67 100644--- a/skills/anidoodle/references/motion-grammar.md+++ b/skills/anidoodle/references/motion-grammar.md@@ -130,6 +130,51 @@ with the incoming scene already complete underneath. `transitionsDemo.ts` showsdefault, never repeated quickly: declare a film's flashes to `checkFlashes`, which throws onany two within half a second.+## Cuts that carry motion++A hard cut between two shots that are both moving can be the smoothest seam there is, or the+roughest. The difference is arithmetic, and `engine/src/canvas-core/seams.ts` does it.++- **Both sides at rest, or both at one speed.** A cut from a moving shot to a still one (or the+ other way) reads as a jerk. So does a cut where the travel turns, halves or doubles.+- **Accelerate out, cut on the fastest frame, arrive and settle.** The outgoing shot speeds up+ over about 0.2 to 0.4 s; the incoming shot opens at that same speed, in that same screen+ direction, and comes to rest over 0.8 to 1.4 s. The exit is the short side.+ `matchedMove({ dir, exitDist, exitF, entryF })` gives both halves, to add to each scene's+ camera look; the entry distance is worked out from the exit speed, so the two always agree.+- **Through the cut, in depth.** `matchedZoom({ push, exitF, entryF })` does the same for a+ camera that flies into one shot and out in the next. A zoom is a ratio, so both sides run in+ log space and grow at the same rate per frame across the cut. The incoming shot opens at+ about two thirds of its size, so its scene must be painted wider than the frame.+- **There is a top speed.** Past about two and a half frame widths a second+ (`speedCeiling(W, fps)`), blur stops reading as motion and shows as a streak with stepped+ copies. A move that needs more than that wants a shorter travel with the rest hidden behind+ the cut, or a plain cut on the beat. Render fast seams with `--blur auto`.+- **Match everything, once.** Whatever crosses the cut keeps its position, size, colour and+ edge; a property that flips on the cut frame pops. And the resting pose is shown once: if one+ shot settles onto a pose and the next opens on it, the first shot's last frame is the move's+ last in-between, never the pose itself, or the film stops, holds and goes.+- **Never dissolve two copies of one thing.** At the halfway point both are half there and the+ eye sees a ghost. Move one object; change what it is at the middle of its trip.++`checkSeam(velocity before, velocity after, { W, fps })` returns what is wrong with a cut, or+nothing. `checkSeamPlan` reads the film's list of seams and flags a designed seam used a third+time; plain and matched cuts are exempt, and the film's one signature move gets three (the open,+the middle, the close). Use this when both scenes have room to travel the same way. When they do+not, bring both to rest and cut on a beat.++## Dealing a hand++Left to choose, every film reaches for the same three moves. `node tools/deck.mjs deal --kind+story --energy high --seconds 27` deals a hand from `references/motion-deck.json`: an opening, a+close and a spread of seams, camera moves, reveals and acting notes, each with its numbers, its+engine call and when not to use it. The deal is weighted toward what fits the film and is+repeatable from its printed seed; `--avoid` keeps the next film off the last one's cards.++A card is a prompt, never an order. Keep it, adapt it to this film's subject and medium, or drop+it, and say which in the brief. The default at the top of this page still holds: a card whose+"not when" applies is dropped, and the gentle move takes its place.+## Callouts and the label handoff`engine/src/canvas-core/callout.ts` names one thing in the picture: a dot lands on it, a leaderdiff --git a/skills/anidoodle/references/music/README.md b/skills/anidoodle/references/music/README.mdindex 5f73446..ddca2be 100644--- a/skills/anidoodle/references/music/README.md+++ b/skills/anidoodle/references/music/README.md@@ -314,6 +314,7 @@ Follow [`compose.md`](compose.md). In short:2. one style + one mood + five mood controls;3. compose YOUR harmony, bass lines, motif(s), groove choice and form as `Material`;4. `node tools/music.mjs check <file>.ts#<export>` must PASS (key, master, ghost/reverb/masking guards, stems, novelty);+ answer its ARC line too (the shape of the whole: [`theory/form.md`](theory/form.md), section 3);5. `node tools/music.mjs render <file>.ts#<export> out.wav` (use wav for loops: mp3 is not gapless);6. 8 seconds (then the whole piece) to a human, as an mp3 on a page.diff --git a/skills/anidoodle/references/music/theory/form.md b/skills/anidoodle/references/music/theory/form.mdindex 3fdd779..7baaab0 100644--- a/skills/anidoodle/references/music/theory/form.md+++ b/skills/anidoodle/references/music/theory/form.md@@ -54,6 +54,29 @@ Working film composers structure a cue around **hit points**: the frames where s- a fade only for loops;- an open hold only for suspense.+### The shape of the whole, measured++A score can have a good tune, good harmony and a clean mix and still feel like it wanders, because+nothing in it is the high point and nothing in it is the rest. `music.mjs check` prints an **ARC** line+from the finished sound (`arc.ts`): the usual level, the loudest moment and how far through it falls,+how far the opening sits under the body, and how far the ending sits under the peak. It is advisory,+like `craft`: answer each finding, or say why the piece is that way on purpose.++- **A soft way in.** The first two or three seconds carry fewer parts and no low drum, 5 to 12 LU under+ the body. Frame 0 still has one sound with a reason: a drone, the first chord. Silence that swells+ in over a bar reads as nothing happening yet.+- **One loudest moment, on the picture's payoff.** At least 2 LU over the usual level, usually a third+ to two thirds of the way through. Pass the payoff's second (`--payoff 13.5`) and the check says if+ the fullest bar is somewhere else. Hold something back until then: the low drum, the top octave, a+ doubling.+- **Contrast is the arc.** A piece of 20 s or more wants a loudness range of 5 to 8 LU. One texture+ from start to finish measures about 2 and feels dense and flat however good each bar is.+- **The ending takes away.** The close is the most resolved moment, never the loudest: stop on a bar+ line, a breath, one soft element, 8 to 20 dB under the peak. A loudest moment in the last fifth is+ flagged.+- **A loop has no beginning or end.** Only its contrast and its seam are read: the last second and the+ first must sit within 3 LU, or the join is heard every time it comes round.+## 4. Orchestration: registers and frequency slotsEvery instrument owns a register. Two parts in the same register fight (masking, seediff --git a/skills/anidoodle/references/workflows/review.md b/skills/anidoodle/references/workflows/review.mdnew file mode 100644index 0000000..d2d8629--- /dev/null+++ b/skills/anidoodle/references/workflows/review.md@@ -0,0 +1,85 @@+# The review: four readings, one list, one gate++`working-method.md` says to review the whole film once, from the rendered file. This is how that+one review is run. It does not add rounds: four readings of the same frozen file, one ranked fix+list, one rebuild, one check that each fix landed.++The reason for four readings is that one reader looks for one kind of fault. Someone checking+for a popped frame does not notice that the film has no point, and someone following the story+forgives a hand with six fingers. Each reading below has one job, its own evidence and the+dimensions it scores. Do them in this order, and finish one before starting the next.++Freeze a copy of the file and note its hash first. Every reading is of that copy.++## The four readings++| Reading | Looks at | Its question | Scores |+|---|---|---|---|+| **Director** | the contact sheet at one tile per beat, sound off; then each seam as a before/after pair | Would someone who has never seen the brief say what this film is about, and feel the payoff? | point, first second, pacing, seams |+| **Illustrator** | full-size stills of the hardest frames; crops of faces, hands, feet and joins at `--scale 2` | Would a proud illustrator sign this, or is it shapes assembled (`craft-bar.md`)? | drawing, style |+| **Motion and finish** | `popscan.mjs`, `gate.mjs`, strips of consecutive frames across every seam and every fast move | Does anything pop, stall, jump or smear that was not meant to? | motion, finish |+| **Sound and sync** | `music.mjs check` (with its ARC line), `verify-export.mjs`, the cue table against the picture | Is the sound one piece with a shape, and does it land on the picture? | sound |++Rules that make a reading worth having:++- **Evidence before opinion.** Every finding names a frame (or a second, for sound) and a cause.+ "The run feels slow" is an impression; "the ground travels 22 px a frame at 400 while her+ stride covers 60" is a finding.+- **Say what works first**, so it survives the fixes.+- **A picture that does not read is fixed in the picture.** Never by adding a caption.+- **The sound reading cannot hear.** Its findings are measurements; say so, and a human listens+ before the film ships.+- **A fresh reader is worth more than a second pass by the builder.** When a reading is handed+ to someone else, give them the file and the brief, never your own conclusions.++## Severity++| Level | Meaning | Examples |+|---|---|---|+| **P0** | seen on a key moment (the first second, the payoff, the last frame), or it breaks the story, a fact or the contract | the character changes between two shots; the payoff lands 3 frames off its sound; a frame differs between two renders |+| **P1** | noticed on a normal viewing | a one-frame pop mid-scene; two seconds where nothing changes; a seam where the travel reverses |+| **P2** | seen only on pause | a stroke a pixel short for three frames inside a fast move |++## The check before fixing++Before anything is changed, every P0 and P1 is looked at once more, at full size, by someone+trying to prove it wrong: is it on the frame named, is it what the finding says, would a viewer+see it. Some first-pass findings do not survive this, and each one that is "fixed" anyway+costs a rebuild and risks something that worked. What survives goes on the list, ranked by how+much the film gains for the time the fix takes.++## The scorecard++Score each line 1 to 5. The descriptions are for 1, 3 and 5. Where two readings disagree, the+lower score stands. A line with an open P0 cannot score above 3.++| | 1 | 3 | 5 |+|---|---|---|---|+| **Point** | a tour of nice things | one idea, but it drops out for a stretch | one idea that reads with the sound off, and something set up early that pays off |+| **First second** | a still or empty frame | moving, but the subject arrives late | frame 0 composed and already in motion; the subject known within a second |+| **Drawing** | subjects built from ellipses; rubber joints | sound, with weak hands, feet or joins | anatomy from named reference; survives a crop at twice the size |+| **Style** | one look recoloured | the medium's marks, used unevenly | the marks, the edge and the order of making all belong to the medium |+| **Motion** | everything fades and slides at one speed | good curves, with a pop or a stall | weight, anticipation, things that settle; nothing stops dead |+| **Seams** | dissolves between unrelated pictures | motivated, but one repeated until it is a preset | something carried across every seam; no designed seam used a third time (`checkSeamPlan`) |+| **Pacing** | dead holds, or everything at once | even, with no high point | one high point, calm either side of it, results held long enough to land |+| **Sound** | out of step with the picture, or wandering | in step, but flat or crowded | every cue on its frame, one clear loudest moment on the payoff, an ending that takes away |+| **Finish** | pops, banding, a frame that differs between renders | an explained flaw or two | gate and export checks pass; every flag from the scans answered |++A silent piece leaves Sound out. A still is scored on Point, Drawing, Style and Finish.++## The gate++The film ships when all of these hold:++- every line is 3 or more, Finish is 5, and the average is 4 or more;+- no P0 is open;+- `gate.mjs` and `verify-export.mjs` pass, and for a scored film `music.mjs check` passes and a+ human has listened.++After the rebuild, go down the fix list item by item against the new file and mark each one+**fixed**, **partly** or **still there**, with the frame looked at. Nothing is marked fixed from+the code alone.++Then say the scores to the person who asked, in plain words, with the one or two things you+would still change. "This is a 4 on Seams, because the brush wipe is used three times" is worth+more to them than "done".diff --git a/skills/anidoodle/references/working-method.md b/skills/anidoodle/references/working-method.mdindex f505bc8..e9f0de4 100644--- a/skills/anidoodle/references/working-method.md+++ b/skills/anidoodle/references/working-method.md@@ -13,7 +13,7 @@- **Critique it yourself first**, in writing, against the craft table, and say what is still wrong when you show it.- ✋ One approval.- **Then build end to end without stopping.** A rough complete film on day one beats a perfect first act. Mechanical checks run continuously and need nobody's approval: types, grid, contract scan, draw budget, determinism probe, dead air.-- **Review the whole, once.** From the rendered file itself: a contact sheet at one tile per beat, each cut as a before/after pair with a difference measure, the dead-air numbers, a few full-resolution frames where the sheet raises a doubt. One numbered fix list, ranked. One rebuild.+- **Review the whole, once.** From the rendered file itself: a contact sheet at one tile per beat, each cut as a before/after pair with a difference measure, the dead-air numbers, a few full-resolution frames where the sheet raises a doubt. One numbered fix list, ranked. One rebuild. How that one review is run (four readings, a scorecard, the gate): `workflows/review.md`.- **Approval is a budget.** Each gate spends the client's attention and your tokens. Spend them where being wrong is expensive, which is the look, the music sample and the final film. Three, not thirty.**What a good review looks like** (this part of the over-gated process was worth keeping): freeze a copy of the file and note its hash before looking, because the builder may be re-rendering under you (it was, twice). Report what works first, so it survives the fixes. Give causes, not impressions: not "the body is green" but "the sun disc prints over the thorax, blue times yellow". Correct your own spec in the same breath when the fault was yours (a 5-frame wing lag that I specified became antiphase on a 10-frame beat: one wing folded while the other was spread).