# citefilm

> A Python command-line tool and Claude Code plugin that turns a YAML spec (scenes, narration, sources, facts) into a
> sourced explainer video, rendered locally: Kokoro text-to-speech, word-synced captions, fact cards, a world map and
> schematic 3D scenes (HyperFrames in headless Chrome), joined with FFmpeg. Every number on screen must be backed by
> a fact with a source and an exact quote.

Start with AGENTS.md (repository map, commands, conventions, how to add a scene type). The spec format is defined by
pydantic models in src/citefilm/spec.py and src/citefilm/visuals.py; schema/spec.schema.json is generated from them.
CLI: `citefilm build|validate|doctor|speed|agents|runtime|schema`, each with `--json`; exit codes 0 ok, 1 problems found,
2 invalid input, 3 tool missing or failed.

## Docs

- [README](README.md): what it does, example films, install, first film, limits, FAQ
- [AGENTS.md](AGENTS.md): repository map, exact commands, conventions, adding scene types and backends
- [Spec format](docs/spec.md): every top-level field, narration markup, anchors, sources and facts, outputs
- [Scene types](docs/scenes.md): card, map, rebuild3d and sources fields
- [Finding and quoting sources](docs/sources.md): primary sources, extracting exact quotes from PDFs, fact fields
- [Command line](docs/cli.md): commands, options, JSON output, exit codes
- [Speed modes and settings](docs/settings.md): fast / balanced / best, every setting and where it is read from
- [JSON Schema](schema/spec.schema.json): machine-readable spec format (draft 2020-12)

## Examples

- [Mars Climate Orbiter](examples/mars-climate-orbiter/spec.yaml): an 89-second spec with every scene type, from a NASA report
- [Gimli Glider](examples/gimli-glider/spec.yaml): 86 seconds; two maps, a list of arithmetic, an airliner in 3D
- [Point Nemo](examples/point-nemo/spec.yaml): 69 seconds; maps with routes and markers, a globe with an orbit, a British voice

## Claude Code plugin

- [Skills](skills/): make-explainer, fact-check, add-scene, render
- [Agents](agents/): researcher, scriptwriter, scene-planner, render-qa

## Optional

- [Contributing](CONTRIBUTING.md)
- [Changelog](CHANGELOG.md)
- [Third-party licences](THIRD_PARTY.md)
- [Security policy](SECURITY.md)
