Commit Graph

750 Commits

Author SHA1 Message Date
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
Steve Yegge
35ea74de16 Add gt start --all to start witnesses and refineries for all rigs
Simplifies startup from:
  gt start && gt witness start gastown && gt refinery start gastown && ...

To:
  gt start --all

Discovers all registered rigs and starts their witness and refinery sessions.
2025-12-22 20:18:34 -08:00
Steve Yegge
3d3227fe4d Fix witness tmux session naming to match gt-<rig>-<role> pattern 2025-12-22 20:11:05 -08:00
Steve Yegge
259d635d67 Fix deacon role detection: start in deacon/ directory
The deacon was being detected as Mayor because it started in ~/gt (town root).
Now starts in ~/gt/deacon/ so gt prime correctly detects RoleDeacon.

Also ensures deacon directory exists on start.
2025-12-22 20:08:28 -08:00
Steve Yegge
0159d6be8b bd sync: 2025-12-22 18:00:14 2025-12-22 18:01:02 -08:00
Steve Yegge
df0495be32 feat(tui): add self-documenting help with ASCII diagrams and table helpers
TUI improvements for Christmas launch:
- Add phase transition table and lifecycle diagram to `gt molecule --help`
- Add swarm lifecycle diagram to `gt swarm --help`
- Add mail routing diagram to `gt mail --help`
- Add sling mechanics diagram to `gt sling --help`
- Create Lipgloss table helper (internal/style/table.go)
- Migrate mq_list to use styled tables with color-coded priorities
- Migrate molecule list to use styled tables
- Add fuzzy matching "did you mean" suggestions for polecat not found errors
- Add suggest package with Levenshtein distance implementation

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 17:52:44 -08:00
Steve Yegge
469ba5c488 bd sync: 2025-12-22 17:52:18 2025-12-22 17:52:18 -08:00
Steve Yegge
59d656470e Add Claude settings templates for autonomous roles (gt-6957)
- Create internal/claude package with embedded settings templates
- settings-autonomous.json: gt prime && gt mail check --inject (SessionStart)
- settings-interactive.json: gt prime only (SessionStart)

- Update witness.go: EnsureSettings before session, remove broken gt prime injection
- Update refinery/manager.go: EnsureSettings before session, remove broken NudgeSession
- Update session/manager.go: EnsureSettings for polecats, remove broken issue injection

All autonomous roles (polecat, witness, refinery) now get proper SessionStart hooks
automatically when their sessions are created. No more timing-based gt prime injection.
2025-12-22 17:51:15 -08:00
Steve Yegge
588c0f5c42 Fix spawn priming race: use deacon patrol instead of broken nudge (gt-6957)
- Remove 3-second sleep and NudgeSession from spawn.go
  (Claude takes 10-20s to initialize, message arrived too early)
- Add trigger-pending-spawns step to deacon patrol molecule
  (Deacon polls with WaitForClaudeReady, sends trigger when ready)
- SessionStart hook handles gt prime (internal, reliable)
- Deacon sends minimal 'Begin.' trigger to start polecat working

The spawn command now returns immediately after starting the session.
The deacon's patrol cycle will trigger the polecat when it's ready.
2025-12-22 17:30:41 -08:00
Steve Yegge
48aa3e6d2d bd sync: 2025-12-22 17:16:15 2025-12-22 17:16:23 -08:00
Steve Yegge
f32143de6f feat(doctor): add linked-panes check for tmux session crosstalk (gt-uohw)
Detects when multiple gt-* tmux sessions share the same pane,
which causes messages sent to one session to appear in another.

This catches the bug where gt-deacon and gt-mayor shared a pane,
causing daemon heartbeats to appear as user input in the Mayor.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 17:16:03 -08:00
Steve Yegge
17db09ba63 bd sync: 2025-12-22 17:13:11 2025-12-22 17:13:11 -08:00
Steve Yegge
87b769d0e9 bd sync: 2025-12-22 17:08:20 2025-12-22 17:08:20 -08:00
Steve Yegge
16a2c3ec99 bd sync: 2025-12-22 17:00:50 2025-12-22 17:00:50 -08:00
Steve Yegge
4d7d770c26 bd sync: 2025-12-22 16:18:59 2025-12-22 16:18:59 -08:00
Steve Yegge
d39e355450 bd sync: 2025-12-22 16:18:13 2025-12-22 16:18:13 -08:00
Steve Yegge
eaa1f8d34d bd sync: 2025-12-22 16:09:10 2025-12-22 16:14:52 -08:00
Steve Yegge
6ec6fb0d4d feat(prime): Add crew auto-continue for attached work (gt-9g82)
Updates crew worker startup to detect and auto-continue attached molecules:

- prime.go: Add outputCrewAttachmentStatus() that detects pinned beads
  with attached molecules and outputs "AUTO-CONTINUE MODE" directive
- prime.go: Update startup directive to explain the auto-continue pattern
- crew.md: Add "Session Wisp Model" section documenting autonomous work

Key insight: if attached work exists, continue without awaiting input.
This enables overnight autonomous work on long molecules.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 16:14:44 -08:00
Steve Yegge
b71c188cfb feat(mol): Add session wisps for crew and polecat workers (gt-9g82)
Introduces Proto → Wisp → Mol architecture for agent sessions:

- mol-crew-session: Light harness enabling autonomous overnight work
  Key insight: if attached mol exists, continue without awaiting input

- mol-polecat-session: One-shot wisp wrapping polecat work assignments
  Handles onboard → execute → cleanup lifecycle

