diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 3a1e7b53..0acc8ce3 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -51,8 +51,8 @@ {"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":"open","priority":2,"issue_type":"task","created_at":"2025-12-21T14:34:13.103951-08:00","updated_at":"2025-12-21T14:34:13.103951-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.11","title":"Phase 5.1: Document ephemeral architecture","description":"Update docs with ephemeral molecule architecture.\n\n## Files to Update\n\n### docs/architecture.md\n- Add Ephemeral Molecules section\n- Diagram: Proto → Ephemeral → Digest flow\n- Explain inversion of control for summaries\n\n### docs/molecules.md (new or update)\n- Proto molecule catalog\n- Ephemeral vs main beads\n- Molecule lifecycle\n- Summary generation guidelines\n\n### Agent CLAUDE.md files\n- Polecat: molecule workflow protocol\n- Deacon: patrol cycle pattern\n- Witness: patrol cycle pattern\n- Refinery: patrol cycle pattern\n\n## Key Concepts to Document\n\n1. Everything is a molecule\n2. Orchestration molecules are ephemeral\n3. Only digests reach main beads\n4. Agents generate their own summaries\n5. Crash recovery via ephemeral persistence","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-21T14:34:30.074147-08:00","updated_at":"2025-12-21T14:34:30.074147-08:00","dependencies":[{"issue_id":"gt-3x0z.11","depends_on_id":"gt-3x0z","type":"parent-child","created_at":"2025-12-21T14:34:30.075854-08:00","created_by":"daemon"},{"issue_id":"gt-3x0z.11","depends_on_id":"gt-3x0z.10","type":"blocks","created_at":"2025-12-21T14:34:40.812635-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":"open","priority":2,"issue_type":"task","created_at":"2025-12-21T14:34:30.158784-08:00","updated_at":"2025-12-21T14:34:30.158784-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-3x0z.2","title":"Phase 1.2: Configure bd for ephemeral molecule bonding","description":"Ensure bd mol bond --ephemeral works with Gas Town setup.\n\n## Questions for Dave\n\n1. Does bd automatically find .beads-ephemeral/ or need explicit path?\n2. How does bd mol bond --ephemeral know which repo to use?\n3. Is there a redirect mechanism for ephemeral like main beads?\n\n## Integration\n\nFrom polecat/crew working directory:\n```bash\nbd mol bond mol-polecat-work --ephemeral --assignee $(gt whoami)\n```\n\nShould create molecule in rig's .beads-ephemeral/, not main beads.","status":"in_progress","priority":1,"issue_type":"task","created_at":"2025-12-21T14:33:23.777969-08:00","updated_at":"2025-12-21T15:50:03.283112-08:00","dependencies":[{"issue_id":"gt-3x0z.2","depends_on_id":"gt-3x0z","type":"parent-child","created_at":"2025-12-21T14:33:23.77835-08:00","created_by":"daemon"}]} -{"id":"gt-3x0z.3","title":"Phase 1.3: gt doctor checks for ephemeral health","description":"Add doctor checks for ephemeral beads repo.\n\n## Checks\n\n1. **ephemeral-exists**: .beads-ephemeral/ directory exists for each rig\n2. **ephemeral-git**: It's a valid git repo\n3. **ephemeral-orphans**: Molecules started but never squashed (\u003e24h old)\n4. **ephemeral-size**: Warn if ephemeral repo is \u003e100MB (should be cleaned)\n5. **ephemeral-stale**: Molecules with no activity in last hour\n\n## Auto-fix\n\n--fix can:\n- Create missing ephemeral repo\n- Clean up old completed molecules (already squashed)\n- NOT auto-squash incomplete molecules (needs AI summary)","status":"closed","priority":2,"issue_type":"task","assignee":"gastown/slit","created_at":"2025-12-21T14:33:23.864314-08:00","updated_at":"2025-12-21T15:41:48.833942-08:00","closed_at":"2025-12-21T15:41:48.833942-08:00","close_reason":"Implemented 5 wisp doctor checks with auto-fix support","dependencies":[{"issue_id":"gt-3x0z.3","depends_on_id":"gt-3x0z","type":"parent-child","created_at":"2025-12-21T14:33:23.864678-08:00","created_by":"daemon"}]} +{"id":"gt-3x0z.2","title":"Phase 1.2: Configure bd for ephemeral molecule bonding","description":"Ensure bd mol bond --ephemeral works with Gas Town setup.\n\n## Questions for Dave\n\n1. Does bd automatically find .beads-ephemeral/ or need explicit path?\n2. How does bd mol bond --ephemeral know which repo to use?\n3. Is there a redirect mechanism for ephemeral like main beads?\n\n## Integration\n\nFrom polecat/crew working directory:\n```bash\nbd mol bond mol-polecat-work --ephemeral --assignee $(gt whoami)\n```\n\nShould create molecule in rig's .beads-ephemeral/, not main beads.","status":"closed","priority":1,"issue_type":"task","assignee":"gastown/nux","created_at":"2025-12-21T14:33:23.777969-08:00","updated_at":"2025-12-21T15:59:40.899659-08:00","closed_at":"2025-12-21T15:59:40.899659-08:00","close_reason":"Blocked: bd mol bond --ephemeral does not exist. The --ephemeral flag needs to be implemented in the beads repo first. See analysis comment for full details and recommendations.","dependencies":[{"issue_id":"gt-3x0z.2","depends_on_id":"gt-3x0z","type":"parent-child","created_at":"2025-12-21T14:33:23.77835-08:00","created_by":"daemon"}],"comments":[{"id":1,"issue_id":"gt-3x0z.2","author":"stevey","text":"## Analysis: bd mol bond --ephemeral\n\n### Current State\n\n1. **No --ephemeral flag exists** on `bd mol bond`\n - The help shows: --as, --dry-run, --type, --var\n - No ephemeral option\n\n2. **mol run has implicit ephemeral behavior**\n - In mol_run.go:93, spawnMolecule is called with ephemeral=true\n - This marks spawned issues with wisp=true field\n\n3. **Current wisp implementation is field-based, not storage-based**\n - Wisps are stored in the SAME database as regular issues\n - The wisp field just marks them for cleanup when closed\n - No separate `.beads-ephemeral/` directory exists\n\n### Architecture Gap\n\nThe architecture.md describes (lines 487-491):\n```\nWisps are stored in a per-rig ephemeral database:\n- \u003crig\u003e/.beads-ephemeral/ - Separate from permanent beads\n- Fast writes, no sync overhead\n- Auto-cleaned on squash/burn\n- Digests write to permanent beads\n```\n\nThis is NOT implemented. Current state:\n- Wisps go to same .beads/beads.db\n- Wisps are synced with everything else\n- No separate ephemeral store\n\n### Answers to Dave's Questions\n\n1. **Does bd automatically find .beads-ephemeral/?**\n NO - This directory concept is not yet implemented. bd only finds .beads/\n\n2. **How does bd mol bond --ephemeral know which repo to use?**\n N/A - The flag doesn't exist yet. Would need to be implemented.\n\n3. **Is there a redirect mechanism for ephemeral?**\n NO - Only BEADS_DIR env var exists for redirecting regular beads.\n\n### Recommendations\n\n**Option A: Minimal (Phase 1)**\n- Add --ephemeral flag to mol bond\n- Use existing wisp field (just marks issues)\n- No separate storage yet\n\n**Option B: Full Architecture**\n- Create .beads-ephemeral/ storage layer\n- Add findEphemeralBeadsDir() discovery\n- Route --ephemeral operations there\n- Implement squash/burn cleanup\n\n### For Gas Town Integration\n\nCurrent workaround using mol run:\n```bash\n# mol run already sets ephemeral=true internally\nbd mol run mol-polecat-work --var assignee=$(gt whoami)\n```\n\nFull integration would need beads changes first.","created_at":"2025-12-21T23:59:33Z"}]} +{"id":"gt-3x0z.3","title":"Phase 1.3: gt doctor checks for ephemeral health","description":"Add doctor checks for ephemeral beads repo.\n\n## Checks\n\n1. **ephemeral-exists**: .beads-ephemeral/ directory exists for each rig\n2. **ephemeral-git**: It's a valid git repo\n3. **ephemeral-orphans**: Molecules started but never squashed (\u003e24h old)\n4. **ephemeral-size**: Warn if ephemeral repo is \u003e100MB (should be cleaned)\n5. **ephemeral-stale**: Molecules with no activity in last hour\n\n## Auto-fix\n\n--fix can:\n- Create missing ephemeral repo\n- Clean up old completed molecules (already squashed)\n- NOT auto-squash incomplete molecules (needs AI summary)","status":"in_progress","priority":2,"issue_type":"task","assignee":"gastown/rictus","created_at":"2025-12-21T14:33:23.864314-08:00","updated_at":"2025-12-21T15:55:25.877899-08:00","dependencies":[{"issue_id":"gt-3x0z.3","depends_on_id":"gt-3x0z","type":"parent-child","created_at":"2025-12-21T14:33:23.864678-08:00","created_by":"daemon"}]} {"id":"gt-3x0z.4","title":"Phase 2.1: gt spawn --molecule bonds in ephemeral","description":"Make gt spawn molecule-aware with ephemeral bonding.\n\n## New Flag\n\n```bash\ngt spawn --issue gt-xxx --molecule mol-polecat-work\n```\n\n## Behavior\n\n1. Create polecat with fresh worktree (existing)\n2. Bond molecule in ephemeral: `bd mol bond mol-polecat-work --ephemeral`\n3. Link molecule root to source issue\n4. Include molecule context in work assignment mail\n5. Start session\n\n## Work Assignment Mail\n\n```\nSubject: Work Assignment: Fix lifecycle bug [MOLECULE]\n\nYou are working on gt-rixa as part of molecule mol-polecat-work.\n\nMolecule instance: eph-abc123\nCurrent step: read-assignment (1/8)\n\nFollow the molecule workflow. When complete, generate summary and squash.\n```","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-21T14:33:45.082722-08:00","updated_at":"2025-12-21T14:33:45.082722-08:00","dependencies":[{"issue_id":"gt-3x0z.4","depends_on_id":"gt-3x0z","type":"parent-child","created_at":"2025-12-21T14:33:45.084965-08:00","created_by":"daemon"},{"issue_id":"gt-3x0z.4","depends_on_id":"gt-3x0z.1","type":"blocks","created_at":"2025-12-21T14:34:40.385365-08:00","created_by":"daemon"},{"issue_id":"gt-3x0z.4","depends_on_id":"gt-3x0z.2","type":"blocks","created_at":"2025-12-21T14:34:40.457259-08:00","created_by":"daemon"}]} {"id":"gt-3x0z.5","title":"Phase 2.2: gt prime shows ephemeral molecule context","description":"Update gt prime to detect and display ephemeral molecule state.\n\n## Detection\n\n1. Check for active ephemeral molecule assigned to current identity\n2. Parse molecule progress (current step, total steps)\n3. Show in prime output\n\n## Output\n\n```\nšŸ”§ Polecat furiosa, checking in.\n\nšŸ“¦ Molecule: mol-polecat-work (eph-abc123)\n Step 3/8: do-work\n Source: gt-rixa\n Started: 10 minutes ago\n\nRun 'bd mol status' for full molecule state.\n```","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-21T14:33:45.164431-08:00","updated_at":"2025-12-21T14:33:45.164431-08:00","dependencies":[{"issue_id":"gt-3x0z.5","depends_on_id":"gt-3x0z","type":"parent-child","created_at":"2025-12-21T14:33:45.16487-08:00","created_by":"daemon"},{"issue_id":"gt-3x0z.5","depends_on_id":"gt-3x0z.4","type":"blocks","created_at":"2025-12-21T15:22:46.151626-08:00","created_by":"daemon"}]} {"id":"gt-3x0z.6","title":"Phase 2.3: Polecat CLAUDE.md molecule workflow protocol","description":"Update polecat prompting for molecule-based work.\n\n## CLAUDE.md Updates\n\nAdd section on molecule workflow:\n\n```markdown\n## Molecule Workflow\n\nWhen assigned a molecule (check gt prime output):\n\n1. Follow molecule steps in order\n2. Mark steps complete: bd mol step complete \u003cstep-id\u003e\n3. Before signaling done:\n a. Generate summary of work performed\n b. Run: bd squash \u003cmolecule-root\u003e --summary \"\u003cyour summary\u003e\"\n4. Then signal done as normal\n\n### Summary Guidelines\n\nYour summary should include:\n- What was the task?\n- What did you do?\n- What was the outcome?\n- Any issues or follow-ups?\n\nKeep it to 2-4 sentences. This becomes the permanent record.\n```","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-21T14:33:45.24122-08:00","updated_at":"2025-12-21T14:33:45.24122-08:00","dependencies":[{"issue_id":"gt-3x0z.6","depends_on_id":"gt-3x0z","type":"parent-child","created_at":"2025-12-21T14:33:45.241575-08:00","created_by":"daemon"},{"issue_id":"gt-3x0z.6","depends_on_id":"gt-3x0z.4","type":"blocks","created_at":"2025-12-21T15:22:47.355729-08:00","created_by":"daemon"}]} @@ -66,7 +66,7 @@ {"id":"gt-3x1.4","title":"Failure handling: assign back to worker, add labels","description":"Handle merge failures appropriately.\n\nFailure types and actions:\n| Failure | Action |\n|-------------|---------------------------------------------|\n| conflict | Add needs-rebase label, assign to worker |\n| tests_fail | Add needs-fix label, assign to worker |\n| build_fail | Add needs-fix label, assign to worker |\n| flaky_test | Retry once, then treat as tests_fail |\n| push_fail | Retry with backoff, escalate if persistent |\n\nActions:\n1. bd update \u003cid\u003e --status=open --assignee=\u003cworker\u003e\n2. bd update \u003cid\u003e --labels=\u003cfailure-label\u003e\n3. Send mail to worker explaining failure\n4. Log failure details\n\nReference: docs/merge-queue-design.md#handling-failures","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-17T13:51:17.238066-08:00","updated_at":"2025-12-19T15:24:39.124327-08:00","closed_at":"2025-12-19T14:48:36.428213-08:00","dependencies":[{"issue_id":"gt-3x1.4","depends_on_id":"gt-3x1","type":"parent-child","created_at":"2025-12-17T13:51:17.240001-08:00","created_by":"daemon"},{"issue_id":"gt-3x1.4","depends_on_id":"gt-3x1.1","type":"blocks","created_at":"2025-12-17T13:53:10.281038-08:00","created_by":"daemon"}]} {"id":"gt-3x1.5","title":"Success handling: close MR, close source issue, cleanup","description":"Handle successful merge completion.\n\nSteps:\n1. Update MR with merge_commit SHA:\n bd update \u003cid\u003e --body='...\\nmerge_commit: \u003csha\u003e'\n2. Close MR with reason:\n bd close \u003cid\u003e --reason='merged'\n3. Close source issue (the work item):\n bd close \u003csource_issue\u003e --reason='Merged in \u003cmr_id\u003e'\n4. Delete source branch (if configured):\n git push origin --delete \u003cmr.branch\u003e\n5. Log success\n\nConfiguration:\n- delete_merged_branches: bool (default true)\n\nReference: docs/merge-queue-design.md#process-merge-steps","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-17T13:51:19.054425-08:00","updated_at":"2025-12-19T15:24:39.126131-08:00","closed_at":"2025-12-19T14:47:47.062475-08:00","dependencies":[{"issue_id":"gt-3x1.5","depends_on_id":"gt-3x1","type":"parent-child","created_at":"2025-12-17T13:51:19.056461-08:00","created_by":"daemon"},{"issue_id":"gt-3x1.5","depends_on_id":"gt-3x1.3","type":"blocks","created_at":"2025-12-17T13:53:10.398758-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-3z6x","title":"Merge: gt-rana.3","description":"branch: polecat/dementus\ntarget: main\nsource_issue: gt-rana.3\nrig: gastown","status":"open","priority":1,"issue_type":"merge-request","created_at":"2025-12-21T15:39:59.205846-08:00","updated_at":"2025-12-21T15:39:59.205846-08:00"} +{"id":"gt-3z6x","title":"Merge: gt-rana.3","description":"branch: polecat/dementus\ntarget: main\nsource_issue: gt-rana.3\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-21T15:39:59.205846-08:00","updated_at":"2025-12-21T15:54:12.416444-08:00","closed_at":"2025-12-21T15:54:12.416444-08:00","close_reason":"Merged to main by refinery"} {"id":"gt-3zg","title":"Verify architecture.md shows correct harness and rig structure","description":"Review architecture.md diagrams:\n- Verify town-level structure shows harness correctly\n- Confirm rig-level mayor/rig/ is shown (it appears to be there at line 197)\n- Check mermaid diagrams match ASCII diagrams\n- Update if any inconsistencies found\n- Cross-reference with new harness.md docs","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-17T17:15:45.10268-08:00","updated_at":"2025-12-19T12:06:49.800234-08:00","closed_at":"2025-12-19T12:06:49.800234-08:00","dependencies":[{"issue_id":"gt-3zg","depends_on_id":"gt-cr9","type":"blocks","created_at":"2025-12-17T17:15:52.090317-08:00","created_by":"daemon"}]} {"id":"gt-3zw","title":"Policy beads: config in data plane","description":"Use sentinel/policy beads for configuration instead of external config. Examples: daemon notifications on/off, heartbeat intervals. Config lives in the bead graph, can be toggled by closing/opening policy beads.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-18T18:18:32.857389-08:00","updated_at":"2025-12-18T18:18:32.857389-08:00"} {"id":"gt-43qg","title":"Test: release command verification","notes":"Released: testing release command","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-19T16:15:30.845537-08:00","updated_at":"2025-12-19T16:15:55.084052-08:00","closed_at":"2025-12-19T16:15:55.084052-08:00"} @@ -97,7 +97,7 @@ {"id":"gt-5af.8","title":"Add human escalation configuration","description":"Add overseer contact config to mayor/town.json. Deacon uses this for escalation when it cannot resolve issues. Support email and/or other notification methods.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-19T17:14:02.770713-08:00","updated_at":"2025-12-20T21:00:03.94794-08:00","closed_at":"2025-12-20T20:40:29.515593-08:00","dependencies":[{"issue_id":"gt-5af.8","depends_on_id":"gt-5af","type":"parent-child","created_at":"2025-12-19T17:14:02.772612-08:00","created_by":"daemon"}]} {"id":"gt-5ft3","title":"Merge: gt-99a","description":"branch: polecat/Slit\ntarget: main\nsource_issue: gt-99a\nrig: gastown","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-19T16:18:15.329358-08:00","updated_at":"2025-12-19T18:26:14.101606-08:00","closed_at":"2025-12-19T17:48:44.671082-08:00"} {"id":"gt-5gkd","title":"Refinery Engineer: Role prompting and CLAUDE.md","description":"Create refinery/CLAUDE.md with Chief Merge Engineer role context. Include:\n- Role identity and responsibilities\n- Decision authority (merge order, test frequency, binary rebuilds)\n- Communication patterns (Witness, Deacon)\n- Session lifecycle (handoff bead protocol)\n- Key commands reference","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-19T18:09:06.423153-08:00","updated_at":"2025-12-19T18:09:06.423153-08:00","dependencies":[{"issue_id":"gt-5gkd","depends_on_id":"gt-ktal","type":"blocks","created_at":"2025-12-19T18:09:39.217523-08:00","created_by":"daemon"}]} -{"id":"gt-5gsx","title":"Merge: gt-3x0z.3","description":"branch: polecat/slit\ntarget: main\nsource_issue: gt-3x0z.3\nrig: gastown","status":"open","priority":2,"issue_type":"merge-request","created_at":"2025-12-21T15:42:20.546839-08:00","updated_at":"2025-12-21T15:42:20.546839-08:00"} +{"id":"gt-5gsx","title":"Merge: gt-3x0z.3","description":"branch: polecat/slit\ntarget: main\nsource_issue: gt-3x0z.3\nrig: gastown","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-21T15:42:20.546839-08:00","updated_at":"2025-12-21T15:55:14.469773-08:00","closed_at":"2025-12-21T15:55:14.469773-08:00","close_reason":"Source branch lost, work needs to be redone"} {"id":"gt-5qc","title":"Document how to configure a Gas Town Harness","description":"Create docs explaining what a harness is (private repo containing GT installation with rigs gitignored), why you'd want one, and how to set it up with beads redirects","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-17T16:42:43.370167-08:00","updated_at":"2025-12-19T12:00:39.274285-08:00","closed_at":"2025-12-19T12:00:39.274285-08:00","dependencies":[{"issue_id":"gt-5qc","depends_on_id":"gt-l1o","type":"blocks","created_at":"2025-12-17T16:42:54.620984-08:00","created_by":"daemon"},{"issue_id":"gt-5qc","depends_on_id":"gt-cr9","type":"blocks","created_at":"2025-12-17T17:15:59.17545-08:00","created_by":"daemon"}]} {"id":"gt-5tp","title":"Test message","description":"Testing GGT mail via beads","status":"closed","priority":2,"issue_type":"message","created_at":"2025-12-16T21:44:27.546781-08:00","updated_at":"2025-12-16T21:45:11.465745-08:00","closed_at":"2025-12-16T21:45:11.465745-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"} @@ -198,7 +198,7 @@ {"id":"gt-bqbw","title":"detectSender() doesn't recognize crew workers","description":"## Problem\n\ndetectSender() in internal/cmd/mail.go only checks for /polecats/ directories. Crew workers in /crew/\u003cname\u003e/ fall through to the default 'mayor/', so:\n- gt mail inbox shows mayor's inbox instead of the crew worker's\n- gt mail send sets the wrong From address\n\n## Fix\n\nAdd crew worker detection before the /polecats/ check:\n\nif strings.Contains(cwd, \"/crew/\") {\n parts := strings.Split(cwd, \"/crew/\")\n ...\n return fmt.Sprintf(\"%s/crew/%s\", rigName, crewMember)\n}\n\n## Affected\n- Any crew worker running gt mail inbox without explicit address\n- Crew worker handoffs (wrong sender)","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-18T20:09:42.556373-08:00","updated_at":"2025-12-19T01:33:49.861756-08:00","closed_at":"2025-12-19T01:33:49.861756-08:00"} {"id":"gt-bxi8","title":"bd mail send: pinned column missing from schema","description":"gt mail send fails with: sqlite3: SQL logic error: table issues has no column named pinned\n\nLikely a schema migration issue - bd schema has 'pinned' field but SQLite table doesn't.\n\n## Reproduction\ngt mail send gastown/Immortan -s 'test' -m 'test'\n\n## Error\ntable issues has no column named pinned\n\n## Fix\nEither:\n1. Add migration to add pinned column\n2. Remove pinned from insert if not present\n3. Regenerate DB from JSONL","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-19T14:53:09.262403-08:00","updated_at":"2025-12-19T17:22:52.553097-08:00","closed_at":"2025-12-19T16:17:03.637686-08:00"} {"id":"gt-bzd","title":"beads: Stop searching upward when .beads found","description":"## Problem\n\nWhen running bd commands in a nested directory structure with multiple .beads directories, bd shows a confusing warning:\n\n```\n╔══════════════════════════════════════════════════════════════════════════╗\nā•‘ WARNING: 2 beads databases detected in directory hierarchy ā•‘\n╠══════════════════════════════════════════════════════════════════════════╣\nā•‘ Multiple databases can cause confusion and database pollution. ā•‘\nā•‘ ā•‘\nā•‘ /Users/stevey/gt/gastown/.beads (261 issues) ā•‘\nā•‘ /Users/stevey/gt/.beads (21 issues) ā•‘\nā•‘ ā•‘\nā•‘ WARNING: Not using the closest database! Check your BEADS_DB setting. ā•‘\nā•‘ ā•‘\nā•‘ RECOMMENDED: Consolidate or remove unused databases to avoid confusion. ā•‘\nā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•\n```\n\n## Why This Is Wrong\n\nIn Gas Town, nested .beads directories are **intentional and necessary**:\n- Town level: /Users/stevey/gt/.beads (mail, town-level issues)\n- Rig level: /Users/stevey/gt/gastown/.beads (gastown project issues)\n- Worker level: polecats have their own beads in worktrees\n\nThese are **unrelated** beads instances for different scopes. They should never be consolidated.\n\n## Expected Behavior\n\nWhen bd finds a .beads directory, it should:\n1. Use that directory (closest ancestor wins)\n2. **Stop searching upward** - do not look for parent .beads directories\n3. **No warning** about multiple databases\n\n## Current Behavior\n\nbd searches all the way up to root, finds all .beads directories, and warns about \"multiple databases\" even though they are separate, intentional instances.\n\n## Fix\n\nIn the database discovery code, stop the upward search as soon as a .beads directory is found. The first .beads found is the one to use, and parent directories are out of scope.\n\n## Note\n\nThis is a beads issue, filed here for tracking. Should be implemented in the beads codebase.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-18T19:09:44.295743-08:00","updated_at":"2025-12-19T00:44:28.741548-08:00","closed_at":"2025-12-19T00:44:28.741548-08:00"} -{"id":"gt-c7z9","title":"Merge: gt-3x0z.1","description":"branch: polecat/furiosa\ntarget: main\nsource_issue: gt-3x0z.1\nrig: gastown","status":"open","priority":1,"issue_type":"merge-request","created_at":"2025-12-21T15:32:28.799733-08:00","updated_at":"2025-12-21T15:32:28.799733-08:00"} +{"id":"gt-c7z9","title":"Merge: gt-3x0z.1","description":"branch: polecat/furiosa\ntarget: main\nsource_issue: gt-3x0z.1\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-21T15:32:28.799733-08:00","updated_at":"2025-12-21T15:54:12.41489-08:00","closed_at":"2025-12-21T15:54:12.41489-08:00","close_reason":"Merged to main by refinery"} {"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-caz","title":"Timed Beads: Scheduled recurring work","description":"## Summary\n\nTimed beads wake up periodically and get injected into the ready queue by the daemon.\n\n## Schema Extension\n\n```yaml\nid: gt-weekly-sync\ntype: task # or sentinel\nschedule: \"0 9 * * 1\" # cron: Monday 9am\n# OR\ninterval: 24h # every 24 hours\ntier: haiku # cheap model for routine checks\nnext_run: 2025-12-20T09:00:00Z\n```\n\n## Daemon Integration\n\nDaemon heartbeat loop:\n1. Check timed beads where `next_run \u003c= now`\n2. For each due bead:\n - Inject into ready queue (set status to open if needed)\n - Update `next_run` based on schedule/interval\n3. Witnesses pick up work via `bd ready`\n\n## Use Cases\n\n- Weekly team sync reminders\n- Daily health checks\n- Periodic cleanup tasks\n- Scheduled reports\n\n## Interaction with Pinned Beads\n\nA pinned bead can be timed - it wakes up periodically but never closes.\nThis is how you model \"background services\" in Gas Town.","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-18T18:07:39.665294-08:00","updated_at":"2025-12-18T18:07:39.665294-08:00"} {"id":"gt-cik","title":"Overseer Crew: User-managed persistent workspaces","description":"## Overview\n\nCrew workers are the overseer's (human's) personal workspaces within a rig. Unlike polecats which are witness-managed and ephemeral, crew workers are:\n\n- **Persistent**: Not auto-garbage-collected\n- **User-managed**: Overseer controls lifecycle\n- **Long-lived identities**: dave, emma, fred - recognizable names\n- **Gas Town integrated**: Mail, handoff mechanics work\n- **Tmux optional**: Can work in terminal directly\n\n## Directory Structure\n\n```\n\u003crig\u003e/\n polecats/ # Managed workers (witness controls)\n refinery/ # Merge queue processor\n witness/ # Pit boss\n crew/ # Overseer's personal workspaces\n dave/ # Full clone, persistent\n emma/ # Full clone, persistent\n fred/ # Full clone, persistent\n```\n\n## Key Differences from Polecats\n\n- Location: crew/ instead of polecats/\n- Lifecycle: User-managed, not witness-managed\n- Auto-cleanup: Never (polecats auto-cleanup on swarm land)\n- Issue assignment: Optional (polecats require it)\n- Tmux: Optional (polecats require it)\n- Mail \u0026 Handoff: Yes for both\n- Identity: Persistent (polecats are ephemeral)\n\n## CLI Commands\n\n- gt crew add \u003cname\u003e [--rig \u003crig\u003e] - Create crew workspace\n- gt crew list [--rig \u003crig\u003e] - List crew workspaces\n- gt crew at \u003crig\u003e/\u003cname\u003e - Attach to workspace (start session)\n- gt crew attach \u003cname\u003e - Attach (infer rig from cwd)\n- gt crew refresh \u003cname\u003e - Handoff + restart (context cycling)\n- gt crew remove \u003cname\u003e [--force] - Remove workspace\n- gt crew status [\u003cname\u003e] - Show workspace status\n\n## Design Notes\n\n- Crew workers use full git clones (not worktrees)\n- Optional beads integration via BEADS_DIR\n- Mail-to-self handoff works for context cycling\n- No witness monitoring or nudging\n- No automatic issue assignment required\n\n## Background\n\nUsers often maintain separate repo clones for serial agent work. This is tedious to set up manually. Crew workspaces bring these into Gas Town's infrastructure while keeping user control.","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-16T16:47:37.529887-08:00","updated_at":"2025-12-16T20:59:46.13518-08:00","closed_at":"2025-12-16T20:59:46.13518-08:00"} @@ -289,7 +289,7 @@ {"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":"open","priority":2,"issue_type":"task","created_at":"2025-12-17T13:52:02.32832-08:00","updated_at":"2025-12-17T13:52:02.32832-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-hcc0","title":"gt polecat remove --all: bulk polecat teardown","description":"Currently gt polecat remove only accepts one polecat at a time. Need bulk operations:\n\n## Requested\n- `gt polecat remove gastown --all` - remove all polecats from a rig\n- `gt polecat remove gastown/A gastown/B ...` - remove multiple by name\n\n## Context\nAfter a swarm completes, tearing down 20 polecats one at a time is tedious.\nEphemeral workers should be easy to create and destroy in bulk.\n\n## Related\n- gt-c92: CLI: all command for batch polecat operations","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-19T14:06:43.892225-08:00","updated_at":"2025-12-20T13:16:06.901839-08:00","closed_at":"2025-12-20T13:16:06.901839-08:00"} {"id":"gt-hgk","title":"Mail system: message types and threading","description":"GGT mail system needs message types and threading like PGT.\n\n## 1. Message Types\nAdd to internal/mail/types.go:\n```go\ntype MessageType string\nconst (\n TypeTask MessageType = \"task\" // Required processing\n TypeScavenge MessageType = \"scavenge\" // Optional first-come work\n TypeNotification MessageType = \"notification\" // Informational\n TypeReply MessageType = \"reply\" // Response to message\n)\n\n// Update Message struct\ntype Message struct {\n // existing fields...\n Type MessageType `json:\"type\"`\n ThreadID string `json:\"thread_id,omitempty\"`\n ReplyTo string `json:\"reply_to,omitempty\"`\n}\n```\n\n## 2. Priority Levels\nExpand from 2 to 4:\n```go\ntype Priority string\nconst (\n PriorityLow Priority = \"low\"\n PriorityNormal Priority = \"normal\"\n PriorityHigh Priority = \"high\"\n PriorityUrgent Priority = \"urgent\"\n)\n```\n\n## 3. CLI Updates\ninternal/cmd/mail.go:\n- Add --type flag to send: `gt mail send ... --type task`\n- Add --reply-to flag: `gt mail send ... --reply-to \u003cmsg-id\u003e`\n- Add thread command: `gt mail thread \u003cthread-id\u003e`\n\n## 4. Threading Logic\nNewMessage() should auto-generate thread_id if not a reply.\nReply messages inherit thread_id from original.\n\n## Files to Modify\n- internal/mail/types.go: Add types, expand Priority\n- internal/mail/mailbox.go: Thread filtering\n- internal/cmd/mail.go: CLI flags and thread command\n\n## PGT Reference\ngastown-py/src/gastown/mail/message.py\n\n## Acceptance Criteria\n- [ ] Messages have type field (default: notification)\n- [ ] 4 priority levels supported\n- [ ] Reply creates thread with shared thread_id\n- [ ] gt mail thread \u003cid\u003e shows conversation","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-16T14:46:55.29463-08:00","updated_at":"2025-12-18T20:14:28.308997-08:00","closed_at":"2025-12-18T20:14:28.308997-08:00"} -{"id":"gt-hoyd","title":"Merge: gt-rana.1","description":"branch: polecat/rictus\ntarget: main\nsource_issue: gt-rana.1\nrig: gastown","status":"open","priority":1,"issue_type":"merge-request","created_at":"2025-12-21T15:51:03.089517-08:00","updated_at":"2025-12-21T15:51:03.089517-08:00"} +{"id":"gt-hoyd","title":"Merge: gt-rana.1","description":"branch: polecat/rictus\ntarget: main\nsource_issue: gt-rana.1\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-21T15:51:03.089517-08:00","updated_at":"2025-12-21T15:54:12.41736-08:00","closed_at":"2025-12-21T15:54:12.41736-08:00","close_reason":"Merged to main by refinery"} {"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-hw6","title":"GGT Command Parity: Complete gt command coverage","description":"Complete gt command set to match/exceed PGT town commands.\n\nCovers: uninstall, rig info, refinery attach, witness, session mgmt, mail UX, daemon.","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-17T22:22:21.720078-08:00","updated_at":"2025-12-19T12:05:36.723692-08:00","closed_at":"2025-12-19T12:05:36.723692-08:00"} {"id":"gt-hzr","title":"gt witness: Witness management commands","description":"Add 'gt witness' command group for witness lifecycle management.\n\nSubcommands:\n- gt witness start [rig] - Start witness for a rig\n- gt witness stop [rig] - Stop witness\n- gt witness status [rig] - Show witness status\n- gt witness attach [rig] - Attach to witness session\n\nWitness monitors polecats and handles:\n- Idle detection and cleanup\n- Session health checks\n- Nudging stuck agents","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-17T21:47:32.210917-08:00","updated_at":"2025-12-19T12:05:27.343254-08:00","closed_at":"2025-12-19T12:05:27.343254-08:00","dependencies":[{"issue_id":"gt-hzr","depends_on_id":"gt-hw6","type":"blocks","created_at":"2025-12-17T22:23:42.955006-08:00","created_by":"daemon"}]} @@ -472,6 +472,7 @@ {"id":"gt-xkbm","title":"Merge: gt-g44u.1","description":"branch: polecat/Ace\ntarget: main\nsource_issue: gt-g44u.1\nrig: gastown","status":"closed","issue_type":"merge-request","created_at":"2025-12-19T16:04:14.367493-08:00","updated_at":"2025-12-19T17:35:38.210747-08:00","closed_at":"2025-12-19T17:35:38.210747-08:00"} {"id":"gt-xpq","title":"Add gt crew rename command","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-18T19:45:32.599846-08:00","updated_at":"2025-12-18T19:46:17.780981-08:00","closed_at":"2025-12-18T19:46:17.780981-08:00"} {"id":"gt-xqdk","title":"Add molecule to update local go binary on push to main","description":"When pushing to main branch, automatically rebuild and install the gt binary on the local machine so changes are immediately available.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-19T15:37:40.542228-08:00","updated_at":"2025-12-19T15:37:40.542228-08:00"} +{"id":"gt-xxtl","title":"Implement bd mol bond --ephemeral flag","description":"Add --ephemeral flag to bd mol bond command to support ephemeral molecule bonding.\n\n## Context\nPhase 1.2 of Wisp Molecule Integration (gt-3x0z.2) discovered that this flag doesn't exist.\n\n## Requirements\n\n1. Add --ephemeral flag to mol bond command\n2. When --ephemeral is set:\n - Mark spawned issues with wisp=true\n - Optionally write to separate .beads-ephemeral/ storage (Phase 2)\n\n## Architecture Reference\nSee gastown architecture.md lines 487-491 for the full ephemeral storage design.\n\n## Related\n- gt-3x0z.2: Configure bd for ephemeral molecule bonding (closed - blocked on this)","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-21T16:00:04.924875-08:00","updated_at":"2025-12-21T16:00:04.924875-08:00"} {"id":"gt-y0t","title":"session stop: --force flag is defined but not used","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-16T13:55:12.848848-08:00","updated_at":"2025-12-16T13:56:39.09003-08:00","closed_at":"2025-12-16T13:56:39.09003-08:00"} {"id":"gt-y2p6","title":"Merge: gt-3x1.5","description":"branch: polecat/Immortan\ntarget: main\nsource_issue: gt-3x1.5\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-19T14:53:53.544887-08:00","updated_at":"2025-12-19T18:26:14.106598-08:00","closed_at":"2025-12-19T17:49:09.215705-08:00"} {"id":"gt-y5o","title":"Daemon: verify requesting_cycle before kill","description":"Per gt-gby spec, daemon should verify agent state shows requesting_cycle=true before killing session. Currently kills on any lifecycle request without verification.\n\nRequires state.json in agent workspace with requesting_cycle field.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-18T13:38:13.049988-08:00","updated_at":"2025-12-19T17:22:52.55078-08:00","closed_at":"2025-12-19T16:28:41.779271-08:00","dependencies":[{"issue_id":"gt-y5o","depends_on_id":"gt-99m","type":"blocks","created_at":"2025-12-18T13:38:26.590883-08:00","created_by":"daemon"}]}