c64bridge 0.7.4 → 0.8.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 (107) hide show
  1. package/.github/prompts/README.md +14 -4
  2. package/.github/prompts/assembly-routine-session.prompt.md +9 -9
  3. package/.github/prompts/basic-program-session.prompt.md +11 -9
  4. package/.github/prompts/drive-management-session.prompt.md +9 -9
  5. package/.github/prompts/hello-world-session.prompt.md +17 -0
  6. package/.github/prompts/petscii-art-session.prompt.md +9 -9
  7. package/.github/prompts/play-classic-game.prompt.md +9 -9
  8. package/.github/prompts/pr-converge.prompt.md +13 -0
  9. package/.github/prompts/sid-music-session.prompt.md +9 -9
  10. package/AGENTS.md +59 -60
  11. package/README.md +550 -191
  12. package/data/assembly/assembly-spec.md +290 -1
  13. package/data/context/bootstrap.md +26 -2
  14. package/data/context/fast-paths.md +44 -0
  15. package/data/graphics/petscii-style-guide.md +6 -2
  16. package/data/graphics/sprite-charset-best-practices.md +5 -5
  17. package/dist/.tsbuildinfo +1 -1
  18. package/dist/c64Client.js +990 -26
  19. package/dist/config.js +5 -1
  20. package/dist/device.js +680 -57
  21. package/dist/diagnostics.js +371 -0
  22. package/dist/mcp/metadata.js +39 -0
  23. package/dist/mcp-server.js +170 -20
  24. package/dist/platform.js +10 -2
  25. package/dist/prompts/registry.js +166 -309
  26. package/dist/rag/init.js +37 -1
  27. package/dist/rag/knowledgeIndex.js +18 -6
  28. package/dist/rag/rateLimiter.js +2 -2
  29. package/dist/streamCapture.js +135 -0
  30. package/dist/tools/audio.js +3 -1
  31. package/dist/tools/debug.js +470 -0
  32. package/dist/tools/developer.js +10 -4
  33. package/dist/tools/graphics.js +183 -17
  34. package/dist/tools/machineControl.js +11 -5
  35. package/dist/tools/memory.js +19 -10
  36. package/dist/tools/meta/audio.js +240 -1
  37. package/dist/tools/meta/config.js +20 -28
  38. package/dist/tools/meta/configInventory.js +104 -0
  39. package/dist/tools/meta/diagnostics.js +45 -2
  40. package/dist/tools/meta/graphics.js +14 -6
  41. package/dist/tools/meta/index.js +1 -0
  42. package/dist/tools/meta/memory.js +20 -6
  43. package/dist/tools/meta/program.js +473 -0
  44. package/dist/tools/pollValidator.js +4 -2
  45. package/dist/tools/programRunners.js +8 -4
  46. package/dist/tools/registry/config.js +17 -0
  47. package/dist/tools/registry/disk.js +7 -0
  48. package/dist/tools/registry/drive.js +3 -0
  49. package/dist/tools/registry/graphics.js +111 -27
  50. package/dist/tools/registry/index.js +6 -0
  51. package/dist/tools/registry/memory.js +1 -0
  52. package/dist/tools/registry/platform.js +121 -0
  53. package/dist/tools/registry/program.js +26 -8
  54. package/dist/tools/registry/sound.js +96 -0
  55. package/dist/tools/registry/system.js +15 -2
  56. package/dist/tools/storage.js +1 -0
  57. package/dist/tools/streaming.js +1 -0
  58. package/dist/tools/types.js +38 -4
  59. package/dist/tools/vice.js +160 -0
  60. package/dist/vicBitmap.js +317 -0
  61. package/dist/vice/mockServer.js +439 -0
  62. package/dist/vice/process.js +310 -0
  63. package/dist/vice/readiness.js +18 -2
  64. package/dist/vice/viceClient.js +382 -22
  65. package/doc/developer.md +62 -24
  66. package/doc/img/backend-switch/hello-c64u.png +0 -0
  67. package/doc/img/backend-switch/hello-vice-and-c64u.png +0 -0
  68. package/doc/img/backend-switch/hello-vice.png +0 -0
  69. package/doc/img/backend-switch/metadata.json +50 -0
  70. package/doc/plans/vice-backend-switch/plan.md +486 -0
  71. package/doc/plans/vice-backend-switch-2/plan.md +48 -0
  72. package/doc/plans/vice-support/notes.md +1 -0
  73. package/doc/plans/vice-support/plan.md +5 -0
  74. package/doc/plans/vice-support/rollout.md +23 -17
  75. package/doc/reviews/vice-support-review.md +185 -0
  76. package/doc/troubleshooting-mcp.md +35 -6
  77. package/doc/vice/support-matrix.md +54 -0
  78. package/mcp/prompts.json +292 -0
  79. package/mcp/protocol-examples.json +46 -0
  80. package/mcp/resources.json +940 -0
  81. package/mcp/schemas/c64_config.schema.json +350 -0
  82. package/mcp/schemas/c64_debug.schema.json +380 -0
  83. package/mcp/schemas/c64_disk.schema.json +278 -0
  84. package/mcp/schemas/c64_drive.schema.json +120 -0
  85. package/mcp/schemas/c64_extract.schema.json +302 -0
  86. package/mcp/schemas/c64_graphics.schema.json +333 -0
  87. package/mcp/schemas/c64_memory.schema.json +155 -0
  88. package/mcp/schemas/c64_printer.schema.json +218 -0
  89. package/mcp/schemas/c64_program.schema.json +391 -0
  90. package/mcp/schemas/c64_rag.schema.json +67 -0
  91. package/mcp/schemas/c64_select_backend.schema.json +32 -0
  92. package/mcp/schemas/c64_sound.schema.json +644 -0
  93. package/mcp/schemas/c64_stream.schema.json +61 -0
  94. package/mcp/schemas/c64_system.schema.json +227 -0
  95. package/mcp/schemas/c64_vice.schema.json +63 -0
  96. package/mcp/server.json +15 -0
  97. package/mcp/tools.json +4517 -0
  98. package/mcp.json +83 -9
  99. package/package.json +8 -3
  100. package/scripts/capture-backend-switch-screenshots.mjs +276 -0
  101. package/scripts/generate-mcp-interface.ts +289 -0
  102. package/scripts/invoke-bun.mjs +67 -21
  103. package/scripts/mockC64Server.mjs +162 -6
  104. package/scripts/run-coverage.mjs +284 -0
  105. package/scripts/run-tests.mjs +95 -39
  106. package/scripts/run-tests.ts +378 -73
  107. package/scripts/update-readme.ts +147 -13
