Commit Graph

2360 Commits

Author SHA1 Message Date
Steve Yegge
0b5fda69fd Add patrol awareness and wiring to gt rig add / gt doctor (gt-7923)
gt rig add changes:
- Seed patrol molecules (Deacon, Witness, Refinery) when adding rig
- Create plugin directories at town (~gt/plugins/) and rig levels
- Update command documentation and structure output

gt doctor changes:
- patrol-molecules-exist: Verify patrol molecules exist
- patrol-hooks-wired: Verify daemon triggers patrols
- patrol-not-stuck: Detect stale wisps (>1h in_progress)
- patrol-plugins-accessible: Verify plugin directories exist
- patrol-roles-have-prompts: Verify role prompts exist

All patrol checks support --fix where applicable.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:17:32 -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
7f79376d4d bd sync: 2025-12-23 00:12:05 2025-12-23 00:12:05 -08:00
Steve Yegge
40a4d2edb2 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:11:56 -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
8bb0ad8e40 Close gt-j6s8: Refinery patrol auto-bond implemented 2025-12-23 00:11:07 -08:00
Steve Yegge
ef1f5ac2f3 Refinery startup: auto-bond mol-refinery-patrol on start
Add outputRefineryPatrolContext to gt prime that automatically spawns
the refinery patrol molecule when no active patrol is found. This ensures
the merge queue is always monitored when Refinery starts up.

Key changes:
- Add RoleRefinery to outputMoleculeContext
- Implement outputRefineryPatrolContext with auto-spawn logic
- Check for existing in-progress or open patrol molecules
- Spawn mol-refinery-patrol wisp if none found

(gt-j6s8)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:10:39 -08:00
Steve Yegge
66710aef69 bd sync: 2025-12-23 00:08:26 2025-12-23 00:08:26 -08:00
Steve Yegge
d30a428447 bd sync: 2025-12-23 00:02:55 2025-12-23 00:02:55 -08:00
Steve Yegge
21b3b626c8 bd sync: 2025-12-23 00:02:35 2025-12-23 00:02:35 -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
1832ee321c bd sync: 2025-12-22 23:58:04 2025-12-22 23:58:24 -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
3ce316641b bd sync: 2025-12-22 23:48:56 2025-12-22 23:48:56 -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
2f06c1333e bd sync: 2025-12-22 23:40:37 2025-12-22 23:40:37 -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
06916e44fb bd sync: 2025-12-22 23:35:24 2025-12-22 23:35:24 -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