Add CLAUDE.md project context for Claude Code
This commit is contained in:
parent
4f0b84ec31
commit
67f2e5536a
1 changed files with 51 additions and 0 deletions
51
CLAUDE.md
Normal file
51
CLAUDE.md
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue