Commit Graph

488 Commits

Author SHA1 Message Date
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
Steve Yegge
5affaa5b6f bd sync: 2025-12-21 17:21:59 2025-12-21 17:23:20 -08:00
Steve Yegge
f4f22529df bd sync: 2025-12-21 16:49:30 2025-12-21 17:23:20 -08:00
Steve Yegge
5a67e22900 bd sync: 2025-12-21 16:49:10 2025-12-21 17:23:20 -08:00
Steve Yegge
41dcdf3404 bd sync: 2025-12-21 16:47:03 2025-12-21 17:23:20 -08:00
Steve Yegge
915c781d93 bd sync: 2025-12-21 16:39:04 2025-12-21 17:23:20 -08:00
Steve Yegge
c8e85e6423 bd sync: 2025-12-21 16:38:41 2025-12-21 17:23:20 -08:00
Steve Yegge
37e52ace76 bd sync: 2025-12-21 16:38:18 2025-12-21 17:23:20 -08:00
Steve Yegge
56a77e148b bd sync: 2025-12-21 16:37:55 2025-12-21 17:23:20 -08:00
Steve Yegge
34333fe3ba bd sync: 2025-12-21 16:37:32 2025-12-21 17:23:20 -08:00
Steve Yegge
2fb9ee67a5 feat(deacon): Add patrol runner context and prime support
Updates Deacon CLAUDE.md template with patrol execution instructions:
- Patrol molecule workflow (mol-deacon-patrol)
- Startup protocol: check for attached molecule, resume or bond
- Patrol execution loop: execute steps, close, loop or exit
- Nondeterministic idempotence for handoff

Enhances gt prime for Deacon:
- Adds patrol status section showing attached/naked state
- Shows molecule progress when patrol is in progress
- Includes Deacon-specific startup directive

Also adds standalone prompts/roles/deacon.md for reference.

Closes: gt-rana.4

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 16:47:47 -08:00
Steve Yegge
177eacf1d2 docs: Add bd mol bond/squash/burn CLI reference to molecules.md
Added comprehensive CLI reference documentation for the three molecule
lifecycle commands:

- bd mol bond: Instantiate proto into Mol (durable) or Wisp (ephemeral)
- bd mol squash: Complete molecule and generate digest
- bd mol burn: Abandon molecule without digest

Includes argument tables, behavior descriptions, examples, and a
lifecycle diagram showing the steam engine metaphor mapping.

Closes: gt-odvf

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 16:47:02 -08:00
Steve Yegge
0b25f4343b docs: Add molecule phase lifecycle diagram to architecture.md
Add visual diagram showing Proto → Mol/Wisp → Digest state transitions
with the "states of matter" metaphor (crystal → liquid/gas → distillate).

Document when to use Mol (durable) vs Wisp (ephemeral) based on audit
requirements and work importance.

Closes: gt-c6zs

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 16:46:25 -08:00
Steve Yegge
bab5336be5 bd sync: 2025-12-21 16:37:09 2025-12-21 16:46:25 -08:00
Steve Yegge
4756aeec06 bd sync: 2025-12-21 16:35:21 2025-12-21 16:46:25 -08:00
Steve Yegge
844d3ceb1d bd sync: 2025-12-21 16:33:32 2025-12-21 16:46:25 -08:00
Steve Yegge
6d552d9840 bd sync: 2025-12-21 16:28:21 2025-12-21 16:46:25 -08:00
Steve Yegge
9827884548 bd sync: 2025-12-21 16:27:58 2025-12-21 16:46:25 -08:00
Steve Yegge
75dd428bad bd sync: 2025-12-21 16:17:35 2025-12-21 16:46:25 -08:00
Steve Yegge
7ba8c44dec bd sync: 2025-12-21 16:17:25 2025-12-21 16:46:25 -08:00
Steve Yegge
edcca1e8a3 bd sync: 2025-12-21 16:12:06 2025-12-21 16:46:25 -08:00
Steve Yegge
e871a084bf feat(tmux): add role icons to left side of status bar
Shows icon before brackets: 😺 [gastown/Rictus] polecat

Existing sessions need restart to see the change.
2025-12-21 16:33:37 -08:00