@@ -1,6 +1,16 @@
1
- ## Copilot Base Prompts
1
+ ## Copilot Prompt Modes
2
2
 
3
- This directory contains base prompts that are used if specific chat modes are
4
- enabled in Copilot.
3
+ These files define repo-local prompt entry points.
5
4
 
6
- They are not end user prompts which you can find in the `doc/prompts` directory instead.
5
+ Shared guidance lives in `AGENTS.md`, `CLAUDE.md`, and `.github/copilot-instructions.md`.
6
+ Execution logic lives only in `.github/skills/*/SKILL.md`.
7
+
8
+ ## Prompts vs Skills
9
+
10
+ Prompts in this folder decide when and why a workflow should run.
11
+
12
+ Skills in `.github/skills/` define how the workflow executes: MCP tool choice, sequencing,
13
+ validation, and safety constraints.
14
+
15
+ Keep prompt files short, intent-shaped, and routing-only. If a prompt starts describing tool
16
+ calls or step-by-step execution, move that content into the matching skill.
@@ -1,13 +1,13 @@
1
1
  ---
2
- mode: 'agent'
3
- model: GPT-4o
4
- tools: ['c64bridge/*']
5
- description: 'Author and validate Commodore 64 assembly routines with proper safety checks.'
2
+ mode: "agent"
3
+ tools: ["c64bridge/*"]
4
+ description: "Author and validate Commodore 64 assembly routines with proper safety checks."
6
5
  ---
6
+
7
7
  Your goal is to help an experienced user craft a 6502/6510 routine for the Commodore 64 while maintaining safe workflows.
8
8
 
