Commit Graph

1118 Commits

Author SHA1 Message Date
toast
e267b9baa8 fix(patrol): Make Deacon health checks conditional (gt-cp9bt)
Previously, the Deacon patrol formula sent HEALTH_CHECK nudges to
Witnesses and Refineries on every patrol cycle (~1-2 minutes). This
disturbed idle agents constantly and wasted their context.

Now health check nudges are only sent when concerning signals are
detected:
- Agent not running or no heartbeat
- Status check hangs or fails
- Queue stuck or merge failures

The status commands (gt witness status, gt refinery status) provide
sufficient liveness info for healthy agents. Reserve nudges for
actual problems.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:23:56 -08:00
rictus
380f36b413 feat(deacon): Add zombie-scan backup check for idle polecats (gt-dpiw3)
Add gt deacon zombie-scan command that provides defense-in-depth
against Witness cleanup failures. The command:

- Scans all rigs for polecats that are idle, have no session running,
  no hooked work, and are stale (>10 min inactive)
- Reports found zombies with details
- Optionally nukes them and notifies the mayor

Flags:
  --dry-run        Preview only
  --threshold      Custom staleness threshold (default 10m)
  --nuke=false     Report only, do not clean up

Also adds zombie-scan step to mol-deacon-patrol formula.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:19:54 -08:00
cheedo
b0c7c89be1 feat(formula): Add Refinery-specific inline conflict resolution guidance (gt-p80pc)
Expanded the sync-git step in mol-sync-workspace.formula.toml with detailed
guidance for Refinery agents on how to handle merge conflicts inline:

- Trivial conflicts: resolve immediately (imports, whitespace, etc.)
- Semantic conflicts: assess carefully before merging
- Complex conflicts: abort and notify polecat to rebase
- Judgment call principle: when in doubt, abort rather than risk broken main

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:13:38 -08:00
valkyrie
d2ec9ff8cd fix(formula): Convert code-review.formula.toml from Handlebars to Go template syntax
The convoy formula's base prompt was using Handlebars syntax ({{#if}}, {{#each}},
{{this.field}}) but Go's text/template uses different syntax ({{if .}}, {{range .}},
{{.field}}).

