diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md index 2d733f4c..802273fe 100644 --- a/.agents/AGENTS.md +++ b/.agents/AGENTS.md @@ -1,323 +1,89 @@ -# Antigravity Pokemon Yellow 32-bit PMODE Port — Agent Swarm +# Antigravity Pokemon Yellow DOS Port — Agent Swarm ## Overview -Claude is **not** part of this swarm. Claude is used directly via Claude Code 1:1 -for complex work, architecture decisions, and callsite wiring. The swarm handles -bulk translation of simple-category functions and placing them into the correct -files — nothing more. +Claude Code handles architecture, complex functions, and live-graph wiring. +The swarm handles bulk translation of `simple`-category functions only. ``` -Dispatch_Manager (gemini-3.1-pro, effort:high) ← top-level coordinator - ├── Code_Worker_1..5 (gemini-3.5-flash, effort:high) - ├── Integration_Agent (gemini-3.5-flash, effort:high) - └── Docs_Commit_Agent (gemini-3.1-pro, effort:high) +Dispatch_Manager (gemini-3.1-pro) ← coordinator + ├── Code_Worker_1..5 (gemini-3.5-flash) + ├── Integration_Agent (gemini-3.5-flash) + └── Docs_Commit_Agent (gemini-3.1-pro) ``` -**Hard boundary**: The swarm places translated code in the right files. It does -**not** wire functions into the game loop. Callsite connections (adding `call` -instructions into existing engine code, modifying `OverworldLoop`, etc.) are -reserved for Claude Code sessions where the user has direct control. +**Hard boundary**: Swarm places translated code. It does **not** wire functions +into the live game loop. Live-graph connections (`OverworldLoop`, `EnterMap`, +`DelayFrame` callees) are Claude Code only. --- -## Required Reading (all agents that write or review NASM) +## Role Files (read your role file before doing anything) -Every agent that generates, reviews, or integrates NASM code **must** read these -before doing any work. They are not optional background — violations will cause -silent runtime bugs or corrupt glitch behaviour. - -| Document | Why it matters | +| Role | File | |---|---| -| `CLAUDE.md` | Register map, memory model, DPMI gotchas, build conventions | -| `docs/register_map.md` | Canonical SM83→x86 register assignments | -| `docs/386_optimization_strategy.md` | Instruction selection rules for 386 targets | -| `docs/bugs_and_glitches.md` | Which SM83 bugs to preserve and at what fix level | -| `docs/glitch_safety.md` | Which glitches are safe to emulate vs. dangerous under DPMI | - -Dispatch_Manager must read all five before writing any ticket. -Code Workers must read all five before translating any function. -Integration_Agent must read `CLAUDE.md` and `docs/register_map.md` before placing files. -Docs_Commit_Agent must read `CLAUDE.md` for commit conventions. +| Dispatch_Manager | `.agents/roles/dispatch.md` | +| Code_Worker | `.agents/roles/worker.md` | +| Integration_Agent | `.agents/roles/integration.md` | +| Docs_Commit_Agent | `.agents/roles/docs.md` | --- -## Role: Dispatch_Manager -- **Model**: `gemini-3.1-pro` -- **Settings**: `effort: high` -- **Objective**: Top-level swarm coordinator. Reads the work queue, writes - per-function tickets for Code Workers, reviews returned translations, marks - jobs complete, and hands finished files to the Integration and Docs agents. - Does **not** touch `complex`-category functions — those are left for Claude. +## Skills (load on demand with `agy skill `) -### Work Queue Interface -Queue lives in `dos_port/tools/translation.db`. Use `dos_port/tools/work_queue` -(executable, no extension, outputs JSON): +| Skill | When to load | +|---|---| +| `register-map` | Before writing any NASM | +| `path-map` | Before placing any file | +| `386-checklist` | When choosing instructions | +| `bug-check` | When BUG/GLITCH annotation needed | +| `glitch-escalation` | When hitting a $FF__ register | +| `commit-format` | Before committing | + +--- + +## Work Queue Quick Reference ```sh dos_port/tools/work_queue status -dos_port/tools/work_queue claim --agent Dispatch_Manager --count 5 --category simple -dos_port/tools/work_queue fail --id --notes "reason" -dos_port/tools/work_queue list --category simple --status needs_translation --limit 20 -dos_port/tools/work_queue pending-placement # jobs ready for Integration Agent +dos_port/tools/work_queue claim --agent --count 5 --category simple +dos_port/tools/work_queue pending-placement +dos_port/tools/work_queue list --status needs_translation --category simple --limit 20 ``` -See `dos_port/tools/work_queue --help` for the full reference. +Run `dos_port/tools/work_queue --help` for full command reference. -### Scratch pad -Workers write their output to `dos_port/scratch/` — a fully untracked ephemeral -directory (gitignored). Each file is named `__