New endpoints:
- GET /api/state/buildable: buildings filtered by completed research (unlocked/locked)
- POST /api/action/toggle: toggle building on/off (save power, control workflow)
- POST /api/action/set_recipe: set building recipe (e.g. Rock Crusher mode)
- POST /api/action/empty: empty building storage (drop all contents)
- POST /api/action/cancel_errand: cancel all errands at a building
Improved research: proper prerequisite validation, tech queueing, research station check
CLI: buildable [filter], toggle, set_recipe, empty, cancel_errand
Updated SKILL.md with new endpoint docs
- All api_get/api_post calls now auto-pause game before executing
- AUTO_PAUSE_ENABLED flag to disable for event daemon polling
- Event daemon explicitly disables auto-pause (frequent light polling)
- Iron rules updated:
Rule 1: AI must pause BEFORE any reasoning/decision
Rule 2: Tools auto-pause on state data fetch
Rule 3: AI must pause before asking user questions
Rule 4: AI must ensure paused when exiting response state
Rule 5: Save before major operations
- Rule 1: Pause before asking user questions
- Rule 2: Pause when exiting response state (game must not run unattended)
- Rule 3: Pause before every write operation
- Rule 4: Save before major operations, load for rollback
Complete rewrite of SKILL.md with a comprehensive AI operating protocol:
- Core Operating Loop: 5-step cycle (context → plan → protect → execute → verify)
- Standard Operating Procedure (SOP): 0-6 step-by-step for every operation
- Decision Framework: how to analyze, locate, choose, and execute
- 7 Standard Playbooks:
A: Initial base setup (Cycle 1-20)
B: CO2 crisis handling
C: Power overload recovery
D: Oxygen crisis emergency
E: SPOM construction
F: Pipe/wire crossing (with bridge detection)
G: Electrical wiring (connect building to grid)
- Error Recovery Table: every error code with specific recovery steps
- Coordinate Location Methods: 4 strategies for finding build positions
- Event Auto-Response Rules: what to do for each event type
- Consolidated pause/speed reference
- POST /api/action/pause - pause game (AI must call before operations)
- POST /api/action/unpause - resume game at desired speed
- POST /api/action/speed - set game speed (1x/2x/3x)
- Game state now includes isPaused and gameSpeed
- AI pause protocol documented in SKILL.md: pause before every operation
- Introduces cell.isDiggable flag that filters neutronium properly
- pause/unpause/speed CLI commands added to oni_api.py
- Priority system: GET /api/state/priorities, POST /api/action/priority_global, POST /api/action/priority_type
- Batch system: POST /api/action/batch with per-action result tracking
- Enhanced action feedback with error codes and AI suggestions:
cell_occupied, cell_solid, cell_occupied_by_dupe, material_shortage, etc.
- Event stream: GET /api/state/events?since=&limit= for incremental polling
- Event daemon: scripts/event_daemon.py continuously polls events,
classifies by severity, auto-triggers analysis on critical events
- Games state now reports suffocating/starving/stressed counts
- Cell data includes isDiggable and isSafeForDupe flags
- Added 'events', 'queue', 'batch', 'priority_global', 'priority_type' CLI commands
- Added sample batch plan file