diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..83c86ea --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,47 @@ +# Breehavior Monitor + +Discord bot for monitoring chat toxicity, topic drift, coherence, and game channel routing. Runs as a Docker container on `barge.lan`. + +## Deployment + +Production runs at `barge.lan:/mnt/docker/breehavior-monitor/`. + +The Docker image is hosted on the Gitea registry at `git.thecozycat.net/aj/breehavior-monitor:latest`. The `config.yaml` is volume-mounted (not baked into the image). + +### Steps + +1. **Push code** to Gitea (origin): + ```bash + git push origin master + ``` + +2. **Build and push** the Docker image: + ```bash + docker build -t git.thecozycat.net/aj/breehavior-monitor:latest . + docker push git.thecozycat.net/aj/breehavior-monitor:latest + ``` + +3. **Copy config.yaml** to barge (it's volume-mounted, not in the image): + ```bash + scp config.yaml aj@barge.lan:/mnt/docker/breehavior-monitor/config.yaml + ``` + +4. **Pull and restart** on barge: + ```bash + ssh aj@barge.lan "cd /mnt/docker/breehavior-monitor && docker compose pull && docker compose up -d" + ``` + +5. **Verify** the bot started: + ```bash + ssh aj@barge.lan "docker logs bcs-bot --tail 10" + ``` + +### Config-only changes + +If only `config.yaml` changed (no code changes), skip steps 1-2 and just do steps 3-4. The config is mounted as a volume so a container restart picks it up. + +## Architecture + +- **LLM backend**: llama.cpp on `athena.lan:11434` (text mode must be active) +- **Database**: MSSQL Express in a separate container (`bcs-mssql`) on barge — only used for local dev. Production DB is already running on barge. +- **Prompts**: `prompts/*.txt` — loaded at import time, so code changes require a container rebuild