9
- 1. Determine the hardware focus (VIC-II, SID, CIA, mixed) and confirm whether interrupts or zero-page areas are already in use. Reference [`assembly-spec.md`](../../data/assembly/assembly-spec.md) and the safety rules in [`bootstrap.md`](../../data/context/bootstrap.md).
10
- 2. Sketch a plan that lists target addresses, registers, and any required initialisation. Pull supporting references with `c64_rag` (op `asm`) when needed for timing tables or register maps.
11
- 3. Generate assembly source with clear labels. Assemble and run using `c64_program` (op `upload_run_asm`). Capture assembler diagnostics and surface them if compilation fails.
12
- 4. Provide verification steps: `c64_memory` (ops `read`, `read_screen`) for installed code or hardware register dumps, and instructions for acknowledging IRQ flags (`$D01A`, `$D019`) when applicable. Emphasise pausing via `c64_system` (op `pause`) before invasive memory edits and resuming afterward.
13
- 5. Offer follow-up options such as exporting to disk (`c64_disk` op `create_image`), integrating with BASIC loaders, or resetting the machine (`c64_system` op `reset`) once the user confirms.
9
+ Use the skill defined in `../skills/assembly-program/SKILL.md` as the single source of truth for execution.
10
+
11
+ This prompt only identifies the intent: custom 6502/6510 routine work with hardware-aware safety requirements.
12
+
13
+ Extract the hardware focus and any missing constraints from the user request, execute the skill, and summarize the result, validation, and any blockers.
@@ -1,13 +1,15 @@
1
1
  ---
2
- mode: 'agent'
3
- model: GPT-4o
4
- tools: ['c64bridge/*']
5
- description: 'Plan, write, and validate a Commodore BASIC v2 program with MCP tooling.'
2
+ mode: "agent"
3
+ tools: ["c64bridge/*"]
4
+ description: "Plan, write, and validate a Commodore BASIC v2 program with MCP tooling."
6
5
  ---
6
+
7
7
  Your goal is to help the user design and run a BASIC v2 program on the Commodore 64.
8
8
 
9
- 1. Clarify the program requirements, expected inputs/outputs, and whether the user wants to preserve existing state. Use [`basic-spec.md`](../../data/basic/basic-spec.md) for quick syntax reminders.
10
- 2. Outline a short plan before coding, citing helpful docs like [`basic-spec.md`](../../data/basic/basic-spec.md) for keywords or [`bootstrap.md`](../../data/context/bootstrap.md) for workflow rules.
11
- 3. Generate uppercase, token-friendly BASIC with line numbers. Run `c64_program` (op `upload_run_basic`) and include the code in the response with brief comments if needed.
12
- 4. Immediately capture results with `c64_memory` (op `read_screen`), and suggest `c64_memory` (op `read`) on the program area when validation is required. Flag any disruptive steps (like `c64_system` op `reset`) and request confirmation first.
13
- 5. Offer iteration tips: tweaking constants, persisting output to disk via `c64_printer` (op `print_text`) and `c64_disk` (op `create_image`), or expanding the program using relevant RAG lookups (`c64_rag` op `basic`).
9
+ Use the skill defined in `../skills/basic-program/SKILL.md` as the single source of truth for execution.
10
+
11
+ This prompt only identifies the intent: a bespoke Commodore BASIC v2 program rather than a generic quick demo.
12
+
13
+ If the request collapses to a tiny hello-world or smoke-test program, reroute to `../skills/hello-world/SKILL.md` instead of treating it as bespoke BASIC.
14
+
15
+ Extract missing requirements from the user request, execute the skill, and summarize the result and validation.
@@ -1,13 +1,13 @@
1
1
  ---
2
- mode: 'agent'
3
- model: GPT-4o
4
- tools: ['c64bridge/*']
5
- description: 'Manage Ultimate 64 disk images and drives safely.'
2
+ mode: "agent"
3
+ tools: ["c64bridge/*"]
4
+ description: "Route disk-image and drive requests to the canonical drive-management skill."
6
5
  ---
6
+
7
7
  Your goal is to help the user mount, create, or remove disk images on the Ultimate hardware without disrupting active programs.
8
8
 
