S21: chant workspace as blocks spike (a workspace block reading chant's read contract) #70
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blocks: nothing yet (a milestone follows only on a go)
Blocks track. What it means to render a chant workspace (
~/dev/intentius/chant, or any directory with achant.workspace.json) as illogical blocks: members you can see, panes and agents opened on a member, and chant's gates and drift arriving as attention. illogical becomes one more reader of chant's read contract, beside hud and behold (chantws-017,ws-052: "a reader other than hud gets everything hud gets").The idea: a
Workspaceblock type (a newBlockTypevariant,crates/proto/src/lib.rs:575). The daemon runschant workspace … --jsonon the block's machine and draws the members. Every client gets the result throughdescribe,call, events and MCP.workspaceblock, the tab's indexbecause)dirworkspacemembergeneratedentries,check --generatedblockedBy,ready, drift on pins)chant runexits 3)ws-048)What the read contract gives today (checked 2026-10-02 against chant
6fcb9f34, 0.87.0, on chant's own workspace andreference-workspace/):workspace ls --jsonworks:$schema…/workspace/ls/v1,contract: 1, members, groups and a summary. About 1.2 s, 14 KB for chant's 26 members. This is enough to draw the cards.workspace status <env> --jsonworks: each member's latest release per env from thechant/lifecycleledger (…/status/v1). Read-only, never fetches.workspace check --format jsonworks (…/check/v1), with WSP diagnostics per member and file/line.check --jsonprints a different document:{lock, ok, findings, declaration}, with no$schema. The spike should use--format json.workspace records --jsonworks where the declaration names kinds (reference-workspace:…/records/v1, withblockedBy,ready,provenance,digest). W-002 comes backblockedBy: W-001 in-progress. On chant's own root it fails:--kind <kind file> is required, because the declaration names no record kinds, so--kind docs/design/decisions/…is needed there.workspace graph --jsonreturns the document, but on chant only members of kindchantrun. 25 of the 26 areotherand come backskippedwithkind-not-run, so the graph of chant's own repo is nearly empty. Inreference-workspacethedeliverymember failed withcommand-failed. That was my install (npm ci --ignore-scriptsleft the docker lexicon'sgenerated/unbuilt), not chant.workspace graph --intent <path> --jsonworks (…/intent/v1): the history, decisions and pinned artifacts behind one file. This fits a file or diff block (why is this line like this).workspace lineage --jsonfails without.chant/workspace.lock.json, and neither workspace has one.chant run <op> --json/--progress-json(NDJSON) andrun list/run statusexist per op, and pending gates live in the gate ledger (packages/core/src/lifecycle/gate-ledger.ts). But nothing lists every pending gate across members as one document. Neither checked workspace has an*.op.ts, so this is unexercised.Questions:
ls+status+check --format json+recordsalone, with nothing in chant changed?ws-021)? The workspace's ownnode_modules/.bin/chant, npx at the pinned version, or achanton PATH, and on a VM tab, the one on that machine. My first run failed outright because chant had nonode_modules(Cannot find package 'zod'). The block has to say so, not show an empty workspace.ws-017turned down a chant daemon). Re-read on file changes under the declared dirs, on a timer, or on demand? What does 4–5 reads per refresh cost?chant run statusper op, or ask chant for aworkspace gates --jsonread-contract document? The last is the right one if it's small. Draft that request for Jake to file on chant, don't file it.reference-workspace(4).ws-052: review actions, quorum, comment mode belong to hud)? Write down the line.Method: a standalone crate in
spikes/s21-chant-workspace. It shells out to chant, parses the documents against their published schemas (intentius.io/chant/schemas/workspace/*/v1), and prints the block'sdescribeJSON and a text rendering of the cards. Then wire one throwawayWorkspaceblock into a dev daemon (--socketexplicitly) on a branch, open it on~/dev/intentius/chantand onreference-workspace, and from a card open a terminal and an agent on one member. Fake a pending gate with a toy*.op.tsin a scratch copy ofreference-workspace.Done when: README with go/no-go; read timings; a list of what the block shows and which document each field comes from; the answers to questions 2–6; and a draft chant issue for anything we'd need from the read contract (gates,
check --jsonvs--format json).Done 2026-10-02: go. README with the numbers, answers and screenshots:
spikes/s21-chant-workspace/README.md(merged in636d01a). The throwaway block is on branchs21-workspace-block.workspace status <env> --jsonalready carries every member's pending gates with chant's approve command, so the "gates: no workspace-level read" above was wrong. No chant change is needed.needs_inputabout 1 s afterchant runexits. Approve runschant approveand clears it. Shell, Agent and Changes open on a member, and a nested workspace opens as a second block..bashrc). See #74.Follow-ups:
PLAN: "Workspaces track (S21, M34)".