c64bridge 1.0.7 โ†’ 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/.github/skills/assembly-program/SKILL.md +37 -0
  2. package/.github/skills/basic-program/SKILL.md +40 -0
  3. package/.github/skills/cross-platform-demo/SKILL.md +32 -0
  4. package/.github/skills/drive-manager/SKILL.md +33 -0
  5. package/.github/skills/graphics-demo/SKILL.md +30 -0
  6. package/.github/skills/hello-world/SKILL.md +36 -0
  7. package/.github/skills/memory-debug/SKILL.md +32 -0
  8. package/.github/skills/pr-converge/SKILL.md +33 -0
  9. package/.github/skills/printer-job/SKILL.md +30 -0
  10. package/.github/skills/sid-music/SKILL.md +35 -0
  11. package/.github/skills/software-launch/SKILL.md +31 -0
  12. package/.github/skills/stream-control/SKILL.md +29 -0
  13. package/.github/skills/system-control/SKILL.md +32 -0
  14. package/AGENTS.md +28 -7
  15. package/README.md +69 -14
  16. package/data/assembly/assembly-spec.md +2 -0
  17. package/dist/c64Client.js +238 -60
  18. package/dist/config.js +48 -26
  19. package/dist/device.js +92 -37
  20. package/dist/diagnostics.js +62 -2
  21. package/dist/hostPaths.js +128 -0
  22. package/dist/loggingHttpClient.js +59 -1
  23. package/dist/mcp-server.js +409 -286
  24. package/dist/numericArg.js +55 -0
  25. package/dist/petscii.js +13 -1
  26. package/dist/platform.js +12 -3
  27. package/dist/prompts/registry.js +6 -1
  28. package/dist/tools/access.js +66 -0
  29. package/dist/tools/debug.js +6 -0
  30. package/dist/tools/developer.js +67 -34
  31. package/dist/tools/errors.js +54 -3
  32. package/dist/tools/input.js +23 -6
  33. package/dist/tools/machineControl.js +112 -20
  34. package/dist/tools/memory.js +135 -30
  35. package/dist/tools/meta/artifacts.js +5 -5
  36. package/dist/tools/meta/background.js +216 -54
  37. package/dist/tools/meta/compilation.js +6 -5
  38. package/dist/tools/meta/config.js +15 -6
  39. package/dist/tools/meta/filesystem.js +16 -14
  40. package/dist/tools/meta/graphics.js +48 -20
  41. package/dist/tools/meta/memory.js +45 -19
  42. package/dist/tools/meta/program.js +10 -7
  43. package/dist/tools/meta/screen.js +116 -25
  44. package/dist/tools/pauseGuard.js +23 -0
  45. package/dist/tools/pollValidator.js +53 -8
  46. package/dist/tools/programRunners.js +62 -18
  47. package/dist/tools/registry/batch.js +16 -4
  48. package/dist/tools/registry/config.js +9 -2
  49. package/dist/tools/registry/disk.js +12 -2
  50. package/dist/tools/registry/drive.js +3 -0
  51. package/dist/tools/registry/extract.js +3 -0
  52. package/dist/tools/registry/graphics.js +59 -6
  53. package/dist/tools/registry/index.js +17 -1
  54. package/dist/tools/registry/memory.js +11 -1
  55. package/dist/tools/registry/platform.js +4 -1
  56. package/dist/tools/registry/printer.js +2 -1
  57. package/dist/tools/registry/program.js +5 -1
  58. package/dist/tools/registry/rag.js +1 -0
  59. package/dist/tools/registry/sound.js +12 -1
  60. package/dist/tools/registry/stream.js +2 -1
  61. package/dist/tools/registry/system.js +8 -1
  62. package/dist/tools/schema.js +7 -7
  63. package/dist/tools/streaming.js +34 -4
  64. package/dist/tools/translation/assembler.js +247 -24
  65. package/dist/tools/translation/basicDetokenizer.js +80 -0
  66. package/dist/tools/translation/basicTokenizer.js +8 -3
  67. package/dist/tools/translation/disassembler.js +14 -0
  68. package/dist/tools/types.js +258 -7
  69. package/dist/tools/vice.js +5 -16
  70. package/dist/vicBitmap.js +1 -1
  71. package/dist/vice/mockServer.js +3 -0
  72. package/dist/vice/process.js +19 -0
  73. package/dist/vice/resourcePolicy.js +36 -0
  74. package/dist/vice/viceClient.js +22 -5
  75. package/doc/vice/support-matrix.md +17 -11
  76. package/mcp/schemas/c64_batch.schema.json +2 -1
  77. package/mcp/schemas/c64_config.schema.json +25 -475
  78. package/mcp/schemas/c64_debug.schema.json +3 -602
  79. package/mcp/schemas/c64_disk.schema.json +17 -344
  80. package/mcp/schemas/c64_drive.schema.json +2 -157
  81. package/mcp/schemas/c64_extract.schema.json +10 -364
  82. package/mcp/schemas/c64_graphics.schema.json +19 -426
  83. package/mcp/schemas/c64_input.schema.json +5 -318
  84. package/mcp/schemas/c64_memory.schema.json +23 -491
  85. package/mcp/schemas/c64_printer.schema.json +3 -258
  86. package/mcp/schemas/c64_program.schema.json +16 -491
  87. package/mcp/schemas/c64_rag.schema.json +1 -81
  88. package/mcp/schemas/c64_select_backend.schema.json +2 -36
  89. package/mcp/schemas/c64_sound.schema.json +20 -822
  90. package/mcp/schemas/c64_stream.schema.json +4 -75
  91. package/mcp/schemas/c64_system.schema.json +28 -348
  92. package/mcp/schemas/c64_vice.schema.json +2 -71
  93. package/mcp/server.json +1 -1
  94. package/mcp/tools.json +1983 -6910
  95. package/mcp.json +21 -1
  96. package/package.json +16 -8
  97. package/scripts/mockC64Server.mjs +44 -0
  98. package/scripts/run-coverage.mjs +27 -1
  99. package/scripts/smoke-run.sh +3 -2
  100. package/scripts/start.mjs +23 -1
  101. package/server.json +35 -2
  102. package/dist/.tsbuildinfo +0 -1
  103. package/doc/agent-state-spec.md +0 -243
  104. package/doc/audit/secret-handling.md +0 -61
  105. package/doc/plans/bun/baseline-metrics.md +0 -16
  106. package/doc/plans/bun/migration-checklist.md +0 -55
  107. package/doc/plans/bun/migration.md +0 -83
  108. package/doc/plans/improve-knowledge/notes.md +0 -43
  109. package/doc/plans/improve-knowledge/plan.md +0 -121
  110. package/doc/plans/improve-knowledge/rollout.md +0 -110
  111. package/doc/plans/meta-tools/README.md +0 -110
  112. package/doc/plans/meta-tools/analysis.md +0 -272
  113. package/doc/plans/meta-tools/catalog.md +0 -435
  114. package/doc/plans/meta-tools/notes.md +0 -192
  115. package/doc/plans/meta-tools/rollout.md +0 -368
  116. package/doc/plans/prompts/README.md +0 -96
  117. package/doc/plans/prompts/user-prompt-ideas.md +0 -147
  118. package/doc/plans/tool-consolidation/notes.md +0 -28
  119. package/doc/plans/tool-consolidation/plan.md +0 -169
  120. package/doc/plans/tool-consolidation/rollout.md +0 -104
  121. package/doc/plans/vice-backend-switch/plan.md +0 -486
  122. package/doc/plans/vice-backend-switch-2/plan.md +0 -48
  123. package/doc/plans/vice-support/notes.md +0 -63
  124. package/doc/plans/vice-support/plan.md +0 -88
  125. package/doc/plans/vice-support/rollout.md +0 -99
  126. package/doc/reviews/audit.md +0 -143
  127. package/doc/reviews/hardening/01-fable/prompt-handover.md +0 -125
  128. package/doc/reviews/hardening/01-fable/prompt.md +0 -98
  129. package/doc/reviews/hardening/01-fable/review-prompt.md +0 -468
  130. package/doc/reviews/hardening/01-fable/review.md +0 -1234
  131. package/doc/reviews/vice-support-review.md +0 -185
  132. package/scripts/compare-rest/rest-compare-2025-11-01T00-25-21-830Z.json +0 -2513