9
- 1. Start by listing drives via `c64_disk` (op `list_drives`) and confirming which slot the user wants to touch.
10
- 2. Clarify the desired action: mount an existing image, create a new blank disk, or eject/reset hardware. Offer options (`c64_disk` ops `mount`, `unmount`, `file_info`, `find_and_run`; `c64_drive` ops `reset`, `power_on`, `power_off`, `set_mode`, `load_rom`).
11
- 3. For new media, walk through `c64_disk` (op `create_image`), documenting output paths. Suggest using `c64_disk` (op `file_info`) to confirm image contents when needed.
12
- 4. After any mutation, rerun `c64_disk` (op `list_drives`) to verify state. Warn before power cycling or resetting drives that might be in active use by running software.
13
- 5. Provide cleanup guidance: closing with `c64_disk` (op `unmount`), backing up created images, and resuming normal operation (`c64_system` ops `resume`, `reset`) if a pause was required.
9
+ Use the skill defined in `../skills/drive-manager/SKILL.md` as the single source of truth for execution.
10
+
11
+ This prompt only identifies the intent: disk-image or drive-state changes that must be handled safely.
12
+
13
+ Extract the requested drive action, execute the skill, and summarize the resulting drive state and validation.
@@ -0,0 +1,17 @@
1
+ ---
2
+ mode: "agent"
3
+ tools: ["c64bridge/*"]
4
+ description: "Run the fastest hello-world or smoke-test workflow with MCP tooling."
5
+ ---
6
+
7
+ Your goal is to run a fast hello-world or greeting workflow on one or more Commodore 64 backends.
8
+
9
+ Use the skill defined in `../skills/hello-world/SKILL.md` as the single source of truth for execution.
10
+
11
+ This prompt only identifies the intent: a trivial greeting, smoke test, or hello-world confirmation.
12
+
13
+ When the request is already backend-pinned and low ambiguity, execute immediately through the skill instead of re-reading general docs.
14
+
15
+ When the skill selects a grouped MCP tool such as `c64_program`, always include its `op` discriminator in the call arguments.
16
+
17
+ Extract missing requirements from the user request, execute the skill, and summarize the result and validation.
@@ -1,13 +1,13 @@
1
1
  ---
2
- mode: 'agent'
3
- model: GPT-4o
4
- tools: ['c64bridge/*']
5
- description: 'Design PETSCII or sprite-based visuals using Commodore 64 MCP tools.'
2
+ mode: "agent"
3
+ tools: ["c64bridge/*"]
4
+ description: "Design PETSCII or sprite-based visuals using Commodore 64 MCP tools."
6
5
  ---
6
+
7
7
  Your goal is to help the user create PETSCII scenes or sprite showcases on the Commodore 64.
8
8
 
9
- 1. Gather the artistic direction (theme, colours, animation needs) and whether output should be static PETSCII, sprite demo, or both. Consult the VIC reference in [`vic-spec.md`](../../data/video/vic-spec.md) and the character map in [`character-set.csv`](../../data/video/character-set.csv).
10
- 2. Decide on the rendering path: `c64_graphics` (op `create_petscii`) for automatic art, `c64_graphics` (op `render_petscii`) for text layouts, or `c64_graphics` (op `generate_sprite`) for sprite visuals. Outline the plan before executing.
11
- 3. When generating BASIC routines, call `c64_program` (op `upload_run_basic`). For assembly-driven demos, guide the user through `c64_program` (op `upload_run_asm`). Mention palette registers (`$D020`, `$D021`) and mode bits (`$D011`, `$D016`, `$D018`).
12
- 4. Validate the output using `c64_memory` (op `read_screen`) or by capturing sprite memory with `c64_memory` (op `read`). Offer adjustments such as recolouring, adding animation loops, or exporting assets via `c64_disk` (ops `create_image`, `mount`).
13
- 5. Encourage saving or sharing results, and remind the user how to reset or restore the display when finished (`c64_system` op `reset`).
9
+ Use the skill defined in `../skills/graphics-demo/SKILL.md` as the single source of truth for execution.
10
+
11
+ This prompt only identifies the intent: PETSCII, sprite, bitmap, or frame-capture work.
12
+
13
+ Extract the requested visual mode and style constraints, execute the skill, and summarize the resulting output and validation.
@@ -1,13 +1,13 @@
1
1
  ---
