๐ŸŽฌ StoryMatrix SSOT

StoryMatrix turns a one-line prompt into a finished multimedia story โ€” planned and written by a crew of LLM agents, then produced into mixed stereo audio with narration, dialogue, sound effects and music, plus generated images and a timeline.

๐Ÿงญ Start here

I want toโ€ฆGo to
Install it and generate my first story๐Ÿƒ Runbook โ€” but read the warning below first
Understand how a prompt becomes audio๐ŸŽž๏ธ Production Pipeline
Configure a provider or change a defaultโš™๏ธ Configuration and ๐Ÿ”‘ Environment Variables
Look up a command or a flagโŒจ๏ธ CLI Reference
Fix an error I just hit๐Ÿš‘ Troubleshooting
Know what is broken and what is next๐Ÿ—บ๏ธ Roadmap

๐Ÿšจ Read this before you install

The minimal startup contract is repaired. The local SFX adapter now defers optional imports, and focused evidence demonstrates import-safe startup while keeping the SFX path enabled. Full generation remains evidence-blocked.

No pipeline run has ever completed on this checkout. The output directory is empty. Everything this wiki documents about output layout is read from the code that would write it, and every page that describes run artifacts says so explicitly.

The repaired B1 contract and the remaining evidence boundary are tracked on ๐Ÿ—บ๏ธ Roadmap.

๐Ÿ—‚๏ธ Sections

SectionWhat it covers
๐Ÿ—๏ธ ArchitectureLayering and dependency rules, the nine-stage pipeline, the agent crews, the audio chain, and the decisions behind them
๐Ÿ“š ReferenceCLI, HTTP API, configuration tree, environment variables, provider integrations, domain model
๐Ÿ› ๏ธ DevelopmentSetup, conventions, and how the test suite is organized and currently doing
๐Ÿš€ OperationsRunning it, observing it, and recovering when it breaks
๐Ÿ—บ๏ธ RoadmapBlockers, open work, what is proven done, what cannot be proven yet
๐Ÿ“œ HistoryDated decisions, real incidents, and where the pre-migration documents went

โšก What it is, technically

AspectDetail
LanguagePython 3.11+, CPU-only by design โ€” no GPU dependency in the required install
ArchitectureHexagonal / clean architecture; the domain layer depends on nothing
PipelineNine ordered stages with checkpoint-based resume
AgentsFour CrewAI crews; the story crew runs six agents across five tasks
Providers21 concrete adapters across seven categories; the wired subset is selectable by config, the rest exist but are unreachable
InterfacesA Typer CLI, a focused FastAPI service with repaired API/status contracts, and a NiceGUI web UI whose typed startup settings now resolve; full workflows remain separately scoped
PersistenceSQLite for content, plus filesystem-backed media assets
Observability19 Prometheus metric families and OpenTelemetry stage tracing
Cost controlAPP__DEV_LOCAL_ONLY=true forces local and mock adapters so paid providers are never called

๐Ÿ“Œ Status

LifecycleActive. Development runs through 2026-02 with open work tracked in-repo
HealthNot healthy. B2โ€“B12, the flaky suite, structural work, and evidence-blocked runs remain open
Test suite12 errors and 18 skipped of 458 non-skipped; passing count varies 391โ€“393 across identical runs
Written againstmaster at 9d810e1
Reviewed2026-08-02

Active and healthy are different claims. This project is under development and its documentation is current; its headline command does not work on a default install. Both things are true and this wiki says both.

โš ๏ธ Open questions & known gaps

Everything below was found by reading source, not by reading documentation. It is published here rather than quietly fixed, because the repository is not this wikiโ€™s to change.

๐Ÿ”ด Blockers

Six demonstrated source defects (B1, B13โ€“B17) are closed at their named contract boundaries; B2โ€“B12, the flaky suite, structural work, and evidence-blocked runs remain open. Full evidence and remediation notes are on ๐Ÿ—บ๏ธ Roadmap; symptom-first lookup is on ๐Ÿš‘ Troubleshooting.

IDSevSymptom
B1P0Minimal startup and optional local-SFX import boundary repaired; full generation remains unverified
B2P0The legacy story-crew fallback raises NameError on entry
B3P0The agentic timeline path never runs, and a fallback hides the error
B4P0The mock image service is abstract and cannot be constructed
B5P0Mock mode always fails the image-prompt crew at the LLM boundary
B6P1An async repository conversion never reached its callers
B7P1The golden-path fixture no longer satisfies its schema
B8P1A wiring fixture passes a string where a path is required
B9P1A repository annotates a type it never imports (latent)
B10P1Eighteen undefined names in src/
B11P2Untracked debris at the repository root
B12P2AGENTS.md names the wrong output directory
B13P1Web startup settings contract repaired; full browser workflow remains separately scoped
B14P0API dependency boundary and monitoring routes repaired
B15P0Typed CLI precedence and offline/low-resource safety contract repaired
B16P2Config-loader stdout debug noise removed
B17P1Status handler now matches the declared job-id response contract

