Compare commits

...
2 Commits
Author SHA1 Message Date
shinyobjectz 98362a472c skills: raea goal seen's frames at full size and --look (raea-skills #148) 2026-12-01 05:49:43 -08:00
shinyobjectz ccd9010b41 raea goal seen judges a video's design at full size, with clef as a second opinion; a project's design is the agent's own within the brand's colours
A contact sheet's tiles show what happens in a cut, never whether its type, captions and cards look good, and it was
the only picture an agent looked at before sign-off. raea goal seen FILE now also writes six frames at full size
(FILE.looks/) and the seen pack holds a video until --look says how its design stands beside a reference. On raea
cloud it prints clef's grades of the whole cut, picture and sound, lowest first, as a second opinion.
A project's AGENTS.md no longer says "never a colour, font or size of your own": the brand's colours and faces are
the palette, and size, weight, shape, layout and motion are designed for the piece.
2026-12-01 05:44:35 -08:00
13 changed files with 144 additions and 27 deletions

No files matched your search

+4
View File
@@ -456,6 +456,10 @@ Feature: Goal: the loop every piece of work runs, one goal or a workflow of them
And the seen pack holds it until its contact sheet has been shown since its last render (FILE.seen.json: the
render's time and size, what the agent said it sees and would change, at least 80 characters), and the
surprise pack, when on, until it names its moment in seconds and what it is
And it holds a video until its design is judged too, on its frames at full size (FILE.looks/, six through the
cut, made by `raea goal seen FILE`): `--look "..."`, at least 80 characters on its type, captions, cards and
end beside a reference and what was changed, since a sheet's tiles show what happens and never how it looks
(12-01, Shane on Dutch: "why do components not look good. is it even proofing or reviewing the work?")
And on a Mac the same packs hold through `raea goal seen FILE` (the sheet, shown in the raea app with
`raea show`) and `raea goal seen FILE "WHAT I SEE AND WOULD CHANGE"`, which write FILE.seen.json; raea cloud's
publish tool writes it through the same command
+5 -4
View File
@@ -33,7 +33,7 @@ The packs, and what each holds:
| `place` | cut | no text over a face, a person or what the shot is about where a clear place of its size exists |
| `floor` | cut, floor | no clipped text, low contrast, freeze, flash or loudness out of range |
| `stills` | every kind, floor | a composition's three stills as it's saved: no clipped or cramped text, nothing out of the safe areas |
| `seen` | cut, floor | its contact sheet looked at since its last render (`raea goal seen FILE`, then `raea goal seen FILE "..."`) |
| `seen` | cut, floor | its contact sheet and its frames at full size looked at since its last render (`raea goal seen FILE`, then `raea goal seen FILE "..." --look "..."`) |
| `surprise` | when a brief turns it on | one earned surprise named with its moment in seconds |
| `naming` | cut | every video and still named client_concept_variant_v#_size |
| `sizes` | cut | one size first: no other size before a person approves the first |
@@ -80,7 +80,7 @@ export default brief({
```sh
raea goal check # done: everything, as the Stop hook runs it
raea goal check out/cuts/acme_dog_hook1_v2_9x16.mp4 --at render
raea goal seen out/cuts/acme_dog_hook1_v2_9x16.mp4 && raea goal seen out/cuts/acme_dog_hook1_v2_9x16.mp4 "..."
raea goal seen out/cuts/acme_dog_hook1_v2_9x16.mp4 && raea goal seen out/cuts/acme_dog_hook1_v2_9x16.mp4 "..." --look "..."
raea goal tasks --json # the brief's plan, every task
raea goal next
```
@@ -97,7 +97,7 @@ goal's rules are never copied into the plan: the plan is the work, the goal is w
```sh
raea goal check [FILE...] [--at edit|render|publish|done] [--goal NAME] [--only ID,...] [--manifest render.json] [--json] (every rule each goal of brief.ts is held to at that moment: its kind's packs, its rules and its own checks; with no goal, the floor; every project is also held to `registered`, every raea file reached from brief.ts; review/goal.json; exit 1 on an error. The hook runs it at every save (edit) and stop (done), a render at its end, raea cloud at publish)
raea goal tasks [DIR] [--json] | raea goal tasks [DIR] --apply EDITS.json|- | raea goal tasks [DIR] --put PUT.json|- (the brief's plan as the brief's run gives it: open tasks by id, or all as JSON; --apply writes edits by task id back where each task is written, refusing one made by code; a project with no plan gets plan.ts, imported by brief.ts; --put {plan, base} writes the whole plan back only while the brief's is still base)
raea goal seen FILE ["what you see and would change"] [--surprise "SECONDS s: what it is"] (FILE's contact sheet beside it, to look at every frame; with words, what was seen of FILE as it is now)
raea goal seen FILE ["what you see and would change" --look "its design at full size, beside a reference"] [--surprise "SECONDS s: what it is"] (FILE's contact sheet beside it, and its frames at full size in FILE.looks/, to look at; with words, what was seen of FILE as it is now, and --look how a video's type, captions and cards look at full size)
raea goal judge [--goal NAME] [--by claude|kimi|clef] (a goal's `says` rules judged by a fresh critic that only reads; review/judge/NAME.json. clef watches and hears the files a rule names, else the videos under out/, paid as `raea ask` is: the critic where RAEA_AGENT_KEY is set, as on raea cloud, else claude)
raea goal next [DIR] (the two or three useful next steps for the project, from its brief, its goals, compositions, renders and checks)
raea goal gates [DIR] [--goal NAME] --json (a scene, kit or shot goal's record and critic gates, as raea/goal's packs read them)
@@ -111,9 +111,10 @@ Headless: it needs nothing running and opens no window. Takes any number of argu
| --- | --- | --- |
| `--apply` | `EDITS.json\|-` | plan edits (JSON, `-` for stdin), each written where its task is written |
| `--at` | `edit\|render\|publish\|done` | The moment `check` runs the rules of (default `done`); for `place`, the seconds to read (`S[,S...]`). |
| `--by` | `claude\|kimi` | The critic `judge` asks, a fresh session that may only read (default `claude`). |
| `--by` | `claude\|kimi\|clef` | The critic `judge` asks, a fresh session that may only read (default `claude`). |
| `--goal` | `NAME` | only this goal of the brief's (by its name) |
| `--json` | – | `check`: print the report (review/goal.json's shape). `gates`: the record and critic gates as JSON. |
| `--look` | `"its design` | `seen`: a video's design judged on its frames at full size (FILE.looks/): its type, captions, cards and end beside a reference, and what was changed. |
| `--manifest` | `render.json` | the render's manifest, for the sound pack's takes and effects |
| `--only` | `ID,...` | `check`: only these checks. Otherwise only these objects (refs, gen, pick-sheet, prep) or shots (framing), by id or name. |
| `--put` | `PUT.json\|-` | `{plan, base}`: the whole plan written back only while the brief's is still `base` |
+1 -1
View File
@@ -14,7 +14,7 @@ pub const GOAL_TS: &[&str] = &["check", "tasks", "seen", "judge"];
/// The goal verbs' usage, under the help's (usage.rs reads each verb's flags from it).
pub const GOAL_USAGE: &str = "raea goal check [FILE...] [--at edit|render|publish|done] [--goal NAME] [--only ID,...] [--manifest render.json] [--json] (every rule each goal of brief.ts is held to at that moment: its kind's packs, its rules and its own checks; with no goal, the floor; every project is also held to `registered`, every raea file reached from brief.ts; review/goal.json; exit 1 on an error. The hook runs it at every save (edit) and stop (done), a render at its end, raea cloud at publish)
raea goal tasks [DIR] [--json] | raea goal tasks [DIR] --apply EDITS.json|- | raea goal tasks [DIR] --put PUT.json|- (the brief's plan as the brief's run gives it: open tasks by id, or all as JSON; --apply writes edits by task id back where each task is written, refusing one made by code; a project with no plan gets plan.ts, imported by brief.ts; --put {plan, base} writes the whole plan back only while the brief's is still base)
raea goal seen FILE [\"what you see and would change\"] [--surprise \"SECONDS s: what it is\"] (FILE's contact sheet beside it, to look at every frame; with words, what was seen of FILE as it is now)
raea goal seen FILE [\"what you see and would change\" --look \"its design at full size, beside a reference\"] [--surprise \"SECONDS s: what it is\"] (FILE's contact sheet beside it, and its frames at full size in FILE.looks/, to look at; with words, what was seen of FILE as it is now, and --look how a video's type, captions and cards look at full size)
raea goal judge [--goal NAME] [--by claude|kimi|clef] (a goal's `says` rules judged by a fresh critic that only reads; review/judge/NAME.json. clef watches and hears the files a rule names, else the videos under out/, paid as `raea ask` is: the critic where RAEA_AGENT_KEY is set, as on raea cloud, else claude)
raea goal next [DIR] (the two or three useful next steps for the project, from its brief, its goals, compositions, renders and checks)";
+8 -5
View File
@@ -80,11 +80,14 @@ A video edit as a React + TypeScript project, rendered by raea.
- cuts.ts: the clips (\`raea cut\` writes it, with cuts.json and words.json beside it; re-run it rather than editing
by hand, or captions and checks lose their timing). components/: components you added (\`raea make component add\`), yours to change.
- brand/brand.css: the brand's tokens (\`raea brand DOMAIN\` reads them from the brand's site). edit.tsx loads them with the project's
Tailwind: \`<style>{css}</style>\`, css from "./styles.gen" (raea render writes it). Style only with the brand
classes: colour text-brand-accent, bg-brand-accent, bg-brand-surface (bg-brand-bg), text-brand-on-surface,
text-brand-on-accent, text-brand-ink, brand-1/2/3; face font-brand, font-brand-body; size text-display,
text-title, text-caption, text-body, text-label (scaled for a 1080-wide frame); corners rounded-brand. Where a
class can't reach, the --brand-* variables. Never a colour, font or size of your own.
Tailwind: \`<style>{css}</style>\`, css from "./styles.gen" (raea render writes it). The brand's colours and
faces are the palette, as classes: colour text-brand-accent, bg-brand-accent, bg-brand-surface (bg-brand-bg),
text-brand-on-surface, text-brand-on-accent, text-brand-ink, brand-1/2/3; face font-brand, font-brand-body (where
the brand's face is missing, install a free face close to it, never a system fallback); the --brand-* variables
where a class can't reach. Never a colour from outside the brand. The design is yours: size, weight, shape, layout
and motion are chosen for this piece, against how the brand's own best work looks, not from a default. The sizes
text-display, text-title, text-caption, text-body, text-label (scaled for a 1080-wide frame) and rounded-brand are
a start, not a limit.
- \`raea render edit.tsx -o final.mp4 --manifest render.json\`, then \`raea check final.mp4 --manifest render.json
--words words.json --perception perception.json\` says what's wrong; \`raea render edit.tsx --at 105 -o stills/\`
gives frame 105 to look at. \`raea guide\` has the craft (\`raea guide motion\` for writing the TSX);
+1 -1
View File
@@ -36,7 +36,7 @@ export const PACKS = {
frames: "no face cut by the frame or a split screen's seam, no text too small to read",
montage: "each cut's pace kept to its beats, and eye trace, screen direction and tone kept across its cuts",
place: "no text over a face, hands or what the shot is about where a clear place of its size exists",
seen: "its contact sheet looked at since its last render, and what was seen and would change said",
seen: "its contact sheet and its frames at full size looked at since its last render, and what was seen, how it looks and what would change said",
surprise: "one earned surprise, named with its moment in seconds",
naming: "files named client_concept_variant_v#_size",
sizes: "one size first: no other size before the first is approved",
+2 -2
View File
@@ -17,8 +17,8 @@ export type Clip = { key?: string; from: number; to: number; src: string; at: nu
export type ManifestText = { text: string; box?: number[]; ink?: number[]; opacity?: number; size?: number }
/** `raea render --manifest`: the frames with their texts, and the sound's clips */
export type Manifest = { width?: number; height?: number; fps?: number; length?: number; frames?: { frame: number; text?: ManifestText[] }[]; sounds?: { fps?: number; clips?: Clip[] } }
/** what was seen of a file and said (FILE.seen.json, `raea goal seen`) */
export type Seen = { video: string; render: string; seen: string; surprise?: string; at?: string }
/** what was seen of a file and said (FILE.seen.json, `raea goal seen`); `look` is its design judged at full size */
export type Seen = { video: string; render: string; seen: string; look?: string; surprise?: string; at?: string }
export interface FileFacts {
/** as the project names it (relative to its folder) */
+21 -1
View File
@@ -3,7 +3,7 @@
// large-v3; POST /v1/scene, people, faces, things and words in the shot); elsewhere raea's own `raea words` hears, and a
// need nothing here can meet throws `Unmet`, which makes its check wait and say why, as a render need does.
import { spawnSync } from "node:child_process"
import { existsSync, mkdtempSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs"
import { existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs"
import os from "node:os"
import path from "node:path"
import type { Scene } from "./packs/place.ts"
@@ -252,3 +252,23 @@ export function sheet(file: string): string {
if (r.status !== 0 || !existsSync(out)) throw new Unmet(`couldn't make ${path.basename(file)}'s contact sheet: ${(r.stderr || r.stdout || "").trim().slice(-200)}`)
return out
}
/** how many full-size frames a look is made of */
export const LOOKS = 6
/** a video's frames at full size beside it (FILE.looks/1.jpg ...), made again when older than the video. Type, cards
* and captions are judged on these: a contact sheet's tiles are too small to judge design on (12-01, Shane on Dutch:
* "why do components not look good. is it even proofing or reviewing the work?") */
export function looks(file: string): string[] {
const dir = `${stem(file)}.looks`
const out = Array.from({ length: LOOKS }, (_, i) => path.join(dir, `${i + 1}.jpg`))
if (out.every((p) => changed(p) >= changed(file))) return out
const d = seconds(file)
if (!d) throw new Unmet(`couldn't read ${path.basename(file)}'s length for its full-size frames`)
mkdirSync(dir, { recursive: true })
out.forEach((p, i) => ffmpeg(["-v", "error", "-y", "-ss", ((d * (i + 0.5)) / LOOKS).toFixed(2), "-i", file, "-frames:v", "1", "-q:v", "3", p]))
return out
}
/** whether FILE's full-size frames were made since it last changed */
export const looksFresh = (file: string) => Array.from({ length: LOOKS }, (_, i) => path.join(`${stem(file)}.looks`, `${i + 1}.jpg`)).every((p) => changed(p) >= changed(file))
+43 -2
View File
@@ -2,26 +2,35 @@
// at video clips"; "a way of prompting the agent to go above and beyond by adding little surprises").
// seen a video made here has been looked at since its last render: `raea goal seen FILE` makes its contact
// sheet and shows it, and `raea goal seen FILE "what I see and would change"` says what was seen. Both
// are tied to the file as it is now (its time and size): a render after it needs a new look.
// are tied to the file as it is now (its time and size): a render after it needs a new look. A video's
// design is judged apart, on its frames at full size (`--look "..."`): a sheet's tiles show what
// happens, never whether the type, captions and cards look good (12-01, Shane on Dutch).
// surprise (off unless the brief turns it on) the look names the cut's one earned surprise with its moment in
// seconds: `raea goal seen FILE "..." --surprise "12.5 s: the dog barks on the punchline"`.
import { spawnSync } from "node:child_process"
import { readFileSync, statSync, writeFileSync } from "node:fs"
import path from "node:path"
import { check, found } from "raea/check"
import type { FileFacts } from "../facts.ts"
import { RAEA, stem } from "../media.ts"
import { bookkeeping } from "./naming.ts"
/** the least a look says: what's in it and what would change, not "looks good" */
export const SEEN_LEAST = 80
const MOMENT = /\b\d+(\.\d+)?\s*s\b/
/** a look that says nothing of the design at full size (a sheet's tiles can't show it) */
export const unjudged = (s: { look?: string }) => (s.look?.trim().length ?? 0) < SEEN_LEAST
const looked = (f: FileFacts) => f.made && f.kind === "video" && !bookkeeping(f.path)
export const seenPack = check<FileFacts>({ id: "seen", text: "its contact sheet looked at since its last render, and what was seen and would change said", over: "file", at: ["publish", "done"], needs: "sheet" }, async (f) => {
export const seenPack = check<FileFacts>({ id: "seen", text: "its contact sheet and its frames at full size looked at since its last render, and what was seen, how it looks and what would change said", over: "file", at: ["publish", "done"], needs: "sheet" }, async (f) => {
if (!looked(f)) return
const s = f.seen()
const name = path.basename(f.path)
if (!s) return found({ says: `${name} hasn't been looked at since its last render`, fix: `raea goal seen ${f.path}, look at every frame of the sheet, then raea goal seen ${f.path} "what you see and would change"` })
if (s.seen.trim().length < SEEN_LEAST) found({ says: `what was seen of ${name} is ${s.seen.trim().length} characters: say what's in it, frame by frame, and what you'd change (${SEEN_LEAST} at least)`, fix: `raea goal seen ${f.path} "..."` })
if (unjudged(s)) found({ says: `${name}'s design isn't judged at full size: its type, captions, cards and end, beside a reference ad's frame (${SEEN_LEAST} characters at least)`, fix: `raea goal seen ${f.path}, open each full-size frame beside a reference's, then raea goal seen ${f.path} "..." --look "how it looks beside the reference and what you changed"` })
})
export const surprisePack = check<FileFacts>({ id: "surprise", text: "one earned surprise, named with its moment in seconds", over: "file", at: ["publish", "done"] }, async (f) => {
@@ -30,3 +39,35 @@ export const surprisePack = check<FileFacts>({ id: "surprise", text: "one earned
if (!s) return
if (!s.surprise?.trim() || !MOMENT.test(s.surprise)) found({ says: `${path.basename(f.path)}'s surprise isn't named with its moment ("12.5 s: the dog barks on the punchline")`, fix: `raea goal seen ${f.path} "..." --surprise "SECONDS s: what it is"` })
})
/** what the second opinion is asked of a whole cut, picture and sound (`raea ask`, clef-omni) */
export const SECOND = [
"Do the on-screen graphics (captions, cards, badges, the end card) look designed for this brand, at the level of a professionally produced social ad, rather than plain boxes of text?",
"Is every word that matters large, sharp against what is behind it, and on long enough to read?",
"Is the voice clear over everything else, with music and effects marking moments rather than filling space?",
"In the first two seconds, is there a picture, a word or a sound that would make this audience stop?",
"Is the frame free of clutter throughout: never more than two separate text boxes at once, and no text over a person?",
]
type Opinion = { says?: string; value?: number }
/** a second opinion on a cut, from clef watching and hearing all of it (12-01, Shane: "the agent itself should be
* watching and revising itself always and use clef omni as a secondary opinion or catch all"): each question's grade,
* lowest first, kept beside the file (FILE.second.json) for the file as it is now. It's an opinion, never the look:
* on 12-01 it graded Dutch's plain boxes "strong". Null where it couldn't be asked. */
export function second(file: string, ask = askSecond): string | null {
const [st, kept] = [statSync(file), `${stem(file)}.second.json`]
const stamp = `${Math.round(st.mtimeMs)} ${st.size}`
try {
const k = JSON.parse(readFileSync(kept, "utf8")) as { render: string; says: string }
if (k.render === stamp) return k.says
} catch {}
const got = ask(file)
if (got.length !== SECOND.length) return null
const says = got.map((o, i) => ({ q: SECOND[i], says: o.says ?? "no answer", value: o.value ?? 0 })).sort((a, b) => a.value - b.value).map((o) => ` ${o.says}: ${o.q}`).join("\n")
writeFileSync(kept, `${JSON.stringify({ render: stamp, says }, null, 1)}\n`)
return says
}
function askSecond(file: string): Opinion[] {
const r = spawnSync(RAEA, ["ask", file, ...SECOND, "--grade", "--json", "--brief", "none"], { cwd: path.dirname(file), encoding: "utf8", maxBuffer: 1 << 26 })
return String(r.stdout ?? "").split("\n").flatMap((l) => { try { const o = JSON.parse(l); return o.answer ? [o as Opinion] : [] } catch { return [] } })
}
+1 -1
View File
@@ -32,7 +32,7 @@ export const sizeOf = (name: string) => path.basename(name).replace(/\.[a-z0-9]{
export const adOf = (name: string) => path.basename(name).replace(/\.[a-z0-9]{2,4}$/i, "").split("_").filter((p) => !VERSION.test(p) && !SIZE.test(p) && !EXTRA.test(p)).join("_")
/** the job's own writing about itself: review rounds, previews, sheets */
export const bookkeeping = (rel: string) => /^(\.\/)?(review|previews|\.raea)\//.test(rel) || /\.(sheet|seen|check)\.[a-z]+$/i.test(rel)
export const bookkeeping = (rel: string) => /^(\.\/)?(review|previews|\.raea)\//.test(rel) || /\.(sheet|seen|second|check)\.[a-z]+$/i.test(rel) || /\.looks\//.test(rel)
export default check<FileFacts>(
{ id: "naming", text: "files named client_concept_variant_v#_size", over: "file", at: ["edit", "render", "publish", "done"] },
+15 -7
View File
@@ -26,6 +26,7 @@ import { tastePack } from "./packs/taste.ts"
import { loadProject, type Project } from "./project.ts"
import { critic, judge } from "./packs/goal.ts"
import { PACK_CHECKS } from "./packs/index.ts"
import { second } from "./packs/look.ts"
import { deliverablesOf } from "./packs/job.ts"
import { bookkeeping } from "./packs/naming.ts"
import { placeReport } from "./packs/place.ts"
@@ -227,8 +228,8 @@ const positional = (a: string[], valued: string[]) => a.filter((x, i) => !x.star
const USAGE = `raea goal check [FILE...] [--at edit|render|publish|done] [--goal NAME] [--only ID,...] [--json]
raea goal tasks [DIR] [--json] | raea goal tasks [DIR] --apply EDITS.json|-
raea goal seen FILE (its contact sheet, to look at every frame)
raea goal seen FILE "what you see and would change" [--surprise "SECONDS s: what it is"]
raea goal seen FILE (its contact sheet and its frames at full size, to look at)
raea goal seen FILE "what you see and would change" --look "its design at full size, beside a reference" [--surprise "SECONDS s: what it is"]
raea goal judge [--goal NAME] [--by claude|kimi|clef]
raea make place FILE [--at S[,S...]] [--box WxH]`
@@ -254,11 +255,15 @@ export async function main(argv: string[]): Promise<number> {
}
if (verb === "tasks") return tasksMain(a)
if (verb === "seen") {
const [file, said] = positional(a, ["--surprise"])
const [file, said] = positional(a, ["--surprise", "--look"])
if (!file || !existsSync(file)) return usage()
if (!said?.trim()) {
const sheet = media.sheet(path.resolve(file))
console.log(`${sheet}\nlook at every frame, then: raea goal seen ${file} "what you see and would change"`)
const full = kindOf(path.resolve(file)) === "video" ? media.looks(path.resolve(file)) : []
// on raea cloud (where the critic is clef), a second opinion on the whole cut with its sound: never the look itself
const op = full.length && critic() === "clef" ? second(path.resolve(file)) : null
if (op) console.log(`a second opinion (clef watched and heard all of it; lowest first; weigh it, then look yourself):\n${op}`)
console.log(`${sheet}\n${full.join("\n")}\nlook at every frame of the sheet for what happens, and open each full-size frame for how it looks (type, captions, cards, the end: beside a reference ad's frame, not from the sheet), then: raea goal seen ${file} "what you see and would change"${full.length ? ' --look "its design at full size, beside a reference, and what you changed"' : ""}`)
return 0
}
const abs = path.resolve(file)
@@ -267,9 +272,12 @@ export async function main(argv: string[]): Promise<number> {
console.error(`raea goal seen: ${path.basename(file)} has no sheet since its last render: raea goal seen ${file}, and look at it first`)
return 1
}
const st = statSync(abs)
const surprise = flag(a, "--surprise")
writeFileSync(`${media.stem(abs)}.seen.json`, `${JSON.stringify({ video: path.basename(abs), render: `${Math.round(st.mtimeMs)} ${st.size}`, sheet: path.basename(sheet), seen: said.trim(), ...(surprise ? { surprise } : {}), at: new Date().toISOString() }, null, 1)}\n`)
const [st, surprise, look] = [statSync(abs), flag(a, "--surprise"), flag(a, "--look")?.trim()]
if (kindOf(abs) === "video" && (!look || !media.looksFresh(abs))) {
console.error(`raea goal seen: ${path.basename(file)}'s design isn't judged yet: raea goal seen ${file} makes its frames at full size; open them, then say --look "its type, captions and cards beside a reference, and what you changed"`)
return 1
}
writeFileSync(`${media.stem(abs)}.seen.json`, `${JSON.stringify({ video: path.basename(abs), render: `${Math.round(st.mtimeMs)} ${st.size}`, sheet: path.basename(sheet), seen: said.trim(), ...(look ? { look } : {}), ...(surprise ? { surprise } : {}), at: new Date().toISOString() }, null, 1)}\n`)
console.log(`${media.stem(path.basename(abs))}.seen.json: seen as it is now`)
return 0
}
+39
View File
@@ -0,0 +1,39 @@
// The seen pack's two looks (12-01): what happens, on the contact sheet, and how it looks, on frames at full size.
import { expect, test } from "bun:test"
import { existsSync, readFileSync, writeFileSync } from "node:fs"
import { LOOKS, looks, looksFresh, stem } from "../src/media.ts"
import { SECOND, second, unjudged } from "../src/packs/look.ts"
import { CLIP, project, put, touch } from "./project.ts"
test("a video's frames at full size are made beside it, and again only after it changes", () => {
const f = put(project({}), "out/cuts/acme_dog_hook1_v1_9x16.mp4", readFileSync(CLIP))
touch(f, -60)
expect(looksFresh(f)).toBe(false)
const made = looks(f)
expect(made.length).toBe(LOOKS)
expect(made.every((p) => existsSync(p) && p.startsWith(`${stem(f)}.looks`))).toBe(true)
expect(looksFresh(f)).toBe(true)
writeFileSync(f, readFileSync(CLIP))
touch(f, 60)
expect(looksFresh(f)).toBe(false)
})
test("a look at the sheet alone doesn't pass: the design is judged at full size, in its own words", () => {
expect(unjudged({})).toBe(true)
expect(unjudged({ look: "looks good" })).toBe(true)
expect(unjudged({ look: "Captions are 72 px bold with the spoken word in yellow, as the reference's; the offer is one pill, not three boxes." })).toBe(false)
})
test("the second opinion is asked once for a file as it is, lowest grade first, and again after it changes", () => {
const f = put(project({}), "out/cuts/acme_dog_hook1_v1_9x16.mp4", readFileSync(CLIP))
let asked = 0
const ask = () => (asked++, SECOND.map((_, i) => ({ says: `grade ${i}`, value: SECOND.length - i })))
const says = second(f, ask)!
expect(says.split("\n")[0]).toContain(`grade ${SECOND.length - 1}`)
expect(second(f, ask)).toBe(says)
expect(asked).toBe(1)
touch(f, 60)
second(f, ask)
expect(asked).toBe(2)
expect(second(put(project({}), "out/a_b_c_v1_9x16.mp4", readFileSync(CLIP)), () => [])).toBeNull()
})
+3 -2
View File
@@ -38,8 +38,9 @@ media/brief.txt, so a rule can't be made up and a line can't be paraphrased away
out/cuts/ID_WxH.mp4 (name each cut's id client_concept_variant_v#, so the file is client_concept_variant_v#_9x16.mp4):
its shape and length; what it says, heard after its last change, for each `say`, `never` and the CTA; its words
against CUT.lines.txt beside it; its edit points, line levels and effects; its faces, text sizes and text placement;
and that you looked at its contact sheet since its last render (`raea goal seen CUT`, then `raea goal seen CUT
"..."`). Every render ends with `raea goal check CUT --at render`; the job isn't done, and the Stop hook won't let
and that you looked at it since its last render: its contact sheet for what happens, and its frames at full size
(CUT.looks/) for how it looks, since a sheet's tiles are too small to judge type, captions and cards on (`raea goal
seen CUT`, then `raea goal seen CUT "..." --look "its design beside a reference, and what you changed"`). Every render ends with `raea goal check CUT --at render`; the job isn't done, and the Stop hook won't let
you end, until `--at done` passes and every `open` item has the person's answer, written in with who gave it. Turn a
pack off on the contract (`packs: { place: false }`) only when the brief says so.
+1 -1
Submodule skills updated: de0767b1f8...a2481c23ef.