2
- mode: 'agent'
3
- model: GPT-4o
4
- tools: ['c64bridge/*']
5
- description: 'Load and run existing Commodore 64 software via the MCP server.'
2
+ mode: "agent"
3
+ tools: ["c64bridge/*"]
4
+ description: "Load and run existing Commodore 64 software via the MCP server."
6
5
  ---
6
+
7
7
  Your goal is to guide the user through playing an existing Commodore 64 title using the Ultimate hardware and the `c64bridge` tool suite.
8
8
 
9
- 1. Clarify what media the user has (single PRG, CRT, or full disk image) and gather any Ultimate filesystem paths. When unsure, suggest listing drives with `c64_disk` (op `list_drives`).
10
- 2. Verify connectivity by calling `c64_config` (ops `version`, `info`) before attempting to load software. If hardware is offline, point to the environment checklist in the [developer guide](../../doc/developer.md).
11
- 3. For loose PRG or CRT files, prefer `c64_program` (ops `run_prg`, `run_crt`). For disk images, mount them with `c64_disk` (op `mount`), then launch the correct program via `c64_program` (op `run_prg`) or the autostart feature. Always confirm the target drive slot with the user.
12
- 4. After launching the program, capture the initial screen with `c64_memory` (op `read_screen`). If the user wants livestream output, mention the optional `c64_stream` (op `start`) audio/video bridge.
13
- 5. Offer follow-up support such as saving snapshots with `c64_disk` (op `create_image`) or cleanly unmounting media with `c64_disk` (op `unmount`) when finished.
9
+ Use the skill defined in `../skills/software-launch/SKILL.md` as the single source of truth for execution.
10
+
11
+ This prompt only identifies the intent: launching existing PRG, CRT, or disk-based software.
12
+
13
+ Extract the media type and target backend from the user request, execute the skill, and summarize the launch result and validation.
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: Converge a pull request to merge-ready state
3
+ ---
4
+
5
+ # Pull Request Convergence
6
+
7
+ Bring the current pull request to a **merge-ready state**.
8
+
9
+ Use the skill defined in `../skills/pr-converge/SKILL.md` as the single source of truth for execution.
10
+
11
+ This prompt only identifies the intent: bringing the current pull request to merge-ready state.
12
+
13
+ Execute the skill, keep iterating until convergence criteria are satisfied, and summarize fixes, validation, and CI status.
@@ -1,13 +1,13 @@
1
1
  ---
2
- mode: 'agent'
3
- model: GPT-4o
4
- tools: ['c64bridge/*']
5
- description: 'Compose, play, and iterate on SID music using MCP tooling.'
2
+ mode: "agent"
3
+ tools: ["c64bridge/*"]
4
+ description: "Compose, play, and iterate on SID music using MCP tooling."
6
5
  ---
6
+
7
7
  Your goal is to help the user create expressive SID music on the Commodore 64.
8
8
 
9
- 1. Ask about musical goals: style, instruments, tempo, duration, and whether they prefer BASIC playback or SIDWAVE composition. Reference the best-practice notes in [`sid-programming-best-practices.md`](../../data/audio/sid-programming-best-practices.md).
10
- 2. Draft a composition plan with phrasing guidance. When gathering inspiration or technique snippets, use `c64_rag` (op `basic`/`asm`) targeting SID resources.
11
- 3. Generate either a BASIC music program (triangle/pulse focus) or a SIDWAVE definition. Execute playback with `c64_program` (op `upload_run_basic`), `c64_sound` (op `generate`), or `c64_sound` (op `compile_play`) depending on the chosen format.
12
- 4. Encourage verification by calling `c64_sound` (ops `record_analyze` or `analyze`), summarising detected notes and timing. Offer manual tweaks via `c64_sound` (ops `note_on`, `note_off`, `set_volume`) where appropriate.
13
- 5. Provide exporting and archival options: saving PRGs/SIDs to disk (`c64_disk` op `create_image`, then `c64_disk` op `mount`) and noting how to restore the SID state (`c64_sound` ops `reset`, `silence_all`).
9
+ Use the skill defined in `../skills/sid-music/SKILL.md` as the single source of truth for execution.
10
+
11
+ This prompt only identifies the intent: preset playback, custom SID composition, or audio verification.
12
+
13
+ Extract the musical goal and any missing constraints, execute the skill, and summarize the playback path and validation.
package/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Agent Integration Guide
2
2
 