This separates "how to work" (proto) from "what to work on" (mol),
enabling session continuity and autonomous long-mol processing.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 16:08:59 -08:00
Steve Yegge
7a8675255b Merge polecat/slit: Propulsion Principle docs (gt-7hor) 2025-12-22 16:00:43 -08:00
Steve Yegge
7d6510b1ab Merge polecat/furiosa: gt sling command (gt-4ev4) 2025-12-22 15:59:55 -08:00
Steve Yegge
a0b5b21353 bd sync: 2025-12-22 15:57:02 2025-12-22 15:57:02 -08:00
Steve Yegge
e9587bf045 Smart attach: link window when inside tmux
When 'gt X attach' is run from inside a tmux session, link the target
session's window as a new tab instead of switching sessions entirely.
Use C-b n/p to navigate between tabs.

Outside tmux: unchanged behavior (full attach)
Inside tmux: links window as tab for convenient multi-session viewing

- Add tmux.LinkWindow() and tmux.IsInsideTmux()
- Update attachToTmuxSession() with smart detection
- Update mayor, deacon, crew, refinery attach commands
2025-12-22 15:42:37 -08:00
Steve Yegge
fcda775db3 bd sync: 2025-12-22 15:16:28 2025-12-22 15:42:37 -08:00
Steve Yegge
1eea2f4e1e bd sync: 2025-12-22 15:06:18 2025-12-22 15:42:37 -08:00
Steve Yegge
1a1e49ae72 docs(polecat): Add molecule protocol with reified exit-decision step
Updates mol-polecat-work and polecat.md with comprehensive molecule protocol:

Molecule changes:
- Added exit-decision step as convergence point for all exits
- Four exit types: COMPLETED, BLOCKED, REFACTOR, ESCALATE
- Non-linear jumps allowed from any step to exit-decision
- Dynamic modifications allowed (add steps, file work, refresh)

Polecat role documentation:
- Full molecule protocol section explaining the contract
- Exit strategies with concrete commands
- Wisps vs Molecules comparison for context
- Session continuity for multi-session work
- Updated exit checklist

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 15:40:37 -08:00
Steve Yegge
56bcdad323 feat(rig): Add gt rig reset --stale to clear orphaned in_progress issues (gt-lek6)
Adds --stale flag to gt rig reset that:
- Lists all in_progress issues
- Checks if assignee tmux session exists
- Resets orphans to open status with empty assignee
- Skips crew/* assignees (persistent identities)

Also adds --dry-run flag to preview what would be reset.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 15:16:14 -08:00
Steve Yegge
1111ba7596 docs: Add no-PR instructions to polecat onboarding (gt-drbd)
Update mol-polecat-work submit-merge step and polecat.md role docs
to explicitly forbid GitHub PRs and direct to beads merge-requests.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 15:06:10 -08:00
Steve Yegge
a40ce5b7b8 bd sync: 2025-12-22 14:55:02 2025-12-22 14:55:02 -08:00
Steve Yegge
8f47c92c00 Add patrol banners to deacon template (gt-h28m)
- Startup banner with  DEACON STARTING
- Step banners with emoji for each patrol atom
- Cycle summary banner before squash
- Emoji table: 📥 inbox, 🏥 health, 🔌 plugin, 👻 orphan, 🧹 gc, 🧠 context, 🔄 loop
2025-12-22 14:54:46 -08:00
Steve Yegge
21b495fac2 bd sync: 2025-12-22 14:34:53 2025-12-22 14:34:53 -08:00
Steve Yegge
da662a6aea bd sync: 2025-12-22 14:34:46 2025-12-22 14:34:46 -08:00
Steve Yegge
d340b68788 bd sync: 2025-12-22 14:34:10 2025-12-22 14:34:46 -08:00
Steve Yegge
ba1502e707 bd sync: 2025-12-22 13:20:17 2025-12-22 14:34:46 -08:00
Steve Yegge
d09d584094 bd sync: 2025-12-22 13:08:34 2025-12-22 14:34:46 -08:00
Steve Yegge
18152b73ff fix(refinery): Use NudgeSession for reliable gt prime delivery
Wait for Claude to start before sending the prime command, and use
NudgeSession (with 500ms debounce) instead of SendKeysDelayed for
reliable message delivery.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 14:23:16 -08:00
Steve Yegge
3559fe9aee fix(refinery): Use TTY-forwarding attach for refinery sessions
Use attachToTmuxSession helper instead of tmux.AttachSession to properly
forward stdin/stdout/stderr when attaching.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 14:14:11 -08:00
Steve Yegge
bcaa55e09a feat(refinery): Auto-start refinery on attach if not running
Like gt crew at and gt mayor at, gt refinery attach now auto-starts
the refinery session if it is not already running.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 14:12:41 -08:00
Steve Yegge
dc7cad1a04 feat: Enable command prefix matching for all gt subcommands
Allows shorthand like 'gt ref at' for 'gt refinery attach'.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 14:09:25 -08:00
Steve Yegge
db87ec7b7b feat(refinery): Auto-detect rig from cwd for refinery commands
All gt refinery subcommands (start, stop, status, queue, attach) now
accept an optional rig argument. If not provided, the rig is inferred
from the current working directory.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 13:38:31 -08:00
Steve Yegge
adfa4d5451 bd sync: add gt-7921, gt-7922, gt-7923 (patrol architecture) 2025-12-22 13:25:00 -08:00
Steve Yegge
58ff4c1750 Add gt mol catalog/burn/squash, wire wisp flag, update deacon prompt
- gt mol catalog: list available molecule protos
- gt mol burn: burn current molecule without digest
- gt mol squash: compress molecule into digest
- Wire --wisp flag in gt sling to use .beads-wisp/ storage
- Add IsWisp field to MoleculeContext
- Update prompts/roles/deacon.md with correct commands

Closes: gt-x74c, gt-9t14, gt-i4i2

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

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