Commit Graph

791 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
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
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
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
Steve Yegge
c134a7bd01 bd sync: 2025-12-22 23:12:09 2025-12-22 23:12:09 -08:00
Steve Yegge
c5040989d0 bd sync: 2025-12-22 22:57:05 2025-12-22 22:57:15 -08:00
Steve Yegge
f4c5061667 bd sync: 2025-12-22 22:55:52 2025-12-22 22:57:15 -08:00
Steve Yegge
9de90dca56 gt done: Notify Witness with exit outcome (gt-jzot)
Added --exit flag for exit type (COMPLETED, ESCALATED, DEFERRED).
When polecat runs gt done, it now sends mail to Witness with:
- Exit type (COMPLETED, ESCALATED, or DEFERRED)
- Issue ID (if available)
- MR ID (for COMPLETED)
- Branch name

For ESCALATED and DEFERRED, skips MR submission but still notifies
Witness. This enables Witness patrol to see completion in inbox-check
step, verify git state, and close polecat lease.

Paired with spawn notification (gt-r6td) to bracket polecat lifecycle.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 22:56:38 -08:00
Steve Yegge
149d618286 gt spawn: Notify Deacon and Witness on polecat start (gt-r6td)
When gt spawn creates a polecat, it now sends POLECAT_STARTED notifications
to both Witness and Deacon:

- Witness receives: "POLECAT_STARTED <polecat>" with issue and session info
- Deacon receives: "POLECAT_STARTED <rig>/<polecat>" with issue and session info

This enables:
- Witness to bond a lease to its patrol wisp
- Deacon to verify worker started (redundancy)
- Both to nudge if worker is idle at prompt

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 22:55:13 -08:00
Steve Yegge
5d870da121 bd sync: 2025-12-22 22:49:20 2025-12-22 22:49:20 -08:00
Steve Yegge
e6ee93d2c1 bd sync: 2025-12-22 22:49:04 2025-12-22 22:49:04 -08:00
Steve Yegge
b4e0caf0f6 bd sync: 2025-12-22 22:21:15 2025-12-22 22:21:30 -08:00
Steve Yegge
6034ec459a Close gt-oiv0: Remove bd sync from polecat startup 2025-12-22 22:19:45 -08:00
Steve Yegge
f23dadc8d1 Remove bd sync --from-main from polecat startup workflow
Polecats already have synced beads at spawn time (spawn command syncs before
spawning). Multiple polecats starting simultaneously were all trying to sync
the same shared beads, causing git conflicts/failures.

Fixes gt-oiv0

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 22:19:12 -08:00
Steve Yegge
03368b86f5 bd sync: 2025-12-22 22:11:02 2025-12-22 22:11:02 -08:00
Steve Yegge
c9dcaf0c51 bd sync: 2025-12-22 22:04:04 2025-12-22 22:04:11 -08:00
Steve Yegge
1bac250f5d bd sync: 2025-12-22 21:44:35 2025-12-22 22:04:11 -08:00
Steve Yegge
552a8cc76a bd sync: 2025-12-22 21:43:41 2025-12-22 22:04:11 -08:00
Steve Yegge
bfeacf2a36 bd sync: 2025-12-22 21:22:24 2025-12-22 22:04:11 -08:00
Steve Yegge
5732218da3 Clean up redundant 'ephemeral' terminology in wisp docs (gt-3x0z.11)
Remove redundant phrases like 'ephemeral wisp' and 'ephemeral molecule'
since wisp already implies ephemeral. Keep 'ephemeral' only where it is
definitional (explaining what wisps are) or contrasting (vs durable mol).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 21:43:27 -08:00
Steve Yegge
a2a226de7d Add --force/-f flag to gt shutdown to skip confirmation prompt 2025-12-22 20:31:33 -08:00
Steve Yegge
0a135b2cd3 Add refineries to gt up boot sequence 2025-12-22 20:19:33 -08:00