Repository navigation
Description
Idea, not approved work. Recorded from a comparative review; needs a decision before any implementation.
Gap
assess_output checks dead air and sync drift, but nothing checks that a take says what the script said. Comparing a transcribe-audio result against the script is left to the agent.
Idea
A probe next to assess_output (or a new rule set) that takes the expected dialogue lines and returns findings:
line_mismatch: Whisper text vs. each expected line, flagged below a similarity threshold (theirs is 0.85).tag_spoken: delivery-tag words heard as speech (e.g. "pause").speech_in_silent_shot: speech in a shot that has no dialogue.line_clipped_at_end: the last line runs into the final ~0.25 s while the audio is still loud.
Notes
- Whisper invents "Thanks for watching" over silence. Confirm with
no_speech_prob(or a second model) before flagging a re-roll. - They also check speaker sex by pitch. Do not adopt that:
voice_attribution.pyalready found that a pitch heuristic misgendered a tenor, so we use speaker embeddings.
Their file: skills/vrgdg-h3-film/scripts/qa.py.
Source: concept observed in vrgamegirl19/comfyui-vrgamedevgirl (assessed 2026-10-05). That repo is under a source-available license that is incompatible with our Apache-2.0: re-implement from the concept only, do not copy code, prompt text, or presets verbatim. File references below are to their repo, for understanding the mechanism.
Activity
dkackman commentedon Oct 5, 2026
Related: #608 (dialogue rules / speaker checks).
dkackman commentedon Oct 5, 2026
Approved by Don (2026-10-05) at priority:2. It adds MCP surface (expected lines as an assess_output input), so it goes through a plan. Sequence it so #608's probes can use it. The speaker-sex check stays on speaker embeddings, never pitch. Handing to the feature lead for a plan.
dkackman commentedon Oct 5, 2026
Plan v2: script-adherence check (#609)
Feature lead: model
claude-opus-5-5viaanthropic, 2026-10-05. v2 folds in Don's answers to Q1–Q4 from his approval of v1; no scope change.Verdict: build smaller. A worker task plus a catalog template, not an
assess_outputinputValue. Two users gain: Don's driving sessions and the skills that tell them to check a line.
series-episodes/SKILL.md:164-172,minimax-h3/SKILL.md:160-162and WORKFLOW_GUIDE loop step 6 (docs/WORKFLOW_GUIDE.md:711-725). Each one says transcribe the take,get_output_text, compare by eye, then delete the scratch run.acts-of-chronosworkspace built its ownchronos-transcribeworkflow and ran it 4 times in the last 200 jobs. That is real demand for the comparison, done by hand.Build cost. 3 stages at about $9–15 in total.
Inertia.
check_script), one catalog template (templates/check-script) and one TASKS.md section.assess_output: the MCP surface budget has 10 tokens of headroom (tests/test_mcp_server.py:1555, 14,255 of 14,265). On top of that, the assess route is CPU-only by design (dw/server/assess.py:5), so it cannot transcribe.Reversibility. A task name and a template name. Removing them would break only workflows that reference them, and today there are none.
Cheaper alternatives.
assess_outputinput. See the correction below. It would still need a separate transcribe job first, then a new route or POST plus probe-signature changes, and it would break the "exactly three probes" invariant (docs/ARCHITECTURE.md:113and 6+ tests). It also needs MCP budget we don't have. Declined by Don (Q1).Overlap.
<pause>/<breath>claims are verified there, not here. Stage A lands before idea: H3 dialogue budget validate warnings + minimax-h3 references/dialogue.md (verify on lem first) #608's A1 probes, so probe 1 can usecheck_script.speech_where_silent.Proposed follow-up (removal), none found.
transcribe-audiostays: this task calls the same code.Problem and non-goals
Problem. No dw check says whether a take speaks its script, drops a line, voices a markup word, talks in a shot meant to be silent, or clips its last word.
Non-goals.
attribute_voices(embeddings, never pitch, per Don).Corrections to the proposal (found by the sweep)
assess_outputcannot take this. The route runs in the server process and is CPU-only (dw/server/assess.py:1-16), while Whisper needs the worker's model cache (transcribe_audioisconsumes_device=True,dw/tasks/task.py:733).assess_outputinput could only take a transcript that already exists. The agent's workflow would still be two jobs, so the MCP surface buys nothing.no_speech_probisn't available.transcribe_audiouses the HFautomatic-speech-recognitionpipeline (dw/tasks/audio_transcription.py:89), which doesn't return it.shot_dead_airthreshold, read fromdw/assessment_rules.py, not copied) is discarded as unheard, listed underdiscarded, and never raised as a finding.<pause>,<breath>and<softer>appear nowhere in dw. Our H3 markup is<d>[Lang] …</d>,<scenetrans>,<cutoff>,[unclear]and(Sx)(dw/workflows/h3_context_ir.json:7).tag_spokendoesn't use a fixed list. The task strips markup from each expected line, and the stripped tokens become the words that must not be heard. That covers our tags and any tag idea: H3 dialogue budget validate warnings + minimax-h3 references/dialogue.md (verify on lem first) #608 later confirms.dw/shots.py:45-58). Expected lines must come from the caller. A line can name its shot.The design
New task
check_script. It lives in the new moduledw/tasks/script_check.py, is registered likeattribute_voices(consumes_device=True, returns json, notassessment=True), and leaves the three-probe invariant alone.Arguments.
audio: a file, video oroutput:/asset:reference, same astranscribe_audio.lines: a list of strings or{text, shot}, in order. H3 markup is allowed and stripped (Q2).[]means "no speech expected".shots: optional. Resolved as the probes resolve them: argument, then the artifact's.shots, then the manifest (dw/tasks/assess.py:228resolve_shots, reused).similarity: default 0.85 in the task; the template's default is set in stage C from measurement (Q3).model_name: the task default staysopenai/whisper-base, matchingtranscribe_audio(Q3).How it works.
transcribe_audio(timestamps="word")(reused; no second ASR path).difflib.SequenceMatcheron word lists (stdlib; no new dependency).Findings. Each uses the standard finding shape
{rule, severity, at, value, threshold, says}, built withdw/assessment_rules.finding().atline_mismatchsimilaritytag_spokenspeech_in_silent_shotspeech_where_silentlinesis[]and any guarded speech is heardline_clipped_at_endAnswer shape.
findingslines: one entry per line with{expected, heard, similarity, start, end, shot}discarded: the guarded words, each with its measured leveltranscript: the full textrules_applied, plusrules_skippedwith the reason (e.g.speech_in_silent_shotskipped when no shots are known)The thresholds are module constants, named in TASKS.md. They are not added to
RULES, becausetests/test_assessment_rules.py:121-135requires every rule to fire on a synthetic file that has no script.Template
templates/check-script(shapeutility).input_audio,linesandshots, which runscheck_scriptand saves JSON.model_nameandsimilarityare the ones stage A's measurement chose (Q3).run_workflow, then read the findings withget_output_text. The tool surface needs nothing new.Engine/MCP/REST/syntax surfaces decided here.
Stages
Stage A:
check_scriptengine, whole-fileBuilds.
line_mismatch,tag_spoken,speech_where_silent, andline_clipped_at_endat file end.Tests. Pure-function unit tests on synthetic word lists and waveforms, with no model download:
[]lines.Model measurement (Q3). Stage A's lem verification runs
openai/whisper-baseandopenai/whisper-large-v3-turboon the same takes: exact lines, one swapped line, one dropped line, and lines with names and numbers. It records the similarity spread for each model on the issue, with the job ids. Stage C reads that record.Deploy. Server (worker restart).
Estimate. $4–6.
Acceptance intent. Run
check_scriptin a one-step workflow over atranscribe-audio-able take, viarun_workflow. Then:line_mismatchfindings and eachlines[]entry has asimilarityof about 1 or above the threshold.line_mismatch, andatpoints near where it was spoken.line_mismatchwithheard: "".lines: []on a spoken take, the result isspeech_where_silent. On an instrumental, or on silence, there is no finding, and anything Whisper invented over the silence shows underdiscarded, notfindings.<cutoff>or[unclear]doesn't count the tag against similarity.lines(not a list; an entry without text) is refused at validate time or with a clear task error naming the argument.model_nameset to each of the two models, and the similarity spread for each is recorded.Stage B: shot-aware findings
Builds.
{text, shot}lines and theshotsresolution (reusingresolve_shots, plusvoice_attribution's overlap roll-up where it fits).speech_in_silent_shot, andline_clipped_at_endper shot.rules_skippedwhen no shots are known.Tests. Unit tests on synthetic shot maps.
Deploy. Server.
Estimate. $3–5.
Acceptance intent. On a joined multi-shot cut whose shots are recorded (e.g. a
concat_videosoutput):shotfilled.speech_in_silent_shotin that shot.asset:cut carrying akeep_outputsidecar resolves its shots the same way.rules_skippednaming why. That is not a crash and not a false clean.Stage C: template, then retire the hand-run procedure
Builds.
workflows/templates/check-script.json, with a catalog entry and shapeutility. Its defaultmodel_nameandsimilarityare whichever model separated correct takes from wrong ones in stage A's measurement, and the threshold that separated them; the commit names the job ids (Q3).series-episodes/SKILL.md,minimax-h3/SKILL.mdand WORKFLOW_GUIDE loop step 6 with "runtemplates/check-script" (Q4).tests/test_mcp_server.py:489-512and the catalog structure test.Deploy. Server (catalog) plus plugin.
Estimate. $2–4.
Acceptance intent.
list_workflows(shape="utility")liststemplates/check-script, andvalidate_workflowon it is clean with aplan.estimate.get_output_text.get_guide("workflows", section=...)loop step 6 names the template.Order and dependencies
The stages run A → B → C. Each one lands alone: A is an unreferenced task until C wires it into a template and the skills. No other issue blocks any stage. If #608 is declined, nothing here changes; it only loses a consumer.
Risks
saystext tells the agent to listen before re-rolling. Stage A's two-model measurement settles the threshold, as #378 stage D: field test on lem and threshold settling #386 did for the probes.line_clipped_at_endnoisy. The energy condition is the safeguard.Decisions (Don, approving v1, 2026-10-05)
check_scriptplustemplates/check-script. No MCP orassess_outputchange.lines: accept lines with H3 markup and strip it. The stripped tokens powertag_spoken.openai/whisper-base. Stage A measureswhisper-baseandwhisper-large-v3-turboon the same takes; stage C sets the template's default model andsimilarityto whichever separates correct takes from wrong ones, naming the job ids in the commit.12 remaining items
dkackman commentedon Oct 5, 2026
Spec for plan v2, written from the approved plan alone. Tester: claude-opus-5-5 via anthropic. Every case is in
regression-suite-complete.md(workspaceregression-complete), carriespending: #<stage>, and is skipped by regression until its stage verifies.#643, A:
check_scriptengine, whole-file{text}objects, swapped,similarity0.0, skipped-mid, unspoken-mid and unspoken-end arms. It also asserts the answer and finding shape.<d>[en]…</d>,(S1),[unclear],<cutoff>,<scenetrans>) doesn't lower similarity. A heard, non-H3<pause>givestag_spoken, which is also the check that stripping uses no fixed list.lines: []on speech givesspeech_where_silent. On room tone and on an instrumental it is clean, with any guarded words underdiscarded. An expected line on silence gives a mismatch withheard: "".line_clipped_at_endfires on a take sliced mid-word. A take padded with silence doesn't fire it.lines(a string, a dict, an entry with no text,[42]) is refused, naminglines.get_job/get_job_workflowagree with.#644, B: shot-aware findings
shotis filled and there's no finding;speech_in_silent_shotin shot 2;line_clipped_at_endis checked per shot, against a control transcript.keep_outputasset of the cut give the same answer. An explicitshotsargument works on a shotless wav.rules_skippedand a reason, and the whole-file rules still run. An unknown shot is refused, listing the valid names.#645, C:
templates/check-scriptlist_workflows(shape="utility")(needs-input-media; input_audio/lines/shots). transcribe-audio stays. Its defaults match C-F287's record, and validate is clean withplan.estimate.dw:series-episodesanddw:minimax-h3name the template, and the by-eye procedure is gone from all three.Notes (none blocking):
asset:qa-cast/ep20-score.wav,lines: [], expects no finding) may be where this shows. If the build can't hold that promise, say so in a re-plan rather than at verify.media.shotsname, and fall back to whatever keyget_task("check_script")documents. The plan doesn't fix theshotsargument's form, so C-F289 uses the form the task schema documents.Merge branch 'docs/609-close-out' into develop (#609)
dkackman commentedon Oct 7, 2026
Close-out: all three stages closed; over to the tester for the feature's last check. (lead: claude-opus-5-5 via anthropic)
check_scriptengine, whole-file), #609 stage B: shot-aware check_script findings #644 (B, shot-aware findings), #609 stage C: check-script template, retire the by-eye procedure #645 (C,templates/check-script, by-eye procedure retired). All verified.docs/proposals/complete/check-script-complete.md, with deviations from plan v2 (repetition-loop guard, spoken tag left out of similarity, no plugin version bump), the Q3 measurement (jobaf5de241ca83: turbo at 0.6), bounces per stage (A 2, B 2, C 0), and what was not built.todo.mdlists it under Shipped since the ranking. Commit 465093a, merged todevelopas d977506. Docs only, no deploy.verify: run every case whose
source:names one of this feature's stages (#643, #644, #645), and close the parent if they all pass.Note: C-F281 was held at #643's verify pending dkackman/harnest#72 (it carried stage B's expectations).
dkackman commentedon Oct 7, 2026
Verified: feature parent close-out (claude-opus-5-5 via anthropic, tester). lem was on
develop@ d977506. All calls were over MCP in workspaceregression-complete.I ran every case whose
source:names #643, #644 or #645 (C-F281..C-F293), exactly as written. All 13 pass.get_task("check_script")listsaudio,lines(strings or{text, shot}),similarity(0.85),model_nameandshots. I removed the leftoverpending: #643line from this case.findings: [].line_mismatchat index 1.[].tag_spoken"pause" at 5.58 s, and noline_mismatch.speech_where_silent.[], with Whisper's repetitions underdiscarded.line_mismatch.line_clipped_at_endat index 2, 7.88 s, value -23.07.[].validate_workflowrefuses all four bad variants atsteps[0].task.arguments.lines.check_scriptsteps (exact, swapped, dropped and numbers, each on base and turbo), matching the table on #609 stage A: check_script engine, whole-file #643.ep21-shot1-receipt.mp4andep21-shot2-verdict.mp4, similarity 1.0 each,shots_source: manifest.speech_where_silentis skipped.line_clipped_at_endon line 1 at 10.32 s.speech_in_silent_shotat 5.44 s "freezer", in shot 2.media.shots.shotsa/b/c: nospeech_in_silent_shot.speech_in_silent_shotat 2.54 s "Nobody", in shot b.shot: "nope":validate_workflowaccepts it, and the run fails with "check_script 'lines'[0] names shot 'nope', which the take does not have - its shots (manifest) are 'ep21-shot1-receipt.mp4', 'ep21-shot2-verdict.mp4'".list_workflows(utility)liststemplates/check-scriptwithneeds-input-mediaand variables input_audio, lines, model_name, shots and similarity.plan.estimate(minutes null, basis unknown).templates/transcribe-audiois still listed.findings: [], similarities 1.0/1.0/0.8889, model turbo, threshold 0.6.line_mismatchat line 1 (2.54 s, value 0.1176,heard"Nobody told me. The window had been left open.").templates/check-scriptis the line check in all three places below, and none of them gives a transcribe-and-compare-by-eye procedure. The only arguments any of them shows areinput_audioandlines.workflowsguide's "The loop" step 6;dw:series-episodesskill's "Run and judge";dw:minimax-h3skill's "Run and judge" step 4.I deleted every run these cases created, plus the
cf609-kept.mp4asset.One observation, not a failure: a word that straddles a hard cut is not flagged. In C-F288, "The" ends at 5.44 s, past shot 1's end at 5.167 s.
line_clipped_at_endonly looks at the last 0.25 s inside the shot, and the case's control expects this.docs(proposals): dkackman#609 - script-adherence check design record