c64bridge 1.0.6 → 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.
- package/.github/skills/assembly-program/SKILL.md +37 -0
- package/.github/skills/basic-program/SKILL.md +40 -0
- package/.github/skills/cross-platform-demo/SKILL.md +32 -0
- package/.github/skills/drive-manager/SKILL.md +33 -0
- package/.github/skills/graphics-demo/SKILL.md +30 -0
- package/.github/skills/hello-world/SKILL.md +36 -0
- package/.github/skills/memory-debug/SKILL.md +32 -0
- package/.github/skills/pr-converge/SKILL.md +33 -0
- package/.github/skills/printer-job/SKILL.md +30 -0
- package/.github/skills/sid-music/SKILL.md +35 -0
- package/.github/skills/software-launch/SKILL.md +31 -0
- package/.github/skills/stream-control/SKILL.md +29 -0
- package/.github/skills/system-control/SKILL.md +32 -0
- package/AGENTS.md +28 -7
- package/README.md +70 -15
- package/data/assembly/assembly-spec.md +2 -0
- package/dist/c64Client.js +238 -60
- package/dist/chargen.js +0 -4
- package/dist/config.js +53 -28
- package/dist/device.js +92 -37
- package/dist/diagnostics.js +66 -5
- package/dist/hostPaths.js +128 -0
- package/dist/logger.js +3 -2
- package/dist/loggingHttpClient.js +71 -2
- package/dist/mcp-server.js +416 -291
- package/dist/numericArg.js +55 -0
- package/dist/petscii.js +13 -6
- package/dist/platform.js +12 -3
- package/dist/prompts/registry.js +6 -1
- package/dist/redact.js +166 -0
- package/dist/tools/access.js +66 -0
- package/dist/tools/debug.js +6 -0
- package/dist/tools/developer.js +77 -36
- package/dist/tools/errors.js +54 -3
- package/dist/tools/input.js +25 -8
- package/dist/tools/machineControl.js +113 -21
- package/dist/tools/memory.js +135 -30
- package/dist/tools/meta/artifacts.js +5 -5
- package/dist/tools/meta/background.js +216 -54
- package/dist/tools/meta/compilation.js +6 -5
- package/dist/tools/meta/config.js +20 -10
- package/dist/tools/meta/configInventory.js +25 -2
- package/dist/tools/meta/diagnostics.js +2 -1
- package/dist/tools/meta/filesystem.js +16 -14
- package/dist/tools/meta/graphics.js +48 -20
- package/dist/tools/meta/memory.js +45 -19
- package/dist/tools/meta/program.js +10 -7
- package/dist/tools/meta/screen.js +116 -25
- package/dist/tools/pauseGuard.js +23 -0
- package/dist/tools/pollValidator.js +53 -8
- package/dist/tools/programRunners.js +62 -18
- package/dist/tools/registry/batch.js +17 -11
- package/dist/tools/registry/config.js +9 -2
- package/dist/tools/registry/disk.js +12 -2
- package/dist/tools/registry/drive.js +3 -0
- package/dist/tools/registry/extract.js +3 -0
- package/dist/tools/registry/graphics.js +59 -6
- package/dist/tools/registry/index.js +17 -1
- package/dist/tools/registry/memory.js +11 -1
- package/dist/tools/registry/platform.js +4 -1
- package/dist/tools/registry/printer.js +2 -1
- package/dist/tools/registry/program.js +5 -1
- package/dist/tools/registry/rag.js +1 -0
- package/dist/tools/registry/sound.js +12 -1
- package/dist/tools/registry/stream.js +2 -1
- package/dist/tools/registry/system.js +8 -1
- package/dist/tools/schema.js +7 -7
- package/dist/tools/streaming.js +34 -4
- package/dist/tools/translation/assembler.js +247 -24
- package/dist/tools/translation/basicDetokenizer.js +80 -0
- package/dist/tools/translation/basicTokenizer.js +8 -3
- package/dist/tools/translation/disassembler.js +14 -0
- package/dist/tools/types.js +258 -7
- package/dist/tools/vice.js +5 -16
- package/dist/vicBitmap.js +1 -1
- package/dist/vice/mockServer.js +3 -0
- package/dist/vice/process.js +19 -0
- package/dist/vice/resourcePolicy.js +36 -0
- package/dist/vice/viceClient.js +22 -5
- package/doc/vice/support-matrix.md +17 -11
- package/mcp/schemas/c64_batch.schema.json +2 -1
- package/mcp/schemas/c64_config.schema.json +33 -466
- package/mcp/schemas/c64_debug.schema.json +3 -602
- package/mcp/schemas/c64_disk.schema.json +17 -344
- package/mcp/schemas/c64_drive.schema.json +2 -157
- package/mcp/schemas/c64_extract.schema.json +10 -364
- package/mcp/schemas/c64_graphics.schema.json +19 -426
- package/mcp/schemas/c64_input.schema.json +5 -318
- package/mcp/schemas/c64_memory.schema.json +23 -491
- package/mcp/schemas/c64_printer.schema.json +3 -258
- package/mcp/schemas/c64_program.schema.json +16 -491
- package/mcp/schemas/c64_rag.schema.json +1 -81
- package/mcp/schemas/c64_select_backend.schema.json +2 -36
- package/mcp/schemas/c64_sound.schema.json +20 -822
- package/mcp/schemas/c64_stream.schema.json +4 -75
- package/mcp/schemas/c64_system.schema.json +28 -348
- package/mcp/schemas/c64_vice.schema.json +2 -71
- package/mcp/server.json +1 -1
- package/mcp/tools.json +1990 -6900
- package/mcp.json +21 -1
- package/package.json +19 -8
- package/scripts/mockC64Server.mjs +44 -0
- package/scripts/run-coverage.mjs +27 -1
- package/scripts/smoke-run.sh +3 -2
- package/scripts/start.mjs +23 -1
- package/server.json +53 -3
- package/dist/.tsbuildinfo +0 -1
- package/doc/agent-state-spec.md +0 -243
- package/doc/plans/bun/baseline-metrics.md +0 -16
- package/doc/plans/bun/migration-checklist.md +0 -55
- package/doc/plans/bun/migration.md +0 -83
- package/doc/plans/improve-knowledge/notes.md +0 -43
- package/doc/plans/improve-knowledge/plan.md +0 -121
- package/doc/plans/improve-knowledge/rollout.md +0 -110
- package/doc/plans/meta-tools/README.md +0 -110
- package/doc/plans/meta-tools/analysis.md +0 -272
- package/doc/plans/meta-tools/catalog.md +0 -435
- package/doc/plans/meta-tools/notes.md +0 -192
- package/doc/plans/meta-tools/rollout.md +0 -368
- package/doc/plans/prompts/README.md +0 -96
- package/doc/plans/prompts/user-prompt-ideas.md +0 -147
- package/doc/plans/tool-consolidation/notes.md +0 -28
- package/doc/plans/tool-consolidation/plan.md +0 -169
- package/doc/plans/tool-consolidation/rollout.md +0 -104
- package/doc/plans/vice-backend-switch/plan.md +0 -486
- package/doc/plans/vice-backend-switch-2/plan.md +0 -48
- package/doc/plans/vice-support/notes.md +0 -63
- package/doc/plans/vice-support/plan.md +0 -88
- package/doc/plans/vice-support/rollout.md +0 -99
- package/doc/reviews/audit.md +0 -143
- package/doc/reviews/hardening/01-fable/prompt-handover.md +0 -125
- package/doc/reviews/hardening/01-fable/prompt.md +0 -98
- package/doc/reviews/hardening/01-fable/review-prompt.md +0 -468
- package/doc/reviews/hardening/01-fable/review.md +0 -1234
- package/doc/reviews/vice-support-review.md +0 -185
- package/scripts/compare-rest/rest-compare-2025-11-01T00-25-21-830Z.json +0 -2513
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Knowledge Improvement Rollout Plan
|
|
2
|
-
|
|
3
|
-
Purpose: Execute the prioritized improvements captured in `doc/improve-knowledge/plan.md` so the MCP server delivers better grounding, creative defaults, and structured outputs. This rollout is written for an LLM operator; all tasks must be completed strictly in order with checkboxes ticked sequentially.
|
|
4
|
-
|
|
5
|
-
## Required Reading (complete before any checkbox work)
|
|
6
|
-
|
|
7
|
-
- `doc/improve-knowledge/plan.md` — Findings, recommendations, ranked shortlist.
|
|
8
|
-
- `doc/developer.md` — Contribution workflow, testing guidance.
|
|
9
|
-
- `README.md` (API section) — Current tool/resource surface to validate documentation updates.
|
|
10
|
-
- Target source files referenced per recommendation (see sections below).
|
|
11
|
-
|
|
12
|
-
## Operator Rules (follow for the entire rollout)
|
|
13
|
-
|
|
14
|
-
- Always process tasks exactly in the order listed. Do not tick a checkbox until all previous boxes in this document are ticked.
|
|
15
|
-
- After completing any checklist item, immediately run `npm run check`. Only proceed if it succeeds.
|
|
16
|
-
- If `npm run check` fails:
|
|
17
|
-
- Attempt a focused fix once.
|
|
18
|
-
- If still failing, revert the latest change, note the failure in a status log, and stop execution.
|
|
19
|
-
- Keep changes minimal and scoped to the current checklist item. Avoid refactors unless explicitly required.
|
|
20
|
-
- When implementing new behavior, update or add tests that cover the happy path and at least one failure/edge case.
|
|
21
|
-
- Update documentation in the same change when tool surfaces, schemas, or defaults shift.
|
|
22
|
-
- Respect hardware-affecting safeguards already in the codebase (pause/resume, timeouts, mutual exclusion).
|
|
23
|
-
|
|
24
|
-
## Global Implementation Template (apply for each improvement)
|
|
25
|
-
|
|
26
|
-
For every checklist item below, execute the following sub-steps in order (these sub-steps do not require additional checkboxes but must be followed):
|
|
27
|
-
|
|
28
|
-
1. Review the cited code paths and confirm dependencies are in place.
|
|
29
|
-
2. Draft minimal changes to satisfy the recommendation.
|
|
30
|
-
3. Extend or add tests covering the new behavior.
|
|
31
|
-
4. Update documentation, schemas, and TypeScript types as required.
|
|
32
|
-
5. Run `npm run check` and ensure it passes before ticking the item.
|
|
33
|
-
|
|
34
|
-
## Phase 0 — Rollout Initialization
|
|
35
|
-
|
|
36
|
-
- [x] Confirm all documents in “Required Reading” are reviewed and summarize key acceptance criteria from `doc/improve-knowledge/plan.md` in your working notes.
|
|
37
|
-
|
|
38
|
-
## Phase 1 — Retrieval & Knowledge Grounding (highest-priority shortlist items)
|
|
39
|
-
|
|
40
|
-
- [x] R1: Implement structured RAG results with URI, origin, and score metadata (`src/tools/rag.ts`, `src/rag/retriever.ts`, `src/rag/indexer.ts`). Ensure responses expose resource URIs compatible with `ReadResource`.
|
|
41
|
-
- [x] K1: Expose memory and IO documentation as MCP resources (`src/rag/knowledgeIndex.ts`, `src/mcp-server.ts`, `data/memory/*`, `data/io/*`). Add schema entries if needed.
|
|
42
|
-
- [x] K2: Publish SID best-practices as an accessible MCP resource (`data/sound/sid-programming-best-practices.md`, resource registry).
|
|
43
|
-
|
|
44
|
-
## Phase 2 — Creative Defaults & Validation
|
|
45
|
-
|
|
46
|
-
- [x] G1: Update `music_generate` defaults to triangle waveform with recommended ADSR profile; document the new “musical expression” preset (`src/tools/audio.ts`, `src/c64Client.ts`, best-practices doc). Preserve options to request legacy pulse behavior.
|
|
47
|
-
- [x] T1: Add automated tests verifying the new SID defaults (PAL/NTSC pitch accuracy and ADSR adherence) (`test/audioAnalysis.test.mjs` or adjacent suites).
|
|
48
|
-
|
|
49
|
-
## Phase 3 — MCP Surface Improvements
|
|
50
|
-
|
|
51
|
-
- [x] M2: Standardize structured JSON outputs for all program runners, including entry addresses, artifacts, and URIs while retaining human-readable summaries (`src/tools/programRunners.ts`, `src/tools/types.ts`).
|
|
52
|
-
- [x] M1: Remove the artificial dependency between `upload_run_basic` and `read_screen`, ensuring documentation reflects independent usage (`src/tools/memory.ts`, related docs or schemas).
|
|
53
|
-
|
|
54
|
-
## Phase 4 — Reproducibility & Packaging
|
|
55
|
-
|
|
56
|
-
> Implementation guardrails for S1
|
|
57
|
-
> • Base image must be `node:24-bookworm-slim` (or newer 24.x digest) to keep parity with local tooling.
|
|
58
|
-
> • Create a dedicated non-root user (e.g., `bridge`) with home `/app` and run the container as that user.
|
|
59
|
-
> • Copy `package.json`, `package-lock.json`, and `npm ci` during build before adding the rest of the repo to leverage caching.
|
|
60
|
-
> • Switch `WORKDIR` to `/app`, copy the code, and set `CMD ["npm","start"]`.
|
|
61
|
-
> • Ensure the container runs `npm start` without extra flags, reading configuration from env vars.
|
|
62
|
-
> • Update `README.md` (Containers section) and `doc/improve-knowledge/notes.md` with build/run examples (`docker build` / `docker run`).
|
|
63
|
-
> • Validate locally via `docker build` + `docker run --rm c64bridge:dev` before checking the box.
|
|
64
|
-
|
|
65
|
-
- [x] S1: Produce the reproducible container workflow described above, updating `Dockerfile`, README, and notes so future operators can rebuild and run the MCP server in that container.
|
|
66
|
-
- [x] S2: Replace license name and URL with SPDX identifier in structured RAG refs (ensure `origin`, `uri`, `spdxId` fields are present; map when possible) (`src/rag/indexer.ts`, `src/rag/retriever.ts`, `src/tools/rag.ts`).
|
|
67
|
-
- [x] D1: Add a concise “What changed” MCP summary to README/resource index after build; link the platform status resource (`README.md`, `src/mcp-server.ts`).
|
|
68
|
-
- [x] D2: Cross-link prompts to key resources (SID best-practices, VIC-II, PETSCII/charset quickrefs) for richer in-editor guidance (`src/prompts/registry.ts`).
|
|
69
|
-
|
|
70
|
-
## Phase 5 — Knowledge Exposure & Retrieval Enhancements
|
|
71
|
-
|
|
72
|
-
- [x] K3: Add “BASIC pitfalls” quickref and publish as MCP resource; link from BASIC runners (`data/basic/basic-pitfalls.md`, `src/rag/knowledgeIndex.ts`, `src/tools/programRunners.ts`).
|
|
73
|
-
- [x] K4: Publish PETSCII/charset quickrefs (char codes, glyph map) as MCP resources; dynamically generate Markdown table from `data/graphics/character-set.csv` (build-time or runtime) to avoid duplicate sources (`src/rag/knowledgeIndex.ts`).
|
|
74
|
-
- [x] K5: Publish VIC-II register quickref as MCP resource and ensure graphics tools reference it (`data/graphics/vic-spec.md`, `src/tools/graphics.ts`).
|
|
75
|
-
- [x] R2: Include bundle/resource URIs in RAG results when matches originate from docs (`src/rag/retriever.ts`, `src/tools/rag.ts`).
|
|
76
|
-
- [x] R3: Add retrieval diversity and simple duplicate suppression in top-K (`src/rag/retriever.ts`).
|
|
77
|
-
- [x] M5: Add PAL/NTSC-sensitive tags to relevant tools (SID, graphics) to nudge system-awareness (`src/tools/audio.ts`, `src/tools/graphics.ts`).
|
|
78
|
-
- [x] M4: Audit remaining tools for validation messages and examples; bring to parity (`src/tools/*`).
|
|
79
|
-
- [x] T2: Add e2e test for `rag_retrieve_*` verifying structured refs open via `ReadResource` (`test/rag.test.mjs`).
|
|
80
|
-
|
|
81
|
-
## Phase 6 — Creative Surface: Graphics & SID Workflows
|
|
82
|
-
|
|
83
|
-
- [x] G2: Auto-detect or remind PAL/NTSC context for `sid_note_on`; reflect in metadata (`src/c64Client.ts`, `src/tools/audio.ts`).
|
|
84
|
-
- [x] G3: Include PRG metadata (entry addresses, bytes) in program runners’ structured outputs (`src/tools/programRunners.ts`).
|
|
85
|
-
- [x] G4: Ensure PETSCII structured outputs and docs highlight selected glyphs/codes and miniature preview (`src/tools/graphics.ts`, docs).
|
|
86
|
-
- [x] G5: Document PETSCII style presets (contrast, dithering, palette) and link from prompts (`src/prompts/registry.ts`, docs under `data/graphics/`).
|
|
87
|
-
- [ ] G6: Add hires bitmap PRG generator tool and document a minimal usage flow (`src/tools/graphics.ts`, `test/graphicsModule.test.mjs`).
|
|
88
|
-
- [x] K6: Add “Sprite & Charset workflows best-practices” document and expose as resource (`data/graphics/sprite-charset-best-practices.md`, `src/rag/knowledgeIndex.ts`).
|
|
89
|
-
- [x] T4: Add PETSCII generation e2e test verifying preview fields and PRG execution (`test/graphicsModule.test.mjs`).
|
|
90
|
-
- [x] T5: Add sprite preview PRG test (bytes copied, coords/colour applied, screen captured) (`test/graphicsModule.test.mjs`).
|
|
91
|
-
|
|
92
|
-
## Done Definition (before ticking any item)
|
|
93
|
-
|
|
94
|
-
Only tick a checkbox when all of the following are true for that item:
|
|
95
|
-
|
|
96
|
-
- TypeScript compilation succeeds with no new errors.
|
|
97
|
-
- All new or updated tests pass locally.
|
|
98
|
-
- `npm run check` has been executed successfully immediately after the change.
|
|
99
|
-
- Relevant documentation and schemas reflect the change.
|
|
100
|
-
- No subsequent checklist item has been started.
|
|
101
|
-
|
|
102
|
-
## Notes on Sequencing
|
|
103
|
-
|
|
104
|
-
- If a task reveals a missing prerequisite not covered earlier, pause, document the gap, and stop instead of reordering tasks.
|
|
105
|
-
- Within each phase, tasks are intentionally ordered by dependency and impact; do not parallelize or skip.
|
|
106
|
-
|
|
107
|
-
## Post-Rollout Wrap-Up (perform after all checkboxes are ticked)
|
|
108
|
-
|
|
109
|
-
- Document a short retrospective (location of your choice) summarizing lessons learned, remaining risks, and follow-up candidates that were out of scope.
|
|
110
|
-
- Share the retrospective with maintainers alongside the final change set.
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Meta Tools Documentation
|
|
2
|
-
|
|
3
|
-
This folder contains documentation for c64bridge meta tools — high-level orchestration tools that compose multiple MCP operations into single, stateful workflows.
|
|
4
|
-
|
|
5
|
-
## Documents
|
|
6
|
-
|
|
7
|
-
- **[catalog.md](catalog.md)** — Comprehensive catalog of all meta tools with detailed specifications, effort/benefit analysis, and dependency matrix
|
|
8
|
-
- **[rollout.md](rollout.md)** — Implementation checklist with phases, dependencies, and done criteria for executing the meta tools rollout
|
|
9
|
-
- **[analysis.md](analysis.md)** — Impact analysis and prioritization rationale; explains why tools are ordered as they are based on agent effectiveness
|
|
10
|
-
- **[notes.md](notes.md)** — Implementation notes, observations, lessons learned, and technical decisions
|
|
11
|
-
|
|
12
|
-
## Quick Overview
|
|
13
|
-
|
|
14
|
-
### What are Meta Tools?
|
|
15
|
-
|
|
16
|
-
Meta tools reduce round-trips between client and server by bundling multiple REST/MCP calls into single, stateful operations with agent-side state management (snapshots, buffers, registries, etc.).
|
|
17
|
-
|
|
18
|
-
### Current Status
|
|
19
|
-
|
|
20
|
-
**Implemented (Phase 0-2a quick wins)**:
|
|
21
|
-
|
|
22
|
-
- Foundation tools (Phase 0): firmware health checks, screen polling, memory verification, background tasks
|
|
23
|
-
- Orchestration (Phase 1): program shuffle, batch assertions, artifact bundling, compile-run-verify cycles
|
|
24
|
-
- Quick wins (Phase 2a): find-and-run program by name, silence-and-verify SID output, filesystem stats by extension
|
|
25
|
-
|
|
26
|
-
**Not Implemented (~60 tools)**: See catalog.md for full list
|
|
27
|
-
|
|
28
|
-
### Implementation Priority (New Reprioritization)
|
|
29
|
-
|
|
30
|
-
See [analysis.md](analysis.md) for detailed rationale.
|
|
31
|
-
|
|
32
|
-
**Phase 2a — Quick Wins** (~3.4 hours, high impact):
|
|
33
|
-
|
|
34
|
-
1. `find_and_run_program_by_name` — Find and run programs in disk collections
|
|
35
|
-
2. `silence_and_verify` — SID testing foundation
|
|
36
|
-
3. `filesystem_stats_by_extension` — Understand file collections
|
|
37
|
-
4. `music_compile_play_analyze` — Complete music workflow
|
|
38
|
-
|
|
39
|
-
**Phase 2b — Graphics & Extraction** (~3.3 hours):
|
|
40
|
-
|
|
41
|
-
- Extract sprites and character sets from RAM
|
|
42
|
-
- Reliable drive mounting
|
|
43
|
-
|
|
44
|
-
**Phase 2c — Advanced Features**: Classification, timelines, parameter sweeps, memory diffing
|
|
45
|
-
|
|
46
|
-
**Phase 3 — Container Management**: Classify PRG types, deduplication
|
|
47
|
-
|
|
48
|
-
**Phase 4 — Additional Orchestration**: Developer loops, RAG-coupled tools
|
|
49
|
-
|
|
50
|
-
**Phase 5 — Debug Streaming** (Post-GA, requires ~72 hours of infrastructure):
|
|
51
|
-
|
|
52
|
-
- Assembly verification, IRQ validation, bus tracing
|
|
53
|
-
- Deferred until UDP ingest pipeline is ready
|
|
54
|
-
|
|
55
|
-
## Key Insights from Analysis
|
|
56
|
-
|
|
57
|
-
1. **Filesystem navigation is critical** — Agents struggle to find programs in disk collections; `find_and_run_program_by_name` is the #1 priority
|
|
58
|
-
2. **SID testing needs proper silence verification** — Quick win that unblocks music composition
|
|
59
|
-
3. **Debug streaming is valuable but complex** — Requires UDP infrastructure; better to ship simpler high-value features first
|
|
60
|
-
4. **Graphics extraction has broad appeal** — Sprite/charset extraction enables creative reuse
|
|
61
|
-
|
|
62
|
-
## For Implementers
|
|
63
|
-
|
|
64
|
-
Start with [rollout.md](rollout.md) which provides:
|
|
65
|
-
|
|
66
|
-
- Required reading list
|
|
67
|
-
- Operator rules (process strictly in order, run tests after each change)
|
|
68
|
-
- Global implementation template
|
|
69
|
-
- Phase-by-phase checklists with dependencies
|
|
70
|
-
|
|
71
|
-
Each meta tool entry includes:
|
|
72
|
-
|
|
73
|
-
- Priority ranking
|
|
74
|
-
- Effort estimate (minutes)
|
|
75
|
-
- Benefit level (high/medium/low)
|
|
76
|
-
- Dependencies
|
|
77
|
-
- Implementation notes
|
|
78
|
-
- REST endpoints used
|
|
79
|
-
|
|
80
|
-
## For Users
|
|
81
|
-
|
|
82
|
-
See [catalog.md](catalog.md) for:
|
|
83
|
-
|
|
84
|
-
- Tool purpose and use cases
|
|
85
|
-
- Agent-managed state
|
|
86
|
-
- Underlying REST/MCP operations
|
|
87
|
-
- Expected behavior
|
|
88
|
-
|
|
89
|
-
## Architecture
|
|
90
|
-
|
|
91
|
-
Meta tools live in `src/tools/meta/` with submodules:
|
|
92
|
-
|
|
93
|
-
- `diagnostics.ts` — Health checks, firmware info
|
|
94
|
-
- `screen.ts` — Screen polling, text matching
|
|
95
|
-
- `memory.ts` — Memory dumps, verification, diffs
|
|
96
|
-
- `background.ts` — Background task scheduling
|
|
97
|
-
- `filesystem.ts` — File discovery, stats
|
|
98
|
-
- `config.ts` — Configuration snapshots
|
|
99
|
-
- `program.ts` — Program orchestration
|
|
100
|
-
- `artifacts.ts` — Artifact bundling
|
|
101
|
-
- `compilation.ts` — Build-test cycles
|
|
102
|
-
|
|
103
|
-
All meta tools are marked as experimental and exposed through the standard MCP tool registry.
|
|
104
|
-
|
|
105
|
-
## Related Documentation
|
|
106
|
-
|
|
107
|
-
- `doc/agent-state-spec.md` — Background task registry specification
|
|
108
|
-
- `doc/developer.md` — Architecture overview and contribution guidelines
|
|
109
|
-
- `doc/improve-knowledge/` — Similar documentation structure pattern
|
|
110
|
-
- `src/tools/meta/` — Implementation source code
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
# Meta Tools Impact Analysis
|
|
2
|
-
|
|
3
|
-
Purpose: Analyze unimplemented meta tools to identify high-impact, low-effort candidates that will most improve agent capabilities for BASIC/ASM coding, graphics generation, SID music composition, and C64 filesystem navigation.
|
|
4
|
-
|
|
5
|
-
## Current Implementation Status
|
|
6
|
-
|
|
7
|
-
### Implemented (Phases 0-2a quick wins)
|
|
8
|
-
|
|
9
|
-
- ✅ `firmware_info_and_healthcheck` — Verify firmware readiness
|
|
10
|
-
- ✅ `wait_for_screen_text` — Poll screen for text/regex matches
|
|
11
|
-
- ✅ `verify_and_write_memory` — Safe memory write with verification
|
|
12
|
-
- ✅ `start_background_task`, `stop_background_task`, `list_background_tasks`, `stop_all_background_tasks` — Background task orchestration
|
|
13
|
-
- ✅ `find_paths_by_name` — Container-aware file discovery
|
|
14
|
-
- ✅ `memory_dump_to_file` — Export memory ranges to files
|
|
15
|
-
- ✅ `config_snapshot_and_restore` — Configuration backup/restore
|
|
16
|
-
- ✅ `program_shuffle` — Run multiple programs sequentially
|
|
17
|
-
- ✅ `batch_run_with_assertions` — Run programs with validation
|
|
18
|
-
- ✅ `bundle_run_artifacts` — Collect run artifacts
|
|
19
|
-
- ✅ `compile_run_verify_cycle` — Complete build-test cycle
|
|
20
|
-
- ✅ `find_and_run_program_by_name` — Discover and run programs by substring
|
|
21
|
-
- ✅ `silence_and_verify` — SID silence guard/verification workflow
|
|
22
|
-
- ✅ `filesystem_stats_by_extension` — Filesystem and container stats aggregation
|
|
23
|
-
|
|
24
|
-
### Not Implemented: ~60 tools across multiple domains
|
|
25
|
-
|
|
26
|
-
## Impact Analysis for Agent Capabilities
|
|
27
|
-
|
|
28
|
-
### 1. C64 Filesystem Navigation & Program Discovery (CRITICAL)
|
|
29
|
-
|
|
30
|
-
**Problem**: Agents struggle to find and run programs in large C64 file collections (D64/D71/D81/T64 images)
|
|
31
|
-
|
|
32
|
-
**High-Impact Tools**:
|
|
33
|
-
|
|
34
|
-
- **`find_and_run_program_by_name`** ⭐⭐⭐⭐⭐ (Effort: 45min, Benefit: HIGH)
|
|
35
|
-
- Impact: Enables agents to search entire filesystem and run programs by name
|
|
36
|
-
- Use cases: "Run Archon from my games collection", "Load the demo called Boulder"
|
|
37
|
-
- Dependencies: `find_paths_by_name` (✅ implemented)
|
|
38
|
-
- **PRIORITY: #1** — Essential for effective C64 interaction
|
|
39
|
-
|
|
40
|
-
- **`filesystem_stats_by_extension`** ⭐⭐⭐ (Effort: 35min, Benefit: MEDIUM)
|
|
41
|
-
- Impact: Helps agents understand file collections and provide insights
|
|
42
|
-
- Use cases: "How many games do I have?", "List all PRG files"
|
|
43
|
-
- Dependencies: None
|
|
44
|
-
- **PRIORITY: #3** — Good context for navigation
|
|
45
|
-
|
|
46
|
-
- **`classify_prg_basic_or_mc`** ⭐⭐⭐ (Effort: 45min, Benefit: MEDIUM)
|
|
47
|
-
- Impact: Distinguishes BASIC from machine code programs
|
|
48
|
-
- Use cases: Better error messages, appropriate testing strategies
|
|
49
|
-
- Dependencies: `container_aware_walk_and_classify`
|
|
50
|
-
- **PRIORITY: #8** — Useful but not urgent
|
|
51
|
-
|
|
52
|
-
### 2. Graphics Generation & Extraction (HIGH)
|
|
53
|
-
|
|
54
|
-
**Problem**: Agents need better tools to create, manipulate, and extract C64 graphics
|
|
55
|
-
|
|
56
|
-
**High-Impact Tools**:
|
|
57
|
-
|
|
58
|
-
- **`extract_sprites_from_ram`** ⭐⭐⭐⭐ (Effort: 80min, Benefit: MEDIUM)
|
|
59
|
-
- Impact: Extract sprites from running programs for analysis/reuse
|
|
60
|
-
- Use cases: "Show me the sprites from this game", sprite library building
|
|
61
|
-
- Dependencies: `memory_dump_to_file` (✅ implemented)
|
|
62
|
-
- **PRIORITY: #5** — Moderate effort, good payoff for graphics work
|
|
63
|
-
|
|
64
|
-
- **`rip_charset_from_ram`** ⭐⭐⭐⭐ (Effort: 75min, Benefit: MEDIUM)
|
|
65
|
-
- Impact: Extract custom character sets for reuse/study
|
|
66
|
-
- Use cases: Font library creation, PETSCII art analysis
|
|
67
|
-
- Dependencies: `memory_dump_to_file` (✅ implemented)
|
|
68
|
-
- **PRIORITY: #6** — Similar to sprites, good for graphics
|
|
69
|
-
|
|
70
|
-
- **`screen_capture_timeline`** ⭐⭐⭐ (Effort: 50min, Benefit: MEDIUM)
|
|
71
|
-
- Impact: Record program execution over time
|
|
72
|
-
- Use cases: Demo capture, animation analysis, debugging
|
|
73
|
-
- Dependencies: `wait_for_screen_text` (✅ implemented)
|
|
74
|
-
- **PRIORITY: #9** — Nice to have but lower urgency
|
|
75
|
-
|
|
76
|
-
### 3. SID Music & Audio (HIGH)
|
|
77
|
-
|
|
78
|
-
**Problem**: Agents need better workflows for creating and testing SID music
|
|
79
|
-
|
|
80
|
-
**High-Impact Tools**:
|
|
81
|
-
|
|
82
|
-
- **`silence_and_verify`** ⭐⭐⭐⭐⭐ (Effort: 35min, Benefit: HIGH)
|
|
83
|
-
- Impact: Essential for reliable SID testing and music composition
|
|
84
|
-
- Use cases: Verify silence before playing, clean state for tests
|
|
85
|
-
- Dependencies: None
|
|
86
|
-
- **PRIORITY: #2** — Quick win, high value for music work
|
|
87
|
-
|
|
88
|
-
- **`music_compile_play_analyze`** ⭐⭐⭐⭐ (Effort: 90min, Benefit: HIGH)
|
|
89
|
-
- Impact: Complete music development workflow in one tool
|
|
90
|
-
- Use cases: "Create a C major scale and verify it plays correctly"
|
|
91
|
-
- Dependencies: `silence_and_verify`
|
|
92
|
-
- **PRIORITY: #4** — After silence_and_verify, excellent workflow tool
|
|
93
|
-
|
|
94
|
-
- **`sid_param_sweep`** ⭐⭐⭐ (Effort: 90min, Benefit: MEDIUM)
|
|
95
|
-
- Impact: Experiment with SID parameters systematically
|
|
96
|
-
- Use cases: Find best ADSR settings, explore waveforms
|
|
97
|
-
- Dependencies: `silence_and_verify`
|
|
98
|
-
- **PRIORITY: #10** — Advanced feature, implement later
|
|
99
|
-
|
|
100
|
-
### 4. Debug Streaming & Assembly Verification (COMPLEX)
|
|
101
|
-
|
|
102
|
-
**Problem**: Verifying assembly execution requires debug stream integration
|
|
103
|
-
|
|
104
|
-
**High-Impact Tools** (all require infrastructure):
|
|
105
|
-
|
|
106
|
-
- **`debug_stream_watch`** ⭐⭐⭐⭐⭐ (Effort: 55min, Benefit: MEDIUM)
|
|
107
|
-
- Impact: Foundation for all debug streaming features
|
|
108
|
-
- Use cases: Monitor CPU/VIC/1541 activity
|
|
109
|
-
- Dependencies: UDP ingest pipeline (NOT YET IMPLEMENTED)
|
|
110
|
-
- **PRIORITY: Post-GA** — Requires infrastructure work first
|
|
111
|
-
|
|
112
|
-
- **`debug_loop_run_and_capture`** ⭐⭐⭐⭐⭐ (Effort: 80min, Benefit: HIGH)
|
|
113
|
-
- Impact: Verify assembly programs by comparing expected vs actual execution
|
|
114
|
-
- Use cases: "Did my IRQ handler fire correctly?", "Verify timing"
|
|
115
|
-
- Dependencies: `debug_stream_watch` + infrastructure
|
|
116
|
-
- **PRIORITY: Post-GA** — Very valuable but infrastructure-gated
|
|
117
|
-
|
|
118
|
-
- **`verify_raster_irq_line`** ⭐⭐⭐⭐ (Effort: 70min, Benefit: HIGH)
|
|
119
|
-
- Impact: Critical for graphics programming verification
|
|
120
|
-
- Use cases: Validate IRQ setup in demos and games
|
|
121
|
-
- Dependencies: `debug_loop_run_and_capture`
|
|
122
|
-
- **PRIORITY: Post-GA** — Excellent feature but requires debug foundation
|
|
123
|
-
|
|
124
|
-
**Note**: All debug streaming tools are marked Post-GA because they require:
|
|
125
|
-
|
|
126
|
-
- UDP packet ingest pipeline with backpressure handling
|
|
127
|
-
- Sampling/windowing for high-rate streams
|
|
128
|
-
- Performance validation via load tests
|
|
129
|
-
- Observability infrastructure
|
|
130
|
-
|
|
131
|
-
### 5. Drive & Filesystem Management (MEDIUM)
|
|
132
|
-
|
|
133
|
-
**High-Impact Tools**:
|
|
134
|
-
|
|
135
|
-
- **`drive_mount_and_verify`** ⭐⭐⭐ (Effort: 45min, Benefit: MEDIUM)
|
|
136
|
-
- Impact: Reliable drive mounting with retry logic
|
|
137
|
-
- Use cases: Mount disk images for program loading
|
|
138
|
-
- Dependencies: `firmware_info_and_healthcheck` (✅ implemented)
|
|
139
|
-
- **PRIORITY: #7** — Good utility, implement after higher priorities
|
|
140
|
-
|
|
141
|
-
- **`create_and_mount_blank_d64`** ⭐⭐ (Effort: 35min, Benefit: MEDIUM)
|
|
142
|
-
- Impact: Create working disks for file operations
|
|
143
|
-
- Use cases: Save programs, create disk collections
|
|
144
|
-
- Dependencies: `drive_mount_and_verify`
|
|
145
|
-
- **PRIORITY: #11** — Lower priority, niche use case
|
|
146
|
-
|
|
147
|
-
### 6. Memory & Disassembly (MEDIUM)
|
|
148
|
-
|
|
149
|
-
**High-Impact Tools**:
|
|
150
|
-
|
|
151
|
-
- **`memory_snapshot_and_diff`** ⭐⭐⭐⭐ (Effort: 50min, Benefit: HIGH)
|
|
152
|
-
- Impact: Debug memory changes during program execution
|
|
153
|
-
- Use cases: "What changed after running this?", reverse engineering
|
|
154
|
-
- Dependencies: `memory_dump_to_file` (✅ implemented)
|
|
155
|
-
- **PRIORITY: #12** — Useful for advanced debugging
|
|
156
|
-
|
|
157
|
-
- **`disassemble_ram_region`** ⭐⭐⭐ (Effort: 60min, Benefit: MEDIUM)
|
|
158
|
-
- Impact: Understand machine code in memory
|
|
159
|
-
- Use cases: Reverse engineering, learning assembly
|
|
160
|
-
- Dependencies: None (agent-side disassembler)
|
|
161
|
-
- **PRIORITY: #13** — Nice to have, not urgent
|
|
162
|
-
|
|
163
|
-
## Reprioritized Rollout Order
|
|
164
|
-
|
|
165
|
-
Based on impact analysis focusing on:
|
|
166
|
-
|
|
167
|
-
1. **Immediate agent effectiveness** (find and run programs, compose music)
|
|
168
|
-
2. **Low-hanging fruit** (small effort, high impact)
|
|
169
|
-
3. **Foundation for future work** (enables other tools)
|
|
170
|
-
4. **Deferring complex infrastructure** (debug streaming to Post-GA)
|
|
171
|
-
|
|
172
|
-
### New High-Priority Sequence
|
|
173
|
-
|
|
174
|
-
#### Quick Wins (Phase 2a — High Impact, Low Effort)
|
|
175
|
-
|
|
176
|
-
1. **`find_and_run_program_by_name`** (45min) — Enables program discovery
|
|
177
|
-
2. **`silence_and_verify`** (35min) — Essential for SID work
|
|
178
|
-
3. **`filesystem_stats_by_extension`** (35min) — Context for file operations
|
|
179
|
-
4. **`music_compile_play_analyze`** (90min) — Complete music workflow
|
|
180
|
-
|
|
181
|
-
#### Graphics & Extraction (Phase 2b — Medium Effort, High Value)
|
|
182
|
-
|
|
183
|
-
1. **`extract_sprites_from_ram`** (80min) — Graphics extraction
|
|
184
|
-
2. **`rip_charset_from_ram`** (75min) — Character set extraction
|
|
185
|
-
3. **`drive_mount_and_verify`** (45min) — Reliable disk handling
|
|
186
|
-
|
|
187
|
-
#### Advanced Features (Phase 2c — Lower Priority)
|
|
188
|
-
|
|
189
|
-
1. **`classify_prg_basic_or_mc`** (45min) — Program classification
|
|
190
|
-
2. **`screen_capture_timeline`** (50min) — Timeline recording
|
|
191
|
-
3. **`sid_param_sweep`** (90min) — SID experimentation
|
|
192
|
-
4. **`create_and_mount_blank_d64`** (35min) — Disk creation
|
|
193
|
-
5. **`memory_snapshot_and_diff`** (50min) — Memory comparison
|
|
194
|
-
6. **`disassemble_ram_region`** (60min) — Disassembly
|
|
195
|
-
|
|
196
|
-
#### Container & Classification (Phase 3 — When Filesystem Work Needed)
|
|
197
|
-
|
|
198
|
-
- **`container_aware_walk_and_classify`** (60min)
|
|
199
|
-
- **`dedup_scan`** (60min)
|
|
200
|
-
- **`dedup_plan_and_apply`** (75min)
|
|
201
|
-
|
|
202
|
-
#### Debug Streaming (Phase 5 — Post Infrastructure)
|
|
203
|
-
|
|
204
|
-
- All debug stream tools deferred until UDP infrastructure is ready
|
|
205
|
-
- These are high-value but require significant foundation work
|
|
206
|
-
|
|
207
|
-
## Key Insights
|
|
208
|
-
|
|
209
|
-
### Why This Order?
|
|
210
|
-
|
|
211
|
-
1. **`find_and_run_program_by_name` is #1** because it's the most requested feature — agents need to find programs in disk collections. Without this, users must manually locate files.
|
|
212
|
-
|
|
213
|
-
2. **`silence_and_verify` is #2** because it's a quick win (35min) that unblocks all SID testing and music composition work. Currently, SID tests can be flaky without proper silence verification.
|
|
214
|
-
|
|
215
|
-
3. **Graphics tools (#5-6)** are grouped together because they share similar patterns (RAM scanning, pattern detection, export). Implementing them consecutively leverages shared code.
|
|
216
|
-
|
|
217
|
-
4. **Debug streaming deferred** because it needs infrastructure (UDP pipeline, backpressure, performance testing) that would take weeks to implement properly. Better to ship other high-value features first.
|
|
218
|
-
|
|
219
|
-
### Impact on Agent Capabilities
|
|
220
|
-
|
|
221
|
-
After implementing the Phase 2a quick wins, agents will be able to:
|
|
222
|
-
|
|
223
|
-
- ✅ Find and run any program in a C64 file collection by name
|
|
224
|
-
- ✅ Reliably test SID music with proper silence verification
|
|
225
|
-
- ✅ Understand file collection contents and statistics
|
|
226
|
-
- ✅ Create and verify complete music compositions in one workflow
|
|
227
|
-
|
|
228
|
-
After Phase 2b graphics tools:
|
|
229
|
-
|
|
230
|
-
- ✅ Extract sprites and character sets from running programs
|
|
231
|
-
- ✅ Build reusable graphics libraries
|
|
232
|
-
- ✅ Analyze and learn from existing C64 graphics
|
|
233
|
-
|
|
234
|
-
### ROI Summary
|
|
235
|
-
|
|
236
|
-
**Top 4 Quick Wins (Phase 2a)**: ~205 minutes (3.4 hours)
|
|
237
|
-
|
|
238
|
-
- Unlocks: Program discovery, music composition, file navigation
|
|
239
|
-
- Impact: Transforms agent from "follow instructions" to "find and create"
|
|
240
|
-
|
|
241
|
-
**Graphics Suite (Phase 2b)**: ~200 minutes (3.3 hours)
|
|
242
|
-
|
|
243
|
-
- Unlocks: Sprite/charset extraction, graphics analysis
|
|
244
|
-
- Impact: Enables graphics-focused workflows
|
|
245
|
-
|
|
246
|
-
**Total High-Priority Work**: ~6.7 hours for 11 tools
|
|
247
|
-
|
|
248
|
-
- Massive improvement in agent capabilities
|
|
249
|
-
- All low-risk (no infrastructure dependencies)
|
|
250
|
-
- Clear, testable outcomes
|
|
251
|
-
|
|
252
|
-
### Deferred Work: Debug Streaming
|
|
253
|
-
|
|
254
|
-
Debug streaming tools (Phase 5) are incredibly valuable but require:
|
|
255
|
-
|
|
256
|
-
- UDP packet ingest infrastructure (~40 hours)
|
|
257
|
-
- Performance validation (~8 hours)
|
|
258
|
-
- Observability & monitoring (~8 hours)
|
|
259
|
-
- Integration testing (~16 hours)
|
|
260
|
-
|
|
261
|
-
**Total infrastructure: ~72 hours** before first debug tool can ship (see `rollout.md` Phase 5 for detailed breakdown)
|
|
262
|
-
|
|
263
|
-
**Decision**: Ship high-value, low-complexity features first (Phases 2a-3), then revisit debug streaming as a separate project with dedicated infrastructure sprint.
|
|
264
|
-
|
|
265
|
-
## Recommendations
|
|
266
|
-
|
|
267
|
-
1. **Immediate**: Implement Phase 2a (quick wins) in next sprint
|
|
268
|
-
2. **Near-term**: Follow with Phase 2b (graphics) when graphics work is prioritized
|
|
269
|
-
3. **Medium-term**: Phase 2c and Phase 3 tools as needed based on user feedback
|
|
270
|
-
4. **Long-term**: Plan debug streaming infrastructure project, then implement Phase 5
|
|
271
|
-
|
|
272
|
-
This prioritization maximizes near-term agent effectiveness while deferring complex infrastructure work that would block faster progress.
|