Commit Graph

93 Commits

Author SHA1 Message Date
dag
15caf62b9f fix(formula): remove kill authority from Deacon patrol (gt-vhaej)
The Deacon patrol formula's zombie-scan step now:
- Only detects zombies via --dry-run, never kills directly
- Files death warrants for Boot to handle interrogation/execution
- Includes psychological weight language about termination gravity

This prevents accidental destruction of worker context, mid-task
progress, and unsaved state. Kill authority belongs to Boot.

Bumped version to 5.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 21:01:38 -08:00
organic
b649635f48 feat(formula): add shutdown-dance molecule for death warrant execution
Defines the state machine that Dogs execute for death warrants:
- 3-attempt interrogation with escalating timeouts (60s, 120s, 240s)
- PARDON path when session responds with ALIVE
- EXECUTE path after all attempts exhausted
- EPITAPH step for audit logging

Key design decisions documented:
- Dogs are goroutines, not Claude sessions
- Timeout gates close on timer OR early response detection
- State persisted to ~/gt/deacon/dogs/active/ for crash recovery

Implements specification for gt-cd404.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 20:44:30 -08:00
vuvalini
f0c94db99e fix: Add explicit wisp respawn instructions for patrol agents
When patrol agents (witness, refinery, deacon) complete their patrol wisp,
they were left idle because the instructions only said "loop back" without
specifying the command to create a new wisp.

Updated:
- Work loop instructions in prime.go now explicitly tell agents:
  * If context LOW: run `bd mol wisp mol-<role>-patrol` to create new wisp
  * If context HIGH: use `gt handoff` and exit for daemon respawn
- mol-witness-patrol.formula.toml loop-or-exit step now has clear commands

This ensures patrol agents always either create a new wisp or exit cleanly,
preventing the "session alive but idle" state that caused mail to pile up.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 16:55:56 -08:00
scrotus
4de5a96400 refactor: use hq- prefix for role bead references
Migrate all role bead references from gt-*-role to hq-*-role using
beads.RoleBeadIDTown() function. Role beads are stored in town beads
(~/gt/.beads/) with the hq- prefix.

Changes:
- internal/cmd/prime.go: Use RoleBeadIDTown() for all roles
- internal/doctor/agent_beads_check.go: Use RoleBeadIDTown() for rig agents
- internal/polecat/manager.go: Use RoleBeadIDTown("polecat")
- internal/cmd/crew_add.go: Use RoleBeadIDTown("crew")
- internal/beads/beads.go: Update comments to document hq- convention
- Templates: Update bd show gt-deacon to bd show hq-deacon

Note: Tmux session names remain as gt-* (runtime identifiers).
Bead IDs use hq-* for town-level agents (persistent storage).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 13:17:39 -08:00
nux
bf6b8b8c92 docs(witness): Update patrol formula for ephemeral polecat model
Updates mol-witness-patrol.formula.toml to document the new ephemeral model:

- Added Ephemeral Polecat Model section explaining lifecycle separation
- Updated POLECAT_DONE handling to describe immediate auto-nuke
- Updated process-cleanups to focus on exception handling (dirty polecats)
- Updated survey-workers Step 4a for ephemeral done polecat handling
- Updated patrol-cleanup for ephemeral model expectations

Key principle: Polecat lifecycle is separate from MR lifecycle.
Polecats are recyclable immediately after MR submission.

(gt-si8rq.9)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 13:11:37 -08:00
nux
e663928564 feat(formulas): Add conflict resolution workflow for polecats (gt-si8rq.5)
New molecule formula mol-polecat-conflict-resolve defines the workflow for
polecats handling merge conflict resolution tasks:

1. Load task and extract metadata from conflict-resolution bead
2. Acquire merge slot (prevents racing via "Monkey Knife Fight" prevention)
3. Checkout the conflicting branch
4. Rebase onto main and resolve conflicts
5. Run tests to verify resolution
6. Push resolved changes directly to main (bypasses queue)
7. Close original MR bead and source issue
8. Release merge slot for next waiter
9. Clean up and close the conflict-resolution task

This completes the polecat side of the ephemeral merge workflow architecture.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:57:34 -08:00
gastown/witness
cadf09d98c bd sync: 2026-01-02 18:08:14 2026-01-02 18:08:14 -08:00
max
37ae702427 docs: Clarify formula vs molecule semantics - formulas are NOT instructions
PROBLEM: Agents were reading formula files directly and manually creating beads
for each step, rather than using the cook→pour→molecule pipeline.

FIXES:
- polecat-CLAUDE.md: Changed "following the formula" to "work through your
  pinned molecule" and added explicit anti-pattern warning
- mol-polecat-work.formula.toml: Added note that formula defines template,
  use bd ready to find step beads
- docs/molecules.md: Added "Common Mistake" section with WRONG/RIGHT examples
- mol-*.formula.toml (5 files): Changed "execute this formula" to "work
  through molecules (poured from this formula)"

The key insight: Formulas are source templates (like source code). You never
read them directly. The cook → pour pipeline creates step beads for you.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 17:26:08 -08:00
mayor
28602f3b0f feat(formula): Add check-timer-gates step to Witness patrol
Cross-rig change from beads Timer Gates feature (bd-kbfn).
Adds timer gate expiration check to patrol loop.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 12:52:22 -08:00
rictus
e2b872af11 feat(formula): Update mol-polecat-work for ephemeral polecat model (gt-si8rq.4)
- Change polecat contract from wait-for-termination to ephemeral
- Rename close-issue → prepare-for-review (Refinery closes after merge)
- Rename signal-complete → submit-and-exit (polecat recyclable after gt done)
- Bump formula version to 4

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 12:29:19 -08:00
nux
c7e5bc08c4 feat(refinery): Implement mechanical rebase with conflict detection (gt-si8rq.2)
Update mol-refinery-patrol formula v4:
- Rename process-branch to "Mechanical rebase"
- Add robust conflict detection via exit codes
- Create conflict-resolution task on rebase failure
- Track conflict metadata (main SHA, branch SHA)
- Update loop-check with conflict-skip entry path
- Update generate-summary with conflict tracking

On conflicts: abort rebase, create task, preserve branch for resolution.
MR beads remain open until conflicts resolved and reprocessed.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 01:26:30 -08:00
rictus
dae85ef764 fix(formula): Clarify commits ahead report for crew on main (gt-9yz70)
Update mol-sync-workspace generate-report step to distinguish:
- Feature branches: 'Commits ahead of main: N'
- Crew on main: 'Unpushed commits: N'

The 'commits ahead of main' was confusing for crew workers who work
directly on main branch. 'Unpushed commits' is clearer for that case.

Also added explicit git commands for checking divergence.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 19:09:00 -08:00
toast
dd122b44d1 chore(beads): Sync beads from main
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 19:08:00 -08:00
toast
ffb8202fe1 refactor(formula): Split handle-dirty-state into focused steps (gt-xhwlq)
The monolithic handle-dirty-state step handled three distinct concerns.
Split into focused steps for clarity and maintainability:

1. handle-uncommitted: Handle staged/unstaged changes
   - Commit if ready (WIP)
   - Stash if experimental/incomplete

2. handle-untracked: Handle untracked files
   - Decision matrix by file type
   - Actions: gitignore, commit, or delete
   - Warns against auto-delete

3. handle-stashes: Review and clean stash entries
   - Age-based decision matrix
   - Drop stale entries (>1 week old)
   - Caution about index shifting

Updated cleanup-worktrees to depend on handle-stashes.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 19:08:00 -08:00
gastown/polecats/nux
57cd8b887d feat(formula): Add design convoy formula for structured exploration
Creates a convoy-style formula for structured design exploration with 6
parallel legs:
- api: Interface design, developer ergonomics
- data: Data model, storage, migrations
- ux: User experience, CLI ergonomics
- scale: Performance at scale, bottlenecks
- security: Threat model, attack surface
- integration: System integration, compatibility

Each leg spawns a polecat that analyzes the design problem from its
dimension. The synthesis step combines all analyses into a unified
design document with options and decision points.

Usage:
  gt formula run design --problem="Add notification levels to mayor"

(gt-ubqeg.2)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 19:04:48 -08:00
gastown/polecats/capable
7c098e9843 fix(deacon): Add idle town protocol to reduce health check frequency (gt-brndh)
Updates mol-deacon-patrol formula to be silent when the town is idle:

- Added "Idle Town Principle" to formula description
- health-scan step now checks for active work before sending nudges
- loop-or-exit step specifies 60+ second sleep (2-5 min when idle)
- Explains that daemon (10-min heartbeat) is the safety net

This prevents flooding idle agents with health checks every few seconds.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:55:35 -08:00
toast
ee1d6c12ab chore(beads): Sync beads from main
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:51:44 -08:00
toast
3ecaf9d6fe feat(refinery): Add parallel worker support with MR claiming (gt-kgszr)
Implements Option A from the issue: multiple refinery workers with locking.

Changes to mrqueue:
- Add ClaimedBy/ClaimedAt fields to MR struct
- Add Claim(id, worker) method with atomic file operations
- Add Release(id) method to unclaim on failure
- Add ListUnclaimed() to find available work
- Add ListClaimedBy(worker) for worker-specific queries
- Claims expire after 10 minutes for crash recovery

New CLI commands:
- gt refinery claim <mr-id> - Claim MR for processing
- gt refinery release <mr-id> - Release claim back to queue
- gt refinery unclaimed - List available MRs

