Commit Graph

509 Commits

Author SHA1 Message Date
Steve Yegge
b254b4b3f8 Add clickable mail preview in tmux status bar
- New `gt mail peek` command shows compact preview of first unread message
- Left-click on status-right (mail icon area) opens popup with mail preview
- Popup shows subject, sender, body preview (truncated to 500 chars)
- Shows count of additional unread messages if any
- Silent exit (code 1) when no unread mail

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:14:08 -08:00
Steve Yegge
19fd7e05b2 Fix witness session parsing in categorizeSession
Witness sessions use format gt-witness-<rig> but categorizeSession was
parsing them as gt-<rig>-<type>, incorrectly setting Rig="witness".
This caused the mayor status line to count "witness" as a third rig.

Added special case to handle gt-witness-<rig> format before the generic
rig-level parsing. Also updated tests to cover both actual and legacy formats.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:07:52 -08:00
Steve Yegge
53d9d7349d fix(polecat): Remove git push instruction - use merge queue instead
Polecats should not push their branches to origin directly.
They submit work via `gt done` which goes through the merge queue.
The Refinery handles merging to main.

This was causing stale polecat branches to accumulate on origin.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:07:03 -08:00
Steve Yegge
0e942c71f2 Add cross-project dependency design and update molecules doc (gt-hbg5)
New design for tracking dependencies across project boundaries:
- Capability-based: reference provides:X labels, not issue IDs
- bd ship command for publishing capabilities
- external: prefix in blocked_by for cross-project refs
- Molecule parking for blocked work

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:41:07 -08:00
Steve Yegge
33288cef3c bd sync: 2025-12-21 22:40:56 2025-12-21 22:40:56 -08:00
Steve Yegge
12e3fa01a4 bd sync: 2025-12-21 22:20:17 2025-12-21 22:20:17 -08:00
Steve Yegge
61d1973c6d bd sync: 2025-12-21 22:18:15 2025-12-21 22:18:15 -08:00
Steve Yegge
2a8ae43041 refactor(refinery): use io.Writer instead of fmt.Print for output
Add output field (io.Writer) to Manager and Engineer structs with
SetOutput() methods to enable testability and output redirection.

Replace all 30+ fmt.Printf/Println calls with fmt.Fprintf/Fprintln
using the configurable output writer, defaulting to os.Stdout.

This enables:
- Testing output without capturing stdout
- Redirecting output in different contexts
- Following cobra best practices

Closes: gt-cvfg

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:18:10 -08:00
Steve Yegge
b31e8bc72c bd sync: 2025-12-21 22:13:25 2025-12-21 22:13:25 -08:00
Steve Yegge
db3fee8088 refactor: add constants package for magic strings
Create internal/constants/constants.go with centralized definitions for:
- Directory names (mayor, polecats, crew, etc.)
- File names (rigs.json, town.json, state.json)
- Git branch names (main, beads-sync)
- Tmux session names (gt-mayor, gt-deacon)
- Agent role names

Add helper functions for common path construction:
- MayorRigsPath(), MayorTownPath(), MayorStatePath()
- RigMayorPath(), RigBeadsPath(), RigPolecatsPath()

Update key files to use the new constants:
- internal/cmd/rig_helpers.go
- internal/cmd/status.go
- internal/daemon/daemon.go

Closes: gt-xnql

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:13:21 -08:00
Steve Yegge
8979d8112b bd sync: 2025-12-21 22:07:42 2025-12-21 22:07:42 -08:00
Steve Yegge
7234a4847c bd sync: 2025-12-21 21:59:54 2025-12-21 22:00:02 -08:00
Steve Yegge
bc334502cf Simplify spawn.go to use bd mol run for molecules (gt-47tq)
Replace 95 lines of custom molecule instantiation with bd mol run:
- No more ephemeral beads layer
- No more manual molecule template handling
- bd mol run handles spawning, assignment, and pinning

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:00:02 -08:00
Steve Yegge
b8e8237dbc bd sync: 2025-12-21 21:58:53 2025-12-21 22:00:02 -08:00
Steve Yegge
43dfd768b6 bd sync: 2025-12-21 21:57:29 2025-12-21 22:00:02 -08:00
Steve Yegge
eb92b63847 bd sync: 2025-12-21 21:55:53 2025-12-21 22:00:02 -08:00
Steve Yegge
2315c5341c feat(witness): implement epic child filtering for auto-spawn
Add isChildOfEpic() function that checks if an issue is a child of
the configured epic by verifying the issue has the epic in its
dependents with dependency_type="blocks".

When EpicID is configured in witness config, only issues that block
that epic will be considered for auto-spawning. Issues that cannot
be verified are safely skipped.

Closes gt-zhm5.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:55:48 -08:00
Steve Yegge
89d6722e44 chore(style): remove unused helper functions
Remove RenderSuccess, RenderWarning, RenderError, and RenderInfo
functions that were never used. The codebase uses style.SuccessPrefix
and style.Success.Render() directly instead.

Closes gt-nz6t.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:51:02 -08:00
Steve Yegge
5a1b5e6d62 bd sync: 2025-12-21 21:50:57 2025-12-21 21:50:57 -08:00
Steve Yegge
f80d17b524 bd sync: 2025-12-21 21:50:37 2025-12-21 21:50:37 -08:00
Steve Yegge
fbd9c8ec47 bd sync: 2025-12-21 21:49:16 2025-12-21 21:49:27 -08:00
Steve Yegge
45ccce0f2b feat(beads): add cycle detection for molecule dependencies
Implement DFS-based cycle detection in ValidateMolecule to catch
circular dependencies in molecule step graphs. The algorithm uses
three-color marking (unvisited/visiting/visited) to detect back
edges that indicate cycles.

