- Fix CLAUDE.md: joe→max for correct crew worker identity
- Add TOML formula documentation to molecules.md
- Update wisp-architecture.md with wisp-gc docs
- Update architecture.md with bd formula commands
- Update molecular-chemistry.md with TOML examples
- Add diagnostics section to CLAUDE.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Converted all .formula.json files to .formula.toml using bd formula convert.
TOML provides better ergonomics:
- Multi-line strings without \n escaping
- Human-readable diffs
- Comments allowed
Original JSON files retained for backwards compatibility.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Implement WispGCCheck in internal/doctor/wisp_check.go
- Scans rigs for wisps older than 1 hour threshold
- Fix runs `bd --no-daemon wisp gc` in each affected rig
- Register wisp-gc check in gt doctor
- Update help text to document cleanup checks
- Simplify Deacon patrol session-gc step to just use gt doctor --fix
Now `gt doctor --fix` handles all cleanup:
- orphan-sessions: Kill orphaned tmux sessions
- orphan-processes: Kill orphaned Claude processes
- wisp-gc: Garbage collect abandoned wisps (>1h)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The previous commit only fixed wisp gc, but the session cleanup
was also using non-existent commands. Now session-gc step properly
documents:
1. gt doctor --fix for orphaned sessions and processes
2. bd --no-daemon wisp gc for orphaned wisps
Also noted that log pruning and molecule archival are handled
elsewhere (not implemented / bd mol squash|burn respectively).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The session-gc step was referencing non-existent `gt gc --wisps` command.
Updated to use the correct `bd --no-daemon wisp gc` command with examples.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extract closeDescendants() helper that:
- Recursively closes all descendants (not just direct children)
- Logs errors instead of silent failure
- Uses distinct variable names (no shadowing)
- Is reused by both burn and squash
This handles nested molecules from the Christmas Ornament pattern.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When burning or squashing a molecule, now also closes all child step
issues. Previously only the molecule attachment was detached, leaving
orphaned step issues that accumulated over time.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Renamed mol-engineer-in-box to mol-shiny across all documentation
and test code. This is a Mad Max reference - the canonical 'right
way to engineer'.
Files updated:
- docs/architecture.md (15 references)
- docs/molecules.md (7 references)
- docs/bootstrap.md (1 reference)
- docs/molecular-chemistry.md (1 reference)
- docs/polecat-wisp-architecture.md (1 reference)
- internal/beads/molecule_test.go (test function rename)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Templates now instruct agents to discover steps at runtime via
bd ready / bd show instead of listing steps inline. This prevents
duplication between templates and formula YAML.
When recreating a polecat worktree, the branch deletion might fail
silently, leaving a stale branch with old commits. The worktree would
then be created from this stale branch, missing recent main changes.
Fix:
- Add ResetBranch() method to git package for force-updating branches
- Fetch from origin before recreation to ensure fresh commits
- If branch deletion fails, force-reset the branch to origin/main
- This ensures polecats always start with the latest code
Discovered during gt-8tmz swarm when nux polecat was missing the
internal/formula/ directory that was added after its branch diverged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Clarify that mayor is a regular clone (not worktree) while refinery
and polecats are worktrees of .repo.git. Add .repo.git to ASCII
diagram and fix all references that incorrectly stated mayor was
a worktree.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Mayor is now a regular clone (doesn't need branch visibility)
- Refinery is a worktree on main (can see polecat branches, direct merge)
- This matches migrated gastown and satisfies doctor branch check
- Add .repo.git as shared bare repo for worktrees
- Update polecat manager to use bare repo when available
- Add git.NewGitWithDir() and CloneBare() for bare repo support
- Update gt rig init to create bare repo architecture for new rigs
- Refinery and polecats now share branch visibility via shared .git
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add .repo.git/ as single git source of truth
- Refinery as worktree on main (can see polecat branches)
- Document why bare repo pattern (standard git server pattern)
- Update key points for new architecture
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>