Commit Graph

1351 Commits

Author SHA1 Message Date
Steve Yegge
99b1a11cbd Make mol-town-shutdown idempotent and safe (gt-ioij)
v2 changes:
- Add preflight-check step (scan for blockers/warnings)
- Rename kill-polecats → stop-sessions (preserve sandboxes)
- Stop Claude processes but leave git clones and hooks intact
- Polecats can resume from hooks after restart
- Don't clear crew inboxes (user-managed)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 23:04:51 -08:00
Steve Yegge
5f9c4a335a bd sync: 2025-12-25 23:00:14 2025-12-25 23:00:29 -08:00
Steve Yegge
47168adc1e Add mol-town-shutdown formula for clean town reboot (gt-ioij)
Steps: clear inboxes, kill polecats, stop daemon, rotate logs,
sync state, send handoff, restart daemon.

Usage: gt sling mol-town-shutdown mayor

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 23:00:08 -08:00
Steve Yegge
1efa5b1ff8 bd sync: 2025-12-25 22:59:49 2025-12-25 22:59:49 -08:00
Steve Yegge
1cec13da74 Fix bd mol -> gt mol command references in docs (gt-ingm.5)
bd mol does not have attach/detach commands - those are Gas Town
orchestrator concerns, so they live in gt mol.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:55:11 -08:00
Steve Yegge
cac69a2172 bd sync: 2025-12-25 22:55:01 2025-12-25 22:55:01 -08:00
Steve Yegge
8f910bbf4c bd sync: 2025-12-25 22:45:45 2025-12-25 22:45:58 -08:00
Steve Yegge
f7d7f27d92 Fix gt sling code review issues (gt-z9qoo)
- Fix hook location for remote targets using tmux.GetPaneWorkDir()
- Add --var/--on conflict error check
- Add warning for JSON parse fallback (not yet fatal)
- Capture stderr for wisp command
- Remove dead code: detectAgentIdentity(), detectAgentIdentityForHook(),
  detectCloneRootForHook()
