9.8 KiB
SESSION.md — Minecraft AI God (Vanilla)
Persistent AI session memory for this project. See /root/bin/SESSION.md for the global template and guide.
Context Files
/root/bin/core_homelab.md— cluster topology, SSH aliases/root/bin/services_directory.md— active service IPs and domains/root/bin/SESSION.md— global session memory and patterns./CONTEXT.md— Minecraft infrastructure, server config, RCON helper./README.md— project overview (see sister repo for Paper fork)- Sister repo session memory:
/root/bin/Sethpc-Minecraft-PaperFork/SESSION.md
This document links the two Minecraft AI God projects together, describes their Gitea repos, and serves as the AI session memory for both.
Memory Discipline
- Update
SESSION.mdimmediately when a durable fact, decision, or fix is discovered. - Before every final reply, run a memory check and append any missing durable notes.
- End every reply with one line:
Session memory: updatedorSession memory: no new durable facts.
The Two Projects
This repo — minecraft-ai-god (Vanilla)
- Local path:
/root/bin/Sethpc-Minecraft - Gitea:
https://git.sethpc.xyz/Seth/minecraft-ai-god - Purpose: Vanilla Minecraft 1.21.x, no plugins or mods. All automation via log watching + RCON. Targets the mc1 server (port 25565) and shrink-world server (port 25566) on CT 644.
- Key services:
mc-godmode.service,mc-shrink-kit.service,mc-aigod.service - AI features:
praychat trigger → Ollama LLM → structured JSON → RCON execution; divine intervention timer; shrink-world kit/stats watcher
Sister repo — minecraft-ai-god-paper-fork (Paper Advanced Fork)
- Local path:
/root/bin/Sethpc-Minecraft-PaperFork - Gitea:
https://git.sethpc.xyz/Seth/minecraft-ai-god-paper-fork - Purpose: Dedicated Paper server on port 25567 with plugins (FastAsyncWorldEdit, LuckPerms). Extends the vanilla branch with build templates, expanded command set, sudo translator mode, and LangGraph-style session gateway.
- Key services:
mc-paper-ai.service,mc-aigod-paper.service,mc-langgraph-gateway.service - AI features: All vanilla features +
sudo build/make/createdeterministic templates,sudo lookup/wiki/search, LangGraph gateway sidecar (FastAPI on 127.0.0.1:8091), SQLite session persistence
Relationship Between the Two
The Paper fork is a direct evolution of this vanilla repo. They share:
- Same
pray/bible/sudotrigger style and chat patterns - Same two-call LLM split (message + commands JSON schema)
- Same RCON helper (raw socket, no library)
- Same command validation + syntax repair pipeline
- Same intervention timer design (Poisson process, presence guard)
The Paper fork adds on top of this base:
- Plugin-enabled command families (
fill,setblock,clone) - Deterministic build templates before LLM translation
- LangGraph gateway with session memory and tool loop
server_typegating so paper commands don't leak to vanilla
Both can run simultaneously — they use separate ports, services, and config files.
Gitea Backup Workflow
Both repos push every committed change to Gitea. This is the standard workflow:
# From either local repo dir:
git add -A
git commit -m "<description of change>"
git push origin main
Both remotes are pre-configured with token auth:
- Vanilla:
https://Seth:<token>@git.sethpc.xyz/Seth/minecraft-ai-god.git - Paper fork:
https://Seth:<token>@git.sethpc.xyz/Seth/minecraft-ai-god-paper-fork.git
The Gitea instance lives at git.sethpc.xyz (CT 146, node-173, 192.168.0.125).
API key: see GITEA_API.md in this repo.
Convention: commit every meaningful change immediately. Commits are the changelog — no squashing, no batching unrelated changes.
Keeping This File Current
Run /update-context in OpenCode at the end of any session to automatically:
- Review the conversation for new decisions, fixes, and discoveries
- Append them to
SESSION.mdin both repos - Commit and push both repos to Gitea
The command is defined globally at ~/.config/opencode/commands/update-context.md.
AI Conversation Notes
This section captures decisions and context accumulated across conversations with the AI assistant (OpenCode/Claude). Update it as significant choices are made.
Architecture decisions
- No plugins on vanilla servers. All mc1 and shrink-world automation is pure log-tail + RCON. This keeps the vanilla experience intact and requires no server restarts for updates.
- Paper fork is separate, not a branch. Running both as separate services on separate ports was chosen over a single multi-mode script to keep failure domains isolated.
- LLM backend: Ollama at
192.168.0.179:11434for the vanilla service. The Paper fork uses192.168.0.141:11434(steel141, local GPU) for better throughput on heavier models (gemma3:12b, qwen3-coder:30b). - Session gateway (Paper fork only): The LangGraph-style FastAPI sidecar adds multi-turn memory without requiring a full LangGraph install. Safety enforcement stays in
mc_aigod_paper.py, not the gateway. - Bug intake trigger (2026-03-17): Added
bug_log <optional description>chat command in vanilla AI God. It appends structured bug entries to/var/log/mc_aigod_bug.logwith player, description, recent in-memory events, and recent rawlatest.loglines, then confirms to the player in chat. - God voice update (2026-03-17): Increased default God persona emphasis on irony, dark humor, and sarcastic one-liners in both command and message system prompts (vanilla + Paper variants) while keeping command strictness unchanged.
- Paper bug report triage (2026-03-17):
bug_logcaptured a case where a prayer reward path issued vertical teleport (execute as slingshooter08 run tp slingshooter08 ~ ~10 ~) and felt unsafe/unintended for a build-oriented prayer; indicates need for pray-path movement guardrails and safer teleport policy. - Teleport safety guard (2026-03-17): Added execution-time TP safety wrapper in vanilla
execute_response: risky upward teleports (relative delta >= configured threshold or high absolute Y) are prefixed withslow_falling+resistanceeffects to prevent accidental lethal falls while keeping punishment/spectacle behavior. - Bug-log signal upgrade (2026-03-17):
bug_logentries now include filtered raw log lines (RCON connect/disconnect noise removed) plus a new "RECENT AI ACTIONS" section from service logs (Prayer from,Executing RCON,SUDO execute, results) for faster triage. - Weather normalization fix (2026-03-17): added explicit prompt/context rule and command normalizer in vanilla script mapping
weather storm|rainstorm|thunderstorm->weather thunderbefore validation/execution.
Infrastructure decisions
- mc1 autoStart: Set to
truein MCSManager instance config (/opt/mcsmanager/daemon/data/InstanceConfig/d39f55861cb34204a92a18a9e1c78ca6.json) so the server starts on CT 644 boot.mc-godmode.serviceusestail -Fand handles the log appearing late gracefully. - mc-godmode.service startup: Already enabled (
systemctl is-enabled= enabled),WantedBy=multi-user.target,After=mcsm-daemon.service. The service was not failing — the MC server itself wasn't auto-starting (fixed by enabling autoStart). - shrink-world aigod tail fix (2026-03-17):
mc-aigod.servicestayed active but stopped reacting to chat after log file recreation becausetail_log()used a singleopen()+readline()handle. Updated/usr/local/bin/mc_aigod.pyto detect inode changes/truncation and reopenlatest.logautomatically; restartedmc-aigod.serviceon CT 644. - sudo hallucination observed (2026-03-17): after tail fix,
sudo destroy my surroundingswas parsed and executed asexecute as slingshooter08 run tp @e[type=player,tag=destroyed] ~ ~ ~andexecute as slingshooter08 run kill @e[type=player,tag=destroyed]. Both returned empty RCON results; current validator allowed them because prefix-only checks pass and onlygive/effecthave syntax repair. - Context/prompt refinement (2026-03-17): updated vanilla sudo/god prompts to emphasize strict 1.21 syntax (including
effect give ..., no old enchant NBT, weather clear/rain/thunder only), concise JSON outputs, and avoidance of accidental high vertical teleports in benevolent responses; increased vanilla sudo translator token budget from 180 to 260 to reduce truncated JSON on longer kit requests. - bug_log deployment status (2026-03-17): local repo had
bug_logfeature before CT deployment./usr/local/bin/mc_aigod.pyon CT 644 did not containBUG_LOG_PATTERNSor bible help text until redeployed; pushed updated script + config and restartedmc-aigod.servicesuccessfully. - Project governance for bug intake (2026-03-17): multiple players may submit
bug_logreports, but these are advisory signal only. The owner (slingshooter08) sets product direction and prioritization; non-owner feedback should be considered with appropriate weighting.
Open threads / next ideas
- Prayer history log (JSON) for review and tuning
- God mood / divine disposition score persisted across restarts
- Dual-server support in vanilla aigod (watch both mc1 and shrink-world logs)
- Redis backend for Paper fork gateway sessions (currently SQLite only)
- MCP-based tool adapters in the gateway tool loop
- Web dashboard for recent prayers + God responses (n8n or simple Flask)
- Paper sudo fallback behavior: when request intent is outside command library, run lookup/wiki/search step and synthesize closest safe workaround (example intent: destruction -> TNT-oriented actions) instead of emitting hallucinated raw commands.
- Paper AI behavior preference: prioritize richer reasoning over deterministic templates; provide broader Minecraft/WorldEdit context via a local indexed knowledge corpus, then let the agent retrieve only needed docs/files per request before generating commands.