Update issue status: close bd-188

This commit is contained in:
Steve Yegge
2025-10-21 20:43:54 -07:00
parent 656ee6b65d
commit 3fda1b803b

View File

@@ -93,7 +93,7 @@
{"id":"bd-185","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:38:23.073917-07:00","updated_at":"2025-10-21T20:38:23.073917-07:00"}
{"id":"bd-186","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:38:23.073917-07:00","updated_at":"2025-10-21T20:38:23.073917-07:00"}
{"id":"bd-187","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:38:23.073917-07:00","updated_at":"2025-10-21T20:38:23.073917-07:00"}
{"id":"bd-188","title":"Improve agent onboarding UX for fresh repo clones","description":"**Problem:** Agents in fresh clones don't realize they need to import from git first. The db/JSONL split creates confusion.\n\n**Current pain points:**\n1. Running bd commands on fresh clone shows 0 issues (misleading)\n2. No auto-detection that JSONL exists in git but DB is empty/missing\n3. Creating issues before import causes collisions\n4. AGENTS.md instructions weren't prominent enough (now fixed in this commit)\n\n**Potential improvements:**\n\n**Option 1: Auto-import on first command**\n- If .beads/*.db missing but .beads/issues.jsonl exists → auto-import with message\n- If DB empty but git has HEAD:.beads/issues.jsonl → prompt to import\n- Similar to daemon auto-start UX\n\n**Option 2: Better error messages**\n- 'bd ready' on empty DB: 'No issues found. Did you forget to import? Run: bd import -i .beads/issues.jsonl'\n- 'bd create' on empty DB when JSONL in git: 'Warning: JSONL exists in git. Import first to avoid collisions'\n\n**Option 3: Unified bd onboard command** (may already exist?)\n- Check if this is covered by bd-183 (bd quickstart)\n- One command that does: import from git + explain workflow + configure MCP\n\n**Option 4: Lazy DB initialization**\n- DB auto-creates from JSONL on first read operation\n- Makes JSONL truly the source of truth\n- DB becomes pure cache, always rebuildable\n\n**Recommendation:** Start with Option 2 (better errors) - low risk, immediate UX win.","status":"open","priority":1,"issue_type":"feature","created_at":"2025-10-21T20:38:23.073917-07:00","updated_at":"2025-10-21T20:38:23.073917-07:00"}
{"id":"bd-188","title":"Improve agent onboarding UX for fresh repo clones","description":"**Problem:** Agents in fresh clones don't realize they need to import from git first. The db/JSONL split creates confusion.\n\n**Current pain points:**\n1. Running bd commands on fresh clone shows 0 issues (misleading)\n2. No auto-detection that JSONL exists in git but DB is empty/missing\n3. Creating issues before import causes collisions\n4. AGENTS.md instructions weren't prominent enough (now fixed in this commit)\n\n**Potential improvements:**\n\n**Option 1: Auto-import on first command**\n- If .beads/*.db missing but .beads/issues.jsonl exists → auto-import with message\n- If DB empty but git has HEAD:.beads/issues.jsonl → prompt to import\n- Similar to daemon auto-start UX\n\n**Option 2: Better error messages**\n- 'bd ready' on empty DB: 'No issues found. Did you forget to import? Run: bd import -i .beads/issues.jsonl'\n- 'bd create' on empty DB when JSONL in git: 'Warning: JSONL exists in git. Import first to avoid collisions'\n\n**Option 3: Unified bd onboard command** (may already exist?)\n- Check if this is covered by bd-183 (bd quickstart)\n- One command that does: import from git + explain workflow + configure MCP\n\n**Option 4: Lazy DB initialization**\n- DB auto-creates from JSONL on first read operation\n- Makes JSONL truly the source of truth\n- DB becomes pure cache, always rebuildable\n\n**Recommendation:** Start with Option 2 (better errors) - low risk, immediate UX win.","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-10-21T20:38:23.073917-07:00","updated_at":"2025-10-21T20:41:34.795949-07:00","closed_at":"2025-10-21T20:41:34.795949-07:00"}
{"id":"bd-189","title":"Auto-detect and prompt for import when query returns empty but git has issues","description":"**Problem:** Commands like 'bd list', 'bd ready', 'bd stats' return 0 issues in fresh clones, but don't hint that issues exist in git.\n\n**Proposal:** When a query command returns 0 issues, check if git has issues:\n```bash\n# If bd list returns 0 results:\ngit show HEAD:.beads/issues.jsonl | head -1 # Check if non-empty\n```\n\nIf git has issues, either:\n\n**Option A: Auto-import (recommended)**\n```\nFound 0 issues in database but 184 in git. Importing...\n[import happens automatically]\n[re-run the original query]\n```\n\n**Option B: Prompt**\n```\nFound 0 issues in database but 184 in git.\nImport now? [Y/n]\n```\n\n**Option C: Warning only**\n```\nFound 0 issues.\nHint: Found issues in git history. Run: bd import -i \u003c(git show HEAD:.beads/issues.jsonl)\n```\n\n**Implementation notes:**\n- Add helper function: hasIssuesInGit() → int (count from git)\n- Wrap in query commands: list, ready, stats, show (when ID not found)\n- Fast check: just `git show HEAD:.beads/issues.jsonl | wc -l` (10-20ms)\n- Only trigger on genuinely empty DB (not filtered results)\n- Respect --no-auto-import flag if needed\n\n**Why Option A (auto-import):**\n- Zero cognitive load for agents\n- JSONL is source of truth anyway\n- Similar to daemon auto-start philosophy\n- DB is just a cache - auto-rebuild is natural\n\n**Affected commands:**\n- bd list (most common)\n- bd ready (agents check this first)\n- bd stats (shows 0/0/0 misleadingly)\n- bd show \u003cid\u003e (ID not found - maybe in git?)\n\n**Benefits:**\n- Agents never see empty state in fresh clones\n- 'bd ready' becomes reliable first command\n- No more import instructions needed in AGENTS.md\n- Makes DB fully ephemeral/rebuildable\n\nRelated: bd-188 (broader onboarding UX), bd-183 (quickstart command)","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-10-21T20:38:23.073917-07:00","updated_at":"2025-10-21T20:38:23.073917-07:00","closed_at":"2025-10-21T14:08:04.629408-07:00"}
{"id":"bd-19","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":"closed","priority":2,"issue_type":"feature","created_at":"2025-10-21T20:38:23.073917-07:00","updated_at":"2025-10-21T20:38:23.073917-07:00","closed_at":"2025-10-17T23:46:22.447301-07:00"}
{"id":"bd-190","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-42 bd-43 --into bd-42)\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-43\" -\u003e \"see bd-42\")\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:38:23.073917-07:00","updated_at":"2025-10-21T20:38:23.073917-07:00","dependencies":[{"issue_id":"bd-190","depends_on_id":"bd-192","type":"parent-child","created_at":"2025-10-21T20:38:23.082936-07:00","created_by":"import"},{"issue_id":"bd-190","depends_on_id":"bd-193","type":"parent-child","created_at":"2025-10-21T20:38:23.083411-07:00","created_by":"import"},{"issue_id":"bd-190","depends_on_id":"bd-194","type":"parent-child","created_at":"2025-10-21T20:38:23.083824-07:00","created_by":"import"},{"issue_id":"bd-190","depends_on_id":"bd-195","type":"parent-child","created_at":"2025-10-21T20:38:23.0843-07:00","created_by":"import"},{"issue_id":"bd-190","depends_on_id":"bd-196","type":"parent-child","created_at":"2025-10-21T20:38:23.084732-07:00","created_by":"import"},{"issue_id":"bd-190","depends_on_id":"bd-197","type":"parent-child","created_at":"2025-10-21T20:38:23.085132-07:00","created_by":"import"},{"issue_id":"bd-190","depends_on_id":"bd-198","type":"parent-child","created_at":"2025-10-21T20:38:23.085513-07:00","created_by":"import"},{"issue_id":"bd-190","depends_on_id":"bd-199","type":"parent-child","created_at":"2025-10-21T20:38:23.085873-07:00","created_by":"import"},{"issue_id":"bd-190","depends_on_id":"bd-201","type":"parent-child","created_at":"2025-10-21T20:38:23.086242-07:00","created_by":"import"},{"issue_id":"bd-190","depends_on_id":"bd-191","type":"parent-child","created_at":"2025-10-21T20:38:23.08658-07:00","created_by":"import"}]}