Repository navigation
Closed
Labels
area:workspacechant workspace epic (#2525)boundariesEpic: boundaries between chant, hud, studio, behold and fountaindesignDesign or research note, no deliverable yet
Description
Part of #3145.
Direction
Studio keeps no authoritative storage; anything it stores is a local cache it can lose. Its author describes hud's SQLite as a session cache. Reading the schema, most of it is, and some of it isn't.
hud's daemon database (packages/daemon/src/store/db.ts, arugula-salad/hud 1068076)
| table | cache? | why |
|---|---|---|
sessions, events, event_drops, client_signals, spans, backend_logs, otlp_drops, tabs, chat_open_turns, chat_interrupted_turns |
yes | telemetry and live session state; losing it loses history a person could want, but nothing decided |
conversations (chat key to provider session) |
mostly | losing it loses resuming a chat; the transcript lives with the provider |
review_batches, review_answers |
no | review comments and the agent's disposition of each, kept deliberately "readable after the turn, after a reload and after a restart" (#180). This is review, which the session kind exists for |
intent_answers |
no | a person's answer per node while walking a region's intent graph, with who answered (#592). The comment says the records an answer leads to are in git; the answer itself isn't. The answers kind exists for this |
chat_authors |
no | which person prompted which turn (prompt hash, player, role). This is attribution for agent work |
turn_spend |
no | spend per player per turn; metering |
notes |
no | free text a person wrote |
listing, listing_cover |
no | whether the box is published, its title, line and cover image: box configuration |
Studio's lobby (lobby/server.mjs, accounts.mjs, metering.mjs)
JSON files under STUDIO_STATE: apps.json (which boxes exist, owner, repo, branch), accounts.json (passkeys, sealed Claude keys), usage.json (spend per month). None is a cache.
Proposal
Give each non-cache fact a home outside studio and hud:
- review batches and answers: session/review records (with the session-kind convergence in the design-kinds issue)
- intent-walk answers: the answers kind, with the walker as
by - turn attribution and spend: the run record (workspace: record what each agent run cost and which changes it made #3033), which already proposes cost and commits per run
- notes: a record kind (or lessons/proposals), written through
chant workspace records new - listing: a field on the box block, so publishing a box is a reviewed change
- lobby
apps.json: derived from the substrate, the way choudoufu derives ownership from tags: label each sprite or fountain sandbox with owner, repo and branch, and list them - lobby accounts and sealed keys: fountain's Vault rather than a studio file
- lobby usage: fountain's metering, which already meters runs
Then a test deletes hud's database and the lobby's state, restarts both, and checks that every decision, answer, review, attribution and app is still readable.
The hud-side and lobby-side changes are in those repos; this issue is the spec homes they write to.
Metadata
Metadata
Assignees
Labels
area:workspacechant workspace epic (#2525)boundariesEpic: boundaries between chant, hud, studio, behold and fountaindesignDesign or research note, no deliverable yet
Activity
lex00 commentedon Oct 1, 2026
The rule (lex00, 2026-10-01)
"Readable after a restart" should mean the work is already in the repo: written as files in a working branch, uncommitted until someone commits or applies it. A restart then re-reads the working tree. A database may index those files for speed, and losing it costs nothing.
Checked against hud
1068076: it doesn't do thisagent/reviews.tskeeps every batch, its comments and the agent's disposition of each (handled,skipped,needs-discussion, with a note) inreview_batches/review_answersonly. Thehud_review_answerMCP tool writes the same rows. Nothing is written to the working tree, so a review lives only in the box's SQLite file.POSTon the intent answers route (http/intent-route.ts:182) callsstore.setIntentAnswerand nothing else.chant workspace records amend(chant/box-intent-answer.ts, hud#640 / workspace: a box's intent is a decision record the box block names #2850).apply.mjs --recordsships hud's uncommitted record edits as a pull request, so uncommitted records in the working tree are already something studio handles.What that implies for the spec
chant workspace records new|amendinto the working tree of the active work branch (chant/work/<id>, or the box's checkout when no item is leased). No record exists only in a store.chant workspace statusorrecords) lists uncommitted records in the working tree, so hud, studio and behold show work in progress from the files alone.Hud's SQLite then holds telemetry and an index over records, which is a cache.
lex00 commentedon Oct 1, 2026
Implementation side: arugula-salad/hud#729 (unwind events.db), arugula-salad/hud#730 (hud writes only through chant), arugula-salad/studio#286 (lobby keeps no authoritative state), arugula-salad/studio#287 (factory reads and writes only through chant). Principle: #3158. Writer conformance: #3159. Uncommitted records in the read contract: #3160.
lex00 commentedon Oct 3, 2026
Status after the October hud/studio burn-down: done in chant 0.102.0 — attribution and spend as run records (#3033, ws-076; hud records each chat turn, studio each build), the listing as a box-block field read from graph --json (#3146, ws-077), and uncommitted records in the read contract (#3160). What remains for hud#729 and studio#286: a write command for the listing (#3308), review fields in the session kind (#3350), points for hud's intent-walk answers (#3351), an account home for the lobby's accounts (after #3163), and a read path or signed statement for lobby metering (#3192).
lex00 commentedon Oct 4, 2026
Done. Every fact this issue lists now has a home in the repo, written through chant, and each piece is merged on main:
chant workspace box listing set(workspace: a chant write command for a box's listing, so hud edits it through chant instead of editing chant.workspace.json #3308, PR feat(workspace): chant workspace box listing set writes a box's listing through chant #3395).chant workspace box publish(workspace: studio owns publishing and the listing is a fact in the repo; remove hud's env-injected apply glue #3165, PR feat(workspace): chant workspace box publish runs the box's declared publisher and checks its apply record #3405, ws-088).graph --intentlists the review sessions whosefollow_upsname a work item, so a builder'sChant-Record: work:<id>commit joins back to the review (workspace: graph --intent follows a review session's follow_ups to the work item, so a commit joins back to the review (E21) #3472, PR feat(workspace): graph --intent lists the review sessions whose follow_ups name a work item #3473).What remains is on the consumer side: arugula-salad/hud#729 (writing
follow_upswhen a review is kept, and person-written notes as lesson or proposal records per E20) and arugula-salad/studio#286 (the lobby leftovers named there).