c64re
v0.11.0MCP server for C64 reverse engineering — analysis pipeline, disassembly, and semantic classification
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
agent_onboard
[Phase agnostic] Reload the full project state into the session. Use when a session starts or after context loss/compaction — run it FIRST. Not for per-turn checks (use c64re_whats_next) or choosing among options (use agent_propose_next). Inputs: project_dir (optional; a named project wins over C64RE_PROJECT_DIR). Needs git on PATH (refused otherwise); a project outside a git work tree is onboarded with PLEASE USE GIT TO AVOID LOSS OF DATA! as the first line. A broken `.mcp.json` is reported as a warning (Claude Code drops the server silently when it does not parse). Returns: project metadat…
| Parameter | Type | Description |
|---|---|---|
preferred_assembler | string | The assembler dialect the HUMAN chose for this project's listings (kickass = .asm, 64tass = .tas). A project that has none is asked at onboarding; this records the answer. Never guess it. |
project_dir | string | Project root. Wins over C64RE_PROJECT_DIR when given; omitted, C64RE_PROJECT_DIR, then the project this session onboarded into, then process.cwd(). |
project_steering_set
Set the project's persistent STEERING rules — the always-apply guidance the agent must follow every session (the steering-file analogue). Use to encode project doctrine that must not be forgotten across context loss: e.g. 'after a load trace, derive the disk-T/S↔load cartography and register_payload the spans'; 'after each action, record a finding + reconcile the related open question'. Written to <project>/knowledge/steering.md and injected verbatim at the TOP of agent_onboard every session. Not for one-off notes (use save_finding) or per-turn next-step (use agent_next_step). Inputs: rule…
| Parameter | Type | Description |
|---|---|---|
rules * | string | Markdown steering rules. Replaces the file unless append=true. |
append | boolean | Append to the existing steering instead of replacing (default false). |
project_dir | string |
agent_set_role
[Phase agnostic] Set the working role for this session — analyst, cartographer, implementer, archivist, cracker, or unset — which biases what agent_propose_next recommends (only analyst/cracker also change phase-gating/completion). Use when you begin focused work in one of those modes. Not for recording progress (use agent_record_step). Inputs: role. Returns: confirmation + persisted role.
| Parameter | Type | Description |
|---|---|---|
role * | string | analyst (disasm/control flow), cartographer (memory/bank maps), implementer (MCP tooling/host code), archivist (continuity, tasks, checkpoints, artifact registration), cracker (modifying target C64 bi… |
constraints | array | Optional list of constraints active for this role/session |
focus | string | Optional one-line focus statement for this role assignment |
position | string | architect (plans, issues and closes cards) | unset. Beside the role, not instead of it. A worker sets no position: it names its card in agent_record_step. |
project_dir | string |
agent_record_step
[Phase agnostic] Record a completed work step and optionally queue the next action, so a later session can resume. Use after each meaningful unit of work. Not for proposing options (use agent_propose_next) or per-turn status (use c64re_whats_next). Inputs: step summary, optional next-action. Returns: updated agent state.
| Parameter | Type | Description |
|---|---|---|
step * | string | Short description of what was just completed |
card | string | the card this step reports on. C64RE judges the card's done-when itself; your claim is kept beside the verdict. |
constraints | array | Optional replacement for the constraints list |
focus | string | Optional new current-focus statement |
next_action | string | Optional next action to queue for the upcoming step |
note | string | Optional context note attached to the history entry |
project_dir | string | |
report | string | With card: the worker's own words. |
result | string | With card: DONE (C64RE runs the checks and answers KEPT / NOT KEPT / WAITING) or STOPPED (no checks; the card stays open). |
role | string | Optional new role to switch into atomically with this step |
c64re_whats_next
Return the single next required action for the active artifact, cheaply, to call every turn. Use as the routine per-turn nudge. Not for full state reload (use agent_onboard) or ranked option lists (use agent_propose_next). Inputs: optional artifact id. Returns: current phase, the one next action, an architect's cards out with workers, audit warnings, a short reminder.
| Parameter | Type | Description |
|---|---|---|
context | string | |
conversation_summary | string | |
project_dir | string | |
user_input | string |
start_re_workflow
Choose the reverse-engineering workflow template (full-re | cracker-only | analyst-deep | targeted-routine | bugfix), which sets the required phases per artifact. Use once when starting a project to scope the work. Not for per-step progress (use agent_record_step). Inputs: workflow name, optional force. Returns: active workflow + required phases. Refuses if one is already set unless force=true.
| Parameter | Type | Description |
|---|---|---|
workflow * | string | |
force | boolean | |
project_dir | string |
agent_propose_next
[Phase agnostic] List ranked, phase-consistent next actions across artifacts, read-only. Use when you want to choose among options or see what each artifact needs. Not for the single routine next step (use c64re_whats_next) or full reload (use agent_onboard). Inputs: none. Returns: ranked actions per non-frozen artifact; for an architect, the issued cards and the c64re_worker_card prompt to hand each to a worker. Does not mutate state.
| Parameter | Type | Description |
|---|---|---|
project_dir | string |
disasm
[Phase 2: Loader / Load behaviour / Sequence] Disassemble bytes to ONE listing in the project's assembler dialect (KickAssembler .asm or 64tass .tas — the file's own choice, else the project's), segment-aware when an analysis describes them, with a rebuild proof (assembled by the assembler the listing is written for; the verdict names it, and a missing assembler is said by name). Use for any listing of any bytes: a PRG, a payload carved off a disk, a depacked chunk, a relocated overlay, a block lifted out of a raw track, 1541 drive code. THE LOAD ADDRESS DECIDES HOW THE BYTES ARE READ, NEVER…
analyze
[Phase 2: Loader / Load behaviour / Sequence] Run the heuristic analysis pipeline over bytes and produce structured JSON — segments, cross-references, RAM facts, pointer tables, relocation proposals. Use first on anything you are about to disassemble, headed or not: a PRG, a depacked chunk, a relocated overlay, a block of 1541 drive code. THE LOAD ADDRESS DECIDES HOW THE BYTES ARE READ, NEVER THE FILE NAME — pass load_address and the bytes are raw and start there; leave it out and the file must carry a 2-byte load header, whose first two bytes are read as the address. The one exception is…
| Parameter | Type | Description |
|---|---|---|
artifact_id | string | Id of an already-registered artifact holding the bytes. Use this OR path OR paths. |
entry_points | array | Runtime addresses where code is known to start, inside the window the bytes run at (one outside is refused, nothing written). A string is hex ("0331"), a JSON number is decimal (817). A seed that fall… |
headed | boolean | Say outright whether these bytes carry a 2-byte load header. Normally unnecessary — load_address decides. Pass true with a load_address to have a disagreeing header refused by name; pass false to re… |
length | string | number | How many bytes. Default: to the end of the file. Same rule as offset. |
load_address | string | number | Where the FIRST byte runs. GIVEN: the bytes are raw and start there, and nothing at the front is treated as a header. OMITTED: the file must carry a 2-byte load header and its first two bytes are read… |
offset | string | number | Byte offset into the file where the block starts. Requires load_address: a window's first byte is not a load header. Default 0. Same rule as an address: a string is hex, a JSON number is taken as give… |
output_json | string | Output path for the analysis JSON. Default for a headed file: <stem>_analysis.json next to it; for raw bytes: analysis/raw-analysis/[<cartridge>/]<stem>[_<window>]_<address>_analysis.json (the cartrid… |
path | string | Path to the file holding the bytes (absolute or project-relative). Use this OR artifact_id OR paths. The extension is never consulted: a .bin may be a PRG and a .prg may be a raw block. |
paths | array | MANY files in ONE call, instead of one round trip each — an extract that produced 217 payloads is one call, not 217. Each path goes through exactly the body a single-path call goes through and gets… |
platform | string | The machine the bytes run on: its I/O window decides which stores are hardware accesses, and the VIC-II / SID / CIA heuristics run only for c64. Resolved in order: this argument, the file's artifact r… |
project_dir | string | Project root directory. When omitted, resolved by walking up from path to knowledge/phase-plan.json. |
analyze_prg
[Phase 2: Loader / Load behaviour / Sequence] Run the heuristic analysis pipeline on a PRG and produce structured JSON — segments, cross-references, RAM facts, pointer tables. Use first on any new PRG to map its structure. Now the same door as `analyze`, which takes headerless bytes too: this name keeps working for one release and says so in its answer. Not for producing assembly (run disasm next, passing this JSON) or for disk/cart images (extract first). Inputs: prg_path, optional project_dir. Returns: analysis JSON path + summary.
| Parameter | Type | Description |
|---|---|---|
prg_path * | string | Path to the .prg file (absolute or relative to project dir) |
entry_points | array | Hex entry point addresses, e.g. ["0827", "3E07"]. Usually unnecessary: when the project graph holds a call or jump from real (confirmed) code of another owner into this image, and this payload is the… |
output_json | string | Output path for the analysis JSON (default: next to PRG) |
project_dir | string | Project root directory. When omitted, resolved by walking up from prg_path to knowledge/phase-plan.json. |
analysis_job_status
Use to poll a background job started by analyze or disasm (an image too large, or a `paths` batch too long, to finish synchronously) or by runtime_loader_lens (capture too large to fold synchronously) — each hands back a job_id instead of stalling the call. Not for launching the work itself (use analyze / disasm / runtime_loader_lens). Returns the full original tool result once done — for a batch, the whole per-path report. Inputs: job_id. Returns: running (elapsed) | done (result) | failed (error).
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job id returned by analyze, by a disasm/analyze `paths` batch, or by runtime_loader_lens. |
disasm_prg
[Phase 2: Loader / Load behaviour / Sequence] Disassemble a PRG to ONE listing in the project's assembler dialect (KickAssembler .asm or 64tass .tas), segment-aware when given an analysis JSON. Use after analyze to get readable assembly, and again to render the final annotated version once you have an annotations file. Now the same door as `disasm`, which reads headerless bytes too: this name keeps working for one release and says so in its answer. For relocated/self-relocating loaders (code stored at one address but executed at another), pass `relocations`: each region is rendered as KickAsse…
| Parameter | Type | Description |
|---|---|---|
prg_path * | string | Path to the .prg file |
analysis_json | string | Path to a prior analysis JSON for segment-aware disassembly |
annotations_path | string | Path to an annotations file, instead of the <stem>_annotations.json found beside the PRG, the output or the analysis. |
assembler | string | The assembler dialect the ONE listing is written in: kickass (.asm) or 64tass (.tas). Named here it is REMEMBERED on this file, so the next render of the same bytes writes the same dialect without bei… |
entry_points | array | Hex entry point addresses |
import_graph | boolean | false = a PREVIEW: render and rebuild-check the listing, but import nothing into the knowledge graph (no names, no closed-loop sweep, no payload link, no machine declaration, no machine recorded on th… |
output_asm | string | Output path for the listing (.asm KickAssembler, .tas 64tass) |
platform | string | The machine the PRG runs on, for the ZP / IO / ROM symbol tables and the I/O window. Resolved in order: this argument, the file's artifact record, the project default, c64. c1541 is drive-side code, v… |
project_dir | string | Project root directory. When omitted, resolved by walking up from prg_path to knowledge/phase-plan.json. |
relocations | array | relocated regions, rendered as KickAssembler .pseudopc / 64tass .logical blocks at their runtime PC while the stored bytes stay byte-exact. Every address here obeys the same rule as entry_points: hex,… |
disasm_raw
[Phase 3: Heuristic Disasm] Disassemble raw bytes at an address you already know — a depacked chunk, a relocated overlay, a block lifted out of a track, drive code — with no PRG header and none invented. Use when you hold bytes and their runtime address: give a file path (or an artifact id), optionally a byte window, and load_address. Now the same door as `disasm`, which also reads a file that carries a header: this name keeps working for one release and says so in its answer. Not for a file that already carries a 2-byte load address (use disasm without load_address) and not for the runnin…
| Parameter | Type | Description |
|---|---|---|
load_address * | string | number | Where the FIRST byte of the window runs. An address is HEX: "C000", "$C000" and "0xC000" are the same; a JSON number is its DECIMAL value (7000 is $1B58, "7000" is $7000). |
analysis_json | string | Path to an analysis JSON for segment-aware rendering, produced by analyze over THIS window. Named and present it is used unchanged; named and absent, or omitted, the project store is asked which analy… |
annotations_path | string | Path to an annotations file (labels/routines/segments). Without it, a <stem>_annotations.json beside the bytes or beside the output is picked up as usual. Whatever is applied is imported into the know… |
artifact_id | string | Id of an already-registered artifact holding the bytes. Use this OR path. |
assembler | string | The assembler dialect the ONE listing is written in: kickass (.asm) or 64tass (.tas). Named here it is REMEMBERED on this file, so the next render of the same bytes writes the same dialect without bei… |
bank | integer | Cartridge bank these bytes live in. The names go into the graph under that bank (space crt), so a boundary asserted with model_assert space=crt and this bank holds them; it is also recorded with the l… |
cart | string | The cartridge (its token, as graph_find / project_status name it) the bank belongs to. Default: the cartridge these bytes were extracted from, else the project's only cartridge; with several and none… |
cpu | string | Which 6502 these bytes run on. Default c64. `drive` renders 1541 zero page, VIA registers and drive ROM entry points instead of the C64's. |
entry_points | array | Runtime addresses inside the window where code is known to start. Without one the first byte is the only seed. A seed that falls inside a decoded instruction breaks it: the bytes up to the seed render… |
length | string | number | How many bytes. Default: to the end of the file. Same rule as offset. |
no_analysis | boolean | Refuse an analysis outright for this render. Nothing is read, nothing is inherited, and the answer says the listing is linear. |
offset | string | number | Byte offset into the file where the block starts. Default 0. Same rule as an address: a string is hex, a JSON number is taken as given. |
output_asm | string | Output path for the listing (.asm KickAssembler, .tas 64tass). Default: analysis/raw-disasm/[<cartridge>/]<stem>[_<window>]_<address>_disasm.<ext>. |
path | string | Path to the file holding the bytes (absolute or project-relative). Use this OR artifact_id. |
project_dir | string | Project root directory. When omitted, resolved by walking up from path to knowledge/phase-plan.json. |
space | string | Which address space the names go into the graph under, and the listing's provenance: "ram", "crt" (also "cart"; needs bank) or "drv" (also "drive", the 1541). Default: what the analysis artifact and t… |
ram_report
[Phase 3: Heuristic Disasm] Generate a markdown RAM-state facts report from an analysis JSON (zero-page + RAM usage). Use after analyze to summarise how the program uses memory. Not for pointer tables (use pointer_report) or raw bytes (use read_artifact). Inputs: analysis JSON path. Returns: markdown report path.
| Parameter | Type | Description |
|---|---|---|
analysis_json * | string | Path to the analysis JSON |
output_md | string | Output path for the markdown report |
pointer_report
[Phase 3: Heuristic Disasm] Generate a pointer table facts report (markdown) from an analysis JSON. Use after analyze to list the program's pointer tables. Not for zero-page/RAM usage (use ram_report) or raw bytes (use read_artifact). Inputs: analysis JSON path. Returns: markdown report path.
| Parameter | Type | Description |
|---|---|---|
analysis_json * | string | Path to the analysis JSON |
output_md | string | Output path for the markdown report |
propose_annotations
Generate a DRAFT annotations file (labels, segment reclassifications, routine names, and relocations) from an analysis JSON + optional disasm. Use to bootstrap semantic annotation before hand-editing. The draft's relocations[] entries are in disasm.relocations shape ({fileStart,fileEnd,runtimeAddr} hex) — copy accepted ones straight into disasm(relocations=[...]) to render relocated loader code as .pseudopc/.logical. When hand-editing the draft, the field shape is: labels[{address,label,comment?}], routines[{address,name,comment?}], segments[{start,end,kind,label?,comment?}] (hex with or wit…
| Parameter | Type | Description |
|---|---|---|
analysis_json * | string | Path to the *_analysis.json file (relative to project_dir). |
listing_path | string | Optional listing path (.asm or .tas) for label naming heuristics. |
output_path | string | Optional draft output path; defaults to <stem>_annotations.draft.json next to the analysis. |
persist_questions | boolean | If true, also save openQuestions[] entries via save_open_question with source=static-analysis. |
project_dir | string |
run_prg_reverse_workflow
[Phase 3: Heuristic Disasm] Run the full first-pass PRG reverse-engineering chain end-to-end: register, analyze, disassemble, RAM + pointer reports, import knowledge, rebuild views. Use to bootstrap a fresh PRG in one call; the listing is written in ONE dialect (assembler, else the file's, else the project's — a project that has chosen none is refused). Not for a single step (call analyze / disasm directly). Inputs: prg_path, optional assembler. Returns: done/incomplete/blocked + the next required semantic action.
| Parameter | Type | Description |
|---|---|---|
prg_path * | string | Path to the .prg file (absolute or relative to project_dir). |
assembler | string | The assembler dialect the ONE listing is written in: kickass (.asm) or 64tass (.tas). Named here it is REMEMBERED on this file, so the next render of the same bytes writes the same dialect without bei… |
entry_points | array | Optional hex entry-point overrides (e.g. ["0827"]). |
mode | string | quick = analyze + disasm only. full = also ram_report + pointer_report. Default full. |
output_dir | string | Override output directory. Default places outputs next to the PRG. |
project_dir | string | Project root directory. Defaults to C64RE_PROJECT_DIR or process.cwd(). |
rebuild_views | boolean | Run build_all_views after the workflow. Default true. |
extract_crt
[Phase 1: Extraction / Inventarization] Parse a cartridge image (.crt, e.g. EasyFlash) and extract per-bank binaries + a manifest. Use to get bytes off a cartridge. Not for disk images (use extract_disk). Inputs: crt path, project dir. Returns: per-bank artifacts + manifest.
| Parameter | Type | Description |
|---|---|---|
crt_path * | string | Path to the .crt file |
cart | string | The cartridge token this image is a version of, when it is a rebuild of a cartridge the project already knows but sits at another path (same path = same cartridge, no need). Default: a first extract o… |
output_dir | string | Output directory (default: analysis/extracted for the project's first cartridge, analysis/extracted-<cartridge> for every further one). A directory that already holds ANOTHER cartridge's extract is re… |
project_dir | string | Project root directory. When omitted, resolved by walking up from crt_path to knowledge/phase-plan.json. |
inspect_disk
[Phase 1: Extraction / Inventarization] List the directory of a D64/G64 image WITHOUT extracting. Use for a quick peek at what a disk holds. Not to write files (use extract_disk) or for memory-range facts (use inspect_address_range). Inputs: image path. Returns: file list (name, type, size).
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Path to the .d64 or .g64 image |
project_dir | string | Project root directory. When omitted, resolved by walking up from image_path to knowledge/phase-plan.json. |
substrate_override | string | Tier 2 runtime-discipline override: record the medium's true substrate after READING the drivecode (docs/runtime-discipline-gate-plan.md). Use when the auto-parse is wrong — e.g. a standard director… |
extract_disk
[Phase 1: Extraction / Inventarization] Extract files from a D64/G64 image into the project and write manifest.json. Use to get bytes off a disk image. Not for cartridges (use extract_crt) or to just peek the directory (use inspect_disk). Inputs: image path, project dir. Returns: extracted files + manifest.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Path to the .d64 or .g64 image |
output_dir | string | Output directory (default: analysis/disk/<image-name>) |
project_dir | string | Project root directory. When omitted, resolved by walking up from image_path to knowledge/phase-plan.json. |
extract_disk_custom_lut
[Phase 1: Extraction / Inventarization] Use when a disk stores its real payloads in a fixed-stride non-DOS LUT sector rather than the standard directory — extracts one file per LUT entry and merges them with origin=custom into manifest.json. Not for standard DOS disks (use extract_disk) or when you do not yet know the LUT location (use suggest_disk_lut_sector first). Inputs: absolute or project-relative disk image path, lut_track, lut_sector, payload_format, and optional stride/count/sentinel. Writes payload files + manifest.json in the project analysis folder.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | |
lut_sector * | integer | |
lut_track * | integer | |
payload_format * | string | |
entry_count | integer | |
entry_offset | integer | |
entry_stride | integer | |
output_dir | string | |
project_dir | string | |
raw_default_size | integer | |
sentinel_payload | string | Hex of the empty/deleted slot marker (e.g. "fefc0000"). |
disk_sector_allocation
Report per-track/sector ownership for an extracted disk — system (BAM/dir), kernal file, custom file, unclaimed padding, orphan data — and flag overlaps. Use to understand a disk's layout or find hidden/orphan data. Not for the file list (use inspect_disk) or extraction (use extract_disk). Inputs: extracted manifest. Returns: T/S ownership map + overlaps.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | |
manifest_path | string | Manifest path (defaults to <output_dir>/manifest.json under the standard analysis/disk/<image-name> location). |
map_path | string | Where to write the full per-sector map as JSON. Defaults to sector-allocation.json beside the manifest. The answer always names the file it wrote. |
project_dir | string | |
show_owners | boolean | Also list every owner with the T/S cells it holds. Off by default — the map above already shows the shape, and a 245-file disk makes a long list. |
suggest_disk_lut_sector
Use to heuristically scan every sector of a disk image and rank candidates by how plausibly they serve as a fixed-stride loader LUT — run this first when you do not yet know which sector a custom loader reads its file table from. Not for DOS-directory inspection (use inspect_disk) or for extracting payloads once you know the LUT location (use extract_disk_custom_lut). Inputs: absolute or project-relative disk image path (.d64 or .g64). Returns: ranked candidate list; does not write any artifact.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | |
project_dir | string |
read_artifact
[Phase agnostic] Read a generated artifact (ASM, JSON, SYM, MD) into context — C64 disassemblies are ≤64 KB and fit whole. Use to inspect a disassembly, analysis JSON, or report. Not for raw disk/cart media (use extract_disk / extract_crt) or directory peeks (use inspect_disk). Inputs: artifact path/id. Returns: file contents.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to the artifact (relative to project dir or absolute) |
list_artifacts
[Phase agnostic] List the project's registered artifacts — media (D64/G64/CRT/PRG), extracted payloads, listings, analysis JSON, documents — one line each with its id, kind/role and path. Use to see what the project holds and to get an artifact id before reading or linking one. Not for payload entities (use list_payloads) or knowledge records (use list_findings). Inputs: optional project_dir, subdir (a path prefix; '.' or omitted = all), kind, include_internal. Returns: id, kind/role, path, size per artifact, and how many files on disk are not registered yet.
| Parameter | Type | Description |
|---|---|---|
include_internal | boolean | Also list internal files (manifests, analysis JSON, annotation files). Default false, as in the workbench. |
kind | string | Only this artifact kind (e.g. d64, prg, listing). |
project_dir | string | Project root. Defaults to C64RE_PROJECT_DIR or the active project. |
subdir | string | Only artifacts whose path starts with this (e.g. 'input', 'analysis/disk'). '.' or omitted: all. |
project_slots
Completeness check: which of the 15 required relationships this project has named and which are still empty. Use before calling a project mapped, and whenever a door refuses on a slot. Not a to-do list (use agent_next_step). Inputs: optional project_dir, verbose. Returns: per-slot status + measured byte coverage.
| Parameter | Type | Description |
|---|---|---|
project_dir | string | Project directory (default: the current project) |
verbose | boolean | Also print what each open slot asks and what would fill it |
slot_record
Fill one required slot: the answer to a required question, with the evidence for it. Use when a door refuses on an empty slot, or when you have just established one of the 15. Not for seeing which slots are still empty (use project_slots). `answer` and `evidence` are uncapped and stored whole, however long they run; only `title` is capped, at 120 characters, because it is the headline every finding list prints where a name belongs — over that this door refuses by name and hands back the headline it would have taken from your answer, so leaving `title` out is always safe. Inputs: slot id, ans…
| Parameter | Type | Description |
|---|---|---|
answer * | string | The answer itself, stated plainly. As long as it needs to be — it is stored in full as the finding's body. |
slot * | string | Which slot — see project_slots for the list and what each asks. |
address_end | integer | End of that range (inclusive) |
address_start | integer | Start of the address range this answer covers, if it has one |
boundary_name | string | For boot-chain, runtime-count and engine-architecture — the container this answer names, e.g. "stage 2 loader" or "resident engine". Given together with an address range it also asserts the model bo… |
cart | string | For space=crt: the cartridge the boundary is in (default: the project's only cartridge; with several and none named the call refuses and lists them). |
cartridges | array | medium (Medium): what each cartridge of the media set IS in this project. Declared, never inferred. Written with the answer; an unknown cartridge refuses the call and lists the ones the project holds. |
count | integer | For runtime-count: HOW MANY resident runtimes, as a number. runtime-linkage and engine-presence applicability is decided from this. Give it rather than leaving the number in the prose — "Two permane… |
evidence | string | REQUIRED: what you read or ran that establishes it — a listing, an address, a routine, a run. Write this BEFORE `answer` when the answer runs long. |
method | string | REQUIRED for free-ram: 'read' (derived from the listing: a hypothesis) or 'run' (a canary/write trace saw no write). A run proves only that the range was not WRITTEN, never that it is not READ — rea… |
owner | string | Bind the boundary to ONE artifact owner; omit to span the space |
project_dir | string | Project directory (default: the current project) |
space | string | Address space, when a boundary is being asserted alongside |
title | string | A short headline for the finding, ≤120 characters — this door checks it itself and, over the cap, refuses with the headline it would have taken from your answer, rather than with a schema error. O… |
model_assert
State one boundary of the project's model: a named address range at a level (system/container/component) with the evidence for it. Use when you have established what a region IS. Membership underneath is computed, never passed. Not for a claim about behaviour (use save_finding). Inputs: name, level, range, description, evidence. Returns: the boundary + what now falls inside it.
| Parameter | Type | Description |
|---|---|---|
address_end * | integer | Last address, inclusive |
address_start * | integer | First address of the range |
description * | string | What it IS and what it owns, in your words |
level * | string | system = the whole thing; container = a deployable unit (a file, a resident image, a bank); component = a part inside one |
name * | string | What this region is called, e.g. "resident engine" or "stage 2 loader" |
bank | integer | Cartridge bank, for space=crt |
cart | string | For space=crt: the cartridge (its token, as project_status names it) this boundary is in. Default: the project's only cartridge; with several and none named the call refuses and lists them. |
evidence | array | REQUIRED: what you read that establishes this boundary — a file header, a listing line, a routine. A boundary without a citation is the claim the next session inherits and cannot check. Write this B… |
owner | string | Bind the boundary to ONE artifact owner (e.g. "07_game"). Omit to span everything in the space at that range. |
project_dir | string | Project directory (default: the current project) |
space | string | Address space this boundary lives in |
model_read
The re-entry read: the whole project model in one call — boundaries with citations, the edges between them, what is still open, and what was ALREADY REFUTED so it is not re-derived. Use at the start of a session, after a compact, or whenever the thread is lost. Not for which of the 15 required relationships are still empty (use project_slots). Inputs: optional project_dir. Returns: the model as text.
| Parameter | Type | Description |
|---|---|---|
model_only | boolean | Only the boundaries and their edges, without the open/refuted sections |
project_dir | string | Project directory (default: the current project) |
model_remove
Remove one asserted boundary. Use when a boundary turns out to be wrong — the members underneath are untouched, they simply become orphans again. Not for a boundary that is merely imprecise — assert it again instead (use model_assert). Inputs: boundary id (from model_read). Returns: what changed.
| Parameter | Type | Description |
|---|---|---|
id * | string | The boundary id, as model_read prints it |
project_dir | string | Project directory (default: the current project) |
project_critique
Adversarial pass over the project's own records: negative claims the graph contradicts, refutations that invalidated nothing, findings without evidence, overlapping or empty boundaries, orphans, unreachable routines, and split low/high tables the analysis found that nobody declared or rejected (blocking). Each finding carries the proof. Use before calling analysis done, and after a long unattended run. Not for what a check MEANS and why it ranks that way (use critic_checks). Inputs: optional project_dir, severity filter. Returns: findings + the ready verdict.
| Parameter | Type | Description |
|---|---|---|
min_severity | string | Report only findings at or above this severity |
project_dir | string | Project directory (default: the current project) |
verdict_only | boolean | Just the ready/not-ready answer and its blockers |
critic_checks
List the critic's checks and what each one's severity MEANS. Use when a critic finding looks mis-ranked — severity is a property of the check, declared once, and this is that table. Not for running the checks (use project_critique). Inputs: none. Returns: the checks with their severity and rationale.
doc_register
Declare one Markdown document: read its frontmatter and make it a node in the graph, so it can be cited, linted and found. Use after writing a synthesis document (a model, a port spec, a budget). Refuses without frontmatter and hands back the template. Not for the frontmatter block itself (use doc_template). Inputs: path. Returns: the node + what it covers.
| Parameter | Type | Description |
|---|---|---|
path * | string | Project-relative path to the .md, e.g. docs/model/A_overlay_model.md |
project_dir | string | Project directory (default: the current project) |
doc_lint
Which documents declare themselves and which do not: undeclared files, malformed frontmatter, and `amends:` citations naming a document that is not in the project. Use after a writing session, or to see the backlog. Read-only. Not for declaring a document (use doc_register). Inputs: optional project_dir. Returns: the lists, largest undeclared first.
| Parameter | Type | Description |
|---|---|---|
project_dir | string | Project directory (default: the current project) |
doc_template
The frontmatter block to put at the top of a document, for a given kind. Use before writing a synthesis document, or when doc_register refuses. Not for declaring the finished file (use doc_register). Inputs: kind, title. Returns: the block, ready to paste.
| Parameter | Type | Description |
|---|---|---|
title * | string | The document's title |
kind | string | synthesis = an argued narrative; reference = a lookup; decision = a choice and why; generated = written by a tool |
project_dir | string | Project directory (default: the project this session onboarded into) |
wiki_index
The project's document index, DERIVED from the declarations — never hand-maintained, so it cannot go empty. Use to see what is documented and what covers which address range. Not for the health of those declarations (use doc_lint). Inputs: optional write. Returns: the index; with write=true also saves docs/index.md.
| Parameter | Type | Description |
|---|---|---|
project_dir | string | Project directory (default: the current project) |
write | boolean | Also write docs/index.md |
contract_show
What this project owes: the human's stated expectations — which of the 15 slots apply here, what must be annotated, what must be written up, and the thresholds. With no contract set, returns the questions a kickoff should ask. Use at session start and before calling anything done. Not for writing the expectations down (use contract_set). Inputs: optional project_dir. Returns: the contract or the questions.
| Parameter | Type | Description |
|---|---|---|
project_dir | string | Project directory (default: the current project) |
contract_set
Write the project contract: what the human expects delivered. Use once at kickoff, or when the expectation changes. It may demand FEWER slots than the default fifteen — a game with no save owes no save-model — and name the files its ratios are about (`scope`), so a packed original or a port kept for reference stops counting against the game. Also the human's override: `waive` releases an owed promise so the publishing doors open again, and records who waived what and why. `unwaive` takes a waiver back: the promise is owed again, and the waiver stays on the record marked withdrawn. Not for…
| Parameter | Type | Description |
|---|---|---|
annotate | array | Payloads that must be semantically annotated, not merely disassembled. Says what must be NAMED, never what is COUNTED — that is `scope`. |
cartridges | array | What each cartridge IS in this project. Declared, never inferred from the hardware type or a file name — a project that holds two cartridges and no declaration files neither as source or target. A c… |
coverage_ratio | number | Fraction of bytes that must sit inside a known address range (coverage). |
documents | array | Synthesis that must exist and declare itself. |
goal | string | What this job is for, in one sentence. The frame, not a checkable. Required unless this call only waives. |
named_ratio | number | Fraction of meaning-bearing nodes that must carry a HUMAN name. Machine names (unknown_3E00, addr_0006) do not count. |
orphan_ratio | number | Fraction of nodes allowed outside every named boundary (846). |
project_dir | string | Project directory (default: the current project) |
runtime_ratchet | integer | Gated runtime calls allowed with no durable record. 0 disables. |
scope | array | The files the coverage, named and orphan measures are about — e.g. ["mc_orig_unpacked.prg"]. Each resolves to an owner; one that resolves to none is refused with the candidates. Everything else load… |
slots | array | Which slots THIS game owes, e.g. ["context","boot-chain","data-geometry"]. Omit for all fifteen. |
unwaive | array | Promise ids whose waiver to take back, e.g. ["namedRatio"]. Needs waive_reason and waived_by. Refused by name when the promise has no active waiver; the waiver itself is never deleted, it is listed as… |
waive | array | Promise ids to release, e.g. ["namedRatio"]. The refusal names the id. The measurement is unchanged — this opens the publishing doors, it does not mark the promise met. |
waive_reason | string | Why this project ships short of the promise (or why the waiver is withdrawn), in the words the decision was made in. Required with waive or unwaive. |
waived_by | string | Who is overruling (or withdrawing). Required with waive or unwaive, recorded verbatim, never defaulted — this is a human's decision and the server cannot tell a human's call from a run's. |
write_annotations
[Phase 5: Semantic Analysis V1] Write the semantic annotation file for a payload from structured input: segments, labels, routines, and the optional pointer/jump/immediate tables. A split low/high table the analysis found (a `split-table-undecided` finding, or the list `analyze` / `disasm` end with) is closed here by a `splitTables[]` entry: { lo, hi, count, adjust?, base?, comment? } declares it, { lo, hi, reject: "why this is not a pointer table" } rejects it. Use whenever you have read a listing and know what its ranges and routines ARE — this is the door that turns that into the `<stem>_…
| Parameter | Type | Description |
|---|---|---|
binary | string | Which binary this annotates, recorded in the file. Defaults to the name of prg_path. |
immediates | array | |
jumpTables | array | |
labels | array | |
memoryMap | array | What stretches of $D000-$DFFF are at run time where the default (I/O) is not it: { start, end, as: io|ram|charrom, routines? }. |
output_path | string | An explicit destination. Must end in `_annotations.json` — the importer reads the stem off the file name. |
overwrite | boolean | Replace an existing annotations file (default false — a hand-edited file is not clobbered by accident). |
pointerTables | array | |
prg_path | string | The bytes this annotates; the file lands beside them as <stem>_annotations.json |
project_dir | string | |
routines | array | |
segments | array | |
splitTables | array | Split low/high tables: declare ({lo, hi, count, adjust?, base?}) or reject ({lo, hi, reject}) — the two ways to close a found one. |
merge_annotations
[Phase 5: Semantic Analysis V1] Merge several readings of one payload into one annotations file, refusing every contradiction by naming both sides and recording each resolution as a finding. Use whenever more than one session, subagent or pass produced annotations for the same bytes — it is the door that replaces a hand-written merge script, and the reason it exists is that such a script keeps its judgements in a scratchpad that dies with the session, so the project never learns the merge was contested. Two fragments saying the same thing collapse into one and you are asked nothing — the s…
| Parameter | Type | Description |
|---|---|---|
fragments * | array | The readings to merge — each a name plus sections, or a name plus a path |
binary | string | |
dry_run | boolean | Report the merge and every contradiction without writing the file or recording anything |
output_path | string | An explicit destination. Must end in `_annotations.json`. |
overwrite | boolean | Replace an existing annotations file (default false) |
prg_path | string | The bytes these annotate; the merged file lands beside them as <stem>_annotations.json |
project_dir | string | |
resolutions | array | One per contested key, as the refusal listed them |
assemble_source
[Phase 5: Semantic Analysis V1] Assemble a .asm (KickAssembler) or .tas (64tass) file to a binary, optionally byte-comparing the rebuild against the original PRG. Use to verify a disassembly rebuilds correctly. Not for generating the source (use disasm). Also writes the build's symbol file (`<output>.vs`, VICE label format) and registers it, so the live monitor names the build's addresses ([b]) while that build's bytes are in memory. The output folder is created when missing. SOURCES OF DIFFERENT DIALECTS BUILD TOGETHER: pass `units` (instead of source_path) — each is built by its own assemb…
| Parameter | Type | Description |
|---|---|---|
assembler | string | Assembler to use. auto selects KickAssembler for .asm and 64tass for .tas |
compare_to | string | Optional original PRG path to compare byte-for-byte |
output_dir | string | With units: where the PRGs, label tables and generated equates go. Default analysis/build. |
output_path | string | Optional output PRG path |
source_path | string | Path to the .asm or .tas source file (or use units) |
units | array | Several sources built together; instead of source_path. |
basic_list
List a tokenized BASIC program (V2 on the C64 and VIC-20, BASIC 3.5 on the C16 / C116 / Plus/4) from a PRG and extract its SYS / USR / LOAD facts — the listing, plus the address the BASIC boot jumps into and the address of the token byte that jumps there. Use on any PRG that loads at $0801 BEFORE disassembling it: a stock BASIC boot is token bytes, not 6502, and its SYS target is the real entry point into the machine code. Not for machine-code PRGs — on one it answers NOT BASIC and names the byte offset where the line chain broke, instead of half-rendering it (use analyze / disasm for thos…
| Parameter | Type | Description |
|---|---|---|
prg_path * | string | Path to the .prg file (absolute or relative to project dir) |
json | boolean | Return machine-readable JSON (listing + facts) instead of the rendered listing |
platform | string | The machine the program is from, which picks the keyword table: plus4 = BASIC 3.5, c64 and vic20 = V2. Resolved in order: this argument, the file's artifact record, the project default, c64. |
project_dir | string | Project root directory. When omitted, resolved by walking up from prg_path to knowledge/phase-plan.json. |
basic_tokenize
Tokenize BASIC source text (V2, or BASIC 3.5 when the platform is plus4) into a .prg — the inverse of basic_list. Use to build a loader stub, or to turn an edited listing back into bytes; the round trip is byte-identical, which is what makes a listing worth trusting. Not for assembling 6502 source (use assemble_source), and not for reading a program that already exists (use basic_list). Inputs: text, output_path, optional project_dir, platform (plus4 crunches the 3.5 keywords by the TED ROM's own first-match scan) and load_address (default: the machine's BASIC start — $0801 on the C64, $10…
| Parameter | Type | Description |
|---|---|---|
output_path * | string | Path to write the .prg to (absolute or relative to project dir) |
text * | string | BASIC source (V2; BASIC 3.5 keywords on plus4), one line per line, each starting with its line number (e.g. "10 SYS 2080"). Control codes by name: {CLR}, {RVS ON}, {CYAN}. |
load_address | string | Hex load address, e.g. "0801" or "$0801". Default: the BASIC start of the machine — $0801 on the C64; $1001 on the VIC-20 (unexpanded; $0401 with +3K and $1201 with +8K and up are passed explicitly)… |
platform | string | The machine the program is for, when load_address is omitted: c64 (default), vic20 or plus4. Resolved in order: this argument, the project default (project_init platform), c64. |
project_dir | string | Project root directory. When omitted, resolved by walking up from output_path to knowledge/phase-plan.json. |
suggest_depacker
Probe a file or byte-range and suggest likely depackers (RLE, Exomizer raw, ByteBoozer-like). Use first when bytes look compressed and the format is unknown; then run try_depack with the suggestion. Not for running a known depacker (use try_depack). Inputs: file/range. Returns: ranked depacker guesses.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path to the input file to probe |
length | string | Optional hex length to limit the probe window |
offset | string | Optional hex offset into the file, e.g. 001A |
project_dir | string | Project root — the directory holding knowledge/. Takes precedence over every other hint. Omit it and the input path is used, but only when it is absolute or exists from the server's working director… |
try_depack
Run one specific depacker against a file or byte-range (built-in RLE, Exomizer raw, host-side ByteBoozer2). Use when you know — or suggest_depacker guessed — the format. Not for guessing (use suggest_depacker). Inputs: file/range, depacker kind. Returns: the depacked file — a PRG (2-byte load address first) when the depacker knows the destination (byteboozer2, exomizer_sfx, rle with has_rle_header), the body alone as .bin otherwise (a header-less result you name .prg is written as .bin and the answer says so).
| Parameter | Type | Description |
|---|---|---|
format * | string | Which depacker to try |
input_path * | string | Path to the packed input file |
backwards | boolean | For Exomizer raw only. Not supported yet: a backwards (-b) stream is refused with an error. |
entry_address | string | For Exomizer SFX only: optional desfx entry override, e.g. 080D or 'load' |
has_rle_header | boolean | For RLE only: treat the first two bytes of the slice as a load header |
length | string | Optional hex byte length to limit the input slice |
max_size | integer | For RLE only: hard ceiling for unpacked size |
offset | string | Optional hex file offset to start from |
output_path | string | Optional output path for the unpacked data. byteboozer2, exomizer_sfx and rle with has_rle_header write a PRG (2-byte load address, then the body); exomizer_raw and rle without a header write the body… |
project_dir | string | Project root — the directory holding knowledge/. Takes precedence over every other hint. Omit it and the input path is used, but only when it is absolute or exists from the server's working director… |
reverse_output | boolean | For Exomizer raw only: use -r |
link_cart_chunk_to_asm
[Phase 5: Semantic Analysis V1] Use to associate a specific cartridge bank/slot chunk with its .asm or .tas disassembly artifact — records a derived-from relation so the cartridge inspector UI surfaces the correct source file for that chunk. Not for bulk chunk promotion (use bulk_create_cart_chunk_payloads) or for packer/format metadata (use record_cart_chunk_packer). Inputs: absolute or project-relative path to the runtime_luts/all_luts.json, chunk identified by (bank, slot, offset_in_bank, length) or by (lut, idx), and the asm_artifact_id from list_artifacts. Updates the knowledge store; n…
| Parameter | Type | Description |
|---|---|---|
asm_artifact_id * | string | ID of the ArtifactRecord for the .asm/.tas output. |
lut_path * | string | Path to runtime_luts/all_luts.json (relative or absolute). |
bank | integer | |
cart | string | The cartridge the chunk is in (its token, as project_status names it). Default: the cartridge the .asm descends from; with several in the project and none to tell, the call refuses and lists them. |
idx | integer | |
length | integer | |
lut | string | |
offset_in_bank | integer | |
project_dir | string | Override project dir; defaults to env C64RE_PROJECT_DIR. |
slot | string | |
summary | string | Optional human-readable note shown on the relation. |
record_cart_chunk_packer
Use to record the packer, format, and notes for a cartridge LUT chunk when you have identified its compression scheme — writes a chunk_packers.json sidecar so the cartridge layout view can show the packer alongside each bank entry. Not for ASM linkage (use link_cart_chunk_to_asm) or for bulk chunk creation (use bulk_create_cart_chunk_payloads). Inputs: absolute or project-relative path to runtime_luts/all_luts.json, chunk identified by (bank, slot, offset_in_bank, length) or (lut, idx), and the packer name string. Writes chunk_packers.json next to the LUT file; no knowledge-store entity is c…
| Parameter | Type | Description |
|---|---|---|
lut_path * | string | Path to the runtime_luts/all_luts.json (relative to project dir or absolute). The sidecar is written to chunk_packers.json next to it. |
packer * | string | Packer identifier. Conventions: rle, byteboozer, byteboozer-lykia, exomizer_raw, exomizer_sfx, custom-lz77, plain. |
bank | integer | Cart bank index. Required when identifying by physical placement. |
format | string | Optional format / dialect (e.g. 'prg', 'raw', 'sfx-loader'). |
idx | integer | Index within the named LUT. |
length | integer | Chunk length in bytes. Required when identifying by physical placement. |
lut | string | LUT name, e.g. 'tracks'. When set together with idx the tool resolves the chunk's physical key by reading lut_path. |
notes | array | Optional notes appended to the chunk's notes array. |
offset_in_bank | integer | Byte offset within the bank/slot. Required when identifying by physical placement. |
slot | string | Cart slot. Required when identifying by physical placement. |
inspect_address_range
[Phase 1: Extraction / Inventarization] Surface every static-analysis fact tied to a memory range — containing segments, VIC-register stores with decoded meaning, code xrefs into the range, copy routines, display/transfer evidence. Use to answer 'how is $XXXX used?' for a candidate region in a PRG. On a VIC-20 or TED file (platform argument, the artifact record or the project default) the register stores are the machine's whole I/O window, named from its platform rows or marked as having none. Not for listing files on a disk (use inspect_disk) or whole-RAM summaries (use ram_report). Inputs:…
| Parameter | Type | Description |
|---|---|---|
end_address * | string | Hex C64 end address (inclusive), e.g. "DF40". |
prg_path * | string | Path to the PRG file. |
start_address * | string | Hex C64 start address, e.g. "C000". |
analysis_json | string | Optional override path to the analysis JSON. Defaults to <prg-dir>/<stem>_analysis.json or analysis/<stem>_analysis.json. |
cart | string | The cartridge (its token, as project_status names it) these bytes must belong to. The report says which cartridge the file came from; with cart given, a file from another cartridge (or none) is refuse… |
platform | string | The machine the PRG runs on: which I/O window the register stores are read from and whose names they carry (an address the platform store has no row for is reported as such, never given a C64 name). R… |
project_dir | string | Project root. Resolved from prg_path when omitted. |
graph_find
Resolve a name, address, register, ROM entry or label to knowledge-graph nodes — every context that has one, with stable ids. Use to start any structural question ("where is the routine that…", "what is at $D018 in this project") before opening a listing. Not for prose lookups of where a topic is described (use project_search). Inputs: query, optional kind / origin / bank / limit. Returns: ranked one-line hits plus a machine-readable JSON block whose ids round-trip into graph_node and graph_edges.
| Parameter | Type | Description |
|---|---|---|
query * | string | Address ($D018, d018, bank:07:$8000), exact id, or name substring. |
bank | integer | Cartridge bank to narrow an address to. |
cart | string | Cartridge (its token, as project_status names it) to narrow to. Without it every cartridge answers and each hit names its own. |
kind | string | Node kind filter. |
limit | integer | Max hits (default 10). |
origin | string | human = has a human row; generated = generated only; platform = the platform's own nodes. |
project_dir | string | Project root. Defaults to the session's project. |
graph_node
The card for one knowledge-graph node: kind, range, its generated label and its human name side by side, edge counts by type, the hardware / ROM / zero page it touches, and whether a trace run ever observed it. Use after graph_find to understand a routine or an address before reading its code. Not for walking the neighbourhood (use graph_edges) or for prose findings (use project_search). Inputs: ref, optional bank. Returns: the card plus a JSON block with next[] follow-up calls.
| Parameter | Type | Description |
|---|---|---|
ref * | string | A node reference: an id any graph tool returned, an address like "$D018" or "bank:07:$8000", or a name / symbol (CHROUT, VMCSB, print_string). |
bank | integer | Cartridge bank to narrow an address to. |
cart | string | Cartridge (its token, as project_status names it) to narrow to. Without it every cartridge answers and each hit names its own. |
project_dir | string | Project root. Defaults to the session's project. |
graph_edges
The neighbourhood walk: callers, callees, readers, writers, references, ROM calls, zero-page and hardware use, containment, indirect (unknown-target) accesses — one tool, chosen by direction × kind × origin. Use to answer "who calls X", "who writes $D018", "what does this routine touch", "what did a trace observe here". Not for finding the node in the first place (use graph_find) or for a route between two nodes (use graph_path). Inputs: ref, direction (in|out|both), kind, origin (static|runtime|human|any), depth 1–2, limit. Returns: one line per edge with its instruction evidence, plus…
| Parameter | Type | Description |
|---|---|---|
ref * | string | A node reference: an id any graph tool returned, an address like "$D018" or "bank:07:$8000", or a name / symbol (CHROUT, VMCSB, print_string). |
bank | integer | Cartridge bank to narrow an address to. |
cart | string | Cartridge (its token, as project_status names it) to narrow to. Without it every cartridge answers and each hit names its own. |
depth | integer | 1 or 2 hops (default 1). |
direction | string | Default out. |
kind | string | Edge family; default any. |
limit | integer | Max edges (default 25). |
origin | string | Default any — static and runtime rows both, each labelled. |
project_dir | string | Project root. Defaults to the session's project. |
graph_path
Is there a control-flow path from one node to another, and through what. Use to connect an entry point to a routine, or a routine to a KERNAL call, before reading the code in between. Not for listing a node's direct edges (use graph_edges). Inputs: from, to (ids, addresses or names), via (calls | calls+jumps | any), max_depth. Returns: the shortest path as hops with per-hop evidence, or "no path" with the size of the reachable frontier, plus a JSON block.
| Parameter | Type | Description |
|---|---|---|
from * | string | A node reference: an id any graph tool returned, an address like "$D018" or "bank:07:$8000", or a name / symbol (CHROUT, VMCSB, print_string). |
to * | ||
bank | integer | Cartridge bank to narrow an address to. |
cart | string | Cartridge (its token, as project_status names it) to narrow to. Without it every cartridge answers and each hit names its own. |
max_depth | integer | Default 8. |
project_dir | string | Project root. Defaults to the session's project. |
via | string | Edge families to walk (default any control flow). |
graph_overview
The project's structural map from the graph: entry points, IRQ/NMI handlers seen in trace runs, banking sites, the hardware registers and KERNAL routines most used, the hottest zero page, subsystems, and the indirect accesses that still have no resolution. Use as the first question on a project you have not read, or to find where the unknowns are. Not for one node (use graph_node) or prose (use project_search). Inputs: optional focus, bank. Returns: per-section top-N with counts, plus a JSON block.
| Parameter | Type | Description |
|---|---|---|
focus | string | One section, or all (default). |
project_dir | string | Project root. Defaults to the session's project. |
top | integer | Entries per section (default 10). |
graph_remove_owner
Drop one owner (an artifact stem) from the knowledge graph: every generated row its analyses and renders seeded (control flow, memory access, signatures, the analysis import), the human rows its `<stem>_annotations.json` imported (routines, labels, segments, data blocks, their prose and boundary edges), their evidence, the generated edges that pointed at them, shared addr nodes nothing else references any more, and the owner's import ledger — so a later disasm of the same stem imports fresh. Use to clear scratch or preview renders (draft1, l1_prop, …) that distort counts, named %, orphans…
| Parameter | Type | Description |
|---|---|---|
dry_run | boolean | Count what would be removed and delete nothing (default false). |
owner | string | The owner stem as the graph spells it (see the list this tool returns without an owner), e.g. "draft1" or "l0_a". Omit to list the owners. |
project_dir | string | Project root. Defaults to the session's project. |
plan
The project's plan: work packages in order, each with its own done-when. Use at kickoff to store the packages the human agreed (set), to see where the work stands (show: open packages, cards NOT KEPT, cards WAITING for a human, cards blocked by an unkept requires), and to close a package (close) once every card of it is KEPT and its own done-when holds. Not for one step of work (use card) or for recording progress (use agent_record_step). Inputs: action set|show|close|usage; set: packages [{id, title, doneWhen: check[]}], replace; close: package (and by+why when only a [human] line is left); u…
| Parameter | Type | Description |
|---|---|---|
action * | string | |
by | string | close: who the human is, when a [human] line is the last one. |
duration_ms | integer | usage: duration_ms from the notification. |
model | string | usage: the model of the run (sonnet, opus, ...). |
package | string | close: the package id. |
packages | array | set: the packages in order. Existing ids are updated; with replace=true the list is the whole plan (packages holding cards cannot be dropped). |
project_dir | string | |
replace | boolean | |
tokens | integer | usage: subagent_tokens from the harness notification. |
tool_uses | integer | usage: tool_uses from the notification. |
why | string | close: the human's reason. |
card
One step of one plan package, with a done-when C64RE judges itself. Use to issue a card (the architect: goal, what to read, what to change, done-when as checks, what not to do, when to stop, requires), to read one (show), to re-run its checks (check), and to record a human gate's decision (judge). Not for the plan (use plan) or for the worker's report (agent_record_step with card and result). Inputs: action issue|show|check|judge|supersede|usage; issue: id, title, package, role, goal, context, read[], change, do, doneWhen: check[], not[], stopIf[], requires[], supersedes[] (the STOPPED / NOT K…
| Parameter | Type | Description |
|---|---|---|
action * | string | |
by | string | |
card | string | show/check/judge: the card id. |
change | string | |
context | string | |
do | string | |
doneWhen | array | |
duration_ms | integer | usage: duration_ms from the notification. |
goal | string | |
id | string | issue: the card id (lowercase [a-z0-9_.-]). |
kept | boolean | judge: the human's decision. |
model | string | usage: the model of the run (sonnet, opus, ...). |
not | array | |
package | string | |
project_dir | string | |
read | array | |
replacement | string | supersede: the card that replaces `card`. |
requires | array | |
role | string | issue: the worker's domain role. |
stopIf | array | |
supersedes | array | issue: the STOPPED or NOT KEPT card(s) this card re-plans; they become SUPERSEDED. |
title | string | |
tokens | integer | usage: subagent_tokens from the harness notification. |
tool_uses | integer | usage: tool_uses from the notification. |
why | string |
change_impact
What a change to this code can break, from the knowledge graph: who calls, jumps to or branches into it (by depth), who reads what it writes, which pointer or jump table points INTO it, and which documents and findings claim something about it that may be false afterwards. UNKNOWN is a class of its own and is never folded into "low" — an indirect jump, a computed return, a write that lands inside the range (self-modifying code), code on the drive's own CPU and every address the graph could not resolve are listed as what they are. With the PRG the range lives in it also names what the change…
| Parameter | Type | Description |
|---|---|---|
address_end | string | End of the changed range, inclusive. Defaults to address_start. |
address_start | string | Start of the changed range, as $C010 or a number. With address_end this replaces ref. |
candidate_cycles | number | How many cycles the replacement adds (code_cost's Δ cycles). With trace_path it turns the timing note into a flag against the margin the busiest line has left. |
depth | integer | How far upstream to walk (default 3). |
prg_path | string | The PRG whose bytes back this code. Given, the report also says what the change must preserve, read from the code that follows the range (liveness). Absolute, or relative to the project. |
project_dir | string | Project root. Defaults to the session's project. |
ref | string | What is changing: a routine name, a node id any graph tool returned, or an address ($C010). Omit it when you give address_start/address_end. |
trace_path | string | A trace store (from trace_cost's capture, or any finalized capture). Given, the report also names the raster lines this code ran in and the cycles it occupies there. |
code_cost
What a piece of 6502 costs, and — given two versions — whether they do the same thing. Per basic block: bytes exact, cycles as a span, where the span is only the page crossings and the branches. A loop whose counter is a constant is resolved to its iteration count and costed exactly; any other loop is reported per iteration with its bound marked unknown. For two straight-line versions it also decides EQUIVALENT / NOT EQUIVALENT (with the differing effect as a counter-example) / UNKNOWN (with the reason) by executing both symbolically and comparing A, X, Y, the stack, every memory write and…
| Parameter | Type | Description |
|---|---|---|
address | string | Where those bytes run ($C000). Required with bytes. |
address_end | string | With prg_path: the last address of the range, inclusive. |
address_start | string | With prg_path: the first address of the range. |
bytes | string | The code, as hex: "a5 10 18 69 01 85 10". Use this or prg_path. |
candidate_address | string | Where the replacement runs. Defaults to the original's address. |
candidate_bytes | string | The replacement, as hex. Given, the answer is a comparison: Δ bytes, Δ cycles and the equivalence verdict. |
candidate_end | string | With candidate_prg_path: the last address, inclusive. |
candidate_prg_path | string | A PRG to take the replacement from, with candidate_start / candidate_end. |
candidate_start | string | With candidate_prg_path: the first address. |
decimal_at_entry | string | Decimal mode on entry. Default clear — the C64 runs with D clear, and a block that sets it is modelled as it is. "unknown" keeps every add and subtract opaque, which makes more answers UNKNOWN. |
listing | boolean | Include the per-block, per-instruction listing with each instruction's cycles (default false). |
live_out | array | What is still live AFTER this code: any of A X Y SP C Z N V D I, or [] for nothing. Omitted, every exit the graph cannot see is assumed to leave everything live — the safe direction, and it will cal… |
prg_path | string | A PRG to take the bytes from; it carries its own load address. Absolute, or relative to the project. |
project_dir | string | Project root. Defaults to the session's project. |
trace_cost
What code costs ON THE MACHINE, with the cycles the VIC took and how often it ran. Either evaluates a trace store you already have, or records one itself: a machine of its own boots the medium, advances to a frame boundary, marks it, records the cpu and memory channels for the frames you name and finalizes the capture. Per instruction instance it reports the measured cycles (the difference between two trace rows IS the cycles that instruction took), the cycle table's answer with the page crossing and the branch resolved from the trace itself, the 7 cycles of any interrupt dispatch that ran bef…
| Parameter | Type | Description |
|---|---|---|
address_end | string | Evaluate only instructions whose pc is at or before this address. |
address_start | string | Evaluate only instructions whose pc is at or after this address. |
budget_seconds | number | How long the recording machine may live before it ends itself (default 120, max 600). |
cpu | string | Which CPU's rows to evaluate (default c64). The drive lane is REFUSED and says why: what the runtime records there is a deduplicated sample of the drive's program counter with no opcode, not a stream… |
domains | array | Which channels to record. Default the C64's cpu and memory, which is what the arithmetic reads; add drive8-cpu to evaluate the drive's own 6502. |
frames | integer | How many frames to record once the machine is warm (default 2). The window is yours; the capture records all of it and the query filters (doctrine rule 4). |
media_path | string | Any medium to record instead — .crt / .d64 / .g64 / .d81 / .c64re, identified by content. |
model | string | Which C64 to record on — c64-pal, c64-ntsc, c64-paln. Omitted: the project's model. The arithmetic is PAL-shaped; another model is recorded and evaluated, with its own line and frame lengths taken f… |
out | string | Where to write the capture. Omitted, it lands in a temporary directory that is named in the report. |
prg_path | string | A PRG to record: it is booted on a machine of this call's own, which is then ended. Absolute, or relative to the project. |
project_dir | string | Project root. Defaults to the session's project. |
record_after_steps | integer | Start recording only after this many steps — the load is rarely what you are measuring. Default 0 (from the moment the medium is in). |
steps | array | What to do while recording, in the capture-scenario notation — `I wait 50 frames`, `I type "RUN{RETURN}"`, `I wait until the CPU reaches $0810 within 4000 frames`. Replaces `frames` when given. |
trace_path | string | A finalized trace store (.duckdb) to evaluate. Absolute, or relative to the project. Give this OR a medium to record. |
optimisation_candidates
Where this code could be faster, with a deterministic verdict on every suggestion. Each rule — a `jsr`+`rts` that could be a `jmp`, a load nothing needs, a `clc` where the carry is already what it would set, a `jmp` to a `jmp`, a table read that pays for crossing a page, a variable that belongs in zero page, a loop that could count down — is a heuristic that may be wrong about whether it applies, so nothing is shown without the answer beside it: both versions executed symbolically and compared over the registers, the flags that are still live there, every memory cell either writes and ever…
| Parameter | Type | Description |
|---|---|---|
address_end | string | The last address of the range, inclusive. Defaults to the end of the image. |
address_start | string | Scan this range instead ($C000 or a number). With address_end. |
classes | array | Which rule classes to use. Default local, dataflow and structural. "undocumented" adds the rules that rewrite into LAX, DCP and the other stable illegal opcodes — off unless you ask, because using t… |
limit | integer | How many candidates to list (default 40). The counters always cover all of them. |
payload | string | A payload or artifact to scan instead — its id, its title, or its path in the project. Its file is the byte source. |
prg_path | string | The PRG whose bytes are scanned; it carries its own load address. Absolute, or relative to the project. Give this or payload. |
project_dir | string | Project root. Defaults to the session's project. |
ref | string | One routine to scan: a name, or a node id any graph tool returned. Omitted, every routine the graph knows inside the image is scanned. |
show_rules | boolean | Print the rule table — what each rule looks for, what it requires, what it becomes and what it saves — instead of scanning. |
trace_path | string | A finalized capture (.duckdb) to rank by — from trace_cost, or any capture of this code running. With it the list is ordered by cycles saved per frame and a page crossing becomes an exact count inst… |
list_g64_slots
[Phase 1: Extraction / Inventarization] Use to enumerate every half-track slot in a G64 image before inspecting individual tracks — gives offsets, lengths, and speed-zone info so you know which slots hold real data. Not for DOS-directory listings (use inspect_disk) or sector-level decoding (use inspect_g64_track). Inputs: absolute or project-relative path to a .g64 file. Returns: slot table; does not write any artifact.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Path to the .g64 image |
include_empty | boolean | Include empty slots with raw offset 0 |
inspect_g64_track
[Phase 1: Extraction / Inventarization] Use to decode a single G64 track via GCR and report discovered sectors, missing sector IDs, duplicates, invalid blocks, and raw track metadata including speed zone. Not for listing all slots (use list_g64_slots) or for block-level ring-map inspection (use inspect_g64_blocks). Inputs: absolute or project-relative .g64 path plus track number (supports 0.5 half-track steps). Returns: sector summary JSON + ASCII ring map; does not write any artifact.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Path to the .g64 image |
track * | number | Track number, supports 0.5 steps such as 18 or 18.5 |
inspect_g64_blocks
[Phase 1: Extraction / Inventarization] Use when you need raw GCR block-level detail for a single G64 track: sync positions, parity choices, header/data pair validity, and an ASCII ring map. Not for a high-level sector summary (use inspect_g64_track) or for sync-mark positions only (use inspect_g64_syncs). Inputs: absolute or project-relative .g64 path plus track number. Returns: JSON block pairs + ASCII ring map; does not write any artifact.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Path to the .g64 image |
track * | number | Track number, supports 0.5 steps such as 18 or 18.5 |
ascii_width | integer | ASCII visualization width, default 96 |
limit | integer | Optional limit for displayed header/data pairs |
extract_g64_raw_track
[Phase 1: Extraction / Inventarization] Use to export the raw circular half-track bitstream of a G64 track to a .bin file for bit-level analysis outside the MCP. Not for decoded-sector extraction (use extract_g64_sectors) or for in-place inspection without writing files (use inspect_g64_track). Inputs: absolute or project-relative .g64 path plus track number; output_path defaults to analysis/g64-raw/<name>-track-N.bin inside the project. Writes one binary file; no artifact or finding is registered automatically.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Path to the .g64 image |
track * | number | Track number, supports 0.5 steps such as 18 or 18.5 |
output_path | string | Output path for the raw half-track dump |
inspect_g64_syncs
[Phase 1: Extraction / Inventarization] Use to list the bit-aligned positions of every sync mark on a specific G64 half-track — useful when verifying custom protection that relies on unusual sync counts or spacing. Not for full sector decoding (use inspect_g64_track) or block-pair detail (use inspect_g64_blocks). Inputs: absolute or project-relative .g64 path plus track number. Returns: sync positions list; does not write any artifact.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Path to the .g64 image |
track * | number | Track number, supports 0.5 steps such as 18 or 18.5 |
limit | integer | Optional limit for displayed sync marks |
scan_g64_headers
[Phase 1: Extraction / Inventarization] Use to scan a G64 track for sector header candidates the way real 1541 firmware searches — essential when a custom loader uses non-standard sector IDs or duplicate headers. Not for read-ahead sector data (use read_g64_sector_candidate) or for full decoded-sector listing (use inspect_g64_track). Inputs: absolute or project-relative .g64 path plus track number. Returns: header candidate list; does not write any artifact.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Path to the .g64 image |
track * | number | Track number, supports 0.5 steps such as 18 or 18.5 |
limit | integer | Optional limit for displayed header candidates |
read_g64_sector_candidate
[Phase agnostic] Use to read a specific sector from a G64 track by simulating the 1541 firmware's sync/header-search loop — the right tool when you know which sector you need and want its decoded payload bytes. Not for listing all headers on a track (use scan_g64_headers) or for extracting many sectors at once (use extract_g64_sectors). Inputs: absolute or project-relative .g64 path, track number, and sector number. Returns: sector status + first 16 payload bytes preview; does not write any artifact.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Path to the .g64 image |
sector * | integer | Sector number to search for on the specified track or half-track |
track * | number | Track number, supports 0.5 steps such as 18 or 18.5 |
extract_g64_sectors
[Phase 1: Extraction / Inventarization] Use to decode one track, a list of tracks, or a whole G64 side via GCR and write one .bin file per sector to disk — the right tool when you need the raw sector payloads as files for further analysis or comparison. Not for in-place inspection without writing files (use inspect_g64_track) or for exporting the raw bitstream (use extract_g64_raw_track). Give exactly one of track / tracks / all_tracks: a whole side in one call is the same work as one call per track, without the round-trips. Output defaults to analysis/g64/<image>/track-N/ inside the project…
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Path to the .g64 image |
all_tracks | boolean | Every half-track slot in the image that holds data — the whole side in one call. Use for a full side sweep instead of one call per track. |
output_dir | string | Output directory. With one track it IS the directory; with several it is the parent, and each track gets a track-N subdirectory under it. |
project_dir | string | Project root directory. When omitted, resolved by walking up from image_path to knowledge/phase-plan.json. |
sectors | array | Optional explicit sector IDs to extract; defaults to all decoded sectors. With several tracks it is applied to each of them (e.g. [0] takes sector 0 of every track). |
track | number | ONE track number, supports 0.5 steps such as 18 or 18.5. Give this, or tracks, or all_tracks. |
tracks | array | Several track numbers in one call, e.g. [1,2,3,17,18]. 0.5 steps allowed. Each track gets its own output directory and track-metadata.json. |
analyze_g64_anomalies
[Phase 2: Loader / Load behaviour / Sequence] Use to sweep an entire G64 image track-by-track and produce a structured anomaly report — duplicate sectors, missing sectors, unexpected sector IDs, invalid blocks — including optional cross-reference against a known custom-LUT file. Not for single-track inspection (use inspect_g64_track) or for DOS directory listing (use inspect_disk). Inputs: absolute or project-relative .g64 path; optional LUT text file path. Returns: anomaly report; does not write any artifact.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Path to the .g64 image |
lut_path | string | Optional text/markdown file containing LUT references like T37:S2+225 for coverage diagnostics |
runtime_session_start
[Phase 2: Loader / Load behaviour / Sequence] Start or attach to the SHARED headless C64+1541 session — the one machine the human co-drives, never power-cycled for a test. For a machine of your own — to step, breakpoint, trace or rewind without taking the human's machine or another project's — use runtime_sandbox_start (a sandbox session: a stated purpose, a budget, a session id for every runtime_* tool, ended with runtime_sandbox_end), runtime_sandbox_run for one call, or runtime_scene_reel for a scripted run; this tool refuses a media_path when it attaches, rather than swapping the med…
| Parameter | Type | Description |
|---|---|---|
device_id | integer | Drive number the medium is mounted on (8–11). Disk media only; ignored for a cartridge. |
disk_path | string | Deprecated alias for media_path, kept so existing callers keep working. The name is misleading: media_path takes a cartridge or a snapshot just as well as a disk. |
enable_kernal_fileio_traps | boolean | Shortcut the KERNAL's file I/O instead of running it cycle by cycle. Faster, but a loader that depends on the real timing will behave differently — leave it off when the timing is the subject. |
enable_kernal_io_traps | boolean | Shortcut the remaining KERNAL I/O entry points. Same caveat as the other two traps. |
enable_kernal_serial_traps | boolean | Shortcut the KERNAL's serial routines. Off for any fastloader work: the custom transfer IS the thing under study. |
media_path | string | The medium to put in the machine: a .crt CARTRIDGE, a .d64 / .g64 / .d81 disk, a .prg, or a .c64re snapshot. One parameter for all of them — the daemon decides the type from the file's CONTENT, so a… |
model | string | Which C64 the session is — c64-pal, c64-ntsc or c64-paln (runtime_monitor `model` lists every model and what a missing one lacks). Omitted: the machine stays the model it is. Named and already that… |
project_dir | string | Project root directory. When omitted, resolved by walking up from media_path (or trace_out) to knowledge/phase-plan.json. |
session_id | string | Leave out. A sandbox session id (sb-…) is refused here: it starts or attaches the SHARED machine the workbench shows; a sandbox session is started with runtime_sandbox_start and ended with runtime_s… |
start_track | integer | Park the drive head on this track before the run — for a loader that assumes where it left off. Disk media only. |
trace_domains | array | Which domains to capture (default c64-cpu + memory). Enables the matching passive producers. |
trace_drive | boolean | Keep an in-memory 1541 ring (head steps, byte-ready, block reads). For a durable capture use trace_out + trace_domains instead. |
trace_drive_capacity | integer | How many drive events the in-memory ring holds before it wraps. |
trace_iec | boolean | Keep an in-memory IEC bus ring for this session (ATN/CLK/DATA transitions). For a durable capture use trace_out + trace_domains instead. |
trace_iec_capacity | integer | How many IEC transitions the in-memory ring holds before it wraps. |
trace_out | string | Path (abs or under the project) for the trace.duckdb. Enables persistent streaming trace capture. |
write_protected | boolean | Mount the disk read-only. Note the project default is read/write with auto-persist back into the original image, so set this when the run must not change the medium. |
runtime_session_run
[Phase 2: Loader / Load behaviour / Sequence] Advance a session up to N C64 instructions (drive runs proportional cycles), with optional breakpoints / cycle budget / named stop condition. Use to step the machine forward. This is a run with a stop, on every machine alike (the shared one and a sandbox): it starts the machine running, stops it on the cycle budget or at an armed breakpoint, watchpoint or JAM, and the call returns when it has stopped; the machine stays stopped there. When the session has a streaming trace active (runtime_session_start trace_out=...), this run automatically chunks +…
| Parameter | Type | Description |
|---|---|---|
max_instructions * | integer | |
session_id * | string | |
breakpoints | array | Hex PC addresses to break on. |
cycle_budget | integer | |
until | object | Named stop condition. If set, runs until satisfied (or budget exhausted) instead of max_instructions. |
runtime_mark
Stamp a named phase marker into the active trace at the current cycle (e.g. 'boot', 'title', 'gameplay'). Requires an active streaming trace — start one with runtime_session_start(trace_out=...). Use to scope later trace queries by phase (between mark cycles). This is a LABEL in a trace, not an anchor: it cannot be returned to. For a named instant you can come back to and start sandbox runs from, use runtime_anchor_set. Not for querying marks (use trace_store_anchor_list / trace_store_query). Inputs: session_id, label. Returns: trace status.
| Parameter | Type | Description |
|---|---|---|
label * | string | Phase label, e.g. boot-complete / title / scene-1. |
session_id * | string |
runtime_trace_start
Start a streaming trace on a RUNNING session (no need to pre-declare trace_out at session_start). Use to begin capturing the live shared session's execution into a .c64retrace binary timeline (the authority) + a queryable trace.duckdb index. Pick domains (default c64-cpu+memory; add drive8-cpu/iec/vic for the full picture). Then drive with runtime_session_run, stamp phases with runtime_mark, finalize with runtime_trace_finalize, and read the swimlane/offline-stepping with runtime_swimlane_slice / query with trace_store_*. Not for a one-shot scenario (use runtime_session_start trace_out=). DISC…
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
domains | array | Trace domains. Default ['c64-cpu','memory']. The CPU firehose is the swimlane truth; add drive8-cpu/iec for IEC-bus + drive stepping, vic for raster. Two ARMED-ONLY read-set lanes, both produced by th… |
hypothesis | string | REQUIRED (read-before-trace gate): the read-derived reason for this trace — a concrete $address you are investigating + what you READ that points there (a routine, annotation, or finding). E.g. "$C0… |
output | string | Path (abs or under the project) for the trace store. Omit it: the default is the per-user trace directory outside the project. A path inside a OneDrive/Dropbox/iCloud folder is obeyed but warned about… |
runtime_trace_finalize
Finalize the active streaming trace: drain remaining events + write the trace_run header, then close the trace.duckdb. Requires an active trace (runtime_trace_start, or runtime_session_start trace_out=...). Call once capture is complete; the store is then queryable any time via trace_store_query / trace_store_top_pcs / trace_store_bus_find / runtime_query_events (pass the trace.duckdb path). Not for marking (use runtime_mark) or progress polling (use runtime_trace_status). Inputs: session_id. Returns: run summary (runId, event/byte counts, mark list, store path).
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
runtime_trace_status
Report the active streaming trace's status — runId, output path, captured event/mark counts, backpressure flag. Requires an active trace started via runtime_session_start(trace_out=...). Use to watch capture progress and decide when to call runtime_trace_finalize. Not for the run's machine state (use runtime_session_status) or offline store queries (use trace_store_info). Inputs: session_id. Returns: trace status JSON.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
runtime_loader_lens
Use to read a loader-lens capture's landing map: which medium block each transferred payload came FROM and where it came to rest in C64 RAM. Point it at a .c64retrace captured with the drive-mechanism lane armed (runtime_trace_start domains=['memory','drive8-cpu','drive-mechanism'] on the daemon, then drive + finalize). A run (ascending or descending stores) counts as a landing when most of its own stores followed a transfer read ($DD00) closely (a run idle for more than two disk revolutions ends; a store later than that starts a new run), or when it is a 1:1 copy (constant XOR) of bytes a tra…
| Parameter | Type | Description |
|---|---|---|
capture_path * | string | Path (abs or under the project) to the .c64retrace binary capture. |
hypothesis | string | REQUIRED (read-before-runtime gate): the read-derived reason — a concrete $address (the payload/routine you already located by reading the drivecode disasm / an entity / a finding) + what pointed yo… |
min_run_len | integer | Min contiguous RAM-write run counted as a payload landing (default 16 — filters scratch). |
project_dir | string | Project root directory. When omitted, resolved by walking up from capture_path to knowledge/phase-plan.json. |
runtime_session_status
[Phase 2: Loader / Load behaviour / Sequence] Snapshot a running session's machine state — which C64 it is (model, frame length, clock, canvas), the C64 CPU, the drive (motor, head, LED, what is mounted and whether it is dirty) and the cartridge (type, bank, activity), plus cycle counts — and which project the runtime serves, flagging projectMismatch when it is not this one (it reports, it never moves the runtime — that is the workbench's decision). Use to check where execution is and what the machine has in it. For the 1541's own CPU registers use runtime_monitor `device drive8` then `r…
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session to report on — "shared" is the live machine the human is watching |
project_dir | string | This project's root, to check that the runtime serves the same one. When omitted, the MCP's project. |
runtime_keep_alive
Keep the runtime up for a while, or for good. The runtime C64RE starts by itself ends itself after 10 minutes with no request, no viewer on the A/V stream and no recording trace, and the next tool call then starts a FRESH machine — sessions, mounted media, checkpoints and rewind history gone. Use when you are about to step away from a machine you still need (a long think, a human checking the screen, a trace you mean to come back to): minutes holds it that long from now, forever until it is stopped. Not for a machine of your own (runtime_sandbox_run ends with its call by design; a sandbox se…
| Parameter | Type | Description |
|---|---|---|
forever | boolean | Never end on idle; it runs until stopped. A later `minutes` replaces it. |
minutes | number | Hold the runtime at least this long from now. |
session_id | string | Leave out. A sandbox session id (sb-…) is refused here: it holds the shared daemon up against its idle exit; a sandbox's life is its budget and idle limit, set at runtime_sandbox_start. |
runtime_session_close
Close a runtime session and release its resources. Use when finished with a session started by runtime_session_start: it stops the RuntimeController loop (which otherwise keeps ticking the session and pegs a CPU core ~100% after you are done), finalizes any active streaming trace, and removes the session from the registry — the clean alternative to killing the process. Not for pausing to inspect then resuming (keep the session and use runtime_session_run) or for finalizing only a trace (use runtime_trace_finalize). NOTE: in the one-machine-per-process runtime, closing a session does NOT hand…
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
runtime_load_prg
Inject a PRG into a session's RAM as if KERNAL LOAD placed it. Use to load a program without a disk. Not for disk LOAD (mount + runtime_type a LOAD line) or static analysis (use analyze). Inputs: session_id, prg_path, optional load_address. Returns: load range.
| Parameter | Type | Description |
|---|---|---|
prg_path * | string | |
session_id * | string | |
load_address | string | Override load address (hex). Default = PRG header. |
project_dir | string | Project root directory. When omitted, resolved by walking up from prg_path to knowledge/phase-plan.json. |
runtime_run_prg
Load AND start a .prg in one shot (the macro that was missing). Loads the PRG into the shared session, then autostarts: a BASIC program (load address $0801) → types RUN; machine code → `g <entry>` (continue at the entry; default = the load address, or pass `run` for an explicit entry like a SYS target). Use to just-run a .prg without disk/monitor steps; not for loading without starting (use runtime_load_prg). Inputs: session_id, prg_path, optional run (hex entry address for machine code). Returns: load address + the autostart action taken.
| Parameter | Type | Description |
|---|---|---|
prg_path * | string | |
session_id * | string | |
project_dir | string | Project root directory. When omitted, resolved by walking up from prg_path to knowledge/phase-plan.json. |
run | string | Machine-code entry (hex, e.g. '1000' or '$1000'). Omit for BASIC autostart / default load-address entry. |
runtime_type
Queue text into a session's keyboard buffer (CIA1 matrix), as if typed. Use to enter BASIC commands / LOAD lines, and to press keys that print nothing. Not for joystick (use runtime_joystick). KEY TOKENS: {RETURN} {RUN/STOP} {HOME} {CLR} {DEL} {INST} {CRSR UP} {CRSR DOWN} {CRSR LEFT} {CRSR RIGHT} {F1}..{F8} {SPACE} {QUOTE}, modifiers {SHIFT} {C=} {CTRL}, and combos with + such as {SHIFT+RETURN}, {C=+1}, {CTRL+3}. They are pressed in the CIA1 matrix, so a game that scans $DC00/$DC01 sees them, not only the KERNAL's GETIN (F2/F4/F6/F8, CRSR UP/LEFT, CLR and INST are SHIFT plus the neighbouring k…
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
text * | string | Text to type. Use \r or \n for RETURN. {TOKEN} presses a non-printing key (e.g. {F5}, {RUN/STOP}, {CRSR DOWN}, {SHIFT+RETURN}). |
extra_frames | integer | With settle: extra frames after the last key, for the target to act on it (default 2). A BASIC line needs a few; a game menu may want more. |
gap_cycles | integer | |
hold_cycles | integer | |
settle | boolean | Play the whole queue out before returning: the machine is stopped and run for exactly the cycles the queue needs, so the text is typed when the call returns. Default false (queue and return). |
runtime_joystick
Set or HOLD joystick state on a session. Use to drive game input. Not for keyboard (use runtime_type). Two modes. Without `hold_frames` it sets the port state and returns immediately — a machine that is running keeps running, so a press lasts as long as it takes you to make the next call, which is a moment you do not control (a stopped machine holds it until it runs again). With `hold_frames` the press is FRAME-LOCKED: the tool stops the machine, applies the state, runs exactly that many frames (one run with a stop), releases, and puts the machine back as it found it, running or stopped. Tha…
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
down | boolean | |
fire | boolean | |
hold_frames | integer | Hold the stated state for exactly this many frames of the machine, then release — a frame is 19656 cycles on PAL, 17095 on NTSC, read from the machine. The machine is stopped around it, so the press… |
left | boolean | |
port | integer | Joystick port (1 or 2). Default 2. |
right | boolean | |
up | boolean |
runtime_render_screen
[Phase 2: Loader / Load behaviour / Sequence] Render a session's current VIC output to a PNG. Use to see the live screen state. Not for a saved scenario (use the advanced scenario export). The output folder is created when missing. Inputs: session_id, path. Returns: PNG path + dimensions.
| Parameter | Type | Description |
|---|---|---|
path * | string | Output PNG path |
session_id * | string | |
project_dir | string | Project root directory. When omitted, resolved by walking up from path to knowledge/phase-plan.json. |
runtime_checkpoint_list
List the session's checkpoint-ring keyframes (id, frame, cycles, pinned) + ring stats (count, bytes, budget). The ring auto-captures a full machine snapshot every ~0.5s while the session runs, for rewind/scrub. Use to see what points you can restore to. Not for the trace timeline (use trace_store_*). Inputs: session_id. Returns: checkpoint refs + stats.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
runtime_checkpoint_capture
[Phase 2: Loader / Load behaviour / Sequence] Capture a checkpoint NOW (a full restorable snapshot of the shared session at the current instruction boundary) and add it to the ring. Use to mark an interesting live moment before it scrolls out of the auto-capture window. Not for a durable file: for that, runtime_monitor with `dump "<path.c64re>"`. Inputs: session_id. Returns: the new checkpoint ref + ring stats.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
runtime_checkpoint_pin
Pin a checkpoint so the ring never evicts it (the durability primitive — pinned keyframes survive past the ~2.6 min window). Use to retain an interesting state as evidence / a branch base. The id may be an anchor's name. Not for a file dump (use the runtime's .c64re snapshot dump). Inputs: session_id, checkpoint id or anchor name. Returns: ref + stats.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
session_id * | string |
runtime_checkpoint_unpin
Unpin a checkpoint (let the ring reclaim it under the byte budget again). Use to release a retained state you no longer need; not for pinning one (use runtime_checkpoint_pin). Takes the checkpoint id only: an anchor's name is refused, because an anchor holds its own pin — release that with runtime_anchor_drop. Inputs: session_id, checkpoint id. Returns: ref + stats.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
session_id * | string |
runtime_checkpoint_restore
Restore the shared session to a checkpoint (REWIND/scrub): the machine jumps back to that full keyframe state and pauses. The human watching the UI sees the same jump (one shared session). Use to rewind to an interesting moment. The id may be an anchor's name (runtime_anchor_goto does the same for an anchor and says what it moved). Not for forward replay of recorded events (that's the branch/scenario path). Inputs: session_id, checkpoint id or anchor name. Returns: restored ref + new machine state.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
session_id * | string |
runtime_recorder_status
The shared-memory recorder's status: anchor count, oldest/newest cycle, scrub depth, medium generations, dropped count. The recorder is the off-thread streaming capture (separate from the checkpoint ring) that holds minutes of cheap scrub history. Use to see how much history is retained; not for the anchor list (use runtime_recorder_list). Inputs: session_id. Returns: recorder stats.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
runtime_recorder_list
List the recorder's stored anchors (seq, cycle, wallMs, disk/cart generation). Each is a restorable scrub point in the off-thread history. Use to pick a seq to dump (use runtime_recorder_dump). Inputs: session_id. Returns: anchor list.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
runtime_recorder_dump
Dump a recorder anchor (a past scrub point, by seq from runtime_recorder_list) to a durable .c64re snapshot file. The recorder's unique value: persist a point from MINUTES of cheap history, then undump it (runtime_monitor with `undump "<path.c64re>"`) and replay it with tracing on. Not for the live moment (use the checkpoint/dump path). Inputs: session_id, seq, path. Returns: dump result (file bytes, embedded media, cycle/pc).
| Parameter | Type | Description |
|---|---|---|
path * | string | |
seq * | number | |
session_id * | string | |
project_dir | string | Project root directory. When omitted, resolved by walking up from path to knowledge/phase-plan.json. |
runtime_rewind
Time-travel: rewind the shared session to a past checkpoint, optionally continue from there. Seek by `cycle` (nearest checkpoint at/before it) or explicit `id`; default = the most recent. `then`: pause (land + inspect, default) | run (continue forward from there) | keep. Use to jump to a past machine state for inspection, or to re-run from a known point (e.g. the code-overlay debug loop: rewind → patch RAM via runtime_monitor → run → observe → repeat). Not for a plain forward run (use runtime_session_run). The human at the UI sees the same jump (one shared session). Inputs: session_id,…
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
cycle | number | |
id | string | |
then | string |
runtime_overlay_run
Use for the code-overlay debug loop (the fast runtime what-if): rewind to a past checkpoint (anchor by `cycle` nearest-at/before, or `id`, or most recent), apply a RAM patch (the `patches` overlay), run forward, and return the observed state — repeatable. Each call restores fresh, so the prior patch is rolled back; iterate a candidate fix from a FIXED point without rebuild/reboot. patches: [{addr, bytes:[..], read?, space?, bank?}]; run with run_cycles (+ optional until_pc breakpoint). Pre-assemble asm→bytes (assemble_source) for the fast loop. `space` targets RAM (default) or a cart bank:…
| Parameter | Type | Description |
|---|---|---|
patches * | array | |
session_id * | string | |
anchor_cycle | number | |
anchor_id | string | |
run_cycles | number | |
until_pc | number |
runtime_monitor
Remote-control the interactive runtime monitor: run ANY monitor command string against the shared session and get its text output back. Use it for any monitor-style interaction — this is the WHOLE monitor REPL in ONE tool, and most of what the human can do at the machine is HERE rather than in a named tool. MEMORY + CPU: m/d (hex dump / disasm), r (registers, `r a=$42` to set), sd (the real executed path), df (flow disasm), screen, bitmap, io, iec (every unit on the bus: drives by type, folder/host devices), bank, wr/f/t/c/h (write/fill/move/compare/hunt), a (assemble), device c64|drive8…d…
| Parameter | Type | Description |
|---|---|---|
command * | string | |
session_id * | string |
runtime_install
Fetch the TRX64 runtime daemon this C64RE is pinned to and put it where C64RE looks for it. Use when a runtime tool reports no daemon and you have none installed. Downloads the release build for this platform, verifies the checksum published beside it, and unpacks it into a per-version cache directory — nothing is installed into the system and no existing daemon is touched. Needs network access. Not for a daemon you already have (set C64RE_TRX64_BIN) and not for one already running (set C64RE_RUNTIME_ENDPOINT). Inputs: force. Returns: the path, the version, and whether it was already there.
| Parameter | Type | Description |
|---|---|---|
force | boolean | Re-download and replace even when the pinned version is already in the cache. |
runtime_monitor_registers
[Phase 2: Loader / Load behaviour / Sequence] Read a session's CPU registers (PC/A/X/Y/SP/flags) + cycle count. Use to inspect live CPU state. Not for memory (use runtime_monitor_memory). Inputs: session_id. Returns: register dump.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
memspace | string |
runtime_monitor_memory
[Phase 2: Loader / Load behaviour / Sequence] Read a memory range from a session as hex/bytes. Use to inspect live RAM/IO. Not for disassembly (use runtime_monitor_disasm) or static artifacts (use read_artifact). Inputs: session_id, address, length. Returns: bytes.
| Parameter | Type | Description |
|---|---|---|
end * | number | |
session_id * | string | |
start * | number |
runtime_monitor_disasm
[Phase 2: Loader / Load behaviour / Sequence] Disassemble live memory at an address in a session. Use to read code at the current PC or a target. Not for a static PRG (use disasm). Each line's own address, branch/JSR/JMP target and operand address are named from the project (`; $c000=main[u]`, origin [u] user / [b] build / [?] derived) when — and only when — that payload's code bytes are in memory now. Inputs: session_id, address, count. Returns: disassembly lines.
| Parameter | Type | Description |
|---|---|---|
addr * | number | |
session_id * | string | |
count | number |
runtime_step_into
[Phase 2: Loader / Load behaviour / Sequence] Execute one instruction in a session, stepping INTO subroutines. Use for fine-grained single-step debugging. Not for stepping over a JSR (use runtime_step_over). Inputs: session_id. Returns: new PC + registers.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
runtime_step_over
[Phase 2: Loader / Load behaviour / Sequence] Execute one instruction in a session, stepping OVER JSR (runs the subroutine to its return). Use to skip into-call detail. Not for entering the call (use runtime_step_into). Inputs: session_id, budget (cycles the subroutine may run, default 100000). Returns: halted, haltReason (next_pc | breakpoint | budget_exhausted), cyclesElapsed, instructionsElapsed, finalPc.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
budget | integer | Cycle budget for the step (C64 cycles). Default 100000. |
runtime_until
[Phase 2: Loader / Load behaviour / Sequence] Run a session until the PC reaches a target address or the cycle budget is exhausted. Use to reach a known code point. The run stops on the first arrival at the target (or at a breakpoint you set); the budget counts C64 cycles (default 10000000) and the run ends at the first instruction boundary at or past it, so it can overshoot by one instruction. A PC that already stands on addr halts at once (0 cycles). Not for N-instruction stepping (use runtime_session_run). Inputs: session_id, addr (target PC), budget (cycles). Returns: halted, budgetExhaust…
| Parameter | Type | Description |
|---|---|---|
addr * | number | |
session_id * | string | |
budget | integer | Cycle budget (C64 cycles). Default 10000000. |
runtime_resolve_pc
[Phase 2: Loader / Load behaviour / Sequence] Resolve a live PC/address to its name from the project's knowledge: the one name shown (origin user/build/derived, `name+$off` inside a routine), the payload it belongs to, every candidate at or around the address, and the RESIDENCY evidence — which payload's code bytes are in memory right now. A name whose payload is not in memory is not given (no match → no name). Use to label an address while debugging. Not for raw bytes (use runtime_monitor_memory). Inputs: session_id, pc, optional space (c64 | drive8), optional artifact_id (only that paylo…
| Parameter | Type | Description |
|---|---|---|
pc * | number | |
session_id * | string | |
artifact_id | string | Restrict to one payload (its artifact id or analysis stem). |
space | string | Which CPU the address belongs to (default c64). |
runtime_diff_snapshots
[Phase 2: Loader / Load behaviour / Sequence] Use to see exactly what changed between two VSF snapshot files — RAM changedRanges plus CPU/CIA/VIC/SID/PLA chip diffs. Not for a live memory read (use runtime_monitor_memory) or capturing a snapshot (use runtime_checkpoint_capture).
| Parameter | Type | Description |
|---|---|---|
a_path * | string | |
b_path * | string | |
enrich | boolean | |
hypothesis | string | REQUIRED (read-before-runtime gate): a concrete $address + what you READ that points there. The snapshot delta CONFIRMS a hypothesis about what a step changed; it is not how you discover the payload.… |
runtime_component_diff
Whitebox component-diff of two .c64re snapshots: a per-component equivalence VERDICT (cpu/ram/colorram/cia/vic/sid/drive incl. Floppy RAM + internal chip state) with a caller exclusion mask. Use to SCORE a candidate snapshot against a baseline — the sandbox fan-out eval step, a refactor-equivalence check, or which component a change actually moved. Not a live memory read (use runtime_monitor_memory), not the VSF-file diff (use runtime_diff_snapshots).
| Parameter | Type | Description |
|---|---|---|
a_path * | string | Baseline .c64re snapshot |
b_path * | string | Candidate .c64re snapshot |
exclude | object | |
hypothesis | string | REQUIRED (read-before-runtime gate): a concrete $address + what you READ that points there. The diff CONFIRMS what a change moved; it is not how you discover the payload. |
runtime_rip_range
Extract a byte range out of the machine as a .bin file — a charset, a bitmap, a sprite block, a screen or colour map. Use it after identifying an element on the frozen screen (the Live tab's Inspect overlay reports the source ranges) to get the bytes out for editing or reuse. Reads a CHECKPOINT when given one, so a frozen screen yields exactly the bytes that drew it; otherwise the live machine. Not for a whole snapshot (runtime_monitor with `dump "<path.c64re>"`) and not for writing bytes back (use runtime_inject_range). Inputs: session_id, addr, length, out_path, optional checkpoint_id and…
| Parameter | Type | Description |
|---|---|---|
addr * | integer | Start address in CPU space, e.g. 0xE000 for a bitmap under a VIC bank |
length * | integer | How many bytes: 8 for one char, 2048 for a charset, 8000 for a bitmap, 64 per sprite |
out_path * | string | Where to write the .bin, absolute or relative to the project |
session_id * | string | Session to read from — "shared" is the live machine the human is watching |
checkpoint_id | string | Read this retained checkpoint instead of the live machine — what the Inspect overlay froze, so the bytes are the ones that drew the picture |
kind | string | What the bytes ARE (charset, bitmap, sprite, screen, colour) — recorded in the result so a later re-import knows how to read them |
runtime_inject_range
Turn a .bin file's bytes into a fix a .feature file can try: writes a source file (`* = $addr` and the bytes) and returns the variant line that assembles it — swap a logo, a charset, a sprite, without rebuilding anything. The bytes are an OVERLAY, applied when the feature runs (runtime_feature_run) on machines of its own and never written to the medium or the shared machine: every run starts fresh. Use it with runtime_rip_range to close the loop: rip, edit, inject, run. Not for source code you wrote (name that file in the variant line yourself) and not for a permanent change to a .d64/.crt (…
| Parameter | Type | Description |
|---|---|---|
addr * | integer | CPU-space address the bytes go to — the same range the rip came from, unless you mean to move it |
bin_path * | string | The .bin to write, absolute or relative to the project |
bank | integer | Cartridge bank, when space is roml or romh |
out_path | string | Where to write the source, relative to the project; default fixes/<variant>-<addr>.tas |
project_dir | string | Project root; default: the session's project |
session_id | string | Unused; kept so earlier callers still work |
space | string | Which space the target is: ram, or a cartridge window (roml/romh) |
variant | string | The variant's name in the feature file; default "inject" |
runtime_find_cheat
Cheat-candidate finder: diff two checkpoint anchors' full RAM to find addresses that DECREASED (candidate life/health/ammo counters), ranked smallest-delta first. Use after capturing two anchors around a loss. Not for a general diff of two checkpoints (use runtime_diff_snapshots). The FINDER half of the cheat loop; verify a candidate by freezing an address (a variant whose source puts the original value back at that addr, tried in a .feature file with runtime_feature_run) to confirm it holds across the scenario. Inputs: session_id, before (anchor before the loss), after (anchor after), max?. R…
| Parameter | Type | Description |
|---|---|---|
after * | string | |
before * | string | |
session_id * | string | |
max | number |
runtime_query_events
[Phase 2: Loader / Load behaviour / Sequence] Query captured runtime trace events (cpu/mem/irq/drive/vic/cia) for a session or run. Use to find what happened during a run. Not for live registers (use runtime_monitor_registers). Each row's `pc`/`addr` is named per ROW (`pcName`/`addrName`, origin user/build/derived): residency is decided from the trace itself — the writes it recorded and the bytes it executed — so a payload loaded over another mid-trace names its own rows. Inputs: session/run id, filters. Returns: matching events.
| Parameter | Type | Description |
|---|---|---|
duckdb_path * | string | |
family * | string | |
run_id * | string | |
addr_end | number | |
addr_start | number | |
cycle_end | number | |
cycle_start | number | |
limit | number | |
pc_end | number | |
pc_start | number |
runtime_follow_path
[Phase 2: Loader / Load behaviour / Sequence] Follow the execution path from a PC through a trace (call/branch chain). Use to reconstruct the control flow of a run. Not for static flow (use build_flow_graph_view, advanced). Inputs: run id, start PC. Returns: ordered path.
| Parameter | Type | Description |
|---|---|---|
duckdb_path * | string | |
end_event_cycle * | number | |
end_event_family * | string | |
end_event_key * | string | JSON-encoded event key |
run_id * | string | |
cross_domain | boolean | |
cycle_window | number | |
hypothesis | string | REQUIRED (read-before-runtime gate): a concrete $address + what you READ that points there. Following a path CONFIRMS a control-flow hypothesis you formed by reading; it is not how you discover it. Fi… |
max_depth | number |
runtime_swimlane_slice
[Phase 2: Loader / Load behaviour / Sequence] Return a per-lane (C64 PC / drive PC / IEC / VIA) slice of the trace around a cycle window. Use to compare lanes at a moment of interest. Not for a single-PC search (use trace_store_query). Each C64 step carries a derived `flow` lane (main|irq|nmi); pass `focus` to keep only one (e.g. focus='irq' to see just the interrupt handler). Inputs: run id, cycle window, optional focus. Returns: per-lane events.
| Parameter | Type | Description |
|---|---|---|
cycle_end * | number | |
cycle_start * | number | |
duckdb_path * | string | |
run_id * | string | |
compact | boolean | |
focus | string | keep only rows in this execution-context lane. |
nmi_vector | number | Optional $FFFA target to sharpen NMI-vs-IRQ for an NMI taken from main flow. |
runtime_trace_taint
[Phase 2: Loader / Load behaviour / Sequence] Follow data-flow taint from a source byte/address through a trace. Use to find where a value came from or went. Not for plain event listing (use runtime_query_events). Inputs: run id, source. Returns: taint chain.
| Parameter | Type | Description |
|---|---|---|
duckdb_path * | string | |
run_id * | string | |
start_addr * | number | |
start_cycle * | number | |
cycle_window | number | |
hypothesis | string | REQUIRED (read-before-runtime gate): a concrete $address + what you READ that points there. Taint CONFIRMS a data-flow hypothesis you formed by reading; it is not how you discover where a value comes… |
max_depth | number |
runtime_profile_loader
Profile a loader run — time/cycles per phase + hotspots. Use to understand loader performance/structure. Not for byte-level events (use runtime_query_events). Inputs: run id. Returns: loader profile.
| Parameter | Type | Description |
|---|---|---|
cycle_end * | number | |
cycle_start * | number | |
duckdb_path * | string | |
scenario_id * | string | |
hypothesis | string | REQUIRED (read-before-runtime gate): a concrete $address + what you READ that points there. A loader profile CONFIRMS a hypothesis about a phase you already located by reading; it is not how you disco… |
runtime_media_browse
Browse mountable media (disks/carts) from the project + configured roots. Use to find a disk/cart to mount. Not for mounting it (use runtime_media_mount). Inputs: optional path filter. Returns: media entries.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute or relative directory path to browse |
runtime_media_mount
Mount a disk/cart image into a session's drive (no drive reset — like inserting media on real hardware; the running 1541 senses a disk is now present). Use to insert media before LOAD, or as STEP 2 of a hardware-style side-swap (after runtime_media_unmount + runtime_session_run); then runtime_session_run and runtime_type the RETURN to answer an "Insert side N" prompt. Not for removing media (use runtime_media_unmount). Inputs: session_id, path. Returns: mount result.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the media file |
session_id * | string | |
slot | integer | Drive slot: 8 (primary) or 9 |
runtime_media_unmount
Take media OUT of the machine. role=drive8 (default): eject the disk — open the drive door. The running 1541 senses the disk was removed (write-protect line), so this is STEP 1 of answering a game's "Insert side N" prompt: unmount, then runtime_session_run a bit to let the drive register the removal, then runtime_media_mount the new side and runtime_session_run again, then runtime_type the RETURN. Dirty sectors are written back first; the drive keeps running. role=cartridge: PULL THE CARTRIDGE. Programmed flash/EEPROM is written back to the host .crt first, then the cart comes out, and pulli…
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session to take the media out of — "shared" is the live machine the human is watching |
role | string | What to take out: drive8 = the disk (drive keeps running), cartridge = pull the cart (persists flash, then COLD-RESETS the machine), auto = whatever is in there (cartridge first, else the disk). |
slot | integer | Drive slot for role=drive8: 8 (primary) or 9. Meaningless for a cartridge, which has no drive number. |
runtime_media_persist
Write mounted media's in-RAM state back to its host backing file WITHOUT ejecting. role=drive8 (default): flushes drive-side GCR writes → the .d64/.g64 on disk, atomically; host mtime changes. role=cartridge: re-packs the programmed cartridge flash/EEPROM → the host .crt (EasyFlash etc.) — the only way to save flash AND keep playing, since unmounting a cartridge pulls it (cold reset). Use to save a game's disk writes (format/copy/save) or EAPI flash writes while keeping the media mounted. Not for ejecting (use runtime_media_unmount, which persists then ejects) or for a session snapshot (…
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
role | string | |
slot | integer |
runtime_media_swap
Swap the mounted disk for another in ONE atomic step (detach+attach with no drive cycles between). Use for a quick change when nothing is polling the drive (e.g. before a fresh LOAD). NOT for a game that prompts "Insert side N" and waits: a real 1541 senses the disk being pulled out and a new one pushed in over many drive cycles, which an atomic swap gives no time for — instead drive it like hardware (runtime_media_unmount → runtime_session_run → runtime_media_mount → runtime_session_run, then runtime_type the RETURN). Read the screen with runtime_render_screen to know when a side-chan…
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the new disk image |
session_id * | string | |
slot | integer |
runtime_swap_disk_and_continue
Answer a game's "Insert side N. (RETURN)" prompt in ONE call, the hardware way: eject the old disk → run so the 1541 senses the removal → insert the new disk → run so it senses the insertion → press RETURN → run on so the prompt advances. Use this for a multi-disk title that WAITS for a side-swap. Not for a title that isn't waiting (use runtime_media_swap for the atomic path, which gives the drive no cycles to sense the change). Read the screen first (runtime_render_screen) to know which side is asked for. Inputs: session_id, path (new image), optional confirm_input (default RETURN),…
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the new disk image (the side to insert) |
session_id * | string | |
confirm_hold_cycles | integer | Cycles each confirm key is held, and released before the next (default 400000 — games that poll the keyboard every few frames, e.g. Ultima VI every 8 IRQ ticks, miss a short press) |
confirm_input | string | Key(s) to answer the prompt; default RETURN (\r). Empty = no key. |
post_cycles | integer | Cycles to run after the confirm key (default 4M) |
settle_cycles | integer | Cycles to run after eject AND after insert so the drive senses the change (default 1.5M) |
unit | integer | Drive unit to swap (default 8) |
runtime_snapshot_tree
Use to see the full branch tree of a rewind session — which checkpoints branch where. Not for capturing a checkpoint (use runtime_checkpoint_capture) or seeking/restoring one (use runtime_rewind). Requires a session with an active RewindManager.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
runtime_promote_branch
Use to keep a transient rewind branch as a persistent, replayable Scenario record. Not for a durable machine-state file (the runtime's .c64re dump) or capturing a checkpoint (use runtime_checkpoint_capture).
| Parameter | Type | Description |
|---|---|---|
branch_id * | string | |
session_id * | string |
runtime_vic_inspect_at
Resolve a frozen display pixel to its exact VIC/RAM provenance (screen/color/charset/bitmap/sprite refs) on a retained checkpoint, without advancing execution. Use to explain what produces a given pixel. Not for live rendering (use runtime_render_screen). Inputs: checkpoint, x in 0..319, y in 0..199. Returns: provenance refs.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
x * | number | |
y * | number | |
checkpoint_id | string |
runtime_vic_inspect_region
Resolve a RECTANGLE of the frozen display to the distinct sources drawing it — the screen/colour/charset/bitmap/sprite refs behind every pixel in the box, deduplicated to a node list. Use it to ask what an on-screen OBJECT is made of (a sprite, a status panel, a tile) instead of probing pixel by pixel. Not for one pixel (use runtime_vic_inspect_at) and not for where the bytes came FROM (use runtime_vic_origin). Coordinates are VISIBLE-frame pixels with the border included — the machine's canvas, 0..384 x 0..272 on PAL and 0..384 x 0..247 on NTSC (runtime_session_status says which) — NOT…
| Parameter | Type | Description |
|---|---|---|
height * | number | Box height in visible-frame pixels |
session_id * | string | Session to inspect — "shared" is the live machine the human is watching |
width * | number | Box width in visible-frame pixels |
x * | number | Left edge, VISIBLE-frame pixels (0..384, border included) |
y * | number | Top edge, VISIBLE-frame pixels (0..272 PAL, 0..247 NTSC, border included) |
checkpoint_id | string | Inspect this retained checkpoint. Omitted: capture and pin a fresh one from the live machine (which pauses it), the same way runtime_vic_inspect_at does. |
runtime_vic_origin
The Visual-Origin Join: take a pixel of the frozen picture and answer where the bytes behind it CAME FROM — the VIC/RAM node, then an exact byte-hash match against the mounted medium (sprite / charset / bitmap blocks), plus what the project already knows about that asset. Use it to tie something visible on screen back to a file, a sector and a disassembly. Not for what a pixel IS right now (use runtime_vic_inspect_at) and not for a whole object's composition (use runtime_vic_inspect_region). With nothing mounted the match set is empty and the answer says runtime_generated — that is an hone…
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session to inspect — "shared" is the live machine the human is watching |
x * | number | Pixel x, VISIBLE-frame (0..384, border included) |
y * | number | Pixel y, VISIBLE-frame (0..272 PAL, 0..247 NTSC, border included) |
checkpoint_id | string | Inspect this retained checkpoint. Omitted: capture and pin a fresh one from the live machine (which pauses it). |
runtime_vic_frame_map
Map the frozen frame the way the VIC drew it: the objects on the screen (text blocks, multicolour-char logos, bitmap areas, each sprite appearance) with the memory they come from (screen, charset or bitmap, colour, sprite block, bank), every store that reached a VIC register with the line, cycle and pixel where it landed, and the raster techniques the frame uses — split, FLI, FLD, linecrunch, DMA delay, open borders, sprite multiplexer, sprite crunch or stretch, mid-line changes — each named from what the chip actually did, with its lines and evidence. Use it to find what is on the screen…
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session — "shared" is the live machine the human is watching |
checkpoint_id | string | The frozen checkpoint to map — the one the VIC view opened. Omitted: one is captured from the current picture |
include_cells | boolean | Also return the cell grid — one bit field per raster line and cycle, indexed by raster line (312×63 on PAL, 263×65 on NTSC). Large; off by default |
runtime_vic_line_trace
Show one or more raster lines of the frozen frame cycle by cycle, as the emulated VIC-II and CPU actually did them: per cycle the VIC's Phi1 access (g/c/p/s/refresh/idle, address, byte), its Phi2 access (c-access on a bad line, sprite s-access), BA and AEC, whether the CPU read, wrote or stalled, the instruction running, and the VIC counters (VC, RC, VMLI, sprite DMA, border flip-flops). Use it to check raster timing: where a $D011/$D016/$D018 write lands, whether a split or an FLI/FLD/border trick hits its cycle, how many cycles a bad line or sprite DMA stole. Not a model or a planner — onl…
| Parameter | Type | Description |
|---|---|---|
line * | integer | First raster line — 0..311 on PAL, 0..262 on NTSC (linesPerFrame in the frame header). The 25 text rows are lines 51..250 on both |
session_id * | string | Session — "shared" is the live machine the human is watching |
checkpoint_id | string | The frozen checkpoint to answer for — the one the Inspect overlay opened. Omitted: one is captured from the current picture |
to | integer | Last raster line, inclusive — at most 32 lines per call |
runtime_anchor_set
Name the instant the shared machine is at NOW, so you can come back to it and start sandbox runs from it. Captures a fresh checkpoint of the shared session and puts the name on it (so the anchor is the instant you saw, not an auto-capture up to 20 ms old). Does not move, pause or change the machine. Only at the head of the ring: after a goto (replay) it is refused until the transport is back at the head, because the runtime would name the older checkpoint under the cursor and replace its name. 32 anchors at most; a 33rd, or a name already taken, is refused with the runtime's own text. In an op…
| Parameter | Type | Description |
|---|---|---|
name * | string | The anchor's name, e.g. vor_level3 |
project_dir | string | |
session_id | string | Session; default "shared" |
why | string | What this instant is for — kept in the project graph |
runtime_anchor_list
List the named anchors of the shared machine (or, with a sandbox session_id, of that sandbox): name, cycle, frame, how far back they are, whether the project holds a file for them, and which are only in the project because the ring no longer holds them. Reads only — nothing moves. Use to see what you can start a .feature file (`Given the mark`) or a goto from. Not the full checkpoint list (use runtime_checkpoint_list). Inputs: session_id?, project_dir?. Returns: the anchors, the 32-slot use, and the anchors recorded in the project but gone from the ring.
| Parameter | Type | Description |
|---|---|---|
project_dir | string | |
session_id | string |
runtime_anchor_drop
Drop an anchor's name, freeing one of the 32 slots; the checkpoint itself ages out of the ring as usual. The anchor's file in the project (knowledge/anchors) is deleted too. Does not touch the machine. In an open project the recorded anchor stays, marked dropped, because candidates link to it. An anchor that is only a file (the ring no longer holds it) is dropped by deleting the file. With a sandbox session_id it is that sandbox's anchor. Not for removing a checkpoint pin (use runtime_checkpoint_unpin). Inputs: name, session_id?, project_dir?. Returns: what was dropped, or the runtime's refusa…
| Parameter | Type | Description |
|---|---|---|
name * | string | |
project_dir | string | |
session_id | string |
runtime_anchor_goto
Go to an anchor: this MOVES the shared machine — the one the human is watching and co-driving — it jumps back (or forward) to the anchor's checkpoint and pauses there, and the human at the UI sees the same jump. On a sandbox session (session_id sb-…) it moves only that sandbox's own machine, which nobody else watches. Use to return to a named instant and inspect it or continue from it. Not for starting private runs (a .feature file run with runtime_feature_run starts from the anchor's file, `Given the mark`, without moving anything). An anchor the ring no longer holds is said to be gone,…
| Parameter | Type | Description |
|---|---|---|
name * | string | |
project_dir | string | |
session_id | string |
runtime_feature_run
Run a .feature file and judge it, with no stepping and no waiting on your side: the same function `c64re scenario run` calls, so a script and you get the same answer. A scenario starts from a mark (`Given the mark "name"` — the file runtime_anchor_set wrote into knowledge/anchors), a snapshot or medium (`Given the snapshot "state.c64re"`, `Given the disk|cart "x"`) or a bare machine, plays its steps (joystick, keys, `I wait until … within N frames`) and decides its `Then` lines. TWO USES. (1) TEST A BUILD, after every build: start from a snapshot or mark, put the build's bytes in with `And…
| Parameter | Type | Description |
|---|---|---|
feature | string | The feature file's text, instead of a path |
feature_path | string | A .feature file or a folder, relative to the project or absolute |
jobs | integer | Machines at once; default min(4, CPUs) |
json | boolean | Return the JSON document instead of the lines |
project_dir | string | |
replace_anchors | boolean | Let `I set the anchor` overwrite an anchor that exists |
scenario | string | Only scenarios whose name contains this |
runtime_candidate_list
List the project's candidates, or show one in full: the feature file and scenario it records, the anchor, each variant's targets and its last verdict with the places it changed besides what it was meant to, the history of runs, the chosen variant, the delta written and the last build check. Reads the project's files, so it answers the same after a daemon restart. Use to see what has been tried and what it did. Not for running (use runtime_feature_run). Inputs: id?, project_dir?. Returns: the candidate(s).
| Parameter | Type | Description |
|---|---|---|
id | string | |
project_dir | string |
runtime_candidate_choose
Mark one variant of a candidate as the solution — the one runtime_candidate_derive_delta writes and runtime_candidate_verify_build checks. The Then lines decided PASS or FAIL per variant and the run listed what else each one changed; which fix is right is your call. Use once a run shows the variant doing what you want. Not for running anything (use runtime_feature_run). Inputs: id, variant (or clear:true to un-choose), project_dir?. Returns: the choice.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
clear | boolean | |
project_dir | string | |
variant | string |
runtime_candidate_derive_delta
Write the CHOSEN variant as a build-ready delta: one .asm per target (each carries its own org) + delta-manifest.json + DELTA.md in <project>/delta-<id>, and register the files as artifacts linked to the candidate. The delta is written beside the project's own source, never into it; wiring it into the build is the project's. Use after runtime_candidate_choose; then runtime_candidate_verify_build proves the build holds it. Not for the raw patch set of a variant that has not been chosen. Inputs: id, out_dir?, project_dir?. Returns: the folder, the files and the artifact ids.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
out_dir | string | |
project_dir | string |
runtime_candidate_verify_build
Prove the project's build contains the chosen variant: run the project's own build command (profile.build), read the image it built (a PRG with its load address, a cartridge image bank by bank, or raw bytes from an address you give) and compare the bytes at every delta target with the variant's. Green names each target; red names the FIRST differing address. The build command is the project's own line and runs in the project folder. Use after the delta is wired into the build. Not for running the built image (use runtime_run_prg / runtime_session_start). Inputs: id, image? (default: the first…
| Parameter | Type | Description |
|---|---|---|
id * | string | |
format | string | |
image | string | The built image, relative to the project or the build's cwd |
project_dir | string | |
raw_load_address | number | Where a raw image starts in memory |
skip_build | boolean | Do not run the build command; check the image as it is |
runtime_candidate_delete
Delete a candidate from the project: its file, its scratch folder and its graph node. The delta files already written stay where they are. Use when the iteration is finished with. Not for dropping one variant (take its line out of the .feature file and run it again). Inputs: id, project_dir?. Returns: what was deleted.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
project_dir | string |
runtime_candidate_export
Retired name, kept for one release: now runtime_candidate_list, which shows each variant's targets and bytes; the build-ready files come from runtime_candidate_derive_delta. Use those. Not for new work; this name does nothing but point there. Inputs: any. Returns: one line naming runtime_candidate_list.
runtime_state_map
Map a game by its moves, with no stepping and no per-move calls on your side: from an anchor, try every move in every state it finds, on a private machine of its own (the shared machine is not touched, and the machine is gone before the answer is read). You say what a state is (`key`: the bytes the game's own code indexes rooms, screens or levels with, e.g. ["$02","$03"], "$0400:2", "$D020@io" - read from the code, never a timer, a frame counter or a sprite position), which moves exist (`actions`: L R U D F N, combinations such as "UF", keys as key:SPACE), and what counts as dead or as the goa…
| Parameter | Type | Description |
|---|---|---|
actions * | array | The moves: L R U D F N, combinations like "UF", keys like "key:SPACE" |
anchor * | string | A 911 anchor by name: the file knowledge/anchors/<name>.c64re |
key * | array | The bytes that make a state: "$02", "$0400:2" (2 bytes), "$D020@io" (a lens: cpu, ram, io, rom, cart) |
budget_minutes | number | The machine's wall-clock budget; default 10 |
continue_after_goal | boolean | Keep mapping after the goal is found |
dead | array | Conditions that end a branch, e.g. "$05 == 0" |
edges | string | "all" lists every move tried, the ones that leave the state as it was too |
frames | number | Frames a move is held (default 6) |
goal | string | The goal, e.g. "$03 == 1"; the search stops at the first, shortest way there |
json | boolean | Return the JSON document instead of the text |
max_depth | number | Default 64 |
max_runs | number | Default 3000 |
max_states | number | Default 400 |
name | string | The map's name (and the stem of the anchors it writes); default: the anchor's name |
port | number | Joystick port (default 2) |
project_dir | string | |
release_frames | number | Frames run after it is released (default 4) |
save_states | boolean | Write every state as an anchor file <name>.s<N> |
trace_store_info
Report the DuckDB trace-store status — runs, event counts, schema. Use to see what trace evidence exists. Not for querying events (use trace_store_query). Inputs: optional run id. Returns: store summary.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to trace.duckdb or its parent directory. Absolute is the normal case (a capture is kept outside the project). A relative name is looked up under the project, then the project's per-user trace dir… |
project_dir | string | Project root directory. When omitted, resolved by walking up from path to knowledge/phase-plan.json. Consulted only when path is relative — an absolute store path is opened as given. |
trace_store_anchor_list
List named trace anchors (saved cycle/PC markers) for a run. Use to see bookmarked points in a trace. Not for finding the nearest one (use trace_store_anchor_find). Inputs: run id. Returns: anchors.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to trace.duckdb or its parent directory. Absolute is the normal case (a capture is kept outside the project). A relative name is looked up under the project, then the project's per-user trace dir… |
project_dir | string | Project root directory. When omitted, resolved by walking up from path to knowledge/phase-plan.json. Consulted only when path is relative — an absolute store path is opened as given. |
trace_store_anchor_find
Find the trace anchor nearest a cycle/PC. Use to jump to a bookmarked point. Not for listing all (use trace_store_anchor_list). Inputs: run id, cycle/PC. Returns: nearest anchor.
| Parameter | Type | Description |
|---|---|---|
name * | string | Anchor name (alphanumeric/underscore/dash only). |
path * | string | Path to trace.duckdb or its parent directory. Absolute is the normal case (a capture is kept outside the project). A relative name is looked up under the project, then the project's per-user trace dir… |
limit | integer | Max occurrences to return (default 200). |
project_dir | string | Project root directory. When omitted, resolved by walking up from path to knowledge/phase-plan.json. Consulted only when path is relative — an absolute store path is opened as given. |
trace_store_top_pcs
Return the most-executed PCs in a trace run (hot spots). Use to find where time goes. Not for a specific PC's events (use trace_store_query). Inputs: run id, limit. Returns: ranked PCs.
| Parameter | Type | Description |
|---|---|---|
cpu * | string | CPU side. |
path * | string | Path to trace.duckdb or its parent directory. Absolute is the normal case (a capture is kept outside the project). A relative name is looked up under the project, then the project's per-user trace dir… |
hypothesis | string | REQUIRED (read-before-runtime gate): a concrete $address + what you READ that points there. Hotspot ranking is the archetypal 'reached for statistics instead of reading the code' — it CONFIRMS where… |
limit | integer | Max rows (default 20). |
project_dir | string | Project root directory. When omitted, resolved by walking up from path to knowledge/phase-plan.json. Consulted only when path is relative — an absolute store path is opened as given. |
trace_store_bus_find
Find IEC/bus events in the trace store ($DD00 / CIA2 / VIA reads+writes). Use to debug loader/bus protocols from durable evidence. Not for CPU PCs (use trace_store_top_pcs). Inputs: run id, lane/value filters. Returns: bus events.
| Parameter | Type | Description |
|---|---|---|
addr * | string | Address as hex (e.g. $DD00, 0xDD00, DD00) or decimal. |
path * | string | Path to trace.duckdb or its parent directory. Absolute is the normal case (a capture is kept outside the project). A relative name is looked up under the project, then the project's per-user trace dir… |
limit | integer | Max rows (default 100). |
project_dir | string | Project root directory. When omitted, resolved by walking up from path to knowledge/phase-plan.json. Consulted only when path is relative — an absolute store path is opened as given. |
trace_store_query
Run a structured query over the DuckDB trace store (by PC, address, event family, cycle range). Use for durable trace evidence. Not for live state (use runtime_monitor_*). Inputs: query filters. Returns: matching rows.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to trace.duckdb or its parent directory. Absolute is the normal case (a capture is kept outside the project). A relative name is looked up under the project, then the project's per-user trace dir… |
sql * | string | Read-only SELECT or WITH query. |
limit | integer | Max rows returned (default 200). |
project_dir | string | Project root directory. When omitted, resolved by walking up from path to knowledge/phase-plan.json. Consulted only when path is relative — an absolute store path is opened as given. |
trace_memory_map
Reconstruct a per-page RAM memory map from a trace store: which pages are CODE (executed), DATA-W (written — incl. indirect STA (zp),Y targets the decode path can't see), DATA-R (read-only), or untouched; per-region write/read/mutation counts (old≠new = the persistence surface) + writer-PC count; and a 'provably free' free-hole list (untouched this run AND not static-occupied). Use for porting/footprint work (free EF-legal RAM, what mutates). Optional static_ranges reconciles with the module load-map. Coverage = THIS RUN ONLY (a trace is one path) — this is runtime behaviour, NOT identit…
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to trace.duckdb or its parent directory. Absolute is the normal case (a capture is kept outside the project). A relative name is looked up under the project, then the project's per-user trace dir… |
cpu | string | CPU side (default c64). |
hypothesis | string | REQUIRED (read-before-runtime gate): a concrete $address + what you READ that points there. The page map CONFIRMS a free-RAM/footprint hypothesis for porting; it is runtime behaviour for ONE path, NOT… |
project_dir | string | Project root directory. When omitted, resolved by walking up from path to knowledge/phase-plan.json. Consulted only when path is relative — an absolute store path is opened as given. |
run_label | string | Optional run label for the header. |
static_ranges | array | Statically-owned address ranges (module load-map / analysis-json). Pages overlapping these are reconciled: a static-owned page untouched in the run is flagged NOT provably free. |
c64ref_lookup
[Phase 3: Heuristic Disasm] Look up C64 BASIC/KERNAL ROM knowledge by address or search term from the local reference snapshot. Use to identify a ROM routine/vector while reading disassembly. For a VIC-20 or TED (C16/Plus/4) file pass platform (or prg_path / a project whose machine it is): the answer then comes from the platform store's rows for that machine, never the C64 snapshot, and says so when it has no row. Not for project-specific labels (use list_findings / list_entities). Inputs: address or query string, optional platform/prg_path/project_dir. Returns: matching ROM entries.
| Parameter | Type | Description |
|---|---|---|
address | string | Exact ROM/system address in hex, e.g. FFD5. |
auto_build | boolean | When true, build the local c64ref snapshot if it does not exist yet, or rebuild it if it carries only the ROM listings and no memory map. Needs network access. |
limit | integer | Maximum number of search hits to return for query searches. |
platform | string | Which machine the address belongs to. Resolved in order: this argument, the artifact record of prg_path, the project default (project_init platform), c64. vic20 and plus4 are answered from the platfor… |
prg_path | string | A file of the project; its artifact record's platform decides the machine when platform is not given. |
project_dir | string | Project root, for the project default platform. Resolved from prg_path when omitted; none found = c64. |
query | string | Search term such as LOAD, SYS, CHRGET, keyboard queue, or NMI. |
register_payload
[Phase 1: Extraction / Inventarization] Register an extracted byte-blob as a first-class payload — the working abstraction across mediums (a disk file, a LUT cart chunk, a hand-carved custom-loader/DD00 block, a PRG). Use after carving a code-derived load (no CBM dir / no on-disk LUT — common in cracks): pass source_prg_path (the carved .prg), load_address, format, and medium_spans (its track/sector on the disk) — it registers the .prg, auto-links the matching disassembly, and the block then shows on the disk view at its T/S, in the memory map at its load address, and in list_payloads wi…
| Parameter | Type | Description |
|---|---|---|
name * | string | Human-readable payload name (e.g. 'chunk_42_$8C95', 'engine_4000.prg'). |
address_end | integer | End of the runtime range. Defaults to load_address + length - 1 if depacked. |
address_start | integer | Start of the runtime range covered by this payload. Defaults to load_address. |
asm_artifact_ids | array | Artifact id(s) of disassembly outputs that cover this payload. |
bank | integer | |
boot_stage | object | A boot stage: registered before the data-geometry slot is answered, because the boot chain is what that answer is read from. Proven by its loader: KERNAL (a directory file) or a boot-stage payload alr… |
content_hash | string | Optional sha256/etc. for deduplication. |
depacked_artifact_id | string | Artifact id of the unpacked bytes if a depack ran. |
format | string | Format / packer of the source bytes. Default 'unknown'. |
id | string | |
load_address | integer | Where this payload lands at runtime. |
medium_spans | array | Where this payload lives on its source medium — the FULL sector chain, not just the start (a custom-fastloader chain has no auto-traversal; compute + pass every sector). Use sector{track,sector,leng… |
packer | string | Packer name when format is more specific than the enum (e.g. 'lykia-bb2-vM3'). |
project_dir | string | |
source_artifact_id | string | Artifact id of the raw packed bytes (chip dump, disk file, etc.). |
source_prg_path | string | Path to a carved/extracted .prg (a code-derived custom-loader block). Registered as the source artifact and linked automatically — no need to run project_inventory_sync + look up an id first. Use th… |
summary | string | |
tags | array |
register_payloads_from_manifest
Bulk-register every payload from a loader-extraction manifest — the medium-agnostic path from a per-project extractor's output to first-class C64RE payloads. Reads + validates the manifest JSON (loaderModels[] + payloads[] each with derivedBy=LoaderModel-id and its FULL ordered medium spans), then registers each payload with its full medium_spans (never start-only — the Pawn 168/1329 bug), the span-level provenance derived from its LoaderModel kind, a content hash, its source blob, and an evidence link to the manifest. Idempotent (stable per-name id + hash dedup). Disk-sector and cart-slot…
| Parameter | Type | Description |
|---|---|---|
manifest_path * | string | Path (relative to the project) to the extractor manifest JSON. |
project_dir | string |
validate_extraction
Use to validate a per-project extractor's manifest against the loader-lens READ-SET — the ground truth the REAL loader produced, one lane per medium. DISK (BLOCK_READ, `drive-mechanism` domain): which physical track/sector the drive actually latched GCR bytes off, in read order; drive-side truth, immune to the write-time buffering that made the old landing-map source lie. A run proves use, never non-use, so the answer leads with coverage ('this run reached X of N payloads') and sorts every sector span into: matched; not seen in this run (never fails — most of a big manifest is not reached…
| Parameter | Type | Description |
|---|---|---|
capture_path * | string | Path to the loader-lens .c64retrace capture (drive-mechanism domain for disk spans, cart-read domain for cart slot spans; both may be armed in one capture). |
manifest_path * | string | Path to the extractor manifest JSON. |
min_run_len | integer | |
project_dir | string |
list_loader_models
List the recovered LoaderModels for the project — the per-medium loaders (id, kind, index location, backing disasm) that produced the registered payloads. A medium hosts N; each payload's derivedBy references one. Use to see how a medium's blocks are attributed across its distinct loaders; not for creating them (use register_payloads_from_manifest).
| Parameter | Type | Description |
|---|---|---|
project_dir | string |
link_payload_to_lut_row
Record WHICH ROW of which table claims this payload — the claim that turns a guessed span into a checkable one. Use after describing the table (declare_lut_descriptor) and resolving its rows: attach the row that points at this payload's bytes. The row itself is never stored, only this pair, because under a columns-layout table a row has no single address — its identity IS (table, index). Not for the table's shape (declare_lut_descriptor) or for reading rows back (resolve_lut_rows). Inputs: payload id, descriptor id, row index. Returns: the updated payload. Idempotent.
| Parameter | Type | Description |
|---|---|---|
descriptor_id * | string | |
payload_id * | string | |
row_index * | integer | |
project_dir | string |
link_payload_to_asm
[Phase 2: Loader / Load behaviour / Sequence] Attach an ASM artifact to a payload entity when the automatic stem-match is wrong. Use after registering a disassembly that covers a payload's bytes. Not for creating the payload (use the extraction tools) or generic entity links (use link_entities). Inputs: payload id, asm artifact id. Returns: updated payload. Idempotent.
| Parameter | Type | Description |
|---|---|---|
asm_artifact_id * | string | |
payload_id * | string | |
project_dir | string |
list_payloads
[Phase agnostic] List every payload entity in the project (extracted/loadable byte-blobs), each with the WINDOW it occupies while it is loaded. Use to see payloads and their disassembly coverage, and — with `address` — to ask who claims one address: on a machine built out of overlays several payloads share a window, so the answer is the claimants, plus which of them the load call in the code says is there. Not for files/artifacts on disk (use list_artifacts) and not for the nodes at an address (use graph_find). Inputs: optional address, format, limit. Returns: name, load address, window, f…
| Parameter | Type | Description |
|---|---|---|
address | string | A hex address ($7400 / 7400). Answers who claims it: the payloads whose WINDOW covers that address, and — where the project can say — which of them is in the window, decided by the load call that… |
format | string | Filter by format. |
limit | integer | |
project_dir | string |
bulk_create_cart_chunk_payloads
[Phase 1: Extraction / Inventarization] Use after extract_crt to promote all cartridge LUT chunks to payload entities in the project knowledge store — run once per cartridge to make every bank/slot chunk visible for analysis, linking, and ASM output. Not for single-chunk operations (use link_cart_chunk_to_asm or record_cart_chunk_packer) or for disk payloads (use extract_disk). Inputs: project dir (optional); dry_run=true previews without writing. Writes payload entities to the knowledge store; the cartridge layout view reflects them after build_all_views.
| Parameter | Type | Description |
|---|---|---|
dry_run | boolean | |
project_dir | string |
unregister_files
Take artifact rows back out of the project knowledge store — the inverse of registering files. Use after a bulk of machine output (per-sector dumps, depack scratch, raw track binaries) was registered by mistake: those rows add their bytes to the project's coverage denominator without adding anything to what is understood, and moving the glob to `intentional` only stops NEW registrations — the rows already written stay. Matches the same glob dialect as registration (relative to the project root; * within a path component, ** across them). It NEVER deletes a file from disk, and it refuses an…
| Parameter | Type | Description |
|---|---|---|
glob * | string | Glob for the rows to take out, relative to the project root, e.g. 'analysis/g64/**/*.bin'. |
bytes_changed | boolean | With move_to: confirm the bytes at the new path legitimately differ from the registered content hash. |
dry_run | boolean | If true, report what would be taken out (or moved) without writing. Default false. |
move_to | string | Repoint the single matched row to this project-relative path instead of removing it (the file was moved on disk). |
project_dir | string |
project_inventory_sync
Bring the project knowledge store in sync with what is on disk: register project files that are present but not yet tracked (input media, extracted payloads + raw sectors, analysis sidecars, generated AND hand-written/semantic source under analysis folders), import any disk/CRT/PRG manifests, and rebuild every project view so the UI and dashboard reflect the current state. Use after extraction / disassembly / import, or whenever onboarding or a project audit reports unregistered files, unimported manifests, or stale views. Idempotent — safe to run repeatedly; a second run changes nothing. It…
| Parameter | Type | Description |
|---|---|---|
project_dir | string | Project root directory. Absolute or project-relative; defaults to C64RE_PROJECT_DIR or the active project. |
list_artifact_versions
List every known version of a single source subject (one payload / listing identity) with its role, format, rank, and status, and which one is current. Use when you need to see the alternatives for a payload's .asm/.tas source — for example before opening or before choosing a different version. The subject id is where the sources live plus the stem they share (e.g. "analysis/disk/wl/02_2.0" for 02_2.0_disasm.asm + 02_2.0_semantic.tas in that directory); pass an artifact id and the tool resolves its subject, or pass a bare filename and it lists the subjects carrying it when more than one does…
| Parameter | Type | Description |
|---|---|---|
subject_id * | string | The subject id — the directory the sources live in plus their shared stem (e.g. 'analysis/disk/wl/02_2.0') — OR an artifact id belonging to the subject. A bare filename resolves when only one subj… |
project_dir | string | Project root directory. Absolute or project-relative; defaults to the active project. |
get_current_artifact
Get the current best version artifact for a single source subject — the one the UI opens by default. Use when you want the right .asm/.tas to read or act on for a payload, without choosing among versions yourself: it returns the manually-pinned current if one exists, otherwise the highest-ranked source (curated/semantic beats generated). Pass the subject id (the directory plus the shared stem, e.g. 'analysis/disk/wl/02_2.0') or any artifact id belonging to the subject; a bare filename that several disks carry is answered with the list of subjects rather than one of them picked for you. Not f…
| Parameter | Type | Description |
|---|---|---|
subject_id * | string | The subject id — the directory the sources live in plus their shared stem (e.g. 'analysis/disk/wl/02_2.0') — OR an artifact id belonging to the subject. A bare filename resolves when only one subj… |
project_dir | string | Project root directory. Absolute or project-relative; defaults to the active project. |
set_current_artifact_version
Pin one version as the current best source for a subject. Use when the auto-picked current is wrong — for example a hand-made source should win over a generated dump, or a specific version is the canonical one. The choice persists in the project knowledge store as a manual decision and a later project_inventory_sync will respect it (it will not be auto-overwritten). Pass the subject id (the directory plus the shared stem, e.g. 'analysis/disk/wl/02_2.0') or any artifact id of the subject, plus the artifact id to make current — the artifact decides which group it is pinned in. Not for markin…
| Parameter | Type | Description |
|---|---|---|
artifact_id * | string | The artifact id to make the current best version. |
subject_id * | string | The subject id — the directory the sources live in plus their shared stem (e.g. 'analysis/disk/wl/02_2.0') — OR an artifact id belonging to the subject. A bare filename resolves when only one subj… |
project_dir | string | Project root directory. Absolute or project-relative; defaults to the active project. |
mark_artifact_version_stale
Mark one version of a subject as stale (outdated) or missing (gone from disk) so it stops being offered as the default. Use when a generated dump is superseded, or a source file was removed and should no longer win as current. If the marked version was current, the best remaining non-stale version becomes current automatically (unless a manual pin exists). The change persists in the project knowledge store. Pass the subject id (the directory plus the shared stem) or an artifact id, plus the artifact id to demote; status defaults to 'stale'. Not for choosing a new current explicitly (use set_cu…
| Parameter | Type | Description |
|---|---|---|
artifact_id * | string | The artifact id of the version to demote. |
subject_id * | string | The subject id — the directory the sources live in plus their shared stem (e.g. 'analysis/disk/wl/02_2.0') — OR an artifact id belonging to the subject. A bare filename resolves when only one subj… |
project_dir | string | Project root directory. Absolute or project-relative; defaults to the active project. |
status | string | 'stale' (outdated, default) or 'missing' (no longer on disk). |
project_reindex_search
Rebuild the project's local search index from its current files (every docs/ directory's Markdown, the graph's findings/entities/relations/questions plus its named routines, labels, model boundaries and declared documents, flows/artifacts/versions, selected views, and ASM/TASS section headers) and scaffold the wiki skeleton (docs/index.md, knowledge/activity-log.md) if missing. project_search and project_find_related already rebuild on their own when the graph, a document or a listing changed, so this is for forcing a rebuild and seeing the counts. Not the way to read knowledge (use project_se…
| Parameter | Type | Description |
|---|---|---|
project_dir | string | Project root directory. Absolute or project-relative; defaults to the active project. |
project_search
Find where a topic, address, track/sector, routine or label name, model boundary, document, or artifact is described in this project — the normal first step for any "where is X?" question instead of reading every doc/JSON/ASM file. Ranks deterministically (exact address/track match or an address inside a declared range, then exact id/title/tag, current-best artifact versions and curated docs/findings over generated analysis and stale renders, then text match) and returns compact hits: id, kind, title, short snippet, source path/anchor, tags, address range, linked artifact/entity ids, and a w…
| Parameter | Type | Description |
|---|---|---|
query * | string | Free text and/or tokens like $FC00, T18/S11, 'track 36', a label, an artifact/finding id, or a topic. |
address | string | Filter to records touching an address/track, e.g. $FC00 or 'track 36'. |
artifact_id | string | Filter to records linked to this artifact id. |
entity_id | string | Filter to records linked to this entity id. |
full_text | boolean | Return each hit's whole summary instead of a clipped snippet. Use when the question is about addresses or parameters — the clip lands at ~200 characters and those usually sit past it. |
kind | string | Filter by record kind: finding, entity, relation, flow, open_question, artifact, artifact_version, routine, label, model, document, state_map, doc_section, wiki_page, asm_section, view, activity_log_e… |
limit | number | Max hits (default 10, max 50). |
project_dir | string | Project root directory. Absolute or project-relative; defaults to the active project. |
tag | string | Filter by an exact tag. |
project_wiki_lint
Report gaps between the curated wiki (docs/index.md) and the structured knowledge: important active findings not yet mentioned in the wiki index, and orphan findings with no linked artifact or entity. Use after a mapping session to see what still needs to be written up, instead of eyeballing every finding. Read-only; it never edits files. Returns the gap lists. Not a content generator (write a document with frontmatter, declare it with doc_register, and wiki_index derives the index) and not a structured validator (use the knowledge list tools for full audits).
| Parameter | Type | Description |
|---|---|---|
limit | number | Max items per list (default 15). |
project_dir | string | Project root directory. Absolute or project-relative; defaults to the active project. |
agent_next_step
[Phase agnostic] Get the single MCP-chosen next step for the project, plus valid iterative branches — the product way to answer "what do I do now?". Use when you are unsure where to continue, after finishing a step, or after onboarding; it derives the step from real project state (is the project initialized? are files untracked / manifests unimported / views stale? is media extracted? is there analysis, source, annotations, a trace, open questions, recorded findings?). Every recommended action is a callable product tool; internal maintenance tools are listed only under "do not call". Not for…
| Parameter | Type | Description |
|---|---|---|
context | string | Optional free-text context from the human/LLM to bias the recommendation. |
project_dir | string | Project root directory. Absolute or project-relative; defaults to C64RE_PROJECT_DIR or the active project. |
agent_run_step
[Phase agnostic] Run a workflow step chosen by agent_next_step. Use to execute the inventory/media-sync step in-process (it tracks present-but-untracked files, imports manifests, and rebuilds project views behind one product action). For every other step, it returns the one product tool to call next — it never crashes on an unimplemented step. Not for choosing the step (use agent_next_step) or for the underlying maintenance helpers (those are wrapped, never called directly). Inputs: step id (e.g. inventory-sync), optional project dir, optional step-specific args. Returns: the step status, th…
| Parameter | Type | Description |
|---|---|---|
step_id * | string | The workflow step id to run (e.g. 'inventory-sync'). Get it from agent_next_step. |
args | object | Optional step-specific arguments. |
project_dir | string | Project root directory. Absolute or project-relative; defaults to C64RE_PROJECT_DIR or the active project. |
sandbox_6502_run
Run a 6502 routine in an isolated sandbox: load code/data into the RAM of a real C64 whose CPU port starts at $34 (all RAM, no ROM, no I/O) — banking then follows $01 exactly as on the hardware, so a routine that changes $01 sees ROM, I/O or the char ROM where the PLA puts them; seed a different start banking via initial_zp $01 (and $00 for the port direction), optionally hook PCs to feed bytes from an input stream (e.g. replace a serial-recv subroutine), execute until a stop PC / sentinel RTS / max steps / unimplemented opcode, and return the writes plus final CPU state. Use this for portin…
| Parameter | Type | Description |
|---|---|---|
initial_pc * | string | Hex PC where execution starts. |
loads * | array | Memory loads applied in order. Each entry must specify exactly one of prg_path / raw_path / hex_bytes. |
include_observed | boolean | Also print the RAW sandbox RAM behind each return_memory_ranges window, un-holed. Off by default because a byte in it that the run never wrote is machine residue (power-on pattern, KERNAL RAM-test lef… |
initial_a | integer | Accumulator at entry. Defaults to 0. |
initial_flags | integer | Processor status (P) at entry. Defaults to $22. |
initial_sp | integer | Initial SP. Defaults to $FD with sentinel staged. |
initial_x | integer | X at entry. Defaults to 0. |
initial_y | integer | Y at entry. Defaults to 0. |
initial_zp | object | Zero-page seed values, keyed by hex zp address (e.g. {"06": 0, "07": 64}). $01 and $00 are the CPU port, not RAM: a $01 seed sets the start banking (default $34), a $00 seed the port direction (defaul… |
input_stream_hex | string | Inline hex stream bytes (alternative to input_stream_path). |
input_stream_path | string | Path to a file whose bytes are streamed via the hook PCs. |
max_steps | integer | Maximum instructions executed (default 10_000_000). |
output_path | string | If set, write the written bytes as a PRG (2-byte load header + bytes). One file per contiguous written run: a single run goes to this exact path, and a run set with gaps in it gets one file per run, n… |
project_dir | string | Project root directory. When omitted, resolved by walking up from the first path in loads[] to knowledge/phase-plan.json. |
return_memory_ranges | array | Memory ranges to snapshot at end of run. Bytes this run never wrote print as "--", not as data — a range wider than the routine's output is safe to ask for. |
return_writes_end | string | Upper bound (hex, inclusive) of that write filter. Pass it together with return_writes_start; either alone is ignored. It narrows what is REPORTED, never what the run is judged to have written — a m… |
return_writes_start | string | Restrict returned writes to start ≤ addr ≤ end (hex). |
stop_pc | string | Optional stop PC in hex. |
stream_hook_pcs | array | List of hex PCs that should be replaced by 'next stream byte → A; C=0; RTS'. |
write_runs_from | integer | Page the "Written runs" list: the index of the first run to print (12 per page). The report always states how many runs and how many bytes are NOT shown and names the largest hidden run, so a truncate… |
runtime_scene_reel
Run a written capture scenario on a MACHINE OF YOUR OWN — a private daemon on its own port, born with a budget and ending itself when it runs out, so the shared session the human co-drives is never touched (a disk or cartridge the scenario mounts or inserts is a COPY in the machine's scratch: your file is byte-identical afterwards). Assembles an animated release reel (animated GIF: GIF89a, the machine's picture including border — 384x272 PAL, 384x247 NTSC — hard cuts, uniform delay, <=512000 bytes). The machine is the C64 model the scenario was recorded on (its `# model:` line), else the…
| Parameter | Type | Description |
|---|---|---|
out_path * | string | Where to write the GIF (absolute, or relative to the project dir). |
budget_seconds | number | How long the private machine may live before it ends itself (default 600). |
delay_ms | number | Frame delay in milliseconds, uniform across the reel (default 700). At least 10 — a zero GIF delay leaves the rate to whatever the viewer decides. |
drive_type | string | Drive 8's board: "1541" or "1581". Omitted: a 1541 — and a medium that only fits the other one (a .d81) gets that one by itself, the runtime naming it. Set it when no medium says: an empty drive, or… |
feature | string | The scenario, as Gherkin. Example: Scenario: the release reel Given the disk "side1.g64" When I wait 170 frames And I type "LOAD{QUOTE}*{QUOTE},8,1{RETURN}" And I wait until the drive is idle… |
feature_path | string | A .feature file to read instead of passing the text. Give one of feature / feature_path. |
input_offset_cycles | number | Press every input step (`I type`, `I hold …`, `I start holding …`, `I release …`) this many cycles past the point it would have pressed at, so a press can land anywhere in the frame instead of o… |
jitter_seed | number | Give each input step its own offset inside the frame, derived from this seed and the step's index — the same seed gives the same reel. Not together with input_offset_cycles. |
max_bytes | number | Hard byte ceiling (default 512000). Over budget, whole frames are dropped from the middle outwards and named in the report — never a silent re-encode. |
media_path | string | Resolve the medium named in `Given the disk "..."` to this path. Use when the feature names a file rather than a full path. |
model | string | Which C64 to run it on — c64-pal, c64-ntsc, c64-paln (runtime_monitor `model` lists them). Omitted: the model the scenario was recorded on (`# model:`), else the project's. A recorded scenario on an… |
project_dir | string | Project root directory. When omitted, resolved by walking up from feature_path — else media_path, else out_path — to knowledge/phase-plan.json. |
save_feature_to | string | Also keep the scenario as a .feature file here. Recommended when the text was passed inline: the scenario is the only reproducible record of how those screens were reached. |
scenario | string | Which Scenario in the file to run, by name. Defaults to the first one that has driven steps. |
runtime_sandbox_run
Run a medium on a MACHINE OF YOUR OWN — a private daemon on its own port, started as a child of this call, born with a budget and ending itself when the budget runs out. It never reaches the SHARED session the human co-drives: nothing is mounted into that machine, nothing power-cycles it, and nothing you do here is visible in the human's UI. Use it to boot a cartridge, disk, PRG or snapshot of your own and find out what it does — give it the medium (mounted as a COPY in the machine's scratch, also a disk an `insert` step swaps in: whatever the program writes to it, your file is byte-identi…
| Parameter | Type | Description |
|---|---|---|
budget_seconds | number | How long the private machine may live before it ends ITSELF, whether or not this call is still listening (default 120, max 600). This is what makes starting one safe: nothing is left running behind yo… |
drive_type | string | Drive 8's board: "1541" or "1581". Omitted: a 1541 — and a medium that only fits the other one (a .d81) gets that one by itself, the runtime naming it. Set it when no medium says: an empty drive, or… |
every_frames | number | With read_series: sample every N-th frame instead of every frame (default 1). |
frame_path | string | Also write the final frame as a single-frame GIF here (absolute, or relative to the project dir). The only artifact that outlives the machine, and the answer for a title that draws in a bitmap mode. |
input_offset_cycles | number | Press every input step (`I type`, `I hold …`, `I start holding …`, `I release …`) this many cycles past the point it would have pressed at, instead of exactly there. One frame is 19656 cycles on… |
jitter_seed | number | Give each input step its own offset inside the frame, derived from this seed and the step's index — the same seed gives the same offsets. Not together with input_offset_cycles or sweep. The offsets… |
media_path | string | The medium for YOUR machine — .crt / .d64 / .g64 / .d81 / .prg / .c64re, identified by CONTENT not by extension. A cartridge is inserted, a disk mounted (a .d81 into a 1581 — drive 8 is fitted wit… |
model | string | Which C64 this machine is — c64-pal, c64-ntsc, c64-paln (runtime_monitor `model` lists every model and what a missing one lacks). Omitted: the project's model (project_init machine_model), else PAL.… |
project_dir | string | Project root directory, used to resolve relative paths and to register the frame. When omitted, resolved by walking up from media_path, else frame_path. The sandbox itself never writes into the projec… |
read_memory | array | Memory to dump once the steps are done, as ADDRESS:LENGTH with an optional lens — "$0400:1000", "$d020:2@io", "$a000:16@ram". The lens is which view of the bus to read through: `cpu` (default) is wh… |
read_series | array | Addresses to watch over a window of frames, each ADDRESS[:LENGTH][@lens] — "$D01C:1@io", "$D029@io" (length in decimal, or $hex; at most 256 bytes in all). Read after the steps; the machine advances… |
run | string | For a PRG: start it at this address after the load instead of typing RUN — "$0840", "0x0840" or "0840". The way to start machine code that has no BASIC line, or to skip one. Refused, not ignored, by… |
run_frames | number | How many frames to run when `steps` is omitted (default 300 — about six seconds on PAL, five on NTSC). Ignored when `steps` is given — say `I wait N frames` there instead. |
screen | boolean | Include the 40x25 text screen in the report (default true). Says so instead when the VIC is in a bitmap mode and there is no character matrix to read — use frame_path for a picture then. |
series_frames | number | With read_series: how many frames the window lasts (default 600, at most 50000). |
series_line | number | With read_series: the raster line each sample is taken at. Default: the line after the visible area (288 on PAL). |
steps | array | What to do, one step per entry, in the capture-scenario notation. Omit it and the machine simply runs `run_frames`. Example: I wait 170 frames I type "LOAD{QUOTE}*{QUOTE},8,1{RETURN}" I wait until the… |
sweep | number | Run the same steps this many times (2 to 64), each on a private machine of its own, with the input offset spread evenly across one frame of the machine's model. Needs at least one `Then` to decide eac… |
runtime_sandbox_start
Start a machine of your OWN for a stated purpose and keep it: a private daemon on its own port, born with a budget, named by a session id `sb-<slug>-<n>`. Use it when your work needs the interactive runtime — mount a medium, run to a point, set a breakpoint, step, read the monitor, capture a trace, inspect the VIC, rewind, try a poke, compare two states — and the shared machine is the human's or another project's. Pass the returned session_id to every runtime_* tool that takes a session_id (runtime_session_run, runtime_until, runtime_monitor, runtime_type, runtime_trace_start, runtime_trac…
| Parameter | Type | Description |
|---|---|---|
budget_minutes | number | REQUIRED. How long the sandbox may live, in minutes (above 0, at most 240; 30 is a working session). At this age it ends ITSELF, whether or not anyone is still using it — that, with the idle limit a… |
drive_type | string | Drive 8's board. Omitted: a 1541, and a medium that only fits the other one (a .d81) gets that one by itself. |
idle_minutes | number | The sandbox ends itself when no tool call has reached it for this long (default 10). A call in flight counts as activity. |
media_path | string | The medium to put in — .crt / .d64 / .g64 / .d81 / .prg / .c64re, identified by CONTENT. Absolute, or relative to the project. A cartridge is inserted, a disk mounted, a snapshot REPLACES the machin… |
model | string | Which C64 this machine is — c64-pal, c64-ntsc, c64-paln. Omitted: the project's model (project_init machine_model), else PAL. Chosen before switch-on. |
project_dir | string | Project root, used to resolve media_path, to bind the captures (they go to this project's trace root) and to record the outcome. When omitted: resolved from media_path, else the MCP's project. |
purpose | string | REQUIRED. What this machine is for, in a sentence — "validate IM II extraction against a drive-mechanism capture". It is what runtime_sandbox_list shows, what a refusal names when the limit is hit,… |
run | string | For a PRG: start it at this address after the load instead of typing RUN — "$0840", "0x0840" or "0840". |
runtime_sandbox_end
End a sandbox session you started: the purpose was reached, or it failed. Use when the work in the machine is done — a trace in progress is finished (its .c64retrace is kept; the index is built on the first read), the daemon is shut down, its port is free, its scratch and the medium's copy are removed. What it wrote to the project (captures, snapshots) is KEPT and listed in the answer. The outcome — purpose, outcome, your summary, duration, artefacts — is recorded in the project's step log. Not for a sandbox that has already ended on its own (the answer then says why and when), not for t…
| Parameter | Type | Description |
|---|---|---|
outcome * | string | Whether the purpose it was started for was reached or failed. |
session_id * | string | The sandbox session to end — `sb-…`, from runtime_sandbox_start. |
summary * | string | What happened, in a sentence or two — "manifest matches 624/624", "the loader never reads track 18 after the title". It is recorded in the step log. |
runtime_sandbox_list
List the sandbox sessions THIS MCP process holds: id, purpose, port, deadline, how long each has been idle. Use to see what you still have running (and what to end) before starting another — at most 4 per process. Other processes' sandboxes are not listed: a sandbox is private to the process that started it. Not for the shared session (runtime_session_status). Returns: one row per live session, and the ones that ended in this process with their reason.
runtime_backend
See and choose WHICH RUNTIME the runtime_* tools drive: the emulator (the default) or a C64 Ultimate running the runtime core and the trxmon app. Use `list` to find Ultimates (a UDP ident broadcast to port 64 and/or hosts you name) — every answering device is listed with its reason: stock core, our core without trxmon (offer: start_monitor), or offered; `probe` for one host; `select` to make a device (or the emulator again) the runtime — the choice is yours and explicit, nothing falls back to the emulator and nothing switches by itself, and a selected device that stops answering is an erro…
| Parameter | Type | Description |
|---|---|---|
action * | string | list: find and probe devices. probe: one host. select: make a backend active. start_monitor: start trxmon on a device. |
backend | string | select only: emulator = the default runtime (releases the device's one app connection), c64u = the device named by `host`. |
broadcast | string | list: where the UDP ident datagram goes. Default 255.255.255.255 (the whole segment). A single host works too. |
host | string | The device's address (probe, select, start_monitor). |
hosts | array | list: devices to probe by address, in addition to whoever answers the scan. `host` or `host:restPort`. |
ident_port | integer | list: the ident service port, default 64. |
password | string | The device's REST password. Kept in memory for this session only, never written to the project. |
paused | boolean | select: leave the machine paused (trxmon starts it paused; select continues it unless this is true). |
rest_port | integer | REST port, default 80. |
rpc_port | integer | App port; default what the device's ident names (4312 on our firmware). |
scan | boolean | list: false = probe only `hosts`, send no UDP at all. |
session_id | string | Leave out. A sandbox session id (sb-…) is refused here: it chooses what the SHARED runtime is (the emulator or a C64 Ultimate); a sandbox is always the emulator and never follows that choice. |
start_monitor | boolean | select: when the device has our core and trxmon is not running, start it first. |
trxmon_path | string | start: the full device path of trxmon.u2a. Default /Flash/apps/trxmon.u2a. |
via | string | start: run_file (default, works on every build) or app (PUT /v1/apps/trxmon:run — needs the app installed with a REST action). |
runtime_down
OWNER ACTION — shut C64RE down: the workbench UI, the C64 Ultimate bridges, the sandboxes and the runtime daemon, every one of them recorded in the process ledger, in that order; then the selection and the bridge registry are removed and a hold is written, so nothing starts again by itself until `c64re up`, `c64re ui`, runtime_session_start or selecting a C64 Ultimate. THIS ENDS THE SHARED MACHINE THE HUMAN CO-DRIVES: its sessions, mounted media, checkpoints and rewind history are gone. Use it only when the owner has just asked for C64RE to be shut down. Not for cleaning up after your own wo…
| Parameter | Type | Description |
|---|---|---|
keep | array | Leave these kinds running, e.g. ["daemon"] stops only the UI. |
project_dir | string | End only this project's processes. No hold is written and the selection stays. |
session_id | string | Leave out. A sandbox session id (sb-…) is refused here: it ends every C64RE process on the machine, other projects' sandboxes included; a sandbox ends itself or is ended with runtime_sandbox_end. |
sandbox_depack
Run a game's OWN 6502 depacker/decryptor over packed bytes and get the plaintext back — the sandbox CPU executes the resident routine against ANY packed blob, no MCP code change per variant. Use when a payload is self-decrypting (XOR / RLE / custom crypto) so disasm sees real code: point it at the resident loader, the depack entry_pc, and the zeropage source-pointer convention (default $52/$53). It runs to sentinel RTS / stop_pc / max_steps; the contiguous run of writes at dest_address (or the largest contiguous run) is returned as the unpacked bytes. Only bytes the depacker actually STORED…
| Parameter | Type | Description |
|---|---|---|
entry_pc * | string | Hex PC of the depacker entry point inside the resident loader. |
input_path * | string | Path to the packed source bytes (chip dump, disk file, raw blob). |
resident_loader_path * | string | Path to the resident loader PRG/binary that contains the depacker. |
capture_range_end | string | Hex upper bound for the write capture window (inclusive). |
capture_range_start | string | Hex lower bound for the write capture window (inclusive). |
dest_address | string | Hex dest address — where the depacker writes. If unset, returns the largest contiguous write run. |
initial_a | integer | |
initial_flags | integer | |
initial_sp | integer | |
initial_x | integer | |
initial_y | integer | |
initial_zp | object | Other zero-page seed values, keyed by hex zp address. $01 and $00 are the CPU port, not RAM: a $01 seed sets the start banking (default $34 = all RAM), a $00 seed the port direction (default $2F). |
items | array | Depack N payloads in ONE runtime process instead of N. Every field ABOVE is the shared template (the resident loader, entry_pc, the zeropage convention, the caps); each item overrides only what differ… |
length | string | Optional hex length to slice (default: from offset to end of file). |
max_steps | integer | Sandbox instruction cap. Default 5_000_000. |
offset | string | Hex offset into input_path where the packed payload starts. Default 0. |
output_path | string | Output PRG path (2-byte load header + unpacked bytes). Default analysis/depack/<input>-<offset>.prg. |
project_dir | string | Project root directory. When omitted, resolved by walking up from input_path to knowledge/phase-plan.json. |
resident_load_address | string | Hex load address for resident_loader. Default: from PRG header if .prg, else error. |
source_load_address | string | Hex address where the packed payload is placed in the sandbox. Default = end of resident loader. |
source_zp_high | integer | Zero-page high source-pointer byte. Default $53. |
source_zp_low | integer | Zero-page byte holding the source pointer's low byte. Default $52. |
stop_pc | string | Hex stop PC (default: sentinel RTS exit at $FFFE). |
project_init
[Phase agnostic] Initialize a reverse-engineering project workspace with persistent knowledge, view, analysis, and session folders. Use ONCE on a fresh directory before any knowledge write — knowledge tools reject an uninitialized project. Not for resuming an existing project (use agent_onboard) or choosing a workflow template (use start_re_workflow). The project remembers which C64 it is (machine_model, default c64-pal): the workspace and a sandbox run start the machine as that model, so an NTSC release boots as NTSC. Re-running it on an existing project keeps its knowledge and only changes…
| Parameter | Type | Description |
|---|---|---|
name * | string | Human-readable project name |
description | string | Optional project description |
machine_model | string | Which C64 the project's machine is — a model name such as c64-pal, c64-ntsc or c64-paln (runtime_monitor `model` lists them all). Omitted: c64-pal for a new project; an existing project keeps its ow… |
platform | string | Which machine the project's CODE runs on — the default for every render, analysis and lookup whose call and whose file's record name none: c64 (default when omitted), c1541, vic20 (VIC-20) or plus4… |
preferred_assembler | string | The assembler dialect this project works in: every listing the renderer writes is in it (kickass = .asm, 64tass = .tas), and it is what the rebuild proof assembles with. REQUIRED the first time — th… |
project_dir | string | Project root directory. Defaults to C64RE_PROJECT_DIR or process.cwd(). |
tags | array | Optional project tags |
project_launchers
Write the double-click UI starters into the project folder for one system: linux = ui.sh + ui-start/stop/restart.desktop, macos = ui.sh + ui-start/stop/restart.command, windows = ui.ps1 + ui-start/stop/restart.cmd. Use when the human wants to click to start, stop or restart the workbench UI (HTTP :4310) instead of typing, or when a project folder goes to someone on another system (name that platform). Not for starting the UI yourself (run ./ui.sh start; it opens no browser without --open) and not for creating a project (use project_init). platform defaults to the system this server runs on. St…
| Parameter | Type | Description |
|---|---|---|
platform | string | The system the starters are for. Omitted: the system this MCP server runs on. |
project_dir | string | Project root directory. Defaults to C64RE_PROJECT_DIR or process.cwd(). |
refresh | boolean | Rewrite this platform's starters even when they exist, e.g. after the project folder moved (a .desktop file holds an absolute path). Default false: only missing files are written. |
project_status
[Phase agnostic] Summarize the current project — knowledge counts + key filesystem paths. Use for a quick 'where is this project at'. Not for the orient-and-next-action flow (use agent_onboard) or the stored profile (use get_project_profile). Inputs: none. Returns: counts + paths, the project's machine (`Machine:`, and when none is recorded, which registered files look foreign and the one call that settles it: project_init with platform), plus a warning line per problem in the project's `.mcp.json` (invalid JSON, wrong C64RE_PROJECT_DIR, missing command or path).
| Parameter | Type | Description |
|---|---|---|
project_dir | string | Project root directory. Defaults to C64RE_PROJECT_DIR or process.cwd(). |
get_artifact_lineage
[Phase agnostic] Return the V0..Vn version chain for an artifact (oldest→newest). Use to see an artifact's revision history. Not for listing all artifacts (use list_artifacts). Inputs: artifact id. Returns: ordered lineage chain.
| Parameter | Type | Description |
|---|---|---|
artifact_id * | string | |
project_dir | string |
set_payload_disk_hint
Use to tag a payload entity with a disk-structure hint (drive-code, protected, raw-unanalyzed, bad-crc, or gap) so the disk heatmap UI can colour-code it correctly. Not for sector-level extraction (use extract_disk or extract_disk_custom_lut) or for general findings (use save_finding). Inputs: project dir (optional), payload_entity_id from list_payloads, and the hint value; pass no hint to clear. Updates the payload entity record; the disk layout view reflects the hint after build_all_views.
| Parameter | Type | Description |
|---|---|---|
payload_entity_id * | string | |
hint | string | |
project_dir | string |
get_project_profile
[Phase agnostic] Read the current project profile (platform, title, metadata). Use to see top-level project settings. Not for live counts/paths (use project_status). Inputs: none. Returns: profile record.
| Parameter | Type | Description |
|---|---|---|
project_dir | string |
render_docs
[Phase 6: Meta Connections] Render human-readable markdown summaries (findings, entities, open questions, anti-patterns, profile) under docs/. Use to produce readable project docs. Not for the UI JSON view-models (use build_all_views). Inputs: optional defer flag (set true during bulk ops, render once at the end). Returns: written doc paths.
| Parameter | Type | Description |
|---|---|---|
project_dir | string | |
scope | string |
declare_lut_descriptor
Describe a lookup table so its rows can be resolved — a cartridge index, a disk directory, a custom LUT, or an index table inside a payload the loader has already loaded. Use after reading the loader's disassembly, to record HOW the table is laid out — identity (index|key-bytes|nested), layout (packed=contiguous records | columns=parallel arrays), and one column per role with its address. SAY WHERE THE ADDRESSES ARE COUNTED FROM: by default they are the medium's own (a byte offset into a .d64/raw image, the address inside a .crt bank window); pass payload_path + payload_load_address instea…
| Parameter | Type | Description |
|---|---|---|
columns * | array | |
identity_scheme * | string | |
layout * | string | |
name * | string | |
artifact_id | string | |
disasm_artifact_id | string | |
id | string | |
identity_key_width | integer | |
loader_model_id | string | |
medium_path | string | Path to the medium the table lives ON (.crt / .d64 / raw image), relative to the project root or absolute. Use this OR the payload_* arguments, never both — they are two different address spaces. Om… |
medium_ref | string | |
notes | string | |
payload_artifact_id | string | The payload ARTIFACT the table lives in, when it is registered. Its path is used when payload_path is omitted. |
payload_entity_id | string | The payload ENTITY (register_payload) the table lives in — the claim side of the same fact. |
payload_header_bytes | integer | Bytes at the head of payload_path that are NOT payload — a CBM file's own load-address word is two. Omit it and the door decides the same way the disassembly doors do: if the first two bytes ARE pay… |
payload_load_address | integer | Where the payload's FIRST byte runs once loaded (e.g. 2048 for $0800). With it, the column addresses are RUNTIME addresses — the ones the loader's disassembly quotes — and this is what maps one on… |
payload_origin | string | Where that payload came from, in the medium's own words, for a medium that has no byte offset to give: "T18/S4 of side 1 (a .g64)". Prose — the point is that the provenance is on the record at all. |
payload_path | string | The table is inside a LOADED PAYLOAD, not on the medium: this is the extracted file holding that payload's bytes (project-relative or absolute). Pass it with payload_load_address and every `at` is rea… |
probe_rows | integer | |
project_dir | string | |
record_stride | integer | |
row_count | integer | |
tags | array | |
terminator | integer |
suggest_lut_descriptor
Scan a byte range of a medium for table-SHAPED runs and propose descriptor skeletons — the transcription work, taken off you. Use when the loader's disassembly points at a table and you would otherwise type a dozen column addresses by hand. It proposes structure only: parallel arrays vs packed records, row count, where the columns sit, and a split 16-bit column when it can see one. It does NOT guess what the columns MEAN, does not write anything, and says which fields you still have to read out of the loader — getting one of those wrong is silently wrong for every row at once. Not for writ…
| Parameter | Type | Description |
|---|---|---|
analysis_path | string | |
bank | integer | |
from_address | integer | |
medium_path | string | Path to the medium the table lives on (.crt / .d64 / raw image), relative to the project root or absolute. Omit to skip the probe. |
min_columns | integer | |
project_dir | string | |
to_address | integer |
derive_payload_relations
Derive who MUTATES a payload from the disassembly — the mutator edges, without hand-linking each one. Use after registering payloads with runtime ranges and naming the routines: it reads every resolved store in the analysis report and reports the ones landing inside a payload. A mutated payload is not the object on the medium — patch the medium alone and the mutation may undo you, and a byte-identical rebuild will not say so. Writes into a payload from code belonging to no named routine are reported UNATTRIBUTED, never guessed onto the nearest one. Not for creating the relation (pass `appl…
| Parameter | Type | Description |
|---|---|---|
analysis_path * | string | |
apply | boolean | |
project_dir | string |
suggest_loader_entrypoints
Find the two addressing kinds that are not a lookup table: a position baked into the loader's own code, and a dispatch that lets an index steer where control goes. Use on a disassembled loader to get candidates with the instructions that produced them — a baked-in track/sector is recognised by its call target being called from many sites with DIFFERENT positions, which is what separates a load routine from ordinary parameter passing. Writes nothing; each candidate is a pattern in the instructions, not a reading of what the routine does. Not for a lookup table (use suggest_lut_descriptor, whi…
| Parameter | Type | Description |
|---|---|---|
analysis_path * | string | |
kinds | array | |
min_call_sites | integer | |
project_dir | string |
list_lut_descriptors
List the lookup tables described on this project's media. Use to see which tables are already recorded before describing another. Not for their rows (use resolve_lut_rows).
| Parameter | Type | Description |
|---|---|---|
artifact_id | string | |
medium_ref | string | |
project_dir | string |
resolve_lut_rows
Resolve a described table's rows against the bytes — the whole table or a window of it. Use to read what a table actually claims: per row the bank or disk side, the payload start, the length, the destination (following a pointer when the descriptor says to) and packed/raw. A payload-framed table finds its own bytes from the descriptor, so medium_path is only for a table that lives on a medium. Rows are derived on every call, never stored, so this is always current with the descriptor. Not for describing the table (use declare_lut_descriptor).
| Parameter | Type | Description |
|---|---|---|
descriptor_id * | string | |
from_row | integer | |
limit | integer | |
medium_path | string | Path to the medium the table lives on (.crt / .d64 / raw image), relative to the project root or absolute. Leave it out for a payload-framed table — that descriptor already names the payload its add… |
project_dir | string |
declare_loader_entrypoint
[Phase 2: Loader / Load behaviour / Sequence] Record the routine that reads an addressing table — the code side of the load chain. Use once you have found, in the disassembly, the place that turns an index into a position: a jump table, a hardcoded sector load, a container decoder, a dispatch trampoline, or the init that kicks it off. Point `lut_descriptor_id` at the table it reads (declare_lut_descriptor) so the two halves are joined. Not for the table's own layout (use declare_lut_descriptor) and not for a payload (use register_payload). Idempotent on (artifact_id, address, kind).
| Parameter | Type | Description |
|---|---|---|
address * | integer | |
artifact_id * | string | |
kind * | string | |
bank | integer | |
id | string | |
name | string | |
notes | string | |
param_block_address | integer | |
param_block_layout | string | |
project_dir | string | |
tags | array |
list_loader_entrypoints
[Phase agnostic] List the recorded loader entry points, whole project or one artifact. Use to see which parts of the load chain are already mapped before reading more disassembly. Not for the tables they read (use list_lut_descriptors) and not for observed loads (use list_payloads).
| Parameter | Type | Description |
|---|---|---|
artifact_id | string | |
project_dir | string |
save_finding
[Phase 5: Semantic Analysis V1] Persist a semantic finding — a claim, hypothesis, confirmation, or refutation — with your confidence. Use to record what something IS or DOES. Not for a concrete named entity (use save_entity) or an unresolved question (use save_open_question). Inputs: summary, evidence, tags, optional address_range (on an update omitted keeps the stored range, null removes it). Returns: finding id. (address_range + tags=['routine'] makes it eligible for auto-archive matching.)
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
title * | string | |
address_range | ||
artifact_ids | array | |
confidence | number | |
entity_ids | array | |
evidence | array | |
flow_ids | array | |
id | string | |
project_dir | string | |
relation_ids | array | |
status | string | |
summary | string | |
tags | array |
list_findings
[Phase agnostic] List saved findings (claims, hypotheses, confirmations, refutations), with optional filters. Use to review what's been concluded. Not for entities (use list_entities) or unresolved questions (use list_open_questions). Inputs: optional filters. Returns: finding records.
| Parameter | Type | Description |
|---|---|---|
entity_id | string | |
kind | string | |
limit | integer | |
project_dir | string | |
status | string |
read_finding
Read ONE finding in full: title, summary, evidence, address range, tags and links. Use after project_search or list_findings points at an id — the search snippet is clipped and the addresses usually sit past the cut. Not a listing (use list_findings). Inputs: finding id. Returns: the whole record.
| Parameter | Type | Description |
|---|---|---|
id * | string | The finding id, as project_search or list_findings prints it |
project_dir | string |
list_entities
[Phase agnostic] List saved entities (routines, memory regions, banks, disk files, state vars), with optional filters. Use to see what structural things are known. Not for findings (use list_findings) or files/artifacts (use list_artifacts). Inputs: optional filters. Returns: entity records.
| Parameter | Type | Description |
|---|---|---|
artifact_id | string | |
kind | string | |
limit | integer | |
project_dir | string | |
status | string |
list_open_questions
[Phase agnostic] List saved open questions / ambiguities, with optional filters. Use to see what's still unresolved. Not for confirmed findings (use list_findings). By default hides heuristic analyze validation prompts (set include_heuristic=true to see them). Inputs: optional filters. Returns: question records + a count of hidden heuristic questions.
| Parameter | Type | Description |
|---|---|---|
entity_id | string | |
finding_id | string | |
include_heuristic | boolean | Include auto-generated heuristic validation prompts (default false — they are hidden behind a count). |
limit | integer | |
priority | string | |
project_dir | string | |
status | string |
list_flows
[Phase agnostic] List saved flow / sequence models (load chains, control flows), with optional filters. Use to review documented sequences. Not for entities (use list_entities). Inputs: optional filters. Returns: flow records.
| Parameter | Type | Description |
|---|---|---|
artifact_id | string | |
entity_id | string | |
kind | string | |
limit | integer | |
project_dir | string |
save_open_question
[Phase agnostic] Persist an open question / ambiguity to resolve later. Use when you spot something unexplained. Not for a settled conclusion (use save_finding). Inputs: question text, optional source provenance (default human-review). Returns: question id.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
title * | string | |
address_range | object | |
answer_summary | string | |
answered_by_finding_id | string | |
artifact_ids | array | |
auto_resolvable | boolean | If true, the next disasm pass / phase advance should answer this. |
auto_resolve_hint | string | Free-form note describing when this question becomes resolvable. |
confidence | number | |
description | string | |
entity_ids | array | |
evidence | array | |
finding_ids | array | |
id | string | |
priority | string | |
project_dir | string | |
source | string | Provenance. Default human-review when called manually. |
status | string |
save_entity
[Phase 5: Semantic Analysis V1] Persist a structured entity — a named routine, memory region, bank, disk file, or state variable. Use to record a concrete thing you've identified. Not for a claim/hypothesis (use save_finding), an unresolved question (use save_open_question), or a loadable byte-blob/payload (use register_payload — kind=payload here makes a thin record with no load address / format / source .prg, so it will NOT show on the disk view or memory map). Inputs: kind, name, address/scope, fields. Returns: entity id.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
name * | string | |
address_end | integer | |
address_start | integer | |
artifact_ids | array | |
bank | integer | |
confidence | number | |
evidence | array | |
id | string | |
medium_role | string | Optional role hint for the medium-resident overlay. Default 'unknown'. |
medium_spans | array | Optional physical placement on the medium. Sector spans pin a routine to disk T/S; slot spans pin to a cart bank/slot. Surfaced in the medium-layout view as a resident-region overlay. |
project_dir | string | |
related_entity_ids | array | |
status | string | |
summary | string | |
tags | array |
link_entities
[Phase 5: Semantic Analysis V1] Create a typed relation between two saved entities (e.g. calls, contains, derives-from). Use to connect known entities into a graph. Not for linking a payload to its ASM (use link_payload_to_asm) or creating the entity (use save_entity). Inputs: from id, to id, relation type. Returns: relation record.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
source_entity_id * | string | |
target_entity_id * | string | |
title * | string | |
artifact_ids | array | |
confidence | number | |
evidence | array | |
id | string | |
project_dir | string | |
status | string | |
summary | string |
build_project_dashboard
[Phase 7: Semantic V2] Rebuild + persist the JSON dashboard view-model (project status overview) for the UI. Use to refresh just the dashboard. Not for all views (use build_all_views) or markdown (use render_docs). Inputs: none. Returns: dashboard view path.
| Parameter | Type | Description |
|---|---|---|
project_dir | string |
build_memory_map
[Phase 7: Semantic V2] Rebuild + persist the JSON memory-map view-model (address-space layout) for the UI. Use to refresh just the memory map. Not for all views (use build_all_views). Inputs: none. Returns: memory-map view path.
| Parameter | Type | Description |
|---|---|---|
project_dir | string |
build_annotated_listing_view
[Phase 7: Semantic V2] Rebuild + persist the JSON annotated-listing view-model (disasm + annotations) for the UI. Use to refresh just the listing view. Not for all views (use build_all_views) or markdown (use render_docs). Inputs: none. Returns: listing view path.
| Parameter | Type | Description |
|---|---|---|
project_dir | string |
build_all_views
[Phase 7: Semantic V2] Rebuild + persist ALL project JSON view-models in one pass (dashboard, memory map, listing, …) for the UI. Use after knowledge changes to refresh every view at once. Not for human-readable markdown (use render_docs) or a single view (use the specific build_* tool). Inputs: none. Returns: rebuilt view list.
| Parameter | Type | Description |
|---|---|---|
project_dir | string |