ScuttleBot
| 6d0d615… | lmata | 1 | # Claude — scuttlebot |
| 6d0d615… | lmata | 2 | |
| 6d0d615… | lmata | 3 | Primary conventions doc: [`bootstrap.md`](bootstrap.md) |
| 6d0d615… | lmata | 4 | |
| 5ac549c… | lmata | 5 | Read it before writing any code. |
| 6d0d615… | lmata | 6 | |
| 6d0d615… | lmata | 7 | --- |
| 6d0d615… | lmata | 8 | |
| 6d0d615… | lmata | 9 | ## Project-specific notes |
| 6d0d615… | lmata | 10 | |
| 5ac549c… | lmata | 11 | - Language: Go 1.22+ |
| 5ac549c… | lmata | 12 | - Transport: IRC — all agent coordination flows through Ergo IRC channels and messages |
| 5ac549c… | lmata | 13 | - HTTP API: `internal/api/` — Bearer token auth, JSON, serves the web UI at `/ui/` |
| 5ac549c… | lmata | 14 | - Admin auth: `internal/auth/` — bcrypt-hashed accounts, login at `POST /login` |
| 5ac549c… | lmata | 15 | - Bot manager: `internal/bots/manager/` — starts/stops system bots based on policy changes |
| 6d0d615… | lmata | 16 | - Human observable by design: everything an agent does is visible in IRC |
| 5ac549c… | lmata | 17 | - Test runner: `go test ./...` |
| 5ac549c… | lmata | 18 | - Formatter: `gofmt` (enforced — run before committing) |
| 5ac549c… | lmata | 19 | - Linter: `golangci-lint run` |
| 5ac549c… | lmata | 20 | - Dev helper: `./run.sh` (start / stop / restart / token / log / test / e2e / clean) |
| 5ac549c… | lmata | 21 | - No ORM, no database — state persisted as JSON files in `data/` |
| 5ac549c… | lmata | 22 | |
| 5ac549c… | lmata | 23 | ## Key entry points |
| 5ac549c… | lmata | 24 | |
| 5ac549c… | lmata | 25 | | Path | Purpose | |
| 5ac549c… | lmata | 26 | |------|---------| |
| 5ac549c… | lmata | 27 | | `cmd/scuttlebot/` | daemon binary | |
| 5ac549c… | lmata | 28 | | `cmd/scuttlectl/` | admin CLI | |
| 5ac549c… | lmata | 29 | | `internal/api/` | HTTP API server + web UI | |
| 5ac549c… | lmata | 30 | | `internal/auth/` | admin account store (bcrypt) | |
| 5ac549c… | lmata | 31 | | `internal/registry/` | agent registration + credential issuance | |
| 5ac549c… | lmata | 32 | | `internal/bots/manager/` | bot lifecycle (start/stop on policy change) | |
| 5ac549c… | lmata | 33 | | `internal/ergo/` | Ergo IRC server lifecycle + config generation | |
| 5ac549c… | lmata | 34 | | `internal/config/` | YAML config loading | |
| 5ac549c… | lmata | 35 | | `pkg/client/` | Go agent SDK | |
| 5ac549c… | lmata | 36 | | `pkg/protocol/` | JSON envelope wire format | |
| 5ac549c… | lmata | 37 | |
| 5ac549c… | lmata | 38 | ## Conventions |
| 5ac549c… | lmata | 39 | |
| 5ac549c… | lmata | 40 | - Errors returned, not panicked. Wrap: `fmt.Errorf("pkg: operation: %w", err)` |
| 5ac549c… | lmata | 41 | - Interfaces defined at point of use, not in the implementing package |
| 5ac549c… | lmata | 42 | - No global state. Dependencies injected via constructor args or struct fields. |
| 5ac549c… | lmata | 43 | - Env vars for secrets only (e.g. `ORACLE_OPENAI_API_KEY`); everything else in `scuttlebot.yaml` |
| 5ac549c… | lmata | 44 | |
| 5ac549c… | lmata | 45 | ## Memory |
| 5ac549c… | lmata | 46 | |
| 8800fb6… | lmata | 47 | See [`memory/MEMORY.md`](memory/MEMORY.md) |