Repository navigation
Propose projecting a machine's memory map - #629
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
infoanswers 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-viewkeeps 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
openending 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
proposal.mddesign.mdspecs/memory-view/specs/display-view/specs/memory-map/tasks.mdTwo things worth a reviewer's eye
Dialect/MachineEmulatorseam 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.machine-play,headless-cliandmcp-serverare 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 CODEmarkers, 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 inbasically-editor-extensionsthat rests on this one.Verification
Re-run after merging
main— onlyheadless-climoved there, which this change does not delta, so thedisplay-viewrequirement 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