Commit Graph

1653 Commits

Author SHA1 Message Date
Steve Yegge
ef0008ea2c feat: Add swarm dispatch to Witness patrol (gt-kc7yj.2)
Add dispatch-swarm-work step to mol-witness-patrol formula that:
- Queries bd ready --parent=<epic> to find ready swarm tasks
- Finds idle polecats via agent beads
- Dispatches work via gt sling <task> <rig>/<polecat>

Also updated:
- SWARM mail handling to store epic_id in labels
- check-swarm-completion to use beads discovery model

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 14:19:26 -08:00
Steve Yegge
7acfcfc4c4 bd sync: 2025-12-29 14:10:44 2025-12-29 14:10:44 -08:00
Steve Yegge
665a815379 bd sync: 2025-12-29 14:06:37 2025-12-29 14:06:37 -08:00
Steve Yegge
4df3dbeadd bd sync: 2025-12-29 14:05:50 2025-12-29 14:06:15 -08:00
Steve Yegge
52e9b48400 feat: Add slot fields to Issue struct and set role slot on create
- Add HookBead and RoleBead fields to Issue struct for JSON unmarshal
- CreateAgentBead now calls bd slot set to set role slot properly
- This ensures role_bead is stored as a first-class field, not just
  embedded in description text

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 14:05:40 -08:00
Steve Yegge
c6ba5361ad fix: Use shared role beads consistently
All agent bead creation now uses shared role beads:
- gt-mayor-role, gt-deacon-role
- gt-witness-role, gt-refinery-role
- gt-crew-role, gt-polecat-role

Previous code created per-instance role bead references like
gt-witness-gastown-role which is wrong. Role beads are shared
class definitions, not per-instance.

Files fixed:
- internal/rig/manager.go
- internal/doctor/agent_beads_check.go
- internal/cmd/prime.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 14:05:40 -08:00
Steve Yegge
99b978e547 bd sync: 2025-12-29 13:43:26 2025-12-29 13:43:26 -08:00
Steve Yegge
a4c1932ec4 bd sync: 2025-12-29 13:42:49 2025-12-29 13:43:07 -08:00
Steve Yegge
f2c76304e9 fix: Agent beads now reference shared role beads
crew_add.go: Use gt-crew-role instead of per-instance role bead
polecat/manager.go: Add RoleBead field pointing to gt-polecat-role

Per agent-as-bead design, role beads are shared class definitions.
Each agent bead references its role via the role_bead field/slot.

Fixes gt-ne9he

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 13:42:37 -08:00
Steve Yegge
7f03d3a398 bd sync: 2025-12-29 13:41:52 2025-12-29 13:41:52 -08:00
Steve Yegge
fd6fe23d2a bd sync: 2025-12-29 13:04:27 2025-12-29 13:04:27 -08:00
Steve Yegge
ab141eb9f5 bd sync: 2025-12-29 12:49:40 2025-12-29 12:49:40 -08:00
Steve Yegge
608d56937e feat: gt sling uses status=hooked and wakes witness+refinery (gt-fbz1z, gt-arjlu) 2025-12-29 12:49:24 -08:00
Steve Yegge
d85fc883ca bd sync: 2025-12-29 12:44:34 2025-12-29 12:44:34 -08:00
Steve Yegge
1c8e936172 fix: Add refinery/witness identity detection to detectSender (gt-agtwd) 2025-12-29 12:44:17 -08:00
Steve Yegge
fd08d7a860 fix: Purge 1653 tombstones via bd compact --purge-tombstones 2025-12-28 23:43:02 -08:00
Steve Yegge
b32eb0f9b8 chore: cleanup 1653 old tombstones to reduce issue count 2025-12-28 23:27:02 -08:00
Steve Yegge
00c7980185 chore: Clean orphaned dependencies 2025-12-28 22:50:42 -08:00
Steve Yegge
5c59e43ad3 chore: Purge 1676 tombstones from issues.jsonl 2025-12-28 22:49:10 -08:00
Steve Yegge
3df25d5e79 bd sync: 2025-12-28 22:41:22 2025-12-28 22:41:22 -08:00
Steve Yegge
76b53d9bbc bd sync: 2025-12-28 22:41:17 2025-12-28 22:41:17 -08:00
Steve Yegge
344b8098b4 bd sync: 2025-12-28 22:30:19 2025-12-28 22:30:19 -08:00
Steve Yegge
cff4c5c133 bd sync: 2025-12-28 22:30:07 2025-12-28 22:30:07 -08:00
Steve Yegge
72b5c05d65 Refactor gt swarm to use beads backing (gt-kc7yj.1)
Replace .runtime/swarms.json with beads-backed swarm tracking:

