RISE Framework Specification References: Spec 77 (Real-Time Design Bridge), Spec 74 (Web Designer), Spec 73 (MCP Server), Spec 80 (ERDF), Spec 81 (SQDF), Spec 82 (SYSDF, the view)
Spec ID: 83
Version: 1.0
Status: landed — protocol 0.1.15 (stage/: tours, marks, boxes, the review), hub 0.1.7 (stage rooms, the marks relay, GET /stage/<name>), client 0.1.4 (joinStage, emitStep/emitLoad/emitControl/emitContext/emitMarks), react 0.1.7 (createStageSession, useStage, browserVoice, browserDictation), canvas 0.1.6 (StageOverlay, StageCaption, MarkComposer, MarkThread, MarksPanel), cli 0.1.5 (smcx stage, smcx marks), mcp 0.4.0 (9 stage tools), skills 0.5.0 (stateloom-stage), web 0.3.0 (the stage on every board, /api/marks)
Implementation: TypeScript — bridge-protocol/src/stage/, bridge/src/hub.ts, bridge-client/src/client.ts, bridge-react/src/{stage,useStage,speech}.ts, bridge-canvas/src/{StageOverlay,StageCaption,MarkCards}.tsx, cli/src/commands/stage.ts, mcp/src/stage.ts, web/src/components/stage/, web/src/app/api/marks/route.ts
Origin: Guillaume, 2026-10-18: “the agent should be capable of controlling which diagram is currently showing up, because it’s his job to actually show us the work … pretty much like they would prepare something that plays back, like a PowerPoint presentation … And also, it would be nice at the reverse, if we select something on the diagram, any diagram, and we would need to give some marks or some annotation to advise the agent of what are we currently being selecting or in context.”
What the stage and the marks enable people to create: A conversation held over the drawings themselves. The agent shows its work where it lives — this drawing, these elements, this sentence — and can prepare the explanation as a walkthrough anyone plays later. The person answers by pointing: an element or an area of any drawing, and what they want the agent to know about it. The agent reads what was pointed at before it replies, and its answer stays on the drawing where the question was raised.
Desired Outcomes:
.tour.json) the canvas plays back with its own controls and, when the person wants it, a voiceSpec 82 gave the agent show: open a member of a system, focus one element. Watching sessions use
it, three things were missing:
The other direction had nothing at all. A person reading a sequence wanted to say “these two
messages — why?” and could only type the names into a prompt, by hand, hoping to spell them as
the document does. A mark is that pointing, made on the drawing, in the document’s own names, and
kept where it was made. The words match @miadi/annotate-core — a review of a drawing reads like
a review of an agent’s reply (comment, looks_good, delete, plus question for what an agent
asks).
{ "doc": "elliott_wave_count.smdf.json", "system": "elliott_wave_count.sysdf.json",
"focus": "state:Published", "spotlight": ["state:Published", "event:Evaluate"],
"region": { "x": 120, "y": 80, "width": 460, "height": 220 },
"title": "Where the count must be", "say": "The count must be Published before Evaluate can leave it.",
"audio": "https://…/voice/audio/…mp3", "holdMs": 6000 }
doc the drawing to open; absent, whatever is open stays. system: open it as a member, so the strip stays.focus one element, selected and centred by the workspace’s own focus (Spec 82’s focus=).spotlight several elements lit while the rest dims; the view fits them.region an area in the drawing’s coordinates, framed and fitted.say the words — the caption, and what a voice reads. title a few words over it.audio a recording of say to play instead of the canvas’s voice (an agent’s own voice service renders it).holdMs how long the step stays during play when nothing is heard; default stepHoldMs (400 ms a word, 2.5–20 s).Element names are the focus names of Spec 82: state:, event:, entity:, attribute:E.a,
participant:, message:9, machine:, object:.
<name>.tour.json{ "settings": { "namespace": "jgt.trading", "name": "Why the walk stops", "notes": "…", "author": "Mia" },
"steps": [ { "doc": "wave_count_to_entry.sqdf.json", "spotlight": ["message:7"], "say": "…" }, { "focus": "state:Published", "say": "…" } ] }
Paths are relative to the tour file (resolveTourPaths), so a tour moves with its drawings. A step
without doc stays on the previous step’s drawing (stepDocs); a system carries forward the same
way. Never listed as a drawing (isLoomSidecar).
| Rule | Description |
|---|---|
| T001 | a tour has a name |
| T002 | a tour has at least one step |
| T003 | a step says something (say) |
| T004 | focus is <kind>:<name> |
| T005 | each spotlight entry is <kind>:<name> |
| T006 | region is a box with a positive size |
| T007 | doc names a .json drawing, system a .sysdf.json |
| T008 | holdMs is 0 or more |
| T009 | audio is an http(s) URL or an absolute path |
<drawing>.marks.json{ "doc": "elliott_wave_count.smdf.json",
"marks": [ { "id": "m-0mvd4k2tckndr", "kind": "comment",
"elements": ["state:Reading"], "region": { "x": 0, "y": 0, "width": 300, "height": 200 }, "level": "Root",
"text": "Is Reading where the count starts?",
"author": { "id": "guillaume", "name": "Guillaume", "role": "person" },
"at": "2026-10-18T01:00:46.000Z", "status": "answered",
"replies": [ { "author": { "id": "mia", "name": "Mia", "role": "agent" }, "text": "Yes: …", "at": "…" } ] } ] }
marksPathOf("wave.smdf.json") = "wave.smdf.marks.json";
.smdf and .erdf of one name never share a sidecar. A drawing says what is being built; its
marks say what people and agents said about it.elements are focus names, so a mark survives a re-layout; region keeps
the area as drawn, and level the machine level it was drawn at.m- + fixed-width base-36 time + 4 random).answered); a follow-up
from the asker opens it again (open); resolved is closed and kept as a record, and a reply
does not reopen it by itself. marksWaitingOn(marks, role): a person’s open marks and an agent’s
answered questions wait on the agent, and the other way round.readMarksFile): a broken entry is dropped, the rest kept. The web route
refuses to write over a sidecar that does not parse (409).A layer over a canvas never reaches into it. The protocol says where each element sits from the
same layouts the canvases draw with: machineElementBoxes(levelStates, positions) (an event’s box
spans its arrow’s two ends), erdElementBoxes(def, positions, {rows}) (attribute rows; Chen answers
with the entity), sequenceElementBoxes(def, layout) (participants with their lifeline, each
message’s band, event:E on every row that fires it). elementAt (the smallest box under a point)
and elementsInRegion (a third of an element inside the area) turn a tap and a drag into names.
| Event | Direction | Payload | The hub |
|---|---|---|---|
stage:join |
client → hub | {stage} |
joins stage:<name>, acks {selfId, state: StageState} |
stage:step |
both | StageStepEnvelope {stage, step, index?, count?, tour?, title?, origin, at} |
keeps it as the stage’s step; relays to the stage |
stage:load |
both | StageLoadEnvelope {stage, tour, path?, from?, autoplay?, origin} |
keeps it as the stage’s tour, drops the step; relays |
stage:control |
both | {stage, action: play\|pause\|next\|prev\|goto\|stop, index?, origin} |
relays; stop drops tour and step |
stage:context |
both | StageContext {stage, doc, kind, system, focus, visible, tour, who, at} |
keeps it as the stage’s context; relays to others, never back |
marks:changed |
both | MarksEnvelope {docId, marks, change?, stage?, origin} |
relays to the drawing’s room and the stage named, never back |
stage:<name> (letters, digits, ., _, -),
never a path, so it never collides with a drawing’s room; no file, no seq, no watcher.STATELOOM_STAGE_STEP_TTL_MS, 0
keeps it until stopped): the join ack and GET /stage/<name> stop returning it, so a canvas
opened hours later does not catch up on a conversation that moved on. A loaded tour stays until stopped.marks:changed: change.action is reply (smcx marks reply,
answer_mark with text, even when it also resolves) or add (add_mark), and the mark’s last
reply, or the mark, is signed role: agent; agentWordIn(envelope) reads it.view:show; a sender need not have joined.GET /stage/<name> answers the StageState in JSON (Authorization: Bearer <token> when the
hub has one), and GET /health the room and stage counts — for a script, a listener, a person.StageProvider wraps whichever workspace is open and joins the stage (?stage=, else
STATELOOM_STAGE from /api/config, else default). What the hub held when the page joined is
shown paused; a page opened on a drawing (?doc=) keeps that drawing and shows only the caption,
and ▶ opens the step’s drawing (StageShown.caught). A step or tour sent after the page joined
always opens its drawing. show_step and play_tour open a drawing inside the system that lists
it, found beside the drawing when the active document is not that system. A shown step opens its drawing inside its
system and focuses its element through openInSystem (Spec 82); what it lights is handed to the
StageLayer the open workspace mounts beside its canvas, which alone knows where its elements are:
setBoard); until it has, the page’s
?doc= stands for it. Under a finger every caption button and each step dot is a 44 px target;
past seven steps the dots give way to the count and the arrows.fitLegibly); it looks again after the workspace’s and the browser’s remembered view land and frames
again only if they hide a mark. Every pin stays inside the board, 8 px from its edges; pins that land
on one point fan down the anchor’s right edge (upward when the board ends first); no pin sits
under the board’s buttons or under the caption (the phone’s sheet), where it could not be tapped
(placePins, avoid).labels) — never by focus key; an entity’s attributes are left to the entity when both are
marked, and more than three names read “A, B and 4 more”. Agents still read focus keys
(markAnchorText, formatReview).marksWaitingOn(marks, "person")), shown “N for you”, and what waits
on the agent follows it, quieter; an answer moves a mark from one to the other instead of making
the count fall. A thread whose last word is an agent’s and that the person has not opened since is
new — its pin wears a quiet ring and dot, the list puts it first with “new” — kept per drawing in
the browser (stateloom.marks.read.v1:<doc>, mark id → reply count when opened); and the
marks:changed that carries the answer shows one line by the controls for a few seconds (“Mia
answered mark 3”), which opens the thread when tapped, takes no focus, and opens no card by itself.note (any ReactNode), so another host says its own./api/marks?doc= reads and changes a sidecar under the same root allowlist as /api/file (the
sidecar itself is checked too); the page tells the hub after the write.
| Tool | What it does |
|---|---|
show_step |
one step now; doc defaults to the active document, system to the system that lists it |
write_tour |
a tour file beside the active document, paths stored relative to it, checked T001–T009 |
play_tour |
a tour to the canvases, from a step, playing or paused |
stage_control |
play, pause, next, prev, goto (from 1), stop |
read_marks |
what is on screen, then the marks waiting for the agent (all for every mark); scope: the active document and, for a system or its member, every member |
await_marks |
hold until the person’s next mark or reply (≤ 600 s) |
answer_mark |
reply in a thread as the agent; resolve; show lights the mark with the answer as the caption |
add_mark |
the agent’s question pinned on elements or an area |
what_is_on_screen |
the context alone |
STATELOOM_STAGE names the stage, STATELOOM_AGENT_NAME the agent on marks and captions.
smcx stage show|play|control|where and smcx marks [--all] | await | reply do the same from a
terminal. smcx marks await exits 0 with the person’s mark, the context and the exact commands to
answer and to listen again, 4 on timeout — the background-task pattern of the Mia episode
companion’s mia-listen await, for marks instead of spoken takes.
The browser’s voice (browserVoice, Web Speech synthesis) reads a step only when the person
turned it on. A step’s audio is played instead when it has one: an agent renders its words with
its own voice service — in the Miadi ecosystem the miadi-voice MCP, the one sanctioned voice path
— and puts the recording there. The person’s spoken marks use browserDictation (Web Speech
recognition) where the browser has it; where it does not, the 🎙 button is absent and they type.
Final segments are joined with one space (joinHeard): Safari hands them with none between, and a
spoken mark read “in betweenWhen it hasn’t been”.
@miadi/stateloom-canvas holds the drawing parts (props in, callbacks out, --slc-* themed):
StageOverlay over any board that shares a viewport, StageCaption, MarkComposer, MarkThread,
MarksPanel, MarkNotice, and useMarksRead(doc) with the protocol’s markCounts, unreadMarks,
agentWordIn and agentWordText re-exported, so another host (Miadi’s episode room) counts,
marks new and announces an answer the same way. @miadi/stateloom-react holds the behaviour: createStageSession (no React, tested
in Node), useStage, browserVoice, browserDictation. A host needs a viewport, the boxes from
the protocol, a place to keep sidecars (or none: marks are optional), and a hub URL.
Current reality (before this spec): the agent could open one member of a system and focus one
element (show); its words went to the terminal; nothing could be prepared to play back; a person
could not point at a drawing at all, only type names into a prompt.
Desired outcome: the agent shows, in order, with words, on any drawing; the person points and says; the agent reads the pointing before it replies and answers where it was raised; all of it survives the session as files.
Next (not built here): a mark that follows a renamed element (marks name elements; a rename
leaves them pointing at the old name, and read_marks shows them as they were); marks on the
system map; a voice bridge that renders tour captions through miadi-voice without the agent
doing it step by step; a stage per person when several share one hub; recording a tour played
with its voice as a screenwalk (the episode companion’s media cycle).