docs(priming): remove bd sync references for Dolt backend
Gas Town uses Dolt exclusively. Remove all bd sync and bd daemon references from agent priming, templates, formulas, and docs. With Dolt backend: - Beads changes are automatically persisted - No manual sync needed (no bd sync) - No daemon needed (no bd daemon) Updated files: - polecat-CLAUDE.md template - Role templates (crew, mayor, polecat) - Message templates (spawn, nudge) - Formulas (polecat-work, sync-workspace, shutdown, etc.) - Reference docs Part of hq-4f2f0c: Remove bd sync/daemon from agent priming Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -135,12 +135,7 @@ bd show {{convoy}}
|
||||
# Status should reflect archived state
|
||||
```
|
||||
|
||||
**4. Sync to persist:**
|
||||
```bash
|
||||
bd sync
|
||||
```
|
||||
|
||||
**Exit criteria:** Convoy archived, changes synced."""
|
||||
**Exit criteria:** Convoy archived."""
|
||||
|
||||
[[steps]]
|
||||
id = "notify-overseer"
|
||||
|
||||
@@ -419,114 +419,10 @@ gt mail send mayor/ -s "Health: <rig> <component> unresponsive" \\
|
||||
|
||||
Reset unresponsive_cycles to 0 when component responds normally."""
|
||||
|
||||
[[steps]]
|
||||
id = "hung-session-detection"
|
||||
title = "Detect and recover hung Gas Town sessions (SURGICAL)"
|
||||
needs = ["health-scan"]
|
||||
description = """
|
||||
Detect and surgically recover hung Gas Town sessions where the Claude API call is stuck.
|
||||
|
||||
A hung session appears "running" (tmux session exists, Claude process exists) but
|
||||
the API call has been stuck indefinitely. This breaks patrol chains - if witness
|
||||
hangs, refinery never gets nudged about new MRs.
|
||||
|
||||
**Why existing checks miss this:**
|
||||
- zombie-scan only catches processes not in tmux sessions
|
||||
- gt status shows "running" if tmux session exists
|
||||
- Nudges queue but never get processed (Claude can't respond)
|
||||
|
||||
## SURGICAL TARGETING
|
||||
|
||||
**ONLY these session patterns are valid targets:**
|
||||
- `gt-<rig>-witness` (e.g., gt-kalshi-witness, gt-horizon-witness)
|
||||
- `gt-<rig>-refinery` (e.g., gt-kalshi-refinery)
|
||||
- `hq-deacon`
|
||||
|
||||
**NEVER touch sessions that don't match these patterns exactly.**
|
||||
|
||||
## DETECTION (All checks must pass)
|
||||
|
||||
For each Gas Town session, capture output and verify ALL of these:
|
||||
|
||||
```bash
|
||||
# Step 1: Get session output
|
||||
output=$(tmux capture-pane -t <session-name> -p 2>/dev/null | tail -10)
|
||||
```
|
||||
|
||||
**Check 1: Session is in waiting state**
|
||||
Must see one of: `Clauding`, `Deciphering`, `Marinating`, `Finagling`, `thinking`
|
||||
```bash
|
||||
echo "$output" | grep -qiE 'Clauding|Deciphering|Marinating|Finagling|thinking'
|
||||
```
|
||||
|
||||
**Check 2: Duration exceeds threshold (30+ minutes)**
|
||||
Parse duration from output like "21h 35m 20s" or "45m 30s":
|
||||
```bash
|
||||
# Extract hours and minutes
|
||||
hours=$(echo "$output" | grep -oE '[0-9]+h' | head -1 | tr -d 'h')
|
||||
minutes=$(echo "$output" | grep -oE '[0-9]+m' | head -1 | tr -d 'm')
|
||||
total_minutes=$((${hours:-0} * 60 + ${minutes:-0}))
|
||||
# Threshold: 30 minutes minimum
|
||||
[ "$total_minutes" -ge 30 ]
|
||||
```
|
||||
|
||||
**Check 3: Zero tokens received (definite hang) OR very long duration (>2 hours)**
|
||||
```bash
|
||||
# Definite hang: zero tokens received
|
||||
echo "$output" | grep -qE '↓ 0 tokens'
|
||||
# OR extremely long duration (>2 hours = 120 minutes)
|
||||
[ "$total_minutes" -ge 120 ]
|
||||
```
|
||||
|
||||
**Check 4: NOT showing active tool execution**
|
||||
Active sessions show tool markers (⏺). If present, session is actually working:
|
||||
```bash
|
||||
# If tool markers present in recent output, DO NOT kill
|
||||
echo "$output" | grep -qE '⏺|Read|Write|Bash|Edit' && continue
|
||||
```
|
||||
|
||||
## RECOVERY (Only after ALL checks pass)
|
||||
|
||||
**Log the action first:**
|
||||
```bash
|
||||
echo "[$(date)] RECOVERING HUNG: <session-name> (${hours}h ${minutes}m, waiting state)" >> $GT_ROOT/logs/hung-sessions.log
|
||||
```
|
||||
|
||||
**Kill and restart based on session type:**
|
||||
|
||||
For witness:
|
||||
```bash
|
||||
tmux kill-session -t gt-<rig>-witness 2>/dev/null
|
||||
gt witness start <rig>
|
||||
```
|
||||
|
||||
For refinery:
|
||||
```bash
|
||||
tmux kill-session -t gt-<rig>-refinery 2>/dev/null
|
||||
gt refinery restart <rig>
|
||||
```
|
||||
|
||||
For deacon (self-recovery - use with caution):
|
||||
```bash
|
||||
# Deacon detecting itself is hung is a paradox
|
||||
# Only kill if another deacon instance exists or human confirmed
|
||||
gt mail send mayor/ -s "DEACON SELF-HUNG DETECTED" -m "Deacon appears hung. Human intervention required."
|
||||
```
|
||||
|
||||
## VERIFICATION
|
||||
|
||||
After restart, verify new session is healthy:
|
||||
```bash
|
||||
sleep 5
|
||||
tmux has-session -t <session-name> && echo "Session restarted successfully"
|
||||
```
|
||||
|
||||
**Exit criteria:** All hung Gas Town sessions detected and recovered (or escalated if recovery failed)."""
|
||||
|
||||
[[steps]]
|
||||
id = "zombie-scan"
|
||||
title = "Detect zombie polecats (NO KILL AUTHORITY)"
|
||||
needs = ["hung-session-detection"]
|
||||
needs = ["health-scan"]
|
||||
description = """
|
||||
Defense-in-depth DETECTION of zombie polecats that Witness should have cleaned.
|
||||
|
||||
|
||||
@@ -190,11 +190,6 @@ bd create --title="Digest: {{date}}" --type=digest \
|
||||
--label=digest,{{period}}
|
||||
```
|
||||
|
||||
**3. Sync:**
|
||||
```bash
|
||||
bd sync
|
||||
```
|
||||
|
||||
**Exit criteria:** Digest sent to Mayor and archived as bead."""
|
||||
|
||||
[[steps]]
|
||||
|
||||
@@ -270,11 +270,6 @@ Overall assessment:
|
||||
<brief summary - healthy, needs attention, significant issues, etc.>"
|
||||
```
|
||||
|
||||
**2. Sync beads:**
|
||||
```bash
|
||||
bd sync
|
||||
```
|
||||
|
||||
**Exit criteria:** Tracking issue updated with summary."""
|
||||
|
||||
[[steps]]
|
||||
|
||||
@@ -306,11 +306,6 @@ bd close <source-issue> --reason="merged via conflict resolution"
|
||||
The Refinery normally closes issues after merge, but since we pushed
|
||||
directly to main, we handle it here.
|
||||
|
||||
**3. Sync beads:**
|
||||
```bash
|
||||
bd sync
|
||||
```
|
||||
|
||||
**Exit criteria:** Original MR and source issue are closed."""
|
||||
|
||||
[[steps]]
|
||||
|
||||
@@ -254,13 +254,11 @@ Signal completion and clean up. You cease to exist after this step.
|
||||
|
||||
**Self-Cleaning Model:**
|
||||
Once you run `gt done`, you're gone. The command:
|
||||
1. Syncs beads
|
||||
2. Nukes your sandbox
|
||||
3. Exits your session immediately
|
||||
1. Nukes your sandbox
|
||||
2. Exits your session immediately
|
||||
|
||||
**Run gt done:**
|
||||
```bash
|
||||
bd sync
|
||||
gt done
|
||||
```
|
||||
|
||||
@@ -271,7 +269,7 @@ gt done
|
||||
|
||||
You are NOT involved in any of that. You're gone. Done means gone.
|
||||
|
||||
**Exit criteria:** Beads synced, sandbox nuked, session exited."""
|
||||
**Exit criteria:** Sandbox nuked, session exited."""
|
||||
|
||||
[vars]
|
||||
[vars.pr_url]
|
||||
|
||||
@@ -401,12 +401,7 @@ bd show {{issue}}
|
||||
bd update {{issue}} --notes "Implemented: <brief summary of what was done>"
|
||||
```
|
||||
|
||||
**3. Sync beads:**
|
||||
```bash
|
||||
bd sync
|
||||
```
|
||||
|
||||
**Exit criteria:** Issue updated with completion notes, beads synced."""
|
||||
**Exit criteria:** Issue updated with completion notes."""
|
||||
|
||||
[[steps]]
|
||||
id = "submit-and-exit"
|
||||
|
||||
@@ -69,7 +69,7 @@ git branch --show-current
|
||||
|
||||
**2. Check beads state:**
|
||||
```bash
|
||||
bd sync --status
|
||||
bd status
|
||||
```
|
||||
|
||||
**3. Document starting state:**
|
||||
@@ -77,7 +77,7 @@ bd sync --status
|
||||
- Uncommitted changes (staged/unstaged)
|
||||
- Untracked files (list them)
|
||||
- Stash entries
|
||||
- Beads sync status
|
||||
- Beads database health
|
||||
|
||||
This information guides decisions in subsequent steps.
|
||||
|
||||
@@ -241,36 +241,23 @@ risk merging incorrectly. A resubmitted branch is better than a broken main.
|
||||
|
||||
[[steps]]
|
||||
id = "sync-beads"
|
||||
title = "Sync beads state"
|
||||
title = "Verify beads state"
|
||||
needs = ["sync-git"]
|
||||
description = """
|
||||
Sync the beads database with remote.
|
||||
Verify beads database is healthy.
|
||||
|
||||
With Dolt backend, beads changes are automatically persisted - no manual sync needed.
|
||||
|
||||
```bash
|
||||
bd sync
|
||||
bd status # Check database health
|
||||
bd list --status=in_progress # Verify active work is visible
|
||||
```
|
||||
|
||||
**If conflicts:**
|
||||
Beads uses JSONL append-only format, so true conflicts are rare.
|
||||
If they occur:
|
||||
```bash
|
||||
bd sync --status # Diagnose
|
||||
```
|
||||
**If issues:**
|
||||
- Check dolt sql-server is running
|
||||
- Verify database connectivity
|
||||
|
||||
Likely causes:
|
||||
- Two agents edited same bead simultaneously
|
||||
- Corrupted beads-sync branch
|
||||
|
||||
Resolution:
|
||||
```bash
|
||||
# Try pulling fresh
|
||||
git fetch origin beads-sync
|
||||
bd sync
|
||||
```
|
||||
|
||||
If still failing, escalate to mayor.
|
||||
|
||||
**Exit criteria:** Beads synced successfully."""
|
||||
**Exit criteria:** Beads database healthy and accessible."""
|
||||
|
||||
[[steps]]
|
||||
id = "run-doctor"
|
||||
|
||||
@@ -137,15 +137,17 @@ Old logs are moved to `$GT_ROOT/logs/archive/` with timestamps.
|
||||
|
||||
[[steps]]
|
||||
id = "sync-state"
|
||||
title = "Sync beads and push"
|
||||
title = "Verify beads state"
|
||||
needs = ["rotate-logs"]
|
||||
description = """
|
||||
Ensure all beads state is persisted.
|
||||
Verify beads state is healthy.
|
||||
|
||||
```bash
|
||||
bd sync
|
||||
bd status
|
||||
```
|
||||
|
||||
With Dolt backend, beads changes are automatically persisted.
|
||||
|
||||
Note: We do NOT force-commit polecat work here. Their sandboxes
|
||||
are preserved with whatever state they had. They'll commit their
|
||||
own work when they resume.
|
||||
|
||||
Reference in New Issue
Block a user