Skip to content

decision: the repo is the database: every durable workspace fact is a file in the repo, written through chant #3158

Closed

Description

@lex00

Part of #3145.

Principle (lex00, 2026-10-01)

The point of the workspace spec is that the repo is the database. Every durable fact about a workspace is a file in the repo, and every tool built on the spec (hud, studio, behold, an agent) reads and writes those facts through chant. A tool may keep a cache or an index; it never keeps a fact the repo doesn't have.

Why this needs a decision

ws-052 already holds readers to the read contract: a reader reads only through chant and writes nothing, and hud runs that suite (reader-conformance.test.ts). Nothing holds writers to anything. In practice a box's durable facts are split:

What to decide (a ws- record)

  1. What counts as a fact: anything a person or agent decided, answered, reviewed, approved, wrote, or was attributed with, and any configuration of a box or member. Facts live in the repo.
  2. Where work in progress lives: as files in the working tree of the active work branch (chant/work/<id>, or the box's checkout when nothing is leased), uncommitted until someone commits or applies it. "Readable after a restart" means re-read from the working tree.
  3. Where append-only history lives: the ledger branch (chant/lifecycle, leases, gates, runs), as today.
  4. What may live outside the repo, and only these:
    • secrets, held by a broker or vault and named in the declaration (box.capabilities)
    • telemetry and other observations of a running system, which may be lossy
    • caches and indexes rebuildable from the repo
    • runtime state of the substrate itself (a sprite's disk, a fountain conversation's transcript, pinned from records by hash)
  5. How writes happen: only through chant's write contract (records new|amend|close|review, points ask|answer, work leases, workEvidence, workspace upgrade), never by a tool writing record files itself or keeping them elsewhere.
  6. How it's checked: writer conformance (workspace conformance: a writer suite (writes only through chant, every file change chant's, amnesia test) #3159) and an amnesia test: delete every store a tool keeps, restart it, and every fact is still readable.

Done when

The decision is recorded, workspace-declaration.mdx and the read-contract page link it, and hud and studio cite it in their contributing docs.

Activity

  1. added
    design
    area:workspace
    boundaries
    on Oct 1, 2026
  2. lex00 commented on Oct 3, 2026

    @lex00
    ContributorAuthor

    Recorded as ws-074 in #3291, written through chant workspace records new. Options weighed besides the chosen one: per-tool stores copied into the repo later, a service as source of truth with the repo as a projection, tools writing record files themselves against the schemas, and committing on every write; each is kept under rejected with its reason. The declaration page, the read contract's Writing records section and the boundary page's rules link it. The read contract says nothing new about uncommitted records; that stays with #3160. The contributing-doc citations in hud and studio land in arugula-salad/hud#730 and arugula-salad/studio#287.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workspaceboundariesdesign

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions