bd sync: 2025-12-25 18:30:57

This commit is contained in:
Steve Yegge
2025-12-25 18:30:57 -08:00
parent 92097fc2c2
commit 5d2a9b2d43

View File

@@ -582,6 +582,7 @@
{"id":"gt-cu7r","title":"Implement handoffs using pinned beads","description":"Replace the current mail-based handoff system with pinned beads.\n\n## Current Problem\n\nHandoff messages get closed before the successor can read them because:\n1. `gt mail read` auto-acks (closes) messages\n2. `bd mail inbox` only shows open messages\n3. Successor sees empty inbox\n\n## Solution\n\nUse pinned beads for handoffs:\n- One pinned bead per role: `mayor-handoff`, `\u003crig\u003e-refinery-handoff`, etc.\n- Predecessor updates the content before cycling\n- Successor reads on startup via `gt prime`\n- Never closes - always available\n\n## Implementation\n\n### 1. Create handoff beads on first cycle\n- `bd create --title='Mayor Handoff' --type=task --status=pinned --assignee=mayor`\n- Store ID in role config or use well-known naming convention\n\n### 2. Update gt handoff command\n- Instead of `bd mail send`, update the pinned handoff bead\n- `bd update \u003chandoff-id\u003e --description='...handoff content...'`\n\n### 3. Update gt prime\n- Read the role's handoff bead\n- Display content to successor\n\n### 4. Compression/reset\n- `gt rig reset` clears handoff content\n- Or manual: `bd update \u003chandoff-id\u003e --description=''`\n\n## Dependencies\n\nRequires beads-6v2 (StatusPinned) to be implemented first.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-18T21:28:05.738035-08:00","updated_at":"2025-12-19T01:57:17.034513-08:00","closed_at":"2025-12-19T01:57:17.034513-08:00"}
{"id":"gt-cv9a","title":"Merge: gt-ay1r","description":"branch: polecat/dementus\ntarget: main\nsource_issue: gt-ay1r\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-22T23:51:54.383198-08:00","updated_at":"2025-12-22T23:53:02.089556-08:00","closed_at":"2025-12-22T23:53:02.089556-08:00","close_reason":"Merged to main"}
{"id":"gt-cvfg","title":"Use cmd.OutOrStdout instead of fmt.Print in refinery","description":"refinery/manager.go and refinery/engineer.go use fmt.Print/Println directly for user output (30+ occurrences). This breaks testability and doesn't follow cobra best practices. Should use cmd.OutOrStdout() or pass an io.Writer.\n\nAffected files:\n- internal/refinery/manager.go (lines 222, 360-361, 369, 387-393, 519, 537, 672)\n- internal/refinery/engineer.go (lines 190-211, 249, 294-297, 325-353, 362-366)","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-21T21:35:08.080292-08:00","updated_at":"2025-12-21T22:18:10.18202-08:00","closed_at":"2025-12-21T22:18:10.18202-08:00","close_reason":"Added io.Writer field to Manager and Engineer structs with SetOutput() methods for testability. Replaced all 30+ fmt.Print calls with fmt.Fprintf using the configurable output writer."}
{"id":"gt-cwndo","title":"Digest: mol-deacon-patrol","description":"Patrol 15: All healthy, no messages","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T18:29:00.960438-08:00","updated_at":"2025-12-25T18:29:00.960438-08:00","closed_at":"2025-12-25T18:29:00.960388-08:00","close_reason":"Squashed from 8 wisps","dependencies":[{"issue_id":"gt-cwndo","depends_on_id":"gt-wisp-4h1","type":"parent-child","created_at":"2025-12-25T18:29:00.961262-08:00","created_by":"deacon"}]}
{"id":"gt-cwpj","title":"Digest: mol-deacon-patrol","description":"Patrol OK: 0 mail, all agents healthy, 3 polecats working","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-22T20:58:32.040465-08:00","updated_at":"2025-12-22T20:58:32.040465-08:00","closed_at":"2025-12-22T20:58:32.040432-08:00","close_reason":"Squashed from 5 wisps"}
{"id":"gt-cx41","title":"Role templates: rename 'Dependency Trap' to 'Gotchas when Filing Beads'","description":"The 'Dependency Trap' heading is too specific. Rename to something like 'Gotchas when Filing Beads' or 'Beads Filing Tips'. Applies to all role templates (polecat, crew, mayor, witness, refinery, deacon).","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T16:56:45.526464-08:00","updated_at":"2025-12-23T17:09:02.117784-08:00","closed_at":"2025-12-23T17:09:02.117784-08:00","close_reason":"Completed in commit 1931ec7","dependencies":[{"issue_id":"gt-cx41","depends_on_id":"gt-t9u7","type":"parent-child","created_at":"2025-12-23T16:57:16.288402-08:00","created_by":"daemon"}]}
{"id":"gt-cxtu","title":"Implement shared beads architecture for rig","description":"Implement redirect-based shared beads to eliminate git sync overhead within a rig.\n\n## Background\nEach polecat currently has its own .beads/ directory synced via git. This burns tokens on sync operations.\n\n## Solution\nUse bd's redirect feature:\n1. Create single shared .beads/ at rig root\n2. Polecats get redirect files pointing to shared location\n3. All agents connect to same daemon\n4. SQLite WAL + daemon serialization handles concurrency\n\n## Implementation\n1. Create shared .beads/ at rig root (e.g., ~/gt/gastown/.beads/)\n2. Update gt spawn to create redirect files:\n mkdir -p polecats/nux/.beads\n echo ../../.beads \u003e polecats/nux/.beads/redirect\n3. Test that all polecats connect to same daemon\n4. Remove git sync from intra-rig workflow\n5. Keep JSONL export for backup/cross-rig only\n\n## Reference\nbeads/polecats/rictus/internal/beads/beads.go:45 - followRedirect()","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-20T20:19:53.6549-08:00","updated_at":"2025-12-21T14:27:43.957132-08:00","closed_at":"2025-12-21T14:27:43.957132-08:00","close_reason":"Shared beads architecture implemented: crew/polecats use redirects to mayor/rig/.beads. Also fixed mail identity format to use slashes (rig/role/name) instead of dashes."}
@@ -683,6 +684,7 @@
{"id":"gt-fko","title":"Add Gas Town theory of operation to all role primings","description":"All roles (Mayor, Witness, Refinery, Polecat) should get basic GT architecture context: harness, rigs, agents, mail, beads workflow","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-17T16:42:46.445526-08:00","updated_at":"2025-12-25T01:30:41.67682-08:00","dependencies":[{"issue_id":"gt-fko","depends_on_id":"gt-l1o","type":"blocks","created_at":"2025-12-17T16:42:54.87032-08:00","created_by":"daemon"},{"issue_id":"gt-fko","depends_on_id":"gt-dkc","type":"blocks","created_at":"2025-12-17T16:42:56.409618-08:00","created_by":"daemon"}],"deleted_at":"2025-12-25T01:30:41.67682-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"gt-flje1","title":"Phase 2: Awareness and real-time channels (announce:, #channel)","description":"## Scope\n\nExtensions for awareness broadcasting and ephemeral real-time communication.\n\n### Deliverables\n\n1. **announce:name** - Shared single-copy bulletin board\n - Informational, not work-creating\n - Recipients check when convenient, missing is OK\n - Use case: 'Bob is refactoring logging, be aware'\n2. **#channel resolution** - Dynamic tmux scan for running agents\n - #rig/gastown → tmux sessions matching gastown/*\n - #town → all Gas Town sessions\n3. **gt channel publish** - Ephemeral nudge broadcast to channel\n\n### Key semantics\n- announce: shared copy (1 message, N readers) vs list: (N copies, N obligations)\n- #channel ephemeral - no storage, real-time only\n- Channels resolve against running sessions, not filesystem","status":"open","priority":3,"issue_type":"epic","created_at":"2025-12-25T14:56:45.075014-08:00","updated_at":"2025-12-25T14:56:45.075014-08:00","dependencies":[{"issue_id":"gt-flje1","depends_on_id":"gt-s89rg","type":"blocks","created_at":"2025-12-25T14:56:52.344399-08:00","created_by":"daemon"}]}
{"id":"gt-fly0","title":"bd close --continue: auto-advance to next molecule step","description":"Add --continue flag to bd close for seamless molecule step transitions.\n\n## Usage\n\nbd close \u003cstep-id\u003e --continue [--no-auto]\n\n## Behavior\n\n1. Closes the specified step\n2. Finds next ready step in same molecule (sibling/child)\n3. By default, marks it in_progress (--no-auto to skip)\n4. Outputs the transition\n\n## Output\n\n[checkmark] Closed gt-abc.3: Implement feature\n\nNext ready in molecule:\n gt-abc.4: Write tests\n\n[arrow] Marked in_progress (use --no-auto to skip)\n\n## If no next step\n\n[checkmark] Closed gt-abc.6: Exit decision\n\nMolecule gt-abc complete! All steps closed.\nConsider: bd mol squash gt-abc --summary '...'\n\n## Key behaviors\n- Detects parent molecule from closed step\n- Finds next unblocked sibling\n- Auto-claims by default (propulsion principle)\n- Graceful handling when molecule is complete\n\n## Beads feature\nThis is a bd command - needs implementation in beads repo.","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-22T17:01:00.437929-08:00","updated_at":"2025-12-22T17:04:13.464939-08:00","closed_at":"2025-12-22T17:04:13.464939-08:00","close_reason":"Moved to beads: bd-ieyy"}
{"id":"gt-fm2tm","title":"Digest: mol-deacon-patrol","description":"Patrol 10: All healthy, no messages","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T18:03:59.531364-08:00","updated_at":"2025-12-25T18:03:59.531364-08:00","closed_at":"2025-12-25T18:03:59.53132-08:00","close_reason":"Squashed from 8 wisps","dependencies":[{"issue_id":"gt-fm2tm","depends_on_id":"gt-wisp-5ox","type":"parent-child","created_at":"2025-12-25T18:03:59.532134-08:00","created_by":"deacon"}]}
{"id":"gt-fm75","title":"os.Exit() calls in library code prevent proper error handling","description":"internal/cmd/mail.go and other files have os.Exit() calls.\n\nIssues:\n- Hard to test\n- Prevents graceful shutdown\n- Can lose unsaved state\n- Doesn't compose well in library code\n\nShould return errors instead of calling os.Exit() directly.\nLet main() decide how to exit.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T12:51:19.086806-08:00","updated_at":"2025-12-24T12:51:19.086806-08:00","dependencies":[{"issue_id":"gt-fm75","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T12:52:07.642098-08:00","created_by":"daemon"}]}
{"id":"gt-fmkr","title":"Merge: gt-pyqv","description":"branch: polecat/dementus\ntarget: main\nsource_issue: gt-pyqv\nrig: gastown","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-20T01:11:33.237777-08:00","updated_at":"2025-12-21T17:20:27.508367-08:00","closed_at":"2025-12-21T17:20:27.508367-08:00","close_reason":"ORPHANED: Branch never pushed, worktree deleted"}
{"id":"gt-foct","title":"Merge: gt-5af.6","description":"branch: polecat/Slit\ntarget: main\nsource_issue: gt-5af.6\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-19T17:27:12.608473-08:00","updated_at":"2025-12-19T18:26:14.104443-08:00","closed_at":"2025-12-19T17:48:44.619449-08:00"}
@@ -694,6 +696,7 @@
{"id":"gt-fsg4","title":"Digest: mol-deacon-patrol","description":"Patrol #12","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T22:24:40.556072-08:00","updated_at":"2025-12-24T22:24:40.556072-08:00","closed_at":"2025-12-24T22:24:40.556047-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-fuqx","title":"Merge: gt-ci84","description":"branch: polecat/slit\ntarget: main\nsource_issue: gt-ci84\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-23T19:38:21.954136-08:00","updated_at":"2025-12-24T00:18:03.075287-08:00","closed_at":"2025-12-23T23:30:30.859023-08:00"}
{"id":"gt-fuz6p","title":"Digest: mol-deacon-patrol","description":"Patrol 3: All healthy, quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:29:38.649433-08:00","updated_at":"2025-12-25T00:29:38.649433-08:00","closed_at":"2025-12-25T00:29:38.649388-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-fv80v","title":"Digest: mol-deacon-patrol","description":"Patrol 9: All healthy, no messages","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T17:58:55.897968-08:00","updated_at":"2025-12-25T17:58:55.897968-08:00","closed_at":"2025-12-25T17:58:55.897919-08:00","close_reason":"Squashed from 8 wisps","dependencies":[{"issue_id":"gt-fv80v","depends_on_id":"gt-wisp-7ec","type":"parent-child","created_at":"2025-12-25T17:58:55.899549-08:00","created_by":"deacon"}]}
{"id":"gt-g0cp","title":"Digest: mol-deacon-patrol","description":"Patrol OK: town quiet","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-23T02:46:38.594856-08:00","updated_at":"2025-12-23T02:46:38.594856-08:00","closed_at":"2025-12-23T02:46:38.594818-08:00","close_reason":"Squashed from 5 wisps"}
{"id":"gt-g1ud","title":"Direct test","description":"Testing direct bd create","status":"tombstone","priority":2,"issue_type":"message","created_at":"2025-12-20T17:45:55.058067-08:00","updated_at":"2025-12-25T14:12:42.282698-08:00","labels":["from:test-sender"],"deleted_at":"2025-12-25T14:12:42.282698-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"message"}
{"id":"gt-g261","title":"generate-summary","description":"Summarize patrol cycle for digest.\n\nNeeds: save-state","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-23T01:41:54.507401-08:00","updated_at":"2025-12-25T15:52:58.892616-08:00","close_reason":"Parent gt-751s superseded by Christmas Ornament pattern","dependencies":[{"issue_id":"gt-g261","depends_on_id":"gt-n9o2","type":"blocks","created_at":"2025-12-23T01:41:54.634797-08:00","created_by":"stevey"}],"deleted_at":"2025-12-25T15:52:58.892616-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
@@ -725,10 +728,11 @@
{"id":"gt-gkbof","title":"Digest: mol-deacon-patrol","description":"Patrol 11: routine, all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T13:44:23.439842-08:00","updated_at":"2025-12-25T13:44:23.439842-08:00","closed_at":"2025-12-25T13:44:23.439815-08:00","close_reason":"Squashed from 8 wisps","dependencies":[{"issue_id":"gt-gkbof","depends_on_id":"gt-uoj8o","type":"parent-child","created_at":"2025-12-25T13:44:23.440545-08:00","created_by":"stevey"}]}
{"id":"gt-gl2","title":"Clarify Mayor vs Witness cleanup responsibilities","description":"Document the cleanup authority model: Witness owns ALL per-worker cleanup, Mayor never involved.\n\n## The Rule\n\n**Witness handles ALL per-worker cleanup. Mayor is never involved.**\n\n## Why This Matters\n\n1. Separation of concerns: Mayor strategic, Witness operational\n2. Reduced coordination overhead: No back-and-forth for routine cleanup\n3. Faster shutdown: Witness kills workers immediately upon verification\n4. Cleaner escalation: Mayor only hears about problems\n\n## What Witness Handles\n\n- Verifying worker git state before kill\n- Nudging workers to fix dirty state\n- Killing worker sessions\n- Updating worker state (sleep/wake)\n- Logging verification results\n\n## What Mayor Handles\n\n- Receiving swarm complete notifications\n- Deciding whether to start new swarms\n- Handling escalations (stuck workers after 3 retries)\n- Cross-rig coordination\n\n## Escalation Path\n\nWorker stuck -\u003e Witness nudges (up to 3x) -\u003e Witness escalates to Mayor -\u003e Mayor decides: force kill, reassign, or human\n\n## Anti-Patterns\n\nDO NOT: Mayor asks Witness if worker X is clean\nDO: Witness reports swarm complete, all workers verified\n\nDO NOT: Mayor kills worker sessions directly\nDO: Mayor tells Witness to abort swarm, Witness handles cleanup\n\nDO NOT: Workers report done to Mayor\nDO: Workers report to Witness, Witness aggregates and reports up","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-15T19:48:56.678724-08:00","updated_at":"2025-12-15T20:48:12.068964-08:00","dependencies":[{"issue_id":"gt-gl2","depends_on_id":"gt-82y","type":"blocks","created_at":"2025-12-15T19:49:05.929877-08:00","created_by":"daemon"}]}
{"id":"gt-gl6s","title":"gt spawn: polecats report success but no work actually happens","description":"## Problem\n\ngt spawn polecats have multiple silent failure modes:\n\n### Failure Mode 1: No gt prime\n- Claude starts at prompt and waits for input\n- SessionStart hook doesn't auto-run 'gt prime'\n- Without gt prime, polecats don't pick up work\n\n### Failure Mode 2: No git push (CRITICAL)\n- Polecat commits code locally\n- Polecat closes the beads issue\n- Polecat sends POLECAT_DONE\n- **But code is never pushed to remote branch**\n- When worktree is cleaned up, commits are lost forever\n- Issue appears closed but no code exists\n\n## Evidence\n\ntestcat on bd-d28c:\n- Reported 'Work Complete' with commits 7d3447b9, cd87e541\n- Closed bd-d28c\n- Submitted MR bd-yx22\n- But: `grep -r 'TestCreateTombstone' cmd/bd/*.go` returns nothing\n- No polecat/testcat branch on remote\n\n## Required Fixes\n\n1. Polecats MUST push their branch before closing issues\n2. Witness MUST verify branch exists on remote before cleanup\n3. gt spawn should auto-nudge 'gt prime'\n4. Consider: Polecat handoff should fail if unpushed commits exist\n\n## Verification Protocol for Witness\n\nBefore accepting POLECAT_DONE:\n```bash\n# 1. Verify branch pushed\ngit branch -r | grep polecat/\u003cname\u003e\n\n# 2. Verify code exists\ngrep -r '\u003cexpected_function\u003e' path/to/files\n\n# 3. Only then cleanup\n```","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-23T21:22:45.498303-08:00","updated_at":"2025-12-23T21:50:46.490356-08:00","closed_at":"2025-12-23T21:50:46.490356-08:00","close_reason":"Fixed: Added BranchPushedToRemote() check to verifyPolecatState - witness now verifies branches are pushed before cleanup"}
{"id":"gt-glgdo","title":"MQ conflict prediction: file hotspot tracking","description":"Track which files change frequently to predict conflicts before spawn.\n\n## Goal\nBefore spawning a polecat on an issue, warn if the target files are \"hot\" (recently changed by other MRs).\n\n## Approach\n1. Track file change frequency per MR (sliding window, e.g., last 24h)\n2. At spawn time, analyze issue description / planned changes\n3. If touching hot files, either:\n - Warn and proceed\n - Suggest waiting for queue to clear\n - Auto-assign to ownership zone (future)\n\n## Implementation\n- Add file_changes log to refinery state (or separate hotspot.json)\n- After each merge, record changed files with timestamp\n- gt spawn checks hotspots before assignment\n- Optional: Witness patrol aggregates hotspot data\n\n## Example\n```\n$ gt spawn --issue gt-xyz\nWarning: This issue likely touches auth/login.go\n - Changed 3 times in last 2 hours\n - 2 MRs pending that also touch this file\nProceed anyway? [y/N]\n```\n\n## Parent\ngt-lxxh2","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-25T18:30:33.326775-08:00","updated_at":"2025-12-25T18:30:33.326775-08:00","dependencies":[{"issue_id":"gt-glgdo","depends_on_id":"gt-lxxh2","type":"blocks","created_at":"2025-12-25T18:30:38.957891-08:00","created_by":"daemon"}]}
{"id":"gt-glwd","title":"Test Patrol Parent","description":"Test parent for Christmas Ornament pattern","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T21:50:24.723492-08:00","updated_at":"2025-12-25T01:33:00.286736-08:00","closed_at":"2025-12-25T01:33:00.286736-08:00","close_reason":"Test pollution cleanup"}
{"id":"gt-glwd.1","title":"Test Polecat Arm","description":"Test child for bonding pattern","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T21:50:24.82169-08:00","updated_at":"2025-12-25T01:33:00.270139-08:00","closed_at":"2025-12-25T01:33:00.270139-08:00","close_reason":"Test pollution cleanup","dependencies":[{"issue_id":"gt-glwd.1","depends_on_id":"gt-glwd","type":"parent-child","created_at":"2025-12-24T21:50:24.822098-08:00","created_by":"daemon"}]}
{"id":"gt-glzm","title":"Digest: mol-deacon-patrol","description":"Patrol: 4 msgs (2 blocked on bd mol current, 2 handoffs). 11 polecats, 18 sessions. Swarm in progress.","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-23T00:23:09.331459-08:00","updated_at":"2025-12-23T00:23:09.331459-08:00","closed_at":"2025-12-23T00:23:09.331412-08:00","close_reason":"Squashed from 5 wisps"}
{"id":"gt-gmqe","title":"Refinery needs branch visibility: Convert to worktree or push branches","description":"The refinery can't see polecat branches because it's a separate clone, not a worktree.\n\n## Problem\n- Polecats are worktrees of mayor/rig (correct, per gt-4u5z)\n- Refinery is still a separate clone at refinery/rig (not converted)\n- Polecat branches are local to mayor/rig, invisible to refinery\n\n## Current Workaround\nPush polecat branch to origin before gt done.\n\n## Options\n1. Convert refinery to worktree of mayor/rig (preferred - matches gt-4u5z design)\n2. Have gt done push the branch before creating MR\n3. Have refinery fetch from mayor/rig directly\n\n## Evidence\nTracer bullet 2025-12-23: Refinery couldn't see polecat/tracer until we pushed it to origin.","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-23T21:58:27.414179-08:00","updated_at":"2025-12-23T21:58:27.414179-08:00"}
{"id":"gt-gmqe","title":"Refinery needs branch visibility: Convert to worktree or push branches","description":"The refinery cannot see polecat branches because it is a separate clone, not a worktree.\n\n## Problem\n- Polecats are worktrees of mayor/rig (correct, per gt-4u5z)\n- Refinery is still a separate clone at refinery/rig (not converted)\n- Polecat branches are local to mayor/rig, invisible to refinery\n\n## Decision (2025-12-25)\n**Use a shared bare repo as the single git source of truth.**\n\n```\ngastown/\n├── .repo.git/ ← Bare repo (no working tree, invisible base)\n├── mayor/rig/ ← Worktree (human workspace)\n├── polecats/\n│ └── Toast/ ← Worktree on polecat/Toast\n├── refinery/rig/ ← Worktree on main (can see all branches!)\n└── crew/max/ ← Worktree or separate clone (TBD)\n```\n\n**Why bare repo:**\n- No working directory to accidentally work in\n- Standard git pattern (how servers work)\n- All worktrees share branch visibility\n- Refinery on main can merge polecat branches directly\n\n## Implementation\n1. Create `.repo.git` as bare clone\n2. Convert refinery to worktree of .repo.git on main\n3. Convert polecats to worktrees of .repo.git\n4. Optionally convert mayor/rig (or keep as worktree)\n5. Update gt rig init for new rigs\n6. Write migration for existing rigs\n\n## Evidence\nTracer bullet 2025-12-23: Refinery could not see polecat/tracer until pushed to origin.","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-23T21:58:27.414179-08:00","updated_at":"2025-12-25T18:28:34.886289-08:00"}
{"id":"gt-godo","title":"Digest: mol-deacon-patrol","description":"Patrol 16: OK","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T21:01:17.323252-08:00","updated_at":"2025-12-24T21:01:17.323252-08:00","closed_at":"2025-12-24T21:01:17.323218-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-gox90","title":"Digest: mol-deacon-patrol","description":"Patrol 18: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T11:06:01.664845-08:00","updated_at":"2025-12-25T11:06:01.664845-08:00","closed_at":"2025-12-25T11:06:01.664813-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-gp6i","title":"Witness cleanup should know worktree parent repo","description":"Witness had to discover that polecat worktrees are created from mayor/rig, not the rig root.\n\n## Problem\nWhen cleaning up polecat/tracer:\n- Witness ran git worktree remove from gastown/ - failed\n- Had to discover worktree was from mayor/rig\n- Then removed correctly\n\n## Improvement\nWitness should know the worktree parent repo path (mayor/rig) and clean up from there directly.\n\n## Evidence\nTracer bullet 2025-12-23: Witness took extra steps to figure out cleanup path.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T21:58:29.302337-08:00","updated_at":"2025-12-23T21:58:29.302337-08:00"}
@@ -866,6 +870,7 @@
{"id":"gt-jo9n","title":"OSS Launch Readiness","description":"Track all issues blocking or affecting OSS launch quality.\n\nP0 Blocker:\n- gt-ofl2: ProcessMRFromQueue not implemented\n\nP1 Must Fix:\n- gt-vzic: README missing prerequisites (tmux)\n- gt-xbfw: Missing OSS files (CONTRIBUTING, etc.)\n- gt-wexr: Polecat role swarm terminology\n- gt-6n13: Competing molecule mechanisms\n- gt-3abj: go install may fail\n\nP2 Should Fix:\n- gt-qj12: Obsolete beads cleanup\n- gt-zn9m: Error suppression patterns\n- gt-9uxr: Test coverage gaps\n- gt-fm75: os.Exit in library code\n- gt-yewf: Mismatched startup protocols\n- gt-1z4m: Undocumented gt swarm\n- gt-bho9: stderr suppression\n- gt-rxsh: Merge model confusion\n- gt-5ipl: Witness role commands\n\nP3 Nice to Have:\n- gt-t5mz: Hardcoded values","status":"closed","priority":0,"issue_type":"epic","created_at":"2025-12-24T12:51:56.676473-08:00","updated_at":"2025-12-25T00:50:31.575696-08:00","closed_at":"2025-12-25T00:50:31.575696-08:00","close_reason":"All P0/P1 blockers resolved. Remaining P2/P3 items are post-launch cleanup and can be addressed incrementally."}
{"id":"gt-jongy","title":"Digest: mol-deacon-patrol","description":"Patrol 16: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T11:05:57.565433-08:00","updated_at":"2025-12-25T11:05:57.565433-08:00","closed_at":"2025-12-25T11:05:57.565401-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-jpfh5","title":"Digest: mol-deacon-patrol","description":"Patrol complete: inbox empty, all agents healthy (mayor, 2 witnesses, 2 refineries), no orphans","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:59:07.847042-08:00","updated_at":"2025-12-25T10:59:07.847042-08:00","closed_at":"2025-12-25T10:59:07.84701-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-jpn0s","title":"Digest: mol-deacon-patrol","description":"Patrol 11: All healthy, no messages","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T18:08:58.603203-08:00","updated_at":"2025-12-25T18:08:58.603203-08:00","closed_at":"2025-12-25T18:08:58.603153-08:00","close_reason":"Squashed from 8 wisps","dependencies":[{"issue_id":"gt-jpn0s","depends_on_id":"gt-wisp-qt3","type":"parent-child","created_at":"2025-12-25T18:08:58.603973-08:00","created_by":"deacon"}]}
{"id":"gt-jpt","title":"Town-level beads: Real DB for coordination mail","description":"Implement Option A from mail redesign: Town gets real beads DB for coordination.\n\n## Background\n\nMail is now Beads. But currently:\n- Town .beads/redirect points to rig beads\n- mayor/mail/ has legacy JSONL files\n- Cross-rig coordination has no clear home\n\n## Design\n\nTown beads = coordination, cross-rig mail, mayor inbox, handoffs\nRig beads = project issues, work items\n\nMatches HOP hierarchy: platform \u003e project \u003e worker\n\n## Structure\n\n~/gt/\n .beads/ # REAL beads DB (prefix: gm-)\n mayor/\n town.json\n state.json # NO mail/ directory\n gastown/\n .beads/ # Rig beads (prefix: ga-)\n\n## Tasks\n\n1. Delete ~/gt/.beads/redirect\n2. Run bd init --prefix gm at ~/gt/ (town beads)\n3. Delete ~/gt/mayor/mail/ directory\n4. Update gt mail to use beads not JSONL\n5. Add mail fields (thread_id, reply_to, msg_type)\n6. Update gt prime for two-tier model\n7. Update docs/architecture.md\n\n## Addressing\n\n- mayor/ -\u003e town beads\n- rig/agent -\u003e rig beads\n- Cross-rig -\u003e town beads","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-17T19:09:55.855955-08:00","updated_at":"2025-12-19T01:57:17.032558-08:00","closed_at":"2025-12-19T01:57:17.032558-08:00"}
{"id":"gt-jq0f","title":"Merge: gt-yd98","description":"branch: polecat/valkyrie\ntarget: main\nsource_issue: gt-yd98\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-23T00:23:57.718716-08:00","updated_at":"2025-12-23T01:16:15.694749-08:00","closed_at":"2025-12-23T01:16:15.694749-08:00","close_reason":"Merged to main"}
{"id":"gt-jqpm","title":"Digest: mol-deacon-patrol @ 2025-12-24 19:23","description":"Patrol 6: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T19:23:13.766787-08:00","updated_at":"2025-12-24T19:23:13.766787-08:00","closed_at":"2025-12-24T19:23:13.76673-08:00","close_reason":"Squashed from wisp gt-zgk (9 issues)"}
@@ -898,6 +903,7 @@
{"id":"gt-kh6q","title":"Remove Go-based witness patrol - Claude session is the executor","description":"## Problem\n\nThe witness has 1370 lines of Go code in internal/witness/manager.go that reimplements what mol-witness-patrol does:\n- healthCheck() - polls polecats\n- autoSpawnForReadyWork() - spawns polecats for ready issues \n- handleStuckPolecat() - nudge logic\n- processShutdownRequests() - cleanup logic\n- verifyPolecatState() - git state checks\n\nThis is backwards. The molecule should drive the work, Claude should execute it.\n\n## The Wrong Architecture (gt-59zd, now cancelled)\n\nThe cancelled gt-59zd tried to use molecules as 'tracking ledgers' for Go code:\n- Go code runs patrol logic\n- Molecule just records what Go did\n- Duplicates work, adds complexity\n\n## The Right Architecture\n\n1. Witness runs as Claude session (via gt sling witness or tmux)\n2. Claude executes mol-witness-patrol steps directly\n3. No Go patrol loop needed\n4. Molecule IS the executor, not bookkeeping\n\n## Scope\n\n1. Remove patrol-related functions from manager.go:\n - run(), checkAndProcess(), healthCheck()\n - handleStuckPolecat(), getNudgeCount(), recordNudge()\n - processShutdownRequests(), verifyPolecatState()\n - autoSpawnForReadyWork(), etc.\n\n2. Keep session management functions:\n - Start(), Stop(), Status() - for starting/stopping Claude session\n - State persistence for session identity\n\n3. Update gt witness commands to use Claude session model\n\n4. Test that mol-witness-patrol executes correctly in Claude session\n\n## Related\n\n- gt-zde4: Fixed Witness CLAUDE.md to emphasize mol-following\n- gt-59zd: Cancelled - wrong architecture\n- witness.md.tmpl: Already rewritten with ZFC principle","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-23T22:42:13.02343-08:00","updated_at":"2025-12-24T00:18:03.093897-08:00","closed_at":"2025-12-23T23:45:02.782485-08:00"}
{"id":"gt-ki3qa","title":"Digest: mol-deacon-patrol","description":"Patrol 1: All healthy, no mail, no action needed","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:43:42.061004-08:00","updated_at":"2025-12-25T10:43:42.061004-08:00","closed_at":"2025-12-25T10:43:42.060969-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-kjnt","title":"Polecat Mood Plugin (standard)","description":"Standard witness plugin molecule that assesses polecat emotional state.\n\n## Molecule Definition\n\n```json\n{\n \"id\": \"mol-polecat-mood\",\n \"title\": \"Assess mood for {{polecat_name}}\",\n \"description\": \"Analyze captured output and determine emotional state.\\n\\nVars:\\n- {{polecat_name}} - The polecat to assess\\n- {{captured_output}} - Recent tmux capture\\n\\nOutput: gt polecat mood {{polecat_name}} \u003cemoji\u003e\",\n \"labels\": [\"template\", \"plugin\", \"witness\", \"tier:haiku\"],\n \"issue_type\": \"task\"\n}\n```\n\n## Mood Emojis\n\n```\n😺 working Active tool calls, making progress\n😸 productive Completing tasks, tests passing\n🐱 idle Waiting at prompt, no recent activity\n😼 confident Self-reviewing, about to submit\n😿 struggling Repeated errors, test failures\n🙀 stuck No progress for 10+ min\n😽 done Work complete, requesting shutdown\n😾 blocked Explicitly waiting on dependency\n```\n\n## Bonding\n\nDuring witness patrol plugin-run step:\n\n```bash\nbd mol bond mol-polecat-mood $PATROL_WISP \\\n --ref mood-{{polecat_name}} \\\n --var polecat_name=ace \\\n --var captured_output=\"$TMUX_CAPTURE\"\n```\n\n## Installation\n\n```bash\nbd mol install mol-polecat-mood # From Mol Mall\n```\n\n## Customization\n\nFork the molecule and modify description to change assessment criteria or add custom moods. Install your fork to override.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-21T16:17:12.841134-08:00","updated_at":"2025-12-23T05:07:39.495061-08:00","dependencies":[{"issue_id":"gt-kjnt","depends_on_id":"gt-u818","type":"blocks","created_at":"2025-12-21T16:17:20.444775-08:00","created_by":"daemon"}]}
{"id":"gt-kkcql","title":"Digest: mol-deacon-patrol","description":"Patrol 8: All healthy, no messages","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T17:53:55.840419-08:00","updated_at":"2025-12-25T17:53:55.840419-08:00","closed_at":"2025-12-25T17:53:55.840372-08:00","close_reason":"Squashed from 8 wisps","dependencies":[{"issue_id":"gt-kkcql","depends_on_id":"gt-wisp-fyv","type":"parent-child","created_at":"2025-12-25T17:53:55.841157-08:00","created_by":"deacon"}]}
{"id":"gt-kktj","title":"Patrol agent state.json not updated on activity","description":"Witness and Refinery state.json files show last_active from Dec 19 even though sessions have been running. The state should update each patrol cycle.\n\nEvidence:\n```\n$ cat beads/witness/state.json\n{\"role\": \"witness\", \"last_active\": \"2025-12-19T17:50:00Z\"}\n\n$ cat beads/refinery/state.json \n{\"role\": \"refinery\", \"last_active\": \"2025-12-19T17:50:00Z\"}\n```\n\nExpected: last_active should update each time the agent runs a patrol cycle.\n\nImpact: Can't tell if patrol agents are actually active vs just having an open tmux session.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-23T20:29:58.515591-08:00","updated_at":"2025-12-23T20:29:58.515591-08:00"}
{"id":"gt-kl5e","title":"Digest: mol-deacon-patrol","description":"Patrol 4: Routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T22:36:01.786393-08:00","updated_at":"2025-12-24T22:36:01.786393-08:00","closed_at":"2025-12-24T22:36:01.786359-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-kmc7","title":"Digest: mol-deacon-patrol","description":"Patrol 2: Quick scan, no changes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T23:05:53.201478-08:00","updated_at":"2025-12-24T23:05:53.201478-08:00","closed_at":"2025-12-24T23:05:53.201451-08:00","close_reason":"Squashed from 8 wisps"}
@@ -960,6 +966,7 @@
{"id":"gt-lxn1c","title":"Digest: mol-deacon-patrol","description":"Patrol 9: Quick cycle, all quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T17:07:03.19311-08:00","updated_at":"2025-12-25T17:07:03.19311-08:00","closed_at":"2025-12-25T17:07:03.193078-08:00","close_reason":"Squashed from 8 wisps","dependencies":[{"issue_id":"gt-lxn1c","depends_on_id":"gt-vv3g8","type":"parent-child","created_at":"2025-12-25T17:07:03.193873-08:00","created_by":"deacon"}]}
{"id":"gt-lxsw","title":"gt done: Command doesn't exist but documented in polecat CLAUDE.md","notes":"The polecat CLAUDE.md documents 'gt done' as the command to signal work is ready for merge queue, but running it gives 'unknown command'. Either implement the command or update the documentation.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-20T07:59:44.548479-08:00","updated_at":"2025-12-20T13:20:50.919481-08:00","closed_at":"2025-12-20T13:20:50.919481-08:00"}
{"id":"gt-lxv2z","title":"Digest: mol-deacon-patrol","description":"Patrol 20: routine, handing off","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:20:25.378692-08:00","updated_at":"2025-12-25T10:20:25.378692-08:00","closed_at":"2025-12-25T10:20:25.378666-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-lxxh2","title":"Epic: Merge Queue Scaling","description":"Scale the merge queue beyond 20 polecats per rig.\n\n## Current Limits\n- Serial MQ works well for 5-20 polecats\n- Conflict rate increases with polecat count and task duration\n- At 50+ polecats, conflicts become frequent enough to bottleneck\n\n## Scaling Strategies (in order of implementation)\n\n### Phase 1: Smart Scheduling\n- Track file hotspots (which files change most)\n- Conflict prediction before spawn (warn if touching hot files)\n- Dependency-aware reordering (maximize parallel non-conflicting merges)\n- Priority lanes (P0 jumps queue)\n\n### Phase 2: Ownership Zones\n- Partition code by ownership (team-a owns auth/, team-b owns payments/)\n- Serialize access to shared/hot zones\n- Parallelize work in non-overlapping zones\n\n### Phase 3: Speculative Execution\n- Refinery pool (multiple refineries try merges in parallel)\n- First to pass CI wins, losers rebase and retry\n- Requires cheap CI and tolerance for wasted compute\n\n### Phase 4: Semantic Resolution\n- AI understands change intent, not just diffs\n- Re-implement changes on new baseline when rebase fails\n- Detect incompatible intents → escalate to human\n\n## Key Insight\nThe merge queue is fundamentally a serialization bottleneck. Solutions either:\n1. Reduce staleness (faster work, continuous rebasing)\n2. Reduce conflicts (partition code, ownership zones)\n3. Resolve conflicts (smart merge, semantic understanding)\n4. Avoid conflicts (predictive scheduling)\n\n## Related\n- gt-gmqe: Bare repo architecture (foundation for this)\n- gt-4u5z: Worktree design (precursor)","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-25T18:30:01.55335-08:00","updated_at":"2025-12-25T18:30:01.55335-08:00"}
{"id":"gt-lyn3","title":"Digest: mol-deacon-patrol @ 2025-12-24 19:45","description":"Patrol 8: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T19:45:04.933298-08:00","updated_at":"2025-12-24T19:45:04.933298-08:00","closed_at":"2025-12-24T19:45:04.933206-08:00","close_reason":"Squashed from wisp gt-0pn (9 issues)"}
{"id":"gt-lz13","title":"Update templates with molecule navigation workflow","description":"Update all agent templates to use new molecule navigation commands.\n\n## Commands to integrate\n- bd mol current: orientation after startup/handoff (bd-sal9)\n- bd close --continue: seamless step transitions (bd-ieyy)\n\n## Templates to update\n\n### prompts/roles/polecat.md\n- Add bd mol current to 'Finding Your Work' section\n- Replace manual 3-command dance with bd close --continue\n- Update 'Working Through Steps' section\n\n### prompts/roles/crew.md \n- Add molecule navigation to workflow section\n- Show bd mol current for session startup\n\n### prompts/roles/refinery.md\n- Update patrol step transitions to use --continue\n\n### prompts/roles/witness.md\n- Update patrol step transitions to use --continue\n\n### prompts/roles/deacon.md\n- Update patrol step transitions to use --continue\n\n## Key message\nThe Propulsion Principle: close a step, immediately get handed the next.\nNo friction, no forgetting, no 3-command dance.\n\n## Blocked by (Beads features)\n- bd-sal9: bd mol current\n- bd-ieyy: bd close --continue","notes":"BLOCKED 2025-12-23 00:17: Waiting for beads features (bd mol current, bd close --continue) to be implemented. Notified mayor.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-22T17:01:12.119194-08:00","updated_at":"2025-12-24T00:23:48.578826-08:00","closed_at":"2025-12-24T00:23:48.578826-08:00","close_reason":"Updated 4 templates (polecat, crew, refinery, deacon) with bd mol current and bd close --continue. Witness template doesn't have molecule execution, no changes needed.","dependencies":[{"issue_id":"gt-lz13","depends_on_id":"gt-qswb","type":"blocks","created_at":"2025-12-22T17:01:31.707885-08:00","created_by":"daemon"},{"issue_id":"gt-lz13","depends_on_id":"gt-fly0","type":"blocks","created_at":"2025-12-22T17:01:31.78232-08:00","created_by":"daemon"}]}
{"id":"gt-m08q4","title":"Digest: mol-deacon-patrol","description":"Patrol 19: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T13:45:59.707981-08:00","updated_at":"2025-12-25T13:45:59.707981-08:00","closed_at":"2025-12-25T13:45:59.707951-08:00","close_reason":"Squashed from 8 wisps","dependencies":[{"issue_id":"gt-m08q4","depends_on_id":"gt-5usbf","type":"parent-child","created_at":"2025-12-25T13:45:59.708687-08:00","created_by":"stevey"}]}
@@ -1057,6 +1064,7 @@
{"id":"gt-odfr","title":"Add WaitsFor parsing to molecule steps","description":"Add WaitsFor field to MoleculeStep struct and parse 'WaitsFor: all-children' (and future variants) from molecule descriptions.\n\nThis enables:\n- mol progress to understand fanout patterns\n- Validation that WaitsFor references valid constructs\n- Future automated orchestration\n\nImplementation:\n1. Add WaitsFor []string to MoleculeStep struct\n2. Add waitsForLineRegex to parse 'WaitsFor: ...' lines\n3. Update ParseMoleculeSteps to extract WaitsFor\n4. Update tests","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-23T21:35:55.004767-08:00","updated_at":"2025-12-23T21:41:27.539959-08:00","closed_at":"2025-12-23T21:41:27.539959-08:00","close_reason":"Implemented WaitsFor parsing with tests"}
{"id":"gt-odvf","title":"Document bd mol bond/squash/burn CLI","description":"Create CLI reference documentation for molecule commands:\n\n## bd mol bond\n\nInstantiate a proto into a runnable molecule.\n\n```bash\nbd mol bond \u003cproto-id\u003e [--wisp] [--assignee=\u003caddr\u003e]\n```\n\n- Default: creates a Mol (durable, in main beads)\n- --wisp: creates a Wisp (ephemeral, in .beads-ephemeral/)\n- --assignee: who will execute this molecule\n\n## bd mol squash\n\nComplete a molecule and generate digest.\n\n```bash\nbd mol squash \u003cmol-id\u003e --summary='...'\n```\n\n- For Mol: creates digest in git history\n- For Wisp: evaporates (no permanent record)\n- --summary: required summary of what was accomplished\n\n## bd mol burn\n\nAbandon a molecule without completing.\n\n```bash\nbd mol burn \u003cmol-id\u003e [--reason='...']\n```\n\n- Discards molecule state\n- No digest created\n- Use when molecule is no longer needed","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-21T16:33:06.462105-08:00","updated_at":"2025-12-23T02:14:23.810794-08:00","closed_at":"2025-12-23T02:14:23.810794-08:00","close_reason":"Already documented in docs/molecules.md lines 70-235","dependencies":[{"issue_id":"gt-odvf","depends_on_id":"gt-62hm","type":"blocks","created_at":"2025-12-21T16:33:17.530156-08:00","created_by":"daemon"}]}
{"id":"gt-odvr","title":"Merge: gt-r6td","description":"branch: polecat/furiosa\ntarget: main\nsource_issue: gt-r6td\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-22T22:54:01.000047-08:00","updated_at":"2025-12-22T22:55:43.764376-08:00","closed_at":"2025-12-22T22:55:43.764376-08:00","close_reason":"Merged to main"}
{"id":"gt-of0w1","title":"Digest: mol-deacon-patrol","description":"Patrol 14: All healthy, no messages","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T18:24:00.367405-08:00","updated_at":"2025-12-25T18:24:00.367405-08:00","closed_at":"2025-12-25T18:24:00.367351-08:00","close_reason":"Squashed from 8 wisps","dependencies":[{"issue_id":"gt-of0w1","depends_on_id":"gt-wisp-g8a","type":"parent-child","created_at":"2025-12-25T18:24:00.368134-08:00","created_by":"deacon"}]}
{"id":"gt-ofl2","title":"CRITICAL: ProcessMRFromQueue not implemented - Refinery merge logic stubbed","description":"File: internal/refinery/engineer.go:384\nThe ProcessMRFromQueue() function returns hardcoded failure with TODO comment.\nThis is a core refinery function that cannot process merges in current state.\nMust implement actual merge logic before OSS launch.","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-12-24T12:50:27.824454-08:00","updated_at":"2025-12-24T12:58:06.150296-08:00","closed_at":"2025-12-24T12:58:06.150296-08:00","close_reason":"Not a blocker: Refinery agent manually executes git commands per role prompt. The stubbed ProcessMRFromQueue is for future beads-based automation, not currently in the active path. manager.ProcessMR() is also fully implemented if needed.","dependencies":[{"issue_id":"gt-ofl2","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T12:52:04.778532-08:00","created_by":"daemon"}]}
{"id":"gt-ogpk","title":"Add neighbor-check steps to all patrol molecules","description":"Part of the 'Gas Town is a Village' antifragility design.\n\nEvery patrol molecule should include optional neighbor-checking:\n- Deacon checks Witness and Refinery health\n- Witness checks Refinery health \n- Refinery checks Witness health\n- Polecats can peek other polecats\n\nUse gt peek to check health states.\nIf stuck neighbor found, can nudge or escalate.\n\nThis creates distributed monitoring - no single point of failure.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T22:01:16.358314-08:00","updated_at":"2025-12-22T22:01:16.358314-08:00"}
{"id":"gt-oh90","title":"Test Patrol for Bonding","description":"Parent issue for mol bond CLI test","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T00:23:29.229339-08:00","updated_at":"2025-12-25T01:33:00.714435-08:00","closed_at":"2025-12-25T01:33:00.714435-08:00","close_reason":"Test pollution cleanup"}
@@ -1080,7 +1088,6 @@
{"id":"gt-p4s9","title":"Digest: mol-deacon-patrol","description":"Patrol 7: Routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T22:36:49.392521-08:00","updated_at":"2025-12-24T22:36:49.392521-08:00","closed_at":"2025-12-24T22:36:49.392494-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-p9zh","title":"gt doctor: detect orphaned code on beads-sync branch","description":"After merging beads-sync to main, some code changes can be lost if the merge conflict resolution drops files.\n\nAdd a doctor check that runs:\n git diff main..beads-sync -- '*.go' '*.md'\n\nIf there are differences in code files (not just .beads/), warn about potentially orphaned work.\n\nToday's incident: Merge 96c773f lost mailbox.go and router.go changes from 5791752, requiring re-implementation.\n\nAcceptance:\n- gt doctor warns if beads-sync has unmerged code changes\n- Excludes .beads/ directory (expected to differ)\n- Shows file list of orphaned changes","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-20T22:01:56.794648-08:00","updated_at":"2025-12-20T22:19:59.777921-08:00","closed_at":"2025-12-20T22:19:59.777921-08:00","close_reason":"Implemented both checks: persistent-role-branches and beads-sync-orphans. Also added ensureMainBranch() to crew attach."}
{"id":"gt-pbr3","title":"Add godoc comments to exported functions","description":"Several exported functions lack godoc comments. While not critical, adding documentation would improve code maintainability. Focus on:\n\n- Public API functions in each package\n- Exported types and their methods\n- Functions that have non-obvious behavior\n\nCan be addressed incrementally as code is touched.","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-21T21:35:26.732436-08:00","updated_at":"2025-12-21T22:20:01.785697-08:00","closed_at":"2025-12-21T22:20:01.785697-08:00","close_reason":"Deferred to post-launch. Documentation comments are nice-to-have for launch. Core functionality is documented; additional godoc can be added incrementally."}
{"id":"gt-pc2p0","title":"Digest: mol-deacon-patrol","description":"Patrol 1: All agents healthy, no messages, no orphans","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:28:10.81431-08:00","updated_at":"2025-12-25T00:28:10.81431-08:00","closed_at":"2025-12-25T00:28:10.814279-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-pc5d","title":"Recover stale polecat work: 4 branches with unpushed commits","description":"During observation of polecat workflow, found 4 polecats with unpushed work:\n\n## Branches Pushed (preserved)\n- polecat/capable: 3 commits (molecule catalog, doctor orphan detection, gt done)\n- polecat/dementus: 4 commits (Witness MVP, handoff fixes)\n- polecat/furiosa: 2 commits (bulk polecat removal, spawn handoff)\n- polecat/rictus: 1 commit (molecule docs)\n\n## Action Required\n1. Review each branch for merge-worthiness\n2. Either:\n a. Create PRs for valuable work\n b. OR discard if superseded\n3. After decision, clean up polecats properly\n\n## Root Cause\nPolecats were not cleaned up after previous work sessions. This is exactly why we need:\n- gt-u1k: gt shutdown should fully cleanup polecats\n- gt-8v8: Refuse to lose uncommitted work\n- gt-9nf: Always create fresh polecats","status":"closed","priority":1,"issue_type":"chore","created_at":"2025-12-20T15:24:29.232772-08:00","updated_at":"2025-12-21T11:24:55.194579-08:00","closed_at":"2025-12-21T11:24:55.194579-08:00","close_reason":"Cleaned up via gt orphans"}
{"id":"gt-pcqda","title":"Digest: mol-deacon-patrol","description":"Patrol 4: 8 sessions active, all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:30:08.65881-08:00","updated_at":"2025-12-25T00:30:08.65881-08:00","closed_at":"2025-12-25T00:30:08.658779-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-pdqc","title":"gt spawn: beads sync warnings on fresh worktree","description":"When spawning fresh polecats, seeing 'Warning: beads sync: exit status 1' and 'Warning: beads push: exit status 1'. Worktrees are created but beads state may not be properly synced.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-23T00:19:09.375303-08:00","updated_at":"2025-12-23T00:19:09.375303-08:00"}
@@ -1120,6 +1127,7 @@
{"id":"gt-qn4l","title":"bd create should support molecule type","description":"gt molecule commands expect type=molecule but bd validates against bug|feature|task|epic|chore|merge-request only","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-19T18:25:31.591953-08:00","updated_at":"2025-12-19T18:41:15.654491-08:00","closed_at":"2025-12-19T18:41:15.654491-08:00"}
{"id":"gt-qna4","title":"gt done: Missing command referenced in polecat docs","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-20T01:10:57.495372-08:00","updated_at":"2025-12-20T07:47:01.733466-08:00","closed_at":"2025-12-20T07:47:01.733466-08:00"}
{"id":"gt-qns0","title":"TIDY UP: Your previous work (patrol runner) was already m...","description":"TIDY UP: Your previous work (patrol runner) was already merged to main. Check your git status is clean, sync beads, and if nothing to do, just run 'gt done'.","status":"closed","priority":2,"issue_type":"task","assignee":"gastown/ace","created_at":"2025-12-21T17:26:39.343497-08:00","updated_at":"2025-12-21T17:30:05.98355-08:00","closed_at":"2025-12-21T17:30:05.98355-08:00","close_reason":"Polecats cleaned up after reboot"}
{"id":"gt-qobkl","title":"Digest: mol-deacon-patrol","description":"Patrol 13: All healthy, no messages","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T18:18:57.096949-08:00","updated_at":"2025-12-25T18:18:57.096949-08:00","closed_at":"2025-12-25T18:18:57.096888-08:00","close_reason":"Squashed from 8 wisps","dependencies":[{"issue_id":"gt-qobkl","depends_on_id":"gt-wisp-6y9","type":"parent-child","created_at":"2025-12-25T18:18:57.09772-08:00","created_by":"deacon"}]}
{"id":"gt-qp98","title":"Refactor: Eliminate state.json, use beads assignee field for polecat state","description":"## Problem\n\nstate.json in each polecat worktree duplicates data that should be in beads:\n- `issue` field duplicates assignment (should be issue.assignee)\n- `state` field duplicates status (derivable from issue.status)\n- `name/rig/branch/clone_path` are all derivable from filesystem/git\n\nThis violates 'Beads as the data plane' (HOP Decision 001).\n\n## Current State\n\n```json\n{\n \"name\": \"Angharad\", // Derivable: basename(cwd)\n \"rig\": \"gastown\", // Derivable: parent dir name\n \"state\": \"working\", // Should be: issue.status\n \"clone_path\": \"/path\", // Derivable: cwd\n \"branch\": \"polecat/X\", // Derivable: git branch\n \"issue\": \"gt-xyz\", // Should be: issue.assignee\n \"timestamps\": \"...\" // Should be in beads history\n}\n```\n\n## Target State\n\n**Polecat identity**: Derived from worktree path\n**Polecat assignment**: `issue.assignee = 'gastown/Angharad'`\n**Polecat state**: Derived from issue.status (in_progress = working, closed = done)\n**Polecat existence**: Worktree directory exists\n\n## Benefits\n\n1. Single source of truth (no sync issues)\n2. Queryable: `bd list --assignee=gastown/Angharad`\n3. History tracking via beads\n4. Cross-agent coordination via beads sync\n5. Simpler code (no state file management)\n\n## Implementation\n\n1. Update `gt spawn` to set issue.assignee instead of writing state.json\n2. Update polecat list/status commands to query beads\n3. Update Witness to query beads for polecat state\n4. Remove state.json read/write code\n5. Keep state.json as optional bootstrap cache (perf optimization only)","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-19T11:40:33.389689-08:00","updated_at":"2025-12-19T12:07:43.519059-08:00","closed_at":"2025-12-19T12:07:43.519059-08:00"}
{"id":"gt-qqtk","title":"Speed up test suite","description":"Tests are running slow during MQ processing. Investigate and optimize:\n- Profile test execution time\n- Look for slow tests (network, file I/O, sleeps)\n- Consider parallel test execution\n- Cache expensive setup where possible","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-19T17:44:14.597955-08:00","updated_at":"2025-12-19T17:44:14.597955-08:00"}
{"id":"gt-qrze","title":"Work on gt-role-template: Refine witness/CLAUDE.md role t...","description":"Work on gt-role-template: Refine witness/CLAUDE.md role template. Add clearer heartbeat protocol, mail checking procedure, nudge decision criteria, escalation thresholds. Run 'bd show gt-role-template' for details.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-20T07:53:27.305468-08:00","updated_at":"2025-12-20T07:58:39.269234-08:00","closed_at":"2025-12-20T07:58:39.269234-08:00"}
@@ -1253,6 +1261,7 @@
{"id":"gt-tr0a","title":"Build rig/worker tree view component","description":"Bubbletea component showing hierarchical rig list with workers. Each rig expandable to show workers. Each worker shows: status indicator, current molecule title, step progress (X/Y), time since last activity.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T16:27:11.129093-08:00","updated_at":"2025-12-23T16:27:11.129093-08:00","dependencies":[{"issue_id":"gt-tr0a","depends_on_id":"gt-3p77","type":"blocks","created_at":"2025-12-23T16:27:38.55401-08:00","created_by":"daemon"},{"issue_id":"gt-tr0a","depends_on_id":"gt-rivr","type":"parent-child","created_at":"2025-12-23T16:28:30.771619-08:00","created_by":"daemon"}]}
{"id":"gt-tr3d","title":"Zombie session detection for refinery/witness","description":"A Claude session can crash or hang while still appearing as 'running' in tmux. The current IsRunning checks only verify tmux session exists, not that Claude is actually processing.\n\n## Problem\n- Refinery session might be hung (Claude crashed, infinite loop, etc.)\n- tmux HasSession returns true, so auto-start doesn't trigger\n- MRs pile up with no processing\n\n## Solution Options\n1. **Activity-based detection**: Check last output timestamp in tmux\n2. **Heartbeat file**: Agents write timestamp to file, check staleness\n3. **Prompt detection**: Look for Claude '\u003e' prompt indicating idle/stuck\n\n## Related\n- gt-bjft (spawn auto-start) assumes IsRunning means healthy\n- Witness patrol assumes running refinery is processing","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T01:02:51.089112-08:00","updated_at":"2025-12-23T14:27:08.051538-08:00","dependencies":[{"issue_id":"gt-tr3d","depends_on_id":"gt-bjft","type":"blocks","created_at":"2025-12-23T01:03:12.10595-08:00","created_by":"daemon"}]}
{"id":"gt-ts4u","title":"Merge: gt-h5n.5","description":"branch: polecat/Scabrous\ntarget: main\nsource_issue: gt-h5n.5\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-19T14:53:43.268861-08:00","updated_at":"2025-12-20T23:17:25.78812-08:00","closed_at":"2025-12-20T23:17:25.78812-08:00","close_reason":"Branches nuked, MRs obsolete"}
{"id":"gt-tst6j","title":"MQ smart scheduling: dependency-aware queue reordering","description":"Implement intelligent MQ reordering to minimize conflicts.\n\n## Goal\nReorder the MQ so that MRs touching disjoint files merge \"in parallel\" (no conflicts), while MRs touching overlapping files are sequenced.\n\n## Approach\n1. For each MR, get list of changed files (from branch diff)\n2. Build conflict graph: edge between MRs if files overlap\n3. Find maximal independent sets (MRs that can merge in any order)\n4. Schedule independent MRs first, then handle remaining sequentially\n\n## Implementation\n- Add file analysis to MR submission (gt done)\n- Store changed_files in MR wisp\n- Refinery sorts queue by: priority → conflicts → age\n\n## Example\n```\nQueue: [A, B, C, D]\nFiles:\n A: auth/login.go\n B: payments/checkout.go \n C: auth/login.go ← conflicts with A!\n D: docs/readme.md\n\nOptimal: [A, B, D, C] - A, B, D can merge without waiting\n```\n\n## Parent\ngt-lxxh2","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-25T18:30:19.240371-08:00","updated_at":"2025-12-25T18:30:19.240371-08:00","dependencies":[{"issue_id":"gt-tst6j","depends_on_id":"gt-lxxh2","type":"blocks","created_at":"2025-12-25T18:30:33.226294-08:00","created_by":"daemon"}]}
{"id":"gt-ttom7","title":"Digest: mol-deacon-patrol","description":"Patrol 13: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T11:05:32.808512-08:00","updated_at":"2025-12-25T11:05:32.808512-08:00","closed_at":"2025-12-25T11:05:32.808479-08:00","close_reason":"Squashed from 8 wisps"}
{"id":"gt-tubn","title":"Track operational stats as entity/audit beads","description":"Witness and refinery track operational stats in JSON files:\n- total_merged, today_merged, total_failed (refinery)\n- total_checks, total_nudges, total_escalations (witness)\n\nFor HOP entity CV tracking, these could become:\n- type=audit beads (daily roll-ups of operational metrics)\n- Entity chain entries showing validator activity\n\nThis provides observability and contributes to entity reputation tracking (e.g., refinery X has merged 500 PRs with 2% failure rate).\n\nNot critical for launch but aligns with HOP Platform of Platforms vision.","status":"open","priority":4,"issue_type":"feature","created_at":"2025-12-21T22:07:30.404073-08:00","updated_at":"2025-12-21T22:07:30.404073-08:00"}
{"id":"gt-tulx","title":"gt mq submit: creates task type instead of merge-request type","description":"## Problem\n\n`gt mq submit` creates an issue with `type: task` but should be `type: merge-request`.\n\n## Evidence\n\n```\n$ bd show gt-n508\ngt-n508: Merge: gt-70b3\nStatus: open\nPriority: P1\nType: task \u003c-- WRONG, should be merge-request\n...\nDescription:\ntype: merge-request \u003c-- Correct type is in description, not in actual type field\n```\n\n## Impact\n\n`gt mq list` shows empty queue because it queries for `type: merge-request`\n\n## Fix\n\n`gt mq submit` should set `--type merge-request` when creating the bead.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-18T21:57:37.905848-08:00","updated_at":"2025-12-18T22:16:31.393114-08:00","closed_at":"2025-12-18T22:16:31.393114-08:00"}
@@ -1394,6 +1403,7 @@
{"id":"gt-xnql","title":"Define constants for magic strings","description":"Several magic strings are hardcoded throughout the codebase:\n- \"mayor\" appears in 20+ places as a path component\n- \"main\" branch name appears in 20+ places\n- \"beads-sync\" branch name in multiple files\n- \"rigs.json\" filename\n\nThese should be constants in a central location for maintainability.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-21T21:34:46.620322-08:00","updated_at":"2025-12-21T22:13:07.292513-08:00","closed_at":"2025-12-21T22:13:07.292513-08:00","close_reason":"Created internal/constants/constants.go with centralized definitions for:\n- Directory names (mayor, polecats, crew, etc.)\n- File names (rigs.json, town.json, state.json)\n- Git branches (main, beads-sync)\n- Session names (gt-mayor, gt-deacon)\n- Agent roles\n\nUpdated key files (rig_helpers.go, daemon.go, status.go) to use the new constants package. Full migration of all usages (~100 files) can be done incrementally."}
{"id":"gt-xnzp","title":"Merge: gt-7923","description":"branch: polecat/rictus\ntarget: main\nsource_issue: gt-7923\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-23T00:18:21.630445-08:00","updated_at":"2025-12-23T01:16:15.701443-08:00","closed_at":"2025-12-23T01:16:15.701443-08:00","close_reason":"Merged to main"}
{"id":"gt-xp2s","title":"P0: Multiple agents can claim same worker identity","description":"Multiple Claude Code sessions running simultaneously all think they are 'dave' on beads/crew/dave. No detection or prevention of identity collision. This breaks the single-agent-per-worker assumption.\n\n## Fix Implemented\n\n1. **Lock Package** (`internal/lock/lock.go`):\n - PID-based lockfile at `\u003cworker\u003e/.gastown/agent.lock`\n - Contains PID, timestamp, session ID, hostname\n - Stale lock detection (checks if owning PID is dead)\n\n2. **Prevention in gt prime**:\n - Workers (crew/polecat) acquire identity lock before loading context\n - If another live process holds the lock, prime fails with clear error\n - Shows lock holder details and resolution steps\n\n3. **Detection with gt agents**:\n - `gt agents check` - scans for collisions and stale locks\n - `gt agents fix` - cleans stale locks\n - JSON output available for patrol tooling\n\n4. **Correction in gt doctor**:\n - New `identity-collision` check\n - `gt doctor --fix` cleans stale locks","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-12-21T23:55:56.649577-08:00","updated_at":"2025-12-22T00:05:07.309612-08:00","closed_at":"2025-12-22T00:05:07.309612-08:00","close_reason":"Implemented lock mechanism with prevention (gt prime), detection (gt agents check), and correction (gt doctor/agents fix)"}
{"id":"gt-xpnev","title":"Digest: mol-deacon-patrol","description":"Patrol 12: All healthy, no messages","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T18:13:59.628034-08:00","updated_at":"2025-12-25T18:13:59.628034-08:00","closed_at":"2025-12-25T18:13:59.627981-08:00","close_reason":"Squashed from 8 wisps","dependencies":[{"issue_id":"gt-xpnev","depends_on_id":"gt-wisp-sja","type":"parent-child","created_at":"2025-12-25T18:13:59.628804-08:00","created_by":"deacon"}]}
{"id":"gt-xpq","title":"Add gt crew rename command","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-18T19:45:32.599846-08:00","updated_at":"2025-12-18T19:46:17.780981-08:00","closed_at":"2025-12-18T19:46:17.780981-08:00"}
{"id":"gt-xqdk","title":"Add molecule to update local go binary on push to main","description":"When pushing to main branch, automatically rebuild and install the gt binary on the local machine so changes are immediately available.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-19T15:37:40.542228-08:00","updated_at":"2025-12-19T15:37:40.542228-08:00"}
{"id":"gt-xqvs","title":"Merge: gt-t9u7","description":"branch: polecat/furiosa\ntarget: main\nsource_issue: gt-t9u7\nrig: gastown","status":"open","priority":2,"issue_type":"merge-request","created_at":"2025-12-23T17:09:52.158844-08:00","updated_at":"2025-12-23T17:09:52.158844-08:00"}