feat: Complete agent bead lifecycle for ZFC compliance

Changes:
1. prime.go: Create agent beads on first prime for all roles including crew
2. done.go: Update agent state to done/stuck/idle when work completes
3. sling.go: Populate hook_bead when work is assigned to agents
4. mol-witness-patrol.formula.toml: Document dead and spawning states

Closes: gt-hymm0, gt-0lop3, gt-59k2x, gt-c4j4j

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-28 09:56:59 -08:00
parent 76b969fb2e
commit 34ccd121e8
4 changed files with 187 additions and 3 deletions

View File

@@ -187,8 +187,10 @@ Each polecat agent bead has fields in its description:
|-------------|---------|--------|
| running | Actively working | Check progress (Step 3) |
| idle | No work assigned | Skip (no action needed) |
| stuck | Self-reported stuck | Handle stuck protocol |
| done | Work complete | Verify cleanup triggered (see Step 4a) |
| stuck | Self-reported stuck (via gt done --exit ESCALATED) | Handle stuck protocol |
| done | Work complete (via gt done) | Verify cleanup triggered (see Step 4a) |
| dead | Marked dead by daemon (unresponsive) | Clean up and respawn |
| spawning | Recently created, initializing | Wait for running state |
**Step 3: For running polecats, assess progress**
@@ -216,6 +218,8 @@ Look for:
| agent_state=running, idle 15+ min | Direct nudge with deadline |
| agent_state=stuck | Assess and help or escalate |
| agent_state=done | Verify cleanup triggered (see Step 4a) |
| agent_state=dead | Create cleanup wisp, mark for respawn if needed |
| agent_state=spawning | Check if stuck in spawn; if >2 min, investigate |
**Step 4a: Handle agent_state=done**