When a cycle is detected, the error message shows the cycle path
(e.g., "a -> b -> c -> a") for easy debugging.

Add 4 new tests:
- SimpleCycle: A -> B -> A
- LongerCycle: A -> B -> C -> A
- DiamondNoCycle: ensures valid diamond patterns pass
- CycleInSubgraph: cycle not involving root node

Closes gt-ai1z.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:49:07 -08:00
Steve Yegge
887e2f25e4 refactor(cmd): extract common manager creation boilerplate
Add getRig() helper in rig_helpers.go that encapsulates the common
boilerplate for finding town root, loading rigs config, and retrieving
a rig. This reduces duplication across 5 get*Manager functions:
- getPolecatManager
- getSessionManager
- getCrewManager
- getRefineryManager
- getWitnessManager

Closes gt-7sqi.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:46:10 -08:00
Steve Yegge
9f5565e8b0 bd sync: 2025-12-21 21:45:59 2025-12-21 21:45:59 -08:00
Steve Yegge
72081b3336 docs: clarify pinned molecule vs handoff mail distinction
Two mechanisms, different purposes:
- Pinned molecule (bd mol run) = What you are working on, tracked by beads
- Handoff mail = Optional context notes for session restarts

Updated templates, architecture.md, and builtin_molecules.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:41:39 -08:00
Steve Yegge
fea0fe6900 bd sync: 2025-12-21 21:37:51 2025-12-21 21:37:51 -08:00
Steve Yegge
05c8a208a3 bd sync: 2025-12-21 21:35:34 2025-12-21 21:35:34 -08:00
Steve Yegge
ce90116d83 bd sync: 2025-12-21 21:16:59 2025-12-21 21:17:08 -08:00
Steve Yegge
6051e21015 fix(beads): Auto-create .beads/redirect for crew and polecats
Fixes gt-b6qm: redirect files can get deleted by git clean, causing
"no beads database found" errors.

Changes:
- crew.Manager.Add() now creates .beads/redirect during setup
- gt prime regenerates missing redirects silently on startup

The redirect points to the shared beads database at either:
- rig/mayor/rig/.beads/ (preferred)
- rig/.beads/ (fallback)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:16:45 -08:00
Steve Yegge
a0d13e32aa bd sync: 2025-12-21 21:14:33 2025-12-21 21:14:33 -08:00
Steve Yegge
b92166b3d9 bd sync: 2025-12-21 21:03:32 2025-12-21 21:03:42 -08:00
Steve Yegge
c9014dbb59 bd sync: 2025-12-21 18:49:09 2025-12-21 21:03:42 -08:00
Steve Yegge
71a1c83e80 bd sync: 2025-12-21 18:48:48 2025-12-21 21:03:42 -08:00
Steve Yegge
7af4549789 bd sync: 2025-12-21 18:28:51 2025-12-21 21:03:42 -08:00
Steve Yegge
897b3cdb1d feat(statusline): Add deacon status line with owl icon
Shows: 🦉 N rigs | 📬 N (unread mail)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 18:11:06 -08:00
Steve Yegge
d48bc8b35f bd sync: 2025-12-21 18:05:18 2025-12-21 18:05:18 -08:00
Steve Yegge
e4d0616cc9 bd sync: 2025-12-21 18:04:59 2025-12-21 18:04:59 -08:00
Steve Yegge
0752a66059 bd sync: 2025-12-21 18:04:27 2025-12-21 18:04:27 -08:00
Steve Yegge
ed136f8b0a bd sync: 2025-12-21 17:53:43 2025-12-21 17:53:43 -08:00
Steve Yegge
a4337a133b docs: Add deacon plugin system design
- New docs/deacon-plugins.md with full plugin architecture
- Directory-based discovery at ~/gt/plugins/
- Gate types: cooldown, cron, condition, event
- Parallel execution support via Task tool subagents
- Updated mol-deacon-patrol plugin-run step to reference new docs

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 17:42:05 -08:00
Steve Yegge
ab49e13596 bd sync: 2025-12-21 17:30:06 2025-12-21 17:30:06 -08:00
Steve Yegge
01bdb95f4c bd sync: 2025-12-21 17:26:39 2025-12-21 17:26:39 -08:00
Steve Yegge
506bb48c73 bd sync: 2025-12-21 17:26:20 2025-12-21 17:26:20 -08:00
Steve Yegge
d471c1c080 bd sync: 2025-12-21 17:25:40 2025-12-21 17:25:40 -08:00
Steve Yegge
eea437c69e bd sync: 2025-12-21 17:25:15 2025-12-21 17:25:15 -08:00
Steve Yegge
6a77bfeed7 bd sync: 2025-12-21 17:25:07 2025-12-21 17:25:07 -08:00
Steve Yegge
095f71109b bd sync: 2025-12-21 17:23:59 2025-12-21 17:23:59 -08:00
Steve Yegge
fa7ae262ab bd sync: beads state 2025-12-21 17:23:51 -08:00
Steve Yegge
849ba242a9 fix(mq): push branch to origin before creating MR
CRITICAL FIX: Both `gt done` and `gt mq submit` were creating MR
records without pushing the branch to origin first. When polecat
worktrees were deleted, the unpushed branches were lost forever.

This caused 12 MQ items to become orphaned - merge requests existed
but their branches had vanished.

The fix adds a mandatory `git push origin <branch>` before creating
the MR record. If push fails, the MR is not created.

Fixes: gt-aqku

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 17:23:22 -08:00
Steve Yegge
7badab8a71 bd sync: rig beads state 2025-12-21 17:23:20 -08:00