diff --git a/skills/6510-assembly/SKILL.md b/.claude/skills/6510-assembly/SKILL.md similarity index 100% rename from skills/6510-assembly/SKILL.md rename to .claude/skills/6510-assembly/SKILL.md diff --git a/skills/basic-programming/SKILL.md b/.claude/skills/basic-programming/SKILL.md similarity index 100% rename from skills/basic-programming/SKILL.md rename to .claude/skills/basic-programming/SKILL.md diff --git a/skills/compiler-design/SKILL.md b/.claude/skills/compiler-design/SKILL.md similarity index 100% rename from skills/compiler-design/SKILL.md rename to .claude/skills/compiler-design/SKILL.md diff --git a/skills/disk-io-1541/SKILL.md b/.claude/skills/disk-io-1541/SKILL.md similarity index 100% rename from skills/disk-io-1541/SKILL.md rename to .claude/skills/disk-io-1541/SKILL.md diff --git a/skills/graphics-vic2/SKILL.md b/.claude/skills/graphics-vic2/SKILL.md similarity index 100% rename from skills/graphics-vic2/SKILL.md rename to .claude/skills/graphics-vic2/SKILL.md diff --git a/skills/interrupts/SKILL.md b/.claude/skills/interrupts/SKILL.md similarity index 100% rename from skills/interrupts/SKILL.md rename to .claude/skills/interrupts/SKILL.md diff --git a/skills/kernal-routines/SKILL.md b/.claude/skills/kernal-routines/SKILL.md similarity index 100% rename from skills/kernal-routines/SKILL.md rename to .claude/skills/kernal-routines/SKILL.md diff --git a/skills/memory-map/SKILL.md b/.claude/skills/memory-map/SKILL.md similarity index 100% rename from skills/memory-map/SKILL.md rename to .claude/skills/memory-map/SKILL.md diff --git a/skills/powerc/SKILL.md b/.claude/skills/powerc/SKILL.md similarity index 98% rename from skills/powerc/SKILL.md rename to .claude/skills/powerc/SKILL.md index 5710380..071ec1c 100644 --- a/skills/powerc/SKILL.md +++ b/.claude/skills/powerc/SKILL.md @@ -14,7 +14,7 @@ description: > Power C is a disk-based native-code C compiler. Everything runs from a Shell (`$` prompt) on the disk image `reference/POWERc.d81`. For emulator mechanics -(keybuf, warp, screenshots) load `skills/vice-emulator/SKILL.md`; this skill is +(keybuf, warp, screenshots) load `.claude/skills/vice-emulator/SKILL.md`; this skill is the C side. ## Language: what to write @@ -215,7 +215,7 @@ x64sc -autostart "work.d81:squares" -autostart-warp Work on a **copy** of `reference/POWERc.d81` (`examples/powerc-work.d81`); VICE writes persist. Scripts: `examples/powerc-ced.bat`, `examples/powerc-build.bat`. -Full emulator details are in `skills/vice-emulator/SKILL.md` +Full emulator details are in `.claude/skills/vice-emulator/SKILL.md` ("Automating Disk-Based Tools"). ## Pitfalls checklist diff --git a/skills/sound-sid/SKILL.md b/.claude/skills/sound-sid/SKILL.md similarity index 100% rename from skills/sound-sid/SKILL.md rename to .claude/skills/sound-sid/SKILL.md diff --git a/skills/vice-emulator/SKILL.md b/.claude/skills/vice-emulator/SKILL.md similarity index 100% rename from skills/vice-emulator/SKILL.md rename to .claude/skills/vice-emulator/SKILL.md diff --git a/AGENTS.md b/AGENTS.md index 2a271d9..5a88841 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,23 +9,23 @@ ## How to Use This Knowledge Base -This repository contains structured skills and reference material for developing software on the Commodore 64. Each subdirectory under `skills/` is a self-contained topic skill. When answering a C64 development question, consult the most relevant skill first, then cross-reference the `reference/` files. +This repository contains structured skills and reference material for developing software on the Commodore 64. Each subdirectory under `.claude/skills/` is a self-contained topic skill. When answering a C64 development question, consult the most relevant skill first, then cross-reference the `reference/` files. ### Skill Index | Directory | Topic | When to Use | |-----------|-------|-------------| -| `skills/6510-assembly/` | 6510 CPU, opcodes, addressing modes, registers | Writing or debugging assembly/ML programs | -| `skills/memory-map/` | Complete C64 memory layout, zero page, banking | Memory management, PEEK/POKE, ML placement | -| `skills/graphics-vic2/` | VIC-II chip, sprites, character modes, color | All graphics programming | -| `skills/sound-sid/` | SID 6581, ADSR, waveforms, filters | Music and sound effects | -| `skills/disk-io-1541/` | 1541 DOS, file types, direct access | Disk operations, file I/O | -| `skills/kernal-routines/` | OS jump table, screen/serial/tape I/O | Using built-in OS calls from ML | -| `skills/basic-programming/` | BASIC 2.0 interpreter, extending BASIC, tokens | BASIC programs, BASIC extensions | -| `skills/interrupts/` | IRQ, NMI, CIA timers, raster interrupts | Interrupt-driven code, timing | -| `skills/compiler-design/` | Compiler & assembler construction for C64/128 | Writing compilers, assemblers, parsers | -| `skills/vice-emulator/` | VICE emulator, autostart, monitor, snapshots, automation | Running, testing, and debugging C64 software in VICE | -| `skills/powerc/` | Power C compiler on the C64 | Writing, compiling, linking, and running C programs with Power C (reference/POWERc.d81); load this whenever Power C or on-C64 C development is requested | +| `.claude/skills/6510-assembly/` | 6510 CPU, opcodes, addressing modes, registers | Writing or debugging assembly/ML programs | +| `.claude/skills/memory-map/` | Complete C64 memory layout, zero page, banking | Memory management, PEEK/POKE, ML placement | +| `.claude/skills/graphics-vic2/` | VIC-II chip, sprites, character modes, color | All graphics programming | +| `.claude/skills/sound-sid/` | SID 6581, ADSR, waveforms, filters | Music and sound effects | +| `.claude/skills/disk-io-1541/` | 1541 DOS, file types, direct access | Disk operations, file I/O | +| `.claude/skills/kernal-routines/` | OS jump table, screen/serial/tape I/O | Using built-in OS calls from ML | +| `.claude/skills/basic-programming/` | BASIC 2.0 interpreter, extending BASIC, tokens | BASIC programs, BASIC extensions | +| `.claude/skills/interrupts/` | IRQ, NMI, CIA timers, raster interrupts | Interrupt-driven code, timing | +| `.claude/skills/compiler-design/` | Compiler & assembler construction for C64/128 | Writing compilers, assemblers, parsers | +| `.claude/skills/vice-emulator/` | VICE emulator, autostart, monitor, snapshots, automation | Running, testing, and debugging C64 software in VICE | +| `.claude/skills/powerc/` | Power C compiler on the C64 | Writing, compiling, linking, and running C programs with Power C (reference/POWERc.d81); load this whenever Power C or on-C64 C development is requested | ### Reference Files @@ -117,7 +117,7 @@ $E000–$FFFF Kernal ROM β€” Operating system (or RAM when banked out) %011 $33 BASIC + Kernal ROM, character ROM at $D000 (no I/O) %000 $30 all RAM ``` -BASIC ROM needs LORAM=1 and HIRAM=1. Full table: `skills/memory-map/SKILL.md`. +BASIC ROM needs LORAM=1 and HIRAM=1. Full table: `.claude/skills/memory-map/SKILL.md`. --- @@ -244,11 +244,11 @@ This knowledge base was compiled from these canonical references: When an AI agent receives a C64 development question: 1. **Identify the domain** using the Skill Index table above -2. **Load the relevant SKILL.md** from the appropriate `skills/` subdirectory +2. **Load the relevant SKILL.md** from the appropriate `.claude/skills/` subdirectory 3. **Cross-reference** `reference/` files for specific register values, addresses, or opcodes 4. **Check examples/** for working code patterns -5. **If the task involves running or debugging software in an emulator**, load `skills/vice-emulator/SKILL.md` and `reference/vice-usage.md` -6. **If the task involves writing C for the C64** (user mentions C, Power C, `ced`, `cc`, `link`, or `reference/POWERc.d81`), load `skills/powerc/SKILL.md` first. Power C is K&R C (no prototypes/`void`, 2-byte `int`, 8-char identifiers), sources on disk are PETSCII, and `cc`/`link` need specific steps. Also load `skills/vice-emulator/SKILL.md` to automate the build in VICE (copy `reference/POWERc.d81` first; never write to the original). Note: `examples/moonlander.c` and `examples/linked-list-test.c` use **cc65**, not Power C; pick the toolchain the user asked for. +5. **If the task involves running or debugging software in an emulator**, load `.claude/skills/vice-emulator/SKILL.md` and `reference/vice-usage.md` +6. **If the task involves writing C for the C64** (user mentions C, Power C, `ced`, `cc`, `link`, or `reference/POWERc.d81`), load `.claude/skills/powerc/SKILL.md` first. Power C is K&R C (no prototypes/`void`, 2-byte `int`, 8-char identifiers), sources on disk are PETSCII, and `cc`/`link` need specific steps. Also load `.claude/skills/vice-emulator/SKILL.md` to automate the build in VICE (copy `reference/POWERc.d81` first; never write to the original). Note: `examples/moonlander.c` and `examples/linked-list-test.c` use **cc65**, not Power C; pick the toolchain the user asked for. 7. **Apply the 150-expert consensus**: prefer documented Kernal routines over custom implementations; use zero-page for speed; always consider memory banking when accessing $D000–$DFFF --- diff --git a/README.md b/README.md index b0ea946..a419c99 100644 --- a/README.md +++ b/README.md @@ -72,16 +72,16 @@ c64-dev-knowledge/ | I want to… | Start here | |-----------|-----------| -| Write 6510 machine code | `skills/6510-assembly/SKILL.md` | -| Understand the memory map | `skills/memory-map/SKILL.md` + `reference/memory-map-complete.md` | -| Program sprites or bitmap graphics | `skills/graphics-vic2/SKILL.md` | -| Make sound or music | `skills/sound-sid/SKILL.md` | -| Read/write disk files | `skills/disk-io-1541/SKILL.md` | -| Use Kernal routines | `skills/kernal-routines/SKILL.md` + `reference/kernal-jumplist.md` | -| Extend or interface with BASIC | `skills/basic-programming/SKILL.md` | -| Write custom IRQ handlers | `skills/interrupts/SKILL.md` | -| Build a compiler or assembler | `skills/compiler-design/SKILL.md` | -| Run or debug software in VICE | `skills/vice-emulator/SKILL.md` + `reference/vice-usage.md` | +| Write 6510 machine code | `.claude/skills/6510-assembly/SKILL.md` | +| Understand the memory map | `.claude/skills/memory-map/SKILL.md` + `reference/memory-map-complete.md` | +| Program sprites or bitmap graphics | `.claude/skills/graphics-vic2/SKILL.md` | +| Make sound or music | `.claude/skills/sound-sid/SKILL.md` | +| Read/write disk files | `.claude/skills/disk-io-1541/SKILL.md` | +| Use Kernal routines | `.claude/skills/kernal-routines/SKILL.md` + `reference/kernal-jumplist.md` | +| Extend or interface with BASIC | `.claude/skills/basic-programming/SKILL.md` | +| Write custom IRQ handlers | `.claude/skills/interrupts/SKILL.md` | +| Build a compiler or assembler | `.claude/skills/compiler-design/SKILL.md` | +| Run or debug software in VICE | `.claude/skills/vice-emulator/SKILL.md` + `reference/vice-usage.md` | | Look up an opcode | `reference/6510-opcodes.md` | | Look up a chip register | `reference/vic-registers.md`, `sid-registers.md`, `cia-registers.md` | | Find a Kernal routine | `reference/kernal-jumplist.md` | @@ -105,7 +105,7 @@ Supplemental emulator material is intentionally kept separate from the canonical ## VICE Debugging -For emulator debugging, start with `skills/vice-emulator/SKILL.md`, then use `reference/vice-usage.md` as the command quick reference. +For emulator debugging, start with `.claude/skills/vice-emulator/SKILL.md`, then use `reference/vice-usage.md` as the command quick reference. The most useful repo examples are: diff --git a/newLang/AGENTS.md b/newLang/AGENTS.md index f6259bb..3d3a848 100644 --- a/newLang/AGENTS.md +++ b/newLang/AGENTS.md @@ -23,8 +23,8 @@ Read these files in order before changing implementation files: 6. `planning/agent-workflow.md` Also read the repository-root `AGENTS.md` and the relevant skills under -`../skills/`. Compiler work requires `../skills/compiler-design/SKILL.md`. -Emulator work also requires `../skills/vice-emulator/SKILL.md`. +`../.claude/skills/`. Compiler work requires `../.claude/skills/compiler-design/SKILL.md`. +Emulator work also requires `../.claude/skills/vice-emulator/SKILL.md`. ## Authority and Change Control diff --git a/reference/powerc-re/README.md b/reference/powerc-re/README.md index add71e9..7917b23 100644 --- a/reference/powerc-re/README.md +++ b/reference/powerc-re/README.md @@ -28,7 +28,7 @@ python reference\powerc-re\tools\regress.py # optimizer on/off, compare the original linker using the improved runtime objects, and (with `-Run`) starts the program and saves the final screen. `-NoOpt` gives the original behaviour for comparison. Sources are plain ASCII; the scripts convert to PETSCII. Remember Power C is K&R C and cannot type `||` -(see `skills/powerc/SKILL.md`). +(see `.claude/skills/powerc/SKILL.md`). ## How the toolchain works (reverse engineered) diff --git a/skills/README.md b/skills/README.md new file mode 100644 index 0000000..573410e --- /dev/null +++ b/skills/README.md @@ -0,0 +1,4 @@ +# Skills moved + +The topic skills now live in [`.claude/skills/`](../.claude/skills/) so Claude Code +discovers them automatically. Each one is `.claude/skills//SKILL.md`.