Domain model
The identities, relationships and invariants behind conversations, music history and playback.
Keep these identities separate
| Entity | Owns | Must not be confused with |
|---|---|---|
| Project | The durable musical work and access policy | A single DAW file or a computer |
| Work Session | Conversation, objective, writable target and read references | A recording capture stream |
| Run | One execution attempt, approvals and checkpoints | The persistent conversation |
| Runtime | Capabilities, liveness and generation | The project it temporarily opens |
| Workspace | A materialized writable revision on a runtime | The immutable saved revision |
| Revision | Native content, dependency identity, lineage and provenance | A branch name or an audio-only bounce |
| Artifact | A playable or downloadable output tied to work | Permission to read all project source |
| Publication | A selected revision and playable asset with its own policy | A moving project head |
Relationship map
Project
1 project → many branches, revisions and Work Sessions
session owns attempts
Step 1 of 4.Work Session → agentRuns
1 session → many runs; a run carries its writable target
lease binds execution
Step 2 of 4.runtimeLeases → runtimeWorkspaces
Lease binds run + runtime + target; workspace records materialization
checkpoint references saved work
Step 3 of 4.projectRevisions → publications
Revision has parent lineage; many publications can reference it
Step 4 of 4.
| Relationship | Cardinality / constraint |
|---|---|
| Project → revision | One-to-many; each revision has one project |
| Revision → parents | Optional parent and merge parent; restore lineage is separate |
| Branch → head | Mutable pointer; promotion is explicit |
| Run → lease | Lease records bind a run; renewal and generation fence stale work |
| Publication → revision | One selected revision per publication; never implicitly follows head |
| Publication → feedback | Many attributed notes scoped to the published revision |
Invariants worth reviewing
- A Work Session owns intent, not a machine. Losing a runtime must not erase the thread.
- One run works against one authorized writable copy. References do not become writable targets.
- Saved content and lineage are immutable; labels, notes and branch pointers are separate mutable metadata.
- Playback permission does not imply source access, editing, spending or promotion permission.
Legacy names are not new domain concepts
The backend still contains legacy sessions, passes, chunks, Create conversations and song versions. A legacy session may mean a capture, whereas workSessions means the agent conversation. The product model does not require a risky storage rename.
Adapters and explicit legacy bindings preserve older identities. When tracing a bug, first determine which kind of session and version a route refers to; do not join records by a shared display name.
Source reference
Reviewed 2026-11-28 · repository snapshot bc569ea. Repository access may be required.