Skip to content

Propose projecting a machine's memory map - #629

Merged
seanhodges merged 2 commits into
mainfrom
claude/vscode-live-memory-map-qw55ra
Sep 13, 2026
Merged

seanhodges merged 2 commits into
mainfrom
claude/vscode-live-memory-map-qw55ra

Conversation

@seanhodges

Copy link
Copy Markdown
Owner

Planning artifacts only — an OpenSpec change, no behaviour and no implementation.

Why

The IDE's memory map draws the machine's whole address space as colour-coded bands and lays over them the addresses the processor is touching right now — teal where it read, coral where it wrote, fading. Every machine with a bus to tap records it, and a registry-driven test holds them all to doing so.

None of it leaves the browser. The seam it is drained through is on the emulator object, and the only thing that drains it is a hook holding that object directly. No operation answers it, nothing crosses the thread the machine runs on, and no projection carries it. So an editor, an agent or the command line watching a program run can see its screen and read its variables, but has no way to see where in memory the program is living.

The map itself already travels: info answers the whole region table, on every surface. It is only the live half that stops at the browser.

The decision it turns on

A third projection, beside the view and the play channel — and a map is not a display.

display-view keeps a view and a play channel mutually exclusive, and gives its own reason: a view exists so that a machine driven by requests can be watched, and a played machine is already being seen by whoever is driving it. That reasoning is entirely about the screen. A map shows what neither of them shows, so it stands outside that choice rather than joining it.

That is not a convenience. A held machine advances unasked only while it is being played, so a map that ended the play channel would show a still picture of a stopped machine — the one thing it must not do. It also leaves the existing exclusion exactly as it is: it is written as a pair, each open ending the other and reporting that it did, not as an arbiter over a set, and a third member would have meant rewriting it.

What's in the change

Artifact What it says
proposal.md Why the overlay stops at the browser, and the Non-goals — memory contents above all
design.md Six decisions: the projection standing outside the arbiter; data rather than pixels; reduction beside the machine before anything crosses the thread; why a dropped sample merges rather than vanishes; one place the tap hangs; a hand-written standalone page
specs/memory-view/ New capability — how the address admits, how long it lives, that whoever holds it watches memory and can do nothing else, and that mapping changes no measurement
specs/display-view/ Narrows "a machine has one or the other" to the display
specs/memory-map/ States the live overlay the IDE has always drawn — implemented today and, until now, unspecified
tasks.md Tap → carriage → projection → operation → docs → gates

Two things worth a reviewer's eye

  • The Dialect / MachineEmulator seam does not change. Every member this needs is already declared, already owed by every machine with a bus to tap, and already held to behaviourally. That the seam is untouched is why this is a change to the host rather than to the dialects.
  • Two ways a machine declines, answered as two. A machine with no described layout has no map to project; a machine with a layout but no bus to tap has a map that never lights up. Different facts, given as different answers — the same argument the activity seam's own test already makes about silent degradation.

machine-play, headless-cli and mcp-server are deliberately absent, each with its reason stated in the proposal.

Non-goals

Reading or writing the byte at an address (nothing here carries values, and no member that would return one is added); the POKE and LOAD CODE markers, which come from reading the source rather than asking the machine; live RAM used/free figures; and the editor clients — pointing a frame at the address is a separate change in basically-editor-extensions that rests on this one.

Verification

npx openspec validate --specs        # 22 passed, 0 failed
npx openspec validate "watch-a-machines-memory" --strict
npm run format:check

Re-run after merging main — only headless-cli moved there, which this change does not delta, so the display-view requirement copied into the delta still matches its baseline exactly.

No source changed, so the code gates have nothing to say about this branch.

🤖 Generated with Claude Code

https://claude.ai/code/session_017uLMH7BZcrFBgH6vTUNu7Y


Generated by Claude Code

The IDE draws a machine's memory map with the addresses its processor is
touching laid over it, and none of that leaves the browser: the seam it is
drained through is on the emulator object, and the only thing that drains it
holds that object directly. An editor, an agent or the command line watching a
program run can see its screen and read its variables, and has no way to see
where in memory the program is living.

This proposes a third projection beside the view and the play channel. The
decision it turns on is that a map is not a display: a view and a play channel
are two ways of showing one screen and a machine has one or the other, but a map
shows what neither of them shows, so it stands outside that choice rather than
joining it. That is what makes it worth having - a held machine advances unasked
only while it is being played, so a map that ended the play channel would show a
still picture of a stopped machine.

Planning artifacts only; no behaviour changes here. The new `memory-view`
capability states how the address admits and how long it lives, `display-view`
narrows its one-or-the-other rule to the display, and `memory-map` finally
states the live overlay the IDE has always drawn.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017uLMH7BZcrFBgH6vTUNu7Y
@seanhodges
seanhodges merged commit 11ebb9f into main Sep 13, 2026
8 checks passed
@seanhodges
seanhodges deleted the claude/vscode-live-memory-map-qw55ra branch September 13, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants