bd sync: 2026-01-05 19:46:30

This commit is contained in:
mayor
2026-01-05 19:46:30 -08:00
committed by Steve Yegge
parent e1a908e049
commit a2506954b9

View File

@@ -47,6 +47,7 @@
{"id":"bd-20j","title":"sync branch not match config","description":"./bd sync\n→ Exporting pending changes to JSONL...\n→ No changes to commit\n→ Pulling from sync branch 'gh-386'...\nError pulling from sync branch: failed to create worktree: failed to create worktree parent directory: mkdir /var/home/matt/dev/beads/worktree-db-fail/.git: not a directory\nmatt@blufin-framation ~/d/b/worktree-db-fail (worktree-db-fail) [1]\u003e bd config list\n\nConfiguration:\n auto_compact_enabled = false\n compact_batch_size = 50\n compact_model = claude-3-5-haiku-20241022\n compact_parallel_workers = 5\n compact_tier1_days = 30\n compact_tier1_dep_levels = 2\n compact_tier2_commits = 100\n compact_tier2_days = 90\n compact_tier2_dep_levels = 5\n compaction_enabled = false\n issue_prefix = worktree-db-fail\n sync.branch = worktree-db-fail","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T06:49:04.449094018-07:00","updated_at":"2025-12-29T14:03:14.980166-08:00","closed_at":"2025-12-29T14:03:14.980166-08:00","close_reason":"Config mismatch: added warning to bd config list when config.yaml overrides database settings. Worktree issue was already fixed by GH#639."}
{"id":"bd-23z9","title":"Upgrade beads-mcp to 0.33.2","description":"Upgrade the MCP server via pip:\n\n```bash\npip install --upgrade beads-mcp\npip show beads-mcp | grep Version # Verify 0.33.2\n```\n\nNote: Restart Claude Code or MCP session to use new version.","status":"tombstone","priority":1,"issue_type":"task","created_at":"2025-12-21T16:10:13.761057-08:00","updated_at":"2025-12-21T17:29:31.791368-08:00","deleted_at":"2025-12-21T17:29:31.791368-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-28db","title":"Add 'bd status' command for issue database overview","description":"Implement a bd status command that provides a quick snapshot of the issue database state, similar to how git status shows working tree state.\n\nExpected output: Show summary including counts by state (open, in-progress, blocked, closed), recent activity (last 7 days), and quick overview without needing multiple queries.\n\nExample output showing issue counts, recent activity stats, and pointer to bd list for details.\n\nProposed options: --all (show all issues), --assigned (show issues assigned to current user), --json (JSON format output)\n\nUse cases: Quick project health check, onboarding for new contributors, integration with shell prompts or CI/CD, daily standup reference","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-11-02T17:25:59.203549-08:00","updated_at":"2025-12-21T17:54:00.205191-08:00","closed_at":"2025-12-21T17:54:00.205191-08:00"}
{"id":"bd-28r5","title":"doctor: add deep integration check for pre-commit framework","description":"Add config parsing for .pre-commit-config.yaml to detect if bd hooks are configured. Pre-commit is popular enough to warrant full support like lefthook/husky.","status":"open","priority":3,"issue_type":"feature","created_at":"2026-01-05T19:19:10.322442-08:00","created_by":"beads/crew/giles","updated_at":"2026-01-05T19:19:10.322442-08:00"}
{"id":"bd-28sq","title":"Fix JSON error output consistency across all commands","description":"## Problem\n\nWhen `--json` flag is specified, error output should return JSON format, not plain text. Currently only `bd show` uses `FatalErrorRespectJSON` - all other commands use direct `fmt.Fprintf(os.Stderr, ...)`.\n\n## Audit Findings (bd-au0.7)\n\n| File | stderr writes | Commands affected |\n|------|---------------|-------------------|\n| show.go | 51 | update, close, edit |\n| dep.go | 41 | dep add/remove/tree/cycles |\n| label.go | 19 | label add/remove/list |\n| comments.go | ~10 | comments add/list |\n| epic.go | ~5 | epic status/close-eligible |\n\n## Solution\n\nReplace `fmt.Fprintf(os.Stderr, ...) + os.Exit(1)` patterns with `FatalErrorRespectJSON()` in all commands that support `--json` flag.\n\n## Pattern\n\n```go\n// Before (inconsistent)\nfmt.Fprintf(os.Stderr, \"Error: %v\\n\", err)\nos.Exit(1)\n\n// After (respects --json)\nFatalErrorRespectJSON(\"%v\", err)\n```\n\n## Success Criteria\n\n- All commands return JSON errors when `--json` flag is set\n- Error format: `{\"error\": \"message\"}`\n- Exit code 1 preserved for errors","status":"closed","priority":2,"issue_type":"epic","created_at":"2025-12-25T13:31:52.287048-08:00","updated_at":"2025-12-25T13:55:51.017355-08:00","closed_at":"2025-12-25T13:55:51.017355-08:00","dependencies":[{"issue_id":"bd-28sq","depends_on_id":"bd-au0.7","type":"discovered-from","created_at":"2025-12-25T13:32:18.23319-08:00","created_by":"daemon"}]}
{"id":"bd-28sq.1","title":"Fix JSON errors in show.go (update/close/edit commands)","description":"Replace ~51 direct stderr writes with FatalErrorRespectJSON() in show.go.\n\nCommands affected:\n- updateCmd (~10 error handlers)\n- closeCmd (~15 error handlers) \n- editCmd (~10 error handlers)\n- showCmd (already uses FatalErrorRespectJSON in some places)\n\nKey error paths:\n- ID resolution errors (lines 565, 570, 579)\n- Validation errors (lines 474, 515, 524, 545)\n- RPC/daemon errors (line 639+)\n- Store operation errors","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T13:32:06.867368-08:00","updated_at":"2025-12-25T13:40:38.388723-08:00","closed_at":"2025-12-25T13:40:38.388723-08:00","dependencies":[{"issue_id":"bd-28sq.1","depends_on_id":"bd-28sq","type":"parent-child","created_at":"2025-12-25T13:32:06.867875-08:00","created_by":"daemon"}]}
{"id":"bd-28sq.2","title":"Fix JSON errors in dep.go (dependency commands)","description":"Replace ~41 direct stderr writes with FatalErrorRespectJSON() in dep.go.\n\nCommands affected:\n- depAddCmd\n- depRemoveCmd\n- depTreeCmd\n- depCyclesCmd\n\nKey error paths:\n- ID resolution errors\n- Cycle detection errors\n- External reference validation","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T13:32:07.823549-08:00","updated_at":"2025-12-25T13:51:23.552241-08:00","closed_at":"2025-12-25T13:51:23.552241-08:00","dependencies":[{"issue_id":"bd-28sq.2","depends_on_id":"bd-28sq","type":"parent-child","created_at":"2025-12-25T13:32:07.826881-08:00","created_by":"daemon"}]}
@@ -93,7 +94,7 @@
{"id":"bd-3ggb","title":"Rebuild local binary","description":"Build and verify: go build -o bd ./cmd/bd \u0026\u0026 ./bd version","status":"tombstone","priority":1,"issue_type":"task","created_at":"2025-12-18T22:43:03.101428-08:00","updated_at":"2025-12-24T16:25:30.089869-08:00","dependencies":[{"issue_id":"bd-3ggb","depends_on_id":"bd-qqc","type":"parent-child","created_at":"2025-12-18T22:43:16.748289-08:00","created_by":"daemon"},{"issue_id":"bd-3ggb","depends_on_id":"bd-4y4g","type":"blocks","created_at":"2025-12-18T22:43:20.950376-08:00","created_by":"daemon"}],"deleted_at":"2025-12-24T16:25:30.089869-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-3jcw","title":"activity.go: Missing test coverage","description":"The new activity.go command (from bd-xo1o.3) has no test coverage. At minimum, tests should cover:\n- parseDurationString() for various formats (5m, 1h, 2d, invalid)\n- filterEvents() for --mol and --type filtering\n- formatEvent() and getEventDisplay() for all mutation types\n\nDiscovered during code review of bd-xo1o implementation.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T04:06:15.563579-08:00","updated_at":"2025-12-23T04:14:56.150151-08:00","closed_at":"2025-12-23T04:14:56.150151-08:00"}
{"id":"bd-3jrb","title":"bd close lacks cross-rig routing support","description":"The `bd close` command doesn't support cross-rig routing like `bd show` does.\n\n**Reproduction:**\n```\n# From gastown directory\nbd show bd-xyz # Works (routes to beads)\nbd close bd-xyz # Fails with 'no issue found matching'\n```\n\n**Root cause:**\n- `show.go` uses `needsRouting()` and `resolveAndGetIssueWithRouting()`\n- `close.go` only uses `utils.ResolvePartialIDs()` without routing\n\n**Other affected commands (likely):**\n- reopen\n- dep \n- comments\n- label\n- duplicate\n- defer/undefer\n\n**Fix:**\nAdd routing support to `close.go` similar to `show.go` lines 44-147.","status":"closed","priority":2,"issue_type":"bug","created_at":"2026-01-01T11:20:41.195141-08:00","created_by":"gastown/crew/gus","updated_at":"2026-01-01T11:24:25.322979-08:00","closed_at":"2026-01-01T11:24:25.322979-08:00","close_reason":"test"}
{"id":"bd-3mky","title":"Merge: amber-mk0evltm","description":"branch: polecat/amber-mk0evltm\ntarget: main\nsource_issue: amber-mk0evltm\nrig: beads\nagent_bead: bd-beads-polecat-amber\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"open","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T16:21:45.827782-08:00","created_by":"beads/polecats/amber","updated_at":"2026-01-04T16:21:45.827782-08:00"}
{"id":"bd-3mky","title":"Merge: amber-mk0evltm","description":"branch: polecat/amber-mk0evltm\ntarget: main\nsource_issue: amber-mk0evltm\nrig: beads\nagent_bead: bd-beads-polecat-amber\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T16:21:45.827782-08:00","created_by":"beads/polecats/amber","updated_at":"2026-01-05T19:45:43.98093-08:00","closed_at":"2026-01-05T19:45:43.98093-08:00","close_reason":"Branch deleted, already merged"}
{"id":"bd-3p4u","title":"Add --filter-parent as alias for --parent in bd list","description":"User tried `bd list --filter-parent bd-mol-wba` and got 'unknown flag'. The --parent flag exists but --filter-parent would be more consistent with other filter flags like --filter-assignee patterns. Should add --filter-parent as an alias.","status":"closed","priority":3,"issue_type":"bug","created_at":"2026-01-04T23:10:38.589988-08:00","created_by":"beads/crew/dave","updated_at":"2026-01-04T23:50:47.314353-08:00","closed_at":"2026-01-04T23:50:47.314353-08:00","close_reason":"Added --filter-parent as alias for --parent in bd list"}
{"id":"bd-3rko","title":"Merge: topaz-1767142022153","description":"branch: polecat/topaz-1767142022153\ntarget: main\nsource_issue: topaz-1767142022153\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-30T17:06:22.77742-08:00","created_by":"beads/polecats/topaz","updated_at":"2025-12-30T18:12:30.969291-08:00","closed_at":"2025-12-30T18:11:07.793047-08:00"}
{"id":"bd-3roq","title":"Add 'tracks' relation type for convoy tracking","description":"Add a new relation type 'tracks' for convoy → issue relationships.\n\nUnlike 'depends_on':\n- Non-blocking (tracked issue doesn't block convoy)\n- Cross-prefix capable (convoy in hq-* tracks issues in gt-*, bd-*)\n- Supports reverse lookup ('what convoys track this issue?')\n\nUsed by convoys to track issues across project chains without creating dependencies.\n\nRelated: hq-7h8jx (Convoy System epic in town beads)","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-29T18:47:00.581639-08:00","created_by":"mayor","updated_at":"2025-12-29T21:04:52.609662-08:00","closed_at":"2025-12-29T21:04:52.609662-08:00","close_reason":"Closed"}
@@ -277,6 +278,7 @@
{"id":"bd-anv2","title":"Implement bd mol stale command","description":"Add command to detect complete-but-unclosed molecules.\n\n**Definition of stale:**\nA molecule is stale if:\n1. All children are closed (Completed \u003e= Total)\n2. Root issue is still open\n3. Not assigned to anyone\n4. Not pinned to any hook\n5. AND it's blocking other assigned work (graph pressure)\n\n**Command design:**\n```bash\nbd mol stale # List stale mols\nbd mol stale --json # Machine-readable\nbd mol stale --blocking # Only show those blocking other work\nbd mol stale --all # Include orphaned-but-not-blocking\n```\n\n**Output:**\n```\nStale molecules (complete but unclosed, blocking work):\n\n bd-xyz \"Version bump v0.36.0\" (blocking: bd-abc, bd-def)\n → Close with: bd close bd-xyz\n → Or squash: bd mol squash bd-xyz\n\nOrphaned molecules (complete but unclosed, not blocking):\n bd-uvw \"Old patrol cycle\"\n → Consider: bd mol burn bd-uvw\n```\n\n**Implementation:**\n1. Query all open issues with children (potential mols)\n2. Compute progress for each (Completed vs Total)\n3. Filter to complete ones\n4. Check assigned_to field\n5. Check pinned status (may need gt integration)\n6. Check if blocking other assigned work\n\nDoes NOT use time-based staleness. Graph pressure only.","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-24T18:23:24.27032-08:00","updated_at":"2025-12-25T12:31:14.315214-08:00","closed_at":"2025-12-25T12:31:14.315214-08:00"}
{"id":"bd-ao0s","title":"bd graph crashes with --no-daemon on closed issues","description":"The `bd graph` command panics with nil pointer dereference when using `--no-daemon` flag on an issue with closed children.\n\n**Reproduction:**\n```bash\nbd graph bd-qqc --no-daemon\n# panic: runtime error: invalid memory address or nil pointer dereference\n# in main.computeDependencyCounts\n```\n\n**Stack trace:**\n```\npanic: runtime error: invalid memory address or nil pointer dereference\n[signal SIGSEGV: segmentation violation code=0x2 addr=0x20 pc=0x1010bdfb0]\n\ngoroutine 1 [running]:\nmain.computeDependencyCounts(...)\n /Users/stevey/gt/beads/crew/emma/cmd/bd/graph.go:428\nmain.renderGraph(0x1400033bb80, 0x0)\n /Users/stevey/gt/beads/crew/emma/cmd/bd/graph.go:307 +0x300\n```\n\n**Location:** cmd/bd/graph.go:428 - computeDependencyCounts() not handling nil case","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-18T22:57:36.972585-08:00","updated_at":"2025-12-20T01:13:29.206821-08:00","closed_at":"2025-12-20T01:13:29.206821-08:00"}
{"id":"bd-aq3s","title":"Merge: bd-u2sc.3","description":"branch: polecat/Modular\ntarget: main\nsource_issue: bd-u2sc.3\nrig: beads","status":"closed","priority":3,"issue_type":"merge-request","created_at":"2025-12-23T13:47:14.281479-08:00","updated_at":"2025-12-23T19:12:08.354548-08:00","closed_at":"2025-12-23T19:12:08.354548-08:00"}
{"id":"bd-arjb","title":"bd sync fails from crew dirs with .beads/redirect pointing outside repo","description":"## Problem\n\n`bd sync` fails at the final git-status check when run from a crew directory that uses `.beads/redirect` to point to a shared beads directory in another repo.\n\n```\nError: checking git status after re-export: git status failed: exit status 128\n```\n\nThe underlying error is:\n```\nfatal: /path/to/mayor/rig/.beads: is outside repository at '/path/to/crew/wolf'\n```\n\n## Root Cause\n\n`gitHasBeadsChanges()` in `cmd/bd/sync_git.go:93-111` runs:\n```go\nstatusCmd := exec.CommandContext(ctx, \"git\", \"status\", \"--porcelain\", beadsDir)\n```\n\nWhen `beadsDir` resolves to a path outside the current git repo (via redirect), git fails.\n\n## Affected Scenario\n\n- Crew workers (`crew/wolf`) with `.beads/redirect` → `../../mayor/rig/.beads`\n- The redirect points to a different git clone\n- Sync actually succeeds (commit/push/pull/import all work) but fails at final validation\n\n## Workaround\n\nRun `bd sync` from the directory containing the actual `.beads/` (e.g., `mayor/rig`).\n\n## Suggested Fix\n\n`gitHasBeadsChanges()` should detect redirects and run git commands from the directory containing the actual `.beads/`, not from cwd.","status":"open","priority":2,"issue_type":"bug","created_at":"2026-01-05T19:33:33.258774-08:00","created_by":"beads/crew/wolf","updated_at":"2026-01-05T19:33:33.258774-08:00"}
{"id":"bd-au0","title":"Command Set Standardization \u0026 Flag Consistency","description":"Comprehensive improvements to bd command set based on 2025 audit findings.\n\n## Background\nSee docs/command-audit-2025.md for detailed analysis.\n\n## Goals\n1. Standardize flag naming and behavior across all commands\n2. Add missing flags for feature parity\n3. Fix naming confusion\n4. Improve consistency in JSON output\n\n## Success Criteria\n- All mutating commands support --dry-run (no --preview variants)\n- bd update supports label operations\n- bd search has filter parity with bd list\n- Priority flags accept both int and P0-P4 format everywhere\n- JSON output is consistent across all commands","status":"closed","priority":2,"issue_type":"epic","created_at":"2025-11-21T21:05:55.672749-05:00","updated_at":"2025-12-25T22:34:51.78882-08:00","closed_at":"2025-12-25T22:34:51.78882-08:00"}
{"id":"bd-au0.10","title":"Add global verbosity flags (--verbose, --quiet)","description":"Add consistent verbosity controls across all commands.\n\n**Current state:**\n- bd init has --quiet flag\n- No other commands have verbosity controls\n- Debug output controlled by BD_VERBOSE env var\n\n**Proposal:**\nAdd persistent flags:\n- --verbose / -v: Enable debug output\n- --quiet / -q: Suppress non-essential output\n\n**Implementation:**\n- Add to rootCmd.PersistentFlags()\n- Replace BD_VERBOSE checks with flag checks\n- Standardize output levels:\n * Quiet: Errors only\n * Normal: Errors + success messages\n * Verbose: Errors + success + debug info\n\n**Files to modify:**\n- cmd/bd/main.go (add flags)\n- internal/debug/debug.go (respect flags)\n- Update all commands to respect quiet mode\n\n**Testing:**\n- Verify --verbose shows debug output\n- Verify --quiet suppresses normal output\n- Ensure errors always show regardless of mode","status":"closed","priority":3,"issue_type":"task","created_at":"2025-11-21T21:08:21.600209-05:00","updated_at":"2025-12-25T22:34:40.197801-08:00","closed_at":"2025-12-25T22:34:40.197801-08:00","dependencies":[{"issue_id":"bd-au0.10","depends_on_id":"bd-au0","type":"parent-child","created_at":"2025-11-21T21:08:21.602557-05:00","created_by":"daemon"}]}
{"id":"bd-au0.5","title":"Add date and priority filters to bd search","description":"Add date and priority filters to bd search for parity with bd list.\n\n## Current State\nbd search supports: --status, --type, --assignee, --label, --limit\nbd list supports: all of the above PLUS date ranges and priority filters\n\n## Filters to Add\n\n### Priority Filters\n```bash\nbd search \"query\" --priority 1 # Exact priority\nbd search \"query\" --priority-min 0 # P0 and above (higher priority)\nbd search \"query\" --priority-max 2 # P2 and below (lower priority)\n```\n\n### Date Filters\n```bash\nbd search \"query\" --created-after 2025-01-01\nbd search \"query\" --created-before 2025-12-31\nbd search \"query\" --updated-after 2025-01-01\nbd search \"query\" --closed-after 2025-01-01\n```\n\n### Content Filters\n```bash\nbd search \"query\" --desc-contains \"bug\"\nbd search \"query\" --notes-contains \"todo\"\nbd search \"query\" --empty-description # Issues with no description\nbd search \"query\" --no-assignee # Unassigned issues\nbd search \"query\" --no-labels # Issues without labels\n```\n\n## Files to Modify\n\n### 1. cmd/bd/search.go\nAdd flag definitions in init():\n```go\nsearchCmd.Flags().IntP(\"priority\", \"p\", -1, \"Filter by exact priority (0-4)\")\nsearchCmd.Flags().Int(\"priority-min\", -1, \"Filter by minimum priority\")\nsearchCmd.Flags().Int(\"priority-max\", -1, \"Filter by maximum priority\")\nsearchCmd.Flags().String(\"created-after\", \"\", \"Filter by creation date (YYYY-MM-DD)\")\nsearchCmd.Flags().String(\"created-before\", \"\", \"Filter by creation date\")\nsearchCmd.Flags().String(\"updated-after\", \"\", \"Filter by update date\")\nsearchCmd.Flags().String(\"updated-before\", \"\", \"Filter by update date\")\nsearchCmd.Flags().String(\"closed-after\", \"\", \"Filter by close date\")\nsearchCmd.Flags().String(\"closed-before\", \"\", \"Filter by close date\")\nsearchCmd.Flags().String(\"desc-contains\", \"\", \"Filter by description content\")\nsearchCmd.Flags().String(\"notes-contains\", \"\", \"Filter by notes content\")\nsearchCmd.Flags().Bool(\"empty-description\", false, \"Filter issues with empty description\")\nsearchCmd.Flags().Bool(\"no-assignee\", false, \"Filter unassigned issues\")\nsearchCmd.Flags().Bool(\"no-labels\", false, \"Filter issues without labels\")\n```\n\n### 2. internal/rpc/protocol.go\nUpdate SearchArgs struct:\n```go\ntype SearchArgs struct {\n Query string\n Filter types.IssueFilter\n // Already has most fields via IssueFilter\n}\n```\n\nNote: types.IssueFilter already has these fields - just need to wire them up!\n\n### 3. cmd/bd/search.go Run function\nParse flags and populate filter:\n```go\nif priority, _ := cmd.Flags().GetInt(\"priority\"); priority \u003e= 0 {\n filter.Priority = \u0026priority\n}\nif createdAfter, _ := cmd.Flags().GetString(\"created-after\"); createdAfter != \"\" {\n t, err := time.Parse(\"2006-01-02\", createdAfter)\n if err != nil {\n FatalError(\"invalid date format for --created-after: %v\", err)\n }\n filter.CreatedAfter = \u0026t\n}\n// ... similar for other flags\n```\n\n## Implementation Steps\n\n1. **Check types.IssueFilter** - verify all needed fields exist\n2. **Add flags to search.go** init()\n3. **Parse flags** in Run function\n4. **Pass to SearchIssues** via filter\n5. **Test all combinations**\n\n## Testing\n```bash\n# Create test issues\nbd create \"Test P1\" -p 1\nbd create \"Test P2\" -p 2 --description \"Has description\"\n\n# Test filters\nbd search \"\" --priority 1\nbd search \"\" --priority-min 0 --priority-max 1\nbd search \"\" --empty-description\nbd search \"\" --desc-contains \"description\"\n```\n\n## Success Criteria\n- All filters work in both direct and daemon mode\n- Date parsing handles YYYY-MM-DD format\n- --json output includes filtered results\n- Help text documents all new flags","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-21T21:07:05.496726-05:00","updated_at":"2025-12-23T13:38:28.475606-08:00","closed_at":"2025-12-23T13:38:28.475606-08:00","dependencies":[{"issue_id":"bd-au0.5","depends_on_id":"bd-au0","type":"parent-child","created_at":"2025-11-21T21:07:05.497762-05:00","created_by":"daemon"},{"issue_id":"bd-au0.5","depends_on_id":"bd-iz5t","type":"parent-child","created_at":"2025-12-23T12:44:07.657303-08:00","created_by":"daemon"}]}
@@ -305,19 +307,19 @@
{"id":"bd-beads-crew-giles","title":"Crew worker giles in beads - human-managed persistent workspace.","description":"Crew worker giles in beads - human-managed persistent workspace.\n\nrole_type: crew\nrig: beads\nagent_state: idle\nhook_bead: null\nrole_bead: gt-crew-role\ncleanup_status: null\nactive_mr: null\nnotification_level: null","status":"open","priority":2,"issue_type":"agent","created_at":"2026-01-04T11:22:11.009942-08:00","created_by":"mayor","updated_at":"2026-01-05T16:31:04.53481-08:00"}
{"id":"bd-beads-crew-grip","title":"Crew worker grip in beads - human-managed persistent workspace.","description":"Crew worker grip in beads - human-managed persistent workspace.\n\nrole_type: crew\nrig: beads\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-30T23:14:04.739788-08:00","created_by":"deacon","updated_at":"2026-01-05T19:13:06.015961-08:00"}
{"id":"bd-beads-crew-wolf","title":"Crew worker wolf in beads - human-managed persistent workspace.","description":"Crew worker wolf in beads - human-managed persistent workspace.\n\nrole_type: crew\nrig: beads\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-30T23:14:04.805884-08:00","created_by":"deacon","updated_at":"2026-01-05T18:19:54.017172-08:00"}
{"id":"bd-beads-polecat-amber","title":"bd-beads-polecat-amber","description":"bd-beads-polecat-amber\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-uuo9\nrole_bead: hq-polecat-role\ncleanup_status: has_stash\nactive_mr: bd-3mky\nnotification_level: null","status":"open","priority":2,"issue_type":"agent","created_at":"2026-01-04T16:17:26.278115-08:00","created_by":"mayor","updated_at":"2026-01-04T16:21:46.90714-08:00"}
{"id":"bd-beads-polecat-garnet","title":"bd-beads-polecat-garnet","description":"bd-beads-polecat-garnet\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-hmeb\nrole_bead: hq-polecat-role\ncleanup_status: null\nactive_mr: bd-f1xm\nnotification_level: null","status":"open","priority":2,"issue_type":"agent","created_at":"2026-01-04T15:12:49.812132-08:00","created_by":"mayor","updated_at":"2026-01-04T15:17:19.353906-08:00"}
{"id":"bd-beads-polecat-amber","title":"bd-beads-polecat-amber","description":"bd-beads-polecat-amber\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-uuo9\nrole_bead: hq-polecat-role\ncleanup_status: has_stash\nactive_mr: bd-3mky\nnotification_level: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2026-01-04T16:17:26.278115-08:00","created_by":"mayor","updated_at":"2026-01-05T19:45:45.481449-08:00","closed_at":"2026-01-05T19:45:45.481449-08:00","close_reason":"Polecat cleaned up"}
{"id":"bd-beads-polecat-garnet","title":"bd-beads-polecat-garnet","description":"bd-beads-polecat-garnet\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-hmeb\nrole_bead: hq-polecat-role\ncleanup_status: null\nactive_mr: bd-f1xm\nnotification_level: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2026-01-04T15:12:49.812132-08:00","created_by":"mayor","updated_at":"2026-01-05T19:45:45.484195-08:00","closed_at":"2026-01-05T19:45:45.484195-08:00","close_reason":"Polecat cleaned up"}
{"id":"bd-beads-polecat-jasper","title":"bd-beads-polecat-jasper","description":"bd-beads-polecat-jasper\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-oos3\nrole_bead: gt-polecat-role\ncleanup_status: null\nactive_mr: bd-srhu\nnotification_level: null","status":"tombstone","priority":2,"issue_type":"agent","created_at":"2026-01-02T12:41:56.3782-08:00","created_by":"mayor","updated_at":"2026-01-04T11:27:04.41339-08:00","deleted_at":"2026-01-02T16:57:50.038825-08:00","deleted_by":"mayor","delete_reason":"delete","original_type":"agent"}
{"id":"bd-beads-polecat-newbot","title":"Agent: bd-beads-polecat-newbot","status":"tombstone","priority":0,"issue_type":"agent","created_at":"2026-01-02T12:25:10.273273-08:00","created_by":"beads/polecats/obsidian","updated_at":"2026-01-02T12:25:42.678762-08:00","labels":["rig:beads","role_type:polecat"],"deleted_at":"2026-01-02T12:25:42.678762-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"agent"}
{"id":"bd-beads-polecat-obsidian","title":"bd-beads-polecat-obsidian","description":"bd-beads-polecat-obsidian\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: null\nrole_bead: gt-polecat-role\ncleanup_status: null\nactive_mr: bd-xntk\nnotification_level: null","status":"tombstone","priority":2,"issue_type":"agent","created_at":"2026-01-01T11:10:14.972102-08:00","created_by":"mayor","updated_at":"2026-01-04T11:30:56.737474-08:00","deleted_at":"2026-01-02T16:57:50.357825-08:00","deleted_by":"mayor","delete_reason":"delete","original_type":"agent"}
{"id":"bd-beads-polecat-onyx","title":"bd-beads-polecat-onyx","description":"bd-beads-polecat-onyx\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-w3rh\nrole_bead: gt-polecat-role\ncleanup_status: null\nactive_mr: bd-xv0k\nnotification_level: null","status":"tombstone","priority":2,"issue_type":"agent","created_at":"2026-01-02T12:55:29.132464-08:00","created_by":"mayor","updated_at":"2026-01-04T11:30:16.253989-08:00","deleted_at":"2026-01-02T16:57:50.672016-08:00","deleted_by":"mayor","delete_reason":"delete","original_type":"agent"}
{"id":"bd-beads-polecat-opal","title":"bd-beads-polecat-opal","description":"bd-beads-polecat-opal\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-r24e\nrole_bead: gt-polecat-role\ncleanup_status: null\nactive_mr: bd-do8v\nnotification_level: null","status":"tombstone","priority":2,"issue_type":"agent","created_at":"2026-01-02T16:47:13.940237-08:00","created_by":"mayor","updated_at":"2026-01-04T11:23:36.170275-08:00","deleted_at":"2026-01-02T16:57:50.994035-08:00","deleted_by":"mayor","delete_reason":"delete","original_type":"agent"}
{"id":"bd-beads-polecat-quartz","title":"bd-beads-polecat-quartz","description":"bd-beads-polecat-quartz\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-kbfn\nrole_bead: gt-polecat-role\ncleanup_status: null\nactive_mr: bd-kc6v\nnotification_level: null","status":"tombstone","priority":2,"issue_type":"agent","created_at":"2026-01-02T12:41:40.403065-08:00","created_by":"mayor","updated_at":"2026-01-04T11:29:18.874891-08:00","deleted_at":"2026-01-02T16:57:51.341713-08:00","deleted_by":"mayor","delete_reason":"delete","original_type":"agent"}
{"id":"bd-beads-polecat-ruby","title":"bd-beads-polecat-ruby","description":"bd-beads-polecat-ruby\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-p7i2\nrole_bead: hq-polecat-role\ncleanup_status: has_stash\nactive_mr: bd-j7v7\nnotification_level: null","status":"open","priority":2,"issue_type":"agent","created_at":"2026-01-04T16:16:58.553407-08:00","created_by":"mayor","updated_at":"2026-01-04T16:21:32.547113-08:00"}
{"id":"bd-beads-polecat-ruby","title":"bd-beads-polecat-ruby","description":"bd-beads-polecat-ruby\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-p7i2\nrole_bead: hq-polecat-role\ncleanup_status: has_stash\nactive_mr: bd-j7v7\nnotification_level: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2026-01-04T16:16:58.553407-08:00","created_by":"mayor","updated_at":"2026-01-05T19:45:45.48301-08:00","closed_at":"2026-01-05T19:45:45.48301-08:00","close_reason":"Polecat cleaned up"}
{"id":"bd-beads-polecat-testbot","title":"Agent: bd-beads-polecat-testbot","status":"tombstone","priority":0,"issue_type":"agent","created_at":"2026-01-02T12:24:15.11753-08:00","created_by":"beads/polecats/obsidian","updated_at":"2026-01-02T12:24:57.611128-08:00","labels":["rig:beads","role_type:polecat"],"deleted_at":"2026-01-02T12:24:57.611128-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"agent"}
{"id":"bd-beads-polecat-topaz","title":"bd-beads-polecat-topaz","description":"bd-beads-polecat-topaz\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-3tqg\nrole_bead: gt-polecat-role\ncleanup_status: null\nactive_mr: bd-ngfl\nnotification_level: null","status":"open","priority":2,"issue_type":"agent","created_at":"2026-01-04T11:36:03.898913-08:00","created_by":"mayor","updated_at":"2026-01-04T11:45:09.200848-08:00"}
{"id":"bd-beads-polecat-topaz","title":"bd-beads-polecat-topaz","description":"bd-beads-polecat-topaz\n\nrole_type: polecat\nrig: beads\nagent_state: spawning\nhook_bead: bd-3tqg\nrole_bead: gt-polecat-role\ncleanup_status: null\nactive_mr: bd-ngfl\nnotification_level: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2026-01-04T11:36:03.898913-08:00","created_by":"mayor","updated_at":"2026-01-05T19:45:45.485387-08:00","closed_at":"2026-01-05T19:45:45.485387-08:00","close_reason":"Polecat cleaned up"}
{"id":"bd-beads-refinery","title":"Refinery for beads - processes merge queue.","description":"Refinery for beads - processes merge queue.\n\nrole_type: refinery\nrig: beads\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-30T23:14:04.469888-08:00","created_by":"deacon","updated_at":"2026-01-05T06:49:50.354896-08:00"}
{"id":"bd-beads-witness","title":"Witness for beads - monitors polecat health and progress.","description":"Witness for beads - monitors polecat health and progress.\n\nrole_type: witness\nrig: beads\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-30T23:14:04.401378-08:00","created_by":"deacon","updated_at":"2026-01-05T06:49:49.189021-08:00"}
{"id":"bd-beads-witness","title":"Witness for beads - monitors polecat health and progress.","description":"Witness for beads - monitors polecat health and progress.\n\nrole_type: witness\nrig: beads\nagent_state: idle\nhook_bead: null\nrole_bead: gt-witness-role\ncleanup_status: null","status":"closed","priority":2,"issue_type":"agent","created_at":"2025-12-30T23:14:04.401378-08:00","created_by":"deacon","updated_at":"2026-01-05T19:45:45.486571-08:00","closed_at":"2026-01-05T19:45:45.486571-08:00","close_reason":"Polecat cleaned up"}
{"id":"bd-bgm","title":"Fix unparam unused parameter in cmd/bd/doctor.go:1879","description":"Linting issue: checkGitHooks - path is unused (unparam) at cmd/bd/doctor.go:1879:20. Error: func checkGitHooks(path string) doctorCheck {","status":"tombstone","priority":0,"issue_type":"bug","created_at":"2025-12-07T15:35:25.270293252-07:00","updated_at":"2025-12-25T01:21:01.952723-08:00","deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"bug"}
{"id":"bd-bgr","title":"Test stdin 2","description":"Description from stdin test\n","status":"tombstone","priority":4,"issue_type":"task","created_at":"2025-12-17T17:28:05.41434-08:00","updated_at":"2025-12-25T01:21:01.952723-08:00","deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-bha9","title":"Add missing updated_at index on issues table","description":"GetStaleIssues queries filter by updated_at but there's no index on this column.\n\n**Current query (ready.go:253-254):**\n```sql\nWHERE status != 'closed'\n AND datetime(updated_at) \u003c datetime('now', '-' || ? || ' days')\n```\n\n**Problem:** Full table scan when filtering stale issues.\n\n**Solution:** Add migration to create:\n```sql\nCREATE INDEX IF NOT EXISTS idx_issues_updated_at ON issues(updated_at);\n```\n\n**Note:** The datetime() function wrapper may prevent index usage. Consider also storing updated_at as INTEGER (unix timestamp) for better index efficiency, or test if SQLite can use the index despite the function.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-22T22:58:49.166051-08:00","updated_at":"2025-12-22T23:15:13.837078-08:00","closed_at":"2025-12-22T23:15:13.837078-08:00","dependencies":[{"issue_id":"bd-bha9","depends_on_id":"bd-h0we","type":"discovered-from","created_at":"2025-12-22T22:58:49.166949-08:00","created_by":"daemon"}]}
@@ -419,7 +421,7 @@
{"id":"bd-eysh","title":"Test refile v2","description":"Testing improved refile","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-31T13:00:22.994648-08:00","created_by":"beads/crew/grip","updated_at":"2025-12-31T13:00:30.637161-08:00","closed_at":"2025-12-31T13:00:30.637161-08:00","close_reason":"Refiled to gt-w66v4"}
{"id":"bd-eyto","title":"Time-dependent tests may be flaky near TTL boundary","description":"Several tombstone merge tests use time.Now() to create test data: time.Now().Add(-24 * time.Hour), time.Now().Add(-60 * 24 * time.Hour), etc. While these work reliably in practice (24h vs 30d TTL has large margin), they could theoretically be flaky if: 1) Tests run slowly, 2) System clock changes during test, 3) TTL constants change. Recommendation: Consider using a fixed reference time or time injection for deterministic tests. Lower priority since current margin is large. Files: internal/merge/merge_test.go:1337-1338, 1352-1353, 1548-1549, 1590-1591","status":"hooked","priority":3,"issue_type":"task","created_at":"2025-12-05T16:37:02.348143-08:00","updated_at":"2025-12-30T15:44:43.36321-08:00"}
{"id":"bd-f0wm","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**Observed:**\n```\ngt swarm status bd-784c\nProgress: 9% (1/11 tasks merged)\n```\n\nBut bd list showed 4+ issues closed:\n- bd-j3dj, bd-kkka, bd-1tkd, bd-9btu all 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 (me) had to manually check bd list to know actual progress.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-28T16:17:49.27816-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T22:14:20.098792-08:00","closed_at":"2025-12-28T22:14:20.098792-08:00"}
{"id":"bd-f1xm","title":"Merge: garnet-mk0ckipo","description":"branch: polecat/garnet-mk0ckipo\ntarget: main\nsource_issue: garnet-mk0ckipo\nrig: beads\nagent_bead: bd-beads-polecat-garnet\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"open","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T15:17:19.231575-08:00","created_by":"beads/polecats/garnet","updated_at":"2026-01-04T15:17:19.231575-08:00"}
{"id":"bd-f1xm","title":"Merge: garnet-mk0ckipo","description":"branch: polecat/garnet-mk0ckipo\ntarget: main\nsource_issue: garnet-mk0ckipo\nrig: beads\nagent_bead: bd-beads-polecat-garnet\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T15:17:19.231575-08:00","created_by":"beads/polecats/garnet","updated_at":"2026-01-05T19:45:43.983711-08:00","closed_at":"2026-01-05T19:45:43.983711-08:00","close_reason":"Branch deleted, already merged"}
{"id":"bd-f2lb","title":"Update CHANGELOG.md with release notes","description":"Add meaningful release notes to CHANGELOG.md describing what changed in test-squash","status":"tombstone","priority":1,"issue_type":"task","created_at":"2025-12-21T13:52:33.066065-08:00","updated_at":"2025-12-21T13:53:49.858742-08:00","deleted_at":"2025-12-21T13:53:49.858742-08:00","deleted_by":"stevey","delete_reason":"manual delete","original_type":"task"}
{"id":"bd-f2yq","title":"Merge: onyx-mjxjhqu4","description":"branch: polecat/onyx-mjxjhqu4\ntarget: main\nsource_issue: onyx-mjxjhqu4\nrig: beads\nagent_bead: bd-beads-polecat-onyx","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2026-01-02T16:13:16.170964-08:00","created_by":"beads/polecats/onyx","updated_at":"2026-01-02T17:14:48.355985-08:00","closed_at":"2026-01-02T17:14:48.355985-08:00","close_reason":"Orphaned MR - onyx stopped (dropped no-op), branch never pushed"}
{"id":"bd-f3ll","title":"Merge: bd-ot0w","description":"branch: polecat/dementus\ntarget: main\nsource_issue: bd-ot0w\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-19T23:20:33.495772-08:00","updated_at":"2025-12-20T23:17:27.000252-08:00","closed_at":"2025-12-20T23:17:27.000252-08:00"}
@@ -524,7 +526,7 @@
{"id":"bd-j3il","title":"Add bd reset command for clean slate restart","description":"Implement a command to reset beads to a clean starting state.\n\n**Context:** GitHub issue #479 - users sometimes get beads into an invalid state after updates, and there's no clean way to start fresh. The git backup/restore mechanism that protects against accidental deletion also makes it hard to intentionally reset.\n\n**Current workaround** (from maphew):\n```bash\nbd daemons killall\ngit rm .beads/*.jsonl\ngit commit -m 'remove old issues'\nrm .beads/*\nbd init\nbd onboard\n```\n\n**Desired:** A proper `bd reset` command that handles this cleanly and safely.","status":"tombstone","priority":2,"issue_type":"feature","created_at":"2025-12-13T08:41:34.956552+11:00","updated_at":"2025-12-25T01:21:01.952723-08:00","deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"feature"}
{"id":"bd-j4cr","title":"bd cook: waits_for field not preserved in cooked protos","description":"The `waits_for` field in formula steps is not preserved in the cooked proto.\n\n## Formula\n\n```yaml\n- id: aggregate\n title: Aggregate arm results\n needs: [survey-workers]\n waits_for: all-children\n description: |\n This is a **fanout gate**...\n```\n\n## Expected\n\nThe cooked proto step should have metadata indicating it's a gate:\n- Label: `gate:all-children` or\n- Field in issue metadata indicating wait behavior\n\n## Actual\n\nThe `waits_for` field is silently ignored. Only the description mentions 'fanout gate'.\n\n## Impact\n\nThe execution engine cannot determine which steps are gates that need to wait\nfor dynamically-bonded children. This breaks the Christmas Ornament pattern\nwhere aggregate steps must wait for all polecat-arm wisps to complete.\n\n## Related\n\nbd-hr39: needs field not converted to step dependencies","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-24T13:51:10.494565-08:00","updated_at":"2025-12-24T13:59:09.932552-08:00","closed_at":"2025-12-24T13:59:09.932552-08:00"}
{"id":"bd-j6lr","title":"GH#402: Add --parent flag documentation to bd onboard","description":"bd onboard output is missing --parent flag for epic subtasks. Agents guess wrong syntax (--deps parent:). See GitHub issue #402.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-16T01:03:56.594829-08:00","updated_at":"2025-12-17T16:11:17.070763-08:00","deleted_at":"2025-12-17T16:11:17.070763-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-j7v7","title":"Merge: ruby-mk0ev0fb","description":"branch: polecat/ruby-mk0ev0fb\ntarget: main\nsource_issue: ruby-mk0ev0fb\nrig: beads\nagent_bead: bd-beads-polecat-ruby\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"open","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T16:21:31.460826-08:00","created_by":"beads/polecats/ruby","updated_at":"2026-01-04T16:21:31.460826-08:00"}
{"id":"bd-j7v7","title":"Merge: ruby-mk0ev0fb","description":"branch: polecat/ruby-mk0ev0fb\ntarget: main\nsource_issue: ruby-mk0ev0fb\nrig: beads\nagent_bead: bd-beads-polecat-ruby\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T16:21:31.460826-08:00","created_by":"beads/polecats/ruby","updated_at":"2026-01-05T19:45:43.982501-08:00","closed_at":"2026-01-05T19:45:43.982501-08:00","close_reason":"Branch deleted, already merged"}
{"id":"bd-jbqx","title":"Code smell: Repeated validation patterns could be centralized","description":"Similar validation patterns appear in multiple commands (create.go, show.go, update.go, etc.):\n- Check if resource exists\n- Check if resource is in valid state\n- Validate user input\n- Check permissions\n\n**Problem:**\n- Duplicated validation logic\n- Inconsistent validation between commands\n- Hard to add new validation rules consistently\n\n**Acceptance Criteria:**\n- [ ] Create internal/validation package\n- [ ] Centralize common validation logic\n- [ ] Use composition for validation chains\n- [ ] Update commands to use shared validators\n- [ ] Tests pass","status":"closed","priority":3,"issue_type":"chore","created_at":"2025-12-28T19:00:03.171186-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-30T18:12:30.979965-08:00","closed_at":"2025-12-30T15:58:50.871474-08:00","close_reason":"Implemented composable validators in internal/validation/issue.go with Chain() composition, migrated show_unit_helpers.go to use centralized validators","dependencies":[{"issue_id":"bd-jbqx","depends_on_id":"bd-ox1o","type":"blocks","created_at":"2025-12-28T19:00:23.84458-08:00","created_by":"daemon"}]}
{"id":"bd-jdz3","title":"Add pager support to bd list","description":"Add pager support following gh cli conventions:\n\nFlags:\n- --no-pager: disable pager for this command\n\nEnvironment variables:\n- BD_PAGER / PAGER: pager program (default: less)\n- BD_NO_PAGER: disable pager globally\n\nBehavior:\n- Auto-enable pager when output exceeds terminal height\n- Respect LESS env var for pager options\n- Disable pager when stdout is not a TTY (pipes/scripts)","notes":"## Implementation Plan\n\n### Dependencies\n```go\nimport \"github.com/muesli/termenv\" // or golang.org/x/term\n```\n\n### Code Changes\n\n1. **Add pager helper** (internal/ui/pager.go):\n```go\nfunc ToPager(content string) error {\n // Check BD_NO_PAGER or --no-pager\n if os.Getenv(\"BD_NO_PAGER\") \\!= \"\" {\n fmt.Print(content)\n return nil\n }\n \n // Get pager command\n pager := os.Getenv(\"BD_PAGER\")\n if pager == \"\" {\n pager = os.Getenv(\"PAGER\")\n }\n if pager == \"\" {\n pager = \"less\"\n }\n \n // Check if content exceeds terminal height\n // If not, just print directly\n \n // Pipe to pager\n cmd := exec.Command(pager)\n cmd.Stdin = strings.NewReader(content)\n cmd.Stdout = os.Stdout\n cmd.Stderr = os.Stderr\n return cmd.Run()\n}\n```\n\n2. **Add --no-pager flag** (cmd/bd/list.go init):\n```go\nlistCmd.Flags().Bool(\"no-pager\", false, \"Disable pager output\")\n```\n\n3. **Use pager in list output** (end of Run):\n```go\nif \\!noPager \u0026\u0026 isTerminal(os.Stdout) {\n ui.ToPager(output.String())\n} else {\n fmt.Print(output.String())\n}\n```\n\n### Environment Variables\n- `BD_PAGER`: pager program (overrides PAGER)\n- `BD_NO_PAGER`: set to any value to disable\n- `PAGER`: fallback pager\n- `LESS`: passed through for less options\n\n### Testing\n- `bd list` pipes to pager when output \u003e terminal height\n- `bd list --no-pager` prints directly\n- `BD_NO_PAGER=1 bd list` prints directly\n- `bd list | cat` auto-disables pager (not a TTY)","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-12-29T15:25:09.109258-08:00","created_by":"stevey","updated_at":"2025-12-30T15:44:43.356435-08:00","closed_at":"2025-12-30T00:41:45.168318-08:00","close_reason":"Merged via refinery"}
{"id":"bd-jgxi","title":"Auto-migrate database on CLI version bump","description":"When CLI is upgraded (e.g., 0.24.0 → 0.24.1), database version becomes stale. Add auto-migration in PersistentPreRun or daemon startup. Check dbVersion != CLIVersion and run bd migrate automatically. Fixes recurring UX issue where bd doctor shows version mismatch after every CLI upgrade.","status":"tombstone","priority":0,"issue_type":"feature","created_at":"2025-11-21T23:16:09.004619-08:00","updated_at":"2025-12-25T01:21:01.952723-08:00","dependencies":[{"issue_id":"bd-jgxi","depends_on_id":"bd-tbz3","type":"parent-child","created_at":"2025-11-21T23:16:09.005513-08:00","created_by":"daemon"}],"deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"feature"}
@@ -538,7 +540,7 @@
{"id":"bd-k4ww","title":"Merge: pearl-mjtmd27a","description":"branch: polecat/pearl-mjtmd27a\ntarget: main\nsource_issue: pearl-mjtmd27a\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-30T22:16:38.232474-08:00","created_by":"beads/polecats/pearl","updated_at":"2026-01-01T10:43:18.623861-08:00","closed_at":"2026-01-01T10:43:18.623861-08:00","close_reason":"Stale MR - branch no longer exists on remote"}
{"id":"bd-kbfn","title":"Phase 2: Timer Gates (Witness integration)","description":"Implement timer gate evaluation in Witness patrol.\n\n## Behavior\n- Witness patrol includes `bd gate check --type=timer`\n- Gate metadata: timeout, created_at stored on gate issue\n- Expired gates escalate to Deacon/Overseer (not auto-close)\n\n## Implementation\n1. Add timer gate check to mol-witness-patrol.formula.toml\n2. `bd gate check --type=timer` evaluates: now \u003e created_at + timeout\n3. Expired gates: escalate via `gt escalate --type gate_timeout`\n4. Non-expired gates: skip (will check next patrol)\n\n## Acceptance Criteria\n- [ ] `bd gate check --type=timer` works\n- [ ] Witness patrol runs timer check each cycle\n- [ ] Expired gates trigger escalation\n- [ ] Gate timeout configurable per-gate","status":"closed","priority":2,"issue_type":"task","assignee":"beads/polecats/quartz","created_at":"2026-01-02T01:55:40.113565-08:00","created_by":"mayor","updated_at":"2026-01-02T12:48:35.498928-08:00","closed_at":"2026-01-02T12:48:35.498928-08:00","close_reason":"Implemented bd gate check --type=timer with escalation support","dependencies":[{"issue_id":"bd-kbfn","depends_on_id":"bd-mcva","type":"parent-child","created_at":"2026-01-02T01:55:53.92126-08:00","created_by":"mayor"}]}
{"id":"bd-kblo","title":"bd prime should mention when beads is redirected","description":"## Problem\n\nAgents running in a redirected clone don't know they're sharing beads with other clones. This can cause confusion when molecules or issues seem to 'appear' or 'disappear'.\n\n## Proposed Solution\n\nWhen `bd prime` runs and detects a redirect, include it in the output:\n\n```\nBeads: /Users/stevey/gt/beads/mayor/rig/.beads\n (redirected from crew/dave - you share issues with other clones)\n```\n\n## Why\n\nVisibility over magic. If agents can see the redirect, they can reason about it.\n\n## Related\n\n- bd where command (shows this on demand)\n- gt redirect following (ensures gt matches bd behavior)","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-12-27T21:15:55.026907-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-27T21:33:33.765635-08:00","closed_at":"2025-12-27T21:33:33.765635-08:00"}
{"id":"bd-kc6v","title":"Merge: quartz-mk04ckp1","description":"branch: polecat/quartz-mk04ckp1\ntarget: main\nsource_issue: quartz-mk04ckp1\nrig: beads\nagent_bead: bd-beads-polecat-quartz\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"open","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T11:29:18.690587-08:00","created_by":"beads/polecats/quartz","updated_at":"2026-01-04T11:29:18.690587-08:00"}
{"id":"bd-kc6v","title":"Merge: quartz-mk04ckp1","description":"branch: polecat/quartz-mk04ckp1\ntarget: main\nsource_issue: quartz-mk04ckp1\nrig: beads\nagent_bead: bd-beads-polecat-quartz\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T11:29:18.690587-08:00","created_by":"beads/polecats/quartz","updated_at":"2026-01-05T19:45:43.98813-08:00","closed_at":"2026-01-05T19:45:43.98813-08:00","close_reason":"Branch deleted, already merged"}
{"id":"bd-kff0","title":"Integrate detect-pollution into bd doctor","description":"## Task\nMove `bd detect-pollution` → `bd doctor --check=pollution`\n\n## Current state\n- detect-pollution already shows deprecation hint pointing to doctor\n- Doctor command exists with multiple checks\n\n## Implementation\n\n### 1. Update doctor.go\n- Add pollution check to the doctor checks\n- Add `--check=pollution` flag option\n- Integrate detect-pollution logic\n\n### 2. Update detect_pollution.go\n- Mark as hidden (deprecated)\n- Forward to doctor --check=pollution\n- Keep for one release cycle\n\n### 3. Update docs\n- Remove detect-pollution from any command lists\n- Update doctor docs to include pollution check\n\n## Files to modify\n- cmd/bd/doctor.go\n- cmd/bd/detect_pollution.go\n","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T15:11:10.46326-08:00","created_by":"mayor","updated_at":"2025-12-27T16:04:58.471341-08:00","closed_at":"2025-12-27T16:04:58.471341-08:00"}
{"id":"bd-kkka","title":"Dead code: fetchAndRebaseInWorktree() marked DEPRECATED but still exists","description":"attached_args: Remove dead code fetchAndRebaseInWorktree\n\nThe function fetchAndRebaseInWorktree() in internal/syncbranch/worktree.go (lines 811-830) is marked as DEPRECATED with a comment:\n\n```go\n// fetchAndRebaseInWorktree is DEPRECATED - kept for reference only.\n// Use contentMergeRecovery instead to avoid tombstone resurrection.\n```\n\nSince contentMergeRecovery() is the replacement and is being used, this dead code should be removed to reduce maintenance burden.\n\nLocation: internal/syncbranch/worktree.go:811-830","status":"closed","priority":3,"issue_type":"chore","created_at":"2025-12-28T15:32:21.97865-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T16:41:36.721496-08:00","closed_at":"2025-12-28T16:41:36.721496-08:00","dependencies":[{"issue_id":"bd-kkka","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.241483-08:00","created_by":"daemon"}]}
{"id":"bd-knta","title":"Deacon Patrol","description":"Mayor's daemon patrol loop for handling callbacks, health checks, and cleanup.","status":"tombstone","priority":2,"issue_type":"molecule","created_at":"2025-12-26T13:08:21.233771-08:00","updated_at":"2025-12-27T00:10:54.179341-08:00","deleted_at":"2025-12-27T00:10:54.179341-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"molecule"}
@@ -714,7 +716,7 @@
{"id":"bd-ncwo","title":"Ghost resurrection: remote status:closed wins during git merge","description":"During bd sync, the 3-way git merge sometimes keeps remote's status:closed instead of local's status:tombstone. This causes ghost issues to resurrect even when tombstones exist.\n\nRoot cause: Git 3-way merge doesn't understand tombstone semantics. If base had closed, local changed to tombstone, and remote has closed, git might keep remote's version.\n\nThe early tombstone check in importer.go only prevents CREATION when tombstones exist in DB. But if applyDeletionsFromMerge hard-deletes the tombstones before import runs (because they're not in the merged result), the check doesn't help.\n\nPotential fixes:\n1. Make tombstones 'win' in the beads merge driver (internal/merge/merge.go)\n2. Don't hard-delete tombstones in applyDeletionsFromMerge if they're in the DB\n3. Export tombstones to a separate file that's not subject to merge\n\nGhost issues: bd-cb64c226.*, bd-cbed9619.*","status":"tombstone","priority":1,"issue_type":"bug","created_at":"2025-12-16T22:01:03.56423-08:00","updated_at":"2025-12-17T16:11:17.070763-08:00","deleted_at":"2025-12-17T16:11:17.070763-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"bug"}
{"id":"bd-ndye","title":"mergeDependencies uses union instead of 3-way merge","description":"## Critical Bug\n\nThe `mergeDependencies` function in internal/merge/merge.go performs a UNION of left and right dependencies instead of a proper 3-way merge. This causes removed dependencies to be resurrected.\n\n### Root Cause\n\n```go\n// Current code (lines 795-816):\nfunc mergeDependencies(left, right []Dependency) []Dependency {\n // Just unions left + right\n // NEVER REMOVES anything\n // Doesn't even look at base!\n}\n```\n\nAnd `mergeIssue` (line 579) doesn't pass `base`:\n```go\nresult.Dependencies = mergeDependencies(left.Dependencies, right.Dependencies)\n```\n\n### Impact\n\nIf:\n- Base has dependency D\n- Left removes D (intentional)\n- Right still has D (stale)\n\nCurrent: D is in result (resurrection!)\nCorrect: Left removed it, D should NOT be in result\n\nThis breaks Gas Town's workflow and data integrity. Closed means closed.\n\n### Fix\n\nChange `mergeDependencies` to take `base` and do proper 3-way merge:\n- If dep was in base and removed by left → exclude (left wins)\n- If dep was in base and removed by right → exclude (right wins)\n- If dep wasn't in base and added by either → include\n- If dep was in base and both still have it → include\n\nKey principle: **REMOVALS ARE AUTHORITATIVE**\n\n### Files to Change\n\n1. internal/merge/merge.go:\n - `mergeDependencies(left, right)` → `mergeDependencies(base, left, right)`\n - `mergeIssue` line 579: pass `base.Dependencies`\n\n### Related\n\nThis also explains why `ProtectLocalExportIDs` in importer is defined but never used - the protection was never actually implemented.","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-12-18T23:15:54.475872-08:00","updated_at":"2025-12-18T23:21:10.709571-08:00","closed_at":"2025-12-18T23:21:10.709571-08:00"}
{"id":"bd-ne0h","title":"GHI #891: close_reason field dropped during merge/sync","description":"GitHub Issue #891: close_reason field dropped during merge/sync\n\nhttps://github.com/steveyegge/beads/issues/891","status":"closed","priority":2,"issue_type":"bug","created_at":"2026-01-04T11:22:12.270387-08:00","created_by":"mayor","updated_at":"2026-01-04T15:22:07.769236-08:00","closed_at":"2026-01-04T11:28:48.394697-08:00","close_reason":"Fixed: Added CloseReason and ClosedBySession fields to merge.Issue struct with proper merge logic"}
{"id":"bd-ngfl","title":"Merge: topaz-mk04tram","description":"branch: polecat/topaz-mk04tram\ntarget: main\nsource_issue: topaz-mk04tram\nrig: beads\nagent_bead: bd-beads-polecat-topaz\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"open","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T11:45:09.022511-08:00","created_by":"beads/polecats/topaz","updated_at":"2026-01-04T11:45:09.022511-08:00"}
{"id":"bd-ngfl","title":"Merge: topaz-mk04tram","description":"branch: polecat/topaz-mk04tram\ntarget: main\nsource_issue: topaz-mk04tram\nrig: beads\nagent_bead: bd-beads-polecat-topaz\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T11:45:09.022511-08:00","created_by":"beads/polecats/topaz","updated_at":"2026-01-05T19:45:43.984821-08:00","closed_at":"2026-01-05T19:45:43.984821-08:00","close_reason":"Branch deleted, already merged"}
{"id":"bd-nim5","title":"Detect/prevent child→parent dependency anti-pattern","description":"## Problem\n\nWhen filing issues with dependencies, it's easy to fall into the \"temporal trap\":\n- Thinking \"Phase 1 comes before Phase 2\"\n- Writing `bd dep add phase1 phase2`\n- But that means \"phase1 depends on phase2\" (backwards!)\n\nA specific variant: children depending on their parent epic. This is ALWAYS wrong because:\n1. Parent-child relationship already captures the dependency (parent closes when children done)\n2. Child→parent dep creates a block: child can't start because parent is \"open\"\n3. Parent can't close because children aren't done\n4. Deadlock\n\n## Solution\n\n### 1. Prevent at creation (`bd dep add`)\n\nWhen user runs `bd dep add X Y`:\n- Check if X is a child of Y (X.id starts with Y.id + \".\")\n- If so, error: \"Cannot add dependency: X is already a child of Y. Children inherit dependency on parent completion via hierarchy.\"\n\n### 2. Detect in `bd doctor`\n\nAdd a check that finds all cases where:\n- Issue A depends on Issue B\n- A.id matches pattern B.id + \".*\" (A is child of B)\n\nReport as: \"Child→parent dependency detected (anti-pattern)\"\nOffer repair: \"Remove N backwards dependencies? [y/N]\"\n\n## Implementation\n\n- `dep_add.go`: Add parent-child check before adding dependency\n- `doctor.go`: Add backwards-dep detection to health checks\n","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-24T12:51:15.788796-08:00","updated_at":"2025-12-24T13:02:44.079093-08:00","closed_at":"2025-12-24T13:02:44.079093-08:00"}
{"id":"bd-njrm","title":"Work on gt-8tmz.34: Expansion var overrides not implement...","description":"Work on gt-8tmz.34: Expansion var overrides not implemented. The ExpandRule.Vars field exists in internal/formula/types.go but is ignored during expansion in internal/formula/expand.go. Implement: 1) Pass rule.Vars to expandStep in ApplyExpansions, 2) Merge vars with formula defaults (rule.Vars wins), 3) Substitute vars in template placeholders, 4) Add test in expand_test.go. When done, commit and push to main.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-25T20:01:13.586558-08:00","updated_at":"2025-12-25T20:06:11.099142-08:00","closed_at":"2025-12-25T20:06:11.099142-08:00"}
{"id":"bd-nkqx","title":"bd swarm validate command","description":"Add bd swarm validate to check epic structure for swarming.\n\n## Context\nBefore running a swarm, we need to validate the epic structure:\n- Are dependencies correct (not inverted)?\n- Are there orphaned issues?\n- Is the DAG well-formed?\n\nThe Ready Front model (not phases!) means dependencies define execution order.\nCommon mistake: 'Phase 1 before Phase 2' → inverted deps.\nCorrect thinking: 'Phase 2 needs Phase 1' → bd dep add phase2 phase1\n\n## Implementation\n1. New command: bd swarm validate \u003cepic-id\u003e\n2. Walk the dependency DAG from epic children\n3. Detect issues:\n - Root issues with no dependents (orphans?)\n - Leaf issues depending on nothing (missing deps?)\n - Cycles (impossible)\n - Disconnected subgraphs\n4. Report:\n - Ready fronts (waves of parallel work)\n - Estimated worker-sessions\n - Max parallelism\n - Warnings for potential issues\n\n## Reference\n~/gt/docs/swarm-architecture.md - 'The Ready Front Model' section\n\n## Acceptance\n- bd swarm validate \u003cepic\u003e runs\n- Reports ready fronts accurately\n- Warns about structural issues\n- Returns success/failure exit code","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-28T19:11:08.788203-08:00","created_by":"mayor","updated_at":"2025-12-28T19:34:57.218009-08:00","closed_at":"2025-12-28T19:34:57.218009-08:00"}
@@ -759,6 +761,7 @@
{"id":"bd-oy7n","title":"Merge: jasper-mjw4bxkx","description":"branch: polecat/jasper-mjw4bxkx\ntarget: main\nsource_issue: jasper-mjw4bxkx\nrig: beads\nagent_bead: gt-beads-polecat-jasper","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2026-01-01T16:25:12.663026-08:00","created_by":"beads/polecats/jasper","updated_at":"2026-01-01T16:26:55.339728-08:00","closed_at":"2026-01-01T16:26:55.339728-08:00","close_reason":"Merged to main"}
{"id":"bd-p5za","title":"mol-christmas-launch: 3-day execution plan","description":"Christmas Launch Molecule - execute phases in order, survive restarts.\n\nPIN THIS BEAD. Check progress each session start.\n\n## Step: phase0-beads-foundation\nFix blocking issues before swarming:\n1. Verify gastown beads schema works: bd list --status=open\n2. Ensure bd mol bond exists (check bd-usro)\n3. Verify bd-2vh3 (squash) is filed\n\n## Step: phase1-polecat-loop\nSerial work on polecat execution:\n1. gt-9nf: Fresh polecats only\n2. gt-975: Molecule execution support\n3. gt-8v8: Refuse uncommitted work\nThen swarm: gt-e1y, gt-f8v, gt-eu9\nNeeds: phase0-beads-foundation\n\n## Step: phase2-refinery\nSerial work on refinery autonomy:\n1. gt-5gkd: Refinery CLAUDE.md\n2. gt-bj6f: Refinery context in gt prime\n3. gt-0qki: Refinery-Witness protocol\nNeeds: phase1-polecat-loop\n\n## Step: phase3-deacon\nHealth monitoring infrastructure:\n1. gt-5af.4: Simplify daemon\n2. gt-5af.7: Crew session patterns\n3. gt-976: Crew lifecycle\nNeeds: phase2-refinery\n\n## Step: phase4-code-review\nSelf-improvement flywheel:\n1. Define mol-code-review (gt-fjvo)\n2. Test on open MRs\n3. Integrate with Refinery\nNeeds: phase3-deacon\n\n## Step: phase5-polish\nDemo readiness:\n1. gt-b2hj: Find orphaned work\n2. Doctor checks\n3. Clean up open MRs\nNeeds: phase4-code-review\n\n## Step: verify-flywheel\nSuccess criteria:\n- gt spawn works with molecules\n- Refinery processes MRs autonomously\n- mol-code-review runs on a PR\n- bd cleanup --ephemeral works\nNeeds: phase5-polish","status":"closed","priority":0,"issue_type":"epic","created_at":"2025-12-20T21:20:02.462889-08:00","updated_at":"2025-12-21T17:23:25.471749-08:00","closed_at":"2025-12-21T17:23:25.471749-08:00"}
{"id":"bd-p7i2","title":"Add unit test for gitHasUncommittedBeadsChanges()","description":"The new helper function from bd-vd8e needs unit tests in sync_git_test.go to verify:\n- Returns false when no changes\n- Returns true for M (modified)\n- Returns true for A (added)\n- Returns false for ?? (untracked)\n- Returns false for D (deleted)\n\nPart of GH#885 follow-up.","status":"closed","priority":2,"issue_type":"task","assignee":"beads/polecats/ruby","created_at":"2026-01-04T16:15:53.96425-08:00","created_by":"beads/crew/fang","updated_at":"2026-01-04T16:20:40.004117-08:00","closed_at":"2026-01-04T16:20:40.004117-08:00","close_reason":"Added parseGitStatusForBeadsChanges helper function and 14 unit tests covering: empty status, modified (staged/unstaged/both), added, untracked, deleted, renamed, copied, and edge cases"}
{"id":"bd-par1","title":"doctor: improve messaging for detection-only hook managers","description":"When bd doctor detects hook managers we can't fully check (pre-commit, overcommit, yorkie, simple-git-hooks), the current warning suggests they're broken. Change to informational: 'pre-commit detected, cannot verify bd integration' rather than implying misconfiguration.","status":"open","priority":2,"issue_type":"task","created_at":"2026-01-05T19:19:08.98544-08:00","created_by":"beads/crew/giles","updated_at":"2026-01-05T19:19:08.98544-08:00"}
{"id":"bd-pbh","title":"Release v0.30.4","description":"## Version Bump Workflow\n\nCoordinating release from 0.30.3 to 0.30.4.\n\n### Components Updated\n- Go CLI (cmd/bd/version.go)\n- Claude Plugin (.claude-plugin/*.json)\n- MCP Server (integrations/beads-mcp/)\n- npm Package (npm-package/package.json)\n- Git hooks (cmd/bd/templates/hooks/)\n\n### Release Channels\n- GitHub Releases (GoReleaser)\n- PyPI (beads-mcp)\n- npm (@beads/cli)\n- Homebrew (homebrew-beads tap)\n","status":"tombstone","priority":1,"issue_type":"epic","created_at":"2025-12-17T21:19:10.926133-08:00","updated_at":"2025-12-25T01:21:01.952723-08:00","labels":["release","v0.30.4","workflow"],"deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"epic"}
{"id":"bd-pbh.1","title":"Update cmd/bd/version.go to 0.30.4","description":"Update the Version constant in cmd/bd/version.go:\n```go\nVersion = \"0.30.4\"\n```\n\n\n```verify\ngrep -q 'Version = \"0.30.4\"' cmd/bd/version.go\n```","status":"tombstone","priority":1,"issue_type":"task","created_at":"2025-12-17T21:19:10.9462-08:00","updated_at":"2025-12-25T01:21:01.952723-08:00","labels":["workflow"],"dependencies":[{"issue_id":"bd-pbh.1","depends_on_id":"bd-pbh","type":"parent-child","created_at":"2025-12-17T21:19:10.946633-08:00","created_by":"daemon"}],"deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-pbh.10","title":"Run check-versions.sh - all must pass","description":"Run the version consistency check:\n```bash\n./scripts/check-versions.sh\n```\n\nAll versions must match 0.30.4.\n\n\n```verify\n./scripts/check-versions.sh\n```","status":"tombstone","priority":1,"issue_type":"task","created_at":"2025-12-17T21:19:11.047311-08:00","updated_at":"2025-12-25T01:21:01.952723-08:00","labels":["workflow"],"dependencies":[{"issue_id":"bd-pbh.10","depends_on_id":"bd-pbh","type":"parent-child","created_at":"2025-12-17T21:19:11.047888-08:00","created_by":"daemon"},{"issue_id":"bd-pbh.10","depends_on_id":"bd-pbh.1","type":"blocks","created_at":"2025-12-17T21:19:11.159084-08:00","created_by":"daemon"},{"issue_id":"bd-pbh.10","depends_on_id":"bd-pbh.4","type":"blocks","created_at":"2025-12-17T21:19:11.168248-08:00","created_by":"daemon"},{"issue_id":"bd-pbh.10","depends_on_id":"bd-pbh.5","type":"blocks","created_at":"2025-12-17T21:19:11.177869-08:00","created_by":"daemon"},{"issue_id":"bd-pbh.10","depends_on_id":"bd-pbh.6","type":"blocks","created_at":"2025-12-17T21:19:11.187629-08:00","created_by":"daemon"},{"issue_id":"bd-pbh.10","depends_on_id":"bd-pbh.7","type":"blocks","created_at":"2025-12-17T21:19:11.199955-08:00","created_by":"daemon"},{"issue_id":"bd-pbh.10","depends_on_id":"bd-pbh.8","type":"blocks","created_at":"2025-12-17T21:19:11.211479-08:00","created_by":"daemon"},{"issue_id":"bd-pbh.10","depends_on_id":"bd-pbh.9","type":"blocks","created_at":"2025-12-17T21:19:11.224059-08:00","created_by":"daemon"}],"deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
@@ -871,7 +874,7 @@
{"id":"bd-siz1","title":"GH#532: bd sync circular error (suggests running bd sync)","description":"bd sync error message recommends running bd sync to fix the bd sync error. Fix error handling to provide useful guidance. See GitHub issue #532.","status":"tombstone","priority":2,"issue_type":"bug","created_at":"2025-12-16T01:04:00.543573-08:00","updated_at":"2025-12-17T16:11:17.070763-08:00","deleted_at":"2025-12-17T16:11:17.070763-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"bug"}
{"id":"bd-sj5y","title":"Daemon should be singleton and aggressively kill stale instances","description":"Found 2 bd daemons running (PIDs 76868, 77515) during shutdown. The daemon should:\n\n1. Be a singleton - only one instance per rig allowed\n2. On startup, check for existing daemon and kill it before starting\n3. Use a PID file or lock file to enforce this\n\nCurrently stale daemons can accumulate, causing confusion and resource waste.","notes":"**Investigation 2025-12-21:**\n\nThe singleton mechanism is already implemented and working correctly:\n\n1. **daemon.lock** uses flock (exclusive non-blocking) to prevent duplicate daemons\n2. **bd.sock.startlock** coordinates concurrent auto-starts via O_CREATE|O_EXCL\n3. **Registry** tracks all daemons globally in ~/.beads/registry.json\n\nTesting shows:\n- Trying to start a second daemon gives: 'Error: daemon already running (PID X)'\n- Multiple daemons for *different* rigs is expected/correct behavior\n\nThe original report ('Found 2 bd daemons running PIDs 76868, 77515') was likely:\n1. Two daemons for different rigs (expected), OR\n2. An edge case that's since been fixed\n\nConsider closing as RESOLVED or clarifying the original scenario.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-21T01:29:14.778949-08:00","updated_at":"2025-12-21T11:27:34.302585-08:00","closed_at":"2025-12-21T11:27:34.302585-08:00"}
{"id":"bd-soig","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-28T16:17:50.561021-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T22:14:22.838484-08:00","closed_at":"2025-12-28T22:14:22.838484-08:00"}
{"id":"bd-srhu","title":"Merge: jasper-mk04cv5s","description":"branch: polecat/jasper-mk04cv5s\ntarget: main\nsource_issue: jasper-mk04cv5s\nrig: beads\nagent_bead: bd-beads-polecat-jasper\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"open","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T11:27:04.224933-08:00","created_by":"beads/polecats/jasper","updated_at":"2026-01-04T11:27:04.224933-08:00"}
{"id":"bd-srhu","title":"Merge: jasper-mk04cv5s","description":"branch: polecat/jasper-mk04cv5s\ntarget: main\nsource_issue: jasper-mk04cv5s\nrig: beads\nagent_bead: bd-beads-polecat-jasper\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T11:27:04.224933-08:00","created_by":"beads/polecats/jasper","updated_at":"2026-01-05T19:45:43.989296-08:00","closed_at":"2026-01-05T19:45:43.989296-08:00","close_reason":"Branch deleted, already merged"}
{"id":"bd-srsk","title":"Gate eval: Add error visibility for gh CLI failures","description":"Currently evalGHRunGate and evalGHPRGate silently swallow errors when the gh CLI fails (lines 738-741, 780-783 in gate.go).\n\nThis makes debugging difficult - if gh isn't installed, auth fails, or network issues occur, gates silently stall forever with no indication of why.\n\nOptions:\n1. Add debug logging when gh fails\n2. Return error info in the skipped list for aggregate reporting\n3. Add a --verbose flag to gate eval that shows failures\n\nLow priority since the fail-safe behavior (don't close gate on error) is correct.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-25T23:13:11.718635-08:00","updated_at":"2026-01-02T18:35:49.165014-08:00","closed_at":"2026-01-02T18:35:49.165014-08:00","close_reason":"Fixed in commit 3c5b7414 (bd-oos3). Error visibility now implemented in bd gate check - errors are printed to stderr with fail icon."}
{"id":"bd-su45","title":"Protect pinned issues from bd cleanup/compact","description":"Update bd cleanup and bd compact to never delete pinned issues, even if they are closed. Pinned issues should persist indefinitely as reference material.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-18T23:33:46.204783-08:00","updated_at":"2025-12-19T17:43:35.712617-08:00","closed_at":"2025-12-19T00:43:04.06406-08:00","dependencies":[{"issue_id":"bd-su45","depends_on_id":"bd-0vg","type":"blocks","created_at":"2025-12-18T23:33:56.64582-08:00","created_by":"daemon"},{"issue_id":"bd-su45","depends_on_id":"bd-7h5","type":"blocks","created_at":"2025-12-18T23:34:07.857586-08:00","created_by":"daemon"}]}
{"id":"bd-sumr","title":"Merge: bd-t4sb","description":"branch: polecat/capable\ntarget: main\nsource_issue: bd-t4sb\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-19T23:22:21.343724-08:00","updated_at":"2025-12-20T23:17:26.997992-08:00","closed_at":"2025-12-20T23:17:26.997992-08:00"}
@@ -974,7 +977,7 @@
{"id":"bd-xctp","title":"GH#519: bd sync fails when sync.branch is currently checked-out branch","status":"tombstone","priority":2,"issue_type":"bug","created_at":"2025-12-16T01:06:05.319281-08:00","updated_at":"2025-12-17T16:11:17.070763-08:00","deleted_at":"2025-12-17T16:11:17.070763-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"bug"}
{"id":"bd-xhaa","title":"Test work item","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-28T00:04:42.739569-08:00","created_by":"beads/crew/emma","updated_at":"2025-12-28T00:11:48.074239-08:00","deleted_at":"2025-12-28T00:11:48.074239-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-xj2e","title":"GH#522: Add --type flag to bd update command","description":"Add --type flag to bd update for changing issue type (task/epic/bug/feature). Storage layer already supports it. See GitHub issue #522.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-16T01:03:12.506583-08:00","updated_at":"2025-12-17T16:11:17.070763-08:00","deleted_at":"2025-12-17T16:11:17.070763-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-xntk","title":"Merge: obsidian-mk04ca9j","description":"branch: polecat/obsidian-mk04ca9j\ntarget: main\nsource_issue: obsidian-mk04ca9j\nrig: beads\nagent_bead: bd-beads-polecat-obsidian\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"open","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T11:30:56.553046-08:00","created_by":"beads/polecats/obsidian","updated_at":"2026-01-04T11:30:56.553046-08:00"}
{"id":"bd-xntk","title":"Merge: obsidian-mk04ca9j","description":"branch: polecat/obsidian-mk04ca9j\ntarget: main\nsource_issue: obsidian-mk04ca9j\nrig: beads\nagent_bead: bd-beads-polecat-obsidian\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T11:30:56.553046-08:00","created_by":"beads/polecats/obsidian","updated_at":"2026-01-05T19:45:43.985895-08:00","closed_at":"2026-01-05T19:45:43.985895-08:00","close_reason":"Branch deleted, already merged"}
{"id":"bd-xo1o","title":"Dynamic Molecule Bonding: Fanout patterns for patrol molecules","description":"## Vision\n\nEnable molecules to dynamically spawn child molecules at runtime based on discovered\nwork. This is the foundation for the \"Christmas Ornament\" pattern where a patrol\nmolecule grows arms per-polecat.\n\n## The Activity Feed Vision\n\nInstead of parsing agent logs, users see structured work state:\n\n```\n[14:32:08] + patrol-x7k.arm-ace bonded (5 steps)\n[14:32:08] + patrol-x7k.arm-nux bonded (5 steps)\n[14:32:09] → patrol-x7k.arm-ace.capture in_progress\n[14:32:10] ✓ patrol-x7k.arm-ace.capture completed\n[14:32:14] ✓ patrol-x7k.arm-ace.decide completed (action: nudge-1)\n```\n\nThis requires beads to track molecule step state transitions in real-time.\n\n## Key Primitives Needed\n\n### 1. Dynamic Bond with Variables\n```bash\nbd mol bond mol-polecat-arm \u003cparent-wisp-id\u003e \\\n --var polecat_name=ace \\\n --var rig=gastown\n```\n\nCreates wisp children under the parent:\n- parent-id.arm-ace\n- parent-id.arm-ace.capture\n- parent-id.arm-ace.assess\n- etc.\n\n### 2. WaitsFor Directive\n```markdown\n## Step: aggregate\nCollect outcomes from all dynamically-bonded children.\nWaitsFor: all-children\nNeeds: survey-workers\n```\n\nThe `WaitsFor: all-children` directive makes this a fanout gate - it can't\nproceed until ALL dynamically-bonded children complete.\n\n### 3. Activity Feed Query\n```bash\nbd activity --follow # Real-time state stream\nbd activity --mol \u003cid\u003e # Activity for specific molecule\nbd activity --since 5m # Last 5 minutes\n```\n\n### 4. Parallel Step Detection\nSteps with no inter-dependencies should be flagged as parallelizable.\nWhen arms are bonded, their steps can run in parallel across arms.\n\n## Use Case: mol-witness-patrol\n\nThe Witness monitors N polecats where N varies at runtime:\n\n```\nsurvey-workers discovers: [ace, nux, toast]\nFor each polecat:\n bd mol bond mol-polecat-arm \u003cpatrol-id\u003e --var polecat_name=\u003cname\u003e\naggregate step waits for all arms to complete\n```\n\nThis creates the Christmas Ornament shape:\n- Trunk: preflight steps\n- Arms: per-polecat inspection molecules\n- Base: cleanup after all arms complete\n\n## Design Docs\n\nSee Gas Town docs:\n- docs/molecular-chemistry.md (updated with Christmas Ornament pattern)\n- docs/architecture.md (activity feed section)\n\n## Dependencies\n\nThis epic may depend on:\n- Wisp storage (.beads-wisp/) - already implemented\n- Variable substitution in molecules - may need enhancement","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-23T02:32:43.173305-08:00","updated_at":"2025-12-23T04:01:02.729388-08:00","closed_at":"2025-12-23T04:01:02.729388-08:00"}
{"id":"bd-xo1o.1","title":"bd mol bond: Dynamic bond with variable substitution","description":"Implement dynamic molecule bonding with runtime variable substitution.\n\n## Command\n```bash\nbd mol bond \u003cproto-id\u003e \u003cparent-wisp-id\u003e --var key=value --var key2=value2\n```\n\n## Behavior\n1. Parse proto molecule template\n2. Substitute {{key}} placeholders with provided values\n3. Create wisp children under the parent molecule\n4. Child IDs follow pattern: parent-id.child-ref (e.g., patrol-x7k.arm-ace)\n5. Nested children: parent-id.child-ref.step-ref (e.g., patrol-x7k.arm-ace.capture)\n\n## Variable Substitution\n- In step titles: \"Inspect {{polecat_name}}\" -\u003e \"Inspect ace\"\n- In descriptions: Full template substitution\n- In Needs directives: Allow referencing parent steps\n\n## Output\n```\n✓ Bonded mol-polecat-arm to patrol-x7k\n Created: patrol-x7k.arm-ace (5 steps)\n```","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-23T02:33:13.878996-08:00","updated_at":"2025-12-23T03:38:03.54745-08:00","closed_at":"2025-12-23T03:38:03.54745-08:00","dependencies":[{"issue_id":"bd-xo1o.1","depends_on_id":"bd-xo1o","type":"parent-child","created_at":"2025-12-23T02:33:13.879419-08:00","created_by":"daemon"}]}
{"id":"bd-xo1o.2","title":"WaitsFor directive: Fanout gate for dynamic children","description":"Implement WaitsFor directive for molecules that spawn dynamic children.\n\n## Syntax\n```markdown\n## Step: aggregate\nCollect outcomes from all dynamically-bonded children.\nWaitsFor: all-children\nNeeds: survey-workers\n```\n\n## Behavior\n1. Parse WaitsFor directive during molecule step parsing\n2. Track which steps spawn dynamic children (the spawner)\n3. Gate step waits until ALL children of the spawner complete\n4. Works with bd ready - gate step not ready until children done\n\n## Gate Types\n- `WaitsFor: all-children` - Wait for all dynamic children\n- `WaitsFor: any-children` - Proceed when first child completes (future)\n- `WaitsFor: \u003cstep-ref\u003e.children` - Wait for specific spawner's children\n\n## Integration\n- bd ready should skip gate steps until children complete\n- bd show \u003cmol\u003e should display gate status and child count","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-23T02:33:14.946475-08:00","updated_at":"2025-12-23T04:00:09.443106-08:00","closed_at":"2025-12-23T04:00:09.443106-08:00","dependencies":[{"issue_id":"bd-xo1o.2","depends_on_id":"bd-xo1o","type":"parent-child","created_at":"2025-12-23T02:33:14.950008-08:00","created_by":"daemon"}]}
@@ -985,7 +988,7 @@
{"id":"bd-xtf5","title":"Code smell: Multiple CLI command files exceed 1000 lines","description":"Several CLI command files are very large and could benefit from splitting:\n\n| File | Lines | Notes |\n|------|-------|-------|\n| init.go | 1928 | Multiple init modes, contributor/team setup |\n| show.go | 1592 | Display formatting, tree views, output modes |\n| doctor.go | 1295 | Many health checks |\n| sync.go | 1201 | Sync branch operations |\n| compact.go | 1199 | Compaction logic |\n| linear.go | 1190 | Linear integration |\n| main.go | 1148 | Entry point and globals |\n\nConsider:\n1. Splitting init.go into init_core.go, init_contributor.go (already exists), init_team.go (already exists)\n2. Moving show.go formatters to internal/ui package\n3. Doctor checks could be individual files under doctor/ subpackage (already started)\n\nLocation: cmd/bd/*.go","status":"closed","priority":4,"issue_type":"chore","created_at":"2025-12-28T15:32:23.233091-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T18:05:09.921186-08:00","closed_at":"2025-12-28T18:05:09.921186-08:00","dependencies":[{"issue_id":"bd-xtf5","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.278433-08:00","created_by":"daemon"}],"comments":[{"id":7,"issue_id":"bd-xtf5","author":"stevey","text":"Completed init.go refactoring:\n\n- Split from 1928 → 705 lines (under 800 target)\n- Extracted 4 new files:\n - init_git_hooks.go (~480 lines): Git hooks and merge driver\n - init_stealth.go (~310 lines): Stealth mode, fork detection\n - init_agent.go (~170 lines): AGENTS.md and Claude settings\n - init_templates.go (~180 lines): config.yaml and README templates\n\nRemaining files still over 800 lines:\n- show.go (1592)\n- doctor.go (1295)\n- sync.go (1201)\n- compact.go (1199)\n- linear.go (1190)\n- main.go (1148)\n- list.go (1052)\n- template.go (1051)\n- gate.go (1048)\n\nCommit: c5f03b7b","created_at":"2025-12-29T01:27:43Z"}]}
{"id":"bd-xtl9","title":"Test Second Parent","status":"tombstone","priority":2,"issue_type":"epic","created_at":"2025-12-27T22:16:14.971605-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-27T22:16:35.925357-08:00","deleted_at":"2025-12-27T22:16:35.925357-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"epic"}
{"id":"bd-xurv","title":"Restart daemon with 0.33.2","description":"Restart the bd daemon to pick up new version:\n\n```bash\nbd daemon --stop\nbd daemon --start\nbd daemon --health # Verify Version: 0.33.2\n```","status":"tombstone","priority":1,"issue_type":"task","created_at":"2025-12-21T16:10:13.760884-08:00","updated_at":"2025-12-21T17:29:31.791368-08:00","deleted_at":"2025-12-21T17:29:31.791368-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-xv0k","title":"Merge: onyx-mk04d5pr","description":"branch: polecat/onyx-mk04d5pr\ntarget: main\nsource_issue: onyx-mk04d5pr\nrig: beads\nagent_bead: bd-beads-polecat-onyx\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"open","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T11:30:16.072116-08:00","created_by":"beads/polecats/onyx","updated_at":"2026-01-04T11:30:16.072116-08:00"}
{"id":"bd-xv0k","title":"Merge: onyx-mk04d5pr","description":"branch: polecat/onyx-mk04d5pr\ntarget: main\nsource_issue: onyx-mk04d5pr\nrig: beads\nagent_bead: bd-beads-polecat-onyx\nretry_count: 0\nlast_conflict_sha: null\nconflict_task_id: null","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2026-01-04T11:30:16.072116-08:00","created_by":"beads/polecats/onyx","updated_at":"2026-01-05T19:45:43.986962-08:00","closed_at":"2026-01-05T19:45:43.986962-08:00","close_reason":"Branch deleted, already merged"}
{"id":"bd-xwvo","title":"bd create --rig flag loses event fields (event_kind, actor, payload)","description":"## Bug\n\nWhen creating events with `--rig` flag, the event-specific fields are not stored:\n- event_kind\n- actor\n- target\n- payload\n\n## Reproduction\n\n```bash\n# Without --rig (works)\nbd create --type=event --title='Test' --event-category=session.ended --event-actor=test --event-payload='{\"x\":1}' --silent\n# Fields are stored correctly\n\n# With --rig (broken)\nbd create --type=event --title='Test' --event-category=session.ended --event-actor=test --event-payload='{\"x\":1}' --rig=gastown --silent\n# event_kind, actor, payload are NOT stored\n```\n\n## Impact\n\nThe `gt costs record` command needs to create session events in rig-specific beads, but cannot use `--rig` flag due to this bug.\n\n## Workaround\n\nRun `bd create` from within the rig directory so it auto-detects the correct beads location.","status":"closed","priority":2,"issue_type":"bug","created_at":"2026-01-02T13:23:21.936098-08:00","created_by":"gastown/polecats/capable","updated_at":"2026-01-02T17:06:09.247746-08:00","closed_at":"2026-01-02T17:06:09.247746-08:00","close_reason":"Fixed: createInRig now extracts all missing fields from cmd.Flags() instead of relying on parameters"}
{"id":"bd-y0e4","title":"Code smell: Storage interface has 50+ methods - consider interface segregation","description":"The Storage interface in internal/storage/storage.go has 50+ methods covering:\n\n- Issue CRUD (CreateIssue, GetIssue, UpdateIssue, DeleteIssue, SearchIssues)\n- Dependencies (AddDependency, RemoveDependency, GetDependencies, GetDependents, etc.)\n- Labels (AddLabel, RemoveLabel, GetLabels, etc.)\n- Ready work (GetReadyWork, GetBlockedIssues, etc.)\n- Events/Comments\n- Statistics\n- Dirty tracking\n- Export hash tracking\n- ID generation\n- Config/Metadata\n- Transactions\n- Lifecycle\n\nWhile this is a valid design for a storage abstraction, consider the Interface Segregation Principle:\n\n1. Split into smaller interfaces: IssueStorage, DependencyStorage, LabelStorage, etc.\n2. Compose them: `type Storage interface { IssueStorage; DependencyStorage; ... }`\n3. This allows more focused testing and clearer API contracts\n\nLocation: internal/storage/storage.go:79-197","status":"closed","priority":4,"issue_type":"chore","created_at":"2025-12-28T15:32:54.005169-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T17:21:44.466226-08:00","closed_at":"2025-12-28T17:21:44.466226-08:00","dependencies":[{"issue_id":"bd-y0e4","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.296641-08:00","created_by":"daemon"}]}
{"id":"bd-y0fj","title":"Issue lifecycle hooks (on-close, on-complete)","description":"Add hooks that fire on issue state transitions, enabling automation like closing linked GitHub issues.\n\n## Problem\n\nWe have `external_ref` to link beads issues to external systems (GitHub, Linear, Jira), but no mechanism to trigger actions when issues close. Currently:\n\n```\nbd-u2sc (external_ref: gh-692) closes → nothing happens\n```\n\n## Proposed Solution\n\n### Phase 1: Shell Hooks\n\nAdd `.beads-hooks/on-close.sh` (and similar lifecycle hooks):\n\n```bash\n# .beads-hooks/on-close.sh\n# Called by bd close with issue JSON on stdin\n#\\!/bin/bash\nissue=$(cat)\nexternal_ref=$(echo \"$issue\" | jq -r '.external_ref // empty')\nif [[ \"$external_ref\" == gh-* ]]; then\n number=\"${external_ref#gh-}\"\n gh issue close \"$number\" --repo steveyegge/beads \\\n --comment \"Completed via beads epic $(echo $issue | jq -r .id)\"\nfi\n```\n\n### Lifecycle Events\n\n| Event | Trigger | Use Cases |\n|-------|---------|-----------|\n| `on-close` | Issue closed | Close external refs, notify, archive |\n| `on-complete` | Epic children all done | Roll-up completion, close parent refs |\n| `on-status-change` | Any status transition | Sync to external systems |\n\n### Phase 2: Molecule Completion Handlers\n\nMolecules could define completion actions:\n\n```yaml\nname: github-issue-tracker\non_complete:\n - action: shell\n command: gh issue close {{external_ref}} --repo {{repo}}\n - action: mail\n to: mayor/\n subject: \"Epic {{id}} completed\"\n```\n\n### Phase 3: Gas Town Integration\n\nFor full Gas Town deployments:\n- Witness observes closures via beads events\n- Routes to integration agents via mail\n- Agents handle external system interactions\n\n## Implementation Notes\n\n- Hooks should be async (don't block bd close)\n- Pass full issue JSON to hook via stdin\n- Support hook timeout and failure handling\n- Consider `--no-hooks` flag for bulk operations\n\n## Related\n\n- `external_ref` field already exists (GH#142)\n- Cross-project deps: bd-h807, bd-d9mu\n- Git hooks: .beads-hooks/ pattern established\n\n## Use Cases\n\n1. **GitHub integration**: Close GH issues when beads epic completes\n2. **Linear sync**: Update Linear status when beads status changes \n3. **Notifications**: Send mail/Slack when high-priority issues close\n4. **Audit**: Log all closures to external system","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-22T14:46:04.846657-08:00","updated_at":"2025-12-22T14:50:40.35447-08:00","closed_at":"2025-12-22T14:50:40.35447-08:00"}