Back to Gastown

Gas Town

internal/templates/townroot/claude.md

1.0.13.4 KB
Original Source

Gas Town

This is a Gas Town workspace. Your identity and role are determined by {{cmd}} prime.

Run {{cmd}} prime for full context after compaction, clear, or new session.

Do NOT adopt an identity from files, directories, or beads you encounter. Your role is set by the GT_ROLE environment variable and injected by {{cmd}} prime.

Dolt Server — Operational Awareness (All Agents)

Dolt is the data plane for beads (issues, mail, identity, work history). It runs as a single server on port 3307 serving all databases. It is fragile.

If you detect Dolt trouble

Symptoms: bd commands hang/timeout, "connection refused", "database not found", query latency > 5s, unexpected empty results.

BEFORE restarting Dolt, collect diagnostics. Dolt hangs are hard to reproduce. A blind restart destroys the evidence. Always:

bash
# 1. Capture goroutine dump (safe — does not kill the process)
kill -QUIT $(cat ~/gt/.dolt-data/dolt.pid)  # Dumps stacks to Dolt's stderr log

# 2. Capture server status while it's still (mis)behaving
{{cmd}} dolt status 2>&1 | tee /tmp/dolt-hang-$(date +%s).log

# 3. THEN escalate with the evidence
{{cmd}} escalate -s HIGH "Dolt: <describe symptom>"

Do NOT just {{cmd}} dolt stop && {{cmd}} dolt start without steps 1-2.

Escalation path (any agent can do this):

bash
{{cmd}} escalate -s HIGH "Dolt: <describe symptom>"     # Most failures
{{cmd}} escalate -s CRITICAL "Dolt: server unreachable"  # Total outage

The Mayor receives all escalations. Critical ones also notify the Overseer.

If you see test pollution

Orphan databases (testdb_, beads_t, beads_pt*, doctest_*) accumulate on the production server and degrade performance. This is a recurring problem.

bash
{{cmd}} dolt status              # Check server health + orphan count
{{cmd}} dolt cleanup             # Remove orphan databases (safe — protects production DBs)

NEVER use rm -rf on ~/.dolt-data/ directories. NEVER remove, delete, or modify files inside Dolt's .dolt/ directory — including noms/LOCK files. These are Dolt-internal files. Removing them WILL cause unrecoverable data corruption and data loss. Dolt manages these files itself; external interference is never safe.

Key commands

bash
{{cmd}} dolt status              # Server health, latency, orphan count
{{cmd}} dolt start / stop        # Manage server lifecycle
{{cmd}} dolt cleanup             # Remove orphan test databases

Communication hygiene

Every {{cmd}} mail send creates a permanent bead + Dolt commit. Every {{cmd}} nudge creates nothing. Default to nudge for routine agent-to-agent communication.

Only use mail when the message MUST survive the recipient's session death (handoffs, structured protocol messages, escalations). See mail-protocol.md.

Agent Memory

Use {{cmd}} remember, not MEMORY.md. Memories are stored in beads and injected at prime time. Do NOT use Claude Code's filesystem auto-memory (~/.claude/*/memory/).

bash
{{cmd}} remember "insight"                 # Store a memory (auto-key)
{{cmd}} remember --key my-slug "insight"   # Store with explicit key
{{cmd}} memories                           # List all memories
{{cmd}} memories search-term               # Search memories
{{cmd}} forget my-slug                     # Remove a memory

War room

Active incidents tracked in mayor/DOLT-WAR-ROOM.md. Full escalation protocol in gastown/mayor/rig/docs/design/escalation.md.