Repository navigation
Developing
Working on clipper itself. CLAUDE.md in the repo has the full set of rules for code sessions;
this page is the short version.
clipper/ the package, one module per stage, cli.py wires them
clipper/prompts/ the prompt files, versioned, shipped inside the package; the version in use is set in clipper.toml
deploy/ bootstrap (new machine); compose stacks for the NAS hub (serve, bot, worker), the recorder, Kitsu and Claude; Windows task scripts for a GPU worker
streams/<id>/ one folder per stream: source, transcript, cuts, metadata, review state
clipper/defaults.toml every setting with its default, documented; config.py loads it (clipper.example.toml is a starter clipper.toml)
tests/ offline tests (pytest); CI runs them and ruff on every push
docs/wiki/ these pages; pushed to the wiki on every push to main
HANDOFF.md current state between work sessions (short); docs/log/ has the dated diary
studio/ the studio's working files: mockups, research notes, media-heavy reports (not the package)
reports/ the audits and the monthly analytics reports
- Every pipeline stage is a
clipper <stage>subcommand, wired inclipper/cli.py, one module per stage. A new pipeline stage is also a row inclipper/stages.py, which the worker andclipper runread. - Stages read and write files in
streams/<id>/and are idempotent. JSON state goes throughclipper/jsonstate.py. - Config: defaults in
clipper/config.py<clipper.toml<clipper.local.toml<CLIPPER_*env (Configuration). Useconfig.for_stream(cfg, sdir)whenever a stream is known;config.base(cfg)is the config before any override. A two-letter section alias (sc,rc,wc) only in a module that reads one section; elsewhere spell the section out. - Model calls go through
clipper/llm.py; the provider is the model string's prefix (Model providers). - Library code raises
ClipperError(clipper/errors.py); onlycli.mainexits. - Prompts are
clipper/prompts/<name>_<version>.md, inside the package ([paths] promptsadds a folder of your own, read first);prompts.VERSIONSnames the config key that holds each one's version (doctor and a test read it). Add a new version rather than editing one that produced reviewed output. - Kitsu is the record for review decisions; the bot and the war room act through
clipper/actions.py. - Stages print, services log. A
clipper <stage>prints its progress (the worker and serve copy a child's output intorun_<stage>.logandserve.log); serve, the bot, the worker and the recorder log throughlogging, neverprint. The processes share state through the streams folder: How the processes talk lists the locks, heartbeats, the DM outbox and serve's API, and which log answers which question.
Each step is checked by a test where it can be, so a missing one fails pytest, not a user:
- The parser and
cmd_<name>inclipper/cli.py, in its group'sadd_<group>, and the name inCOMMAND_GROUPS(test). - Its settings in
clipper/defaults.toml, a comment on each (that file is the documentation;config.DEFAULTSis it loaded; a None default is a commented line there plusconfig.NONE_DEFAULTS). Nothing machine- or show-specific in a default (test). - A pipeline stage is also a row in
clipper/stages.py(test). - A
clipper doctorcheck when it needs a key, a service or a file, with the fix in the message. - A wiki page or section, in the sidebar (test), and
wiki.page(...)links in its messages (test). - Tests for its pure logic in
tests/, and the cost printed before any model call it makes. A new module needs a test that names it (tests/test_modules_have_tests.pyfails otherwise).
uvx ruff@0.17.3 check clipper tests
.venv/Scripts/python.exe -m pytest -qTests are offline and take about 25 s; new pure logic gets a test. CI runs both on every
push, on Linux and Windows (.github/workflows/check.yml). The ruff rules are the defaults plus
the few selected in pyproject.toml ([tool.ruff.lint]). Try risky changes on a short test stream
first. Before merging a PR, wait for Copilot's automatic review and handle each comment.
Important
The wiki is built from docs/wiki/ in the repo: edit the pages there, in the same PR as the
code they describe. Edits made in the wiki's web editor are overwritten by the next push.
The wiki workflow (.github/workflows/wiki.yml) pushes the pages to the wiki when a change
lands on main. Images go in docs/wiki/images/ and are linked by their full wiki address
(https://github.com/byvfx/clipper/wiki/images/<file>). Callouts (> [!TIP], > [!WARNING]),
Mermaid diagrams and <kbd> keys all render.
- One file per page, flat:
Install-Windows.mdis the page "Install Windows"._Sidebar.mdand_Footer.mdare on every page. - Link pages wiki-style, without
.md:[Faces](Faces),[a section](War-room#faces). Link repo files with their full GitHub URL. -
tests/test_wiki.pychecks that every page link resolves and that the sidebar lists every page. - Keep the look plain: no emoji in headings or the sidebar, and no colours of our own in the Mermaid diagrams (GitHub's theme handles light and dark). The tabloid style belongs to the covers and the weekly, not to these pages.
Clippa keeps watch. You keep the final cut. · Docs site · Home · Getting started · clippa doctor · These pages are built from docs/wiki/ in the repo, so edits made here are overwritten: how to edit them
Run it
- Overview
- Getting started
- Roles and services
- Configuration
- Pipeline
- Review
- Reviewing
- War room
- Clippa messenger
- Scheduling and uploads
- Costs
- Checkup
- Bugs to remember
- Audit
- Backups
Install
- Install
- Install checklist
- Kitsu
- Discord app
- YouTube sign-in
- Windows
- macOS
- Transcribe on Modal
- NAS recorder
- NAS hub
- Claude on the NAS
- Agent on the NAS
- Phone access
- Model providers
- Model rollout
- Adding a show
- YouTube channel
Features
- Pre-shows
- Fetching VODs
- Speakers
- Faces
- Covers
- Cast library
- B-roll
- Clip art
- Weekly issue
- X posts
- TikTok
- News watcher
- Character pieces
- Documentaries
Research
Working on Clippa