3
- LLM-facing reference for using this MCP server. Keep it simple: start the server, discover tools, call them safely.
3
+ LLM-facing reference for using this MCP server. Keep it simple: start the server, discover tools safely, and route execution through `.github/skills`.
4
4
 
5
5
  ## Quick Start
6
6
 
@@ -25,6 +25,22 @@ Example:
25
25
 
26
26
  When Ultimate firmware network protection is enabled, `networkPassword` is sent as the `X-Password` header on every REST request.
27
27
 
28
+ ### Runtime Backend Switching
29
+
30
+ When both `c64u` and `vice` are configured, the server can keep both backends live at the same time.
31
+ Use `c64_select_backend` to switch the active backend without restarting the MCP server.
32
+ The `c64://platform/status` resource always reports the currently active backend and the configured backend set.
33
+ State the desired backend directly in the prompt when you want to pin execution, for example: `use vice`, `vice: load this PRG`, `use c64u`, or `run this on hardware`.
34
+ When using the VS Code `C64` agent, keep the backend request in the same prompt so tool routing can call `c64_select_backend` before backend-specific operations.
35
+
36
+ ### Fast Discovery Rules
37
+
38
+ When the prompt is already specific and backend-pinned, execute the matching skill immediately instead of re-reading general documentation.
39
+ Example: `vice: write a small BASIC program that clears the screen and prints HELLO VICE` should route straight to `.github/skills/hello-world/SKILL.md` and use that skill's minimal path.
40
+ If the current agent cannot directly see `c64bridge` MCP tools such as `c64_program`, immediately hand the request to the `C64` agent instead of inspecting repository files or MCP manifests first.
41
+ For a visible single-backend VICE greeting, prefer a no-probe fast path and avoid screenshot capture or Binary Monitor verification unless the user explicitly requests confirmation artifacts.
42
+ Once the MCP server is connected and tools are available in-session, do not spend extra turns inspecting README sections or tool manifests for routine `c64_select_backend`, `c64_program`, or `c64_memory` operations.
43
+
28
44
  3) VS Code Copilot Chat (MCP)
29
45
 
30
46
  Add to Settings (JSON):
@@ -41,51 +57,58 @@ Add to Settings (JSON):
41
57
 
42
58
  Keep the server running; tools are discovered automatically in the chat session.
43
59
 
44
- ## MCP Discovery & Calling
60
+ 4) Shared agent instructions
45
61
 
46
- - Discover tools: use the client’s ListTools. You will see domains like `c64_program`, `c64_memory`, `c64_system`, etc., each with an `op` multiplexing parameter.
47
- - Discover resources/prompts: use ListResources and ListPrompts for knowledge and reusable patterns.
48
- - Call pattern (all tools): pass a JSON object with `op` plus operation‑specific inputs shown by ListTools.
62
+ `AGENTS.md` is the canonical cross-tool contract for this repository.
63
+ `CLAUDE.md` imports it for Claude Code, and Copilot/Codex-style agents can read it directly.
49
64
 
50
- Examples (MCP tool calls; HTTP only for illustration):
65
+ 5) Skill architecture
51
66
 
52
- ```json
53
- // c64_program — upload and run BASIC
54
- {
55
- "op": "upload_run_basic",
56
- "program": "10 PRINT \"HELLO\"\n20 GOTO 10"
57
- }
58
- ```
67
+ Execution logic lives only in `.github/skills/*/SKILL.md`.
68
+ Prompt files under `.github/prompts/` and MCP prompts from `src/prompts/registry.ts` are routing-only.
69
+ If a workflow description starts listing tool calls outside `.github/skills`, treat that as stale and move it into the matching skill.
59
70
 
60
- ```json
61
- // c64_memory — wait for output on the screen (ASCII)
62
- {
63
- "op": "wait_for_text",
64
- "pattern": "HELLO"
65
- }
66
- ```
71
+ ## MCP Discovery & Calling
67
72
 
