Commit Graph

809 Commits

Author SHA1 Message Date
Steve Yegge
6c323b0d1f Crew startup: 'RUN IT' instead of 'AUTO-CONTINUE' for clarity 2025-12-23 00:56:26 -08:00
Steve Yegge
8f721ec4e1 bd sync: 2025-12-23 00:54:51 2025-12-23 00:54:51 -08:00
Steve Yegge
5ea4a1de37 bd sync: 2025-12-23 00:17:58 2025-12-23 00:54:10 -08:00
Steve Yegge
33cdd623bc Witness: Verify POLECAT_DONE before stopping sessions (gt-ldk8)
- Add handling for POLECAT_DONE messages in processShutdownRequests()
- Track which polecats have signaled done (using SpawnedIssues with "done:" prefix)
- For LIFECYCLE:shutdown requests, wait for POLECAT_DONE before cleanup
- Add checkPendingCompletions() to nudge polecats with closed issues
- Add 10-minute timeout with force-kill after waiting for POLECAT_DONE
- Protects against losing MR submissions when Witness cleans up too early

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:54:10 -08:00
Steve Yegge
a3c671188f feat: Auto-start refinery/witness on spawn, add refinery check to Witness patrol (gt-bjft)
Implements redundant systems to ensure infrastructure stays operational:
- gt spawn: Auto-starts refinery and witness if not running
- mol-witness-patrol: Added check-refinery step to verify refinery is alive

This ensures polecats don't wait forever for merges.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:52:45 -08:00
Steve Yegge
67d7193c61 bd sync: 2025-12-23 00:48:18 2025-12-23 00:52:23 -08:00
Steve Yegge
9ae23a2bca Add crew-state and lifecycle-hygiene doctor checks
New checks:
- crew-state: Validates crew worker state.json files for completeness
  Can regenerate missing/invalid state files with --fix

- lifecycle-hygiene: Detects stale lifecycle state that can wedge the deacon
  - Stale lifecycle messages in deacon inbox
  - Stuck requesting_* flags in state.json when session is healthy
  Can clean up with --fix (external intervention when deacon is stuck)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:48:10 -08:00
Steve Yegge
a5a37f5d63 Fix: /handoff regression - use respawn-pane with direct claude command
Three related fixes:

1. lifecycle.go: Use gt mail delete instead of gt mail read to prevent
   lifecycle requests from accumulating.

2. handoff.go: Return exec claude command for respawn-pane instead of
   gt crew at which tries to attach to existing session.

3. handoff.md skill: Work without --cycle and -m flags, send mail separately.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:23:40 -08:00
Steve Yegge
441bafe7a8 bd sync: 2025-12-23 00:20:18 2025-12-23 00:20:18 -08:00
Steve Yegge
cdb206a685 bd sync: 2025-12-23 00:19:19 2025-12-23 00:19:42 -08:00
Steve Yegge
f517d876cd bd sync: 2025-12-23 00:15:48 2025-12-23 00:19:41 -08:00
Steve Yegge
f74687486c Implement Witness handoff bead state persistence (gt-caih)
Add persistent state storage for Witness across wisp burns:
- Add WorkerState and WitnessHandoffState types
- Implement loadHandoffState/saveHandoffState for bead persistence
- Update getNudgeCount/recordNudge to use persistent state
- Add activity tracking integration into healthCheck

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:15:16 -08:00
Steve Yegge
cdc5664948 bd sync: 2025-12-23 00:12:16 2025-12-23 00:12:16 -08:00
Steve Yegge
b285fef4ea bd sync: 2025-12-23 00:11:54 2025-12-23 00:11:54 -08:00
Steve Yegge
af61daa2ee bd sync: 2025-12-23 00:11:33 2025-12-23 00:11:33 -08:00
Steve Yegge
dfcd47c228 bd sync: 2025-12-23 00:11:18 2025-12-23 00:11:28 -08:00
Steve Yegge
09b24cb975 bd sync: 2025-12-23 00:09:07 2025-12-23 00:11:28 -08:00
Steve Yegge
bae710ca26 bd sync: 2025-12-23 00:08:47 2025-12-23 00:11:28 -08:00
Steve Yegge
10a5d88958 bd sync: 2025-12-23 00:08:26 2025-12-23 00:11:28 -08:00
Steve Yegge
8d935093b3 bd sync: 2025-12-23 00:02:55 2025-12-23 00:11:28 -08:00
Steve Yegge
ab73cee853 bd sync: 2025-12-23 00:02:35 2025-12-23 00:11:28 -08:00
Steve Yegge
a52353c202 bd sync: 2025-12-22 23:58:04 2025-12-23 00:11:28 -08:00
Steve Yegge
d9eecf864c Fix crew loadState to handle empty/incomplete state.json
When state.json contains empty JSON {}, the ClonePath and other fields
were left empty, causing "can't find pane/session" errors in gt crew at.
Now backfills essential fields (Name, Rig, ClonePath) if missing.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:02:23 -08:00
Steve Yegge
378d3cd569 Fix: Self-mail should suppress tmux notification (gt-utwc) 2025-12-22 23:57:55 -08:00
Steve Yegge
9f50615bfa bd sync: 2025-12-22 23:54:45 2025-12-22 23:54:45 -08:00
Steve Yegge
cb097993df bd sync: 2025-12-22 23:53:14 2025-12-22 23:53:14 -08:00
Steve Yegge
a0d54418cb bd sync: 2025-12-22 23:53:05 2025-12-22 23:53:13 -08:00
Steve Yegge
0287aea86b bd sync: 2025-12-22 23:50:19 2025-12-22 23:53:13 -08:00
Steve Yegge
2e5fcbc307 Add gt molecule current command (gt-ay1r)
Implements a new command to query what an agent should be working on:
- Finds handoff bead by agent identity
- Parses attached molecule and tracks progress through steps
- Identifies current/next step (in_progress or first ready)
- Reports status: working, naked, complete, or blocked

