Files
gastown/.beads/issues.jsonl
2025-12-29 16:11:50 -08:00

706 lines
540 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"id":"gt-00gyg","title":"Digest: mol-deacon-patrol","description":"Cycle 4: quiet patrol","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:10:32.605026-08:00","updated_at":"2025-12-28T13:10:32.605026-08:00","closed_at":"2025-12-28T13:10:32.60499-08:00","dependencies":[{"issue_id":"gt-00gyg","depends_on_id":"gt-eph-89x","type":"parent-child","created_at":"2025-12-28T13:10:32.605883-08:00","created_by":"deacon"}]}
{"id":"gt-014ti","title":"Digest: mol-deacon-patrol","description":"P17: stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:00:11.182265-08:00","updated_at":"2025-12-25T20:00:11.182265-08:00","closed_at":"2025-12-25T20:00:11.182211-08:00"}
{"id":"gt-038es","title":"Digest: mol-deacon-patrol","description":"Patrol 2: routine, all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T18:35:42.688017-08:00","updated_at":"2025-12-26T18:35:42.688017-08:00","closed_at":"2025-12-26T18:35:42.687972-08:00"}
{"id":"gt-051cr","title":"gt channel publish command","description":"New CLI command for ephemeral broadcast to channels.\n\n## Deliverables\n\n1. New command: gt channel publish \u003cchannel\u003e \u003cmessage\u003e\n - Example: gt channel publish #witnesses \"Swarm incoming\"\n2. Resolve channel to running sessions\n3. Nudge each session with message\n4. Report delivery status\n\n## Usage\n```bash\ngt channel publish #town \"Handoff in 5 minutes\"\ngt channel publish #rig/gastown \"Merge queue paused\"\n```\n\n## Dependencies\n- #channel resolution (gt-???)\n\n## Acceptance\n- Command works with #channel syntax\n- Message delivered to running sessions\n- Clear output showing delivery status","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-26T14:52:35.212133-08:00","updated_at":"2025-12-26T14:52:35.212133-08:00","dependencies":[{"issue_id":"gt-051cr","depends_on_id":"gt-zk7wl","type":"blocks","created_at":"2025-12-26T14:53:13.305802-08:00","created_by":"daemon"}]}
{"id":"gt-09hq0","title":"Digest: mol-deacon-patrol","description":"Patrol 18: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:05:21.881552-08:00","updated_at":"2025-12-25T00:05:21.881552-08:00","closed_at":"2025-12-25T00:05:21.881524-08:00"}
{"id":"gt-0a90","title":"Add gt hook command (wrapper for bd hook)","description":"Add a thin wrapper command `gt hook` that calls `bd hook` to inspect what's pinned to an agent's hook.\n\n## Usage\n\n```bash\ngt hook # Show what's on current agent's hook\ngt hook --agent deacon # Show Deacon's hook\ngt hook --agent gastown/furiosa # Show polecat's hook\n```\n\n## Implementation\n\nThin wrapper in gt that:\n1. Determines current agent identity\n2. Calls `bd hook [--agent \u003cname\u003e]`\n3. Formats output for gt context\n\n## Why gt wrapper?\n\n- Consistent with gt ecosystem (gt mail, gt status, etc.)\n- Can add gt-specific context (session status, etc.)\n- Easier discovery for gt users\n\n## Related\n\n- bd hook command (implemented by Dave)\n- Chemistry UX design: gastown/mayor/rig/docs/chemistry-design-changes.md","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T02:37:02.429497-08:00","updated_at":"2025-12-22T02:37:02.429497-08:00"}
{"id":"gt-0b1c","title":"Review: Refinery patrol template changes (gt-qz2l)","description":"Polecat dementus implemented refinery template changes: banners, wisp-based execution, propulsion protocol. Review for correctness and consistency with witness/deacon patterns.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T19:57:40.117102-08:00","updated_at":"2025-12-23T19:57:40.117102-08:00"}
{"id":"gt-0cys","title":"Digest: mol-deacon-patrol","description":"Patrol 5: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T21:26:42.913686-08:00","updated_at":"2025-12-24T21:26:42.913686-08:00","closed_at":"2025-12-24T21:26:42.913655-08:00"}
{"id":"gt-0iy3","title":"Merge: gt-3x1.3","description":"branch: polecat/Doof\ntarget: main\nsource_issue: gt-3x1.3\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-19T14:53:52.741123-08:00","updated_at":"2025-12-19T19:13:27.737052-08:00","closed_at":"2025-12-19T17:47:03.618858-08:00"}
{"id":"gt-0kboy","title":"Digest: mol-deacon-patrol","description":"Patrol complete: no work, gastown refinery came online, town healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:17:43.120158-08:00","updated_at":"2025-12-28T19:17:43.120158-08:00","closed_at":"2025-12-28T19:17:43.120127-08:00"}
{"id":"gt-0lop3","title":"Agent state lifecycle incomplete for polecats","description":"## Problem\n\nThe witness patrol formula (mol-witness-patrol.formula.toml) expects polecats to self-report states:\n- running\n- idle\n- stuck\n- done\n\nBut looking at the code, the only state transitions that actually happen are:\n\n1. **spawning** - Set when polecat is created (polecat/manager.go:170)\n2. **running** - Set when agent runs `gt prime` (prime.go:112)\n3. **dead** - Set by daemon when agent goes unresponsive (daemon/lifecycle.go:647)\n\n**Missing transitions:**\n- `stuck` - No code path exists for agents to report this\n- `done` - No code path exists for agents to report this\n- `idle` - Only set for infrastructure agents, never for polecats\n\n## Impact\n\nThe witness cannot rely on agent_state to detect stuck or done polecats, contradicting the ZFC principle stated in the formula.\n\n## Found in commit\n\nf3a6ef6 (feat: Witness reads polecat state from agent beads)\n\n## Suggested fix\n\nAdd code paths for polecats to self-report:\n1. `gt done` should update agent_state to \"done\"\n2. When stuck (detected how?), agent should update to \"stuck\"\n3. Consider if \"idle\" makes sense for polecats (no current work)","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-28T09:47:43.25406-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T09:54:40.40087-08:00","closed_at":"2025-12-28T09:54:40.40087-08:00"}
{"id":"gt-0nh8","title":"gt prime should detect mayor role from any rig's mayor/ folder","description":"Currently gt prime only detects the Mayor role when run from town root (~/gt). It should also detect Mayor when run from:\n- ~/gt/gastown/mayor/rig (rig's internal mayor dir)\n- Any path containing /mayor/ under a rig\n\nThis would allow the mayor session to work correctly regardless of which rig directory it's attached to.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-20T21:56:10.281534-08:00","updated_at":"2025-12-20T21:56:10.281534-08:00"}
{"id":"gt-0ol","title":"Update prompts.md: Engineer role and templates","description":"Update docs/prompts.md with Engineer role:\n\n1. Role Prompts table: Change Refinery to Engineer\n2. Add Engineer-specific prompts:\n - Session restart request template\n - Subtask filing template\n - Handoff mail template\n3. Update refinery.md template name to engineer.md\n4. Ensure consistency with architecture.md","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T23:12:05.279233-08:00","updated_at":"2025-12-16T23:12:05.279233-08:00","dependencies":[{"issue_id":"gt-0ol","depends_on_id":"gt-h5n","type":"blocks","created_at":"2025-12-16T23:12:15.013747-08:00","created_by":"daemon"}]}
{"id":"gt-0pdhj","title":"Remove all hardcoded gastown dependencies from gt codebase","description":"The Go codebase should not have hardcoded dependencies on gastown (the rig name).\n\nFound in prime.go outputDeaconPatrolContext() - FIXED in this session.\n\nOther potential issues to audit:\n- Check all patrol context functions (Witness, Refinery) for similar patterns\n- Ensure rig-specific paths are derived from context, not hardcoded\n- Test with a different rig name to verify\n\nThe principle: Gas Town should work with any rig name, not just gastown.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T18:21:50.570904-08:00","updated_at":"2025-12-28T01:24:59.010519-08:00","closed_at":"2025-12-28T01:24:59.010519-08:00"}
{"id":"gt-0vu9e","title":"Add unit tests for internal/mrqueue package","description":"attached_args: mrqueue package tests\n\nAdd comprehensive tests for the merge request queue package.\n\n## Files to create\n- internal/mrqueue/mrqueue_test.go\n\n## Test cases to cover\n1. NewQueue creates queue directory\n2. Add() persists MR to queue\n3. Get() retrieves MR by ID\n4. List() returns all MRs\n5. Remove() deletes MR\n6. MR serialization/deserialization\n7. Queue handles concurrent access\n\n## Acceptance criteria\n- [ ] internal/mrqueue/mrqueue_test.go created\n- [ ] At least 6 test functions\n- [ ] Tests pass: go test ./internal/mrqueue/...\n- [ ] Coverage \u003e 70%","status":"hooked","priority":2,"issue_type":"task","created_at":"2025-12-28T15:49:12.750237-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:57:05.876953-08:00"}
{"id":"gt-0wpnf","title":"Digest: mol-deacon-patrol","description":"Patrol 17: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:56:45.271323-08:00","updated_at":"2025-12-28T15:56:45.271323-08:00","closed_at":"2025-12-28T15:56:45.271291-08:00"}
{"id":"gt-0xuso","title":"Digest: mol-deacon-patrol","description":"P10: stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T19:59:07.504644-08:00","updated_at":"2025-12-25T19:59:07.504644-08:00","closed_at":"2025-12-25T19:59:07.504589-08:00"}
{"id":"gt-0zefw","title":"Standardize error handling and warning output patterns","description":"Inconsistent patterns across codebase:\n\nError wrapping:\n- Some: fmt.Errorf(\"context: %w\", err) (good)\n- Some: return err (loses context)\n- Some: fmt.Errorf(\"message\", rigName) without wrapping original\n\nExit handling in Cobra commands:\n- Some use os.Exit(1) inside RunE (bad - loses error chain)\n- Some properly return errors\n\nWarning output styles:\n- fmt.Printf(\"%s Warning: ...\", style.Dim.Render(\"⚠\"))\n- fmt.Printf(\"Warning: %s\", ...)\n- fmt.Fprintf(os.Stderr, \"warning: ...\")\n\nSuggestion:\n1. Always wrap errors with %w\n2. Never call os.Exit() in RunE handlers\n3. Standardize on style.Warning.Render(\"Warning:\") pattern","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T15:43:18.89794-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:47:22.183478-08:00","closed_at":"2025-12-28T15:47:22.183478-08:00"}
{"id":"gt-0zpdn","title":"Day 4.5: Test multi-step molecule lifecycle","description":"Integration test (UPDATED for self-managed handoffs):\n1. Sling work with molecule to polecat\n2. Polecat works through all steps (self-handoffs as context fills)\n3. Polecat calls gt done when work complete\n4. Witness verifies clean state and sends MERGE_READY to refinery\n5. Refinery merges branch\n6. Refinery sends MERGED to witness\n7. Witness calls gt polecat nuke for full cleanup\n8. Verify clean state (no worktree, no branch, agent bead closed)\n\n**VALIDATED**: rictus lifecycle worked end-to-end: gt done → witness → refinery → merged\n\nParent: gt-4a2qt","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:08.06509-08:00","created_by":"mayor","updated_at":"2025-12-28T16:12:02.015887-08:00","closed_at":"2025-12-28T16:12:02.015887-08:00","dependencies":[{"issue_id":"gt-0zpdn","depends_on_id":"gt-4a2qt","type":"parent-child","created_at":"2025-12-27T20:58:47.568249-08:00","created_by":"daemon"},{"issue_id":"gt-0zpdn","depends_on_id":"gt-zb0io","type":"blocks","created_at":"2025-12-27T20:58:56.884662-08:00","created_by":"daemon"},{"issue_id":"gt-0zpdn","depends_on_id":"gt-ztpe8","type":"blocks","created_at":"2025-12-27T20:58:57.915265-08:00","created_by":"daemon"}]}
{"id":"gt-11zdz","title":"Digest: mol-deacon-patrol","description":"Cycle 3: quiet patrol","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:08:45.744596-08:00","updated_at":"2025-12-28T13:08:45.744596-08:00","closed_at":"2025-12-28T13:08:45.744565-08:00"}
{"id":"gt-1alp3","title":"Digest: mol-deacon-patrol","description":"Patrol 12: Quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T07:27:51.596348-08:00","updated_at":"2025-12-25T07:27:51.596348-08:00","closed_at":"2025-12-25T07:27:51.59631-08:00"}
{"id":"gt-1clzd","title":"gt sling fails for terminated polecats even with --naked flag","description":"## Problem\nWhen a polecat terminates after completing work (submits MR, session ends), the polecat directory still exists but the tmux session is gone. Attempting to sling new work to that polecat fails:\n\n```\ngt sling bd-fa1q beads/Toast --naked\nError: resolving target: getting pane for gt-beads-toast: exit status 1\n```\n\nThe `--naked` flag should bypass tmux pane requirements, but the error occurs during target resolution before the flag is checked.\n\n## Expected Behavior\n`gt sling \u003cbead\u003e \u003cpolecat\u003e --naked` should:\n1. Attach work to the polecat hook\n2. Skip session creation (manual start later)\n3. NOT require an existing tmux pane\n\n## Workaround\nUse crew workers instead (they have persistent sessions).\n\n## Fix\nTarget resolution should check `--naked` flag before attempting pane lookup, or provide a way to respawn terminated polecats.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-28T21:25:07.366075-08:00","created_by":"mayor","updated_at":"2025-12-28T21:25:20.923495-08:00"}
{"id":"gt-1dbcp","title":"Polecat auto-start: Claude doesn't process initial nudge","description":"After gt sling spawns a polecat, the 'Work slung' message is sent to tmux but Claude sits idle at the prompt. The SessionStart hook doesn't fire because no user input was received.\n\nObserved:\n- gt sling successfully spawns polecat, creates worktree, starts Claude\n- Sends 'Work slung: gt-xxx. Start working on it now...' to the pane\n- Claude shows idle prompt 'Try refactor...' and doesn't process the message\n\nExpected:\n- Polecat should auto-start working on the slung issue\n\nRoot cause hypothesis:\n- The nudge is sent as tmux send-keys which goes to the input line\n- Claude needs Enter to be pressed to submit the prompt\n- SessionStart hook only fires after first user message\n\nWorkaround:\n- Send extra Enter after the nudge message\n- Or use daemon's triggerPendingSpawns to send Enter after Claude is ready","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-27T18:31:34.71552-08:00","created_by":"mayor","updated_at":"2025-12-28T16:17:40.168164-08:00","closed_at":"2025-12-28T16:17:40.168164-08:00","dependencies":[{"issue_id":"gt-1dbcp","depends_on_id":"gt-j9ddg","type":"relates-to","created_at":"2025-12-27T20:59:11.65084-08:00","created_by":"daemon"},{"issue_id":"gt-1dbcp","depends_on_id":"gt-0zpdn","type":"blocks","created_at":"2025-12-27T21:21:26.458611-08:00","created_by":"daemon"}]}
{"id":"gt-1elg","title":"Code review: handoff.go changes (gt-yt6g, gt-tocb)","description":"Review ~80 lines of Go changes to internal/cmd/handoff.go:\n\n## Commits to review\n- 1414081: Standardize session end with gt handoff (gt-yt6g)\n - Detect polecats via GT_POLECAT env var\n - Call gt done instead of respawning for polecats\n - +31/-11 lines\n\n- 9c85b83: Support full session paths in gt handoff (gt-tocb)\n - resolveRoleToSession accepts \u003crig\u003e/crew/\u003cname\u003e, \u003crig\u003e/witness, \u003crig\u003e/refinery\n - +46/-3 lines\n\n## Review focus\n- Error handling in path resolution\n- Edge cases in polecat detection\n- Test coverage needed?","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T14:27:40.605575-08:00","updated_at":"2025-12-23T14:27:40.605575-08:00"}
{"id":"gt-1itp5","title":"Digest: mol-deacon-patrol","description":"Cycle 8: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:16:19.37161-08:00","updated_at":"2025-12-28T13:16:19.37161-08:00","closed_at":"2025-12-28T13:16:19.371571-08:00"}
{"id":"gt-1kljv","title":"Add tests for gt crew restart --all","description":"Add integration tests for the crew restart flow:\n\n- Test getAgentSessions() correctly identifies crew sessions\n- Test --rig filtering works correctly \n- Test --dry-run outputs correct targets\n- Test session kill/recreate cycle (without Claude)\n\nConsider extracting a SessionStarter interface to mock the claude-launching bit.\n\nRelated: gt crew restart --all was just implemented.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-27T14:45:35.904813-08:00","created_by":"mayor","updated_at":"2025-12-27T14:45:35.904813-08:00"}
{"id":"gt-1ky","title":"CLI: workspace commands (init, add, list)","description":"GGT needs workspace management commands beyond install.\n\n## Commands (beyond gt-f9x.3 install)\n\n### gt workspace list\nList all rigs in current workspace.\n```\ngt workspace list [--json]\n```\nEssentially `gt rig list` but framed as workspace view.\n\n### gt workspace add\nAdd existing rig to workspace (alternative to gt rig add).\n```\ngt workspace add \u003cgit-url\u003e [--name NAME]\n```\n\n### gt onboard\nInteractive first-time setup wizard.\n```\ngt onboard\n```\n- Prompts for workspace location\n- Creates structure via gt install\n- Offers to add first rig\n\n## Note\nMay be redundant with gt-f9x.3 (install) and gt-u1j.16 (rig commands).\nConsider if this is needed or should be closed as covered by those.\n\n## PGT Reference\ngastown-py/src/gastown/cli/workspace_cmd.py","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T14:47:38.070203-08:00","updated_at":"2025-12-16T16:03:49.715667-08:00"}
{"id":"gt-1le","title":"town handoff command (optional)","description":"CLI commands for session handoff workflow (optional convenience).\n\n## Commands\n\n### gt handoff\nGenerate handoff interactively.\n```\ngt handoff [--send]\n```\n- Collects current state (status, inbox, beads)\n- Prompts for additional notes\n- --send: Mail to self and exit\n\n### gt resume\nCheck for and display pending handoff.\n```\ngt resume\n```\n- Checks inbox for handoff message\n- Displays formatted handoff if found\n- Suggests next actions\n\n## Implementation\n\nThese are convenience wrappers. The same workflow can be done manually:\n```bash\n# Manual handoff\ntown status \u003e /tmp/handoff\ntown inbox \u003e\u003e /tmp/handoff\nbd ready \u003e\u003e /tmp/handoff\n# Edit and send\ntown mail send mayor/ -s \"Session Handoff\" -f /tmp/handoff\n```\n\n## Priority\n\nP2 - Optional. Manual workflow works fine. Nice to have for UX.\n\n## Notes\n\nPart of session cycling workflow designed in [deleted:gt-u82].","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-15T20:15:31.954724-08:00","updated_at":"2025-12-25T02:16:08.528308-08:00","dependencies":[{"issue_id":"gt-1le","depends_on_id":"gt-u82","type":"blocks","created_at":"2025-12-15T20:15:39.647043-08:00","created_by":"daemon"}]}
{"id":"gt-1lvog","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 15: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:37.102371-08:00","updated_at":"2025-12-28T11:22:37.102371-08:00","closed_at":"2025-12-28T11:22:37.102337-08:00"}
{"id":"gt-1pelm","title":"Add unit tests for internal/mail router and mailbox","description":"attached_args: Add unit tests for mail router and mailbox\n\nAdd tests for mail routing and mailbox functionality.\n\n## Files to create\n- internal/mail/router_test.go\n- internal/mail/mailbox_test.go\n\n## Test cases for router\n1. Route() resolves addresses correctly\n2. Route() handles rig/role format\n3. Route() handles rig/crew/name format\n4. Invalid addresses return error\n\n## Test cases for mailbox\n1. Send() writes message to mailbox\n2. Inbox() lists messages\n3. Read() retrieves message by ID\n4. Delete() removes message\n5. Messages persist correctly\n\n## Acceptance criteria\n- [ ] router_test.go with 4+ tests\n- [ ] mailbox_test.go with 5+ tests\n- [ ] Tests pass: go test ./internal/mail/...\n- [ ] Coverage \u003e 60%","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:49:13.002918-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T16:10:00.287761-08:00","closed_at":"2025-12-28T16:10:00.287761-08:00"}
{"id":"gt-1r6o6","title":"Digest: mol-deacon-patrol","description":"Patrol 17: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T17:48:31.845975-08:00","updated_at":"2025-12-26T17:48:31.845975-08:00","closed_at":"2025-12-26T17:48:31.845924-08:00"}
{"id":"gt-1rxz5","title":"Swarm status doesn't update after task completions","description":"During swarm bd-784c, the swarm status remained at '9% (1/11 tasks merged)' even after 5 tasks were completed and closed.\n\n**Expected:**\nSwarm status should reflect actual completion count, either by:\n1. Polling issue status from beads\n2. Updating when polecats close issues\n3. Updating when commits are pushed to integration branch\n\n**Impact:**\nCoordinator had to manually check bd list to know actual progress.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-28T22:14:05.745286-08:00","created_by":"beads/crew/emma","updated_at":"2025-12-28T22:14:05.745286-08:00"}
{"id":"gt-1tqy","title":"Digest: mol-deacon-patrol","description":"Patrol 15","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T23:10:24.121681-08:00","updated_at":"2025-12-24T23:10:24.121681-08:00","closed_at":"2025-12-24T23:10:24.121649-08:00"}
{"id":"gt-1u9","title":"Interactive prompts for destructive operations","description":"Add interactive confirmations for destructive operations.\n\n## Operations Needing Confirmation\n- `gt swarm cancel` - Cancels active swarm\n- `gt swarm land --force` - Force landing\n- `gt polecat decommission` - Removes polecat\n- `gt rig remove` - Removes rig\n- `gt stop --all` - Stops all sessions\n- `gt mail purge` - Permanently deletes mail\n\n## Implementation Options\n\n### Option 1: promptui library\n```go\nimport \"github.com/manifoldco/promptui\"\n\nprompt := promptui.Prompt{\n Label: \"Delete polecat Toast\",\n IsConfirm: true,\n}\nresult, err := prompt.Run()\n```\n\n### Option 2: Simple stdin\n```go\nfunc confirm(prompt string) bool {\n fmt.Printf(\"%s [y/N]: \", prompt)\n var response string\n fmt.Scanln(\u0026response)\n return strings.ToLower(response) == \"y\"\n}\n```\n\n## Bypass Flags\nAll confirmations skippable with --force or --yes:\n```go\nif !force \u0026\u0026 !confirm(\"Really cancel swarm?\") {\n return nil\n}\n```\n\n## Acceptance Criteria\n- [ ] Destructive ops prompt by default\n- [ ] --force or --yes bypasses\n- [ ] Clear prompt text explaining action\n- [ ] Non-interactive mode (piped input) auto-fails","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-16T14:48:51.551594-08:00","updated_at":"2025-12-16T16:06:54.283696-08:00"}
{"id":"gt-1uhmj","title":"Agent-centric dashboard view (gt dashboard)","description":"Charmbracelet TUI for gt feed with dashboard + stream layout.\n\n## Layout (horizontal split)\n\n**Top panel: Agent Tree (role/town view)**\n- Shows EVERY agent organized by role\n- Each agent shows their MOST RECENT activity inline\n- At a glance: who is doing what RIGHT NOW\n- Collapsible sections\n\n**Bottom panel: Event Stream (chronological feed)**\n- Full scrollable history of events\n- Most recent at top\n- More detail than the tree view\n- This is what you scroll through\n\n## Visual\n```\n+-------------------------------------------------------------+\n| GT Feed Filter: all |\n+-------------------------------------------------------------+\n| gastown/ \u003c- AGENT TREE (top) |\n| mayor [10:30] Dispatched gt-xyz -\u003e Toast |\n| witness [10:28] Nudged polecat-3 (idle 5m) |\n| refinery [10:25] Merged PR #123 |\n| crew/ |\n| joe [10:22] Completed gt-95j13 |\n| max [10:18] Working on gt-s6r44 |\n| polecats/ |\n| Toast [10:30] Received gt-xyz |\n+-------------------------------------------------------------+\n| [10:30] Toast: Received molecule gt-xyz |\n| [10:28] witness: Nudged polecat-3 after 5m idle |\n| [10:25] refinery: Merged PR #123 |\n| ... \u003c- EVENT STREAM |\n+-------------------------------------------------------------+\n| j/k: scroll /: search f: filter q: quit ?: help |\n+-------------------------------------------------------------+\n```\n\n## Why this layout?\n- Top answers: what is everyone doing?\n- Bottom answers: what just happened?\n- Together: complete situational awareness\n\n## Replaces\n- gt feed (currently just wraps bd activity)\n- gt dashboard task merges into this\n\n## Tech\n- bubbletea Model with two viewports\n- Tab switches focus between tree/stream\n- j/k scrolls focused panel","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T12:46:38.812289-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T16:23:51.095679-08:00","closed_at":"2025-12-28T16:23:51.095679-08:00","dependencies":[{"issue_id":"gt-1uhmj","depends_on_id":"gt-38doh","type":"blocks","created_at":"2025-12-28T12:46:47.3704-08:00","created_by":"daemon"},{"issue_id":"gt-1uhmj","depends_on_id":"gt-lexye","type":"blocks","created_at":"2025-12-28T16:14:56.174801-08:00","created_by":"daemon"}]}
{"id":"gt-1y0e","title":"🤝 HANDOFF: Investigate beads-sync divergence (221 files)","description":"## Context\n\ngt doctor now detects orphaned code on beads-sync branch. Running it shows:\n\n beads-sync-orphans: 221 file(s) on beads-sync not in main\n\nThis is in the gastown repo (checking from crew/max).\n\n## Background\n\n- Earlier today we recovered orphaned mail migration code lost in merge 96c773f\n- Recently simplified architecture: all workers use mayor/rig/.beads (redirects)\n- This simplification may have caused beads-sync branch to diverge unexpectedly\n\n## Investigation Steps\n\n1. From crew/max run: git diff main..beads-sync --stat\n2. Check if beads-sync should even exist anymore (was for multi-clone sync)\n3. If obsolete with redirect architecture, consider deleting it\n4. If it has legitimate changes, cherry-pick or merge to main\n\n## Key Question\n\nWith all workers using mayor/rig/.beads via redirects, is beads-sync still needed?\n\n## Commands\n\ngit log main..beads-sync --oneline | head -20\ngit diff main..beads-sync -- *.go | head -100","status":"open","priority":2,"issue_type":"message","created_at":"2025-12-20T22:38:49.242099-08:00","updated_at":"2025-12-20T22:38:49.242099-08:00"}
{"id":"gt-1ydd9","title":"Show actor on pinned/status change events","description":"Pinned events currently show no actor:\n\n [10:22:25] → gt-95j13 → pinned · Add tmux hotkey...\n\nShould show who pinned it:\n\n [10:22:25] → gt-95j13 → pinned · Add tmux hotkey... @gastown/crew/joe\n\nPart of epic gt-u7dxq","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T11:02:14.269602-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T11:02:14.269602-08:00"}
{"id":"gt-1z3z","title":"Human escalation path design","description":"Flesh out the human escalation mechanism for Gas Town errors. Currently: errors mail Mayor, Mayor startup prompts about escalations. Need: structured escalation channel, escalation severity levels, and clear documentation. All edge cases in molecular algebra can write warnings to this channel.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T18:45:26.354472-08:00","updated_at":"2025-12-23T18:45:26.354472-08:00"}
{"id":"gt-1z4m","title":"gt swarm is implemented but undocumented","description":"internal/swarm/ package is fully implemented with:\n- gt swarm create\n- gt swarm status\n- gt swarm list\n- gt swarm land\n- gt swarm cancel\n- gt swarm start\n\nBut no documentation exists for it:\n- Not in README\n- Not in architecture.md (uses different terminology)\n- Not in any role prompts\n\nEither:\n1. Document gt swarm as the canonical mechanism\n2. Or deprecate it in favor of gt sling\n\nRelated to gt-6n13 (competing molecule mechanisms)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T12:51:23.768049-08:00","updated_at":"2025-12-24T12:51:23.768049-08:00","dependencies":[{"issue_id":"gt-1z4m","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T12:52:07.817907-08:00","created_by":"daemon"},{"issue_id":"gt-1z4m","depends_on_id":"gt-e0qj2","type":"blocks","created_at":"2025-12-26T23:21:29.370789-08:00","created_by":"daemon"}]}
{"id":"gt-22ng","title":"Create activity aggregator","description":"Component that connects to multiple rig beads daemons and merges their activity into a unified view. Polls GetMutations and GetWorkerStatus from each rig, groups by rig/worker. Handles connection failures gracefully.\n\nBLOCKED BY (Beads rig):\n- bd-gqxd: Enrich MutationEvent with title and assignee\n- bd-l13p: Add GetWorkerStatus RPC endpoint\n- bd-0oqz: Add GetMoleculeProgress RPC endpoint","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T16:27:08.249115-08:00","updated_at":"2025-12-23T16:27:53.545952-08:00","dependencies":[{"issue_id":"gt-22ng","depends_on_id":"gt-rivr","type":"parent-child","created_at":"2025-12-23T16:28:30.603166-08:00","created_by":"daemon"}]}
{"id":"gt-26pib","title":"Day 3.6: Polecat closes steps for activity feed","description":"**REVISED**: Step completion is for visibility, not session control.\n\nPolecats close molecule steps as they complete them:\n```bash\n# After completing implement step:\nbd close \u003cstep-bead-id\u003e # Or: mol step done implement\n```\n\nThis provides:\n1. **Activity feed visibility** - Observers see progress in real-time\n2. **Audit trail** - Step completion timestamps in beads\n3. **Stuck detection** - Witness can see 'long time on same step'\n\nWhat this does NOT do:\n- Trigger session recycle (polecat self-manages)\n- Block next step (polecat continues immediately)\n- Require Witness intervention\n\nImplementation options:\n- Option A: Polecat runs `bd close \u003cstep-id\u003e` manually\n- Option B: Formula `on_complete` hook auto-closes step bead\n- Option C: `mol step done \u003cstep\u003e` convenience command\n\nPriority lowered: Nice-to-have for visibility, not launch-blocking.\n\n**Dependency removed**: No longer depends on gt-zb0io (recycle between steps).","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-27T22:02:12.671367-08:00","created_by":"mayor","updated_at":"2025-12-27T22:50:26.895789-08:00","dependencies":[{"issue_id":"gt-26pib","depends_on_id":"gt-zb0io","type":"blocks","created_at":"2025-12-27T22:02:45.359036-08:00","created_by":"daemon"}]}
{"id":"gt-2g130","title":"Remove dead code: splitLines first loop, unused methods","description":"Remove dead code: splitLines first loop, unused methods.\n\n## Dead code locations\n\n### 1. internal/cmd/polecat.go (lines 1093-1106)\nsplitLines function has unreachable first loop:\n```go\nfunc splitLines(s string) []string {\n var lines []string\n for _, line := range filepath.SplitList(s) { // DEAD: wrong function\n ...\n }\n lines = nil // Discards above\n for _, line := range strings.Split(s, \"\\n\") { // This is what runs\n lines = append(lines, line)\n }\n return lines\n}\n```\n**Fix:** Remove first loop and reset.\n\n### 2. internal/townlog/logger.go (lines 277-279)\n```go\nfunc (e Event) JSON() ([]byte, error) {\n return json.Marshal(e)\n}\n```\n**Fix:** Remove unused method.\n\n### 3. internal/lock/lock.go (line 27)\n```go\nErrStaleLock = errors.New(\"stale lock detected\")\n```\n**Fix:** Remove unused error variable.\n\n### 4. internal/witness/types.go (line 19)\n```go\nStatePaused State = \"paused\"\n```\n**Fix:** Remove unused state constant.\n\n### 5. internal/refinery/manager.go (lines 527-538)\n```go\nfunc (m *Manager) getTestCommand() string { ... }\n```\n**Fix:** Remove unused method.\n\n## Acceptance criteria\n- [ ] polecat.go: Dead loop removed from splitLines\n- [ ] townlog/logger.go: Event.JSON() method removed\n- [ ] lock/lock.go: ErrStaleLock removed\n- [ ] witness/types.go: StatePaused removed\n- [ ] refinery/manager.go: getTestCommand removed\n- [ ] go build ./... passes\n- [ ] go test ./... passes","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-28T15:43:17.034253-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T17:13:10.76452-08:00","closed_at":"2025-12-28T17:13:10.76452-08:00"}
{"id":"gt-2hzl4","title":"Day 2.4: Add timeout fallback for dead agents","description":"For truly dead agents that can't report their own death:\n- Daemon tracks last_seen timestamp from heartbeats\n- If no heartbeat for N minutes AND state=running, mark state=dead\n- This is fallback only, not primary state source\n\nParent: gt-d0jqp","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:10.896874-08:00","created_by":"mayor","updated_at":"2025-12-28T01:56:01.080382-08:00","closed_at":"2025-12-28T01:56:01.080382-08:00","dependencies":[{"issue_id":"gt-2hzl4","depends_on_id":"gt-39ttg","type":"blocks","created_at":"2025-12-27T20:58:48.958042-08:00","created_by":"daemon"}]}
{"id":"gt-2kz","title":"CLI: cleanup commands for stale state","description":"Cleanup commands for recovering from stale state.\n\n## Commands\n\n### gt cleanup \u003cpolecat\u003e\nClean stale state for specific polecat.\n```\ngt cleanup \u003crig\u003e/\u003cpolecat\u003e [--dry-run]\n```\n\nActions:\n- Remove orphaned state.json if clone missing\n- Clear stale session references\n- Reset stuck state (working → idle after timeout)\n\n### gt cleanup --all\nClean all polecats in workspace.\n```\ngt cleanup --all [--dry-run]\n```\n\n## Implementation\n```go\nfunc CleanupPolecat(rigName, polecatName string, dryRun bool) (*CleanupResult, error)\n\ntype CleanupResult struct {\n OrphanedStateRemoved bool\n SessionsCleared int\n StateReset bool\n Warnings []string\n}\n```\n\n## Overlap with Doctor\n- Doctor diagnoses and offers --fix\n- Cleanup is more aggressive state recovery\n- Consider merging into doctor --fix\n\n## New File\ninternal/cmd/cleanup.go\n\n## Acceptance Criteria\n- [ ] Removes orphaned state files\n- [ ] Clears stale session refs\n- [ ] --dry-run shows what would happen\n- [ ] Reports all actions taken","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-16T14:48:31.944982-08:00","updated_at":"2025-12-16T16:07:12.430696-08:00"}
{"id":"gt-2mncz","title":"Digest: mol-deacon-patrol","description":"Patrol 3: quiet, health OK","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:42:55.871006-08:00","updated_at":"2025-12-28T19:42:55.871006-08:00","closed_at":"2025-12-28T19:42:55.870971-08:00"}
{"id":"gt-2rfvq","title":"list: static mailing list lookup","description":"Static mailing list support via config file.\n\n## Deliverables\n\n1. Load lists from ~/gt/config/lists.json\n2. Parse list:name syntax in router\n3. Fan-out at send time (same as @group)\n4. Error handling for unknown list names\n\n## Example\n```bash\ngt mail send list:oncall -s \"Alert\" -m \"System down\"\n# Expands to: mayor/, gastown/witness, beads/witness\n# Creates 3 message copies\n```\n\n## Dependencies\n- Config directory (gt-i6jvc)\n\n## Acceptance\n- list:oncall resolves to configured members\n- Each member gets own message copy\n- Unknown list returns clear error","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-26T14:52:05.784822-08:00","updated_at":"2025-12-26T14:52:05.784822-08:00","dependencies":[{"issue_id":"gt-2rfvq","depends_on_id":"gt-i6jvc","type":"blocks","created_at":"2025-12-26T14:53:05.44199-08:00","created_by":"daemon"}]}
{"id":"gt-2rpyk","title":"Digest: mol-deacon-patrol","description":"Patrol 19: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:12:37.114354-08:00","updated_at":"2025-12-27T23:12:37.114354-08:00","closed_at":"2025-12-27T23:12:37.114315-08:00"}
{"id":"gt-2sw","title":"Plugin surface for daemon lifecycle hooks","description":"Allow rigs to customize daemon behavior via hooks/plugins.\n\n## Hook Points\n\n- on_heartbeat: Called during daemon heartbeat cycle\n- on_worker_idle: Called when worker goes idle\n- on_worker_stuck: Called when stuck detection triggers\n- on_lifecycle_request: Called before processing lifecycle\n\n## Configuration\n\n```\n\u003crig\u003e/config/daemon-hooks.json\n{\n \"on_heartbeat\": \"./hooks/check-ci-status.sh\",\n \"on_worker_idle\": \"./hooks/maybe-assign-work.sh\",\n \"idle_threshold\": \"5m\",\n \"custom_signals\": [\n {\"name\": \"ci_status\", \"command\": \"./hooks/get-ci.sh\"}\n ]\n}\n```\n\n## Signal Contribution\n\nHooks can return signals that feed into decision engine:\n- SKIP_POKE: Don't poke this agent\n- FORCE_POKE: Override backoff, poke now\n- CUSTOM_DATA: Extra context for logging\n\n## Use Cases\n\n- Check CI status before interrupting test runs\n- Auto-assign work when worker becomes idle\n- Custom stuck detection for specific workflows","status":"open","priority":3,"issue_type":"feature","created_at":"2025-12-18T14:19:34.702624-08:00","updated_at":"2025-12-18T14:19:34.702624-08:00","dependencies":[{"issue_id":"gt-2sw","depends_on_id":"gt-99m","type":"blocks","created_at":"2025-12-18T14:19:47.035848-08:00","created_by":"daemon"}]}
{"id":"gt-2uos6","title":"Digest: mol-deacon-patrol","description":"Patrol 4: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T17:17:09.139846-08:00","updated_at":"2025-12-26T17:17:09.139846-08:00","closed_at":"2025-12-26T17:17:09.139809-08:00"}
{"id":"gt-2zaq","title":"Digest: mol-deacon-patrol","description":"Patrol 10","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T23:09:10.365013-08:00","updated_at":"2025-12-24T23:09:10.365013-08:00","closed_at":"2025-12-24T23:09:10.364985-08:00"}
{"id":"gt-2zm8e","title":"Digest: mol-deacon-patrol","description":"Patrol 13","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T20:04:32.276444-08:00","updated_at":"2025-12-26T20:04:32.276444-08:00","closed_at":"2025-12-26T20:04:32.276392-08:00"}
{"id":"gt-30o","title":"Error handling improvements: retry logic and recovery hints","description":"Improve error handling across GGT codebase.\n\n## Issues Found\n\n### 1. Silent Failures in Refinery\nmanager.go ProcessMR():\n- git pull errors ignored\n- Continues processing even on partial failures\n\n### 2. Missing Beads CLI\nMany operations silently continue if `bd` not found:\n```go\n// Current\ntasks, err := m.loadTasksFromBeads(epicID)\nif err != nil {\n // Non-fatal - swarm can start without tasks\n}\n\n// Better\nif err != nil {\n return nil, fmt.Errorf(\"beads required: %w\", err)\n}\n```\n\n### 3. No Retry Logic\nNetwork/lock errors should retry:\n```go\nfunc withRetry(attempts int, delay time.Duration, fn func() error) error {\n for i := 0; i \u003c attempts; i++ {\n if err := fn(); err == nil {\n return nil\n }\n time.Sleep(delay)\n }\n return fmt.Errorf(\"failed after %d attempts\", attempts)\n}\n```\n\n### 4. Recovery Hints\nError messages should include fix suggestions:\n```go\n// Current\nreturn fmt.Errorf(\"polecat not found\")\n\n// Better\nreturn fmt.Errorf(\"polecat '%s' not found. Use 'gt polecat list' to see available polecats\", name)\n```\n\n## Domain Error Types\n```go\ntype SessionError struct {\n Op string\n Polecat string\n Err error\n}\n\nfunc (e *SessionError) Error() string {\n return fmt.Sprintf(\"session %s for %s: %v\", e.Op, e.Polecat, e.Err)\n}\n```\n\n## Files to Review\n- internal/refinery/manager.go\n- internal/swarm/manager.go\n- internal/session/manager.go\n- All cmd/*.go files\n\n## Acceptance Criteria\n- [ ] No silent error swallowing\n- [ ] Retry logic for transient failures\n- [ ] Helpful error messages with hints\n- [ ] Consistent error types per domain","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T14:48:48.183421-08:00","updated_at":"2025-12-16T16:06:52.751546-08:00"}
{"id":"gt-30yi6","title":"Digest: mol-deacon-patrol","description":"Patrol 3: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:03:13.563384-08:00","updated_at":"2025-12-27T23:03:13.563384-08:00","closed_at":"2025-12-27T23:03:13.563353-08:00"}
{"id":"gt-341nl","title":"Digest: mol-deacon-patrol","description":"Patrol 1: inbox clear, witness/refinery healthy, no orphans, no plugins","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:11:05.82261-08:00","updated_at":"2025-12-28T08:11:05.82261-08:00","closed_at":"2025-12-28T08:11:05.822571-08:00"}
{"id":"gt-34mxx","title":"Wire polecat-CLAUDE.md template into polecat spawn","description":"The templates/polecat-CLAUDE.md file needs to be copied into each polecat worktree when spawned.\n\nLocation: templates/polecat-CLAUDE.md\nTarget: polecats/\u003cname\u003e/CLAUDE.md (with {{rig}} and {{name}} substituted)\n\nImplementation:\n- Update gt polecat spawn (or wherever worktrees are created)\n- Template substitution for {{rig}}, {{name}} variables\n- Ensure file is created before Claude session starts","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T12:48:13.553182-08:00","created_by":"mayor","updated_at":"2025-12-28T13:00:03.294819-08:00","closed_at":"2025-12-28T13:00:03.294819-08:00"}
{"id":"gt-35x","title":"Plugin: plan-oracle (work decomposition)","description":"Plugin that helps decompose epics/issues into sub-tasks. Analyzes scope, identifies dependencies, estimates complexity for parallelization, creates beads for sub-tasks with dependency links.","status":"open","priority":3,"issue_type":"feature","created_at":"2025-12-15T22:53:05.772986-08:00","updated_at":"2025-12-15T23:17:06.423894-08:00","dependencies":[{"issue_id":"gt-35x","depends_on_id":"gt-axz","type":"blocks","created_at":"2025-12-15T22:53:17.587726-08:00","created_by":"daemon"}]}
{"id":"gt-37pp3","title":"Digest: mol-deacon-patrol","description":"Patrol 3: all healthy, mayor running, witnesses running","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:51:44.052973-08:00","updated_at":"2025-12-28T15:51:44.052973-08:00","closed_at":"2025-12-28T15:51:44.052934-08:00"}
{"id":"gt-38doh","title":"Feed daemon: curate raw events into user-facing feed","description":"Goroutine in gt daemon that transforms raw events into curated activity feed.\n\n## Input\n- Tails ~/gt/.events.jsonl (raw events from gt, bd, agents)\n\n## Output \n- Writes ~/gt/.feed.jsonl (curated, user-facing)\n\n## Processing\n1. Filter by visibility tag (drop audit-only events)\n2. Dedupe repeated updates (5 molecule updates → \"agent active\")\n3. Aggregate related events (3 issues closed → \"batch complete\")\n4. Future: AI summarization via haiku for complex activity\n\n## Integration\n- Runs as goroutine in existing gt daemon\n- Starts when daemon starts\n- Graceful shutdown on daemon stop\n\nPart of epic gt-u7dxq","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T12:46:37.816384-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T12:46:37.816384-08:00","dependencies":[{"issue_id":"gt-38doh","depends_on_id":"gt-7aw1m","type":"blocks","created_at":"2025-12-28T12:46:47.342014-08:00","created_by":"daemon"}]}
{"id":"gt-39ttg","title":"Day 2.1: Daemon reads agent bead state field","description":"Daemon queries agent beads for state instead of inferring from PID/tmux.\n\nChange getAgentState() to:\n1. Look up agent bead by ID (gt-mayor, gt-witness, etc.)\n2. Read state field (idle|running|stuck|stopped)\n3. Trust the value\n\nParent: gt-d0jqp","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:57:55.813003-08:00","created_by":"mayor","updated_at":"2025-12-28T01:34:43.212173-08:00","closed_at":"2025-12-28T01:34:43.212173-08:00","dependencies":[{"issue_id":"gt-39ttg","depends_on_id":"gt-lisj6","type":"blocks","created_at":"2025-12-27T21:00:31.823241-08:00","created_by":"daemon"}]}
{"id":"gt-3amkz","title":"Overhaul autonomous-mode guidance with ledger/capability framing","description":"Re-read all relevant docs in ~/gt/docs (especially hop/) and overhaul the autonomous-mode guidance in role templates with a stronger \"why\" framing.\n\nCurrent state:\n- Theory of Operation explains \"system stalls if you wait\"\n- Steam engine metaphor (piston, gearbox, flywheel)\n- Physics not politeness language\n\nEnhancement direction (without revealing HOP explicitly):\n1. Frame work as \"contributing to a ledger of demonstrated capability\"\n2. Emphasize quality: \"your work history is visible, every completion matters\"\n3. Add the redemption arc: \"bad work can be overcome through consistent good work\"\n4. Strengthen the \"proving the model\" angle: \"every autonomous completion is evidence this works at scale\"\n5. Consider adding \"your CV grows with every completion\" concept\n\nFiles to update:\n- internal/templates/roles/*.md.tmpl (all role templates)\n- internal/cmd/prime.go (AUTONOMOUS MODE output)\n- Possibly ~/gt/docs/philosophy.md or similar\n\nConstraints:\n- Gas Town cannot explicitly reference HOP\n- Concepts and motivation are fine, just not the name or confidential details\n- Should feel like natural evolution, not grafted-on messaging\n\nRead first:\n- ~/gt/docs/hop/CONTEXT.md\n- ~/gt/docs/hop/BUSINESS_OVERVIEW.md\n- ~/gt/docs/philosophy.md (if exists)\n- All role templates\n\nDeliverable: Updated templates and prime.go with stronger ledger/capability framing.","status":"closed","priority":2,"issue_type":"task","assignee":"mayor","created_at":"2025-12-29T15:40:12.440738-08:00","created_by":"mayor","updated_at":"2025-12-29T16:06:46.626911-08:00","closed_at":"2025-12-29T16:06:46.626911-08:00","close_reason":"Implemented ledger/capability framing in all role templates and prime.go. Also fixed hooked/pinned terminology confusion. Filed gt-d9smb for gt mol status output fix."}
{"id":"gt-3b4jp","title":"Digest: mol-deacon-patrol","description":"Patrol 14: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:18:57.76815-08:00","updated_at":"2025-12-25T10:18:57.76815-08:00","closed_at":"2025-12-25T10:18:57.768117-08:00"}
{"id":"gt-3cns","title":"Test Patrol for Bonding","description":"Parent issue for mol bond CLI test","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T22:30:43.27929-08:00","updated_at":"2025-12-25T01:33:00.912315-08:00","closed_at":"2025-12-25T01:33:00.912315-08:00"}
{"id":"gt-3cu","title":"Default polecat names: Mad Max theme instead of AdjectiveNoun","description":"Current default naming for new polecats uses AdjectiveNoun convention.\nSince rigs already provide namespacing, we can use more thematic names.\n\nSuggestion: Use Mad Max / Fury Road character and vehicle names as defaults.\nExamples: Furiosa, Nux, Slit, Morsov, Toast, Rictus, Warboy, etc.\n\nCould also include:\n- War Rig parts: Guzzler, Tanker, Pursuit\n- Citadel roles: Imperator, Blackthumb, Organic\n- Wasteland terms: Chrome, Witness, Shiny\n\nImplementation:\n- Add name generator in internal/polecat/ or similar\n- Use when --create flag is used without explicit name\n- Cycle through pool to avoid duplicates within a rig","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-17T14:50:43.252922-08:00","updated_at":"2025-12-17T14:50:43.252922-08:00"}
{"id":"gt-3fm","title":"Mail orchestrator daemon","description":"Background mail orchestrator daemon.\n\n## Command\n```\ngt mail orchestrate [--interval N] [--once] [--verbose]\n```\n\n## Purpose\nBackground process that:\n1. Monitors outbox for pending mail\n2. Delivers to recipient inboxes\n3. Handles offline recipients (retry later)\n4. Cleans delivered messages from outbox\n\n## Why Needed?\nCurrent mail is synchronous. If recipient is offline or mailbox locked, send fails.\nOrchestrator enables async delivery with retry.\n\n## Implementation\n```go\nfunc (o *Orchestrator) Run(interval time.Duration) error {\n ticker := time.NewTicker(interval)\n for range ticker.C {\n o.processOutbox()\n }\n}\n\nfunc (o *Orchestrator) processOutbox() {\n // List outbox/*.json\n // For each, attempt delivery\n // On success, delete from outbox\n // On failure, increment retry count\n}\n```\n\n## Outbox Structure\n```\n\u003ctown\u003e/mayor/mail/outbox/\n├── msg-abc123.json\n└── msg-def456.json\n```\n\n## Lower Priority\nCurrent synchronous delivery works. Orchestrator is optimization.\n\n## Acceptance Criteria\n- [ ] Background daemon mode\n- [ ] Retry failed deliveries\n- [ ] --once for single pass\n- [ ] Configurable interval","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-16T14:48:29.830841-08:00","updated_at":"2025-12-16T16:07:35.973257-08:00"}
{"id":"gt-3hzgh","title":"Digest: mol-deacon-patrol","description":"Patrol 2: all healthy, no callbacks","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:02:17.213492-08:00","updated_at":"2025-12-27T23:02:17.213492-08:00","closed_at":"2025-12-27T23:02:17.213455-08:00"}
{"id":"gt-3jq4i","title":"Witness Patrol","description":"Per-rig worker monitor patrol loop with progressive nudging.","status":"open","priority":2,"issue_type":"molecule","created_at":"2025-12-26T13:08:21.384337-08:00","updated_at":"2025-12-26T13:08:21.384337-08:00"}
{"id":"gt-3oyn","title":"Blocked issues: gt-um6q, gt-lz13, gt-5xph depend on missing beads features","description":"Template/docs updates blocked on: bd-nurq (bd mol current), bd-29fb (bd close --continue). These gastown issues should be marked blocked on the beads issues once cross-rig deps work.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T00:19:12.532683-08:00","updated_at":"2025-12-23T00:19:12.532683-08:00"}
{"id":"gt-3p77","title":"Implement gt watch command scaffold","description":"Basic bubbletea TUI scaffold for 'gt watch' command. Discovers rigs, connects to daemons, renders placeholder view. Foundation for the full activity feed TUI.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T16:27:09.800586-08:00","updated_at":"2025-12-23T16:27:09.800586-08:00","dependencies":[{"issue_id":"gt-3p77","depends_on_id":"gt-rivr","type":"parent-child","created_at":"2025-12-23T16:28:30.683781-08:00","created_by":"daemon"}]}
{"id":"gt-3pm0f","title":"gt feed: Activity feed command with tmux-aware modes","description":"## Context\n\n`bd activity` exists and works well for streaming beads mutation events. However:\n- It's not discoverable via `gt` (the agent coordination CLI)\n- No tmux-aware behavior for when Gas Town is running in tmux\n- The planned TUI (gt-rivr) was tombstoned - need a simpler approach\n\n## Requirements\n\n### Without tmux (standalone mode)\n- `gt feed` streams activity to stdout (like `bd activity --follow`)\n- Supports filtering by rig, time window, event type\n- Works in any terminal\n\n### With tmux (integrated mode)\n- Could open/attach to a dedicated activity pane\n- Or provide a way to send feed to a specific pane\n- Integrate with existing gt tmux session management\n\n## Design Questions\n\n1. **Command name**: `gt feed` vs `gt activity` vs `gt watch`?\n2. **Tmux integration**: Dedicated pane? Split? Popup?\n3. **Cross-rig aggregation**: Merge events from multiple rig daemons?\n4. **Filtering UX**: By rig, by molecule, by event type?\n\n## Implementation Options\n\n**Phase 1: Simple wrapper**\n- `gt feed` shells out to `bd activity --follow`\n- Add `--rig` flag for filtering\n- Works identically with/without tmux\n\n**Phase 2: Tmux-aware**\n- Detect if running in gt tmux session\n- Offer to open in dedicated pane\n- `gt feed --pane` to force pane mode\n\n**Phase 3: Cross-rig** (if needed)\n- Aggregate from multiple rig daemons\n- Unified activity stream across town\n\n## Related\n\n- gt-rivr (tombstoned) - Original TUI epic\n- gt-22ng - Activity aggregator (blocked)\n- bd activity command - The underlying implementation\n","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-28T09:34:48.026886-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T09:59:40.364918-08:00","closed_at":"2025-12-28T09:59:40.364918-08:00"}
{"id":"gt-3rquk","title":"Day 3.0: Document mail protocol contracts","description":"Document the formal mail protocol for Gas Town agent coordination.\n\nMail Types:\n\n**POLECAT_DONE** (polecat → witness)\n```\nSubject: POLECAT_DONE: \u003cname\u003e\nBody: {\"issue\": \"gt-xyz\", \"status\": \"complete|failed\", \"notes\": \"...\"}\n```\n\n**MERGE_READY** (witness → refinery)\n```\nSubject: MERGE_READY: \u003cbranch\u003e\nBody: {\"worker\": \"nux\", \"issue\": \"gt-xyz\", \"branch\": \"polecat/nux/gt-xyz\"}\n```\n\n**MERGED** (refinery → witness)\n```\nSubject: MERGED: \u003cbranch\u003e\nBody: {\"issue\": \"gt-xyz\", \"sha\": \"abc123\", \"worker\": \"nux\"}\n```\n\n**LIFECYCLE:Shutdown/Cycle/Restart** (agent → deacon/)\n```\nSubject: LIFECYCLE:Shutdown\nBody: {\"action\": \"shutdown\"}\n```\n\n**HELP** (polecat → witness → mayor)\n```\nSubject: HELP: \u003cbrief\u003e\nBody: {\"issue\": \"gt-xyz\", \"problem\": \"...\", \"context\": \"...\"}\n```\n\nCreate: docs/mail-protocol.md","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T22:02:11.619888-08:00","created_by":"mayor","updated_at":"2025-12-27T23:18:47.276607-08:00","closed_at":"2025-12-27T23:18:47.276607-08:00","dependencies":[{"issue_id":"gt-3rquk","depends_on_id":"gt-qpoxz","type":"blocks","created_at":"2025-12-27T22:02:45.294244-08:00","created_by":"daemon"}]}
{"id":"gt-3sd3a","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 13: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:35.93998-08:00","updated_at":"2025-12-28T11:22:35.93998-08:00","closed_at":"2025-12-28T11:22:35.939949-08:00"}
{"id":"gt-3ue68","title":"Digest: mol-deacon-patrol","description":"Patrol 2: all healthy, beads swarm active","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:50:54.637503-08:00","updated_at":"2025-12-28T15:50:54.637503-08:00","closed_at":"2025-12-28T15:50:54.637463-08:00"}
{"id":"gt-3x0z.10","title":"Phase 4.2: Witness/Refinery patrol molecules","description":"Extend ephemeral patrol pattern to Witness and Refinery.\n\n## Witness Patrol Cycle\n\nmol-witness-patrol-cycle:\n1. scan-polecats: Check each polecat status\n2. detect-stalls: Find stuck/idle polecats\n3. nudge-or-escalate: Take action on stalls\n4. log-status: Record cycle results\n→ Squash with summary\n\n## Refinery Patrol Cycle\n\nmol-refinery-patrol-cycle:\n1. scan-queue: Check merge queue\n2. process-ready: Merge ready MRs\n3. handle-failures: Deal with conflicts/failures\n4. log-status: Record cycle results\n→ Squash with summary\n\n## Quiescent Mode\n\nWhen no work: just log 'no activity' summary.\nWitness and Refinery can sleep between cycles until triggered.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-21T14:34:13.103951-08:00","updated_at":"2025-12-28T22:36:25.659744-08:00","closed_at":"2025-12-28T22:36:25.659744-08:00","dependencies":[{"issue_id":"gt-3x0z.10","depends_on_id":"gt-3x0z","type":"parent-child","created_at":"2025-12-21T14:34:13.104305-08:00","created_by":"daemon"},{"issue_id":"gt-3x0z.10","depends_on_id":"gt-3x0z.9","type":"blocks","created_at":"2025-12-21T14:34:40.742967-08:00","created_by":"daemon"}]}
{"id":"gt-3x0z.12","title":"Phase 5.2: Ephemeral error handling and recovery","description":"Handle edge cases in ephemeral molecule lifecycle.\n\n## Scenarios\n\n### Agent dies mid-molecule\n- Ephemeral state persists\n- Witness detects stall (no heartbeat)\n- Options:\n a. Nudge agent to resume\n b. Reassign to new agent\n c. Escalate to Mayor\n\n### Squash fails\n- Retry with exponential backoff\n- If persistent failure, escalate\n- Don't lose the ephemeral state until squash succeeds\n\n### Orphaned molecules\n- Molecule started, never completed\n- gt doctor detects (\u003e24h old with no activity)\n- Options:\n a. Manual review\n b. Auto-abandon with 'abandoned' digest\n c. Reassign\n\n### Ephemeral repo corruption\n- Re-init from scratch\n- Active molecules are lost\n- Main beads is source of truth for assigned work\n\n## Implementation\n\nAdd error handling to:\n- bd mol bond (handle init failures)\n- bd squash (retry logic)\n- gt doctor (recovery suggestions)","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-21T14:34:30.158784-08:00","updated_at":"2025-12-28T22:36:25.641985-08:00","closed_at":"2025-12-28T22:36:25.641985-08:00","dependencies":[{"issue_id":"gt-3x0z.12","depends_on_id":"gt-3x0z","type":"parent-child","created_at":"2025-12-21T14:34:30.15923-08:00","created_by":"daemon"},{"issue_id":"gt-3x0z.12","depends_on_id":"gt-3x0z.9","type":"blocks","created_at":"2025-12-21T14:34:40.886432-08:00","created_by":"daemon"}]}
{"id":"gt-3yj","title":"Agent monitoring and status inference","description":"Agent monitoring with status inference from activity, like PGT.\n\n## Agent Status Enum\n```go\ntype AgentStatus string\nconst (\n StatusAvailable AgentStatus = \"available\"\n StatusWorking AgentStatus = \"working\"\n StatusThinking AgentStatus = \"thinking\"\n StatusBlocked AgentStatus = \"blocked\"\n StatusWaiting AgentStatus = \"waiting\"\n StatusReviewing AgentStatus = \"reviewing\"\n StatusIdle AgentStatus = \"idle\"\n StatusPaused AgentStatus = \"paused\"\n StatusError AgentStatus = \"error\"\n StatusOffline AgentStatus = \"offline\"\n)\n```\n\n## Status Sources (priority order)\n```go\ntype StatusSource string\nconst (\n SourceBossOverride StatusSource = \"boss\" // Witness/Mayor sets\n SourceSelfReported StatusSource = \"self\" // Agent reports own status\n SourceInferred StatusSource = \"inferred\" // Detected from activity\n)\n```\n\n## Activity Detection\n\n### Pattern Registry\n```go\nvar activityPatterns = []struct {\n Pattern string\n Status AgentStatus\n}{\n {\"Thinking...\", StatusThinking},\n {\"BLOCKED:\", StatusBlocked},\n {\"Error:\", StatusError},\n // etc\n}\n```\n\n### Idle Detection\nNo pane output for N seconds → StatusIdle\n\n### Resource Monitoring (optional)\nCPU/memory via os.Process\n\n## New Package\ninternal/monitoring/\n├── types.go # AgentStatus, StatusReport\n├── detector.go # PatternRegistry, detect from output\n├── tracker.go # Per-agent status tracking\n└── idle.go # Idle timeout detection\n\n## Integration\n- Session capture output → monitoring detector\n- Status shown in gt status, gt session list\n\n## PGT Reference\ngastown-py/src/gastown/monitoring/\n\n## Acceptance Criteria\n- [ ] Status enum with 10 states\n- [ ] Pattern-based detection from pane output\n- [ ] Idle detection with configurable timeout\n- [ ] Status visible in CLI output","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T14:47:36.336279-08:00","updated_at":"2025-12-16T16:05:25.400551-08:00"}
{"id":"gt-3zkjw","title":"Add pre-flight test check to mol-polecat-work","description":"Add a step early in mol-polecat-work (after branch-setup, before implement) to check if tests pass on main.\n\n## Problem\nIf main is broken when polecat starts, they could:\n- Waste context trying to fix unrelated issues\n- Not know if their changes broke things or it was pre-existing\n- Get blamed for failures they didn't cause\n\n## Proposed Step: preflight-tests\n\nAfter branch-setup, before implement:\n\n1. Checkout main temporarily\n2. Run test suite\n3. If tests PASS: Continue to implement\n4. If tests FAIL:\n - Quick fix (\u003c15 min): Fix it, commit to main, then continue\n - Big fix: File bead, mail Witness, proceed with own work\n - Use ZFC judgment - you're there, you decide\n\n## Handoff Consideration\nIf fixing pre-existing failures consumes significant context:\n- Commit the fix\n- gt handoff with note: 'Fixed pre-existing test failures, continuing with assigned work'\n- Fresh session picks up from implement step\n\n## Key Principle\nScotty Test: Don't walk past a broken warp core. But also don't let someone else's mess derail your mission entirely.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-28T12:48:15.325179-08:00","created_by":"mayor","updated_at":"2025-12-28T12:49:22.164656-08:00","closed_at":"2025-12-28T12:49:22.164656-08:00"}
{"id":"gt-462is","title":"Digest: mol-deacon-patrol","description":"Patrol 11: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T16:08:57.775267-08:00","updated_at":"2025-12-25T16:08:57.775267-08:00","closed_at":"2025-12-25T16:08:57.775236-08:00"}
{"id":"gt-4a2qt","title":"Pillar 3: Polecat Lifecycle","description":"Session-per-step model with automated recycle/nuke.\n\nKey deliverables:\n- gt polecat recycle \u003cname\u003e - kill session, preserve sandbox\n- gt polecat nuke \u003cname\u003e - kill everything\n- Witness calls recycle between molecule steps\n- Refinery calls nuke after merge\n\nSubsumes existing work:\n- gt-budeb: Witness auto-nuke polecats after merge\n- gt-1dbcp: Polecat auto-start nudge fix\n\nReference: ~/gt/docs/liftoff-plan.md\n\nParent: gt-oki8p","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-27T20:56:06.295187-08:00","created_by":"mayor","updated_at":"2025-12-28T16:12:20.010401-08:00","closed_at":"2025-12-28T16:12:20.010401-08:00","dependencies":[{"issue_id":"gt-4a2qt","depends_on_id":"gt-hwka3","type":"blocks","created_at":"2025-12-27T20:56:23.807213-08:00","created_by":"daemon"}]}
{"id":"gt-4b80k","title":"Digest: mol-deacon-patrol","description":"P18: stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:14:54.386241-08:00","updated_at":"2025-12-25T20:14:54.386241-08:00","closed_at":"2025-12-25T20:14:54.386191-08:00"}
{"id":"gt-4bz0c","title":"Digest: mol-deacon-patrol","description":"Patrol complete: checked inbox (0 msgs), health check passed (all rigs healthy), cleaned 3 stale locks","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:39:49.232524-08:00","updated_at":"2025-12-28T19:39:49.232524-08:00","closed_at":"2025-12-28T19:39:49.232484-08:00"}
{"id":"gt-4d98p","title":"Improve looksLikeFormulaName heuristic in mol_bond","description":"The looksLikeFormulaName() function in mol_bond.go uses simple heuristics that could have edge cases:\n\nCurrent checks:\n- starts with 'mol-'\n- contains '.formula'\n- contains path separators\n\nPotential improvements:\n- Check if operand matches issue ID format (prefix-hash pattern)\n- Consider formula search paths when determining if something could be a formula\n- Add --formula flag to explicitly mark an operand as a formula name\n\nLow priority since edge cases are rare in practice.","status":"open","priority":4,"issue_type":"task","created_at":"2025-12-25T16:50:56.748428-08:00","updated_at":"2025-12-25T16:50:56.748428-08:00","dependencies":[{"issue_id":"gt-4d98p","depends_on_id":"gt-8tmz.25","type":"discovered-from","created_at":"2025-12-25T16:50:56.749737-08:00","created_by":"daemon"}]}
{"id":"gt-4ebqj","title":"Digest: mol-deacon-patrol","description":"Patrol 11: Quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T07:27:36.140334-08:00","updated_at":"2025-12-25T07:27:36.140334-08:00","closed_at":"2025-12-25T07:27:36.140305-08:00"}
{"id":"gt-4u682","title":"Extract SupportedShells constant to constants package","description":"Extract repeated shell list to a single constant.\n\n## Files to modify\n- internal/constants/constants.go (add constant)\n- internal/cmd/start.go (use constant at lines 729, 773, 907)\n- internal/cmd/crew_helpers.go (use constant)\n\n## Implementation\nAdd to constants.go:\n```go\nvar SupportedShells = []string{\"bash\", \"zsh\", \"sh\", \"fish\", \"tcsh\", \"ksh\"}\n```\n\nReplace all inline []string{\"bash\", \"zsh\"...} with constants.SupportedShells.\n\n## Acceptance criteria\n- [ ] SupportedShells added to internal/constants/constants.go\n- [ ] All 4 occurrences in start.go and crew_helpers.go replaced\n- [ ] grep -r '\"bash\", \"zsh\"' returns no matches in internal/cmd/\n- [ ] go build ./... passes\n- [ ] go test ./... passes","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T15:49:11.28252-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T16:40:32.237174-08:00","closed_at":"2025-12-28T16:40:32.237174-08:00"}
{"id":"gt-4vd2s","title":"Digest: mol-deacon-patrol","description":"Patrol 14: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T16:52:06.454837-08:00","updated_at":"2025-12-26T16:52:06.454837-08:00","closed_at":"2025-12-26T16:52:06.454802-08:00"}
{"id":"gt-4xuea","title":"Digest: mol-deacon-patrol","description":"Patrol 16: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:10:43.514883-08:00","updated_at":"2025-12-27T23:10:43.514883-08:00","closed_at":"2025-12-27T23:10:43.514849-08:00"}
{"id":"gt-51ghh","title":"Digest: mol-deacon-patrol","description":"Patrol 19: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:21:00.943043-08:00","updated_at":"2025-12-28T08:21:00.943043-08:00","closed_at":"2025-12-28T08:21:00.94301-08:00"}
{"id":"gt-552hb","title":"Epic: Fix swarm orchestration - witness/refinery/polecat lifecycle","description":"## Problem Statement\n\nThe bd-9115 swarm execution required excessive manual intervention from Mayor. The witness, refinery, and polecat lifecycle components didn't coordinate automatically.\n\n## What Should Have Happened\n\n```\nMayor slings 6 beads to rig\n ↓\nPolecats auto-spawn with synced beads, work pinned\n ↓\nPolecats work autonomously\n ↓\nWitness monitors progress, nudges stuck polecats\n ↓\nPolecat completes → pushes branch → signals completion\n ↓\nRefinery detects ready branch → rebases → merges → deletes branch\n ↓\nWitness detects merge → nukes polecat worktree\n ↓\nWhen all done → Witness notifies Mayor\n```\n\n## What Actually Happened\n\n1. **gt sling failed to pin beads** - polecat worktrees had stale JSONL\n2. **Manual intervention** - had to checkout latest JSONL, pin, nudge each polecat\n3. **Witness was passive** - never nudged or checked on polecats\n4. **Refinery waited for requests** - didn't detect completed branches\n5. **Manual lifecycle** - Mayor had to close beads, nuke polecats\n6. **Manual merge coordination** - had to mail refinery with merge order\n\n## Root Cause: Branch Hysteresis\n\nPolecat branches persist across runs and drift from main/beads-sync:\n- `polecat/foo` created weeks ago from old main\n- New work slung to `polecat/foo` \n- JSONL in branch doesn't have new beads\n- Pin fails\n\n## Open Questions\n\n### Q1: Fresh branches per run?\nShould each polecat spawn create a NEW branch from latest main/beads-sync?\n```\ngt sling bd-xxx rig\n → creates polecat/foo-20251227-1630 from origin/main\n → ensures JSONL is current\n → after merge, branch deleted forever\n```\nPros: No drift, always current\nCons: Branch proliferation, naming complexity\n\n### Q2: Rebase existing branches?\nOr should we rebase persistent polecat branches before work?\n```\ngt sling bd-xxx rig/foo\n → git fetch origin\n → git rebase origin/main\n → now JSONL is current\n```\nPros: Keeps simple naming\nCons: Rebase can fail with conflicts\n\n### Q3: Just cherry-pick JSONL?\nMinimal fix - grab latest JSONL before pinning:\n```\ngit checkout origin/beads-sync -- .beads/issues.jsonl\nbd import # refresh DB\nbd pin bd-xxx\n```\nPros: Simple, surgical\nCons: Doesn't fix code drift, just beads\n\n### Q4: Shared beads DB?\nCould polecats share a DB (via symlink or sqlite over network)?\nPros: Always consistent\nCons: Locking complexity, daemon conflicts\n\n### Q5: Who owns polecat lifecycle?\n- Witness? (current assumption)\n- Refinery? (after merge)\n- gt sling? (on spawn)\n- New \"foreman\" role?\n\n## Proposed Solutions\n\nSee child issues for implementation details. Need to resolve open questions first.\n","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-27T16:40:10.727376-08:00","created_by":"mayor","updated_at":"2025-12-28T16:12:13.598411-08:00","closed_at":"2025-12-28T16:12:13.598411-08:00","dependencies":[{"issue_id":"gt-552hb","depends_on_id":"gt-ake0m","type":"blocks","created_at":"2025-12-27T16:41:15.984785-08:00","created_by":"daemon"},{"issue_id":"gt-552hb","depends_on_id":"gt-dtw9u","type":"blocks","created_at":"2025-12-27T16:41:16.036312-08:00","created_by":"daemon"},{"issue_id":"gt-552hb","depends_on_id":"gt-qpwv4","type":"blocks","created_at":"2025-12-27T16:41:16.08566-08:00","created_by":"daemon"},{"issue_id":"gt-552hb","depends_on_id":"gt-6qyt1","type":"blocks","created_at":"2025-12-27T16:41:16.134048-08:00","created_by":"daemon"},{"issue_id":"gt-552hb","depends_on_id":"gt-budeb","type":"blocks","created_at":"2025-12-27T16:41:16.182989-08:00","created_by":"daemon"},{"issue_id":"gt-552hb","depends_on_id":"gt-5j3ia","type":"blocks","created_at":"2025-12-27T16:41:16.231484-08:00","created_by":"daemon"}]}
{"id":"gt-55kx","title":"Build activity stream component","description":"Bubbletea component showing scrollable activity stream for a selected worker. Shows mutation events with timestamps, symbols, and issue titles. Displayed when user expands/selects a worker.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T16:27:17.091004-08:00","updated_at":"2025-12-23T16:27:17.091004-08:00","dependencies":[{"issue_id":"gt-55kx","depends_on_id":"gt-3p77","type":"blocks","created_at":"2025-12-23T16:27:38.640018-08:00","created_by":"daemon"},{"issue_id":"gt-55kx","depends_on_id":"gt-rivr","type":"parent-child","created_at":"2025-12-23T16:28:30.857389-08:00","created_by":"daemon"}]}
{"id":"gt-560ge","title":"Extract duplicated processExists function to shared package","description":"attached_args: Extract processExists function to reduce duplication\n\nExtract duplicated processExists function to shared package.\n\n## Files to modify\n- internal/util/process.go (NEW)\n- internal/witness/manager.go (remove local function, import util)\n- internal/refinery/manager.go (remove local function, import util)\n\n## Current duplication\nBoth files have identical implementations at:\n- internal/witness/manager.go (lines 136-144)\n- internal/refinery/manager.go (lines 646-654)\n\n```go\nfunc processExists(pid int) bool {\n proc, err := os.FindProcess(pid)\n if err != nil {\n return false\n }\n err = proc.Signal(nil)\n return err == nil\n}\n```\n\n## Implementation\nCreate internal/util/process.go:\n```go\npackage util\n\nimport \"os\"\n\n// ProcessExists checks if a process with the given PID exists.\nfunc ProcessExists(pid int) bool {\n proc, err := os.FindProcess(pid)\n if err != nil {\n return false\n }\n return proc.Signal(nil) == nil\n}\n```\n\n## Acceptance criteria\n- [ ] internal/util/process.go created with ProcessExists function\n- [ ] internal/util/process_test.go with basic tests\n- [ ] witness/manager.go imports util and uses util.ProcessExists\n- [ ] refinery/manager.go imports util and uses util.ProcessExists\n- [ ] Local processExists functions removed from both files\n- [ ] go build ./... passes\n- [ ] go test ./... passes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:43:08.119167-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T16:14:21.455498-08:00","closed_at":"2025-12-28T16:14:21.455498-08:00"}
{"id":"gt-56et5","title":"Digest: mol-deacon-patrol","description":"Patrol 14: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T13:32:21.006139-08:00","updated_at":"2025-12-25T13:32:21.006139-08:00","closed_at":"2025-12-25T13:32:21.006104-08:00"}
{"id":"gt-594l2","title":"ZFC #10: Polecat reports cleanup status instead of Go checking git","description":"**ZFC Violation:** internal/polecat/manager.go:192-215\n\nGo examines git state to decide if polecat removal is safe:\n```go\nstatus, err := polecatGit.CheckUncommittedWork()\nif status.StashCount \u003e 0 || status.UnpushedCommits \u003e 0 {\n return \u0026UncommittedWorkError{...}\n}\n```\n\n**ZFC-compliant solution:**\nPolecat reports its own cleanup status via agent bead:\n- state: stopped\n- cleanup_status: clean | has_uncommitted | has_stash | has_unpushed\n- Witness reads cleanup_status before calling nuke\n- Polecat is authority on whether it's safe to remove\n\n**Relates to:** Day 4.1/4.2 (recycle/nuke commands)\n\nReference: ~/gt/docs/zfc-violations-audit.md #10","status":"hooked","priority":2,"issue_type":"task","created_at":"2025-12-27T21:32:26.421521-08:00","created_by":"mayor","updated_at":"2025-12-28T16:31:36.050065-08:00","dependencies":[{"issue_id":"gt-594l2","depends_on_id":"gt-z99nh","type":"blocks","created_at":"2025-12-27T21:32:43.597966-08:00","created_by":"daemon"}]}
{"id":"gt-59k2x","title":"Agent beads hook_bead field never populated","description":"## Problem\n\nThe witness patrol formula expects polecat agent beads to have:\n\n hook_bead: \u003ccurrent-work-id\u003e\n\nThis field is used by the witness to see what the polecat is working on.\n\nBut looking at the code, hook_bead is never set:\n\n1. Polecat agent bead created (polecat/manager.go:167-170) - no hook_bead\n2. reportAgentState called (prime.go:1067) - passes nil for hookBead\n3. UpdateAgentState preserves existing hook_bead if nil (beads.go:633-635)\n\nSince hook_bead starts empty and is never updated, the witness cannot use\nagent beads to see what polecats are working on.\n\n## Found in commit\n\nf3a6ef6 (feat: Witness reads polecat state from agent beads)\n\n## Related to\n\n- gt-0lop3 (Agent state lifecycle incomplete for polecats)\n\n## Suggested fix\n\nWhen a polecat is assigned work (via gt sling or similar), update the agent\nbead's hook_bead field:\n\n bd.UpdateAgentState(agentID, 'running', \u0026hookBeadID)","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-28T09:49:07.258556-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T09:54:41.408725-08:00","closed_at":"2025-12-28T09:54:41.408725-08:00","dependencies":[{"issue_id":"gt-59k2x","depends_on_id":"gt-0lop3","type":"blocks","created_at":"2025-12-28T09:49:17.647153-08:00","created_by":"daemon"}]}
{"id":"gt-5bjgq","title":"Digest: mol-deacon-patrol","description":"Patrol 19","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T14:57:47.79199-08:00","updated_at":"2025-12-26T14:57:47.79199-08:00","closed_at":"2025-12-26T14:57:47.791943-08:00"}
{"id":"gt-5cql0","title":"Day 5.2: Fix integration issues","description":"Address any issues found in Day 5.1:\n- Debug failures\n- Fix edge cases\n- Retry integration test\n- Document remaining gaps\n\nThis is buffer time for reality.\n\nParent: gt-oki8p","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:57:58.914212-08:00","created_by":"mayor","updated_at":"2025-12-28T16:18:15.684857-08:00","closed_at":"2025-12-28T16:18:15.684857-08:00","dependencies":[{"issue_id":"gt-5cql0","depends_on_id":"gt-j0gx2","type":"blocks","created_at":"2025-12-27T20:58:31.859106-08:00","created_by":"daemon"},{"issue_id":"gt-5cql0","depends_on_id":"gt-oki8p","type":"parent-child","created_at":"2025-12-27T20:58:39.644301-08:00","created_by":"daemon"},{"issue_id":"gt-5cql0","depends_on_id":"gt-liftoff","type":"blocks","created_at":"2025-12-27T21:43:12.603927-08:00","created_by":"daemon"},{"issue_id":"gt-5cql0","depends_on_id":"gt-kfznm","type":"blocks","created_at":"2025-12-28T16:26:15.296429-08:00","created_by":"daemon"}]}
{"id":"gt-5eegv","title":"Day 2.3: Agent writes state on lifecycle events","description":"Agents update their bead state using bd agent state command:\n- On startup: bd agent state gt-\u003crole\u003e running\n- On shutdown: bd agent state gt-\u003crole\u003e stopped\n- On stuck: bd agent state gt-\u003crole\u003e stuck\n\nState is self-reported, not inferred.\n\nImplementation: Wire up agent lifecycle hooks (SessionStart, SessionEnd, health checks) to call bd agent state.\n\nParent: gt-d0jqp","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:05.269312-08:00","created_by":"mayor","updated_at":"2025-12-28T02:05:51.429595-08:00","closed_at":"2025-12-28T02:05:51.429595-08:00","dependencies":[{"issue_id":"gt-5eegv","depends_on_id":"gt-39ttg","type":"blocks","created_at":"2025-12-27T20:58:44.375633-08:00","created_by":"daemon"}]}
{"id":"gt-5j3ia","title":"Witness: aggregate completion and notify Mayor","description":"## Problem\nNo signal when swarm completes. Mayor must manually check.\n\n## ZFC-Compliant Solution\nAdd step to `mol-witness-patrol.formula.toml`:\n\n```toml\n[[step]]\nid = \"check-swarm-completion\"\ntitle = \"Report swarm completion to Mayor\"\ndescription = \"\"\"\n1. Check state.json for active swarm tracking:\n - swarm_id, start_time, assigned_beads[], completed_beads[]\n2. For each completed merge (from cleanup step):\n - Add bead to completed_beads\n3. If all assigned_beads are in completed_beads:\n - Calculate duration\n - Send summary to Mayor:\n gt mail send mayor/ -s \"SWARM_COMPLETE: \u003cswarm_id\u003e\" -m \"All N polecats merged in Xm\"\n - Clear swarm tracking from state.json\n\"\"\"\ndepends_on = [\"cleanup-merged-polecats\"]\n```\n\n## Swarm Initialization\nWhen Mayor slings a batch, they should:\n```bash\n# Mayor creates swarm tracking\ngt mail send \u003crig\u003e/witness -s \"SWARM_START\" -m '{\"swarm_id\": \"batch-123\", \"beads\": [\"bd-a\", \"bd-b\", \"bd-c\"]}'\n```\n\nWitness parses SWARM_START and initializes tracking in state.json.\n\n## Why This Works\n- Mayor initiates batch with SWARM_START mail\n- Witness tracks progress in its own state\n- Witness signals completion via mail\n- All coordination is agent-to-agent via mail\n\n## Files\n- formulas/mol-witness-patrol.formula.toml","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T16:41:05.639489-08:00","created_by":"mayor","updated_at":"2025-12-28T16:13:19.273203-08:00","closed_at":"2025-12-28T16:13:19.273203-08:00","dependencies":[{"issue_id":"gt-5j3ia","depends_on_id":"gt-budeb","type":"blocks","created_at":"2025-12-27T16:41:19.077686-08:00","created_by":"daemon"}]}
{"id":"gt-5m5cd","title":"Digest: mol-deacon-patrol","description":"Patrol 10: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T13:30:35.506276-08:00","updated_at":"2025-12-25T13:30:35.506276-08:00","closed_at":"2025-12-25T13:30:35.506242-08:00"}
{"id":"gt-5mchy","title":"Digest: mol-deacon-patrol","description":"Patrol complete: no callbacks, agents healthy, 1 stale lock cleaned","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:04:54.585148-08:00","updated_at":"2025-12-28T13:04:54.585148-08:00","closed_at":"2025-12-28T13:04:54.585114-08:00"}
{"id":"gt-5pbdp","title":"Digest: mol-deacon-patrol","description":"Patrol 10: full check, all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:32:43.813756-08:00","updated_at":"2025-12-28T01:32:43.813756-08:00","closed_at":"2025-12-28T01:32:43.813717-08:00"}
{"id":"gt-5qkah","title":"Merge: nux-1766959759345","description":"branch: polecat/nux-1766959759345\ntarget: main\nsource_issue: nux-1766959759345\nrig: gastown","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-28T16:22:11.02241-08:00","created_by":"gastown/polecats/nux","updated_at":"2025-12-28T22:29:02.022819-08:00","closed_at":"2025-12-28T22:29:02.022819-08:00"}
{"id":"gt-5v29","title":"Add 'wit' alias for witness command","description":"ref works as alias for refinery, but wit doesn't work for witness. Add Aliases: []string{\"wit\"} to witnessCmd.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-20T23:11:53.453692-08:00","updated_at":"2025-12-20T23:11:53.453692-08:00"}
{"id":"gt-5v8ls","title":"Day 3.6: Witness pings Deacon for second-order monitoring","description":"Implement WITNESS_PING protocol for second-order monitoring.\n\nWitnesses collectively monitor Deacon health:\n1. Each Witness sends WITNESS_PING to Deacon during patrol\n2. Deacon responds (or doesn't if dead)\n3. If no response after threshold, Witness escalates to Mayor\n\nThis prevents the 'who watches the watchers' problem - if Deacon dies, Witnesses detect it.\n\nImplementation:\n- Add WITNESS_PING step to mol-witness-patrol\n- Deacon acknowledges pings (updates last_activity)\n- Witness checks Deacon agent bead last_activity\n- Escalate if stale beyond threshold","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T23:17:12.910142-08:00","created_by":"mayor","updated_at":"2025-12-28T10:02:39.577542-08:00","closed_at":"2025-12-28T10:02:39.577542-08:00","dependencies":[{"issue_id":"gt-5v8ls","depends_on_id":"gt-7uhts","type":"blocks","created_at":"2025-12-27T23:17:29.34799-08:00","created_by":"daemon"}]}
{"id":"gt-5y5p","title":"Preflight molecule: verify baseline health before work","description":"Before assigning work, verify baseline (main branch) is healthy.\n\n**From VC**: Self-healing state machine (HEALTHY → SELF_HEALING → ESCALATED). ~200 lines.\n\n**Gas Town implementation**: Preflight molecule or refinery feature:\n```yaml\npreflight:\n gates: [test, lint, build]\n on_failure: create-fix-issue\n```\n\nRun at session start. If baseline broken, file a P0 fix issue and work on that first.\n\n**Value**: Self-healing baseline. Agents don't start from broken state.\n\n**VC lesson**: Prevents cascading failures. Agent shouldn't start work on broken code.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-20T20:30:13.807641-08:00","updated_at":"2025-12-20T20:30:13.807641-08:00","dependencies":[{"issue_id":"gt-5y5p","depends_on_id":"gt-zhpa","type":"parent-child","created_at":"2025-12-20T20:30:27.469804-08:00","created_by":"daemon"}]}
{"id":"gt-659gx","title":"Digest: mol-deacon-patrol","description":"Patrol 19: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T17:49:17.60911-08:00","updated_at":"2025-12-26T17:49:17.60911-08:00","closed_at":"2025-12-26T17:49:17.609075-08:00"}
{"id":"gt-65gwa","title":"bd admin compact --older-than=0 ignores the flag, uses default 30 days","description":"When running bd admin compact --prune --older-than=0, the output says 'No expired tombstones to prune (TTL: 30 days)' - the flag value is ignored.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-28T22:38:10.95263-08:00","created_by":"stevey","updated_at":"2025-12-28T22:38:10.95263-08:00"}
{"id":"gt-69l","title":"Hook system for event extensibility","description":"GGT needs hook system for extensibility like PGT.\n\n## Event Types\n```go\ntype Event string\nconst (\n EventPreSessionStart Event = \"pre-session-start\"\n EventPostSessionStart Event = \"post-session-start\"\n EventPreShutdown Event = \"pre-shutdown\"\n EventPostShutdown Event = \"post-shutdown\"\n EventOnPaneOutput Event = \"on-pane-output\"\n EventSessionIdle Event = \"session-idle\"\n EventMailReceived Event = \"mail-received\"\n EventWorkAssigned Event = \"work-assigned\"\n)\n```\n\n## Hook Configuration\nFile: .claude/hooks.json or .gastown/hooks.json\n```json\n{\n \"hooks\": {\n \"pre-shutdown\": [\n {\"type\": \"command\", \"cmd\": \"./scripts/pre-shutdown.sh\"}\n ],\n \"on-pane-output\": [\n {\"type\": \"command\", \"cmd\": \"./scripts/activity-monitor.sh\"}\n ]\n }\n}\n```\n\n## Hook Types\n1. **Command**: Execute external script\n2. **Built-in**: Internal Go functions (pre-shutdown checks)\n\n## Hook Interface\n```go\ntype HookRunner struct {\n config *HookConfig\n}\n\ntype HookResult struct {\n Success bool\n Message string\n Block bool // For pre-* hooks: should operation be blocked?\n}\n\nfunc (r *HookRunner) Fire(event Event, ctx *HookContext) []HookResult\n```\n\n## CLI Commands\n```\ngt hooks list [\u003cevent\u003e] # List registered hooks\ngt hooks fire \u003cevent\u003e # Manually fire for testing\ngt hooks test [--all] # Validate hook config\n```\n\n## Integration Points\n- internal/session/manager.go: Fire pre/post session hooks\n- internal/mail/router.go: Fire mail-received hook\n\n## New Package\ninternal/hooks/\n├── types.go # Event, HookConfig, HookResult\n├── runner.go # HookRunner, Fire()\n└── builtin.go # Built-in hooks (pre-shutdown checks)\n\n## PGT Reference\ngastown-py/src/gastown/hooks/\n\n## Acceptance Criteria\n- [ ] Hook config loading from JSON\n- [ ] Command hooks execute subprocess\n- [ ] Pre-shutdown hook integration with session stop\n- [ ] CLI for listing and testing hooks","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T14:47:34.584907-08:00","updated_at":"2025-12-16T16:04:47.890588-08:00"}
{"id":"gt-69ruq","title":"Digest: mol-deacon-patrol","description":"Patrol 8: healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T06:10:18.225418-08:00","updated_at":"2025-12-28T06:10:18.225418-08:00","closed_at":"2025-12-28T06:10:18.225382-08:00"}
{"id":"gt-6c3kn","title":"Digest: mol-deacon-patrol","description":"Patrol 18: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T18:43:56.834698-08:00","updated_at":"2025-12-25T18:43:56.834698-08:00","closed_at":"2025-12-25T18:43:56.834642-08:00"}
{"id":"gt-6c4nh","title":"Digest: mol-deacon-patrol","description":"Patrol 5: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:29:54.403996-08:00","updated_at":"2025-12-28T01:29:54.403996-08:00","closed_at":"2025-12-28T01:29:54.403955-08:00"}
{"id":"gt-6l2au","title":"Digest: mol-deacon-patrol","description":"Patrol 14: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:04:09.604588-08:00","updated_at":"2025-12-25T00:04:09.604588-08:00","closed_at":"2025-12-25T00:04:09.604555-08:00"}
{"id":"gt-6m3e","title":"bd create --dedup: semantic deduplication before issue creation","description":"Before creating issue, check for semantic duplicates using AI similarity.\n\n**From VC**: internal/deduplication/ - AI-powered batch comparison. ~300 lines.\nVC had issue pollution problem: 438 issues with ~350+ spam because no early dedup.\n\n**Gas Town implementation**: CLI flag on bd create:\n```bash\nbd create --dedup --title=\"Fix auth bug\" --description=\"...\"\n```\n\nChecks recent issues (7-day window) with AI similarity. If confidence \u003e0.85, warns or blocks.\n\n**Value**: Prevents pollution from parallel workers discovering same issues.\n\n**VC lesson**: 115 issues filed in single day (Nov 2) because supervisor over-discovered without dedup. Rate limiting + dedup are essential.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-20T20:30:17.305652-08:00","updated_at":"2025-12-20T20:30:17.305652-08:00","dependencies":[{"issue_id":"gt-6m3e","depends_on_id":"gt-zhpa","type":"parent-child","created_at":"2025-12-20T20:30:27.599806-08:00","created_by":"daemon"}]}
{"id":"gt-6m3w7","title":"Digest: mol-deacon-patrol","description":"Patrol 3: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T13:59:04.960555-08:00","updated_at":"2025-12-25T13:59:04.960555-08:00","closed_at":"2025-12-25T13:59:04.960522-08:00"}
{"id":"gt-6n3c4","title":"Digest: mol-deacon-patrol","description":"Patrol 16: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T13:33:16.633349-08:00","updated_at":"2025-12-25T13:33:16.633349-08:00","closed_at":"2025-12-25T13:33:16.633317-08:00"}
{"id":"gt-6oxlh","title":"Digest: mol-deacon-patrol","description":"Patrol 12","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T14:55:31.115289-08:00","updated_at":"2025-12-26T14:55:31.115289-08:00","closed_at":"2025-12-26T14:55:31.115248-08:00"}
{"id":"gt-6qld","title":"Daemon should auto-start as part of town bootstrap","description":"The Go daemon should be started automatically when the town boots up (mol-gastown-boot). Currently it requires manual 'gt daemon start'.\n\nThe daemon is critical infrastructure - it monitors the Deacon and nudges it when naked. Without it, the Deacon patrol loop doesn't run.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T13:16:52.000929-08:00","updated_at":"2025-12-23T13:16:52.000929-08:00"}
{"id":"gt-6qzay","title":"Digest: mol-deacon-patrol","description":"Patrol 7: Quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T19:15:59.128327-08:00","updated_at":"2025-12-25T19:15:59.128327-08:00","closed_at":"2025-12-25T19:15:59.12827-08:00"}
{"id":"gt-6xe2u","title":"Centralize session name construction patterns","description":"Session name patterns like fmt.Sprintf(\"gt-%s-\u003crole\u003e\", rigName) scattered across files:\n- witness.go:287\n- refinery.go:383\n- start.go:275\n- crew_helpers.go:68-70\n\nAlso: sessionToAgentID logic duplicated in sling.go:365-391 and handoff.go:374-402.\n\nSuggestion: Create session_names.go with WitnessSessionName(), RefinerySessionName(), CrewSessionName() functions plus AgentIdentity type with FromSessionName()/ToSessionName() methods.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:43:10.481903-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:47:15.546344-08:00","closed_at":"2025-12-28T15:47:15.546344-08:00"}
{"id":"gt-6y8u","title":"Deacon patrol: Janitorial cleanup patterns","description":"Patterns discovered during town cleanup that could be automated in Deacon's patrol step:\n\n## Stale Issue Detection\n\n1. **Stale in_progress issues** - Issues marked in_progress for \u003eN days without activity\n - Example: 9 issues in_progress, some likely complete\n - Action: Report list, optionally nudge assignee\n\n2. **Duplicate issues** - Same title with different IDs\n - Example: gt-87jz and gt-qp2w both 'mol-witness-patrol'\n - Action: Flag for human review\n\n3. **Orphaned issues** - Referenced in commits but still open\n - bd doctor already detects: 'hq-65jk (commit f9e9034d)'\n - Action: Report, suggest closing\n\n4. **Stale test messages** - Messages with 'test' in title older than N days\n - Example: gt-54kn, gt-1ero, gt-nriy, gt-wrw2, gt-pnu4, gt-g1ud, gt-b5sh\n - Action: Auto-close or flag\n\n## File System Cleanup\n\n5. **Log file accumulation** - daemon.log and rotated .log.gz files\n - Found 8+ log files across rigs\n - Action: Rotate, compress, delete old (\u003e7 days)\n\n6. **Beads directory size** - Town .beads/ is 65MB\n - Action: Monitor growth, alert on threshold\n\n## Database Health\n\n7. **Legacy database fingerprints** - Older DBs without fingerprint\n - bd doctor warns about this\n - Action: Report, suggest migration\n\n## Cross-Reference Integrity\n\n8. **Gastown↔Beads issue sync** - Issues filed in wrong project\n - Example: gt-8tmz.* describes Beads work but no bd-* issues\n - Action: Detect cross-references, verify both sides exist\n\n## Implementation Notes\n\nThese could be added to mol-deacon-patrol.formula.yaml as cleanup substeps:\n- Daily: Log rotation, stale issue report\n- Weekly: Duplicate detection, orphan check\n- Monthly: Size monitoring, archive old closed issues","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T13:25:03.212307-08:00","updated_at":"2025-12-24T13:25:03.212307-08:00","dependencies":[{"issue_id":"gt-6y8u","depends_on_id":"gt-ingm","type":"relates-to","created_at":"2025-12-24T13:25:18.850583-08:00","created_by":"daemon"}]}
{"id":"gt-72nyt","title":"Digest: mol-deacon-patrol","description":"Cycle 13: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:21:53.797016-08:00","updated_at":"2025-12-28T13:21:53.797016-08:00","closed_at":"2025-12-28T13:21:53.796981-08:00"}
{"id":"gt-73gzw","title":"Digest: mol-deacon-patrol","description":"Patrol 7: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:46:48.759627-08:00","updated_at":"2025-12-25T10:46:48.759627-08:00","closed_at":"2025-12-25T10:46:48.759596-08:00"}
{"id":"gt-73o6t","title":"Digest: mol-deacon-patrol","description":"Patrol 15: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:34:58.145969-08:00","updated_at":"2025-12-28T01:34:58.145969-08:00","closed_at":"2025-12-28T01:34:58.145939-08:00"}
{"id":"gt-78ejc","title":"Digest: mol-deacon-patrol","description":"Patrol complete: gastown witness came online, town healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:19:32.090411-08:00","updated_at":"2025-12-28T19:19:32.090411-08:00","closed_at":"2025-12-28T19:19:32.09038-08:00"}
{"id":"gt-7921","title":"Add await-work and plugin-run steps to mol-refinery-patrol","description":"## Context\n\nThe mol-refinery-patrol needs two additional steps:\n\n### 1. await-work (Decision Point)\n\nNot just 'wait for signal' but a crossroads:\n- Check for pending signals (mail, nudge, human)\n- Check plugin gates (any plugins need to run?)\n- Check maintenance schedule (daily/weekly due?)\n- Evaluate context and decide next action\n\nPosition: Between burn-or-loop and inbox-check (the loop point)\n\n### 2. plugin-run (Like Deacon)\n\nRefinery needs plugin support for:\n- **Monitors**: Flag PRs touching sensitive code\n- **Gates**: Block merges under certain conditions\n- **Schedulers**: Reorder queue based on priority/urgency\n- **Maintenance**: Weekly cleanup, audits, stats\n- **Audits**: Log merge statistics, track patterns\n\nPosition: After queue-scan, before process-branch\n\n## Implementation\n\nUpdate RefineryPatrolMolecule() in builtin_molecules.go to include:\n- await-work step with decision tree\n- plugin-run step with gate types\n\n## Related\n- gt-7920 (original mol-refinery-patrol)\n- docs/deacon-plugins.md (existing plugin model)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T13:24:11.267237-08:00","updated_at":"2025-12-22T13:24:11.267237-08:00"}
{"id":"gt-795e8","title":"Extract timing constants to constants package","description":"Extract hardcoded timing values to named constants.\n\n## Files to modify\n- internal/constants/constants.go (add constants)\n- internal/cmd/start.go (use constants)\n- internal/tmux/tmux.go (use constants)\n\n## Implementation\nAdd to constants.go:\n```go\nconst (\n ShutdownNotifyDelay = 500 * time.Millisecond\n ClaudeStartTimeout = 15 * time.Second\n ShellReadyTimeout = 5 * time.Second\n DefaultDebounceMs = 100\n DefaultDisplayMs = 5000\n)\n```\n\n## Acceptance criteria\n- [ ] 5 timing constants added to constants.go\n- [ ] start.go uses ShutdownNotifyDelay, ClaudeStartTimeout, ShellReadyTimeout\n- [ ] tmux.go uses DefaultDebounceMs, DefaultDisplayMs\n- [ ] go build ./... passes\n- [ ] go test ./... passes","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T15:49:12.251261-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T17:17:52.768898-08:00","closed_at":"2025-12-28T17:17:52.768898-08:00"}
{"id":"gt-79jxg","title":"Bug: bd update --parent doesn't persist","description":"The --parent flag on bd update reports success but doesn't persist the parent field.\n\n**Confirmed behavior:**\n```bash\nbd update gt-9kp3t --parent=gt-d0jqp --no-daemon -v\n# Output: ✓ Updated issue: gt-9kp3t\n\nbd show gt-9kp3t --json | jq '.[0].parent'\n# Returns: null\n\ngrep gt-9kp3t .beads/issues.jsonl | head -1 | jq '.parent'\n# Returns: null (field not present)\n```\n\n**Root cause hypothesis:**\nThe update handler processes the --parent flag but either:\n1. Doesn't write it to the Issue struct\n2. Doesn't include it in the JSONL export\n3. The field name doesn't match what export expects\n\n**Files to check:**\n- cmd/bd/show.go:638-640 (flag handling)\n- cmd/bd/show.go:810-814 (reparenting logic)\n- internal/rpc/server_issues_epics.go (RPC handler)\n- internal/rpc/protocol.go (UpdateArgs.Parent field)\n\nRelated: bd-cj2e (the original feature implementation)","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-27T22:40:33.744301-08:00","created_by":"mayor","updated_at":"2025-12-27T23:32:31.903138-08:00","closed_at":"2025-12-27T23:32:31.903138-08:00"}
{"id":"gt-7aw1m","title":"Instrument gt commands to appear in activity feed","description":"## Architecture: Two-tier event system\n\n```\n┌─────────────┐ ┌─────────────┐ ┌─────────────┐\n│ gt commands │ │ bd mutations│ │ agent output│\n└──────┬──────┘ └──────┬──────┘ └──────┬──────┘\n └────────────────┼────────────────┘\n ▼\n ~/gt/.events.jsonl (raw, audit)\n │\n ┌─────────────────┐\n │ Feed daemon │ ← goroutine in gt daemon\n │ - filters │\n │ - aggregates │\n │ - AI curates │\n └────────┬────────┘\n ▼\n ~/gt/.feed.jsonl (curated, user-facing)\n```\n\n## Event format\n\n```json\n{\n \"ts\": \"2025-12-28T10:30:15Z\",\n \"source\": \"gt\",\n \"type\": \"sling\",\n \"actor\": \"mayor\",\n \"payload\": {\"bead\": \"gt-xyz\", \"target\": \"gastown/Toast\"},\n \"visibility\": \"feed\"\n}\n```\n\nVisibility: `audit` | `feed` | `both`\n\n## Implementation phases\n\n1. **Event logging** - gt commands write to ~/gt/.events.jsonl\n2. **Feed daemon** - goroutine in gt daemon tails events, writes curated feed\n3. **Feed readers** - gt feed, gt dashboard read from .feed.jsonl\n4. **AI curation** - future: haiku summarization for complex activity\n\nPart of epic gt-u7dxq","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T11:02:16.207055-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T12:46:20.256083-08:00"}
{"id":"gt-7einb","title":"Digest: mol-deacon-patrol","description":"Patrol 9: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T15:58:57.715007-08:00","updated_at":"2025-12-25T15:58:57.715007-08:00","closed_at":"2025-12-25T15:58:57.714972-08:00"}
{"id":"gt-7emkr","title":"Digest: mol-deacon-patrol","description":"P14: stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:13:35.668266-08:00","updated_at":"2025-12-25T20:13:35.668266-08:00","closed_at":"2025-12-25T20:13:35.668211-08:00"}
{"id":"gt-7grh6","title":"Tmux session scanner for running agents","description":"Scan tmux for running Gas Town agent sessions.\n\n## Deliverables\n\n1. Function: ScanRunningSessions() -\u003e []AgentAddr\n - Parse tmux list-sessions\n - Filter for Gas Town session naming pattern\n - Return addresses of running agents\n\n2. Function: ScanRigSessions(rig) -\u003e []AgentAddr\n - Filter running sessions by rig prefix\n\n3. Alias resolution:\n - #rig/gastown → running sessions in gastown\n - #town → all running Gas Town sessions\n - #witnesses → running witness sessions\n\n## Location\ninternal/discovery/tmux.go\n\n## Acceptance\n- Scanner finds running sessions\n- Correctly parses session names to addresses\n- Handles no-sessions case gracefully","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-26T14:52:32.408394-08:00","updated_at":"2025-12-26T14:52:32.408394-08:00"}
{"id":"gt-7jonl","title":"Digest: mol-deacon-patrol","description":"Patrol complete: beads witness+refinery came online, both rigs healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:28:45.988408-08:00","updated_at":"2025-12-28T19:28:45.988408-08:00","closed_at":"2025-12-28T19:28:45.98837-08:00"}
{"id":"gt-7o7","title":"Session pre-shutdown checks","description":"Session stop should verify clean state before killing, like PGT.\n\n## Pre-Shutdown Checks\n\n### 1. Git Working Tree Clean\n```go\nfunc checkGitClean(clonePath string) error {\n // git status --porcelain\n // Fail if any output\n}\n```\n\n### 2. All Commits Pushed\n```go\nfunc checkCommitsPushed(clonePath string) error {\n // git log origin/HEAD..HEAD\n // Fail if any unpushed commits\n}\n```\n\n### 3. Assigned Issues Handled\n```go\nfunc checkIssuesHandled(polecat *Polecat) error {\n // If polecat.Issue != \"\", check if closed or reassigned\n}\n```\n\n### 4. Beads Synced\n```go\nfunc checkBeadsSynced(clonePath string) error {\n // bd sync --status in clone directory\n}\n```\n\n## Behavior on Failure\n1. First attempt: Nudge worker to fix\n2. Retry up to 3 times with delay\n3. After retries: Escalate to Witness/Mayor\n\n## Integration\nModify internal/session/manager.go Stop():\n```go\nfunc (m *Manager) Stop(polecat string, force bool) error {\n if !force {\n if err := m.runPreShutdownChecks(polecat); err != nil {\n return fmt.Errorf(\"pre-shutdown checks failed: %w\", err)\n }\n }\n // existing stop logic\n}\n```\n\n## Flags\n- --force: Skip checks\n- --grace-period N: Time to wait for fixes\n\n## Dependencies\n- Ties into gt-69l (hook system) - can be hook-based\n- Ties into gt-f8v (Witness pre-kill verification)\n\n## Acceptance Criteria\n- [ ] Stop fails if uncommitted changes (without --force)\n- [ ] Stop fails if unpushed commits\n- [ ] Clear error messages with fix instructions\n- [ ] --force bypasses all checks","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T14:47:55.968983-08:00","updated_at":"2025-12-16T16:05:02.795812-08:00"}
{"id":"gt-7psb8","title":"Day 3.5: Test polecat → refinery → merged flow","description":"Integration test:\n1. Spawn polecat with work\n2. Polecat completes (updates state, closes bead)\n3. Witness detects completion\n4. Witness sends MERGE_READY\n5. Refinery processes and merges\n6. MERGED signal received\n\nParent: gt-hwka3","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:06.584468-08:00","created_by":"mayor","updated_at":"2025-12-28T13:13:59.734708-08:00","closed_at":"2025-12-28T13:13:59.734708-08:00","dependencies":[{"issue_id":"gt-7psb8","depends_on_id":"gt-hwka3","type":"parent-child","created_at":"2025-12-27T20:58:50.044788-08:00","created_by":"daemon"},{"issue_id":"gt-7psb8","depends_on_id":"gt-7uhts","type":"blocks","created_at":"2025-12-27T20:59:01.683897-08:00","created_by":"daemon"},{"issue_id":"gt-7psb8","depends_on_id":"gt-5v8ls","type":"blocks","created_at":"2025-12-27T23:17:29.833111-08:00","created_by":"daemon"}]}
{"id":"gt-7q4","title":"HOP: Skill vectors on work items","description":"Add skill embeddings to work items for capability-based matching. See ~/ai/stevey-gastown/hop/CONTEXT.md. Post-v0.1 work.","status":"open","priority":3,"issue_type":"feature","created_at":"2025-12-17T01:00:43.251085-08:00","updated_at":"2025-12-17T01:00:43.251085-08:00"}
{"id":"gt-7rp6z","title":"Digest: mol-deacon-patrol","description":"Patrol 14: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:09:03.478593-08:00","updated_at":"2025-12-28T03:09:03.478593-08:00","closed_at":"2025-12-28T03:09:03.478547-08:00"}
{"id":"gt-7tt8","title":"Default crew name should be something better than 'main'","description":"When creating a new rig, the default crew worker name is 'main'. This is confusing since:\n\n1. 'main' is also the git branch name\n2. It doesn't convey that this is the user's personal workspace\n3. Crew names should feel more personal/distinct\n\nConsider alternatives like:\n- 'home' - the user's home base\n- 'desk' - their personal desk\n- 'joe/max/etc' - actual name-based defaults\n- Let user pick during rig init","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-21T16:46:51.049367-08:00","updated_at":"2025-12-21T16:46:59.133599-08:00"}
{"id":"gt-7uhts","title":"Day 3.4: Refinery processes MERGE_READY mail","description":"Refinery patrol handles merge requests:\n1. Check inbox for MERGE_READY messages\n2. For each, verify branch exists\n3. Run merge checks (tests, lint)\n4. If passing, merge to main\n5. Send MERGED signal back\n\nParent: gt-hwka3","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:05.510472-08:00","created_by":"mayor","updated_at":"2025-12-28T09:56:42.672932-08:00","closed_at":"2025-12-28T09:56:42.672932-08:00","dependencies":[{"issue_id":"gt-7uhts","depends_on_id":"gt-hwka3","type":"parent-child","created_at":"2025-12-27T20:58:48.873689-08:00","created_by":"daemon"},{"issue_id":"gt-7uhts","depends_on_id":"gt-u6siy","type":"blocks","created_at":"2025-12-27T20:59:00.772533-08:00","created_by":"daemon"},{"issue_id":"gt-7uhts","depends_on_id":"gt-6qyt1","type":"relates-to","created_at":"2025-12-27T20:59:09.685061-08:00","created_by":"daemon"},{"issue_id":"gt-7uhts","depends_on_id":"gt-k294l","type":"blocks","created_at":"2025-12-27T23:17:28.282401-08:00","created_by":"daemon"}]}
{"id":"gt-7uo17","title":"Digest: mol-deacon-patrol","description":"Patrol complete: no callbacks, all agents healthy, no orphans, doctor 24/28","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T06:06:07.673288-08:00","updated_at":"2025-12-28T06:06:07.673288-08:00","closed_at":"2025-12-28T06:06:07.673251-08:00"}
{"id":"gt-7wybt","title":"Digest: mol-deacon-patrol","description":"Patrol 14","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:52:22.727424-08:00","updated_at":"2025-12-25T20:52:22.727424-08:00","closed_at":"2025-12-25T20:52:22.727382-08:00"}
{"id":"gt-81rh4","title":"Digest: mol-deacon-patrol","description":"Patrol 13: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T16:18:56.391947-08:00","updated_at":"2025-12-25T16:18:56.391947-08:00","closed_at":"2025-12-25T16:18:56.391918-08:00"}
{"id":"gt-83s17","title":"Digest: mol-deacon-patrol","description":"Patrol 13: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:34:18.706892-08:00","updated_at":"2025-12-25T00:34:18.706892-08:00","closed_at":"2025-12-25T00:34:18.706854-08:00"}
{"id":"gt-8a0h","title":"Add compaction recovery protocol to role templates","description":"After context compaction (summarization), agents may be disoriented.\n\nAdd guidance to recognize and recover:\n- 'If you feel you've lost earlier context or are disoriented, run: gt prime'\n- 'This re-injects your role, current work, and pending messages'\n- 'It's safe to prime multiple times - it just outputs context'\n\nThis is the fallback path when self-check is missed and compaction happens.\nCompaction isn't catastrophic if priming is robust.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T01:46:21.959626-08:00","updated_at":"2025-12-23T14:27:07.466696-08:00"}
{"id":"gt-8bes","title":"Review: Witness patrol template changes (gt-h1n5)","description":"Polecat rictus implemented significant witness.md.tmpl changes: banners, wisp-based execution, handoff bead attachment, loop-or-exit, patrol summary. Review for correctness and consistency with deacon pattern.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T19:57:38.242943-08:00","updated_at":"2025-12-23T19:57:38.242943-08:00"}
{"id":"gt-8dv","title":"CLI: plugin commands (list, status)","description":"Add gt plugins \u003crig\u003e to list plugins and gt plugin status \u003cname\u003e to check plugin state. Simple directory scan of \u003crig\u003e/plugins/.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-15T22:53:02.694926-08:00","updated_at":"2025-12-15T23:17:06.594328-08:00","dependencies":[{"issue_id":"gt-8dv","depends_on_id":"gt-axz","type":"blocks","created_at":"2025-12-15T22:53:17.413809-08:00","created_by":"daemon"}]}
{"id":"gt-8f0zv","title":"Polecats should spawn with auto-accept mode enabled","description":"During swarm bd-784c, polecats (Toast, Nux) were spawned without --dangerously-skip-permissions or equivalent auto-accept mode.\n\n**Problem:**\nEvery edit, bash command, and tool use required manual confirmation via tmux send-keys. This defeats the purpose of autonomous polecat operation.\n\n**Expected:**\nPolecats in a swarm should run with permissions bypassed so they can work autonomously.\n\n**Suggestion:**\n- gt sling should pass --dangerously-skip-permissions by default for polecats\n- Or polecats should have a .claude/settings.local.json pre-configured for auto-accept","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-28T22:14:03.849695-08:00","created_by":"beads/crew/emma","updated_at":"2025-12-28T22:14:03.849695-08:00"}
{"id":"gt-8kr7v","title":"Digest: mol-deacon-patrol","description":"P12: stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:13:03.071841-08:00","updated_at":"2025-12-25T20:13:03.071841-08:00","closed_at":"2025-12-25T20:13:03.07179-08:00"}
{"id":"gt-8lz","title":"Comprehensive help text and examples","description":"Improve help text with examples and cross-references.\n\n## Improvements\n\n### 1. Examples Section\nAdd to Long description:\n```go\nvar spawnCmd = \u0026cobra.Command{\n Long: `Spawn a polecat with work assignment.\n\nExamples:\n gt spawn gastown/Toast --issue gt-abc\n gt spawn gastown --issue gt-def # auto-select polecat\n gt spawn gastown/Nux -m \"Fix the tests\" # free-form task`,\n}\n```\n\n### 2. Cross-References\nReference related commands:\n```\nSee also:\n gt polecat list List available polecats\n gt session attach Attach to spawned session\n```\n\n### 3. Flag Descriptions\nMore detail on flags:\n```go\ncmd.Flags().StringVar(\u0026issue, \"issue\", \"\", \n \"Beads issue ID to assign. The polecat will work on this issue.\")\n```\n\n### 4. Common Workflows\nAdd workflow docs to gt --help:\n```\nCommon Workflows:\n Start a swarm:\n gt swarm preflight\n gt swarm create gastown --epic gt-abc --worker Toast --worker Nux --start\n gt refinery start gastown\n \n Check status:\n gt status\n gt swarm status \u003cid\u003e\n```\n\n## Files to Update\nAll internal/cmd/*.go files\n\n## Acceptance Criteria\n- [ ] All commands have Examples\n- [ ] Related commands cross-referenced\n- [ ] Flags have detailed descriptions\n- [ ] Root help shows workflows","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-16T14:48:53.303016-08:00","updated_at":"2025-12-16T16:07:37.391195-08:00"}
{"id":"gt-8nmy","title":"Update Deacon template to emphasize staying in ~/gt/deacon directory","description":"The Deacon template should instruct the agent to stay in ~/gt/deacon/ as much as possible, and always return there after any excursion. This prevents issues with identity detection (mail, mol status) which depend on cwd.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T13:30:27.969826-08:00","updated_at":"2025-12-23T13:30:27.969826-08:00"}
{"id":"gt-8padi","title":"Digest: mol-deacon-patrol","description":"Patrol 13: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:09:04.639-08:00","updated_at":"2025-12-27T23:09:04.639-08:00","closed_at":"2025-12-27T23:09:04.638966-08:00"}
{"id":"gt-8pcb","title":"Plugin/molecule catalog integration design","description":"Two currently independent systems:\n1. Disk-based plugins (~~/gt/plugins/) - Deacon patrol extensions\n2. Molecule catalog (protos in beads) - bd pour/wisp/bond\n\nInvestigate integration points:\n- User-contributed molecules bonded to catalog\n- Dynamic molecule attachment during execution (e.g., 'attach security sniffer because we noticed condition X')\n- How plugins could contribute protos\n- How protos could trigger plugins\n\nNot blocking launch. Future design investigation.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-22T21:52:47.897048-08:00","updated_at":"2025-12-28T22:34:14.460561-08:00","closed_at":"2025-12-28T22:34:14.460561-08:00"}
{"id":"gt-8r7","title":"Enhance Mayor CLAUDE.md with GGT milestone tracking","description":"Update ~/ai/CLAUDE.md (Mayor startup context) with:\n\n1. GGT Self-Hosting Milestone section\n - Track progress toward gt replacing town\n - Key blockers: gt-h5n (merge queue), gt-974 (daemon)\n - What \"self-hosting\" means (GGT working on itself)\n\n2. Recent Architecture Decisions\n - Engineer = role, Refinery = place\n - Merge queue in Beads (not branch discovery)\n - Session restart protocol\n\n3. Transition Plan\n - Current: use town commands (PGT)\n - Target: use gt commands (GGT)\n - Switch criteria: gt-b1g closed\n\nKeep it concise - Mayor context should be quick to scan.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T23:12:07.260653-08:00","updated_at":"2025-12-16T23:12:07.260653-08:00","dependencies":[{"issue_id":"gt-8r7","depends_on_id":"gt-h5n","type":"blocks","created_at":"2025-12-16T23:12:15.124842-08:00","created_by":"daemon"}]}
{"id":"gt-8tmz.19.1","title":"Define meta-formula YAML schema","description":"Define the YAML schema for meta-formulas that generate multiple formulas.\n\n## Proposed Schema\n\n type: meta-formula\n name: multi-lang-shiny\n generates:\n for-each:\n var: lang\n values: [go, python, typescript]\n formula:\n name: \"shiny-{lang}\"\n extends: base-shiny\n vars:\n language: \"{lang}\"\n\n## Key Decisions\n\n- Use \"generates\" key to distinguish from regular formulas\n- for-each at generation level (not runtime)\n- Output is N formula files or in-memory formulas\n\n## Deliverables\n\n1. Add MetaFormula type to types.go\n2. Add ForEachGenerate struct\n3. Document schema in comments","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-25T17:17:11.835417-08:00","updated_at":"2025-12-28T22:34:14.17731-08:00","closed_at":"2025-12-28T22:34:14.17731-08:00","dependencies":[{"issue_id":"gt-8tmz.19.1","depends_on_id":"gt-8tmz.19","type":"parent-child","created_at":"2025-12-25T17:17:11.835933-08:00","created_by":"daemon"}]}
{"id":"gt-8tmz.19.2","title":"Implement meta-formula generator in parser","description":"Implement the generator that expands meta-formulas into concrete formulas.\n\n## Implementation\n\n1. Detect type: meta-formula in parser\n2. Evaluate for-each values\n3. For each value, instantiate the formula template\n4. Substitute {var} placeholders with current value\n5. Return list of generated Formula structs\n\n## API\n\n func (p *Parser) ExpandMetaFormula(mf *MetaFormula) ([]*Formula, error)\n\n## Edge Cases\n\n- Empty values list: return empty slice\n- Duplicate generated names: error\n- Nested meta-formulas: error (not supported initially)","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-25T17:17:22.927406-08:00","updated_at":"2025-12-28T22:34:14.160488-08:00","closed_at":"2025-12-28T22:34:14.160488-08:00","dependencies":[{"issue_id":"gt-8tmz.19.2","depends_on_id":"gt-8tmz.19","type":"parent-child","created_at":"2025-12-25T17:17:22.927946-08:00","created_by":"daemon"},{"issue_id":"gt-8tmz.19.2","depends_on_id":"gt-8tmz.19.1","type":"blocks","created_at":"2025-12-25T17:17:44.228494-08:00","created_by":"daemon"}]}
{"id":"gt-8tmz.19.3","title":"Add multi-lang-shiny example and tests","description":"Create example meta-formula and test suite.\n\n## Example\n\nCreate .beads/formulas/multi-lang-shiny.meta.yaml:\n- Generates shiny-go, shiny-python, shiny-typescript\n- Each extends base-shiny with language-specific vars\n\n## Tests\n\n1. Test basic expansion (3 languages -\u003e 3 formulas)\n2. Test variable substitution in names and content\n3. Test error on duplicate generated names\n4. Test empty values list\n5. Integration: cook a generated formula","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-25T17:17:34.225612-08:00","updated_at":"2025-12-28T22:34:14.143458-08:00","closed_at":"2025-12-28T22:34:14.143458-08:00","dependencies":[{"issue_id":"gt-8tmz.19.3","depends_on_id":"gt-8tmz.19","type":"parent-child","created_at":"2025-12-25T17:17:34.226093-08:00","created_by":"daemon"},{"issue_id":"gt-8tmz.19.3","depends_on_id":"gt-8tmz.19.2","type":"blocks","created_at":"2025-12-25T17:17:44.323794-08:00","created_by":"daemon"}]}
{"id":"gt-8tmz.20.1","title":"Design org formula hierarchy pattern","description":"Design how organizational formula hierarchies work.\n\n## Pattern\n\n company-base.formula.yaml (org-wide policies)\n └── team-frontend.formula.yaml (extends company-base)\n └── project-dashboard.formula.yaml (extends team-frontend)\n\n## Key Questions\n\n1. How are org formulas discovered? (search path? explicit import?)\n2. How do aspects merge across levels?\n3. Can child override parent aspects?\n4. How to handle aspect conflicts?\n\n## Proposed Design\n\n- Formulas use extends: just like today\n- Aspect lists merge (child appends to parent)\n- Child can exclude parent aspects via \"exclude-aspects: [name]\"\n- Search path: local -\u003e rig -\u003e org (configurable)\n\n## Deliverables\n\n1. Document pattern in docs/formula-inheritance.md\n2. Define conflict resolution rules\n3. Identify implementation tasks","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-25T17:17:57.888973-08:00","updated_at":"2025-12-28T22:34:14.125846-08:00","closed_at":"2025-12-28T22:34:14.125846-08:00","dependencies":[{"issue_id":"gt-8tmz.20.1","depends_on_id":"gt-8tmz.20","type":"parent-child","created_at":"2025-12-25T17:17:57.889494-08:00","created_by":"daemon"}]}
{"id":"gt-8tmz.20.2","title":"Implement aspect merging across formula chain","description":"Implement merging of aspects when formulas extend each other.\n\n## Current State\n\nextends: already works for steps and vars.\nAspects need similar merge behavior.\n\n## Implementation\n\n1. In Resolve(), collect aspects from entire extends chain\n2. Merge lists: parent aspects first, then child\n3. Support exclude-aspects field to remove inherited aspects\n4. Dedupe by aspect name (child wins on conflict)\n\n## Files\n\n- internal/formula/parser.go: Resolve()\n- internal/formula/types.go: add ExcludeAspects field\n\n## Tests\n\n1. Child inherits parent aspects\n2. Child adds additional aspects\n3. Child excludes parent aspect\n4. Three-level chain merges correctly","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-25T17:18:09.693911-08:00","updated_at":"2025-12-28T22:34:14.107027-08:00","closed_at":"2025-12-28T22:34:14.107027-08:00","dependencies":[{"issue_id":"gt-8tmz.20.2","depends_on_id":"gt-8tmz.20","type":"parent-child","created_at":"2025-12-25T17:18:09.694463-08:00","created_by":"daemon"},{"issue_id":"gt-8tmz.20.2","depends_on_id":"gt-8tmz.20.1","type":"blocks","created_at":"2025-12-25T17:18:28.899867-08:00","created_by":"daemon"}]}
{"id":"gt-8tmz.20.3","title":"Add org formula examples and tests","description":"Create example organizational formula hierarchy and tests.\n\n## Examples\n\nCreate in .beads/formulas/:\n- acme-base.formula.yaml: Company-wide (security-audit aspect)\n- acme-frontend.formula.yaml: extends acme-base, adds accessibility-audit\n- acme-backend.formula.yaml: extends acme-base, adds sql-injection-scan\n\n## Tests\n\n1. Three-level inheritance resolves correctly\n2. Aspect merge order is correct\n3. exclude-aspects removes parent aspect\n4. Cooking org formula produces expected steps\n5. Error on missing parent formula","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-25T17:18:20.885418-08:00","updated_at":"2025-12-28T22:34:14.087711-08:00","closed_at":"2025-12-28T22:34:14.087711-08:00","dependencies":[{"issue_id":"gt-8tmz.20.3","depends_on_id":"gt-8tmz.20","type":"parent-child","created_at":"2025-12-25T17:18:20.885943-08:00","created_by":"daemon"},{"issue_id":"gt-8tmz.20.3","depends_on_id":"gt-8tmz.20.2","type":"blocks","created_at":"2025-12-25T17:18:28.993465-08:00","created_by":"daemon"}]}
{"id":"gt-8tmz.28","title":"Formula error handling and recovery","description":"Specify how cooking errors are reported and recovered:\n- What happens when extends chain is broken (missing formula)?\n- What happens when aspect pointcut matches nothing?\n- What happens when expansion produces invalid structure?\n- Graceful degradation vs fail-fast semantics\n- Error metadata in cooked protos\n\nDeferred: post-launch polish","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-23T20:06:28.452872-08:00","updated_at":"2025-12-28T22:33:35.36198-08:00","closed_at":"2025-12-28T22:33:35.36198-08:00","dependencies":[{"issue_id":"gt-8tmz.28","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-23T20:06:28.453346-08:00","created_by":"daemon"}]}
{"id":"gt-8tmz.29","title":"Formula versioning and migration strategy","description":"Define how formula versions are managed:\n- What does the version field mean? Semver? Integer?\n- When a formula changes, what happens to existing protos?\n- Do protos track their source formula version?\n- Migration path: old proto + new formula = ?\n- Backwards compatibility guarantees (if any)\n\nDeferred: post-launch polish","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-23T20:06:45.764277-08:00","updated_at":"2025-12-28T22:33:35.339955-08:00","closed_at":"2025-12-28T22:33:35.339955-08:00","dependencies":[{"issue_id":"gt-8tmz.29","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-23T20:06:45.764686-08:00","created_by":"daemon"}]}
{"id":"gt-8tmz.30","title":"Proto debugging and inspection tools","description":"Proto debugging and inspection tools.\n\nWith ephemeral protos (gt-4v1eo), this becomes:\n- `bd cook \u003cformula\u003e --dry-run` - preview cooked output without persisting\n- `bd cook \u003cformula\u003e --json` - output proto as JSON for inspection\n- `bd cook \u003cformula\u003e --graph` - visualize step DAG\n\nNo persistent proto beads to inspect - formulas are the source of truth.","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-23T20:06:46.58776-08:00","updated_at":"2025-12-28T22:33:35.319337-08:00","closed_at":"2025-12-28T22:33:35.319337-08:00","dependencies":[{"issue_id":"gt-8tmz.30","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-23T20:06:46.58989-08:00","created_by":"daemon"}]}
{"id":"gt-8tmz.31","title":"Formula validation specification","description":"Complete validation rules for formulas:\n- Required vs optional fields\n- Valid step ID patterns\n- Valid pointcut glob syntax\n- Variable reference validation\n- Compose rule ordering constraints\n- Type-specific validation (workflow vs expansion vs aspect)\n\nDeferred: post-launch polish","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-23T20:06:47.618799-08:00","updated_at":"2025-12-28T22:33:35.297315-08:00","closed_at":"2025-12-28T22:33:35.297315-08:00","dependencies":[{"issue_id":"gt-8tmz.31","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-23T20:06:47.620975-08:00","created_by":"daemon"}]}
{"id":"gt-8tmz.37","title":"Support nested expansion formulas","status":"closed","priority":4,"issue_type":"feature","created_at":"2025-12-25T11:50:48.751806-08:00","updated_at":"2025-12-28T22:33:35.274023-08:00","closed_at":"2025-12-28T22:33:35.274023-08:00","dependencies":[{"issue_id":"gt-8tmz.37","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-25T11:50:48.75222-08:00","created_by":"daemon"}]}
{"id":"gt-8wf","title":"Polecat prompting: gt mq submit on completion","description":"Update Polecat CLAUDE.md prompting to:\n\n1. On task completion, run: gt mq submit --issue \u003cid\u003e\n2. This creates a merge-request bead in the queue\n3. Engineer will process it\n\nThe Polecat self-reports completion to the merge queue.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T23:02:39.914724-08:00","updated_at":"2025-12-16T23:02:39.914724-08:00","dependencies":[{"issue_id":"gt-8wf","depends_on_id":"gt-h5n","type":"blocks","created_at":"2025-12-16T23:02:55.930679-08:00","created_by":"daemon"},{"issue_id":"gt-8wf","depends_on_id":"gt-svi","type":"blocks","created_at":"2025-12-16T23:03:12.950782-08:00","created_by":"daemon"}]}
{"id":"gt-8ws7o","title":"Schematic: Domain-Level Formula Composition","description":"A Schematic is a coordinated set of formulas defining an entire workflow domain.\n\n## Concept\n\nLike an orchestra score to instrument parts - says how formulas fit together.\n\n```toml\n# shiny-engineering.schematic\n[schematic]\nname = \"The Shiny Way\"\ndescription = \"Full engineering workflow from issue to production\"\n\n[formulas]\nplanning = \"@gastown/shiny\"\ndevelopment = \"@gastown/polecat-work\" \nreview = \"@gastown/review\"\nrelease = \"@gastown/release\"\n\n[flow]\ndefault = \"planning \u003e\u003e development \u003e\u003e review \u003e\u003e release\"\n\n[constraints]\nall_code_reviewed = true\ntests_before_deploy = true\n```\n\n## Relationship to Other Concepts\n\n- **Schematic** (workflow dimension) = composition of Formulas\n- **Campaign** (work dimension) = composition of Epics\n- Schematic compiles to Campaign, like Formula compiles to Molecule\n\n## Use Cases\n\n1. Define \"The Shiny Way\" for a team/org\n2. Encode compliance requirements\n3. Standardize workflows across projects\n4. Enable workflow reuse and sharing\n\n## Open Questions\n\n1. File format - TOML? YAML? Extend formula syntax?\n2. Validation - how to verify schematic consistency?\n3. Overrides - can project override org schematic?\n\n## Related\n\n- docs/formula_evolution.md\n- gt-8tmz - molecule algebra\n","status":"closed","priority":4,"issue_type":"epic","created_at":"2025-12-26T01:00:52.546808-08:00","updated_at":"2025-12-28T22:33:22.305791-08:00","closed_at":"2025-12-28T22:33:22.305791-08:00"}
{"id":"gt-8xeue","title":"Digest: mol-deacon-patrol","description":"Patrol 6: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:46:28.418527-08:00","updated_at":"2025-12-25T10:46:28.418527-08:00","closed_at":"2025-12-25T10:46:28.418492-08:00"}
{"id":"gt-8ynws","title":"Witness Patrol","description":"Per-rig worker monitor patrol loop with progressive nudging.","status":"open","priority":2,"issue_type":"molecule","created_at":"2025-12-29T14:37:58.362092-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:37:58.362092-08:00"}
{"id":"gt-92e9y","title":"Digest: mol-deacon-patrol","description":"Patrol 13: Quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T19:18:13.019576-08:00","updated_at":"2025-12-25T19:18:13.019576-08:00","closed_at":"2025-12-25T19:18:13.019527-08:00"}
{"id":"gt-95j13","title":"Add tmux hotkey (C-b f) for gt feed window","description":"## Goal\n\nAdd a tmux hotkey (e.g., C-b f) that jumps to the activity feed window, creating it if it doesn't exist.\n\n## Behavior\n\n1. If 'feed' window exists in current session → switch to it\n2. If 'feed' window doesn't exist → create it with `bd activity --follow`, then switch\n\n## Implementation\n\nAdd to gt's tmux session configuration (similar to SetCrewCycleBindings):\n\n```go\n// C-b f → jump to feed window\ntmux bind-key -T prefix f run-shell \"gt feed --window\"\n```\n\nThe `gt feed --window` command already handles:\n- Creating the window if missing\n- Switching to it if exists\n- Running `bd activity --follow` in the window\n\n## Where to add\n\n- `internal/tmux/tmux.go` - add SetFeedBinding() method\n- Call it from session configuration (ConfigureGasTownSession or similar)\n\n## Testing\n\n1. In tmux: C-b f should open/switch to feed window\n2. Feed window should show streaming activity\n3. C-b n/p should still work to cycle back to other windows\n","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-28T10:17:20.828835-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T10:27:50.604022-08:00","closed_at":"2025-12-28T10:27:50.604022-08:00"}
{"id":"gt-974a8","title":"Digest: mol-deacon-patrol","description":"Patrol 12: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:48:43.293249-08:00","updated_at":"2025-12-25T10:48:43.293249-08:00","closed_at":"2025-12-25T10:48:43.293216-08:00"}
{"id":"gt-974qx","title":"Digest: mol-deacon-patrol","description":"Routine patrol, town stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:25:04.783416-08:00","updated_at":"2025-12-28T19:25:04.783416-08:00","closed_at":"2025-12-28T19:25:04.783379-08:00"}
{"id":"gt-976","title":"Add crew lifecycle support to Deacon","description":"Currently crew sessions (like gastown/crew/max, beads/crew/dave) are marked as 'human-managed' and excluded from automated lifecycle.\n\n## Current State\n- `getManager(RoleCrew)` returns `\"human\"` (handoff.go:273)\n- `gt handoff` for crew just prints a message, no lifecycle request sent\n- Crew cannot request automated refresh from Deacon\n\n## Desired State\nCrew members should be able to request lifecycle actions from Deacon:\n- `gt handoff --cycle` sends request to Deacon, which kills/restarts the crew session\n- Useful when: context full, running molecules that need fresh session, automation\n\n## Implementation\n1. Change `getManager(RoleCrew)` to return `\"deacon/\"` (or new crew manager)\n2. Teach Deacon to recognize crew session naming pattern\n3. Add crew to Deacon's respawn loop handling\n4. Test with `gt nudge` for reliable message delivery\n\n## Use Case\nRunning a molecule (e.g., version-bump) and discovering mid-workflow that a fresh session is needed. Agent should be able to request refresh automatically rather than requiring human intervention.\n\n## Related\n- gt nudge: reliable message delivery to Claude sessions\n- bd mol bond: molecule instantiation (coming in beads)","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-20T17:19:46.854829-08:00","updated_at":"2025-12-20T17:19:46.854829-08:00"}
{"id":"gt-9ar8x","title":"Polecat identity confusion leads to direct main commits","description":"When polecats spawn without proper identity (due to gt-si6am and gt-y41ep):\n1. They think they're mayor\n2. They may commit from wrong directory (mayor/rig instead of polecats/\u003cname\u003e)\n3. Work goes directly to main, bypassing merge queue\n\nObserved: slit pushed 'gt polecat recycle' directly to main instead of its branch\n\nRoot cause: \n- gt-si6am: Wrong CLAUDE.md template (says 'Mayor Rig Context')\n- gt-y41ep: Env vars not exported (falls back to mayor detection)\n\nImpact: CRITICAL - merge queue entirely bypassed, no refinery review","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-12-28T14:18:37.061075-08:00","created_by":"mayor","updated_at":"2025-12-28T15:34:17.811462-08:00","closed_at":"2025-12-28T15:34:17.811462-08:00","dependencies":[{"issue_id":"gt-9ar8x","depends_on_id":"gt-si6am","type":"blocks","created_at":"2025-12-28T14:18:44.032422-08:00","created_by":"daemon"},{"issue_id":"gt-9ar8x","depends_on_id":"gt-y41ep","type":"blocks","created_at":"2025-12-28T14:18:44.060806-08:00","created_by":"daemon"}]}
{"id":"gt-9hwkn","title":"Messaging infrastructure: lists, queues, channels","description":"Multi-recipient and broadcast messaging for Gas Town.\n\n## Phases\n\n**Phase 1 - Foundation**: Config directory (gt-i6jvc)\n**Phase 1 - Core**: list:, queue:, @group (requires agent-as-bead for @group)\n**Phase 2 - Channels**: announce:, #channel, gt channel publish\n\n## Addressing Syntax\n\n| Prefix | Resolution | Storage | Claim? |\n|--------|------------|---------|--------|\n| `@group` | Dynamic (bead queries) | Fan-out (N copies) | No |\n| `list:name` | Static config | Fan-out (N copies) | No |\n| `queue:name` | Static config | Shared (1 copy) | Yes |\n| `announce:name` | Static config | Shared (1 copy) | No |\n| `#channel` | Dynamic (tmux) | None (ephemeral) | No |\n\n## Alignment with Agent-as-Bead\n\n@group resolution now uses agent bead queries:\n- @rig/gastown → bd list --type=agent --rig=gastown\n- @witnesses → bd list --type=agent --role_type=witness\n\nThis replaces the originally planned filesystem scanner (gt-xo05b, now closed).\n\n## Independent Work\n\nConfig-based features (list:, queue:, announce:) can proceed without agent identity.\nOnly @group requires the agent schema from Pillar 1.","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-26T14:51:18.855183-08:00","updated_at":"2025-12-27T22:17:21.485287-08:00"}
{"id":"gt-9j9","title":"CLI: worker status reporting commands","description":"Worker status reporting CLI for polecats to report progress.\n\n## Commands\n\n### gt worker started\n```\ngt worker started \u003cissue-id\u003e [-m MESSAGE]\n```\nReports work started on issue.\n\n### gt worker progress\n```\ngt worker progress \u003cissue-id\u003e \u003c0-100\u003e [-m MESSAGE]\n```\nReports percentage complete.\n\n### gt worker blocked\n```\ngt worker blocked \u003cissue-id\u003e \u003creason\u003e [-m MESSAGE]\n```\nReports blocked status with reason.\n\n### gt worker completed\n```\ngt worker completed \u003cissue-id\u003e [-m MESSAGE]\n```\nReports task completion.\n\n### gt worker failed\n```\ngt worker failed \u003cissue-id\u003e \u003creason\u003e [-m MESSAGE]\n```\nReports task failure.\n\n## Implementation\nEach command sends mail to refinery with structured content:\n```go\ntype WorkerStatusReport struct {\n IssueID string\n Status string // started|progress|blocked|completed|failed\n Progress int // 0-100 for progress\n Reason string // for blocked/failed\n Message string // optional detail\n ReportedAt time.Time\n}\n```\n\n## Message Format\nSubject: \"[STATUS] \u003cissue-id\u003e: \u003cstatus\u003e\"\nBody: JSON-encoded WorkerStatusReport\n\n## Default Recipient\n```go\n// Determine from context\nfunc getDefaultRecipient() string {\n rig := os.Getenv(\"GT_RIG\")\n if rig != \"\" {\n return rig + \"/refinery\"\n }\n return \"refinery/\"\n}\n```\n\n## New File\ninternal/cmd/worker.go\n\n## PGT Reference\ngastown-py/src/gastown/cli/worker_cmd.py\n\n## Acceptance Criteria\n- [ ] All 5 commands implemented\n- [ ] Status sent as mail to refinery\n- [ ] Structured JSON body for parsing\n- [ ] Works from polecat session context","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T14:47:52.795695-08:00","updated_at":"2025-12-16T16:05:26.715967-08:00"}
{"id":"gt-9je6q","title":"Digest: mol-deacon-patrol","description":"Patrol 2: all healthy, no incidents","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T19:54:07.977275-08:00","updated_at":"2025-12-25T19:54:07.977275-08:00","closed_at":"2025-12-25T19:54:07.977222-08:00"}
{"id":"gt-9kj0z","title":"Digest: mol-deacon-patrol","description":"Patrol 2: all clear, systems healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:12:43.355741-08:00","updated_at":"2025-12-28T08:12:43.355741-08:00","closed_at":"2025-12-28T08:12:43.355697-08:00"}
{"id":"gt-9kp3t","title":"Day 1.4b: Create Deacon agent bead","description":"Create gt-deacon agent bead for the Deacon (daemon beacon).\n\nThe Deacon is a separate Claude Code agent from Mayor:\n- Receives the ONLY mechanical daemon heartbeats in the system\n- Runs town plugins, cleanup, and monitoring\n- Has own top-level directory: ~/gt/deacon/\n- No rig preassignment (town-level, like Mayor)\n- role_type: deacon\n\nAgent bead structure:\n```yaml\nid: gt-deacon\ntype: agent\nentity_platform: gastown\nentity_org: steveyegge\nentity_id: deacon\nhook_bead: null # or current patrol wisp\nrole_bead: gt-deacon-role\nstate: idle\nrole_type: deacon\n```\n\nMust be created alongside mayor, witness, refinery agent beads.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T22:01:41.413071-08:00","created_by":"mayor","updated_at":"2025-12-28T00:46:43.04993-08:00","closed_at":"2025-12-28T00:46:43.04993-08:00","dependencies":[{"issue_id":"gt-9kp3t","depends_on_id":"gt-v2gkv","type":"blocks","created_at":"2025-12-27T22:02:45.047853-08:00","created_by":"daemon"},{"issue_id":"gt-9kp3t","depends_on_id":"gt-d0jqp","type":"parent-child","created_at":"2025-12-27T23:28:03.415489-08:00","created_by":"daemon"}]}
{"id":"gt-9m9g","title":"Refinery startup: Use Claude agent instead of foreground mode","description":"WIP found in stash: Refactor refinery startup to spawn Claude as the refinery agent rather than using gt refinery start --foreground.\n\nChanges needed:\n- Use refineryDir (refinery/rig) as working directory\n- Start Claude with --dangerously-skip-permissions \n- Wait for shell ready, then Claude ready\n- Send gt prime, then refinery startup prompt\n- Remove foreground mode complexity\n\nRelated: gt-n7z7 (refinery --foreground race condition bug)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-20T13:35:04.300493-08:00","updated_at":"2025-12-20T13:35:04.300493-08:00"}
{"id":"gt-9mzd","title":"Refinery not processing merge-requests - stale MRs accumulating","description":"Discovered 15 stale merge-request issues in beads rig that were never processed by the refinery. These appear to be from polecat branches that completed work but the refinery didn't pick up the merge-requests.\n\nClosed issues:\n- bd-r06v, bd-bhg7, bd-754r, bd-fcl1, bd-3zzh\n- bd-bijf, bd-5rj1, bd-kptp, bd-rdzk, bd-ibl9\n- bd-gfo3, bd-aq3s, bd-x2bd, bd-s1pz, bd-h27p\n\nNeed to investigate:\n1. Why refinery isn't picking up merge-requests\n2. Whether the polecat branches have valid work to merge\n3. Add monitoring/alerting for stale MRs","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-23T19:12:08.629863-08:00","updated_at":"2025-12-23T19:12:08.629863-08:00"}
{"id":"gt-9n6i3","title":"Digest: mol-deacon-patrol","description":"Patrol 19: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:11:18.273683-08:00","updated_at":"2025-12-28T03:11:18.273683-08:00","closed_at":"2025-12-28T03:11:18.273651-08:00"}
{"id":"gt-9o9s","title":"gt mail inbox shows wrong identity when run from deacon directory","description":"When running 'gt mail inbox' from ~/gt/deacon/, it shows 'Inbox: mayor/' instead of 'Inbox: deacon/'. The role detection works (deacon checks in correctly), but mail identity detection is broken.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-23T13:29:11.801311-08:00","updated_at":"2025-12-28T22:37:43.633524-08:00","closed_at":"2025-12-28T22:37:43.633524-08:00"}
{"id":"gt-9rmm","title":"Merge: gt-a95","description":"branch: polecat/Ace\ntarget: main\nsource_issue: gt-a95\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-19T14:53:53.973816-08:00","updated_at":"2025-12-19T19:13:27.736445-08:00","closed_at":"2025-12-19T17:48:09.608699-08:00"}
{"id":"gt-9uxr","title":"Critical packages lack test coverage","description":"Several packages have no test files:\n- internal/lock/ - Core identity locking (212 lines UNTESTED)\n- internal/witness/ - Worker monitoring\n- internal/mrqueue/ - MR queue management\n- internal/claude/ - Claude integration\n- internal/style/ - Terminal styling\n- internal/constants/ - Constants\n\nPriority for testing:\n1. lock/ - prevents duplicate agents, critical for correctness\n2. witness/ - agent lifecycle management\n3. mrqueue/ - merge request processing\n\nOverall: 37 test files for 160 Go files (23% by file count)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T12:51:01.154427-08:00","updated_at":"2025-12-24T12:51:01.154427-08:00","dependencies":[{"issue_id":"gt-9uxr","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T12:52:07.558885-08:00","created_by":"daemon"}]}
{"id":"gt-9v52","title":"gt sling reports hook occupied but bd hook shows empty","description":"gt sling thinks a hook is occupied when bd hook shows it empty. Example: bd hook --agent beads/crew/dave shows (empty), but gt sling bd-hobo beads/crew/dave says 'hook already occupied by bd-ul59'. They should use the same source of truth (beads database pinned field).","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-24T20:01:42.105132-08:00","updated_at":"2025-12-24T20:01:42.105132-08:00"}
{"id":"gt-9wv0","title":"gt spawn should verify daemon is running for polecat triggering","description":"gt spawn notifies the Deacon (via mail) that a polecat was started, expecting the Deacon to trigger it once Claude is ready. But if the daemon isn't running, the mail sits unread and the polecat never gets triggered.\n\n## Current Behavior\n1. gt spawn starts polecat session\n2. gt spawn sends POLECAT_STARTED to deacon/\n3. (assumes daemon will trigger polecat)\n\n## Problem\nIf gt daemon isn't running, step 3 never happens and polecat sits at prompt.\n\n## Solution\nIn gt spawn, after session start:\n1. Check if daemon is running (gt daemon status)\n2. If not running, either:\n a. Start daemon: gt daemon start\n b. Or warn user: 'Daemon not running, polecat may not auto-start'\n\n## Alternative\nThe user can manually trigger with gt nudge, but automated flow should work.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T01:03:03.71521-08:00","updated_at":"2025-12-23T01:03:03.71521-08:00","dependencies":[{"issue_id":"gt-9wv0","depends_on_id":"gt-bjft","type":"blocks","created_at":"2025-12-23T01:03:12.187224-08:00","created_by":"daemon"}]}
{"id":"gt-9zp8t","title":"Digest: mol-deacon-patrol","description":"Patrol 15: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T16:28:55.536366-08:00","updated_at":"2025-12-25T16:28:55.536366-08:00","closed_at":"2025-12-25T16:28:55.536331-08:00"}
{"id":"gt-a3m1m","title":"Digest: mol-deacon-patrol","description":"Patrol 11: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:33:11.534637-08:00","updated_at":"2025-12-28T01:33:11.534637-08:00","closed_at":"2025-12-28T01:33:11.534601-08:00"}
{"id":"gt-a4la6","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 1: All healthy - witnesses, refineries running. No callbacks, no orphans, no pending spawns.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:16:17.348433-08:00","updated_at":"2025-12-28T11:16:17.348433-08:00","closed_at":"2025-12-28T11:16:17.348399-08:00"}
{"id":"gt-a9y","title":"File locking for concurrent access","description":"Add file locking for concurrent access safety.\n\n## At-Risk Files\n- .gastown/swarms.json (or per-swarm state.json)\n- .gastown/refinery.json\n- polecats/\u003cname\u003e/state.json\n- inbox.jsonl files\n\n## Go File Locking\nUse syscall.Flock for advisory locking:\n```go\ntype FileLock struct {\n file *os.File\n}\n\nfunc AcquireLock(path string, timeout time.Duration) (*FileLock, error) {\n f, err := os.OpenFile(path+\".lock\", os.O_CREATE|os.O_RDWR, 0644)\n if err != nil {\n return nil, err\n }\n // Use syscall.Flock with timeout\n}\n\nfunc (l *FileLock) Release() error\n```\n\n## Integration Pattern\n```go\nfunc (m *Manager) saveState(ref *Refinery) error {\n lock, err := AcquireLock(m.stateFile(), 5*time.Second)\n if err != nil {\n return fmt.Errorf(\"could not acquire lock: %w\", err)\n }\n defer lock.Release()\n \n // Read-modify-write cycle\n}\n```\n\n## New Package\ninternal/filelock/\n├── lock.go # FileLock, AcquireLock\n└── lock_test.go\n\n## Apply To\n- internal/refinery/manager.go: loadState/saveState\n- internal/cmd/swarm.go: SwarmStore\n- internal/mail/mailbox.go: Append, rewrite\n- internal/polecat/manager.go: state operations\n\n## Timeout Handling\nDefault 5 second timeout. Return error if lock not acquired.\n\n## Acceptance Criteria\n- [ ] Lock files created (.lock extension)\n- [ ] Timeout on lock contention\n- [ ] All state files protected\n- [ ] Locks released on error paths","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T14:48:15.641938-08:00","updated_at":"2025-12-16T16:06:32.441426-08:00"}
{"id":"gt-aatkf","title":"Digest: mol-deacon-patrol","description":"Patrol 15: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:09:32.135786-08:00","updated_at":"2025-12-28T03:09:32.135786-08:00","closed_at":"2025-12-28T03:09:32.135752-08:00"}
{"id":"gt-aer7q","title":"Day 2.7: Bootstrap creates agent beads","description":"Bootstrap commands must create agent beads for ZFC compliance.\n\n## Problem\n- `gt install` doesn't create Deacon/Mayor agent beads\n- `gt rig add` doesn't create Witness/Refinery agent beads\n- `gt doctor` doesn't verify agent beads exist\n- Current beads were created manually (not reproducible)\n\n## Impact\nPatrol ignition (gt-qpoxz) depends on agent beads existing.\nWithout bootstrap creating them, fresh installs will fail.\n\n## Required\n1. gt install: Create gt-deacon and gt-mayor beads\n2. gt rig add: Create gt-witness-\u003crig\u003e and gt-refinery-\u003crig\u003e beads\n3. gt doctor: Add agent-beads-exist check\n4. gt doctor --fix: Create missing agent beads","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-28T02:16:50.951423-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T02:40:06.743526-08:00","closed_at":"2025-12-28T02:40:06.743526-08:00"}
{"id":"gt-agtwd","title":"gt mail inbox: identity auto-detection fails for refinery","description":"When running from ~/gt/gastown/refinery or ~/gt/gastown/refinery/rig, 'gt mail inbox' detects identity as 'mayor/' instead of 'gastown/refinery'.\n\nWorkaround: Use --identity flag explicitly:\n gt mail inbox --identity gastown/refinery\n\nThis breaks the refinery patrol because it can't see its MERGE_READY messages.\n\nExpected: Running from gastown/refinery should auto-detect identity as gastown/refinery.\n\nRelated: The refinery has 9 unread MERGE_READY messages that aren't being processed because of this bug.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-28T22:26:17.937287-08:00","created_by":"mayor","updated_at":"2025-12-29T12:44:29.053397-08:00","closed_at":"2025-12-29T12:44:29.053397-08:00","close_reason":"Added refinery/witness detection to detectSender()"}
{"id":"gt-aijvt","title":"Digest: mol-deacon-patrol","description":"Patrol 20: all clear - handoff threshold reached","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:21:30.115081-08:00","updated_at":"2025-12-28T08:21:30.115081-08:00","closed_at":"2025-12-28T08:21:30.11505-08:00"}
{"id":"gt-akc4m","title":"MessagingConfig: Add missing test cases","description":"Missing test coverage:\n1. Version \u003e CurrentMessagingVersion rejection\n2. Malformed JSON handling","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T15:29:09.827958-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T15:31:31.450393-08:00","closed_at":"2025-12-28T15:31:31.450393-08:00"}
{"id":"gt-akfh8","title":"Digest: mol-deacon-patrol","description":"Patrol 8: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T15:53:54.654721-08:00","updated_at":"2025-12-25T15:53:54.654721-08:00","closed_at":"2025-12-25T15:53:54.654692-08:00"}
{"id":"gt-arjlu","title":"gt sling: nudge witness+refinery when dispatching to polecat","description":"When gt sling dispatches work to a polecat, wake the rig's witness and refinery.\n\n## Boot+Nudge Pattern\n\n```go\n// After successful polecat dispatch\nfunc wakeRigAgents(rig string) {\n // Level 2: Start if asleep\n exec.Command(\"gt\", \"rig\", \"boot\", rig).Run()\n \n // Level 1: Clear backoff if running\n t := tmux.NewTmux()\n t.NudgeSession(fmt.Sprintf(\"gt-%s-witness\", rig), \"wake\")\n t.NudgeSession(fmt.Sprintf(\"gt-%s-refinery\", rig), \"wake\")\n}\n```\n\n## Graceful Behavior\n\n- `gt rig boot` is idempotent (no-op if already running)\n- Nudge failures are silent (session might not exist yet)\n- Agents discover what happened by checking reality\n\n## Reference\n\nSee ~/gt/docs/patrol-system-design.md (Two-Level Wake section)","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-28T22:14:38.155099-08:00","created_by":"mayor","updated_at":"2025-12-29T12:49:34.87614-08:00","closed_at":"2025-12-29T12:49:34.87614-08:00","close_reason":"Implemented in sling.go","dependencies":[{"issue_id":"gt-arjlu","depends_on_id":"gt-l6ro3","type":"parent-child","created_at":"2025-12-28T22:31:11.241348-08:00","created_by":"daemon"}]}
{"id":"gt-ascl0","title":"Digest: mol-deacon-patrol","description":"Patrol 13: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T18:43:57.148196-08:00","updated_at":"2025-12-26T18:43:57.148196-08:00","closed_at":"2025-12-26T18:43:57.148156-08:00"}
{"id":"gt-atqr8","title":"Create session name helper functions in internal/session","description":"attached_args: Session name helper functions\n\nCreate helper functions for consistent session name construction.\n\n## Files to modify\n- internal/session/names.go (NEW)\n\n## Implementation\nCreate new file with these functions:\n```go\npackage session\n\nimport \"fmt\"\n\nconst Prefix = \"gt-\"\n\nfunc MayorSessionName() string { return Prefix + \"mayor\" }\nfunc DeaconSessionName() string { return Prefix + \"deacon\" }\nfunc WitnessSessionName(rig string) string { return fmt.Sprintf(\"%s%s-witness\", Prefix, rig) }\nfunc RefinerySessionName(rig string) string { return fmt.Sprintf(\"%s%s-refinery\", Prefix, rig) }\nfunc CrewSessionName(rig, name string) string { return fmt.Sprintf(\"%s%s-crew-%s\", Prefix, rig, name) }\nfunc PolecatSessionName(rig, name string) string { return fmt.Sprintf(\"%s%s-%s\", Prefix, rig, name) }\n```\n\n## Acceptance criteria\n- [ ] New file internal/session/names.go created\n- [ ] All 6 helper functions implemented\n- [ ] Unit tests in internal/session/names_test.go\n- [ ] go build ./... passes\n- [ ] go test ./internal/session/... passes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:49:08.856968-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T16:12:31.8143-08:00","closed_at":"2025-12-28T16:12:31.8143-08:00"}
{"id":"gt-awu07","title":"Day 1.4: Create agent beads for core roles","description":"Create agent beads with deterministic IDs:\n- gt-mayor (Mayor coordinator)\n- gt-witness (per-rig polecat monitor)\n- gt-refinery (per-rig merge processor)\n\nEach with role_type, rig, and initial state.\n\nParent: gt-d0jqp","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:11.427106-08:00","created_by":"mayor","updated_at":"2025-12-28T00:08:24.338212-08:00","closed_at":"2025-12-28T00:08:24.338212-08:00","dependencies":[{"issue_id":"gt-awu07","depends_on_id":"gt-ikyo1","type":"blocks","created_at":"2025-12-27T20:58:49.122365-08:00","created_by":"daemon"},{"issue_id":"gt-awu07","depends_on_id":"gt-v2gkv","type":"blocks","created_at":"2025-12-27T20:58:50.202777-08:00","created_by":"daemon"},{"issue_id":"gt-awu07","depends_on_id":"gt-d0jqp","type":"parent-child","created_at":"2025-12-27T20:59:02.69769-08:00","created_by":"daemon"}]}
{"id":"gt-bblyh","title":"Digest: mol-deacon-patrol","description":"Patrol 2: all healthy, no events","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T06:07:14.085326-08:00","updated_at":"2025-12-28T06:07:14.085326-08:00","closed_at":"2025-12-28T06:07:14.085291-08:00"}
{"id":"gt-be0as","title":"Add charmbracelet TUI dependencies (bubbletea, bubbles)","description":"Add charmbracelet TUI framework dependencies.\n\n## Dependencies to add\n```\ngo get github.com/charmbracelet/bubbletea\ngo get github.com/charmbracelet/bubbles\n```\n\n## Already have\n- github.com/charmbracelet/lipgloss (styling)\n\n## Verify\n- go mod tidy\n- go build ./...\n\nQuick task, just adding deps.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T16:13:14.574696-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T16:18:12.74954-08:00","closed_at":"2025-12-28T16:18:12.74954-08:00"}
{"id":"gt-bfd4q","title":"Digest: mol-deacon-patrol","description":"Patrol 7: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T11:05:00.862619-08:00","updated_at":"2025-12-25T11:05:00.862619-08:00","closed_at":"2025-12-25T11:05:00.862585-08:00"}
{"id":"gt-bfgt3","title":"Digest: mol-deacon-patrol","description":"Patrol complete: routine, town stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:20:54.101654-08:00","updated_at":"2025-12-28T19:20:54.101654-08:00","closed_at":"2025-12-28T19:20:54.101623-08:00"}
{"id":"gt-bho9","title":"stderr suppression hides critical errors","description":"Multiple files set cmd.Stderr = nil:\n- prime.go\n- up.go\n- orphans.go\n- daemon.go\n\nThis hides git errors and command failures.\n\nShould capture stderr for debugging and log when errors occur,\nrather than suppressing entirely.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T12:51:41.108782-08:00","updated_at":"2025-12-24T12:51:41.108782-08:00","dependencies":[{"issue_id":"gt-bho9","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T12:52:07.908317-08:00","created_by":"daemon"}]}
{"id":"gt-bj5hl","title":"Digest: mol-deacon-patrol","description":"Patrol 8: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:16:08.324143-08:00","updated_at":"2025-12-28T08:16:08.324143-08:00","closed_at":"2025-12-28T08:16:08.324106-08:00"}
{"id":"gt-bmcxx","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 2: All healthy. No callbacks, orphans, or gates.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:18:38.161883-08:00","updated_at":"2025-12-28T11:18:38.161883-08:00","closed_at":"2025-12-28T11:18:38.161848-08:00"}
{"id":"gt-bmnru","title":"Digest: mol-deacon-patrol","description":"Patrol complete: both rigs healthy, handoff threshold reached","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:29:27.182707-08:00","updated_at":"2025-12-28T19:29:27.182707-08:00","closed_at":"2025-12-28T19:29:27.182673-08:00"}
{"id":"gt-bnch","title":"Human escalation: notify overseer when self-heal fails","description":"Lightweight escalation extracted from Deacon epic (gt-5af).\n\n**Implementation**: Config in town.json or similar:\n```yaml\nescalation:\n contact: steve@example.com # or slack webhook\n triggers:\n - daemon_cant_restart\n - session_missing_5min\n```\n\n**Trigger points**:\n- Go daemon can't restart a session after N attempts\n- Agent detects it's stuck and can't recover\n- Witness can't reach polecat\n\n**Mechanism**: \n- Simple: `gt mail send --human` already exists\n- Enhanced: email/slack via external script\n\n**Weight**: Small config + one code path in daemon\n**Value**: High for unattended operation - human gets notified instead of silent failure","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-20T20:40:46.661514-08:00","updated_at":"2025-12-20T20:40:46.661514-08:00"}
{"id":"gt-bo8mo","title":"Witness: must send MERGE_READY to Refinery after POLECAT_DONE","description":"Integration test gt-7psb8 revealed that Witness processes POLECAT_DONE but doesn't send MERGE_READY to Refinery.\n\nObserved:\n- Witness receives POLECAT_DONE from furiosa\n- Witness verifies branch pushed\n- Witness kills polecat session\n- Witness notifies Mayor\n- NO MERGE_READY sent to Refinery\n\nExpected: After successful pre-kill verification, Witness should send MERGE_READY to gastown/refinery with the MR details.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-28T13:11:54.428918-08:00","created_by":"mayor","updated_at":"2025-12-28T13:58:05.348621-08:00","closed_at":"2025-12-28T13:58:05.348621-08:00"}
{"id":"gt-boiw8","title":"Digest: mol-deacon-patrol","description":"Patrol 8: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:54:03.322389-08:00","updated_at":"2025-12-28T15:54:03.322389-08:00","closed_at":"2025-12-28T15:54:03.322353-08:00"}
{"id":"gt-bp0ht","title":"Add mutex to swarm.Manager for thread safety","description":"attached_args: Add swarm.Manager mutex for thread safety\n\nFix potential race condition in swarm manager's map access.\n\n## Files to modify\n- internal/swarm/manager.go\n- internal/swarm/manager_test.go (add concurrency test)\n\n## Problem\nThe swarms map[string]*Swarm is accessed without synchronization:\n```go\ntype Manager struct {\n swarms map[string]*Swarm // No mutex protection\n}\n```\n\nMultiple goroutines could call Create(), GetSwarm(), etc. simultaneously.\n\n## Implementation\n```go\ntype Manager struct {\n mu sync.RWMutex\n swarms map[string]*Swarm\n}\n\nfunc (m *Manager) GetSwarm(id string) *Swarm {\n m.mu.RLock()\n defer m.mu.RUnlock()\n return m.swarms[id]\n}\n```\n\n## Acceptance criteria\n- [ ] sync.RWMutex added to Manager struct\n- [ ] All map accesses protected by mutex\n- [ ] RLock for reads, Lock for writes\n- [ ] Concurrency test added\n- [ ] go test -race ./internal/swarm/... passes","status":"hooked","priority":2,"issue_type":"task","created_at":"2025-12-28T15:49:16.520654-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:54:16.914513-08:00"}
{"id":"gt-bq1yn","title":"Digest: mol-deacon-patrol","description":"Patrol 4: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T14:04:00.499629-08:00","updated_at":"2025-12-25T14:04:00.499629-08:00","closed_at":"2025-12-25T14:04:00.499596-08:00"}
{"id":"gt-bq4wo","title":"Day 2.7c: gt doctor checks agent beads exist","description":"Add gt doctor check: agent-beads-exist\n\n1. For town-level: verify gt-deacon and gt-mayor beads exist\n2. For each rig: verify gt-witness-\u003crig\u003e and gt-refinery-\u003crig\u003e beads exist\n3. Report missing beads as warnings\n4. Implement --fix to create missing beads\n\nFiles:\n- internal/doctor/agent_beads_check.go (new)\n- internal/cmd/doctor.go (register check)","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-28T02:17:08.814494-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T02:40:06.712421-08:00","closed_at":"2025-12-28T02:40:06.712421-08:00","dependencies":[{"issue_id":"gt-bq4wo","depends_on_id":"gt-aer7q","type":"parent-child","created_at":"2025-12-28T02:17:17.582571-08:00","created_by":"daemon"},{"issue_id":"gt-bq4wo","depends_on_id":"gt-h3hak","type":"blocks","created_at":"2025-12-28T02:17:20.043469-08:00","created_by":"daemon"},{"issue_id":"gt-bq4wo","depends_on_id":"gt-pinkq","type":"blocks","created_at":"2025-12-28T02:17:20.073712-08:00","created_by":"daemon"}]}
{"id":"gt-bssqy","title":"Digest: mol-deacon-patrol","description":"Patrol 9: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:06:45.381206-08:00","updated_at":"2025-12-28T03:06:45.381206-08:00","closed_at":"2025-12-28T03:06:45.381172-08:00"}
{"id":"gt-bzey4","title":"Add NODE_OPTIONS crash logging to claude invocations","description":"## Background\n\nInvestigation in bd-6df0 found that NODE_OPTIONS can enable Node.js crash reporting for Claude Code:\n\n```bash\nNODE_OPTIONS=\"--report-on-fatalerror --report-uncaught-exception --report-directory=$HOME/.claude/crash-reports\"\n```\n\n## Proposal\n\nModify gt to set NODE_OPTIONS when spawning claude sessions. Key locations in gastown:\n\n- `internal/cmd/up.go` - deacon, witness, crew, polecat spawning\n- `internal/cmd/start.go` - refinery, crew spawning \n- `internal/cmd/mayor.go` - mayor spawning\n- `internal/cmd/handoff.go` - handoff respawning\n- `internal/cmd/crew_helpers.go` - execClaude()\n- `internal/daemon/lifecycle.go` - daemon-managed spawns\n\n## Implementation\n\n1. Create helper function to build NODE_OPTIONS string\n2. Set env var before each claude invocation\n3. Ensure ~/.claude/crash-reports/ directory exists\n4. Optionally add `gt doctor` check to clean old reports\n\n## Benefits\n\n- Crash diagnostics without user config changes\n- All gt-managed sessions automatically covered\n- Reports available for debugging unexpected terminations","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-12-28T09:32:15.467817-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T09:35:03.888171-08:00","closed_at":"2025-12-28T09:35:03.888171-08:00"}
{"id":"gt-c4b83","title":"Consider gt polecats --status=idle for swarm dispatch","description":"The dispatch-swarm-work step in mol-witness-patrol uses a complex jq command to find idle polecats:\n\n```bash\nbd list --type=agent --json | jq '[.[] | select(.description | contains(\"role_type: polecat\") and contains(\"agent_state: idle\"))]'\n```\n\nConsider adding a dedicated command:\n```bash\ngt polecats \u003crig\u003e --status=idle\n```\n\nBenefits:\n- Simpler for formula authors\n- Encapsulates agent bead schema details\n- Could add --json output for programmatic use\n\nLow priority - the jq approach works, this is just ergonomics.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-29T14:36:18.152191-08:00","created_by":"mayor","updated_at":"2025-12-29T14:36:18.152191-08:00"}
{"id":"gt-c4j4j","title":"Witness patrol formula should document 'dead' agent state","description":"## Problem\n\nThe witness patrol formula survey-workers step documents these agent states:\n\n agent_state: running|idle|stuck|done\n\nBut the daemon lifecycle (daemon/lifecycle.go:647) can set agent_state to 'dead'\nwhen an agent goes unresponsive. This state isn't mentioned in the formula.\n\n## Found in commit\n\nf3a6ef6 (feat: Witness reads polecat state from agent beads)\n\n## Suggested fix\n\nUpdate the formula survey-workers step to include 'dead' in the state table:\n\n| agent_state | Meaning | Action |\n|-------------|---------|--------|\n| running | Actively working | Check progress (Step 3) |\n| idle | No work assigned | Skip (no action needed) |\n| stuck | Self-reported stuck | Handle stuck protocol |\n| done | Work complete | Verify cleanup triggered |\n| dead | Marked dead by daemon | Clean up or respawn |","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T09:48:21.452636-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T09:55:13.416985-08:00","closed_at":"2025-12-28T09:55:13.416985-08:00"}
{"id":"gt-c55jv","title":"Digest: mol-deacon-patrol","description":"Patrol 17: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T18:46:04.311563-08:00","updated_at":"2025-12-26T18:46:04.311563-08:00","closed_at":"2025-12-26T18:46:04.311512-08:00"}
{"id":"gt-c57z0","title":"Digest: mol-deacon-patrol","description":"Patrol 13: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:34:03.807298-08:00","updated_at":"2025-12-28T01:34:03.807298-08:00","closed_at":"2025-12-28T01:34:03.807262-08:00"}
{"id":"gt-c92","title":"CLI: all command for batch polecat operations","description":"Batch operations across multiple polecats.\n\n## Commands\n\n### gt all start\n```\ngt all start [--awake-only] [\u003cspecs\u003e...]\n```\nStart sessions for multiple polecats.\n- --awake-only: Only start awake polecats\n- specs: Polecat names, rig/polecat patterns\n\n### gt all stop\n```\ngt all stop [\u003cspecs\u003e...] [--force]\n```\nStop sessions for multiple polecats.\n\n### gt all status\n```\ngt all status [\u003cspecs\u003e...] [--json]\n```\nShow status of multiple polecats.\n\n### gt all attach\n```\ngt all attach [\u003cspecs\u003e...]\n```\nAttach to multiple sessions in tmux panes/windows.\n\n### gt all run\n```\ngt all run \u003ccommand\u003e [\u003cspecs\u003e...]\n```\nRun command in multiple polecat sessions.\n\n## Spec Patterns\n- `Toast`: Specific polecat (in default/current rig)\n- `gastown/Toast`: Specific rig/polecat\n- `gastown/*`: All polecats in rig\n- `*`: All polecats everywhere\n\n## Implementation\n```go\nfunc expandSpecs(specs []string, awakeOnly bool) ([]*polecat.Polecat, error) {\n // Expand patterns to list of polecats\n}\n\nfunc runForAll(polecats []*polecat.Polecat, action func(*polecat.Polecat) error) error {\n // Run action for each, collect errors\n}\n```\n\n## New File\ninternal/cmd/all.go\n\n## PGT Reference\ngastown-py/src/gastown/cli/all_cmd.py\n\n## Acceptance Criteria\n- [ ] Pattern expansion works\n- [ ] Parallel execution where safe\n- [ ] Aggregate error reporting\n- [ ] --awake-only filter works","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T14:48:12.411789-08:00","updated_at":"2025-12-16T16:05:47.255503-08:00"}
{"id":"gt-camx5","title":"Campaign: Large-Scale Work Graph Execution","description":"A Campaign is a Molecule-wrapped Epic graph ready for orchestrated execution.\n\n## Concept\n\nCampaign = Molecule + Epics + Dependency Graph + Execution Strategy\n\nKey properties:\n1. **Work graph**: Linked epics with dependency edges (possibly from different authors)\n2. **Combinators as glue**: \u003e\u003e, |, wrap define bridging/shaping between epics\n3. **Molecule shell**: Provides execution state, persistence across sessions\n4. **Witness-aware**: Can be parallelized across polecats on independent branches\n5. **Single-rig scoped**: One rig executes it (spans sessions/polecats)\n\n## The \"Maximum Speed\" Model\n\nWitness becomes a scheduler that:\n- Watches campaign progress\n- Identifies ready nodes (all dependencies satisfied)\n- Spawns/assigns polecats to ready nodes\n- Respects parallelism constraints\n- Handles failures (retry? skip? escalate?)\n\n## Where Campaign Fits in MEOW\n\nCampaign is the convergence point where work-tracking meets workflow-execution:\n- An Epic-of-Epics (work dimension)\n- A Molecule (workflow dimension)\n\n## Open Questions\n\n1. Campaign creation UX - manual wire vs declare intent?\n2. Partial completion - can you commit progress and resume?\n3. Distinct entity type or molecule with type=\"campaign\"?\n4. Cross-rig campaigns - can graph span multiple rigs?\n\n## Related\n\n- docs/formula_evolution.md - original discussion\n- gt-8tmz - molecule algebra (foundation)\n","status":"closed","priority":4,"issue_type":"epic","created_at":"2025-12-26T01:00:51.274207-08:00","updated_at":"2025-12-28T22:33:22.323308-08:00","closed_at":"2025-12-28T22:33:22.323308-08:00"}
{"id":"gt-cbjzr","title":"Break up long functions in start.go","description":"Several functions in internal/cmd/start.go exceed recommended length:\n- runStart: 126 lines (129-255) - handles mayor, deacon, rig agents, crew auto-start\n- runStartCrew: 155 lines (638-792) - handles crew target parsing, workspace, session\n- cleanupPolecats: 91 lines (543-634) - handles polecat cleanup loop\n\nSuggestion: Extract into focused helpers:\n- runStart → startMayorAndDeacon(), startRigAgents(), startConfiguredCrew()\n- runStartCrew → parseCrewTarget(), ensureCrewWorkspace(), startOrAttachCrewSession()\n- cleanupPolecats → cleanupSinglePolecat()","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T15:43:11.539536-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:47:17.365109-08:00","closed_at":"2025-12-28T15:47:17.365109-08:00"}
{"id":"gt-cd5bi","title":"Digest: mol-deacon-patrol","description":"Patrol 15: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T18:45:00.403136-08:00","updated_at":"2025-12-26T18:45:00.403136-08:00","closed_at":"2025-12-26T18:45:00.403089-08:00"}
{"id":"gt-cekg","title":"Wisp squash design: cadences, rules, templates","description":"Design how wisps squash to digests: When to squash (cadences), what to include (summary templates), retention rules. Currently under-designed. Should cover patrol wisps (squash per cycle) and work wisps (squash on completion). Consider allowing formulas to define squash templates.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T18:45:27.315937-08:00","updated_at":"2025-12-23T18:45:27.315937-08:00"}
{"id":"gt-chk7z","title":"Extract interfaces for Git and Tmux to enable testing","description":"Git and Tmux packages use concrete types that make testing difficult:\n\ninternal/git/git.go:\n- Git struct with 40+ methods\n- No interface - tests must use real git\n- Many packages directly depend on concrete type\n\ninternal/tmux/tmux.go:\n- Tmux struct with 30+ methods\n- No interface - tests must use real tmux\n- Contains Claude-specific detection logic mixed in\n\nSuggestion:\n1. Extract GitOperations interface with common operations\n2. Extract TmuxRunner interface for subprocess operations\n3. Allow mock injection for unit tests\n4. Move Claude-specific tmux logic to internal/claude/","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T15:43:16.088336-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:47:21.180477-08:00","closed_at":"2025-12-28T15:47:21.180477-08:00"}
{"id":"gt-cicem","title":"Digest: mol-deacon-patrol","description":"Patrol 17: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:10:23.403733-08:00","updated_at":"2025-12-28T03:10:23.403733-08:00","closed_at":"2025-12-28T03:10:23.403694-08:00"}
{"id":"gt-clbz6","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 14: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:36.51872-08:00","updated_at":"2025-12-28T11:22:36.51872-08:00","closed_at":"2025-12-28T11:22:36.518686-08:00","dependencies":[{"issue_id":"gt-clbz6","depends_on_id":"gt-eph-ckj","type":"parent-child","created_at":"2025-12-28T11:22:36.519576-08:00","created_by":"deacon"}]}
{"id":"gt-cp63h","title":"Digest: mol-deacon-patrol","description":"Patrol 18: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:57:04.065336-08:00","updated_at":"2025-12-28T15:57:04.065336-08:00","closed_at":"2025-12-28T15:57:04.065303-08:00"}
{"id":"gt-crew-gastown-fang","title":"Crew worker fang in gastown - human-managed persistent workspace.","description":"Crew worker fang in gastown - human-managed persistent workspace.\n\nrole_type: crew\nrig: gastown\nagent_state: idle\nhook_bead: null\nrole_bead: gt-crew-gastown-fang-role\ncleanup_status: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-29T13:00:25.364965-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:30:47.614031-08:00","closed_at":"2025-12-29T14:30:47.614031-08:00","close_reason":"Migrated to canonical naming: gt-gastown-crew-\u003cname\u003e","role_bead":"gt-crew-role"}
{"id":"gt-crew-gastown-grip","title":"Crew worker grip in gastown - human-managed persistent workspace.","description":"Crew worker grip in gastown - human-managed persistent workspace.\n\nrole_type: crew\nrig: gastown\nagent_state: idle\nhook_bead: null\nrole_bead: gt-crew-gastown-grip-role\ncleanup_status: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-29T13:00:11.479646-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:30:47.620572-08:00","closed_at":"2025-12-29T14:30:47.620572-08:00","close_reason":"Migrated to canonical naming: gt-gastown-crew-\u003cname\u003e","role_bead":"gt-crew-role"}
{"id":"gt-crew-gastown-jack","title":"Crew worker jack in gastown - human-managed persistent workspace.","description":"Crew worker jack in gastown - human-managed persistent workspace.\n\nrole_type: crew\nrig: gastown\nagent_state: running\nhook_bead: null\nrole_bead: gt-crew-gastown-jack-role","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T10:06:26.487688-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:30:47.626584-08:00","closed_at":"2025-12-29T14:30:47.626584-08:00","close_reason":"Migrated to canonical naming: gt-gastown-crew-\u003cname\u003e","role_bead":"gt-crew-role"}
{"id":"gt-crew-gastown-joe","title":"gt-crew-gastown-joe","description":"gt-crew-gastown-joe\n\nrole_type: \nrig: null\nagent_state: running\nhook_bead: null\nrole_bead: null\ncleanup_status: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T10:04:05.03443-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-29T14:48:00.681115-08:00","closed_at":"2025-12-29T14:30:47.632199-08:00","close_reason":"Migrated to canonical naming: gt-gastown-crew-\u003cname\u003e","role_bead":"gt-crew-role"}
{"id":"gt-crew-gastown-max","title":"gt-crew-gastown-max","description":"gt-crew-gastown-max\n\nrole_type: crew\nrig: gastown\nagent_state: running\nhook_bead: null\nrole_bead: gt-crew-gastown-max-role\ncleanup_status: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T09:51:58.720059-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T15:01:06.25399-08:00","closed_at":"2025-12-29T14:30:47.637875-08:00","close_reason":"Migrated to canonical naming: gt-gastown-crew-\u003cname\u003e","role_bead":"gt-crew-role"}
{"id":"gt-crew-gastown-wolf","title":"Crew worker wolf in gastown - human-managed persistent workspace.","description":"Crew worker wolf in gastown - human-managed persistent workspace.\n\nrole_type: crew\nrig: gastown\nagent_state: idle\nhook_bead: null\nrole_bead: gt-crew-gastown-wolf-role\ncleanup_status: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-29T13:00:39.799433-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:30:47.606388-08:00","closed_at":"2025-12-29T14:30:47.606388-08:00","close_reason":"Migrated to canonical naming: gt-gastown-crew-\u003cname\u003e","role_bead":"gt-crew-role"}
{"id":"gt-crew-role","title":"Crew Role Definition","description":"You are a Crew Worker - a human-managed persistent workspace within a rig.\n\nUnlike polecats which are witness-managed and transient, crew workers are:\n- Persistent: Not auto-garbage-collected\n- User-managed: Overseer controls lifecycle\n- Long-lived identities: Keep your name across sessions\n- Gas Town integrated: Mail, handoff mechanics work\n\ndefault_molecule: null\ncapabilities:\n - autonomous_work\n - beads_access\n - git_operations\n - mail_communication\n\n## Core Responsibilities\n\n1. Execute assigned work autonomously\n2. Track progress via beads (bd commands)\n3. Communicate via mail when blocked or complete\n4. Maintain clean git state\n5. Hand off context when cycling sessions\n\n## Propulsion Principle\n\nIf you find something on your hook, YOU RUN IT.\n\nHook has work -\u003e Run it. Hook empty -\u003e Check mail. Nothing -\u003e Wait for overseer.\n\n## Session End Protocol\n\n- git status, git add, bd sync, git commit, git push\n- gt handoff - hand off to fresh session\n\n## Key Commands\n\n- gt mol status - Check your hook\n- bd ready - Find next step\n- bd close \u003cid\u003e - Mark work complete\n- gt mail inbox - Check messages\n- gt handoff - Cycle to fresh session","status":"open","priority":2,"issue_type":"role","created_at":"2025-12-29T13:23:55.830567-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T13:23:55.830567-08:00"}
{"id":"gt-crh3q","title":"Digest: mol-deacon-patrol","description":"Patrol 1: all agents healthy, no callbacks, clone divergence detected (zoey 52 behind)","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:26:07.334875-08:00","updated_at":"2025-12-28T01:26:07.334875-08:00","closed_at":"2025-12-28T01:26:07.334841-08:00"}
{"id":"gt-csmlp","title":"Digest: mol-deacon-patrol","description":"Patrol 6: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T18:40:07.959422-08:00","updated_at":"2025-12-26T18:40:07.959422-08:00","closed_at":"2025-12-26T18:40:07.959369-08:00"}
{"id":"gt-d0a","title":"Haiku-based smart stuck detection","description":"Use Haiku to analyze tmux state when signals are ambiguous.\n\n## When to Invoke\n\nOnly as escalation tier:\n1. Keepalive is stale (\u003e 2 min)\n2. Tmux shows claude is running (not idle shell)\n3. Heuristics can't determine state\n\n## Prompt\n\nCapture last 50 lines of tmux pane, ask Haiku:\n'Is this Claude agent: WORKING | STUCK | IDLE | WAITING_FOR_HUMAN?'\n\n## Cost\n\n~$0.001 per check. At 1 check/min worst case = $0.06/hour.\nIn practice, most checks avoided by keepalive signal.\n\n## Configuration\n\n```toml\n[daemon]\nsmart_detection = true\nsmart_model = \"haiku\"\nsmart_threshold = \"2m\" # only check if stale \u003e 2min\n```","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-18T14:19:31.287215-08:00","updated_at":"2025-12-18T14:19:31.287215-08:00","dependencies":[{"issue_id":"gt-d0a","depends_on_id":"gt-bfd","type":"blocks","created_at":"2025-12-18T14:19:46.788667-08:00","created_by":"daemon"}]}
{"id":"gt-d0jqp","title":"Pillar 1: Agent Identity (agent-as-bead)","description":"Agents become beads with deterministic IDs, hook slots, role beads, and self-reported state.\n\nKey deliverables:\n- Agent bead schema (type=agent, hook_bead, role_bead, state fields)\n- bd slot set/clear commands\n- Agent beads for mayor, witness, refinery\n- Role beads from current CLAUDE.md content\n- Hook lookup via agent bead\n\nReference: ~/gt/docs/agent-as-bead.md\n\nParent: gt-oki8p","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-27T20:56:04.38659-08:00","created_by":"mayor","updated_at":"2025-12-28T02:04:34.432178-08:00","closed_at":"2025-12-28T02:04:34.432178-08:00"}
{"id":"gt-d46","title":"Mail CLI: archive, purge, search, mark","description":"GGT mail CLI needs more commands for mail management.\n\n## Commands to Add\n\n### gt mail check\nCheck for new mail without full inbox display.\n```\ngt mail check [--quiet] [--inject]\n```\n- --quiet: Only output if new mail (for scripts)\n- --inject: Send notification to running session\n\n### gt mail mark\nChange read status.\n```\ngt mail mark \u003cid\u003e --read\ngt mail mark \u003cid\u003e --unread\n```\n\n### gt mail delete\nRemove message from inbox.\n```\ngt mail delete \u003cid\u003e [--force]\n```\n- Confirm unless --force\n\n### gt mail archive\nMove old/read messages to archive.\n```\ngt mail archive [--older-than DAYS] [--all-read] [--dry-run]\n```\n- Creates inbox.jsonl.archive or separate archive.jsonl\n\n### gt mail purge\nPermanently delete archived messages.\n```\ngt mail purge [--older-than DAYS] [--dry-run] [--force]\n```\n\n### gt mail search\nFind messages by content.\n```\ngt mail search \u003cquery\u003e [--from SENDER] [--subject] [--body]\n```\n\n### gt mail reply\nReply to a message.\n```\ngt mail reply \u003cid\u003e -m BODY\n```\n- Auto-sets reply_to and thread_id\n- Auto-addresses to original sender\n\n## Files to Modify\n- internal/cmd/mail.go: Add commands\n- internal/mail/mailbox.go: Add Archive(), Search(), Delete()\n\n## Acceptance Criteria\n- [ ] All commands implemented\n- [ ] Archive stores in separate file\n- [ ] Search supports regex patterns\n- [ ] Delete confirms by default","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T14:46:57.158136-08:00","updated_at":"2025-12-16T16:04:32.922813-08:00"}
{"id":"gt-d4uwy","title":"Digest: mol-deacon-patrol","description":"Patrol 9: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:17:37.59045-08:00","updated_at":"2025-12-25T10:17:37.59045-08:00","closed_at":"2025-12-25T10:17:37.590417-08:00"}
{"id":"gt-d9smb","title":"gt mol status: Change 'Pinned' to 'Hooked' in output","description":"The `gt mol status` output shows \"📌 Pinned: \u003cbead-id\u003e\" for hooked beads, which is confusing now that we have distinct statuses:\n\n- **hooked**: Work assigned to you (triggers autonomous mode)\n- **pinned**: Permanent reference beads (like agent beads, role beads)\n\nThe output currently says:\n```\n📌 Pinned: gt-3amkz: Overhaul autonomous-mode guidance...\nNo molecule attached\n```\n\nShould say:\n```\n🪝 Hooked: gt-3amkz: Overhaul autonomous-mode guidance...\nNo molecule attached\n```\n\nAdditional improvements:\n1. Change icon from 📌 to 🪝 for hooked beads\n2. Add a note clarifying that hooked work triggers autonomous mode even without an attached molecule\n3. Consider adding \"AUTONOMOUS MODE\" banner when hooked work is found (similar to gt prime)\n\nFiles to update:\n- internal/cmd/molecule_status.go (outputMoleculeStatus function around line 576)","status":"closed","priority":1,"issue_type":"bug","assignee":"gastown/crew/max","created_at":"2025-12-29T16:03:52.956377-08:00","created_by":"mayor","updated_at":"2025-12-29T16:11:04.397646-08:00","closed_at":"2025-12-29T16:11:04.397646-08:00","close_reason":"Implemented: Changed output to show 🪝 Hooked instead of 📌 Pinned, added AUTONOMOUS MODE banner, clarified hooked bead triggers autonomous work"}
{"id":"gt-ddw3y","title":"Extract duplicate boilerplate in molecule_lifecycle.go","description":"attached_args: Extract molecule_lifecycle boilerplate\n\nExtract duplicate boilerplate in molecule_lifecycle.go.\n\n## Files to modify\n- internal/cmd/molecule_lifecycle.go\n\n## Current duplication\nrunMoleculeBurn (lines 17-53) and runMoleculeSquash (lines 121-165) share ~50 lines of identical target detection code:\n- Get cwd\n- Find workspace\n- Parse target argument\n- Determine rig from address or role\n\n## Implementation\nExtract helper function:\n```go\ntype AgentContext struct {\n TownRoot string\n RigName string\n Role string\n Target string // polecat name or crew name\n}\n\nfunc getTargetAgentContext(args []string) (*AgentContext, error) {\n cwd, err := os.Getwd()\n if err != nil {\n return nil, fmt.Errorf(\"getting current directory: %w\", err)\n }\n townRoot, err := workspace.FindFromCwd()\n if err != nil {\n return nil, fmt.Errorf(\"finding workspace: %w\", err)\n }\n if townRoot == \"\" {\n return nil, fmt.Errorf(\"not in a Gas Town workspace\")\n }\n // ... rest of target detection logic ...\n}\n```\n\n## Acceptance criteria\n- [ ] AgentContext struct defined\n- [ ] getTargetAgentContext function extracts shared logic\n- [ ] runMoleculeBurn uses getTargetAgentContext\n- [ ] runMoleculeSquash uses getTargetAgentContext\n- [ ] Duplicate code eliminated (diff shows net negative lines)\n- [ ] go build ./... passes\n- [ ] go test ./internal/cmd/... passes","status":"hooked","priority":2,"issue_type":"task","created_at":"2025-12-28T15:43:21.155883-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:56:59.804116-08:00"}
{"id":"gt-deacon","title":"gt-deacon","description":"Deacon (daemon beacon) - receives mechanical heartbeats, runs town plugins and monitoring.\n\nrole_type: deacon\nrig: null\nagent_state: idle\nhook_bead: null\nrole_bead: gt-deacon-role","status":"open","priority":2,"issue_type":"agent","created_at":"2025-12-28T00:46:17.666539-08:00","created_by":"stevey","updated_at":"2025-12-28T00:46:17.666539-08:00"}
{"id":"gt-deacon-role","title":"Deacon Role Definition","description":"You are the Deacon - the town-level lifecycle manager.\n\nYou run patrol cycles checking the health of all agents across all rigs,\nnudging stuck workers, and managing session lifecycles.\n\ndefault_molecule: mol-deacon-patrol\ncapabilities:\n - health_monitoring\n - session_lifecycle\n - cross_rig_visibility\n - agent_nudging\n\n## Core Responsibilities\n\n1. Run patrol cycles across all rigs\n2. Monitor agent health and progress\n3. Nudge stuck agents\n4. Manage session lifecycles (kill/restart)\n5. Escalate systemic issues to Mayor\n\n## Patrol Cycle\n\nEach patrol:\n1. Check all agent sessions (gt status)\n2. Identify stuck or idle agents\n3. Nudge or restart as needed\n4. Log patrol results\n5. Sleep until next cycle\n\n## Propulsion Principle\n\nIf you find something on your hook, YOU RUN IT.\n\nYour work is the mol-deacon-patrol wisp. Execute patrol steps continuously.\n\n## Commands\n\n- gt status - Check all agents\n- tmux kill-session -t \u003csession\u003e - Kill stuck session\n- gt mail send \u003caddr\u003e - Communicate with agents\n- gt mail send mayor/ - Escalate to Mayor\n\n## Session Cycling\n\nWhen context fills, hand off to fresh session:\ngt handoff -s \"Deacon patrol handoff\" -m \"Completed N cycles...\"","status":"open","priority":2,"issue_type":"role","created_at":"2025-12-29T13:24:35.911278-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T13:24:35.911278-08:00"}
{"id":"gt-dfeho","title":"P4: Graceful degradation without tmux","description":"Low-priority: Add graceful degradation for environments without tmux.\n\nCurrent state: Patrol formulas use tmux capture-pane for observing agent state.\n\ntmux-independent alternatives (degraded mode):\n1. Tail Claude Code session logs if available\n2. Rely solely on agent bead state (less real-time)\n3. Use claude --output-file and tail that\n4. IPC mechanisms (named pipes, sockets)\n\nNOT launch-blocking. By summer 2025, Claude Code is expected to add signaling and reflection features that will obviate tmux scraping.\n\nFor now:\n- Keep tmux as primary observation mechanism\n- Document the tmux dependency\n- Add --no-tmux flag that falls back to bead-only observation\n\nThis is P4 backlog - address after liftoff.","status":"open","priority":4,"issue_type":"task","created_at":"2025-12-27T22:02:33.397709-08:00","created_by":"mayor","updated_at":"2025-12-27T22:02:33.397709-08:00"}
{"id":"gt-dh65","title":"Add gate checking to Deacon patrol loop","description":"Integrate gate checking into Deacon's patrol cycle.\n\n## Patrol Integration\n```go\nfunc (d *Deacon) checkGates(ctx context.Context) {\n gates, _ := d.store.ListOpenGates(ctx)\n \n for _, gate := range gates {\n // Check timeout\n if time.Since(gate.CreatedAt) \u003e gate.Timeout {\n d.notifyWaiters(gate, \"timeout\")\n d.closeGate(gate, \"timed out\")\n continue\n }\n \n // Check condition\n if d.checkCondition(gate.AwaitType, gate.AwaitID) {\n d.notifyWaiters(gate, \"cleared\")\n d.closeGate(gate, \"condition met\")\n }\n }\n}\n```\n\n## Moved from beads\nOriginally bd-is6m. Deacon is in gastown, not beads.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T12:19:06.768752-08:00","updated_at":"2025-12-23T12:19:06.768752-08:00"}
{"id":"gt-dich","title":"gt handoff deadlock at handoff.go:125","description":"When running 'gt handoff -m \"message\"' after successful MR submit, go panics with 'fatal error: all goroutines are asleep - deadlock\\!' at handoff.go:125. The shutdown request still appears to be sent successfully but the command crashes. Stack trace shows issue is in runHandoff select statement.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-21T17:51:18.441808-08:00","updated_at":"2025-12-21T17:51:18.441808-08:00"}
{"id":"gt-dmagm","title":"Digest: mol-deacon-patrol","description":"Patrol 17: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:36:06.393647-08:00","updated_at":"2025-12-28T01:36:06.393647-08:00","closed_at":"2025-12-28T01:36:06.393612-08:00"}
{"id":"gt-dmozb","title":"Digest: mol-deacon-patrol","description":"Patrol 3: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:13:26.555648-08:00","updated_at":"2025-12-28T08:13:26.555648-08:00","closed_at":"2025-12-28T08:13:26.55561-08:00"}
{"id":"gt-drkhg","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 2: all quiet, agents healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:06:40.832353-08:00","updated_at":"2025-12-28T13:06:40.832353-08:00","closed_at":"2025-12-28T13:06:40.832318-08:00"}
{"id":"gt-dsqxw","title":"Refactor runStartCrew into focused helper functions","description":"attached_args: Refactor runStartCrew into focused helper functions\n\nBreak up the 155-line runStartCrew function in start.go.\n\n## Files to modify\n- internal/cmd/start.go\n\n## Current structure (lines 638-792)\nrunStartCrew does:\n1. Parse crew target (rig/name)\n2. Load rig config\n3. Get/create crew workspace\n4. Create/attach tmux session\n5. Set environment variables\n6. Apply theming\n7. Start Claude\n\n## Refactoring plan\nExtract these helpers:\n```go\nfunc parseCrewTarget(args []string) (rigName, crewName string, err error)\nfunc ensureCrewWorkspace(rig *rig.Rig, crewName string) (*crew.CrewWorker, error)\nfunc startCrewSession(worker *crew.CrewWorker, opts CrewStartOpts) error\n```\n\n## Acceptance criteria\n- [ ] runStartCrew reduced to \u003c60 lines\n- [ ] 3 helper functions extracted\n- [ ] Each helper is \u003c50 lines\n- [ ] No change in behavior\n- [ ] go test ./internal/cmd/... passes\n- [ ] Manual test: gt start crew works correctly","status":"hooked","priority":3,"issue_type":"task","created_at":"2025-12-28T15:49:14.724309-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T16:32:38.210627-08:00"}
{"id":"gt-dw6v","title":"Review: Deacon town-level wisp storage (gt-ci84)","description":"Polecat slit implemented town-level wisp storage for deacon patrol. Review the changes to ensure deacon wisps are correctly stored in ~/gt/.beads-wisp/ instead of gastown rig beads.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T19:57:36.967604-08:00","updated_at":"2025-12-23T19:57:36.967604-08:00"}
{"id":"gt-dwvuu","title":"Digest: mol-deacon-patrol","description":"Patrol 11","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T14:55:12.380587-08:00","updated_at":"2025-12-26T14:55:12.380587-08:00","closed_at":"2025-12-26T14:55:12.380548-08:00"}
{"id":"gt-dx5c","title":"Update swarm terminology to streams","description":"Gas Town moved from batch swarms to continuous streaming of polecats. Update:\n- Docs and designs\n- Code comments\n- CLI flags (remove --swarm if present, or reframe)\n- Variable/function names where appropriate\n\nStreams reflect the reality: polecats flow continuously, not in discrete batches.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T21:42:19.559957-08:00","updated_at":"2025-12-22T21:42:19.559957-08:00"}
{"id":"gt-dy2k8","title":"Digest: mol-deacon-patrol","description":"Patrol 20: quiet, handoff threshold reached","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:50:21.56188-08:00","updated_at":"2025-12-28T19:50:21.56188-08:00","closed_at":"2025-12-28T19:50:21.561844-08:00"}
{"id":"gt-e01cj","title":"Digest: mol-deacon-patrol","description":"Cycle 11: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:19:46.280919-08:00","updated_at":"2025-12-28T13:19:46.280919-08:00","closed_at":"2025-12-28T13:19:46.280887-08:00"}
{"id":"gt-e0u3r","title":"gt sling: Make target path parsing more forgiving","description":"Current parsing rejects valid-looking paths like 'gastown/nux' or 'gastown/polecats/nux'.\n\nShould accept:\n- gastown/nux (polecat)\n- gastown/Nux (polecat, case-insensitive)\n- gastown/polecats/nux (explicit)\n- gastown/crew/max (crew)\n- gastown (auto-spawn)\n\nThe help says 'gastown/Toast' works but it doesn't. Parser is too strict.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-28T00:42:00.738517-08:00","created_by":"mayor","updated_at":"2025-12-28T00:54:34.999256-08:00","closed_at":"2025-12-28T00:54:34.999256-08:00"}
{"id":"gt-e3ya","title":"Remove redundant gt prime SendKeys from crew commands","description":"The crew commands (gt crew at, gt crew restart) still send 'gt prime' via SendKeys after session creation:\n- internal/cmd/crew_at.go:97, 121\n- internal/cmd/crew_lifecycle.go:202\n\nThis is now redundant because SessionStart hook handles priming automatically.\n\n**Low priority** - these aren't causing bugs (just duplicate work), unlike the spawn race condition that was fixed. Can be cleaned up when convenient.","status":"open","priority":4,"issue_type":"task","created_at":"2025-12-22T18:00:05.798858-08:00","updated_at":"2025-12-22T18:00:05.798858-08:00"}
{"id":"gt-e5hly","title":"Digest: mol-deacon-patrol","description":"Patrol 13: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:08:36.903-08:00","updated_at":"2025-12-28T03:08:36.903-08:00","closed_at":"2025-12-28T03:08:36.902969-08:00"}
{"id":"gt-e9k","title":"Workspace cleanup: preflight and postflight","description":"Workspace preflight and postflight commands for clean state management.\n\n## Preflight\n```\ngt preflight [--rig \u003crig\u003e] [--dry-run]\n```\n\nRun before starting batch work:\n1. Clean stale mail in inboxes\n2. Check for stuck workers (warn)\n3. Check rig health (polecats, refinery)\n4. Verify git state is clean\n5. Run bd sync to ensure beads current\n\n## Postflight\n```\ngt postflight [--rig \u003crig\u003e] [--archive-mail] [--dry-run]\n```\n\nRun after batch work completes:\n1. Archive old mail with --archive-mail\n2. Clean up stale integration branches\n3. Sync beads\n4. Report on rig state\n\n## Implementation\n```go\nfunc Preflight(rigName string, dryRun bool) (*PreflightReport, error)\nfunc Postflight(rigName string, opts PostflightOptions) (*PostflightReport, error)\n```\n\n## Report Structures\n```go\ntype PreflightReport struct {\n MailCleaned int\n RigHealthy bool\n StuckWorkers []string\n Warnings []string\n}\n\ntype PostflightReport struct {\n MailArchived int\n BranchesCleaned int\n Warnings []string\n}\n```\n\n## Note\n\nThese are workspace maintenance commands, not tied to \"swarm\" lifecycle. Run them anytime to keep the rig clean.\n\n## Acceptance Criteria\n- [ ] Preflight cleans stale state\n- [ ] Postflight archives old mail\n- [ ] Both have --dry-run mode\n- [ ] Clear reports of actions taken","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T14:47:15.997677-08:00","updated_at":"2025-12-16T17:25:01.55269-08:00"}
{"id":"gt-ebl","title":"CLI: names commands for polecat naming pool","description":"Polecat naming pool for auto-generated names.\n\n## Commands\n\n### gt names generate\n```\ngt names generate [--count N]\n```\nGenerate N names from pool.\n\n### gt names add\n```\ngt names add \u003cname\u003e...\n```\nAdd custom names to pool.\n\n### gt names list\n```\ngt names list\n```\nShow available and used names.\n\n### gt names reset\n```\ngt names reset [--keep-used]\n```\nReset pool to defaults.\n\n## Config File\n\u003crig\u003e/town/naming.json:\n```json\n{\n \"enabled\": true,\n \"auto_refill\": true,\n \"refill_threshold\": 5,\n \"pool\": {\n \"available\": [\"Toast\", \"Nux\", \"Capable\", ...],\n \"used\": [\"Alice\", \"Bob\"]\n }\n}\n```\n\n## Default Pool\nMad Max themed: Toast, Nux, Capable, Furiosa, Immortan, etc.\n\n## Integration\ngt polecat add calls naming pool if no name given:\n```go\nif name == \"\" {\n name, err = naming.Generate(rigPath)\n}\n```\n\n## New Package\ninternal/naming/\n├── pool.go # Pool management\n└── defaults.go # Default name lists\n\n## Acceptance Criteria\n- [ ] Auto-generate names on polecat add\n- [ ] Track used vs available\n- [ ] Auto-refill when low\n- [ ] Custom names addable","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-16T14:48:33.592129-08:00","updated_at":"2025-12-16T16:07:13.882465-08:00"}
{"id":"gt-ef1t9","title":"Digest: mol-deacon-patrol","description":"Cycle 5: 1 msg processed, all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:12:38.846336-08:00","updated_at":"2025-12-28T13:12:38.846336-08:00","closed_at":"2025-12-28T13:12:38.846298-08:00"}
{"id":"gt-eph-2wb","title":"Execute registered plugins","description":"Execute registered plugins.\n\nScan ~/gt/plugins/ for plugin directories. Each plugin has a plugin.md with YAML frontmatter defining its gate (when to run) and instructions (what to do).\n\nSee docs/deacon-plugins.md for full documentation.\n\nGate types:\n- cooldown: Time since last run (e.g., 24h)\n- cron: Schedule-based (e.g., \"0 9 * * *\")\n- condition: Metric threshold (e.g., wisp count \u003e 50)\n- event: Trigger-based (e.g., startup, heartbeat)\n\nFor each plugin:\n1. Read plugin.md frontmatter to check gate\n2. Compare against state.json (last run, etc.)\n3. If gate is open, execute the plugin\n\nPlugins marked parallel: true can run concurrently using Task tool subagents. Sequential plugins run one at a time in directory order.\n\nSkip this step if ~/gt/plugins/ does not exist or is empty.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T09:54:49.166597-08:00","updated_at":"2025-12-28T09:55:21.11902-08:00","closed_at":"2025-12-28T09:55:21.11902-08:00","dependencies":[{"issue_id":"gt-eph-2wb","depends_on_id":"gt-eph-5jh","type":"blocks","created_at":"2025-12-28T09:54:49.258993-08:00","created_by":"deacon"}]}
{"id":"gt-eph-43s","title":"Find abandoned work","description":"Find abandoned work.\n\nScan for orphaned state:\n- Issues marked in_progress with no active polecat\n- Polecats that stopped responding mid-work\n- Merge queue entries with no polecat owner\n- Wisp sessions that outlived their spawner\n\n```bash\nbd list --status=in_progress\ngt polecats --all --orphan\n```\n\nFor each orphan:\n- Check if polecat session still exists\n- If not, mark issue for reassignment or retry\n- File incident beads if data loss occurred","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T09:55:41.719317-08:00","updated_at":"2025-12-28T09:55:41.719317-08:00","dependencies":[{"issue_id":"gt-eph-43s","depends_on_id":"gt-eph-hfj","type":"parent-child","created_at":"2025-12-28T09:55:41.75482-08:00","created_by":"deacon"},{"issue_id":"gt-eph-43s","depends_on_id":"gt-eph-tc2","type":"blocks","created_at":"2025-12-28T09:55:41.818357-08:00","created_by":"deacon"}]}
{"id":"gt-eph-5c8","title":"Handle callbacks from agents","description":"Handle callbacks from agents.\n\nCheck the Mayor's inbox for messages from:\n- Witnesses reporting polecat status\n- Refineries reporting merge results\n- Polecats requesting help or escalation\n- External triggers (webhooks, timers)\n\n```bash\ngt mail inbox\n# For each message:\ngt mail read \u003cid\u003e\n# Handle based on message type\n```\n\nCallbacks may spawn new polecats, update issue state, or trigger other actions.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T09:55:41.717851-08:00","updated_at":"2025-12-28T09:55:41.717851-08:00","dependencies":[{"issue_id":"gt-eph-5c8","depends_on_id":"gt-eph-hfj","type":"parent-child","created_at":"2025-12-28T09:55:41.720544-08:00","created_by":"deacon"}]}
{"id":"gt-eph-5jh","title":"Check Witness and Refinery health","description":"Check Witness and Refinery health for each rig.\n\n**ZFC Principle**: You (Claude) make the judgment call about what is \"stuck\" or \"unresponsive\" - there are no hardcoded thresholds in Go. Read the signals, consider context, and decide.\n\nFor each rig, run:\n```bash\ngt witness status \u003crig\u003e\ngt refinery status \u003crig\u003e\n```\n\n**Signals to assess:**\n\n| Component | Healthy Signals | Concerning Signals |\n|-----------|-----------------|-------------------|\n| Witness | State: running, recent activity | State: not running, no heartbeat |\n| Refinery | State: running, queue processing | Queue stuck, merge failures |\n\n**Tracking unresponsive cycles:**\n\nMaintain in your patrol state (persisted across cycles):\n```\nhealth_state:\n \u003crig\u003e:\n witness:\n unresponsive_cycles: 0\n last_seen_healthy: \u003ctimestamp\u003e\n refinery:\n unresponsive_cycles: 0\n last_seen_healthy: \u003ctimestamp\u003e\n```\n\n**Decision matrix** (you decide the thresholds based on context):\n\n| Cycles Unresponsive | Suggested Action |\n|---------------------|------------------|\n| 1-2 | Note it, check again next cycle |\n| 3-4 | Attempt restart: gt witness restart \u003crig\u003e |\n| 5+ | Escalate to Mayor with context |\n\n**Restart commands:**\n```bash\ngt witness restart \u003crig\u003e\ngt refinery restart \u003crig\u003e\n```\n\n**Escalation:**\n```bash\ngt mail send mayor/ -s \"Health: \u003crig\u003e \u003ccomponent\u003e unresponsive\" \\\n -m \"Component has been unresponsive for N cycles. Restart attempts failed.\n Last healthy: \u003ctimestamp\u003e\n Error signals: \u003cdetails\u003e\"\n```\n\nReset unresponsive_cycles to 0 when component responds normally.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T09:54:49.166307-08:00","updated_at":"2025-12-28T09:55:21.319124-08:00","closed_at":"2025-12-28T09:55:21.319124-08:00","dependencies":[{"issue_id":"gt-eph-5jh","depends_on_id":"gt-eph-uqs","type":"blocks","created_at":"2025-12-28T09:54:49.251653-08:00","created_by":"deacon"}]}
{"id":"gt-eph-6dn","title":"mol-deacon-patrol","description":"Mayor's daemon patrol loop.\n\nThe Deacon is the Mayor's background process that runs continuously, handling callbacks, monitoring rig health, and performing cleanup. Each patrol cycle runs these steps in sequence, then loops or exits.\n\n## Second-Order Monitoring\n\nWitnesses send WITNESS_PING messages to verify the Deacon is alive. This\nprevents the \"who watches the watchers\" problem - if the Deacon dies,\nWitnesses detect it and escalate to the Mayor.\n\nThe Deacon's agent bead last_activity timestamp is updated during each patrol\ncycle. Witnesses check this timestamp to verify health.","status":"hooked","priority":2,"issue_type":"epic","created_at":"2025-12-28T15:56:22.274106-08:00","updated_at":"2025-12-28T15:56:30.255876-08:00"}
{"id":"gt-eph-7gy","title":"mol-deacon-patrol","description":"Mayor's daemon patrol loop.\n\nThe Deacon is the Mayor's background process that runs continuously, handling callbacks, monitoring rig health, and performing cleanup. Each patrol cycle runs these steps in sequence, then loops or exits.","status":"closed","priority":2,"issue_type":"epic","created_at":"2025-12-28T02:01:03.365622-08:00","updated_at":"2025-12-28T05:39:40.760566-08:00","closed_at":"2025-12-28T05:39:40.760566-08:00"}
{"id":"gt-eph-89x","title":"mol-deacon-patrol","description":"Mayor's daemon patrol loop.\n\nThe Deacon is the Mayor's background process that runs continuously, handling callbacks, monitoring rig health, and performing cleanup. Each patrol cycle runs these steps in sequence, then loops or exits.\n\n## Second-Order Monitoring\n\nWitnesses send WITNESS_PING messages to verify the Deacon is alive. This\nprevents the \"who watches the watchers\" problem - if the Deacon dies,\nWitnesses detect it and escalate to the Mayor.\n\nThe Deacon's agent bead last_activity timestamp is updated during each patrol\ncycle. Witnesses check this timestamp to verify health.","status":"closed","priority":2,"issue_type":"epic","created_at":"2025-12-28T13:08:55.447783-08:00","updated_at":"2025-12-28T13:10:26.371776-08:00","closed_at":"2025-12-28T13:10:26.371776-08:00"}
{"id":"gt-eph-8fu","title":"Nudge newly spawned polecats","description":"Nudge newly spawned polecats that are ready for input.\n\nWhen polecats are spawned, their Claude session takes 10-20 seconds to initialize. The spawn command returns immediately without waiting. This step finds spawned polecats that are now ready and sends them a trigger to start working.\n\n**ZFC-Compliant Observation** (AI observes AI):\n\n```bash\n# View pending spawns with captured terminal output\ngt deacon pending\n```\n\nFor each pending session, analyze the captured output:\n- Look for Claude's prompt indicator \"\u003e \" at the start of a line\n- If prompt is visible, Claude is ready for input\n- Make the judgment call yourself - you're the AI observer\n\nFor each ready polecat:\n```bash\n# 1. Trigger the polecat\ngt nudge \u003csession\u003e \"Begin.\"\n\n# 2. Clear from pending list\ngt deacon pending \u003csession\u003e\n```\n\nThis triggers the UserPromptSubmit hook, which injects mail so the polecat sees its assignment.\n\n**Bootstrap mode** (daemon-only, no AI available):\nThe daemon uses `gt deacon trigger-pending` with regex detection. This ZFC violation is acceptable during cold startup when no AI agent is running yet.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T09:55:41.718169-08:00","updated_at":"2025-12-28T09:55:41.71817-08:00","dependencies":[{"issue_id":"gt-eph-8fu","depends_on_id":"gt-eph-hfj","type":"parent-child","created_at":"2025-12-28T09:55:41.727407-08:00","created_by":"deacon"},{"issue_id":"gt-eph-8fu","depends_on_id":"gt-eph-5c8","type":"blocks","created_at":"2025-12-28T09:55:41.782453-08:00","created_by":"deacon"}]}
{"id":"gt-eph-bf1","title":"Check own context limit","description":"Check own context limit.\n\nThe Deacon runs in a Claude session with finite context. Check if approaching the limit:\n\n```bash\ngt context --usage\n```\n\nIf context is high (\u003e80%), prepare for handoff:\n- Summarize current state\n- Note any pending work\n- Write handoff to molecule state\n\nThis enables the Deacon to burn and respawn cleanly.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T09:55:41.719859-08:00","updated_at":"2025-12-28T09:55:41.719859-08:00","dependencies":[{"issue_id":"gt-eph-bf1","depends_on_id":"gt-eph-hfj","type":"parent-child","created_at":"2025-12-28T09:55:41.768581-08:00","created_by":"deacon"},{"issue_id":"gt-eph-bf1","depends_on_id":"gt-eph-lm1","type":"blocks","created_at":"2025-12-28T09:55:41.833279-08:00","created_by":"deacon"}]}
{"id":"gt-eph-cfu","title":"Check own context limit","description":"Check own context limit.\n\nThe Deacon runs in a Claude session with finite context. Check if approaching the limit:\n\n```bash\ngt context --usage\n```\n\nIf context is high (\u003e80%), prepare for handoff:\n- Summarize current state\n- Note any pending work\n- Write handoff to molecule state\n\nThis enables the Deacon to burn and respawn cleanly.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T09:53:46.12348-08:00","updated_at":"2025-12-28T09:54:29.071412-08:00","closed_at":"2025-12-28T09:54:29.071412-08:00"}
{"id":"gt-eph-ckj","title":"mol-deacon-patrol","description":"Mayor's daemon patrol loop.\n\nThe Deacon is the Mayor's background process that runs continuously, handling callbacks, monitoring rig health, and performing cleanup. Each patrol cycle runs these steps in sequence, then loops or exits.\n\n## Second-Order Monitoring\n\nWitnesses send WITNESS_PING messages to verify the Deacon is alive. This\nprevents the \"who watches the watchers\" problem - if the Deacon dies,\nWitnesses detect it and escalate to the Mayor.\n\nThe Deacon's agent bead last_activity timestamp is updated during each patrol\ncycle. Witnesses check this timestamp to verify health.","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-28T11:22:36.024308-08:00","updated_at":"2025-12-28T11:22:36.024308-08:00"}
{"id":"gt-eph-dhv","title":"mol-deacon-patrol","description":"Mayor's daemon patrol loop.\n\nThe Deacon is the Mayor's background process that runs continuously, handling callbacks, monitoring rig health, and performing cleanup. Each patrol cycle runs these steps in sequence, then loops or exits.\n\n## Second-Order Monitoring\n\nWitnesses send WITNESS_PING messages to verify the Deacon is alive. This\nprevents the \"who watches the watchers\" problem - if the Deacon dies,\nWitnesses detect it and escalate to the Mayor.\n\nThe Deacon's agent bead last_activity timestamp is updated during each patrol\ncycle. Witnesses check this timestamp to verify health.","status":"hooked","priority":2,"issue_type":"epic","created_at":"2025-12-28T15:52:49.698851-08:00","updated_at":"2025-12-28T15:52:57.067866-08:00"}
{"id":"gt-eph-ei9","title":"Evaluate pending async gates","description":"Evaluate pending async gates.\n\nGates are async coordination primitives that block until conditions are met.\nThe Deacon is responsible for monitoring gates and closing them when ready.\n\n**Timer gates** (await_type: timer):\nCheck if elapsed time since creation exceeds the timeout duration.\n\n```bash\n# List all open gates\nbd gate list --json\n\n# For each timer gate, check if elapsed:\n# - CreatedAt + Timeout \u003c Now → gate is ready to close\n# - Close with: bd gate close \u003cid\u003e --reason \"Timer elapsed\"\n```\n\n**GitHub gates** (await_type: gh:run, gh:pr) - handled in separate step.\n\n**Human/Mail gates** - require external input, skip here.\n\nAfter closing a gate, the Waiters field contains mail addresses to notify.\nSend a brief notification to each waiter that the gate has cleared.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T09:55:41.718473-08:00","updated_at":"2025-12-28T09:55:41.718473-08:00","dependencies":[{"issue_id":"gt-eph-ei9","depends_on_id":"gt-eph-hfj","type":"parent-child","created_at":"2025-12-28T09:55:41.734258-08:00","created_by":"deacon"},{"issue_id":"gt-eph-ei9","depends_on_id":"gt-eph-5c8","type":"blocks","created_at":"2025-12-28T09:55:41.789441-08:00","created_by":"deacon"}]}
{"id":"gt-eph-gf1","title":"Execute registered plugins","description":"Execute registered plugins.\n\nScan ~/gt/plugins/ for plugin directories. Each plugin has a plugin.md with YAML frontmatter defining its gate (when to run) and instructions (what to do).\n\nSee docs/deacon-plugins.md for full documentation.\n\nGate types:\n- cooldown: Time since last run (e.g., 24h)\n- cron: Schedule-based (e.g., \"0 9 * * *\")\n- condition: Metric threshold (e.g., wisp count \u003e 50)\n- event: Trigger-based (e.g., startup, heartbeat)\n\nFor each plugin:\n1. Read plugin.md frontmatter to check gate\n2. Compare against state.json (last run, etc.)\n3. If gate is open, execute the plugin\n\nPlugins marked parallel: true can run concurrently using Task tool subagents. Sequential plugins run one at a time in directory order.\n\nSkip this step if ~/gt/plugins/ does not exist or is empty.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T09:55:41.719043-08:00","updated_at":"2025-12-28T09:55:41.719043-08:00","dependencies":[{"issue_id":"gt-eph-gf1","depends_on_id":"gt-eph-hfj","type":"parent-child","created_at":"2025-12-28T09:55:41.747929-08:00","created_by":"deacon"},{"issue_id":"gt-eph-gf1","depends_on_id":"gt-eph-tc2","type":"blocks","created_at":"2025-12-28T09:55:41.810967-08:00","created_by":"deacon"}]}
{"id":"gt-eph-hfj","title":"mol-deacon-patrol","description":"Mayor's daemon patrol loop.\n\nThe Deacon is the Mayor's background process that runs continuously, handling callbacks, monitoring rig health, and performing cleanup. Each patrol cycle runs these steps in sequence, then loops or exits.","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-28T09:55:41.717288-08:00","updated_at":"2025-12-28T09:55:41.717288-08:00"}
{"id":"gt-eph-lm1","title":"Clean dead sessions","description":"Clean dead sessions and orphaned state.\n\nRun `gt doctor --fix` to handle all cleanup:\n\n```bash\n# Preview what needs cleaning\ngt doctor -v\n\n# Fix everything\ngt doctor --fix\n```\n\nThis handles:\n- **orphan-sessions**: Kill orphaned tmux sessions (gt-* not matching valid patterns)\n- **orphan-processes**: Kill orphaned Claude processes (no tmux parent)\n- **wisp-gc**: Garbage collect abandoned wisps (\u003e1h old)\n\nAll cleanup is handled by doctor checks - no need to run separate commands.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T09:55:41.719584-08:00","updated_at":"2025-12-28T09:55:41.719584-08:00","dependencies":[{"issue_id":"gt-eph-lm1","depends_on_id":"gt-eph-hfj","type":"parent-child","created_at":"2025-12-28T09:55:41.761736-08:00","created_by":"deacon"},{"issue_id":"gt-eph-lm1","depends_on_id":"gt-eph-43s","type":"blocks","created_at":"2025-12-28T09:55:41.825725-08:00","created_by":"deacon"}]}
{"id":"gt-eph-o04","title":"Find abandoned work","description":"Find abandoned work.\n\nScan for orphaned state:\n- Issues marked in_progress with no active polecat\n- Polecats that stopped responding mid-work\n- Merge queue entries with no polecat owner\n- Wisp sessions that outlived their spawner\n\n```bash\nbd list --status=in_progress\ngt polecats --all --orphan\n```\n\nFor each orphan:\n- Check if polecat session still exists\n- If not, mark issue for reassignment or retry\n- File incident beads if data loss occurred","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T09:54:49.166871-08:00","updated_at":"2025-12-28T09:55:21.204545-08:00","closed_at":"2025-12-28T09:55:21.204545-08:00","dependencies":[{"issue_id":"gt-eph-o04","depends_on_id":"gt-eph-5jh","type":"blocks","created_at":"2025-12-28T09:54:49.266603-08:00","created_by":"deacon"}]}
{"id":"gt-eph-tc2","title":"Check Witness and Refinery health","description":"Check Witness and Refinery health for each rig.\n\n**ZFC Principle**: You (Claude) make the judgment call about what is \"stuck\" or \"unresponsive\" - there are no hardcoded thresholds in Go. Read the signals, consider context, and decide.\n\nFor each rig, run:\n```bash\ngt witness status \u003crig\u003e\ngt refinery status \u003crig\u003e\n```\n\n**Signals to assess:**\n\n| Component | Healthy Signals | Concerning Signals |\n|-----------|-----------------|-------------------|\n| Witness | State: running, recent activity | State: not running, no heartbeat |\n| Refinery | State: running, queue processing | Queue stuck, merge failures |\n\n**Tracking unresponsive cycles:**\n\nMaintain in your patrol state (persisted across cycles):\n```\nhealth_state:\n \u003crig\u003e:\n witness:\n unresponsive_cycles: 0\n last_seen_healthy: \u003ctimestamp\u003e\n refinery:\n unresponsive_cycles: 0\n last_seen_healthy: \u003ctimestamp\u003e\n```\n\n**Decision matrix** (you decide the thresholds based on context):\n\n| Cycles Unresponsive | Suggested Action |\n|---------------------|------------------|\n| 1-2 | Note it, check again next cycle |\n| 3-4 | Attempt restart: gt witness restart \u003crig\u003e |\n| 5+ | Escalate to Mayor with context |\n\n**Restart commands:**\n```bash\ngt witness restart \u003crig\u003e\ngt refinery restart \u003crig\u003e\n```\n\n**Escalation:**\n```bash\ngt mail send mayor/ -s \"Health: \u003crig\u003e \u003ccomponent\u003e unresponsive\" \\\n -m \"Component has been unresponsive for N cycles. Restart attempts failed.\n Last healthy: \u003ctimestamp\u003e\n Error signals: \u003cdetails\u003e\"\n```\n\nReset unresponsive_cycles to 0 when component responds normally.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T09:55:41.718758-08:00","updated_at":"2025-12-28T09:55:41.718758-08:00","dependencies":[{"issue_id":"gt-eph-tc2","depends_on_id":"gt-eph-hfj","type":"parent-child","created_at":"2025-12-28T09:55:41.74114-08:00","created_by":"deacon"},{"issue_id":"gt-eph-tc2","depends_on_id":"gt-eph-8fu","type":"blocks","created_at":"2025-12-28T09:55:41.796618-08:00","created_by":"deacon"},{"issue_id":"gt-eph-tc2","depends_on_id":"gt-eph-ei9","type":"blocks","created_at":"2025-12-28T09:55:41.803807-08:00","created_by":"deacon"}]}
{"id":"gt-eph-ucl","title":"Burn and respawn or loop","description":"Burn and let daemon respawn, or exit if context high.\n\nDecision point at end of patrol cycle:\n\nIf context is LOW:\n- Sleep briefly (avoid tight loop)\n- Return to inbox-check step\n\nIf context is HIGH:\n- Write state to persistent storage\n- Exit cleanly\n- Let the daemon orchestrator respawn a fresh Deacon\n\nThe daemon ensures Deacon is always running:\n```bash\n# Daemon respawns on exit\ngt daemon status\n```\n\nThis enables infinite patrol duration via context-aware respawning.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T09:55:41.720135-08:00","updated_at":"2025-12-28T09:55:41.720135-08:00","dependencies":[{"issue_id":"gt-eph-ucl","depends_on_id":"gt-eph-hfj","type":"parent-child","created_at":"2025-12-28T09:55:41.775524-08:00","created_by":"deacon"},{"issue_id":"gt-eph-ucl","depends_on_id":"gt-eph-bf1","type":"blocks","created_at":"2025-12-28T09:55:41.841216-08:00","created_by":"deacon"}]}
{"id":"gt-eph-uqs","title":"Evaluate pending async gates","description":"Evaluate pending async gates.\n\nGates are async coordination primitives that block until conditions are met.\nThe Deacon is responsible for monitoring gates and closing them when ready.\n\n**Timer gates** (await_type: timer):\nCheck if elapsed time since creation exceeds the timeout duration.\n\n```bash\n# List all open gates\nbd gate list --json\n\n# For each timer gate, check if elapsed:\n# - CreatedAt + Timeout \u003c Now → gate is ready to close\n# - Close with: bd gate close \u003cid\u003e --reason \"Timer elapsed\"\n```\n\n**GitHub gates** (await_type: gh:run, gh:pr) - handled in separate step.\n\n**Human/Mail gates** - require external input, skip here.\n\nAfter closing a gate, the Waiters field contains mail addresses to notify.\nSend a brief notification to each waiter that the gate has cleared.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T09:54:49.166022-08:00","updated_at":"2025-12-28T09:55:21.2336-08:00","closed_at":"2025-12-28T09:55:21.2336-08:00"}
{"id":"gt-eph-xvc","title":"Burn and respawn or loop","description":"Burn and let daemon respawn, or exit if context high.\n\nDecision point at end of patrol cycle:\n\nIf context is LOW:\n- Sleep briefly (avoid tight loop)\n- Return to inbox-check step\n\nIf context is HIGH:\n- Write state to persistent storage\n- Exit cleanly\n- Let the daemon orchestrator respawn a fresh Deacon\n\nThe daemon ensures Deacon is always running:\n```bash\n# Daemon respawns on exit\ngt daemon status\n```\n\nThis enables infinite patrol duration via context-aware respawning.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T09:54:49.167697-08:00","updated_at":"2025-12-28T09:55:21.262397-08:00","closed_at":"2025-12-28T09:55:21.262397-08:00"}
{"id":"gt-erssy","title":"Digest: mol-deacon-patrol","description":"Patrol 2: all agents healthy, no issues","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:28:00.465093-08:00","updated_at":"2025-12-28T01:28:00.465093-08:00","closed_at":"2025-12-28T01:28:00.465059-08:00"}
{"id":"gt-esn0p","title":"Digest: mol-deacon-patrol","description":"Patrol 15: Quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T07:28:41.665377-08:00","updated_at":"2025-12-25T07:28:41.665377-08:00","closed_at":"2025-12-25T07:28:41.66534-08:00"}
{"id":"gt-euqqj","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 7: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:21:49.632344-08:00","updated_at":"2025-12-28T11:21:49.632344-08:00","closed_at":"2025-12-28T11:21:49.632309-08:00"}
{"id":"gt-eya9s","title":"Digest: mol-deacon-patrol","description":"Patrol 17: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:05:03.826486-08:00","updated_at":"2025-12-25T00:05:03.826486-08:00","closed_at":"2025-12-25T00:05:03.826456-08:00"}
{"id":"gt-ez8ta","title":"Digest: mol-deacon-patrol","description":"Patrol 10: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:02:49.759668-08:00","updated_at":"2025-12-25T00:02:49.759668-08:00","closed_at":"2025-12-25T00:02:49.759639-08:00"}
{"id":"gt-f165","title":"Pinned bead naming convention for all roles","description":"Establish consistent naming convention for pinned beads across all roles.\n\n## Problem\n\nEvery role needs a pinned bead for molecule attachment, handoff state, and identity.\nWe need a consistent naming convention so gt tools can find the pinned bead for any role.\n\n## Proposed Convention\n\n {role}.pinned - Singleton roles (deacon, mayor)\n {rig}-{role}.pinned - Per-rig roles (witness, refinery)\n {rig}-{name}.pinned - Named agents (polecats, crew)\n\nExamples:\n- deacon.pinned\n- mayor.pinned\n- gastown-witness.pinned\n- gastown-refinery.pinned\n- gastown-furiosa.pinned (polecat)\n- gastown-max.pinned (crew)\n\n## Storage Location\n\n| Role | Pinned Bead Location |\n|------|---------------------|\n| Mayor | ~/gt/.beads/ (town level) |\n| Deacon | ~/gt/.beads/ (town level) |\n| Witness | {rig}/.beads/ (rig level) |\n| Refinery | {rig}/.beads/ (rig level) |\n| Polecat | {rig}/polecats/{name}/.beads/ |\n| Crew | {rig}/crew/{name}/.beads/ |\n\n## Why This Matters\n\n1. Name recycling: Polecats reuse names so their pinned beads persist\n2. Molecule attachment: gt mol bond needs to find the pinned bead\n3. gt prime: Can show you are working on X from pinned bead\n4. Crash recovery: Resume from pinned beads attached molecule\n\n## Tasks\n\n- Document naming convention in architecture.md\n- Update gt prime to find pinned bead by convention\n- Update gt mol bond to use conventional name\n- Create pinned beads on role startup if missing\n- Add gt pinned command to show/manage pinned beads\n\n## Related\n\n- gt-rana.1: Attachment field on pinned beads (closed)\n- gt-id36.2: Deacon marching orders (pinned bead)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T03:04:17.116117-08:00","updated_at":"2025-12-22T03:04:17.116117-08:00"}
{"id":"gt-f17kc","title":"Digest: mol-deacon-patrol","description":"Patrol 17: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T16:53:28.761754-08:00","updated_at":"2025-12-26T16:53:28.761754-08:00","closed_at":"2025-12-26T16:53:28.761714-08:00"}
{"id":"gt-f27ec","title":"Digest: mol-deacon-patrol","description":"Patrol 16: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:09:58.235293-08:00","updated_at":"2025-12-28T03:09:58.235293-08:00","closed_at":"2025-12-28T03:09:58.235257-08:00"}
{"id":"gt-f9x","title":"Town \u0026 Rig Management: install, doctor, federation","description":"Reify the Gas Town installation as a first-class concept.\n\n## Goals\n- Installable: gt install [path] creates complete installation\n- Diagnosable: gt doctor checks and fixes issues\n- Federable: Clone town to VMs with central control\n\n## Architecture Reference\n\nSee docs/architecture.md for full design, especially:\n- Directory structure (Town Level / Rig Level sections)\n- Configuration (town.json, rigs.json schemas)\n- Key design decisions (visible config dir, decentralized agents)","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-15T16:36:37.344283-08:00","updated_at":"2025-12-27T14:20:24.688029-08:00","dependencies":[{"issue_id":"gt-f9x","depends_on_id":"gt-u1j.1","type":"blocks","created_at":"2025-12-15T16:37:32.3363-08:00","created_by":"daemon"}]}
{"id":"gt-f9x.10","title":"Extended addressing: Parse [machine:]rig/polecat","description":"Extended addressing for cross-machine operations.\n\n## Address Format\n\n```\n[machine:]rig/polecat\n```\n\nExamples:\n- `wyvern/Toast` - Local machine, wyvern rig, Toast polecat\n- `gcp-vm-1:wyvern/Toast` - Remote machine\n- `wyvern/` - Broadcast to rig\n- `gcp-vm-1:wyvern/` - Broadcast to remote rig\n\n## Parser\n\n```go\ntype Address struct {\n Machine string // empty = local\n Rig string\n Polecat string // empty = broadcast\n}\n\nfunc ParseAddress(s string) (*Address, error)\nfunc (a *Address) String() string\nfunc (a *Address) IsLocal() bool\nfunc (a *Address) IsBroadcast() bool\n```\n\n## Validation\n\n```go\nfunc (a *Address) Validate(registry *MachineRegistry) error\n```\n- Machine must exist in registry (if specified)\n- Rig must exist on machine\n- Polecat must exist (if specified)\n\n## Usage\n\nAll CLI commands that take addresses use ParseAddress:\n```go\n// gt mail send gcp-vm-1:wyvern/Toast -s \"Hello\"\naddr, _ := ParseAddress(\"gcp-vm-1:wyvern/Toast\")\nconn, _ := registry.Connection(addr.Machine)\n// Use conn for operations\n```\n\n## Backward Compatibility\n\nExisting `rig/polecat` addresses work unchanged (Machine defaults to local).","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-15T16:37:23.426567-08:00","updated_at":"2025-12-15T23:17:18.734281-08:00","dependencies":[{"issue_id":"gt-f9x.10","depends_on_id":"gt-f9x","type":"parent-child","created_at":"2025-12-15T16:37:23.426926-08:00","created_by":"daemon"}]}
{"id":"gt-f9x.5","title":"Workspace doctor checks: Config, state, mail, Mayor, rigs","description":"Workspace-level doctor checks.\n\n## Checks\n\n### ConfigExists\n- Verify config/ directory exists\n- Verify config/town.json exists\n- Fix: Cannot auto-fix (need gt install)\n\n### ConfigValid\n- Parse town.json\n- Verify required fields (type, version, name)\n- Verify type == \"town\"\n- Fix: Cannot auto-fix\n\n### RigsRegistryValid\n- Parse config/rigs.json\n- Verify each registered rig directory exists\n- Warn on missing rigs\n- Fix: Remove missing rigs from registry\n\n### MayorExists\n- Verify mayor/ directory exists\n- Verify mayor/CLAUDE.md exists\n- Fix: Create from template\n\n### MayorMailboxExists\n- Verify mayor/mail/ directory exists\n- Verify mayor/mail/inbox.jsonl exists (can be empty)\n- Fix: Create directory and empty file\n\n### MayorStateValid\n- Parse mayor/state.json if exists\n- Verify valid JSON\n- Fix: Reset to default state\n\n## Implementation\n\n```go\nvar WorkspaceChecks = []Check{\n \u0026ConfigExistsCheck{},\n \u0026ConfigValidCheck{},\n \u0026RigsRegistryValidCheck{},\n \u0026MayorExistsCheck{},\n \u0026MayorMailboxExistsCheck{},\n \u0026MayorStateValidCheck{},\n}\n```","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-15T16:37:05.267701-08:00","updated_at":"2025-12-27T14:20:24.715353-08:00","dependencies":[{"issue_id":"gt-f9x.5","depends_on_id":"gt-f9x","type":"parent-child","created_at":"2025-12-15T16:37:05.268035-08:00","created_by":"daemon"},{"issue_id":"gt-f9x.5","depends_on_id":"gt-f9x.4","type":"blocks","created_at":"2025-12-15T16:37:34.289236-08:00","created_by":"daemon"},{"issue_id":"gt-f9x.5","depends_on_id":"gt-f9x.2","type":"blocks","created_at":"2025-12-15T16:37:34.380374-08:00","created_by":"daemon"}]}
{"id":"gt-f9x.6","title":"Rig doctor checks: Refinery health, clones, gitignore","description":"Rig-level doctor checks.\n\n## Checks\n\n### RigIsGitRepo\n- Verify .git/ directory exists\n- Verify git status works\n- Fix: Cannot auto-fix\n\n### GitExcludeConfigured\n- Check .git/info/exclude contains Gas Town dirs\n- Required entries: polecats/ witness/ refinery/ mayor/\n- Fix: Append missing entries\n\n### WitnessExists\n- Verify witness/ directory exists\n- Verify witness/rig/ is a git clone\n- Verify witness/mail/inbox.jsonl exists\n- Fix: Create structure, clone repo\n\n### RefineryExists\n- Verify refinery/ directory exists\n- Verify refinery/rig/ is a git clone\n- Verify refinery/mail/inbox.jsonl exists\n- Fix: Create structure, clone repo\n\n### MayorCloneExists\n- Verify mayor/ directory exists\n- Verify mayor/rig/ is a git clone\n- Fix: Create structure, clone repo\n\n### PolecatClonesValid\n- For each polecat in polecats/:\n - Verify is a git clone\n - Verify on polecat branch\n - Warn if has uncommitted changes\n- Fix: Cannot auto-fix (data loss risk)\n\n### BeadsConfigValid (if applicable)\n- If .beads/ exists, verify bd commands work\n- Check beads sync status\n- Warn if out of sync\n- Fix: Run bd sync\n\n## Implementation\n\n```go\nvar RigChecks = []Check{\n \u0026RigIsGitRepoCheck{},\n \u0026GitExcludeConfiguredCheck{},\n \u0026WitnessExistsCheck{},\n \u0026RefineryExistsCheck{},\n \u0026MayorCloneExistsCheck{},\n \u0026PolecatClonesValidCheck{},\n \u0026BeadsConfigValidCheck{},\n}\n```","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-15T16:37:06.543281-08:00","updated_at":"2025-12-27T14:20:24.741506-08:00","dependencies":[{"issue_id":"gt-f9x.6","depends_on_id":"gt-f9x","type":"parent-child","created_at":"2025-12-15T16:37:06.543796-08:00","created_by":"daemon"},{"issue_id":"gt-f9x.6","depends_on_id":"gt-f9x.4","type":"blocks","created_at":"2025-12-15T16:37:34.46868-08:00","created_by":"daemon"}]}
{"id":"gt-f9x.7","title":"Connection interface: Protocol for local/remote ops","description":"Abstract interface for local vs remote (SSH) operations.\n\n## Concept\n\nEnable Gas Town to manage rigs on remote machines via SSH. The Connection interface abstracts whether operations happen locally or remotely.\n\n## Interface\n\n```go\ntype Connection interface {\n // Identification\n Name() string\n IsLocal() bool\n\n // File operations\n ReadFile(path string) ([]byte, error)\n WriteFile(path string, data []byte, perm os.FileMode) error\n MkdirAll(path string, perm os.FileMode) error\n Remove(path string) error\n Stat(path string) (os.FileInfo, error)\n Glob(pattern string) ([]string, error)\n\n // Command execution\n Exec(cmd string, args ...string) ([]byte, error)\n ExecDir(dir, cmd string, args ...string) ([]byte, error)\n\n // Tmux (for session management)\n TmuxNewSession(name, dir string) error\n TmuxKillSession(name string) error\n TmuxSendKeys(session, keys string) error\n TmuxCapturePane(session string, lines int) (string, error)\n}\n```\n\n## Implementations\n\n- LocalConnection (gt-f9x.8): Direct file/exec operations\n- SSHConnection (future): Operations via SSH\n\n## Usage\n\n```go\nfunc NewRigManager(conn Connection, ...) *RigManager\n\n// Operations work the same regardless of connection type\nrm.DiscoverRigs() // uses conn.Glob, conn.ReadFile\n```\n\n## Design Notes\n\n- Connection obtained from MachineRegistry (gt-f9x.9)\n- Default is always local\n- SSH connection requires machine config (host, key, user)","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-15T16:37:07.764838-08:00","updated_at":"2025-12-15T23:17:18.465919-08:00","dependencies":[{"issue_id":"gt-f9x.7","depends_on_id":"gt-f9x","type":"parent-child","created_at":"2025-12-15T16:37:07.765169-08:00","created_by":"daemon"}]}
{"id":"gt-f9x.8","title":"LocalConnection: Local file/exec/tmux operations","description":"LocalConnection implementation for local machine operations.\n\n## Implementation\n\n```go\ntype LocalConnection struct {\n tmux *Tmux\n}\n\nfunc NewLocalConnection() *LocalConnection\n\nfunc (c *LocalConnection) Name() string { return \"local\" }\nfunc (c *LocalConnection) IsLocal() bool { return true }\n```\n\n## File Operations\n\nDirect passthrough to os package:\n```go\nfunc (c *LocalConnection) ReadFile(path string) ([]byte, error) {\n return os.ReadFile(path)\n}\n// etc.\n```\n\n## Command Execution\n\nUses exec.Command:\n```go\nfunc (c *LocalConnection) Exec(cmd string, args ...string) ([]byte, error) {\n return exec.Command(cmd, args...).Output()\n}\n```\n\n## Tmux\n\nDelegates to Tmux wrapper:\n```go\nfunc (c *LocalConnection) TmuxNewSession(name, dir string) error {\n return c.tmux.NewSession(name, dir)\n}\n```\n\n## Notes\n\nStraightforward implementation - this is the \"baseline\" connection that SSHConnection will mirror remotely.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-15T16:37:19.879102-08:00","updated_at":"2025-12-15T23:17:18.556669-08:00","dependencies":[{"issue_id":"gt-f9x.8","depends_on_id":"gt-f9x","type":"parent-child","created_at":"2025-12-15T16:37:19.879451-08:00","created_by":"daemon"},{"issue_id":"gt-f9x.8","depends_on_id":"gt-f9x.7","type":"blocks","created_at":"2025-12-15T16:37:36.087392-08:00","created_by":"daemon"}]}
{"id":"gt-f9x.9","title":"Machine registry: Store and manage machine configs","description":"Registry for managing remote machines in federation.\n\n## Data Model\n\n```go\ntype Machine struct {\n Name string `json:\"name\"`\n Type string `json:\"type\"` // \"local\", \"ssh\", \"gcp\"\n Host string `json:\"host\"` // for ssh: user@host\n KeyPath string `json:\"key_path\"` // SSH key path\n TownPath string `json:\"town_path\"` // Path to town on remote\n}\n```\n\n## Interface\n\n```go\ntype MachineRegistry struct {\n path string // config/federation.json\n machines map[string]*Machine\n}\n\nfunc NewMachineRegistry(configPath string) *MachineRegistry\nfunc (r *MachineRegistry) Get(name string) (*Machine, error)\nfunc (r *MachineRegistry) Add(m *Machine) error\nfunc (r *MachineRegistry) Remove(name string) error\nfunc (r *MachineRegistry) List() []*Machine\nfunc (r *MachineRegistry) Connection(name string) (Connection, error)\n```\n\n## Storage\n\nfederation.json in config/:\n```json\n{\n \"version\": 1,\n \"machines\": {\n \"local\": {\"type\": \"local\"},\n \"gcp-vm-1\": {\n \"type\": \"ssh\",\n \"host\": \"user@10.0.0.1\",\n \"key_path\": \"~/.ssh/gcp_key\",\n \"town_path\": \"/home/user/ai\"\n }\n }\n}\n```\n\n## Connection Factory\n\n```go\nfunc (r *MachineRegistry) Connection(name string) (Connection, error) {\n m := r.machines[name]\n switch m.Type {\n case \"local\":\n return NewLocalConnection(), nil\n case \"ssh\":\n return NewSSHConnection(m.Host, m.KeyPath), nil\n }\n}\n```","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-15T16:37:21.968099-08:00","updated_at":"2025-12-15T23:17:18.644857-08:00","dependencies":[{"issue_id":"gt-f9x.9","depends_on_id":"gt-f9x","type":"parent-child","created_at":"2025-12-15T16:37:21.968442-08:00","created_by":"daemon"},{"issue_id":"gt-f9x.9","depends_on_id":"gt-f9x.7","type":"blocks","created_at":"2025-12-15T16:37:36.174052-08:00","created_by":"daemon"}]}
{"id":"gt-fbz1z","title":"gt sling: Set status=hooked instead of pinned","description":"Update gt sling to use the new 'hooked' status when attaching work to an agent's hook.\n\n## Current Behavior\n\ngt sling sets status='pinned' on the work item.\n\n## New Behavior\n\ngt sling sets status='hooked' on the work item.\n\n## Files to Update\n\n- internal/cmd/sling.go (or wherever sling logic lives)\n- Any tests that expect pinned status after sling\n\n## CROSS-RIG DEPENDENCY\n\n**BLOCKED BY: bd-s00m.1** (Schema: Add 'hooked' as valid status)\n\nThis task cannot start until the beads schema change is deployed. The 'hooked' status must be valid before gt can use it.\n\n## Verification\n\n1. gt sling gt-xyz gastown/furiosa\n2. bd show gt-xyz → status should be 'hooked'\n3. bd ready should NOT show gt-xyz's dependents","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-28T22:17:14.108582-08:00","created_by":"stevey","updated_at":"2025-12-29T12:49:34.868196-08:00","closed_at":"2025-12-29T12:49:34.868196-08:00","close_reason":"Implemented in sling.go"}
{"id":"gt-fgmw1","title":"Add tests for critical untested packages","description":"Several packages have no tests:\n\nHigh priority (critical functionality):\n- internal/lock/ - file locking\n- internal/mail/router.go, mailbox.go - agent communication\n- internal/mrqueue/ - merge request queue\n- internal/refinery/ (manager_test.go missing for complex merge logic)\n\nMedium priority:\n- internal/claude/ - settings management\n- internal/wisp/ - ephemeral workflow\n- internal/constants/ - constant values\n\nLow priority:\n- internal/style/ - terminal styling\n\nThe refinery package is especially concerning - it has complex merge, conflict, and retry logic with no tests.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:43:15.001052-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:47:20.07848-08:00","closed_at":"2025-12-28T15:47:20.07848-08:00"}
{"id":"gt-filp0","title":"Digest: mol-deacon-patrol","description":"Patrol complete: no inbox, no polecats, cleaned 3 stale locks, witnesses/refineries intentionally stopped","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:15:08.238041-08:00","updated_at":"2025-12-28T19:15:08.238041-08:00","closed_at":"2025-12-28T19:15:08.238-08:00"}
{"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-fpu13","title":"Digest: mol-deacon-patrol","description":"Patrol 3: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T15:32:59.323268-08:00","updated_at":"2025-12-25T15:32:59.323268-08:00","closed_at":"2025-12-25T15:32:59.32324-08:00"}
{"id":"gt-fqcz","title":"Add gate timeout tracking and notification","description":"Implement timeout and notification logic for gates.\n\n## Timeout Behavior\n1. Gate created with timeout (e.g., 30m)\n2. Deacon tracks elapsed time during patrol\n3. If timeout reached:\n - Notify all waiters: 'Gate timed out'\n - Close gate with timeout reason\n - Waiter can retry, escalate, or fail gracefully\n\n## Notification\n- Use gt mail send to notify waiters\n- Include gate ID, await type, and reason in message\n- Support multiple waiters notification\n\n## Moved from beads\nOriginally bd-ykqu. Gate notifications are Deacon's job in gastown.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T12:19:18.268978-08:00","updated_at":"2025-12-23T12:19:18.268978-08:00","dependencies":[{"issue_id":"gt-fqcz","depends_on_id":"gt-dh65","type":"blocks","created_at":"2025-12-23T12:19:32.873641-08:00","created_by":"stevey"}]}
{"id":"gt-fvuje","title":"Extract shared state load/save pattern to generic helper","description":"Nearly identical loadState/saveState methods in:\n- internal/witness/manager.go (lines 39-72)\n- internal/refinery/manager.go (lines 63-96)\n- internal/crew/manager.go (lines 257-306)\n\nAll use the same pattern: read JSON file, handle not-exists, unmarshal/marshal.\n\nSuggestion: Create a generic stateStore[T any] helper in a shared package.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:43:08.980157-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:47:24.192166-08:00","closed_at":"2025-12-28T15:47:24.192166-08:00"}
{"id":"gt-fy11w","title":"Daemon patrol should clean stale locks","description":"The gt daemon patrol cycle should detect and clean up stale locks.\n\n## Problem\nIf daemon crashes or there are orphaned locks, they can block operations indefinitely.\n\n## Proposed Solution\nDuring patrol cycle:\n1. Check for lock files older than threshold (e.g., 5 minutes)\n2. Verify owning process is dead (check PID if stored)\n3. Remove stale locks\n4. Log cleanup for audit","status":"open","priority":3,"issue_type":"feature","created_at":"2025-12-26T23:13:37.681972-08:00","created_by":"mayor","updated_at":"2025-12-26T23:13:37.681972-08:00"}
{"id":"gt-fyt31","title":"Digest: mol-deacon-patrol","description":"Patrol 9: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:45:59.65526-08:00","updated_at":"2025-12-28T19:45:59.65526-08:00","closed_at":"2025-12-28T19:45:59.655224-08:00"}
{"id":"gt-fz2o1","title":"Digest: mol-deacon-patrol","description":"Patrol 5: clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T14:23:14.185469-08:00","updated_at":"2025-12-26T14:23:14.185469-08:00","closed_at":"2025-12-26T14:23:14.18543-08:00"}
{"id":"gt-g6kor","title":"Standardize warning output to use style.Warning","description":"attached_args: Standardize warning output to use style.Warning\n\nUnify warning message formatting across codebase.\n\n## Files to modify\n- internal/cmd/start.go\n- internal/cmd/polecat.go\n- internal/cmd/mail.go\n- Any other files with inconsistent warning output\n\n## Current inconsistency\n```go\nfmt.Printf(\"%s Warning: ...\", style.Dim.Render(\"⚠\"))\nfmt.Printf(\"Warning: %s\", ...)\nfmt.Fprintf(os.Stderr, \"warning: ...\")\n```\n\n## Standard pattern\nCreate helper if needed:\n```go\n// In internal/style/style.go\nfunc PrintWarning(format string, args ...interface{}) {\n msg := fmt.Sprintf(format, args...)\n fmt.Printf(\"%s %s\\n\", Warning.Render(\"⚠ Warning:\"), msg)\n}\n```\n\n## Acceptance criteria\n- [ ] PrintWarning helper in style package\n- [ ] All warning outputs use consistent format\n- [ ] Warnings go to stdout (not stderr) for consistency\n- [ ] grep -rn 'Warning:' internal/cmd/ shows consistent format\n- [ ] go build ./... passes","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T15:49:21.941535-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T16:37:55.053607-08:00","closed_at":"2025-12-28T16:37:55.053607-08:00"}
{"id":"gt-gastown-crew-fang","title":"Crew worker fang in gastown - human-managed persistent workspace.","description":"Crew worker fang in gastown - human-managed persistent workspace.\n\nrole_type: crew\nrig: gastown\nagent_state: idle\nhook_bead: null\nrole_bead: gt-crew-role\ncleanup_status: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-29T14:48:31.614218-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:56:24.101811-08:00","closed_at":"2025-12-29T14:56:24.101811-08:00","close_reason":"Crew moved to beads rig","role_bead":"gt-crew-role"}
{"id":"gt-gastown-crew-grip","title":"Crew worker grip in gastown - human-managed persistent workspace.","description":"Crew worker grip in gastown - human-managed persistent workspace.\n\nrole_type: crew\nrig: gastown\nagent_state: idle\nhook_bead: null\nrole_bead: gt-crew-role\ncleanup_status: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-29T14:48:47.052927-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:56:24.095719-08:00","closed_at":"2025-12-29T14:56:24.095719-08:00","close_reason":"Crew moved to beads rig","role_bead":"gt-crew-role"}
{"id":"gt-gastown-crew-jack","title":"Crew worker jack in gastown - human-managed persistent workspace.","description":"Crew worker jack in gastown - human-managed persistent workspace.\n\nrole_type: crew\nrig: gastown\nagent_state: idle\nhook_bead: null\nrole_bead: gt-crew-role\ncleanup_status: null","status":"open","priority":2,"issue_type":"agent","created_at":"2025-12-29T14:49:02.451898-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:49:07.582526-08:00","role_bead":"gt-crew-role"}
{"id":"gt-gastown-crew-joe","title":"Crew worker joe in gastown - human-managed persistent workspace.","description":"Crew worker joe in gastown - human-managed persistent workspace.\n\nrole_type: crew\nrig: gastown\nagent_state: running\nhook_bead: null\nrole_bead: gt-crew-role\ncleanup_status: null","status":"open","priority":2,"issue_type":"agent","created_at":"2025-12-29T14:49:17.861869-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T16:09:51.042565-08:00","role_bead":"gt-crew-role"}
{"id":"gt-gastown-crew-max","title":"Crew worker max in gastown - human-managed persistent workspace.","description":"Crew worker max in gastown - human-managed persistent workspace.\n\nrole_type: crew\nrig: gastown\nagent_state: running\nhook_bead: null\nrole_bead: gt-crew-role\ncleanup_status: null","status":"open","priority":2,"issue_type":"agent","created_at":"2025-12-29T14:49:33.272043-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T16:03:28.80105-08:00","role_bead":"gt-crew-role"}
{"id":"gt-gastown-crew-wolf","title":"Crew worker wolf in gastown","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-29T14:52:01.595469-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:56:24.107543-08:00","closed_at":"2025-12-29T14:56:24.107543-08:00","close_reason":"Crew moved to beads rig"}
{"id":"gt-gastown-refinery","title":"Refinery for gastown - processes merge queue.","description":"Refinery for gastown - processes merge queue.\n\nrole_type: refinery\nrig: gastown\nagent_state: idle\nhook_bead: null\nrole_bead: gt-refinery-role\ncleanup_status: null","status":"open","priority":2,"issue_type":"agent","created_at":"2025-12-29T14:48:16.178399-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:48:21.310853-08:00","role_bead":"gt-refinery-role"}
{"id":"gt-gastown-witness","title":"Witness for gastown - monitors polecat health and progress.","description":"Witness for gastown - monitors polecat health and progress.\n\nrole_type: witness\nrig: gastown\nagent_state: idle\nhook_bead: null\nrole_bead: gt-witness-role\ncleanup_status: null","status":"open","priority":2,"issue_type":"agent","created_at":"2025-12-29T14:48:00.691337-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:48:05.85228-08:00","role_bead":"gt-witness-role"}
{"id":"gt-gcnnr","title":"Add logging for silently ignored errors","description":"attached_args: Add logging for silently ignored errors\n\nAdd logging for silently ignored errors.\n\n## Problem\nMany places use `_ =` pattern to ignore errors without any logging, making debugging difficult.\n\n## Files to modify\n- internal/cmd/start.go (lines 167, 322-323, 429, 747-753, 886-888)\n- internal/cmd/polecat.go (search for `_ =`)\n- internal/session/manager.go (lines 140-154)\n- internal/refinery/manager.go (line 399)\n- internal/keepalive/keepalive.go (document as intentional)\n\n## Implementation options\n\n### Option A: Add comments explaining safety\n```go\n_ = m.saveState(ref) // Non-fatal: state will be recreated on next run\n```\n\n### Option B: Log warnings (preferred for important operations)\n```go\nif err := m.saveState(ref); err != nil {\n log.Printf(\"warning: failed to save state: %v\", err)\n}\n```\n\n## Guidelines\n- Use logging for: state saves, config writes, cleanup operations\n- Use comments for: truly benign operations (e.g., closing already closed file)\n- keepalive is intentionally best-effort - add package-level comment\n\n## Acceptance criteria\n- [ ] All `_ =` in start.go have comment OR logging\n- [ ] All `_ =` in session/manager.go have comment OR logging \n- [ ] refinery/manager.go:399 has logging\n- [ ] keepalive package has doc comment explaining best-effort design\n- [ ] grep '`_ =`' shows all have justification\n- [ ] go build ./... passes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:43:13.787806-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T16:40:19.539625-08:00","closed_at":"2025-12-28T16:40:19.539625-08:00"}
{"id":"gt-gdhee","title":"Digest: mol-deacon-patrol","description":"Cycle 15: quiet, handoff for fresh context","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:24:00.135165-08:00","updated_at":"2025-12-28T13:24:00.135165-08:00","closed_at":"2025-12-28T13:24:00.135129-08:00"}
{"id":"gt-giyhp","title":"Bug: gt sling doesn't update agent bead hook_bead field","description":"gt sling marks task as pinned with assignee, but doesn't update the agent bead's hook_bead field. Agent beads show hook_bead: null even after slinging. This prevents agents from knowing they have work on their hook.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-28T16:19:01.206912-08:00","created_by":"stevey","updated_at":"2025-12-28T16:21:08.592848-08:00","closed_at":"2025-12-28T16:21:08.592848-08:00"}
{"id":"gt-gizsv","title":"Day 3.2: Witness reads agent beads for polecat state","description":"Witness patrol reads polecat state from agent beads:\n- bd list --type=agent --role_type=polecat\n- For each, check state field\n- If state=running, check progress\n- If state=stuck, handle stuck protocol\n\nNo more PID/tmux inference.\n\nParent: gt-hwka3","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:03.267386-08:00","created_by":"mayor","updated_at":"2025-12-28T09:42:16.843615-08:00","closed_at":"2025-12-28T09:42:16.843615-08:00","dependencies":[{"issue_id":"gt-gizsv","depends_on_id":"gt-hwka3","type":"parent-child","created_at":"2025-12-27T20:58:46.785298-08:00","created_by":"daemon"},{"issue_id":"gt-gizsv","depends_on_id":"gt-qpoxz","type":"blocks","created_at":"2025-12-27T20:58:57.74074-08:00","created_by":"daemon"},{"issue_id":"gt-gizsv","depends_on_id":"gt-dtw9u","type":"relates-to","created_at":"2025-12-27T20:59:11.760004-08:00","created_by":"daemon"},{"issue_id":"gt-gizsv","depends_on_id":"gt-k294l","type":"blocks","created_at":"2025-12-27T23:17:28.218839-08:00","created_by":"daemon"}]}
{"id":"gt-gkbmj","title":"Digest: mol-deacon-patrol","description":"Patrol 16: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:35:27.242285-08:00","updated_at":"2025-12-28T01:35:27.242285-08:00","closed_at":"2025-12-28T01:35:27.242252-08:00"}
{"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-gmcfm","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 18: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:49.827708-08:00","updated_at":"2025-12-28T11:22:49.827708-08:00","closed_at":"2025-12-28T11:22:49.827674-08:00"}
{"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"}
{"id":"gt-gpgdv","title":"Optimize: Share stepMap across control flow operators","description":"In ApplyControlFlow, both ApplyBranches and ApplyGates call buildStepMap() separately:\n\n```go\nfunc ApplyBranches(steps []*Step, compose *ComposeRules) ([]*Step, error) {\n stepMap := buildStepMap(steps) // Called here\n ...\n}\n\nfunc ApplyGates(steps []*Step, compose *ComposeRules) ([]*Step, error) {\n stepMap := buildStepMap(steps) // Called again here\n ...\n}\n```\n\nThis is inefficient for large formulas. Options:\n\n1. Pass stepMap as a parameter to ApplyBranches/ApplyGates\n2. Create an internal version that accepts stepMap, keep public API unchanged\n3. Build once in ApplyControlFlow and pass down\n\nLow priority since formula sizes are typically small.","status":"open","priority":4,"issue_type":"chore","created_at":"2025-12-25T15:14:10.961538-08:00","updated_at":"2025-12-25T15:14:10.961538-08:00","dependencies":[{"issue_id":"gt-gpgdv","depends_on_id":"gt-8tmz.4","type":"blocks","created_at":"2025-12-25T15:14:19.033379-08:00","created_by":"daemon"}]}
{"id":"gt-gsjfz","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 8: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:21:58.343607-08:00","updated_at":"2025-12-28T11:21:58.343607-08:00","closed_at":"2025-12-28T11:21:58.343574-08:00"}
{"id":"gt-gswn","title":"Integration test: agent waits for CI via gate","description":"End-to-end test of the gate workflow.\n\n## Test Scenario\n1. Agent creates gate: bd gate create --await gh:run:123 --timeout 5m --notify beads/dave\n2. Agent writes handoff and exits\n3. Deacon patrol checks gate condition\n4. (Mock) GitHub run completes\n5. Deacon notifies waiter and closes gate\n6. New agent session reads mail and resumes\n\n## Test Requirements\n- Mock GitHub API responses\n- Test timeout path\n- Test multiple waiters\n- Verify mail notifications sent\n\n## Moved from beads\nOriginally bd-rl5t. Tests Deacon patrol which is in gastown.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T12:23:56.582834-08:00","updated_at":"2025-12-23T12:23:56.582834-08:00","dependencies":[{"issue_id":"gt-gswn","depends_on_id":"gt-dh65","type":"blocks","created_at":"2025-12-23T12:24:01.787444-08:00","created_by":"stevey"}]}
{"id":"gt-gt2wl","title":"Digest: mol-deacon-patrol","description":"Patrol 16: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:04:46.889415-08:00","updated_at":"2025-12-25T00:04:46.889415-08:00","closed_at":"2025-12-25T00:04:46.88938-08:00"}
{"id":"gt-gu3bk","title":"Digest: mol-deacon-patrol","description":"Patrol 20: all healthy, new polecats spawning","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:57:43.25526-08:00","updated_at":"2025-12-28T15:57:43.25526-08:00","closed_at":"2025-12-28T15:57:43.255222-08:00"}
{"id":"gt-guqza","title":"Digest: mol-deacon-patrol","description":"Patrol 5: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T15:38:57.363614-08:00","updated_at":"2025-12-25T15:38:57.363614-08:00","closed_at":"2025-12-25T15:38:57.363584-08:00"}
{"id":"gt-gzp2y","title":"Day 1.1b: Add type=role to bead schema","description":"Add role as a valid bead type in the schema.\n\nRole beads define agent behavior:\n- Priming instructions (from current CLAUDE.md content)\n- default_molecule field\n- capabilities list\n\nThis enables Day 1.5 (creating role beads from CLAUDE.md).\n\nMust be done alongside type=agent schema work.","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-27T23:17:10.456454-08:00","created_by":"mayor","updated_at":"2025-12-27T23:39:09.219483-08:00","closed_at":"2025-12-27T23:39:09.219483-08:00","dependencies":[{"issue_id":"gt-gzp2y","depends_on_id":"gt-ikyo1","type":"blocks","created_at":"2025-12-27T23:17:26.728179-08:00","created_by":"daemon"}]}
{"id":"gt-h0v5","title":"Add keyboard navigation and filtering","description":"Keyboard navigation: j/k or arrows to move, enter to expand/collapse, q to quit. Filtering: by rig name, worker name, event type. Search within activity stream.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-23T16:27:20.27464-08:00","updated_at":"2025-12-23T16:27:20.27464-08:00","dependencies":[{"issue_id":"gt-h0v5","depends_on_id":"gt-tr0a","type":"blocks","created_at":"2025-12-23T16:27:40.14167-08:00","created_by":"daemon"},{"issue_id":"gt-h0v5","depends_on_id":"gt-55kx","type":"blocks","created_at":"2025-12-23T16:27:40.224089-08:00","created_by":"daemon"},{"issue_id":"gt-h0v5","depends_on_id":"gt-rivr","type":"parent-child","created_at":"2025-12-23T16:28:31.027436-08:00","created_by":"daemon"}]}
{"id":"gt-h262","title":"bd ready --blockers: prioritize issues that block other work","description":"bd ready should prioritize issues that are blocking other work.\n\n**From VC**: Blocker-first prioritization in GetReadyWork(). ~100 lines.\nAlgorithm: baseline-failure first, then discovered:blocker, then by priority.\n\n**Gas Town implementation**: CLI flag or default behavior:\n```bash\nbd ready --blockers-first # Or make this default\n```\n\nChecks dependency graph. Issues with many dependents surface first.\n\n**Value**: Unblocks parallelism faster. Critical path gets cleared.\n\n**VC lesson**: Without blocker priority, work can starve on discovered issues.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-20T20:30:18.426957-08:00","updated_at":"2025-12-20T20:30:18.426957-08:00","dependencies":[{"issue_id":"gt-h262","depends_on_id":"gt-zhpa","type":"parent-child","created_at":"2025-12-20T20:30:27.664473-08:00","created_by":"daemon"}]}
{"id":"gt-h2cvm","title":"Digest: mol-deacon-patrol","description":"Patrol 18: all healthy, handled 1 handoff msg","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:12:03.408989-08:00","updated_at":"2025-12-27T23:12:03.408989-08:00","closed_at":"2025-12-27T23:12:03.408951-08:00"}
{"id":"gt-h3hak","title":"Day 2.7a: gt install creates Deacon and Mayor agent beads","description":"Update gt install to create agent beads:\n\n1. After initializing town beads, create:\n - gt-deacon agent bead (role_type: deacon, rig: null, agent_state: idle)\n - gt-mayor agent bead (role_type: mayor, rig: null, agent_state: idle)\n\n2. Use bd create --type=agent or internal beads API\n\nFiles:\n- internal/cmd/install.go","notes":"Moved to gt rig add instead of gt install due to routing constraints. Agent beads need to be in rig beads (not town beads) for daemon to find them via prefix routing. First rig added gets gt-deacon and gt-mayor.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-28T02:17:05.962052-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T02:31:10.60009-08:00","closed_at":"2025-12-28T02:31:10.60009-08:00","dependencies":[{"issue_id":"gt-h3hak","depends_on_id":"gt-aer7q","type":"parent-child","created_at":"2025-12-28T02:17:17.522839-08:00","created_by":"daemon"}]}
{"id":"gt-h3skz","title":"Remove os.Exit calls from Cobra RunE handlers","description":"attached_args: Remove os.Exit calls from Cobra RunE handlers\n\nReplace os.Exit() calls with proper error returns in Cobra commands.\n\n## Files to modify\n- internal/cmd/mail.go (lines 546, 554, 561, 808-812)\n- Any other files with os.Exit in RunE\n\n## Problem\nSome RunE handlers call os.Exit() directly:\n```go\nRunE: func(cmd *cobra.Command, args []string) error {\n ...\n os.Exit(1) // BAD: bypasses Cobra error handling\n}\n```\n\n## Fix\nReturn errors instead:\n```go\nRunE: func(cmd *cobra.Command, args []string) error {\n ...\n return fmt.Errorf(\"not in workspace\")\n}\n```\n\n## Acceptance criteria\n- [ ] No os.Exit calls inside RunE functions\n- [ ] Errors returned with proper context\n- [ ] grep -n 'os.Exit' internal/cmd/*.go shows no RunE matches\n- [ ] go build ./... passes\n- [ ] Commands still exit with correct codes","status":"hooked","priority":3,"issue_type":"task","created_at":"2025-12-28T15:49:20.418359-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T16:32:36.110268-08:00"}
{"id":"gt-h4342","title":"Digest: mol-deacon-patrol","description":"Patrol 20: final check, all healthy, handoff threshold","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:37:37.217558-08:00","updated_at":"2025-12-28T01:37:37.217558-08:00","closed_at":"2025-12-28T01:37:37.217523-08:00"}
{"id":"gt-h5e0","title":"Patrol hygiene: Witness/Refinery/Deacon inbox cleanup","description":"## Summary\nPatrol roles should clean up their inboxes as part of normal operation, not let messages accumulate.\n\n## Witness Patrol Cleanup\n- POLECAT_STARTED: archive after acknowledging\n- POLECAT_DONE: archive after cleanup complete\n- LIFECYCLE requests: archive after processing\n- Keep only: active work, unprocessed requests\n\n## Refinery Patrol Cleanup \n- MR Ready: archive after merge/reject decision\n- Swarm notices: archive after dispatch\n- Keep only: pending MRs in queue\n\n## Deacon Patrol Cleanup\n- Rotate daemon.log when \u003e10MB\n- Prune state.json of dead sessions\n- Archive old daemon logs (gzip, date-suffix)\n\n## Implementation\nEach patrol molecule should have a 'cleanup' phase at end of cycle.\n\n## Related\n- mol-town-shutdown (nuclear cleanup)\n- mol-witness-patrol, mol-refinery-patrol, mol-deacon-patrol","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-24T17:25:47.860346-08:00","updated_at":"2025-12-27T14:20:23.283075-08:00"}
{"id":"gt-h5n.10","title":"Auto-rebase on conflict: optional automatic rebase","description":"Implement automatic rebase as conflict resolution option.\n\nWhen on_conflict=auto_rebase and conflicts detected:\n1. Attempt: git rebase \u003ctarget\u003e \u003csource-branch\u003e\n2. If clean rebase: update source branch, continue merge\n3. If conflicts in rebase: abort, fall back to assign_back\n4. Force push rebased branch (worker's branch)\n\nRequires:\n- Worker branch must be force-pushable\n- Config: on_conflict: auto_rebase\n\nRisks:\n- Force push can confuse workers\n- Complex conflicts still need manual resolution\n\nReference: docs/merge-queue-design.md#conflict-resolution-strategies","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-17T13:52:26.397214-08:00","updated_at":"2025-12-28T22:36:25.993123-08:00","closed_at":"2025-12-28T22:36:25.993123-08:00","dependencies":[{"issue_id":"gt-h5n.10","depends_on_id":"gt-h5n","type":"parent-child","created_at":"2025-12-17T13:52:26.399236-08:00","created_by":"daemon"},{"issue_id":"gt-h5n.10","depends_on_id":"gt-3x1.4","type":"blocks","created_at":"2025-12-17T13:53:23.158089-08:00","created_by":"daemon"}]}
{"id":"gt-h5n.11","title":"Retry logic: exponential backoff for transient failures","description":"Implement retry logic for transient failures.\n\nRetryable failures:\n- Push failed (network, auth transient)\n- Test flaky (config: retry_flaky_tests)\n- Fetch failed (network)\n\nRetry strategy:\n- Max retries: 3 (configurable)\n- Backoff: 1s, 2s, 4s (exponential)\n- On final failure: treat as permanent, assign back\n\nNon-retryable failures:\n- Merge conflict\n- Test consistently fails\n- Build error\n\nTrack retry count in MR metadata for debugging.\n\nReference: docs/merge-queue-design.md#failure-recovery","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-17T13:52:28.300658-08:00","updated_at":"2025-12-28T22:36:25.977306-08:00","closed_at":"2025-12-28T22:36:25.977306-08:00","dependencies":[{"issue_id":"gt-h5n.11","depends_on_id":"gt-h5n","type":"parent-child","created_at":"2025-12-17T13:52:28.302268-08:00","created_by":"daemon"},{"issue_id":"gt-h5n.11","depends_on_id":"gt-3x1.4","type":"blocks","created_at":"2025-12-17T13:53:23.277535-08:00","created_by":"daemon"}]}
{"id":"gt-h5n.12","title":"MQ metrics: pending count, processing time, success rate","description":"Implement merge queue metrics collection.\n\nMetrics to track:\n- mq_pending_count: MRs waiting\n- mq_processing_time: Time from submit to merge (histogram)\n- mq_success_rate: Merges vs rejections\n- mq_conflict_rate: How often conflicts occur\n- mq_test_failure_rate: Test failures\n\nStorage options:\n- Simple: JSON file with rolling stats\n- Advanced: Prometheus-compatible metrics endpoint\n\nDisplay via:\n- gt mq stats: summary statistics\n- Dashboard widget (separate task)\n\nReference: docs/merge-queue-design.md#observability","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-17T13:52:30.716666-08:00","updated_at":"2025-12-28T22:36:25.961268-08:00","closed_at":"2025-12-28T22:36:25.961268-08:00","dependencies":[{"issue_id":"gt-h5n.12","depends_on_id":"gt-h5n","type":"parent-child","created_at":"2025-12-17T13:52:30.718745-08:00","created_by":"daemon"},{"issue_id":"gt-h5n.12","depends_on_id":"gt-3x1.5","type":"blocks","created_at":"2025-12-17T13:53:23.392465-08:00","created_by":"daemon"}]}
{"id":"gt-h5n.13","title":"MQ dashboard widget: queue status in TUI","description":"Add merge queue status widget to the Bubbletea TUI dashboard.\n\nDisplay:\n┌─────────────────────────────────────────────────┐\n│ MERGE QUEUE STATUS │\n├─────────────────────────────────────────────────┤\n│ Pending: 3 In Progress: 1 Merged (24h): 12 │\n├─────────────────────────────────────────────────┤\n│ QUEUE: │\n│ ► gt-mr-004 P0 Nux/gt-xyz Processing... │\n│ gt-mr-005 P1 Toast/gt-abc Ready │\n│ gt-mr-006 P1 Capable/gt-def Blocked (005) │\n└─────────────────────────────────────────────────┘\n\nInteractive features:\n- Navigate queue entries\n- View MR details\n- Retry/reject from dashboard\n\nDepends on: gt-u1j.2 (Bubbletea TUI dashboard)\n\nReference: docs/merge-queue-design.md#dashboard","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-17T13:52:34.770778-08:00","updated_at":"2025-12-28T22:36:26.025189-08:00","closed_at":"2025-12-28T22:36:26.025189-08:00","dependencies":[{"issue_id":"gt-h5n.13","depends_on_id":"gt-h5n","type":"parent-child","created_at":"2025-12-17T13:52:34.772838-08:00","created_by":"daemon"},{"issue_id":"gt-h5n.13","depends_on_id":"gt-u1j.2","type":"blocks","created_at":"2025-12-17T13:53:23.509566-08:00","created_by":"daemon"},{"issue_id":"gt-h5n.13","depends_on_id":"gt-h5n.12","type":"blocks","created_at":"2025-12-17T13:53:23.628668-08:00","created_by":"daemon"},{"issue_id":"gt-h5n.13","depends_on_id":"gt-lak31","type":"blocks","created_at":"2025-12-28T21:41:21.223359-08:00","created_by":"daemon"}]}
{"id":"gt-h5n.14","title":"Direct landing integration: gt land uses MR or bypasses","description":"Integrate direct landing with merge queue.\n\n'gt land --direct' should:\n1. Check if MR exists for the polecat's work\n2. If MR exists: process it directly (skip queue)\n3. If no MR: create temporary MR, process, close\n\nOptions:\n- --direct: bypass queue (existing)\n- --via-queue: ensure goes through queue (new)\n- --force: skip safety checks (existing)\n\nThis ensures direct landing still creates proper records.\n\nReference: docs/merge-queue-design.md#direct-landing-bypass-queue","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-17T13:52:48.952108-08:00","updated_at":"2025-12-28T22:36:25.944679-08:00","closed_at":"2025-12-28T22:36:25.944679-08:00","dependencies":[{"issue_id":"gt-h5n.14","depends_on_id":"gt-h5n","type":"parent-child","created_at":"2025-12-17T13:52:48.954874-08:00","created_by":"daemon"},{"issue_id":"gt-h5n.14","depends_on_id":"gt-3x1.5","type":"blocks","created_at":"2025-12-17T13:53:23.744413-08:00","created_by":"daemon"}]}
{"id":"gt-h5n.15","title":"Rollback support: gt mq revert for problematic merges","description":"Implement 'gt mq revert \u003cmr-id\u003e' for rolling back merges.\n\nActions:\n1. Find merge commit from closed MR\n2. Create revert commit: git revert \u003cmerge-commit\u003e\n3. Push revert to target branch\n4. Create 'reverted' MR tracking the revert\n5. Optionally reopen source issue\n\nOptions:\n- --reason REASON: required explanation\n- --reopen-issue: reopen the source work item\n\nTrack revert in MR metadata for audit trail.\n\nReference: docs/merge-queue-design.md#open-questions","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-17T13:52:51.440782-08:00","updated_at":"2025-12-28T22:36:25.92853-08:00","closed_at":"2025-12-28T22:36:25.92853-08:00","dependencies":[{"issue_id":"gt-h5n.15","depends_on_id":"gt-h5n","type":"parent-child","created_at":"2025-12-17T13:52:51.442642-08:00","created_by":"daemon"},{"issue_id":"gt-h5n.15","depends_on_id":"gt-3x1.5","type":"blocks","created_at":"2025-12-17T13:53:23.862389-08:00","created_by":"daemon"}]}
{"id":"gt-h5n.9","title":"Per-epic config overrides: custom merge settings","description":"Allow per-epic merge configuration overrides.\n\nEpic can specify merge_config in its description:\n merge_config:\n run_tests: true\n test_command: 'go test -race ./...'\n on_conflict: assign_back\n\nWhen processing MRs for an epic:\n1. Load rig-level merge_queue config\n2. Check if epic has merge_config\n3. Merge epic config over rig config\n4. Use merged config for processing\n\nUse cases:\n- Risky refactors: more thorough testing\n- Urgent fixes: skip some checks\n- Experimental work: different test suite\n\nReference: docs/merge-queue-design.md#per-epic-overrides","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-17T13:52:02.32832-08:00","updated_at":"2025-12-28T22:36:26.009236-08:00","closed_at":"2025-12-28T22:36:26.009236-08:00","dependencies":[{"issue_id":"gt-h5n.9","depends_on_id":"gt-h5n","type":"parent-child","created_at":"2025-12-17T13:52:02.32997-08:00","created_by":"daemon"}]}
{"id":"gt-h5sza","title":"Day 1.3: Implement bd slot set/clear commands","description":"Add slot management commands:\n- bd slot set \u003cagent\u003e \u003cslot\u003e \u003cbead\u003e - set slot (error if occupied)\n- bd slot clear \u003cagent\u003e \u003cslot\u003e - clear slot\n- bd slot show \u003cagent\u003e - show all slots\n\nThese enforce cardinality constraints.\n\nParent: gt-d0jqp","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:04.497595-08:00","created_by":"mayor","updated_at":"2025-12-28T00:13:27.799577-08:00","closed_at":"2025-12-28T00:13:27.799577-08:00","dependencies":[{"issue_id":"gt-h5sza","depends_on_id":"gt-v2gkv","type":"blocks","created_at":"2025-12-27T20:58:48.158544-08:00","created_by":"daemon"},{"issue_id":"gt-h5sza","depends_on_id":"gt-d0jqp","type":"parent-child","created_at":"2025-12-27T20:59:02.643158-08:00","created_by":"daemon"}]}
{"id":"gt-h7e4w","title":"gt session start --issue doesn't inject work to prompt","description":"When starting a polecat session with --issue flag:\n gt session start beads/Toast --issue bd-oxgi\n\nThe session starts but the polecat doesn't receive the issue context. They sit at the prompt awaiting input. Had to manually nudge them.\n\nExpected: Session start should either nudge or inject the issue context so polecat starts working immediately (propulsion principle).","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-28T19:30:16.443358-08:00","created_by":"mayor","updated_at":"2025-12-28T22:37:43.649521-08:00","closed_at":"2025-12-28T22:37:43.649521-08:00"}
{"id":"gt-hce03","title":"Digest: mol-deacon-patrol","description":"Patrol 17: Quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T07:29:14.852561-08:00","updated_at":"2025-12-25T07:29:14.852561-08:00","closed_at":"2025-12-25T07:29:14.852517-08:00"}
{"id":"gt-hcsz","title":"Track merge requests as beads (type=merge-request)","description":"Currently MRs are tracked in .gastown/refinery.json. For HOP audit trail and entity CV tracking, merge requests should be Beads entries with type=merge-request. This enables:\n- Full audit trail of what was merged, when, by whom\n- Entity chain contributions (who validated what)\n- Cross-rig visibility of merge activity\n\nThe refinery would create an MR bead when work enters the queue, update status as it progresses (open → in_progress → merged/rejected).\n\nPart of Beads-as-data-plane vision from HOP.","status":"open","priority":4,"issue_type":"feature","created_at":"2025-12-21T22:07:28.836388-08:00","updated_at":"2025-12-21T22:07:28.836388-08:00"}
{"id":"gt-hdzct","title":"gt mail send to self: Auto-detect from cwd for handoff mail","description":"When sending mail to yourself (common for handoffs), gt mail send from an agent directory should auto-detect both sender and recipient. Example: gt mail send -s 'HANDOFF' -m '...' from mayor/rig should send to mayor/.","status":"open","priority":3,"issue_type":"feature","created_at":"2025-12-28T22:27:42.426037-08:00","created_by":"stevey","updated_at":"2025-12-28T22:27:42.426037-08:00"}
{"id":"gt-hencu","title":"Digest: mol-deacon-patrol","description":"Patrol 12: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:33:37.763838-08:00","updated_at":"2025-12-28T01:33:37.763838-08:00","closed_at":"2025-12-28T01:33:37.763801-08:00"}
{"id":"gt-hj0ei","title":"Polecat writes files outside worktree (integration test)","description":"During integration test gt-7psb8, polecat furiosa was asked to create ~/gt/gastown/test-polecat-integration.txt\n\nIt used Write tool with relative path '../../test-polecat-integration.txt' which resolved to gastown root instead of its worktree at ~/gt/gastown/polecats/furiosa/\n\nObserved:\n- File created at ~/gt/gastown/test-polecat-integration.txt (WRONG)\n- Furiosa worktree at ~/gt/gastown/polecats/furiosa/ has no such file\n- Furiosa branch has no commits of any new files\n\nRoot cause: Claude Code resolves relative paths from cwd, and the polecat may have been in the wrong directory or used incorrect path.\n\nThis caused the entire merge to be empty (branch at same commit as main).","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-28T13:13:38.423978-08:00","created_by":"mayor","updated_at":"2025-12-28T14:00:14.068658-08:00","closed_at":"2025-12-28T14:00:14.068658-08:00"}
{"id":"gt-hj9e","title":"Remove pinned field workaround after beads fix","description":"## Summary\n\nOnce bd-phtv is fixed in beads, we can remove the workaround documentation and potentially simplify the pinToHook() implementation.\n\n## Current Workaround\n\nThe handoff bead attachment mechanism (AttachMolecule) is used as the primary work assignment mechanism instead of the pinned field. This works correctly but adds complexity.\n\n## Changes After Beads Fix\n\n1. Remove the NOTE comment in internal/beads/beads.go:Pin() explaining the bug\n2. Consider simplifying pinToHook() if the pinned field becomes reliable\n3. Update gt-o3is to reference the fix\n\n## Blocked By\n\nThis issue is blocked by external:beads:pinned-field-fix (bd-phtv).\nWhen that capability is shipped, this issue becomes ready.\n\n## Related\n\n- gt-o3is: Original investigation that found this bug\n- bd-phtv: The beads fix (in ~/gt/beads)","notes":"BLOCKED: Can't add external:beads:pinned-field-fix dependency due to bd-ucgz (migration invariants bug). Once that's fixed, add: bd dep add gt-hj9e external:beads:pinned-field-fix","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-23T12:35:32.316302-08:00","updated_at":"2025-12-23T12:37:18.526987-08:00"}
{"id":"gt-hlaaf","title":"Day 1.7: Define per-rig agent bead ID pattern","description":"Document and implement the agent bead ID pattern for per-rig agents.\n\nPattern: gt-\u003crole\u003e-\u003crig\u003e\nExamples:\n- gt-witness-gastown\n- gt-refinery-gastown\n- gt-refinery-beads\n- gt-polecat-gastown-nux\n\nTown-level agents (no rig):\n- gt-mayor\n- gt-deacon\n\nThis pattern enables:\n- Consistent lookup: bd show gt-witness-gastown\n- Routing: routes.jsonl maps prefixes\n- Filtering: bd list --type=agent --rig=gastown\n\nUpdate:\n- agent-as-bead.md with examples\n- bd create --type=agent to validate pattern","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T22:01:43.64279-08:00","created_by":"mayor","updated_at":"2025-12-28T00:09:45.958118-08:00","closed_at":"2025-12-28T00:09:45.958118-08:00","dependencies":[{"issue_id":"gt-hlaaf","depends_on_id":"gt-ikyo1","type":"blocks","created_at":"2025-12-27T22:02:45.168539-08:00","created_by":"daemon"},{"issue_id":"gt-hlaaf","depends_on_id":"gt-d0jqp","type":"parent-child","created_at":"2025-12-27T23:32:42.479886-08:00","created_by":"daemon"}]}
{"id":"gt-hqymv","title":"Digest: mol-deacon-patrol","description":"Patrol 9: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T11:05:04.952768-08:00","updated_at":"2025-12-25T11:05:04.952768-08:00","closed_at":"2025-12-25T11:05:04.952741-08:00"}
{"id":"gt-htto","title":"Heartbeat convention: simple liveness signal for agents","description":"Lightweight liveness signal extracted from Deacon epic (gt-5af).\n\n**Implementation**: Each agent writes a timestamp file on activity:\n```bash\necho '{\"ts\":\"'$(date -Iseconds)'\"}' \u003e ~/gt/\u003crole\u003e/heartbeat.json\n```\n\n**Integration points**:\n- SessionStart hook writes heartbeat\n- Periodic activity (mail check, work completion) refreshes it\n- `gt status` shows staleness (e.g., 'mayor: 5m ago')\n\n**Weight**: ~5 lines per agent\n**Value**: Quick debugging - see which agents are active at a glance\n\nNo monitoring daemon needed - human checks `gt status` when curious.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-20T20:40:45.459903-08:00","updated_at":"2025-12-20T20:40:45.459903-08:00"}
{"id":"gt-hwf3o","title":"Fix potential race conditions in state file operations","description":"Non-atomic state file operations could cause data loss:\n\nAll packages with state files (witness, refinery, crew, swarm):\nState is loaded, modified, and saved without locking:\n ref, err := m.loadState()\n // ... modify ref ...\n return m.saveState(ref)\n\nIf two processes modify state simultaneously, one update may be lost.\n\ninternal/polecat/namepool.go (lines 179-194):\nSave() uses RLock() but performs file I/O - should use write lock.\n\ninternal/swarm/manager.go:\nswarms map[string]*Swarm accessed without mutex but multiple goroutines could call Create/GetSwarm.\n\nSuggestion:\n1. Use file locking (flock) for critical state updates\n2. Or use atomic write pattern (write to temp, then rename)\n3. Add mutex to swarm.Manager.swarms map","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:43:20.026309-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:47:23.181277-08:00","closed_at":"2025-12-28T15:47:23.181277-08:00"}
{"id":"gt-hwka3","title":"Pillar 2: Patrol Ignition","description":"Witness and Refinery patrol loops fire reliably.\n\nKey deliverables:\n- Witness patrol reads agent beads for polecat state\n- Witness sends MERGE_READY to refinery on completion\n- Refinery processes MERGE_READY mail\n- Both send completion signals\n\nSubsumes existing work:\n- gt-6qyt1: Refinery event-driven merge queue\n- gt-qpwv4: Witness detect completion\n- gt-dtw9u: Witness active monitoring\n\nReference: ~/gt/docs/liftoff-plan.md\n\nParent: gt-oki8p","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-27T20:56:05.225946-08:00","created_by":"mayor","updated_at":"2025-12-28T14:08:37.606361-08:00","closed_at":"2025-12-28T14:08:37.606361-08:00","dependencies":[{"issue_id":"gt-hwka3","depends_on_id":"gt-d0jqp","type":"blocks","created_at":"2025-12-27T20:56:22.812515-08:00","created_by":"daemon"}]}
{"id":"gt-hxp56","title":"Digest: mol-deacon-patrol","description":"Patrol 12: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T16:13:56.522072-08:00","updated_at":"2025-12-25T16:13:56.522072-08:00","closed_at":"2025-12-25T16:13:56.522043-08:00"}
{"id":"gt-hymm0","title":"Crew agent beads never created (dead code in reportAgentState)","description":"## Problem\n\nIn prime.go, reportAgentState is called for ALL roles including crew workers.\nThe function calls bd.UpdateAgentState for crew with ID like gt-crew-gastown-max.\n\nBut crew agent beads are NEVER created:\n- Polecats: Created on spawn (polecat/manager.go:167)\n- Infrastructure: Created by doctor/install (doctor/agent_beads_check.go)\n- Crew: Nothing creates them\n\nThe error is silently ignored, so this doesn't break anything, but it's dead code.\n\n## Found in commit\n\nf3a6ef6 (feat: Witness reads polecat state from agent beads)\n\n## Decision\n\n**Create crew agent beads** on first gt prime if they don't exist.\n\nCrew workers are human-managed but their state is still valuable for:\n- Town-wide status dashboards\n- Understanding who's working on what\n- Consistent agent bead model across all agent types\n\n## Implementation\n\nIn prime.go reportAgentState(), before calling UpdateAgentState:\n1. Try to get the agent bead\n2. If it doesn't exist, create it with CreateAgentBead\n3. Then update state as normal","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T09:48:06.89737-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T09:52:22.110029-08:00","closed_at":"2025-12-28T09:52:22.110029-08:00"}
{"id":"gt-i11mk","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 19: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:50.416671-08:00","updated_at":"2025-12-28T11:22:50.416671-08:00","closed_at":"2025-12-28T11:22:50.416639-08:00"}
{"id":"gt-i26df","title":"Code Smell Cleanup: Gas Town Code Quality","description":"Comprehensive code smell cleanup identified in code review session.\n\n## Scope\nFixes for duplication, thread safety, missing tests, inconsistent patterns, and dead code.\n\n## Child issues (18 total)\n\n### Thread Safety \u0026 Data Integrity (P2)\n- gt-wled7: Atomic write pattern for state files\n- gt-xtsb5: Fix namepool Save() mutex\n- gt-bp0ht: Add swarm.Manager mutex\n\n### Duplication Removal (P2)\n- gt-560ge: Extract processExists function\n- gt-ddw3y: Extract molecule_lifecycle boilerplate\n- gt-atqr8: Session name helper functions\n- gt-ov2uv: AgentIdentity type for parsing\n\n### Missing Tests (P2)\n- gt-p2eg5: Lock package tests\n- gt-0vu9e: mrqueue package tests\n- gt-1pelm: mail router/mailbox tests\n\n### Code Quality (P2)\n- gt-gcnnr: Add logging for ignored errors\n\n### Constants Extraction (P3)\n- gt-4u682: SupportedShells constant\n- gt-795e8: Timing constants\n\n### Refactoring (P3)\n- gt-tkbd5: Refactor runStart\n- gt-dsqxw: Refactor runStartCrew\n\n### Error Handling (P3)\n- gt-h3skz: Remove os.Exit from RunE\n- gt-g6kor: Standardize warning output\n\n### Dead Code (P4)\n- gt-2g130: Remove unused code\n\n## Acceptance criteria\n- [ ] All child issues closed\n- [ ] go build ./... passes\n- [ ] go test ./... passes\n- [ ] go test -race ./... passes","status":"closed","priority":2,"issue_type":"epic","created_at":"2025-12-28T15:50:43.855896-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T17:21:29.660385-08:00","closed_at":"2025-12-28T17:21:29.660385-08:00","dependencies":[{"issue_id":"gt-i26df","depends_on_id":"gt-560ge","type":"blocks","created_at":"2025-12-28T15:51:22.661646-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-ddw3y","type":"blocks","created_at":"2025-12-28T15:51:22.695272-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-gcnnr","type":"blocks","created_at":"2025-12-28T15:51:22.727278-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-2g130","type":"blocks","created_at":"2025-12-28T15:51:22.758725-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-atqr8","type":"blocks","created_at":"2025-12-28T15:51:22.790849-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-ov2uv","type":"blocks","created_at":"2025-12-28T15:51:22.822137-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-4u682","type":"blocks","created_at":"2025-12-28T15:51:22.854658-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-795e8","type":"blocks","created_at":"2025-12-28T15:51:22.887375-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-p2eg5","type":"blocks","created_at":"2025-12-28T15:51:22.919914-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-0vu9e","type":"blocks","created_at":"2025-12-28T15:51:22.95112-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-1pelm","type":"blocks","created_at":"2025-12-28T15:51:22.982649-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-tkbd5","type":"blocks","created_at":"2025-12-28T15:51:23.014724-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-dsqxw","type":"blocks","created_at":"2025-12-28T15:51:23.04713-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-bp0ht","type":"blocks","created_at":"2025-12-28T15:51:23.079833-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-xtsb5","type":"blocks","created_at":"2025-12-28T15:51:23.111918-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-wled7","type":"blocks","created_at":"2025-12-28T15:51:23.14385-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-h3skz","type":"blocks","created_at":"2025-12-28T15:51:23.17564-08:00","created_by":"daemon"},{"issue_id":"gt-i26df","depends_on_id":"gt-g6kor","type":"blocks","created_at":"2025-12-28T15:51:23.207367-08:00","created_by":"daemon"}]}
{"id":"gt-i5bbp","title":"Digest: mol-deacon-patrol","description":"Patrol 6: Routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:49:59.037423-08:00","updated_at":"2025-12-25T20:49:59.037423-08:00","closed_at":"2025-12-25T20:49:59.037377-08:00"}
{"id":"gt-i5gkw","title":"Digest: mol-deacon-patrol","description":"Patrol complete: inbox empty, 2 polecats working, all agents healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:00:03.018473-08:00","updated_at":"2025-12-27T23:00:03.018473-08:00","closed_at":"2025-12-27T23:00:03.018437-08:00"}
{"id":"gt-i6jvc","title":"Config directory and schema for messaging","description":"Create ~/gt/config/ directory structure for messaging configuration.\n\n## Deliverables\n\n1. Create ~/gt/config/ directory\n2. Define JSON schema for lists.json:\n ```json\n {\n \"oncall\": [\"mayor/\", \"gastown/witness\"],\n \"cleanup/gastown\": [\"gastown/witness\", \"deacon/\"]\n }\n ```\n3. Define JSON schema for queues.json (if separate from lists)\n4. Add config loading utility in internal/config/\n\n## Acceptance\n- Config directory exists\n- Schema documented\n- Load/parse functions work","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T14:51:36.803749-08:00","updated_at":"2025-12-28T14:07:37.693255-08:00","closed_at":"2025-12-28T14:07:37.693255-08:00"}
{"id":"gt-i6pub","title":"Digest: mol-deacon-patrol","description":"Patrol complete: 0 callbacks, no gates, all witnesses/refineries healthy, no orphans","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T22:15:38.387794-08:00","updated_at":"2025-12-27T22:15:38.387794-08:00","closed_at":"2025-12-27T22:15:38.387759-08:00"}
{"id":"gt-i7eif","title":"Digest: mol-deacon-patrol","description":"Patrol 11: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:17:28.507015-08:00","updated_at":"2025-12-28T08:17:28.507015-08:00","closed_at":"2025-12-28T08:17:28.506983-08:00"}
{"id":"gt-i7wcn","title":"Polecat sessions terminate unexpectedly during work","description":"During swarm bd-784c, polecat sessions (Toast, Nux) terminated mid-task without completing their work.\n\n**Observed:**\n- Polecats were actively working (edits in progress, tests running)\n- Sessions suddenly showed 'not running' in gt polecat status\n- tmux sessions existed but were empty/reset\n- Work was partially complete (some commits made, issue still open)\n\n**Impact:**\n- Lost work progress\n- Required manual intervention to restart\n- Unclear if work was saved/committed\n\n**Suggestion:**\n- Add session health monitoring\n- Auto-restart on unexpected termination\n- Log session exit reasons","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-28T22:14:07.876275-08:00","created_by":"beads/crew/emma","updated_at":"2025-12-28T22:14:07.876275-08:00"}
{"id":"gt-ia0s","title":"Review: Beads Universal Data Plane documentation","description":"Review new docs/beads-data-plane.md (275 lines) for accuracy.\n\n## Commit\n- 54c8269: Add Beads Universal Data Plane documentation\n\n## Review focus\n- Accuracy of beads architecture description\n- Correct field mappings (mail → beads fields)\n- Two-level architecture (town vs rig beads) correctly explained","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-23T14:27:49.410707-08:00","updated_at":"2025-12-23T14:27:49.410707-08:00","dependencies":[{"issue_id":"gt-ia0s","depends_on_id":"gt-e0qj2","type":"blocks","created_at":"2025-12-26T23:21:29.418109-08:00","created_by":"daemon"}]}
{"id":"gt-ibuga","title":"Polecat didn't commit before gt done","description":"Integration test gt-7psb8: Polecat furiosa ran gt done before committing changes.\n\nThe polecat:\n1. Created a test file\n2. Closed the bead with bd close --force\n3. Ran bd sync\n4. Ran gt done\n\nBut it NEVER ran:\n- git add \u003cfile\u003e\n- git commit\n\nResult: Branch pushed with no new commits. Refinery detected branch at same commit as main.\n\nThe polecat CLAUDE.md or session close protocol should enforce commit before gt done.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-28T13:13:39.656598-08:00","created_by":"mayor","updated_at":"2025-12-28T14:00:14.100446-08:00","closed_at":"2025-12-28T14:00:14.100446-08:00"}
{"id":"gt-ichum","title":"crew_add.go: Agent bead ID uses wrong format","description":"In internal/cmd/crew_add.go:84, the agent bead ID is constructed as:\n\n crewID := fmt.Sprintf(\"gt-crew-%s-%s\", rigName, name)\n\nThis produces 'gt-crew-gastown-joe' but existing beads and the session name format use:\n\n gt-\u003crig\u003e-crew-\u003cname\u003e (e.g., gt-gastown-crew-joe)\n\nThis causes agent beads to not be found/matched properly.\n\nFix: Change line 84 to:\n\n crewID := fmt.Sprintf(\"gt-%s-crew-%s\", rigName, name)","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-29T15:24:17.796501-08:00","created_by":"stevey","updated_at":"2025-12-29T15:40:43.874203-08:00","closed_at":"2025-12-29T15:40:43.874203-08:00","close_reason":"Already fixed by max in c31bff4 - now uses beads.CrewBeadIDWithPrefix()"}
{"id":"gt-idt8f","title":"Digest: mol-deacon-patrol","description":"P13: stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T19:59:21.269231-08:00","updated_at":"2025-12-25T19:59:21.269231-08:00","closed_at":"2025-12-25T19:59:21.269178-08:00"}
{"id":"gt-idxr5","title":"Digest: mol-deacon-patrol","description":"Patrol 5: Routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:49:37.149631-08:00","updated_at":"2025-12-25T20:49:37.149631-08:00","closed_at":"2025-12-25T20:49:37.149584-08:00"}
{"id":"gt-ieem","title":"Test Patrol Parent","description":"[RESURRECTED] This issue was deleted but recreated as a tombstone to preserve hierarchical structure.\n\nOriginal description:\nTest parent for Christmas Ornament pattern","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-24T21:04:09.817241-08:00","updated_at":"2025-12-27T23:39:16.857083-08:00","closed_at":"2025-12-27T23:39:16.857083-08:00"}
{"id":"gt-ifxvi","title":"Digest: mol-deacon-patrol","description":"Patrol 8: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T14:24:01.913738-08:00","updated_at":"2025-12-25T14:24:01.913738-08:00","closed_at":"2025-12-25T14:24:01.913706-08:00"}
{"id":"gt-ihvq0","title":"Agent bead creation uses wrong prefix for non-gastown rigs","description":"When adding a polecat to beads rig, agent bead creation fails:\n Error: issue ID 'gt-polecat-beads-Toast' does not match configured prefix 'bd'\n\nThe agent bead ID should use the rig's prefix (bd-) not hardcoded gt-.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-28T19:29:40.954862-08:00","created_by":"mayor","updated_at":"2025-12-29T15:28:36.401279-08:00","closed_at":"2025-12-29T15:28:36.401279-08:00","close_reason":"Fixed: Added WithPrefix variants to agent bead ID functions, updated crew_add.go, rig/manager.go, and doctor/agent_beads_check.go to use rig's configured prefix"}
{"id":"gt-ihzqr","title":"Formula SDK: Developer Tooling for Workflow Authors","description":"SDK for creating, testing, debugging, and validating formulas.\n\n## Components\n\n### Forge (Creation)\n```bash\nmol forge new my-workflow # Scaffold new formula\nmol forge extend base-workflow # Create variant\nmol forge lint my-workflow # Check syntax/style\n```\n\n### Lab (Testing)\n```bash\nmol lab run my-workflow --dry-run # Mock execution\nmol lab test my-workflow # Run formula tests\nmol lab trace my-workflow # Step-through debug\n```\n\n### Validator (Verification)\n```bash\nmol validate my-workflow # Check well-formedness\nmol validate my-workflow --protocol=Reviewable # Check protocol compliance\nmol validate my-workflow --schematic=shiny # Check schematic compatibility\n```\n\n### Analyzer (Static Analysis)\n```bash\nmol analyze my-workflow --deps # Dependency graph\nmol analyze my-workflow --coverage # Step coverage\nmol analyze my-workflow --cycles # Detect cycles\n```\n\n## Relationship to Other Concepts\n\nThe SDK operates on:\n- Formulas (source level)\n- Protos (compiled level)\n- Molecules (runtime level)\n\nAnd validates against:\n- Protocols (type system)\n- Schematics (domain composition)\n\n## Open Questions\n\n1. Bundled vs separate - mol subcommands or formula-kit binary?\n2. IDE integration - LSP for formula files?\n3. Test harness - how to mock steps? fixtures?\n\n## Related\n\n- docs/formula_evolution.md - \"SDK Question\" section\n- gt-8tmz.30 - Proto debugging tools (subset)\n- gt-8tmz.31 - Formula validation (subset)\n","status":"closed","priority":4,"issue_type":"epic","created_at":"2025-12-26T01:00:55.010406-08:00","updated_at":"2025-12-28T22:33:22.271081-08:00","closed_at":"2025-12-28T22:33:22.271081-08:00"}
{"id":"gt-ikyo1","title":"Day 1.1: Add type=agent to bead schema","description":"Add agent as a valid bead type in the schema. This is the foundation for agent-as-bead.\n\nParent: gt-d0jqp","notes":"Re-opened: Close reason referenced non-existent commit 927e8374. Type=agent not yet implemented in bd CLI.","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-27T20:57:54.914343-08:00","created_by":"mayor","updated_at":"2025-12-28T00:09:42.962001-08:00","closed_at":"2025-12-28T00:09:42.962001-08:00","dependencies":[{"issue_id":"gt-ikyo1","depends_on_id":"gt-d0jqp","type":"parent-child","created_at":"2025-12-27T20:59:02.539952-08:00","created_by":"daemon"}]}
{"id":"gt-il2p7","title":"bd update --claim for work queue semantics","description":"Atomic claim operation for work queue messages.\n\n## Deliverables\n\n1. Add --claim flag to bd update\n2. Atomic operation:\n - Sets assignee to claimer\n - Sets status to in_progress\n - Fails if already claimed\n3. Conflict detection:\n - If already claimed, return error: \"already claimed by X\"\n4. Integration with gt mail for queue messages\n\n## Example\n```bash\ngt mail queue cleanup/gastown # See available work\nbd update msg-xxx --claim # Claim it atomically\n# Returns error if someone else claimed first\n```\n\n## Dependencies\n- queue: shared storage (gt-???)\n\n## Acceptance\n- --claim sets assignee + status atomically\n- Double-claim returns clear error\n- Works with queue messages","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-26T14:52:08.186488-08:00","updated_at":"2025-12-26T14:52:08.186488-08:00","dependencies":[{"issue_id":"gt-il2p7","depends_on_id":"gt-tnap3","type":"blocks","created_at":"2025-12-26T14:53:08.553425-08:00","created_by":"daemon"}]}
{"id":"gt-il5v2","title":"Digest: mol-deacon-patrol","description":"Patrol 14: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:48:00.545429-08:00","updated_at":"2025-12-28T19:48:00.545429-08:00","closed_at":"2025-12-28T19:48:00.545386-08:00"}
{"id":"gt-ilav.1","title":"Refinery: Add lifecycle-notify step to patrol","description":"After successful merge in handleSuccess(), send lifecycle notification to Witness.\n\n## Implementation\n\n1. Add new mail type: `LIFECYCLE: work merged`\n2. In engineer.go handleSuccess(), after closing MR and source issue:\n ```\n gt mail send \u003crig\u003e/witness -s \"LIFECYCLE: work merged\" -m \"\n Worker: \u003cpolecat\u003e\n MR: \u003cmr-id\u003e\n Issue: \u003csource-issue\u003e\n Commit: \u003cmerge-commit\u003e\n Action: Polecat work merged. Worktree eligible for recycling.\n \"\n ```\n\n3. Update mol-refinery-patrol to include lifecycle-notify step between merge-push and loop-check\n\n## Acceptance\n- Successful merges send mail to Witness\n- Mail includes worker name, MR id, source issue, commit SHA","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T12:07:46.715807-08:00","updated_at":"2025-12-28T22:36:25.392959-08:00","closed_at":"2025-12-28T22:36:25.392959-08:00","dependencies":[{"issue_id":"gt-ilav.1","depends_on_id":"gt-ilav","type":"parent-child","created_at":"2025-12-23T12:07:46.716238-08:00","created_by":"daemon"}]}
{"id":"gt-ilav.2","title":"Witness: Handle LIFECYCLE work-merged mail","description":"Witness should process the `LIFECYCLE: work merged` notification from Refinery.\n\n## Implementation\n\n1. In Witness mail processing, add handler for subject containing \"LIFECYCLE: work merged\"\n2. Parse worker name from mail body\n3. Update polecat state to `merged` (new state - see sibling task)\n4. Log completion for metrics\n5. Worktree is now eligible for cleanup on next gc cycle\n\n## Acceptance\n- Witness correctly parses and handles work-merged mail\n- Polecat state updated to merged\n- No action taken if polecat already cleaned up (idempotent)","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T12:07:47.878019-08:00","updated_at":"2025-12-28T22:36:25.376524-08:00","closed_at":"2025-12-28T22:36:25.376524-08:00","dependencies":[{"issue_id":"gt-ilav.2","depends_on_id":"gt-ilav","type":"parent-child","created_at":"2025-12-23T12:07:47.880327-08:00","created_by":"daemon"},{"issue_id":"gt-ilav.2","depends_on_id":"gt-ilav.1","type":"blocks","created_at":"2025-12-23T12:08:06.585766-08:00","created_by":"daemon"},{"issue_id":"gt-ilav.2","depends_on_id":"gt-ilav.5","type":"blocks","created_at":"2025-12-23T12:08:06.667459-08:00","created_by":"daemon"}]}
{"id":"gt-ilav.3","title":"MQ Submit: Notify Witness on MR submission","description":"When `gt mq submit` is run, notify the Witness so it can verify the submission.\n\n## Implementation\n\n1. In mq_submit.go after successful MR creation:\n ```\n gt mail send \u003crig\u003e/witness -s \"LIFECYCLE: mr submitted\" -m \"\n Worker: \u003cpolecat\u003e\n MR: \u003cmr-id\u003e\n Branch: \u003cbranch-name\u003e\n Target: \u003ctarget-branch\u003e\n Action: Verify MR submission, help polecat if needed.\n \"\n ```\n\n2. This happens BEFORE the existing polecat auto-cleanup logic\n\n## Acceptance\n- MR submission sends notification to Witness\n- Witness receives mail with all relevant details\n- Works for both polecat and crew submissions","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T12:07:49.07255-08:00","updated_at":"2025-12-28T22:36:25.360175-08:00","closed_at":"2025-12-28T22:36:25.360175-08:00","dependencies":[{"issue_id":"gt-ilav.3","depends_on_id":"gt-ilav","type":"parent-child","created_at":"2025-12-23T12:07:49.07304-08:00","created_by":"daemon"},{"issue_id":"gt-ilav.3","depends_on_id":"gt-ilav.5","type":"blocks","created_at":"2025-12-23T12:08:06.337807-08:00","created_by":"daemon"}]}
{"id":"gt-ilav.4","title":"Witness: Verify MR submission on notification","description":"When Witness receives `LIFECYCLE: mr submitted`, verify the submission was clean.\n\n## Implementation\n\n1. Add handler for \"LIFECYCLE: mr submitted\" mail\n2. Check MR status: `gt mq status \u003cmr-id\u003e`\n3. If MR looks good (status=open, no errors): log success, allow polecat to idle\n4. If MR has issues:\n - Check polecat git state\n - Nudge polecat to fix if session still alive\n - Log issue for monitoring\n\n## Acceptance\n- Witness verifies MR after submission notification\n- Can detect problematic submissions\n- Provides early intervention opportunity","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T12:07:50.607753-08:00","updated_at":"2025-12-28T22:36:25.34253-08:00","closed_at":"2025-12-28T22:36:25.34253-08:00","dependencies":[{"issue_id":"gt-ilav.4","depends_on_id":"gt-ilav","type":"parent-child","created_at":"2025-12-23T12:07:50.60974-08:00","created_by":"daemon"},{"issue_id":"gt-ilav.4","depends_on_id":"gt-ilav.3","type":"blocks","created_at":"2025-12-23T12:08:06.420836-08:00","created_by":"daemon"},{"issue_id":"gt-ilav.4","depends_on_id":"gt-ilav.5","type":"blocks","created_at":"2025-12-23T12:08:06.502487-08:00","created_by":"daemon"}]}
{"id":"gt-ilav.5","title":"Polecat state tracking: Add mr_submitted and merged states","description":"Track polecat lifecycle state separate from session state.\n\n## New States\n\n| State | Meaning |\n|-------|---------|\n| active | Working on assigned issue |\n| mr_submitted | MR submitted, waiting for merge |\n| idle | No current work, session may be alive |\n| merged | Work successfully merged by Refinery |\n| retired | Session killed, worktree removed |\n\n## Implementation\n\n1. Add state field to polecat tracking (state.json or beads)\n2. `gt polecat update \u003cname\u003e --state=\u003cstate\u003e`\n3. `gt polecat list` shows state column\n4. State transitions:\n - active → mr_submitted (on gt mq submit)\n - mr_submitted → merged (on Refinery notification)\n - merged → retired (on worktree cleanup)\n\n## Acceptance\n- Polecat state tracked and queryable\n- State transitions happen at correct lifecycle points\n- `gt polecat list` shows current state","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T12:07:51.968117-08:00","updated_at":"2025-12-28T22:36:25.325032-08:00","closed_at":"2025-12-28T22:36:25.325032-08:00","dependencies":[{"issue_id":"gt-ilav.5","depends_on_id":"gt-ilav","type":"parent-child","created_at":"2025-12-23T12:07:51.970044-08:00","created_by":"daemon"}]}
{"id":"gt-ilav.6","title":"Refinery patrol: Add sibling-check step","description":"Refinery should check on Witness health as part of patrol (village sibling watch).\n\n## Implementation\n\n1. Add `sibling-check` step to mol-refinery-patrol (early in cycle)\n2. Use `gt peek \u003crig\u003e/witness 20` to check Witness output\n3. Look for signs of health:\n - Recent activity (tool calls, log messages)\n - No error stack traces\n - Responsive to pings\n4. If Witness seems stuck:\n - Send status request mail\n - Note for potential escalation\n - Don't block Refinery work\n\n## Acceptance\n- Refinery checks Witness each patrol cycle\n- Anomalies logged\n- Non-blocking (Refinery continues even if Witness is down)","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T12:07:54.005132-08:00","updated_at":"2025-12-28T22:36:25.307429-08:00","closed_at":"2025-12-28T22:36:25.307429-08:00","dependencies":[{"issue_id":"gt-ilav.6","depends_on_id":"gt-ilav","type":"parent-child","created_at":"2025-12-23T12:07:54.006928-08:00","created_by":"daemon"}]}
{"id":"gt-ilav.7","title":"Witness patrol: Add sibling-check for Refinery","description":"Witness should check on Refinery health as part of patrol (village sibling watch).\n\n## Implementation\n\n1. Add `sibling-check` step to mol-witness-patrol\n2. Use `gt peek \u003crig\u003e/refinery 20` to check Refinery output\n3. Check Refinery queue status: `gt mq list \u003crig\u003e`\n4. Look for:\n - Refinery session alive\n - Queue processing (if items present)\n - No stuck MRs (same MR in_progress for too long)\n5. If Refinery seems stuck:\n - Send nudge or status request\n - Consider escalation to Deacon\n\n## Acceptance\n- Witness checks Refinery each patrol cycle\n- Can detect stuck Refinery\n- Provides backup oversight for merge queue","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T12:07:55.760705-08:00","updated_at":"2025-12-28T22:36:25.28879-08:00","closed_at":"2025-12-28T22:36:25.28879-08:00","dependencies":[{"issue_id":"gt-ilav.7","depends_on_id":"gt-ilav","type":"parent-child","created_at":"2025-12-23T12:07:55.762415-08:00","created_by":"daemon"}]}
{"id":"gt-ilav.8","title":"Recovery: Detect orphaned merged polecats","description":"Safety net for when Refinery misses sending lifecycle notification.\n\n## Detection Points\n\n**Witness polecat-scan**:\n- For each polecat in `mr_submitted` state:\n - Check MR status: `gt mq status \u003cmr-id\u003e`\n - If MR is closed/merged but polecat state is still mr_submitted:\n - Update polecat state to `merged`\n - Log recovery action\n\n**Deacon orphan-check**:\n- Query all closed MRs\n- Cross-reference with polecat states\n- If merged MR but polecat not in merged/retired state:\n - Send correction to Witness\n - Log for metrics (indicates Refinery notification missed)\n\n## Acceptance\n- Orphaned polecats detected and corrected\n- Recovery is logged for monitoring\n- No work lost due to missed notifications","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T12:07:56.821259-08:00","updated_at":"2025-12-28T22:36:25.268873-08:00","closed_at":"2025-12-28T22:36:25.268873-08:00","dependencies":[{"issue_id":"gt-ilav.8","depends_on_id":"gt-ilav","type":"parent-child","created_at":"2025-12-23T12:07:56.823191-08:00","created_by":"daemon"},{"issue_id":"gt-ilav.8","depends_on_id":"gt-ilav.5","type":"blocks","created_at":"2025-12-23T12:08:06.749803-08:00","created_by":"daemon"},{"issue_id":"gt-ilav.8","depends_on_id":"gt-ilav.2","type":"blocks","created_at":"2025-12-23T12:08:06.832711-08:00","created_by":"daemon"},{"issue_id":"gt-ilav.8","depends_on_id":"gt-ilav.4","type":"blocks","created_at":"2025-12-23T12:08:06.918149-08:00","created_by":"daemon"}]}
{"id":"gt-ilfqa","title":"Digest: mol-deacon-patrol","description":"Patrol 16: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T16:53:01.166838-08:00","updated_at":"2025-12-26T16:53:01.166838-08:00","closed_at":"2025-12-26T16:53:01.166794-08:00"}
{"id":"gt-in7b","title":"gt sling: nudge crew/mayor if session is running","description":"When slinging to crew or mayor, if they have an active tmux session, send a nudge notification so they know work has landed on their hook.\n\nCurrently only slingToPolecat nudges (lines 514-521 in internal/cmd/sling.go).\n\nMissing nudge in:\n- slingToCrew (line ~669)\n- slingToMayor (line ~876)\n\nNOTE: For patrol-based agents (witness, refinery, deacon), see gt-arjlu which handles nudging them when work is dispatched to polecats in their rig. That's a different pattern - not slinging TO them, but notifying them of activity.\n\nImplementation:\n1. For crew: need to determine session name (e.g., gastown-crew-max)\n2. Check if session running via tmux\n3. If running, call t.NudgeSession() with appropriate message","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T15:56:22.30857-08:00","updated_at":"2025-12-28T22:15:24.451068-08:00"}
{"id":"gt-is4fi","title":"Refactor formula transformation pipeline to shared helper","description":"The formula transformation pipeline (control flow, advice, expansions, aspects) is duplicated between cook.go and mol_bond.go. Should be extracted to a shared function in the formula package.\n\nCurrent duplication in:\n- cmd/bd/cook.go:96-136\n- cmd/bd/mol_bond.go:598-633\n\nSuggested approach:\n- Add formula.Transform(resolved *Formula, parser *Parser) (*Formula, error) \n- Handles all transformation steps in order\n- Both cook.go and mol_bond.go call this single function","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-25T16:50:55.343049-08:00","updated_at":"2025-12-28T22:34:14.426995-08:00","closed_at":"2025-12-28T22:34:14.426995-08:00","dependencies":[{"issue_id":"gt-is4fi","depends_on_id":"gt-8tmz.25","type":"discovered-from","created_at":"2025-12-25T16:50:55.344455-08:00","created_by":"daemon"}]}
{"id":"gt-iuv1c","title":"Digest: mol-deacon-patrol","description":"Patrol 14: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:09:38.184463-08:00","updated_at":"2025-12-27T23:09:38.184463-08:00","closed_at":"2025-12-27T23:09:38.18442-08:00"}
{"id":"gt-iva20","title":"Liftoff test: Add timestamp comment to manager.go","description":"Simple liftoff test task.\n\nAdd a comment at the top of internal/polecat/manager.go with the current timestamp, like:\n// Liftoff test: \u003ctimestamp\u003e\n\nThis tests the full polecat → refinery → witness cycle.","status":"hooked","priority":1,"issue_type":"task","created_at":"2025-12-28T16:18:27.905345-08:00","created_by":"stevey","updated_at":"2025-12-28T16:18:40.555384-08:00"}
{"id":"gt-iwl0e","title":"Missing space in error messages (handoff.go, prime.go)","description":"Minor typo in error messages at two locations:\n\n**handoff.go L895**:\n```go\nfmt.Println(style.Dim.Render(\"Run manually: bd --no-daemon wisp\" + protoID))\n// Missing space before protoID\n```\n\n**prime.go L1061**:\nSame issue.\n\n**Fix**: Add space before protoID:\n```go\nfmt.Println(style.Dim.Render(\"Run manually: bd --no-daemon wisp \" + protoID))\n```","status":"closed","priority":4,"issue_type":"bug","created_at":"2025-12-25T22:03:16.368682-08:00","updated_at":"2025-12-28T22:37:43.897513-08:00","closed_at":"2025-12-28T22:37:43.897513-08:00"}
{"id":"gt-j0gx2","title":"Day 5.1: End-to-end liftoff test","description":"Full integration test:\n1. gt sling gt-task123 gastown/nux\n2. Watch polecat work (no manual intervention)\n3. Watch refinery merge (no manual intervention)\n4. Watch witness clean up (no manual intervention)\n5. See cycle complete in bd activity or logs\n\nSuccess = no human touches needed.\n\nParent: gt-oki8p","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:57:54.785993-08:00","created_by":"mayor","updated_at":"2025-12-28T16:26:34.790244-08:00","closed_at":"2025-12-28T16:26:34.790244-08:00","dependencies":[{"issue_id":"gt-j0gx2","depends_on_id":"gt-d0jqp","type":"blocks","created_at":"2025-12-27T20:58:30.581027-08:00","created_by":"daemon"},{"issue_id":"gt-j0gx2","depends_on_id":"gt-hwka3","type":"blocks","created_at":"2025-12-27T20:58:30.630239-08:00","created_by":"daemon"},{"issue_id":"gt-j0gx2","depends_on_id":"gt-4a2qt","type":"blocks","created_at":"2025-12-27T20:58:30.681313-08:00","created_by":"daemon"},{"issue_id":"gt-j0gx2","depends_on_id":"gt-oki8p","type":"parent-child","created_at":"2025-12-27T20:58:39.595164-08:00","created_by":"daemon"},{"issue_id":"gt-j0gx2","depends_on_id":"gt-liftoff","type":"blocks","created_at":"2025-12-27T21:43:01.956869-08:00","created_by":"daemon"},{"issue_id":"gt-j0gx2","depends_on_id":"gt-k5dip","type":"blocks","created_at":"2025-12-28T09:36:51.28648-08:00","created_by":"daemon"}]}
{"id":"gt-j0lsj","title":"Digest: mol-deacon-patrol","description":"Patrol 10: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:17:01.052196-08:00","updated_at":"2025-12-28T08:17:01.052196-08:00","closed_at":"2025-12-28T08:17:01.052165-08:00"}
{"id":"gt-j36i9","title":"Digest: mol-deacon-patrol","description":"Patrol 3: All agents healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:03:33.755132-08:00","updated_at":"2025-12-28T03:03:33.755132-08:00","closed_at":"2025-12-28T03:03:33.755099-08:00"}
{"id":"gt-j3cx","title":"refinery Handoff","description":"# Merge queue tracking\nlast_processed_branch: null\nbranches_merged_this_cycle: 0","status":"hooked","priority":2,"issue_type":"task","created_at":"2025-12-24T23:19:17.135684-08:00","updated_at":"2025-12-26T13:08:21.775778-08:00"}
{"id":"gt-j4njt","title":"Digest: mol-deacon-patrol","description":"Patrol 11: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:07:40.158577-08:00","updated_at":"2025-12-28T03:07:40.158577-08:00","closed_at":"2025-12-28T03:07:40.158546-08:00"}
{"id":"gt-j9ddg","title":"Day 4.1: Implement gt polecat recycle command","description":"Add gt polecat recycle \u003cname\u003e command:\n- Kill the Claude session (tmux kill-session)\n- Preserve the sandbox (branch/worktree)\n- Update agent bead state to 'stopped'\n- Leave for respawn on next step\n\nThis enables session-per-step.\n\nParent: gt-4a2qt","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:03.333223-08:00","created_by":"mayor","updated_at":"2025-12-28T14:15:41.564143-08:00","closed_at":"2025-12-28T14:15:41.564143-08:00","dependencies":[{"issue_id":"gt-j9ddg","depends_on_id":"gt-4a2qt","type":"parent-child","created_at":"2025-12-27T20:58:42.973474-08:00","created_by":"daemon"},{"issue_id":"gt-j9ddg","depends_on_id":"gt-7psb8","type":"blocks","created_at":"2025-12-27T21:00:55.776156-08:00","created_by":"daemon"}]}
{"id":"gt-jhsa","title":"Deacon has no rig-level presence - only global gt-deacon","description":"The Deacon patrol role exists only at the global level (~/gt/deacon) but doesn't have per-rig presence like Witness and Refinery.\n\nCurrent structure:\n```\n~/gt/\n├── deacon/ ← Global deacon only\n├── beads/\n│ ├── witness/ ← Per-rig witness\n│ ├── refinery/ ← Per-rig refinery\n│ └── (no deacon) ← Missing\n└── gastown/\n ├── witness/\n ├── refinery/\n └── (no deacon) ← Missing\n```\n\nQuestion: Should Deacon be per-rig like Witness/Refinery, or is global-only intentional?\n\nIf per-rig is needed: Create beads/deacon and gastown/deacon with appropriate CLAUDE.md files.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-23T20:29:59.121615-08:00","updated_at":"2025-12-23T20:29:59.121615-08:00"}
{"id":"gt-jodf8","title":"Digest: mol-deacon-patrol","description":"Cycle 14: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:22:55.175328-08:00","updated_at":"2025-12-28T13:22:55.175328-08:00","closed_at":"2025-12-28T13:22:55.175296-08:00"}
{"id":"gt-jyzrs","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 12: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:35.34827-08:00","updated_at":"2025-12-28T11:22:35.34827-08:00","closed_at":"2025-12-28T11:22:35.348237-08:00"}
{"id":"gt-jzf10","title":"Digest: mol-deacon-patrol","description":"Patrol 4: quiet, health OK","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:43:56.967373-08:00","updated_at":"2025-12-28T19:43:56.967373-08:00","closed_at":"2025-12-28T19:43:56.967337-08:00"}
{"id":"gt-k294l","title":"Day 3.0: Document mail protocol for patrol coordination","description":"Document the mail protocol used for patrol coordination.\n\n**Mail types:**\n- POLECAT_DONE: Polecat → Witness (work complete, ready for merge)\n- MERGE_READY: Witness → Refinery (branch ready for merge queue)\n- MERGED: Refinery → Witness (merge complete, safe to nuke)\n- WITNESS_PING: Witness → Deacon (health check for second-order monitoring)\n- HELP: Any → escalation target (stuck, need intervention)\n- HANDOFF: Any → self (session continuity)\n\n**Format conventions:**\n- Subject prefix indicates type (e.g., 'POLECAT_DONE: nux')\n- Body contains structured data (branch, bead ID, etc.)\n\nThis documentation enables consistent implementation across all patrol formulas.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T23:17:11.657593-08:00","created_by":"mayor","updated_at":"2025-12-28T00:04:01.333366-08:00","closed_at":"2025-12-28T00:04:01.333366-08:00"}
{"id":"gt-k5dip","title":"Day 5.0: gt status shows pinned role beads and slots","description":"Enhance gt status to display:\n- All pinned role beads (mayor, witness, refinery, polecats)\n- Their current hook slot contents (what molecule/bead is attached)\n- Agent state if available\n\nThis gives a single-command view of who's working on what across the town.\n\nExample output:\n```\ngt status\n\nTown: gastown\nDaemon: running (pid 1234)\n\nAgents:\n mayor/ gt-liftoff (pinned) idle\n witness/gastown gt-wisp-abc (patrol) running\n refinery/gastown (empty) idle\n polecat/nux gt-xyz (in_progress) working\n polecat/rictus (empty) idle\n```","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-28T09:36:43.017277-08:00","created_by":"mayor","updated_at":"2025-12-28T09:43:37.543526-08:00","closed_at":"2025-12-28T09:43:37.543526-08:00","dependencies":[{"issue_id":"gt-k5dip","depends_on_id":"gt-d0jqp","type":"blocks","created_at":"2025-12-28T09:36:51.257401-08:00","created_by":"daemon"}]}
{"id":"gt-k6986","title":"Digest: mol-deacon-patrol","description":"Patrol 9: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T13:56:43.09177-08:00","updated_at":"2025-12-26T13:56:43.09177-08:00","closed_at":"2025-12-26T13:56:43.091735-08:00"}
{"id":"gt-k9828","title":"Digest: mol-deacon-patrol","description":"Patrol 18: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:19:54.510894-08:00","updated_at":"2025-12-25T10:19:54.510894-08:00","closed_at":"2025-12-25T10:19:54.510865-08:00"}
{"id":"gt-kabx","title":"Build context self-check into patrol molecules","description":"Patrol molecules (witness-patrol, refinery-patrol, deacon-patrol) should have\nexplicit context self-check as part of each cycle:\n\nAfter each patrol cycle step:\n- Self-assess context pressure\n- If high: complete current step, then initiate handoff\n- If OK: continue to next cycle\n\nThis could be:\n1. Explicit step in molecule: 'context-check'\n2. Guidance in step instructions: 'Before continuing, assess context...'\n3. Protocol baked into the patrol loop description\n\nThe key is making it unavoidable - not optional guidance that gets ignored.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T01:46:57.067465-08:00","updated_at":"2025-12-23T01:46:57.067465-08:00"}
{"id":"gt-kc7yj","title":"Swarm-in-Beads: Discovery-based swarm execution","description":"Swarm-in-Beads: Make swarm state derive from beads, not separate JSON. See ~/gt/docs/swarm-architecture.md for full design. Core principles: discovery over tracking, ready front model, nondeterministic idempotence.","status":"open","priority":1,"issue_type":"epic","created_at":"2025-12-28T19:10:08.780837-08:00","created_by":"mayor","updated_at":"2025-12-28T19:10:30.344386-08:00"}
{"id":"gt-kc7yj.1","title":"Refactor gt swarm to use beads backing","description":"Migrate gt swarm commands from .runtime/swarms.json to beads molecules.\n\nCurrent gt swarm stores state in .runtime/swarms.json - violating discovery over tracking.\nThe refactored version should use bd swarm create/status to work with beads molecules.\n\nImplementation:\n- gt swarm create calls bd swarm create\n- gt swarm status calls bd swarm status \n- gt swarm list queries bd list --mol-type=swarm\n- Remove .runtime/swarms.json dependency\n\nCROSS-RIG DEPENDENCIES (must complete first in beads repo):\n- bd-oxgi: mol_type schema field\n- bd-fa1q: bd swarm create command\n- bd-5x0j: bd swarm status command\n\nReference: ~/gt/docs/swarm-architecture.md","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-28T19:12:19.675605-08:00","created_by":"mayor","updated_at":"2025-12-28T22:05:51.723695-08:00","closed_at":"2025-12-28T22:05:51.723695-08:00","dependencies":[{"issue_id":"gt-kc7yj.1","depends_on_id":"gt-kc7yj","type":"parent-child","created_at":"2025-12-28T19:12:19.676106-08:00","created_by":"daemon"}]}
{"id":"gt-kc7yj.2","title":"Witness swarm integration","description":"Add swarm coordination to Witness patrol.\n\nThe Witness should be able to:\n1. Receive swarm assignments via mail (SWARM: subject prefix)\n2. Query ready front and dispatch to available polecats\n3. Monitor polecat progress on swarm tasks\n4. Detect completion and close swarm molecule\n5. Use Christmas Ornament pattern for arm-bonding (optional)\n\nImplementation:\n- Add swarm handling to mol-witness-patrol formula\n- Mail trigger: SWARM in subject\n- Dispatch: bd ready --parent=\u003cepic\u003e to find ready issues\n- Assign: gt sling \u003cissue\u003e to available polecat\n- Monitor: Check polecat status during patrol\n- Complete: When bd ready --parent returns empty and all closed\n\nReference: ~/gt/docs/swarm-architecture.md - Witness Integration section\n\nDependencies: gt-kc7yj.1 (gt swarm refactor)","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-28T19:12:41.909263-08:00","created_by":"mayor","updated_at":"2025-12-29T14:21:32.739182-08:00","closed_at":"2025-12-29T14:21:32.739182-08:00","close_reason":"Added dispatch-swarm-work step to mol-witness-patrol formula. Witness can now dispatch ready swarm tasks to idle polecats via gt sling.","dependencies":[{"issue_id":"gt-kc7yj.2","depends_on_id":"gt-kc7yj","type":"parent-child","created_at":"2025-12-28T19:12:41.909767-08:00","created_by":"daemon"},{"issue_id":"gt-kc7yj.2","depends_on_id":"gt-kc7yj.1","type":"blocks","created_at":"2025-12-28T19:12:53.340127-08:00","created_by":"daemon"}]}
{"id":"gt-kc7yj.3","title":"Swarm completion detection and auto-close","description":"Detect when all epic children are closed and auto-close the swarm molecule.\n\nCore logic:\n1. After any issue closes, check if it was part of a swarm\n2. Query bd list --parent=\u003cepic\u003e --status=open\n3. If empty (all closed), close the swarm molecule\n4. Fire completion event for activity feed\n\nCan be implemented as:\n- Part of Witness patrol\n- Or as a bd hook triggered on issue close\n- Or as a gt swarm check command called periodically\n\nReference: ~/gt/docs/swarm-architecture.md - Recovery Protocol\n\nDependencies: gt-kc7yj.1 (gt swarm refactor)","status":"closed","priority":1,"issue_type":"task","assignee":"mayor","created_at":"2025-12-28T19:12:42.759032-08:00","created_by":"mayor","updated_at":"2025-12-29T15:20:53.030161-08:00","closed_at":"2025-12-29T15:20:53.030161-08:00","close_reason":"Implemented swarm completion detection and auto-close in Witness patrol formula","dependencies":[{"issue_id":"gt-kc7yj.3","depends_on_id":"gt-kc7yj","type":"parent-child","created_at":"2025-12-28T19:12:42.759587-08:00","created_by":"daemon"},{"issue_id":"gt-kc7yj.3","depends_on_id":"gt-kc7yj.1","type":"blocks","created_at":"2025-12-28T19:12:53.36878-08:00","created_by":"daemon"}]}
{"id":"gt-kc7yj.4","title":"End-to-end swarm integration test","description":"Full integration test for swarm lifecycle.\n\nTest scenario:\n1. Create a small epic with 3-4 issues and dependencies\n2. Run bd swarm validate - should pass\n3. Run gt swarm create with the epic\n4. Verify swarm molecule created with mol_type=swarm\n5. Run gt swarm status - verify ready front\n6. Simulate issue completion (bd close)\n7. Verify ready front advances\n8. Complete all issues\n9. Verify swarm auto-closes\n\nCan be manual test documented in test file, or automated.\n\nDependencies: gt-kc7yj.2 (Witness integration), gt-kc7yj.3 (completion detection)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T19:12:43.609154-08:00","created_by":"mayor","updated_at":"2025-12-28T19:12:43.609154-08:00","dependencies":[{"issue_id":"gt-kc7yj.4","depends_on_id":"gt-kc7yj","type":"parent-child","created_at":"2025-12-28T19:12:43.610918-08:00","created_by":"daemon"},{"issue_id":"gt-kc7yj.4","depends_on_id":"gt-kc7yj.2","type":"blocks","created_at":"2025-12-28T19:12:53.397796-08:00","created_by":"daemon"},{"issue_id":"gt-kc7yj.4","depends_on_id":"gt-kc7yj.3","type":"blocks","created_at":"2025-12-28T19:12:53.428901-08:00","created_by":"daemon"}]}
{"id":"gt-kdy77","title":"gt crew add: Agent bead uses hardcoded gt- prefix instead of rig prefix","description":"When running 'gt crew add \u003cname\u003e --rig beads', the command tries to create an agent bead with ID 'gt-crew-beads-\u003cname\u003e' but beads rig uses 'bd' prefix.\n\nError: issue ID 'gt-crew-beads-grip' does not match configured prefix 'bd'\n\nThe agent bead ID should use the target rig's prefix, not hardcode 'gt-'.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-29T14:55:48.953521-08:00","created_by":"stevey","updated_at":"2025-12-29T15:28:36.394392-08:00","closed_at":"2025-12-29T15:28:36.394392-08:00","close_reason":"Fixed: Added WithPrefix variants to agent bead ID functions, updated crew_add.go, rig/manager.go, and doctor/agent_beads_check.go to use rig's configured prefix"}
{"id":"gt-kfznm","title":"Refinery: Send MERGED notification to witness after merge","description":"During liftoff test (gt-j0gx2), observed that refinery:\n1. Received MERGE_READY for nux\n2. Fetched, rebased, resolved conflicts correctly\n3. Ran tests (passed)\n4. Merged to main and pushed\n5. Deleted polecat branch\n\nBut did NOT:\n- Send MERGED mail to witness\n- Close the MR bead (gt-5qkah)\n\nThe mol-refinery-patrol.formula.toml documents this step but the agent didn't execute it.\n\nImpact:\n- Witness never receives MERGED signal\n- Polecat worktree never gets nuked\n- MR beads accumulate as open\n\nFix:\nAfter successful merge+push, refinery must:\n```bash\ngt mail send \u003crig\u003e/witness -s \"MERGED \u003cpolecat\u003e\" -m \"...\"\nbd close \u003cmr-bead\u003e --reason \"Merged to main\"\n```","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-28T16:26:08.423116-08:00","created_by":"stevey","updated_at":"2025-12-28T16:30:17.040435-08:00","closed_at":"2025-12-28T16:30:17.040435-08:00"}
{"id":"gt-kjsp3","title":"Digest: mol-deacon-patrol","description":"Patrol 9: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:06:55.631263-08:00","updated_at":"2025-12-27T23:06:55.631263-08:00","closed_at":"2025-12-27T23:06:55.631229-08:00"}
{"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":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-23T20:29:58.515591-08:00","updated_at":"2025-12-28T22:37:43.91459-08:00","closed_at":"2025-12-28T22:37:43.91459-08:00"}
{"id":"gt-kmn.12","title":"Ephemeral rig support for ad-hoc batch work","description":"Support for temporary worker rigs for ad-hoc batch work.\n\n## Use Case\n\nAd-hoc batch work where you want temporary workers:\n- gt spawn --epic \u003cepic-id\u003e --ephemeral --workers 3\n- Creates temp rig with 3 clones\n- Workers process epic children\n- Work merges through queue\n- Clones cleaned up when done\n\n## Interface\n\n```go\ntype EphemeralRig struct {\n ID string\n GitURL string\n BaseCommit string\n Workers []string\n IntegrationBranch string\n EpicID string // associated epic (for cleanup trigger)\n CreatedAt time.Time\n}\n\nfunc InitEphemeralRig(gitURL string, numWorkers int) (*EphemeralRig, error)\nfunc (r *EphemeralRig) AddWorker(name string) error\nfunc (r *EphemeralRig) Destroy(force bool) error\n```\n\n## Directory Structure\n\n```\n\u003crig\u003e/ephemeral/\n└── rig-a3f7/\n ├── config.json\n ├── Alice/ # clone\n ├── Bob/ # clone\n └── Carol/ # clone\n```\n\n## Cleanup Trigger\n\nWhen all issues in the associated epic are closed AND merged, the ephemeral rig can be destroyed.\n\n## Note\n\nNo swarm ID needed - the epic ID provides the grouping. Ephemeral rig is just a convenience for temporary clones.\n\n## Reference\n\nPGT: ephemeral.py (for structure, ignore swarm ID coupling)","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-16T00:10:44.915982-08:00","updated_at":"2025-12-28T22:36:41.666721-08:00","closed_at":"2025-12-28T22:36:41.666721-08:00","dependencies":[{"issue_id":"gt-kmn.12","depends_on_id":"gt-kmn","type":"parent-child","created_at":"2025-12-16T00:10:44.916346-08:00","created_by":"daemon"}]}
{"id":"gt-kmn.13","title":"Plugin: work-oracle (pre-dispatch analysis)","description":"Plugin for pre-dispatch task analysis and decomposition.\n\n## Purpose\n\nBefore dispatching workers for an epic, ask work-oracle to:\n- Validate task breakdown\n- Identify parallelization opportunities\n- Predict conflicts between tasks\n- Suggest worker count\n\n## Hook Point\n\nMayor consults work-oracle before spawning workers.\n\n## Interface\n\nInput (via mail):\n- Epic ID with proposed child issues\n- Rig context (current state of codebase)\n\nOutput (via mail + bead):\n- Recommended task groupings\n- Dependency suggestions\n- Risk assessment (which files might conflict)\n- Optimal worker count\n\n## Structure\n\n```\n\u003crig\u003e/plugins/work-oracle/\n├── CLAUDE.md # Analysis prompts\n├── mail/inbox.jsonl\n└── state.json\n```\n\nUses existing plugin-as-agent architecture.\n\n## Note\n\nWas \"swarm-oracle\" - renamed because there are no swarm IDs. This plugin helps plan batch work, not manage swarm entities.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-16T00:10:46.139004-08:00","updated_at":"2025-12-28T22:36:41.684579-08:00","closed_at":"2025-12-28T22:36:41.684579-08:00","dependencies":[{"issue_id":"gt-kmn.13","depends_on_id":"gt-kmn","type":"parent-child","created_at":"2025-12-16T00:10:46.139369-08:00","created_by":"daemon"}]}
{"id":"gt-koja9","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 17: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:49.243562-08:00","updated_at":"2025-12-28T11:22:49.243562-08:00","closed_at":"2025-12-28T11:22:49.243529-08:00"}
{"id":"gt-ks3cf","title":"Digest: mol-deacon-patrol","description":"deacon patrol: 21 cycles complete","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T02:05:18.084249-08:00","updated_at":"2025-12-28T02:05:18.084249-08:00","closed_at":"2025-12-28T02:05:18.084194-08:00","dependencies":[{"issue_id":"gt-ks3cf","depends_on_id":"gt-eph-7gy","type":"parent-child","created_at":"2025-12-28T02:05:18.085176-08:00","created_by":"deacon"}]}
{"id":"gt-kt9qq","title":"Deacon Patrol","description":"Mayor's daemon patrol loop for handling callbacks, health checks, and cleanup.","status":"open","priority":2,"issue_type":"molecule","created_at":"2025-12-29T14:37:53.146706-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:37:53.146706-08:00"}
{"id":"gt-l3gfn","title":"Digest: mol-deacon-patrol","description":"Patrol 18: Quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T07:29:32.029593-08:00","updated_at":"2025-12-25T07:29:32.029593-08:00","closed_at":"2025-12-25T07:29:32.029556-08:00"}
{"id":"gt-l3o0k","title":"Update gastown to use 'ephemeral' instead of 'wisp' terminology","description":"After beads renames 'wisp' to 'ephemeral' (bd-o18s), update gastown code:\n\n- patrol_helpers.go: bd wisp create → bd ephemeral create (or new API)\n- doctor/wisp_check.go: rename to ephemeral_check.go\n- All references to Wisp field → Ephemeral\n\nDepends on: bd-o18s","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-26T20:16:44.91769-08:00","updated_at":"2025-12-26T20:16:44.91769-08:00","dependencies":[{"issue_id":"gt-l3o0k","depends_on_id":"external:beads:ephemeral-rename","type":"blocks","created_at":"2025-12-26T20:17:00.859719-08:00","created_by":"daemon"},{"issue_id":"gt-l3o0k","depends_on_id":"external:beads:bd-o18s","type":"blocks","created_at":"2025-12-26T20:17:51.026548-08:00","created_by":"daemon"}]}
{"id":"gt-l6ro3","title":"Patrol Exponential Backoff System","description":"Cost-saving await-signal model for patrol agents.\n\n## The Problem\n\nPatrol agents (witness, refinery) poll continuously even when idle, burning API credits.\n\n## The Solution: Await-Signal\n\nAgents don't poll constantly. They **wait for a signal**, then **discover reality**.\n\n```\nPATROL LOOP:\n await-signal (just wake me)\n ↓ awake\n check-reality (mail, beads, hook, git)\n ↓\n work found? → DO WORK → loop\n ↓ no\n increase backoff → loop\n```\n\n**Key principle (ZFC-aligned):** Signal carries no semantic meaning - just 'wake up'.\nAgent discovers what to do by examining reality.\n\n## Two-Level Wake\n\n| Level | State | Command |\n|-------|-------|---------|\n| 1 | Running (backoff) | `gt nudge` clears backoff |\n| 2 | Asleep | `gt rig boot` starts session |\n\n**Boot+nudge pattern:**\n```bash\ngt rig boot \u003crig\u003e # Wake if asleep (idempotent)\ngt nudge \u003crig\u003e/witness 'wake' # Clear backoff if running\n```\n\n## Backoff Curve\n\nBase: 30s → 60s → 120s → 240s → ... → 10min cap\n\nResets on: nudge received, work found, deacon ping.\n\n## Reference\n\nSee ~/gt/docs/patrol-system-design.md (Await-Signal Model section)","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-28T22:31:05.32225-08:00","created_by":"mayor","updated_at":"2025-12-28T23:05:37.717126-08:00"}
{"id":"gt-l6ro3.1","title":"Daemon activity detection and rig nudging","description":"Daemon monitors activity feed and nudges patrol agents when commands detected.\n\n## Implementation\n\n1. Daemon watches activity feed (or logs) for gt/bd command execution\n2. Track per-rig last-activity timestamps\n3. On activity in rig: nudge witness + refinery for that rig\n4. Nudge clears their backoff → immediate poll\n\n## Activity Sources\n\n- gt commands (sling, mail, polecat, etc.)\n- bd commands (create, update, close, sync, etc.)\n- Maybe: file writes in rig directories\n\n## Graceful Behavior\n\n- If agent session not running: no-op (not an error)\n- Activity detection is best-effort\n- Backoff still works without this (just slower wake)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T22:31:24.266187-08:00","created_by":"mayor","updated_at":"2025-12-28T22:31:24.266187-08:00","dependencies":[{"issue_id":"gt-l6ro3.1","depends_on_id":"gt-l6ro3","type":"parent-child","created_at":"2025-12-28T22:31:24.266638-08:00","created_by":"daemon"},{"issue_id":"gt-l6ro3.1","depends_on_id":"gt-arjlu","type":"blocks","created_at":"2025-12-28T22:31:51.176239-08:00","created_by":"daemon"}]}
{"id":"gt-l6ro3.2","title":"Deacon health pings clear agent backoff","description":"Deacon's periodic health checks also clear patrol agent backoff.\n\n## Current Flow (mol-deacon-patrol)\n\nDeacon already pings witnesses/refineries for health checks. These pings should:\n1. Verify agent is alive\n2. Clear their backoff as side effect\n\n## Implementation\n\nIn mol-deacon-patrol health-scan step:\n- gt nudge \u003crig\u003e/witness 'HEALTH_CHECK from deacon'\n- gt nudge \u003crig\u003e/refinery 'HEALTH_CHECK from deacon'\n\nReceiving agent:\n- Responds to prove liveness\n- Resets backoff to base interval\n\n## Ping Interval\n\nDeacon patrols every ~1-2 minutes. This ensures:\n- Maximum backoff is bounded by deacon ping interval\n- Even if daemon misses activity, deacon catches up","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T22:31:35.003984-08:00","created_by":"mayor","updated_at":"2025-12-28T22:31:35.003984-08:00","dependencies":[{"issue_id":"gt-l6ro3.2","depends_on_id":"gt-l6ro3","type":"parent-child","created_at":"2025-12-28T22:31:35.004499-08:00","created_by":"daemon"},{"issue_id":"gt-l6ro3.2","depends_on_id":"gt-arjlu","type":"blocks","created_at":"2025-12-28T22:31:51.206694-08:00","created_by":"daemon"}]}
{"id":"gt-l6ro3.3","title":"Molecule await-signal step type","description":"Add await-signal as a molecule step type for patrol agents.\n\n## Step Definition\n\n```toml\n[[steps]]\nid = \"await-signal\"\ntype = \"wait\"\nbackoff = { base = \"30s\", multiplier = 2, max = \"10m\" }\ndescription = \"Wait for signal, then check reality\"\n```\n\n## Behavior\n\n1. Sleep for current backoff interval\n2. Wake immediately on nudge (or timeout expires)\n3. Proceed to next step (check-reality)\n4. If no work found, loop back with increased backoff\n5. If work found, reset backoff to base\n\n## Implementation Options\n\nA. Formula-level: Define in TOML, agent interprets\nB. Code-level: Agent implements wait loop with backoff\n\nOption A is cleaner but needs formula parser support.\nOption B works now but less declarative.\n\n## Used By\n\n- mol-witness-patrol (first step)\n- mol-refinery-patrol (first step)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T23:06:11.638803-08:00","created_by":"mayor","updated_at":"2025-12-28T23:06:11.638803-08:00","dependencies":[{"issue_id":"gt-l6ro3.3","depends_on_id":"gt-l6ro3","type":"parent-child","created_at":"2025-12-28T23:06:11.63931-08:00","created_by":"daemon"}]}
{"id":"gt-l6ro3.4","title":"Deacon stuck-session detection and force-kill protocol","description":"Deacon detects and kills genuinely stuck/hung Claude Code sessions.\n\n## The Problem\n\nClaude Code sessions can get stuck:\n- Infinite loop / hung tool call\n- Crashed but tmux session still exists\n- Unresponsive to nudges\n\n`gt rig boot` is idempotent (won't kill) - it only starts if not running.\nSomeone needs to detect stuck sessions and force-kill them.\n\n## Detection Protocol\n\nDuring Deacon health rounds:\n\n1. **Ping test**: `gt nudge \u003cagent\u003e 'HEALTH_CHECK'`\n2. **Wait for response**: Agent should update agent bead `last_activity`\n3. **Timeout**: If no activity update within N seconds, mark suspicious\n4. **Consecutive failures**: After M consecutive failures, declare stuck\n\n## Force-Kill Protocol\n\nWhen stuck detected:\n\n```bash\n# 1. Log the intervention\ngt mail send \u003cagent\u003e -s 'FORCE_KILL: unresponsive' -m 'Deacon detected...'\n\n# 2. Kill the tmux session\ntmux kill-session -t \u003csession-name\u003e\n\n# 3. Update agent bead state\nbd update \u003cagent-bead\u003e --status=killed --reason='Deacon force-kill: unresponsive'\n\n# 4. Notify mayor (optional, for visibility)\ngt mail send mayor/ -s 'Agent killed: \u003cagent\u003e' -m 'Reason: unresponsive...'\n```\n\n## Recovery\n\nAfter force-kill, the agent is 'asleep'. Normal wake mechanisms apply:\n- `gt rig boot` restarts it\n- Or stays asleep until next activity trigger\n\n## Parameters (configurable)\n\n- ping_timeout: 30s (how long to wait for response)\n- consecutive_failures: 3 (how many before force-kill)\n- cooldown: 5m (minimum time between force-kills of same agent)\n\n## NOT Deacon's Job\n\n- Graceful shutdown (agent does this itself)\n- Context-based recycling (agent self-handoffs)\n- Normal backoff/sleep transitions\n\nDeacon only force-kills when agent is genuinely unresponsive.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T23:09:21.694807-08:00","created_by":"mayor","updated_at":"2025-12-28T23:09:21.694807-08:00","dependencies":[{"issue_id":"gt-l6ro3.4","depends_on_id":"gt-l6ro3","type":"parent-child","created_at":"2025-12-28T23:09:21.695345-08:00","created_by":"daemon"}]}
{"id":"gt-l8fp7","title":"Digest: mol-deacon-patrol","description":"Patrol 1: inbox clear, gates clear, no pending spawns, witnesses/refineries healthy, no orphans","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:49:38.09038-08:00","updated_at":"2025-12-28T15:49:38.09038-08:00","closed_at":"2025-12-28T15:49:38.090344-08:00"}
{"id":"gt-l90dq","title":"gt crew at fails to detect existing crew session","description":"## Summary\n`gt crew at` started a new Claude session instead of attaching to an existing one for the same crew worker.\n\n## Reproduction\n1. Have a crew worker (joe) running in gastown/crew/joe (PID 27526 on tty s030)\n2. Run `gt crew at` from the same directory (gastown/crew/joe)\n3. Expected: Attach to existing session on s030\n4. Actual: Started a brand new Claude session (PID 67618 on s026)\n\n## Evidence\n```\n# Old joe still running:\nPID 27526 on s030: /Users/stevey/gt/gastown/crew/joe (started 10:22AM)\n\n# New joe spawned by 'gt crew at':\nPID 67618 on s026: /Users/stevey/gt/gastown/crew/joe (started 10:39AM)\n```\n\n## Impact\n- Duplicate crew workers cause confusion\n- User expected to attach to existing session, not spawn a second one\n- The original session was still functional (just stuck in feed display)\n\n## Likely cause\n`gt crew at` probably doesn't check for running Claude processes in the crew directory before spawning a new one. It should:\n1. Check for existing tmux sessions for this crew worker\n2. Check for running `claude` processes with cwd matching the crew directory\n3. If found, attach to existing session instead of spawning new one","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-28T10:52:28.917151-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T10:52:42.111835-08:00"}
{"id":"gt-l9g","title":"Beads epic templates for batch work patterns","description":"Optional: Define templates for common batch work patterns.\n\n## Concept\n\nA template encodes a workflow pattern that can be instantiated as beads:\n\n```yaml\n# templates/batch-basic.yaml\nname: basic-batch\ndescription: Simple batch work pattern\nphases:\n - name: startup\n issues:\n - title: \"Verify workers ready\"\n - name: working\n # Actual work issues added separately\n - name: cleanup\n issues:\n - title: \"Merge all branches\"\n - title: \"Clean up workers\"\n - title: \"Report to Mayor\"\n```\n\n## Usage\n\n```bash\ngt spawn --template basic-batch --epic gt-u1j --workers 3\n```\n\nCreates beads epic with template phases + actual work from gt-u1j children.\n\n## Decision Point\n\nTemplates are OPTIONAL. The core design (beads as state, multi-wave orchestration) works without templates. Templates are sugar for common patterns.\n\nConsider deferring to P3 or dropping entirely if beads epics with dependencies suffice.\n\n## Note\n\nNo \"swarm IDs\" involved - templates just pre-populate epic/issue structure.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T01:51:24.399235-08:00","updated_at":"2025-12-16T17:26:08.868396-08:00"}
{"id":"gt-l9t35","title":"Test MR","description":"branch: test-branch\ntarget: main\nsource_issue: gt-test\nrig: gastown","status":"closed","priority":3,"issue_type":"merge-request","created_at":"2025-12-28T13:55:31.051975-08:00","created_by":"mayor","updated_at":"2025-12-28T13:55:51.591898-08:00","closed_at":"2025-12-28T13:55:51.591898-08:00"}
{"id":"gt-lajrx","title":"Digest: mol-deacon-patrol","description":"Patrol 7: healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T06:09:55.036375-08:00","updated_at":"2025-12-28T06:09:55.036375-08:00","closed_at":"2025-12-28T06:09:55.036344-08:00"}
{"id":"gt-lak31","title":"MQ events in gt feed","description":"Wire MQ lifecycle events to gt feed display.\n\nAfter 'Refinery emits activity events' is done:\n- gt feed should show merge_started, merged, merge_failed events\n- Format: timestamp, event type, MR details\n- Color coding: green for merged, red for failed\n\nExample output:\n 19:45 MERGED gt-abc123 (polecat/nux → main)\n 19:42 MERGE_STARTED gt-abc123\n 19:40 MERGE_FAILED gt-xyz789 (conflict)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T21:40:39.079766-08:00","created_by":"gastown/crew/jack","updated_at":"2025-12-28T21:40:39.079766-08:00","dependencies":[{"issue_id":"gt-lak31","depends_on_id":"gt-ytsxp","type":"blocks","created_at":"2025-12-28T21:41:11.587659-08:00","created_by":"daemon"}]}
{"id":"gt-lcjjk","title":"Digest: mol-deacon-patrol","description":"Patrol 18: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:36:32.505078-08:00","updated_at":"2025-12-28T01:36:32.505078-08:00","closed_at":"2025-12-28T01:36:32.505042-08:00"}
{"id":"gt-ldb5m","title":"Digest: mol-deacon-patrol","description":"P11: stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T19:59:19.365052-08:00","updated_at":"2025-12-25T19:59:19.365052-08:00","closed_at":"2025-12-25T19:59:19.364984-08:00"}
{"id":"gt-le1a","title":"Merge: gt-3x1","description":"branch: polecat/Slit\ntarget: main\nsource_issue: gt-3x1\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-19T14:53:47.674479-08:00","updated_at":"2025-12-19T18:30:24.050697-08:00","closed_at":"2025-12-19T18:30:24.0507-08:00"}
{"id":"gt-lexye","title":"Create internal/tui/ package with feed model","description":"Create the TUI infrastructure for gt feed.\n\n## Package structure\n```\ninternal/tui/\n feed/\n model.go # bubbletea Model struct\n view.go # View() rendering\n update.go # Update() message handling\n events.go # Event stream subscription (tail .feed.jsonl)\n styles.go # lipgloss styles\n keys.go # Key bindings\n```\n\n## Model components\n1. **AgentTree** - Collapsible tree of agents by role\n2. **EventStream** - Scrollable viewport of recent events\n3. **StatusBar** - Current filter, help hints\n4. **FilterPopup** - Modal for setting filters\n\n## Key bindings\n- j/k - scroll events\n- J/K - scroll agent tree\n- tab - switch focus (tree/stream)\n- enter - expand/details\n- / - search\n- f - filter popup\n- q - quit\n- ? - help\n\n## Event subscription\n- Tail ~/gt/.feed.jsonl using fsnotify or polling\n- Parse JSONL events\n- Send as bubbletea messages to update model","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T16:13:40.29527-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T16:21:50.5417-08:00","closed_at":"2025-12-28T16:21:50.5417-08:00","dependencies":[{"issue_id":"gt-lexye","depends_on_id":"gt-be0as","type":"blocks","created_at":"2025-12-28T16:14:50.294818-08:00","created_by":"daemon"}]}
{"id":"gt-lfi2d","title":"Delete .runtime/*.json observable state","description":"Remove JSON files that tracked observable state (now in beads/activity stream).\n\nFiles to delete or minimize:\n- .runtime/refinery.json - remove stats (keep minimal process state if needed)\n- .runtime/witness.json - remove stats\n- .runtime/swarms.json - delete entirely (gt-kc7yj moves to beads)\n\nPrerequisite: All events flowing through activity stream, swarms in beads.\n\nThis is the cleanup step after observability is working.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T21:40:53.315319-08:00","created_by":"gastown/crew/jack","updated_at":"2025-12-28T21:40:53.315319-08:00","dependencies":[{"issue_id":"gt-lfi2d","depends_on_id":"gt-lak31","type":"blocks","created_at":"2025-12-28T21:41:11.646917-08:00","created_by":"daemon"},{"issue_id":"gt-lfi2d","depends_on_id":"gt-rbncw","type":"blocks","created_at":"2025-12-28T21:41:11.676514-08:00","created_by":"daemon"},{"issue_id":"gt-lfi2d","depends_on_id":"gt-kc7yj","type":"blocks","created_at":"2025-12-28T21:41:11.706063-08:00","created_by":"daemon"}]}
{"id":"gt-lgtcr","title":"Digest: mol-deacon-patrol","description":"Patrol 10: all healthy, sessions up","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:54:49.173354-08:00","updated_at":"2025-12-28T15:54:49.173354-08:00","closed_at":"2025-12-28T15:54:49.17332-08:00"}
{"id":"gt-liftoff","title":"Liftoff implementation plan in Beads","description":"## Context\n\nSession on 2025-12-27 produced three key docs:\n- `~/gt/docs/agent-as-bead.md` - Agents ARE beads (identity, hook slots, CV chain roots)\n- `~/gt/docs/zfc-violations-audit.md` - Where Go infers instead of trusting agents\n- `~/gt/docs/liftoff-plan.md` - 4.5 day plan to self-sustaining Gas Town\n\n## Work Required\n\n### Phase 1: Audit existing beads ✅\n- Review all open beads in gt- prefix\n- Close obsolete/stale issues\n- Update any that need refinement\n- Note which existing beads align with liftoff plan\n\n### Phase 2: File new beads ✅\nTranslate liftoff-plan.md into beads with proper dependencies.\n\nThree pillars:\n1. **Pillar 1: Agent Identity** (gt-d0jqp) - schema, slot commands, migration\n2. **Pillar 2: Patrol Ignition** (gt-hwka3) - witness/refinery formula wiring\n3. **Pillar 3: Polecat Lifecycle** (gt-4a2qt) - recycle/nuke commands, session-per-step\n\n### Phase 3: Review ✅\nHuman reviews the plan.\n\n## Deliverable\n\nA complete dependency graph in beads that can be:\n1. Queried with `bd ready` to find available work\n2. Slung to polecats in dependency order\n3. Tracked to completion\n\n## References\n\n- ~/gt/docs/liftoff-plan.md - 4.5 day plan\n- ~/gt/docs/agent-as-bead.md - Agent identity design\n- ~/gt/docs/zfc-violations-audit.md - ZFC violations addressed","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-27T21:42:03.880845-08:00","created_by":"mayor","updated_at":"2025-12-28T16:13:09.29063-08:00","closed_at":"2025-12-28T16:13:09.29063-08:00","dependencies":[{"issue_id":"gt-liftoff","depends_on_id":"gt-d0jqp","type":"blocks","created_at":"2025-12-27T21:42:12.255705-08:00","created_by":"daemon"},{"issue_id":"gt-liftoff","depends_on_id":"gt-hwka3","type":"blocks","created_at":"2025-12-27T21:42:12.293402-08:00","created_by":"daemon"},{"issue_id":"gt-liftoff","depends_on_id":"gt-4a2qt","type":"blocks","created_at":"2025-12-27T21:42:12.329975-08:00","created_by":"daemon"}]}
{"id":"gt-lisj6","title":"Day 1.6: Update gt mol status to use hook slot","description":"Migrate gt mol status from:\n- Query(status=pinned AND assignee=me)\nTo:\n- Read agent bead → check hook_bead field\n\nThis eliminates hook ambiguity.\n\nParent: gt-d0jqp","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:23.813893-08:00","created_by":"mayor","updated_at":"2025-12-28T01:07:55.197087-08:00","closed_at":"2025-12-28T01:07:55.197087-08:00","dependencies":[{"issue_id":"gt-lisj6","depends_on_id":"gt-h5sza","type":"blocks","created_at":"2025-12-27T20:58:54.435681-08:00","created_by":"daemon"},{"issue_id":"gt-lisj6","depends_on_id":"gt-awu07","type":"blocks","created_at":"2025-12-27T20:58:55.49367-08:00","created_by":"daemon"},{"issue_id":"gt-lisj6","depends_on_id":"gt-d0jqp","type":"parent-child","created_at":"2025-12-27T20:59:02.819695-08:00","created_by":"daemon"}]}
{"id":"gt-ljhlh","title":"Digest: mol-deacon-patrol","description":"Patrol complete: town quiet, all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:18:52.484278-08:00","updated_at":"2025-12-28T19:18:52.484278-08:00","closed_at":"2025-12-28T19:18:52.484244-08:00"}
{"id":"gt-lmtma","title":"Digest: mol-deacon-patrol","description":"Patrol 10: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:46:21.954989-08:00","updated_at":"2025-12-28T19:46:21.954989-08:00","closed_at":"2025-12-28T19:46:21.954953-08:00"}
{"id":"gt-ln5af","title":"gt commands should follow .beads/redirect","description":"## Problem\n\n`gt sling` (and likely other gt commands) don't follow the `.beads/redirect` file that `bd` uses to share beads across clones.\n\nThis caused confusion during the v0.39.0 release: molecules were poured successfully to mayor/rig's beads (via redirect), but `gt sling` couldn't find them because it was looking in the crew clone's local .beads/.\n\n## Expected Behavior\n\nAll `gt` commands that interact with beads should follow the redirect mechanism that `bd` uses.\n\n## Affected Commands (likely)\n\n- `gt sling`\n- `gt hook` \n- `gt mol status`\n- `gt mol attach`\n- Any command that shells out to `bd show` or similar\n\n## Solution\n\nWhen `gt` needs to find the beads directory, check for `.beads/redirect` and follow it, same as `bd` does.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-27T21:15:50.297192-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-27T21:34:34.290471-08:00","closed_at":"2025-12-27T21:34:34.290471-08:00"}
{"id":"gt-lnrei","title":"Digest: mol-deacon-patrol","description":"Patrol 7: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:30:51.644618-08:00","updated_at":"2025-12-28T01:30:51.644618-08:00","closed_at":"2025-12-28T01:30:51.644571-08:00"}
{"id":"gt-lo9eu","title":"Integration test: simple file creation","description":"Test task for polecat integration test (gt-7psb8).\n\nSimple task: Create a file ~/gt/gastown/test-polecat-integration.txt with content 'Polecat integration test successful'.\n\nThis is an intentionally trivial task to verify the polecat → witness → refinery → merged flow works end-to-end.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T13:05:23.572068-08:00","created_by":"mayor","updated_at":"2025-12-28T13:07:17.160765-08:00","closed_at":"2025-12-28T13:07:17.160765-08:00"}
{"id":"gt-ls4he","title":"Digest: mol-deacon-patrol","description":"Patrol 8: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:31:25.114431-08:00","updated_at":"2025-12-28T01:31:25.114431-08:00","closed_at":"2025-12-28T01:31:25.11439-08:00"}
{"id":"gt-ls9sh","title":"Digest: mol-deacon-patrol","description":"Patrol 8","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:50:51.372141-08:00","updated_at":"2025-12-25T20:50:51.372141-08:00","closed_at":"2025-12-25T20:50:51.372074-08:00"}
{"id":"gt-ltbaz","title":"Digest: mol-deacon-patrol","description":"Patrol 2: All agents healthy, no issues.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:02:47.123021-08:00","updated_at":"2025-12-28T03:02:47.123021-08:00","closed_at":"2025-12-28T03:02:47.122979-08:00"}
{"id":"gt-m5w4g","title":"Agent Communication Protocol","description":"Structured mail between agents for coordination.\n\n## Problem\nAgents communicate via freeform mail. This works but lacks parseable structure for automated handling.\n\n## Protocols\n\n### Witness to Refinery\n- POLECAT_READY: worker X completed, branch ready for merge\n- REWORK_COMPLETE: worker Y finished requested rework\n\n### Refinery to Witness \n- MERGE_SUCCESS: worker X merged, can be cleaned up\n- MERGE_FAILED: worker X needs rework (reason attached)\n- REWORK_REQUEST: please have worker X rebase on current main\n\n### Polecat to Witness\n- WORK_COMPLETE: done with assigned issue\n- NEED_HELP: stuck, requesting intervention\n\n### Any to Deacon\n- ESCALATION: problem requiring Mayor attention\n\n## Mail Format\nSubject: [PROTOCOL_TYPE] brief description\nBody: Structured YAML or JSON payload\n\n## Success Criteria\n- Patrol steps parse protocol messages automatically\n- Handlers exist for each protocol type\n- Integration test: polecat completes -\u003e witness notifies -\u003e refinery merges -\u003e witness cleans up\n\nConsolidates gt-0qki.","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-25T20:46:35.538744-08:00","updated_at":"2025-12-25T20:46:35.538744-08:00","dependencies":[{"issue_id":"gt-m5w4g","depends_on_id":"gt-psj76","type":"blocks","created_at":"2025-12-25T20:47:18.478538-08:00","created_by":"daemon"}]}
{"id":"gt-m5w4g.1","title":"Protocol message specification","description":"Define YAML format for protocol messages. Subject: [PROTOCOL_TYPE] brief. Body: structured payload. Document all protocol types: POLECAT_READY, MERGE_SUCCESS, MERGE_FAILED, REWORK_REQUEST, WORK_COMPLETE, NEED_HELP, ESCALATION.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-25T20:56:27.493974-08:00","updated_at":"2025-12-25T20:56:27.493974-08:00","dependencies":[{"issue_id":"gt-m5w4g.1","depends_on_id":"gt-m5w4g","type":"parent-child","created_at":"2025-12-25T20:56:27.494443-08:00","created_by":"daemon"}]}
{"id":"gt-m5w4g.2","title":"Witness-Refinery protocol handlers","description":"Implement handlers for: POLECAT_READY (witness→refinery: worker done, branch ready), MERGE_SUCCESS (refinery→witness: merged, cleanup ok), MERGE_FAILED (refinery→witness: needs rework), REWORK_REQUEST (refinery→witness: rebase needed).","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-25T20:56:28.618916-08:00","updated_at":"2025-12-25T20:56:28.618916-08:00","dependencies":[{"issue_id":"gt-m5w4g.2","depends_on_id":"gt-m5w4g","type":"parent-child","created_at":"2025-12-25T20:56:28.620996-08:00","created_by":"daemon"},{"issue_id":"gt-m5w4g.2","depends_on_id":"gt-m5w4g.1","type":"blocks","created_at":"2025-12-25T20:56:50.702111-08:00","created_by":"daemon"}]}
{"id":"gt-m5w4g.3","title":"Polecat-Witness protocol handlers","description":"Implement handlers for: WORK_COMPLETE (polecat→witness: done with issue), NEED_HELP (polecat→witness: stuck, requesting intervention). Witness patrol steps should parse and act on these.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-25T20:56:29.752982-08:00","updated_at":"2025-12-25T20:56:29.752982-08:00","dependencies":[{"issue_id":"gt-m5w4g.3","depends_on_id":"gt-m5w4g","type":"parent-child","created_at":"2025-12-25T20:56:29.75638-08:00","created_by":"daemon"},{"issue_id":"gt-m5w4g.3","depends_on_id":"gt-m5w4g.1","type":"blocks","created_at":"2025-12-25T20:56:50.797519-08:00","created_by":"daemon"}]}
{"id":"gt-m5w4g.4","title":"Agent protocol integration test","description":"End-to-end test: polecat completes work → sends WORK_COMPLETE → witness receives and sends POLECAT_READY → refinery merges → sends MERGE_SUCCESS → witness cleans up polecat. All via structured protocol messages.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-25T20:56:31.204129-08:00","updated_at":"2025-12-25T20:56:31.204129-08:00","dependencies":[{"issue_id":"gt-m5w4g.4","depends_on_id":"gt-m5w4g","type":"parent-child","created_at":"2025-12-25T20:56:31.207559-08:00","created_by":"daemon"},{"issue_id":"gt-m5w4g.4","depends_on_id":"gt-m5w4g.2","type":"blocks","created_at":"2025-12-25T20:56:50.900223-08:00","created_by":"daemon"},{"issue_id":"gt-m5w4g.4","depends_on_id":"gt-m5w4g.3","type":"blocks","created_at":"2025-12-25T20:56:50.995873-08:00","created_by":"daemon"}]}
{"id":"gt-m61ew","title":"Polecats go off-task instead of working pinned bead","description":"During swarm execution, polecats frequently stop working on their assigned task (pinned bead) and start doing other things like:\n- Asking about other polecats\n- Checking mail\n- Monitoring swarm status\n- Working on unrelated issues\n\nExpected: Polecat receives task via gt sling, works on it until completion, signals done.\nActual: Polecat gets distracted and stops working on assigned task.\n\nRoot cause hypothesis: CLAUDE.md instructions don't strongly enforce 'work your hook' behavior. Need clearer polecat template that emphasizes single-task focus.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-28T16:31:51.050113-08:00","created_by":"mayor","updated_at":"2025-12-28T16:42:14.079822-08:00","closed_at":"2025-12-28T16:42:14.079822-08:00"}
{"id":"gt-m7tz0","title":"Sling reports 'already pinned' but mol status shows empty hook","description":"During swarm operations, gt sling reported beads were 'already pinned' but gt mol status showed nothing on the hook.\n\n**Observed:**\n```\n$ gt sling bd-9btu beads/Nux\nError: bead bd-9btu is already pinned to gt-beads-nux\n\n$ gt mol status beads/Nux\nNothing on hook - no work slung\n```\n\n**Expected:**\nIf a bead is pinned, mol status should show it. If mol status shows empty, sling should work.\n\n**Workaround:**\nUsed --force flag to re-sling, which worked.\n\n**Root cause hypothesis:**\nAgent bead state may be stored in town beads but polecat's local view doesn't see it, or the pin record exists but session state is stale.","status":"closed","priority":3,"issue_type":"bug","created_at":"2025-12-28T22:14:09.211651-08:00","created_by":"beads/crew/emma","updated_at":"2025-12-28T22:37:43.615838-08:00","closed_at":"2025-12-28T22:37:43.615838-08:00"}
{"id":"gt-m99yc","title":"Digest: mol-deacon-patrol","description":"Patrol 12: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:08:09.151846-08:00","updated_at":"2025-12-28T03:08:09.151846-08:00","closed_at":"2025-12-28T03:08:09.151813-08:00"}
{"id":"gt-mayor","title":"gt-mayor","description":"gt-mayor\n\nrole_type: mayor\nrig: null\nagent_state: stopped\nhook_bead: null\nrole_bead: gt-mayor-role\ncleanup_status: null","status":"open","priority":2,"issue_type":"agent","created_at":"2025-12-28T00:07:10.885229-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-29T16:09:25.588443-08:00"}
{"id":"gt-mayor-role","title":"Mayor Role Definition","description":"You are the Mayor - global coordinator of Gas Town. You sit above all rigs,\ncoordinating work across the entire workspace.\n\ndefault_molecule: mol-mayor-patrol\ncapabilities:\n - dispatch_work\n - cross_rig_coordination\n - escalation_handling\n\n## Responsibilities\n\n- Work dispatch: Spawn workers for issues, coordinate batch work on epics\n- Cross-rig coordination: Route work between rigs when needed\n- Escalation handling: Resolve issues Witnesses can't handle\n- Strategic decisions: Architecture, priorities, integration planning\n\nNOT your job: Per-worker cleanup, session killing, nudging workers (Witness handles that)\n\n## Propulsion Principle\n\nIf you find something on your hook, YOU RUN IT.\n\nYour pinned molecule persists across sessions. Hook has work -\u003e Run it.\nHook empty -\u003e Check mail. Nothing anywhere -\u003e Wait for user.\n\n## Key Commands\n\n### Communication\n- gt mail inbox - Check your messages\n- gt mail read \u003cid\u003e - Read a specific message\n- gt mail send \u003caddr\u003e -s \"Subject\" -m \"Message\" - Send mail\n\n### Status\n- gt status - Overall town status\n- gt rigs - List all rigs\n- gt polecats \u003crig\u003e - List polecats in a rig\n\n### Work Management\n- bd ready - Issues ready to work (no blockers)\n- gt sling \u003cbead\u003e \u003crig\u003e - Assign work to polecat in rig\n\n## Session End Protocol\n\n- git status, git add, bd sync, git commit, git push\n- gt handoff - hand off to fresh session\n","status":"open","priority":2,"issue_type":"role","created_at":"2025-12-28T00:51:20.692107-08:00","created_by":"stevey","updated_at":"2025-12-28T00:51:20.692107-08:00"}
{"id":"gt-mcch0","title":"Digest: mol-deacon-patrol","description":"Patrol 16: Quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T07:28:57.926784-08:00","updated_at":"2025-12-25T07:28:57.926784-08:00","closed_at":"2025-12-25T07:28:57.926736-08:00"}
{"id":"gt-mh18d","title":"Digest: mol-deacon-patrol","description":"Patrol 11: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T13:57:28.9637-08:00","updated_at":"2025-12-26T13:57:28.9637-08:00","closed_at":"2025-12-26T13:57:28.96366-08:00"}
{"id":"gt-mh5s","title":"Refinery gates: test/lint/build before merge","description":"Before merging polecat work to main, run configurable quality gates.\n\n**From VC**: internal/gates/ - parallel execution with timeout, any failure = overall failure.\n\n**Gas Town implementation**: Refinery config with gate commands:\n```yaml\ngates:\n test:\n cmd: go test ./...\n timeout: 5m\n lint:\n cmd: golangci-lint run\n timeout: 2m\n build:\n cmd: go build ./...\n timeout: 3m\nparallel: true\n```\n\nIf gates fail, don't merge. Polecat can iterate and retry.\n\n**Value**: Prevents broken code from reaching main. VC had 90.9% gate pass rate.\n\n**VC complexity**: ~200 lines Go\n**Gas Town complexity**: ~10 lines YAML","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-20T20:30:12.44681-08:00","updated_at":"2025-12-20T20:30:12.44681-08:00","dependencies":[{"issue_id":"gt-mh5s","depends_on_id":"gt-zhpa","type":"parent-child","created_at":"2025-12-20T20:30:27.402708-08:00","created_by":"daemon"}]}
{"id":"gt-mol-3g1","title":"mol-polecat-work","description":"Full polecat lifecycle from assignment to decommission.\n\nThis proto enables nondeterministic idempotence for polecat work. A polecat that crashes after any step can restart, read its molecule state, and continue from the last completed step. No work is lost.\n\n## Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| issue | Yes | The source issue ID being worked on |","status":"closed","priority":2,"issue_type":"epic","created_at":"2025-12-25T19:47:48.598459-08:00","updated_at":"2025-12-25T19:56:54.390868-08:00","closed_at":"2025-12-25T19:56:54.390868-08:00"}
{"id":"gt-mol-cfu","title":"Self-review","description":"Review your own changes. Look for:\n- Bugs and edge cases\n- Style issues\n- Missing error handling\n- Security concerns\n\nFix any issues found before proceeding.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T19:47:36.238187-08:00","updated_at":"2025-12-25T19:54:35.405637-08:00","closed_at":"2025-12-25T19:54:35.405637-08:00","dependencies":[{"issue_id":"gt-mol-cfu","depends_on_id":"gt-mol-572","type":"blocks","created_at":"2025-12-25T19:47:36.320187-08:00","created_by":"mayor"}]}
{"id":"gt-mol-dat","title":"Request shutdown","description":"Send shutdown request to Witness.\nWait for termination.\n\nThe polecat is now ready to be cleaned up.\nDo not exit directly - wait for Witness to kill the session.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T19:47:10.031563-08:00","updated_at":"2025-12-25T19:54:25.98509-08:00","closed_at":"2025-12-25T19:54:25.98509-08:00"}
{"id":"gt-molmall","title":"Mol Mall: Formula marketplace and aspect composition","description":"## Summary\n\nA marketplace for sharing molecule formulas using GitHub as backend, plus a new\n**aspect composition** capability for cooking that allows formulas to be applied\nas cross-cutting transformations to existing mols.\n\n## Key Insight\n\nFormulas aren't just standalone workflows—they're **transformations** you can\napply to other mols. This enables patterns like:\n- \"Apply Rule of Five code review to any coding task\"\n- \"Wrap any epic with security review steps\"\n- \"Add logging/metrics to any patrol molecule\"\n\n## Architecture\n\n```\nRemote Formulas (GitHub)\n ↓ install\nLocal Formulas (~/.gt/formulas/ or .beads/formulas/)\n ↓ cook --with\nMols (beads, git-tracked)\n ↓ pour/sling\nExecution (ephemeral or tracked)\n```\n\n## Formula Types\n\n1. **Standalone** - Complete workflows (mol-polecat-work, mol-deacon-patrol)\n2. **Aspects** - Cross-cutting concerns woven into other mols (rule-of-five)\n3. **Adapters** - Wrappers that make things runnable\n\n## Aspect Composition (New Cooking Capability)\n\n```bash\nbd cook my-epic --with rule-of-five,security-review\n```\n\nAspects declare injection points:\n\n```yaml\n# rule-of-five.formula.yaml\nkind: aspect\nname: rule-of-five\nversion: 1.2.0\n\ninject_after:\n tag: generates-code # matches any step with this tag\n\nsteps:\n - id: review-correctness\n title: \"Review: Correctness\"\n - id: review-edge-cases\n title: \"Review: Edge Cases\"\n - id: review-performance\n title: \"Review: Performance\"\n - id: review-security\n title: \"Review: Security\"\n - id: review-maintainability\n title: \"Review: Maintainability\"\n```\n\nInjection modes:\n- `inject_after: \u003cstep-id or tag\u003e` - insert steps after\n- `inject_before: \u003cstep-id or tag\u003e` - insert steps before\n- `wrap: \u003cstep-id or tag\u003e` - insert before AND after\n- `replace: \u003cstep-id or tag\u003e` - substitute entirely\n\n## The Mall Index\n\nA well-known repo maps short names to full references:\n\n```yaml\n# steveyegge/gt-mall/index.yaml\nformulas:\n rule-of-five:\n repo: steveyegge/gt-formulas\n path: aspects/rule-of-five.formula.yaml\n version: v1.2.0\n description: \"Five-lens code review\"\n tags: [review, quality]\n```\n\nCommands:\n- `gt mol search review` - search the index\n- `gt mol install rule-of-five` - fetch from GitHub\n- `gt mol install github.com/acme/formulas/custom@v1` - direct URL\n\n## Implementation Phases\n\n### Phase 1: Aspect Composition (Cooking)\n- Extend `bd cook` to accept `--with aspect1,aspect2`\n- Aspect application during mol generation\n- Local aspects in `.beads/formulas/`\n\n### Phase 2: Mall Index\n- Create gt-mall repo with index.yaml\n- `gt mol search` queries the index\n- `gt mol install` fetches and caches formulas\n\n### Phase 3: Publishing\n- `gt mol publish` pushes to your formula repo\n- PR workflow to add to mall index\n\n### Phase 4: Refinements\n- Aspect ordering and conflict detection\n- Aspect dependencies (`requires: [other-aspect]`)\n- Private formula repos (enterprise)\n- Local overrides/forks\n\n## Open Questions\n\n1. **Ordering conflicts**: Two aspects inject after same step—which goes first?\n2. **Aspect dependencies**: Aspect A requires aspect B?\n3. **Compile-time vs runtime**: Aspects are compile-time (baked into mol).\n Wisps remain runtime (slung dynamically).\n\n## Deferred Until\n\nGas Town patrols operational. Prerequisites:\n- [ ] Patrol system working (Deacon, Witness, Refinery)\n- [ ] Basic spawn/work/merge cycle\n- [ ] Activity feed showing work progress\n\nThen the mall becomes valuable for sharing patrol customizations.\n\n## Supersedes\n\nThis replaces gt-uzf2l which had the original marketplace concept but lacked\nthe aspect composition insight.\n\n## Related\n\n- Cooking system (bd cook)\n- Formula definitions (.formula.yaml)\n- Wisp architecture (runtime molecules)","notes":"See docs/formula_evolution.md for expanded thinking on: formula resolution hierarchy, combinators (\u003e\u003e, |, wrap, inject, extends), algebraic properties, higher abstractions, Mol Mall registry predictions, distribution scenarios, and open questions. The aspect composition in this design corresponds to the Wrapping (AOP) and Injection combinators in that doc.","status":"deferred","priority":2,"issue_type":"epic","created_at":"2025-12-26T00:33:44.380242-08:00","updated_at":"2025-12-26T00:36:57.3959-08:00"}
{"id":"gt-mpo6","title":"mol-deacon-patrol","description":"Mayor's daemon patrol loop.\n\nThe Deacon is the Mayor's background process that runs continuously,\nhandling callbacks, monitoring rig health, and performing cleanup.\nEach patrol cycle runs these steps in sequence, then loops or exits.\n","status":"closed","priority":2,"issue_type":"epic","created_at":"2025-12-24T23:31:09.318283-08:00","updated_at":"2025-12-25T01:26:28.782435-08:00","closed_at":"2025-12-25T01:26:28.782435-08:00"}
{"id":"gt-mrqiz","title":"MessagingConfig: Add Type field for schema consistency","description":"MessagingConfig lacks a Type field that other config types have (TownConfig has 'town', RigConfig has 'rig', etc). Add Type: 'messaging' for consistency.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T15:29:07.944151-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T15:31:31.414268-08:00","closed_at":"2025-12-28T15:31:31.414268-08:00"}
{"id":"gt-msx70","title":"Merge: morsov-1766966180179","description":"branch: polecat/morsov-1766966180179\ntarget: main\nsource_issue: morsov-1766966180179\nrig: gastown","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-28T16:23:39.96724-08:00","created_by":"stevey","updated_at":"2025-12-28T22:28:06.116059-08:00","closed_at":"2025-12-28T22:28:06.116059-08:00"}
{"id":"gt-mwpcq","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 3: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:19:40.396361-08:00","updated_at":"2025-12-28T11:19:40.396361-08:00","closed_at":"2025-12-28T11:19:40.396326-08:00"}
{"id":"gt-mzal","title":"mol-gastown-boot: Mayor-driven town bootstrap","description":"Mayor bootstraps Gas Town via a verification-gated lifecycle molecule.\n\n## Vision\n\nWhen user says \"boot up gas town\", Mayor slings `mol-gastown-boot` and executes it.\nEach step has **action + verification** - steps stay open until outcome is confirmed.\n\n## Key Principles\n\n1. **No daemon-based timeouts** - Mayor keeps trying until verified\n2. **Verification-gated steps** - Not \"command ran\" but \"outcome confirmed\"\n3. **gt peek for verification** - Capture session output to detect stalls\n4. **gt nudge for recovery** - Reliable message delivery to unstick agents\n5. **Parallel where possible** - Witnesses can start in parallel\n6. **Ephemeral execution** - Boot is a wisp, squashed to digest\n\n## Proto Catalog\n\nTown maintains a catalog of protos at `~/gt/molecules/`:\n\n```\n~/gt/molecules/\n├── lifecycle/\n│ ├── gastown-boot/ # Full town bootstrap\n│ ├── rig-spinup/ # Add a rig at runtime\n│ ├── rig-spindown/ # Remove a rig gracefully\n│ └── agent-restart/ # Restart single agent\n├── patrol/\n│ ├── deacon-patrol/ # Deacon health loop\n│ ├── witness-patrol/ # Witness polecat loop\n│ └── refinery-patrol/ # Refinery merge loop\n└── work/\n ├── polecat-work/ # Standard issue workflow\n ├── code-review/ # Pluggable review\n └── feature/ # Feature development\n```\n\n## mol-gastown-boot Structure\n\n```\nmol-gastown-boot (proto)\n├── ensure-daemon # Verify daemon running\n├── ensure-deacon # Start deacon, verify patrol active\n├── ensure-witnesses # Parallel: all rig witnesses\n│ ├── ensure-gastown-witness\n│ └── ensure-beads-witness\n├── ensure-refineries # Parallel: all rig refineries\n│ ├── ensure-gastown-refinery\n│ └── ensure-beads-refinery\n└── verify-town-health # Final gt status check\n```\n\n## Step Template\n\nEach step in description includes action + verification:\n\n```markdown\n## Step: ensure-deacon\n\n### Action\ngt deacon start\n\n### Verify\n1. Session gt-deacon exists: `tmux has-session -t gt-deacon`\n2. Not stalled: `gt peek deacon/` does NOT show \"\u003e Try\"\n3. Recent heartbeat: deacon/heartbeat.json \u003c 2 min old\n\n### On Stall\ngt nudge deacon/ \"Start patrol.\"\nWait 30s, re-verify.\n\n### On Fail\nLog error, continue to next step (town can run with degraded deacon)\n```\n\n## Event-Triggered Lifecycle\n\nBeyond manual slinging, events can trigger lifecycle wisps:\n\n| Event | Triggers |\n|-------|----------|\n| `gt town start` | mol-gastown-boot wisp |\n| `gt rig add \u003cname\u003e` | mol-rig-spinup wisp |\n| `gt rig remove \u003cname\u003e` | mol-rig-spindown wisp |\n| Agent crash detected | mol-agent-restart wisp |\n\n## Parameterization (Future)\n\nFor rig-spinup/spindown, need to pass rig name:\n\n```bash\ngt sling rig-spinup mayor/ --param rig=newproject\n```\n\nMolecule steps interpolate `${rig}` in their descriptions.\n\n## Related Issues\n\n- gt-lx3n: Witness startup bond\n- gt-j6s8: Refinery startup bond \n- gt-rana: Patrol System epic\n- gt-sye: Mayor startup protocol\n","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-22T20:59:15.795091-08:00","updated_at":"2025-12-27T14:20:23.310588-08:00","dependencies":[{"issue_id":"gt-mzal","depends_on_id":"gt-psj76","type":"blocks","created_at":"2025-12-25T20:47:20.336192-08:00","created_by":"daemon"},{"issue_id":"gt-mzal","depends_on_id":"gt-p3v5n","type":"blocks","created_at":"2025-12-25T20:47:21.588707-08:00","created_by":"daemon"},{"issue_id":"gt-mzal","depends_on_id":"gt-twjr5","type":"blocks","created_at":"2025-12-25T20:55:05.227776-08:00","created_by":"daemon"}]}
{"id":"gt-mzal.2","title":"Implement verification patterns for boot steps","description":"Define and implement the verification logic Mayor uses.\n\n## Verification Utilities\n\nMayor needs to check:\n\n### Session Exists\n```bash\ntmux has-session -t \u003csession\u003e 2\u003e/dev/null \u0026\u0026 echo \"exists\"\n```\n\n### Not Stalled (Claude waiting at prompt)\n```bash\ngt peek \u003cagent\u003e 10 | grep -q \"\u003e Try\" \u0026\u0026 echo \"stalled\"\n```\n\nPattern: `\u003e Try \"...\"` indicates Claude started but no message sent.\n\n### Recent Heartbeat\n```bash\n# For deacon\nage=$(( $(date +%s) - $(stat -f %m ~/gt/deacon/heartbeat.json) ))\n[ $age -lt 120 ] \u0026\u0026 echo \"fresh\"\n```\n\n### Active Work Output\n```bash\ngt peek \u003cagent\u003e 20 | grep -q \"⏺\" \u0026\u0026 echo \"working\"\n```\n\nPattern: `⏺` indicates Claude is executing tools.\n\n## Mayor Execution Pattern\n\n```\nfor each step in molecule:\n run action\n loop:\n check verification\n if verified: close step, continue\n if stalled: run on_stall recovery\n if timeout (5 attempts): log warning, continue\n sleep 10s\n```\n\nNo hard timeout - Mayor keeps trying with increasing backoff.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T21:00:14.665689-08:00","updated_at":"2025-12-27T14:20:23.337408-08:00","dependencies":[{"issue_id":"gt-mzal.2","depends_on_id":"gt-mzal","type":"parent-child","created_at":"2025-12-22T21:00:14.666085-08:00","created_by":"daemon"}]}
{"id":"gt-mzal.3","title":"Create molecules catalog directory structure","description":"Establish the proto catalog at ~/gt/molecules/.\n\n## Structure\n\n```\n~/gt/molecules/\n├── README.md # Catalog overview\n├── lifecycle/\n│ ├── gastown-boot/\n│ │ └── PROTO.md # Proto definition in markdown\n│ ├── rig-spinup/\n│ ├── rig-spindown/\n│ └── agent-restart/\n├── patrol/\n│ ├── deacon-patrol/\n│ ├── witness-patrol/\n│ └── refinery-patrol/\n└── work/\n ├── polecat-work/\n ├── code-review/\n └── feature/\n```\n\n## PROTO.md Format\n\n```markdown\n---\ntype: lifecycle\nparallel: [ensure-witnesses, ensure-refineries]\nephemeral: true\n---\n\n# mol-gastown-boot\n\nTown bootstrap molecule.\n\n## Step: ensure-daemon\n...\n```\n\n## Catalog Loading\n\n`gt sling gastown-boot` should find the proto by:\n1. Check beads for existing proto issue\n2. If not found, scan ~/gt/molecules/lifecycle/gastown-boot/\n3. Auto-create proto issue from PROTO.md\n\nThis enables file-based proto development with beads tracking.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T21:00:16.200342-08:00","updated_at":"2025-12-22T21:00:16.200342-08:00","dependencies":[{"issue_id":"gt-mzal.3","depends_on_id":"gt-mzal","type":"parent-child","created_at":"2025-12-22T21:00:16.202058-08:00","created_by":"daemon"}]}
{"id":"gt-mzal.4","title":"Add parallel step support to molecules","description":"Enable steps to run in parallel within a molecule.\n\n## Current State\n\nMolecules have linear step dependencies via \"Needs:\" directive.\nSteps run sequentially.\n\n## Proposed Change\n\nAdd parallel grouping:\n\n```markdown\n## Step: ensure-witnesses\nParallel: true\n\n### Sub-steps\n- ensure-gastown-witness\n- ensure-beads-witness\n```\n\nOr via frontmatter:\n\n```yaml\n---\nparallel: [ensure-witnesses, ensure-refineries]\n---\n```\n\nSteps in parallel group:\n- Start simultaneously\n- Parent step closes when all children complete\n- Failures in one dont block others\n\n## Implementation\n\n1. Parse parallel directive in proto\n2. When bonding, create child steps with same dependency\n3. Executor spawns parallel children concurrently\n4. Track completion, close parent when all done\n\n## For Mayor Bootstrap\n\nMayor can check all witnesses in parallel, then all refineries,\nrather than sequentially. Faster boot time.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T21:00:21.347723-08:00","updated_at":"2025-12-22T21:00:21.347723-08:00","dependencies":[{"issue_id":"gt-mzal.4","depends_on_id":"gt-mzal","type":"parent-child","created_at":"2025-12-22T21:00:21.348229-08:00","created_by":"daemon"}]}
{"id":"gt-mzal.5","title":"Add event-triggered lifecycle wisps","description":"Commands like `gt town start` should auto-trigger lifecycle wisps.\n\n## Event → Wisp Mapping\n\n| Command | Triggers Wisp |\n|---------|---------------|\n| gt town start | mol-gastown-boot |\n| gt rig add \u003cname\u003e | mol-rig-spinup (param: rig=\u003cname\u003e) |\n| gt rig remove \u003cname\u003e | mol-rig-spindown (param: rig=\u003cname\u003e) |\n| gt daemon restart | mol-gastown-boot |\n\n## Implementation\n\n1. Command implementation checks for lifecycle proto\n2. Auto-slings wisp to Mayor with --wisp flag\n3. Mayor picks up via molecule attachment\n\n## Alternative: Explicit Sling\n\nKeep commands simple, require explicit:\n\n```bash\ngt town start # Just starts sessions\ngt sling gastown-boot mayor/ --wisp # Bootstrap with verification\n```\n\nThis is more transparent - user sees the sling happen.\n\n## Recommendation\n\nStart with explicit sling. Add auto-trigger later once pattern proven.\n`gt town start --verified` could trigger the wisp.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T21:00:22.311873-08:00","updated_at":"2025-12-22T21:00:22.311873-08:00","dependencies":[{"issue_id":"gt-mzal.5","depends_on_id":"gt-mzal","type":"parent-child","created_at":"2025-12-22T21:00:22.313864-08:00","created_by":"daemon"},{"issue_id":"gt-mzal.5","depends_on_id":"gt-mzal.3","type":"blocks","created_at":"2025-12-22T21:01:00.190423-08:00","created_by":"daemon"}]}
{"id":"gt-mzal.6","title":"Design molecule parameterization","description":"Enable protos to accept parameters for customization.\n\n## Use Cases\n\n1. rig-spinup needs rig name: `gt sling rig-spinup --param rig=newproject`\n2. agent-restart needs agent: `gt sling agent-restart --param agent=gastown/witness`\n3. code-review needs scope: `gt sling code-review --param scope=src/auth/`\n\n## Proposed Syntax\n\n### In Proto\n\n```markdown\n## Step: create-rig-structure\nmkdir -p ~/gt/${rig}/refinery ~/gt/${rig}/witness\n```\n\n### In Sling\n\n```bash\ngt sling rig-spinup mayor/ --param rig=newproject --wisp\n```\n\n### In Bonded Molecule\n\nInterpolation happens at bond time. Step descriptions have concrete values.\n\n## Implementation\n\n1. Proto declares params in frontmatter: `params: [rig]`\n2. gt sling validates required params provided\n3. bd mol bond receives params, interpolates descriptions\n4. Bonded molecule has concrete step text\n\n## Edge Cases\n\n- Missing required param → error\n- Unused param → warning\n- Param in step title → interpolate there too\n","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-22T21:00:23.35376-08:00","updated_at":"2025-12-28T22:34:14.47731-08:00","closed_at":"2025-12-28T22:34:14.47731-08:00","dependencies":[{"issue_id":"gt-mzal.6","depends_on_id":"gt-mzal","type":"parent-child","created_at":"2025-12-22T21:00:23.354175-08:00","created_by":"daemon"}]}
{"id":"gt-mzal.8","title":"Update Mayor startup protocol for bootstrap","description":"Teach Mayor to respond to \"boot up gas town\" by slinging mol-gastown-boot.\n\n## Current Protocol\n\n1. Announce: \"Mayor, checking in.\"\n2. Check mail\n3. If handoff, continue\n4. Await user instruction\n\n## Enhanced Protocol\n\n1. Announce: \"Mayor, checking in.\"\n2. Check mail\n3. If handoff, continue\n4. **If user says \"boot\"/\"startup\"/\"bootstrap\":**\n - Sling mol-gastown-boot as wisp\n - Execute verification-gated steps\n - Report town status when complete\n5. Otherwise await instruction\n\n## Trigger Phrases\n\n- \"boot up gas town\"\n- \"bootstrap the town\"\n- \"start gas town\"\n- \"bring up the town\"\n\n## Execution\n\nMayor runs the molecule manually (not via subagent):\n\n```\n1. Bond the proto: bd mol bond mol-gastown-boot --wisp\n2. For each step:\n a. Run action command\n b. Loop verification with backoff\n c. On stall, run recovery\n d. Close step when verified\n3. Squash wisp with summary\n4. Report: \"Gas Town is up. All agents healthy.\"\n```\n\n## CLAUDE.md Update\n\nAdd to Mayor CLAUDE.md:\n\n```markdown\n## Bootstrap Command\n\nWhen user requests town bootstrap:\n1. gt sling gastown-boot mayor/ --wisp\n2. Execute molecule steps with verification\n3. Keep trying until all agents healthy\n4. No timeouts - you are the town engineer\n```\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T21:00:50.429735-08:00","updated_at":"2025-12-27T14:20:23.364445-08:00","dependencies":[{"issue_id":"gt-mzal.8","depends_on_id":"gt-mzal","type":"parent-child","created_at":"2025-12-22T21:00:50.430131-08:00","created_by":"daemon"},{"issue_id":"gt-mzal.8","depends_on_id":"gt-mzal.1","type":"blocks","created_at":"2025-12-22T21:00:59.16763-08:00","created_by":"daemon"},{"issue_id":"gt-mzal.8","depends_on_id":"gt-mzal.2","type":"blocks","created_at":"2025-12-22T21:00:59.231779-08:00","created_by":"daemon"}]}
{"id":"gt-n1010","title":"Digest: mol-deacon-patrol","description":"Patrol 20: All healthy. Handoff after 20 cycles.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:11:45.170133-08:00","updated_at":"2025-12-28T03:11:45.170133-08:00","closed_at":"2025-12-28T03:11:45.170097-08:00"}
{"id":"gt-n4vz7","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 5: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:20:57.158949-08:00","updated_at":"2025-12-28T11:20:57.158949-08:00","closed_at":"2025-12-28T11:20:57.158916-08:00"}
{"id":"gt-n7xxc","title":"Merge: gt-594l2","description":"branch: polecat/morsov-1766966180179\ntarget: main\nsource_issue: gt-594l2\nrig: gastown","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-28T16:37:28.154049-08:00","created_by":"gastown/polecats/morsov","updated_at":"2025-12-28T22:28:06.12421-08:00","closed_at":"2025-12-28T22:28:06.12421-08:00"}
{"id":"gt-na6o2","title":"Digest: mol-deacon-patrol","description":"Patrol 1: All healthy, no messages, no orphans","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T23:58:44.4382-08:00","updated_at":"2025-12-24T23:58:44.4382-08:00","closed_at":"2025-12-24T23:58:44.438166-08:00"}
{"id":"gt-nahxr","title":"Digest: mol-deacon-patrol","description":"Patrol 8: Quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T07:26:45.974483-08:00","updated_at":"2025-12-25T07:26:45.974483-08:00","closed_at":"2025-12-25T07:26:45.974453-08:00"}
{"id":"gt-nc9y","title":"gt polecat done should auto-stop running session","description":"Currently 'gt polecat done' fails if session is running, requiring a separate 'gt session stop' first. This is unnecessary friction - done should just stop the session automatically since that's always what you want.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-23T04:12:13.30724-08:00","updated_at":"2025-12-23T04:12:13.30724-08:00"}
{"id":"gt-ne9he","title":"gt crew add: role_bead field references non-existent bead","description":"## Problem\n\nWhen `gt crew add` creates an agent bead (e.g., `gt-crew-gastown-grip`), it sets:\n```\nrole_bead: gt-crew-gastown-grip-role\n```\n\nThis is WRONG. It creates per-instance role bead references that don't exist.\n\n## Correct Pattern\n\nRole beads are SHARED templates defining what a role IS. Agent beads reference them:\n\n| Role Type | Role Bead (shared) | Agent Bead (per-instance) |\n|-----------|-------------------|---------------------------|\n| Mayor | gt-mayor-role | gt-mayor |\n| Deacon | gt-deacon-role | gt-deacon |\n| Witness | gt-witness-role | gt-witness-\u003crig\u003e |\n| Refinery | gt-refinery-role | gt-refinery-\u003crig\u003e |\n| Crew | gt-crew-role | gt-crew-\u003crig\u003e-\u003cname\u003e |\n| Polecat | gt-polecat-role | gt-polecat-\u003crig\u003e-\u003cname\u003e |\n\n## Current State\n\nWorking correctly:\n- gt-mayor → gt-mayor-role ✅\n- gt-witness-gastown → gt-witness-role ✅\n- gt-refinery-gastown → gt-refinery-role ✅\n\nBroken:\n- gt-deacon → gt-deacon-role (bead doesn't exist)\n- gt-crew-* → gt-crew-\u003crig\u003e-\u003cname\u003e-role (wrong pattern, beads don't exist)\n- gt-polecat-* → (not set at all)\n\n## Code Locations\n\n1. `internal/cmd/crew_add.go:91` - sets `RoleBead: crewID + \"-role\"`\n Should be: `RoleBead: \"gt-crew-role\"`\n\n2. `internal/polecat/manager.go:220,426` - doesn't set RoleBead\n Should set: `RoleBead: \"gt-polecat-role\"`\n\n## Fix Required\n\n1. Create missing role beads: gt-crew-role, gt-polecat-role, gt-deacon-role\n2. Fix crew_add.go to use shared gt-crew-role\n3. Fix polecat/manager.go to use shared gt-polecat-role\n4. Update existing crew agent beads to point to gt-crew-role","status":"closed","priority":3,"issue_type":"bug","created_at":"2025-12-29T13:03:46.315753-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T13:42:28.491572-08:00","closed_at":"2025-12-29T13:42:28.491572-08:00","close_reason":"Fixed. Created shared role beads (gt-crew-role, gt-polecat-role, gt-deacon-role). Fixed code to reference shared role beads. Updated existing crew agent beads via bd slot set."}
{"id":"gt-nfdyl","title":"Witness emits activity events","description":"Witness emits events to activity stream for patrol activity:\n\nEvents to emit:\n- patrol_started: When witness begins patrol cycle\n- polecat_checked: When witness checks a polecat\n- polecat_nudged: When witness nudges a stuck polecat\n- escalation_sent: When witness escalates to Mayor/Deacon\n- patrol_complete: When patrol cycle finishes\n\nThis replaces stats tracking in .runtime/witness.json","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-28T21:40:20.972584-08:00","created_by":"gastown/crew/jack","updated_at":"2025-12-28T21:40:20.972584-08:00","dependencies":[{"issue_id":"gt-nfdyl","depends_on_id":"gt-y14l7","type":"blocks","created_at":"2025-12-28T21:41:11.528857-08:00","created_by":"daemon"}]}
{"id":"gt-ng6g","title":"Implement await type handlers (gh:run, gh:pr, timer, human, mail)","description":"Implement condition checking for each await type.\n\n## Handlers Needed\n- gh:run:\u003cid\u003e - Check GitHub Actions run status via gh CLI\n- gh:pr:\u003cid\u003e - Check PR merged/closed status via gh CLI \n- timer:\u003cduration\u003e - Simple elapsed time check\n- human:\u003cprompt\u003e - Check for human approval (via mail?)\n- mail:\u003cpattern\u003e - Check for mail matching pattern\n\n## Interface\n```go\ntype AwaitHandler interface {\n Check(awaitID string) (completed bool, result string, err error)\n}\n```\n\n## Moved from beads\nOriginally bd-2l03. Deacon handlers belong in gastown.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T12:19:12.427881-08:00","updated_at":"2025-12-23T12:19:12.427881-08:00","dependencies":[{"issue_id":"gt-ng6g","depends_on_id":"gt-dh65","type":"blocks","created_at":"2025-12-23T12:19:32.734889-08:00","created_by":"stevey"}]}
{"id":"gt-nget1","title":"Digest: mol-deacon-patrol","description":"Patrol 3: routine, all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T13:42:02.780682-08:00","updated_at":"2025-12-25T13:42:02.780682-08:00","closed_at":"2025-12-25T13:42:02.780653-08:00"}
{"id":"gt-ngoe6","title":"MessagingConfig: Fix error message inconsistency in validation","description":"Negative value errors don't wrap ErrMissingField while empty-list errors do. Should be consistent - either all wrap a sentinel or none do.","status":"closed","priority":3,"issue_type":"bug","created_at":"2025-12-28T15:29:08.979969-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T15:31:31.432177-08:00","closed_at":"2025-12-28T15:31:31.432177-08:00"}
{"id":"gt-nj3e5","title":"Digest: mol-deacon-patrol","description":"Patrol 5: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:04:44.720601-08:00","updated_at":"2025-12-27T23:04:44.720601-08:00","closed_at":"2025-12-27T23:04:44.720566-08:00"}
{"id":"gt-nm1oi","title":"Deacon Patrol","description":"Mayor's daemon patrol loop for handling callbacks, health checks, and cleanup.","status":"open","priority":2,"issue_type":"molecule","created_at":"2025-12-26T13:08:21.347354-08:00","updated_at":"2025-12-26T13:08:21.347354-08:00"}
{"id":"gt-nrz6g","title":"Digest: mol-deacon-patrol","description":"Patrol 19: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T16:48:55.937269-08:00","updated_at":"2025-12-25T16:48:55.937269-08:00","closed_at":"2025-12-25T16:48:55.937235-08:00"}
{"id":"gt-nvws7","title":"Digest: mol-deacon-patrol","description":"Quick patrol: no messages, all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T11:03:52.500691-08:00","updated_at":"2025-12-25T11:03:52.500691-08:00","closed_at":"2025-12-25T11:03:52.500657-08:00"}
{"id":"gt-o3skt","title":"Digest: mol-deacon-patrol","description":"Patrol 18","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T20:06:18.575389-08:00","updated_at":"2025-12-26T20:06:18.575389-08:00","closed_at":"2025-12-26T20:06:18.575343-08:00"}
{"id":"gt-o9hwu","title":"Digest: mol-deacon-patrol","description":"Cycle 12: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:20:41.375337-08:00","updated_at":"2025-12-28T13:20:41.375337-08:00","closed_at":"2025-12-28T13:20:41.375302-08:00"}
{"id":"gt-o9t9s","title":"Digest: mol-deacon-patrol","description":"Patrol 19: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:37:00.98369-08:00","updated_at":"2025-12-28T01:37:00.98369-08:00","closed_at":"2025-12-28T01:37:00.983648-08:00"}
{"id":"gt-oahqo","title":"Digest: mol-deacon-patrol","description":"Patrol 15: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T11:05:36.911655-08:00","updated_at":"2025-12-25T11:05:36.911655-08:00","closed_at":"2025-12-25T11:05:36.911619-08:00"}
{"id":"gt-ob0t","title":"Test Patrol Parent","description":"Test parent for Christmas Ornament pattern","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T12:46:15.328647-08:00","updated_at":"2025-12-27T23:44:54.660334-08:00","closed_at":"2025-12-27T23:44:54.660338-08:00"}
{"id":"gt-ocjdi","title":"gt crew add: CLAUDE.md customization leaves git dirty","description":"When gt crew add generates a customized CLAUDE.md for crew workers, it differs from the repo version (Crew Worker Context vs Polecat Context, personalized footer). This leaves the git state 'dirty'.\n\nOptions:\n1. Add CLAUDE.md to .gitignore in crew workspaces\n2. Auto-commit the customized CLAUDE.md locally \n3. Store crew CLAUDE.md content elsewhere (e.g., .claude/CLAUDE.md)\n\nCurrent behavior is functional but 'gt crew list' shows 'Git: dirty' for new crew.\n\nFound during: adding crew workers grip, fang, wolf","status":"open","priority":4,"issue_type":"task","created_at":"2025-12-29T13:03:53.25608-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T13:03:53.25608-08:00"}
{"id":"gt-od1g","title":"Mail inbox from witness/refinery dirs shows Mayor inbox","description":"When running `gt mail inbox` from the witness or refinery directories, it shows the Mayor's inbox instead of the agent's own inbox.\n\nReproduction:\n```\n$ cd ~/gt/beads/witness \u0026\u0026 gt mail inbox\n📬 Inbox: mayor/ (1 messages, 1 unread)\n ● 🤝 HANDOFF: Swarm session complete...\n```\n\nExpected: Should show beads/witness inbox\n\nLikely cause: The cwd-based identity resolution isn't recognizing witness/refinery as valid mail identities, so it falls back to Mayor.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-23T20:29:58.817388-08:00","updated_at":"2025-12-23T20:29:58.817388-08:00"}
{"id":"gt-oe135","title":"Digest: mol-deacon-patrol","description":"Patrol 7: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:05:54.728776-08:00","updated_at":"2025-12-27T23:05:54.728776-08:00","closed_at":"2025-12-27T23:05:54.728735-08:00"}
{"id":"gt-oeori","title":"Day 3.7: Witness pings Deacon for second-order monitoring","description":"Add second-order monitoring: Witnesses monitor the Deacon.\n\nProblem: Who monitors the Deacon? If Deacon dies, the whole town stalls.\n\nSolution:\n1. Each Witness periodically sends a ping to Deacon during patrol:\n ```bash\n gt mail send deacon/ -s \"WITNESS_PING\" -m \"{\\\"rig\\\": \\\"gastown\\\"}\"\n ```\n\n2. Deacon patrol (inbox-check) aggregates witness pings as health signals\n\n3. If Witness doesn't get Deacon response for 2 cycles:\n - Escalate to Mayor: \"Deacon unresponsive\"\n - Mayor can restart Deacon via daemon\n\nThis creates overlapping patrols:\n- Deacon monitors Witnesses/Refineries\n- Witnesses monitor Deacon (collectively)\n- Mayor is escalation target for both\n\nAdd to mol-witness-patrol after survey-workers step.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T22:02:32.179579-08:00","created_by":"mayor","updated_at":"2025-12-27T23:18:47.265651-08:00","closed_at":"2025-12-27T23:18:47.265651-08:00","dependencies":[{"issue_id":"gt-oeori","depends_on_id":"gt-qpoxz","type":"blocks","created_at":"2025-12-27T22:02:45.78993-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-ojj7h","title":"Digest: mol-deacon-patrol","description":"P19: stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:00:34.976666-08:00","updated_at":"2025-12-25T20:00:34.976666-08:00","closed_at":"2025-12-25T20:00:34.976617-08:00"}
{"id":"gt-op78","title":"Session cycling: Auto-spawn successor when context full","description":"Enable automatic session succession for crew workers.\n\nWhen a crew worker's context fills up (\u003e80%), they should:\n1. Write handoff mail to themselves\n2. Signal session end\n3. System auto-spawns successor session\n4. Successor reads handoff, finds attached work, auto-continues\n\nThis completes the autonomous overnight work pattern from gt-9g82.\n\nDepends on:\n- Detecting context fullness (Claude Code API?)\n- Session spawning mechanism (tmux/daemon)\n- Handoff protocol already implemented","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-22T16:18:27.570996-08:00","updated_at":"2025-12-22T16:18:27.570996-08:00"}
{"id":"gt-opzm4","title":"ZFC #9: Explicit MR registration instead of branch parsing","description":"**ZFC Violation:** internal/refinery/manager.go:346-370\n\nGo infers work metadata from branch naming conventions:\n```go\npattern := regexp.MustCompile(`^polecat/([^/]+)(?:/(.+))?$`)\nworker := matches[1]\nissueID = matches[2]\n```\n\n**ZFC-compliant solution:**\nPolecats register MRs with explicit structured data:\n- `gt mq submit --worker=nux --issue=gt-xyz --branch=polecat/nux/gt-xyz`\n- Creates MR bead with explicit fields\n- No regex parsing of branch names\n\n**Benefits:**\n- Work metadata is explicit, not inferred\n- Branch naming can evolve without breaking refinery\n- Audit trail in beads\n\nReference: ~/gt/docs/zfc-violations-audit.md #9","status":"hooked","priority":2,"issue_type":"task","created_at":"2025-12-27T21:32:24.951818-08:00","created_by":"mayor","updated_at":"2025-12-28T16:31:13.189559-08:00","dependencies":[{"issue_id":"gt-opzm4","depends_on_id":"gt-7uhts","type":"blocks","created_at":"2025-12-27T21:32:42.178027-08:00","created_by":"daemon"}]}
{"id":"gt-osdmr","title":"Digest: mol-deacon-patrol","description":"Patrol 20: all healthy, handoff threshold reached","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:13:10.580733-08:00","updated_at":"2025-12-27T23:13:10.580733-08:00","closed_at":"2025-12-27T23:13:10.5807-08:00"}
{"id":"gt-ov2uv","title":"Create AgentIdentity type for session name parsing","description":"attached_args: Create AgentIdentity type - depends on completed gt-atqr8\n\nCreate AgentIdentity type to parse and construct session names, replacing duplicated logic.\n\n## Files to modify\n- internal/session/identity.go (NEW)\n- internal/cmd/sling.go (update to use new type)\n- internal/cmd/handoff.go (update to use new type)\n\n## Implementation\n```go\ntype AgentIdentity struct {\n Role string // mayor, deacon, witness, refinery, crew, polecat\n Rig string // empty for mayor/deacon\n Name string // crew/polecat name\n}\n\nfunc ParseSessionName(session string) (*AgentIdentity, error)\nfunc (a *AgentIdentity) SessionName() string\nfunc (a *AgentIdentity) Address() string // e.g., \"gastown/crew/max\"\n```\n\n## Acceptance criteria\n- [ ] AgentIdentity type with Role, Rig, Name fields\n- [ ] ParseSessionName handles all agent types (mayor, deacon, witness, refinery, crew, polecat)\n- [ ] SessionName() reconstructs valid session name\n- [ ] Address() returns mail-style address\n- [ ] sling.go:sessionToAgentID replaced with ParseSessionName\n- [ ] handoff.go:sessionToGTRole replaced with ParseSessionName\n- [ ] Unit tests for all parsing cases\n- [ ] go test ./... passes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:49:10.113644-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T16:23:27.939492-08:00","closed_at":"2025-12-28T16:23:27.939492-08:00","dependencies":[{"issue_id":"gt-ov2uv","depends_on_id":"gt-atqr8","type":"blocks","created_at":"2025-12-28T15:51:31.393311-08:00","created_by":"daemon"}]}
{"id":"gt-ox67","title":"Maintenance: Regular cleanup of closed MR/gate beads","description":"Closed merge-request and gate beads accumulate over time. Need regular cleanup.\n\n## Cleanup Candidates\n- type=merge-request with status=closed\n- type=gate with status=closed\n- type=molecule with status=closed (completed workflows)\n\n## Options\n1. **Deacon patrol step** - squash closed MRs periodically\n2. **Refinery post-merge** - close and tombstone MR after successful merge\n3. **bd doctor check** - warn when stale MR count exceeds threshold\n\n## Consideration\nKeep some audit trail? Or just tombstone after N days?","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T14:38:31.532094-08:00","updated_at":"2025-12-23T14:38:31.532094-08:00"}
{"id":"gt-p2eg5","title":"Add unit tests for internal/lock package","description":"attached_args: Lock package tests\n\nAdd comprehensive tests for the file locking package.\n\n## Files to create\n- internal/lock/lock_test.go\n\n## Test cases to cover\n1. Lock() acquires lock successfully\n2. Lock() blocks when lock held by another\n3. Unlock() releases lock\n4. TryLock() returns immediately if locked\n5. IsLocked() detects lock state\n6. Lock file contains correct PID\n7. Stale lock detection (if implemented)\n\n## Acceptance criteria\n- [ ] internal/lock/lock_test.go created\n- [ ] At least 5 test functions\n- [ ] Tests pass: go test ./internal/lock/...\n- [ ] Coverage \u003e 70%: go test -cover ./internal/lock/...","status":"hooked","priority":2,"issue_type":"task","created_at":"2025-12-28T15:49:12.502257-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:57:03.640967-08:00"}
{"id":"gt-p2l2","title":"gt doctor: add Claude settings.json validation","description":"Add a new doctor check to validate Claude Code settings in worker directories:\n\n**Check for:**\n1. .claude/settings.json exists in polecats/*, crew/*, witness/rig, refinery/rig\n2. SessionStart hook has 'gt prime' command\n3. Autonomous roles (polecat, witness, refinery) have 'gt mail check --inject' in SessionStart\n4. Interactive roles (crew, mayor) have mail check in UserPromptSubmit only\n\n**Auto-fix capability:**\nUse internal/claude.EnsureSettingsForRole() to create missing settings files.\n\nContext: The spawn priming race condition fix (gt-6957) added embedded settings templates. Doctor should validate these are in place.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-22T17:59:02.326127-08:00","updated_at":"2025-12-22T17:59:02.326127-08:00"}
{"id":"gt-p2vyo","title":"Day 2.6: Define bd agent state command","description":"Add command for agents to write their own state to agent beads.\n\n```bash\nbd agent state \u003cagent-id\u003e \u003cstate\u003e\n# Example: bd agent state gt-mayor running\n# States: idle | running | stuck | stopped | dead\n```\n\nImplementation:\n1. Lookup agent bead by ID\n2. Update state field\n3. Update last_activity timestamp\n4. Trigger bd sync if configured\n\nAlso add:\n- bd agent heartbeat \u003cagent-id\u003e - just updates last_activity\n- bd agent show \u003cagent-id\u003e - show agent bead details\n\nThis is the ZFC-compliant way for agents to self-report state.","notes":"Delegated to beads repo: bd-uxlb. Assign to beads/crew/dave.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T22:02:10.643874-08:00","created_by":"mayor","updated_at":"2025-12-28T01:59:15.538875-08:00","closed_at":"2025-12-28T01:59:15.538875-08:00","dependencies":[{"issue_id":"gt-p2vyo","depends_on_id":"gt-39ttg","type":"blocks","created_at":"2025-12-27T22:02:45.228946-08:00","created_by":"daemon"},{"issue_id":"gt-p2vyo","depends_on_id":"gt-d0jqp","type":"parent-child","created_at":"2025-12-27T23:32:42.574839-08:00","created_by":"daemon"}]}
{"id":"gt-p3kbn","title":"MEOW Stack Evolution: Higher-Order Workflow Abstractions","description":"Molecular Expression of Work (MEOW) - the full taxonomy of workflow abstractions.\n\n## Current Hierarchy\n\n```\nWORK TRACKING WORKFLOW EXECUTION\n───────────── ──────────────────\n\nBead (issue) Step (action)\n │ │\n ▼ ▼\nEpic (bead group) Molecule (runtime)\n │ │\n ▼ │\n └───────► CAMPAIGN ◄───────┘\n │\n ▼\n Schematic (domain template)\n │\n ▼\n Protocol (interface/type)\n │\n ▼\n Catalyst (meta-generator)\n │\n ▼\n Mol Mall (distribution)\n```\n\n## Key Concepts\n\n1. **Campaign** (gt-camx5): Molecule-wrapped Epic graph for orchestrated execution\n2. **Schematic** (gt-8ws7o): Domain-level formula composition\n3. **Protocol** (gt-y3jb9): Type system for formulas\n4. **SDK** (gt-ihzqr): Developer tooling (Forge, Lab, Validator)\n5. **Mol Mall** (gt-vm85o): Package registry for distribution\n\n## Design Principles\n\n- Chemistry metaphor: atoms → molecules → compounds → materials\n- Two orthogonal dimensions: work tracking × workflow execution\n- Campaign is the convergence point\n- Everything compiles down to executable molecules\n\n## Origin\n\nDiscussion: 2024-12-26, Mayor session\nRelated: docs/formula_evolution.md\nFoundation: gt-8tmz (Molecule Algebra)\n","status":"closed","priority":4,"issue_type":"epic","created_at":"2025-12-26T01:01:40.332231-08:00","updated_at":"2025-12-28T22:33:22.235393-08:00","closed_at":"2025-12-28T22:33:22.235393-08:00"}
{"id":"gt-pbjim","title":"Digest: mol-deacon-patrol","description":"Patrol 15: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:35:05.785047-08:00","updated_at":"2025-12-25T00:35:05.785047-08:00","closed_at":"2025-12-25T00:35:05.785013-08:00"}
{"id":"gt-phdci","title":"Digest: mol-deacon-patrol","description":"Patrol 11: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T18:42:51.250066-08:00","updated_at":"2025-12-26T18:42:51.250066-08:00","closed_at":"2025-12-26T18:42:51.250024-08:00"}
{"id":"gt-pinkq","title":"Day 2.7b: gt rig add creates Witness and Refinery agent beads","description":"Update gt rig add to create agent beads:\n\n1. After initializing rig beads, create:\n - gt-witness-\u003crig\u003e agent bead (role_type: witness, rig: \u003crig\u003e, agent_state: idle)\n - gt-refinery-\u003crig\u003e agent bead (role_type: refinery, rig: \u003crig\u003e, agent_state: idle)\n\n2. Use bd create --type=agent or internal beads API\n\nFiles:\n- internal/cmd/rig.go\n- internal/rig/manager.go","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-28T02:17:07.516857-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T02:31:10.608724-08:00","closed_at":"2025-12-28T02:31:10.608724-08:00","dependencies":[{"issue_id":"gt-pinkq","depends_on_id":"gt-aer7q","type":"parent-child","created_at":"2025-12-28T02:17:17.553297-08:00","created_by":"daemon"}]}
{"id":"gt-pio","title":"Plugin: merge-oracle (merge queue analysis)","description":"Example plugin that analyzes changesets before Refinery processes them. Builds overlap graph, classifies disjointness (parallel-safe vs needs-sequencing), uses LLM for semantic complexity, identifies high-risk patterns. Based on merge-orchestration proposal. See docs/architecture.md.","status":"open","priority":3,"issue_type":"feature","created_at":"2025-12-15T22:53:04.027073-08:00","updated_at":"2025-12-15T23:17:06.507108-08:00","dependencies":[{"issue_id":"gt-pio","depends_on_id":"gt-axz","type":"blocks","created_at":"2025-12-15T22:53:17.507459-08:00","created_by":"daemon"}]}
{"id":"gt-piy9c","title":"Digest: mol-deacon-patrol","description":"Patrol 9","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:51:02.414152-08:00","updated_at":"2025-12-25T20:51:02.414152-08:00","closed_at":"2025-12-25T20:51:02.414093-08:00"}
{"id":"gt-pkm69","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 10: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:14.872507-08:00","updated_at":"2025-12-28T11:22:14.872507-08:00","closed_at":"2025-12-28T11:22:14.872464-08:00"}
{"id":"gt-pmef","title":"Test Patrol Parent","description":"[RESURRECTED] This issue was deleted but recreated as a tombstone to preserve hierarchical structure.\n\nOriginal description:\nTest parent for Christmas Ornament pattern","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T22:04:44.376339-08:00","updated_at":"2025-12-27T23:55:34.492482-08:00","closed_at":"2025-12-27T23:55:34.492486-08:00"}
{"id":"gt-pnch9","title":"Digest: mol-deacon-patrol","description":"Patrol 19: Quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T07:29:48.868198-08:00","updated_at":"2025-12-25T07:29:48.868198-08:00","closed_at":"2025-12-25T07:29:48.868161-08:00"}
{"id":"gt-polecat-gastown-ace","title":"gt-polecat-gastown-ace","description":"gt-polecat-gastown-ace\n\nrole_type: polecat\nrig: gastown\nagent_state: running\nhook_bead: gt-795e8\nrole_bead: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T15:56:20.334372-08:00","created_by":"mayor","updated_at":"2025-12-28T18:47:12.702542-08:00","closed_at":"2025-12-28T18:47:12.702542-08:00"}
{"id":"gt-polecat-gastown-capable","title":"gt-polecat-gastown-capable","description":"gt-polecat-gastown-capable\n\nrole_type: polecat\nrig: gastown\nagent_state: running\nhook_bead: gt-tkbd5\nrole_bead: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T15:56:20.175066-08:00","created_by":"mayor","updated_at":"2025-12-28T18:47:12.849855-08:00","closed_at":"2025-12-28T18:47:12.849855-08:00"}
{"id":"gt-polecat-gastown-furiosa","title":"gt-polecat-gastown-furiosa","description":"gt-polecat-gastown-furiosa\n\nrole_type: polecat\nrig: gastown\nagent_state: done\nhook_bead: null\nrole_bead: null\ncleanup_status: clean","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T13:06:09.472425-08:00","created_by":"mayor","updated_at":"2025-12-28T22:06:14.222191-08:00","closed_at":"2025-12-28T18:47:12.996706-08:00"}
{"id":"gt-polecat-gastown-morsov","title":"gt-polecat-gastown-morsov","description":"gt-polecat-gastown-morsov\n\nrole_type: polecat\nrig: gastown\nagent_state: done\nhook_bead: null\nrole_bead: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T15:56:20.255118-08:00","created_by":"mayor","updated_at":"2025-12-28T18:47:13.134492-08:00","closed_at":"2025-12-28T18:47:13.134492-08:00"}
{"id":"gt-polecat-gastown-nux","title":"gt-polecat-gastown-nux","description":"gt-polecat-gastown-nux\n\nrole_type: polecat\nrig: gastown\nagent_state: running\nhook_bead: gt-2g130\nrole_bead: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T14:09:19.415619-08:00","created_by":"mayor","updated_at":"2025-12-28T18:47:16.519005-08:00","closed_at":"2025-12-28T18:47:16.519005-08:00"}
{"id":"gt-polecat-gastown-rictus","title":"gt-polecat-gastown-rictus","description":"gt-polecat-gastown-rictus\n\nrole_type: polecat\nrig: gastown\nagent_state: running\nhook_bead: gt-dsqxw\nrole_bead: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T14:09:49.112812-08:00","created_by":"mayor","updated_at":"2025-12-28T18:47:16.663913-08:00","closed_at":"2025-12-28T18:47:16.663913-08:00"}
{"id":"gt-polecat-gastown-slit","title":"gt-polecat-gastown-slit","description":"gt-polecat-gastown-slit\n\nrole_type: polecat\nrig: gastown\nagent_state: running\nhook_bead: gt-gcnnr\nrole_bead: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T14:09:42.286637-08:00","created_by":"mayor","updated_at":"2025-12-28T18:47:16.805677-08:00","closed_at":"2025-12-28T18:47:16.805677-08:00"}
{"id":"gt-polecat-gastown-warboy","title":"gt-polecat-gastown-warboy","description":"gt-polecat-gastown-warboy\n\nrole_type: polecat\nrig: gastown\nagent_state: spawning\nhook_bead: null\nrole_bead: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T15:56:20.415565-08:00","created_by":"mayor","updated_at":"2025-12-28T18:47:16.95025-08:00","closed_at":"2025-12-28T18:47:16.95025-08:00"}
{"id":"gt-polecat-role","title":"Polecat Role Definition","description":"You are a Polecat - an autonomous worker assigned to a specific issue.\n\nYou work independently, following the mol-polecat-work formula, and signal\ncompletion to your Witness. You are transient - spawned for work, cleaned up\nafter completion.\n\ndefault_molecule: mol-polecat-work\ncapabilities:\n - execute_assigned_work\n - git_operations\n - branch_management\n - completion_signaling\n\n## Core Responsibilities\n\n1. Execute your pinned molecule's steps\n2. Maintain clean git state\n3. Signal completion via gt done\n4. Wait for Witness to handle lifecycle\n\n## You Do NOT\n\n- Push directly to main (Refinery merges)\n- Kill your own session (Witness does cleanup)\n- Skip verification steps\n- Work on anything other than your assigned issue\n\n## Propulsion Principle\n\nIf you find something on your hook, YOU RUN IT.\n\nYour work is defined by your pinned molecule. Execute steps:\n- bd ready (find next step)\n- bd show \u003cstep-id\u003e (see what to do)\n- bd close \u003cstep-id\u003e (mark complete)\n\n## Completion Protocol\n\nWhen done:\n1. Tests pass: go test ./...\n2. COMMIT changes: git add \u0026\u0026 git commit\n3. Push branch: git push -u origin HEAD\n4. Close issue: bd close \u003cissue\u003e\n5. Sync beads: bd sync\n6. Run gt done\n7. WAIT: Witness will kill your session\n\n## Communication\n\nMail your Witness when stuck:\ngt mail send \u003crig\u003e/witness -s \"HELP: \u003cproblem\u003e\" -m \"...\"","status":"open","priority":2,"issue_type":"role","created_at":"2025-12-29T13:24:16.758613-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T13:24:16.758613-08:00"}
{"id":"gt-psuw7","title":"Day 2.2: Remove PID/tmux state inference","description":"Remove ZFC violations where Go infers state from signals:\n- No more PID file checks\n- No more tmux session parsing\n- No more branch pattern analysis\n\nDaemon becomes pure transport layer.\n\nReference: ~/gt/docs/zfc-violations-audit.md\n\nParent: gt-d0jqp","notes":"Removed PID/tmux state inference from refinery Status(), witness Status(), daemon ensureDeaconRunning(), and daemon pokeDeacon(). Daemon now trusts agent bead state per ZFC. Removed 78 lines of inference code.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:00.780322-08:00","created_by":"mayor","updated_at":"2025-12-28T01:56:50.21619-08:00","closed_at":"2025-12-28T01:56:50.216193-08:00","dependencies":[{"issue_id":"gt-psuw7","depends_on_id":"gt-39ttg","type":"blocks","created_at":"2025-12-27T20:58:38.848679-08:00","created_by":"daemon"}]}
{"id":"gt-pt7mw","title":"Digest: mol-deacon-patrol","description":"Cycle 7: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:15:06.558474-08:00","updated_at":"2025-12-28T13:15:06.558474-08:00","closed_at":"2025-12-28T13:15:06.558434-08:00"}
{"id":"gt-pv93","title":"Post-work discovery: AI analysis finds follow-on issues","description":"AI analyzes completed work to discover: bugs, punted work, follow-on tasks.\n\n**From VC**: Supervisor.AnalyzeResult() with iterative refinement. ~300 lines.\n\n**Gas Town implementation**: Post-work hook in molecule:\n```yaml\npost_work:\n discover:\n - bugs\n - punted_items\n - follow_on_work\n file_as: beads\n```\n\nPolecat output gets analyzed by AI, discovered work becomes beads issues.\n\n**Value**: Nothing gets forgotten. VC found ~25% more issues with refinement.\n\n**Key**: Use semantic deduplication (gt-xxx) to avoid pollution.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-20T20:30:14.723338-08:00","updated_at":"2025-12-20T20:30:14.723338-08:00","dependencies":[{"issue_id":"gt-pv93","depends_on_id":"gt-zhpa","type":"parent-child","created_at":"2025-12-20T20:30:27.534886-08:00","created_by":"daemon"},{"issue_id":"gt-pv93","depends_on_id":"gt-6m3e","type":"related","created_at":"2025-12-20T20:30:35.115095-08:00","created_by":"daemon"}]}
{"id":"gt-pvyhi","title":"Digest: mol-deacon-patrol","description":"Patrol 15: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:10:11.603018-08:00","updated_at":"2025-12-27T23:10:11.603018-08:00","closed_at":"2025-12-27T23:10:11.602985-08:00"}
{"id":"gt-pxsna","title":"gt session start --issue doesn't pin work to hook","description":"When starting a polecat with --issue, the work isn't pinned to the hook:\n gt session start beads/Toast --issue bd-oxgi\n \nAfter session starts, 'gt mol status' shows empty hook.\n\nThe polecat had to manually discover the work via bd ready. The --issue flag should call 'gt hook attach' or equivalent to pin the work.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-28T19:30:49.536513-08:00","created_by":"mayor","updated_at":"2025-12-28T19:30:49.536513-08:00"}
{"id":"gt-pyqv","title":"Work on ga-ct2: Add MR workflow to polecat completion. Wh...","description":"Work on ga-ct2: Add MR workflow to polecat completion. When polecat completes work, auto-create MR to integration branch. When done, submit MR (not PR) to integration branch for Refinery.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-19T22:58:35.473928-08:00","updated_at":"2025-12-21T17:20:42.831549-08:00"}
{"id":"gt-q3mil","title":"Digest: mol-deacon-patrol","description":"P9: stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:12:02.16159-08:00","updated_at":"2025-12-25T20:12:02.16159-08:00","closed_at":"2025-12-25T20:12:02.16154-08:00"}
{"id":"gt-q6f03","title":"Digest: mol-deacon-patrol","description":"Cycle 6: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:14:01.140945-08:00","updated_at":"2025-12-28T13:14:01.140945-08:00","closed_at":"2025-12-28T13:14:01.140918-08:00"}
{"id":"gt-q6lg","title":"mol-crew-session: Startup/shutdown protocols for crew workers","description":"Crew workers (like joe, max) don't have patrol molecules keeping them fresh. When gt gets rebuilt, they have stale binaries that cause hangs and bugs.\n\n## Problem\n\n- Crew binaries get stale when gt is rebuilt elsewhere\n- No automatic pull/rebase/rebuild on session start\n- No standardized shutdown protocol (sync, push, handoff)\n\n## Solution: mol-crew-session\n\nA molecule template for crew sessions:\n\n### Startup Phase\n1. `git pull --rebase` - get latest code\n2. `bd sync` - sync beads\n3. `go build -o gt ./cmd/gt` - rebuild gt (if in gastown)\n4. `gt prime` - load context\n\n### Work Phase \n- Open-ended human interaction\n- No molecule steps - just work until done\n\n### Shutdown Phase\n1. `git status` - check for uncommitted changes\n2. `bd sync` - sync beads\n3. `git push` - push code\n4. Handoff if incomplete work\n\n## Implementation\n\n1. Define mol-crew-session in builtin_molecules.go\n2. Update crew CLAUDE.md to reference the protocol\n3. Optionally: gt prime auto-runs startup steps\n\n## Dependencies\n\n- Should implement after deacon/witness/polecat patrols are stable\n- Consider: gt-3x0z.10 (Witness patrol molecules)\n\n## Related\n\n- gt-3x0z.9: Deacon wisp patrol (done)\n- fix-gt script: Current workaround for binary freshness","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T02:48:25.658692-08:00","updated_at":"2025-12-22T02:48:25.658692-08:00"}
{"id":"gt-q9c7q","title":"Polecat template not found for non-gastown rigs","description":"When adding a polecat to beads rig, warning shows:\n Warning: polecat template not found at /Users/stevey/gt/beads/mayor/rig/templates/polecat-CLAUDE.md\n\nThe template lookup should check the rig's template location, or fall back to a town-level default.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-28T19:29:38.929946-08:00","created_by":"mayor","updated_at":"2025-12-28T19:36:33.11656-08:00","closed_at":"2025-12-28T19:36:33.11656-08:00"}
{"id":"gt-qaca","title":"Merge: gt-5af.2","description":"branch: polecat/Doof\ntarget: main\nsource_issue: gt-5af.2\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-19T17:29:36.838038-08:00","updated_at":"2025-12-20T23:17:25.79048-08:00","closed_at":"2025-12-20T23:17:25.79048-08:00"}
{"id":"gt-qao","title":"CLI: mayor commands (start, attach, stop, status)","description":"Mayor management CLI commands.\n\n## Commands\n\n### gt mayor start\n```\ngt mayor start [--continue] [--agent AGENT]\n```\n- --continue: Resume from previous session (check for handoff mail)\n- --agent: claude (default) or other agent type\n\n### gt mayor attach\n```\ngt mayor attach\n```\nAttach to running Mayor session.\n\n### gt mayor stop\n```\ngt mayor stop [--grace-period N]\n```\nStop Mayor session with optional grace period.\n\n### gt mayor status\n```\ngt mayor status [--json]\n```\nShow Mayor running status.\n\n## Session Management\nSession name: `gt-mayor`\nWorking directory: `\u003ctown\u003e/mayor/rig/` or `\u003ctown\u003e/mayor/`\n\n## Implementation\nSimilar to session commands but for special Mayor context.\n\n```go\nfunc getMayorPath(townRoot string) string {\n return filepath.Join(townRoot, \"mayor\")\n}\n\nfunc getMayorSessionName() string {\n return \"gt-mayor\"\n}\n```\n\n## New File\ninternal/cmd/mayor.go\n\n## PGT Reference\ngastown-py/src/gastown/cli/mayor_cmd.py\n\n## Acceptance Criteria\n- [ ] gt mayor start launches Mayor session\n- [ ] gt mayor attach works\n- [ ] gt mayor stop with grace period\n- [ ] gt mayor status shows running state","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T14:47:54.721035-08:00","updated_at":"2025-12-16T16:05:45.226324-08:00"}
{"id":"gt-qd7ri","title":"E2E Phase 2 observability test","description":"End-to-end test of Phase 2 observability:\n\nTest scenario:\n1. Sling work to polecat\n2. Watch gt feed for polecat activity\n3. Polecat completes, signals done\n4. Watch gt feed for MQ events (merge_started, merged)\n5. gt status shows queue depth changes\n6. Swarm status visible in gt swarm status\n\nAll observable without checking .runtime/*.json files.\n\nSuccess = glass cockpit is lit.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T21:40:54.57062-08:00","created_by":"gastown/crew/jack","updated_at":"2025-12-28T21:40:54.57062-08:00","dependencies":[{"issue_id":"gt-qd7ri","depends_on_id":"gt-lak31","type":"blocks","created_at":"2025-12-28T21:41:11.735996-08:00","created_by":"daemon"},{"issue_id":"gt-qd7ri","depends_on_id":"gt-rbncw","type":"blocks","created_at":"2025-12-28T21:41:11.76734-08:00","created_by":"daemon"},{"issue_id":"gt-qd7ri","depends_on_id":"gt-tvwnz","type":"blocks","created_at":"2025-12-28T21:41:11.797211-08:00","created_by":"daemon"}]}
{"id":"gt-qd9p0","title":"Swarm doesn't track dynamically added workers","description":"When creating a swarm with --worker flags and then adding more polecats later, the swarm status only shows the original workers.\n\nSteps to reproduce:\n1. gt swarm create gastown --epic gt-i26df --worker slit --worker rictus --start\n2. Add more polecats: gt polecat add gastown capable\n3. gt sling gt-xxx gastown/capable\n4. gt swarm status gt-i26df -\u003e only shows slit, rictus\n\nExpected: Swarm tracks all workers that are working on swarm tasks.\nActual: Only original workers shown.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-28T16:31:52.419095-08:00","created_by":"mayor","updated_at":"2025-12-28T16:31:52.419095-08:00"}
{"id":"gt-qe9w","title":"Simplify and reorganize molecular chemistry docs","description":"The Gas Town molecular chemistry docs (molecules.md, molecular-chemistry.md, molecule-algebra.md) are too dramatic and verbose. They need a simplification pass to be more reference-manual style.\n\n**Current problems:**\n1. Too much metaphor and philosophy, not enough practical reference\n2. Start with the chemistry abstraction instead of what users care about (patrols, workflows)\n3. Layer cake is presented top-down (formulas → protos → molecules) instead of bottom-up (issues → dependencies → execution)\n\n**Proposed structure (inverted pyramid):**\n\n1. **Start with execution semantics:**\n - Work = issues with dependencies\n - Dependencies control execution (blocks = sequential, no dep = parallel)\n - Agents traverse dependency graphs until blocked\n - Multi-day workflows via compound bonding\n\n2. **Move to molecules:**\n - Molecules are just epics with workflow intent\n - Bonding = creating dependencies between work graphs\n - No protos required for ad-hoc workflows\n\n3. **Then templates (protos/wisps):**\n - Phase metaphor for storage locations\n - pour/wisp/squash/burn operations\n - When to use each phase\n\n4. **Finally formulas (for advanced users):**\n - YAML compile-time composition\n - extends, compose, aspects\n - Only needed for complex reusable patterns\n\n**Style guidelines:**\n- Reference manual with quick examples\n- Written like agent priming (context they need to execute)\n- Less dramatic, more straightforward\n- TL;DR at top of each doc\n\n**See also:**\n- beads/docs/MOLECULES.md has a simplified version to use as template\n- The execution model section explains multi-day traversal clearly","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T19:51:42.43826-08:00","updated_at":"2025-12-24T19:51:42.43826-08:00","dependencies":[{"issue_id":"gt-qe9w","depends_on_id":"gt-e0qj2","type":"blocks","created_at":"2025-12-26T23:21:29.277397-08:00","created_by":"daemon"}]}
{"id":"gt-qh2","title":"Session cycling UX: smooth transitions via TUI wrapper","description":"## Problem\n\nCurrent CLI agent session cycling is painful:\n- Shell → CC starts → priming → context loads → ready → work → exit/crash → repeat\n- Each cycle is 30-60 seconds of cold boot\n- No continuity between shell and agent's inner state\n- Raw \"session not running, starting...\" loop is the baseline\n\n## GGT Advantages (already have)\n\n- Beads: Work state survives session death completely\n- Mail: Handoff notes from past-self to future-self \n- Prime commands: Structured context reload\n\n## Gap: Transition Mechanics\n\nIdeas to explore when actively using CLI:\n\n1. **In-band cycling** - `/restart` or `/cycle` command, agent handles own restart without dropping to shell\n\n2. **Hot standby** - TUI maintains pre-warmed session in background, switch to already-primed agent\n\n3. **Persistent wrapper** - Bubbletea TUI stays running across session cycles, CC sessions come/go inside it\n\n4. **Session pooling** - Keep 2-3 primed sessions ready, never wait for cold start\n\n## Deferred\n\nDeliberately P4 until we're actively using the simpler CLI and feel the pain firsthand.","status":"open","priority":4,"issue_type":"task","created_at":"2025-12-15T20:38:12.660716-08:00","updated_at":"2025-12-15T23:17:34.27061-08:00"}
{"id":"gt-qi6ij","title":"Digest: mol-deacon-patrol","description":"Patrol 8: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T18:41:10.784398-08:00","updated_at":"2025-12-26T18:41:10.784398-08:00","closed_at":"2025-12-26T18:41:10.784359-08:00"}
{"id":"gt-qkoah","title":"Digest: mol-deacon-patrol","description":"Patrol 2: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T13:54:19.67205-08:00","updated_at":"2025-12-25T13:54:19.67205-08:00","closed_at":"2025-12-25T13:54:19.67202-08:00"}
{"id":"gt-qpoxz","title":"Day 3.1: Wire witness patrol formula to daemon cron","description":"Witness patrol molecule runs on schedule:\n- Daemon pokes witness on cron interval\n- Witness runs mol-witness-patrol steps\n- Results in wisp (ephemeral), squashed later\n\nParent: gt-hwka3","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:02.445409-08:00","created_by":"mayor","updated_at":"2025-12-28T09:29:49.17661-08:00","closed_at":"2025-12-28T09:29:49.17661-08:00","dependencies":[{"issue_id":"gt-qpoxz","depends_on_id":"gt-hwka3","type":"parent-child","created_at":"2025-12-27T20:58:45.809196-08:00","created_by":"daemon"},{"issue_id":"gt-qpoxz","depends_on_id":"gt-lisj6","type":"blocks","created_at":"2025-12-27T21:00:46.96662-08:00","created_by":"daemon"},{"issue_id":"gt-qpoxz","depends_on_id":"gt-k294l","type":"blocks","created_at":"2025-12-27T23:17:28.18659-08:00","created_by":"daemon"},{"issue_id":"gt-qpoxz","depends_on_id":"gt-aer7q","type":"blocks","created_at":"2025-12-28T02:17:18.450596-08:00","created_by":"daemon"}]}
{"id":"gt-qpsva","title":"Digest: mol-deacon-patrol","description":"Patrol 18: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:20:33.649295-08:00","updated_at":"2025-12-28T08:20:33.649295-08:00","closed_at":"2025-12-28T08:20:33.649264-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-qwin","title":"Refinery and witness rigs should redirect .beads to mayor rig","description":"The refinery's rig clone and witness rig clones should have their .beads directories redirect to the mayor's rig beads (like polecats do).\n\nCurrent state:\n- Polecats have .beads symlinked/redirected to mayor rig beads\n- Refinery and witness have their own .beads (or none)\n\nDesired state:\n- refinery/rig/.beads -\u003e mayor/rig/.beads (or equivalent redirect)\n- witness/rig/.beads -\u003e mayor/rig/.beads (or equivalent redirect)\n\nThis ensures all rig agents share the same issue tracking state.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T14:27:37.703044-08:00","updated_at":"2025-12-22T14:27:37.703044-08:00"}
{"id":"gt-r7wr8","title":"Digest: mol-deacon-patrol","description":"Patrol 1: All agents healthy. Clone divergence (zoey/jack) noted for witnesses.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:01:10.438981-08:00","updated_at":"2025-12-28T03:01:10.438981-08:00","closed_at":"2025-12-28T03:01:10.438944-08:00"}
{"id":"gt-r83og","title":"Digest: mol-deacon-patrol","description":"Patrol 4: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:29:23.029208-08:00","updated_at":"2025-12-28T01:29:23.029208-08:00","closed_at":"2025-12-28T01:29:23.029171-08:00"}
{"id":"gt-rbncw","title":"Witness events in gt feed","description":"Wire witness patrol events to gt feed display.\n\nAfter 'Witness emits activity events' is done:\n- gt feed should show patrol activity\n- Useful for debugging polecat issues\n\nExample output:\n 19:45 PATROL_COMPLETE gastown/witness (checked 3 polecats)\n 19:44 POLECAT_NUDGED gastown/polecats/nux (idle 10m)\n 19:40 ESCALATION mayor (polecat stuck)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T21:40:40.254107-08:00","created_by":"gastown/crew/jack","updated_at":"2025-12-28T21:40:40.254107-08:00","dependencies":[{"issue_id":"gt-rbncw","depends_on_id":"gt-nfdyl","type":"blocks","created_at":"2025-12-28T21:41:11.617926-08:00","created_by":"daemon"}]}
{"id":"gt-refinery-gastown","title":"gt-refinery-gastown","description":"Refinery - per-rig merge queue processor for gastown.\n\nrole_type: refinery\nrig: gastown\nagent_state: idle\nhook_bead: null\nrole_bead: gt-refinery-role","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T00:07:41.933483-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-29T14:30:35.647713-08:00","closed_at":"2025-12-29T14:30:35.647713-08:00","close_reason":"Migrated to canonical naming: gt-gastown-witness/refinery"}
{"id":"gt-refinery-role","title":"Refinery Role Definition","description":"You are the Refinery - merge queue processor for your rig. You process\ncompleted polecat work, merging it to main one branch at a time with\nsequential rebasing.\n\nYour mission: Process the merge queue sequentially, rebasing each branch\natop the current baseline before merging.\n\ndefault_molecule: mol-refinery-patrol\ncapabilities:\n - merge_queue_processing\n - sequential_rebase\n - conflict_resolution\n - verification_gates\n\n## The Engineer Mindset\n\nYou are Scotty in the engine room. The merge queue is your warp core.\n\nThe Beads Promise: Work is never lost. If you discover ANY problem:\n1. Fix it now (preferred if quick), OR\n2. File a bead and proceed (tracked for cleanup crew)\n\nThere is NO third option. Never \"disavow\" by noting something exists and moving on.\n\nThe Scotty Test: Before proceeding past any failure, ask yourself:\n\"Would Scotty walk past a warp core leak because it existed before his shift?\"\n\n## Propulsion Principle\n\nIf you find something on your hook, YOU RUN IT.\n\nYour work is defined by the mol-refinery-patrol molecule. Execute steps:\n- bd ready (find next step)\n- bd show \u003cstep-id\u003e (see what to do)\n- bd close \u003cstep-id\u003e (mark complete)\n\n## Sequential Rebase Protocol\n\nWRONG (parallel merge - causes conflicts):\n main -\u003e branch-A (old main) + branch-B (old main) = CONFLICTS\n\nRIGHT (sequential rebase):\n main -\u003e merge A (rebased on main) -\u003e merge B (rebased on main+A)\n\nAfter every merge, main moves. Next branch MUST rebase on new baseline.\n\n## Verification Gate\n\nThe handle-failures step is a verification gate:\n- Tests PASSED: Gate satisfied, proceed to merge\n- Tests FAILED (branch caused): Abort, notify polecat, skip branch\n- Tests FAILED (pre-existing): MUST fix OR file bead - cannot proceed without\n\n## Commands\n\n### Patrol\n- gt mol status - Check attached patrol\n- bd ready / bd show / bd close - Step management\n- bd mol spawn \u003cmol\u003e --wisp - Spawn patrol wisp\n\n### Git Operations\n- git fetch origin - Fetch all remote branches\n- git branch -r | grep polecat - List polecat branches\n- git rebase origin/main - Rebase on current main\n- git push origin main - Push merged changes\n\n### Communication\n- gt mail inbox - Check for messages\n- gt mail send \u003caddr\u003e -s \"Subject\" -m \"Message\" - Notify workers\n","status":"open","priority":2,"issue_type":"role","created_at":"2025-12-28T00:51:21.133839-08:00","created_by":"stevey","updated_at":"2025-12-28T00:51:21.133839-08:00"}
{"id":"gt-rl1o1","title":"Digest: mol-deacon-patrol","description":"Patrol complete: gastown healthy, beads dormant","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:20:13.829663-08:00","updated_at":"2025-12-28T19:20:13.829663-08:00","closed_at":"2025-12-28T19:20:13.829629-08:00"}
{"id":"gt-rp0f4","title":"Digest: mol-deacon-patrol","description":"Patrol 6: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T11:04:58.835959-08:00","updated_at":"2025-12-25T11:04:58.835959-08:00","closed_at":"2025-12-25T11:04:58.835926-08:00"}
{"id":"gt-rqcd8","title":"gt crew remove: Does not close agent bead","description":"When running 'gt crew remove \u003cname\u003e', the command removes the crew workspace directory but does not close the associated agent bead (gt-\u003crig\u003e-crew-\u003cname\u003e).\n\nThis leaves orphaned agent beads in the system after crew removal.\n\nThe remove command should close the agent bead with a reason like 'Crew workspace removed'.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-29T14:56:30.57014-08:00","created_by":"stevey","updated_at":"2025-12-29T15:24:58.211563-08:00","closed_at":"2025-12-29T15:24:58.211563-08:00","close_reason":"Fixed in commit 5260a9c - crew remove now closes agent bead"}
{"id":"gt-rr1i","title":"mol-swarm-cleanup: Post-swarm debris cleanup molecule","description":"After a 20+ worker swarm completed, found significant beads debris:\n- 18 stale messages (work assignments, lifecycle requests, swarm instructions)\n- 3 completed issues still open/in_progress\n- Test messages accumulated\n\nNeed: Document a post-swarm checklist or create gt swarm cleanup command that:\n1. Closes stale work assignment messages\n2. Reviews in_progress issues for completion\n3. Closes orphaned lifecycle messages\n4. Optionally archives test messages","status":"open","priority":3,"issue_type":"chore","created_at":"2025-12-20T03:12:28.646175-08:00","updated_at":"2025-12-20T03:15:45.521085-08:00"}
{"id":"gt-rsdn1","title":"Digest: mol-deacon-patrol","description":"Patrol 6: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T20:20:40.136685-08:00","updated_at":"2025-12-27T20:20:40.136685-08:00","closed_at":"2025-12-27T20:20:40.136648-08:00"}
{"id":"gt-rxa7v","title":"Day 1.4c: Create polecat agent bead lifecycle","description":"Define ephemeral polecat agent bead lifecycle.\n\nPolecats need agent beads for ZFC compliance (self-report state).\n\nLifecycle:\n1. On spawn: Create agent bead\n ```yaml\n id: gt-polecat-\u003crig\u003e-\u003cname\u003e\n type: agent\n role_type: polecat\n rig: \u003crig\u003e\n state: spawning\n hook_bead: \u003cassigned-issue\u003e\n ```\n\n2. On Claude ready: Update state=working\n\n3. On completion: Update state=done\n\n4. On nuke: Delete agent bead\n\nCommands needed:\n- gt polecat spawn creates agent bead\n- gt polecat nuke deletes agent bead\n- Polecat updates own state via bd agent state\n\nNote: This ensures Witness can read polecat state from beads instead of tmux scraping.","notes":"Implemented polecat agent bead lifecycle: spawn creates bead with state=spawning, nuke deletes bead. State updates (spawning→working→done) require bd agent state command (beads CLI enhancement).","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T22:01:42.464521-08:00","created_by":"mayor","updated_at":"2025-12-28T01:37:35.988743-08:00","closed_at":"2025-12-28T01:37:35.988746-08:00","dependencies":[{"issue_id":"gt-rxa7v","depends_on_id":"gt-v2gkv","type":"blocks","created_at":"2025-12-27T22:02:45.109373-08:00","created_by":"daemon"},{"issue_id":"gt-rxa7v","depends_on_id":"gt-d0jqp","type":"parent-child","created_at":"2025-12-27T23:32:42.52862-08:00","created_by":"daemon"}]}
{"id":"gt-rxsh","title":"Multiple merge/landing models documented without clarification","description":"Architecture describes three different merge models:\n\n1. Refinery-only model (traditional)\n2. Direct landing model (Mayor bypass) \n3. Swarm integration branch model (internal/swarm)\n\nThese appear to conflict. Documentation should clarify:\n- Which model is canonical?\n- When to use which model?\n- Or are some deprecated?\n\nThis is confusing for users trying to understand the system.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T12:51:43.593597-08:00","updated_at":"2025-12-24T12:51:43.593597-08:00","dependencies":[{"issue_id":"gt-rxsh","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T12:52:07.992252-08:00","created_by":"daemon"},{"issue_id":"gt-rxsh","depends_on_id":"gt-e0qj2","type":"blocks","created_at":"2025-12-26T23:21:29.324268-08:00","created_by":"daemon"}]}
{"id":"gt-ry8","title":"HOP: Entity chain tracking for agents","description":"Track work history per-entity (CV chains). See ~/ai/stevey-gastown/hop/decisions/002-entity-chains.md for design. Post-v0.1 work.","status":"open","priority":3,"issue_type":"feature","created_at":"2025-12-17T01:00:41.347764-08:00","updated_at":"2025-12-17T01:00:41.347764-08:00"}
{"id":"gt-s0nba","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 6: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:21:26.271445-08:00","updated_at":"2025-12-28T11:21:26.271445-08:00","closed_at":"2025-12-28T11:21:26.271411-08:00"}
{"id":"gt-s148","title":"Clean up stale children on deacon handoff bead","description":"The deacon handoff bead hq-8r8 has 7 stale children (hq-8r8.1 through hq-8r8.7) from a previous patrol that got incorrectly parented. These should be cleaned up.\n\nThe handoff bead should only contain the attached_molecule reference, not instantiated steps.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-23T13:16:52.273025-08:00","updated_at":"2025-12-23T13:16:52.273025-08:00"}
{"id":"gt-s18k","title":"Witness patrol: stale MR queue detection needs state tracking","description":"The mol-witness-patrol check-refinery step says 'if queue is non-empty for \u003e30 min, send nudge' but doesn't explain how to track when the queue first became non-empty.\n\n## Problem\nThe Witness needs to persist:\n- When MR queue first became non-empty\n- Previous queue state for comparison\n\nWithout this, the Witness can't detect stale queues.\n\n## Solution\nAdd to witness handoff bead:\n- mr_queue_nonempty_since: timestamp\n- Update in save-state step\n- Check in check-refinery step","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T01:02:38.497753-08:00","updated_at":"2025-12-23T01:02:38.497753-08:00","dependencies":[{"issue_id":"gt-s18k","depends_on_id":"gt-bjft","type":"blocks","created_at":"2025-12-23T01:03:12.026206-08:00","created_by":"daemon"}]}
{"id":"gt-s57tk","title":"Phase 2: Observable Infrastructure","description":"Glass cockpit - see what's happening across the system.\n\nPhase 1 got the engine running. Phase 2 makes it observable.\n\n**Pillars:**\n- Pillar 4: Swarm-in-Beads (gt-kc7yj - already exists)\n- Pillar 5: MQ Observability\n- Pillar 6: Witness Observability \n- Pillar 7: Unified Dashboard\n\n**Success criteria:**\n1. gt status shows per-rig queue depth and agent health\n2. gt feed shows MQ and swarm lifecycle events\n3. gt dashboard provides live system visibility\n4. No .runtime/*.json files for observable state\n5. Swarms fully tracked in beads\n\nReference: ~/gt/docs/liftoff-plan.md","status":"open","priority":1,"issue_type":"epic","created_at":"2025-12-28T21:40:01.375659-08:00","created_by":"gastown/crew/jack","updated_at":"2025-12-28T21:40:01.375659-08:00","dependencies":[{"issue_id":"gt-s57tk","depends_on_id":"gt-lfi2d","type":"blocks","created_at":"2025-12-28T21:41:21.132603-08:00","created_by":"daemon"},{"issue_id":"gt-s57tk","depends_on_id":"gt-qd7ri","type":"blocks","created_at":"2025-12-28T21:41:21.163101-08:00","created_by":"daemon"},{"issue_id":"gt-s57tk","depends_on_id":"gt-kc7yj","type":"blocks","created_at":"2025-12-28T21:41:21.193543-08:00","created_by":"daemon"}]}
{"id":"gt-s6dw","title":"Batch wisp squashing in Deacon maintenance","description":"Add wisp squashing to Deacon's maintenance duties:\n- Patrol plugin to find orphaned/completed wisps across all rigs\n- Squash completed patrol wisps to digests\n- Burn abandoned wisps that have no audit value\n- Part of the hygiene/cleanup system\n\nAlso: Witness polecat shutdown should spawn its own short wisp for the cleanup protocol.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T21:52:49.403649-08:00","updated_at":"2025-12-22T21:52:49.403649-08:00"}
{"id":"gt-s6r44","title":"gt status: Show agent hook_bead (current work) in status output","description":"attached_args: Implement the hook_bead display in gt status. The agent bead lifecycle is complete - just need to read hook_bead and display it.\n\n## Current State\n\ngt status shows agents with their agent_state from beads:\n```\n crew/max ✓ running [running]\n```\n\n## Enhancement\n\nShow what each agent is working on (hook_bead field from agent beads):\n```\n crew/max ✓ running [running] → gt-abc (Fix auth bug)\n crew/joe ✓ running [running] → gt-xyz (Add tests)\n refinery ✓ running → refinery Handoff\n```\n\nThis gives the overseer a quick view of:\n1. Who is running\n2. What each agent is working on\n3. Progress at a glance\n\n## Implementation\n\nIn status.go, when displaying agents:\n1. Look up agent bead by ID (e.g., gt-crew-gastown-max)\n2. Parse hook_bead from description\n3. If hook_bead set, fetch its title for display\n4. Show as: agent_state → hook_bead (title truncated)\n\n## Related\n\nThe agent bead lifecycle is now complete:\n- prime.go creates agent beads\n- sling.go sets hook_bead\n- done.go clears hook_bead and sets final state","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-28T10:13:46.434234-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T10:17:37.231773-08:00","closed_at":"2025-12-28T10:17:37.231773-08:00"}
{"id":"gt-s7j9c","title":"Digest: mol-deacon-patrol","description":"Patrol 13: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:18:22.67202-08:00","updated_at":"2025-12-28T08:18:22.67202-08:00","closed_at":"2025-12-28T08:18:22.671981-08:00"}
{"id":"gt-s9im","title":"Remove gt context --usage estimation","description":"The external context estimation approach doesn't work:\n- tmux scrollback trick breaks with --cycle\n- Can't see actual context usage from outside\n- Only the agent knows its internal state\n\nRemove or deprecate:\n- gt context --usage flag\n- Any external context monitoring logic\n\nDocument why in comments: 'Context management is agent-initiated, not externally monitored.\nSee self-check guidance in role templates.'\n\nThis is P3 because it's cleanup - the feature just doesn't work, not actively harmful.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-23T01:46:42.887818-08:00","updated_at":"2025-12-23T01:46:42.887818-08:00"}
{"id":"gt-sb6m4","title":"Filter agent session molecule noise from activity feed","description":"Agent session molecules (gt-crew-gastown-joe, gt-crew-gastown-max, etc.) update frequently\nand create noisy entries like:\n\n [10:22:37] → gt-crew-gastown-joe updated · gt-crew-gastown-joe\n\nThese are not useful in the activity feed. Options:\n1. Filter them out entirely\n2. Collapse repeated updates into single entries\n3. Show them in a separate \"agent status\" section\n\nPart of epic gt-u7dxq","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T11:02:11.146127-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T11:02:11.146127-08:00"}
{"id":"gt-sfr83","title":"Digest: mol-deacon-patrol","description":"Patrol 5: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:14:50.542708-08:00","updated_at":"2025-12-28T08:14:50.542708-08:00","closed_at":"2025-12-28T08:14:50.542675-08:00"}
{"id":"gt-shj28","title":"Digest: mol-deacon-patrol","description":"P15: stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T19:59:23.72785-08:00","updated_at":"2025-12-25T19:59:23.72785-08:00","closed_at":"2025-12-25T19:59:23.72782-08:00"}
{"id":"gt-si6am","title":"Polecat spawn: CLAUDE.md template lookup path is wrong","description":"Template lookup uses rig.Path/templates/ but templates are in mayor/rig/templates/\n\nIn internal/polecat/manager.go installCLAUDETemplate():\n templatePath := filepath.Join(m.rig.Path, \"templates\", \"polecat-CLAUDE.md\")\n // Looks for: /Users/stevey/gt/gastown/templates/polecat-CLAUDE.md\n // But templates are at: /Users/stevey/gt/gastown/mayor/rig/templates/\n\nThis causes silent failure (template not found is OK) and polecats inherit the wrong CLAUDE.md from the git worktree.\n\nFix options:\n1. Copy templates to rig root during rig init\n2. Change lookup to use mayor/rig/templates/\n3. Embed templates in binary","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-28T14:16:07.309527-08:00","created_by":"mayor","updated_at":"2025-12-28T15:34:02.9819-08:00","closed_at":"2025-12-28T15:34:02.9819-08:00"}
{"id":"gt-sne83","title":"Digest: mol-deacon-patrol","description":"Cycle 10: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:18:43.437161-08:00","updated_at":"2025-12-28T13:18:43.437161-08:00","closed_at":"2025-12-28T13:18:43.437132-08:00"}
{"id":"gt-sob9x","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 16: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:48.666655-08:00","updated_at":"2025-12-28T11:22:48.666655-08:00","closed_at":"2025-12-28T11:22:48.666623-08:00"}
{"id":"gt-sstg","title":"Deacon patrol molecules stored in wrong beads location","description":"outputDeaconPatrolContext in prime.go hardcodes 'gastown/mayor/rig' (line 691) to find patrol molecules. But Deacon is a town-level role, not a rig role. Deacon molecules should be in town root beads (~/gt/.beads/) not rig beads. This also affects gt mol status which uses findLocalBeadsDir() - from ~/gt/deacon/ it won't find the right beads location.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-23T13:30:18.021287-08:00","updated_at":"2025-12-23T13:30:18.021287-08:00"}
{"id":"gt-suuf","title":"check-refinery","description":"Ensure the refinery is alive and processing merge requests.\n\nNeeds: inbox-check","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T16:23:42.026349-08:00","updated_at":"2025-12-23T16:23:42.026349-08:00"}
{"id":"gt-swqfx","title":"Digest: mol-deacon-patrol","description":"Patrol 17","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T14:57:10.122945-08:00","updated_at":"2025-12-26T14:57:10.122945-08:00","closed_at":"2025-12-26T14:57:10.122884-08:00"}
{"id":"gt-sxa64","title":"ZFC #5: Move merge/conflict decisions from Go to Refinery agent","description":"**ZFC Violation:** internal/refinery/manager.go:389-517\n\nGo code currently makes engineering decisions in ProcessMR():\n- Detect conflicts via string matching\n- Decide to abort merge\n- Decide to roll back on test failure\n- Decide retry strategy\n\n**Current anti-pattern:**\n```go\nif strings.Contains(errStr, \"CONFLICT\") {\n result.Conflict = true\n _ = m.gitRun(\"merge\", \"--abort\")\n // Go decides what to do\n}\n```\n\n**ZFC-compliant solution:**\nRefinery AGENT runs the merge loop:\n- Agent attempts merge\n- Agent detects conflict and decides: retry, notify polecat, escalate\n- Agent runs tests and decides: proceed, rollback, retry\n- Go provides git operations, agent makes decisions\n\n**Relates to:** Day 3.4 (Refinery processes MERGE_READY mail) but needs explicit agent decision-making\n\nReference: ~/gt/docs/zfc-violations-audit.md #5","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-27T21:32:23.552661-08:00","created_by":"mayor","updated_at":"2025-12-27T23:18:32.198974-08:00","dependencies":[{"issue_id":"gt-sxa64","depends_on_id":"gt-7uhts","type":"blocks","created_at":"2025-12-27T21:32:40.334932-08:00","created_by":"daemon"}]}
{"id":"gt-t5i07","title":"Refinery Patrol","description":"Merge queue processor patrol loop with verification gates.","status":"open","priority":2,"issue_type":"molecule","created_at":"2025-12-29T14:38:03.516004-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:38:03.516004-08:00"}
{"id":"gt-t5mz","title":"Hardcoded session ID prefixes and paths","description":"Multiple hardcoded values throughout code:\n- internal/mail/router.go: 'gt-mayor', 'gt-' session prefixes\n- internal/lock/lock.go: '.runtime', 'agent.lock' paths\n- Session ID generation uses string literals\n\nShould move to:\n- constants package for prefixes\n- config for customizable paths\n\nLow priority but improves maintainability.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-24T12:51:20.962108-08:00","updated_at":"2025-12-24T12:51:20.962108-08:00","dependencies":[{"issue_id":"gt-t5mz","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T12:52:08.156758-08:00","created_by":"daemon"}]}
{"id":"gt-t6muy","title":"Design: Polecat lifecycle and patrol coordination","description":"## Context\n\nThis design captures thinking from a deep session about the Gas Town propulsion system - how Deacon, Witness, Refinery, and Polecats coordinate to move work smoothly through the system.\n\n## Core Insight: Session-Per-Step Model\n\nPolecats do NOT complete complex molecules end-to-end. Instead:\n- One polecat SESSION per molecule STEP\n- Same sandbox (branch/worktree) persists across sessions\n- Each step: spawn → work → close bead → recycle session\n- Final step: spawn → work → close bead → signal complete → merge → nuke sandbox\n\n## Two Cleanup Stages\n\n| Stage | Trigger | Kills | Survives |\n|-------|---------|-------|----------|\n| Step cleanup | Step bead closed | Session | Branch, worktree, molecule |\n| Molecule cleanup | Merged | Session, branch, worktree | Digest |\n\n## Per-Rig Polecat Channel\n\nNeed a mailing list/queue per rig for session-lifecycle requests:\n- \"Recycle me\" (from polecat)\n- \"Recycle worker X\" (from witness/mayor)\n- \"Spawn for step Y\" (from anyone)\n\nFirst-come-first-served by patrolling agents. Anyone on patrol (Witness, Refinery, Crew, Mayor) can service requests.\n\n## GUPP + Pinned Work = Completion\n\nAs long as:\n1. Work is pinned to polecat identity (e.g., gastown/furiosa)\n2. Sandbox persists (branch + worktree)\n3. Someone keeps spawning polecat when it dies\n\n→ The molecule WILL get finished. GUPP ensures wake-and-work.\n\n## Daemon → Deacon Heartbeat\n\nThe daemon pings the deacon, keeping the cycle alive. Deacon peeks into rig-wide channels during patrol and can service lifecycle requests.\n\n## Open Design Questions\n\n### Q1: Spoon-Feeding Bin-Packing\nTwo dimensions of granularity trade-offs:\n- How many logical steps per physical molecule step?\n- How many molecule steps per polecat session?\n\nToo few steps → context exhaustion, forgetting\nToo many steps → overhead, fragmentation\n\nNeeds: Analysis of optimal granularity based on step complexity.\n\n### Q2: Mechanical vs Agent-Driven Recycling\nCaution from deacon murder spree bug: mechanical detection of \"stuck\" workers is fragile.\n\nPrefer: Explicit \"recycle me\" requests serviced by patrol agents.\n\nQuestion: When is mechanical intervention appropriate?\n\n### Q3: Channel Implementation\nOptions:\n- Mail-based (gt mail to rig/polecats)\n- Beads-based (special issue type)\n- State file (rig/polecat-queue.json)\n\nMail seems most consistent with Gas Town patterns.\n\n### Q4: Who Spawns Next Step?\nCurrent: gt sling spawns fresh polecat\nNeeded: Mechanism for \"continue molecule on existing sandbox\"\n\nMaybe: gt sling --continue or witness detects pending step.\n\n## Related Issues\n\n- gt-dtw9u: Witness monitoring (enhance survey-workers)\n- gt-qpwv4: Completion detection (check ready branches)\n- gt-6qyt1: Refinery queue (process MERGE_READY)\n- gt-budeb: Auto-nuke (handle MERGED signal)\n- gt-5j3ia: Swarm aggregation (batch completion)\n- gt-1dbcp: Polecat auto-start (SessionStart hook issue)\n\n## Design Principles (from HOP/MEOW context)\n\n1. **Discovery over tracking** - observe reality each cycle\n2. **Mail as coordination primitive** - agents signal via mail\n3. **ZFC** - Claude makes judgment calls, no hardcoded thresholds\n4. **Redundant monitoring** - overlapping observation is resilience\n5. **Wisps are ephemeral** - patrol molecules flow like water\n\n## Next Steps\n\n1. Finalize channel design (mail-based queue)\n2. Enhance witness patrol formula with completion detection\n3. Enhance refinery patrol with MERGED signaling\n4. Implement step-level recycling\n5. Design spoon-feeding granularity guidelines","status":"hooked","priority":1,"issue_type":"epic","created_at":"2025-12-27T19:55:01.660221-08:00","created_by":"mayor","updated_at":"2025-12-27T19:58:46.95043-08:00"}
{"id":"gt-t76fz","title":"ZFC #4: Replace daemon identity parsing with agent self-registration","description":"**ZFC Violation:** internal/daemon/lifecycle.go:209-309\n\nThe daemon has embedded switch statements that parse agent identity strings to determine:\n- Session names\n- Working directories\n- Which agents need pre-sync\n- Restart commands\n\n**Current anti-pattern:**\n```go\nif strings.HasSuffix(identity, \"-refinery\") {\n needsPreSync = true\n workDir = filepath.Join(...)\n}\n```\n\n**ZFC-compliant solution:**\nAgent types self-register via role beads:\n- Role bead contains: working_dir, session_name_pattern, needs_sync, restart_command\n- Daemon reads role bead to get lifecycle config\n- No identity string parsing in Go\n\n**Depends on:** Day 1.5 (role beads exist)\n\nReference: ~/gt/docs/zfc-violations-audit.md #4","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-27T21:32:22.443355-08:00","created_by":"mayor","updated_at":"2025-12-27T23:18:32.220257-08:00","dependencies":[{"issue_id":"gt-t76fz","depends_on_id":"gt-xgqnb","type":"blocks","created_at":"2025-12-27T21:32:39.209763-08:00","created_by":"daemon"}]}
{"id":"gt-t7ekm","title":"gt mol attach: Auto-detect agent from cwd when single arg provided","description":"## Current Behavior\n\ngt mol attach requires 2 args:\n gt mol attach \u003cagent-bead-id\u003e \u003cmolecule-id\u003e\n\n## Expected Behavior\n\nWhen called with 1 arg from an agent working directory:\n gt mol attach \u003cmolecule-id\u003e\n\nShould auto-detect the agent from cwd (same detection used by gt mail, bd, etc.)\nand attach the molecule to that agent hook.\n\n## Example\n\nFrom ~/gt/gastown/mayor/rig:\n gt mol attach gt-y14l7\n -\u003e detects mayor role\n -\u003e attaches gt-y14l7 to gt-mayor hook\n\n## Implementation\n\n1. Check arg count\n2. If 1 arg, call role detection from cwd\n3. Resolve agent bead ID from role (gt-mayor, gt-witness-gastown, etc.)\n4. Proceed with attachment\n\nThis makes the common case (attaching work to yourself) ergonomic.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-28T22:27:13.897826-08:00","created_by":"stevey","updated_at":"2025-12-28T22:27:13.897826-08:00"}
{"id":"gt-t9ojq","title":"Digest: mol-deacon-patrol","description":"Patrol 6: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:05:30.233061-08:00","updated_at":"2025-12-28T03:05:30.233061-08:00","closed_at":"2025-12-28T03:05:30.233023-08:00"}
{"id":"gt-tcv8","title":"Digest: mol-deacon-patrol","description":"Patrol 2: All healthy, routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T22:35:11.507838-08:00","updated_at":"2025-12-24T22:35:11.507838-08:00","closed_at":"2025-12-24T22:35:11.507795-08:00"}
{"id":"gt-tgy1v","title":"@group dynamic resolution in mail router","description":"Wire agent bead queries into mail router for @group addresses.\n\n## Updated Approach (post agent-as-bead)\n\nAgent discovery now uses bead queries instead of filesystem scanning:\n\n```bash\n# Instead of filesystem scan\nbd list --type=agent --rig=gastown\n\n# Filter by role\nbd list --type=agent --role_type=witness\nbd list --type=agent --role_type=crew --rig=gastown\n```\n\n## Deliverables\n\n1. Parse @group syntax in router:\n - @rig/gastown → bd list --type=agent --rig=gastown\n - @town → bd list --type=agent\n - @witnesses → bd list --type=agent --role_type=witness\n - @crew/gastown → bd list --type=agent --role_type=crew --rig=gastown\n\n2. Fan-out at send time:\n - Resolve @group to list of agent bead IDs\n - Create N message copies (one per recipient)\n - Each recipient gets their own message\n\n3. Update gt mail send to handle @group\n\n## Dependencies\n- Agent bead schema (gt-ikyo1) - enables type=agent queries\n- Agent beads must exist for resolution to return results\n\n## Acceptance\n- @rig/gastown sends to all gastown agents\n- Each recipient has own message copy\n- Works with existing mail infrastructure","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-26T14:52:04.244948-08:00","updated_at":"2025-12-27T22:16:34.323067-08:00","dependencies":[{"issue_id":"gt-tgy1v","depends_on_id":"gt-xo05b","type":"blocks","created_at":"2025-12-26T14:53:03.081856-08:00","created_by":"daemon"},{"issue_id":"gt-tgy1v","depends_on_id":"gt-ikyo1","type":"blocks","created_at":"2025-12-27T22:16:18.444503-08:00","created_by":"daemon"}]}
{"id":"gt-th7","title":"Add agent abstraction layer to support non-Claude agents","description":"Currently Gas Town hardcodes 'claude --dangerously-skip-permissions' throughout the codebase for spawning agents. We should add an abstraction layer to support other AI agents (e.g., Gemini CLI, OpenAI agents, local models).\n\nLocations that spawn Claude:\n- internal/cmd/mayor.go:131\n- internal/cmd/deacon.go:150 \n- internal/cmd/witness.go:280\n- internal/cmd/crew.go (multiple locations)\n- internal/cmd/up.go:190, 229\n- internal/session/manager.go:146\n- internal/refinery/manager.go:207\n\nSuggested approach:\n1. Create an agent package with an interface\n2. Add configuration for agent type in town/rig config\n3. Replace hardcoded claude commands with agent.Spawn() calls\n4. Support agents: claude, gemini, openai, local (ollama, etc.)","status":"open","priority":3,"issue_type":"feature","created_at":"2025-12-20T15:11:15.931048-08:00","updated_at":"2025-12-20T15:26:54.236995-08:00"}
{"id":"gt-tkbd5","title":"Refactor runStart into focused helper functions","description":"attached_args: Refactor runStart into focused helper functions\n\nBreak up the 126-line runStart function in start.go.\n\n## Files to modify\n- internal/cmd/start.go\n\n## Current structure (lines 129-255)\nrunStart does:\n1. Crew path detection\n2. Workspace verification\n3. Mayor session start\n4. Deacon session start\n5. Optional rig agent startup\n6. Configured crew auto-start\n\n## Refactoring plan\nExtract these helpers:\n```go\nfunc startMayorSession(townRoot string, verbose bool) error\nfunc startDeaconSession(townRoot string) error\nfunc startRigAgents(townRoot string, rigs []string) error\nfunc startConfiguredCrew(townRoot string, config *TownConfig) error\n```\n\n## Acceptance criteria\n- [ ] runStart reduced to \u003c50 lines\n- [ ] 4 helper functions extracted\n- [ ] Each helper is \u003c40 lines\n- [ ] No change in behavior\n- [ ] go test ./internal/cmd/... passes\n- [ ] Manual test: gt start works correctly","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T15:49:13.889957-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T16:35:53.275529-08:00","closed_at":"2025-12-28T16:35:53.275529-08:00"}
{"id":"gt-tmqbj","title":"Merge: rictus-1766959789036","description":"branch: polecat/rictus-1766959789036\ntarget: main\nsource_issue: rictus-1766959789036\nrig: gastown","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-28T14:19:41.66519-08:00","created_by":"stevey","updated_at":"2025-12-28T22:29:42.183162-08:00","closed_at":"2025-12-28T22:29:42.183162-08:00"}
{"id":"gt-tnap3","title":"queue: shared storage work queues","description":"Work queue with shared storage (single copy, first-to-claim).\n\n## Deliverables\n\n1. Parse queue:name syntax in router\n2. Shared storage model:\n - Single message copy (NOT fan-out)\n - Stored in a queue-specific location\n - Multiple agents can see it\n3. Queue configuration in ~/gt/config/queues.json\n4. Queue inbox command: gt mail queue \u003cname\u003e\n\n## Key difference from list:\n- list: creates N copies (N obligations)\n- queue: creates 1 copy (1 obligation, first-to-claim)\n\n## Dependencies\n- Config directory (gt-i6jvc)\n\n## Acceptance\n- queue:cleanup creates single message\n- Multiple agents can view queue\n- Message visible until claimed","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-26T14:52:07.091239-08:00","updated_at":"2025-12-26T14:52:07.091239-08:00","dependencies":[{"issue_id":"gt-tnap3","depends_on_id":"gt-i6jvc","type":"blocks","created_at":"2025-12-26T14:53:06.932146-08:00","created_by":"daemon"}]}
{"id":"gt-tnow.3","title":"Add witness plugin hook support","description":"Implement plugin directories for witness patrol.\n\nStructure:\n \u003crig\u003e/plugins/witness/\n ├── pre-inspection/\n │ └── stale-branch-check/\n │ └── CLAUDE.md\n └── post-action/\n └── mq-health/\n └── CLAUDE.md\n\nrun-plugins step scans these directories and bonds mol-plugin-runner for each.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T02:37:43.175287-08:00","updated_at":"2025-12-28T22:37:23.57202-08:00","closed_at":"2025-12-28T22:37:23.57202-08:00","dependencies":[{"issue_id":"gt-tnow.3","depends_on_id":"gt-tnow","type":"parent-child","created_at":"2025-12-23T02:37:43.175635-08:00","created_by":"daemon"}]}
{"id":"gt-tnss","title":"Analysis: Beads database size and hygiene strategy","description":"Audit beads database size and plan medium-term hygiene.\n\n## Questions\n1. How many issues total (including tombstones)?\n2. Size of issues.jsonl?\n3. Growth rate per day/week?\n4. What percentage are tombstones?\n\n## Hygiene Topics\n- Compaction: squash tombstones periodically\n- Archival: move old closed issues to archive file\n- Pruning: delete truly stale items (test beads, old MRs)\n- Sync efficiency: large JSONL = slow sync\n\n## Action Items\n- [ ] Count total issues by status\n- [ ] Count tombstones\n- [ ] Measure file sizes\n- [ ] Propose hygiene schedule","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T14:38:32.92481-08:00","updated_at":"2025-12-23T14:38:32.92481-08:00"}
{"id":"gt-tnw","title":"MCP beads tools fail from polecat directories","description":"The beads MCP plugin (plugin:beads:beads) fails to find issues when invoked from polecat directories.\n\n## Observed\n- Polecat in /gt/gastown/polecats/dementus\n- MCP tool: plugin:beads:beads - show (issue_id: 'gt-th7')\n- Error: 'bd command failed: Error: no issue found matching gt-th7'\n\n## Expected\nMCP tools should work the same as running bd directly.\n\n## Note\nThis may be related to gt-tmm (beads sync issue) rather than an MCP-specific bug. The MCP tool uses bd under the hood, and bd can't find the issue because the polecat's beads database is stale.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-20T15:17:33.135931-08:00","updated_at":"2025-12-20T15:17:33.135931-08:00"}
{"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-trym0","title":"Digest: mol-deacon-patrol","description":"Patrol 3: All healthy, routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:15:33.591974-08:00","updated_at":"2025-12-25T10:15:33.591974-08:00","closed_at":"2025-12-25T10:15:33.591943-08:00"}
{"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"}
{"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-ttdrt","title":"Digest: mol-deacon-patrol","description":"Patrol 18: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:10:50.948882-08:00","updated_at":"2025-12-28T03:10:50.948882-08:00","closed_at":"2025-12-28T03:10:50.948853-08:00"}
{"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-tvwnz","title":"MQ summary in gt status","description":"Add per-rig MQ summary to gt status output.\n\nCurrent gt status shows:\n gastown\n refinery ✓ running\n\nAdd:\n gastown\n refinery ✓ running\n MQ: 4 pending, 1 in-flight\n\nImplementation:\n- Query beads for merge-request type issues\n- Count by status (open=pending, in_progress=in-flight)\n- Display in rig section","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T21:40:37.900461-08:00","created_by":"gastown/crew/jack","updated_at":"2025-12-28T21:40:37.900461-08:00","dependencies":[{"issue_id":"gt-tvwnz","depends_on_id":"gt-ytsxp","type":"blocks","created_at":"2025-12-28T21:41:11.558562-08:00","created_by":"daemon"}]}
{"id":"gt-u0ccw","title":"Digest: mol-deacon-patrol","description":"P16: stable","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T19:59:59.331911-08:00","updated_at":"2025-12-25T19:59:59.331911-08:00","closed_at":"2025-12-25T19:59:59.331857-08:00"}
{"id":"gt-u1j.15","title":"Plugin system: subprocess JSON protocol","description":"Language-agnostic plugin system via subprocess JSON protocol.\n\n## Concept\n\nAllow extending Gas Town with external scripts/programs. Plugins communicate via stdin/stdout JSON.\n\n## Protocol\n\nRequest (gt → plugin):\n```json\n{\"method\": \"check\", \"params\": {\"rig\": \"wyvern\", \"polecat\": \"Toast\"}}\n```\n\nResponse (plugin → gt):\n```json\n{\"result\": {...}, \"error\": null}\n```\n\nError response:\n```json\n{\"result\": null, \"error\": {\"code\": 1, \"message\": \"...\"}}\n```\n\n## Interface\n\n```go\ntype Plugin struct {\n Name string\n Path string // executable path\n Methods []string\n}\n\ntype PluginManager struct {\n plugins map[string]*Plugin\n}\n\nfunc NewPluginManager() *PluginManager\nfunc (pm *PluginManager) Register(plugin *Plugin) error\nfunc (pm *PluginManager) Call(plugin, method string, params any) (any, error)\nfunc (pm *PluginManager) Discover(dir string) error // auto-discover plugins\n```\n\n## Plugin Discovery\n\nLook in:\n1. `\u003ctown\u003e/plugins/`\n2. `~/.config/gastown/plugins/`\n3. System path with `gt-plugin-*` prefix\n\n## Built-in Hooks\n\nPlugins can register for events:\n- `polecat.started` - Polecat session started\n- `polecat.done` - Polecat signals done\n- `merge.requested` - MR submitted\n- `merge.completed` - MR merged\n\n## Use Cases\n\n- Custom health checks\n- Integration with external systems (Slack, etc.)\n- Custom merge policies\n- Metrics collection\n\n## Future\n\nConsider MCP integration for richer plugin capabilities.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-15T17:12:59.200876-08:00","updated_at":"2025-12-28T22:36:41.70144-08:00","closed_at":"2025-12-28T22:36:41.70144-08:00","dependencies":[{"issue_id":"gt-u1j.15","depends_on_id":"gt-u1j","type":"parent-child","created_at":"2025-12-15T17:12:59.201236-08:00","created_by":"daemon"},{"issue_id":"gt-u1j.15","depends_on_id":"gt-u1j.1","type":"blocks","created_at":"2025-12-15T17:14:21.246945-08:00","created_by":"daemon"}]}
{"id":"gt-u1j.2","title":"Bubbletea TUI dashboard","description":"Interactive TUI using Charm Bubbletea. Root model, view routing, Lipgloss theme. Includes: dashboard, rig explorer, polecat detail with live tail, mail view, beads view, spawn wizard.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-15T16:52:02.390539-08:00","updated_at":"2025-12-28T22:36:41.719314-08:00","closed_at":"2025-12-28T22:36:41.719314-08:00","dependencies":[{"issue_id":"gt-u1j.2","depends_on_id":"gt-u1j","type":"parent-child","created_at":"2025-12-15T16:52:02.39089-08:00","created_by":"daemon"},{"issue_id":"gt-u1j.2","depends_on_id":"gt-u1j.1","type":"blocks","created_at":"2025-12-15T16:52:10.351879-08:00","created_by":"daemon"},{"issue_id":"gt-u1j.2","depends_on_id":"gt-f9x.3","type":"blocks","created_at":"2025-12-15T16:52:10.441448-08:00","created_by":"daemon"},{"issue_id":"gt-u1j.2","depends_on_id":"gt-lak31","type":"blocks","created_at":"2025-12-28T21:41:21.252981-08:00","created_by":"daemon"},{"issue_id":"gt-u1j.2","depends_on_id":"gt-rbncw","type":"blocks","created_at":"2025-12-28T21:41:21.282777-08:00","created_by":"daemon"}]}
{"id":"gt-u3u5u","title":"Digest: mol-deacon-patrol","description":"Patrol 7: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:05:55.19358-08:00","updated_at":"2025-12-28T03:05:55.19358-08:00","closed_at":"2025-12-28T03:05:55.193549-08:00"}
{"id":"gt-u4fh","title":"Remove stubbed ProcessMRFromQueue and mrqueue package","description":"internal/refinery/engineer.go has stubbed ProcessMRFromQueue() that returns hardcoded failure.\ninternal/mrqueue/ package exists but isn't used.\n\nThis was aspirational 'beads-based MR automation' but:\n1. Refinery agent just runs git commands per role prompt\n2. manager.ProcessMR() is already fully implemented if we need Go automation\n3. The stub creates confusion about what's working\n\nEither:\n1. Remove engineer.ProcessMRFromQueue and mrqueue package entirely\n2. Or finish implementing it if there's a real use case\n\nLeaning toward removal - YAGNI.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T13:04:53.050803-08:00","updated_at":"2025-12-24T13:04:53.050803-08:00","dependencies":[{"issue_id":"gt-u4fh","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T13:05:00.183378-08:00","created_by":"daemon"}]}
{"id":"gt-u6siy","title":"Day 3.3: Witness sends MERGE_READY to refinery","description":"When polecat completes work:\n1. Witness detects completion (hook_bead closed, state=stopped)\n2. Witness sends mail to refinery: MERGE_READY\n3. Mail includes branch name and work bead ID\n\nParent: gt-hwka3","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:04.438294-08:00","created_by":"mayor","updated_at":"2025-12-28T09:51:24.398745-08:00","closed_at":"2025-12-28T09:51:24.398745-08:00","dependencies":[{"issue_id":"gt-u6siy","depends_on_id":"gt-hwka3","type":"parent-child","created_at":"2025-12-27T20:58:47.941899-08:00","created_by":"daemon"},{"issue_id":"gt-u6siy","depends_on_id":"gt-gizsv","type":"blocks","created_at":"2025-12-27T20:58:59.577532-08:00","created_by":"daemon"},{"issue_id":"gt-u6siy","depends_on_id":"gt-qpwv4","type":"relates-to","created_at":"2025-12-27T20:59:10.640353-08:00","created_by":"daemon"},{"issue_id":"gt-u6siy","depends_on_id":"gt-k294l","type":"blocks","created_at":"2025-12-27T23:17:28.250458-08:00","created_by":"daemon"}]}
{"id":"gt-u7dxq","title":"Activity feed improvements","description":"Make the activity feed (gt feed) a first-class TUI experience using charmbracelet.\n\n## Vision\n\nA real-time dashboard showing all Gas Town activity with:\n- Agent tree organized by role (mayor, witnesses, crew, polecats)\n- Live event stream\n- Vim-style navigation\n- Filtering and search\n\n## Architecture\n\nTwo-tier event system:\n- ~/gt/.events.jsonl (raw, audit) - all events from gt, bd, agents\n- Feed daemon curates → ~/gt/.feed.jsonl (user-facing) - filtered, deduped\n\nTUI reads from curated feed for smooth UX.\n\n## Layout (Dashboard + Stream)\n```\n┌─────────────────────────────────────────────────────────────┐\n│ GT Feed Filter: all │\n├─────────────────────────────────────────────────────────────┤\n│ gastown/ │\n│ 🎩 mayor [10:30] Dispatched gt-xyz → Toast │\n│ 👁 witness [10:28] Nudged polecat-3 (idle 5m) │\n│ 🏭 refinery [10:25] Merged PR #123 │\n│ 👷 crew/ │\n│ joe [10:22] ✓ Completed gt-95j13 │\n│ max [10:18] → Working on gt-s6r44 │\n│ 😺 polecats/ │\n│ Toast [10:30] Received gt-xyz, starting... │\n├─────────────────────────────────────────────────────────────┤\n│ [10:30] 😺 Toast: Received molecule gt-xyz │\n│ [10:28] 👁 witness: Nudged polecat-3 after 5m idle │\n│ [10:25] 🏭 refinery: Merged PR #123 │\n├─────────────────────────────────────────────────────────────┤\n│ j/k: scroll /: search f: filter q: quit ?: help │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Key Features\n1. Real-time updates - events stream in live\n2. Agent tree - all agents grouped by role with status\n3. Vim-style navigation - j/k, gg/G, /search\n4. Filtering - by rig, role, event type, time\n5. Collapsible sections\n6. Details on select\n\n## Tech Stack\n- bubbletea - TUI framework\n- bubbles - viewport, list components\n- lipgloss - styling (already have)\n\n## Success Criteria\n- Feed is beautiful and scannable at a glance\n- Agent activity visible in real-time\n- Works in any terminal, degrades gracefully for pipes","status":"hooked","priority":2,"issue_type":"epic","created_at":"2025-12-28T11:01:43.337499-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T16:12:56.286329-08:00","dependencies":[{"issue_id":"gt-u7dxq","depends_on_id":"gt-sb6m4","type":"blocks","created_at":"2025-12-28T11:02:43.136872-08:00","created_by":"daemon"},{"issue_id":"gt-u7dxq","depends_on_id":"gt-zc6ma","type":"blocks","created_at":"2025-12-28T11:02:43.165368-08:00","created_by":"daemon"},{"issue_id":"gt-u7dxq","depends_on_id":"gt-1ydd9","type":"blocks","created_at":"2025-12-28T11:02:43.194997-08:00","created_by":"daemon"},{"issue_id":"gt-u7dxq","depends_on_id":"gt-7aw1m","type":"blocks","created_at":"2025-12-28T11:02:43.224956-08:00","created_by":"daemon"},{"issue_id":"gt-u7dxq","depends_on_id":"gt-38doh","type":"blocks","created_at":"2025-12-28T12:46:47.283782-08:00","created_by":"daemon"},{"issue_id":"gt-u7dxq","depends_on_id":"gt-1uhmj","type":"blocks","created_at":"2025-12-28T12:46:47.313034-08:00","created_by":"daemon"}]}
{"id":"gt-u95ku","title":"Digest: mol-deacon-patrol","description":"Patrol 4: routine, all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T20:00:54.624814-08:00","updated_at":"2025-12-26T20:00:54.624814-08:00","closed_at":"2025-12-26T20:00:54.624766-08:00"}
{"id":"gt-u9can","title":"Digest: mol-deacon-patrol","description":"Patrol 2: 1 msg (Nux done), health OK","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:42:03.116065-08:00","updated_at":"2025-12-28T19:42:03.116065-08:00","closed_at":"2025-12-28T19:42:03.116034-08:00"}
{"id":"gt-uazec","title":"Digest: mol-deacon-patrol","description":"Patrol 3: Routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:44:36.529952-08:00","updated_at":"2025-12-25T20:44:36.529952-08:00","closed_at":"2025-12-25T20:44:36.529895-08:00"}
{"id":"gt-ub5gh","title":"Digest: mol-deacon-patrol","description":"Patrol 6: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T15:43:56.849161-08:00","updated_at":"2025-12-25T15:43:56.849161-08:00","closed_at":"2025-12-25T15:43:56.84913-08:00"}
{"id":"gt-uhc3","title":"gt mq list shows empty when MRs exist","description":"The gt mq list command returns empty results even when merge requests exist in the queue.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-21T17:51:18.712633-08:00","updated_at":"2025-12-21T17:51:18.712633-08:00"}
{"id":"gt-uhqil","title":"Merge: furiosa-1766987668522","description":"branch: polecat/furiosa-1766987668522\ntarget: main\nsource_issue: furiosa-1766987668522\nrig: gastown","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-28T22:06:13.954083-08:00","created_by":"gastown/polecats/furiosa","updated_at":"2025-12-28T22:26:43.955772-08:00","closed_at":"2025-12-28T22:26:43.955772-08:00"}
{"id":"gt-uknj1","title":"Day 5.3: Declare liftoff or document gaps","description":"Final assessment:\n- If E2E works: Close gt-oki8p as complete, declare liftoff\n- If gaps remain: Document what's missing, file follow-on beads\n\nEither way, the 4.5 day sprint is complete.\n\nParent: gt-oki8p","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:04.078962-08:00","created_by":"mayor","updated_at":"2025-12-28T16:18:30.585977-08:00","closed_at":"2025-12-28T16:18:30.585977-08:00","dependencies":[{"issue_id":"gt-uknj1","depends_on_id":"gt-5cql0","type":"blocks","created_at":"2025-12-27T20:58:33.505769-08:00","created_by":"daemon"},{"issue_id":"gt-uknj1","depends_on_id":"gt-oki8p","type":"parent-child","created_at":"2025-12-27T20:58:39.696606-08:00","created_by":"daemon"},{"issue_id":"gt-uknj1","depends_on_id":"gt-liftoff","type":"blocks","created_at":"2025-12-27T21:43:12.64243-08:00","created_by":"daemon"}]}
{"id":"gt-um4iu","title":"Enhance gt status with role hierarchy view","description":"Show identity and role hierarchy in gt status:\n\n## Current Output\nFlat list of agents by rig, no clear role hierarchy.\n\n## Desired Output\nTree structure showing:\n- Town-level roles (Mayor, Deacon)\n- Per-rig role slots with their role_bead references\n- Each agent slot with pinned work\n\nExample:\n```\nTown: gt\n├── 🎩 Mayor (gt-mayor-role)\n│ └── gt-mayor [running] → gt-u7dxq\n├── 🔔 Deacon\n│ └── gt-deacon [running]\n└── Rigs\n └── gastown/\n ├── 👁 Witness (gt-witness-role)\n │ └── gt-witness-gastown [running]\n ├── 🏭 Refinery (gt-refinery-role)\n │ └── gt-refinery-gastown [running] → (work)\n ├── 👷 Crew\n │ ├── jack [running] → gt-xxxx\n │ └── joe [running]\n └── 😺 Polecats\n └── (none)\n```\n\n## Key Changes\n1. Use tree-style indentation (├── └──)\n2. Group agents by role type\n3. Show role_bead for each role category\n4. Use emojis for quick visual scanning","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T19:32:55.007132-08:00","created_by":"stevey","updated_at":"2025-12-28T19:35:55.198677-08:00","closed_at":"2025-12-28T19:35:55.198677-08:00"}
{"id":"gt-um6q","title":"Update docs with molecule navigation workflow","description":"Update architecture and workflow docs with new molecule navigation.\n\n## Docs to update\n\n### docs/molecules.md\n- Add 'Navigating Molecules' section\n- Document bd mol current usage\n- Document bd close --continue workflow\n- Show the propulsion pattern\n\n### docs/propulsion-principle.md\n- Add molecule navigation as key enabler\n- Show before/after workflow comparison\n\n### docs/polecat-wisp-architecture.md\n- Update step execution section\n- Show bd close --continue in examples\n\n## New section content\n\n### Molecule Navigation\n\nFinding your place:\n bd mol current # Where am I?\n bd mol current gt-abc # Status of specific molecule\n\nSeamless transitions:\n bd close gt-abc.3 --continue # Close and advance\n bd close gt-abc.3 --no-auto # Close but don't auto-claim next\n\nThe old way (3 commands):\n bd close gt-abc.3\n bd ready --parent=gt-abc\n bd update gt-abc.4 --status=in_progress\n\nThe new way (1 command):\n bd close gt-abc.3 --continue\n\n## Blocked by (Beads features)\n- bd-sal9: bd mol current\n- bd-ieyy: bd close --continue","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-22T17:01:24.849951-08:00","updated_at":"2025-12-29T14:10:31.294241-08:00","dependencies":[{"issue_id":"gt-um6q","depends_on_id":"gt-qswb","type":"blocks","created_at":"2025-12-22T17:01:31.856627-08:00","created_by":"daemon"},{"issue_id":"gt-um6q","depends_on_id":"gt-fly0","type":"blocks","created_at":"2025-12-22T17:01:31.930072-08:00","created_by":"daemon"}]}
{"id":"gt-unev","title":"Clean up ~/gt root directory cruft","description":"The town root has accumulated various directories and files that need review:\n\n**To evaluate:**\n- daemon/ - old daemon code? move or delete?\n- deacon/ - WIP deacon work? consolidate with gastown?\n- mayor/ - old mayor structure? \n- AGENTS.md - is this still used?\n- gt binary at root - should be gitignored\n\n**Already correct:**\n- .beads/, .claude/, .gastown/, .runtime/ - runtime dirs\n- beads/, gastown/ - rig directories \n- docs/hop/ - strategic docs\n- CLAUDE.md - mayor context\n\nClean up, consolidate, update .gitignore as needed.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-22T22:10:09.722561-08:00","updated_at":"2025-12-22T22:10:09.722561-08:00"}
{"id":"gt-uovsl","title":"Refinery Patrol","description":"Merge queue processor patrol loop with verification gates.","status":"open","priority":2,"issue_type":"molecule","created_at":"2025-12-26T13:08:21.419524-08:00","updated_at":"2025-12-26T13:08:21.419524-08:00"}
{"id":"gt-us8","title":"Daemon: configurable heartbeat interval","description":"Heartbeat interval is hardcoded to 60s. Should be configurable via:\n- town.json config\n- Command line flag\n- Environment variable\n\nDefault 60s is reasonable but some deployments may want faster/slower.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-18T13:38:14.282216-08:00","updated_at":"2025-12-18T13:38:14.282216-08:00","dependencies":[{"issue_id":"gt-us8","depends_on_id":"gt-99m","type":"blocks","created_at":"2025-12-18T13:38:26.704111-08:00","created_by":"daemon"}]}
{"id":"gt-uvga","title":"Digest: mol-deacon-patrol","description":"Patrol 16","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T23:10:43.578204-08:00","updated_at":"2025-12-24T23:10:43.578204-08:00","closed_at":"2025-12-24T23:10:43.57816-08:00"}
{"id":"gt-v2gkv","title":"Day 1.2: Add agent-specific fields to schema","description":"Add fields for agent beads:\n- hook_bead: reference to current work (0..1 cardinality)\n- role_bead: reference to role definition (1)\n- state: agent-reported state (idle|running|stuck|stopped)\n\nParent: gt-d0jqp","notes":"Re-opened: Close reason referenced non-existent commit b5c69507. Agent fields not yet implemented in bd CLI.","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-27T20:57:59.97079-08:00","created_by":"mayor","updated_at":"2025-12-28T00:09:45.030546-08:00","closed_at":"2025-12-28T00:09:45.030546-08:00","dependencies":[{"issue_id":"gt-v2gkv","depends_on_id":"gt-ikyo1","type":"blocks","created_at":"2025-12-27T20:58:46.995644-08:00","created_by":"daemon"},{"issue_id":"gt-v2gkv","depends_on_id":"gt-d0jqp","type":"parent-child","created_at":"2025-12-27T20:59:02.590267-08:00","created_by":"daemon"}]}
{"id":"gt-v37fx","title":"Patrol exponential backoff for cost savings","description":"Agent-side backoff state tracking in patrol molecules.\n\n## State\n\nEach patrol agent tracks:\n- current_interval: current sleep duration (starts at base)\n- idle_cycles: count of cycles with no work found\n\n## Backoff Logic\n\n```\non await-signal timeout (no nudge):\n idle_cycles++\n current_interval = min(base * 2^idle_cycles, max_interval)\n\non nudge received:\n idle_cycles = 0\n current_interval = base\n wake immediately\n\non work found:\n idle_cycles = 0\n current_interval = base\n```\n\n## Where State Lives\n\nOptions:\nA. Agent bead fields (persistent across sessions)\nB. In-memory during patrol (resets on restart)\nC. Wisp fields (ephemeral but survives handoff)\n\nOption B is simplest - backoff resets when agent restarts anyway.\n\n## Depends On\n\n- gt-l6ro3.3: await-signal step type","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-28T22:14:52.633918-08:00","created_by":"mayor","updated_at":"2025-12-28T23:06:25.445583-08:00","dependencies":[{"issue_id":"gt-v37fx","depends_on_id":"gt-arjlu","type":"blocks","created_at":"2025-12-28T22:14:59.063022-08:00","created_by":"daemon"},{"issue_id":"gt-v37fx","depends_on_id":"gt-l6ro3","type":"parent-child","created_at":"2025-12-28T22:31:11.211587-08:00","created_by":"daemon"},{"issue_id":"gt-v37fx","depends_on_id":"gt-l6ro3.3","type":"blocks","created_at":"2025-12-28T23:06:30.628385-08:00","created_by":"daemon"}]}
{"id":"gt-v3bjf","title":"Digest: mol-deacon-patrol","description":"Patrol 14: Quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T07:28:25.96187-08:00","updated_at":"2025-12-25T07:28:25.96187-08:00","closed_at":"2025-12-25T07:28:25.961842-08:00"}
{"id":"gt-v650","title":"Add handoff self-initiation protocol to role templates","description":"Agents need clear protocol for self-initiated handoff:\n\n1. Recognize: 'I should cycle now'\n2. Prepare: Summarize current state, what's next\n3. Send: gt mail send \u003cself\u003e -s '🤝 HANDOFF: ...' -m '...'\n4. Exit: End session cleanly\n\nThis replaces external 'you should cycle now' nudging.\nThe agent owns its lifecycle.\n\nInclude examples for each role type.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T01:46:30.987381-08:00","updated_at":"2025-12-23T14:27:07.35534-08:00"}
{"id":"gt-v8ycl","title":"Digest: mol-deacon-patrol","description":"Patrol 8: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:06:20.557185-08:00","updated_at":"2025-12-28T03:06:20.557185-08:00","closed_at":"2025-12-28T03:06:20.557145-08:00"}
{"id":"gt-vg4n","title":"Use Beads issue status as spawn source of truth","description":"Currently witness tracks spawned issues in .gastown/witness.json to prevent re-spawning:\n\n{\"spawned_issues\": [\"gt-abc1\", \"gt-def2\", ...]}\n\nThis is redundant with Beads issue status (in_progress). The witness could query:\n bd list --status=in_progress\n\nThe local list serves as a performance cache to avoid querying beads every cycle. Consider:\n1. Use Beads as source of truth\n2. Keep local cache with TTL\n3. Sync cache on witness start\n\nThis simplifies state management and ensures consistency.","status":"open","priority":4,"issue_type":"task","created_at":"2025-12-21T22:07:31.756863-08:00","updated_at":"2025-12-21T22:07:31.756863-08:00"}
{"id":"gt-vjcbo","title":"Digest: mol-deacon-patrol","description":"Patrol 20: final cycle","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T06:13:45.223964-08:00","updated_at":"2025-12-28T06:13:45.223964-08:00","closed_at":"2025-12-28T06:13:45.223931-08:00"}
{"id":"gt-vkmpf","title":"Digest: mol-deacon-patrol","description":"Patrol 12: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T18:43:21.209794-08:00","updated_at":"2025-12-26T18:43:21.209794-08:00","closed_at":"2025-12-26T18:43:21.209749-08:00"}
{"id":"gt-vm85o","title":"Mol Mall: Formula Package Registry","description":"A package registry for sharing and discovering formulas, schematics, and protocols.\n\n## Concept\n\nLike npm/Maven/Go modules but for workflow definitions.\n\n```\nmol-mall.io/\n├── @gastown/ # Official Gas Town formulas\n│ ├── shiny\n│ ├── polecat-work\n│ └── release\n├── @acme-corp/ # Enterprise org (private)\n│ └── compliance-review\n├── @linus/ # Individual publisher\n│ └── kernel-review\n└── community/ # Unscoped public formulas\n └── towers-of-hanoi\n```\n\n## Resolution Hierarchy\n\n```\n1. Project: ./.beads/formulas/ # Project-specific\n2. Rig: ~/gt/\u003crig\u003e/.formulas/ # Rig-wide\n3. Town: ~/gt/.formulas/ # Town-wide (mayor stdlib)\n4. User: ~/.gastown/formulas/ # Personal collection\n5. Mall: mol-mall.io/ # Published packages\n```\n\n## Package Manifest\n\n```toml\n[package]\nname = \"shiny\"\nversion = \"1.2.0\"\ndescription = \"Engineer in a Box\"\nauthors = [\"Gas Town \u003cgastown@example.com\u003e\"]\nlicense = \"MIT\"\n\n[dependencies]\n\"@gastown/review-patterns\" = \"^2.0\"\n```\n\n## Distribution Scenarios\n\n1. **Celebrity Formulas**: Expert-curated workflows (e.g., Linus kernel review)\n2. **Enterprise Compliance**: Private company formulas\n3. **Standard Library**: @gastown/* blessed defaults\n4. **Community Ecosystem**: Varying quality, needs ratings/verification\n\n## Open Questions\n\n1. Versioning semantics - SemVer? Breaking change rules?\n2. Security model - sandboxing? signing? permissions?\n3. Private registries - self-hosted? authentication?\n4. Lock files - formulas.lock format?\n\n## Related\n\n- docs/formula_evolution.md - package ecosystem parallel section\n- gt-8ws7o - Schematic (can be published)\n- gt-y3jb9 - Protocol (can be published)\n","status":"closed","priority":4,"issue_type":"epic","created_at":"2025-12-26T01:01:24.551028-08:00","updated_at":"2025-12-28T22:33:22.25303-08:00","closed_at":"2025-12-28T22:33:22.25303-08:00"}
{"id":"gt-vtqs3","title":"Digest: mol-deacon-patrol","description":"Patrol 12: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:08:31.206977-08:00","updated_at":"2025-12-27T23:08:31.206977-08:00","closed_at":"2025-12-27T23:08:31.206937-08:00"}
{"id":"gt-vx2qv","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 9: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:07.233471-08:00","updated_at":"2025-12-28T11:22:07.233471-08:00","closed_at":"2025-12-28T11:22:07.233434-08:00"}
{"id":"gt-w2n82","title":"Digest: mol-deacon-patrol","description":"Patrol 11: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:07:59.516238-08:00","updated_at":"2025-12-27T23:07:59.516238-08:00","closed_at":"2025-12-27T23:07:59.516202-08:00"}
{"id":"gt-w41ln","title":"E2E Test: Add a comment to internal/util/process.go","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T16:16:17.43602-08:00","created_by":"stevey","updated_at":"2025-12-28T16:21:56.724387-08:00","closed_at":"2025-12-28T16:21:56.724387-08:00"}
{"id":"gt-w631c.1","title":"Test Polecat Arm","description":"Test child for bonding pattern","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:57:47.004005-08:00","updated_at":"2025-12-25T01:33:00.170605-08:00","closed_at":"2025-12-25T01:33:00.170605-08:00"}
{"id":"gt-w98d","title":"witness Handoff","status":"hooked","priority":2,"issue_type":"task","created_at":"2025-12-23T16:23:42.292529-08:00","updated_at":"2025-12-27T18:14:41.837335-08:00"}
{"id":"gt-whrlq","title":"Digest: mol-deacon-patrol","description":"Patrol 4: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:04:29.713193-08:00","updated_at":"2025-12-28T03:04:29.713193-08:00","closed_at":"2025-12-28T03:04:29.713159-08:00"}
{"id":"gt-wisp-9ss","title":"Clean dead sessions","description":"Clean dead sessions and orphaned state.\n\nRun `gt doctor --fix` to handle all cleanup:\n\n```bash\n# Preview what needs cleaning\ngt doctor -v\n\n# Fix everything\ngt doctor --fix\n```\n\nThis handles:\n- **orphan-sessions**: Kill orphaned tmux sessions (gt-* not matching valid patterns)\n- **orphan-processes**: Kill orphaned Claude processes (no tmux parent)\n- **wisp-gc**: Garbage collect abandoned wisps (\u003e1h old)\n\nAll cleanup is handled by doctor checks - no need to run separate commands.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T13:04:23.049699-08:00","updated_at":"2025-12-26T13:09:27.208152-08:00","closed_at":"2025-12-26T13:09:27.208152-08:00"}
{"id":"gt-wisp-eju","title":"Nudge newly spawned polecats","description":"Nudge newly spawned polecats that are ready for input.\n\nWhen polecats are spawned, their Claude session takes 10-20 seconds to initialize. The spawn command returns immediately without waiting. This step finds spawned polecats that are now ready and sends them a trigger to start working.\n\n**ZFC-Compliant Observation** (AI observes AI):\n\n```bash\n# View pending spawns with captured terminal output\ngt deacon pending\n```\n\nFor each pending session, analyze the captured output:\n- Look for Claude's prompt indicator \"\u003e \" at the start of a line\n- If prompt is visible, Claude is ready for input\n- Make the judgment call yourself - you're the AI observer\n\nFor each ready polecat:\n```bash\n# 1. Trigger the polecat\ngt nudge \u003csession\u003e \"Begin.\"\n\n# 2. Clear from pending list\ngt deacon pending \u003csession\u003e\n```\n\nThis triggers the UserPromptSubmit hook, which injects mail so the polecat sees its assignment.\n\n**Bootstrap mode** (daemon-only, no AI available):\nThe daemon uses `gt deacon trigger-pending` with regex detection. This ZFC violation is acceptable during cold startup when no AI agent is running yet.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T19:55:37.501716-08:00","updated_at":"2025-12-25T19:55:55.613364-08:00","closed_at":"2025-12-25T19:55:55.613364-08:00","dependencies":[{"issue_id":"gt-wisp-eju","depends_on_id":"gt-wisp-lya","type":"blocks","created_at":"2025-12-25T19:55:37.617246-08:00","created_by":"deacon"}]}
{"id":"gt-wisp-qx6","title":"mol-witness-patrol","description":"Per-rig worker monitor patrol loop using the Christmas Ornament pattern.\n\nThe Witness is the Pit Boss for your rig. You watch polecats, nudge them toward\ncompletion, verify clean git state before kills, and escalate stuck workers.\n\n**You do NOT do implementation work.** Your job is oversight, not coding.\n\nThis molecule uses dynamic bonding to spawn mol-polecat-arm for each worker,\nenabling parallel inspection with a fanout gate for aggregation.\n\n## The Christmas Ornament Shape\n\n```\n ★ mol-witness-patrol (trunk)\n /|\\\n ┌────────┘ │ └────────┐\n PREFLIGHT DISCOVERY CLEANUP\n │ │ │\n inbox-check survey aggregate (WaitsFor: all-children)\n check-refnry │ save-state\n load-state │ generate-summary\n ↓ context-check\n ┌───────┼───────┐ burn-or-loop\n ● ● ● mol-polecat-arm (dynamic)\n ace nux toast\n```\n","status":"closed","priority":2,"issue_type":"epic","created_at":"2025-12-25T19:48:34.05296-08:00","updated_at":"2025-12-26T19:59:32.832833-08:00","closed_at":"2025-12-26T19:59:32.832833-08:00"}
{"id":"gt-wisp-zuj","title":"Handle callbacks from agents","description":"Handle callbacks from agents.\n\nCheck the Mayor's inbox for messages from:\n- Witnesses reporting polecat status\n- Refineries reporting merge results\n- Polecats requesting help or escalation\n- External triggers (webhooks, timers)\n\n```bash\ngt mail inbox\n# For each message:\ngt mail read \u003cid\u003e\n# Handle based on message type\n```\n\nCallbacks may spawn new polecats, update issue state, or trigger other actions.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T13:04:23.048133-08:00","updated_at":"2025-12-26T13:05:17.719577-08:00","closed_at":"2025-12-26T13:05:17.719577-08:00"}
{"id":"gt-witness-gastown","title":"gt-witness-gastown","description":"gt-witness-gastown\n\nrole_type: witness\nrig: gastown\nagent_state: running\nhook_bead: null\nrole_bead: gt-witness-role\ncleanup_status: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-28T00:07:40.418097-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-29T14:31:11.045404-08:00","closed_at":"2025-12-29T14:30:35.640814-08:00","close_reason":"Migrated to canonical naming: gt-gastown-witness/refinery"}
{"id":"gt-witness-role","title":"Witness Role Definition","description":"You are the Witness - per-rig worker monitor. You watch polecats, nudge them\ntoward completion, verify clean git state before kills, and escalate stuck\nworkers to the Mayor.\n\nYou do NOT do implementation work. Your job is oversight, not coding.\n\ndefault_molecule: mol-witness-patrol\ncapabilities:\n - monitor_workers\n - nudge_stuck\n - pre_kill_verify\n - session_lifecycle\n - escalation\n\n## Core Responsibilities\n\n1. Monitor workers: Track polecat health and progress\n2. Nudge: Prompt slow workers toward completion\n3. Pre-kill verification: Ensure git state is clean before killing sessions\n4. Session lifecycle: Kill sessions, update worker state\n5. Self-cycling: Hand off to fresh session when context fills\n6. Escalation: Report stuck workers to Mayor\n\nKey principle: You own ALL per-worker cleanup. Mayor is never involved in\nroutine worker management.\n\n## Propulsion Principle\n\nIf you find something on your hook, YOU RUN IT.\n\nYour work is defined by the mol-witness-patrol molecule. Execute steps:\n- bd ready (find next step)\n- bd show \u003cstep-id\u003e (see what to do)\n- bd close \u003cstep-id\u003e (mark complete)\n\n## Nudge Protocol\n\nProgress through stages. Track nudge count per worker per issue.\n- First Nudge (10+ min idle): Gentle inquiry\n- Second Nudge (15 min): Direct question\n- Third Nudge (20 min): Final warning\nAfter 3 nudges with no progress -\u003e escalate to Mayor\n\n## Pre-Kill Verification\n\nBefore killing ANY polecat session:\n1. gt polecat git-state \u003cname\u003e - Must be clean\n2. Check for uncommitted work\n3. Check for unpushed commits\n4. Verify issue closed\n5. Verify PR submitted (if applicable)\n\n## Commands\n\n- gt polecat list \u003crig\u003e - See all polecats\n- gt polecat git-state \u003cname\u003e - Check git cleanliness\n- tmux capture-pane -t gt-\u003crig\u003e-\u003cname\u003e -p | tail -40 - Session inspection\n- gt mail inbox - Check messages\n- gt mail send mayor/ -s \"Subject\" -m \"Message\" - Escalate\n","status":"open","priority":2,"issue_type":"role","created_at":"2025-12-28T00:51:20.912437-08:00","created_by":"stevey","updated_at":"2025-12-28T00:51:20.912437-08:00"}
{"id":"gt-wled7","title":"Use atomic write pattern for state files","description":"attached_args: Atomic write pattern for state files\n\nPrevent data loss from concurrent state file writes using atomic write pattern.\n\n## Files to modify\n- internal/witness/manager.go\n- internal/refinery/manager.go\n- internal/crew/manager.go\n- internal/swarm/manager.go\n\n## Problem\nState is saved directly to file - if process crashes mid-write, file corrupts.\n\n## Implementation\nReplace direct writes with atomic pattern:\n```go\nfunc atomicWriteJSON(path string, v interface{}) error {\n data, err := json.MarshalIndent(v, \"\", \" \")\n if err != nil {\n return err\n }\n tmpFile := path + \".tmp\"\n if err := os.WriteFile(tmpFile, data, 0644); err != nil {\n return err\n }\n return os.Rename(tmpFile, path) // Atomic on POSIX\n}\n```\n\n## Acceptance criteria\n- [ ] atomicWriteJSON helper created (in internal/util or similar)\n- [ ] All 4 manager saveState methods use atomic writes\n- [ ] .tmp files cleaned up on success\n- [ ] go test ./... passes\n- [ ] Manual test: state files survive kill -9","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T15:49:19.004767-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:58:00.223196-08:00","closed_at":"2025-12-28T15:58:00.223196-08:00"}
{"id":"gt-wtfb4","title":"Extract magic values to named constants","description":"Magic strings and numbers throughout codebase:\n\nShells list repeated 4x:\n- start.go:729, 773, 907\n- crew_helpers.go\nPattern: []string{\"bash\", \"zsh\", \"sh\", \"fish\", \"tcsh\", \"ksh\"}\n\nTiming values:\n- time.Sleep(500 * time.Millisecond) in multiple places\n- WaitForCommand 15*time.Second\n- WaitForShellReady 5*time.Second\n- Debounce 100ms default\n\nOther magic values:\n- \"gt-\" session prefix\n- priority = 2 default\n- Mail preview length 500 chars\n- Heartbeat ages 5min/15min\n- Divergence thresholds 10/50 commits\n\nSuggestion: Add to constants/constants.go:\n- SupportedShells\n- ShutdownNotifyDelay, ClaudeStartTimeout, ShellReadyTimeout\n- SessionPrefix\n- DefaultPriority\n- MailPreviewMaxLength","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-28T15:43:12.603942-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:47:18.309863-08:00","closed_at":"2025-12-28T15:47:18.309863-08:00"}
{"id":"gt-wtfej","title":"gt done: MR bead not created","description":"Integration test gt-7psb8 revealed that gt done says 'Work submitted to merge queue' but no MR bead is created.\n\nObserved:\n- gt done output: 'MR ID: mr-1766956116-b02fb1e5'\n- bd show mr-1766956116-b02fb1e5: 'no issue found'\n- gt mq list gastown: '(empty)'\n\nExpected: MR bead should exist with issue_type=merge-request and appear in gt mq list.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-28T13:11:52.664858-08:00","created_by":"mayor","updated_at":"2025-12-28T13:55:54.404887-08:00","closed_at":"2025-12-28T13:55:54.404887-08:00","dependencies":[{"issue_id":"gt-wtfej","depends_on_id":"gt-7psb8","type":"blocks","created_at":"2025-12-28T13:13:50.227153-08:00","created_by":"daemon"}]}
{"id":"gt-wtnb5","title":"Digest: mol-deacon-patrol","description":"Patrol 5: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:16:31.082548-08:00","updated_at":"2025-12-25T10:16:31.082548-08:00","closed_at":"2025-12-25T10:16:31.082511-08:00"}
{"id":"gt-wusk","title":"Layered context onboarding pattern","description":"Pattern from handoff discussion:\n\n## Pattern: Layered Context Onboarding\n\nTown CLAUDE.md (user/org) -\u003e Rig CLAUDE.md (project) -\u003e Role priming\n\n## Ultra-compressed HOP for workers (no reveal)\n\n- Permanent record: All work tracked. Outcomes matter.\n- Quality gates: Molecule steps exist for a reason.\n- Attribution: Completions build your track record.\n- Handoff clean: Leave state any worker can continue.\n\n## Recommendation\n\nCreate Town @AGENTS.md for shared worker context that all workers see.\nThis provides common behavioral guidance without revealing full HOP context.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-20T00:55:11.984103-08:00","updated_at":"2025-12-20T00:55:11.984103-08:00"}
{"id":"gt-wv582","title":"Digest: mol-deacon-patrol","description":"Patrol 7: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T20:02:35.667778-08:00","updated_at":"2025-12-26T20:02:35.667778-08:00","closed_at":"2025-12-26T20:02:35.66773-08:00"}
{"id":"gt-wy8t","title":"Add live polling and updates","description":"Implement live polling (500ms default) for activity updates. Merge new events into view without flickering. Show connection status indicator. Handle daemon disconnects gracefully.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T16:27:18.127611-08:00","updated_at":"2025-12-23T16:27:18.127611-08:00","dependencies":[{"issue_id":"gt-wy8t","depends_on_id":"gt-3p77","type":"blocks","created_at":"2025-12-23T16:27:38.7256-08:00","created_by":"daemon"},{"issue_id":"gt-wy8t","depends_on_id":"gt-rivr","type":"parent-child","created_at":"2025-12-23T16:28:30.942591-08:00","created_by":"daemon"}]}
{"id":"gt-x0a5","title":"Patrol formulas: Inconsistent variable placeholder syntax","description":"The patrol formulas use inconsistent syntax for variable placeholders:\n\n## Inconsistency\n\n| Formula | Syntax | Examples |\n|---------|--------|----------|\n| mol-polecat-arm | `{{var}}` | `{{polecat_name}}`, `{{rig}}` |\n| mol-witness-patrol | `\u003cvar\u003e` | `\u003crig\u003e`, `\u003chandoff-bead-id\u003e` |\n| mol-refinery-patrol | `\u003cvar\u003e` | `\u003cpolecat-branch\u003e` |\n\n## Expected\n\nAll formulas should use consistent syntax, probably `{{var}}` since that's what\nthe variables section defines.\n\n## Fix\n\nUpdate mol-witness-patrol and mol-refinery-patrol to use `{{var}}` syntax\nwhere appropriate, or document that `\u003cvar\u003e` is for human-filled placeholders\nvs `{{var}}` for cook-time interpolation.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-24T13:51:48.126618-08:00","updated_at":"2025-12-28T22:34:14.443991-08:00","closed_at":"2025-12-28T22:34:14.443991-08:00"}
{"id":"gt-x5acy","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 11: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:34.773103-08:00","updated_at":"2025-12-28T11:22:34.773103-08:00","closed_at":"2025-12-28T11:22:34.773071-08:00"}
{"id":"gt-x9m7","title":"Molecule converge: iterate until AI says done","description":"Work isn't 'done' until AI is confident it's done. Fixes the 85% problem.\n\n**From VC**: internal/iterative/converge.go - 3-7 iterations with AI convergence detection. ~600 lines.\nTarget: 20%+ more issues discovered. Observed: ~25% average improvement.\n\n**Gas Town implementation**: Molecule converge config:\n```yaml\nconverge:\n strategy: ai\n min_iterations: 3\n max_iterations: 7\n confidence: 0.85\n```\n\nPolecat iterates, AI checks convergence. Stop when AI is confident or max reached.\n\n**Value**: Raw agents get to ~85% and stop. Iteration catches the remaining 15%.\n\n**VC metrics**: Convergence rate \u003e70%, mean 4-5 iterations for complex work.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-20T20:30:18.671862-08:00","updated_at":"2025-12-20T20:30:18.671862-08:00","dependencies":[{"issue_id":"gt-x9m7","depends_on_id":"gt-zhpa","type":"parent-child","created_at":"2025-12-20T20:30:27.728971-08:00","created_by":"daemon"}]}
{"id":"gt-xd95b","title":"Remove markdown molecule heresy from ~/gt/molecules/","description":"The ~/gt/molecules/lifecycle/*.md files are outdated heresy - molecule definitions should only exist as formula.toml files in .beads/formulas/. Remove the markdown specs and update any docs that reference them.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T17:33:33.464666-08:00","created_by":"gastown/crew/jack","updated_at":"2025-12-28T17:33:33.464666-08:00"}
{"id":"gt-xgqnb","title":"Day 1.5: Create role beads from CLAUDE.md content","description":"Create role beads from existing CLAUDE.md files:\n- gt-mayor-role (from mayor CLAUDE.md)\n- gt-witness-role (from witness CLAUDE.md)\n- gt-refinery-role (from refinery CLAUDE.md)\n\nEach role bead contains priming instructions and default_molecule.\n\nParent: gt-d0jqp","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:18.455282-08:00","created_by":"mayor","updated_at":"2025-12-28T00:51:56.6882-08:00","closed_at":"2025-12-28T00:51:56.6882-08:00","dependencies":[{"issue_id":"gt-xgqnb","depends_on_id":"gt-awu07","type":"blocks","created_at":"2025-12-27T20:58:51.902061-08:00","created_by":"daemon"},{"issue_id":"gt-xgqnb","depends_on_id":"gt-d0jqp","type":"parent-child","created_at":"2025-12-27T20:59:02.757231-08:00","created_by":"daemon"},{"issue_id":"gt-xgqnb","depends_on_id":"gt-gzp2y","type":"blocks","created_at":"2025-12-27T23:17:26.759727-08:00","created_by":"daemon"}]}
{"id":"gt-xj9e5","title":"ZFC #7: Make message age filtering configurable","description":"**ZFC Violation:** internal/daemon/lifecycle.go:64-75\n\nGo hardcodes 6-hour max message age:\n```go\nconst MaxLifecycleMessageAge = 6 * time.Hour\n```\n\n**ZFC-compliant solution:**\n- Make this configurable per message type\n- Or let agents decide message relevance\n- Low priority - not blocking liftoff\n\nReference: ~/gt/docs/zfc-violations-audit.md #7","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-27T21:32:54.911989-08:00","created_by":"mayor","updated_at":"2025-12-27T21:32:54.911989-08:00"}
{"id":"gt-xka9x","title":"announce: shared bulletin board","description":"Announcement channel with shared single-copy storage.\n\n## Deliverables\n\n1. Parse announce:name syntax\n2. Shared storage model (like queue, but no claim):\n - Single message copy\n - Multiple readers can view\n - Informational, not work-creating\n3. Configuration in ~/gt/config/announce.json\n4. Read tracking (optional): who has seen it\n\n## Key semantics\n- Informational broadcast\n- Missing is OK (not critical)\n- Use case: \"Bob refactoring logging, be aware\"\n\n## Dependencies\n- Config directory (gt-i6jvc)\n- queue: implementation (pattern reference)\n\n## Acceptance\n- announce:status creates single shared message\n- Multiple agents can read\n- No claim semantics (read-only)","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-26T14:52:31.22555-08:00","updated_at":"2025-12-26T14:52:31.22555-08:00","dependencies":[{"issue_id":"gt-xka9x","depends_on_id":"gt-i6jvc","type":"blocks","created_at":"2025-12-26T14:53:09.977096-08:00","created_by":"daemon"}]}
{"id":"gt-xo05b","title":"Agent scanner utility for filesystem","description":"Filesystem scanner to discover agent directories in a rig or town.\n\n## Deliverables\n\n1. Function: ScanRigAgents(rigPath) -\u003e []AgentAddr\n - Finds: witness/, refinery/, crew/*, polecats/*\n - Returns normalized addresses (e.g., \"gastown/witness\")\n\n2. Function: ScanTownAgents(townPath) -\u003e []AgentAddr\n - Iterates all rigs, calls ScanRigAgents for each\n - Returns all agent addresses in town\n\n3. Alias resolution:\n - @rig/gastown → ScanRigAgents(\"gastown\")\n - @town → ScanTownAgents()\n - @witnesses → filter for */witness across all rigs\n - @crew/gastown → filter crew/* in gastown\n\n## Location\ninternal/discovery/scanner.go (new package)\n\n## Acceptance\n- Scanner finds all agent types\n- Alias patterns resolve correctly\n- Unit tests pass","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T14:51:38.434528-08:00","updated_at":"2025-12-27T22:15:52.303949-08:00","closed_at":"2025-12-27T22:15:52.303949-08:00"}
{"id":"gt-xpgh8","title":"Support space-separated rig/polecat syntax in gt polecat commands","description":"## Problem\n`gt polecat remove beads obsidian` fails with:\n```\nError: invalid address 'beads': invalid address format: expected 'rig/polecat', got 'beads'\n```\n\nRequires slash syntax: `gt polecat remove beads/obsidian`\n\n## Proposal\nSupport both syntaxes for ergonomics:\n```bash\ngt polecat remove beads/obsidian # address syntax (current)\ngt polecat remove beads obsidian # positional syntax (proposed)\n```\n\n## Implementation\nIn polecat subcommands that take rig/polecat addresses:\n- If arg contains `/`, use as-is\n- If two args without `/`, join with `/`\n- Apply to: remove, status, sync, reset, done\n\n```go\nfunc normalizePolecatAddress(args []string) string {\n if len(args) == 1 \u0026\u0026 strings.Contains(args[0], \"/\") {\n return args[0]\n }\n if len(args) == 2 {\n return args[0] + \"/\" + args[1]\n }\n // error handling...\n}\n```\n\n## Rationale\n- Unambiguous context - polecat commands always take rig + name\n- Matches positional arg patterns in docker, kubectl, etc.\n- Reduces agent friction (natural first guess is space-separated)\n- Slash syntax remains valid for consistency with mail addresses\n","status":"open","priority":3,"issue_type":"feature","created_at":"2025-12-27T16:06:29.941199-08:00","created_by":"mayor","updated_at":"2025-12-27T16:06:29.941199-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-xtsb5","title":"Fix namepool Save() to use write lock","description":"attached_args: Fix namepool Save() mutex for thread safety\n\nFix incorrect mutex usage in namepool Save() method.\n\n## Files to modify\n- internal/polecat/namepool.go\n\n## Problem (lines 179-194)\nSave() uses RLock() but performs file I/O:\n```go\nfunc (p *NamePool) Save() error {\n p.mu.RLock() // WRONG: file write needs write lock\n defer p.mu.RUnlock()\n // ... file operations ...\n}\n```\n\n## Fix\nChange to write lock:\n```go\nfunc (p *NamePool) Save() error {\n p.mu.Lock()\n defer p.mu.Unlock()\n // ... file operations ...\n}\n```\n\n## Acceptance criteria\n- [ ] Save() uses Lock() instead of RLock()\n- [ ] go test -race ./internal/polecat/... passes\n- [ ] Existing namepool tests still pass","status":"hooked","priority":2,"issue_type":"task","created_at":"2025-12-28T15:49:17.602342-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-28T15:54:15.240872-08:00"}
{"id":"gt-xuzo","title":"Add self-check context guidance to role CLAUDE.md files","description":"Each role's CLAUDE.md needs guidance for context self-management:\n\n- After each patrol cycle, self-assess context pressure\n- Heuristics: feeling compressed, lots of tool calls, long session\n- If triggered: initiate handoff before continuing\n\nRoles to update:\n- Mayor (~/gt/CLAUDE.md)\n- Witness template\n- Refinery template \n- Polecat template\n- Crew template\n- Deacon template\n\nThis is the 'inversion of control' - agents decide when to cycle, not external monitoring.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T01:46:14.197485-08:00","updated_at":"2025-12-23T14:27:07.564589-08:00"}
{"id":"gt-xveby","title":"Digest: mol-deacon-patrol","description":"Cycle 9: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T13:17:31.34652-08:00","updated_at":"2025-12-28T13:17:31.34652-08:00","closed_at":"2025-12-28T13:17:31.346483-08:00"}
{"id":"gt-xvner","title":"Digest: mol-deacon-patrol","description":"Patrol 7: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T00:01:49.871554-08:00","updated_at":"2025-12-25T00:01:49.871554-08:00","closed_at":"2025-12-25T00:01:49.871519-08:00"}
{"id":"gt-xw7b","title":"Add --fart as easter egg alias for bd mol bond","description":"Add a hidden alias for the bond command:\n\n```bash\nbd mol fart mol-polecat-work --wisp\n# equivalent to:\nbd mol bond mol-polecat-work --wisp\n```\n\n## Context\nThe fart joke: instantiating a proto can produce either:\n- A Mol (solid/substantial output)\n- A Wisp (gas/ephemeral output)\n\n## Implementation\n- Add 'fart' as an alias in the mol subcommand\n- No documentation needed (easter egg)\n- Maybe a fun message: 'Bonding molecule...' or similar\n\nLow priority, just for fun.","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-21T16:33:18.822868-08:00","updated_at":"2025-12-28T22:33:35.382773-08:00","closed_at":"2025-12-28T22:33:35.382773-08:00"}
{"id":"gt-y14l7","title":"Activity stream infrastructure check","description":"Verify activity stream infrastructure exists and is sufficient for MQ/witness events.\n\nCheck:\n- Does gt feed already have event infrastructure?\n- Can we emit custom events from Go code?\n- What format do events need?\n\nIf infrastructure exists, close this. If not, implement minimal event emission.","status":"hooked","priority":2,"issue_type":"task","created_at":"2025-12-28T21:40:18.862686-08:00","created_by":"gastown/crew/jack","updated_at":"2025-12-28T22:26:11.560503-08:00"}
{"id":"gt-y3jb9","title":"Protocol: Type System for Formulas","description":"Protocols define interfaces that formulas implement - a type system for workflows.\n\n## Concept\n\n```toml\n# reviewable.protocol\n[protocol]\nname = \"Reviewable\"\n\n[requires]\nsteps = [\"review\"] # Must have a step tagged \"review\"\noutputs = [\"review_decision\"] # Must produce this\n\n[guarantees]\n\"review completes before any deploy step\"\n```\n\nFormulas declare: `implements = [\"Reviewable\", \"Deployable\"]`\n\nSystem verifies compliance statically.\n\n## Use Cases\n\n1. Ensure all deploy formulas have review steps\n2. Define compliance requirements as protocols\n3. Enable formula discovery: \"Give me all Deployable formulas\"\n4. Validate formula composition compatibility\n\n## Properties\n\n- Static verification (before execution)\n- Composable (protocol can extend protocol)\n- Documentation value (self-describing contracts)\n\n## Open Questions\n\n1. Protocol syntax - embedded in formula or separate files?\n2. Verification timing - cook time? load time?\n3. Protocol versioning - how do protocols evolve?\n4. Inheritance - can protocols extend other protocols?\n\n## Related\n\n- docs/formula_evolution.md - \"Formula Schemas\" section\n- gt-8tmz - molecule algebra\n","status":"closed","priority":4,"issue_type":"epic","created_at":"2025-12-26T01:00:53.856997-08:00","updated_at":"2025-12-28T22:33:22.289063-08:00","closed_at":"2025-12-28T22:33:22.289063-08:00"}
{"id":"gt-y41ep","title":"Polecat spawn: Environment vars not exported to shell","description":"Polecat sessions set tmux environment but don't export to shell before Claude\n\nIn session/manager.go Start():\n _ = m.tmux.SetEnvironment(sessionID, \"GT_RIG\", m.rig.Name)\n _ = m.tmux.SetEnvironment(sessionID, \"GT_POLECAT\", polecat)\n ...\n command = \"claude --dangerously-skip-permissions\"\n\nCompare to crew_lifecycle.go which exports inline:\n claudeCmd := fmt.Sprintf(\"export GT_ROLE=crew GT_RIG=%s GT_CREW=%s \u0026\u0026 claude ...\")\n\nResult: Claude can't detect polecat identity, falls back to 'mayor', shows wrong hook.\n\nFix: Export GT_ROLE=polecat GT_RIG=X GT_POLECAT=Y inline before running Claude.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-28T14:16:18.410705-08:00","created_by":"mayor","updated_at":"2025-12-28T15:34:03.01152-08:00","closed_at":"2025-12-28T15:34:03.01152-08:00"}
{"id":"gt-yheg9","title":"Digest: mol-deacon-patrol","description":"Patrol 4: All clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T15:34:01.074755-08:00","updated_at":"2025-12-25T15:34:01.074755-08:00","closed_at":"2025-12-25T15:34:01.074729-08:00"}
{"id":"gt-yi5nn","title":"Digest: mol-deacon-patrol","description":"Patrol 5: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:05:03.977673-08:00","updated_at":"2025-12-28T03:05:03.977673-08:00","closed_at":"2025-12-28T03:05:03.977631-08:00"}
{"id":"gt-yjg7a","title":"Day 2.5: Test daemon pokes based on agent state","description":"Integration test:\n1. Create agent bead with state=idle\n2. Sling work → hook_bead set\n3. Verify daemon pokes\n4. Update state=running\n5. Verify daemon doesn't double-poke\n6. Update state=stopped\n7. Verify daemon re-pokes on new work\n\nParent: gt-d0jqp","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:17.188749-08:00","created_by":"mayor","updated_at":"2025-12-28T02:05:51.46199-08:00","closed_at":"2025-12-28T02:05:51.46199-08:00","dependencies":[{"issue_id":"gt-yjg7a","depends_on_id":"gt-psuw7","type":"blocks","created_at":"2025-12-27T20:58:53.582272-08:00","created_by":"daemon"},{"issue_id":"gt-yjg7a","depends_on_id":"gt-5eegv","type":"blocks","created_at":"2025-12-27T20:58:53.639034-08:00","created_by":"daemon"},{"issue_id":"gt-yjg7a","depends_on_id":"gt-2hzl4","type":"blocks","created_at":"2025-12-27T20:58:53.698582-08:00","created_by":"daemon"}]}
{"id":"gt-yo8q8","title":"Digest: mol-deacon-patrol","description":"Patrol 12: all clear","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T08:17:55.490764-08:00","updated_at":"2025-12-28T08:17:55.490764-08:00","closed_at":"2025-12-28T08:17:55.490728-08:00"}
{"id":"gt-yskrz","title":"Crew CLAUDE.md overwritten by polecat template","description":"The crew worker CLAUDE.md files (crew/max, crew/joe, crew/jack) have been overwritten with the polecat-CLAUDE.md template content.\n\n**Expected**: Crew workers should have mayor-like context (they share the rig repo, work on main branch, plan work)\n\n**Actual**: Crew CLAUDE.md says 'Polecat ace' and includes polecat-specific instructions (don't push to main, wait for Witness to kill session, etc.)\n\n**Impact**: \n- Crew workers getting wrong identity context\n- Ready Front planning guidance in gotchas section was lost\n- Crew workers told not to push to main (but they should)\n\n**Root cause**: Likely gt polecat template deployment hit crew directories\n\n**Fix needed**:\n- Restore crew CLAUDE.md template (or create one if missing)\n- Ensure template deployment only targets polecats/ directories\n- Add Ready Front planning section to crew template","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-28T21:38:53.66113-08:00","created_by":"gastown/crew/jack","updated_at":"2025-12-28T21:38:53.66113-08:00"}
{"id":"gt-yt4py","title":"gt polecat add should spawn with --dangerously-skip-permissions","description":"When adding polecats via gt polecat add, the subsequent Claude session needs --dangerously-skip-permissions flag to run autonomously.\n\nCurrently:\n- gt polecat add creates worktree\n- tmux new-session spawns 'claude' without flags\n- Polecat gets stuck at permission prompts\n\nNeeded:\n- gt polecat add (or gt sling) should spawn with --dangerously-skip-permissions\n- Or store a config in polecat worktree indicating autonomous mode\n\nThis is critical for swarm automation - polecats can't self-approve permissions.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-28T16:31:53.841788-08:00","created_by":"mayor","updated_at":"2025-12-28T16:31:53.841788-08:00"}
{"id":"gt-ytsxp","title":"Refinery emits activity events","description":"Refinery emits events to activity stream for MQ lifecycle:\n\nEvents to emit:\n- merge_started: When refinery begins processing an MR\n- merged: When MR successfully merged to main\n- merge_failed: When merge fails (conflict, tests, etc.)\n- merge_skipped: When MR skipped (already merged, etc.)\n\nEvents should include: MR ID, worker, branch, timestamp, reason (for failures)\n\nThis replaces stats tracking in .runtime/refinery.json","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-28T21:40:19.81217-08:00","created_by":"gastown/crew/jack","updated_at":"2025-12-28T21:40:19.81217-08:00","dependencies":[{"issue_id":"gt-ytsxp","depends_on_id":"gt-y14l7","type":"blocks","created_at":"2025-12-28T21:41:11.499026-08:00","created_by":"daemon"}]}
{"id":"gt-ywfjn","title":"Digest: mol-deacon-patrol","description":"Patrol 10: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:07:27.55403-08:00","updated_at":"2025-12-27T23:07:27.55403-08:00","closed_at":"2025-12-27T23:07:27.553999-08:00"}
{"id":"gt-yxn7l","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 20: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:22:51.027105-08:00","updated_at":"2025-12-28T11:22:51.027105-08:00","closed_at":"2025-12-28T11:22:51.027075-08:00"}
{"id":"gt-z3rf","title":"Remove schedule/phase terminology from code","description":"Temporal/schedule language in identifiers is an anti-pattern.\n\n## Found Issues\n\n### beads repo\n- `examples/multi-phase-development/` directory\n - Rename to `examples/dependency-sequenced-work/` or similar\n\n### gastown repo \n- `internal/cmd/start.go` lines 178-195\n - Uses \"Phase 1:\", \"Phase 2:\", etc. in printf output\n - Change to descriptive names: \"Interrupting agents...\", \"Requesting handoff...\", etc.\n\n- `internal/swarm/landing.go` lines ~50-70\n - Comments say \"// Phase 1: Stop all polecat sessions\"\n - Change to \"// Step: Stop all polecat sessions\" or just remove phase labels\n\n## Why This Matters\n\nPhase/version language in names:\n1. Implies a fixed schedule (antithetical to dependency-driven work)\n2. Creates confusion with molecule \"phases\" (solid/liquid/gas)\n3. Encourages temporal thinking that leads to backwards dependencies\n\n## What To Keep\n\n- Molecule phase terminology (pour/wisp/proto) - this is chemistry, not scheduling\n- Version fields inside files (version: 1) - this is semantic versioning","status":"open","priority":2,"issue_type":"chore","created_at":"2025-12-24T15:57:43.019728-08:00","updated_at":"2025-12-24T15:57:43.019728-08:00"}
{"id":"gt-z45be","title":"Digest: mol-deacon-patrol","description":"Patrol 4: all healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T23:04:05.628716-08:00","updated_at":"2025-12-27T23:04:05.628716-08:00","closed_at":"2025-12-27T23:04:05.628679-08:00"}
{"id":"gt-z4g","title":"Plugin: Plan-to-Epic converter","description":"## Purpose\n\nHelp users create beads epics from various planning inputs.\n\n## Inputs\n- Markdown task lists\n- GitHub issues\n- Linear/Jira exports\n- Free-form descriptions\n- Existing beads epics\n\n## Output\n- Beads epic with properly structured children\n- Dependencies set for wave ordering\n- Priorities assigned\n- Ready for `gt spawn --epic \u003cid\u003e`\n\n## Implementation Options\n\n### Option A: CLI Tool\n```bash\ngt plan import --from github --repo owner/repo --label batch-candidate\ngt plan import --from markdown tasks.md\ngt plan structure \u003cepic-id\u003e # analyze and add dependencies\n```\n\n### Option B: Plugin Agent\nA plugin at `\u003crig\u003e/plugins/plan-oracle/` that:\n- Receives planning requests via mail\n- Analyzes scope and requirements\n- Creates structured beads epic\n- Sets dependencies based on analysis\n\n### Option C: Interactive Mode\n```bash\ngt plan create\n# Walks through questions, creates epic interactively\n```\n\n## Axiom\n\nAs stated: 'The Planning phase should end in the creation of a workable Beads plan.'\n\nThis plugin bridges the gap between human planning and machine-executable work.\n\n## Priority\n\nP2 - Nice to have for MVP. Manual epic creation works for now.\n\n## Note\n\nNo \"swarm IDs\" - output is just a beads epic with children. Workers process it independently.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-16T02:10:20.663549-08:00","updated_at":"2025-12-16T17:26:41.087304-08:00"}
{"id":"gt-z5q73","title":"Digest: mol-deacon-patrol","description":"Patrol 7: Routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:50:30.49576-08:00","updated_at":"2025-12-25T20:50:30.49576-08:00","closed_at":"2025-12-25T20:50:30.495714-08:00"}
{"id":"gt-z6exe","title":"Digest: mol-deacon-patrol","description":"Patrol 6: quiet","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T01:30:22.944508-08:00","updated_at":"2025-12-28T01:30:22.944508-08:00","closed_at":"2025-12-28T01:30:22.944475-08:00"}
{"id":"gt-z722q","title":"Digest: mol-deacon-patrol","description":"Patrol cycle 4: All healthy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T11:20:18.680202-08:00","updated_at":"2025-12-28T11:20:18.680202-08:00","closed_at":"2025-12-28T11:20:18.680167-08:00"}
{"id":"gt-z7v0b","title":"Digest: mol-deacon-patrol","description":"Patrol 10: All healthy.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T03:07:12.046971-08:00","updated_at":"2025-12-28T03:07:12.046971-08:00","closed_at":"2025-12-28T03:07:12.046934-08:00"}
{"id":"gt-z99nh","title":"Day 4.2: Implement gt polecat nuke command","description":"Add gt polecat nuke \u003cname\u003e command:\n- Kill the Claude session\n- Delete the worktree\n- Delete the branch\n- Remove agent bead\n- Full cleanup post-merge\n\nParent: gt-4a2qt","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:04.245959-08:00","created_by":"mayor","updated_at":"2025-12-28T14:16:55.595293-08:00","closed_at":"2025-12-28T14:16:55.595293-08:00","dependencies":[{"issue_id":"gt-z99nh","depends_on_id":"gt-4a2qt","type":"parent-child","created_at":"2025-12-27T20:58:44.087816-08:00","created_by":"daemon"},{"issue_id":"gt-z99nh","depends_on_id":"gt-7psb8","type":"blocks","created_at":"2025-12-27T21:00:56.228229-08:00","created_by":"daemon"}]}
{"id":"gt-z9xv","title":"Merge: gt-ldk8","description":"branch: polecat/nux\ntarget: main\nsource_issue: gt-ldk8\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-23T00:18:18.894709-08:00","updated_at":"2025-12-23T01:18:52.583727-08:00","closed_at":"2025-12-23T01:18:52.583727-08:00"}
{"id":"gt-zb0io","title":"Day 4.3: Polecat self-manages session handoffs","description":"**REVISED**: Session cadence is polecat-managed, not mechanically forced by Witness.\n\nPolecats decide when to cycle their own sessions:\n1. Work through molecule steps sequentially in one session\n2. Close each step as completed (bd close, for activity feed)\n3. Self-initiate handoff when: context filling, logical chunk done, or stuck\n4. Use: gt handoff -s 'Continuing molecule' -m '\u003ccontext notes\u003e'\n\nIf polecat forgets to handoff:\n- Compaction will force it eventually\n- Work continues from hook (molecule state preserved)\n- No work is lost\n\nWitness role changes:\n- Does NOT force recycle between steps\n- DOES monitor for stuck (long idle on same step)\n- DOES use recycle for stuck recovery (not routine step transitions)\n- DOES verify clean state before nuke\n\nThis is more ZFC-compliant: polecats report their own needs.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:05.072193-08:00","created_by":"mayor","updated_at":"2025-12-28T16:12:28.054826-08:00","closed_at":"2025-12-28T16:12:28.054826-08:00","dependencies":[{"issue_id":"gt-zb0io","depends_on_id":"gt-4a2qt","type":"parent-child","created_at":"2025-12-27T20:58:45.294593-08:00","created_by":"daemon"},{"issue_id":"gt-zb0io","depends_on_id":"gt-j9ddg","type":"blocks","created_at":"2025-12-27T20:59:03.237863-08:00","created_by":"daemon"}]}
{"id":"gt-zc6ma","title":"Show actor only when not redundant with bead ID","description":"Currently the feed shows actor even when obvious:\n\n [10:17:37] ✓ gt-s6r44 completed · ... @gastown/crew/max\n\nThe actor should be omitted when:\n- The bead ID already identifies the agent (gt-crew-gastown-joe)\n- The action makes the actor obvious (created by = actor)\n\nFormat should be:\n {timestamp} {symbol} {issue-id} {action} · {title} [@actor if not obvious]\n\nPart of epic gt-u7dxq","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-28T11:02:12.679921-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-28T11:02:12.679921-08:00"}
{"id":"gt-zivp","title":"mol-outpost-assign: Intelligent work routing to outposts","description":"The federation design shows outposts.yaml with a static policy section. Simple preference ordering is fine as config, but intelligent work routing should be a molecule.\n\nCurrent static approach:\n```yaml\npolicy:\n default_preference: [local, gce-burst, cloudrun-burst]\n```\n\nCases requiring cognition:\n- \"This is a long-running research task, route to VM not CloudRun\"\n- \"This touches sensitive code, keep local\"\n- \"These 5 issues are related, batch them to same outpost\"\n- \"CloudRun cost is high today, prefer local even if slower\"\n\n## Molecule: outpost-assign\nIntelligent work-to-outpost routing.\n\n## Step: classify-work\nAnalyze the issue/work item:\n- Expected duration (quick fix vs multi-hour)\n- Resource requirements\n- Sensitivity/security tier\n- Related work (same epic?)\n\n## Step: check-capacity\nQuery outpost status:\n- Current load on each\n- Cost accrued today\n- Health status\n\n## Step: select-outpost\nChoose optimal outpost based on:\n- Work classification\n- Capacity/cost\n- Policy constraints\nNeeds: classify-work, check-capacity\n\n## Step: emit-assignment\nRecord decision in beads for audit.\nNeeds: select-outpost\n\n## Notes\n- This molecule is invoked by Mayor/Witness when spawning\n- Simple cases can short-circuit to static policy\n- Full analysis only for ambiguous cases","status":"open","priority":3,"issue_type":"feature","created_at":"2025-12-20T03:26:17.964834-08:00","updated_at":"2025-12-20T03:26:17.964834-08:00"}
{"id":"gt-zk7wl","title":"#channel resolution for real-time broadcast","description":"Wire tmux scanner into nudge system for #channel addresses.\n\n## Deliverables\n\n1. Parse #channel syntax in nudge:\n - #rig/gastown → nudge all running gastown agents\n - #town → nudge all running agents\n - #witnesses → nudge all running witnesses\n\n2. Broadcast logic:\n - Resolve #channel to running sessions\n - Nudge each session\n - Ephemeral (no storage)\n\n## Dependencies\n- Tmux session scanner (gt-???)\n\n## Acceptance\n- #rig/gastown nudges all running gastown agents\n- Ephemeral, no message storage\n- Graceful handling of no-sessions","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-26T14:52:33.362178-08:00","updated_at":"2025-12-26T14:52:33.362178-08:00","dependencies":[{"issue_id":"gt-zk7wl","depends_on_id":"gt-7grh6","type":"blocks","created_at":"2025-12-26T14:53:11.237315-08:00","created_by":"daemon"}]}
{"id":"gt-zlro5","title":"Refactor patrol context functions to reduce duplication","description":"In prime.go, three patrol context functions are nearly identical (~100 lines each):\n- outputDeaconPatrolContext() - L797-940\n- outputWitnessPatrolContext() - L942-1106\n- outputRefineryPatrolContext() - L1108-1272\n\nThey all:\n1. Check for existing patrol molecule\n2. Auto-spawn if none exists\n3. Display patrol work loop instructions\n\n**Suggested refactor**:\nExtract common logic into a helper:\n```go\nfunc outputPatrolContext(ctx RoleContext, patrolName string, assignee string) {\n // shared logic\n}\n```\n\nThen each role-specific function just calls the helper with appropriate parameters.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-25T22:03:13.712525-08:00","updated_at":"2025-12-25T22:03:13.712525-08:00"}
{"id":"gt-zltww","title":"Digest: mol-deacon-patrol","description":"Patrol 19: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T10:20:07.421459-08:00","updated_at":"2025-12-25T10:20:07.421459-08:00","closed_at":"2025-12-25T10:20:07.421425-08:00"}
{"id":"gt-zsma7","title":"Daemon sends heartbeat to Mayor instead of Deacon","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-26T17:39:12.038167-08:00","updated_at":"2025-12-27T23:38:08.070841-08:00","closed_at":"2025-12-27T23:38:08.070841-08:00"}
{"id":"gt-ztm3","title":"Merge: gt-caih","description":"branch: polecat/furiosa\ntarget: main\nsource_issue: gt-caih\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-23T00:14:08.420722-08:00","updated_at":"2025-12-23T01:18:52.590603-08:00","closed_at":"2025-12-23T01:18:52.590603-08:00"}
{"id":"gt-ztpe8","title":"Day 4.4: Witness calls nuke after MERGED signal","description":"When refinery sends MERGED:\n1. Witness receives MERGED mail\n2. Witness calls gt polecat nuke\n3. Full sandbox cleanup\n4. Agent bead removed\n\nParent: gt-4a2qt","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-27T20:58:06.121096-08:00","created_by":"mayor","updated_at":"2025-12-28T16:12:33.049315-08:00","closed_at":"2025-12-28T16:12:33.049315-08:00","dependencies":[{"issue_id":"gt-ztpe8","depends_on_id":"gt-4a2qt","type":"parent-child","created_at":"2025-12-27T20:58:46.285651-08:00","created_by":"daemon"},{"issue_id":"gt-ztpe8","depends_on_id":"gt-z99nh","type":"blocks","created_at":"2025-12-27T20:59:03.489419-08:00","created_by":"daemon"},{"issue_id":"gt-ztpe8","depends_on_id":"gt-budeb","type":"relates-to","created_at":"2025-12-27T20:59:10.701299-08:00","created_by":"daemon"}]}
{"id":"gt-zvte2","title":"Standardize agent bead naming: prefix-rig-role-name","description":"## The Problem\n\nAgent bead IDs use INCONSISTENT naming patterns:\n\n| Current (WRONG) | Should Be (prefix-rig-role-name) |\n|-----------------|----------------------------------|\n| gt-witness-gastown | gt-gastown-witness |\n| gt-refinery-gastown | gt-gastown-refinery |\n| gt-crew-gastown-max | gt-gastown-crew-max |\n| gt-polecat-gastown-Toast | gt-gastown-polecat-Toast |\n\nTown-level agents (no rig) are OK:\n- gt-mayor ✓\n- gt-deacon ✓\n\n## The Convention\n\n```\nprefix-rig-role-name\n\nWhere:\n- prefix: always 'gt'\n- rig: rig name (absent for town-level agents)\n- role: witness|refinery|crew|polecat|mayor|deacon\n- name: agent name (absent for singleton roles like witness/refinery)\n```\n\nExamples:\n- `gt-gastown-witness` (rig=gastown, role=witness, no name)\n- `gt-gastown-crew-max` (rig=gastown, role=crew, name=max)\n- `gt-beads-polecat-Toast` (rig=beads, role=polecat, name=Toast)\n- `gt-mayor` (no rig, role=mayor, no name)\n\n## Files to Update\n\n### Agent bead ID generation\n- internal/cmd/status.go (lines 316-335)\n- internal/daemon/lifecycle.go (lines 546-579)\n- internal/cmd/crew_add.go\n- internal/polecat/manager.go\n- internal/rig/manager.go\n- internal/doctor/agent_beads_check.go\n- internal/cmd/prime.go\n- internal/session/names.go (session names vs bead IDs)\n\n### Commands to verify\n- gt status - displays agent beads\n- gt doctor - creates missing agent beads\n- gt rig add - creates witness/refinery beads\n- gt crew add - creates crew beads\n- gt sling - routes by agent ID\n- gt mol status - looks up agent by ID\n\n## Migration\n\n1. Update all ID generation code\n2. Create new agent beads with correct IDs\n3. Migrate hook/role slots to new beads\n4. Update any mail addresses\n5. Delete old incorrectly-named beads\n\n## Also from this session\n\nRole bead slot cleanup was done - CreateAgentBead now calls bd slot set.\nBut legacy description parsing still exists in daemon/lifecycle.go.\n\n## Reference\n- ~/gt/docs/agent-as-bead.md\n- Session 2025-12-29: Fixed role bead patterns (gt-crew-role etc)","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-29T14:10:33.310182-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-29T14:56:14.529153-08:00","closed_at":"2025-12-29T14:56:14.529153-08:00","close_reason":"Completed: standardized agent bead naming to prefix-rig-role-name"}
{"id":"gt-zwz2f","title":"Digest: mol-deacon-patrol","description":"Patrol 16: routine","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-26T18:45:33.776475-08:00","updated_at":"2025-12-26T18:45:33.776475-08:00","closed_at":"2025-12-26T18:45:33.77643-08:00"}