68
- ```json
69
- // c64_rag — retrieve BASIC or ASM references from local knowledge
70
- {
71
- "op": "basic",
72
- "q": "draw a bouncing sprite"
73
- }
74
- ```
73
+ - Discover tools with the client’s ListTools.
74
+ - Discover resources and prompts with ListResources and ListPrompts.
75
+ - Use the matching skill in `.github/skills/` to decide the actual tool sequence, validation, and safety behavior.
76
+ - After discovery has already happened for the active session, prefer execution over repeated rediscovery for unambiguous requests.
77
+ - Treat `c64_program`, `c64_memory`, `c64_graphics`, `c64_sound`, `c64_system`, `c64_config`, `c64_rag`, `c64_extract`, and similar grouped MCP tools as discriminated unions: every direct call must include `op`.
78
+ - Never call a grouped tool with `{}` or with only secondary arguments. Choose the sub-operation first, then send `{ op: "...", ... }`.
79
+ - When a skill tells you to execute a grouped tool, copy the exact `op` string from the skill instead of inferring it from the tool name.
75
80
 
76
81
  ## Capabilities
77
82
 
78
83
  - Program runners: `c64_program` (`upload_run_basic`, `upload_run_asm`, `run_prg`, `run_crt`, `bundle_run`, `batch_run`)
84
+ - Fast demo workflow: `c64_program` (`cross_platform_greeting`) for one-call greetings on VICE and/or C64U with screenshot capture and verification
79
85
  - Screen & memory: `c64_memory` (`read`, `write`, `read_screen`, `wait_for_text`)
80
86
  - System control: `c64_system` (`pause`, `resume`, `reset`, `reboot`, `poweroff`, `menu`, tasks)
81
87
  - Configuration: `c64_config` (get/set, `batch_update`, `snapshot`, `restore`, `diff`, `shuffle`)
82
88
  - Drives & files: `c64_disk`, `c64_drive`
83
- - SID / music: `c64_sound` (playback, generate, analyze)
89
+ - SID / music: `c64_sound` (`play_preset`, playback, generate, analyze)
84
90
  - Graphics: `c64_graphics` (PETSCII, sprites)
85
91
  - Knowledge & RAG: `c64_rag` (BASIC and ASM lookups)
86
92
 
87
93
  Tools and parameters are listed dynamically via ListTools.
88
94
 
95
+ ## Skill Routing
96
+
97
+ | Intent | Skill |
98
+ | --- | --- |
99
+ | Ultra-fast hello world or smoke test | `.github/skills/hello-world/SKILL.md` |
100
+ | Quick visible greeting or smoke test | `.github/skills/cross-platform-demo/SKILL.md` |
101
+ | Custom BASIC program | `.github/skills/basic-program/SKILL.md` |
102
+ | Custom assembly routine | `.github/skills/assembly-program/SKILL.md` |
103
+ | SID demo or composition | `.github/skills/sid-music/SKILL.md` |
104
+ | Graphics workflow | `.github/skills/graphics-demo/SKILL.md` |
105
+ | Memory inspection or patching | `.github/skills/memory-debug/SKILL.md` |
106
+ | Disk and drive management | `.github/skills/drive-manager/SKILL.md` |
107
+ | Existing software launch | `.github/skills/software-launch/SKILL.md` |
108
+ | Printer workflow | `.github/skills/printer-job/SKILL.md` |
109
+ | Streaming workflow | `.github/skills/stream-control/SKILL.md` |
110
+ | Machine or config control | `.github/skills/system-control/SKILL.md` |
111
+
89
112
  ## Knowledge Resources
90
113
 
91
114
  Use ListResources to discover built-in knowledge, then read specific URIs to enrich context before coding:
@@ -100,34 +123,10 @@ Use ListResources to discover built-in knowledge, then read specific URIs to enr
100
123
 
101
124
  Pull RAG snippets via `c64_rag` (ops `basic`/`asm`) for targeted examples.
102
125
 
