Prompt validator

From event4u-app/agent-config · View interactive version

Prompt validator is an AI agent skill from the GitHub repository event4u-app/agent-config. Pre-spend contradiction gate for AI-video runs: checks every prompt in the batch, blocks on style / character / physics mismatch. Triggers 'validate the prompts', 'check the storyboard'.

How to use this skill

Skill file

prompt-validator

Pre-spend review the agent performs: collect every prompt a video

run is about to send (all scenes, all blocks), cross-check them against

each other and against the run's locked facts (character lock, vocal

map, model capabilities), and stop the run with a specific error on

contradiction. The failure mode of a multi-scene batch is not drift, it

is contradiction: two prompts that cannot both be true of the same

video (AI-council convergence, 2026-06-06). One stopped batch costs a

re-edit; one rendered contradiction costs the whole spend.

What enforces it: the agent following this skill. One check is

scripted — the reference-index check in step 1 — and the agent still has

to run it; the rest are reads, and no gate blocks a run the agent did

not stop — the "block" below is an instruction, not a mechanism.

CODE0 names this skill;

/video:from-script does not, so there it runs only when invoked.

When to use

CODE0

Step 8 / CODE0 —

after every scene's eight-block prompt exists, before anything is

shown for approval or sent live.

re-validate the batch, not just the edited scene.

Do NOT use when:

checks in video-director already cover internal consistency.

batch is about to be gated, not on every draft keystroke.

Inputs

camera, dialogue).

video-director / blueprint JSON), in scene order.

(subject, palette, wardrobe, prop, seed).

line → singer assignments.

Procedure

1. Collect the full prompt set

Read every scene's prompt blocks into one table:

`scene → {style, subject, environment, action, camera, lens, lighting,

mood, duration, aspect, dialogue/singer}`. A scene whose prompt is

missing or unparseable → block: scene N: prompt missing/unreadable

— an incomplete batch is already a contradiction with the script.

Then, per scene and before any prose check, count its reference images

and run the reference-index check on its prompt text:

scripts/ai-video/lib/check-ref-index.sh <input-count> <prompt-file>

Exit 7 → block with the line it names (`reference: scene 3 cites

Bild 5 but only 2 inputs supplied`) — a prompt that cites an image the

run does not send renders against nothing.

2. Style consistency

The style block must agree across all scenes — one look per video

unless the script names an intentional break (e.g. "dream sequence").

claymation / watercolor) with no scripted break →

style mismatch: scene 3 'photorealistic' vs scene 7 'cel-shaded'.

HDR`) → same error shape, name both scenes and both tokens.

3. Character consistency (character mode)

With character.json present, every scene naming the subject must

match the lock:

blue jacket) → `character mismatch: scene 5 'blue jacket' vs lock

'red coat'`.

flag it — uncast identities break continuity AND the likeness gate.

vocal map's singer for that line — wrong mouth on wrong words is the

render-money-burning failure (media-sync-ground-truth). A "?"

singer with a lip-sync scene → block until resolved.

4. Physics + continuity

with no scripted transition → `continuity: scene 4 'noon sun' →

scene 5 'starry night' within the same chorus`.

(underwater + desert dust) → name scene + the two tokens.

[min_duration, max_duration] or with an aspect the model does not

list → block with the violated bound (defense-in-depth after

song-to-script Step 1 — hand-edited prompts re-open this hole).

5. Verdict

contradictions` and hand the batch to the preview gate.

the first), each as `class: scene(s) + conflicting values + fix

hint`. The operator (or the calling command) fixes the prompts and

re-runs the validator — never "approve anyway" past a contradiction;

an intentional break gets scripted (named in script.md), which

legitimizes it on the next pass.

Output format

  1. One line per finding — `class: scene(s) + conflicting values + fix

hint` — and report every finding, never just the first.

  1. Terminal verdict: line: OK with the scene count, or

BLOCKED (N contradictions) — fix and re-run; a blocked verdict

never hands the batch to the preview gate.

prompt-validator: 12 scenes checked
✅ style: one look (neo-noir, consistent)
❌ character: scene 5 'blue jacket' vs character.json 'red coat' — align scene 5 or update the lock
❌ lip-sync: scene 9 dialogue assigned to 'Freya' but vocal-map line 24.5-27.8 is singer '?' — resolve the singer first
verdict: BLOCKED (2 contradictions) — fix and re-run

Gotchas

validator only accepts a break that script.md names; "the operator

said it's fine in chat" does not survive to the next run.

contradict five untouched ones; the batch is the unit, not the scene.

documented-best-effort bound beats rendering past a real one; the

report names the unverified flag so the operator can override by

editing the manifest, never by skipping the check.

Do NOT

operator's (or calling skill's) edit, visible in the diff.

only consistency passes.

skill owns cross-scene contradiction only.

See also

invokes this before the unified storyboard/cost preview gate (Step 8).

this skill cross-checks.

lock this skill enforces against.

vocal-map source.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.