From d582bd9cca50cf22b951acc2038c008069f76f6c Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Tue, 21 Oct 2025 21:08:03 -0700 Subject: [PATCH] Sync issues.jsonl after cleanup --- .beads/issues.jsonl | 98 ++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 8a7a33c5..7e26a8de 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -1,50 +1,48 @@ -{"id":"bd-164","title":"Consider implementing pre-commit hooks for Storage interface changes","description":"The documentation (INTERFACE_CHANGES.md) suggests adding pre-commit hooks that automatically check for Storage interface changes and verify all mocks are updated. This would prevent similar issues in the future where interface changes break mock implementations.\n\nDiscovered during execution of vc-228 (dogfooding run #14/15).","design":"Implement a pre-commit hook that:\n1. Detects changes to internal/storage/storage.go\n2. Runs scripts/find-storage-mocks.sh to find all mock implementations\n3. Attempts to compile all test files with mocks\n4. Blocks commit if compilation fails\n\nTools: husky, pre-commit framework, or simple .git/hooks/pre-commit script","acceptance_criteria":"- Pre-commit hook installed and documented\n- Hook detects Storage interface changes\n- Hook validates all mocks compile\n- Hook can be bypassed with --no-verify if needed\n- Documentation updated with installation instructions","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.484247-07:00"} -{"id":"bd-165","title":"Implement bd quickstart command","description":"Add bd quickstart command to show context-aware repo information: recent issues, database location, configured prefix, example queries. Helps AI agents understand current project state. Companion to bd onboard.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.484472-07:00"} -{"id":"bd-166","title":"Add customizable time threshold for compact command","description":"Currently compact uses fixed 30-day and 90-day tiers. Add support for custom time thresholds like '--older-than 60h' or '--older-than 2.5d' to allow more flexible compaction policies.\n\nExamples:\n bd compact --all --older-than 60h\n bd compact --all --older-than 2.5d\n bd compact --all --tier 1 --age 48h\n\nThis would allow users to set their own compaction schedules based on their workflow needs.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.484717-07:00"} -{"id":"bd-168","title":"Add --id flag to bd list for filtering by specific issue IDs","description":"","design":"Add --id flag accepting comma-separated IDs. Usage: bd list --id wy-11,wy-12. Combines with other filters. From filter-flag-design.md.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.485189-07:00"} -{"id":"bd-169","title":"Make merge command idempotent for safe retry after partial failures","description":"The merge command currently performs 3 operations without an outer transaction:\n1. Migrate dependencies from source → target\n2. Update text references across all issues\n3. Close source issues\n\nIf merge fails mid-operation (network issue, daemon crash, etc.), a retry will fail or produce incorrect results because some operations already succeeded.\n\n**Goal:** Make merge idempotent so retrying after partial failure is safe and completes the remaining work.\n\n**Idempotency checks needed:**\n- Skip dependency migration if target already has the dependency\n- Skip text reference updates if already updated\n- Skip closing source issues if already closed\n- Report which operations were skipped vs performed\n\n**Example output:**\n```\nāœ“ Merged 2 issue(s) into bd-128\n - Dependencies: 3 migrated, 2 already existed\n - Text references: 5 updated, 0 already correct\n - Source issues: 1 closed, 1 already closed\n```\n\n**Related:** bd-18 originally requested transaction support, but idempotency is a better solution for this use case since individual operations are already atomic.","design":"Current merge code already has some idempotency:\n- Dependency migration checks `alreadyExists` before adding (line ~145-151 in merge.go)\n- Text reference updates are naturally idempotent (replacing bd-X with bd-Y twice has same result)\n\nMissing idempotency:\n- CloseIssue fails if source already closed\n- Error messages don't distinguish \"already done\" from \"real failure\"\n\nImplementation:\n1. Check source issue status before closing - skip if already closed\n2. Track which operations succeeded/skipped\n3. Return detailed results for user visibility\n4. Consider adding --dry-run output showing what would be done vs skipped","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.485417-07:00"} -{"id":"bd-186","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.490353-07:00","closed_at":"2025-10-14T02:51:52.19905-07:00"} -{"id":"bd-187","title":"Add workspace config file for multi-repo management (optional enhancement)","description":"For users who want explicit control over multi-repo setup without daemon, add optional workspace config file.\n\nConfig file: ~/.beads/workspaces.toml\n\nExample:\n[workspaces]\ncurrent = \"global\"\n\n[workspace.global]\ndb = \"~/.beads/global.db\"\ndescription = \"System-wide tasks\"\n\n[workspace.project1] \ndb = \"~/src/project1/.beads/db.sqlite\"\ndescription = \"Main product\"\n\n[workspace.project2]\ndb = \"~/src/project2/.beads/db.sqlite\"\ndescription = \"Internal tools\"\n\nCommands:\nbd workspace list # Show all workspaces\nbd workspace add NAME PATH # Add workspace\nbd workspace remove NAME # Remove workspace \nbd workspace use NAME # Switch active workspace\nbd workspace current # Show current workspace\nbd --workspace NAME \u003ccommand\u003e # Override for single command\n\nImplementation:\n- Load config in PersistentPreRun\n- Override dbPath based on current workspace\n- Store workspace state in config file\n- Support both workspace config AND auto-discovery\n- Workspace config takes precedence over auto-discovery\n\nPriority rationale:\n- Priority 3 (low) because daemon approach already solves this\n- Only implement if users request explicit workspace management\n- Adds complexity vs daemon's automatic discovery\n\nAlternative: Users can use BEADS_DB env var for manual workspace switching today.","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.490539-07:00","closed_at":"2025-10-20T16:04:27.216482-07:00"} -{"id":"bd-188","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":"closed","priority":3,"issue_type":"bug","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.490757-07:00","closed_at":"2025-10-18T09:41:18.209717-07:00"} -{"id":"bd-189","title":"Global daemon should warn/reject --auto-commit and --auto-push","description":"When user runs 'bd daemon --global --auto-commit', it's unclear which repo the daemon will commit to (especially after fixing bd-127 where global daemon won't open a DB).\n\nOptions:\n1. Warn and ignore the flags in global mode\n2. Error out with clear message\n\nLine 87-91 already checks autoPush, but should skip check entirely for global mode. Add user-friendly messaging about flag incompatibility.","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.490973-07:00","closed_at":"2025-10-17T23:04:30.223432-07:00"} -{"id":"bd-190","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":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.491371-07:00","closed_at":"2025-10-18T09:43:18.250156-07:00"} -{"id":"bd-191","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.49158-07:00","closed_at":"2025-10-16T20:31:19.174534-07:00"} -{"id":"bd-192","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":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.491807-07:00","closed_at":"2025-10-18T09:44:24.167574-07:00"} -{"id":"bd-193","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.492065-07:00","closed_at":"2025-10-14T02:51:52.200141-07:00"} -{"id":"bd-194","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":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.49227-07:00","closed_at":"2025-10-18T09:47:43.22126-07:00"} -{"id":"bd-195","title":"Document label best practices and use cases","description":"Create documentation covering:\n- When to use labels vs structured fields\n- Common label sets (coding agents, open source, product dev, SRE)\n- Naming conventions (kebab-case, specificity, present tense)\n- Anti-patterns (too many labels, overlapping, personal labels)\n- Label lifecycle management\n\nContent from LABELS.md analysis document.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.492452-07:00","closed_at":"2025-10-19T23:11:46.125417-07:00"} -{"id":"bd-196","title":"Add rule-based compaction (e.g., compact children of closed epics)","description":"Support semantic compaction rules beyond just time-based, such as:\n- Compact all children of closed epics\n- Compact by priority level (e.g., all P3/P4 closed issues)\n- Compact by label (e.g., all issues labeled 'archive')\n- Compact by type (e.g., all closed chores)\n\nThis would allow smarter database size management based on semantic meaning rather than just age.","status":"open","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.492667-07:00"} -{"id":"bd-197","title":"Add compact --dry-run that shows size savings estimates","description":"When running 'bd compact --dry-run', show estimated database size reduction in KB/MB and percentage, similar to what 'du -h' would show.\n\nExample output:\n Tier 1 candidates: 15 issues\n Current size: 2.4 MB\n After compaction: ~1.7 MB (70% reduction, 0.7 MB saved)\n \nThis helps users understand impact before compacting.","status":"open","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.492878-07:00"} -{"id":"bd-198","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-87 (composite index on depends_on_id, type)","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.493069-07:00","closed_at":"2025-10-18T12:47:44.284846-07:00"} -{"id":"bd-199","title":"Add performance benchmarks document","description":"Document actual performance metrics with hyperfine tests","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.493284-07:00","closed_at":"2025-10-18T10:09:23.532938-07:00"} -{"id":"bd-200","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":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.493946-07:00","closed_at":"2025-10-18T10:09:23.532858-07:00"} -{"id":"bd-201","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":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.494191-07:00","closed_at":"2025-10-20T14:34:52.483358-07:00"} -{"id":"bd-202","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":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.494413-07:00","closed_at":"2025-10-18T10:11:38.985862-07:00"} -{"id":"bd-203","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.494631-07:00","closed_at":"2025-10-14T14:37:17.463352-07:00"} -{"id":"bd-204","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.494834-07:00","closed_at":"2025-10-16T10:07:34.038708-07:00"} -{"id":"bd-205","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.495071-07:00","closed_at":"2025-10-14T02:51:52.198988-07:00"} -{"id":"bd-206","title":"Add cross-repo issue references (future enhancement)","description":"Support referencing issues across different beads repositories. Useful for tracking dependencies between separate projects.\n\nProposed syntax:\n- Local reference: bd-128 (current behavior)\n- Cross-repo by path: ~/src/other-project#bd-456\n- Cross-repo by workspace name: @project2:bd-789\n\nUse cases:\n1. Frontend project depends on backend API issue\n2. Shared library changes blocking multiple projects\n3. System administrator tracking work across machines\n4. Monorepo with separate beads databases per component\n\nImplementation challenges:\n- Storage layer needs to query external databases\n- Dependency resolution across repos\n- What if external repo not available?\n- How to handle in JSONL export/import?\n- Security: should repos be able to read others?\n\nDesign questions to resolve first:\n1. Read-only references vs full cross-repo dependencies?\n2. How to handle repo renames/moves?\n3. Absolute paths vs workspace names vs git remotes?\n4. Should bd-183 auto-discover related repos?\n\nRecommendation: \n- Gather user feedback first\n- Start with read-only references\n- Implement as plugin/extension?\n\nContext: This is mentioned in bd-183 as approach #2. Much more complex than daemon multi-repo approach. Only implement if there's strong user demand.\n\nPriority: Backlog (4) - wait for user feedback before designing","status":"closed","priority":4,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.495289-07:00","closed_at":"2025-10-20T22:00:31.966891-07:00"} -{"id":"bd-207","title":"Test auto-export timing","description":"","status":"closed","priority":4,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.495517-07:00","closed_at":"2025-10-20T22:00:31.964329-07:00"} -{"id":"bd-208","title":"Test real auto-export","description":"","status":"closed","priority":4,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.495714-07:00","closed_at":"2025-10-20T22:00:31.967571-07:00"} -{"id":"bd-209","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":"closed","priority":4,"issue_type":"chore","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.495923-07:00","closed_at":"2025-10-19T19:27:34.230312-07:00"} -{"id":"bd-210","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":"closed","priority":4,"issue_type":"chore","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.496316-07:00","closed_at":"2025-10-19T19:22:19.172983-07:00"} -{"id":"bd-211","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":"closed","priority":4,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.496526-07:00","closed_at":"2025-10-19T08:59:59.596748-07:00"} -{"id":"bd-212","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.496724-07:00","closed_at":"2025-10-14T02:51:52.199176-07:00"} -{"id":"bd-213","title":"Investigate stress test database pollution (vc-248)","description":"Investigation of stress tests polluting production database with 1,600+ test issues on Oct 21 at 20:24-20:25. Root cause analysis completed. Tests now verified to work correctly with proper isolation.","notes":"Bug confirmed! Tests DO pollute production DB. 1,000 test issues created at 20:46:01-20:46:02 during TestStressNoUniqueConstraintViolations. Root cause: test goroutines connect to production daemon at .beads/bd.sock instead of test daemon.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:47:57.835835-07:00","updated_at":"2025-10-21T21:00:32.496919-07:00"} -{"id":"bd-214","title":"Stress tests pollute production database with test issues","description":"TestStressNoUniqueConstraintViolations and other stress tests in internal/rpc/stress_test.go create issues in production database instead of test database. Confirmed: 1,000 test issues (Agent X Issue Y) created at 20:46:01 during test run. Root cause: test goroutines connect to production daemon at .beads/bd.sock instead of isolated test daemon in temp directory.","status":"open","priority":0,"issue_type":"bug","created_at":"2025-10-21T20:50:23.049738-07:00","updated_at":"2025-10-21T21:00:32.497128-07:00"} -{"id":"bd-28","title":"Fix flaky CI tests in compactor and daemon modules","description":"Multiple test failures observed in CI:\n- TestCompactTier1_DryRun \n- TestCompactTier1Batch_DryRun\n- TestCompactTier1Batch_WithIneligible\n- TestMockAPI_CompactTier1\n- TestBatchOperations_ErrorHandling\n- TestCommentOperationsViaRPC\n- TestMemoryPressureDetection\n- TestPing\n\nAll failures related to 'issue has open dependents or not closed long enough' eligibility checks.\n\nSee CI run: https://github.com/steveyegge/beads/actions/runs/18688772658","status":"open","priority":1,"issue_type":"bug","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.498709-07:00"} -{"id":"bd-51","title":"Compact command fails with daemon - requires --no-daemon workaround","description":"The 'bd compact' command fails with 'Error: compact requires SQLite storage' when used with the daemon (default mode), but works correctly with the '--no-daemon' flag.\n\nThe daemon RPC interface doesn't properly expose the compact command, even though the daemon itself uses SQLite storage.\n\nReproduction:\n1. Ensure daemon is running (bd daemon status)\n2. Run: bd compact --stats\n Result: Error: compact requires SQLite storage\n3. Run: bd compact --stats --no-daemon\n Result: Works correctly, shows statistics\n\nExpected behavior:\nThe compact command should work through the daemon RPC interface just like other commands (list, create, update, delete, renumber, etc.)\n\nImpact:\nUsers cannot use compact operations in the normal workflow. They must use --no-daemon which bypasses the daemon entirely.\n\nSuggested fix:\nAdd compact operation support to the daemon RPC interface, similar to how renumber and other operations are exposed.","status":"in_progress","priority":1,"issue_type":"bug","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.504475-07:00"} -{"id":"bd-54","title":"Implement bd merge command for combining duplicate issues","description":"Support merging duplicate issues identified either manually by users or automatically by AI agents.\n\nRequested in GitHub issue #93 by neongreen. User has multiple copies of the same issue and wants to merge them rather than just delete duplicates.\n\nRequirements:\n- Manual merge: User specifies which issues to merge (e.g., bd merge bd-182 bd-183 --into bd-182)\n- AI-assisted: Agent analyzes issues, identifies duplicates, then uses manual merge command\n- Auto-update all text references and dependencies to point to merged issue\n- No framework-side duplicate detection - delegate to agents\n\nThe merge command should:\n1. Combine issue data (prefer target issue's data, optionally merge descriptions)\n2. Migrate all dependencies to merged issue\n3. Update all text references in other issues (like \"see bd-183\" -\u003e \"see bd-182\")\n4. Mark merged issues as closed with reason \"Merged into bd-X\"","design":"Manual merge command:\n bd merge \u003csource-id\u003e... --into \u003ctarget-id\u003e [--json]\n\nAI-assisted workflow:\n 1. Agent runs: bd list --json\n 2. Agent analyzes for duplicates (title similarity, description, etc.)\n 3. Agent presents findings to user\n 4. User approves merge\n 5. Agent executes: bd merge bd-X bd-Y --into bd-X\n\nImplementation considerations:\n- Reuse text reference update logic from import collision resolution\n- Add merged_into field to track merge history\n- Update export/import to handle merge history\n- Consider showing merge history in bd show output","status":"in_progress","priority":1,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T20:50:14.933464-07:00","dependencies":[{"issue_id":"bd-54","depends_on_id":"bd-56","type":"parent-child","created_at":"2025-10-21T20:45:01.442222-07:00","created_by":"import"},{"issue_id":"bd-54","depends_on_id":"bd-57","type":"parent-child","created_at":"2025-10-21T20:45:01.44269-07:00","created_by":"import"},{"issue_id":"bd-54","depends_on_id":"bd-58","type":"parent-child","created_at":"2025-10-21T20:45:01.443086-07:00","created_by":"import"},{"issue_id":"bd-54","depends_on_id":"bd-59","type":"parent-child","created_at":"2025-10-21T20:45:01.443484-07:00","created_by":"import"},{"issue_id":"bd-54","depends_on_id":"bd-60","type":"parent-child","created_at":"2025-10-21T20:45:01.443842-07:00","created_by":"import"},{"issue_id":"bd-54","depends_on_id":"bd-61","type":"parent-child","created_at":"2025-10-21T20:45:01.444212-07:00","created_by":"import"},{"issue_id":"bd-54","depends_on_id":"bd-62","type":"parent-child","created_at":"2025-10-21T20:45:01.444536-07:00","created_by":"import"},{"issue_id":"bd-54","depends_on_id":"bd-63","type":"parent-child","created_at":"2025-10-21T20:45:01.444919-07:00","created_by":"import"},{"issue_id":"bd-54","depends_on_id":"bd-66","type":"parent-child","created_at":"2025-10-21T20:45:01.44528-07:00","created_by":"import"},{"issue_id":"bd-54","depends_on_id":"bd-55","type":"parent-child","created_at":"2025-10-21T20:45:01.445665-07:00","created_by":"import"}]} -{"id":"bd-62","title":"Write tests for merge functionality","description":"Unit tests: validation, merge logic, data integrity. Integration tests: end-to-end workflow, export/import. Edge case tests: chains, circular refs, epics.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.507616-07:00"} -{"id":"bd-63","title":"Document merge command and AI integration","description":"Update README, AGENTS.md with merge command examples. Document AI agent duplicate detection workflow.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.507824-07:00"} -{"id":"bd-68","title":"Add merged_into field to database schema","description":"Add merged_into field to Issue struct and update database schema to support merge tracking","notes":"Simplified: no schema field needed. Close merged issues with reason 'Merged into bd-X'. See bd-79 design.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.508824-07:00"} -{"id":"bd-69","title":"Update export/import for merge fields","description":"Include merged_into in JSONL export format. Handle merge relationships on import.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.509038-07:00"} -{"id":"bd-70","title":"Add merged_into field to database schema","description":"Add merged_into field to Issue struct and update database schema to support merge tracking","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.509444-07:00"} -{"id":"bd-72","title":"Add merged_into field to database schema","description":"Add merged_into field to Issue struct and update database schema to support merge tracking","notes":"Simplified: no schema field needed. Close merged issues with reason 'Merged into bd-X'. See bd-54 design.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.50984-07:00"} -{"id":"bd-73","title":"Implement dependency migration for merge","description":"Migrate all dependencies from source issue(s) to target issue during merge, removing duplicates and preserving graph integrity","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.51003-07:00"} -{"id":"bd-74","title":"Implement text reference scanning and replacement","description":"Scan all issues for text references to merged IDs (bd-X patterns) and update to target ID. Reuse logic from import collision resolution.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.510222-07:00"} -{"id":"bd-75","title":"Add CLI merge command and flags","description":"Implement bd merge command with: multiple sources, --into target, --dry-run, --json flags. Add interactive confirmation.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.510426-07:00"} -{"id":"bd-76","title":"Add transaction support for atomic merges","description":"Wrap all merge operations in SQLite transaction for atomicity. Implement rollback on failure.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.510618-07:00"} -{"id":"bd-77","title":"Update export/import for merge fields","description":"Include merged_into in JSONL export format. Handle merge relationships on import.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.510812-07:00"} -{"id":"bd-78","title":"Add merged_into field to database schema","description":"Add merged_into field to Issue struct and update database schema to support merge tracking","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:32.511009-07:00"} -{"id":"bd-79","title":"Implement bd merge command for combining duplicate issues","description":"Support merging duplicate issues identified either manually by users or automatically by AI agents.\n\nRequested in GitHub issue #93 by neongreen. User has multiple copies of the same issue and wants to merge them rather than just delete duplicates.\n\nRequirements:\n- Manual merge: User specifies which issues to merge (e.g., bd merge bd-182 bd-183 --into bd-182)\n- AI-assisted: Agent analyzes issues, identifies duplicates, then uses manual merge command\n- Auto-update all text references and dependencies to point to merged issue\n- No framework-side duplicate detection - delegate to agents\n\nThe merge command should:\n1. Combine issue data (prefer target issue's data, optionally merge descriptions)\n2. Migrate all dependencies to merged issue\n3. Update all text references in other issues (like \"see bd-183\" -\u003e \"see bd-182\")\n4. Mark merged issues as closed with reason \"Merged into bd-X\"","design":"Manual merge command:\n bd merge \u003csource-id\u003e... --into \u003ctarget-id\u003e [--json]\n\nAI-assisted workflow:\n 1. Agent runs: bd list --json\n 2. Agent analyzes for duplicates (title similarity, description, etc.)\n 3. Agent presents findings to user\n 4. User approves merge\n 5. Agent executes: bd merge bd-X bd-Y --into bd-X\n\nImplementation considerations:\n- Reuse text reference update logic from import collision resolution\n- Add merged_into field to track merge history\n- Update export/import to handle merge history\n- Consider showing merge history in bd show output","status":"open","priority":1,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T20:50:14.934598-07:00","dependencies":[{"issue_id":"bd-79","depends_on_id":"bd-56","type":"parent-child","created_at":"2025-10-21T20:45:01.446004-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-73","type":"parent-child","created_at":"2025-10-21T20:45:01.446362-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-74","type":"parent-child","created_at":"2025-10-21T20:45:01.446689-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-75","type":"parent-child","created_at":"2025-10-21T20:45:01.447047-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-76","type":"parent-child","created_at":"2025-10-21T20:45:01.447379-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-62","type":"parent-child","created_at":"2025-10-21T20:45:01.447705-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-63","type":"parent-child","created_at":"2025-10-21T20:45:01.448028-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-69","type":"parent-child","created_at":"2025-10-21T20:45:01.448318-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-70","type":"parent-child","created_at":"2025-10-21T20:45:01.448605-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-68","type":"parent-child","created_at":"2025-10-21T20:45:01.449305-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-77","type":"parent-child","created_at":"2025-10-21T20:45:01.449602-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-78","type":"parent-child","created_at":"2025-10-21T20:45:01.449879-07:00","created_by":"import"},{"issue_id":"bd-79","depends_on_id":"bd-72","type":"parent-child","created_at":"2025-10-21T20:45:01.450171-07:00","created_by":"import"}]} +{"id":"bd-1","title":"Global daemon should warn/reject --auto-commit and --auto-push","description":"When user runs 'bd daemon --global --auto-commit', it's unclear which repo the daemon will commit to (especially after fixing bd-127 where global daemon won't open a DB).\n\nOptions:\n1. Warn and ignore the flags in global mode\n2. Error out with clear message\n\nLine 87-91 already checks autoPush, but should skip check entirely for global mode. Add user-friendly messaging about flag incompatibility.","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.046253-07:00","closed_at":"2025-10-17T23:04:30.223432-07:00"} +{"id":"bd-10","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.05501-07:00","closed_at":"2025-10-14T02:51:52.199176-07:00"} +{"id":"bd-11","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":"closed","priority":3,"issue_type":"bug","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.055251-07:00","closed_at":"2025-10-18T09:41:18.209717-07:00"} +{"id":"bd-12","title":"Implement text reference scanning and replacement","description":"Scan all issues for text references to merged IDs (bd-X patterns) and update to target ID. Reuse logic from import collision resolution.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.055516-07:00"} +{"id":"bd-13","title":"Add CLI merge command and flags","description":"Implement bd merge command with: multiple sources, --into target, --dry-run, --json flags. Add interactive confirmation.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.055782-07:00"} +{"id":"bd-14","title":"Add transaction support for atomic merges","description":"Wrap all merge operations in SQLite transaction for atomicity. Implement rollback on failure.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.056016-07:00"} +{"id":"bd-15","title":"Update export/import for merge fields","description":"Include merged_into in JSONL export format. Handle merge relationships on import.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.056251-07:00"} +{"id":"bd-16","title":"Add merged_into field to database schema","description":"Add merged_into field to Issue struct and update database schema to support merge tracking","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.056492-07:00"} +{"id":"bd-17","title":"Consider implementing pre-commit hooks for Storage interface changes","description":"The documentation (INTERFACE_CHANGES.md) suggests adding pre-commit hooks that automatically check for Storage interface changes and verify all mocks are updated. This would prevent similar issues in the future where interface changes break mock implementations.\n\nDiscovered during execution of vc-228 (dogfooding run #14/15).","design":"Implement a pre-commit hook that:\n1. Detects changes to internal/storage/storage.go\n2. Runs scripts/find-storage-mocks.sh to find all mock implementations\n3. Attempts to compile all test files with mocks\n4. Blocks commit if compilation fails\n\nTools: husky, pre-commit framework, or simple .git/hooks/pre-commit script","acceptance_criteria":"- Pre-commit hook installed and documented\n- Hook detects Storage interface changes\n- Hook validates all mocks compile\n- Hook can be bypassed with --no-verify if needed\n- Documentation updated with installation instructions","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.056726-07:00"} +{"id":"bd-18","title":"Implement bd quickstart command","description":"Add bd quickstart command to show context-aware repo information: recent issues, database location, configured prefix, example queries. Helps AI agents understand current project state. Companion to bd onboard.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.056959-07:00"} +{"id":"bd-19","title":"Add customizable time threshold for compact command","description":"Currently compact uses fixed 30-day and 90-day tiers. Add support for custom time thresholds like '--older-than 60h' or '--older-than 2.5d' to allow more flexible compaction policies.\n\nExamples:\n bd compact --all --older-than 60h\n bd compact --all --older-than 2.5d\n bd compact --all --tier 1 --age 48h\n\nThis would allow users to set their own compaction schedules based on their workflow needs.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.057184-07:00"} +{"id":"bd-2","title":"Implement dependency migration for merge","description":"Migrate all dependencies from source issue(s) to target issue during merge, removing duplicates and preserving graph integrity","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.046523-07:00"} +{"id":"bd-20","title":"Add --id flag to bd list for filtering by specific issue IDs","description":"","design":"Add --id flag accepting comma-separated IDs. Usage: bd list --id wy-11,wy-12. Combines with other filters. From filter-flag-design.md.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.057415-07:00"} +{"id":"bd-21","title":"Make merge command idempotent for safe retry after partial failures","description":"The merge command currently performs 3 operations without an outer transaction:\n1. Migrate dependencies from source → target\n2. Update text references across all issues\n3. Close source issues\n\nIf merge fails mid-operation (network issue, daemon crash, etc.), a retry will fail or produce incorrect results because some operations already succeeded.\n\n**Goal:** Make merge idempotent so retrying after partial failure is safe and completes the remaining work.\n\n**Idempotency checks needed:**\n- Skip dependency migration if target already has the dependency\n- Skip text reference updates if already updated\n- Skip closing source issues if already closed\n- Report which operations were skipped vs performed\n\n**Example output:**\n```\nāœ“ Merged 2 issue(s) into bd-128\n - Dependencies: 3 migrated, 2 already existed\n - Text references: 5 updated, 0 already correct\n - Source issues: 1 closed, 1 already closed\n```\n\n**Related:** bd-18 originally requested transaction support, but idempotency is a better solution for this use case since individual operations are already atomic.","design":"Current merge code already has some idempotency:\n- Dependency migration checks `alreadyExists` before adding (line ~145-151 in merge.go)\n- Text reference updates are naturally idempotent (replacing bd-X with bd-Y twice has same result)\n\nMissing idempotency:\n- CloseIssue fails if source already closed\n- Error messages don't distinguish \"already done\" from \"real failure\"\n\nImplementation:\n1. Check source issue status before closing - skip if already closed\n2. Track which operations succeeded/skipped\n3. Return detailed results for user visibility\n4. Consider adding --dry-run output showing what would be done vs skipped","status":"open","priority":2,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.057645-07:00"} +{"id":"bd-22","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.057885-07:00","closed_at":"2025-10-14T02:51:52.19905-07:00"} +{"id":"bd-23","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":"closed","priority":4,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.058124-07:00","closed_at":"2025-10-19T08:59:59.596748-07:00"} +{"id":"bd-24","title":"Add workspace config file for multi-repo management (optional enhancement)","description":"For users who want explicit control over multi-repo setup without daemon, add optional workspace config file.\n\nConfig file: ~/.beads/workspaces.toml\n\nExample:\n[workspaces]\ncurrent = \"global\"\n\n[workspace.global]\ndb = \"~/.beads/global.db\"\ndescription = \"System-wide tasks\"\n\n[workspace.project1] \ndb = \"~/src/project1/.beads/db.sqlite\"\ndescription = \"Main product\"\n\n[workspace.project2]\ndb = \"~/src/project2/.beads/db.sqlite\"\ndescription = \"Internal tools\"\n\nCommands:\nbd workspace list # Show all workspaces\nbd workspace add NAME PATH # Add workspace\nbd workspace remove NAME # Remove workspace \nbd workspace use NAME # Switch active workspace\nbd workspace current # Show current workspace\nbd --workspace NAME \u003ccommand\u003e # Override for single command\n\nImplementation:\n- Load config in PersistentPreRun\n- Override dbPath based on current workspace\n- Store workspace state in config file\n- Support both workspace config AND auto-discovery\n- Workspace config takes precedence over auto-discovery\n\nPriority rationale:\n- Priority 3 (low) because daemon approach already solves this\n- Only implement if users request explicit workspace management\n- Adds complexity vs daemon's automatic discovery\n\nAlternative: Users can use BEADS_DB env var for manual workspace switching today.","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.058355-07:00","closed_at":"2025-10-20T16:04:27.216482-07:00"} +{"id":"bd-25","title":"Add merged_into field to database schema","description":"Add merged_into field to Issue struct and update database schema to support merge tracking","notes":"Simplified: no schema field needed. Close merged issues with reason 'Merged into bd-X'. See bd-54 design.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.058591-07:00"} +{"id":"bd-26","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":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.058869-07:00","closed_at":"2025-10-18T09:43:18.250156-07:00"} +{"id":"bd-27","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.059173-07:00","closed_at":"2025-10-16T20:31:19.174534-07:00"} +{"id":"bd-28","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":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.059449-07:00","closed_at":"2025-10-18T09:44:24.167574-07:00"} +{"id":"bd-29","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.059714-07:00","closed_at":"2025-10-14T02:51:52.200141-07:00"} +{"id":"bd-3","title":"Fix flaky CI tests in compactor and daemon modules","description":"Multiple test failures observed in CI:\n- TestCompactTier1_DryRun \n- TestCompactTier1Batch_DryRun\n- TestCompactTier1Batch_WithIneligible\n- TestMockAPI_CompactTier1\n- TestBatchOperations_ErrorHandling\n- TestCommentOperationsViaRPC\n- TestMemoryPressureDetection\n- TestPing\n\nAll failures related to 'issue has open dependents or not closed long enough' eligibility checks.\n\nSee CI run: https://github.com/steveyegge/beads/actions/runs/18688772658","status":"open","priority":1,"issue_type":"bug","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.052974-07:00"} +{"id":"bd-30","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":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.059984-07:00","closed_at":"2025-10-18T09:47:43.22126-07:00"} +{"id":"bd-31","title":"Document label best practices and use cases","description":"Create documentation covering:\n- When to use labels vs structured fields\n- Common label sets (coding agents, open source, product dev, SRE)\n- Naming conventions (kebab-case, specificity, present tense)\n- Anti-patterns (too many labels, overlapping, personal labels)\n- Label lifecycle management\n\nContent from LABELS.md analysis document.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.060245-07:00","closed_at":"2025-10-19T23:11:46.125417-07:00"} +{"id":"bd-32","title":"Add rule-based compaction (e.g., compact children of closed epics)","description":"Support semantic compaction rules beyond just time-based, such as:\n- Compact all children of closed epics\n- Compact by priority level (e.g., all P3/P4 closed issues)\n- Compact by label (e.g., all issues labeled 'archive')\n- Compact by type (e.g., all closed chores)\n\nThis would allow smarter database size management based on semantic meaning rather than just age.","status":"open","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.060508-07:00"} +{"id":"bd-33","title":"Add compact --dry-run that shows size savings estimates","description":"When running 'bd compact --dry-run', show estimated database size reduction in KB/MB and percentage, similar to what 'du -h' would show.\n\nExample output:\n Tier 1 candidates: 15 issues\n Current size: 2.4 MB\n After compaction: ~1.7 MB (70% reduction, 0.7 MB saved)\n \nThis helps users understand impact before compacting.","status":"open","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.060766-07:00"} +{"id":"bd-34","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-87 (composite index on depends_on_id, type)","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.061024-07:00","closed_at":"2025-10-18T12:47:44.284846-07:00"} +{"id":"bd-35","title":"Add performance benchmarks document","description":"Document actual performance metrics with hyperfine tests","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.0613-07:00","closed_at":"2025-10-18T10:09:23.532938-07:00"} +{"id":"bd-36","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":"closed","priority":3,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.062115-07:00","closed_at":"2025-10-18T10:09:23.532858-07:00"} +{"id":"bd-37","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":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.062409-07:00","closed_at":"2025-10-20T14:34:52.483358-07:00"} +{"id":"bd-38","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":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.062654-07:00","closed_at":"2025-10-18T10:11:38.985862-07:00"} +{"id":"bd-39","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.062897-07:00","closed_at":"2025-10-14T14:37:17.463352-07:00"} +{"id":"bd-4","title":"Compact command fails with daemon - requires --no-daemon workaround","description":"The 'bd compact' command fails with 'Error: compact requires SQLite storage' when used with the daemon (default mode), but works correctly with the '--no-daemon' flag.\n\nThe daemon RPC interface doesn't properly expose the compact command, even though the daemon itself uses SQLite storage.\n\nReproduction:\n1. Ensure daemon is running (bd daemon status)\n2. Run: bd compact --stats\n Result: Error: compact requires SQLite storage\n3. Run: bd compact --stats --no-daemon\n Result: Works correctly, shows statistics\n\nExpected behavior:\nThe compact command should work through the daemon RPC interface just like other commands (list, create, update, delete, renumber, etc.)\n\nImpact:\nUsers cannot use compact operations in the normal workflow. They must use --no-daemon which bypasses the daemon entirely.\n\nSuggested fix:\nAdd compact operation support to the daemon RPC interface, similar to how renumber and other operations are exposed.","status":"in_progress","priority":1,"issue_type":"bug","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.053345-07:00"} +{"id":"bd-40","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.063138-07:00","closed_at":"2025-10-16T10:07:34.038708-07:00"} +{"id":"bd-41","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-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.063381-07:00","closed_at":"2025-10-14T02:51:52.198988-07:00"} +{"id":"bd-42","title":"Add cross-repo issue references (future enhancement)","description":"Support referencing issues across different beads repositories. Useful for tracking dependencies between separate projects.\n\nProposed syntax:\n- Local reference: bd-128 (current behavior)\n- Cross-repo by path: ~/src/other-project#bd-456\n- Cross-repo by workspace name: @project2:bd-789\n\nUse cases:\n1. Frontend project depends on backend API issue\n2. Shared library changes blocking multiple projects\n3. System administrator tracking work across machines\n4. Monorepo with separate beads databases per component\n\nImplementation challenges:\n- Storage layer needs to query external databases\n- Dependency resolution across repos\n- What if external repo not available?\n- How to handle in JSONL export/import?\n- Security: should repos be able to read others?\n\nDesign questions to resolve first:\n1. Read-only references vs full cross-repo dependencies?\n2. How to handle repo renames/moves?\n3. Absolute paths vs workspace names vs git remotes?\n4. Should bd-183 auto-discover related repos?\n\nRecommendation: \n- Gather user feedback first\n- Start with read-only references\n- Implement as plugin/extension?\n\nContext: This is mentioned in bd-183 as approach #2. Much more complex than daemon multi-repo approach. Only implement if there's strong user demand.\n\nPriority: Backlog (4) - wait for user feedback before designing","status":"closed","priority":4,"issue_type":"feature","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.063657-07:00","closed_at":"2025-10-20T22:00:31.966891-07:00"} +{"id":"bd-43","title":"Test auto-export timing","description":"","status":"closed","priority":4,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.063931-07:00","closed_at":"2025-10-20T22:00:31.964329-07:00"} +{"id":"bd-44","title":"Test real auto-export","description":"","status":"closed","priority":4,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.064201-07:00","closed_at":"2025-10-20T22:00:31.967571-07:00"} +{"id":"bd-45","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":"closed","priority":4,"issue_type":"chore","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.064467-07:00","closed_at":"2025-10-19T19:27:34.230312-07:00"} +{"id":"bd-46","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":"closed","priority":4,"issue_type":"chore","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.064749-07:00","closed_at":"2025-10-19T19:22:19.172983-07:00"} +{"id":"bd-47","title":"Investigate stress test database pollution (vc-248)","description":"Investigation of stress tests polluting production database with 1,600+ test issues on Oct 21 at 20:24-20:25. Root cause analysis completed. Tests now verified to work correctly with proper isolation.","notes":"Bug confirmed! Tests DO pollute production DB. 1,000 test issues created at 20:46:01-20:46:02 during TestStressNoUniqueConstraintViolations. Root cause: test goroutines connect to production daemon at .beads/bd.sock instead of test daemon.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:47:57.835835-07:00","updated_at":"2025-10-21T21:00:58.065043-07:00"} +{"id":"bd-48","title":"Stress tests pollute production database with test issues","description":"TestStressNoUniqueConstraintViolations and other stress tests in internal/rpc/stress_test.go create issues in production database instead of test database. Confirmed: 1,000 test issues (Agent X Issue Y) created at 20:46:01 during test run. Root cause: test goroutines connect to production daemon at .beads/bd.sock instead of isolated test daemon in temp directory.","status":"open","priority":0,"issue_type":"bug","created_at":"2025-10-21T20:50:23.049738-07:00","updated_at":"2025-10-21T21:00:58.065257-07:00"} +{"id":"bd-5","title":"Write tests for merge functionality","description":"Unit tests: validation, merge logic, data integrity. Integration tests: end-to-end workflow, export/import. Edge case tests: chains, circular refs, epics.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.053635-07:00"} +{"id":"bd-6","title":"Document merge command and AI integration","description":"Update README, AGENTS.md with merge command examples. Document AI agent duplicate detection workflow.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.053884-07:00"} +{"id":"bd-7","title":"Add merged_into field to database schema","description":"Add merged_into field to Issue struct and update database schema to support merge tracking","notes":"Simplified: no schema field needed. Close merged issues with reason 'Merged into bd-X'. See bd-79 design.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.054152-07:00"} +{"id":"bd-8","title":"Update export/import for merge fields","description":"Include merged_into in JSONL export format. Handle merge relationships on import.","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.054513-07:00"} +{"id":"bd-9","title":"Add merged_into field to database schema","description":"Add merged_into field to Issue struct and update database schema to support merge tracking","status":"open","priority":1,"issue_type":"task","created_at":"2025-10-21T20:45:01.433968-07:00","updated_at":"2025-10-21T21:00:58.054766-07:00"}