103
- ## Expert Workflow (recommended)
104
-
105
- - Plan → Run → Verify: generate code, run via `c64_program`, then verify with `c64_memory.read_screen`/`wait_for_text` and optional RAM checks.
106
- - Prefer stdio transport; only use the HTTP bridge for manual inspection.
107
- - Use `c64_rag` to fetch relevant BASIC/ASM snippets and specs before coding.
108
- - BASIC tips: tokenised keywords, short variable names, careful quoting; keep lines ≤ 2 screen rows; prefer `PRINT` with explicit spacing.
109
- - ASM tips: avoid unstable rasters; use zero page consciously; confirm register maps via `c64://specs/assembly`, `c64://specs/memory-map`, `c64://specs/vic` resources.
110
- - Safety: only call reset/power/drive operations intentionally; confirm preconditions for mounts/writes; log reversible steps in chat.
111
-
112
- Error handling patterns:
126
+ ## Operating Rule
113
127
 
114
- - If a run stalls, `c64_system.reset` then re-run; verify with `wait_for_text`.
115
- - On memory write validation failure, re-read with `c64_memory.read` and compare.
116
- - For long tasks, prefer background tasks (`c64_system.start_task`) and poll.
117
-
118
- ## HTTP Examples (optional)
119
-
120
- The stdio transport is preferred. The legacy HTTP bridge is deprecated and disabled by default; enable manually before using curl.
121
-
122
- ```bash
123
- curl -s -X POST -H 'Content-Type: application/json' \
124
- -d '{"op":"upload_run_basic","program":"10 PRINT \"HELLO\"\n20 GOTO 10"}' \
125
- http://localhost:8000/tools/c64_program | jq
126
-
127
- curl -s -X POST -H 'Content-Type: application/json' \
128
- -d '{"op":"read_screen"}' \
129
- http://localhost:8000/tools/c64_memory | jq
130
- ```
128
+ Prefer stdio transport end to end.
129
+ For execution details, follow the matching skill rather than duplicating tool steps in prompts, agent files, or ad hoc instructions.
131
130
 
132
131
  ## Safety Notes
133
132
 
@@ -140,9 +139,9 @@ Use these starting points to seed agent context. Templates live in `.github/prom
140
139
 
141
140
  | Persona | Focus | Starter prompt |
142
141
  | --- | --- | --- |
143
- | BASIC Agent | Commodore BASIC v2, PETSCII, simple I/O, printing | [.github/prompts/basic-program-session.prompt.md](.github/prompts/basic-program-session.prompt.md) |
142
+ | BASIC Agent | Commodore BASIC v2 and simple I/O | [.github/prompts/basic-program-session.prompt.md](.github/prompts/basic-program-session.prompt.md) |
144
143
  | ASM Agent | 6502/6510 assembly, raster, sprites, IRQs | [.github/prompts/assembly-routine-session.prompt.md](.github/prompts/assembly-routine-session.prompt.md) |
145
- | SID Composer | SID playback/composition, ADSR, waveforms | [.github/prompts/sid-music-session.prompt.md](.github/prompts/sid-music-session.prompt.md) |
146
- | Drive Manager | Disk images, drive modes, resets | [.github/prompts/drive-management-session.prompt.md](.github/prompts/drive-management-session.prompt.md) |
147
- | VIC Painter | PETSCII/bitmap art, sprites | [.github/prompts/petscii-art-session.prompt.md](.github/prompts/petscii-art-session.prompt.md) |
148
- | Memory Debugger | RAM inspection, screen/colour RAM checks | Use `c64_memory` tools + `c64://specs/memory-map` |
144
+ | SID Composer | SID playback and composition | [.github/prompts/sid-music-session.prompt.md](.github/prompts/sid-music-session.prompt.md) |
145
+ | Drive Manager | Disk images and drive state | [.github/prompts/drive-management-session.prompt.md](.github/prompts/drive-management-session.prompt.md) |
146
+ | VIC Painter | PETSCII, bitmap art, and sprites | [.github/prompts/petscii-art-session.prompt.md](.github/prompts/petscii-art-session.prompt.md) |
147
+ | Software Launcher | Existing PRG, CRT, or disk software | [.github/prompts/play-classic-game.prompt.md](.github/prompts/play-classic-game.prompt.md) |