- Extract resolveSelfTarget() helper to reduce role-switching duplication

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:45:33 -08:00
Steve Yegge
954457731d bd sync: 2025-12-25 22:45:07 2025-12-25 22:45:07 -08:00
Steve Yegge
cb47c2a790 bd sync: close gt-twjr5.2 (timer gate evaluation) 2025-12-25 22:36:48 -08:00
Steve Yegge
48c0647e47 bd sync 2025-12-25 22:35:10 -08:00
Steve Yegge
86c278fbad Add directory discipline section to mayor priming
- Fix gastown/mayor/rig/CLAUDE.md (had wrong crew content)
- Add CRITICAL: Directory Discipline section to mayor.md.tmpl
- Emphasizes working from mayor/rig/, not crew/* or town root
2025-12-25 22:35:10 -08:00
Steve Yegge
4b02178987 bd sync: 2025-12-25 22:33:32 2025-12-25 22:35:10 -08:00
Steve Yegge
f82d06a82b bd sync: 2025-12-25 22:29:32 2025-12-25 22:35:10 -08:00
Steve Yegge
9daee341ac gt sling: support standalone formula slinging (gt-z9qoo)
When first arg is a formula (not a bead), sling now:
1. Cooks the formula (bd cook)
2. Creates a wisp instance (bd wisp)
3. Attaches the wisp to the target hook
4. Nudges the target to start

New flags:
- --var key=value: Pass variables to formula (repeatable)

Examples:
  gt sling mol-town-shutdown mayor/
  gt sling towers-of-hanoi --var disks=3

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:33:25 -08:00
Steve Yegge
e7dfc58a02 Add gate-evaluation step to Deacon patrol (gt-twjr5.2)
New step evaluates pending async gates each patrol cycle:
- Lists open gates via bd gate list
- For timer gates, checks if elapsed time exceeds timeout
- Closes elapsed gates and notifies waiters
- Runs in parallel with trigger-pending-spawns

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:29:27 -08:00
Steve Yegge
39faf79322 Fix polecat auto-start by triggering pending spawns in daemon heartbeat (gt-iu23)
The daemon now calls triggerPendingSpawns() on each heartbeat, which:
- Checks for POLECAT_STARTED messages in Deacon inbox
- Polls pending spawns with WaitForClaudeReady (2s timeout)
- Nudges ready polecats with Begin message
- Prunes stale pending spawns (>5 min old)

This ensures polecats get triggered even when Deacon is not in an
active patrol cycle. Uses bootstrap mode regex detection which
is acceptable for daemon operations.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:13:31 -08:00
Steve Yegge
9fff048744 bd sync: 2025-12-25 22:13:20 2025-12-25 22:13:20 -08:00
Steve Yegge
103076cf17 bd sync: 2025-12-25 22:12:49 2025-12-25 22:12:49 -08:00
Steve Yegge
727e337bd8 bd sync: 2025-12-25 22:09:00 2025-12-25 22:09:00 -08:00
Steve Yegge
57a84c6bad Update documentation and priming (gt-xmyha)
- 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>
2025-12-25 22:06:05 -08:00
Steve Yegge
f7e29236d1 Fix dry-run bug in gt handoff - check before side effects (gt-sq0t3) 2025-12-25 22:06:05 -08:00
Steve Yegge
fa0a5b1288 bd sync: 2025-12-25 22:05:54 2025-12-25 22:05:54 -08:00
Steve Yegge
58147e5318 bd sync: 2025-12-25 22:03:22 2025-12-25 22:03:22 -08:00
Steve Yegge
4a22df2093 bd sync: 2025-12-25 22:00:29 2025-12-25 22:00:37 -08:00
Steve Yegge
60556534da Add TOML versions of formulas (gt-xmyha)
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>
2025-12-25 22:00:00 -08:00
Steve Yegge
db5134175c bd sync: 2025-12-25 21:59:51 2025-12-25 21:59:51 -08:00
Steve Yegge
4c191b1f27 bd sync: 2025-12-25 21:49:45 2025-12-25 21:49:45 -08:00
Steve Yegge
0a38ae3a18 bd sync: 2025-12-25 21:40:11 2025-12-25 21:44:36 -08:00
Steve Yegge
0de7b980f7 Add wisp-gc doctor check, integrate into gt doctor --fix (gt-psj76.2)
- 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>
2025-12-25 21:44:27 -08:00
Steve Yegge
fc4bddd694 Add gt doctor --fix for session cleanup in Deacon patrol (gt-psj76.2)
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>
2025-12-25 21:40:05 -08:00
Steve Yegge
d8886eea32 bd sync: 2025-12-25 21:36:09 2025-12-25 21:36:09 -08:00
Steve Yegge
d76587072b bd sync: 2025-12-25 21:35:19 2025-12-25 21:35:59 -08:00
Steve Yegge
7814d8981d Update Deacon patrol formula to use bd wisp gc command (gt-psj76.2)
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>
2025-12-25 21:35:50 -08:00
Steve Yegge
7d4a5de697 Refactor burn/squash cleanup to recursive helper (gt-psj76.1)
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>
2025-12-25 21:30:38 -08:00
Steve Yegge
a293b0f152 Fix burn/squash to close step issues (gt-psj76.1)
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>
2025-12-25 21:14:32 -08:00
Steve Yegge
1583aafb75 bd sync: 2025-12-25 21:14:21 2025-12-25 21:14:22 -08:00
Steve Yegge
97818409bd bd sync: 2025-12-25 21:05:47 2025-12-25 21:05:47 -08:00
Steve Yegge
9e0fa35809 bd sync: 2025-12-25 21:02:13 2025-12-25 21:02:13 -08:00
Steve Yegge
3c34f37017 bd sync: 2025-12-25 20:56:59 2025-12-25 20:56:59 -08:00
Steve Yegge
b0aa44719b bd sync: 2025-12-25 20:55:06 2025-12-25 20:55:06 -08:00
Steve Yegge
5acdf597d7 bd sync: 2025-12-25 20:48:40 2025-12-25 20:48:40 -08:00
Steve Yegge
e00f48f9c1 bd sync: 2025-12-25 20:46:47 2025-12-25 20:47:01 -08:00
Steve Yegge
71a9bd00e2 bd sync: 2025-12-25 20:46:38 2025-12-25 20:47:01 -08:00
Steve Yegge
ffe552398a bd sync: 2025-12-25 20:04:32 2025-12-25 20:47:01 -08:00
Steve Yegge
c5934273ef Rename Engineer in Box to Shiny (gt-8tmz.10)
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>
2025-12-25 19:58:43 -08:00
Steve Yegge
11545b5e1f bd sync: 2025-12-25 19:57:59 2025-12-25 19:57:59 -08:00
Steve Yegge
25d5ba88e9 bd sync: 2025-12-25 19:56:59 2025-12-25 19:56:59 -08:00
Steve Yegge
ee7f8fb8fd bd sync: 2025-12-25 19:56:56 2025-12-25 19:56:56 -08:00
Steve Yegge
3224fc2924 bd sync: 2025-12-25 19:56:22 2025-12-25 19:56:22 -08:00