๐Ÿ“› Documentation that contradicts the code

In every row the code is authoritative and this wiki follows it.

TopicWhat the code doesWhat the document saysWhere
Output rootDefaults to out/, and the shipped YAML sets it toooutputs/ is the active target and out/ is legacyAGENTS.md โ€” the wrong party; README.md agrees with the code
CompletenessEleven open blockers (B2โ€“B12); B1 and B13โ€“B17 are closed only at named focused boundariesโ€Phoenix Protocol 100% Completeโ€, โ€œproduction-gradeโ€README.md
Metrics coverageTracing reaches seven of nine major stagesโ€100% metrics coverage (14/14 stages)โ€œREADME.md
Install profilesThe minimal profile is an empty list โ€” it adds nothing, because every core dependency is already requiredFour profiles offered as meaningful choicesREADME.md
Config precedenceDefaults/environment, YAML, then explicit typed CLI overrides; one resolved object reaches consumersA simple four-tier override chainREADME.md, AGENTS.md โ€” stale about implementation details
Style guideThe file does not exist; docs/ is empty after the migrationโ€Follow docs/STYLE_GUIDE.mdโ€CONTRIBUTING.md
Task tracker sourcesBoth referenced files were deleted in the migrationCites a flaws document and a project-state YAMLCHECKLIST.md

๐ŸงŸ Code that exists but is never reached

Not bugs exactly โ€” but each is a claim the codebase makes and does not keep.

ThingState
config/yaml_precedence_validator.pyNever called by the config loader
api_cache.pyโ€™s @cached(ttl, namespace)Defined, with an example; no adapter imports or calls it
crew/timeline_crew.yaml at the crew rootDead โ€” the live file is the one under crew/configs/
crew/prompts/planner.md, reviewer.md, writer.mdUnreachable. The file: include mechanism exists in the crew factory, but every configured backstory is inline, so the loader never fires
crew/prompts/personas/*_author_template.mdUnreachable for the same reason; persona text is inline in the crew config
Crew tool registryRegistered and populated, but every tool returns a constant โ€” and the factory never passes tools into constructed agents, so they are not wired either
InteractiveStoryBuilder in cli/interactive.pyNo CLI flag or command invokes it
generate --story-mdAccepts a path and uses it only to bypass the missing-prompt guard; the file is never read
generate --min-similarity-scoreAccepted by the parser and then ignored; the global similarity option is the effective one
The docs install extraPulls a documentation generator that is vestigial now that documentation lives in this wiki

๐Ÿ”ง Interface defects worth knowing

IssueDetail
Status routeThe handler now accepts job_id only and returns the declared response shape; focused pending/ready coverage closes B17
Duplicate health routeOne explicit /health handler remains; focused API dispatch covers the liveness contract
Web UI startupTyped WebSettings now supplies title, dark mode, and reload; focused startup closes B13, while full browser workflow remains separately scoped

๐ŸŒ Non-portable and orphaned configuration

IssueDetail
Host-specific defaultsTwo provider defaults โ€” the Midjourney API URL and the Ollama base URL โ€” point at a specific machine. Treat them as placeholders and override them
Environment template drift.env.example lists names no code consumes, including ElevenLabs and DALLยทE variables under the wrong prefixes, several Chroma and web keys with no matching fields, a media-repository path, and a commented provider key. It also carries a stale host-specific value
Unprefixed configSome nested settings groups have no environment prefix, so they are YAML-only. They are documented as such rather than given invented variable names

โ“ Genuinely open questions

Not answerable from code, and deliberately not guessed:

  • No performance baseline exists. There is no reproducible measurement of generation latency, throughput or resource use, so the known image-generation bottleneck cannot be quantified beyond โ€œover ten minutes for two scenesโ€.
  • Which historical fixes actually reached verified production behaviour is unknown. Many items are ticked in the repositoryโ€™s tracker with no evidence beyond the tick, and no run completes here to check them. They are separated on the roadmap into proven, open, and evidence-blocked rather than being collapsed into one list.

Both are recorded in the ๐Ÿงพ Claim Registry as unsourced rather than asserted either way.

๐Ÿงพ How this wiki is kept honest

Every factual claim cites the code path it came from. Claims that can be machine-checked live in the ๐Ÿงพ Claim Registry with a lifecycle state and, where one exists, the test that proves them โ€” and a claim whose named test does not actually assert it stays marked disputed rather than being quietly promoted. Five claims are in exactly that state today.

Provenance for every page, and the fate of the 498 migrated documents, is on ๐Ÿงพ Evidence & Provenance.