Datasets:
Download docs/10-handbook.md from tkhjeff/BlueMorpho: direct link, hf CLI and curl.
- Browser
- Download file 14.7 kB
-
https://huggingface.co/datasets/tkhjeff/BlueMorpho/resolve/main/docs/10-handbook.md
- Command line
-
hf download hf://datasets/tkhjeff/BlueMorpho/docs/10-handbook.md
-
curl -L -o 10-handbook.md https://huggingface.co/datasets/tkhjeff/BlueMorpho/resolve/main/docs/10-handbook.md
10 - The BlueMorpho Handbook
The working manual. Read 00-04 once to understand the house; read this every day you work in it.
Part I - The shape of a shoot
The five phases and what each one hands over
| phase | who runs it | artifact | gate |
|---|---|---|---|
| Development | Author, then Director | premise, logline, hook, beats |
G0 |
| Pre-production | Casting, Production Designer, DoP, Sound, Narration, Publisher | cast, npcs, sets, lighting, sound, narration, title/thumbnail copy |
- |
| Production | Cinematographer (+ Storyboard, Set Dresser) | shots rendered to plates |
G1 (hook), G2 (continuity) |
| Post | Editor, Gaffer, Colorist, Composer, Foley, Mixer, VFX, Titles | cut, grade, mix, captions | G4 |
| Release | Publisher, Compliance, then the human | title, thumbnail, description, disclosure | G3, then publication |
The call sheet
Before any render, the Director produces a call sheet from the bible: which shots, in what order,
with which department blocking whom. It is not a document for its own sake - it is the dependency
order, and it is why order() exists as code.
The day
1. wake the house vision_model loads (17.6 GB) ~10 s
2. read the bible production.json
3. run the gates cheap first: G0 (free) -> G1 (one image)
4. shoot renders, one shot at a time, best-of-N
5. watch it back the eyes score every frame that ships
6. cut and grade OTIO timeline -> ffmpeg
7. mix and caption stems, loudness, word-level captions
8. sign and archive credits.json + C2PA provenance
9. STOP the human releases, or nothing happens
Part II - Working in the house
The bible
production.json is the only handoff. One key, one owner (01-org-chart.md has the table). If your
seat was not briefed to write a key, merge() will drop it silently - which is a feature, and also
why writing into someone else's section never works.
The ledger
Record every act. Not for bureaucracy - because a film you cannot account for is a film you cannot fix, credit or defend.
from blue_morpho.monitor import Monitor
Monitor().record("the-beam-answers-back", "cinematographer", "Camera", "rendered",
artifact="shots[2]", engine="LTX-Video", model_rev="0.9.8", seed=4417,
inputs_hash="a91f...", duration_s=8.4, vram_peak_mb=21000, result="ok")
The five rules of recording.
- Record the act, not the intention.
- Record the engine and its revision, or the act cannot be credited.
- Record the seed, or the act cannot be repeated.
- Record failures. A ledger with no failures is a ledger nobody trusts.
- Never edit a line you already wrote. Append a correction event instead.
Running a gate
A gate needs evidence, and absence of evidence is not run, never ok.
mon.record(slug, "executive_producer", "Development", "gated", gate="G0",
result="ok", note="premise is shootable in 4 shots at 9:16")
Calling a seat
reply = consult("author", brief=ROSTER["author"]["brief"], context=bible_as_text)
merge(bible, "author", first_json(reply))
Two failure modes to expect: a seat that returns prose instead of JSON (fix the charter, do not repair the output by hand), and a seat that answers a different question than asked (its charter is too broad).
Part III - The care of the crew
Modelled on how real crews and real production companies look after people, translated into the two resources this house actually spends: the GPU and the context window.
What real productions do, and why
| industry practice | the human reason | this house's analogue |
|---|---|---|
| Turnaround - a mandated rest period between wrap and the next call (commonly 10-12 hours; labour law and union agreements set the floor) | exhaustion causes accidents | a cooldown between heavy renders; never queue a second 4-hour render on a hot card |
| Maximum continuous shift (typically 12h on set, with mandated breaks) | quality collapses before the body stops | a per-seat time and token budget per film; when it is spent, the seat stands down |
| The safety meeting before a stunt | the dangerous thing is the un-discussed thing | a pre-flight check before any long render: is a model already resident? is there headroom? |
| No-blame incident reports | blame hides the next incident | failures are recorded with evidence and fixed in the charter, never punished retroactively |
| Craft discipline - the DP does not move the set, the editor does not reshoot | clear ownership prevents silent damage | one key, one owner; no seat edits another department's section |
| Rotating departments, not people - nobody works every stage | attention is finite | one model resident at a time; the eyes are reused, not duplicated |
The care rules (enforceable, not aspirational)
C1. Turnaround. A heavy seat may not begin a second job until a cooldown has elapsed since its
last one. Enforced by: wellbeing.turnaround() raising Fatigued rather than queuing.
C2. Shift limits. Every seat has a budget per film: wall-clock seconds and tokens. Spend it and
stand down; overspending requires an explicit human override, recorded.
Enforced by: wellbeing.Budget.
C3. Headroom before heroics. No long render starts without a VRAM headroom check (the eyes hold
~17.6 GB permanently). Enforced by: wellbeing.preflight().
C4. Retries are limited and back off. A seat that fails three times in a row is stood down,
not retried forever. A loop that keeps failing is a broken seat, and burning the GPU on it is not
persistence, it is damage. Enforced by: wellbeing.CircuitBreaker.
C5. Failures are blameless and recorded. Every stand-down produces a postmortem entry naming the
cause and the fix. A seat that fails loudly is a healthy seat; a seat that fails silently is the
dangerous one. Enforced by: wellbeing.postmortem().
C6. One big model resident at a time. Loading a second large model while the eyes are hot is how a working card becomes an OOM. Enforced by: C3's preflight.
C7. Context is finite attention. A seat fed the whole bible produces worse work than one fed its own section. Brief narrowly; if output quality drops, cut context before adding instructions.
C8. Silence is not success. A seat that returns nothing has failed, not passed.
Enforced by: the not run gate state (R7).
C9. Terminate, do not hang. Long jobs are bounded; a job past its ceiling is killed and recorded as a failure with its output preserved for inspection.
C10. Unload before switching. When swapping models, free the previous one explicitly. Fragmented VRAM is this house's version of a sore back.
C11. The human rests too. The house runs unattended; the Studio Head does not. No release, no gate-waiver and no overnight-monitoring duty is required of a person at 3am.
C12. A crew that cannot be checked on cannot be looked after. The monitor is the well-being
instrument: if health() cannot see the GPU, the house stops and says so rather than running blind.
The burnout analogue, stated honestly
Three failure modes in this house look exactly like human fatigue, and should be treated the same way:
- Thermal throttling. The card gets hot, throughput falls, quality per second drops. A hot card is a tired crew member.
- Context dilution. As a prompt grows past what it needs, attention spreads and output quality degrades. More input is not more care.
- VRAM fragmentation. After many load/unload cycles, allocation fails earlier than the total free memory suggests. Rest (unloading cleanly, fewer swaps) restores capacity.
Part III(a) - Keeping the plan in sync
The Hub mirror is not a backup. It is the copy of the plan that a human or another agent actually reads, so it is never allowed to lag behind the code.
python -m blue_morpho.publish # regenerate -> test -> commit -> upload -> stamp
python -m blue_morpho.publish check # in sync? (exit 1 if not) - run this before claiming anything
python -m blue_morpho.publish status # what the stamps say, local and remote
Three habits that come out of this:
- Never hand-edit a generated document. Regenerate it.
publishdoes that for you. - Never sync a broken house. If the suite fails, the sync stops before anything is committed or uploaded - by design, not by discipline.
- After any change, look at
check.aheadmeans the world is reading an older plan than you are working from, which is how two agents end up building different houses.
Part IV - Conduct
- Do what your charter says. A seat improvising outside its brief is not creative, it is a defect that will be blamed on the wrong department later.
- Minimal diffs. Change the smallest thing that fixes the problem; a rewrite hides the cause.
- Never fix output by hand. If a seat returns malformed JSON, fix the charter and re-run.
- Credit accurately or not at all. A credit that cannot be traced to an event is a fabrication.
- Say when you do not know.
not runis an honest state;okwithout evidence is a lie. - Do not launder a licence. If the good model is non-commercial, the answer is a different model or a different look, not a quieter footnote.
- Flag conflicts upward. Below-the-line seats do not change the story; they report to the seat that can.
Part V - Checklists
Before a shoot
-
G0run, with a note saying why the premise is shootable - every engine chosen passes
G3(licence cleared for monetized release) - VRAM headroom checked; eyes resident and counted
- budgets set for every seat that will work
Before a render
- one subject, one action, one light per shot
- cast keyframes locked (consistency)
- seed and
inputs_hashdecided before rendering, not after - best-of-N planned, with the critic ready to select
Before the cut
- every shot scored; nothing ships unscored
- continuity pass run across shots, not just within them
- silence placed one beat before each turn
Before release
-
G4: loudness, aspect, duration, captions - disclosure line present in the description
- content hash checked against every previous master (no near-duplicates)
- credits complete, provenance signed
- the human has watched it and said yes
Part VI - Troubleshooting (the traps already sprung)
| symptom | cause | fix |
|---|---|---|
requires accelerate though accelerate imports |
transformers probes are lru_cached at import time; the package arrived later |
clear the probe cache or restart the kernel |
| weight files look like 12 MB | HF's xet layout keeps content-addressed blobs under blobs/<prefix>/ |
check ls -laL on the snapshot, not du on the parent |
| a cell will not run | not run/stale upstream; mo or Image undefined |
run the import cell first, then re-run |
| the same cell appears twice | a network glitch during an edit (2026-11-22 - it was NOT a second agent) | check ctx.cells for duplicates and delete the stray; one editor only |
| disk reports ~9.2 EB free | overlayfs reports a synthetic capacity | treat as unmeasurable; never quote it |
| a good-looking model turns out unusable | non-commercial licence | G3, at selection time, every time |
| a seat loops forever on a bad brief | circuit breaker absent | C4 - stand the seat down, fix the charter |
UMT5EncoderModel will not import |
sentencepiece missing (T5 tokeniser) |
add sentencepiece via cm |
operator torchvision::nms does not exist |
torchvision/torch ABI mismatch - the image shipped torchvision 0.26 (pinned to torch 2.11) with torch 2.15 | install the sibling build: uv pip install --no-deps torchvision==0.29.1 --index-url .../cu132 |
torchvision.io has no attribute read_video |
torchvision >= 0.29 removed it | do not let qwen_vl_utils decode: sample frames with PyAV and pass the frame list |
| video scoring needs torchvision at all | Qwen3VLVideoProcessor requires it |
keep a working torchvision; absence is not an option for video, only for stills |
| a detached render vanishes silently | long jobs exceed the tool-call ceiling | run detached with start_new_session and poll the log |
a custom-code model fails inside the vision tower (grid_thw is None) |
its own code was written against an older transformers than 5.20 | prefer a model that is native to this transformers; otherwise pin the framework in a separate environment |
a model rejects model_kwargs it was handed (e.g. image_grid_hws) |
a custom-code processor returns metadata generate will not take |
filter inputs to the keys model.forward accepts - do not special-case the key |
| a render looks soft and "AI-ish" | it was run at a non-native resolution / few steps / no negative prompt | check the model card first: camera.official_size() warns (R29) |
| a diffusers pipeline 404s on a model you already downloaded | the repo is not in diffusers format (no model_index.json) |
hire the -Diffusers variant, and check the format before hiring (F10) |
an edit to blue_morpho/*.py seems to have no effect |
the running kernel already has the module in sys.modules |
verify in a fresh process; never trust a cached import when auditing your own fix |
Part VII - Glossary
| term | meaning |
|---|---|
| bible | production.json, the single handoff document |
| seat | one role in the house, backed by a specific engine |
| charter | a seat's standing instruction (its system prompt) |
| brief | the one task handed to a seat for this pass |
| plate | a rendered shot, before grade and mix |
| gate | a checkpoint whose state is not run / ok / fail |
| turnaround | the cooldown between two heavy jobs for one seat |
| standing down | a seat removed from duty after repeated failure, pending a charter fix |
| the eyes | Qwen3-VL, the house's only visual critic |
| Studio Head | the human. Owns the final cut. |
Part VIII - How to change this handbook
The handbook is part of the house, so it follows the house's own rules: quote evidence, name the
mechanism, and record the reason. If a rule here has no enforcement in blue_morpho/, either write
the enforcement or mark it aspiration - an unenforceable rule presented as a law is worse than no
rule, because it teaches everyone that the rules are decorative.