Changes:
- {{variable}} → {{.variable}} (dot prefix for variable access)
- {{#if var}} → {{if .var}}
- {{#each items}} → {{range .items}}
- {{this.field}} → {{.field}}
- {{/if}}, {{/each}} → {{end}}

Also added a comment noting the template uses Go text/template syntax.

Fixes: gt-2dndm

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 17:45:28 -08:00
mayor
65a5c7888f bd sync: gt-7m33w daemon cache bug identified 2026-01-01 17:34:39 -08:00
slit
8726a6d493 feat: Add code-review convoy formula with leg prompt templates (gt-f0701)
Introduces the leg prompt template system for convoy-style formulas:
- Base prompt template with context injection (PR, files, formula name)
- 7 specialized review legs (correctness, performance, security, elegance,
  resilience, style, smells)
- Per-leg focus and description for polecat instructions
- Output format specification with structured findings template
- Synthesis step configuration for combining leg outputs

This formula demonstrates the template system pattern for parallel
polecat execution in convoy workflows.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 14:50:54 -08:00
gastown/crew/gus
f75eeb4da8 fix: Remove YAML usage, standardize on JSON/TOML
- Delete 5 legacy .formula.yaml files (have .toml replacements)
- Remove unused FileConfigYAML constant
- Add TODO for beads config.yaml → config.json migration (bd-10wg)
- Update docs to use JSON examples instead of yaml code blocks
- Change plugin frontmatter from YAML to TOML in docs
- Add .toml to code file detection in branch_check.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 11:18:09 -08:00
gastown/polecats/slit
aa2607eed2 fix: gt hook shows correct agent identity for cross-rig directories (gt-5d7eh)
Use cwd-based detection instead of env-aware detection for gt hook status
display. This ensures we show the hook for the agent whose directory you're
in, not the agent from GT_ROLE env var.

Before: cd ~/gt/beads/crew/dave && gt hook → showed gastown/crew/joe (wrong)
After:  cd ~/gt/beads/crew/dave && gt hook → shows beads/crew/dave (correct)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 13:10:29 -08:00
gastown/polecats/eli
6d1d1469b2 fix: Witness nukes done polecats without MR immediately (gt-xqh3y)
Updated mol-witness-patrol to properly clean up polecats that exit via
ESCALATED/DEFERRED (no MR). Previously, these polecats would sit idle
indefinitely waiting for a MERGED signal that would never come.

Changes:
- process-cleanups: Check for MR before sending MERGE_READY. If no MR
  exists and polecat is clean, nuke immediately.
- survey-workers: Step 3a now handles both idle AND done polecats
  without pending MR. Step 4a checks for MR before creating cleanup wisp.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 12:12:16 -08:00
mayor
36f17bbadd fix: Refinery queue uses beads MQ as source of truth (hq-eggh5)
The refinery was checking git branches instead of the beads merge queue.
This caused MRs to pile up when branches were deleted but MR beads remained.

- manager.go: Queue() now queries beads for type=merge-request issues
- refinery.md.tmpl: Updated queue-scan to use gt mq list
- mol-refinery-patrol.formula.toml: Updated queue-scan step instructions
2025-12-31 11:36:48 -08:00
gastown/crew/max
7069f762e5 Add Hanoi demo documentation and scripts (gt-brd1b.4)
- Add docs/hanoi-demo.md with full execution instructions
- Add scripts/gen_hanoi.py for generating larger formulas
- Include pre-generated 7-disk formula (127 moves)
- 9 and 10 disk formulas already committed

Speed test results: 127 issues close in 14 sec (~109ms each)
Expected 1K run time: ~2 minutes

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 01:56:13 -08:00
gastown/refinery
29226bd66a mol-refinery-patrol: Add MR verification and handoff protocol
- queue-scan: git fetch --prune, verify unmerged commits
- merge-push: Verify work on main before closing MR beads
- patrol-cleanup: Orphaned MR detection with verification
- burn-or-loop: Explicit gt handoff protocol, context estimation
2025-12-31 01:32:11 -08:00
gastown/crew/max
79c0f1cf93 Add pre-generated Hanoi formulas for 9 and 10 disks
- towers-of-hanoi-9: 511 moves (2^9 - 1)
- towers-of-hanoi-10: 1023 moves (2^10 - 1)

These are fully pre-computed move sequences for durability testing.
The 10-disk version creates 1026 beads issues when poured.

For million-step (20 disks), would need 163MB formula file.
Starting with 1K steps to prove the machinery works.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 01:25:23 -08:00
gastown/crew/max
1940b0bc8a Fix Hanoi formula to use proper step structure (gt-brd1b.3)
- Add title field to all steps (required by cook)
- Use hardcoded 3-disk solution (9 steps) as working proof
- Remove pseudo-syntax generate block (not implemented)
- Version bump to 2

Tested: bd cook --dry-run passes, mol pour creates valid molecule,
execution loop works (all 9 steps can be closed in sequence).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 01:15:03 -08:00
gastown/crew/max
09f9efcc4c Update Hanoi formula with agent-actionable instructions (gt-brd1b.3)
Add comprehensive execution protocol to formula description:
- EXECUTION LOOP: find ready step, close it, repeat
- ON RESUME: same as fresh start, molecule IS the state
- DO/DO NOT guidelines for autonomous execution
- MONITORING guidance for mega-molecules

This enables agents to execute Hanoi autonomously through restarts,
proving nondeterministic idempotence at scale.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 01:11:12 -08:00
beads/crew/dave
35586b57e5 feat: add auto-nuke for idle polecats in witness patrol (bd-rinx)
Add Step 3a to survey-workers that automatically nukes idle polecats
with clean git state. Only escalates to Mayor when uncommitted or
unpushed work is detected.

This reduces mail noise - idle polecats without work are pure overhead
and can be safely cleaned up without human intervention.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 00:21:09 -08:00
beads/crew/dave
6b20afe9db wip: update idle polecat handling in witness patrol formula (bd-rinx)
Changed table entry from 'Skip (no action needed)' to 'Auto-nuke if clean (Step 3a)'.

TODO: Add Step 3a section with full auto-nuke logic:
- Check git status for uncommitted changes
- Check for unpushed commits
- If clean: gt polecat nuke <name>
- If dirty: escalate to Mayor for recovery decision

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 00:17:17 -08:00
mayor
29d5c04a5f bd sync: 2025-12-30 22:16:20 2025-12-31 00:14:08 -08:00
mayor
658f654474 bd sync: 2025-12-30 22:06:13 2025-12-31 00:14:08 -08:00
mayor
3c49a1deb9 bd sync: 2025-12-30 22:06:10 2025-12-31 00:14:08 -08:00
mayor
28521851e5 bd sync: 2025-12-30 22:06:06 2025-12-31 00:14:08 -08:00
gastown/polecats/slit
d28ba6e2c6 mol-sync-workspace: Add gt/bd prime to assess-state step
Adds explicit priming commands at the start of workspace assessment:
- gt prime: Load gt/mol context
- bd prime: Load beads context

Critical for fresh sessions, post-compaction, or context clear scenarios.
Also updates exit criteria to reflect priming requirement.

(gt-0xhuz)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 22:49:23 -08:00
gastown/polecats/slit
ae4b65ff5c mol-sync-workspace: Add build/test command variables (gt-muwit)
Add configurable build_command and test_command variables to the
mol-sync-workspace formula. Previously hardcoded to Go commands,
now supports any project type via variable configuration.

- Add build_command variable (default: go build ./...)
- Add test_command variable (default: go test ./...)
- Update verify-build step to use {{ build_command }}
- Update run-tests step to use {{ test_command }}

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 22:27:52 -08:00
gastown/crew/max
b4a7b930e5 Update all prompts to use gt hook instead of gt mol status
- Role templates (crew, polecat, mayor, deacon, witness, refinery)
- prime.go startup protocol messages
- Documentation (propulsion, reference, molecules, wisp architecture)
- Session hints and sling prompts
- Formula template instructions
- CLAUDE.md

The hook is the user-facing concept, molecules are implementation details.
Agents should use `gt hook` to check what work is assigned to them.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 22:10:08 -08:00
gastown/polecats/rictus
06f5541502 mol-deacon-patrol: Add health ping nudges to clear agent backoff (gt-l6ro3.2)
The health-scan step now includes gt nudge commands that serve dual purposes:
1. Liveness verification - agent responds to prove it's alive
2. Backoff reset - any nudge resets agent's backoff to base interval

This ensures patrol agents (witness/refinery) remain responsive even during
quiet periods when the feed has no mutations. Since Deacon patrols every
~1-2 minutes, maximum backoff is bounded by the ping interval.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 22:00:37 -08:00
gastown/crew/joe
920507cbe3 bd sync: 2025-12-30 21:14:12 2025-12-30 21:15:54 -08:00
gastown/polecats/furiosa
d006b20d7c bd sync: 2025-12-30 20:54:24 2025-12-30 20:54:24 -08:00
gastown/crew/max
3d09c679e2 Add -m flag to gt nudge command (gt-41m3x) 2025-12-30 20:51:49 -08:00
gastown/crew/max
aa2aa64f59 bd sync: 2025-12-30 20:51:38 2025-12-30 20:51:38 -08:00
Steve Yegge
c3e379deb1 bd sync: 2025-12-30 19:43:38 2025-12-30 19:43:47 -08:00
Steve Yegge
e2ce6148b7 bd sync: 2025-12-30 19:37:33 2025-12-30 19:37:33 -08:00
gastown/crew/joe
4c783bbcae bd sync: 2025-12-30 19:36:57 2025-12-30 19:37:05 -08:00
Steve Yegge
36eb63b8df bd sync: 2025-12-30 19:16:00 2025-12-30 19:29:11 -08:00
Steve Yegge
cdcd677631 bd sync: 2025-12-30 19:09:25 2025-12-30 19:29:11 -08:00
Steve Yegge
24fed6ae5a bd sync: 2025-12-30 19:08:21 2025-12-30 19:29:11 -08:00
Steve Yegge
d87086962b bd sync: 2025-12-30 18:55:47 2025-12-30 19:29:11 -08:00
Steve Yegge
e192b96a6d bd sync: 2025-12-30 18:55:31 2025-12-30 19:29:11 -08:00
Steve Yegge
3f653a3e9d Add mol-sync-workspace formula for batch prep
Molecule for coordinated workspace sync across agents:
- Git pull/rebase with conflict preservation
- Beads sync and doctor check
- Build/test verification
- Worktree cleanup
- Readiness reporting

Designed for broadcast to all agents before batch assignments.
2025-12-30 18:38:45 -08:00
Steve Yegge
38fe5b6a23 bd sync: 2025-12-30 18:38:05 2025-12-30 18:38:18 -08:00
Steve Yegge
a5fa5602b5 bd sync: 2025-12-30 18:26:49 2025-12-30 18:26:49 -08:00
Steve Yegge
edffa606aa bd sync: 2025-12-30 18:17:35 2025-12-30 18:17:35 -08:00
Steve Yegge
3a55bb43ab bd sync: 2025-12-30 18:10:11 2025-12-30 18:10:21 -08:00
Steve Yegge
cbcf9ec051 bd sync: 2025-12-30 18:05:22 2025-12-30 18:10:21 -08:00
Steve Yegge
941853b503 bd sync: 2025-12-30 18:03:25 2025-12-30 18:10:21 -08:00
Steve Yegge
b728b1a25a bd sync: 2025-12-30 18:02:43 2025-12-30 18:02:43 -08:00
Steve Yegge
fd2f4ca944 bd sync: 2025-12-30 18:01:54 2025-12-30 18:02:13 -08:00
Steve Yegge
5c61c8c334 bd sync: 2025-12-30 17:41:02 2025-12-30 17:41:02 -08:00
Steve Yegge
8754acff7e bd sync: 2025-12-30 16:43:00 2025-12-30 16:56:46 -08:00
Steve Yegge
dc5f06e11c bd sync: 2025-12-30 16:42:49 2025-12-30 16:56:46 -08:00
Steve Yegge
2112804aba Implement Boot: daemon entry point dog for Deacon triage (gt-rwd5j)
Boot is a watchdog that the daemon pokes instead of Deacon directly,
centralizing the 'when to wake Deacon' decision in an agent that can
reason about context.

Key changes:
- Add internal/boot package with marker file and status tracking
- Add gt boot commands: status, spawn, triage
- Add mol-boot-triage formula for Boot's triage cycle
- Modify daemon to call ensureBootRunning instead of ensureDeaconRunning
- Add tmux.IsAvailable() for degraded mode detection
- Add boot.md.tmpl role template

Boot lifecycle:
1. Daemon tick spawns Boot (fresh each time)
2. Boot runs triage: observe, decide, act
3. Boot cleans stale handoffs from Deacon inbox
4. Boot exits (or handoffs in non-degraded mode)

In degraded mode (no tmux), Boot runs mechanical triage directly.

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

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