- gt swarm create: calls bd create --type=epic --mol-type=swarm
- gt swarm status: calls bd swarm status
- gt swarm list: calls bd list --mol-type=swarm --type=epic
- gt swarm start: uses bd swarm status to find ready tasks
- gt swarm land: checks completion via bd, closes epic
- gt swarm cancel: closes epic with cancelled reason

Removed:
- SwarmStore type and LoadSwarmStore/Save functions
- Old spawnSwarmWorkers (replaced with spawnSwarmWorkersFromBeads)
- Unused helper functions (stateStyle, taskStateIcon, matchesStatus)

This implements "discovery over tracking" principle from swarm-architecture.md:
swarm state is now derived from beads epic/issue statuses rather than
maintaining separate state in .runtime/swarms.json.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 22:11:38 -08:00
Steve Yegge
90eeb0135d Add gt rig reboot command
Combines shutdown + boot for convenience when restarting patrol agents
after polecats complete work.

Usage:
  gt rig reboot gastown
  gt rig reboot beads --force

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 21:45:39 -08:00
Steve Yegge
a28a702dc5 bd sync: 2025-12-28 21:42:09 2025-12-28 21:42:09 -08:00
Steve Yegge
8976615ccb bd sync: 2025-12-28 21:39:03 2025-12-28 21:39:03 -08:00
Steve Yegge
b389388f39 Add mail display to gt status (gt-um4iu)
- Show unread mail count and first message subject for each agent
- Display format: "mail: 📬 N unread → Subject..."
- Only shows mail line when agent has unread messages
- Fix agent bead ID generation for global agents (mayor/, deacon/)

Example output:
  🏭 Refinery
     gt-refinery-gastown running
       hook: refinery Handoff
       mail: 📬 8 unread → MERGE_READY morsov

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:51:39 -08:00
Steve Yegge
8c19752432 Enhance gt status with detailed agent bead view (gt-um4iu)
- Show full agent bead ID for each agent (e.g., gt-crew-gastown-joe)
- Display hook/pinned work with bead ID and title
- Use role icons and section separators for clarity
- Fall back to hooks array when agent bead lacks hook_bead field

Example output:
  🎩 Mayor
     gt-mayor running
       hook: (none)

  ─── gastown/ ───────────────────────
  🏭 Refinery
     gt-refinery-gastown running
       hook: refinery Handoff

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:45:51 -08:00
Steve Yegge
2f354b1ef6 Enhance gt status with tree-style role hierarchy view (gt-um4iu)
- Use tree characters (├── └── │) for hierarchical display
- Group agents by role type (Witness, Refinery, Crew, Polecats)
- Add role icons (🎩 Mayor, 🔔 Deacon, 👁 Witness, 🏭 Refinery, 👷 Crew, 😺 Polecats)
- Show pinned work inline with truncation
- Fix unused import in polecat/manager.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 19:36:15 -08:00
Steve Yegge
7606bc884a feat: Add gt rig boot command to start witness and refinery
Inverse of 'gt rig shutdown'. Starts rig patrol agents:
- Checks tmux sessions to avoid duplicates
- Starts witness if not running
- Starts refinery if not running
- Reports what was started vs skipped

Also adds ProcessExists util function needed by witness/refinery managers.
2025-12-28 19:19:10 -08:00
Steve Yegge
cdbe5d0a1e bd sync: 2025-12-28 19:06:47 2025-12-28 19:06:47 -08:00
Steve Yegge
72721cb07f Merge rictus: polecat nuke 2025-12-28 18:45:45 -08:00
Steve Yegge
c94c3f462f Merge nux: process util 2025-12-28 18:45:36 -08:00
Steve Yegge
71968c6623 Merge ace: polecat focus 2025-12-28 18:45:24 -08:00
Steve Yegge
d72e86493e Merge morsov: AgentIdentity, session helpers 2025-12-28 18:45:14 -08:00
Steve Yegge
4e11b31855 bd sync: 2025-12-28 17:34:44 2025-12-28 17:34:44 -08:00
Steve Yegge
40cb3eb9fc Extract timing constants to constants package (gt-795e8)
Added 6 timing constants:
- ShutdownNotifyDelay (500ms)
- ClaudeStartTimeout (15s)
- ShellReadyTimeout (5s)
- DefaultDebounceMs (100)
- DefaultDisplayMs (5000)
- PollInterval (100ms)

