@dragonbyte/dsh-fission-skills 0.0.0-stage → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cordis.patch.yml +3 -0
- package/index.mjs +89 -0
- package/package.json +21 -4
- package/skills/asset-extractor/SKILL.md +173 -0
- package/skills/depth-quality-gate/SKILL.md +65 -0
- package/skills/dialogue-ledger/SKILL.md +137 -0
- package/skills/fission/SKILL.md +431 -0
- package/skills/fission/team-profile.md +284 -0
- package/skills/fission-clip-prompt/SKILL.md +174 -0
- package/skills/location-sheets/SKILL.md +53 -0
- package/skills/pipeline-a-1-outline/SKILL.md +63 -0
- package/skills/pipeline-a-1-outline/references/method.md +81 -0
- package/skills/pipeline-a-1-outline/references/output.md +31 -0
- package/skills/pipeline-a-1-split-episodes/SKILL.md +49 -0
- package/skills/pipeline-a-1-split-episodes/references/method.md +57 -0
- package/skills/pipeline-a-1-split-episodes/references/output.md +43 -0
- package/skills/pipeline-a-2-screenplay/SKILL.md +74 -0
- package/skills/pipeline-a-2-screenplay/references/output.md +121 -0
- package/skills/pipeline-a-2-screenplay/references/performance-design.md +153 -0
- package/skills/pipeline-a-2-screenplay/references/screenplay-authoring.md +101 -0
- package/skills/pipeline-a-3-assets/SKILL.md +73 -0
- package/skills/pipeline-a-3-assets/references/character-design.md +117 -0
- package/skills/pipeline-a-3-assets/references/environment-design.md +115 -0
- package/skills/pipeline-a-3-assets/references/environment-layout.md +71 -0
- package/skills/pipeline-a-3-assets/references/output.md +97 -0
- package/skills/pipeline-a-3-assets/references/planning-and-reuse.md +53 -0
- package/skills/pipeline-a-3-assets/references/prop-design.md +136 -0
- package/skills/pipeline-a-3-assets/references/voice-design.md +35 -0
- package/skills/pipeline-a-3-character-prompt/SKILL.md +56 -0
- package/skills/pipeline-a-3-character-prompt/references/examples/character-sheet-layout.png +0 -0
- package/skills/pipeline-a-3-character-prompt/references/prompt.md +65 -0
- package/skills/pipeline-a-4-director/SKILL.md +80 -0
- package/skills/pipeline-a-4-director/references/camera-techniques.md +185 -0
- package/skills/pipeline-a-4-director/references/directing.md +179 -0
- package/skills/pipeline-a-4-director/references/output.md +163 -0
- package/skills/pipeline-a-4-director/references/visual-direction.md +123 -0
- package/skills/pipeline-a-4-storyboard/SKILL.md +53 -0
- package/skills/pipeline-a-4-storyboard/references/blocking.md +61 -0
- package/skills/pipeline-a-4-storyboard/references/cinematography.md +293 -0
- package/skills/pipeline-a-4-storyboard/references/editing.md +150 -0
- package/skills/pipeline-a-4-storyboard/references/output.md +113 -0
- package/skills/pipeline-a-4-storyboard/references/review.md +75 -0
- package/skills/pipeline-a-5-prompts/SKILL.md +62 -0
- package/skills/pipeline-a-5-prompts/references/examples/corridor-tracking.md +56 -0
- package/skills/pipeline-a-5-prompts/references/examples/face-to-face-slap.md +109 -0
- package/skills/pipeline-a-5-prompts/references/output.md +109 -0
- package/skills/pipeline-a-5-prompts/references/prompt-writing.md +132 -0
- package/skills/pipeline-a-5-prompts/references/review.md +90 -0
- package/skills/pipeline-a-6-video-review/SKILL.md +42 -0
- package/skills/pipeline-a-6-video-review/references/method.md +54 -0
- package/skills/pipeline-a-6-video-review/references/output.md +17 -0
- package/skills/pipeline-a-orchestrator/SKILL.md +49 -0
- package/skills/pipeline-a-orchestrator/references/contract.md +151 -0
- package/skills/render-gate/SKILL.md +70 -0
- package/skills/source-script-extraction/SKILL.md +110 -0
- package/skills/storybreaker/SKILL.md +134 -0
- package/skills/transpose-audit/SKILL.md +144 -0
- package/skills/us01-image-config/SKILL.md +56 -0
- package/skills/visual-style/SKILL.md +283 -0
- package/skills/wardrobe-sheets/SKILL.md +71 -0
- package/README.md +0 -3
package/cordis.patch.yml
ADDED
package/index.mjs
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { readdirSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
export const name = 'fission-skills';
|
|
6
|
+
export const inject = ['skills'];
|
|
7
|
+
|
|
8
|
+
// This bundle's own flow, edited here.
|
|
9
|
+
const core = [
|
|
10
|
+
'asset-extractor', 'depth-quality-gate', 'dialogue-ledger', 'fission',
|
|
11
|
+
'fission-clip-prompt', 'location-sheets', 'render-gate', 'source-script-extraction',
|
|
12
|
+
'storybreaker', 'transpose-audit', 'us01-image-config', 'visual-style', 'wardrobe-sheets',
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
// A pipeline is one version of the script -> video flow: an entry point named
|
|
16
|
+
// `pipeline-<id>-orchestrator` plus one skill per stage, named
|
|
17
|
+
// `pipeline-<id>-<step>-<stage>`, where the step number is the production step
|
|
18
|
+
// the stage's artifact belongs to (1 source analysis,
|
|
19
|
+
// 2 screenplay, 3 assets, 4 storyboard, 5 render, 6 post). Several versions ship
|
|
20
|
+
// side by side, so the family is discovered from the package's skills directory
|
|
21
|
+
// instead of being listed here: publishing or replacing a version is then a
|
|
22
|
+
// content change with no edit to this file. Each version is synced from the
|
|
23
|
+
// tenant workspace where it is settled by scripts/sync-pipeline.mjs.
|
|
24
|
+
//
|
|
25
|
+
// Step 6 is split on purpose: reviewing the picture is a stage of the pipeline,
|
|
26
|
+
// while cutting and delivering the episode belongs to the `video-editor` skill
|
|
27
|
+
// and `editor_*` tools of the separately granted `dsh-video-editor` plugin. An
|
|
28
|
+
// orchestrator names both that route and the `media_*` fallback for a tenant
|
|
29
|
+
// without the grant.
|
|
30
|
+
const pipelineSkill = /^pipeline-([a-z0-9]+)-([a-z0-9]+(?:-[a-z0-9]+)*)$/;
|
|
31
|
+
|
|
32
|
+
// A version whose orchestrator is absent has no entry point, and the skills it
|
|
33
|
+
// routes to would read as a flow a tenant can start. The `files` whitelist in
|
|
34
|
+
// package.json decides what a packed tarball carries, so a partially shipped
|
|
35
|
+
// version is the failure worth naming here rather than serving.
|
|
36
|
+
function pipelineSkills(root) {
|
|
37
|
+
const found = readdirSync(join(root, 'skills'), { withFileTypes: true })
|
|
38
|
+
.filter((entry) => entry.isDirectory() && pipelineSkill.test(entry.name))
|
|
39
|
+
.map((entry) => entry.name)
|
|
40
|
+
.sort();
|
|
41
|
+
for (const id of new Set(found.map((name) => pipelineSkill.exec(name)[1]))) {
|
|
42
|
+
if (!found.includes(`pipeline-${id}-orchestrator`)) {
|
|
43
|
+
throw new Error(`pipeline ${id} ships without its orchestrator`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return found;
|
|
47
|
+
}
|
|
48
|
+
const provider = 'fission-skills-bundle';
|
|
49
|
+
const invocation = { modelInvocable: true, userInvocable: true };
|
|
50
|
+
|
|
51
|
+
// The skills are served from the installed package itself. The package is
|
|
52
|
+
// installed from the npm registry at the version the administrator plugin
|
|
53
|
+
// store pins, so a new version reaches a tenant through a new install, not
|
|
54
|
+
// through a directory switch inside a running process.
|
|
55
|
+
const packageDir = dirname(fileURLToPath(import.meta.url));
|
|
56
|
+
|
|
57
|
+
function definitionsAt(root) {
|
|
58
|
+
const definitions = new Map();
|
|
59
|
+
for (const skillName of [...core, ...pipelineSkills(root)]) {
|
|
60
|
+
const content = readFileSync(join(root, 'skills', skillName, 'SKILL.md'), 'utf8');
|
|
61
|
+
const header = /^---\r?\nname: ([a-z][a-z0-9-]*)\r?\ndescription: (.+)\r?\n---\r?\n/.exec(content);
|
|
62
|
+
if (header?.[1] !== skillName) throw new Error(`invalid ${skillName} skill metadata`);
|
|
63
|
+
definitions.set(skillName, {
|
|
64
|
+
name: skillName,
|
|
65
|
+
description: header[2].startsWith('"') ? JSON.parse(header[2]) : header[2],
|
|
66
|
+
source: 'runtime',
|
|
67
|
+
provider,
|
|
68
|
+
invocation,
|
|
69
|
+
resourceBase: { kind: 'directory', path: join(root, 'skills', skillName) },
|
|
70
|
+
content,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return definitions;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function createProvider(_control, root = packageDir) {
|
|
77
|
+
const definitions = definitionsAt(root);
|
|
78
|
+
return {
|
|
79
|
+
name: provider,
|
|
80
|
+
list: async () => [...definitions.values()].map(({ name: skillName, description, source }) => ({
|
|
81
|
+
name: skillName, description, source, provider, invocation, rank: 250, locator: skillName,
|
|
82
|
+
})),
|
|
83
|
+
get: async ({ locator }) => definitions.get(locator),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function apply(ctx) {
|
|
88
|
+
ctx.skills.registerProvider((control) => createProvider(control));
|
|
89
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dragonbyte/dsh-fission-skills",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.25",
|
|
4
|
+
"description": "DSH skill bundle for Fission script adaptation and the script-to-video pipelines.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.mjs"
|
|
9
|
+
},
|
|
10
|
+
"dsh": {
|
|
11
|
+
"bundle": {
|
|
12
|
+
"patch": "./cordis.patch.yml"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"index.mjs",
|
|
17
|
+
"cordis.patch.yml",
|
|
18
|
+
"skills"
|
|
19
|
+
],
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asset-extractor
|
|
3
|
+
description: Read one episode of an adapted drama script and produce the complete asset plan for that episode - every character including minor speaking parts and crowds, every location, and every prop, vehicle, device and piece of tableware that reaches the frame - then budget them against Seedance's 30-reference limit per clip. Use before writing any storyboard or prompt, and again as a two-way completeness audit after the storyboard exists.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Asset extractor
|
|
7
|
+
|
|
8
|
+
The failure this skill exists to prevent: a project ships sheets for the leads and the locations, then a clip
|
|
9
|
+
renders a car, a phone or a teacup that the model invented, and an audit reports "all assets present" because it
|
|
10
|
+
only checked the references the storyboard happened to declare. **A closure check is not a completeness check.**
|
|
11
|
+
Extraction runs from the script *first*, and the audit runs in *both* directions.
|
|
12
|
+
|
|
13
|
+
## When to run
|
|
14
|
+
|
|
15
|
+
- Before writing the storyboard for an episode (primary run).
|
|
16
|
+
- Again after the storyboard exists, as the two-way audit (secondary run).
|
|
17
|
+
- Again whenever an episode's script is rewritten, so the asset plan cannot drift from the text.
|
|
18
|
+
|
|
19
|
+
## Step 1 - read the episode's script the way it is actually written
|
|
20
|
+
|
|
21
|
+
Work on the adapted script (`fission/v01/script-fission-v01.md` or the per-version equivalent), not the raw source
|
|
22
|
+
transcript. Know the line types, because each one carries assets a different way:
|
|
23
|
+
|
|
24
|
+
| Line type | Looks like | What it yields |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| Episode/scene header | `## EP01-S07 | INT/EXT · sàn giao dịch … · đêm | 44 giây` | **Location**, time of day, whether INT/EXT or both |
|
|
27
|
+
| State lines | `[STATE-IN] …`, `[STATE-OUT] …` | Wardrobe **state** per character (`nora_sequin`), continuity props already in hand |
|
|
28
|
+
| Action beat | `△ 32,56–33,44 — Diana đứng cạnh cửa sedan đen …` | **Props, vehicles, devices, tableware**: the objects under the verbs |
|
|
29
|
+
| Dialogue cue | `**[cue 24] RADIO VOICE** *(OS — …)*: "…"` | Speaker class: on-screen / OS / crowd / device. A device speaker implies the device is an entity |
|
|
30
|
+
| Hook lines | `[HOOK-IN]`, `[HOOK-OUT]` | The prop the episode's promise hangs on (a bag, an envelope, a seal) - almost always worth a sheet |
|
|
31
|
+
|
|
32
|
+
Read **all** action beats and **all** scene headers for the episode. Never extract from the outline alone: the
|
|
33
|
+
outline names the leads and the rooms, and drops the cars, phones and cups that appear only in beats.
|
|
34
|
+
|
|
35
|
+
## Step 2 - sweep four entity classes, plus one that is usually forgotten
|
|
36
|
+
|
|
37
|
+
1. **Cast** - every named character, **and** every role that speaks or is held in frame: the butler, the
|
|
38
|
+
assistant, the driver, a spouse with one line. Crowds are entities too, as a *type*, not as individuals:
|
|
39
|
+
`@crowd_trading_floor`, `@crowd_banquet_guests`. Anonymous extras inside a location sheet do not need their
|
|
40
|
+
own sheet, but a crowd that fills a shot and repeats across clips does.
|
|
41
|
+
2. **Locations** - one entity per *room or place*, not per scene. Two scenes in the same lounge share
|
|
42
|
+
`@sinclair_lounge`; a lounge and a great hall never share one sheet, and the plan must state how they differ
|
|
43
|
+
so a render cannot conflate them.
|
|
44
|
+
3. **Props held, opened, worn as an object, or given** - envelopes, tablet, phone, walkie-talkie, teacup, paper
|
|
45
|
+
cup, gift box, contract, seal, magazine cover, jewellery presented as a gift.
|
|
46
|
+
4. **Vehicles** - every car that appears, individually: a sedan, an SUV and a sports car are three entities even
|
|
47
|
+
when the script only says "xe". This is the class most often skipped, and it is the class the model fakes most
|
|
48
|
+
confidently (wrong badge, invented plate).
|
|
49
|
+
5. **Set-dressing that carries meaning** - the framed family photograph, a bronze wall map, a whiteboard of red
|
|
50
|
+
thread. If the camera lands on it and the story depends on it, it is an asset; a plain armchair in a location
|
|
51
|
+
sheet is not.
|
|
52
|
+
|
|
53
|
+
**Wearables stay with the character.** Earrings, watch, shoes, sunglasses and bags already shown on a character
|
|
54
|
+
sheet are not separate assets. A bag that is *received as a gift* is both - it needs its own prop sheet and it is
|
|
55
|
+
worn/held on the character sheet.
|
|
56
|
+
|
|
57
|
+
## Step 3 - apply the inclusion rules
|
|
58
|
+
|
|
59
|
+
Include an entity when **any** is true:
|
|
60
|
+
|
|
61
|
+
- it appears in **2 or more clips** of the episode (or will recur in later episodes - extract across the whole
|
|
62
|
+
season you are adapting, not one episode in isolation);
|
|
63
|
+
- it is **held, opened, handed over or operated on camera**;
|
|
64
|
+
- it gets a **close-up or an insert**;
|
|
65
|
+
- its **identity is plot-relevant** (whose bag, whose car, which envelope);
|
|
66
|
+
- the model would otherwise **invent it** and drift between clips (phones, cars, cups, plates).
|
|
67
|
+
|
|
68
|
+
Do **not** make a sheet for:
|
|
69
|
+
|
|
70
|
+
- something only ever spoken about and never shown (a seal that stays in a drawer: it is a line, not (yet) an asset);
|
|
71
|
+
- background furniture already baked into a location sheet;
|
|
72
|
+
- a one-frame extra with no line and no repeat - name them in the prompt as anonymous, do not sheet them.
|
|
73
|
+
|
|
74
|
+
## Step 4 - assign states, not costumes
|
|
75
|
+
|
|
76
|
+
One sheet per **appearance state**, keyed `<character>_<state>` in snake_case: `nora_sequin`, `nora_grey_cashmere`,
|
|
77
|
+
`chase_gilet`, `arthur_zip`. A state exists when wardrobe, hair or accessories change materially between scenes.
|
|
78
|
+
Never write `@nora` in a clip prompt with the clothing described in words; cite the state sheet. The
|
|
79
|
+
`wardrobe-sheets` skill owns what goes on the sheet; this skill only decides **which states are needed**.
|
|
80
|
+
|
|
81
|
+
## Step 5 - budget against 30 references per clip
|
|
82
|
+
|
|
83
|
+
Seedance 2.5 accepts up to 30 image references per clip. Budget per clip, then reconcile across the episode:
|
|
84
|
+
|
|
85
|
+
1. List the clips of the episode with their duration and scenes (this comes from `storybreaker` or the storyboard).
|
|
86
|
+
2. For each clip, write the ref list in **cite order**: characters first (identity that must not drift), then the
|
|
87
|
+
location the shot stands in, then props/vehicles in order of screen importance. Order is meaning: `@Image 1`
|
|
88
|
+
carries the most identity weight.
|
|
89
|
+
3. If a clip needs more than 30, cut in this order: background props that never leave the depth of field →
|
|
90
|
+
props visible but not handled → secondary crowd sheets → a vehicle that appears blurred or distant. Never cut
|
|
91
|
+
a speaking character's sheet, never cut the location the scene plays in.
|
|
92
|
+
4. A character state that appears in one clip only may share its slot with nothing else - do not merge two humans
|
|
93
|
+
onto one sheet to save a slot; merged sheets cause face swaps.
|
|
94
|
+
|
|
95
|
+
Write the per-clip ref list into the plan, not just the episode-level inventory: the inventory proves nothing
|
|
96
|
+
about a render; the per-clip list is what gets submitted.
|
|
97
|
+
|
|
98
|
+
## Step 6 - output: the episode asset manifest
|
|
99
|
+
|
|
100
|
+
Produce `fission/<version>/audits/ep<NN>-asset-manifest.md`:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
# EP01 asset manifest
|
|
104
|
+
|
|
105
|
+
## Cast
|
|
106
|
+
| Entity | State | Why | Clips | Notes |
|
|
107
|
+
| nora_sequin | Nora · sequin column | lead, EP01 C01/C02/C08 | C01 C02 C08 | evening, no wrap |
|
|
108
|
+
|
|
109
|
+
## Locations
|
|
110
|
+
| Entity | Scenes | Clips | Distinguish from |
|
|
111
|
+
| sinclair_lounge | S01 | C01 | great hall: low ceiling, ivory walls, no staircase |
|
|
112
|
+
|
|
113
|
+
## Props · vehicles · devices
|
|
114
|
+
| Entity | Kind | Why | Clips | Text on it |
|
|
115
|
+
| car_sedan_black | vehicle | held on camera, plate read in CU | C02 | NY plate KBN-4471 |
|
|
116
|
+
|
|
117
|
+
## Per-clip reference budget
|
|
118
|
+
| Clip | Refs (in cite order) | Count | Over/under |
|
|
119
|
+
| C02 | nora_sequin, chase_black_suit, diana_grey_suit, margot_trench, arthur_vest, sinclair_courtyard, sinclair_study, ipad_pro, orange_bags, car_sedan_black, car_suv_black, car_pink, iphone_pro, paper_cup | 14 | ok |
|
|
120
|
+
|
|
121
|
+
## Gaps
|
|
122
|
+
| Entity | Status | Action |
|
|
123
|
+
| crowd_trading_floor | missing | sheet needed before C03 |
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Step 7 - the two-way audit (run after the storyboard exists)
|
|
127
|
+
|
|
128
|
+
Both directions must pass; reporting only one is how a project ships with no car sheets.
|
|
129
|
+
|
|
130
|
+
1. **Declared → exists**: every `@entity` cited by the storyboard and the clip prompts has a sheet file, and the
|
|
131
|
+
file's hash matches what was registered in Ark.
|
|
132
|
+
2. **Script → declared**: every entity the sweep in Step 2 found for this episode appears somewhere in the
|
|
133
|
+
storyboard's cast/location/references fields. This catches the class of error where the object is real but the
|
|
134
|
+
storyboard silently omits it.
|
|
135
|
+
3. **Per-clip numbering**: `@Image 1..N` in each prompt is contiguous, matches the plan's cite order, and N ≤ 30.
|
|
136
|
+
|
|
137
|
+
Report both numbers explicitly - `script-swept entities: 41, declared in storyboard: 41, sheets missing: 0` -
|
|
138
|
+
because a single "coverage 100%" line hides which direction was measured.
|
|
139
|
+
|
|
140
|
+
## Text and brand policy (do not re-litigate per episode)
|
|
141
|
+
|
|
142
|
+
Lettering that physically belongs to an object is prop detail: brand wordmarks, licence-plate characters, phone
|
|
143
|
+
numbers on signs, printed type on packaging. It must render **correctly and legibly**, matching the sheet, never
|
|
144
|
+
blurred, never re-invented. What is banned is added graphic text: subtitles, captions, title cards, watermarks.
|
|
145
|
+
|
|
146
|
+
- US-plated vehicles use a real state design (New York: white field, navy characters, `NEW YORK` above) with the
|
|
147
|
+
characters fixed on the sheet, e.g. `KBN-4471`. The plate is read in close-ups; it must not be blank and must not
|
|
148
|
+
change between clips.
|
|
149
|
+
- Devices are the newest flagship of their line: `iphone_pro` = iPhone 18 Pro Max, `ipad_pro` = 13-inch iPad Pro.
|
|
150
|
+
Screens stay off or a soft glow - no interface, no clock, no numbers.
|
|
151
|
+
- Luxury houses are named on the sheets: Hermès, Louis Vuitton, Gucci. Do not genericise a sheet that carries a
|
|
152
|
+
wordmark.
|
|
153
|
+
|
|
154
|
+
## Self-check before handing the manifest over
|
|
155
|
+
|
|
156
|
+
- [ ] Every scene header of the episode was read, including short ones (3-6 s scenes hide props).
|
|
157
|
+
- [ ] Every `△` action beat was read; the object under each verb is accounted for.
|
|
158
|
+
- [ ] Every cue's speaker is classified; device voices imply a device entity.
|
|
159
|
+
- [ ] Crowds and one-line roles are either sheeted or explicitly logged as anonymous.
|
|
160
|
+
- [ ] Each character's states are keyed, and each state is used by at least one clip.
|
|
161
|
+
- [ ] Every vehicle has its own entity and its own plate.
|
|
162
|
+
- [ ] The per-clip ref lists exist, are in cite order, and none exceeds 30.
|
|
163
|
+
- [ ] Existing catalogue was checked first: no second sheet for an entity that already has one.
|
|
164
|
+
- [ ] Paid generation is gated: list the missing sheets with model and count and get confirmation before spending.
|
|
165
|
+
- [ ] The manifest names what is blocked and why (e.g. gateway errors), instead of reporting the plan as complete.
|
|
166
|
+
|
|
167
|
+
## Anti-patterns
|
|
168
|
+
|
|
169
|
+
- Extracting from the outline or the costume bible instead of the script beats.
|
|
170
|
+
- One "misc props" sheet: keep every prop entity separate so a clip cites exactly what it shows.
|
|
171
|
+
- Reusing a blurred background car as "the car": a vehicle that matters gets its own sheet and plate.
|
|
172
|
+
- Declaring completion from the declared-→-exists direction alone.
|
|
173
|
+
- Adding a sheet without adding it to the per-clip ref list - the sheet then never reaches a render.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: depth-quality-gate
|
|
3
|
+
description: Validate a depth reference video before it drives an R2V clip - grayscale or colour, the depth must keep clean object contours and separable limbs, because every curve it loses the video model invents. Use after generating any depth window and again whenever a render shows melted shoulders, duplicated limbs, wrong body proportions or ghosted objects.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Depth quality gate
|
|
7
|
+
|
|
8
|
+
A depth video is not "done" when a file exists and it is grayscale. It is done when its **contours** are
|
|
9
|
+
usable. The video model takes camera and motion from depth and takes anatomy nowhere else, so any shape the
|
|
10
|
+
depth map fails to separate — a shoulder merged into a torso, two bodies fused, a hand lost in a sleeve — is
|
|
11
|
+
rebuilt by the model as a guess, and the guess is what the audience sees.
|
|
12
|
+
|
|
13
|
+
Palette changes nothing here. Colour (heat/inferno) and grayscale are both fine for R2V as long as the prompt
|
|
14
|
+
states that the colouring is measurement data and not the look; what matters is whether the **geometry reads**.
|
|
15
|
+
|
|
16
|
+
## The rule
|
|
17
|
+
|
|
18
|
+
**Depth must describe the curvature of every object in frame.** Each body's silhouette, each limb's
|
|
19
|
+
separation, each prop's outline and each set surface has to be legible as a shape, not as a soft smear.
|
|
20
|
+
|
|
21
|
+
## What to check, frame by frame
|
|
22
|
+
|
|
23
|
+
Sample at least 4 frames per window: the first frame, the last frame, and two moments of maximum motion.
|
|
24
|
+
|
|
25
|
+
| Check | Pass | Fail |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| Limb separation | arm and torso separated by a value gap | shoulder/armpit melted into one blob |
|
|
28
|
+
| Joint curvature | elbow, knee, wrist, ankle keep their bend | joint flattened or facing the wrong way |
|
|
29
|
+
| Body count | one silhouette per person | two people merged, or a body with no owner in frame |
|
|
30
|
+
| Near-foreground mass | a shape in the foreground has a clearly attributable owner | an unexplained limb or shoe owns part of the frame |
|
|
31
|
+
| Prop outline | bags, cups, phones, chairs read as their own shape | prop absorbs into the hand, table or wall |
|
|
32
|
+
| Set curvature | columns, arches, stair rails, chandeliers keep their profile | architecture smears into the background |
|
|
33
|
+
| Background | far plane reads as flat low-contrast | false depth holes, speckle, or the far plane as bright as the near |
|
|
34
|
+
| Frame coverage | the whole frame belongs to a plausible scene | pure black regions over half the frame |
|
|
35
|
+
|
|
36
|
+
**Night exteriors are the known failure case.** A dark source gives depth almost no data, the map goes black,
|
|
37
|
+
and the render's camera freezes. Treat "night + exterior" as a mandatory brighten-and-regenerate window.
|
|
38
|
+
|
|
39
|
+
## Regeneration procedure for a failing window
|
|
40
|
+
|
|
41
|
+
1. Cut the exact window out of the source (`media_edit` trim), do not touch the original.
|
|
42
|
+
2. Lift it: `media_effect` with `brighten`, `contrast`, and `sharpen` — enough that the architecture is readable.
|
|
43
|
+
Prefer brightening to adding saturation; you are feeding a mono-depth estimator.
|
|
44
|
+
3. Re-estimate depth on the lifted clip (`media_depth`), choosing the palette the version uses.
|
|
45
|
+
4. Re-run this gate on the new depth window. If limbs still merge, cut the window narrower and rebuild the
|
|
46
|
+
missing seconds from a different, better-reading moment instead of forcing a bad map.
|
|
47
|
+
5. Register the new depth file under a name with fixed characters (`...-12p64-32p56`) and swap the asset URI.
|
|
48
|
+
6. Record in the depth manifest: window, source, file, duration, delta, gate result.
|
|
49
|
+
|
|
50
|
+
## Prompt-side obligations that only work if depth is clean
|
|
51
|
+
|
|
52
|
+
- Name the limb the depth is struggling with, so text can outvote the blob: "right arm relaxed and clearly
|
|
53
|
+
separated from the torso, armpit closed, shoulder anatomical".
|
|
54
|
+
- If the depth holds a real foreground mass (a bent knee, a hand), **do not forbid it** — attribute it. A prompt
|
|
55
|
+
that says "no foreground limb" while the depth carries one loses every time; say whose it is instead.
|
|
56
|
+
- If the foreground mass cannot be attributed to anyone in frame, crop or trim it out rather than banning it.
|
|
57
|
+
- A character sheet is a standing or sitting pose; when a clip lies the character down, add a **pose plate**
|
|
58
|
+
image for that attitude, or the joints have no reference to follow.
|
|
59
|
+
|
|
60
|
+
## Anti-patterns
|
|
61
|
+
|
|
62
|
+
- Approving depth because "it is grayscale and the duration matches".
|
|
63
|
+
- Believing a coloured depth is easier for the model — it is not, and it leaks tint if the prompt is silent.
|
|
64
|
+
- Trying to fix melted anatomy with wording alone across revisions; after two failed renders the depth is the fault.
|
|
65
|
+
- Regenerating depth from the already-broadcast clip instead of the source footage.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dialogue-ledger
|
|
3
|
+
description: Build a speaker-attributed dialogue ledger for a source film before writing any adaptation - ASR cues, burned-in subtitles, shots, visible faces and lip motion in, one owner per line out with on-screen/off-screen marks and confidence. Use at extraction time so dialogue is attributed by evidence and OS lines are never handed to whoever happens to be in frame.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dialogue ledger — attribute before you adapt
|
|
7
|
+
|
|
8
|
+
The adaptation cannot fix attribution by prompt wording. Attribution is decided when the source is extracted: who speaks, whether they are in frame, and what the frame shows while they speak. This skill produces that ledger once, and everything downstream reads it.
|
|
9
|
+
|
|
10
|
+
## Why prompt-time patching fails
|
|
11
|
+
|
|
12
|
+
A remake always contains **off-screen voices**: a husband calls from the bedroom while the camera holds his wife's back. A model that is told only "Chase says …" over a frame containing a man will lip-sync the man. Adding "Marcus does not speak" to a prompt fights the same error every clip. The ledger removes the ambiguity before the prompt exists: it records that line 5 is **CHASE (OS)** while the frame shows **ELENA's back**, and the storyboard can then ask for exactly that.
|
|
13
|
+
|
|
14
|
+
## Stage 1 — collect four independent evidence streams
|
|
15
|
+
|
|
16
|
+
| Stream | Tool | Gives |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| Audio cues | `motion_transcribe_window` | line start/end, words, sometimes a speaker guess |
|
|
19
|
+
| Burned-in subtitle | frames at each cue change | the real line, in the delivered language, including lines the ASR missed |
|
|
20
|
+
| Shots | `motion_cuts_window` + frames | which shot each line lands in |
|
|
21
|
+
| Faces + lip motion | `motion_faces_window`, `motion_lip_motion_window`, frames | who is visible, whose mouth moves — read the caveat under Stage 3 before trusting a score |
|
|
22
|
+
|
|
23
|
+
Never accept ASR alone: one line in this project existed only in the burned-in subtitle, and ASR cue gaps are usually ~0 s.
|
|
24
|
+
|
|
25
|
+
### Collect frame windows one at a time
|
|
26
|
+
|
|
27
|
+
`motion_frames_window` **HTTP 503 is a queue refusal, not a media failure.** Measured 2026-11-08 over 107 calls in this project's sessions:
|
|
28
|
+
|
|
29
|
+
| Calls issued per second | Succeeded | 503 |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| 1 | 31 | **0** |
|
|
32
|
+
| 2 | 68 | 4 |
|
|
33
|
+
| 4 | 4 | 4 |
|
|
34
|
+
|
|
35
|
+
All eight 503s fell in a second that carried a concurrent call; **none** fell in a second that carried one call, and every retry with byte-identical arguments then succeeded. The cap is two on the host's CPU lane, and the tool's own description says so — but that lane is **shared**, both with `motion_cuts_window`, `media_probe`, voice and mux work, and with every other tenant on the same host. So two frame windows is the ceiling only when nothing else is using the lane, which is not a condition this workspace can observe.
|
|
36
|
+
|
|
37
|
+
Therefore: issue frame windows **serially**, and on a 503 retry the same call rather than reporting a gap in the evidence. A frame window that comes back 503 has collected nothing, so a ledger row left `UNRESOLVED` because "frames were unavailable" is a scheduling artefact, not an evidence limit — re-issue it before recording that verdict.
|
|
38
|
+
|
|
39
|
+
## Stage 2 — ledger inputs
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{"duration": 163.605,
|
|
43
|
+
"cast": [{"name": "ELENA", "gender": "female"}, {"name": "CHASE", "gender": "male"}],
|
|
44
|
+
"scene_cast": ["CHASE", "DANA", "ELENA", "MARCUS"],
|
|
45
|
+
"shots": [{"id": "s5", "start": 64.95, "end": 67.21, "scene": "suite", "roles": ["REPORTER"]}],
|
|
46
|
+
"cues": [{"id": 5, "start": 65.77, "end": 67.21, "text": "…", "speaker_tag": null}],
|
|
47
|
+
"subtitles": [{"start": 65.7, "end": 67.2, "text": "…"}],
|
|
48
|
+
"faces": [{"start": 65.7, "end": 67.21, "character": "ELENA", "mouth": "still"}],
|
|
49
|
+
"voice": [{"start": 65.77, "end": 67.21, "pitch": "male"}]}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`scene_cast` is the key field: the people **in the room**, not the people in the shot.
|
|
53
|
+
|
|
54
|
+
## Stage 3 — attribution rules (first match wins)
|
|
55
|
+
|
|
56
|
+
| Rule | Condition | Result |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| R1 | a source speaker tag exists | that owner, HIGH — the tag is never re-decided |
|
|
59
|
+
| R2/R3 | exactly one visible face has a moving mouth | that character, ON SCREEN, HIGH |
|
|
60
|
+
| R4 | one visible face, lips not measurable | that face, ON SCREEN, MEDIUM |
|
|
61
|
+
| R5 | a face is visible but its **lips are still** | the voice is **off-screen**: choose from `scene_cast` by voice pitch, then by `os_memory` (same voice earlier in the scene), then by speaker continuity with the previous line; record `(OS)` |
|
|
62
|
+
| R6 | no evidence | **UNRESOLVED** — never guess |
|
|
63
|
+
|
|
64
|
+
### Lip motion rules out; it does not rule in
|
|
65
|
+
|
|
66
|
+
`motion_lip_motion_window` returns a face-track count and a motion score per track. The two directions are not equally trustworthy, and R2/R3 above lean on the weaker one:
|
|
67
|
+
|
|
68
|
+
- **Zero face tracks is near-certain evidence of off-screen.** Measured on EP01 cue 6 (65,77–67,21, Chase's *"why your parents died"*): 12 frames, **0 face tracks** — the frame holds only Elena's back and Marcus's shoulder. Nothing visible could have said it, so `(OS)` is a conclusion, not an inference. This is the strongest single signal in the whole ledger, and it costs one call.
|
|
69
|
+
- **A high motion score does not identify a speaker.** Same episode, cue 8 (68,9–70,4): the tool scored **Marcus mean 8,67 / max 21,50** against Elena's 3,73 and would have handed the line to Marcus. Marcus was *turning his head* — his box moved from 0,00–0,09 to 0,04–0,28 across the window. Head rotation, a hand crossing the face, a laugh and chewing all read as mouth motion. The correct output there was `CONFLICT — LOW, CONFIRM`, not an attribution.
|
|
70
|
+
|
|
71
|
+
So use the tool to **eliminate** candidates, never to elect one:
|
|
72
|
+
|
|
73
|
+
1. `tracks == 0` → off-screen, HIGH. Go to R5 for the owner.
|
|
74
|
+
2. Exactly one track with motion **and** the box is stable across the window → that speaker, MEDIUM at best; confirm against the subtitle and the scene's continuity.
|
|
75
|
+
3. Two or more tracks with motion, or one track whose box drifts → **CONFLICT**, confidence LOW, and the row is `CONFIRM`, not attributed. Say which tracks competed and what each scored.
|
|
76
|
+
|
|
77
|
+
Record the window, the track count and each score in the evidence column, so a reviewer can see whether an attribution rests on an absence (strong) or on a score (weak).
|
|
78
|
+
|
|
79
|
+
**Run it before the adaptation, not after the render.** Measured 2026-11-08: the seventeen lip-motion calls on this project all landed between 11:26 and 11:45 — **eighteen hours after** the three clip-03 renders they would have protected, and twenty minutes before the scene was rewritten because of what they found. The tool is cheap, needs no paid call and answers exactly the question that the storyboard is about to guess at; its value is entirely in when it runs.
|
|
80
|
+
|
|
81
|
+
Two corollaries the rules encode:
|
|
82
|
+
- **The on-screen man is not the speaker merely because he is male.** R5 searches the room, not the frame.
|
|
83
|
+
- **One off-screen voice keeps one owner for the whole scene.** Once the male voice is Chase at 65.77, the same voice at 69.79 is Chase, even though only Elena and Marcus are visible.
|
|
84
|
+
|
|
85
|
+
## Stage 4 — write the ledger out, one row per cue
|
|
86
|
+
|
|
87
|
+
One row per cue, in timestamp order: `t0 t1 shot speaker on-screen/OS confidence evidence`, then the totals — `lines=N on_screen=N off_screen=N unresolved=N`. The `evidence` column names the rule that decided the row (`R2 one visible face, mouth moving`) and the frame or voice evidence behind it, so a reviewer can re-derive any single attribution without redoing the scene.
|
|
88
|
+
|
|
89
|
+
**Gate: `unresolved` must be 0 before adaptation starts.** An unresolved row is closed by inspecting frames or a voiceprint — never by choosing the plausible name.
|
|
90
|
+
|
|
91
|
+
**An unresolved ledger is a result, not a failure to report.** Measured on EP01 S03–S04 (2026-11-08): 18 cues came back **18 unresolved** — faces visible but lip motion not measurable from stills, and no in-scene candidate for the off-screen voices. That is the correct output for that evidence, and it says exactly what to collect next: denser `media_frames` windows across each cue, or voice evidence. Writing 18 plausible names instead would have passed every downstream check and put the wrong mouth on every line.
|
|
92
|
+
|
|
93
|
+
So where the totals are not clean, report them and stop. Saying `unresolved=18` blocks the adaptation, which is the point; saying `UNRESOLVED` per row is the honest shape of a scene nobody has yet attributed.
|
|
94
|
+
|
|
95
|
+
Worked case (EP01 S03, 54.63–71.21, with frame evidence available): 8 cues → 4 on-screen, 4 OS, 0 unresolved, and the two Chase OS lines land on **CHASE**, not on Marcus who is the only male in frame.
|
|
96
|
+
|
|
97
|
+
## Stage 5 — the script is generated from the ledger, never from memory
|
|
98
|
+
|
|
99
|
+
1. Every adapted line carries its ledger ids; that mapping is what `transpose-audit` checks.
|
|
100
|
+
2. Write the speaker mark into the script: `**CHASE** *(OS — from the bedroom behind her)*` / `**ELENA** *(ON SCREEN — profile, lips visible)*`.
|
|
101
|
+
3. Stage direction states what the frame holds while an OS line plays ("the frame stays on Elena's back; Chase is not in frame").
|
|
102
|
+
4. The storyboard copies the mark into the prompt as a **VOICE MAP**: which shot may show which mouth moving, and that no one else's lips move.
|
|
103
|
+
5. `transpose-audit` then proves: no dropped line, no added line, no re-order, and every OS line still owned by the same character it had in the ledger.
|
|
104
|
+
|
|
105
|
+
## Validation status — read this before trusting R5
|
|
106
|
+
|
|
107
|
+
**No rule in this skill has been validated yet.** The S03 run that "assigned Chase correctly" was produced by editing the rules after the answer was already known. That is a regression fix, not evidence. Two rules rest on independent evidence; two are heuristics that can be wrong:
|
|
108
|
+
|
|
109
|
+
| Rule | Status | Independent evidence available? |
|
|
110
|
+
|---|---|---|
|
|
111
|
+
| R1 speaker tag | principled | yes, the tag itself |
|
|
112
|
+
| R2/R3 moving mouth | principled | yes, lip motion, independent of any name |
|
|
113
|
+
| R4 face visible, lips unmeasurable | weak | no — downgrade to `CONFIRM` |
|
|
114
|
+
| R5 off-screen by scene_cast + continuity | **heuristic, unvalidated** | no; the truth is invisible in the frame by definition |
|
|
115
|
+
| R6 unresolved | correct behaviour | n/a |
|
|
116
|
+
|
|
117
|
+
A line attributed by R5 is an **inference**, not a fact. Mark it `OS-INFERRED` and put it in a confirmation queue. It may be signed off only by watching the scene or by a voiceprint — never by plausibility.
|
|
118
|
+
|
|
119
|
+
### How to validate properly
|
|
120
|
+
|
|
121
|
+
1. **Freeze the rules.** No edits during the test.
|
|
122
|
+
2. **Split by episode, not by convenience.** Develop on EP01; test blind on EP02–EP05, which took no part in designing the rules.
|
|
123
|
+
3. **Pre-register.** Write the expected speaker for every test line before running the tool, and commit that file.
|
|
124
|
+
4. **Score** precision and recall per rule plus a confusion matrix (who was assigned to whom). Report the failures, not just the successes.
|
|
125
|
+
5. **Adversarial cases required:** two men in frame with one speaking; an off-screen male voice over a male face; a crowd line; a line spoken with the back turned; a line evidenced only by the burned-in subtitle.
|
|
126
|
+
6. **Sensitivity:** add ±0.2 s jitter to cue bounds and re-run. An attribution that flips under jitter is not stable enough to script from.
|
|
127
|
+
|
|
128
|
+
Until steps 1–6 are done, the ledger is a **draft with a labelled confidence column**, and every `OS-INFERRED` line needs human confirmation before the script is written.
|
|
129
|
+
|
|
130
|
+
## Failure modes this prevents
|
|
131
|
+
|
|
132
|
+
- OS line lip-synced by the nearest on-screen man (the 14 s Marcus defect).
|
|
133
|
+
- An OS line reassigned to the person the camera happens to hold.
|
|
134
|
+
- Two male characters' lines swapped in a fast exchange.
|
|
135
|
+
- A line deleted because "nobody on screen was speaking".
|
|
136
|
+
- A crowd line left unattributed and later dropped.
|
|
137
|
+
- An award, company or surname left in the source language because no glossary row existed.
|