Formula updates:
- queue-scan now uses gt refinery unclaimed
- process-branch claims MR before processing
- handle-failures releases claim on test failure
- Claims prevent double-processing by parallel workers

Worker ID comes from GT_REFINERY_WORKER env var (default: refinery-1).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:51:44 -08:00
cheedo
a85fae73a5 refactor(formula): Move cleanup-worktrees earlier in sync workflow (gt-gqiwm)
Reordered mol-sync-workspace.formula.toml so cleanup-worktrees runs after
handle-dirty-state instead of after run-tests. This is more logical:
worktree cleanup is housekeeping that should happen during workspace prep,
not after verification steps.

New execution order:
1. assess-state
2. handle-dirty-state
3. cleanup-worktrees  ← moved here
4. sync-git
5. sync-beads → run-doctor → verify-build → run-tests
6. generate-report → signal-ready

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:42:04 -08:00
toast
8c5d263fcb chore(beads): Sync beads from main
🤖 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
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
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
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
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
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
Steve Yegge
3c56f2c1dd Refactor Deacon patrol to detect→dispatch pattern (gt-0x5og.4)
Major changes to mol-deacon-patrol.formula.toml v4:
- Add DOG_DONE message handling in inbox-check step
- Add dog-pool-maintenance step for idle dog availability
- Change orphan-check to detect-only (dispatches to dogs via sling)
- Change session-gc to detect-only (dispatches to dogs via sling)

The Deacon now stays lightweight by detecting issues and dispatching
heavy work to dogs rather than executing inline. This prevents context
bloat and keeps patrol cycles fast.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 11:02:49 -08:00
Steve Yegge
c6a9201b5e Add infrastructure formulas for dog tasks (gt-0x5og.5)
Create five formulas for dog-executed infrastructure tasks:
- mol-convoy-cleanup: Archive convoy, notify overseer
- mol-dep-propagate: Cross-rig dependency resolution
- mol-digest-generate: Daily digest for overseer
- mol-orphan-scan: Find and reassign orphaned work
- mol-session-gc: Clean stale sessions

Each formula follows the standard TOML structure with:
- Description and dog contract
- Step-by-step workflow with dependencies
- Variable definitions
- Squash configuration for digests

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 10:39:36 -08:00
Steve Yegge
08d966a601 Add patrol hygiene: inbox cleanup for Witness/Refinery/Deacon (gt-h5e0)
Each patrol formula now includes:
- Explicit archive instructions after processing messages
- New patrol-cleanup step for end-of-cycle inbox hygiene
- Deacon: log rotation and state.json pruning

Changes:
- mol-witness-patrol v2: POLECAT_STARTED archive, patrol-cleanup step
- mol-refinery-patrol v3: MERGE_READY archive after merge, patrol-cleanup step
- mol-deacon-patrol v3: log-maintenance step, patrol-cleanup step

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 09:59:09 -08:00
Steve Yegge
4e67f7e637 feat: Add convoy patrol steps to Deacon formula
Added three new patrol steps for convoy orchestration:
- check-convoy-completion: Watch for tracked issue closures, auto-close convoys
- resolve-external-deps: Propagate cross-rig dependency resolution
- fire-notifications: Notify Overseer/Witnesses of convoy and dep events

Updated health-scan to depend on fire-notifications (runs after convoy steps).

(gt-wthcc)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:50:24 -08:00
Steve Yegge
c47a7466d8 chore: Remove obsolete polecat formula files
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:19:12 -08:00
Steve Yegge
91236ea268 feat: Add polecat workflow quality levels (basic/shiny/chrome)
Three pre-baked polecat workflows with increasing rigor:
- mol-polecat-basic: 3 steps, for trivial P4 fixes
- mol-polecat-shiny: 6 steps, standard quality with design/review
- mol-polecat-chrome: 16 steps, max rigor with strategic context reading,
  triple code review, and decomposed implementation phases

Added --quality (-q) flag to gt sling as shorthand:
  gt sling gt-abc gastown -q basic   # quick fix
  gt sling gt-abc gastown -q shiny   # standard
  gt sling gt-abc gastown -q chrome  # max rigor

Chrome explicitly requires reading ~/gt/docs/hop/CONTEXT.md and
~/gt/docs/PRIMING.md before design begins.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 23:19:32 -08:00
Steve Yegge
540e51dc0f feat: add mol-polecat-chrome formula with parameterized context_docs (gt-c0fzm)
Adds a new workflow formula for polecat work that includes strategic
context reading before design. The context_docs variable allows
customization of which organizational documents to read.

Default: ~/gt/docs/hop/CONTEXT.md,~/gt/docs/PRIMING.md (Gas Town docs)
Override: gt sling formula --var context_docs="docs/ARCH.md,docs/STYLE.md"

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 23:17:29 -08:00
Steve Yegge
1dbb9555e2 Sync beads from main 2025-12-29 21:58:13 -08:00