Decode
Decode should never feel like a chatbot. Eight departments generate, evaluate, and revise their own work against versioned artifacts, so a person can inspect, edit, or regenerate any single piece without re-running the whole project.
Input
Production brief
v3 · from paper
Departments
● building8
departments, one orchestrator
3-step
generate / evaluate / revise loop
SSE
resumable execution stream
Problem
Turning a research paper into a good educational video is a production job—structuring the argument, writing narration, planning visuals, timing them against voice—not a single generation step. Most AI tools compress that into one prompt and one output, which means no draft is inspectable and no single scene can be fixed without redoing everything around it.
Why it matters
The goal is software that feels like directing a production team, not typing into a chat box. Every department—Intake, Architect, Author, Visualizer, Renderer, Composer, Reviewer, Publisher—owns one responsibility, exposes what it received and produced, and hands off through a versioned artifact rather than a hidden internal state.
Architecture
- 01Production brief
- 02Teaching plan
- 03Scene script
- 04Visual specification
- 05Rendered assets
- 06Timeline
- 07Review report
Technical challenges
Keeping departments isolated
Context is scoped per department by design: the Reviewer never touches the original PDF, the Renderer never sees the full paper. Smaller context cuts token cost, latency, and hallucination surface.
Regenerating without restarting
Artifacts are versioned against their parents, so changing one scene's script only invalidates that scene's downstream visuals and timeline—not the rest of the project.
Bounding agent autonomy
Each department's evaluate/revise loop runs inside a fixed retry budget. Exceeding it escalates to a human instead of continuing silently.
Tradeoffs
Artifact handoffs over direct department-to-department calls
Routing everything through the Project Manager keeps each department replaceable and every handoff inspectable.
Bounded loops over autonomous recursion
Each department can generate, evaluate, and revise within a known budget before escalating to a human.
PostgreSQL and Redis over a new orchestration platform
Durable, well-understood primitives while the department contracts are still evolving.
Experiments
- 01Exercised generate/evaluate/revise loops per department with bounded retries and explicit human escalation.
- 02Regenerated downstream artifacts after changing a single upstream artifact.
- 03Interrupted workers and SSE connections to validate recovery and resume behavior.
Results
Working orchestration across all eight departments, coordinated through one Project Manager.
Evaluation loops (generate → evaluate → revise → approve) running per department with bounded retries.
The research-paper-to-video pipeline itself—Author through Publisher producing a finished video—is still being built.
Lessons learned
- Agent autonomy needs a durable contract with the rest of the system, not just a capable model.
- Context isolation is a reliability feature, not just a cost optimization.
- A recoverable, inspectable workflow is worth more early than a flashier but opaque end-to-end demo.
Future work
- Ship the full paper-to-video pipeline end to end.
- Extend beyond video to interactive lessons, quizzes, flashcards, and podcasts from the same artifact graph.
- Add operator views for artifact diffs, cost tracking, and dependency invalidation.