fix(autoimport): enable cold-start bootstrap for read-only commands (#977)

After devcontainer restart (cold-start), `bd --no-daemon show` failed to
find beads because:
1. Read-only commands skipped auto-import
2. Newly created DB had no issue_prefix set, causing import to fail

This fix enables seamless cold-start recovery by:
- Allowing read-only commands (show, list, etc.) to auto-bootstrap when
  JSONL exists but DB doesn't
- Setting needsBootstrap flag when falling back from read-only to
  read-write mode for missing DB
- Auto-detecting and setting issue_prefix from JSONL during auto-import
  when DB is uninitialized

Fixes: gt-b09

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Josh Nichols
2026-01-09 15:38:18 -05:00
committed by GitHub
parent edbfd5dc96
commit 5d1a8c2428
3 changed files with 96 additions and 25 deletions

View File

@@ -302,12 +302,12 @@
{"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":"2025-12-30T23:14:04.739788-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":"2025-12-30T23:14:04.805884-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-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-873k\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-02T13:44:53.615713-08:00"}
{"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-873k\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-02T13:44:53.615713-08:00","deleted_at":"2026-01-02T13:44:54.615713-08:00"}
{"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: 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-01T15:49:04.630499-08:00"}
{"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-ewcd\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-02T13:44:53.616613-08:00"}
{"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: 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-01T15:49:04.630499-08:00","deleted_at":"2026-01-01T15:49:05.630499-08:00"}
{"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-ewcd\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-02T13:44:53.616613-08:00","deleted_at":"2026-01-02T13:44:54.616613-08:00"}
{"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-533i\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-02T13:44:53.617404-08:00"}
{"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-533i\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-02T13:44:53.617404-08:00","deleted_at":"2026-01-02T13:44:54.617404-08:00"}
{"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-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-02T02:05:19.640253-08:00"}
@@ -495,7 +495,7 @@
{"id":"bd-ifuw","title":"test hook pin fix","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-23T04:43:15.598698-08:00","updated_at":"2025-12-23T04:51:29.438139-08:00","deleted_at":"2025-12-23T04:51:29.438139-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-iic1","title":"Phase 2.2: Switch bdt storage to TOON format","description":"Currently bdt stores issues in JSONL format in issues.toon file. Phase 2.2 must implement actual TOON format storage - this is the fundamental goal of the bdtoon project.\n\n## Current State (Phase 2.1)\n- issues.toon stores JSONL (intermediate format)\n- --toon flag allows output in TOON format for LLM consumption\n- Problem: We're not actually using TOON as the fundamental storage format\n\n## Required Work (Phase 2.2)\n1. Switch issue file I/O to write TOON format instead of JSONL\n - Update cmd/bdt/storage.go to use EncodeTOON for writing\n - Update cmd/bdt/storage.go to decode TOON (currently decodes JSON)\n - Ensure round-trip: write TOON → read TOON → write TOON is byte-identical\n\n2. Update command implementations\n - cmd/bdt/create.go: Write newly created issues to TOON format\n - cmd/bdt/list.go: Read issues from TOON format\n - cmd/bdt/show.go: Read from TOON format\n - cmd/bdt/import.go: Convert imported JSONL to TOON\n - cmd/bdt/export.go: Export TOON to JSONL (for bd compatibility)\n\n3. Implement TOON parser that handles gotoon's encoder-only limitation\n - Since gotoon doesn't decode TOON, need custom TOON→JSON decoder\n - OR continue storing TOON but decoding via intermediate JSON conversion\n\n4. Git merge driver optimization\n - TOON is line-oriented, better for 3-way merges than binary formats\n - Configure git merge driver for .toon files\n\n5. Comprehensive testing\n - Round-trip tests: Issue → TOON → storage → read → Issue\n - Merge conflict resolution tests with TOON format\n - Large issue set performance tests\n\n## Success Criteria\n- issues.toon stores actual TOON format (not JSONL)\n- bdt list reads from TOON file\n- bdt create writes to TOON file\n- Round-trip: create issue → list → show returns identical data\n- All 65+ tests still passing\n- Performance comparable to JSONL storage","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-19T14:05:41.394964404-07:00","updated_at":"2025-12-19T14:37:17.879612634-07:00","closed_at":"2025-12-19T14:37:17.879612634-07:00"}
{"id":"bd-ik1b","title":"Add --validate flag to bd create","description":"Opt-in strict mode that fails creation if required sections are missing. Uses ValidateTemplate() under the hood.","status":"closed","priority":3,"issue_type":"task","assignee":"beads/crew/emma","created_at":"2026-01-01T11:19:09.036754-08:00","created_by":"beads/crew/grip","updated_at":"2026-01-02T00:57:00.085005-08:00","closed_at":"2026-01-01T14:20:06.932309-08:00","dependencies":[{"issue_id":"bd-ik1b","depends_on_id":"bd-ou35","type":"parent-child","created_at":"2026-01-01T11:19:22.754415-08:00","created_by":"beads/crew/grip"},{"issue_id":"bd-ik1b","depends_on_id":"bd-615z","type":"blocks","created_at":"2026-01-01T11:19:23.964595-08:00","created_by":"beads/crew/grip"}]}
{"id":"bd-imxi","title":"Add bd setup gemini for Gemini CLI integration","description":"## Summary\n\nAdd `bd setup gemini` command to install beads hooks for Gemini CLI, similar to existing `bd setup claude`.\n\nRef: GitHub #845\n\n## Research Findings\n\n### Gemini CLI Has Compatible Hooks\n\nGemini CLI (https://geminicli.com/docs/hooks/) supports nearly identical hook events:\n\n| Gemini CLI Event | Claude Code Equivalent | Purpose |\n|------------------|----------------------|---------|\n| **SessionStart** | SessionStart | Initialize resources, load context |\n| **SessionEnd** | - | Clean up, save state |\n| **PreCompress** | PreCompact | Before context compression |\n| **BeforeAgent** | - | Add context before planning |\n\nConfiguration format is almost identical to Claude:\n```json\n{\n \"hooks\": {\n \"SessionStart\": [{\n \"matcher\": \"\",\n \"hooks\": [{\n \"type\": \"command\",\n \"command\": \"bd prime\"\n }]\n }]\n }\n}\n```\n\n### GEMINI.md Support\n\n- Hierarchical loading: ~/.gemini/GEMINI.md → project root → subdirectories\n- Concatenated into system prompt automatically\n- Gemini CLI also reads AGENTS.md (already supported via `bd setup factory`)\n\n### Antigravity\n\nGoogle's IDE-based agentic platform (released Nov 2025):\n- Uses Gemini 3 with 1M token context\n- Has \"knowledge base\" for saved context\n- Less documented - may share Gemini CLI infrastructure\n- Needs separate research for dedicated support\n\n## Implementation Plan\n\n### Phase 1: Core Gemini CLI Support\n\n1. **Create `cmd/bd/setup/gemini.go`**\n - Mirror structure from `claude.go`\n - Target: `~/.gemini/settings.json`\n - Install SessionStart and PreCompress hooks\n - Support --project flag for local settings\n - Support --stealth flag\n\n2. **Add doctor check in `cmd/bd/doctor/gemini.go`**\n - Check if hooks installed\n - Verify settings.json structure\n\n3. **Update `cmd/bd/setup.go`**\n - Add gemini subcommand\n - Wire up to setup/gemini.go\n\n### Phase 2: Optional Enhancements\n\n4. **GEMINI.md generation** (optional)\n - Could generate project-level GEMINI.md\n - Or document that AGENTS.md already works\n\n5. **Antigravity support** (separate issue)\n - Needs research on Antigravity's configuration system\n - May be able to share Gemini CLI hooks\n - May need IDE-specific integration\n\n## Open Questions\n\n1. Where does Gemini CLI store settings? Need to verify `~/.gemini/settings.json` path\n2. Does Gemini CLI use same JSON structure as Claude for hooks?\n3. Can one implementation cover both Gemini CLI and Antigravity?\n4. Should we generate GEMINI.md or rely on AGENTS.md?\n\n## Acceptance Criteria\n\n- [ ] `bd setup gemini` installs hooks to Gemini CLI settings\n- [ ] `bd setup gemini --check` verifies installation\n- [ ] `bd doctor` reports Gemini CLI integration status\n- [ ] Documentation updated in docs/SETUP.md","status":"closed","priority":2,"issue_type":"feature","created_at":"2026-01-01T23:47:07.399783-08:00","created_by":"beads/crew/wolf","updated_at":"2026-01-02T00:01:16.319278-08:00","closed_at":"2026-01-02T00:01:16.319278-08:00","close_reason":"Implemented bd setup gemini with SessionStart/PreCompress hooks","comments":[{"id":9,"issue_id":"bd-imxi","author":"beads/crew/wolf","text":"Deprioritizing Antigravity - focusing on Gemini CLI only. Antigravity may share the same hook infrastructure anyway, so Gemini CLI support might just work. Will revisit if there's demand.","created_at":"2026-01-02T07:55:13Z"}]}
{"id":"bd-imxi","title":"Add bd setup gemini for Gemini CLI integration","description":"## Summary\n\nAdd `bd setup gemini` command to install beads hooks for Gemini CLI, similar to existing `bd setup claude`.\n\nRef: GitHub #845\n\n## Research Findings\n\n### Gemini CLI Has Compatible Hooks\n\nGemini CLI (https://geminicli.com/docs/hooks/) supports nearly identical hook events:\n\n| Gemini CLI Event | Claude Code Equivalent | Purpose |\n|------------------|----------------------|---------|\n| **SessionStart** | SessionStart | Initialize resources, load context |\n| **SessionEnd** | - | Clean up, save state |\n| **PreCompress** | PreCompact | Before context compression |\n| **BeforeAgent** | - | Add context before planning |\n\nConfiguration format is almost identical to Claude:\n```json\n{\n \"hooks\": {\n \"SessionStart\": [{\n \"matcher\": \"\",\n \"hooks\": [{\n \"type\": \"command\",\n \"command\": \"bd prime\"\n }]\n }]\n }\n}\n```\n\n### GEMINI.md Support\n\n- Hierarchical loading: ~/.gemini/GEMINI.md → project root → subdirectories\n- Concatenated into system prompt automatically\n- Gemini CLI also reads AGENTS.md (already supported via `bd setup factory`)\n\n### Antigravity\n\nGoogle's IDE-based agentic platform (released Nov 2025):\n- Uses Gemini 3 with 1M token context\n- Has \"knowledge base\" for saved context\n- Less documented - may share Gemini CLI infrastructure\n- Needs separate research for dedicated support\n\n## Implementation Plan\n\n### Phase 1: Core Gemini CLI Support\n\n1. **Create `cmd/bd/setup/gemini.go`**\n - Mirror structure from `claude.go`\n - Target: `~/.gemini/settings.json`\n - Install SessionStart and PreCompress hooks\n - Support --project flag for local settings\n - Support --stealth flag\n\n2. **Add doctor check in `cmd/bd/doctor/gemini.go`**\n - Check if hooks installed\n - Verify settings.json structure\n\n3. **Update `cmd/bd/setup.go`**\n - Add gemini subcommand\n - Wire up to setup/gemini.go\n\n### Phase 2: Optional Enhancements\n\n4. **GEMINI.md generation** (optional)\n - Could generate project-level GEMINI.md\n - Or document that AGENTS.md already works\n\n5. **Antigravity support** (separate issue)\n - Needs research on Antigravity's configuration system\n - May be able to share Gemini CLI hooks\n - May need IDE-specific integration\n\n## Open Questions\n\n1. Where does Gemini CLI store settings? Need to verify `~/.gemini/settings.json` path\n2. Does Gemini CLI use same JSON structure as Claude for hooks?\n3. Can one implementation cover both Gemini CLI and Antigravity?\n4. Should we generate GEMINI.md or rely on AGENTS.md?\n\n## Acceptance Criteria\n\n- [ ] `bd setup gemini` installs hooks to Gemini CLI settings\n- [ ] `bd setup gemini --check` verifies installation\n- [ ] `bd doctor` reports Gemini CLI integration status\n- [ ] Documentation updated in docs/SETUP.md","status":"closed","priority":2,"issue_type":"feature","created_at":"2026-01-01T23:47:07.399783-08:00","created_by":"beads/crew/wolf","updated_at":"2026-01-02T00:01:16.319278-08:00","closed_at":"2026-01-02T00:01:16.319278-08:00","close_reason":"Implemented bd setup gemini with SessionStart/PreCompress hooks","comments":[{"id":5,"issue_id":"bd-imxi","author":"beads/crew/wolf","text":"Deprioritizing Antigravity - focusing on Gemini CLI only. Antigravity may share the same hook infrastructure anyway, so Gemini CLI support might just work. Will revisit if there's demand.","created_at":"2026-01-02T07:55:13Z"}]}
{"id":"bd-in7","title":"Test message","description":"Hello world","status":"tombstone","priority":2,"issue_type":"message","created_at":"2025-12-17T23:16:13.184946-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":"message"}
{"id":"bd-indn","title":"bd template commands fail with daemon mode","description":"The `bd template show` and `bd template instantiate` commands fail with 'Error loading template: no database connection' when daemon is running.\n\n**Reproduction:**\n```bash\nbd daemon --start\nbd template show bd-qqc # Error: no database connection\nbd template show bd-qqc --no-daemon # Works\n```\n\n**Expected:** Template commands should work with daemon like other commands.\n\n**Workaround:** Use `--no-daemon` flag.\n\n**Location:** Likely in cmd/bd/template.go - daemon RPC path not implemented for template operations.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-18T22:57:35.16596-08:00","updated_at":"2025-12-23T22:40:32.763595-08:00","closed_at":"2025-12-23T22:40:32.763595-08:00"}
{"id":"bd-io8c","title":"Improve test coverage for internal/syncbranch (33.0% → 70%)","description":"Improve test coverage for internal/syncbranch package from 27% to 70%.\n\n## Current State\n- Coverage: 27.0%\n- Files: syncbranch.go, worktree.go\n- Tests: syncbranch_test.go (basic tests exist)\n\n## Functions Needing Tests\n\n### syncbranch.go (config management)\n- [x] ValidateBranchName - has tests\n- [ ] Get - needs store mock tests\n- [ ] GetFromYAML - needs YAML parsing tests\n- [ ] IsConfigured - needs file system tests\n- [ ] IsConfiguredWithDB - needs DB path tests\n- [ ] Set - needs store mock tests\n- [ ] Unset - needs store mock tests\n\n### worktree.go (git operations) - PRIORITY\n- [ ] CommitToSyncBranch - needs git repo fixture tests\n- [ ] PullFromSyncBranch - needs merge scenario tests\n- [ ] CheckDivergence - needs ahead/behind tests\n- [ ] ResetToRemote - needs reset scenario tests\n- [ ] performContentMerge - needs 3-way merge tests\n- [ ] extractJSONLFromCommit - needs git show tests\n- [ ] hasChangesInWorktree - needs dirty state tests\n- [ ] commitInWorktree - needs commit scenario tests\n\n## Implementation Guide\n\n1. **Use testutil fixtures:**\n ```go\n import \"github.com/steveyegge/beads/internal/testutil/fixtures\"\n \n func TestCommitToSyncBranch(t *testing.T) {\n repo := fixtures.NewGitRepo(t)\n defer repo.Cleanup()\n // ... test scenarios\n }\n ```\n\n2. **Test scenarios for worktree.go:**\n - Clean commit (no conflicts)\n - Non-fast-forward push (diverged)\n - Merge conflict resolution\n - Empty changes (nothing to commit)\n\n3. **Mock storage for syncbranch.go:**\n ```go\n store := memory.New()\n // Set up test config\n syncbranch.Set(ctx, store, \"beads-sync\")\n ```\n\n## Success Criteria\n- Coverage ≥ 70%\n- All public functions have at least one test\n- Edge cases covered for git operations\n- Tests pass with `go test -race ./internal/syncbranch`\n\n## Run Tests\n```bash\ngo test -v -cover ./internal/syncbranch\ngo test -race ./internal/syncbranch\n```","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-13T20:43:02.079145-08:00","updated_at":"2025-12-23T13:46:10.191435-08:00","closed_at":"2025-12-23T13:46:10.191435-08:00","dependencies":[{"issue_id":"bd-io8c","depends_on_id":"bd-iz5t","type":"parent-child","created_at":"2025-12-23T12:44:07.213092-08:00","created_by":"daemon"}]}
@@ -507,7 +507,7 @@
{"id":"bd-irah","title":"Add refs field for cross-references with relationship type","description":"The refs field enables rich relationships beyond parent/child and depends-on.\n\nStructure:\n refs: [{id: string, rel: string}]\n\nRelationship types:\n- until: active until target closes\n- caused_by: triggered by target\n- relates_to: general association\n- supersedes: replaces target\n- validates: approval relationship\n\nExample:\n refs:\n - id: gt-abc1\n rel: until\n - id: hq-xyz9\n rel: caused_by\n\nEnables:\n- bd show gt-abc1 --refs (what references this?)\n- Conditional state (muted UNTIL issue closes)\n- Audit trails (this event CAUSED_BY that issue)","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-30T15:15:34.948913-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-30T18:15:53.221991-08:00","closed_at":"2025-12-30T15:51:38.291217-08:00"}
{"id":"bd-is6m","title":"Add gate checking to Deacon patrol loop","description":"Integrate gate checking into Deacon's patrol cycle.\n\n## Patrol Integration\n```go\nfunc (d *Deacon) checkGates(ctx context.Context) {\n gates, _ := d.store.ListOpenGates(ctx)\n \n for _, gate := range gates {\n // Check timeout\n if time.Since(gate.CreatedAt) \u003e gate.Timeout {\n d.notifyWaiters(gate, \"timeout\")\n d.closeGate(gate, \"timed out\")\n continue\n }\n \n // Check condition\n if d.checkCondition(gate.AwaitType, gate.AwaitID) {\n d.notifyWaiters(gate, \"cleared\")\n d.closeGate(gate, \"condition met\")\n }\n }\n}\n```\n\n## Note\nThis task is in Gas Town (gt), not beads. May need to be moved there.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T11:44:36.839709-08:00","updated_at":"2025-12-23T12:19:44.204647-08:00","closed_at":"2025-12-23T12:19:44.204647-08:00","dependencies":[{"issue_id":"bd-is6m","depends_on_id":"bd-udsi","type":"parent-child","created_at":"2025-12-23T11:44:52.909253-08:00","created_by":"daemon"},{"issue_id":"bd-is6m","depends_on_id":"bd-u66e","type":"blocks","created_at":"2025-12-23T11:44:56.428084-08:00","created_by":"daemon"}]}
{"id":"bd-it19","title":"Code smell: show.go is 1592 lines - needs splitting","description":"cmd/bd/show.go is 1592 lines mixing data fetching, transformation, output formatting, and thread reconstruction.\n\n**Problem:**\n- Too large to understand and maintain\n- Poor separation of concerns\n- Hard to test individual components\n\n**Acceptance Criteria:**\n- [ ] Extract formatting into show_formatter.go\n- [ ] Extract thread reconstruction into show_threads.go\n- [ ] Each file under 500 lines\n- [ ] No functionality changes\n- [ ] Tests pass","status":"closed","priority":2,"issue_type":"chore","created_at":"2025-12-28T18:59:00.865612-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T19:01:18.42196-08:00","closed_at":"2025-12-28T19:01:18.42196-08:00","dependencies":[{"issue_id":"bd-it19","depends_on_id":"bd-ox1o","type":"blocks","created_at":"2025-12-28T19:00:23.61907-08:00","created_by":"daemon"}]}
{"id":"bd-iutu","title":"Test comment display","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T17:50:24.269413-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-27T17:53:39.950742-08:00","comments":[{"id":5,"issue_id":"bd-iutu","author":"beads/crew/dave","text":"This is a test comment","created_at":"2025-12-28T01:50:30Z"}],"deleted_at":"2025-12-27T17:53:39.950742-08:00","deleted_by":"beads/crew/dave","delete_reason":"manual delete","original_type":"task"}
{"id":"bd-iutu","title":"Test comment display","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T17:50:24.269413-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-27T17:53:39.950742-08:00","comments":[{"id":6,"issue_id":"bd-iutu","author":"beads/crew/dave","text":"This is a test comment","created_at":"2025-12-28T01:50:30Z"}],"deleted_at":"2025-12-27T17:53:39.950742-08:00","deleted_by":"beads/crew/dave","delete_reason":"manual delete","original_type":"task"}
{"id":"bd-iw4z","title":"Compound visualization in bd mol show","description":"Enhance bd mol show to display compound structure.\n\nENHANCEMENTS:\n- Show constituent protos and how they're bonded\n- Display bond type (sequential/parallel) between components\n- Indicate attachment points\n- Show combined variable requirements across all protos\n\nEXAMPLE OUTPUT:\n\n Compound: proto-feature-with-tests\n Bonded from:\n └─ proto-feature (root)\n └─ proto-testing (sequential, after completion)\n \n Variables: {{name}}, {{version}}, {{test_suite}}\n \n Structure:\n proto-feature-with-tests\n ├─ Design feature {{name}}\n ├─ Implement core\n ├─ Write unit tests ← from proto-testing\n └─ Run test suite {{test_suite}} ← from proto-testing","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-21T00:59:26.71318-08:00","updated_at":"2026-01-02T13:44:53.619865-08:00","closed_at":"2026-01-02T13:42:51.390118-08:00","dependencies":[{"issue_id":"bd-iw4z","depends_on_id":"bd-o5xe","type":"parent-child","created_at":"2025-12-21T00:59:51.500865-08:00","created_by":"daemon"},{"issue_id":"bd-iw4z","depends_on_id":"bd-rnnr","type":"blocks","created_at":"2025-12-21T00:59:51.891643-08:00","created_by":"daemon"}]}
{"id":"bd-iz5t","title":"Swarm: 13 beads backlog issues for polecat execution","description":"## Swarm Overview\n\n13 issues prepared for parallel polecat execution. All issues have been enhanced with concrete implementation guidance, file lists, and success criteria.\n\n## Issue List\n\n### Bug (1) - HIGH PRIORITY\n| ID | Priority | Title |\n|----|----------|-------|\n| bd-phtv | P1 | Pinned field overwritten by subsequent commands |\n\n### Test Coverage (3)\n| ID | Package | Target |\n|----|---------|--------|\n| bd-io8c | internal/syncbranch | 27% → 70% |\n| bd-thgk | internal/compact | 17% → 70% |\n| bd-tvu3 | internal/beads | 48% → 70% |\n\n### Code Quality (3)\n| ID | Task |\n|----|------|\n| bd-qioh | FatalError pattern standardization |\n| bd-rgyd | Split queries.go (1704 lines → 5 files) |\n| bd-u2sc.3 | Split cmd/bd files (sync/init/show/compact) |\n\n### Features (4)\n| ID | Task |\n|----|------|\n| bd-au0.5 | Search date/priority filters |\n| bd-ykd9 | Doctor --fix auto-repair |\n| bd-g4b4 | Close hooks system |\n| bd-likt | Gate daemon RPC |\n\n### Polish (2)\n| ID | Task |\n|----|------|\n| bd-4qfb | Doctor output formatting |\n| bd-u2sc.4 | slog structured logging |\n\n## Issue Details\n\nAll issues have been enhanced with:\n- Concrete file lists to modify\n- Code snippets and patterns\n- Success criteria\n- Test commands\n\nRun `bd show \u003cid\u003e` for full details on any issue.\n\n## Execution Notes\n\n- All issues are independent (no blockers between them)\n- bd-phtv (P1 bug) should get priority - affects bd pin functionality\n- Test coverage tasks are straightforward but time-consuming\n- File split tasks (bd-rgyd, bd-u2sc.3) are mechanical but important\n\n## Completed During Prep\n\n- bd-ucgz (P2 bug) - Fixed inline: external deps orphan check (commit f2db0a1d)\n- Moved 5 gastown issues out of beads backlog (gt-dh65, gt-ng6g, gt-fqcz, gt-gswn, gt-rw2z)\n- Deferred 4 premature/post-1.0 issues\n- Closed bd-udsi epic (core implementation complete)","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-23T12:43:58.427835-08:00","updated_at":"2025-12-23T20:26:50.629471-08:00","closed_at":"2025-12-23T20:26:50.629471-08:00"}
{"id":"bd-j0tr","title":"Phase 1.3: Basic TOON read/write operations","description":"Add basic TOON read/write operations to bdt executable. Implement create, list, and show commands that use the internal/toon package for encoding/decoding to TOON format.\n\n## Subtasks\n1. Implement bdt create command - Create issues and serialize to TOON format\n2. Implement bdt list command - Read issues.toon and display all issues\n3. Implement bdt show command - Display single issue by ID\n4. Add file I/O operations for issues.toon\n5. Integrate internal/toon package (EncodeTOON, DecodeJSON)\n6. Write tests for create, list, show operations\n\n## Files to Create/Modify\n- cmd/bdt/create.go - Create command\n- cmd/bdt/list.go - List command \n- cmd/bdt/show.go - Show command\n- cmd/bdt/storage.go - File I/O helper\n\n## Success Criteria\n- bdt create \"Issue title\" creates and saves to issues.toon\n- bdt list displays all issues in human-readable format\n- bdt list --json shows JSON output\n- bdt show \u003cid\u003e displays single issue\n- Issues round-trip correctly: create → list → show\n- All tests passing with \u003e80% coverage","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-19T12:59:54.270296918-07:00","updated_at":"2025-12-19T13:09:00.196045685-07:00","closed_at":"2025-12-19T13:09:00.196045685-07:00"}
@@ -537,7 +537,7 @@
{"id":"bd-kpy","title":"Sync race: rebase-based divergence recovery resurrects tombstones","description":"## Problem\nWhen two repos sync simultaneously, tombstones can be resurrected:\n\n1. Repo A deletes issue (creates tombstone), pushes to sync branch\n2. Repo B (with 'closed' status) exports and tries to push\n3. Push fails (non-fast-forward)\n4. fetchAndRebaseInWorktree does git rebase\n5. Git rebase applies B's 'closed' patch on top of A's 'tombstone'\n6. TEXT-level rebase doesn't invoke beads merge driver\n7. 'closed' overwrites 'tombstone' = resurrection\n\n## Root Cause\nCommitToSyncBranch uses git rebase for divergence recovery, but rebase is text-level, not content-level. The proper content-level merge in PullFromSyncBranch handles tombstones correctly, but it runs AFTER the problematic push.\n\n## Proposed Fix\nOption 1: Don't push in CommitToSyncBranch - let PullFromSyncBranch handle merge+push\nOption 2: Replace git rebase with content-level merge in fetchAndRebaseInWorktree\nOption 3: Reorder sync steps: Export → Pull/Merge → Commit → Push\n\n## Workaround Applied\nExcluded tombstones from orphan detection warnings (commit 1e97d9cc).\n\nSee also: bd-3852 (Add orphan detection migration)","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-17T23:29:33.049272-08:00","updated_at":"2025-12-24T22:41:09.184574-08:00","closed_at":"2025-12-24T22:41:09.184574-08:00"}
{"id":"bd-kqo1","title":"Show pin indicator in bd list output","description":"Add a visual indicator (e.g., pin emoji or [P] marker) for pinned issues in bd list output so users can easily identify them.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-18T23:33:47.402549-08:00","updated_at":"2025-12-21T11:30:27.272768-08:00","closed_at":"2025-12-21T11:30:27.272768-08:00","dependencies":[{"issue_id":"bd-kqo1","depends_on_id":"bd-0vg","type":"blocks","created_at":"2025-12-18T23:33:56.771791-08:00","created_by":"daemon"},{"issue_id":"bd-kqo1","depends_on_id":"bd-7h5","type":"blocks","created_at":"2025-12-18T23:34:07.985271-08:00","created_by":"daemon"}]}
{"id":"bd-kqw0","title":"Update local installation","description":"Run install script or brew upgrade to get new version locally: curl -fsSL .../install.sh | bash","status":"tombstone","priority":1,"issue_type":"task","created_at":"2025-12-21T13:52:33.066452-08:00","updated_at":"2025-12-21T13:53:49.656073-08:00","deleted_at":"2025-12-21T13:53:49.656073-08:00","deleted_by":"stevey","delete_reason":"manual delete","original_type":"task"}
{"id":"bd-kvus","title":"bd sync fails when .beads/redirect points to different repo","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-31T11:36:35.614607-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-31T14:24:12.672707-08:00","closed_at":"2025-12-31T13:31:39.491734-08:00","comments":[{"id":8,"issue_id":"bd-kvus","author":"gastown/crew/max","text":"## Problem\n\nWhen `.beads/redirect` points to a different repository (e.g., `../../mayor/rig/.beads`), `bd sync` fails with:\n\n```\nError: committing to sync branch: failed to check for changes in worktree: git status failed in worktree: exit status 128\n```\n\n## Root Cause\n\n`bd sync` uses `getBeadsWorktreePath()` which calculates the worktree path based on the **source** repo's `.git` directory, not the **target** repo after following the redirect.\n\nFor example:\n- Running from: `/gastown/crew/max` \n- Redirect points to: `../../mayor/rig/.beads`\n- bd looks for worktree at: `/gastown/crew/max/.git/beads-worktrees/beads-sync` (wrong)\n- Should look at: `/gastown/mayor/rig/.git/beads-worktrees/beads-sync` (correct)\n\n## Reproduction\n\n```bash\n# From a clone with redirect\ncd /Users/stevey/gt/gastown/crew/max\ncat .beads/redirect # Shows ../../mayor/rig/.beads\nbd sync # Fails with exit status 128\n\n# Workaround: run from redirect target\ncd /Users/stevey/gt/gastown/mayor/rig\nbd sync # Works\n```\n\n## Fix\n\nIn `internal/syncbranch/worktree.go`, `getBeadsWorktreePath()` should resolve the redirect first and use the target repo's git directory for worktree operations.","created_at":"2025-12-31T19:36:51Z"}]}
{"id":"bd-kvus","title":"bd sync fails when .beads/redirect points to different repo","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-31T11:36:35.614607-08:00","created_by":"gastown/crew/max","updated_at":"2025-12-31T14:24:12.672707-08:00","closed_at":"2025-12-31T13:31:39.491734-08:00","comments":[{"id":7,"issue_id":"bd-kvus","author":"gastown/crew/max","text":"## Problem\n\nWhen `.beads/redirect` points to a different repository (e.g., `../../mayor/rig/.beads`), `bd sync` fails with:\n\n```\nError: committing to sync branch: failed to check for changes in worktree: git status failed in worktree: exit status 128\n```\n\n## Root Cause\n\n`bd sync` uses `getBeadsWorktreePath()` which calculates the worktree path based on the **source** repo's `.git` directory, not the **target** repo after following the redirect.\n\nFor example:\n- Running from: `/gastown/crew/max` \n- Redirect points to: `../../mayor/rig/.beads`\n- bd looks for worktree at: `/gastown/crew/max/.git/beads-worktrees/beads-sync` (wrong)\n- Should look at: `/gastown/mayor/rig/.git/beads-worktrees/beads-sync` (correct)\n\n## Reproduction\n\n```bash\n# From a clone with redirect\ncd /Users/stevey/gt/gastown/crew/max\ncat .beads/redirect # Shows ../../mayor/rig/.beads\nbd sync # Fails with exit status 128\n\n# Workaround: run from redirect target\ncd /Users/stevey/gt/gastown/mayor/rig\nbd sync # Works\n```\n\n## Fix\n\nIn `internal/syncbranch/worktree.go`, `getBeadsWorktreePath()` should resolve the redirect first and use the target repo's git directory for worktree operations.","created_at":"2025-12-31T19:36:51Z"}]}
{"id":"bd-kvwf","title":"Merge: quartz-1767142008267","description":"branch: polecat/quartz-1767142008267\ntarget: main\nsource_issue: quartz-1767142008267\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-30T16:50:35.727954-08:00","created_by":"beads/polecats/quartz","updated_at":"2025-12-30T18:11:07.891839-08:00","closed_at":"2025-12-30T18:11:07.891839-08:00","close_reason":"Stale merge request - branch no longer exists"}
{"id":"bd-kwjh","title":"Wisp storage: ephemeral molecule tracking","description":"Implement ephemeral molecule storage for patrol cycles.\n\n## Architecture\n\nWisps are ephemeral molecules stored in `.beads-wisps/` (gitignored).\nWhen squashed, they create digests in permanent `.beads/`.\n\n**Storage is per-rig, not per-role**: Witness and Refinery share mayor/rig's \n`.beads-wisps/` since they execute from that context.\n\n## Design Doc\nSee: gastown/mayor/rig/docs/wisp-architecture.md\n\n## Key Requirements\n\n1. **Ephemeral storage**: `.beads-wisps/` directory, gitignored\n2. **Bond with --wisp**: Creates in wisps instead of permanent\n3. **Squash**: Deletes wisp, creates digest in permanent beads\n4. **Burn**: Deletes wisp, no digest\n5. **Wisp commands**: `bd wisp list`, `bd wisp gc`\n\n## Storage Locations\n\n| Context | Location |\n|---------|----------|\n| Rig (Deacon, Witness, Refinery) | mayor/rig/.beads-wisps/ |\n| Polecat (if used) | polecats/\u003cname\u003e/.beads-wisps/ |\n\n## Children (to be created)\n- bd mol bond --wisp flag\n- .beads-wisps/ storage backend\n- bd mol squash handles wisp to permanent\n- bd wisp list command\n- bd wisp gc command (orphan cleanup)","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-21T23:34:47.188806-08:00","updated_at":"2025-12-22T01:12:53.965768-08:00","closed_at":"2025-12-22T01:12:53.965768-08:00"}
{"id":"bd-kwjh.1","title":".beads-ephemeral/ storage backend","description":"Implement ephemeral storage layer for wisps.\n\n## Requirements\n- New storage location: .beads-ephemeral/issues.jsonl (sibling to .beads/)\n- Gitignored by default (add to .beads/.gitignore)\n- Same JSONL format as regular beads\n- Config option: ephemeral.directory (relative path)\n- ephemeral.enabled config flag\n\n## Storage Behavior\n- Ephemeral issues have `ephemeral: true` field\n- No sync to remote (local only)\n- No daemon tracking needed (transient)\n\n## Implementation\n- Add EphemeralStore in storage package\n- Initialize on demand when --ephemeral flag used\n- Share Issue struct, just different storage path","status":"tombstone","priority":1,"issue_type":"task","created_at":"2025-12-22T00:06:46.706026-08:00","updated_at":"2025-12-22T00:08:26.009875-08:00","dependencies":[{"issue_id":"bd-kwjh.1","depends_on_id":"bd-kwjh","type":"parent-child","created_at":"2025-12-22T00:06:46.706461-08:00","created_by":"daemon"}],"deleted_at":"2025-12-22T00:08:26.009875-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
@@ -600,45 +600,38 @@
{"id":"bd-mol-0qm","title":"mol-beads-release","description":"attached_args: Release v0.38.0 - execute each step in order, verify before proceeding to next\n\nRelease checklist for beads version 0.38.0.\n\nThis molecule ensures all release steps are completed properly.\nVariable: 0.38.0 - target version (e.g., 0.35.0)\n\n## Step: update-release-notes\nUpdate cmd/bd/info.go with release notes for 0.38.0.\n\nAdd a new VersionChange entry at the top of versionChanges slice:\n```go\n{\n Version: \"0.38.0\",\n Date: \"YYYY-MM-DD\",\n Changes: []string{\n \"NEW: Feature description\",\n \"FIX: Bug fix description\",\n \"IMPROVED: Enhancement description\",\n },\n},\n```\n\nRun `git log --oneline v\u003cprevious\u003e..HEAD` to see what changed.\n\n## Step: update-changelog\nUpdate CHANGELOG.md with detailed release notes.\n\nAdd a new section after [Unreleased]:\n```markdown\n## [0.38.0] - YYYY-MM-DD\n\n### Added\n- **Feature name** (issue-id) - Description\n\n### Changed\n- **Change description** (issue-id)\n\n### Fixed\n- **Bug fix** (issue-id) - Description\n```\n\nSort by importance, not chronologically.\nNeeds: update-release-notes\n\n## Step: bump-version\nRun the version bump script.\n\n```bash\n./scripts/bump-version.sh 0.38.0\n```\n\nThis updates version in all files:\n- cmd/bd/version.go\n- .claude-plugin/*.json\n- integrations/beads-mcp/pyproject.toml\n- npm-package/package.json\n- Hook templates\n\nNeeds: update-changelog\n\n## Step: run-tests\nRun tests and verify lint passes.\n\n```bash\ngo test -short ./...\n```\n\nCI will run full lint, but fix any obvious issues first.\nNeeds: bump-version\n\n## Step: commit-release\nCommit the release changes.\n\n```bash\ngit add -A\ngit commit -m \"chore: bump version to v0.38.0\"\n```\n\nNeeds: run-tests\n\n## Step: push-and-tag\nPush commit and create release tag.\n\n```bash\ngit push origin main\ngit tag v0.38.0\ngit push origin v0.38.0\n```\n\nThis triggers GitHub Actions release workflow.\nNeeds: commit-release\n\n## Step: wait-for-ci\nWait for GitHub Actions to complete.\n\nMonitor: https://github.com/steveyegge/beads/actions\n\nCI will:\n- Build binaries via GoReleaser\n- Create GitHub Release with assets\n- Publish to npm (@beads/bd)\n- Publish to PyPI (beads-mcp)\n- Update Homebrew tap\n\nWait until all jobs succeed (~5-10 min).\nNeeds: push-and-tag\n\n## Step: verify-release\nVerify the release is complete.\n\n```bash\n# Check GitHub release\ngh release view v0.38.0\n\n# Check Homebrew\nbrew update \u0026\u0026 brew info steveyegge/beads/bd\n\n# Check npm\nnpm view @beads/bd version\n\n# Check PyPI\npip index versions beads-mcp\n```\n\nNeeds: wait-for-ci\n\n## Step: update-local\nUpdate local installations.\n\n```bash\n# Upgrade Homebrew\nbrew upgrade steveyegge/beads/bd\n\n# Or install from source\n./scripts/bump-version.sh 0.38.0 --install\n\n# Install MCP locally\npip install -e integrations/beads-mcp\n\n# Restart daemons\npkill -f \"bd daemon\" || true\n```\n\nVerify: `bd --version` shows 0.38.0\nNeeds: verify-release\n\n## Step: manual-publish\n(Optional) Manual publish if CI failed.\n\n```bash\n# npm (requires npm login)\n./scripts/bump-version.sh 0.38.0 --publish-npm\n\n# PyPI (requires TWINE credentials)\n./scripts/bump-version.sh 0.38.0 --publish-pypi\n\n# Or both\n./scripts/bump-version.sh 0.38.0 --publish-all\n```\n\nOnly needed if CI publishing failed.\nNeeds: wait-for-ci","status":"tombstone","priority":2,"issue_type":"molecule","created_at":"2025-12-27T00:29:46.694495-08:00","updated_at":"2025-12-28T01:24:39.173644-08:00","deleted_at":"2025-12-28T01:24:39.173644-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"molecule"}
{"id":"bd-mol-0rq","title":"Verify npm package","description":"Confirm npm package published.\n\n```bash\nnpm show @beads/bd version\n```\n\nShould show 0.99.0-test.\n\nAlso check: https://www.npmjs.com/package/@beads/bd","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.467054-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-0x4","title":"Preflight: Pull latest","description":"Ensure we're up to date with origin.\n\n```bash\ngit pull --rebase\n```\n\nResolve any conflicts before proceeding.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T16:29:32.299205-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","close_reason":"Already up to date","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-117","title":"Restart daemons","description":"Restart bd daemons to pick up new version.\n\n```bash\nbd daemons killall\n```\n\nDaemons will auto-restart with new version on next bd command.\n\nVerify:\n```bash\nbd daemons list\n```","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.999837-08:00","updated_at":"2025-12-28T01:24:39.175701-08:00","dependencies":[{"issue_id":"bd-mol-117","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.011531-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.175701-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-172","title":"Review changes since last release","description":"Understand what's being released.\n\n```bash\ngit log $(git describe --tags --abbrev=0)..HEAD --oneline\n```\n\nCategorize changes:\n- Features (feat:)\n- Fixes (fix:)\n- Breaking changes\n- Documentation","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.996753-08:00","updated_at":"2025-12-28T01:24:39.177206-08:00","dependencies":[{"issue_id":"bd-mol-172","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.0023-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.177206-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-117","title":"Restart daemons","description":"Restart bd daemons to pick up new version.\n\n```bash\nbd daemons killall\n```\n\nDaemons will auto-restart with new version on next bd command.\n\nVerify:\n```bash\nbd daemons list\n```","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.999837-08:00","updated_at":"2025-12-28T01:24:39.175701-08:00","deleted_at":"2025-12-28T01:24:39.175701-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-172","title":"Review changes since last release","description":"Understand what's being released.\n\n```bash\ngit log $(git describe --tags --abbrev=0)..HEAD --oneline\n```\n\nCategorize changes:\n- Features (feat:)\n- Fixes (fix:)\n- Breaking changes\n- Documentation","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.996753-08:00","updated_at":"2025-12-28T01:24:39.177206-08:00","deleted_at":"2025-12-28T01:24:39.177206-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-1hi","title":"Wait for CI","description":"Monitor GitHub Actions for release completion.\n\nhttps://github.com/steveyegge/beads/actions\n\nExpected time: 5-10 minutes\n\nWatch for:\n- Build artifacts (all platforms)\n- Test suite pass\n- npm publish\n- PyPI publish","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T16:29:32.301021-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","close_reason":"CI and Release workflows passed","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-1s6","title":"Release complete","description":"Release v0.99.0-test is complete!\n\nSummary:\n- All version files updated\n- Git tag pushed\n- CI artifacts built\n- npm and PyPI packages published\n- Local installation updated\n- Daemons restarted\n\nOptional next steps:\n- Announce on social media\n- Update documentation site\n- Close related milestone","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.46773-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-29b","title":"Update local installation","description":"Update local bd to the new version.\n\nOption 1 - Homebrew:\n```bash\nbrew upgrade bd\n```\n\nOption 2 - Install script:\n```bash\ncurl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash\n```\n\nVerify:\n```bash\nbd --version\n```\n\nShould show 0.99.0-test.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.467393-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-392","title":"Update info.go versionChanges","description":"Add entry to versionChanges in cmd/bd/info.go.\n\nThis powers `bd info --whats-new` for agents.\n\n```go\n\"0.99.0-test\": {\n \"summary\": \"Brief description\",\n \"changes\": []string{\n \"Key change 1\",\n \"Key change 2\",\n },\n},\n```\n\nFocus on workflow-impacting changes agents need to know.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.465438-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-3u1","title":"Verify GitHub release","description":"Check the GitHub releases page.\n\nhttps://github.com/steveyegge/beads/releases/tag/v0.99.0-test\n\nVerify:\n- Release created\n- Binaries attached (linux, darwin, windows)\n- Checksums present","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.466851-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-43m","title":"Review changes since last release","description":"Understand what's being released.\n\n```bash\ngit log $(git describe --tags --abbrev=0)..HEAD --oneline\n```\n\nCategorize changes:\n- Features (feat:)\n- Fixes (fix:)\n- Breaking changes\n- Documentation","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.465061-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-4bi","title":"Update local installation","description":"Update local bd to the new version.\n\nOption 1 - Homebrew:\n```bash\nbrew upgrade bd\n```\n\nOption 2 - Install script:\n```bash\ncurl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash\n```\n\nVerify:\n```bash\nbd --version\n```\n\nShould show 0.39.0.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.560034-08:00","updated_at":"2025-12-28T01:24:39.180156-08:00","dependencies":[{"issue_id":"bd-mol-4bi","depends_on_id":"bd-mol-5h4","type":"blocks","created_at":"2025-12-27T19:34:09.61331-08:00","created_by":"beads/crew/dave"},{"issue_id":"bd-mol-4bi","depends_on_id":"bd-mol-v3g","type":"blocks","created_at":"2025-12-27T19:34:09.615361-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.180156-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-4xo","title":"beads-release","description":"Beads release workflow - from version bump to verified release.\n\nThis formula orchestrates a complete release cycle:\n1. Preflight checks (clean git, up to date)\n2. Documentation updates (CHANGELOG, info.go)\n3. Version bump (all components)\n4. Git operations (commit, tag, push)\n5. CI verification (GitHub Actions)\n6. Artifact verification (GitHub, npm, PyPI)\n7. Local installation update\n8. Daemon restart\n\n## Usage\n\n```bash\nbd wisp create beads-release --var version=0.37.0\n```\n\nOr assign to a polecat:\n```bash\ngt sling beads/polecats/p1 --formula beads-release --var version=0.37.0\n```","status":"tombstone","priority":2,"issue_type":"epic","created_at":"2025-12-29T17:09:12.46423-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"epic"}
{"id":"bd-mol-54r","title":"Run bump-version.sh","description":"Update all component versions atomically.\n\n```bash\n./scripts/bump-version.sh 0.99.0-test\n```\n\nThis updates:\n- cmd/bd/version.go\n- .claude-plugin/*.json\n- integrations/beads-mcp/pyproject.toml\n- integrations/beads-mcp/src/beads_mcp/__init__.py\n- npm-package/package.json\n- Hook templates\n- README.md\n- CHANGELOG.md (adds date)","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.465615-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-5h4","title":"Verify npm package","description":"Confirm npm package published.\n\n```bash\nnpm show @beads/bd version\n```\n\nShould show 0.39.0.\n\nAlso check: https://www.npmjs.com/package/@beads/bd","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.55961-08:00","updated_at":"2025-12-28T01:24:39.182917-08:00","dependencies":[{"issue_id":"bd-mol-5h4","depends_on_id":"bd-mol-68e","type":"blocks","created_at":"2025-12-27T19:34:09.609272-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.182917-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-678","title":"Create release tag","description":"Create annotated git tag.\n\n```bash\ngit tag -a v0.39.0 -m \"Release v0.39.0\"\n```\n\nVerify: `git tag -l | tail -5`","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.998148-08:00","updated_at":"2025-12-29T12:39:45.162388-08:00","dependencies":[{"issue_id":"bd-mol-678","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.006262-08:00","created_by":"beads/crew/dave"},{"issue_id":"bd-mol-678","depends_on_id":"bd-mol-8ep","type":"blocks","created_at":"2025-12-27T19:31:51.018908-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-29T12:39:45.162388-08:00","deleted_by":"daemon","delete_reason":"stale release mol steps","original_type":"task"}
{"id":"bd-mol-678","title":"Create release tag","description":"Create annotated git tag.\n\n```bash\ngit tag -a v0.39.0 -m \"Release v0.39.0\"\n```\n\nVerify: `git tag -l | tail -5`","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.998148-08:00","updated_at":"2025-12-29T12:39:45.162388-08:00","dependencies":[{"issue_id":"bd-mol-678","depends_on_id":"bd-mol-8ep","type":"blocks","created_at":"2025-12-27T19:31:51.018908-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-29T12:39:45.162388-08:00","deleted_by":"daemon","delete_reason":"stale release mol steps","original_type":"task"}
{"id":"bd-mol-68e","title":"Verify GitHub release","description":"Check the GitHub releases page.\n\nhttps://github.com/steveyegge/beads/releases/tag/v0.39.0\n\nVerify:\n- Release created\n- Binaries attached (linux, darwin, windows)\n- Checksums present","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.559402-08:00","updated_at":"2025-12-28T01:24:39.184285-08:00","deleted_at":"2025-12-28T01:24:39.184285-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-7ix","title":"Preflight: Check git status","description":"Ensure working tree is clean before starting release.\n\n```bash\ngit status\n```\n\nIf there are uncommitted changes, either:\n- Commit them first\n- Stash them: `git stash`\n- Abort and resolve","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.556672-08:00","updated_at":"2025-12-28T01:24:39.185583-08:00","deleted_at":"2025-12-28T01:24:39.185583-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-7tp","title":"Push to main","description":"Push the release commit to origin.\n\n```bash\ngit push origin main\n```\n\nIf rejected, someone else pushed. Pull, rebase, try again.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.558743-08:00","updated_at":"2025-12-28T01:24:39.186846-08:00","deleted_at":"2025-12-28T01:24:39.186846-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-7yd","title":"Update CHANGELOG.md","description":"Write the [Unreleased] section with all changes for 0.99.0-test.\n\nFormat: Keep a Changelog (https://keepachangelog.com)\n\nSections:\n- ### Added\n- ### Changed\n- ### Fixed\n- ### Documentation\n\nThe bump script will stamp the date automatically.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.465251-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-83s","title":"Commit release","description":"Stage and commit all version changes.\n\n```bash\ngit add -A\ngit commit -m \"chore: Bump version to 0.41.0\"\n```\n\nReview the commit to ensure all expected files are included.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T16:29:32.300302-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","close_reason":"Release committed","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-8ep","title":"Commit release","description":"Stage and commit all version changes.\n\n```bash\ngit add -A\ngit commit -m \"chore: Bump version to 0.39.0\"\n```\n\nReview the commit to ensure all expected files are included.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.99794-08:00","updated_at":"2025-12-28T01:24:39.188062-08:00","dependencies":[{"issue_id":"bd-mol-8ep","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.005611-08:00","created_by":"beads/crew/dave"},{"issue_id":"bd-mol-8ep","depends_on_id":"bd-mol-mht","type":"blocks","created_at":"2025-12-27T19:31:51.017961-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.188062-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-8ep","title":"Commit release","description":"Stage and commit all version changes.\n\n```bash\ngit add -A\ngit commit -m \"chore: Bump version to 0.39.0\"\n```\n\nReview the commit to ensure all expected files are included.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.99794-08:00","updated_at":"2025-12-28T01:24:39.188062-08:00","dependencies":[{"issue_id":"bd-mol-8ep","depends_on_id":"bd-mol-mht","type":"blocks","created_at":"2025-12-27T19:31:51.017961-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.188062-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-8sw","title":"Verify PyPI package","description":"Confirm PyPI package published.\n\n```bash\npip index versions beads-mcp 2\u003e/dev/null | head -3\n```\n\nOr check: https://pypi.org/project/beads-mcp/\n\nShould show 0.41.0.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T16:29:32.301544-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","close_reason":"PyPI: beads-mcp 0.41.0 published","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-8zw","title":"Release complete","description":"Release v0.39.0 is complete!\n\nSummary:\n- All version files updated\n- Git tag pushed\n- CI artifacts built\n- npm and PyPI packages published\n- Local installation updated\n- Daemons restarted\n\nOptional next steps:\n- Announce on social media\n- Update documentation site\n- Close related milestone","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:51.000045-08:00","updated_at":"2025-12-28T01:24:39.18926-08:00","dependencies":[{"issue_id":"bd-mol-8zw","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.012163-08:00","created_by":"beads/crew/dave"},{"issue_id":"bd-mol-8zw","depends_on_id":"bd-mol-117","type":"blocks","created_at":"2025-12-27T19:31:51.030757-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.18926-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-8zw","title":"Release complete","description":"Release v0.39.0 is complete!\n\nSummary:\n- All version files updated\n- Git tag pushed\n- CI artifacts built\n- npm and PyPI packages published\n- Local installation updated\n- Daemons restarted\n\nOptional next steps:\n- Announce on social media\n- Update documentation site\n- Close related milestone","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:51.000045-08:00","updated_at":"2025-12-28T01:24:39.18926-08:00","dependencies":[{"issue_id":"bd-mol-8zw","depends_on_id":"bd-mol-117","type":"blocks","created_at":"2025-12-27T19:31:51.030757-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.18926-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-937","title":"Update CHANGELOG.md","description":"Write the [Unreleased] section with all changes for 0.39.0.\n\nFormat: Keep a Changelog (https://keepachangelog.com)\n\nSections:\n- ### Added\n- ### Changed\n- ### Fixed\n- ### Documentation\n\nThe bump script will stamp the date automatically.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.557415-08:00","updated_at":"2025-12-28T01:24:39.19064-08:00","deleted_at":"2025-12-28T01:24:39.19064-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-9ea","title":"beads-release","description":"Beads release workflow - from version bump to verified release.\n\nThis formula orchestrates a complete release cycle:\n1. Preflight checks (clean git, up to date)\n2. Documentation updates (CHANGELOG, info.go)\n3. Version bump (all components)\n4. Git operations (commit, tag, push)\n5. CI verification (GitHub Actions)\n6. Artifact verification (GitHub, npm, PyPI)\n7. Local installation update\n8. Daemon restart\n\n## Usage\n\n```bash\nbd wisp create beads-release --var version=0.37.0\n```\n\nOr assign to a polecat:\n```bash\ngt sling beads/polecats/p1 --formula beads-release --var version=0.37.0\n```","status":"tombstone","priority":2,"issue_type":"epic","created_at":"2025-12-27T19:31:50.995481-08:00","updated_at":"2025-12-28T02:21:04.82393-08:00","deleted_at":"2025-12-28T02:21:04.82393-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"epic"}
{"id":"bd-mol-9ry","title":"Push release tag","description":"Push the version tag to trigger CI release.\n\n```bash\ngit push origin v0.39.0\n```\n\nThis triggers GitHub Actions to build artifacts and publish.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.55896-08:00","updated_at":"2025-12-28T01:24:39.191874-08:00","dependencies":[{"issue_id":"bd-mol-9ry","depends_on_id":"bd-mol-7tp","type":"blocks","created_at":"2025-12-27T19:34:09.603722-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.191874-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-9v7","title":"Update local installation","description":"Update local bd to the new version.\n\nOption 1 - Homebrew:\n```bash\nbrew upgrade bd\n```\n\nOption 2 - Install script:\n```bash\ncurl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash\n```\n\nVerify:\n```bash\nbd --version\n```\n\nShould show 0.41.0.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T16:29:32.301716-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","close_reason":"bd 0.41.0 installed to go/bin and .local/bin","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-a78","title":"Restart daemons","description":"Restart bd daemons to pick up new version.\n\n```bash\nbd daemons killall\n```\n\nDaemons will auto-restart with new version on next bd command.\n\nVerify:\n```bash\nbd daemons list\n```","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T16:29:32.301896-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-aj8","title":"Preflight: Check git status","description":"Ensure working tree is clean before starting release.\n\n```bash\ngit status\n```\n\nIf there are uncommitted changes, either:\n- Commit them first\n- Stash them: `git stash`\n- Abort and resolve","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.464663-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-bfs","title":"Run bump-version.sh","description":"Update all component versions atomically.\n\n```bash\n./scripts/bump-version.sh 0.39.0\n```\n\nThis updates:\n- cmd/bd/version.go\n- .claude-plugin/*.json\n- integrations/beads-mcp/pyproject.toml\n- integrations/beads-mcp/src/beads_mcp/__init__.py\n- npm-package/package.json\n- Hook templates\n- README.md\n- CHANGELOG.md (adds date)","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.557864-08:00","updated_at":"2025-12-28T01:24:39.192947-08:00","deleted_at":"2025-12-28T01:24:39.192947-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-bv6","title":"Push to main","description":"Push the release commit to origin.\n\n```bash\ngit push origin main\n```\n\nIf rejected, someone else pushed. Pull, rebase, try again.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.466318-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-c4h","title":"Verify version consistency","description":"Confirm all versions match 0.41.0.\n\n```bash\ngrep 'Version = ' cmd/bd/version.go\njq -r '.version' .claude-plugin/plugin.json\njq -r '.version' npm-package/package.json\ngrep 'version = ' integrations/beads-mcp/pyproject.toml\n```\n\nAll should show 0.41.0.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T16:29:32.300123-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","close_reason":"All versions match 0.41.0","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-d3i","title":"Preflight: Pull latest","description":"Ensure we're up to date with origin.\n\n```bash\ngit pull --rebase\n```\n\nResolve any conflicts before proceeding.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.464865-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-fuz","title":"Push release tag","description":"Push the version tag to trigger CI release.\n\n```bash\ngit push origin v0.99.0-test\n```\n\nThis triggers GitHub Actions to build artifacts and publish.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.466489-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-hkf","title":"Release complete","description":"Release v0.41.0 is complete!\n\nSummary:\n- All version files updated\n- Git tag pushed\n- CI artifacts built\n- npm and PyPI packages published\n- Local installation updated\n- Daemons restarted\n\nOptional next steps:\n- Announce on social media\n- Update documentation site\n- Close related milestone","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T16:29:32.302071-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","close_reason":"bd v0.41.0 release complete","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-hvu","title":"Create release tag","description":"Create annotated git tag.\n\n```bash\ngit tag -a v0.99.0-test -m \"Release v0.99.0-test\"\n```\n\nVerify: `git tag -l | tail -5`","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.466141-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-jiq","title":"Verify npm package","description":"Confirm npm package published.\n\n```bash\nnpm show @beads/bd version\n```\n\nShould show 0.41.0.\n\nAlso check: https://www.npmjs.com/package/@beads/bd","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T16:29:32.30137-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","close_reason":"npm: @beads/bd 0.41.0 published","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-jzn","title":"Wait for CI","description":"Monitor GitHub Actions for release completion.\n\nhttps://github.com/steveyegge/beads/actions\n\nExpected time: 5-10 minutes\n\nWatch for:\n- Build artifacts (all platforms)\n- Test suite pass\n- npm publish\n- PyPI publish","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.466679-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-k9f","title":"Verify GitHub release","description":"Check the GitHub releases page.\n\nhttps://github.com/steveyegge/beads/releases/tag/v0.41.0\n\nVerify:\n- Release created\n- Binaries attached (linux, darwin, windows)\n- Checksums present","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T16:29:32.3012-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","close_reason":"Release published with all platform binaries","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-lks","title":"Verify PyPI package","description":"Confirm PyPI package published.\n\n```bash\npip index versions beads-mcp 2\u003e/dev/null | head -3\n```\n\nOr check: https://pypi.org/project/beads-mcp/\n\nShould show 0.99.0-test.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T17:09:12.467224-08:00","updated_at":"2025-12-29T17:09:32.480437-08:00","deleted_at":"2025-12-29T17:09:32.480437-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-mht","title":"Verify version consistency","description":"Confirm all versions match 0.39.0.\n\n```bash\ngrep 'Version = ' cmd/bd/version.go\njq -r '.version' .claude-plugin/plugin.json\njq -r '.version' npm-package/package.json\ngrep 'version = ' integrations/beads-mcp/pyproject.toml\n```\n\nAll should show 0.39.0.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.997714-08:00","updated_at":"2025-12-28T01:24:39.198003-08:00","dependencies":[{"issue_id":"bd-mol-mht","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.00493-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.198003-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-mht","title":"Verify version consistency","description":"Confirm all versions match 0.39.0.\n\n```bash\ngrep 'Version = ' cmd/bd/version.go\njq -r '.version' .claude-plugin/plugin.json\njq -r '.version' npm-package/package.json\ngrep 'version = ' integrations/beads-mcp/pyproject.toml\n```\n\nAll should show 0.39.0.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.997714-08:00","updated_at":"2025-12-28T01:24:39.198003-08:00","deleted_at":"2025-12-28T01:24:39.198003-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
{"id":"bd-mol-mwh","title":"Run bump-version.sh","description":"Update all component versions atomically.\n\n```bash\n./scripts/bump-version.sh 0.41.0\n```\n\nThis updates:\n- cmd/bd/version.go\n- .claude-plugin/*.json\n- integrations/beads-mcp/pyproject.toml\n- integrations/beads-mcp/src/beads_mcp/__init__.py\n- npm-package/package.json\n- Hook templates\n- README.md\n- CHANGELOG.md (adds date)","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-29T16:29:32.299951-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","close_reason":"Version files updated to 0.41.0","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-mol-p7i","title":"beads-release","description":"Beads release workflow - from version bump to verified release.\n\nThis formula orchestrates a complete release cycle:\n1. Preflight checks (clean git, up to date)\n2. Documentation updates (CHANGELOG, info.go)\n3. Version bump (all components)\n4. Git operations (commit, tag, push)\n5. CI verification (GitHub Actions)\n6. Artifact verification (GitHub, npm, PyPI)\n7. Local installation update\n8. Daemon restart\n\n## Usage\n\n```bash\nbd wisp create beads-release --var version=0.37.0\n```\n\nOr assign to a polecat:\n```bash\ngt sling beads/polecats/p1 --formula beads-release --var version=0.37.0\n```","status":"tombstone","priority":2,"issue_type":"epic","assignee":"beads/crew/emma","created_at":"2025-12-29T16:29:32.298557-08:00","updated_at":"2025-12-29T17:02:15.202404-08:00","close_reason":"v0.41.0 released to GitHub, PyPI, and npm","deleted_at":"2025-12-29T17:02:15.202404-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"epic"}
{"id":"bd-mol-pze","title":"mol-beads-release","description":"Release checklist for beads version 0.99.0.\n\nThis molecule ensures all release steps are completed properly.\nVariable: 0.99.0 - target version (e.g., 0.35.0)\n\n## Step: update-release-notes\nUpdate cmd/bd/info.go with release notes for 0.99.0.\n\nAdd a new VersionChange entry at the top of versionChanges slice:\n```go\n{\n Version: \"0.99.0\",\n Date: \"YYYY-MM-DD\",\n Changes: []string{\n \"NEW: Feature description\",\n \"FIX: Bug fix description\",\n \"IMPROVED: Enhancement description\",\n },\n},\n```\n\nRun `git log --oneline v\u003cprevious\u003e..HEAD` to see what changed.\n\n## Step: update-changelog\nUpdate CHANGELOG.md with detailed release notes.\n\nAdd a new section after [Unreleased]:\n```markdown\n## [0.99.0] - YYYY-MM-DD\n\n### Added\n- **Feature name** (issue-id) - Description\n\n### Changed\n- **Change description** (issue-id)\n\n### Fixed\n- **Bug fix** (issue-id) - Description\n```\n\nSort by importance, not chronologically.\nNeeds: update-release-notes\n\n## Step: bump-version\nRun the version bump script.\n\n```bash\n./scripts/bump-version.sh 0.99.0\n```\n\nThis updates version in all files:\n- cmd/bd/version.go\n- .claude-plugin/*.json\n- integrations/beads-mcp/pyproject.toml\n- npm-package/package.json\n- Hook templates\n\nNeeds: update-changelog\n\n## Step: run-tests\nRun tests and verify lint passes.\n\n```bash\ngo test -short ./...\n```\n\nCI will run full lint, but fix any obvious issues first.\nNeeds: bump-version\n\n## Step: commit-release\nCommit the release changes.\n\n```bash\ngit add -A\ngit commit -m \"chore: bump version to v0.99.0\"\n```\n\nNeeds: run-tests\n\n## Step: push-and-tag\nPush commit and create release tag.\n\n```bash\ngit push origin main\ngit tag v0.99.0\ngit push origin v0.99.0\n```\n\nThis triggers GitHub Actions release workflow.\nNeeds: commit-release\n\n## Step: wait-for-ci\nWait for GitHub Actions to complete.\n\nMonitor: https://github.com/steveyegge/beads/actions\n\nCI will:\n- Build binaries via GoReleaser\n- Create GitHub Release with assets\n- Publish to npm (@beads/bd)\n- Publish to PyPI (beads-mcp)\n- Update Homebrew tap\n\nWait until all jobs succeed (~5-10 min).\nNeeds: push-and-tag\n\n## Step: verify-release\nVerify the release is complete.\n\n```bash\n# Check GitHub release\ngh release view v0.99.0\n\n# Check Homebrew\nbrew update \u0026\u0026 brew info steveyegge/beads/bd\n\n# Check npm\nnpm view @beads/bd version\n\n# Check PyPI\npip index versions beads-mcp\n```\n\nNeeds: wait-for-ci\n\n## Step: update-local\nUpdate local installations.\n\n```bash\n# Upgrade Homebrew\nbrew upgrade steveyegge/beads/bd\n\n# Or install from source\n./scripts/bump-version.sh 0.99.0 --install\n\n# Install MCP locally\npip install -e integrations/beads-mcp\n\n# Restart daemons\npkill -f \"bd daemon\" || true\n```\n\nVerify: `bd --version` shows 0.99.0\nNeeds: verify-release\n\n## Step: manual-publish\n(Optional) Manual publish if CI failed.\n\n```bash\n# npm (requires npm login)\n./scripts/bump-version.sh 0.99.0 --publish-npm\n\n# PyPI (requires TWINE credentials)\n./scripts/bump-version.sh 0.99.0 --publish-pypi\n\n# Or both\n./scripts/bump-version.sh 0.99.0 --publish-all\n```\n\nOnly needed if CI publishing failed.\nNeeds: wait-for-ci","status":"tombstone","priority":2,"issue_type":"molecule","created_at":"2025-12-27T00:32:46.883114-08:00","updated_at":"2025-12-28T01:24:39.202075-08:00","deleted_at":"2025-12-28T01:24:39.202075-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"molecule"}
@@ -803,6 +796,7 @@
{"id":"bd-rece","title":"Phase 1.1: TOON Library Integration - Add gotoon dependency","description":"Add gotoon (github.com/alpkeskin/gotoon) to go.mod and create internal/toon wrapper package for TOON encoding/decoding. This enables bdtoon to encode Issue structs to TOON format and decode TOON back to issues.\n\n## Subtasks\n1. Add gotoon dependency: go get github.com/alpkeskin/gotoon\n2. Create internal/toon package with wrapper functions\n3. Write encode tests for Issue struct round-trip conversion\n4. Write decode tests for TOON to Issue conversion\n5. Add gotoon API options to wrapper (indent, delimiter, length markers)\n\n## Success Criteria\n- go.mod includes gotoon dependency\n- internal/toon/encode.go exports EncodeTOON(issues) ([]byte, error)\n- internal/toon/decode.go exports DecodeTOON(data []byte) ([]Issue, error)\n- Round-trip tests verify Issue → TOON → Issue produces identical data\n- Tests pass with: go test ./internal/toon -v","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-19T11:48:30.018161133-07:00","updated_at":"2025-12-19T12:53:56.808833405-07:00","closed_at":"2025-12-19T12:53:56.808833405-07:00"}
{"id":"bd-rgd7","title":"Update CHANGELOG.md with release notes","description":"Add release notes for 0.32.1: MCP output control params (#667), pin field fix","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-20T21:53:16.031879-08:00","updated_at":"2025-12-20T21:54:07.982164-08:00","closed_at":"2025-12-20T21:54:07.982164-08:00","dependencies":[{"issue_id":"bd-rgd7","depends_on_id":"bd-an4s","type":"parent-child","created_at":"2025-12-20T21:53:16.034926-08:00","created_by":"daemon"}]}
{"id":"bd-rgyd","title":"Split internal/storage/sqlite/queries.go (1586 lines)","description":"Split internal/storage/sqlite/queries.go (1704 lines) into logical modules.\n\n## Current State\nqueries.go is 1704 lines with mixed responsibilities:\n- Issue CRUD operations\n- Search/filter operations\n- Delete operations (complex cascade logic)\n- Helper functions (parsing, formatting)\n\n## Proposed Split\n\n### 1. queries.go (keep ~400 lines) - Core CRUD\n```go\n// Core issue operations\nfunc (s *SQLiteStorage) CreateIssue(...)\nfunc (s *SQLiteStorage) GetIssue(...)\nfunc (s *SQLiteStorage) UpdateIssue(...)\nfunc (s *SQLiteStorage) CloseIssue(...)\n```\n\n### 2. queries_search.go (~300 lines) - Search/Filter\n```go\n// Search and filtering\nfunc (s *SQLiteStorage) SearchIssues(...)\nfunc (s *SQLiteStorage) GetIssueByExternalRef(...)\nfunc (s *SQLiteStorage) GetCloseReason(...)\nfunc (s *SQLiteStorage) GetCloseReasonsForIssues(...)\n```\n\n### 3. queries_delete.go (~400 lines) - Delete Operations\n```go\n// Delete operations with cascade logic\nfunc (s *SQLiteStorage) CreateTombstone(...)\nfunc (s *SQLiteStorage) DeleteIssue(...)\nfunc (s *SQLiteStorage) DeleteIssues(...)\nfunc (s *SQLiteStorage) resolveDeleteSet(...)\nfunc (s *SQLiteStorage) expandWithDependents(...)\nfunc (s *SQLiteStorage) validateNoDependents(...)\nfunc (s *SQLiteStorage) checkSingleIssueValidation(...)\nfunc (s *SQLiteStorage) trackOrphanedIssues(...)\nfunc (s *SQLiteStorage) collectOrphansForID(...)\nfunc (s *SQLiteStorage) populateDeleteStats(...)\nfunc (s *SQLiteStorage) executeDelete(...)\nfunc (s *SQLiteStorage) findAllDependentsRecursive(...)\n```\n\n### 4. queries_helpers.go (~100 lines) - Utilities\n```go\n// Helper functions (already at top of file)\nfunc parseNullableTimeString(...)\nfunc parseJSONStringArray(...)\nfunc formatJSONStringArray(...)\n```\n\n### 5. queries_rename.go (~100 lines) - ID/Prefix Operations\n```go\n// ID and prefix management\nfunc (s *SQLiteStorage) UpdateIssueID(...)\nfunc (s *SQLiteStorage) RenameDependencyPrefix(...)\nfunc (s *SQLiteStorage) RenameCounterPrefix(...)\nfunc (s *SQLiteStorage) ResetCounter(...)\n```\n\n## Implementation Steps\n\n1. **Create new files** with package declaration:\n ```go\n // queries_delete.go\n package sqlite\n \n import (...)\n ```\n\n2. **Move functions** - cut/paste, maintaining order within each file\n\n3. **Update imports** - each file needs its own imports\n\n4. **Run tests** after each file split:\n ```bash\n go test ./internal/storage/sqlite/...\n ```\n\n5. **Run linter** to catch any issues:\n ```bash\n golangci-lint run ./internal/storage/sqlite/...\n ```\n\n## File Organization\n```\ninternal/storage/sqlite/\n├── queries.go # Core CRUD (~400 lines)\n├── queries_search.go # Search/filter (~300 lines)\n├── queries_delete.go # Delete cascade (~400 lines)\n├── queries_helpers.go # Utilities (~100 lines)\n└── queries_rename.go # ID operations (~100 lines)\n```\n\n## Success Criteria\n- No file \u003e 500 lines\n- All tests pass\n- No functionality changes\n- Clear separation of concerns","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-16T18:17:23.85869-08:00","updated_at":"2025-12-23T13:40:51.62551-08:00","closed_at":"2025-12-23T13:40:51.62551-08:00","dependencies":[{"issue_id":"bd-rgyd","depends_on_id":"bd-iz5t","type":"parent-child","created_at":"2025-12-23T12:44:07.50733-08:00","created_by":"daemon"}]}
{"id":"bd-rig-beads","title":"beads","description":"Rig identity bead for beads.\n\nrepo: https://github.com/steveyegge/beads\nprefix: bd\nstate: active","status":"open","priority":2,"issue_type":"rig","created_at":"2026-01-09T04:38:32.250222495Z","created_by":"vscode","updated_at":"2026-01-09T04:38:32.250222495Z"}
{"id":"bd-rinx","title":"Witness should auto-nuke idle polecats, not escalate","description":"When witness detects an idle polecat with no work, it escalates to Mayor asking what to do.\n\nExpected: Witness should nuke idle polecats automatically if:\n1. No work hooked\n2. No uncommitted/unpushed changes (cleanup_status=clean)\n3. Idle for \u003ethreshold (e.g., 5 minutes)\n\nOnly escalate if polecat has unsaved work that needs recovery.\n\nCurrent behavior creates unnecessary mail noise for the Mayor.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-30T21:21:57.918823-08:00","created_by":"mayor","updated_at":"2025-12-31T11:42:49.746398-08:00","closed_at":"2025-12-31T00:21:22.701781-08:00"}
{"id":"bd-rl5t","title":"Integration test: agent waits for CI via gate","description":"End-to-end test of the gate workflow.\n\n## Test Scenario\n1. Agent creates gate: bd gate create --await gh:run:123 --timeout 5m --notify beads/dave\n2. Agent writes handoff and exits\n3. Deacon patrol checks gate condition\n4. (Mock) GitHub run completes\n5. Deacon notifies waiter and closes gate\n6. New agent session reads mail and resumes\n\n## Test Requirements\n- Mock GitHub API responses\n- Test timeout path\n- Test multiple waiters\n- Verify mail notifications sent","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T11:44:41.725752-08:00","updated_at":"2025-12-23T12:24:08.346347-08:00","closed_at":"2025-12-23T12:24:08.346347-08:00","dependencies":[{"issue_id":"bd-rl5t","depends_on_id":"bd-udsi","type":"parent-child","created_at":"2025-12-23T11:44:53.157037-08:00","created_by":"daemon"},{"issue_id":"bd-rl5t","depends_on_id":"bd-2l03","type":"blocks","created_at":"2025-12-23T11:44:56.674866-08:00","created_by":"daemon"},{"issue_id":"bd-rl5t","depends_on_id":"bd-ykqu","type":"blocks","created_at":"2025-12-23T11:44:56.753264-08:00","created_by":"daemon"}]}
{"id":"bd-rm8m","title":"Refinery Patrol","description":"Merge queue processor patrol loop with verification gates.","status":"open","priority":2,"issue_type":"molecule","created_at":"2025-12-30T19:23:45.503188-08:00","created_by":"deacon","updated_at":"2025-12-30T19:23:45.503188-08:00"}
@@ -919,7 +913,7 @@
{"id":"bd-wp5j","title":"Merge: bd-indn","description":"branch: polecat/rictus\ntarget: main\nsource_issue: bd-indn\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-23T20:45:51.286598-08:00","updated_at":"2025-12-23T21:21:57.697826-08:00","closed_at":"2025-12-23T21:21:57.697826-08:00"}
{"id":"bd-wx8t","title":"Merge: topaz-1767138533986","description":"branch: polecat/topaz-1767138533986\ntarget: main\nsource_issue: topaz-1767138533986\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-30T16:00:41.075953-08:00","created_by":"beads/polecats/topaz","updated_at":"2025-12-30T18:11:07.939374-08:00","closed_at":"2025-12-30T18:11:07.939374-08:00","close_reason":"Stale merge request - branch no longer exists"}
{"id":"bd-wza7","title":"Code cleanup: Search for leftover debugging code","description":"Scan the beads codebase for debugging artifacts that should be removed before release:\n\n## Patterns to search for:\n- `fmt.Printf` debugging statements (vs proper logging)\n- `// DEBUG`, `// TODO: remove`, `// TEMP` comments\n- `log.Printf` that should use structured logging\n- Hardcoded test values or paths\n- `panic()` calls that should be proper error handling\n- Commented-out code blocks\n- `time.Sleep` debugging delays\n\n## Files to check:\n- cmd/bd/*.go\n- internal/**/*.go\n\n## Acceptance:\n- Remove or convert all debugging artifacts\n- Ensure no test pollution in production code","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-29T13:17:26.681839-08:00","created_by":"mayor","updated_at":"2025-12-29T13:20:49.422542-08:00","closed_at":"2025-12-29T13:20:49.422542-08:00","close_reason":"Code audit complete: no debugging artifacts found requiring cleanup"}
{"id":"bd-x0zl","title":"Remove/relocate pin command (covered by mol commands)","description":"## Task\nReview and potentially remove `bd pin` as it overlaps with mol commands.\n\n## Analysis needed\n- `bd pin` sets the pinned flag on issues for agent work assignment\n- `bd hook` shows what's pinned to an agent\n- `bd unpin` removes the pinned flag\n- `bd mol` commands deal with molecules/templates\n\n## Options\n1. **Keep as-is**: pin/unpin are about work assignment, mol is about templates\n2. **Move under mol**: `bd mol pin`, `bd mol unpin` \n3. **Deprecate**: If mol commands fully cover the use case\n\n## Decision criteria\n- Are pin/unpin used independently of mol workflows?\n- Does Gas Town (gt) use these commands?\n\n## Recommendation\nCheck gt codebase for usage patterns before deciding. If pin/unpin are primarily used with mol workflows, consolidate under mol. If used independently, keep as-is.\n\n## Files potentially affected\n- cmd/bd/pin.go\n- cmd/bd/unpin.go\n- cmd/bd/hook.go\n- cmd/bd/mol.go (if moving)\n","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T15:11:09.799471-08:00","created_by":"mayor","updated_at":"2025-12-27T16:01:53.437698-08:00","closed_at":"2025-12-27T16:01:53.437698-08:00","comments":[{"id":6,"issue_id":"bd-x0zl","author":"stevey","text":"## Analysis Complete\n\n**Findings:**\n- bd pin, bd unpin, bd hook are **never used** by gt\n- gt uses bd update --status=pinned --assignee=agent instead (10 usages)\n- Code comment says 'pinned field is cosmetic for bd hook visibility'\n- gt mol status provides equivalent hook inspection\n\n**Recommendation:** Remove all three commands as dead code.","created_at":"2025-12-28T00:00:14Z"}]}
{"id":"bd-x0zl","title":"Remove/relocate pin command (covered by mol commands)","description":"## Task\nReview and potentially remove `bd pin` as it overlaps with mol commands.\n\n## Analysis needed\n- `bd pin` sets the pinned flag on issues for agent work assignment\n- `bd hook` shows what's pinned to an agent\n- `bd unpin` removes the pinned flag\n- `bd mol` commands deal with molecules/templates\n\n## Options\n1. **Keep as-is**: pin/unpin are about work assignment, mol is about templates\n2. **Move under mol**: `bd mol pin`, `bd mol unpin` \n3. **Deprecate**: If mol commands fully cover the use case\n\n## Decision criteria\n- Are pin/unpin used independently of mol workflows?\n- Does Gas Town (gt) use these commands?\n\n## Recommendation\nCheck gt codebase for usage patterns before deciding. If pin/unpin are primarily used with mol workflows, consolidate under mol. If used independently, keep as-is.\n\n## Files potentially affected\n- cmd/bd/pin.go\n- cmd/bd/unpin.go\n- cmd/bd/hook.go\n- cmd/bd/mol.go (if moving)\n","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T15:11:09.799471-08:00","created_by":"mayor","updated_at":"2025-12-27T16:01:53.437698-08:00","closed_at":"2025-12-27T16:01:53.437698-08:00","comments":[{"id":8,"issue_id":"bd-x0zl","author":"stevey","text":"## Analysis Complete\n\n**Findings:**\n- bd pin, bd unpin, bd hook are **never used** by gt\n- gt uses bd update --status=pinned --assignee=agent instead (10 usages)\n- Code comment says 'pinned field is cosmetic for bd hook visibility'\n- gt mol status provides equivalent hook inspection\n\n**Recommendation:** Remove all three commands as dead code.","created_at":"2025-12-28T00:00:14Z"}]}
{"id":"bd-x1xs","title":"Work on beads-1ra: Add molecules.jsonl as separate catalo...","description":"Work on beads-1ra: Add molecules.jsonl as separate catalog file for template molecules","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-19T20:17:44.840032-08:00","updated_at":"2025-12-21T15:28:17.633716-08:00","closed_at":"2025-12-21T15:28:17.633716-08:00"}
{"id":"bd-x2bd","title":"Merge: bd-likt","description":"branch: polecat/Gater\ntarget: main\nsource_issue: bd-likt\nrig: beads","status":"closed","priority":3,"issue_type":"merge-request","created_at":"2025-12-23T13:46:27.091846-08:00","updated_at":"2025-12-23T19:12:08.355637-08:00","closed_at":"2025-12-23T19:12:08.355637-08:00"}
{"id":"bd-x2ht","title":"Add BD_AGENT_MODE for ultra-compact output","description":"Optional agent-optimized output mode triggered by BD_AGENT_MODE=1 env var:\n\n- Compact format: just ID and title per line\n- Default to open/in_progress only\n- No colors, no emojis\n- Lower default limit (~20)\n- One-line summaries\n\nThis is independent but benefits from TTY detection infrastructure.\n\nConsider auto-detecting agent context via CLAUDE_CODE or similar env vars.","notes":"## Implementation Plan\n\n### Trigger\n```bash\nBD_AGENT_MODE=1 bd list\n```\n\nOr auto-detect common agent environments:\n```go\nfunc IsAgentMode() bool {\n if os.Getenv(\"BD_AGENT_MODE\") != \"\" {\n return true\n }\n // Auto-detect known agent contexts\n if os.Getenv(\"CLAUDE_CODE\") != \"\" {\n return true\n }\n // Add other agent env vars as discovered\n return false\n}\n```\n\n### Code Changes\n\n1. **Add agent output format** (cmd/bd/list.go):\n```go\nif ui.IsAgentMode() {\n // Ultra-compact: just ID and title\n for _, issue := range issues {\n fmt.Printf(\"%s: %s\\n\", issue.ID, issue.Title)\n }\n return\n}\n```\n\n2. **Agent mode defaults**:\n```go\nif ui.IsAgentMode() {\n if limit == 0 {\n limit = 20 // Lower default for agents\n }\n if status == \"\" {\n // Only actionable work\n filter.Status = []types.Status{\"open\", \"in_progress\"}\n }\n}\n```\n\n### Output Format (Agent Mode)\n```\nbd-mypl: Default bd list to non-closed issues\nbd-v5fn: Add default limit to bd list (50 issues)\nbd-jdz3: Add pager support to bd list\n```\n\nNo colors, no emojis, no brackets, no priority display.\nJust ID + title for maximum context efficiency.\n\n### Testing\n- `BD_AGENT_MODE=1 bd list` outputs compact format\n- Verify no ANSI codes in output\n- Verify default limit is 20\n- Verify only open/in_progress shown by default","status":"closed","priority":4,"issue_type":"feature","created_at":"2025-12-29T15:25:11.057467-08:00","created_by":"stevey","updated_at":"2025-12-30T18:15:53.216681-08:00","closed_at":"2025-12-30T15:59:24.474412-08:00"}
@@ -939,7 +933,7 @@
{"id":"bd-xo1o.4","title":"Parallel step detection in molecules","description":"Detect and flag parallelizable steps in molecules.\n\n## Detection Rules\nSteps can run in parallel when:\n1. No Needs dependencies between them\n2. Not in same sequential chain\n3. Across dynamic arms (arm-ace and arm-nux can parallelize)\n\n## Output in bd mol show\n```\npatrol-x7k (mol-witness-patrol)\n├── inbox-check [completed]\n├── survey-workers [completed]\n│ ├── arm-ace [parallel group A]\n│ │ ├── capture [can parallelize]\n│ │ ├── assess [needs: capture]\n│ │ └── execute [needs: assess]\n│ └── arm-nux [parallel group A]\n│ ├── capture [can parallelize]\n│ └── ...\n├── aggregate [gate: waits for all-children]\n```\n\n## Flags\n- `bd mol show \u003cid\u003e --parallel` - Highlight parallel opportunities\n- `bd ready --mol \u003cid\u003e` - List all steps that can run now\n\n## Future: Parallel Execution Hints\nFor agents using Task tool subagents:\n- Identify independent arms that can run simultaneously\n- Suggest parallelization strategy","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T02:33:17.660368-08:00","updated_at":"2025-12-23T03:56:39.653982-08:00","closed_at":"2025-12-23T03:56:39.653982-08:00","dependencies":[{"issue_id":"bd-xo1o.4","depends_on_id":"bd-xo1o","type":"parent-child","created_at":"2025-12-23T02:33:17.662232-08:00","created_by":"daemon"}]}
{"id":"bd-xrwy","title":"Auto-detect non-TTY and adjust output","description":"Detect when stdout is not a TTY (piped, redirected, or agent context) and adjust output:\n\n- Disable ANSI colors\n- Disable pager\n- Disable emoji decorations\n- Use plain text format\n\nUses golang.org/x/term or similar for TTY detection.\n\nNeeds pager support to be meaningful (otherwise nothing to disable).","notes":"## Implementation Plan\n\n### Dependencies\n```go\nimport \"golang.org/x/term\"\n// or: github.com/mattn/go-isatty\n```\n\n### Code Changes\n\n1. **Add TTY detection helper** (internal/ui/terminal.go):\n```go\nfunc IsTerminal() bool {\n return term.IsTerminal(int(os.Stdout.Fd()))\n}\n\nfunc ShouldUseColor() bool {\n // Respect NO_COLOR standard\n if os.Getenv(\"NO_COLOR\") \\!= \"\" {\n return false\n }\n // Respect CLICOLOR=0\n if os.Getenv(\"CLICOLOR\") == \"0\" {\n return false\n }\n // Force color with CLICOLOR_FORCE\n if os.Getenv(\"CLICOLOR_FORCE\") \\!= \"\" {\n return true\n }\n return IsTerminal()\n}\n```\n\n2. **Apply in lipgloss setup** (internal/ui/styles.go):\n```go\nfunc init() {\n if \\!ShouldUseColor() {\n lipgloss.SetColorProfile(termenv.Ascii)\n }\n}\n```\n\n3. **Disable pager for non-TTY** (uses bd-jdz3 infrastructure):\n```go\n// In pager.go ToPager():\nif \\!IsTerminal() {\n fmt.Print(content)\n return nil\n}\n```\n\n### Standards Followed\n- NO_COLOR: https://no-color.org/\n- CLICOLOR/CLICOLOR_FORCE: de facto BSD standard\n- gh cli uses same conventions\n\n### Testing\n- `bd list | cat` outputs no ANSI codes\n- `NO_COLOR=1 bd list` outputs no colors\n- `CLICOLOR_FORCE=1 bd list | cat` keeps colors\n- Verify emoji handling in non-TTY mode","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-12-29T15:25:10.112313-08:00","created_by":"stevey","updated_at":"2025-12-30T15:55:53.202981-08:00","closed_at":"2025-12-30T06:59:10.805958-08:00","dependencies":[{"issue_id":"bd-xrwy","depends_on_id":"bd-jdz3","type":"blocks","created_at":"2025-12-29T15:25:22.084746-08:00","created_by":"daemon"}]}
{"id":"bd-xsl9","title":"Remove legacy autoflush code paths","description":"## Problem\n\nThe autoflush system has dual code paths - an old timer-based approach and a new FlushManager. Both are actively used based on whether flushManager is nil.\n\n## Locations\n\n- main.go:78-81: isDirty, needsFullExport, flushTimer marked 'used by legacy code'\n- autoflush.go:291-369: Functions with 'Legacy path for backward compatibility with tests'\n\n## Current Behavior\n\n```go\n// In markDirtyAndScheduleFlush():\nif flushManager != nil {\n flushManager.MarkDirty(false)\n return\n}\n// Legacy path for backward compatibility with tests\n```\n\n## Proposed Fix\n\n1. Ensure flushManager is always initialized (even in tests)\n2. Remove the legacy timer-based code paths\n3. Remove isDirty, needsFullExport, flushTimer globals\n4. Update tests to use FlushManager\n\n## Risk\n\nLow - the FlushManager is the production path. Legacy code only runs when flushManager is nil (test scenarios).","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-21T15:49:30.83769-08:00","updated_at":"2025-12-23T01:54:59.09333-08:00","closed_at":"2025-12-23T01:54:59.09333-08:00"}
{"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-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":9,"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"}
@@ -961,7 +955,7 @@
{"id":"bd-yuxq","title":"Code smell: 262 uses of interface{} reduce type safety","description":"Heavy use of interface{} across 92 files (262 occurrences) in:\n- RPC update arguments: updatesFromArgs() returns map[string]interface{}\n- JSON unmarshaling and formatting\n- Storage query helpers\n\n**Example in internal/rpc/server_issues_epics.go:45:**\n```go\nfunc updatesFromArgs(a UpdateArgs) map[string]interface{} {\n // Returns map with interface{} values - types must be asserted at use sites\n}\n```\n\n**Problem:**\n- Loss of type safety\n- Runtime type assertions required\n- Harder to catch errors at compile time\n\n**Acceptance Criteria:**\n- [ ] Define typed update structs for specific field groups\n- [ ] Use generics where possible (Go 1.18+)\n- [ ] Reduce interface{} count by at least 50%\n- [ ] Document expected types where interface{} remains necessary\n- [ ] Tests pass","status":"closed","priority":3,"issue_type":"chore","created_at":"2025-12-28T19:00:01.896147-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-30T15:55:53.203941-08:00","closed_at":"2025-12-30T07:04:41.376731-08:00","dependencies":[{"issue_id":"bd-yuxq","depends_on_id":"bd-ox1o","type":"blocks","created_at":"2025-12-28T19:00:23.812412-08:00","created_by":"daemon"}]}
{"id":"bd-yx22","title":"Merge: bd-d28c","description":"branch: polecat/testcat\ntarget: main\nsource_issue: bd-d28c\nrig: beads","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-23T21:33:15.490412-08:00","updated_at":"2025-12-23T21:36:38.584933-08:00","closed_at":"2025-12-23T21:36:38.584933-08:00"}
{"id":"bd-yy1h","title":"Witness Patrol","description":"Per-rig worker monitor patrol loop with progressive nudging.","status":"tombstone","priority":2,"issue_type":"molecule","created_at":"2025-12-26T13:08:21.271692-08:00","updated_at":"2025-12-27T00:10:54.178645-08:00","deleted_at":"2025-12-27T00:10:54.178645-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"molecule"}
{"id":"bd-yyxi","title":"Digest: beads-release","description":"Successfully released beads v0.42.0 - GitHub, npm, PyPI all verified","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-30T21:28:02.188707-08:00","updated_at":"2025-12-30T21:28:02.188707-08:00","closed_at":"2025-12-30T21:28:02.18865-08:00","close_reason":"Squashed from 18 wisps","dependencies":[{"issue_id":"bd-yyxi","depends_on_id":"bd-eph-5h2","type":"parent-child","created_at":"2025-12-30T21:28:02.189419-08:00","created_by":"beads/crew/emma"}]}
{"id":"bd-yyxi","title":"Digest: beads-release","description":"Successfully released beads v0.42.0 - GitHub, npm, PyPI all verified","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-30T21:28:02.188707-08:00","updated_at":"2025-12-30T21:28:02.188707-08:00","closed_at":"2025-12-30T21:28:02.18865-08:00","close_reason":"Squashed from 18 wisps"}
{"id":"bd-z3rf","title":"dave Handoff","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-23T04:33:42.874554-08:00","updated_at":"2025-12-29T12:41:09.335754-08:00","deleted_at":"2025-12-29T12:41:09.335754-08:00","deleted_by":"daemon","delete_reason":"orphaned handoff stubs from crash","original_type":"task"}
{"id":"bd-z4f5","title":"--parent flag reports success but doesn't persist to JSONL","description":"The --parent flag for bd update reports success but the change doesn't persist.\n\nReported by: Mayor\nLocation: show.go:810-814 handles the logic\n\nSymptoms:\n- bd update \u003cid\u003e --parent=\u003cnew-parent\u003e returns success\n- But the parent change is not written to JSONL\n- Subsequent bd show reveals parent unchanged\n\nThis shipped in v0.39.1 as part of bd-cj2e (--parent flag for reparenting).\n\nInvestigation: Check the update path from show.go through to JSONL export. The RPC/daemon layer may be dropping the parent field, or the storage layer isn't persisting it.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-27T23:10:22.428136-08:00","created_by":"beads/crew/emma","updated_at":"2025-12-27T23:27:45.716572-08:00","closed_at":"2025-12-27T23:27:45.716572-08:00"}
{"id":"bd-z6kw","title":"Refinery gh:run gate auto-discovery","description":"Refinery auto-populates await_id for gh:run gates from recent workflow runs.\n\n## Problem\nGate created by cook has await_type=gh:run but no await_id.\nNeed to discover the run ID from the push that triggered CI.\n\n## Solution\nDuring Refinery patrol:\n1. Find open gh:run gates without await_id\n2. Query: gh run list --workflow=\u003cgate.workflow\u003e --limit=5\n3. Match run to gate (by branch, commit, or time proximity)\n4. Update gate: bd update \u003cgate-id\u003e --await-id=\u003crun-id\u003e\n5. Now bd gate check --type=gh can poll that specific run\n\n## Implementation\n- Add discover-await-ids step to mol-refinery-patrol\n- Use gh CLI to query recent runs\n- Match heuristics: same branch, recent commit, within 5 mins\n- Update gate with discovered run ID\n\n## Acceptance Criteria\n- [ ] Refinery discovers run IDs for gh:run gates\n- [ ] Gates updated with correct await_id\n- [ ] Subsequent polls use run ID\n- [ ] Handles multiple pending gates","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-02T13:27:42.35667-08:00","created_by":"mayor","updated_at":"2026-01-04T11:25:30.602391-08:00","closed_at":"2026-01-02T16:12:24.656236-08:00","dependencies":[{"issue_id":"bd-z6kw","depends_on_id":"bd-d1n1","type":"parent-child","created_at":"2026-01-02T13:28:18.621422-08:00","created_by":"mayor"},{"issue_id":"bd-z6kw","depends_on_id":"bd-4k3c","type":"blocks","created_at":"2026-01-02T13:28:18.688305-08:00","created_by":"mayor"}]}

View File

@@ -102,6 +102,39 @@ func canonicalizeIfRelative(path string) string {
return path
}
// detectPrefixFromJSONL extracts the issue prefix from JSONL data.
// Returns empty string if prefix cannot be detected.
// Used by cold-start bootstrap to initialize the database (GH#b09).
func detectPrefixFromJSONL(jsonlData []byte) string {
// Parse first issue to extract prefix from its ID
scanner := bufio.NewScanner(bytes.NewReader(jsonlData))
for scanner.Scan() {
line := scanner.Text()
if line == "" {
continue
}
var issue struct {
ID string `json:"id"`
}
if err := json.Unmarshal([]byte(line), &issue); err != nil {
continue
}
if issue.ID == "" {
continue
}
// Extract prefix from ID (e.g., "gt-abc" -> "gt", "test-001" -> "test")
if idx := strings.Index(issue.ID, "-"); idx > 0 {
return issue.ID[:idx]
}
// No hyphen - use whole ID as prefix
return issue.ID
}
return ""
}
// autoImportIfNewer checks if JSONL content changed (via hash) and imports if so
// Hash-based comparison is git-proof (mtime comparison fails after git pull).
// Uses collision detection to prevent silently overwriting local changes.
@@ -152,6 +185,34 @@ func autoImportIfNewer() {
debug.Logf("auto-import triggered (hash changed)")
// Check if database needs initialization (GH#b09 - cold-start bootstrap)
// If issue_prefix is not set, the DB is uninitialized and import will fail.
// Auto-detect and set the prefix to enable seamless cold-start recovery.
// Note: Use global store directly as cmdCtx.Store may not be synced yet (GH#b09)
if store != nil {
prefix, prefixErr := store.GetConfig(ctx, "issue_prefix")
if prefixErr != nil || prefix == "" {
// Database needs initialization - detect prefix from JSONL or directory
detectedPrefix := detectPrefixFromJSONL(jsonlData)
if detectedPrefix == "" {
// Fallback: detect from directory name
beadsDir := filepath.Dir(jsonlPath)
parentDir := filepath.Dir(beadsDir)
detectedPrefix = filepath.Base(parentDir)
if detectedPrefix == "." || detectedPrefix == "/" {
detectedPrefix = "bd"
}
}
detectedPrefix = strings.TrimRight(detectedPrefix, "-")
if setErr := store.SetConfig(ctx, "issue_prefix", detectedPrefix); setErr != nil {
fmt.Fprintf(os.Stderr, "Auto-import: failed to initialize database prefix: %v\n", setErr)
return
}
debug.Logf("auto-import: initialized database with prefix '%s'", detectedPrefix)
}
}
// Check for Git merge conflict markers
// Only match if they appear as standalone lines (not embedded in JSON strings)
lines := bytes.Split(jsonlData, []byte("\n"))

View File

@@ -442,7 +442,19 @@ var rootCmd = &cobra.Command{
isYamlOnlyConfigOp = true
}
}
if cmd.Name() != "import" && cmd.Name() != "setup" && !isYamlOnlyConfigOp {
// Allow read-only commands to auto-bootstrap from JSONL (GH#b09)
// This enables `bd --no-daemon show` after cold-start when DB is missing
canAutoBootstrap := false
if isReadOnlyCommand(cmd.Name()) && beadsDir != "" {
jsonlPath := filepath.Join(beadsDir, "issues.jsonl")
if _, err := os.Stat(jsonlPath); err == nil {
canAutoBootstrap = true
debug.Logf("cold-start bootstrap: JSONL exists, allowing auto-create for %s", cmd.Name())
}
}
if cmd.Name() != "import" && cmd.Name() != "setup" && !isYamlOnlyConfigOp && !canAutoBootstrap {
// No database found - provide context-aware error message
fmt.Fprintf(os.Stderr, "Error: no beads database found\n")
@@ -707,6 +719,7 @@ var rootCmd = &cobra.Command{
// Fall back to direct storage access
var err error
var needsBootstrap bool // Track if DB needs initial import (GH#b09)
if useReadOnly {
// Read-only mode: prevents file modifications (GH#804)
store, err = sqlite.NewReadOnlyWithTimeout(rootCtx, dbPath, lockTimeout)
@@ -715,6 +728,7 @@ var rootCmd = &cobra.Command{
// This handles the case where user runs "bd list" before "bd init"
debug.Logf("read-only open failed, falling back to read-write: %v", err)
store, err = sqlite.NewWithTimeout(rootCtx, dbPath, lockTimeout)
needsBootstrap = true // New DB needs auto-import (GH#b09)
}
} else {
store, err = sqlite.NewWithTimeout(rootCtx, dbPath, lockTimeout)
@@ -760,7 +774,9 @@ var rootCmd = &cobra.Command{
// Skip for delete command to prevent resurrection of deleted issues
// Skip if sync --dry-run to avoid modifying DB in dry-run mode
// Skip for read-only commands - they can't write anyway (GH#804)
if cmd.Name() != "import" && cmd.Name() != "delete" && autoImportEnabled && !useReadOnly {
// Exception: allow auto-import for read-only commands that fell back to
// read-write mode due to missing DB (needsBootstrap) - fixes GH#b09
if cmd.Name() != "import" && cmd.Name() != "delete" && autoImportEnabled && (!useReadOnly || needsBootstrap) {
// Check if this is sync command with --dry-run flag
if cmd.Name() == "sync" {
if dryRun, _ := cmd.Flags().GetBool("dry-run"); dryRun {