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