Skip to content

Domain model

The identities, relationships and invariants behind conversations, music history and playback.

Keep these identities separate

EntityOwnsMust not be confused with
ProjectThe durable musical work and access policyA single DAW file or a computer
Work SessionConversation, objective, writable target and read referencesA recording capture stream
RunOne execution attempt, approvals and checkpointsThe persistent conversation
RuntimeCapabilities, liveness and generationThe project it temporarily opens
WorkspaceA materialized writable revision on a runtimeThe immutable saved revision
RevisionNative content, dependency identity, lineage and provenanceA branch name or an audio-only bounce
ArtifactA playable or downloadable output tied to workPermission to read all project source
PublicationA selected revision and playable asset with its own policyA moving project head

Relationship map

  1. Project

    1 project → many branches, revisions and Work Sessions

    session owns attempts

    Step 1 of 4.
  2. Work Session → agentRuns

    1 session → many runs; a run carries its writable target

    lease binds execution

    Step 2 of 4.
  3. runtimeLeases → runtimeWorkspaces

    Lease binds run + runtime + target; workspace records materialization

    checkpoint references saved work

    Step 3 of 4.
  4. projectRevisions → publications

    Revision has parent lineage; many publications can reference it

    Step 4 of 4.
Primary ownership path. Runs can create revisions; publications select an exact revision.
RelationshipCardinality / constraint
Project → revisionOne-to-many; each revision has one project
Revision → parentsOptional parent and merge parent; restore lineage is separate
Branch → headMutable pointer; promotion is explicit
Run → leaseLease records bind a run; renewal and generation fence stale work
Publication → revisionOne selected revision per publication; never implicitly follows head
Publication → feedbackMany 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.