Commit Graph

1140 Commits

Author SHA1 Message Date
Steve Yegge
b77e0fe09a chore: remove stale prompts/, mayor/, and scripts/ directories
- Delete prompts/roles/*.md (duplicates of internal/templates/roles/*.md.tmpl)
- Delete mayor/rig/docs/ (stale draft, canonical version in docs/)
- Delete scripts/ (replaced by Makefile and internal/daemon/)
- Update doctor check to validate internal/templates/roles/*.md.tmpl
- Update docs/prompts.md to reflect actual template location

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:46:56 -08:00
Steve Yegge
7c7b8b551d fix: critical issues in wisp hook system
Code review fixes:

1. CRITICAL: Move polecat check to start of runSling
   - Previously wrote wisp THEN failed, leaving orphan
   - Now fails fast before any file operations

2. CRITICAL: Sanitize slashes in agent IDs for filenames
   - Agent IDs like 'gastown/crew/joe' were creating subdirs
   - Now converts '/' to '--' for safe filenames
   - Added sanitizeAgentID/unsanitizeAgentID helpers

3. MODERATE: Use git root instead of WorkDir in prime.go
   - Hooks are written to clone root, not cwd
   - Added getGitRoot() helper for consistency

4. MODERATE: Fix silent error swallowing
   - Now logs non-ErrNoHook errors when reading hooks
   - Warns if bead doesn't exist before burning hook
   - Preserves hook if bead is missing for debugging
2025-12-24 16:20:04 -08:00
Steve Yegge
dbec2c3b88 docs: remove Python Gas Town references
- Removed "Multiple Gas Towns in One Location" section from hq.md
- Removed PGT/GGT coexistence references
- Updated Implementation Status to reflect Go-only codebase
- Simplified Project Info in CLAUDE.md

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:14:55 -08:00
Steve Yegge
b2f1b58f13 feat: implement gt sling and wisp hook system (gt-qvn7.1)
Phase 1 of tracer bullet: Slinging Handoff

- Add internal/wisp package for ephemeral work attachment
- Add gt sling command to attach work and restart
- Update gt prime to check/burn slung work on hook
- Add .beads-wisp/ to gitignore
2025-12-24 16:08:15 -08:00
Steve Yegge
5560b64083 crew restart/at: use NudgeSession with longer delay for resume prompt
The resume prompt wasn't getting its Enter key reliably. Changed from
SendKeysDelayedDebounced (3s delay, 300ms debounce) to NudgeSession
(5s delay, 500ms debounce) which is the battle-tested method for
messaging Claude sessions.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:08:05 -08:00
Steve Yegge
7b256372b9 bd sync: 2025-12-24 16:08:02 2025-12-24 16:08:02 -08:00
Steve Yegge
e1692f057d bd sync: 2025-12-24 15:56:01 2025-12-24 15:56:01 -08:00
Steve Yegge
7d01124948 bd sync: 2025-12-24 15:54:44 2025-12-24 15:54:44 -08:00
Steve Yegge
8d4f4762bc bd sync: 2025-12-24 15:40:28 2025-12-24 15:40:28 -08:00
Steve Yegge
c8aca1528c bd sync: 2025-12-24 15:39:48 2025-12-24 15:39:48 -08:00
Steve Yegge
e8dff71b37 crew at: don't link windows by default, add --detached flag
When running `gt crew at` from inside tmux:
- No longer auto-links the target session as a tab
- Just prints "Started X. Use C-b s to switch."
- User stays in their current pane

When running from outside tmux:
- Default: attach to the session (existing behavior)
- With -d/--detached: start session without attaching

This gives users more control over tmux session navigation and
reduces confusion for tmux newcomers.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 15:22:12 -08:00
Steve Yegge
b930704b5f fix: prevent tmux link-window from auto-switching windows (gt-wmhj)
When running `gt crew at <other>` from inside tmux, the linked window
would auto-select, causing users to unknowingly switch agents. Add -d
flag to keep user in their current window.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 14:34:25 -08:00
Steve Yegge
5b27d337fe bd sync: 2025-12-24 14:34:15 2025-12-24 14:34:15 -08:00
Steve Yegge
e256bb8f08 bd sync: 2025-12-24 14:28:44 2025-12-24 14:28:44 -08:00
Steve Yegge
7419a459c6 bd sync: 2025-12-24 14:27:53 2025-12-24 14:27:53 -08:00
Steve Yegge
53e6bf7618 bd sync: 2025-12-24 14:19:02 2025-12-24 14:19:02 -08:00
Steve Yegge
932e6a7266 bd sync: 2025-12-24 14:07:08 2025-12-24 14:07:08 -08:00
Steve Yegge
8e1a2feee9 bd sync: 2025-12-24 14:06:05 2025-12-24 14:06:30 -08:00
Steve Yegge
141298ca69 feat: add nudge_text variable to mol-polecat-arm formula (gt-j755) 2025-12-24 14:06:28 -08:00
Steve Yegge
c10709dc3f terminology: spawn → pour/wisp for molecules (gt-9uy0)
Molecules use chemistry verbs, not spawn:
- pour = create persistent mol (liquid)
- wisp = create ephemeral wisp (vapor)
- spawn = polecats only (workers)

Changes:
- Delete chemistry-design-changes.md (migration doc)
- Remove migration tables from sling-design.md
- Update bond tables: Spawn → Pour/Wisp
- Rename spawnMoleculeFromProto → pourMoleculeFromProto
- Rename spawnMoleculeOnIssue → runMoleculeOnIssue
- Update templates: bd mol spawn → bd wisp
- Update prime.go: commands and messages
- Clean all docs and comments

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 14:04:19 -08:00
Steve Yegge
0acad8af25 bd sync: 2025-12-24 14:02:17 2025-12-24 14:02:17 -08:00
Steve Yegge
1e567b264e bd sync: 2025-12-24 13:51:59 2025-12-24 13:51:59 -08:00
Steve Yegge
80d3672999 Add title fields to patrol formulas for bd cook (gt-ingm.2)
Required by bd cook command - each step needs a title field.
Cooked 4 protos: deacon(9), witness(10), refinery(11), polecat-arm(6)
2025-12-24 13:48:19 -08:00
Steve Yegge
944289af8e bd sync: 2025-12-24 13:47:43 2025-12-24 13:47:43 -08:00
Steve Yegge
618832ee0c bd sync: 2025-12-24 13:47:01 2025-12-24 13:47:01 -08:00
Steve Yegge
a057ca8b8c bd sync: 2025-12-24 13:25:19 2025-12-24 13:25:19 -08:00
Steve Yegge
fe644a8cf8 bd sync: 2025-12-24 13:21:08 2025-12-24 13:21:08 -08:00
Steve Yegge
8705e843c7 refactor: replace 'spawn' with 'create/wisp' for molecule terminology (gt-9uy0)
'Spawn' should only be used for polecats (workers). Molecules use:
- bd wisp <proto> - create ephemeral wisp
- bd pour <proto> - create persistent mol

Updated:
- prompts/roles/deacon.md: bd mol spawn → bd wisp
- internal/templates/roles/deacon.md.tmpl: spawn → create/wisp
- internal/templates/roles/witness.md.tmpl: gt mol spawn → bd wisp
- internal/cmd/prime.go: all mol spawn calls → wisp calls
- docs/molecular-chemistry.md: spawn terminology → create/instantiate

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 13:17:22 -08:00
Steve Yegge
5fc283e56a bd sync: 2025-12-24 13:08:24 2025-12-24 13:08:24 -08:00
Steve Yegge
82b4a3cb1d bd sync: 2025-12-24 13:06:49 2025-12-24 13:06:49 -08:00
Steve Yegge
9fd2ddfbec bd sync: 2025-12-24 13:05:00 2025-12-24 13:05:00 -08:00
Steve Yegge
b551805554 bd sync: 2025-12-24 13:01:09 2025-12-24 13:01:27 -08:00
Steve Yegge
1ba425eac8 Add patrol formula YAML files (gt-ingm.1)
Create initial formula definitions for patrol molecules:
- mol-deacon-patrol: Mayor daemon loop (8 steps)
- mol-witness-patrol: Christmas Ornament pattern with dynamic bonding (9 steps)
- mol-refinery-patrol: Merge queue processor with verification gates (10 steps)
- mol-polecat-arm: Single polecat inspection cycle for witness bonding (5 steps)

These replace the embedded markdown in molecules_patrol.go with proper
formula YAML files that can be cooked into proto beads.

Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 13:00:20 -08:00
Steve Yegge
c116613a72 bd sync: 2025-12-24 13:00:09 2025-12-24 13:00:09 -08:00
Steve Yegge
06ba0fe131 bd sync: 2025-12-24 12:58:10 2025-12-24 12:58:10 -08:00
Steve Yegge
c087cb6324 bd sync: 2025-12-24 12:52:15 2025-12-24 12:52:15 -08:00
Steve Yegge
4c31c89608 bd sync: 2025-12-24 12:50:17 2025-12-24 12:50:17 -08:00
Steve Yegge
ae01a666a8 bd sync: 2025-12-24 12:41:04 2025-12-24 12:41:04 -08:00
Steve Yegge
7f373c60a1 bd sync: 2025-12-24 12:38:33 2025-12-24 12:38:33 -08:00
Steve Yegge
d7c96ddbfa bd sync: 2025-12-24 00:23:53 2025-12-24 00:24:22 -08:00
Steve Yegge
bf754a8e2b docs: update templates with molecule navigation workflow (gt-lz13)
- Add bd mol current for orientation in polecat, crew, refinery, deacon
- Replace 3-command dance with bd close --continue (Propulsion Principle)
- Witness template unchanged (monitor role, no molecule execution)
2025-12-24 00:24:22 -08:00
Steve Yegge
e7f9dc8576 docs: design Deacon molecule health-scan step (gt-gaxo.5)
ZFC cleanup: health checking belongs in Deacon molecule, not Go code.

Updated health-scan step with:
- Specific commands: gt witness status, gt refinery status
- Signal assessment table for Claude to interpret
- Cycle tracking for persistent unresponsive state
- Decision matrix with suggested (not hardcoded) thresholds
- Restart and escalation workflows

Key ZFC principle: Claude makes the judgment call about what is
stuck or unresponsive - no hardcoded time.Duration in Go.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:23:40 -08:00
Steve Yegge
bca357e4eb refactor: remove polecat state derivation from issue status (gt-gaxo.4)
ZFC cleanup: Go should be message transport, not decision-maker.

Before: loadFromBeads used switch on issue.Status to derive polecat
state (open/in_progress -> working, closed -> done).

After: Simple rule - has issue assigned = working, no issue = idle.
We do not interpret what issue.Status means; that is for Claude in
the Deacon molecule.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:21:31 -08:00
Steve Yegge
6552b439ba bd sync: 2025-12-24 00:21:19 2025-12-24 00:21:19 -08:00
Steve Yegge
88165429ff bd sync: 2025-12-24 00:17:37 2025-12-24 00:18:02 -08:00
Steve Yegge
b6817899b4 refactor: ZFC cleanup - move Go heuristics to Deacon molecule (gt-gaxo)
Remove Go code that makes workflow decisions. All health checking,
staleness detection, nudging, and escalation belongs in the Deacon
molecule where Claude executes it.

Removed:
- internal/daemon/backoff.go (190 lines) - exponential backoff decisions
- internal/doctor/stale_check.go (284 lines) - staleness detection
- IsFresh/IsStale/IsVeryStale from keepalive.go
- pokeMayor, pokeWitnesses, pokeWitness from daemon.go
- Heartbeat staleness classification from pokeDeacon

Changed:
- Lifecycle parsing now uses structured body (JSON or simple text)
  instead of keyword matching on subject line
- Daemon now only ensures Deacon is running and sends simple heartbeats
- No backoff, no staleness classification, no decision-making

Total: ~800 lines removed from Go code

The Deacon molecule will handle all health checking, nudging, and
escalation. Go is now just a message router.

See gt-gaxo epic for full rationale.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:11:15 -08:00
Steve Yegge
0f88c793f8 docs: add witness patrol theory of operation
Documents the Claude-driven execution model:
- Molecules are playbooks, not auto-executing code
- Mail-based coordination between agents
- Nudge escalation matrix for stuck polecats
- State persistence in handoff bead

See gt-poxd for handoff bead implementation.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:10:32 -08:00
Steve Yegge
c483602231 refactor: remove Go patrol logic from witness manager (gt-kh6q)
Patrol logic is now handled by mol-witness-patrol molecule executed by Claude.
Removed ~985 lines of Go code:
- run(), checkAndProcess(), healthCheck()
- handleStuckPolecat(), getNudgeCount(), recordNudge(), clearNudgeCount()
- processShutdownRequests(), verifyPolecatState()
- autoSpawnForReadyWork(), getActivePolecatCount(), isAlreadySpawned(), spawnPolecat()
- Plus all helper functions

Kept: NewManager(), stateFile(), loadState(), saveState(), Status(), Start(), Stop()

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 23:44:54 -08:00
Steve Yegge
c29396d929 Close stale MRs superseded by ZFC rewrite 2025-12-23 23:31:56 -08:00
Steve Yegge
5212d8ded4 bd sync: 2025-12-23 19:30 (gt-o3is)
Closed gt-o3is - root-caused to beads codebase, not gt issue.
Created beads bug bd-phtv to track actual fix.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 23:27:53 -08:00