Usage:
  gt molecule current [identity]
  gt mol current gastown/furiosa
  gt mol current --json

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:52:35 -08:00
Steve Yegge
3cc17d75da Add argument support to /handoff command
Now supports: /handoff let's continue with feature X

Uses Claude Code's $ARGUMENTS placeholder to pass user's
message to gt handoff --cycle -m flag.
2025-12-22 23:51:33 -08:00
Steve Yegge
dbb8f185bd Extend auto-continue to polecats (gt-rp0k)
Rename outputCrewAttachmentStatus to outputAttachmentStatus and extend
to support both RoleCrew and RolePolecat. The Propulsion Principle
("If you find something on your hook, YOU RUN IT.") now applies to
all worker types, not just crew.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:49:45 -08:00
Steve Yegge
c6c924e746 Fix builtin_molecules_test.go expectations (gt-7919)
- Update molecule count from 9 to 12 (added WitnessPatrol, etc.)
- Fix PolecatWorkMolecule: update-handoff -> exit-decision
- Fix DeaconPatrolMolecule: add trigger-pending-spawns step (7->8 steps)
- Add TestWitnessPatrolMolecule for the new molecule

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:49:02 -08:00
Steve Yegge
33dc2dbef1 Close gt-i4kq: Propulsion Principle templates complete 2025-12-22 23:48:09 -08:00
Steve Yegge
27589d5662 Update role templates for Propulsion Principle (gt-i4kq)
Apply the Universal Gas Town Propulsion Principle to all agent templates:
"If you find something on your hook, YOU RUN IT."

Changes:
- deacon.md.tmpl: Hook-first startup, no decision logic
- polecat.md.tmpl: Simplified propulsion startup, molecule-following
- witness.md.tmpl: Wisp slinging when spawning, propulsion loop
- refinery.md.tmpl: Accept slung branches, hook-based execution

Key principle: Agents don't decide whether to do work. They check their hook
and execute what's there. The hook IS the decision.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:48:04 -08:00
Steve Yegge
739e2b4d76 bd sync: 2025-12-22 23:46:48 2025-12-22 23:46:48 -08:00
Steve Yegge
a739904e79 Add mol-polecat-lease proto for Witness polecat lifecycle tracking
Semaphore molecule with 3 steps: boot, working, done.
Used by Witness to track polecat lifecycle during patrol.

Proto: gt-2k4f
Closes: gt-cp2s

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:45:08 -08:00
Steve Yegge
c6641e9d37 bd sync: 2025-12-22 23:39:24 2025-12-22 23:39:32 -08:00
Steve Yegge
3538f8b473 bd sync: 2025-12-22 23:38:40 2025-12-22 23:39:32 -08:00
Steve Yegge
82d4cd3bb2 bd sync: 2025-12-22 23:38:24 2025-12-22 23:39:32 -08:00
Steve Yegge
080714c31e bd sync: 2025-12-22 23:38:09 2025-12-22 23:39:32 -08:00
Steve Yegge
6258f0f899 bd sync: 2025-12-22 23:37:54 2025-12-22 23:39:32 -08:00
Steve Yegge
cb4029a19f bd sync: 2025-12-22 23:37:40 2025-12-22 23:39:32 -08:00
Steve Yegge
411a1180f7 bd sync: 2025-12-22 23:27:02 2025-12-22 23:39:32 -08:00
Steve Yegge
d05820d958 bd sync: 2025-12-22 23:26:42 2025-12-22 23:39:32 -08:00
Steve Yegge
65cb10de15 gt polecat git-state: Pre-kill verification command (gt-lnji)
Add git-state subcommand to gt polecat for Witness pre-kill verification.
Checks working tree, unpushed commits, and stashes to determine if a
polecat worktree is clean (safe to kill) or dirty (needs cleanup).

Usage: gt polecat git-state <rig>/<polecat> [--json]

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:38:57 -08:00
Steve Yegge
77d3e08e4e Add mol-witness-patrol molecule definition (gt-83k0)
Implements the 10-step patrol loop for the Witness role:
- inbox-check, load-state, survey-workers, inspect-workers
- decide-actions, execute-actions, save-state
- generate-summary, context-check, burn-or-loop

Key features:
- Uses wisp storage for ephemeral patrol state
- Progressive nudging (3 levels before escalate)
- Pre-kill verification before terminating polecats
- State persistence via witness handoff bead

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:38:10 -08:00
Steve Yegge
1bd925780e Fix: polecats are recycled by Witness, not handoff 2025-12-22 23:33:49 -08:00
Steve Yegge
f284941a5b Rename gt recycle to gt handoff
Consistent naming throughout:
- internal/cmd/recycle.go → handoff.go
- All variable/function names updated
- /handoff Claude Code command updated
- polecat.md prompt updated

Also includes session.go doc improvements (nudge preference).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:33:14 -08:00
Steve Yegge
b855a531eb Add /handoff command for session hot-reload
🤝 End watch. Hand off to fresh session, work continues from hook.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:29:20 -08:00
Steve Yegge
22fe745595 Add gt recycle command for instant session hot-reload
Uses tmux respawn-pane to kill and restart agent sessions in place,
bypassing the handoff/manager flow for quick context cycling.

Supports local recycle (current session) and remote recycle (other
roles) with automatic client switching.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:12:31 -08:00