@@ -1,368 +0,0 @@
1
- # Meta Tools Rollout Plan for c64bridge
2
-
3
- Purpose: Provide a concrete, dependency-aware rollout approach for the meta tools defined in `doc/meta-tools/catalog.md`. This plan gives ordered, checkable task lists and high-level implementation notes. It is written so another LLM can execute the rollout autonomously.
4
-
5
- ## Required reading
6
-
7
- The following documents need to be read and understood before starting the rollout:
8
-
9
- - `doc/meta-tools/catalog.md` โ€” Meta tools definitions, effort/benefit/dependencies matrix
10
- - `doc/meta-tools/analysis.md` โ€” Impact analysis and prioritization rationale
11
- - `doc/agent-state-spec.md` โ€” Background task registry and persistence model
12
- - `doc/developer.md` โ€” Architecture overview and contribution guidelines
13
-
14
- ## Operator rules for the LLM performing the rollout
15
-
16
- - Always work tasks strictly in order as listed. Do not skip ahead unless a task is cancelled.
17
- - After each checklist item, run the full build and test suite and proceed only if it passes:
18
- - Preferred: `npm run check` (build + tests) or `npm test` if already built.
19
- - If tests fail:
20
- - Fix the cause if obvious and retry once.
21
- - If still failing, revert the last change and leave a short note in the status log, then stop.
22
- - Keep edits minimal and focused. Prefer small, incremental changes.
23
- - Update documentation in the same change when tool behavior or surface changes.
24
- - For any new code, add/extend tests that cover basic happy path and one failure path.
25
- - Respect device-affecting safeguards already in the codebase (pause/resume, stream mutual exclusion, time limits).
26
-
27
- ### Global implementation template (apply per meta tool)
28
-
29
- - [ ] Read the toolโ€™s entry in `doc/meta-tools/catalog.md` and its Effort/Benefit/Dependencies.
30
- - [ ] Verify prerequisites (dependencies implemented). If missing, pause and complete dependencies first.
31
- - [ ] Implement the meta tool wrapper in the MCP server (compose existing low-level tools; avoid firmware-only assumptions).
32
- - [ ] Add or extend unit/integration tests for the meta toolโ€™s happy path and a basic failure case.
33
- - [ ] Update docs: ensure the toolโ€™s documentation is aligned; add usage hints if applicable.
34
- - [ ] Run full build + tests: `npm run check` must pass.
35
-
36
- Notes:
37
-
38
- - Do not expand the REST surface; meta tools must compose existing MCP tools.
39
- - Ensure mutual exclusion where streams and debug capture conflict.
40
- - Enforce timeouts and guardrails for background/scheduled operations.
41
-
42
- ---
43
-
44
- ### Phase 0 โ€” Foundations (low-effort, high-benefit, unlocks others)
45
-
46
- - [x] `firmware_info_and_healthcheck` โ€” Implementation notes:
47
- - Compose version, info, and a tiny `readmem` probe. Return structured readiness.
48
- - Use short, bounded timeouts; capture latency metrics.
49
- - [x] `wait_for_screen_text` โ€” Implementation notes:
50
- - Poll screen RAM via existing helper; support regex and plain text. Provide timeout and interval.
51
- - Return match bounds and elapsed time.
52
- - [x] `verify_and_write_memory` โ€” Implementation notes:
53
- - Pause โ†’ read โ†’ verify โ†’ write โ†’ read-back โ†’ resume. Abort on mismatch.
54
- - Parameterize verification masks and expected buffer; return a diff when failing.
55
- - [x] `start_background_task` / `stop_background_task` / `list_background_tasks` / `stop_all_background_tasks` โ€” Implementation notes:
56
- - Implement a persistent registry (in-memory with serialized state to disk if available).
57
- - Support fixed-interval scheduling and a maximum iterations cap.
58
- - [x] `find_paths_by_name` โ€” Implementation notes:
59
- - Container-aware discovery using wildcard info endpoints; return host and logical paths.
60
- - Cache recent results with a short TTL to avoid repeated scans.
61
- - [x] `memory_dump_to_file` โ€” Implementation notes:
62
- - Chunked reads with retries; optional pause/resume. Support hex and binary formats.
63
- - Emit a checksum and write a manifest alongside the dump.
64
- - [x] `config_snapshot_and_restore` โ€” Implementation notes:
65
- - Read all categories, persist versioned JSON; support batch restore and diff preview.
66
-
67
- Requirement: After each checkbox completion, run `npm run check` and proceed only on success.
68
-
69
- ---
70
-
71
- ### Phase 1 โ€” Orchestration and assertions
72
-
73
- - [x] `program_shuffle` โ€” Implementation notes:
74
- - Discover PRG/CRT under root; run each for a duration; capture screen; soft reset.
75
- - Persist a light run log per program.
76
- - [x] `batch_run_with_assertions` โ€” Implementation notes:
77
- - Accept assertions: screen contains text, memory equals byte, SID silent.
78
- - Produce junit-like results; stop on failure or continue-on-error per flag.
79
- - [x] `bundle_run_artifacts` โ€” Implementation notes:
80
- - Gather screen, memory snapshot, debugreg; structure outputs per run id.
81
- - [x] `compile_run_verify_cycle` โ€” Implementation notes:
82
- - Support BASIC/ASM/SID build routes; then run and verify via screen/audio.
83
- - Archive artifacts in a run folder.
84
-
85
- ---
86
-
87
- ### Phase 2 โ€” Remaining Topics Snapshot (2025-10-30)
88
-
89
- - **Completed with tests**
90
- - `find_and_run_program_by_name` โ€” Covered by `test/meta/filesystem.test.mjs`
91
- - `silence_and_verify` โ€” Covered by `test/meta/audio.test.mjs`
92
- - `filesystem_stats_by_extension` โ€” Covered by `test/meta/filesystem.test.mjs`
93
- - `music_compile_play_analyze` โ€” Covered by `test/meta/audio.test.mjs`
94
- - `extract_sprites_from_ram` โ€” Covered by `test/meta/screen.test.mjs`
95
- - **Pending (add tests during implementation)**
96
- - `rip_charset_from_ram` โ€” Add charset export cases (extend `test/meta/screen.test.mjs`).
97
- - `drive_mount_and_verify` โ€” Add drive lifecycle coverage (extend `test/meta/program.test.mjs` or create `test/meta/drive.test.mjs` when introduced).
98
- - `classify_prg_basic_or_mc` โ€” Add classification logic tests (extend `test/meta/filesystem.test.mjs`).
99
- - `screen_capture_timeline` โ€” Add timeline sampling coverage (extend `test/meta/screen.test.mjs`).
100
- - `sid_param_sweep` โ€” Add SID parameter sweep coverage (extend `test/meta/audio.test.mjs`).
101
- - `create_and_mount_blank_d64` โ€” Add disk creation coverage (extend `test/meta/filesystem.test.mjs`).
102
- - `memory_snapshot_and_diff` โ€” Add snapshot/diff coverage (extend `test/meta/memory.test.mjs`).
103
- - `disassemble_ram_region` โ€” Add disassembly coverage (extend `test/meta/memory.test.mjs`).
104
-
105
- ### Phase 2a โ€” Quick Wins (high-impact, low-effort tools for immediate agent effectiveness)
106
-
107
- Rationale: These tools provide maximum value with minimal implementation effort. They enable core agent capabilities: finding programs, composing music, and understanding file collections. See `doc/meta-tools/analysis.md` for detailed impact analysis.
108
-
109
- - [x] `find_and_run_program_by_name` โ€” Implementation notes:
110
- - **Priority #1** โ€” Most requested feature; enables agents to search and run programs from disk collections.
111
- - Search under a root (including inside `.d64/.d71/.d81/.t64`) for the first program whose filename contains a substring; run it.
112
- - Supports PRG and CRT, case sensitivity toggle, and optional sort (path order vs. alphabetical).
113
- - Agent state: recent searches (root, pattern, extensions), last run path.
114
- - REST: Container-aware GET /v1/files/{root}/**/*:info (wildcards) to discover; if target is inside a container, mount via PUT /v1/drives/{drive}:mount and run via a tiny BASIC loader (upload_run_basic) or menu automation; direct PUT /v1/runners:run_prg|:run_crt when file is on the host filesystem.
115
- - Dependencies: `find_paths_by_name` (โœ… implemented)
116
- - Effort: 45 minutes
117
- - [x] `silence_and_verify` โ€” Implementation notes:
118
- - **Priority #2** โ€” Essential foundation for all SID testing; quick win that unblocks music workflows.
119
- - Silence all voices, then verify via short audio capture that output drops below a threshold.
120
- - Agent state: threshold, capture window.
121
- - REST: PUT|POST /v1/machine:writemem (SID reset), optional streams
122
- - Dependencies: None
123
- - Effort: 35 minutes
124
- - [x] `filesystem_stats_by_extension` โ€” Implementation notes:
125
- - **Priority #3** โ€” Provides context for file operations; helps agents understand collections.
126
- - Walk all files beneath a rootโ€”including files inside disk/tape imagesโ€”and compute counts and size statistics (total, min, max, mean) per extension.
127
- - Agent state: cached directoryg index, prior stats snapshots for trend comparisons.
128
- - REST: Container-aware GET /v1/files/{root}/**/*:info (wildcards); fallback: mount images and scrape directory via BASIC.
129
- - Dependencies: None
130
- - Effort: 35 minutes
131
- - [x] `music_compile_play_analyze` โ€” Implementation notes:
132
- - **Priority #4** โ€” Complete music development workflow in one tool; high value for composition.
133
- - Compile SIDWAVEโ†’PRG or SID, play, then record-and-analyze; export analysis JSON and summary.
134
- - Agent state: compilation cache, expected score, analysis logs.
135
- - REST: POST /v1/runners:run_prg or POST /v1/runners:sidplay
136
- - Dependencies: `silence_and_verify`
137
- - Effort: 90 minutes
138
-
139
- Phase 2a total effort: ~205 minutes (3.4 hours) โ€” High-impact foundation for agent capabilities.
140
-
141
- ---
142
-
143
- ### Phase 2b โ€” Graphics & Extraction (medium effort, high value for creative work)
144
-
145
- - [x] `extract_sprites_from_ram` โ€” Implementation notes:
146
- - **Priority #5** โ€” Extract sprites from running programs for analysis and reuse.
147
- - Search with stride for 63-byte sprite patterns; export `.spr`/hex/base64.
148
- - Agent state: candidate heuristics, sprite index mapping, output folder.
149
- - REST: GET /v1/machine:readmem, optional PUT /v1/machine:pause|resume
150
- - Dependencies: `memory_dump_to_file` (โœ… implemented)
151
- - Effort: 80 minutes
152
- - Coverage: `test/meta/screen.test.mjs`
153
- - [x] `rip_charset_from_ram` โ€” Implementation notes:
154
- - **Priority #6** โ€” Extract custom character sets for reuse and font library building.
155
- - Locate 2KB charsets by structure; export binary and a PNG preview.
156
- - Agent state: range scan plan, preview images, output paths.
157
- - REST: GET /v1/machine:readmem, optional PUT /v1/machine:pause|resume
158
- - Dependencies: `memory_dump_to_file` (โœ… implemented)
159
- - Effort: 75 minutes
160
- - Coverage: `test/meta/screen.test.mjs`
161
- - [x] `drive_mount_and_verify` โ€” Implementation notes:
162
- - **Priority #7** โ€” Reliable drive mounting with retry logic.
163
- - Power on if needed; mount; reset; verify via drives list. Retry with backoff.
164
- - Agent state: retries, final mode, verification snapshot.
165
- - REST: PUT /v1/drives/{drive}:on, PUT /v1/drives/{drive}:mount, PUT /v1/drives/{drive}:reset, GET /v1/drives
166
- - Dependencies: `firmware_info_and_healthcheck` (โœ… implemented)
167
- - Effort: 45 minutes
168
- - Coverage: `test/meta/filesystem.test.mjs`
169
-
170
- Phase 2b total effort: ~200 minutes (3.3 hours) โ€” Graphics extraction and reliable disk handling.
171
-
172
- ---
173
-
174
- ### Phase 2c โ€” Advanced Features (lower priority, implement as needed)
175
-
176
- - [ ] `classify_prg_basic_or_mc` โ€” Implementation notes:
177
- - **Priority #8** โ€” Distinguish BASIC from machine code for better error messages.
178
- - For a given PRG path (host or inside a container), determine if it is tokenized BASIC or machine code/data using load address and token checks.
179
- - Agent state: last probe result, token scanner configuration (PAL/NTSC irrelevant here).
180
- - REST: PUT /v1/runners:load_prg (does not run), GET /v1/machine:readmem (few hundred bytes from load address), optional PUT /v1/machine:reset.
181
- - Dependencies: None
182
- - Effort: 45 minutes
183
- - [ ] `screen_capture_timeline` โ€” Implementation notes:
184
- - **Priority #9** โ€” Record program execution over time.
185
- - Timed captures; export timestamped log and optional GIF.
186
- - Agent state: timer, frame store, export settings.
187
- - REST: GET /v1/machine:readmem (via screen helper), or use MCP read_screen; optional PUT /v1/machine:pause|resume
188
- - Dependencies: `wait_for_screen_text` (โœ… implemented)
189
- - Effort: 50 minutes
190
- - [ ] `sid_param_sweep` โ€” Implementation notes:
191
- - **Priority #10** โ€” Advanced SID experimentation tool.
192
- - Sweep ADSR/waveform/pulse width across ranges; schedule notes, capture audio, and score results.
193
- - Agent state: sweep matrix, top-N results, audio artifacts.
194
- - REST: PUT|POST /v1/machine:writemem (via SID registers), POST /v1/runners:sidplay (for sid attachments), optional streams
195
- - Dependencies: `silence_and_verify`
196
- - Effort: 90 minutes
197
- - [ ] `create_and_mount_blank_d64` โ€” Implementation notes:
198
- - **Priority #11** โ€” Create working disks for file operations.
199
- - Create blank D64; mount; optional BASIC header writer.
200
- - Agent state: created image metadata.
201
- - REST: PUT /v1/files/{path}:create_d64, PUT /v1/drives/{drive}:mount
202
- - Dependencies: `drive_mount_and_verify`
203
- - Effort: 35 minutes
204
- - [ ] `memory_snapshot_and_diff` โ€” Implementation notes:
205
- - **Priority #12** โ€” Debug memory changes during program execution.
206
- - Take two or more snapshots of one or multiple address ranges and produce a diff report (hex and structured JSON with offsets and values).
207
- - Agent state: named snapshots, diff histories.
208
- - REST: GET /v1/machine:readmem, PUT /v1/machine:pause, PUT /v1/machine:resume
209
- - Dependencies: `memory_dump_to_file` (โœ… implemented)
210
- - Effort: 50 minutes
211
- - [ ] `disassemble_ram_region` โ€” Implementation notes:
212
- - **Priority #13** โ€” Understand machine code in memory.
213
- - Pause, read region, disassemble 6502 bytes (agent-side disassembler), write labeled listing to disk with optional symbol hints; resume.
214
- - Agent state: symbol map, disassembly options, output files.
215
- - REST: PUT /v1/machine:pause, GET /v1/machine:readmem, PUT /v1/machine:resume
216
- - Dependencies: None
217
- - Effort: 60 minutes
218
-
219
- ---
220
-
221
- ### Phase 3 โ€” Container Classification & Filesystem Management (when advanced filesystem work needed)
222
-
223
- - [ ] `container_aware_walk_and_classify` โ€” Implementation notes:
224
- - Recurse host and container entries; classify BASIC vs PRG-MC via load + read.
225
- - Agent state: classification cache keyed by content hash and CBM directory entry, per-container manifests.
226
- - REST: Container-aware GET /v1/files/{root}/**/*:info; for BASIC vs PRGโ€‘MC, either (a) read PRG header bytes if `/files:read` is available, or (b) use PUT /v1/runners:load_prg followed by GET /v1/machine:readmem at the file's load address to inspect tokens; cleanup via PUT /v1/machine:reset.
227
- - Dependencies: `find_paths_by_name` (โœ… implemented)
228
- - Effort: 60 minutes
229
- - [ ] `dedup_scan` โ€” Implementation notes:
230
- - Group by size and extension; optional normalized names; optional hash when available.
231
- - Agent state: sizeโ†’paths index, optional fingerprint cache, serialized scan manifests.
232
- - REST: GET /v1/files/{root}/**/*:info (wildcards). Note: content hashing requires a future `/files:read` capability; when absent, tool limits to size/name heuristics.
233
- - Dependencies: `filesystem_stats_by_extension`
234
- - Effort: 60 minutes
235
- - [ ] `dedup_plan_and_apply` โ€” Implementation notes:
236
- - Produce reversible quarantine plan; default dry-run; require explicit confirm to apply.
237
- - Agent state: quarantine root, manifest of moved paths, rollback map, retention policy.
238
- - REST: No direct delete/move endpoints today; this tool defaults to dryโ€‘run and plan output. Apply is disabled unless hostโ€‘side filesystem integration or future endpoints are configured.
239
- - Safety guards: dryโ€‘run by default; explicit `apply=true` and `confirm_phrase` required; path allowlist; maximum deletions threshold; quarantine with rollback window; never touches outside allowed roots.
240
- - Dependencies: `dedup_scan`
241
- - Effort: 75 minutes
242
-
243
- Optional filesystem tools:
244
-
245
- - [ ] `sprite_preview_prg_batch` โ€” Generate+run preview PRGs for many sprite blobs; capture screens. (Effort: 60 minutes)
246
- - [ ] `drive_mode_profile_switch` โ€” Set drive mode with ROM load support. (Effort: 40 minutes)
247
- - [ ] `eject_and_poweroff_drive` โ€” Remove image and power off drive. (Effort: 25 minutes)
248
-
249
- ---
250
-
251
- ### Phase 4 โ€” Additional Orchestration & Workflows (as needed)
252
-
253
- Not yet prioritized. See `doc/meta-tools/catalog.md` for full list of additional meta tools including:
254
-
255
- - Storage orchestration (batch_on_assets_apply_tools, etc.)
256
- - Screen/UI automation (menu_navigation_script, wait_for_screen_text extensions)
257
- - Developer loops (red_green_refactor_loop, multi_range_guardrails, safe_reset_sequence, drive_recovery_sequence)
258
- - Streaming workflows (stream_video_for_duration, stream_audio_and_record)
259
- - RAG-coupled tools (ask_and_apply_memory_fix, sprite_program_from_prompt)
260
- - Artifact pipelines (export_directory_listing_via_basic)
261
-
262
- These tools remain in the catalog for future implementation based on user demand and feedback.
263
-
264
- ---
265
-
266
- ### Phase 5 โ€” Debug Stream Workflows (postโ€‘GA)
267
-
268
- **Infrastructure Prerequisites** (must be satisfied before starting this phase):
269
-
270
- - UDP ingest pipeline with backpressure and packet-loss handling (~40 hours โ€” estimate includes design, implementation, testing)
271
- - Sampling/windowing design for high-rate streams and summary accuracy (~8 hours โ€” research and prototyping)
272
- - Performance targets validated via load and soak tests (~8 hours โ€” test infrastructure and benchmarking)
273
- - Observability and failure-mode coverage (metrics, logs, alerts, drop counters) (~16 hours โ€” instrumentation and monitoring setup)
274
- - **Total infrastructure work: ~72 hours** (estimates based on similar streaming pipeline projects)
275
-
276
- **Rationale for Deferral**: Debug streaming tools are extremely valuable for assembly program verification (comparing expected vs actual execution) but require significant infrastructure work. Better to ship high-value, low-complexity features first (Phases 2a-3), then revisit debug streaming as a dedicated infrastructure project.
277
-
278
- **High-Value Debug Tools** (implement after infrastructure ready):
279
-
280
- - [ ] `debug_stream_watch` โ€” Implementation notes:
281
- - **Foundation tool** โ€” Start/stop debug streams; summarize packet rates; enforce mutual exclusion with video stream.
282
- - Agent state: packet counters, idle detection.
283
- - REST: PUT /v1/streams/debug:start, PUT /v1/streams/debug:stop
284
- - Dependencies: UDP infrastructure
285
- - Effort: 55 minutes
286
- - [ ] `debug_loop_run_and_capture` โ€” Implementation notes:
287
- - **Critical for assembly verification** โ€” Pause โ†’ start debug โ†’ resume โ†’ action โ†’ pause โ†’ stop โ†’ summarize packets.
288
- - Support modes: 6510, VIC, 1541; choose minimal scope by default.
289
- - Agent state: host:port, selected mode, rolling buffer, filters (address ranges, R/W, device), last summary.
290
- - REST: PUT /v1/machine:pause, PUT /v1/streams/debug:start, PUT /v1/machine:resume, [action tool], PUT /v1/machine:pause, PUT /v1/streams/debug:stop
291
- - Safety: refuse when video stream is active; enforce max duration; auto-stop on packet loss; configurable throttling.
292
- - Dependencies: `debug_stream_watch`
293
- - Effort: 80 minutes
294
- - [ ] `verify_raster_irq_line` โ€” Implementation notes:
295
- - **Essential for graphics programming** โ€” Verify raster IRQ is programmed to a specific line by correlating writes to $D012/$D011 and ensuing IRQ acks; report mismatches.
296
- - Agent state: expected lines, tolerance for off-by-one conditions.
297
- - REST: PUT /v1/machine:pause|resume, PUT /v1/streams/debug:start|stop
298
- - Dependencies: `debug_loop_run_and_capture`
299
- - Effort: 70 minutes
300
- - [ ] `debug_trace_until_cpu_write` โ€” Implementation notes:
301
- - **Precise debugging** โ€” Run until a CPU write to an address (or set) is observed; then immediately pause and return a short trace window around the event.
302
- - Agent state: address watch set, pre/post window sizes, event metadata.
303
- - REST: PUT /v1/machine:pause, PUT /v1/streams/debug:start, PUT /v1/machine:resume, PUT /v1/machine:pause, PUT /v1/streams/debug:stop
304
- - Dependencies: `debug_loop_run_and_capture`
305
- - Effort: 70 minutes
306
- - [ ] `action_latency_measure` โ€” Implementation notes:
307
- - **Performance measurement** โ€” Measure cycles between issuing an action (e.g., menu_button, `c64_memory` `write`) and the first observed matching bus event; return cycle/ยตs estimate.
308
- - Agent state: action timestamp, first-match timestamp, CPU clock assumption (PAL/NTSC option).
309
- - REST: PUT /v1/machine:pause|resume, PUT /v1/streams/debug:start|stop, PUT /v1/machine:menu_button|:writemem|runners
310
- - Dependencies: `debug_loop_run_and_capture`
311
- - Effort: 75 minutes
312
-
313
- Optional debug tools (implement after above pass):
314
-
315
- - [ ] `verify_irq_jitter` โ€” Measure IRQ handler periodicity. (Effort: 70 minutes)
316
- - [ ] `sid_register_write_profile` โ€” Capture and summarize SID writes. (Effort: 70 minutes)
317
- - [ ] `iec_bus_handshake_probe` โ€” Use 1541 debug mode to capture IEC bus activity. (Effort: 85 minutes)
318
- - [ ] `time_bounded_trace_around_event` โ€” Maintain circular buffer and freeze on predicate match. (Effort: 70 minutes)
319
-
320
- Notes:
321
-
322
- - Debug stream consumes significant bandwidth and cannot run concurrently with video; tools enforce mutual exclusion and strict time limits.
323
- - Modes supported: 6510, VIC, 6510&VIC, 1541, 6510&1541. Tools select minimal necessary mode for the predicate to reduce load.
324
-
325
- ---
326
-
327
- ### Phase 4 โ€” Additional Orchestration & Workflows (moved from original Phase 6, lower priority)
328
-
329
- Not yet prioritized; these tools remain in the catalog for future implementation based on user demand:
330
-
331
- - [ ] `red_green_refactor_loop` โ€” Iterate: run โ†’ capture screen โ†’ `c64_memory` `write` fixes โ†’ rerun until pass.
332
- - [ ] `multi_range_guardrails` โ€” Continuously verify invariants; auto-restore from snapshot on violations.
333
- - [ ] `safe_reset_sequence` โ€” Snapshot select ranges; reset; compare persistence; resume.
334
- - [ ] `drive_recovery_sequence` โ€” Detect error; reset; power cycle; remount last image; verify.
335
-
336
- RAG-coupled meta tools:
337
-
338
- - [ ] `ask_and_apply_memory_fix` โ€” Retrieve assembly guidance (RAG), compute targeted writes, then `verify_and_write_memory`.
339
- - [ ] `sprite_program_from_prompt` โ€” Generate PETSCII/sprite asset from text; preview PRG; capture screen.
340
-
341
- Optional experiments:
342
-
343
- - [ ] `memory_heatmap_over_time`
344
- - [ ] `irq_latency_probe`
345
- - [ ] `sid_voice_stuck_guard`
346
- - [ ] `auto_benchmark_suite`
347
- - [ ] `firmware_compat_matrix`
348
- - [ ] `ultimate_config_migrate`
349
-
350
- ---
351
-
352
- ### Per-task Done Definition (LLM must verify before ticking)
353
-
354
- - Implementation compiles with no TypeScript errors (where applicable).
355
- - New/updated tests exist and are passing locally.
356
- - `npm run check` passes end-to-end.
357
- - Documentation updated if tool behavior changed.
358
-
359
- ### How to tick off checkboxes (LLM instructions)
360
-
361
- - After completing a checklist item and confirming the Done Definition, update the corresponding `- [ ]` line to `- [x]` in `doc/meta-tools/rollout.md`.
362
- - Only tick one line at a time, from top to bottom, respecting phases and dependencies.
363
- - After ticking, immediately run `npm run check` again to ensure that the documentation update did not break formatting-sensitive scripts.
364
-
365
- ### Notes on sequencing
366
-
367
- - Respect the dependency graph from `doc/meta-tools/catalog.md` (Effort/Benefit/Dependencies Matrix).
368
- - Within a phase, process items in order. If an item depends on another not yet done, jump to the dependencyโ€™s phase, complete it, then resume.
@@ -1,96 +0,0 @@
1
- # Prompt Taxonomy and Context Plan
2
-
3
- This document captures the design work for **Phase 5 / Step 4.1** of the MCP migration: defining the prompt
4
- families, required context, and reusable prompt segments. These notes do **not** contain the final prompt
5
- strings; they specify the structure so that `promptRegistry` can assemble concrete prompts and the test
6
- suite can assert expectations in upcoming steps.
7
-
8
- ---
9
-
10
- ## 1. Prompt Families & Goals
11
-
12
- | Family ID | Mission | Primary Users | Core Outputs |
13
- | --- | --- | --- | --- |
14
- | `basic-program` | Generate, run, and verify Commodore BASIC programs. | BASIC Agent / general workflows | Tokenised BASIC source, post-run verification steps, tool invocation hints. |
15
- | `assembly-program` | Author 6502/6510 assembly for VIC/SID/CIA tasks with safety checks. | ASM Agent / low-level workflows | Assembly source blocks, load/execute instructions, IRQ or memory safety reminders. |
16
- | `sid-music` | Compose SID music with expressive timing and iterative audio checks. | SID Composer | Melody plans, SID register recipes, guidance to analyse playback. |
17
- | `graphics-demo` | Produce graphics routines (sprites, PETSCII art, bitmap/raster effects). | VIC Painter | Mode setup instructions, colour guidance, verification routines. |
18
- | `printer-job` | Send formatted output to Commodore or Epson printers safely. | Printer Operator | Device selection, character-set notes, print/eject workflow. |
19
- | `memory-debug` | Inspect or patch memory without destabilising the system. | Memory Debugger | Safe read/write plans, freeze/resume advice, logging expectations. |
20
- | `drive-manager` | Mount/create disk images and manage drives carefully. | Drive Manager | Pre-flight checks, mount/remove sequences, follow-up validation. |
21
-
22
- > These families mirror the MCP tool domains so that prompt guidance matches available capabilities.
23
-
24
- ---
25
-
26
- ## 2. Required Resource Context per Family
27
-
28
- | Family | Baseline Resources (URIs) | Rationale |
29
- | --- | --- | --- |
30
- | `basic-program` | `c64://basic/spec`, `c64://guide/bootstrap`, `c64://guide/index` | Reinforce BASIC token rules, PETSCII gotchas, workflow expectations. |
31
- | `assembly-program` | `c64://assembly/6510-spec`, `c64://guide/bootstrap`, `c64://graphics/vic/spec`, `c64://sound/sid/spec` | Provide opcode tables, IRQ setup, VIC/SID register references. |
32
- | `sid-music` | `c64://sound/sid/spec`, `c64://sound/sidwave/spec`, `c64://sound/sid/file-format` | Supply register map, SIDWAVE format, SID file metadata. |
33
- | `graphics-demo` | `c64://graphics/vic/spec`, `c64://guide/bootstrap` | Cover VIC mode bits, raster constraints, general workflow guidance. |
34
- | `printer-job` | `c64://printer/spec`, `c64://printer/commodore/text`, `c64://printer/prompt-guide` | Document PETSCII vs ESC/P workflows, sample templates, and safety checks. |
35
- | `memory-debug` | `c64://guide/bootstrap`, `c64://assembly/6510-spec`, `c64://guide/index` | Highlight addressing safeguards, workflow rules, and knowledge map summaries. |
36
- | `drive-manager` | `c64://guide/bootstrap` | Ensure awareness of system-wide safety rules before altering drives. |
37
-
38
- Notes:
39
-
40
- - Resource URIs reflect existing knowledge catalog entries; verify actual IDs during prompt implementation.
41
- - `drive-manager` currently relies on orientation material only; plan to author a dedicated storage/drive guide resource.
42
- - Additional resources (memory map, VIC character set, SID best practices) remain desirableโ€”tracked in follow-ups below.
43
-
44
- ---
45
-
46
- ## 3. Default Tool Suggestions per Family
47
-
48
- | Family | Must-Suggest Tools | Optional Tools | Warnings |
49
- | --- | --- | --- | --- |
50
- | `basic-program` | `c64_program`, `c64_memory` | `c64_system` (ops `reset`, `start_task`) | Remind to reset only if user confirms; highlight PETSCII newline handling. |
51
- | `assembly-program` | `c64_program`, `c64_memory` | `c64_system` (ops `reset`, `pause`, `resume`) | Require IRQ acknowledgement steps for raster code; caution on zero-page writes. |
52
- | `sid-music` | `c64_sound` (ops `generate`, `note_on`, `analyze`) | `c64_sound` (ops `compile_play`, `play_sid_file`, `set_volume`) | Warn about volume resets (`$D418`) and making backups before overwriting SID memory. |
53
- | `graphics-demo` | `c64_program`, `c64_memory`, `c64_graphics` | `c64_system` (op `pause`), `c64_memory` (op `read`) | Emphasise safe colour RAM usage; mention border side-effects for raster tricks. |
54
- | `printer-job` | `c64_printer` (ops `print_text`, `print_bitmap`) | `c64_printer` (op `define_chars`), `c64_memory` | Remind users to send `CHR$(12)` before closing; confirm `printer` argument (`commodore` vs `epson`) before printing. |
55
- | `memory-debug` | `c64_memory`, `c64_system` (ops `pause`, `resume`) | `c64_system` (op `reset`) | Advise capturing snapshots before writes; include address validation heuristics. |
56
- | `drive-manager` | `c64_disk` (ops `list_drives`, `mount`, `unmount`) | `c64_disk` (ops `file_info`, `create_image`, `find_and_run`), `c64_drive` (ops `reset`, `power_on`, `power_off`, `load_rom`, `set_mode`), `c64_system` (op `resume`) | Highlight risk of interrupting running programs; recommend verifying mounts after actions. |
57
-
58
- ---
59
-
60
- ## 4. Reusable Prompt Segments (`promptSegments`)
61
-
62
- | Segment ID | Purpose | Content Summary |
63
- | --- | --- | --- |
64
- | `intro/core` | Universal introduction | Remind user the MCP runs against Ultimate 64 REST, mention tool invocation expectation. |
65
- | `safety/reset` | Caution about disruptive actions | Ask for confirmation before resets/writes that halt the machine. |
66
- | `workflow/basic-verify` | Post-run checklist for BASIC | Suggest `c64_memory` (op `read_screen`) capture, optional `c64_memory` (op `read`) for program area, note PETSCII output quirks. |
67
- | `workflow/asm-irq` | IRQ safety guidance | Outline `SEI`, vector setup, `$D01A` mask, `$D019` acknowledge, `CLI`. |
68
- | `workflow/sid-iterate` | Audio feedback loop | Steps: compose โ†’ play โ†’ run `analyze_audio` โ†’ adjust ADSR/frequency. |
69
- | `workflow/graphics-verify` | Visual validation | Encourage screenshot via `c64_memory` (op `read_screen`), mention border/background toggles. |
70
- | `workflow/printer` | Print job completion | Ensure `CHR$(12)` for page eject, close channel, suggest checking printer status. |
71
- | `workflow/memory-snapshot` | Safe memory editing | Recommend pausing, using `c64_memory` reads before writes, and resuming afterwards. |
72
- | `workflow/drive` | Drive changes | Pre-check currently mounted images, confirm after action, note potential interference with running programs. |
73
-
74
- Segments should be composable so prompts can include `intro/core` + family-specific workflow + optional `safety/reset` depending on requested action.
75
-
76
- ---
77
-
78
- ## 5. Arguments & Variations (Preliminary)
79
-
80
- - `assembly-program` may accept a `hardware` argument (`sid`, `vic`, `cia`, `multi`) to pull in targeted resource snippets.
81
- - `graphics-demo` may accept `mode` (`text`, `multicolour`, `bitmap`, `sprite`) to tailor register setup.
82
- - `printer-job` may accept `printerType` (`commodore`, `epson`) to adjust command examples and character-set notes.
83
- - Future prompts should validate arguments and provide descriptive errors if unsupported values are provided.
84
-
85
- Argument handling will be implemented in `promptRegistry.resolve` during Step 4.3; this section informs schema design.
86
-
87
- ---
88
-
89
- ## 6. Open Questions & Follow-Ups
90
-
91
- - Extend the knowledge index with dedicated memory-map, drive-management, and character-set resources so prompts can cite them directly.
92
- - Add SID best-practices material (triangle wave workflow) to the knowledge catalog or link from prompts explicitly.
93
- - Adjust `storageModule.prompts` to include `drive-manager` once the prompt is authored, keeping tool metadata consistent.
94
- - Ensure prompt tests assert for resource/tool mentions and safety callouts per family.
95
-
96
- Document owner: Prompts migration effort (Phase 5).
@@ -1,147 +0,0 @@
1
- # Example LLM Prompts for C64 Bridge Server
2
-
3
- These example prompts illustrate what a user can ask the MCP server to perform on a real or emulated Commodore 64.
4
- The MCP bridges the userโ€™s intent with direct program generation, execution, or device control.
5
-
6
- >[!NOTE] This is meant as a brainstorm collection of prompts. Some of the prompts mentioned below are not yet supported by the current MCP tools.
7
-
8
- ---
9
-
10
- ## ๐Ÿง  General Interaction
11
-
12
- - "Show me the current C64 system state."
13
- - "Reset the C64 and verify that BASIC is ready."
14
- - "List all mounted disk images."
15
- - "Mount the disk `games.d64` and list its directory."
16
- - "Save the current memory to `snapshot.bin`."
17
- - "Restore RAM from `snapshot.bin` and continue execution."
18
- - "Transfer and run the program `demo.prg`."
19
- - "Print the current screen output as text."
20
- - "Show me the registers of CIA 1 and CIA 2."
21
- - "Pause execution and dump memory from `$0800` to `$0FFF`."
22
-
23
- ---
24
-
25
- ## ๐Ÿ’พ Memory and System Control
26
-
27
- - "Read 32 bytes starting at `$C000`."
28
- - "Write the value `$A9` to address `$C000`."
29
- - "Fill memory from `$0400` to `$07E7` with `$20` (space)."
30
- - "Dump the zero page as a hex table."
31
- - "Freeze the CPU, modify `$D020` to `$06`, and resume."
32
- - "Trigger a soft reset."
33
- - "Hard reset the C64 and reload `boot.prg`."
34
-
35
- ---
36
-
37
- ## ๐Ÿ’ก BASIC Programming
38
-
39
- - "Create a BASIC program that prints 'HELLO WORLD' in the center of the screen."
40
- - "Generate a BASIC listing for a bouncing ball animation."
41
- - "Convert this text into a valid BASIC tokenized PRG:"
42
-
43
- ```basic
44
- 10 PRINT "READY."
45
- 20 GOTO 10
46
- ```
47
-
48
- - "List all BASIC variables after program execution."
49
- - "Run the currently loaded BASIC program and capture its output."
50
- - "Save the BASIC program as `HELLO.PRG` to disk."
51
- - "Show the BASIC memory map and string descriptors."
52
-
53
- ---
54
-
55
- ## โš™๏ธ Assembly Programming
56
-
57
- - "Assemble a short 6502 routine that changes the border colour every frame."
58
- - "Inject this code into RAM at `$C000` and execute:"
59
-
60
- ```assembly
61
- LDA #$06
62
- STA $D020
63
- RTS
64
- ```
65
-
66
- - "Assemble and run a raster interrupt that flashes the screen every 50 Hz."
67
- - "Disassemble memory from `$C000` to `$C050`."
68
- - "Step through 10 instructions and show registers after each step."
69
- - "Assemble a SID music player routine at `$1000`."
70
- - "Assemble and export a `.prg` file from this source."
71
-
72
- ---
73
-
74
- ## ๐ŸŽต SID Music Composition
75
-
76
- - "Compose a short SID tune in the style of early Rob Hubbard."
77
- - "Generate a 3-voice arpeggio sequence in C major, lasting 8 seconds."
78
- - "Export this tune as `demo.sid`."
79
- - "Play the current SID file through the C64 SID chip."
80
- - "Visualize the waveform and envelope data for each voice."
81
- - "Show which SID registers are used for filter modulation."
82
-
83
- ---
84
-
85
- ## ๐ŸŽจ PETSCII Art and Graphics
86
-
87
- - "Create a PETSCII logo reading 'C64 Bridge' with rainbow gradient."
88
- - "Generate a PETSCII image of a spaceship using block characters."
89
- - "Convert this PNG into PETSCII art compatible with C64 screen memory."
90
- - "Preview the PETSCII output as text."
91
- - "Export the artwork to `logo.seq` and `logo.prg`."
92
- - "Display the PETSCII artwork on the screen."
93
-
94
- ---
95
-
96
- ## ๐Ÿ–จ๏ธ Printing and Document Generation
97
-
98
- - "Print the current BASIC listing to a virtual printer."
99
- - "Render a document header: 'Commodore 64 Report โ€“ 1984 Edition'."
100
- - "Generate a formatted report of all memory changes in the last session."
101
- - "Print the PETSCII artwork as a text file."
102
- - "Export screen contents to PDF via MCP printer adapter."
103
-
104
- ---
105
-
106
- ## ๐Ÿงฉ Disk and File Management
107
-
108
- - "Create a new disk image called `workbench.d64`."
109
- - "Mount `music.d64` as drive 8."
110
- - "List files on drive 8."
111
- - "Delete the file `OLDGAME.PRG` from drive 8."
112
- - "Copy `HELLO.PRG` to drive 9 as `HELLO2.PRG`."
113
- - "Transfer file `game.prg` from local PC to drive 8."
114
- - "Unmount all drives."
115
-
116
- ---
117
-
118
- ## ๐Ÿงช Testing and Diagnostics
119
-
120
- - "Run a video sync test pattern."
121
- - "Play a POP audio + frame sync signal for calibration."
122
- - "Measure frame delay between video and audio."
123
- - "Report VIC-II raster timing and SID voice status."
124
- - "Check if the system is running at PAL or NTSC frequency."
125
- - "Benchmark CPU speed using a short 1000-iteration loop."
126
-
127
- ---
128
-
129
- ## ๐Ÿค– Integrated AI Tasks
130
-
131
- - "Generate a new BASIC game idea and create its program automatically."
132
- - "Write assembly code that plays a melody while showing scrolling text."
133
- - "Convert a SID file into BASIC DATA statements."
134
- - "Explain what the program at `$0801` does."
135
- - "Translate this assembly snippet into commented pseudocode."
136
- - "Optimize this BASIC program for speed and memory."
137
- - "Summarize the PETSCII image currently displayed."
138
-
139
- ---
140
-
141
- ## ๐Ÿ“š Meta Commands
142
-
143
- - "Describe all capabilities of this MCP server."
144
- - "List all available agents (BASIC, Assembly, SID, PETSCII, Disk)."
145
- - "Explain how to connect an external tool (like VICE or Ultimate 64)."
146
- - "Show examples of valid API calls for writing to memory."
147
- - "Show recent system logs."
@@ -1,28 +0,0 @@
1
- # Tool Consolidation Working Notes
2
-
3
- ## Required Reading Confirmation
4
-
5
- - `doc/tool-consolidation/plan.md` โ€” Consolidation objectives, grouped tool mapping, and implementation checklist.
6
- - `doc/developer.md` โ€” Contribution workflow, testing gates (`npm run check`), and documentation requirements.
7
- - `README.md` (auto-generated MCP surface section) โ€” Current tool/resource listings to validate documentation updates.
8
- - `scripts/generate-docs.ts` and `src/tools/registry/index.ts` โ€” Existing documentation pipeline and registration mechanics to be refactored.
9
-
10
- ## Key Acceptance Criteria from the Consolidation Plan
11
-
12
- - Expose exactly **12 grouped tools** prefixed with `c64.*`, each defined as a discriminated union on an `op` field.
13
- - Preserve every legacy operation by mapping it into one of the grouped tools without behavior regressions.
14
- - Introduce `verify?: boolean` where prior tools performed separate verification (memory writes, SID silence, disk mount, upload+run flows).
15
- - Collapse background task management into `c64_system` while keeping streaming as a dedicated `c64_stream` tool.
16
- - Provide shared dispatch helpers that route `args.op` to the appropriate handler with concise descriptions (โ‰ค2 sentences per op).
17
- - Update TypeScript types, schemas, and validators so LLM clients receive complete JSON Schema visibility for every operation.
18
- - Regenerate documentation such that grouped tools appear in a unified section with nested operations and a summary line reflecting 12 tools / ~81 ops / 25 resources / 7 prompts.
19
- - Maintain automated tests that assert grouped tool registration, schema discrimination, and representative happy-path executions for each tool family.
20
- - Refresh the changelog with an entry describing the consolidation and the move to discriminated schemas.
21
-
22
- ## Additional Implementation Considerations
23
-
24
- - Stage migrations to keep the MCP server runnable at all times; introduce compatibility shims if some clients still expect legacy tool names until rollout completion.
25
- - Ensure `scripts/generate-docs.ts` and any README automation remain idempotent after schema changes.
26
- - Re-run `npm run check` after each incremental change set; prioritize small, reviewable commits to simplify rollback.
27
- - Validate LLM discoverability by exercising Copilot Chat or `list_tools` once grouped schemas are in place.
28
- - Document any noteworthy deviations (e.g., future `generate_bitmap` operation) so downstream prompts can reference upcoming capabilities without confusing current behavior.