- MCP server now uses daemon client by default with CLI fallback - Added BEADS_USE_DAEMON environment variable (default: enabled) - Created multi-repo integration test (all tests pass) - Updated .gitignore for daemon runtime files - Added SETUP_DAEMON.md with migration instructions - Closed bd-105 (investigation complete) and bd-114 (multi-server confusion) This enables single MCP server to handle multiple repos via daemon with per-request context routing. No more multiple MCP server configs! Amp-Thread-ID: https://ampcode.com/threads/T-c222692e-f6ef-4649-9726-db59470b82ef Co-authored-by: Amp <amp@ampcode.com>
120 lines
84 KiB
JSON
120 lines
84 KiB
JSON
{"id":"bd-1","title":"Optimize reference updates to avoid loading all issues into memory","description":"In updateReferences(), we call SearchIssues with no filter to get ALL issues for updating references. For large databases (10k+ issues), this loads everything into memory. Options: 1) Use batched processing with LIMIT/OFFSET, 2) Use SQL UPDATE with REPLACE() directly, 3) Stream results instead of loading all at once. Located in collision.go:266","status":"open","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.584842-07:00"}
|
||
{"id":"bd-10","title":"Refactor parseMarkdownFile to reduce cyclomatic complexity","description":"The parseMarkdownFile function in cmd/bd/markdown.go has a cyclomatic complexity of 38, which exceeds the recommended threshold of 30. This makes the function harder to understand, test, and maintain.","design":"Split the function into smaller, focused units:\n\n1. parseMarkdownFile(filepath) - Main entry point, handles file I/O\n2. parseMarkdownContent(scanner) - Core parsing logic\n3. processIssueSection(issue, section, content) - Handle section finalization (current switch statement)\n4. parseLabels(content) []string - Extract labels from content\n5. parseDependencies(content) []string - Extract dependencies from content\n6. parsePriority(content) int - Parse and validate priority\n\nBenefits:\n- Each function has a single responsibility\n- Easier to test individual components\n- Lower cognitive load when reading code\n- Better encapsulation of parsing logic","acceptance_criteria":"- parseMarkdownFile complexity \u003c 15\n- New helper functions each have complexity \u003c 10\n- All existing tests still pass\n- No change in functionality or behavior\n- Code coverage maintained or improved","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.631612-07:00","closed_at":"2025-10-14T14:37:17.463352-07:00"}
|
||
{"id":"bd-100","title":"Phase 3: Implement daemon command with SQLite ownership","description":"Create 'bd daemon' command that starts the RPC server and owns the SQLite database.\n\nImplementation:\n- Add cmd/bd/daemon.go with start/stop/status subcommands\n- Daemon holds exclusive SQLite connection\n- Integrates git sync loop (batch exports every 5 seconds)\n- PID file management for daemon lifecycle\n- Logging for daemon operations\n\nSocket location: .beads/bd.sock per repository","status":"closed","priority":0,"issue_type":"task","created_at":"2025-10-16T22:47:42.86546-07:00","updated_at":"2025-10-17T01:32:00.960266-07:00","closed_at":"2025-10-16T23:18:57.600602-07:00","dependencies":[{"issue_id":"bd-100","depends_on_id":"bd-97","type":"parent-child","created_at":"2025-10-16T22:47:42.874284-07:00","created_by":"stevey"}]}
|
||
{"id":"bd-101","title":"Phase 4: Add atomic operations and stress testing","description":"Implement atomic multi-operation support and test under concurrent load.\n\nFeatures:\n- Batch/transaction API for multi-step operations\n- Request timeout and cancellation support\n- Connection pooling optimization\n- Stress tests with 4+ concurrent agents\n- Performance benchmarks vs direct mode\n- Documentation updates\n\nValidates all acceptance criteria for bd-97.","status":"closed","priority":0,"issue_type":"task","created_at":"2025-10-16T22:47:49.785525-07:00","updated_at":"2025-10-17T01:32:01.027606-07:00","closed_at":"2025-10-16T23:40:29.95134-07:00","dependencies":[{"issue_id":"bd-101","depends_on_id":"bd-97","type":"parent-child","created_at":"2025-10-16T22:47:49.787472-07:00","created_by":"stevey"}]}
|
||
{"id":"bd-102","title":"Test daemon auto-detection","description":"","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-16T23:04:51.334824-07:00","updated_at":"2025-10-17T01:32:00.965331-07:00","closed_at":"2025-10-16T23:04:55.769268-07:00"}
|
||
{"id":"bd-103","title":"Test daemon RPC","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T23:18:41.845364-07:00","updated_at":"2025-10-17T01:32:00.981005-07:00","closed_at":"2025-10-16T23:19:11.402442-07:00"}
|
||
{"id":"bd-104","title":"Add comprehensive daemon tests for RPC integration","description":"Add tests for:\n- RPC server integration (daemon accepts connections)\n- Concurrent client operations\n- Socket cleanup on shutdown\n- Server start failures (socket already exists)\n- Graceful shutdown verification\n\nThese tests were identified in bd-100 code review but not implemented yet.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T23:28:30.552132-07:00","updated_at":"2025-10-17T01:32:01.028003-07:00","closed_at":"2025-10-16T23:57:54.583646-07:00"}
|
||
{"id":"bd-105","title":"Investigate CWD propagation from Claude Code/Amp to MCP server","description":"","design":"## Problem\n\nMCP servers don't know which directory the user is working in within Claude Code or Amp. This causes database routing issues for beads because:\n\n1. MCP server process starts with its own CWD (wherever it was launched from)\n2. `bd` binary uses tree-walking to discover databases based on CWD\n3. Without correct CWD, `bd` discovers the wrong database or falls back to ~/.beads\n\n## Current Workaround\n\nWe're using explicit `BEADS_DB` environment variables in MCP server configuration:\n- One MCP server per repo with explicit database path\n- Works but doesn't scale (30+ repos with .beads/ directories)\n\n## Desired Solution\n\nMCP server should receive CWD context either:\n\n### Option A: Startup Time\n- Claude Code/Amp passes working directory when launching MCP server\n- MCP server uses that directory for all tool calls\n- **Question:** Is this supported in MCP protocol/implementations?\n\n### Option B: Tool Call Time \n- Each MCP tool call includes a `cwd` parameter\n- Tools use that CWD for subprocess execution\n- **Question:** Does MCP protocol support per-call context?\n\n### Option C: Hybrid\n- MCP server detects directory from Claude Code workspace/project\n- Tools accept optional `cwd` override parameter\n\n## Investigation Steps\n\n1. Review MCP protocol specification for context passing\n2. Check Claude Code MCP implementation for CWD handling\n3. Check Amp MCP implementation for CWD handling \n4. Test if PWD environment variable is set correctly by Claude Code\n5. Prototype dynamic CWD detection in beads-mcp\n6. Document findings and recommend approach\n\n## References\n\n- beads-mcp already has `BEADS_WORKING_DIR` config support\n- bd_client.py uses `cwd` parameter for subprocess calls\n- Current implementation: `os.environ.get('PWD', os.getcwd())`\n","acceptance_criteria":"- Documented investigation findings\n- Tested CWD propagation in both Claude Code and Amp\n- Recommended approach for solving multi-repo MCP database routing\n- Prototype or proof-of-concept if feasible","notes":"## Implementation Complete (2025-10-17)\n\nImplemented PATH 1 (Simple Context Management) from the recommended solutions.\n\n### What Was Built\n\nAdded two new MCP tools to beads-mcp:\n\n1. **set_context(workspace_root)** - Sets workspace root and discovers database\n - Resolves to git repo root automatically\n - Walks up tree to find `.beads/*.db`\n - Sets env vars: BEADS_WORKING_DIR, BEADS_DB, BEADS_CONTEXT_SET\n\n2. **where_am_i()** - Shows current context for debugging\n - Returns workspace root, database path, actor\n\n3. **@require_context decorator** - Guards all write operations\n - Only enforced when BEADS_REQUIRE_CONTEXT=1 env var is set\n - Ensures context is set before create/update/close/reopen/dep/init\n - Backward compatible (off by default)\n\n### Implementation Details\n\n- File: `integrations/beads-mcp/src/beads_mcp/server.py`\n- Tests: All existing tests pass (103/104)\n- Documentation: `integrations/beads-mcp/CONTEXT_MANAGEMENT.md`\n\n### Key Discovery: Environment Variable Limitation\n\n**FastMCP architectural constraint:** Environment variables don't persist between tool calls in the current MCP protocol/FastMCP implementation.\n\nThis means:\n- `set_context` works within its own tool call\n- Subsequent tools may not see the env vars\n- True session state would require MCP protocol changes\n\n### Current Status\n\n**Partial solution delivered:**\n✅ Tools exist and work correctly\n✅ Can be used for explicit context management\n✅ Provides visibility (where_am_i)\n✅ Guards against accidental misrouting (when enabled)\n⚠️ Limited by MCP protocol's stateless nature\n\n**For production use:** Continue with current workaround (explicit BEADS_DB per MCP server config) until:\n1. MCP protocol adds session state support, OR\n2. We implement daemon RPC with per-request cwd (PATH 1.5), OR\n3. Client implementations can pass context with every tool call\n\n### Next Steps\n\n**Immediate (keep current workaround):**\n- Use single MCP server with explicit BEADS_DB in config\n- Set BEADS_REQUIRE_CONTEXT=1 for safety\n- Call set_context at session start (even if env vars don't persist, it validates paths)\n\n**Medium-term (if needed):**\n- Implement PATH 1.5: Add cwd parameter to daemon RPC protocol\n- Update MCP server to use daemon client instead of direct CLI calls\n- Per-request context routing via daemon\n\n**Long-term (if \u003e50 repos):**\n- Implement PATH 2: Advanced routing daemon with repo→DB index\n\n## Original Notes\n[Previous investigation notes preserved above...]","status":"open","priority":1,"issue_type":"feature","created_at":"2025-10-17T02:06:09.737832-07:00","updated_at":"2025-10-17T16:06:28.841726-07:00"}
|
||
{"id":"bd-106","title":"Test Epic for epic commands","description":"","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-10-17T12:07:19.224482-07:00","updated_at":"2025-10-17T12:07:59.213044-07:00","closed_at":"2025-10-17T12:07:59.213044-07:00"}
|
||
{"id":"bd-107","title":"Child task 1","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-17T12:07:24.27717-07:00","updated_at":"2025-10-17T12:07:38.659749-07:00","closed_at":"2025-10-17T12:07:38.659749-07:00","dependencies":[{"issue_id":"bd-107","depends_on_id":"bd-106","type":"parent-child","created_at":"2025-10-17T12:07:29.09999-07:00","created_by":"stevey"}]}
|
||
{"id":"bd-108","title":"Child task 2","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-17T12:07:24.316272-07:00","updated_at":"2025-10-17T12:07:45.496304-07:00","closed_at":"2025-10-17T12:07:45.496304-07:00","dependencies":[{"issue_id":"bd-108","depends_on_id":"bd-106","type":"parent-child","created_at":"2025-10-17T12:07:29.133888-07:00","created_by":"stevey"}]}
|
||
{"id":"bd-109","title":"Child task 3","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-17T12:07:24.33996-07:00","updated_at":"2025-10-17T12:07:45.624974-07:00","closed_at":"2025-10-17T12:07:45.624974-07:00","dependencies":[{"issue_id":"bd-109","depends_on_id":"bd-106","type":"parent-child","created_at":"2025-10-17T12:07:29.169846-07:00","created_by":"stevey"}]}
|
||
{"id":"bd-11","title":"Implement collision detection in import","description":"Create collision.go with detectCollisions() function. Compare incoming JSONL issues against DB state. Distinguish between: (1) exact match (idempotent), (2) ID match but different content (collision), (3) new issue. Return list of colliding issues.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.633538-07:00","closed_at":"2025-10-16T10:07:22.461107-07:00","dependencies":[{"issue_id":"bd-11","depends_on_id":"bd-48","type":"parent-child","created_at":"2025-10-16T21:51:08.920845-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-110","title":"Another epic","description":"","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-10-17T12:08:10.396072-07:00","updated_at":"2025-10-17T12:10:06.062102-07:00","closed_at":"2025-10-17T12:10:06.062102-07:00"}
|
||
{"id":"bd-111","title":"Test epic 2","description":"","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-10-17T12:09:59.880202-07:00","updated_at":"2025-10-17T12:10:06.063293-07:00","closed_at":"2025-10-17T12:10:06.063293-07:00"}
|
||
{"id":"bd-112","title":"Child A","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-17T12:09:59.923718-07:00","updated_at":"2025-10-17T12:10:00.087913-07:00","closed_at":"2025-10-17T12:10:00.087913-07:00","dependencies":[{"issue_id":"bd-112","depends_on_id":"bd-111","type":"parent-child","created_at":"2025-10-17T12:09:59.965897-07:00","created_by":"stevey"}]}
|
||
{"id":"bd-113","title":"Auto-close or warn about epics when all children complete","description":"","design":"See epic.go for implementation. Commands: bd epic status, bd epic close-eligible. Stats integration added.","acceptance_criteria":"Commands work, tests pass, addresses GitHub issue #62","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-10-17T13:47:42.9642-07:00","updated_at":"2025-10-17T13:47:48.136662-07:00","closed_at":"2025-10-17T13:47:48.136662-07:00","external_ref":"gh-62"}
|
||
{"id":"bd-114","title":"Agents confused by multiple MCP beads servers - use wrong database","description":"When multiple beads MCP servers are configured (e.g., beads-wyvern, beads-adar), agents may use the wrong server and create issues in wrong database. In this session, created wy-22 (wyvern) when working in beads repo. Root cause: All MCP servers available simultaneously with different BEADS_WORKING_DIR/BEADS_DB env vars. Agent must manually choose correct server or use direct bd commands.","design":"## This is a SYMPTOM of bd-105\n\nThe multi-server approach was a workaround attempt that backfired. See bd-105 for comprehensive root cause analysis.\n\n## Original Solutions (superseded by bd-105 analysis)\n\nPossible solutions: 1) Context-aware MCP routing based on pwd, 2) Single MCP server that auto-detects context, 3) Better agent instructions about which server to use, 4) Naming convention that makes server purpose obvious (beads-wyvern vs beads-current)\n\n## Actual Solution (from bd-105)\n\nImplement PATH 1: Single MCP server with SetContext/WhereAmI tools. This issue will be resolved when bd-105 is implemented.","notes":"This issue is a SYMPTOM of bd-105 (missing CWD propagation). The multi-server workaround (beads-wyvern, beads-adar, etc.) doesn't solve the root cause and creates new problems (agent confusion about which server to use). See bd-105 for comprehensive analysis and architectural solutions. Should be resolved when bd-105 is fixed with Path 1 (SetContext/WhereAmI approach).","status":"open","priority":0,"issue_type":"bug","created_at":"2025-10-17T13:47:58.092565-07:00","updated_at":"2025-10-17T15:54:13.19878-07:00"}
|
||
{"id":"bd-115","title":"Implement daemon RPC with per-request context routing (PATH 1.5)","description":"Enable MCP server to use daemon with per-request context instead of shelling out to bd CLI. This solves multi-repo routing properly.","design":"## Goal\n\nMCP server → daemon RPC with `cwd` parameter → daemon routes to correct database per request\n\n## Architecture\n\n```\nAI Client (Claude/Amp)\n ↓\nMCP Server (set_context sets workspace_root)\n ↓\nDaemon Client Library (new)\n ↓ RPC with cwd field\nbeadsd Daemon\n ↓ tree-walking per request\nCorrect .beads/*.db\n```\n\n## Components\n\n### 1. Extend Daemon RPC Protocol\n**Files:** `internal/daemon/protocol.go`, daemon handlers\n\n- Add `Cwd string` field to all request types (CreateIssueRequest, UpdateIssueRequest, etc.)\n- Daemon does tree-walking to find `.beads/*.db` based on cwd\n- Each operation gets its own context (stateless per request)\n\n### 2. Create Daemon Client Library\n**New file:** `integrations/beads-mcp/src/beads_mcp/bd_daemon_client.py`\n\n- Python client for daemon RPC protocol\n- Methods matching current BdClient interface\n- Adds `cwd` parameter to all requests\n- Handles connection management, retries\n- Falls back to CLI if daemon unavailable\n\n### 3. Update MCP Server\n**File:** `integrations/beads-mcp/src/beads_mcp/server.py`\n\n- Store workspace_root from `set_context` \n- Use daemon client by default, fall back to CLI client\n- Pass workspace_root as cwd to all operations\n- Handle daemon not running gracefully\n\n### 4. Update bd_client.py\n**File:** `integrations/beads-mcp/src/beads_mcp/bd_client.py`\n\n- Make it an abstract interface/base class\n- Concrete implementations: BdCliClient, BdDaemonClient\n- Factory function to create appropriate client\n\n## Benefits\n\n- ✅ True multi-repo support (each request has context)\n- ✅ Better performance (no process spawning)\n- ✅ Concurrent access already solved (daemon exists)\n- ✅ Stateless per request (no env var persistence issues)\n- ✅ Falls back to CLI when daemon not running\n\n## Implementation Steps\n\n1. **Extend RPC protocol** (Go)\n - Add Cwd field to request structs\n - Update daemon handlers to use cwd for tree-walking\n \n2. **Create daemon client** (Python)\n - Implement RPC protocol in Python\n - Match BdClient interface\n \n3. **Refactor MCP server**\n - Abstract BdClient\n - Use daemon client when available\n \n4. **Test with multiple repos**\n - Concurrent operations\n - Context switching\n - Daemon restart handling\n\n## Related Issues\n\n- bd-105: Root cause investigation (this is PATH 1.5 solution)\n- bd-114: Multi-server confusion (will be resolved)\n- bd-97, bd-98, bd-99, bd-100: Daemon implementation (foundation)","acceptance_criteria":"- MCP server can use daemon RPC instead of CLI\n- Each operation includes cwd context\n- Daemon routes to correct database per request\n- Works with multiple repos simultaneously\n- Falls back to CLI gracefully if daemon unavailable\n- All existing MCP tests pass\n- New multi-repo integration tests pass","notes":"## Progress: Session 2 (2025-10-17 continued)\n\n### Completed\n1. ✅ Updated MCP server to use daemon client\n - Modified `tools.py` to use `create_bd_client()` factory\n - Passes `BEADS_WORKING_DIR` from environment\n - Uses daemon by default, falls back to CLI\n2. ✅ Added `BEADS_USE_DAEMON` environment variable\n - Default: `1` (enabled)\n - Set to `0` to force CLI mode\n3. ✅ Created multi-repo integration test (`test_multi_repo.py`)\n - Tests concurrent operations across two repos\n - Verifies proper database routing based on cwd\n - Validates issue prefix isolation (r1- vs r2-)\n - All tests pass! ✅\n4. ✅ Updated MCP README with daemon usage docs\n - Added BEADS_USE_DAEMON to environment variables\n - Added multi-repo test documentation\n\n### Test Results\n```\n=== All Tests Passed! ===\nSummary:\n ✅ Per-request context routing works\n ✅ Multiple repos are properly isolated\n ✅ Concurrent operations succeed\n ✅ Daemon handles rapid context switching\n```\n\n### Files Modified/Added (Session 2)\n- `integrations/beads-mcp/src/beads_mcp/tools.py` - uses daemon client ✅\n- `integrations/beads-mcp/test_multi_repo.py` - NEW integration test ✅\n- `integrations/beads-mcp/README.md` - daemon documentation ✅\n\n### Architecture Validated\n\n```\nAI Client (Claude/Amp)\n ↓\nMCP Server (workspace_root from set_context)\n ↓ create_bd_client(prefer_daemon=True, workspace_root)\nDaemon Client Library\n ↓ RPC with cwd field\nbeadsd Daemon\n ↓ per-request tree-walking\nCorrect .beads/*.db\n```\n\n### Ready to Close\nAll acceptance criteria met:\n- ✅ MCP server can use daemon RPC instead of CLI\n- ✅ Each operation includes cwd context\n- ✅ Daemon routes to correct database per request\n- ✅ Works with multiple repos simultaneously\n- ✅ Falls back to CLI gracefully if daemon unavailable\n- ✅ All existing MCP tests pass\n- ✅ New multi-repo integration tests pass","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-10-17T16:20:00.775954-07:00","updated_at":"2025-10-17T16:37:34.504057-07:00","closed_at":"2025-10-17T16:37:34.504057-07:00"}
|
||
{"id":"bd-116","title":"Issue in repo2","description":"This should go to repo2 database","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-17T16:34:10.054592-07:00","updated_at":"2025-10-17T16:34:10.054592-07:00"}
|
||
{"id":"bd-117","title":"Issue in repo1","description":"This should go to repo1 database","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-17T16:34:10.054141-07:00","updated_at":"2025-10-17T16:34:10.054141-07:00"}
|
||
{"id":"bd-118","title":"Issue in repo2","description":"This should go to repo2 database","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-17T16:35:02.535522-07:00","updated_at":"2025-10-17T16:35:02.535522-07:00"}
|
||
{"id":"bd-119","title":"Issue in repo1","description":"This should go to repo1 database","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-17T16:35:02.535742-07:00","updated_at":"2025-10-17T16:35:02.535742-07:00"}
|
||
{"id":"bd-12","title":"Implement reference scoring algorithm","description":"Count references for each colliding issue: text mentions in descriptions/notes/design fields + dependency references. Sort collisions by score ascending (fewest refs first). This minimizes total updates during renumbering.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.634423-07:00","closed_at":"2025-10-14T02:51:52.198288-07:00","dependencies":[{"issue_id":"bd-12","depends_on_id":"bd-48","type":"parent-child","created_at":"2025-10-16T21:51:08.913972-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-13","title":"Implement ID remapping with reference updates","description":"Allocate new IDs for colliding issues. Update all text field references using word-boundary regex (\\bbd-10\\b). Update dependency records. Build id_mapping for reporting. Handle chain dependencies properly.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.643252-07:00","closed_at":"2025-10-14T02:51:52.198356-07:00","dependencies":[{"issue_id":"bd-13","depends_on_id":"bd-48","type":"parent-child","created_at":"2025-10-16T21:51:08.92251-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-14","title":"Add --resolve-collisions flag and user reporting","description":"Add import flags: --resolve-collisions (auto-fix) and --dry-run (preview). Display clear report: collisions detected, remappings applied (old→new with scores), reference counts updated. Default behavior: fail on collision (safe).","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.645323-07:00","closed_at":"2025-10-16T10:07:34.003238-07:00","dependencies":[{"issue_id":"bd-14","depends_on_id":"bd-48","type":"parent-child","created_at":"2025-10-16T21:51:08.923374-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-15","title":"Write comprehensive collision resolution tests","description":"Test cases: simple collision, multiple collisions, dependency updates, text reference updates, chain dependencies, edge cases (partial ID matches, case sensitivity, triple merges). Add to import_test.go and collision_test.go.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.647268-07:00","closed_at":"2025-10-16T10:07:34.007864-07:00","dependencies":[{"issue_id":"bd-15","depends_on_id":"bd-48","type":"parent-child","created_at":"2025-10-16T21:51:08.917092-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-16","title":"Update documentation for collision resolution","description":"Update README.md with collision resolution section. Update CLAUDE.md with new workflow. Document --resolve-collisions and --dry-run flags. Add example scenarios showing branch merge workflows.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.648113-07:00","closed_at":"2025-10-16T10:07:34.028648-07:00","dependencies":[{"issue_id":"bd-16","depends_on_id":"bd-48","type":"parent-child","created_at":"2025-10-16T21:51:08.924312-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-17","title":"bd should auto-detect .beads/*.db in current directory","description":"When bd is run without --db flag, it defaults to beads' own database instead of looking for a .beads/*.db file in the current working directory. This causes confusion when working on other projects that use beads for issue tracking (like vc).\n\nExpected behavior: bd should search for .beads/*.db in cwd and use that if found, before falling back to default beads database.\n\nExample: Running 'bd ready' in /Users/stevey/src/vc/vc/ should automatically find and use .beads/vc.db without requiring --db flag every time.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.650584-07:00","closed_at":"2025-10-16T10:07:34.046944-07:00"}
|
||
{"id":"bd-18","title":"Document or automate JSONL sync workflow for git collaboration","description":"When using beads across multiple machines/environments via git, there's a workflow gap:\n\n1. Machine A: Create issues → stored in .beads/project.db\n2. Machine A: bd export -o .beads/issues.jsonl\n3. Machine A: git add .beads/issues.jsonl \u0026\u0026 git commit \u0026\u0026 git push\n4. Machine B: git pull\n5. Machine B: ??? issues.jsonl exists but project.db is empty/stale\n\nThe missing step is: bd import --db .beads/project.db -i .beads/issues.jsonl\n\nThis needs to be either:\na) Documented clearly in workflow docs\nb) Automated (e.g., git hook, or bd auto-imports if jsonl is newer than db)\nc) Both\n\nReal-world impact: User had Claude Code on GCP VM create vc issues from BOOTSTRAP.md. They were exported to issues.jsonl and committed. But on local machine, vc.db was empty until manual import was run.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.651438-07:00","closed_at":"2025-10-14T02:51:52.199766-07:00"}
|
||
{"id":"bd-19","title":"Root issue for dep tree test","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.652067-07:00","closed_at":"2025-10-16T10:07:34.1266-07:00"}
|
||
{"id":"bd-2","title":"Shared dependency C","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.585691-07:00","closed_at":"2025-10-16T10:07:34.12808-07:00"}
|
||
{"id":"bd-20","title":"Dependency A","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.652728-07:00","closed_at":"2025-10-16T10:07:34.126732-07:00"}
|
||
{"id":"bd-21","title":"Dependency B","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.655056-07:00","closed_at":"2025-10-16T10:07:34.126858-07:00"}
|
||
{"id":"bd-22","title":"Add --strict flag for dependency import failures","description":"Currently dependency import errors are warnings (logged to stderr, execution continues). Missing targets or cycles may indicate JSONL corruption. Add --strict flag to fail on any dependency errors for data integrity validation. Location: cmd/bd/import.go:159-164","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.658222-07:00","closed_at":"2025-10-16T10:07:34.035752-07:00"}
|
||
{"id":"bd-23","title":"Implement reserved database name _.db","description":"Auto-detection now skips .beads/_.db to prevent pollution when beads dogfoods itself. This allows beads to use its own issue tracker without interfering with other projects using beads in the same directory tree. Implementation includes filtering in findDatabase(), stopping directory walk when .beads/ is found, and documentation in README.md and CLAUDE.md.","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.658943-07:00","closed_at":"2025-10-14T02:51:52.199832-07:00"}
|
||
{"id":"bd-24","title":"Epic test","description":"","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.659734-07:00","closed_at":"2025-10-16T10:07:34.128633-07:00"}
|
||
{"id":"bd-25","title":"Task A under epic","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.660582-07:00","closed_at":"2025-10-16T10:07:34.129516-07:00"}
|
||
{"id":"bd-26","title":"Critical bug","description":"","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.668026-07:00","closed_at":"2025-10-14T14:16:08.107546-07:00"}
|
||
{"id":"bd-27","title":"Sub-task under A","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.671882-07:00","closed_at":"2025-10-16T10:07:34.130096-07:00"}
|
||
{"id":"bd-28","title":"Sub-task under B","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.674142-07:00","closed_at":"2025-10-16T10:07:34.130241-07:00"}
|
||
{"id":"bd-29","title":"Auto-flush JSONL on CRUD operations with 5-second debounce","description":"Implemented automatic write-through from SQLite to JSONL with 5-second debouncing. After any CRUD operation (create, update, close, dep add/remove), changes are scheduled to flush to JSONL after 5 seconds of inactivity. On process exit, any pending changes are flushed immediately. This prevents .db and .jsonl from getting out of sync, solving the workflow gap where agents forget to run 'bd export'. Can be disabled with --no-auto-flush flag. Addresses bd-39.","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.989559-07:00","closed_at":"2025-10-16T10:07:22.493112-07:00"}
|
||
{"id":"bd-3","title":"Sync versions to 0.9.2 across all components","description":"Version mismatch discovered: bd CLI is 0.9.2 but other components still at 0.9.0 or 1.0.0.\n\nCurrent state:\n- bd CLI (cmd/bd/version.go): 0.9.2 ✓\n- Plugin (.claude-plugin/plugin.json): 0.9.0 ✗\n- MCP Server (integrations/beads-mcp): 1.0.0 ✗\n- README.md: 0.9.0 ✗\n\nFiles to update:\n1. .claude-plugin/plugin.json\n2. integrations/beads-mcp/pyproject.toml\n3. README.md (all mentions)\n4. PLUGIN.md (if any mentions)\n5. CHANGELOG.md (add 0.9.1 and 0.9.2 entries)\n\nRoot cause: Version bumps only updated version.go, not other components.\nSolution needed: Script or process to sync versions across all files.","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.595354-07:00","closed_at":"2025-10-14T13:42:38.577529-07:00"}
|
||
{"id":"bd-30","title":"Final test","description":"Testing with new binary","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.675373-07:00","closed_at":"2025-10-16T10:07:22.488597-07:00"}
|
||
{"id":"bd-31","title":"Test issue with explicit ID","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.675986-07:00","closed_at":"2025-10-16T10:07:34.124331-07:00"}
|
||
{"id":"bd-32","title":"Another explicit ID","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.677519-07:00","closed_at":"2025-10-16T10:07:34.130516-07:00"}
|
||
{"id":"bd-33","title":"Create Claude Code plugin for beads","description":"Package beads as a Claude Code plugin for easy installation via /plugin command.\n\nContext: GitHub issue #28 - https://github.com/steveyegge/beads/issues/28\n\nCurrent state:\n- MCP server exists in integrations/beads-mcp/\n- No plugin packaging yet\n\nDeliverables:\n1. .claude-plugin/plugin.json with metadata\n2. .claude-plugin/marketplace.json for distribution\n3. Custom slash commands (/bd-ready, /bd-create, /bd-show, etc.)\n4. Bundle MCP server configuration\n5. Optional: Pre-configured hooks for auto-sync\n6. Documentation for installation and usage\n\nBenefits:\n- Makes beads instantly discoverable in Claude Code ecosystem\n- Single-command installation vs. manual setup\n- Bundled cohesive experience\n- Lowers adoption barrier significantly\n\nReferences:\n- https://www.anthropic.com/news/claude-code-plugins\n- https://docs.claude.com/en/docs/claude-code/plugins","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.70379-07:00","closed_at":"2025-10-14T12:59:39.974612-07:00"}
|
||
{"id":"bd-34","title":"Research Claude Code plugin structure and requirements","description":"Study the plugin format, required files, and best practices.\n\nTasks:\n- Review official plugin documentation\n- Examine example plugins if available\n- Document plugin.json schema\n- Understand marketplace.json requirements\n- Identify slash command format","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.704512-07:00","closed_at":"2025-10-14T12:55:23.358165-07:00"}
|
||
{"id":"bd-35","title":"Create plugin metadata files","description":"Create .claude-plugin/plugin.json and marketplace.json.\n\nRequirements:\n- Name, description, version, author\n- MCP server configuration bundling\n- License and repository info\n- Installation instructions","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.705194-07:00","closed_at":"2025-10-14T12:55:59.029894-07:00","dependencies":[{"issue_id":"bd-35","depends_on_id":"bd-34","type":"parent-child","created_at":"2025-10-16T21:51:08.919236-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-36","title":"Design and implement slash commands","description":"Create useful slash commands for beads workflow.\n\nProposed commands:\n- /bd-ready - Show ready work\n- /bd-create - Create new issue interactively\n- /bd-show - Show issue details\n- /bd-update - Update issue status\n- /bd-close - Close issue\n- /bd-workflow - Show full agent workflow guide\n\nEach command should provide a good UX and leverage the MCP server tools.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.710535-07:00","closed_at":"2025-10-14T12:57:06.733755-07:00","dependencies":[{"issue_id":"bd-36","depends_on_id":"bd-34","type":"parent-child","created_at":"2025-10-16T21:51:08.911433-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-37","title":"Write plugin documentation","description":"Create comprehensive documentation for the plugin.\n\nContents:\n- Installation instructions\n- Available commands\n- MCP tools reference\n- Configuration options\n- Examples and workflows\n- Troubleshooting guide","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.720941-07:00","closed_at":"2025-10-14T12:58:39.701738-07:00","dependencies":[{"issue_id":"bd-37","depends_on_id":"bd-34","type":"parent-child","created_at":"2025-10-16T21:51:08.920198-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-38","title":"Test plugin installation and functionality","description":"Verify the plugin works end-to-end.\n\nTest cases:\n- Fresh installation via /plugin command\n- All slash commands work correctly\n- MCP server tools are accessible\n- Configuration options work\n- Documentation is accurate\n- Works in both terminal and VS Code","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.731004-07:00","closed_at":"2025-10-14T12:59:38.637269-07:00","dependencies":[{"issue_id":"bd-38","depends_on_id":"bd-34","type":"parent-child","created_at":"2025-10-16T21:51:08.913239-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-39","title":"Parent's blocker should block children in ready work calculation","description":"GitHub issue #19: If epic1 blocks epic2, children of epic2 should also be considered blocked when calculating ready work. Currently epic2's children show as ready even though their parent is blocked. This breaks the natural hierarchy of dependencies and can cause agents to work on tasks out of order.\n\nExpected: ready work calculation should traverse up parent-child hierarchy and check if any ancestor has blocking dependencies.\n\nSee: https://github.com/anthropics/claude-code/issues/19","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.731795-07:00","closed_at":"2025-10-14T12:53:41.146271-07:00","dependencies":[{"issue_id":"bd-39","depends_on_id":"bd-34","type":"parent-child","created_at":"2025-10-16T21:51:08.91611-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-4","title":"Make maxDepth configurable in bd dep tree command","description":"Currently maxDepth is hardcoded to 50 in GetDependencyTree. Add --max-depth flag to bd dep tree command to allow users to control recursion depth. Default should remain 50 for safety, but users with very deep trees or wanting shallow views should be able to configure it.","status":"open","priority":4,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.596567-07:00"}
|
||
{"id":"bd-40","title":"Add composite index on dependencies(depends_on_id, type)","description":"The hierarchical blocking query does:\nJOIN dependencies d ON d.depends_on_id = bt.issue_id\nWHERE d.type = 'parent-child'\n\nCurrently we only have idx_dependencies_depends_on (line 41 in schema.go), which covers depends_on_id but not the type filter.\n\n**Impact:**\n- Query has to scan ALL dependencies for a given depends_on_id, then filter by type\n- With 10k+ issues and many dependencies, this could cause slowdowns\n- The blocker propagation happens recursively, amplifying the cost\n\n**Solution:**\nAdd composite index: CREATE INDEX idx_dependencies_depends_on_type ON dependencies(depends_on_id, type)\n\n**Testing:**\nRun EXPLAIN QUERY PLAN on GetReadyWork query before/after to verify index usage.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.734266-07:00","closed_at":"2025-10-14T13:00:04.441418-07:00"}
|
||
{"id":"bd-41","title":"Fix import zero-value field handling","description":"Import uses zero-value checks (Priority != 0) to determine field updates. This prevents setting priority to 0 or clearing string fields. Export/import round-trip not fully idempotent for zero values. Consider JSON presence detection or explicit preserve-existing semantics. Location: cmd/bd/import.go:95-106","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.737333-07:00","closed_at":"2025-10-14T02:51:52.198697-07:00"}
|
||
{"id":"bd-42","title":"Verify and test Claude Code plugin","description":"Address remaining items from code review:\n\nCritical:\n1. Test plugin installation locally with /plugin marketplace add\n2. Verify ${CLAUDE_PLUGIN_ROOT} variable works correctly\n3. Test each slash command works\n4. Test @task-agent execution\n5. Verify MCP server connects properly\n\nDocumentation:\n1. Clarify 'one-command installation' vs prerequisites\n2. Add note about plugin development status\n3. Verify all paths and examples work\n\nNice-to-have:\n1. Add icon for marketplace (optional)\n2. Add categories field to plugin.json\n3. Add engines field for version compatibility","notes":"PLUGIN IMPLEMENTATION COMPLETE - READY FOR TESTING\n\nWhat was built:\n✅ .claude-plugin/plugin.json - Plugin metadata with MCP server config\n✅ .claude-plugin/marketplace.json - Marketplace configuration\n✅ 9 slash commands in .claude-plugin/commands/:\n - bd-ready, bd-create, bd-show, bd-update, bd-close\n - bd-workflow, bd-init, bd-stats, bd-version\n✅ Task agent in .claude-plugin/agents/task-agent.md\n✅ PLUGIN.md - Comprehensive documentation\n✅ README.md - Updated with plugin section\n✅ Version sync - All components at 0.9.2\n\nTesting Instructions for Next Agent:\n=====================================\n\n1. INSTALL PLUGIN FROM GITHUB:\n /plugin marketplace add steveyegge/beads\n /plugin install beads\n \n2. RESTART CLAUDE CODE (required for MCP server)\n\n3. TEST SLASH COMMANDS:\n /bd-version # Check versions (should show 0.9.2)\n /bd-workflow # Show workflow guide\n /bd-stats # Show project stats\n /bd-ready # Find ready work\n /bd-create \"Test plugin\" task 2\n /bd-show bd-\u003cid\u003e\n \n4. TEST MCP SERVER:\n /mcp # Verify 'beads' server appears\n \n5. TEST TASK AGENT:\n @task-agent # If supported in Claude Code\n \n6. VERIFY:\n - All commands work without errors\n - MCP tools are accessible\n - Version checking works\n - Documentation is accurate\n\nExpected Issues:\n- May need to adjust MCP server path variable (${CLAUDE_PLUGIN_ROOT})\n- Task agent syntax might differ\n- Some commands may need refinement based on actual usage\n\nIf testing fails, check:\n- bd CLI is in PATH: which bd\n- uv is installed: which uv\n- MCP server logs in Claude Code\n- PLUGIN.md troubleshooting section\n\nCommit references:\n- 9f38375: feat: Add Claude Code plugin for beads\n- d25fc53: feat: Add version compatibility checking\n- c0f1044: fix: Sync all component versions to 0.9.2\n- a5c71f0: feat: Add version bump script\n- a612b92: docs: Add version management to CLAUDE.md","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.739238-07:00","closed_at":"2025-10-16T21:03:25.525342-07:00"}
|
||
{"id":"bd-43","title":"Add coverage threshold to CI pipeline","description":"Current CI runs tests with coverage but doesn't enforce minimum threshold. Add step to fail if coverage drops below target.\n\nCurrent coverage: 60%\nRecommended thresholds:\n- Warn: 55%\n- Fail: 50%\n\nThis prevents coverage regression while allowing gradual improvement toward 80% target for 1.0.\n\nImplementation:\n1. Add coverage check step after test run\n2. Use 'go tool cover -func=coverage.out' to get total\n3. Parse percentage and compare to threshold\n4. Optionally: Use codecov's built-in threshold features\n\nRelated to test coverage improvement work (upcoming issue).","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.739897-07:00","closed_at":"2025-10-14T14:16:22.731648-07:00"}
|
||
{"id":"bd-44","title":"Increase test coverage for auto-flush and auto-import features","description":"Critical features have 0% test coverage despite being core workflow functionality.\n\n**Uncovered areas (0% coverage):**\n\nAuto-flush/Auto-import (dirty tracking):\n- MarkIssueDirty / MarkIssuesDirty\n- GetDirtyIssues / GetDirtyIssueCount\n- ClearDirtyIssues / ClearDirtyIssuesByID\n- Auto-flush debouncing logic\n- Auto-import hash comparison\n\nDatabase/file discovery:\n- FindDatabasePath (finds .beads/*.db in directory tree)\n- FindJSONLPath (finds issues.jsonl)\n- findDatabaseInTree helper\n\nLabel operations:\n- AddLabel / RemoveLabel\n- GetLabels / GetIssuesByLabel\n\nEvents/Comments:\n- AddComment\n- GetEvents\n- GetStatistics\n\nMetadata storage:\n- SetMetadata / GetMetadata (used for import hash tracking)\n\nCLI output formatting:\n- outputJSON\n- printCollisionReport / printRemappingReport\n- createIssuesFromMarkdown\n\n**Priority areas:**\n1. Auto-flush/import (highest risk - core workflow)\n2. Database discovery (second - affects all operations)\n3. Labels/events (lower priority - less commonly used)\n\n**Test approach:**\n- Add unit tests for dirty tracking in sqlite package\n- Add integration tests for auto-flush timing and debouncing\n- Add tests for import hash detection and idempotency\n- Add tests for database discovery edge cases (permissions, nested dirs)\n\n**Target:** Get overall coverage from 60% → 75%, focus on cmd/bd (currently 24.1%)\n\n**Note:** These features work well in practice (dogfooding proves it) but edge cases (disk full, permissions, concurrent access, race conditions) are untested.","notes":"Added comprehensive tests for CLI output functions (outputJSON, printCollisionReport, printRemappingReport). \n\nCoverage analysis shows:\n- outputJSON: 60% coverage (increased from 0%)\n- printCollisionReport: 100% coverage (increased from 0%)\n- printRemappingReport: 100% coverage (increased from 0%)\n- cmd/bd overall: 19.7% (increased from 18.8%)\n\nOther areas already have excellent coverage:\n✅ Dirty tracking: TestMarkIssueDirty, TestMarkIssuesDirty, TestGetDirtyIssueCount, TestClearDirtyIssuesByID\n✅ Auto-flush: TestAutoFlushDirtyMarking, TestAutoFlushDebounce, TestAutoFlushConcurrency\n✅ Auto-import: TestAutoImportIfNewer, TestAutoImportHashUnchanged, TestAutoImportCollisions \n✅ Database discovery: TestFindDatabasePathInTree, TestFindJSONLPath\n✅ Labels: TestAddLabel, TestRemoveLabel, TestGetLabels, TestGetIssuesByLabel\n✅ Metadata: TestSetAndGetMetadata, TestGetMetadataNotFound\n✅ Events: TestAddComment, TestAddMultipleComments, TestGetEvents\n\nThe remaining low coverage in cmd/bd is primarily Cobra command setup and CLI wiring, which is difficult to unit test and best tested via integration/E2E tests.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.740701-07:00","closed_at":"2025-10-17T01:04:30.736709-07:00"}
|
||
{"id":"bd-45","title":"Investigate auto-export debounce not triggering","description":"Auto-export to JSONL did not trigger automatically after creating bd-78 and bd-79. Had to manually run 'bd export' to sync.\n\n**Expected behavior:** Auto-export should trigger ~5 seconds after CRUD operations (per CLAUDE.md documentation).\n\n**Actual behavior:** Issues bd-78 and bd-79 were created but JSONL was not updated until manual 'bd export' was run.\n\n**Investigation needed:**\n1. Check if auto-flush goroutine is running\n2. Verify debounce timer is being triggered on CreateIssue()\n3. Check for errors/panics in background export\n4. Verify auto-flush is enabled by default\n5. Check if there's a race condition with shutdown\n\n**Impact:** HIGH - Data loss risk if users create issues and don't realize they haven't synced to Git.\n\n**Testing:**\n```bash\n# Create issue and wait 10 seconds\nbd create \"Test\" -p 4\nsleep 10\ngrep \"Test\" .beads/issues.jsonl # Should find it\n```\n\n**Workaround:** Manually run 'bd export' after CRUD operations.\n\n**Context:** Discovered during GH issue #2 RFC evaluation while creating bd-78 and bd-79.","status":"in_progress","priority":1,"issue_type":"bug","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:01.009879-07:00"}
|
||
{"id":"bd-46","title":"Another test with multiple deps","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.743585-07:00","closed_at":"2025-10-16T10:07:34.028111-07:00"}
|
||
{"id":"bd-47","title":"Reach 1.0 release milestone","description":"Stabilize API, finalize documentation, comprehensive testing","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.744778-07:00","closed_at":"2025-10-16T21:03:25.526789-07:00"}
|
||
{"id":"bd-48","title":"Build collision resolution tooling for distributed branch workflows","description":"When branches diverge and both create issues, auto-incrementing IDs collide on merge. Build excellent tooling to detect collisions during import, auto-renumber issues with fewer dependencies, update all references in descriptions and dependency links, and provide clear user feedback. Goal: keep beautiful brevity of numeric IDs (bd-210) while handling distributed creation gracefully.","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.745684-07:00","closed_at":"2025-10-14T14:16:10.559862-07:00"}
|
||
{"id":"bd-49","title":"Add --show-all-paths flag to bd dep tree","description":"Currently bd dep tree deduplicates nodes when multiple paths exist (diamond dependencies). Add optional --show-all-paths flag to display the full graph with all paths, showing duplicates. Useful for debugging complex dependency structures and understanding all relationships.","status":"open","priority":3,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.747227-07:00"}
|
||
{"id":"bd-5","title":"Add godoc comments for auto-flush functions","description":"Add comprehensive godoc comments for findJSONLPath(), markDirtyAndScheduleFlush(), and flushToJSONL() explaining behavior, concurrency considerations, and error handling. Include notes about debouncing behavior (timer resets on each write, flush occurs 5s after LAST operation) and flush-on-exit guarantees. Located in cmd/bd/main.go:188-307.","status":"open","priority":4,"issue_type":"chore","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.597237-07:00"}
|
||
{"id":"bd-50","title":"Add design/notes/acceptance_criteria fields to update command","description":"Currently bd update only supports status, priority, title, assignee. Add support for --design, --notes, --acceptance-criteria flags. This makes it easier to add detailed designs to issues after creation.","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.772013-07:00","closed_at":"2025-10-16T10:07:34.00541-07:00"}
|
||
{"id":"bd-51","title":"Update ready_issues VIEW to use hierarchical blocking","description":"The ready_issues VIEW (schema.go:97-108) uses the OLD blocking logic that doesn't propagate through parent-child hierarchies.\n\n**Problem:**\n- GetReadyWork() function now uses recursive CTE with propagation\n- But the ready_issues VIEW still uses simple NOT EXISTS check\n- Any code using the VIEW will get DIFFERENT results than GetReadyWork()\n- This creates inconsistency and confusion\n\n**Impact:**\n- Unknown if the VIEW is actually used anywhere in the codebase\n- If it is used, it's returning incorrect results (showing children as ready when parent is blocked)\n\n**Solution:**\nEither:\n1. Update VIEW to match GetReadyWork logic (complex CTE in a view)\n2. Drop the VIEW entirely if unused\n3. Make VIEW call GetReadyWork as a function (if SQLite supports it)\n\n**Investigation needed:**\nGrep for 'ready_issues' to see if the view is actually used.","notes":"**Investigation results:**\nGrepped the codebase - the ready_issues VIEW appears in:\n- schema.go (definition)\n- WORKFLOW.md, DESIGN.md (documentation)\n- No actual Go code queries it directly\n\n**Conclusion:** The VIEW is defined but appears UNUSED by actual code. GetReadyWork() function is used instead.\n\n**Recommended solution:** Drop the VIEW entirely to avoid confusion. It serves no purpose if unused and creates a maintenance burden (needs to stay in sync with GetReadyWork logic).\n\n**Alternative:** If we want to keep it for direct SQL access, update the VIEW definition to match the new recursive CTE logic.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.772596-07:00","closed_at":"2025-10-14T13:06:47.739336-07:00"}
|
||
{"id":"bd-52","title":"Verify auto-export works","description":"","status":"closed","priority":0,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.773364-07:00","closed_at":"2025-10-14T14:16:09.268591-07:00"}
|
||
{"id":"bd-53","title":"Task B under epic","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.774162-07:00","closed_at":"2025-10-16T10:07:34.129768-07:00"}
|
||
{"id":"bd-54","title":"Cache compiled regexes in replaceIDReferences for performance","description":"replaceIDReferences() compiles the same regex patterns on every call. With 100 issues and 10 ID mappings, that's 1000 regex compilations. Pre-compile regexes once and reuse. Can use a struct with compiled regex, placeholder, and newID. Located in collision.go:329. Estimated performance improvement: 10-100x for large batches.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.775803-07:00","closed_at":"2025-10-16T10:07:22.469891-07:00"}
|
||
{"id":"bd-55","title":"test_from_22561","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.776605-07:00","closed_at":"2025-10-16T20:31:20.075645-07:00"}
|
||
{"id":"bd-56","title":"Add cross-type cycle detection warnings to dependency operations","description":"When adding a dependency with 'bd dep add', run DetectCycles() afterwards and warn users if any cycles exist (across all dependency types, not just 'blocks'). This provides visibility into circular dependencies without blocking the operation.","design":"Implementation approach:\n1. After successfully adding a dependency in AddDependency, call DetectCycles()\n2. If cycles are found, print a warning to stderr showing:\n - The cycle path(s) detected\n - Which dependency types are involved\n - A note that this may cause confusion in dependency visualization\n3. Do NOT fail the operation - this is informational only\n4. Consider adding a --quiet flag to suppress warnings if needed\n\nThe warning should be clear and actionable, e.g.:\nWARNING: Circular dependency detected:\n vc-5 (blocks) → vc-13 (parent-child) → vc-5\nThis may cause confusion in dependency visualization.","acceptance_criteria":"- After 'bd dep add' creates a cross-type cycle, a warning is printed to stderr\n- Warning includes the full cycle path with dependency types\n- Operation still succeeds (warning only, not an error)\n- No warning is printed when no cycles exist\n- Warning message is clear and actionable","status":"open","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.780158-07:00"}
|
||
{"id":"bd-57","title":"Handle missing JSONL directory in findJSONLPath","description":"findJSONLPath() assumes the database directory exists. If someone runs bd init to create a new database but the .beads directory doesn't exist yet, the glob operations might fail silently. Add os.MkdirAll(dbDir, 0755) to ensure directory exists before globbing. Located in cmd/bd/main.go:188-201.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.814735-07:00","closed_at":"2025-10-14T02:51:52.199959-07:00"}
|
||
{"id":"bd-58","title":"Add visibility for auto-flush failures","description":"flushToJSONL() writes warnings to stderr when flush fails, but calling code has no way to know if flush succeeded or failed. This means a command could return success even though JSONL is now out of sync. Consider maintaining a 'last flush status' variable or counter for failed flushes, and warn user after multiple consecutive failures (e.g., 3+). Located in cmd/bd/main.go:227-307.","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.829154-07:00","closed_at":"2025-10-16T10:07:22.497491-07:00"}
|
||
{"id":"bd-59","title":"Add test coverage for auto-flush feature","description":"Add comprehensive tests for auto-flush functionality:\\n- Test that markDirtyAndScheduleFlush() is called after CRUD operations\\n- Test debounce timing (rapid operations result in single flush)\\n- Test --no-auto-flush flag disables feature\\n- Test flush on program exit\\n- Test concurrent operations don't cause races\\n- Test error scenarios (disk full, permission denied, etc.)\\n- Test import command triggers auto-flush\\n\\nCurrent implementation has no test coverage for the auto-flush feature. Located in cmd/bd/main_test.go (to be created).","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.841863-07:00","closed_at":"2025-10-16T10:07:22.508336-07:00"}
|
||
{"id":"bd-6","title":"Low priority chore","description":"","status":"open","priority":4,"issue_type":"chore","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.598039-07:00","dependencies":[{"issue_id":"bd-6","depends_on_id":"bd-47","type":"parent-child","created_at":"2025-10-16T21:51:08.917589-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-60","title":"Test auto-sync feature","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.843519-07:00","closed_at":"2025-10-14T14:37:52.155117-07:00"}
|
||
{"id":"bd-61","title":"Regular auto-ID issue","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.850721-07:00","closed_at":"2025-10-16T10:07:22.508912-07:00"}
|
||
{"id":"bd-62","title":"Test flush tracking","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.853729-07:00","closed_at":"2025-10-16T10:07:22.502637-07:00"}
|
||
{"id":"bd-63","title":"Test export cancels timer","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.883758-07:00","closed_at":"2025-10-14T14:37:52.155473-07:00"}
|
||
{"id":"bd-64","title":"Test incremental export","description":"Testing bd-45 implementation","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:01.017992-07:00","closed_at":"2025-10-16T10:07:22.50945-07:00"}
|
||
{"id":"bd-65","title":"Test label dirty tracking","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.898188-07:00","closed_at":"2025-10-14T14:37:52.155733-07:00"}
|
||
{"id":"bd-66","title":"Test issue","description":"Testing prefix","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.902423-07:00","closed_at":"2025-10-14T13:39:55.828804-07:00","dependencies":[{"issue_id":"bd-66","depends_on_id":"bd-47","type":"parent-child","created_at":"2025-10-16T21:51:08.914487-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-67","title":"Test hash-based import","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.905866-07:00","closed_at":"2025-10-14T13:39:56.958248-07:00"}
|
||
{"id":"bd-68","title":"Add migration scripts for GitHub Issues","description":"Create scripts to import from GitHub Issues API or exported JSON","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.91077-07:00","dependencies":[{"issue_id":"bd-68","depends_on_id":"bd-47","type":"parent-child","created_at":"2025-10-16T21:51:08.915539-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-69","title":"Add test for deep hierarchy blocking (50+ levels)","description":"Current tests verify 2-level depth (grandparent → parent → child). The depth limit is hardcoded to 50 in the recursive CTE, but we don't test edge cases near that limit.\n\n**Test cases needed:**\n1. Verify 50-level deep hierarchy works correctly\n2. Verify depth limit prevents runaway recursion\n3. Measure performance impact of deep hierarchies\n4. Consider if 50 is the right limit (why not 100? why not 20?)\n\n**Rationale:**\n- Most hierarchies are 2-5 levels deep\n- But pathological cases (malicious or accidental) could create 50+ level nesting\n- Need to ensure graceful degradation, not catastrophic failure\n\n**Implementation:**\nAdd TestDeepHierarchyBlocking to ready_test.go","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.915131-07:00","closed_at":"2025-10-14T13:12:16.610152-07:00"}
|
||
{"id":"bd-7","title":"Test auto-export timing","description":"","status":"open","priority":4,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.599423-07:00"}
|
||
{"id":"bd-70","title":"Document hierarchical blocking behavior in README","description":"The fix for bd-65 changes user-visible behavior: children of blocked epics are now automatically blocked.\n\n**What needs documenting:**\n1. README.md dependency section should explain blocking propagation\n2. Clarify that 'blocks' + 'parent-child' together create transitive blocking\n3. Note that 'related' and 'discovered-from' do NOT propagate blocking\n4. Add example showing epic → child blocking propagation\n\n**Example to add:**\n```bash\n# If epic is blocked, children are too\nbd create \"Epic 1\" -t epic -p 1\nbd create \"Task 1\" -t task -p 1\nbd dep add task-1 epic-1 --type parent-child\n\n# Block the epic\nbd create \"Blocker\" -t task -p 0\nbd dep add epic-1 blocker-1 --type blocks\n\n# Now both epic-1 AND task-1 are blocked\nbd ready # Neither will show up\n```","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:01.020334-07:00","closed_at":"2025-10-14T13:10:38.482538-07:00"}
|
||
{"id":"bd-71","title":"Document versioning and release strategy","description":"Create comprehensive versioning strategy for beads ecosystem.\n\nComponents to document:\n1. bd CLI (Go binary) - main version number\n2. Plugin (Claude Code) - tracks CLI version\n3. MCP server (Python) - bundled with plugin\n4. Release workflow - how to sync all three\n\nDecisions to make:\n- Should plugin.json auto-update from bd CLI version?\n- Should we have a VERSION file at repo root?\n- How to handle breaking changes across components?\n- What's the update notification strategy?\n\nReferences:\n- plugin.json engines field now requires bd \u003e=0.9.0\n- /bd-version command added for checking compatibility\n- PLUGIN.md now documents update workflow","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.91836-07:00","closed_at":"2025-10-14T13:55:59.178075-07:00"}
|
||
{"id":"bd-72","title":"Create version bump script","description":"Create scripts/bump-version.sh to automate version syncing across all components.\n\nThe script should:\n1. Take a version number as argument (e.g., ./scripts/bump-version.sh 0.9.3)\n2. Update all version files:\n - cmd/bd/version.go (Version constant)\n - .claude-plugin/plugin.json (version field)\n - .claude-plugin/marketplace.json (plugins[].version)\n - integrations/beads-mcp/pyproject.toml (version field)\n - README.md (Alpha version mention)\n - PLUGIN.md (version requirements)\n3. Validate semantic versioning format\n4. Show diff preview before applying\n5. Optionally create git commit with standard message\n\nThis prevents the version mismatch issue that occurred when only version.go was updated.\n\nRelated: bd-73 (version sync issue)","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:01.02371-07:00","closed_at":"2025-10-14T13:49:22.368581-07:00"}
|
||
{"id":"bd-73","title":"Add system-wide/multi-repo support for beads","description":"GitHub issue #4 requests ability to use beads across multiple projects and for system-wide task tracking.\n\nCurrent limitation: beads is per-repository isolated. Each project has its own .beads/ directory and issues cannot reference issues in other projects.\n\nPotential approaches:\n1. Global beads instance in ~/.beads/global.db for cross-project work\n2. Project references - allow issues to link across repos\n3. Multi-project workspace support - one beads instance managing multiple repos\n4. Integration with existing MCP server to provide remote multi-project access\n\nUse cases:\n- System administrators tracking work across multiple machines/repos\n- Developers working on a dozen+ projects simultaneously\n- Cross-cutting concerns that span multiple repositories\n- Global todo list with project-specific subtasks\n\nRelated:\n- GitHub issue #4: https://github.com/steveyegge/beads/issues/4\n- Comparison to membank MCP which already supports multi-project via centralized server\n- MCP server at integrations/beads-mcp/ could be extended for this\n\nSee also: Testing framework for plugins (also from GH #4)","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.919661-07:00"}
|
||
{"id":"bd-74","title":"Implement storage driver interface for pluggable backends","description":"Create abstraction layer for storage to support multiple backends (SQLite, Postgres, Turso, in-memory testing, etc.).\n\n**Current state:** All storage logic hardcoded to SQLite in internal/storage/sqlite/sqlite.go\n\n**Proposed design:**\n\n```go\n// internal/storage/storage.go\ntype Store interface {\n // Issue CRUD\n CreateIssue(issue *Issue) error\n GetIssue(id string) (*Issue, error)\n UpdateIssue(id string, updates *Issue) error\n DeleteIssue(id string) error\n ListIssues(filter *Filter) ([]*Issue, error)\n \n // Dependencies\n AddDependency(from, to string, depType DependencyType) error\n RemoveDependency(from, to string, depType DependencyType) error\n GetDependencies(id string) ([]*Dependency, error)\n \n // Counters, stats\n GetNextID(prefix string) (string, error)\n GetStats() (*Stats, error)\n \n Close() error\n}\n```\n\n**Benefits:**\n- Better testing (mock/in-memory stores)\n- Future flexibility (Postgres, cloud APIs, etc.)\n- Clean architecture (business logic decoupled from storage)\n- Enable Turso or other backends without refactoring everything\n\n**Implementation steps:**\n1. Define Store interface in internal/storage/storage.go\n2. Refactor SQLiteStore to implement interface\n3. Update all commands to use interface, not concrete type\n4. Add MemoryStore for testing\n5. Add driver selection via config (storage.driver = sqlite|turso|postgres)\n6. Update tests to use interface\n\n**Note:** This is valuable even without adopting Turso. Good architecture practice.\n\n**Context:** From GH issue #2 RFC evaluation. Driver interface is low-cost, high-value regardless of whether we add alternative backends.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.920278-07:00"}
|
||
{"id":"bd-75","title":"Test issue with --deps flag","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.921065-07:00","closed_at":"2025-10-16T10:07:34.027923-07:00"}
|
||
{"id":"bd-76","title":"Fix: bd init --prefix test -q flag not recognized","description":"The init command doesn't recognize the -q flag. When running 'bd init --prefix test -q', it fails silently or behaves unexpectedly. The flag should either be implemented for quiet mode or removed from documentation if not supported.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.921744-07:00","closed_at":"2025-10-17T00:09:18.921816-07:00"}
|
||
{"id":"bd-77","title":"Improve session management","description":"Current session management is basic. Need to improve with better expiration handling.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.922344-07:00","closed_at":"2025-10-14T14:37:17.463188-07:00"}
|
||
{"id":"bd-78","title":"Improve session management","description":"Current session management is basic. Need to improve with better expiration handling.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.922905-07:00","closed_at":"2025-10-16T10:07:22.46194-07:00"}
|
||
{"id":"bd-79","title":"Improve session management","description":"Current session management is basic. Need to improve with better expiration handling.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.923689-07:00","closed_at":"2025-10-16T10:07:34.005199-07:00"}
|
||
{"id":"bd-8","title":"Remove unused issueMap in scoreCollisions","description":"scoreCollisions() creates issueMap and populates it (lines 135-138) but never uses it. Either remove it or add a TODO comment explaining future use. Located in collision.go:135-138. Cosmetic cleanup.","status":"open","priority":4,"issue_type":"chore","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.608584-07:00"}
|
||
{"id":"bd-80","title":"Add visual indicators for nodes with multiple parents in dep tree","description":"When a node appears in the dependency tree via multiple paths (diamond dependencies), add a visual indicator like (*) or (multiple parents) to help users understand the graph structure. This would make it clear when deduplication has occurred. Example: 'bd-503: Shared dependency (*) [P1] (open)'","status":"open","priority":3,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.92482-07:00"}
|
||
{"id":"bd-81","title":"Add PostgreSQL backend","description":"Implement PostgreSQL storage backend as alternative to SQLite for larger teams","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.926279-07:00","closed_at":"2025-10-16T10:07:33.961565-07:00","dependencies":[{"issue_id":"bd-81","depends_on_id":"bd-48","type":"blocks","created_at":"2025-10-16T21:51:08.916632-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-82","title":"Test issue to verify fix","description":"This should be bd-18 if the fix works","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:01.025751-07:00","closed_at":"2025-10-16T10:07:33.971732-07:00"}
|
||
{"id":"bd-83","title":"Simplify getNextID SQL query parameters","description":"Query passes prefix four times to same SQL query. Works but fragile if query changes. Consider simplifying SQL to require fewer parameters. Location: internal/storage/sqlite/sqlite.go:73-78","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.92955-07:00","closed_at":"2025-10-16T10:07:34.038708-07:00"}
|
||
{"id":"bd-84","title":"Add validation/warning for malformed issue IDs","description":"getNextID silently ignores non-numeric ID suffixes (e.g., bd-foo). CAST returns NULL for invalid strings. Consider detecting and warning about malformed IDs in database. Location: internal/storage/sqlite/sqlite.go:79-82","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.930472-07:00","closed_at":"2025-10-14T02:51:52.198988-07:00"}
|
||
{"id":"bd-85","title":"Optimize export dependency queries (N+1 problem)","description":"Export triggers separate GetDependencyRecords() per issue. For large DBs (1000+ issues), this is N+1 queries. Add GetAllDependencyRecords() to fetch all dependencies in one query. Location: cmd/bd/export.go:52-59, import.go:138-142","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.931201-07:00","closed_at":"2025-10-14T02:51:52.19905-07:00"}
|
||
{"id":"bd-86","title":"Improve error handling in dependency removal during remapping","description":"In updateDependencyReferences(), RemoveDependency errors are caught and ignored with continue (line 392). Comment says 'if dependency doesn't exist' but this catches ALL errors including real failures. Should check error type with errors.Is(err, ErrDependencyNotFound) and only ignore not-found errors, returning other errors properly.","status":"open","priority":3,"issue_type":"bug","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.931812-07:00"}
|
||
{"id":"bd-87","title":"Use safer placeholder pattern in replaceIDReferences","description":"Currently uses bd-313 which could theoretically collide with user text. Use a truly unique placeholder like null bytes: \\x00REMAP\\x00_0_\\x00 which are unlikely to appear in normal text. Located in collision.go:324. Very low probability issue but worth fixing for completeness.","status":"open","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.932507-07:00"}
|
||
{"id":"bd-88","title":"Test issue for design field","description":"Testing the new update flags","design":"## Design Plan\\n- Add flags to update command\\n- Test thoroughly\\n- Document changes","acceptance_criteria":"- All three fields (design, notes, acceptance-criteria) can be updated\\n- Changes persist in database\\n- bd show displays the fields correctly","notes":"Implementation complete. All tests passing.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.93305-07:00","closed_at":"2025-10-14T02:51:52.199634-07:00"}
|
||
{"id":"bd-89","title":"Implement full cross-type cycle prevention in AddDependency","description":"Expand cycle prevention in AddDependency to check for cycles across ALL dependency types, not just 'blocks'. Currently only 'blocks' type dependencies are checked for cycles, allowing cross-type circular dependencies to form (e.g., A blocks B, B parent-child A). This can cause semantic confusion and is a maintenance hazard for future operations that traverse dependencies.","design":"Implementation approach:\n1. Modify the cycle check in AddDependency (postgres.go:559-599)\n2. Remove the 'type = blocks' filter from the recursive CTE\n3. Check for cycles regardless of dependency type being added\n4. Return a clear error message indicating which types form the cycle\n\nTrade-offs to consider:\n- This is more mathematically correct (no cycles in dependency DAG)\n- May break legitimate use cases where cross-type cycles are intentional\n- Need to evaluate whether ANY cross-type cycles are valid in practice\n- Alternative: make this configurable with a --allow-cycle flag\n\nBefore implementing, should investigate:\n- Are there legitimate reasons for cross-type cycles?\n- What's the performance impact on large graphs (1000+ issues)?\n- Should certain type combinations be allowed to cycle?","acceptance_criteria":"- AddDependency prevents cycles across all dependency types, not just 'blocks'\n- Clear error message when cycle would be created, including dependency types\n- All existing tests pass\n- Performance benchmarked on large dependency graphs (100+ issues)\n- Decision documented on whether to add --allow-cycle flag or exception rules","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.933764-07:00","closed_at":"2025-10-16T20:31:19.174534-07:00"}
|
||
{"id":"bd-9","title":"Add transaction support to storage layer for atomic multi-operation workflows","description":"Currently each storage method (CreateIssue, UpdateIssue, etc.) starts its own transaction. This makes it impossible to perform atomic multi-step operations like collision resolution. Add support for passing *sql.Tx through the storage interface, or create transaction-aware versions of methods. This would make remapCollisions and other batch operations truly atomic.","status":"closed","priority":4,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.627507-07:00","closed_at":"2025-10-14T02:51:52.199176-07:00"}
|
||
{"id":"bd-90","title":"Refactor duplicate flush logic in PersistentPostRun","description":"PersistentPostRun contains a complete copy of the flush logic instead of calling flushToJSONL(). This violates DRY principle and makes maintenance harder. Refactor to use flushToJSONL() with a force parameter to bypass isDirty check, or extract shared logic into a helper function. Located in cmd/bd/main.go:104-138.","status":"open","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.936145-07:00"}
|
||
{"id":"bd-91","title":"Optimize auto-flush to use incremental updates","description":"Every flush exports ALL issues and ALL dependencies, even if only one issue changed. For large projects (1000+ issues), this could be expensive. Current approach guarantees consistency, which is fine for MVP, but future optimization could track which issues changed and use incremental updates. Located in cmd/bd/main.go:255-276.","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.940307-07:00","closed_at":"2025-10-14T02:51:52.200141-07:00"}
|
||
{"id":"bd-92","title":"Make auto-flush debounce duration configurable","description":"flushDebounce is hardcoded to 5 seconds. Make it configurable via environment variable BEADS_FLUSH_DEBOUNCE (e.g., '500ms', '10s'). Current 5-second value is reasonable for interactive use, but CI/automated scenarios might want faster flush. Add getDebounceDuration() helper function. Located in cmd/bd/main.go:31.","status":"open","priority":3,"issue_type":"feature","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.94553-07:00"}
|
||
{"id":"bd-93","title":"Add EXPLAIN QUERY PLAN tests for ready work query","description":"Verify that the hierarchical blocking query uses proper indexes and doesn't do full table scans.\n\n**Queries to analyze:**\n1. The recursive CTE (both base case and recursive case)\n2. The final SELECT with NOT EXISTS\n3. Impact of various filters (status, priority, assignee)\n\n**Implementation:**\nAdd test function that:\n- Runs EXPLAIN QUERY PLAN on GetReadyWork query\n- Parses output to verify no SCAN TABLE operations\n- Documents expected query plan in comments\n- Fails if query plan degrades\n\n**Benefits:**\n- Catch performance regressions in tests\n- Document expected query behavior\n- Ensure indexes are being used\n\nRelated to: bd-66 (composite index on depends_on_id, type)","status":"open","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:01.026648-07:00"}
|
||
{"id":"bd-94","title":"Add performance benchmarks document","description":"Document actual performance metrics with hyperfine tests","status":"open","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.948902-07:00","dependencies":[{"issue_id":"bd-94","depends_on_id":"bd-47","type":"parent-child","created_at":"2025-10-16T21:51:08.918095-07:00","created_by":"renumber"}]}
|
||
{"id":"bd-95","title":"Investigate vector/semantic search for issue discovery","description":"From GH issue #2 RFC discussion: Evaluate if vector/semantic search over issues would provide value for beads.\n\n**Use case:** Find semantically related issues (e.g., 'login broken' finds 'authentication failure', 'session expired').\n\n**Questions to answer:**\n1. What workflows would this enable that we can't do now?\n2. Is dataset size (typically 50-200 issues) large enough to benefit?\n3. Do structured features (deps, tags, types) already provide better relationships?\n4. What's the maintenance cost (embeddings, storage, recomputation)?\n\n**Alternatives to consider:**\n- Improve 'bd list' filtering with regex/boolean queries\n- Add 'bd related \u003cid\u003e' showing deps + mentions + same tags\n- Export to JSON and pipe to external AI tools\n\n**Decision:** Only implement if clear use case emerges. Don't add complexity for theoretical benefits.\n\n**Context:** Part of evaluating Turso RFC ideas (GH #2). Vector search was proposed but unclear if needed for typical beads usage.","status":"open","priority":3,"issue_type":"task","created_at":"2025-10-16T20:46:08.971822-07:00","updated_at":"2025-10-17T01:32:00.954311-07:00"}
|
||
{"id":"bd-96","title":"Fix renumbering temp ID collision bug","description":"bd renumber --force fails with UNIQUE constraint error when trying to assign temp IDs:\n\nError: failed to rename bd-11 to temp ID: failed to update issue ID: constraint failed: UNIQUE constraint failed: issues.id (1555)\n\nThe temp ID generation logic in renumber.go doesn't guarantee unique IDs. Need to:\n1. Use a temp ID strategy that can't collide (e.g., prefix with 'temp-', use UUIDs, or use high numbers like 999999+)\n2. Verify temp IDs don't exist before using them\n3. Add test case for renumbering with various ID gaps\n\nReproduced when renumbering 107 issues with gaps (IDs 1-344 compacting to 1-107).","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-10-16T21:13:38.519915-07:00","updated_at":"2025-10-17T01:32:01.027187-07:00","closed_at":"2025-10-16T21:19:18.49592-07:00"}
|
||
{"id":"bd-97","title":"Implement daemon architecture for concurrent access","description":"Multiple AI agents running concurrently cause database corruption, git lock contention, and data loss. Implement a daemon-based architecture where bd daemon owns SQLite (single writer) and all bd commands become RPC clients when daemon is running. Batches git operations to prevent index.lock contention. Maintains backward compatibility with graceful fallback to direct mode. See DAEMON_DESIGN.md for full details.","design":"Architecture: Unix socket RPC with JSON payloads. bd commands auto-detect daemon socket, fall back to direct mode if not present. Daemon serializes all SQLite writes and batches git exports every 5 seconds. Per-repo daemon using .beads/bd.sock location.\n\nImplementation phases:\n1. RPC protocol infrastructure (protocol.go, server.go, client.go)\n2. Client auto-detection and fallback\n3. Daemon SQLite ownership and git batching\n4. Atomic operations and transactions","acceptance_criteria":"- 4 concurrent agents can run without errors\n- No UNIQUE constraint failures on ID generation\n- No git index.lock errors \n- SQLite counter stays in sync with actual issues\n- Graceful fallback when daemon not running\n- All existing tests pass\n- Documentation updated","status":"closed","priority":0,"issue_type":"epic","created_at":"2025-10-16T21:54:48.794119-07:00","updated_at":"2025-10-17T01:32:00.958183-07:00","closed_at":"2025-10-16T23:45:02.505335-07:00","dependencies":[{"issue_id":"bd-97","depends_on_id":"bd-98","type":"parent-child","created_at":"2025-10-16T21:54:56.032869-07:00","created_by":"stevey"}]}
|
||
{"id":"bd-98","title":"Phase 1: Implement RPC protocol infrastructure","description":"Create the foundation for daemon-client communication using Unix sockets and JSON.\n\nNew files to create:\n- internal/rpc/protocol.go - Request/response types, operations enum\n- internal/rpc/server.go - Unix socket server that daemon runs\n- internal/rpc/client.go - Client library for bd commands to use\n\nSocket location: .beads/bd.sock (per-repo)\n\nOperations to support initially: create, update, list, show, close, ready, stats","design":"protocol.go defines:\n- Request struct with Operation string and Args json.RawMessage\n- Response struct with Success bool, Data json.RawMessage, Error string\n- Operation constants for all bd commands\n\nserver.go implements:\n- Unix socket listener on .beads/bd.sock\n- Request handler that dispatches to storage layer\n- Graceful shutdown on signals\n\nclient.go implements:\n- TryConnect() to detect running daemon\n- Execute(operation, args) to send RPC request\n- Connection pooling/reuse for performance","acceptance_criteria":"- internal/rpc package compiles without errors\n- Server can accept and respond to simple ping request\n- Client can connect to socket and receive response\n- Unit tests for protocol serialization/deserialization\n- Socket cleanup on server shutdown","status":"closed","priority":0,"issue_type":"task","created_at":"2025-10-16T21:54:48.83081-07:00","updated_at":"2025-10-17T01:32:00.958827-07:00","closed_at":"2025-10-16T22:02:40.675096-07:00"}
|
||
{"id":"bd-99","title":"Phase 2: Add client auto-detection in bd commands","description":"Modify all bd commands to detect if daemon is running and route through RPC client if available, otherwise fall back to direct storage access.\n\nChanges needed:\n- Update cmd/bd/main.go to check for daemon socket on startup\n- Wrap storage calls with TryConnect logic\n- Ensure all commands work identically in both modes\n- Add --no-daemon flag to force direct mode\n\nThis maintains backward compatibility while enabling daemon mode.","status":"closed","priority":0,"issue_type":"task","created_at":"2025-10-16T22:47:36.185502-07:00","updated_at":"2025-10-17T01:32:00.959633-07:00","closed_at":"2025-10-16T23:05:11.299018-07:00","dependencies":[{"issue_id":"bd-99","depends_on_id":"bd-97","type":"parent-child","created_at":"2025-10-16T22:47:36.190931-07:00","created_by":"stevey"}]}
|