@dragonbyte/dsh-fission-skills 0.0.0-stage → 0.2.0
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 +54 -0
- package/package.json +21 -4
- package/skills/dialogue-ledger/SKILL.md +137 -0
- package/skills/fission/SKILL.md +94 -0
- package/skills/fission/team-profile.md +215 -0
- package/skills/source-script-extraction/SKILL.md +110 -0
- package/skills/transpose-audit/SKILL.md +144 -0
- package/README.md +0 -3
package/cordis.patch.yml
ADDED
package/index.mjs
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { 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
|
+
// Source video or script -> adapted script and its script details. Production
|
|
9
|
+
// (assets, storyboard, prompts, renders) is not in this bundle: the
|
|
10
|
+
// script-to-video pipeline ships in @dragonbyte/dsh-drama-skills.
|
|
11
|
+
const skills = ['dialogue-ledger', 'fission', 'source-script-extraction', 'transpose-audit'];
|
|
12
|
+
|
|
13
|
+
const provider = 'fission-skills-bundle';
|
|
14
|
+
const invocation = { modelInvocable: true, userInvocable: true };
|
|
15
|
+
|
|
16
|
+
// The skills are served from the installed package itself. The package is
|
|
17
|
+
// installed from the npm registry at the version the administrator plugin
|
|
18
|
+
// store pins, so a new version reaches a tenant through a new install, not
|
|
19
|
+
// through a directory switch inside a running process.
|
|
20
|
+
const packageDir = dirname(fileURLToPath(import.meta.url));
|
|
21
|
+
|
|
22
|
+
function definitionsAt(root) {
|
|
23
|
+
const definitions = new Map();
|
|
24
|
+
for (const skillName of skills) {
|
|
25
|
+
const content = readFileSync(join(root, 'skills', skillName, 'SKILL.md'), 'utf8');
|
|
26
|
+
const header = /^---\r?\nname: ([a-z][a-z0-9-]*)\r?\ndescription: (.+)\r?\n---\r?\n/.exec(content);
|
|
27
|
+
if (header?.[1] !== skillName) throw new Error(`invalid ${skillName} skill metadata`);
|
|
28
|
+
definitions.set(skillName, {
|
|
29
|
+
name: skillName,
|
|
30
|
+
description: header[2].startsWith('"') ? JSON.parse(header[2]) : header[2],
|
|
31
|
+
source: 'runtime',
|
|
32
|
+
provider,
|
|
33
|
+
invocation,
|
|
34
|
+
resourceBase: { kind: 'directory', path: join(root, 'skills', skillName) },
|
|
35
|
+
content,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return definitions;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function createProvider(_control, root = packageDir) {
|
|
42
|
+
const definitions = definitionsAt(root);
|
|
43
|
+
return {
|
|
44
|
+
name: provider,
|
|
45
|
+
list: async () => [...definitions.values()].map(({ name: skillName, description, source }) => ({
|
|
46
|
+
name: skillName, description, source, provider, invocation, rank: 250, locator: skillName,
|
|
47
|
+
})),
|
|
48
|
+
get: async ({ locator }) => definitions.get(locator),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function apply(ctx) {
|
|
53
|
+
ctx.skills.registerProvider((control) => createProvider(control));
|
|
54
|
+
}
|
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.2.0",
|
|
4
|
+
"description": "DSH skill bundle for Fission: a source video or script turned into an adapted script and its script details.",
|
|
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,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.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fission
|
|
3
|
+
description: Turn a source video or script into an adapted Fission script and its script details - adaptation option, outline, episodes, mapping, continuity state and independent script audits. Video input requires Motion's saved script and shot details. Stops at the approved script; it does not plan or render media.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Fission
|
|
7
|
+
|
|
8
|
+
Choose in order before writing: (1) the Fission adaptation option, then (2) **script** or **video** as the source. Ask for any choice the user has not made; do not infer video from the availability of Motion. The options are As-Is for script input (keep the script unchanged), Light (preserve evidenced staging while changing approved looks), Transpose (keep event beats), or Change-DNA (rebuild physical events around the agreed spine). As-Is is not a video-analysis mode; for video input first use Motion and choose a supported adaptation option. A script is a valid source and does not require Motion. For video, load Motion to produce the original script and episode shot details first; if Motion is unavailable, stop and report the missing capability rather than inventing video evidence. In particular, **Light with video input requires `motion` and its saved source script plus shot details for every requested episode before adapting it**. For script-only Light, Motion has no video to analyze: require staging detailed enough to preserve the specified action, framing and blocking, or ask for source video or another adaptation option. Use the selected tenant's workspace for writing. Save work with ordinary workspace file operations; never claim a validation step ran unless it actually did.
|
|
9
|
+
|
|
10
|
+
For **As-Is script input**, save the supplied script unchanged as `fission/script-original.md` if it is not already there; never overwrite an existing source script without reviewing the conflict. Copy its content unchanged into this version's `script-fission-<version>.md` for the sidebar and the handoff below. Do not rewrite dialogue, names, events, scene order, or stage directions, add an adaptation beat map, or require a replacement look. Record `As-Is` in `outline.md`, not in the script. If the script omits camera or timing details, leave them to production rather than presenting them as source facts. An existing version's approved script is not replaced merely to start an As-Is run.
|
|
11
|
+
|
|
12
|
+
## Where files live
|
|
13
|
+
|
|
14
|
+
The project lives in a `fission/` directory inside the conversation's own working directory — the workspace you are already in, not a fixed path. Write relative paths, or join them onto the current working directory; do not assume `/workspace`.
|
|
15
|
+
|
|
16
|
+
One source drama can be adapted **several times**, so every file an adaptation produces is stored under that adaptation's own version directory. The source script stays at the project root because all versions share it:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
fission/
|
|
20
|
+
script-original.md the source, shared by every version
|
|
21
|
+
<version>/
|
|
22
|
+
script-fission-<version>.md the adapted script
|
|
23
|
+
outline.md direction, motive, spine, beat mapping
|
|
24
|
+
parts/ parallel episode drafts (see Consistency)
|
|
25
|
+
audits/ independent script-audit verdicts
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The user names the version: it may be a number (`01`), a `v`-prefixed number (`v01`), or a word (`polo`). Letters, numbers, underscores and hyphens only — it is a directory name. Ask which version to work in when it is ambiguous, and never write one adaptation's files into another's directory. When starting a new adaptation of a script that already has versions, create a new version directory rather than overwriting an existing one.
|
|
29
|
+
|
|
30
|
+
Each tenant has an isolated workspace. Sharing a skill across users does **not** share their project data. SangMD has worked on several Fission projects and versions in both Playground and Drama; their memories are evidence to check, not a substitute for the current version's source and approved outline. Read those files before reusing any name, look or scene count. Resolve conflicting memory observations against the actual source and current version's approved mapping; mark unresolved ASR or name-card discrepancies instead of silently picking a remembered identity. Do not import a Taming-specific character or rule into a dragon project. Older Playground outlines describe a time when Fission tools or credentials were missing: inspect the current tool catalog rather than treating that historical limitation as permanent.
|
|
31
|
+
|
|
32
|
+
## Delegation in this Playground
|
|
33
|
+
|
|
34
|
+
When the user asks to process a list of two or more videos as one Fission project, use delegation without requiring a separate "use Agent Teams" request. First resolve the adaptation option and source type, load Motion and verify the saved source script and shot evidence for each assigned range. Then check the current tool catalog and roster, read `team-profile.md`, and start or reuse only the workers needed for disjoint ranges and independent audits. Do not create one teammate per video or spend Team slots merely because the skill was loaded. If the required choices or source evidence are missing, obtain them before drafting or auditing rather than spawning workers into an undefined task.
|
|
35
|
+
|
|
36
|
+
This skill guides tool use; it cannot install or enable agent tools. Check the current session's tool catalog before delegating. When Agent Teams is enabled and `spawn_teammate` is available, use it for independent drafts and audits; this profile disables direct `subagent` and `subagent_fork` in that mode. If Agent Teams is turned off, check whether fresh `subagent` is actually available before using the fallback below. When Team is available, read `team-profile.md` from this skill's directory before creating teammates or assigning tasks. It defines on-demand drafting and dedicated audit roles from SangMD's Fission work. Reuse an auditor who did not draft or edit the target, but require a new file-backed verdict after independently rereading the exact current source and script; do not call this a fresh-context audit. Give each worker a self-contained task with the approved version, exact evidence paths, owned output path and forbidden edits and paid tools. Keep at most four workers active; the Team permits only eight teammate creations ever, including failed ones. If no independent auditor is available, leave the gate pending. The lead alone merges canonical files and checks returned artifacts.
|
|
37
|
+
|
|
38
|
+
For multi-step Team work, use `team_task_create`/`team_task_update` to assign disjoint file paths and track dependencies; use `send_message` to deliver follow-ups. `list_agents` reports activity, not completion, and `wait_agent` waits for a change, not an audit verdict. Confirm the task verdict and read the actual draft/audit file before advancing. Teammates share one workspace: task write scopes only warn about overlap and do not lock files. If `spawn_teammate` is absent but `subagent` exists in another profile, use fresh `subagent` workers and their completion notices instead; never claim Team coordination occurred. If neither tool is available, do drafting directly and leave required independent audits pending. Do not bypass an audit gate because a delegation tool is missing.
|
|
39
|
+
|
|
40
|
+
## Source evidence
|
|
41
|
+
|
|
42
|
+
For **video input**, require both Motion's original `fission/script-original.md` (or the path in `analysis/episode-index.md`) and `analysis/episodes/<episode-id>-detail.md` for every requested episode. Read saved frame evidence with vision; complete missing shot details before adapting. For **script input**, read the entire original script and use only staging it actually records; do not require Motion outputs or claim measured frames, camera trajectories or timings that no video established. Keep source observations separate from adapted decisions; never edit the original or treat an adapted scene as source evidence. Mark unsupported movements or expressions unknown rather than inferring them from plot, transcript or a single still.
|
|
43
|
+
|
|
44
|
+
## Adaptation options
|
|
45
|
+
|
|
46
|
+
Ask which adaptation option applies before writing. Do not infer one from the input format; video and script can each support an option when their evidence is sufficient.
|
|
47
|
+
|
|
48
|
+
**As-Is (script input only).** Keep the supplied script intact. Do not require a target world, new character mapping, adaptation outline or new scene template. Save an `outline.md` with the existing episode/scene coverage, source names and looks, and any unresolved staging/timing; copy the script unchanged into this version. Later production may fill staging gaps without retroactively changing the script or claiming source-video evidence.
|
|
49
|
+
|
|
50
|
+
**Light.** Change approved characters, wardrobe, props or locations while preserving the source's shot order, camera trajectory, framing, screen positions, blocking, actions, expressions, dialogue order and beat timing where the source actually establishes them; it does not require keeping source visual identities. For video, use Motion's shot details and frames; for a script, require actual staging detail and ask for the missing staging, a video, or a different option rather than inventing camera motion.
|
|
51
|
+
|
|
52
|
+
**Transpose.** The unit of fidelity is the *event and its rhythm*. Keep the source's ordered sequence of beats, their timing, and their coverage; change only the "world skin" — names, setting, profession, costume, props, genre. Do not drop, merge, reorder, or skip a beat, and do not invent one the source does not have. A transpose may be shallow (new names and outfits over the same profession) or deep (the profession itself changes, as hockey → polo), but the event frame does not move either way: if the source ends a match with a last-second goal, the adaptation ends its match with the equivalent last-second score, not with a different action that "feels similar".
|
|
53
|
+
|
|
54
|
+
**Change-DNA.** Keep the abstract psychological motive and the ordered story spine (conflict, escalation, climax, resolution), but deliberately rebuild each beat as a new physical action native to the target world. The events change; only the spine is preserved.
|
|
55
|
+
|
|
56
|
+
Transposing is not "merely a reskin" to be avoided — in transpose mode it is the whole point, and inventing new physical action there is a defect, not ambition. Conversely, in change-DNA mode, reproducing the source's actions beat for beat misses the request. State which option you are working in, and the changes it permits, when you save the outline, so a reviewer can judge the script against the right standard. Do not silently switch options or invent missing source beats.
|
|
57
|
+
|
|
58
|
+
## Version and mapping
|
|
59
|
+
|
|
60
|
+
Work in this workspace's `fission/<version>/`; reuse its `outline.md` and `script-fission-<version>.md`. Ask which version only if multiple versions apply. Before adding an episode, read its source script and earlier adaptation records; for video input also read Motion's shot details and frame evidence. Map each source scene, and each relevant shot where available, to the adapted scene so omissions are deliberate. Keep one stable source-to-adapted ID and name per character, location and prop in `outline.md`. Read the previous adapted episode's final scene and carry forward positions, props, injuries, knowledge, wardrobe and unresolved state. Append without replacing approved earlier episodes or renumbering their scenes. Resolve a conflict in the mapping before the script is approved. For video input, review mapping, continuity and dialogue against both Motion outputs.
|
|
61
|
+
|
|
62
|
+
## Adaptation, in two phases
|
|
63
|
+
|
|
64
|
+
1. For video input, use Motion to produce `script-original.md` and episode shot details before this phase; use the saved details as source evidence for coverage and framing. For script input, read the complete source material in `script-original.md` directly and do not require Motion. For changing adaptations, ask for the target region, genre, professional domain, and adaptation mode if missing; As-Is does not need replacement-world choices. Do not invent missing source scenes. If the material is an original idea rather than an existing drama, expand it without pretending to transpose an existing source.
|
|
65
|
+
2. For changing adaptations, before writing episodes, record in this version's `outline.md`: the adaptation mode, the selected direction, the motive, the ordered spine, the source beat → dramatic function → new-world beat mapping, the character/antagonist map, the world conventions that preserve each event's *stakes* after the skin changes (what a lost match, a debt, or a public shaming costs in the target world), and the per-episode beats. Each episode gets a readable 3–6 sentence synopsis of actual events and its closing hook, not just ratings or labels. Let the number and length of episodes follow distinct story beats; do not pad to a fixed count. Plan the reveal timeline so the audience knows premise-level secrets early while characters learn them through credible channels. Vary the mechanisms of conflict, victory, and hooks. **Stop after saving the outline and ask the user to review it.**
|
|
66
|
+
3. Only after approval, write the requested episodes of a changing adaptation into this version's `script-fission-<version>.md`, one at a time. Start each with `# Episode N: <title>`. Use `## S01 | Interior/Exterior · <location> | <time> | Estimated <seconds> seconds` for scenes. Write `[STATE-IN]`, `[STATE-OUT]`, and `[HOOK-OUT]` for each scene. Carry physical positions, props, injuries, and a stable `snake_case` outfit key across scene and episode boundaries; change a look only when a change of clothes is shown or justified by the story timeline. A `Continuous` scene must truly share place and time with the previous scene. In transpose mode, carry the source's shot framing and coverage with the beat it belongs to, so production inherits it rather than reinventing it; note it as part of the beat, not as a rendering prompt. Do not write camera or rendering prompts into the script. Verify each newly written episode against the preceding one before starting the next.
|
|
67
|
+
|
|
68
|
+
## Outline approval
|
|
69
|
+
|
|
70
|
+
Use GenUI `dsh-ui` cards in chat when an outline benefits from structured review. For outline approval, show a concise summary and an explicit approve/revise action; only a user action on the current outline counts as approval. The files above remain authoritative: a chat card never saves or validates a document by itself.
|
|
71
|
+
|
|
72
|
+
## Consistency
|
|
73
|
+
|
|
74
|
+
For a long, approved multi-episode adaptation, use delegated workers to draft independent, non-overlapping episode ranges in parallel when they are available; a short or single-episode task does not need delegation. The lead first fixes the adaptation option, source coverage, approved `outline.md` mapping and per-episode beats, and the state inherited from earlier approved episodes. Give each worker only its range, the relevant source and outline paths, the inherited state, its own `fission/<version>/parts/ep<first>-<last>.md` output path, and a required handoff listing covered source scene IDs, dialogue, state-out, continuity conflicts and unanswered questions. Workers may read shared evidence but write only their own draft file; they must not edit the source, outline, canonical script, assets, storyboards or another worker's range, or call image-generation, asset-registration or paid video tools. Keep at most four workers active. The lead waits for every draft, merges episodes into `script-fission-<version>.md` in order, checks every source scene/beat and dialogue line against its adapted counterpart in both directions, verifies each range boundary against the preceding episode's actual state-out, and resolves name and continuity conflicts before claiming the script is ready. Preserve dialogue verbatim only where that version's approved contract requires it; do not carry source names into new narration merely because they occur in quoted speech. Drafting in parallel never substitutes for outline approval or script review. If delegation is unavailable, do the same bounded review sequentially; do not claim parallel work occurred.
|
|
75
|
+
|
|
76
|
+
After merging parallel script drafts, assign **independent script-audit workers** that wrote none of the parts. For a multi-episode script, give each worker one episode; split an image-heavy episode further by scene range into separate worker sessions, within the four-active-worker limit above. Repeated image reads in one session do not make independent bounded audits: that session's old images remain in its request history. Give each worker the original source for its range, approved `outline.md`, relevant part and merged-script sections, preceding state, exact subject-file digests and, for video input, only the relevant Motion details and inspected frame evidence. Do not set an arbitrary frame quota; inspect enough evidence for the owned range and mark gaps unreviewed. Each worker checks source scenes, beats and dialogue against the merged script in both directions, mapping and names against the approved version, and writes only `fission/<version>/audits/script-<range>.md` with covered IDs, source timestamp/text evidence, the `transpose-audit` per-episode counts when applicable, unresolved gaps and PASS/FAIL/BLOCKED. Judge fidelity by the selected adaptation option rather than demanding verbatim physical events in Change-DNA. The lead reads every verdict, reconciles cue coverage and state/knowledge/wardrobe across adjacent ranges, and records the aggregate in `fission/<version>/audits/script-aggregate.md` without turning partial or missing evidence into a pass. Re-audit changed ranges against their new digests; no handoff starts from an unaudited or failed merged script. If no independent auditor is available, report audit pending instead of treating the lead's self-check as independent approval.
|
|
77
|
+
|
|
78
|
+
A fission runs across many files and many turns, so consistency has to come from a written record, not from memory of what you wrote earlier. The version's `outline.md` holds the authoritative mapping. When a later file disagrees with it, the mapping wins, and you fix the later file.
|
|
79
|
+
|
|
80
|
+
For changing adaptations, keep the mapping one-to-one and closed. As-Is uses the source names and entities directly, with no new-world counterparts. Every source character, location, prop, and organization in a changing adaptation gets **exactly one** new-world counterpart, recorded once in `outline.md` and then used verbatim everywhere: outline, parts, the merged script and audits. Never give one entity two names across episodes, never reuse one name for two entities, and never introduce a new-world entity that has no entry in the mapping. If the story genuinely needs a new entity, add it to the mapping first.
|
|
81
|
+
|
|
82
|
+
Carry state forward explicitly. A scene's `[STATE-IN]` must match the previous scene's `[STATE-OUT]` for everything that persists: who is present and where, physical positions, injuries, what each character knows, what they are holding, time of day, and the `snake_case` outfit key. A look changes only when the story shows or justifies the change. Before writing an episode, re-read the previous episode's final scene; before saving one, check its first scene against that state.
|
|
83
|
+
|
|
84
|
+
Keep knowledge consistent, not just objects. Track what each character knows and when they learned it. A character must not act on information they have not been shown receiving, and a secret cannot be re-revealed to someone who already knows it.
|
|
85
|
+
|
|
86
|
+
Versions do not mix. `v01`'s names, mapping and script belong to `v01`; never resolve a `v02` reference against `v01`'s files, and never let one version's mapping leak into another's script.
|
|
87
|
+
|
|
88
|
+
Verify rather than assert. When you claim continuity holds, say what you compared — the files and scenes you actually re-read. If you have not checked, say that instead; a stated-but-unchecked consistency claim is worse than an open question, because the user stops looking.
|
|
89
|
+
|
|
90
|
+
## Where this skill stops
|
|
91
|
+
|
|
92
|
+
This skill ends at an approved, independently audited adapted script: `outline.md` with its mapping and per-episode beats, `script-fission-<version>.md` with its scene state, and the script audits. It does not plan assets, storyboards, prompts or renders, and it never calls image-generation, asset-registration or paid video tools. When the user wants video from the approved script, hand that script to the script-to-video pipeline (`pipeline-a-orchestrator`, from the separately granted drama skill bundle) if this tenant has it; otherwise stop at the approved script and say that production skills are not available here, rather than improvising them.
|
|
93
|
+
|
|
94
|
+
Pipeline-A also keeps its project under `fission/<version>/`, and its `audits/` would collide with this adaptation's. Start it as a **new version with a different name** (for example `<version>-video`), never inside this adaptation's version directory. At its A0 step, choose a full source (*nguyên tác đầy đủ*) and copy the approved `script-fission-<version>.md` unchanged as that version's `source/original.md`. The pipeline reads its copy; it never edits this version's script, outline or audits.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# SangMD Fission Team Profile
|
|
2
|
+
|
|
3
|
+
Use this profile only when the current session exposes `spawn_teammate`. It is a role and handoff guide for the existing Agent Teams tools, not a plugin, preset, or request to create teammates immediately. For a short task, use only the relevant auditor; for a long adaptation, add writers as needed. Check `list_agents` and `team_task_list` before creating or assigning anyone. Reuse an existing named teammate through `send_message` instead of spending another permanent slot. This Playground profile permits eight teammate creations in a Team's lifetime, including failed creations; keep at most four workers active at once.
|
|
4
|
+
|
|
5
|
+
This profile covers the script side only: source measurement, drafting the adapted script and auditing it. It ends where `SKILL.md` ends, at the approved script.
|
|
6
|
+
|
|
7
|
+
**The roster is a menu, not a checklist — and the eight slots this project actually spent say the menu was wrong.** Measured from the session transcripts, the eight creations were `range-one` and `source-auditor` (11-07 16:42), `fidelity-auditor` (16:46), `render-auditor` (17:08), `script-auditor` (11-08 09:56), then `detail-suite`, `detail-press` and `detail-club` (11:31–11:32). So **three of eight slots went to a role the roster did not list**, while `range-two` and `voice-auditor` — both named in it — were **never created at all**. The seventeen lip-motion calls that did run were made by `detail-suite` (7), `detail-press` (9) and the lead (1), not by any voice auditor.
|
|
8
|
+
|
|
9
|
+
Read that as two separate failures. The roster under-described the work: measuring a source into shot detail is a real role, it consumed three permanent slots, and it now has its own row below. And the prediction was simply wrong — a role this profile recommended, in a sentence that sounds like experience, turned out to be the one nobody needed enough to create. So create only the roles whose defects the current stage can still produce, reuse a named teammate with `send_message` rather than spending a slot on a second one, and keep the last two creations for failures and reruns. When a stage needs a role that is not in the table, create it and add the row — do not force the work into a role whose brief does not fit it.
|
|
10
|
+
|
|
11
|
+
## Roster — create on demand
|
|
12
|
+
|
|
13
|
+
| Name | Owns | Writes only | Never does |
|
|
14
|
+
| --- | --- | --- | --- |
|
|
15
|
+
| `range-one`, `range-two` | Draft separate, non-overlapping episode or scene ranges after the lead fixes the source and approved mapping. Hand off coverage, dialogue, state-out and unresolved questions. | Assigned `fission/<version>/parts/<range>.md` draft. | Audit their own work; edit the canonical script, outline or another range. |
|
|
16
|
+
| `detail-<range>` | Measure one named second-range of the source into a shot-detail document: shots, cuts, camera, expression, wardrobe state and on-screen dialogue, each anchored to a timestamp. This is the role that actually spent three of this project's eight slots (`detail-suite` 0–54,63 s, `detail-press` 54,63–88,55 s, `detail-club` 88,55–163,605 s). | The assigned `analysis/episodes/ep<N>-detail-<letter>-<range>.md` — on disk: `ep01-detail-a-suite.md`, `-b-press.md`, `-c-club.md`, which sort into source order; a bare `ep<N>-detail.md` is a different, whole-episode document and is not a `detail-*` output. | Adapt or draft script from what it measures; **run Motion windows while another `detail-*` is running** — see the lane section below; leave a window `UNRESOLVED` for a 503. |
|
|
17
|
+
| `source-auditor` | Independently compare the actual Motion details, inspected frames, transcript, on-screen text and adjacent episode states against the source script. Mark unknown evidence and mistaken speaker/name claims; do not infer movement from stills. | An explicitly assigned `fission/<version>/audits/source-<scope>.md`. | Repair the source or assume older project notes are current evidence. |
|
|
18
|
+
| `script-auditor` | Compare the whole adapted script against the source for an assigned episode range, cue by cue, when the film is too long to read on both sides by hand. Load `dialogue-ledger` then `transpose-audit`, and report **the eight counts** that `transpose-audit` §3 defines — the verdict is the counts, not a reading, and an audit without the count line was written by reading. Freeze the subject by its `sha256sum`, anchor every finding to a source cue timestamp plus quoted text, qualify scene IDs with their episode, and report one of PASS/FAIL/BLOCKED. | `audits/script-<scope>.md`. | Edit the script it audits, re-measure a window that already has a saved transcript, anchor a finding to a line number, or fill in a speaker that the frames do not establish. |
|
|
19
|
+
| `voice-auditor` | Own **who speaks and whose mouth is visible** in the source: build the per-cue attribution with `motion_lip_motion_window`, using zero face tracks to rule a line off-screen and treating any motion score as `CONFIRM`, never as an attribution. Load `dialogue-ledger`. | `audits/voice-<scope>.md`, and the ledger rows it produces. | Attribute a cue from a motion score alone, or resolve an `UNRESOLVED` row by plausibility. |
|
|
20
|
+
|
|
21
|
+
**Use paths that the lead actually checks.** A brief that assigns a worker a path nobody else reads is how a verdict goes missing while looking delivered, so use the two conventions the project really has, and name the exact path in the brief:
|
|
22
|
+
|
|
23
|
+
| What | Where |
|
|
24
|
+
|---|---|
|
|
25
|
+
| Source and script verdicts | `<version>/audits/<scope>.md` |
|
|
26
|
+
| Source measurement | `analysis/episodes/<name>.md` |
|
|
27
|
+
|
|
28
|
+
The second one is **not under `<version>/`**. `analysis/` sits beside it, directly under the project directory, because what it holds is measured from the source film and does not belong to an adaptation version — the same shot detail serves `v02` unchanged. Write the version-scoped path for a verdict and the version-free one for a measurement; a `detail-*` brief that puts its output under `v01/` has filed source evidence as if a rewrite could invalidate it.
|
|
29
|
+
|
|
30
|
+
All teammates start with `context: fresh` when first created. Names are permanent within this Team. The lead sends a complete task each time a teammate is reused: previous chat and earlier audit verdicts are not evidence for the new range or revision. An auditor may handle many assignments but must never have drafted or edited the material they audit. If that separation cannot be met, assign an untouched auditor or leave the gate pending. Reuse does **not** mean a new, memory-free agent; describe it as an independent audit, not a fresh-context audit.
|
|
31
|
+
|
|
32
|
+
**Bound image-heavy audits by worker session, not by tool-call batch.** Assign `script-auditor` one episode, or one scene range when an episode needs many frame reads. Give each a complete brief with subject digests, only that range's source/frames/audio and a unique `audits/script-<range>.md` output. Do not impose an arbitrary frame count: review the evidence needed for that range and mark unseen intervals unreviewed. A reused teammate carries earlier images in its history, so reassigning it several ranges is **not** a fresh-session split. Prefer a fresh worker when a range needs substantial new image evidence, but never exceed the Team's permanent creation or active-worker limits; if no fresh worker is available, say the fresh audit is pending instead of claiming that reuse reset the image budget. The lead reads each verdict and reconciles cue coverage and adjacent state across range joins into the final per-script verdict; it never upgrades a missing range to PASS. `IMAGE_OFFLOAD_REQUIRED` can be handled by automatic offload and does not alone prove that an agent crashed.
|
|
33
|
+
|
|
34
|
+
## Lead handoff and gates
|
|
35
|
+
|
|
36
|
+
1. The lead identifies the current conversation workspace and version, reads the current source and approved outline, checks Motion evidence and live tool availability, and owns all canonical files. Do not import identities or scene counts from another Fission project. For video input, send uncertain source evidence to `source-auditor` before adaptation; an audit finding blocks dependent work until resolved.
|
|
37
|
+
2. Split only independent ranges between `range-one` and `range-two`. Give each a self-contained prompt with source and evidence paths, owned output path, inherited state, adaptation option and acceptance checks. Writers may read shared evidence but must not touch each other's files. The lead merges drafts in source order and checks every boundary.
|
|
38
|
+
3. **Date-stamp every artifact a brief quotes.** Before sending a brief, run `sha256sum` and `stat -c '%y'` on each file it cites and put both in the brief; tell the worker to stop and report if either has changed. The script and the source audits in this project were each rewritten while something downstream was quoting them, and nothing in the pipeline notices. A brief that names a file without a digest is a brief that may be describing a file that no longer exists.
|
|
39
|
+
4. **Tile the scene headings against the source.** Headings carry measured-looking spans — three decimals and a computed duration — which is exactly what makes them look like evidence; they are a hand-maintained summary of one. This project's script failed on 2026-11-08:
|
|
40
|
+
|
|
41
|
+
| | Defect | Sum vs probe |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `script-fission-v01.md` headings | S03 ends 72,30 / S04 starts 73,00 (**gap 0,70 s**); S04 ends 88,99 / S05 starts 88,55 (**overlap 0,44 s**) | 163,345 vs 163,605 |
|
|
44
|
+
|
|
45
|
+
Every row was individually plausible, and nothing compares row *i*'s end to row *i+1*'s start, so the defect lived exactly in the gap between two checks that both pass.
|
|
46
|
+
|
|
47
|
+
**Measure the boundary; do not reconcile two documents against each other.** Re-derived from `source/tap01.mp4` with ffmpeg scene detection: S03/S04 is **73,00** — the only score in 71,5–73,5 (0,574; next 0,024 at 73,20), and there is no cut at 72,30 at any threshold. S04/S05 is **89,00**, a flash dissolve rather than a hard cut: luminance holds Y≈93,8 through 88,58, peaks Y=217 at 88,86, settles to Y≈55 from 89,06. The headings were then corrected to those numbers.
|
|
48
|
+
|
|
49
|
+
**A padded ASR segment spanning a boundary is not a dropped line, and this trap cost a full re-measurement.** Both "uncovered cue" findings here were artefacts. Segment `72,15–79,71` carries `말해` — **2 characters in 7,56 s** against a 0,138 s/char median, about 0,28 s of speech — and a second decode separates it as `나가세요. 말해.`: two sentences, 71,75 in S03 and 79,35 in S04, each wholly inside one scene. `88,55–102,95` holds 9 characters in 14,40 s over club music. Compute seconds-per-character against the episode median before calling a spanning segment a split line; where it is padded, check the speech, not the segment bounds.
|
|
50
|
+
|
|
51
|
+
So: assert `end[i] == start[i+1]` to 0,01 s across headings, sum them against `media_probe`, and check that no boundary splits a segment whose rate says it holds real speech. Fix the heading where the measurement disagrees with it.
|
|
52
|
+
5. **Run `voice-auditor` on the source before the script is approved** whenever who speaks a line is uncertain. `motion_lip_motion_window` costs nothing and a zero-face-track window settles an off-screen line outright. On this project the seventeen lip-motion calls all ran eighteen hours after the renders they would have saved; the ordering, not the tool, is the gate.
|
|
53
|
+
6. After merging, assign independent script audits to workers who drafted none of the material. A previous pass becomes stale when the script it read changes. The auditor must read the files, not a writer's summary, and write PASS/FAIL/BLOCKED with source and target evidence. The lead resolves failures and requests a new verdict; no self-check replaces it. The lead hands off only an approved script whose audits pass.
|
|
54
|
+
|
|
55
|
+
## The Motion lane belongs to the team, not to a worker
|
|
56
|
+
|
|
57
|
+
`dialogue-ledger` already tells a worker to issue frame windows one at a time and to retry a 503 rather than record a gap. Every worker here obeyed it, and the refusal rate still doubled — because that rule is written for one agent and the lane is shared by all of them, by the other tenants on the host, and by `media_probe`, `motion_cuts_window`, voice and mux work. **Only the lead can see the whole lane, so only the lead can hold this gate.**
|
|
58
|
+
|
|
59
|
+
Measured 2026-11-08 across this project's sessions, counting every `motion_*`/`media_*` call and its result:
|
|
60
|
+
|
|
61
|
+
| | Calls | 503 |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| 11:26–11:50, three `detail-*` running at once | 138 | **21 (15%)** |
|
|
64
|
+
| Every other minute of the project | 283 | 23 (8%) |
|
|
65
|
+
|
|
66
|
+
Inside that window `detail-club` took 10 of its 41 calls as 503, `detail-press` 8 of 70, `detail-suite` 3 of 26 — and the seconds carrying three and four concurrent calls each had two different `detail-*` workers in them. Splitting a source by second-range is the right way to divide *reading*; it is the wrong way to divide *measuring*, because it converts one worker's serial queue into three workers competing for two slots.
|
|
67
|
+
|
|
68
|
+
So when the work is divided by source range:
|
|
69
|
+
|
|
70
|
+
- **Let one worker hold the Motion lane at a time.** Give the ranges out as tasks, but gate the measuring: a `detail-*` worker measures, writes its document and reports, and the next one starts. Three workers reading three ranges in parallel is fine — three workers calling `motion_frames_window` in parallel is the 15%.
|
|
71
|
+
- **A 503 is still never evidence**, and that does not change for a worker that was slowed down. The window collected nothing; re-issue it. `motion` 0.2.14 now retries a busy lane internally at 400/1200/3000 ms, so a 503 reaching a worker at all means the lane stayed full for over four seconds — that is a scheduling problem the lead created, not a limit of the source.
|
|
72
|
+
- **Count it before blaming the tool.** The host-wide figure is `503 / (motion_* + media_* calls)` over the minutes in question. 8% is the project's background rate with other tenants on the box; a rate above it means this team is competing with itself.
|
|
73
|
+
- **Do not hand a worker a window the lead already sampled, and do not nudge an end to get past a refusal.** `motion_frames_window` keys its saved result on the exact `start-end` pair, so a window that already exists comes back `A result already exists for this window` — a statement that the evidence is on disk, not a failure. Re-read it (`media/frames/<sourceId>/<sourceId>-<start>-<end>-f*.jpg`) instead of re-measuring. Shifting the end by a hair to dodge the message writes a second near-identical set under a different name: on 2026-11-13 the lead sampled EP01 `0–24` itself, briefed `detail-ep01a` for the same window, and the worker's retry at `0–23.999` left that one window saved twice — 12 stills under `-0-24-` and 12 more under `-0-23.999-`, 24 of the 168 files in the episode's frame directory — so a later reader has two names for the same 24 seconds and the lane was spent on it twice. When the lead pre-samples a window, say so in the brief and give the saved path; when a worker meets the message, report the existing path.
|
|
74
|
+
|
|
75
|
+
## Task-board protocol
|
|
76
|
+
|
|
77
|
+
Create one task per owned range or exact audit target with acceptance criteria, dependencies and advisory `write_scopes`. Assign or claim it using the latest revision from `team_task_get`/`team_task_list`, then send the owner a message with the complete brief; task readiness alone does not wake anyone. Workers update their own task when the file is written. `inactive` in `list_agents` means no turn is running, not that the task passed; `wait_agent` observes a change, not a completed audit. The lead reads the output file, checks its verdict and evidence, and only then advances the dependent stage. Write scopes warn about overlap but do not lock files. If a teammate is unavailable, a required audit remains pending; never relabel a writer's self-review as independent.
|
|
78
|
+
|
|
79
|
+
**Never write a task id into a brief before `team_task_create` has returned it.** Ids are issued in creation order across the whole board, not per episode, so a predicted one lands on another worker's range. Measured on 2026-11-13: `detail-ep03` was spawned at 01:58:53 with a brief naming `task-4`, but EP03's task was not created until 02:01:09 and came back as `task-5` — `task-4` had gone to EP04 two minutes earlier. The worker's first act was `team_task_get task-4` → `team task "task-4" not found` at 01:58:57, and it held no task until the lead's correction let it claim `task-5` at 02:02:12 — 3m15s. Create the task first, read the id off the result, and only then spawn or message the owner with it. If a worker is already running, send the id in a follow-up rather than guessing it into the original brief; a worker that cannot find its task should `team_task_list` and report, not claim the nearest-looking row.
|
|
80
|
+
|
|
81
|
+
## A scene is written so only one reading survives
|
|
82
|
+
|
|
83
|
+
Everything downstream inherits the script's ambiguities, and a storyboard writer resolving one quietly picks a side. The EP01-S03 version in force on 2026-11-07 read *"Elena turns for the door. Chase's voice stops her halfway."* — "turns for" can mean she pivots or she exits, and "halfway" names no endpoint. The storyboard took the exit reading, the clip-03 r3 prompt took the opposite one (*"She never leaves the suite in this clip"*), and neither side could point at a sentence that settled it.
|
|
84
|
+
|
|
85
|
+
**That scene has since been rewritten twice, and neither reading was right.** The current EP01-S03 (`v01/script-fission-v01.md`, read 2026-11-08 at 13:06 +07, sha256 `0c6db45b1e30…`) resolves the blocking inside one shot: *"△ 65,13–67,45. From behind: Elena walks to the door, Marcus at frame-left, the corridor ahead of her; she stops at the threshold and **turns 180° inside the same take** — no cut."* Its `[STATE-OUT]` reads *"Elena stands at the threshold in three-quarter, facing back into the room; Marcus at her left … Chase still on the bed, off-screen"*, and S04 opens *"Elena walks back into the suite"* at 73,00. So she **approaches** the door and **does not pass it**: not the "pivots in place" reading and not the "exits to the corridor" reading, but a walk that terminates at a named threshold and reverses within the take.
|
|
86
|
+
|
|
87
|
+
**This paragraph previously asserted the exit reading, and that was my error, not the project's.** It cited an 11:53 rewrite and `audits/source-ep01-ep02.md` ("walking out at ~65.2 s") while the scene had been rebuilt again at 13:06 against sangmd's dense frame and lip-motion evidence in `analysis/episodes/ep01-scene-1-2-nguyen-ban.md` (12:47, sha256 `70e5770eb5f8…`). A correction written from a file nineteen minutes stale repeats the defect it is correcting.
|
|
88
|
+
|
|
89
|
+
The transferable lesson is therefore sharper than the ambiguity: **a movement has three readings, not two** — pivot, exit, and *approach-and-stop* — and the third is the one both earlier readings lost, because each named only a verb and a direction. "Walks out" and "turns for" are both wrong about the same shot. Resolve it by rewriting the script with the endpoint and the shot boundary together ("stops at the threshold, turns 180°, no cut"), not by picking a side downstream. And check the mtime of the file you are quoting before you quote it: this scene was rewritten at 11:18, 11:53 and 13:06 on one day.
|
|
90
|
+
|
|
91
|
+
So write each scene to survive one reading:
|
|
92
|
+
|
|
93
|
+
- **End every movement at a named place.** "turns for the door", "walks out", "goes in", "leaves" each carry two readings; "walks to the threshold and stops, back to the bed" carries one. The verb is not the problem — the missing endpoint is.
|
|
94
|
+
- **Make `[STATE-OUT]` the authority it already is.** It names who remains, where, and holding what. A stage direction that can contradict it is rewritten at the script, not reinterpreted downstream. When the two disagree, the scene is defective, not merely unclear.
|
|
95
|
+
- **Check a heading's duration against the scene's own content.** EP01-S03 measures 54,63–73,00 = **18,37 s** and carries eight spoken turns; a downstream plan that gave it 30 s had ~13 s it must fill from S04 or invent. Where a heading carries a measured span, that span is the constraint; where it carries `Estimated N seconds` (8 of the 13 scene headings, all in EP02–EP05), the number was never timed against its dialogue and physical beats and is not a constraint at all.
|
|
96
|
+
|
|
97
|
+
## Read every line of the scene, not the dialogue and the markers
|
|
98
|
+
|
|
99
|
+
A scene carries three kinds of line and the one carrying the blocking is the easiest to skip. EP01-S03 as of 2026-11-08 13:06 has nineteen: **3** bracketed markers (`[STATE-IN]`, `[STATE-OUT]`, `[HOOK-OUT]`), **8** dialogue lines, and **8** `△` action lines — and the `△` lines are where the blocking lives, each with its own measured timespan. A reading built from the dialogue and `[STATE-IN]` alone loses every camera and body position in the scene, because those are only ever on the `△` lines.
|
|
100
|
+
|
|
101
|
+
The `△` lines are also the scene's own disambiguation. Where a direction could be read two ways, the next `△`, the `[STATE-OUT]` and the `[HOOK-OUT]` settle it — and this project's script carries `[STATE-OUT]` and `[HOOK-OUT]` on all **13** scenes, so there is always a third statement to check a reading against.
|
|
102
|
+
|
|
103
|
+
**Count dialogue with both speaker forms, and do not assume which one a scene uses.** The script writes a speaker two ways — `**CHASE:**` (43 across the file) and `**ELENA** *(ON SCREEN — profile, lips visible)*:` (39). The ratio is not uniform per scene: EP01-S03 at 13:06 is **8 of 8 parenthetical and 0 plain**, and S04 is **6 of 6**, so a scan for `**NAME:**` alone finds **zero** of their fourteen turns and reports two silent scenes. The parenthetical is not decoration either — `*(OS — from the bedroom behind her)*` vs `*(ON SCREEN — lips visible)*` is the difference between a voice and a visible mouth. Match both forms, carry the parenthetical through as blocking, and state the total you found.
|
|
104
|
+
|
|
105
|
+
## Dialogue is a counted quantity
|
|
106
|
+
|
|
107
|
+
A line absent from the script is absent from everything built from it, and the failure is silent at every later stage: EP01 Clip 03 was storyboarded with `Lời: không thoại` although its source scene carries six spoken turns, and the revision cost a second paid render. So a writer or auditor comparing a scene against its source states the count explicitly — "EP01-S03 has six turns, the adaptation carries six" — because a missing line is invisible to any check that only reads the adaptation. "No dialogue" is a claim to verify against the scene, not a default.
|
|
108
|
+
|
|
109
|
+
Cutting a line is a deliberate adaptation decision and is recorded as one. A line dropped by accident takes its motive with it: removing Chase's *"Don't you want to know how your parents died?"* left Elena's order to clear the room with no visible cause, and that read on screen as an unmotivated beat rather than as a missing sentence.
|
|
110
|
+
|
|
111
|
+
## Audit the beat against the script, not against the frames
|
|
112
|
+
|
|
113
|
+
Source frames show what happened; only the script says what was said and what the scene leaves behind. A beat list built from depth or frames alone reproduces blocking and loses both.
|
|
114
|
+
|
|
115
|
+
The join is where this bites: one boundary in this project was described three times, in three files and two languages, and the statements disagreed. An auditor checks both directions against the written scene: every spoken turn present with its speaker, every exit and entrance matching the script's `[STATE-OUT]`, and each character's final position agreeing with the next scene's `[STATE-IN]`. Where frame evidence and the script disagree about speech, position or who remains in the room, the script governs and the disagreement is a finding — **unless the script is the thing that just changed**, in which case re-check it against the frames before trusting it. Say which file, which revision and which line the verdict rests on.
|
|
116
|
+
|
|
117
|
+
## This tenant's memory holds two films, and some of it is stale
|
|
118
|
+
|
|
119
|
+
All eight live observations carry `project: playground` (ten were written; #1 and #2 were deleted on 2026-11-08), but they describe **two unrelated productions** that both call their work `fission/v01/`: a 32-episode dragon-rider film under `~/lord of dragon/` and `~/lord 2/`, and "The Sterling Heir" under `~/fission/`. A brief that quotes a memory without saying which film it came from can hand a worker the wrong cast, the wrong scene count and the wrong source.
|
|
120
|
+
|
|
121
|
+
Three specific traps, all verified on disk:
|
|
122
|
+
|
|
123
|
+
- **A capability memory records the runtime that session had, not a permanent fact about the tenant.** Observations #3–#5 claimed "no Fission tools here" and missing Ark credentials; a later recreate loaded the credentials and the same tools worked, with nothing rewriting those memories. Never quote a capability limit from memory, in either direction: read the session's own tool catalog, and if a tool is expected but missing, check whether the container has been recreated since rather than concluding the capability does not exist.
|
|
124
|
+
- **Two observations were deleted on 2026-11-08 for describing paths that no longer exist** — conventions for `fission/v01/parts/ep17-24.md` and `ep25-32.md`, which no project has any more. The dragon film's own records (the rename ledger, the Seedance credential block, the production decision) are kept: they are dated history for that film, not instructions for this one. Keep reading them that way rather than deleting them.
|
|
125
|
+
- **Scene and version labels collide across films.** `v01` names both productions and `S01`/`S02` repeat per episode, so every brief states the project directory, the version and the episode-qualified scene ID.
|
|
126
|
+
|
|
127
|
+
So the lead treats memory as **dated evidence, not current state**: quote the observation, name its film, and re-verify anything it claims about tools, paths or names before putting it in a worker's brief. A worker handed a stale capability claim will either skip a tool that works or spend its turn proving one that does not.
|
|
128
|
+
|
|
129
|
+
**And the attribution of one figure in this profile is wrong in a way worth keeping.** The S03/S04 boundary numbers above are introduced as *"re-derived with ffmpeg scene detection"*. **This tenant's container has no ffmpeg or ffprobe**: measured 2026-11-08, both are absent, `ffprobe: command not found` came back seven times in that session, and the only working ffmpeg appeared at 18:16 (+07) from a `pip3 install imageio-ffmpeg` — after those numbers were written. The boundaries themselves may well be right, but their stated provenance is not, so re-derive them with `motion_cuts_window` before relying on them.
|
|
130
|
+
|
|
131
|
+
## No worker shells out to a media CLI
|
|
132
|
+
|
|
133
|
+
ffmpeg lives in the **media-service** container, not in the tenant, and the tenant reaches it only through tools. So a brief never asks for a shell measurement:
|
|
134
|
+
|
|
135
|
+
| To measure | The tool |
|
|
136
|
+
|---|---|
|
|
137
|
+
| duration, streams | `media_probe` |
|
|
138
|
+
| what a video shows | `media_frames` with `start`/`end` |
|
|
139
|
+
| cues and spoken text | `media_transcribe`, or a saved `media/transcripts/*.json` |
|
|
140
|
+
| cuts in a window | `motion_cuts_window` |
|
|
141
|
+
| same person or not | `media_face_embeddings`, then `motion_compare_faces` |
|
|
142
|
+
|
|
143
|
+
`media_face_embeddings` and `motion_compare_faces` were called **zero** times in the measured session while identity drift was being chased by eye across frames — give that pair to whichever auditor owns an identity question.
|
|
144
|
+
|
|
145
|
+
Two further rules for the lead, both learned the expensive way:
|
|
146
|
+
|
|
147
|
+
- **Do not edit a document with a Python one-liner.** The measured session ran **197** `str.replace()` calls through `python3 -` heredocs and only **59** carried any verification; a `.replace()` whose pattern has drifted by one character changes nothing, raises nothing and reports success. Use the `edit` tool, which fails loudly when its target is not found — it was used **once** in that session against **132** whole-file `write`s, and a whole-file rewrite silently discards any concurrent edit.
|
|
148
|
+
- **If a check has no tool, stop and say so** rather than installing a CLI in the tenant to get around it.
|
|
149
|
+
|
|
150
|
+
## A re-audit that reads different bytes is not a re-audit
|
|
151
|
+
|
|
152
|
+
Four EP01 script audits disagreed with each other, and none of the disagreements were about the film. `script-fission-v01.md` was rewritten at **11:53**, after the `RENDER-CLEAN` verdict at **11:11**; no script audit recorded a SHA-256 of its target; `script-ep01-reaudit.md` anchored its findings to **44 distinct line numbers** from `L15` to `L95`, and the file has moved under all of them — `L55` and `L88` are now blank lines, `L85` holds a Chase line from a different scene, REPORTER has moved from 55/56 to **57/58** and RYAN from 93 to **102**. The drift did not stop when the audit was filed, which is the point: a line number dates faster than the finding it carries. Scene IDs make it worse in the other direction — `S01` and `S02` each occur **5 times** in that one file, once per episode, so an unqualified "S02" names five scenes, while `S03`/`S04`/`S05` occur once each and look safe until EP02 grows a third scene.
|
|
153
|
+
|
|
154
|
+
The source never moved. `media/transcripts/<sourceId>-0-163.6.json` is a saved file of 48 cues with timestamps, and two independent runs agreed on it cue-for-cue. `transpose-audit` §6 holds the full rule set and its §3 fixes the eight counts the auditor reports. So when the lead orders a re-audit:
|
|
155
|
+
|
|
156
|
+
- Put the subject's **SHA-256 in the brief**, and tell the auditor to stop if the file no longer matches. Do not edit the script while an audit is open; if an edit is unavoidable, declare the open audit dead rather than comparing its verdict with the next one.
|
|
157
|
+
- Require **source-cue anchors** (`cue 88.55 "…"`) and quoted adapted text, never line numbers, and **episode-qualified scene IDs** (`EP01-S03`).
|
|
158
|
+
- Require **one scale**: PASS / FAIL / BLOCKED plus a covered-cue count. `RENDER-CLEAN` and a prose "verdict summary" were each used once here and cannot be compared with anything.
|
|
159
|
+
|
|
160
|
+
With the subject frozen and the anchors on the stable side, a disagreement between two runs is real information: the digest says whether the script changed, and the timestamps say which run is wrong. Without that, repeated audits produce repeated opinions, which is what "it reports something different every time" actually was.
|
|
161
|
+
|
|
162
|
+
**This profile is subject to its own rule, and has now broken it twice.** An earlier version of these sections quoted EP01-S03 as keeping Elena in the suite, taught *"she never leaves"* as a worked example, called `production-status.md` a file that was never created, and counted Clip 01's revision labels as paid renders. Each was true of some file at some hour and false by the time it was written down, because the script was rewritten at 11:53 and the profile at 12:09 without re-reading it. **The correction then repeated the failure in the opposite direction**: it deleted the "never leaves" rule as contradicted, citing the 11:53 script and an audit written before it, while the scene had been rebuilt again at 13:06 to state that she stops at the threshold and turns inside the take — so the deleted rule had become correct and the correction was the stale claim. Both passes read a real file; neither checked its mtime first. A guidance document that quotes a live artifact inherits that artifact's drift and then outlives it, which is worse than an audit doing the same — an audit is read once, a profile is read by every teammate afterwards. So when a section here cites a scene, a count or a path, cite it with the date it was read, and re-read before repeating it in a brief.
|
|
163
|
+
|
|
164
|
+
## Which worker catches which defect
|
|
165
|
+
|
|
166
|
+
Every script-side defect this project actually shipped, against the worker who owns it and the stage where it is still free to fix. A defect with no owner is a defect that ships.
|
|
167
|
+
|
|
168
|
+
| Defect that shipped | Owner | Caught at | Signal |
|
|
169
|
+
|---|---|---|---|
|
|
170
|
+
| A spoken line dropped from the adaptation | `script-auditor` | script | `dropped=N` with the cue quoted |
|
|
171
|
+
| A line invented with no source cue | `script-auditor` | script | `added=N` with the line quoted |
|
|
172
|
+
| Two lines inverted across a seam (Chase's promise after Elena's order) | `script-auditor` | script | `reordered=N` with both cue ids |
|
|
173
|
+
| A scene's duration never measured (`Estimated N seconds`) | `script-auditor` | script | `BLOCKED` for duration, not `PASS` |
|
|
174
|
+
| Scene headings that do not tile | `script-auditor` | script | `end[i] == start[i+1]`; spans summed against `media_probe` |
|
|
175
|
+
| A cue list hand-copied and wrong (47 vs 48 cues, club cues off 9 s) | `source-auditor` | evidence | the two cue counts, side by side |
|
|
176
|
+
| A line attributed from a motion score to someone turning their head | `voice-auditor` | source | `CONFLICT — LOW, CONFIRM`, both scores named |
|
|
177
|
+
| A brief quoting a script that has since been rewritten | any | brief | `sha256sum` in the brief, re-checked |
|
|
178
|
+
| **Evidence windows lost to a lane this team filled itself** | the lead | evidence | `503 / (motion_* + media_*)` over those minutes vs the 8% background |
|
|
179
|
+
|
|
180
|
+
Two rows deserve the lead's attention:
|
|
181
|
+
|
|
182
|
+
- **A motion score is not an attribution.** The lip tool scored Marcus above Elena on cue 8 because he was turning his head. Brief `voice-auditor` to report `CONFLICT` rather than pick, and accept that as a finished answer.
|
|
183
|
+
- **The lane row has no worker because no worker can hold it.** Each `detail-*` obeyed its own serial rule and the refusal rate still doubled; the defect exists only in the lead's scheduling, which is why it sits in the lead's row and not in an auditor's.
|
|
184
|
+
|
|
185
|
+
## The cheapest stage gets the weakest gate
|
|
186
|
+
|
|
187
|
+
Transpose is the one Fission stage that costs nothing: no render, no Ark call, no sheet. The source transcript is already saved, the script is already written, and the whole job is a comparison. It is also the only stage on this project that has never once been done by counting.
|
|
188
|
+
|
|
189
|
+
Measured 2026-11-08, across the seven audits on disk:
|
|
190
|
+
|
|
191
|
+
| | Subject frozen by `sha256` | Verdict carries counts |
|
|
192
|
+
|---|---|---|
|
|
193
|
+
| 3 clip/prompt audits | **all three** | yes — probe duration, frame timestamps, a sha256 per ordered reference |
|
|
194
|
+
| 4 script audits | **none** | none — all four written by reading |
|
|
195
|
+
|
|
196
|
+
Same agent, same session, opposite rigour. And the four prose verdicts used four different scales — `RENDER-CLEAN`, `verdicts`, `Verdict summary`, and one with no verdict at all — so they cannot be compared with each other, which is exactly the *"it reports something different every time"* that started this work.
|
|
197
|
+
|
|
198
|
+
The reason is not skill, and the lead should not brief it as one. **A render costs money, so the paid path grew a gate; an audit costs nothing, so it never did.** Attention followed the invoice rather than the risk — and the risk runs the other way, because a wrong transpose is what every later stage then renders faithfully. A dropped line costs nothing to introduce and nine revisions to not fix.
|
|
199
|
+
|
|
200
|
+
So the lead treats a free stage as the dangerous one:
|
|
201
|
+
|
|
202
|
+
- **Ask for the count line, not the conclusion.** `transpose-audit` §3 fixes eight counts; a script audit arrives with that line in its header or it is `BLOCKED`. "Looks faithful", "no major issues" and a prose summary are the same answer, and none of them is a count.
|
|
203
|
+
- **Require one scale.** PASS / FAIL / BLOCKED per episode. A label invented for one audit cannot be compared with the next one.
|
|
204
|
+
- **Accept `BLOCKED` as a good outcome.** Where the frames cannot establish who speaks — 18 of 18 cues unresolved on EP01 S03–S04 — the honest ledger says `UNRESOLVED` per cue and blocks the adaptation. A worker who fills in plausible speakers instead produces something that passes every downstream check and puts the wrong mouth on every line. Brief that explicitly, because an agent asked to audit will try to deliver a verdict.
|
|
205
|
+
- **Gate the handoff on the transpose.** Anything cut from a cue list nobody checked inherits its errors silently: three EP01 clips were cut from a list one cue short of the transcript, with thirteen club cues off by up to nine seconds, and nothing downstream noticed.
|
|
206
|
+
|
|
207
|
+
## Waiting is not progress
|
|
208
|
+
|
|
209
|
+
`wait_agent` returns on a state *change*, so `{"timedOut":false}` often arrives within seconds and says nothing about whether the work is done. A chain of identical long waits is the lead stalling, not supervising: a measured session issued six `wait_agent(600000)` calls whose real waits were 1s, 8m, 16s, 45s, 2m and 1m19, interleaved with nothing else. Size the first wait to the work actually asked for — a windowed video analysis over a whole episode is minutes, so a 120s wait against a teammate spawned 68 seconds earlier can only expire — and treat an expiry as a wait sized too short, not as a stalled teammate. Between waits, do the lead's own work: read a finished output file, check a verdict, prepare the next brief. When there is nothing left to do but wait, end the turn and resume from the task board; a teammate's closing message arrives in the lead's inbox and the board survives the turn, so stopping loses nothing.
|
|
210
|
+
|
|
211
|
+
Diagnose before escalating. A teammate that finished cleanly reads as `inactive`, which looks identical to one that never started, so check its owned output file and its task state rather than inferring from the roster. Re-list and read before sending, interrupting or reassigning.
|
|
212
|
+
|
|
213
|
+
## Do not retarget a running auditor
|
|
214
|
+
|
|
215
|
+
An audit brief is a contract on exact files; changing it mid-run discards the work already done and costs the slot twice. In one measured session the lead gave `fidelity-auditor` task-4, superseded it 82 seconds later, interrupted the agent, then assigned task-5 — all inside three minutes — so two briefs were paid for and thrown away, and the one verdict that landed came minutes later than a single correct brief would have. When a target is about to change, wait for the current verdict or let the revision settle before assigning; when it has genuinely changed, send **one** replacement brief naming the dead task and the new files explicitly, and do not send a third. Prefer settling the target first: an auditor is cheap to assign once and expensive to redirect.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: source-script-extraction
|
|
3
|
+
description: Package the whole job of turning a source video into a verbatim, auditable script - evidence capture, dialogue ledger, cue numbering, then a numbers-not-opinions audit that proves no line, beat, speaker or duration was invented or lost. Use before any adaptation, storyboard or paid render, and again whenever a script must be re-proved against the footage.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Source script extraction — six stages, five gates
|
|
7
|
+
|
|
8
|
+
The script is not prose written from memory. It is a **measurement of the footage**, and the audit is what makes
|
|
9
|
+
the measurement trustworthy. Every stage leaves a file, every gate has a pass condition, and a failed gate sends
|
|
10
|
+
you back one stage — never forward "to save time".
|
|
11
|
+
|
|
12
|
+
## Stage 0 — Register the source
|
|
13
|
+
|
|
14
|
+
- Register each episode once (`motion_upload_source`), never re-upload.
|
|
15
|
+
- Record: source id, path, **sha256**, probed duration, resolution, frame rate, audio streams.
|
|
16
|
+
- **Record the duration at full precision and never round it up.** `media_probe` and `motion_upload_source`
|
|
17
|
+
return six decimals; the Motion window tools reject `end > duration` exactly, so a duration shortened at
|
|
18
|
+
the last decimal is fine and one lengthened there fails the whole window. Rounding to three decimals
|
|
19
|
+
rounds *up* about half the time: measured on 2026-11-13, 272.511995 → `272.512`, 216.852993 → `216.853`
|
|
20
|
+
and 188.095986 → `188.096` each became an end the tool refuses, and 3 of the 5 episodes in that job lost a
|
|
21
|
+
window to it. Truncate toward zero instead of rounding (`216.852993` → `216.852`), and carry that same
|
|
22
|
+
truncated number into every window list, worker brief and detail-note heading, so no one re-derives it.
|
|
23
|
+
- Cut the source into analysis windows and write them to a manifest with start/end and the delta to the episode.
|
|
24
|
+
- Gate 0: **every episode has a manifest row with hash + duration**, and the sum of windows equals the total
|
|
25
|
+
duration within 0,05 s.
|
|
26
|
+
|
|
27
|
+
## Stage 1 — Capture evidence, four independent channels
|
|
28
|
+
|
|
29
|
+
Run all four; each answers a question the others cannot.
|
|
30
|
+
|
|
31
|
+
| Channel | Tool | What it must produce |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| Frames | `motion_frames_window` / `motion_video_window` | dense sampled stills with absolute timestamps; a window is **never** sampled thinner than about one frame per 5 s |
|
|
34
|
+
| Cuts | `motion_cuts_window` | candidate cut times with scores, verified against frames |
|
|
35
|
+
| Speech | `motion_transcribe_window` | cues with absolute start/end, per-speaker when separable |
|
|
36
|
+
| Burn-in text | `motion_ocr_window` | subtitle candidates with timestamps, not a transcript |
|
|
37
|
+
| Faces | `motion_faces_window` | embeddings + boxes, to attribute speakers and recurring people |
|
|
38
|
+
| Lips | `motion_lip_motion_window` | mouth-motion evidence for a disputed cue, ≤6 s windows |
|
|
39
|
+
|
|
40
|
+
Gate 1: **no beat is written from a channel you did not run.** If a tool is unavailable, say so and stop —
|
|
41
|
+
a guessed beat is worse than a gap that is written down as a gap.
|
|
42
|
+
|
|
43
|
+
## Stage 2 — Reconcile into a dialogue ledger
|
|
44
|
+
|
|
45
|
+
One row per spoken cue, in source order:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
n | start | end | text (verbatim, source language) | speaker | attribution basis | channel | confidence
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- **channel**: on screen (`ON`), off screen (`OS`), narration/inner voice (`VO`), device (`RADIO`).
|
|
52
|
+
- **attribution basis**: lips + face match · frame composition + blocking · subtitle grammar · context only.
|
|
53
|
+
- Never hand an OS line to whoever happens to be in frame. When attribution is unresolved, write
|
|
54
|
+
**Unknown speaker** and keep the cue.
|
|
55
|
+
- Gate 2: **cue count x = sum of all scene cue lists**, every cue has start, end, text and a channel, and no
|
|
56
|
+
cue has start ≥ end.
|
|
57
|
+
|
|
58
|
+
## Stage 3 — Segment scenes and write the script
|
|
59
|
+
|
|
60
|
+
Segment by **place + continuous time**, not by shot. Keep, per scene:
|
|
61
|
+
|
|
62
|
+
- scene id, source range, place, characters present, and the beat list with absolute seconds;
|
|
63
|
+
- every cue numbered consecutively across the whole episode;
|
|
64
|
+
- VO kept physically separate from in-scene speech, because post-production treats them differently;
|
|
65
|
+
- **intentional omissions recorded**, with the reason (untranslatable pun, a name card that is never shown, a
|
|
66
|
+
line whose speaker cannot be established).
|
|
67
|
+
|
|
68
|
+
Gate 3: **episode duration = sum of scene durations ± 0,05 s**, and scene order matches source order.
|
|
69
|
+
|
|
70
|
+
## Stage 4 — Audit, with numbers instead of opinions
|
|
71
|
+
|
|
72
|
+
Run the audit as a table, and treat every row as a hard pass/fail:
|
|
73
|
+
|
|
74
|
+
| Check | Method | Pass |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| Duration conservation | Σ scene ranges vs probed duration | ±0,05 s |
|
|
77
|
+
| Cue conservation | ledger rows vs cues in script | equal |
|
|
78
|
+
| Cue ordering | n strictly increasing, times non-overlapping | yes |
|
|
79
|
+
| Speaker integrity | every cue has a speaker or an explicit Unknown | 100 % |
|
|
80
|
+
| Channel integrity | each cue ON/OS/VO/RADIO | 100 % |
|
|
81
|
+
| No invention | every script line appears in the ledger or the burn-in OCR | 100 % |
|
|
82
|
+
| No silent rewriting | wording diff against transcript beyond punctuation/casing | none |
|
|
83
|
+
| VO isolation | VO cues never marked ON | yes |
|
|
84
|
+
| Named-entity stability | person/company names identical everywhere | yes |
|
|
85
|
+
| Omission ledger | every dropped cue has a written reason | yes |
|
|
86
|
+
|
|
87
|
+
Two rules that caught real defects here:
|
|
88
|
+
|
|
89
|
+
1. **Audit both directions.** Checking "every declared reference exists" proves nothing; you must also check
|
|
90
|
+
"every asset that reaches the frame is declared". Same for cues: script→ledger **and** ledger→script.
|
|
91
|
+
2. **An auditor who only reads the script will pass it.** At least one pass must be run by a second reader
|
|
92
|
+
(or a second model) whose only job is to find a mismatch, and its findings are written to a file even when
|
|
93
|
+
the verdict is FAIL.
|
|
94
|
+
|
|
95
|
+
Gate 4: all ten rows pass; the audit file records the version it audited and the date.
|
|
96
|
+
|
|
97
|
+
## Stage 5 — Package for handoff
|
|
98
|
+
|
|
99
|
+
- Layout: `fission/script-original.md`, `fission/<version>/script-<version>.md`, `analysis/` for evidence,
|
|
100
|
+
`audits/` for the verdicts, `media/sources/` for manifests.
|
|
101
|
+
- Each artefact carries the source hash it came from, so a re-cut source cannot silently sit under an old script.
|
|
102
|
+
- Write a **coverage table**: episode → scenes → cues → duration, so the next stage knows where it stands.
|
|
103
|
+
- Gate 5: a fresh reader can answer "which footage produced this line?" from the files alone.
|
|
104
|
+
|
|
105
|
+
## What must never be skipped
|
|
106
|
+
|
|
107
|
+
- **Registration before analysis** — a script without a hash is unattributable.
|
|
108
|
+
- **Cue numbers never reused** — insertions take a suffix (33a, 33b), so cross-references stay valid.
|
|
109
|
+
- **Omissions written down** — an unrecorded omission is indistinguishable from a mistake at audit time.
|
|
110
|
+
- **The audit runs on the final file**, not on a draft that "was basically the same".
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: transpose-audit
|
|
3
|
+
description: Audit a transposed adaptation against its measured source - ledger-first, numbers-not-opinions. Use after writing or rewriting an adapted scene/script and before any storyboard or paid render, to prove that no beat, line, speaker, duration or world name was changed except the embodiment.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Transpose audit — prove the adaptation, do not read it
|
|
7
|
+
|
|
8
|
+
An adaptation review that reads both documents and says "looks faithful" fails exactly where it matters. The audit must be **mechanical**: two ledgers, six checks, numbers. A human or agent then reads only what the numbers flag.
|
|
9
|
+
|
|
10
|
+
## The failure this exists to prevent
|
|
11
|
+
|
|
12
|
+
Every defect found in this project so far was invisible to a careful reader and obvious to a ledger:
|
|
13
|
+
|
|
14
|
+
| Defect | Found by |
|
|
15
|
+
|---|---|
|
|
16
|
+
| a line dropped (`나랑 잘래요?` 117,72) | cue→line count |
|
|
17
|
+
| a line invented ("They're gone.") | a line with no cue id |
|
|
18
|
+
| two lines swapped across a scene seam | order of cue ids |
|
|
19
|
+
| a 34 s scene estimated at 18 s | measured span vs declared |
|
|
20
|
+
| one word of dialogue handed to the on-screen man | speaker ownership per line |
|
|
21
|
+
| a Korean surname left in an English line | proper-noun sweep |
|
|
22
|
+
| a clip that cut mid-sentence | boundary vs cue interval |
|
|
23
|
+
|
|
24
|
+
## 1. Measure the source first — it is a witness, not gospel
|
|
25
|
+
|
|
26
|
+
1. `motion_transcribe_window` → every cue with `start/end` (and speaker where the ASR gives it).
|
|
27
|
+
2. Frames at each subtitle change → read the **burned-in subtitle**, because ASR drops lines. One real line in this project existed only in the subtitle.
|
|
28
|
+
3. `motion_cuts_window` + frames → verified cuts.
|
|
29
|
+
4. Frames → place changes (room / exterior / cast set).
|
|
30
|
+
5. Grep the source document for names from the *adaptation*: a source file can be contaminated (a rewritten heading inside `script-original.md` once read "Biệt thự Sterling").
|
|
31
|
+
|
|
32
|
+
Deliver `source.json`: `{duration, cues[{id,start,end,speaker,text}], places[]}`.
|
|
33
|
+
|
|
34
|
+
## 2. Build the adaptation ledger
|
|
35
|
+
|
|
36
|
+
For the adapted script produce `adapted.json`: `{scenes[{id,start,end}], lines[{id,cues:[...],speaker,text}], names{sourceSpeaker: adaptedSpeaker}}`.
|
|
37
|
+
|
|
38
|
+
The `cues` array per line is the whole audit: it says which source cues that line carries. Any line without it is an addition; any cue never listed is a drop.
|
|
39
|
+
|
|
40
|
+
## 3. Report the eight counts
|
|
41
|
+
|
|
42
|
+
The audit is these eight numbers, written out one per line. Each is a count the auditor produces by walking the two ledgers cue by cue — not an impression, and not a sentence.
|
|
43
|
+
|
|
44
|
+
| Check | Pass condition | What to report |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| C1 coverage | every cue referenced exactly once | `dropped=N` and `duplicated=N`, each dropped cue quoted with its timestamp |
|
|
47
|
+
| C2 order | cue ids increase across the script | `reordered=N`, each with the two cue ids |
|
|
48
|
+
| C3 ownership | line speaker == mapped owner of its cues | `misowned=N`, each with line, claimed speaker, cue owner |
|
|
49
|
+
| C4 merge legality | a merge covers contiguous, same-speaker cues only | `merged_groups=N illegal_merges=N` |
|
|
50
|
+
| C5 additions | no line without a cue reference | `added=N`, each invented line quoted |
|
|
51
|
+
| C6 tiling | scenes tile `[0, duration]`, no gap/overlap | the sum, against the measured duration |
|
|
52
|
+
| C7 straddle | no cue crosses a scene boundary | `straddling=N` |
|
|
53
|
+
| C8 place purity | no scene spans a place change | `impure=N` |
|
|
54
|
+
|
|
55
|
+
A render-clean episode reads `dropped=0 duplicated=0 added=0 reordered=0 misowned=0 illegal_merges=0 straddling=0 impure=0`, with every merge sentence-internal (a Korean sentence split across two cues becoming one English line is a legal merge — count it and name it).
|
|
56
|
+
|
|
57
|
+
**Walk the cues in timestamp order and account for each one before moving on.** Cue 1 → which adapted line carries it, which speaker. Cue 2 → the same. A cue you cannot place is `dropped` and gets quoted; a line you cannot trace back to a cue is `added` and gets quoted. The count is the output. Reading both documents and forming a view is the failure mode, not the method — the eight numbers exist so that two runs over the same frozen bytes produce the same answer.
|
|
58
|
+
|
|
59
|
+
**Report the counts even when they are bad, and never round a count into prose.** "A few lines appear to have shifted" is not a finding; `reordered=2 (cue 14 after cue 16; cue 31 after cue 33)` is. If evidence is missing for a check, that check is `BLOCKED` and says what is missing — an unanswerable check is never a silent pass.
|
|
60
|
+
|
|
61
|
+
### Where the counting is actually hard, and what it is worth
|
|
62
|
+
|
|
63
|
+
Two counts need no judgement at all and must never be skipped: **C1** and **C5**. A dropped line and an invented line are both visible from the cue list alone, both are the defects that have actually shipped here, and both are pure bookkeeping.
|
|
64
|
+
|
|
65
|
+
**C3 ownership is the one that needs evidence the transcript does not carry.** ASR gives timing, not speakers. Attributing a cue means looking at the frames: whose face is visible, whose mouth is moving, who is off-frame. On EP01 S03–S04 that attribution came back **18 of 18 unresolved** — faces visible but lip motion not measurable from stills — so every speaker on that stretch is an inference, not a measurement. **Where ownership cannot be established, write `UNRESOLVED` per cue and report C3 as `BLOCKED`; do not fill it in from who seems likely to be talking.** An unresolved ledger is a request for denser frames or voice evidence, and it is a more useful artifact than a confident guess.
|
|
66
|
+
|
|
67
|
+
### Why this stage is the one that gets skipped
|
|
68
|
+
|
|
69
|
+
| | Subject frozen by digest | Verdict carries counts |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| 3 clip/prompt audits (`clip-01-r7`, `clip-01-r9`, `clip-03-r7-prompt`) | **yes, all three** | yes — probe duration, frame times, sha256 per reference |
|
|
72
|
+
| 4 script audits (`script-ep01-reaudit`, `-final-check`, `script-vs-source-ep01`, `-full`) | **none** | none — all four were written by reading |
|
|
73
|
+
|
|
74
|
+
Measured 2026-11-08: the same agent was rigorous on one side and impressionistic on the other, and the four prose verdicts used four different scales (`RENDER-CLEAN`, `verdicts`, `Verdict summary`, and one with no verdict at all) — which cannot be compared, which is what "it reports something different every time" was.
|
|
75
|
+
|
|
76
|
+
The difference is not skill. A render costs money, so the paid path grew a gate; an audit costs nothing, so it did not. **Transpose is the cheapest stage in Fission and therefore the one most likely to be done by reading** — which is why it needs the strictest gate, not the loosest.
|
|
77
|
+
|
|
78
|
+
**Never hand-copy a cue list that a saved transcript already holds.** Where this project did that, the EP01 evidence ended up with 47 cues against the saved transcript's 48 — the final cue missing entirely and the thirteen club cues off by up to **9 s** each, with invented speaker attributions. Three EP01 clips were cut from those numbers. Read cues from `media/transcripts/<sourceId>-<start>-<end>.json` and cite that filename in the header.
|
|
79
|
+
|
|
80
|
+
## 4. What the numbers cannot see — audit these by reading, once the eight counts are clean
|
|
81
|
+
|
|
82
|
+
1. **Meaning drift**: the line carries the right cue but the wrong force ("Everybody out" for "나가세요" flat "Get out"). Read each adapted line against the source gloss.
|
|
83
|
+
2. **Speaker in the frame**: a correct owner can still be lip-synced by the wrong body if the storyboard puts the line where only one other person is visible. Check the *clip plan*, not just the script — the mouth must belong to the speaker, or the speaker must be off-frame with no other mouth moving.
|
|
84
|
+
3. **Stake survival**: an event kept but its world convention lost (a "manager" who is no longer his manager) keeps the beat and kills the drama.
|
|
85
|
+
4. **Localisation completeness**: sweep both directions; every source proper noun mapped, and no adapted noun back-references the source world.
|
|
86
|
+
5. **Rhythm**: the order of set-up → turn → payoff must survive even when lines are merged; a merge that swallows a turn inverts the scene.
|
|
87
|
+
|
|
88
|
+
## 4b. Character state per shot — a ledger, not a reading
|
|
89
|
+
|
|
90
|
+
**Every character in every shot has a state, and the audit must check it.** Standing user rule (2026-11-09). State is what the body is wearing and how it is: dressed / undressed / wrapped in a sheet, which outfit, jacket on or off, shoes on or off, hair up or down, wet, injured, asleep / just woken, lying / sitting / standing, holding what, and where in the room.
|
|
91
|
+
|
|
92
|
+
The defect this exists to prevent, measured on EP02 Clip 03: Elena, just woken in bed, rendered **in her tweed jacket** — because the prompt said "already in the black tweed jacket" and locked her to the dressed sheet from her first appearance. The source and the script both had her undressed under the sheet. Nobody checked state; every count still passed.
|
|
93
|
+
|
|
94
|
+
Build `states.json` from the **source frames** (one row per shot × character):
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
{shot, start, end, character, wardrobe, body (dressed/bare/sheet-wrapped…), posture, holding, position}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Then three checks, reported as counts like the eight above:
|
|
101
|
+
|
|
102
|
+
| Check | Pass condition | Report |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| S1 state match | the adapted script's state for each scene equals the source frames (after the agreed localisation) | `state_mismatch=N`, each with shot time, source state, script state |
|
|
105
|
+
| S2 transitions | every change of state (dresses, undresses, wakes, picks up/sets down a prop) is in the script at its shot | `missing_transition=N` |
|
|
106
|
+
| S3 continuity | state carried across a cut, a clip seam or an episode seam is consistent (no jacket appearing between two shots of the same moment) | `state_break=N` |
|
|
107
|
+
|
|
108
|
+
Extend the header count line with `state_mismatch=0 missing_transition=0 state_break=0`. A script is not render-clean while any is non-zero.
|
|
109
|
+
|
|
110
|
+
**The same ledger audits the storyboard and every clip prompt** (see `depth-led-prompt`):
|
|
111
|
+
|
|
112
|
+
- Each prompt's identity block must give each character's **START state**, not just a position.
|
|
113
|
+
- A sheet is authority only for **the state it depicts**. A character whose state changes in the clip either gets one sheet per state, or the prompt says exactly which seconds the sheet's wardrobe applies to and what the character wears before or after. Writing "everything X wears comes from @Image N" for a clip where X is undressed for part of it is a defect.
|
|
114
|
+
- Compare each clip's timed states with `states.json` shot by shot before the render gate.
|
|
115
|
+
|
|
116
|
+
## 5. Gate
|
|
117
|
+
|
|
118
|
+
- **A script is render-clean** only when all eight counts are zero *and* the five reading checks above are answered with evidence. The audit header carries the count line verbatim — `cues=N lines=N merged_groups=N dropped=0 duplicated=0 added=0 reordered=0 misowned=0 illegal_merges=0 straddling=0 impure=0` — so a reader can tell a count from a reading. **An audit without that line was written by reading, whatever its verdict says**, and four such audits have already been filed on this project.
|
|
119
|
+
- **A clip is render-clean** only when its prompt contains exactly the lines the ledger assigns to its span, in order, once each, with the speaker visible (or off-frame and unmistakably off-frame), and its duration equals the measured span (rounded into the model's integer seconds).
|
|
120
|
+
- Never audit from a previous audit's summary. Re-measure, or say `unreviewed`.
|
|
121
|
+
|
|
122
|
+
## 6. Pin the subject, or two runs answer two questions
|
|
123
|
+
|
|
124
|
+
Counting is deterministic; the *audit around it* was not. Four EP01 script audits disagreed, and none of the disagreements were about the film:
|
|
125
|
+
|
|
126
|
+
| Cause | Evidence |
|
|
127
|
+
|---|---|
|
|
128
|
+
| The audited file was never frozen | `script-fission-v01.md` was rewritten **11:53**, after the `RENDER-CLEAN` verdict at **11:11**. No script audit recorded a digest of its target. |
|
|
129
|
+
| Findings were anchored to line numbers | One audit anchored its findings to **44 distinct line numbers** from `L15` to `L95`. The file has since moved under all of them: `L55` and `L88` are now blank, `L85` holds a Chase line from another scene, REPORTER moved from 55/56 to **57/58** and RYAN from 93 to **102**. |
|
|
130
|
+
| Scene IDs are not unique | `S01` and `S02` each occur **5 times** in that one file — once per episode — so an unqualified "S02" names five scenes. `S03`/`S04`/`S05` occur once each today and look safe only until EP02 grows a third scene. |
|
|
131
|
+
|
|
132
|
+
So three rules make a re-audit an actual re-run:
|
|
133
|
+
|
|
134
|
+
- **Freeze the subject.** The brief carries the script's `sha256sum`; the auditor re-runs it and **stops** if it differs. The audit header names file, digest and line count. Do not edit the script while an audit is open — if an edit is unavoidable, declare the open audit dead rather than comparing its verdict with the next one.
|
|
135
|
+
- **Anchor to the source, not the document.** Every finding cites a source cue timestamp and quotes enough adapted text to be found by `grep`: `cue 88.55 "…" → **RYAN:** "Jake. Your turn."`. A timestamp is a fact about the media and survives every rewrite; a line number is invalidated by any edit above it. A missing line is quoted from the source and marked `absent`.
|
|
136
|
+
- **Qualify every scene ID with its episode** — `EP01-S03`, never `S03`.
|
|
137
|
+
|
|
138
|
+
Report **one** of `PASS` / `FAIL` / `BLOCKED` per audited episode, plus the eight counts. `BLOCKED` means evidence was missing — say which. Prose verdicts and one-off labels like `RENDER-CLEAN` were each used once here and cannot be compared between runs. Note that `Estimated N seconds` in a scene header means the span was never measured — 8 of 13 headers in this file are still estimates, and those scenes are `BLOCKED` for duration, not `PASS`.
|
|
139
|
+
|
|
140
|
+
Re-reading a saved transcript costs nothing and bills nothing, but re-running `motion_transcribe_window` over a window that already has one risks a second cue numbering — reuse `media/transcripts/<sourceId>-<start>-<end>.json` and name it in the header.
|
|
141
|
+
|
|
142
|
+
## 7. Independence
|
|
143
|
+
|
|
144
|
+
The auditor must not be the author of the document. Give the auditor the source and the adaptation, not the author's reasoning, and require counts. A second pair of eyes that measures beats a first pair that remembers.
|
package/README.md
DELETED