Updated 7 files to use these constants instead of magic numbers.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 17:18:03 -08:00
Steve Yegge
3421fe9303 Remove dead code: splitLines loop, unused methods (gt-2g130)
- polecat.go: Remove unreachable first loop in splitLines (was using filepath.SplitList incorrectly)
- townlog/logger.go: Remove unused Event.JSON() method and json import
- lock/lock.go: Remove unused ErrStaleLock error variable
- refinery/manager.go: Remove unused getTestCommand() method

Note: witness.StatePaused is actually used by cmd/witness.go, not dead code.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 17:13:34 -08:00
Steve Yegge
f14483fc3f fix: Remove brackets from timestamp 2025-12-28 17:08:45 -08:00
Steve Yegge
56ae461f68 fix: Shorten timestamp to HH:MM in feed TUI 2025-12-28 16:46:17 -08:00
Steve Yegge
807c063085 polecat ace: Add SINGLE-TASK FOCUS section (gt-m61ew)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:42:22 -08:00
Steve Yegge
f0b23c50f1 polecat template: Add SINGLE-TASK FOCUS section (gt-m61ew)
Polecats were going off-task during swarms. Added explicit guidance:
- ONE job: work your pinned bead until done
- DO NOT list for common distractions (mail checking, monitoring others, etc.)
- Reminder to file discovered work as beads, not fix it

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:42:14 -08:00
Steve Yegge
4f94ba2b6b Extract SupportedShells constant to constants package (gt-4u682)
- Added constants.SupportedShells for consistent shell list
- Updated 7 usages across start.go, crew_lifecycle.go, crew_helpers.go, tmux.go
- All tests pass

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:40:39 -08:00
Steve Yegge
bf7d28082f bd sync: 2025-12-28 16:40:31 2025-12-28 16:40:31 -08:00
Steve Yegge
7aa6a0a8c7 docs: Add best-effort design doc to keepalive package (gt-gcnnr)
Enhanced the package-level documentation to explain why all write
operations in the keepalive package silently ignore errors.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:40:04 -08:00
Steve Yegge
a4281da60b Merge origin/main 2025-12-28 16:39:26 -08:00
Steve Yegge
5e9ca4c618 Standardize warning output to use style.PrintWarning (gt-g6kor)
- Add PrintWarning helper in internal/style/style.go
- Update 35 warning message outputs across 16 files to use consistent format
- All warnings now display as "⚠ Warning: <message>" in yellow/bold

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:38:04 -08:00
Steve Yegge
e3ea9c2855 ZFC #10: Polecat self-reports cleanup status
Instead of Go code checking git state to decide if polecat removal is safe,
the polecat now self-reports its cleanup_status via its agent bead.

Changes:
- Add CleanupStatus field to AgentFields struct
- Update FormatAgentDescription and ParseAgentFields for cleanup_status
- Add UpdateAgentCleanupStatus function to beads package
- Update gt done to compute and report git cleanup status
- Update RemoveWithOptions to read cleanup_status from agent bead first,
  falling back to git check for backward compatibility

Valid cleanup_status values:
- clean: no uncommitted work
- has_uncommitted: has uncommitted changes
- has_stash: has stashed changes
- has_unpushed: has unpushed commits
- unknown: git check failed

This follows ZFC (Zero Figuring in Code) principles - the polecat is the
authority on its own state, not Go code inferring it from external signals.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:37:01 -08:00
Steve Yegge
b172fd4787 feat: Add rig infra cycling (witness ↔ refinery)
Extended the unified cycle system to include rig infrastructure sessions:
- Witness ↔ Refinery (per rig) now cycle with C-b n/p

Also moved SetCycleBindings into ConfigureGasTownSession so ALL Gas Town
sessions automatically get the unified cycle bindings. Removed redundant
individual calls from crew, mayor, and deacon startup code.

Cycle groups are now:
- Town: Mayor ↔ Deacon
- Crew (per rig): All crew members in same rig
- Infra (per rig): Witness ↔ Refinery

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:36:38 -08:00