diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index b1e76f79..3980bec1 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -900,10 +900,10 @@ {"id":"gt-qvn7.3.1","title":"gt spawn pins mol-polecat-work","description":"Enhance gt spawn to automatically pin mol-polecat-work to new polecats.\n\n## Current Behavior\n\ngt spawn --issue gt-xxx creates polecat with issue in mail but no molecule.\n\n## New Behavior\n\ngt spawn should:\n1. Create fresh worktree (existing)\n2. Initialize polecat beads (existing)\n3. Bond mol-polecat-work with issue as variable\n4. Pin the molecule to polecat hook\n5. Create polecat session\n\n## Molecule Bonding\n\n```bash\nbd mol bond mol-polecat-work --var issue_id=gt-xxx --var rig=gastown\n```\n\nCreates .beads/molecules/mol-polecat-work-\u003chash\u003e.state.yaml\n\n## Hook Pinning\n\n```bash\nbd pin mol-polecat-work-\u003chash\u003e --for polecat/\u003cname\u003e\n```\n\nCreates .beads-wisp/hook-polecat-\u003cname\u003e.wisp.yaml pointing to molecule\n\n## Files\n\n- internal/spawn/spawn.go - Add mol-polecat-work bonding\n- Or: internal/cmd/spawn.go depending on structure","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-24T15:37:51.450108-08:00","updated_at":"2025-12-24T22:49:19.530004-08:00","closed_at":"2025-12-24T22:49:19.530004-08:00","close_reason":"gt spawn now auto-uses mol-polecat-work for issue-based spawns","dependencies":[{"issue_id":"gt-qvn7.3.1","depends_on_id":"gt-qvn7.3","type":"parent-child","created_at":"2025-12-24T15:37:51.452167-08:00","created_by":"daemon"}]} {"id":"gt-qvn7.3.2","title":"Polecat CLAUDE.md update for hook execution","description":"Update polecat role CLAUDE.md to include hook execution instructions.\n\n## Key Additions\n\n### Startup Protocol\n\n```markdown\n## Startup Protocol\n\nWhen you wake up:\n\n1. **Check your hook first**\n Run: gt prime\n This shows your assigned work.\n\n2. **If hook has molecule**\n You are running a workflow. Execute the current step.\n When done: bd mol advance \u003cmol-id\u003e\n\n3. **If hook has slung bead**\n Work on that specific issue.\n Claim it: bd update \u003cid\u003e --status=in_progress\n\n4. **If hook empty**\n Wait for assignment via mail or spawn.\n```\n\n### Work Completion\n\n```markdown\n## Completing Work\n\nWhen you finish your assigned issue:\n\n1. Commit changes: git add \u0026\u0026 git commit -m \"description (issue-id)\"\n2. Push branch: git push -u origin \u003cbranch\u003e\n3. Create MR bead: bd create \"Merge: \u003cissue-id\u003e\" --type=merge-request\n4. Close issue: bd close \u003cissue-id\u003e --reason \"Fixed in commit abc123\"\n5. Sync: bd sync\n6. Signal done: gt mail send witness/ -s \"LIFECYCLE: Done\" -m \"Completed \u003cissue-id\u003e\"\n```\n\n### Exit States\n\n```markdown\n## Exit States\n\nWhen finishing, signal your state:\n\n- COMPLETED: Work done successfully\n- BLOCKED: Cannot proceed, need help\n- ESCALATE: Problem beyond your scope\n- HANDOFF: Passing to successor\n```\n\n## File\n\ntemplates/polecat/CLAUDE.md","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-24T15:38:08.153576-08:00","updated_at":"2025-12-24T22:49:21.404245-08:00","closed_at":"2025-12-24T22:49:21.404245-08:00","close_reason":"Polecat template already has hook execution protocol (lines 83-118 in polecat.md.tmpl)","dependencies":[{"issue_id":"gt-qvn7.3.2","depends_on_id":"gt-qvn7.3","type":"parent-child","created_at":"2025-12-24T15:38:08.155584-08:00","created_by":"daemon"}]} {"id":"gt-qvn7.3.3","title":"mol-polecat-work minimal formula","description":"Create minimal mol-polecat-work formula for tracer bullet.\n\n## Simplified Steps\n\nFor v0.1, just the essentials:\n\n```yaml\nformula: mol-polecat-work-v01\ndescription: Minimal polecat work cycle for tracer bullet.\nversion: 1\n\nvariables:\n - name: issue_id\n required: true\n - name: rig\n required: true\n\nsteps:\n - id: claim\n title: Claim the issue\n description: |\n Run: bd update {{issue_id}} --status=in_progress\n Read the issue: bd show {{issue_id}}\n Understand what needs to be done.\n\n - id: work\n title: Implement the fix\n needs: [claim]\n description: |\n Do the work described in the issue.\n Make your changes.\n Test them.\n Commit with issue ID: git commit -m \"description ({{issue_id}})\"\n\n - id: submit\n title: Submit for review\n needs: [work]\n description: |\n Push your branch: git push -u origin \u003cbranch\u003e\n Create MR: bd create \"Merge: {{issue_id}}\" --type=merge-request\n Close issue: bd close {{issue_id}}\n Sync: bd sync\n Signal done: gt mail send witness/ -s \"LIFECYCLE: Done\"\n```\n\n## Location\n\n.beads/formulas/mol-polecat-work-v01.formula.yaml\n\n## Notes\n\n- Keep it simple for tracer bullet\n- Full mol-polecat-work can be more elaborate\n- This proves the pattern works","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-24T15:38:20.520847-08:00","updated_at":"2025-12-24T22:49:22.501581-08:00","closed_at":"2025-12-24T22:49:22.501581-08:00","close_reason":"mol-polecat-work already exists as gt-lwuu proto with 4 steps","dependencies":[{"issue_id":"gt-qvn7.3.3","depends_on_id":"gt-qvn7.3","type":"parent-child","created_at":"2025-12-24T15:38:20.52293-08:00","created_by":"daemon"}]} -{"id":"gt-qvn7.4","title":"Phase 4: Deacon Patrol Loop","description":"$(cat /tmp/phase4.md)","status":"open","priority":0,"issue_type":"epic","created_at":"2025-12-24T15:35:32.511322-08:00","updated_at":"2025-12-24T15:35:32.511322-08:00","dependencies":[{"issue_id":"gt-qvn7.4","depends_on_id":"gt-qvn7","type":"parent-child","created_at":"2025-12-24T15:35:32.513848-08:00","created_by":"daemon"},{"issue_id":"gt-qvn7.4","depends_on_id":"gt-qvn7.2","type":"blocks","created_at":"2025-12-24T15:36:00.565162-08:00","created_by":"daemon"}]} -{"id":"gt-qvn7.4.1","title":"Deacon CLAUDE.md for patrol execution","description":"Update Deacon role CLAUDE.md for patrol execution.\n\n## Key Additions\n\n### Role Definition\n\n```markdown\n## Your Role: DEACON\n\nYou are the Deacon - Gas Towns heartbeat process.\nYou run mol-deacon-patrol continuously.\n\nYour job:\n- Check mail for callbacks\n- Spawn polecats for ready work\n- Monitor rig health (basic)\n- Cycle context when full\n```\n\n### Patrol Execution\n\n```markdown\n## Patrol Execution\n\nYou run mol-deacon-patrol on your hook.\n\nOn each heartbeat from the daemon:\n1. Check your current step: bd hook\n2. Execute that step\n3. Advance: bd mol advance mol-deacon-patrol\n4. If COMPLETE: restart the patrol or cycle context\n\nThe daemon keeps you alive. Your job is to run the patrol.\n```\n\n### Heartbeat Response\n\n```markdown\n## Heartbeat Response\n\nWhen you see \"HEARTBEAT: ...\" from the daemon:\n- If idle: check your hook, start/resume patrol\n- If mid-step: continue working\n- If waiting: the heartbeat reminds you to check state\n\nHeartbeats are your clock tick. Use them.\n```\n\n### Context Cycling\n\n```markdown\n## Context Cycling\n\nWhen context is high (\u003e80%):\n1. Write state to molecule\n2. Run: gt handoff -s \"Deacon cycling\" -m \"Context full\"\n3. Exit cleanly\n4. Daemon respawns you\n5. You wake, prime, read hook, continue\n```\n\n## File\n\ndeacon/CLAUDE.md (in town root)","status":"open","priority":0,"issue_type":"task","created_at":"2025-12-24T15:38:35.345899-08:00","updated_at":"2025-12-24T15:38:35.345899-08:00","dependencies":[{"issue_id":"gt-qvn7.4.1","depends_on_id":"gt-qvn7.4","type":"parent-child","created_at":"2025-12-24T15:38:35.347599-08:00","created_by":"daemon"}]} -{"id":"gt-qvn7.4.2","title":"mol-deacon-patrol minimal formula","description":"Create minimal mol-deacon-patrol formula for tracer bullet.\n\n## Simplified Patrol (v0.1)\n\n```yaml\nformula: mol-deacon-patrol-v01\ndescription: Minimal Deacon patrol for tracer bullet.\nversion: 1\n\nsteps:\n - id: inbox-check\n title: Check inbox\n description: |\n Run: gt mail inbox\n Handle any messages.\n Note any spawn requests or status updates.\n\n - id: spawn-work\n title: Spawn polecat for ready work\n needs: [inbox-check]\n description: |\n Run: bd ready\n If work available and no polecat already working it:\n gt spawn --issue \u003cfirst-ready\u003e --rig gastown\n If no work: proceed to next step.\n\n - id: self-inspect\n title: Assess context and decide loop vs cycle\n needs: [spawn-work]\n description: |\n Evaluate whether to loop (reset) or cycle (handoff).\n \n ## Heuristics\n \n **Favor LOOP (bd mol reset):**\n - Context \u003c 60%\n - No errors in this cycle\n - Patrol completed normally\n \n **Favor CYCLE (gt handoff):**\n - Context \u003e 80%\n - Errors encountered\n - Been running \u003e 1 hour without cycle\n - Model suggests refresh would help\n \n **Action:**\n - If LOOP: bd mol reset mol-deacon-patrol\n - If CYCLE: gt handoff -s \"Deacon cycling\" -m \"Context: X%, cycles: N\"\n```\n\n## Loop via Reset\n\nAfter self-inspect, if staying:\n```bash\nbd mol reset mol-deacon-patrol\n```\n\nThis resets all steps to pending, current_step to inbox-check.\nDeacon immediately continues with fresh patrol cycle.\n\n## Cycle via Handoff\n\nIf context high or refresh needed:\n```bash\ngt handoff -s \"Deacon cycling\" -m \"Context high, cycling for fresh start\"\n```\n\nDaemon respawns fresh Deacon with mol-deacon-patrol on hook.\n\n## Location\n\n.beads/formulas/mol-deacon-patrol-v01.formula.yaml","status":"open","priority":0,"issue_type":"task","created_at":"2025-12-24T15:38:48.948745-08:00","updated_at":"2025-12-24T15:55:47.528043-08:00","dependencies":[{"issue_id":"gt-qvn7.4.2","depends_on_id":"gt-qvn7.4","type":"parent-child","created_at":"2025-12-24T15:38:48.950928-08:00","created_by":"daemon"}]} -{"id":"gt-qvn7.4.3","title":"Deacon initialization with patrol molecule","description":"Ensure Deacon always has mol-deacon-patrol on hook.\n\n## The Problem\n\nWhen Deacon starts fresh, it needs:\n1. mol-deacon-patrol bonded\n2. Molecule pinned to hook\n3. Ready to execute\n\n## Solution: Bootstrap in gt prime\n\nWhen gt prime runs for role=deacon:\n\n1. Check if mol-deacon-patrol exists on hook\n2. If not: bond it and pin it\n3. Then show execution prompt\n\n```go\n// In prime.go for deacon role\nif role == \"deacon\" \u0026\u0026 !hasPatrolOnHook() {\n // Bond the patrol formula\n bondDeaconPatrol()\n // Pin to hook\n pinToHook(\"deacon\", patrolMolID)\n}\n```\n\n## Alternative: Deacon Startup Hook\n\nOr handle in Deacon SessionStart hook:\n- Check hook\n- If empty: gt mol bond mol-deacon-patrol \u0026\u0026 gt mol pin\n\n## Files\n\n- cmd/gt/prime.go (if handling in prime)\n- deacon/hooks/session-start.sh (if handling in hook)","status":"open","priority":0,"issue_type":"task","created_at":"2025-12-24T15:39:00.670376-08:00","updated_at":"2025-12-24T15:39:00.670376-08:00","dependencies":[{"issue_id":"gt-qvn7.4.3","depends_on_id":"gt-qvn7.4","type":"parent-child","created_at":"2025-12-24T15:39:00.672391-08:00","created_by":"daemon"}]} +{"id":"gt-qvn7.4","title":"Phase 4: Deacon Patrol Loop","description":"$(cat /tmp/phase4.md)","status":"closed","priority":0,"issue_type":"epic","created_at":"2025-12-24T15:35:32.511322-08:00","updated_at":"2025-12-24T22:53:04.886652-08:00","closed_at":"2025-12-24T22:53:04.886652-08:00","close_reason":"Deacon template and mol-deacon-patrol already exist with full implementation","dependencies":[{"issue_id":"gt-qvn7.4","depends_on_id":"gt-qvn7","type":"parent-child","created_at":"2025-12-24T15:35:32.513848-08:00","created_by":"daemon"},{"issue_id":"gt-qvn7.4","depends_on_id":"gt-qvn7.2","type":"blocks","created_at":"2025-12-24T15:36:00.565162-08:00","created_by":"daemon"}]} +{"id":"gt-qvn7.4.1","title":"Deacon CLAUDE.md for patrol execution","description":"Update Deacon role CLAUDE.md for patrol execution.\n\n## Key Additions\n\n### Role Definition\n\n```markdown\n## Your Role: DEACON\n\nYou are the Deacon - Gas Towns heartbeat process.\nYou run mol-deacon-patrol continuously.\n\nYour job:\n- Check mail for callbacks\n- Spawn polecats for ready work\n- Monitor rig health (basic)\n- Cycle context when full\n```\n\n### Patrol Execution\n\n```markdown\n## Patrol Execution\n\nYou run mol-deacon-patrol on your hook.\n\nOn each heartbeat from the daemon:\n1. Check your current step: bd hook\n2. Execute that step\n3. Advance: bd mol advance mol-deacon-patrol\n4. If COMPLETE: restart the patrol or cycle context\n\nThe daemon keeps you alive. Your job is to run the patrol.\n```\n\n### Heartbeat Response\n\n```markdown\n## Heartbeat Response\n\nWhen you see \"HEARTBEAT: ...\" from the daemon:\n- If idle: check your hook, start/resume patrol\n- If mid-step: continue working\n- If waiting: the heartbeat reminds you to check state\n\nHeartbeats are your clock tick. Use them.\n```\n\n### Context Cycling\n\n```markdown\n## Context Cycling\n\nWhen context is high (\u003e80%):\n1. Write state to molecule\n2. Run: gt handoff -s \"Deacon cycling\" -m \"Context full\"\n3. Exit cleanly\n4. Daemon respawns you\n5. You wake, prime, read hook, continue\n```\n\n## File\n\ndeacon/CLAUDE.md (in town root)","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-24T15:38:35.345899-08:00","updated_at":"2025-12-24T22:53:04.834087-08:00","closed_at":"2025-12-24T22:53:04.834087-08:00","close_reason":"Deacon template and mol-deacon-patrol already exist with full implementation","dependencies":[{"issue_id":"gt-qvn7.4.1","depends_on_id":"gt-qvn7.4","type":"parent-child","created_at":"2025-12-24T15:38:35.347599-08:00","created_by":"daemon"}]} +{"id":"gt-qvn7.4.2","title":"mol-deacon-patrol minimal formula","description":"Create minimal mol-deacon-patrol formula for tracer bullet.\n\n## Simplified Patrol (v0.1)\n\n```yaml\nformula: mol-deacon-patrol-v01\ndescription: Minimal Deacon patrol for tracer bullet.\nversion: 1\n\nsteps:\n - id: inbox-check\n title: Check inbox\n description: |\n Run: gt mail inbox\n Handle any messages.\n Note any spawn requests or status updates.\n\n - id: spawn-work\n title: Spawn polecat for ready work\n needs: [inbox-check]\n description: |\n Run: bd ready\n If work available and no polecat already working it:\n gt spawn --issue \u003cfirst-ready\u003e --rig gastown\n If no work: proceed to next step.\n\n - id: self-inspect\n title: Assess context and decide loop vs cycle\n needs: [spawn-work]\n description: |\n Evaluate whether to loop (reset) or cycle (handoff).\n \n ## Heuristics\n \n **Favor LOOP (bd mol reset):**\n - Context \u003c 60%\n - No errors in this cycle\n - Patrol completed normally\n \n **Favor CYCLE (gt handoff):**\n - Context \u003e 80%\n - Errors encountered\n - Been running \u003e 1 hour without cycle\n - Model suggests refresh would help\n \n **Action:**\n - If LOOP: bd mol reset mol-deacon-patrol\n - If CYCLE: gt handoff -s \"Deacon cycling\" -m \"Context: X%, cycles: N\"\n```\n\n## Loop via Reset\n\nAfter self-inspect, if staying:\n```bash\nbd mol reset mol-deacon-patrol\n```\n\nThis resets all steps to pending, current_step to inbox-check.\nDeacon immediately continues with fresh patrol cycle.\n\n## Cycle via Handoff\n\nIf context high or refresh needed:\n```bash\ngt handoff -s \"Deacon cycling\" -m \"Context high, cycling for fresh start\"\n```\n\nDaemon respawns fresh Deacon with mol-deacon-patrol on hook.\n\n## Location\n\n.beads/formulas/mol-deacon-patrol-v01.formula.yaml","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-24T15:38:48.948745-08:00","updated_at":"2025-12-24T22:53:04.851762-08:00","closed_at":"2025-12-24T22:53:04.851762-08:00","close_reason":"Deacon template and mol-deacon-patrol already exist with full implementation","dependencies":[{"issue_id":"gt-qvn7.4.2","depends_on_id":"gt-qvn7.4","type":"parent-child","created_at":"2025-12-24T15:38:48.950928-08:00","created_by":"daemon"}]} +{"id":"gt-qvn7.4.3","title":"Deacon initialization with patrol molecule","description":"Ensure Deacon always has mol-deacon-patrol on hook.\n\n## The Problem\n\nWhen Deacon starts fresh, it needs:\n1. mol-deacon-patrol bonded\n2. Molecule pinned to hook\n3. Ready to execute\n\n## Solution: Bootstrap in gt prime\n\nWhen gt prime runs for role=deacon:\n\n1. Check if mol-deacon-patrol exists on hook\n2. If not: bond it and pin it\n3. Then show execution prompt\n\n```go\n// In prime.go for deacon role\nif role == \"deacon\" \u0026\u0026 !hasPatrolOnHook() {\n // Bond the patrol formula\n bondDeaconPatrol()\n // Pin to hook\n pinToHook(\"deacon\", patrolMolID)\n}\n```\n\n## Alternative: Deacon Startup Hook\n\nOr handle in Deacon SessionStart hook:\n- Check hook\n- If empty: gt mol bond mol-deacon-patrol \u0026\u0026 gt mol pin\n\n## Files\n\n- cmd/gt/prime.go (if handling in prime)\n- deacon/hooks/session-start.sh (if handling in hook)","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-24T15:39:00.670376-08:00","updated_at":"2025-12-24T22:53:04.869378-08:00","closed_at":"2025-12-24T22:53:04.869378-08:00","close_reason":"Deacon template and mol-deacon-patrol already exist with full implementation","dependencies":[{"issue_id":"gt-qvn7.4.3","depends_on_id":"gt-qvn7.4","type":"parent-child","created_at":"2025-12-24T15:39:00.672391-08:00","created_by":"daemon"}]} {"id":"gt-qvn7.5","title":"Phase 5: Integration and Demo","description":"$(cat /tmp/phase5.md)","status":"deferred","priority":0,"issue_type":"epic","created_at":"2025-12-24T15:35:52.803427-08:00","updated_at":"2025-12-24T17:32:51.412133-08:00","dependencies":[{"issue_id":"gt-qvn7.5","depends_on_id":"gt-qvn7","type":"parent-child","created_at":"2025-12-24T15:35:52.805435-08:00","created_by":"daemon"},{"issue_id":"gt-qvn7.5","depends_on_id":"gt-qvn7.3","type":"blocks","created_at":"2025-12-24T15:36:00.648003-08:00","created_by":"daemon"},{"issue_id":"gt-qvn7.5","depends_on_id":"gt-qvn7.4","type":"blocks","created_at":"2025-12-24T15:36:00.730985-08:00","created_by":"daemon"}]} {"id":"gt-qvn7.5.1","title":"End-to-end integration test","description":"Create and run end-to-end integration test.\n\n## Test Scenario\n\n1. Clean state: no polecats, fresh beads\n2. Create test issue: simple documentation fix\n3. Verify Deacon sees it: bd ready shows issue\n4. Trigger Deacon: send heartbeat or wait\n5. Verify spawn: gt polecats shows new polecat\n6. Watch polecat work: tmux attach\n7. Verify completion: issue closed, MR created\n\n## Test Script\n\n```bash\n#!/bin/bash\n# e2e-test.sh\n\n# 1. Clean state\ngt polecat remove --all\nbd create \"Test: update README typo\" --type=task --priority=1\n\n# 2. Verify ready\nbd ready | grep \"update README\"\n\n# 3. Wait for Deacon or trigger\n# (manual for v0.1)\n\n# 4. Watch\ngt status\ngt polecats gastown\n\n# 5. Wait for completion\n# (manual observation for v0.1)\n\n# 6. Verify\nbd list --status=closed | grep \"update README\"\n```\n\n## Success Criteria\n\n- Issue created and visible in bd ready\n- Polecat spawned and working\n- Issue closed with commit reference\n- No manual intervention (except observation)","status":"open","priority":0,"issue_type":"task","created_at":"2025-12-24T15:39:20.642596-08:00","updated_at":"2025-12-24T15:39:20.642596-08:00","dependencies":[{"issue_id":"gt-qvn7.5.1","depends_on_id":"gt-qvn7.5","type":"parent-child","created_at":"2025-12-24T15:39:20.64439-08:00","created_by":"daemon"}]} {"id":"gt-qvn7.5.2","title":"Documentation humility pass","description":"Update documentation with humble framing.\n\n## Changes Needed\n\n### README.md\n\n- Add \"Experimental\" or \"Alpha\" badge\n- Clarify current state vs future vision\n- List what works vs what is planned\n- Include honest limitations section\n\n### Architecture docs\n\n- Mark autonomous features as \"planned\"\n- Distinguish implemented from designed\n- Add \"Current Status\" sections\n\n### CLAUDE.md files\n\n- Remove claims about autonomous operation (where not true)\n- Add \"v0.1\" qualifiers to features\n- Be honest about manual steps required\n\n## Tone\n\nNOT: \"Gas Town automatically manages agent lifecycles\"\nYES: \"Gas Town provides infrastructure for agent lifecycle management.\n v0.1 requires some manual coordination.\"\n\nNOT: \"The Refinery processes merges autonomously\"\nYES: \"The Refinery is designed for autonomous merge processing.\n v0.1 demonstrates the pattern with manual triggering.\"\n\n## Files to Review\n\n- README.md\n- docs/architecture.md\n- docs/quickstart.md (if exists)\n- CLAUDE.md files for all roles","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-24T15:39:32.215796-08:00","updated_at":"2025-12-24T17:57:11.106392-08:00","closed_at":"2025-12-24T17:57:11.106392-08:00","close_reason":"Completed humility pass on docs"}