From 67f2e5536aba342d3108cecdac29d3839cbd6dac Mon Sep 17 00:00:00 2001 From: Hoid Date: Sat, 14 Feb 2026 11:00:38 +0000 Subject: [PATCH] Add CLAUDE.md project context for Claude Code --- CLAUDE.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..9f4a2a6 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,51 @@ +# CLAUDE.md — iso-bot project context + +## What is this? +A screen-reading bot engine for isometric games. First target: Diablo II: Resurrected (D2R). +No memory injection, no hooking — purely screen capture + computer vision + input simulation. + +## Tech Stack +- **Go 1.23+** — core engine +- **Pure Go image processing** (no GoCV yet) — vision pipeline +- **net/http + WebSocket** — API server +- **SolidJS + TypeScript** — web dashboard (planned, currently vanilla HTML) + +## Project Structure +``` +cmd/iso-bot/ Entry point. --dev flag for development mode +cmd/debug/ Debug tool for analyzing screenshots +pkg/engine/ Core engine (capture, vision, input, state, safety, loot, resolution) +pkg/plugin/ Game plugin interfaces +pkg/api/ REST + WebSocket API +plugins/d2r/ Diablo II: Resurrected plugin +web/dev/ Dev dashboard (single HTML file) +config/ YAML configs +testdata/ Test screenshots +``` + +## Build & Run +```bash +go build ./cmd/iso-bot +./iso-bot --dev --api :8080 # Uses testdata/d2r_1080p.png +./iso-bot --dev --api :8080 --capture-file path/to/screenshot.png +go run ./cmd/debug # Analyze screenshot regions +``` + +## Key Architecture Decisions +- **Plugin system**: `pkg/plugin/plugin.go` defines interfaces. Games implement them. +- **Resolution profiles**: Each game registers pixel-exact regions per resolution in `pkg/engine/resolution/` +- **Modular capture**: `pkg/engine/capture/backends/` — file, window, VNC, Spice, Wayland, etc. +- **Declarative loot filter**: YAML rules in `plugins/d2r/loot/default.yaml` + +## Git +```bash +git add -A && git commit -m "message" +GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no" git push origin main +``` + +## Important Notes +- Always run `go build ./cmd/iso-bot` after changes to verify compilation +- The testdata/d2r_1080p.png is a REAL D2R screenshot — use it for testing +- HSV ranges in plugins/d2r/config.go are calibrated for real screenshots +- D2R uses circular orbs for health/mana, not horizontal bars +- Region coordinates are for 1920x1080 resolution