Development¶
Toolchain¶
Everything runs through uv and make:
uv sync # install everything, including dev tools
make ci # exactly what CI enforces: ruff check + format, pyright strict, pytest
make check # the everyday gate: lint, types, tests
make run-offline # start the studio with no credentials
make docs # serve this documentation locally
Optional but recommended:
The hooks mirror CI (ruff, ruff-format, pyright), so a clean commit means CI will not fail on lint or drift.
Quality bar¶
make cigreen before pushing. It is byte-for-byte the CI pipeline.- pyright runs strict. The one relaxation is
reportUnusedFunction, because route handlers and agent hooks are registered by decorator. - Tests are offline by construction.
ALLOW_MODEL_REQUESTS = Falseis set inconftest.py; useTestModel/FunctionModel, never a real provider. The suite runs in well under a second. - The validator's strictness is a feature. It is the project's measurement instrument (see Research). Loosening it requires showing what real error it was rejecting incorrectly.
Sharp edges¶
- The frontend is one file.
templates/index.htmlcontains the entire studio — markup, styles, and scripts. Smoke-test UI changes in a real browser againstmake run-offlinewith the console open; there is no frontend build step and no frontend test suite. - Streaming and retries interact subtly.
send_streamstreams part events out as SSE, but validator retries happen inside the run with normal non-streaming semantics — the UI sees a bounce notification, then a fresh stream. Keep that boundary intact when touchingsession.py. - Bar-duration math uses
Fractionthroughout. Floating point would quietly break tuplet and broken-rhythm checks.
Releasing¶
Trunk-based: work lands on main through PRs. To cut a release:
- Branch
chore/release-X.Y.Z; bumpversioninpyproject.toml; move the[Unreleased]section ofCHANGELOG.mdto[X.Y.Z] — date. - PR, merge, then tag:
git tag vX.Y.Z && git push origin vX.Y.Z. - The release workflow re-verifies (version ↔ tag ↔ changelog, full test suite), builds the sdist and wheel, and publishes a GitHub Release with generated notes.