Commit Graph

11 Commits

Author SHA1 Message Date
Steve Yegge
3f4878eb09 Auto-import from git on empty DB (bd-189)
- Add checkAndAutoImport() that detects empty DB with issues in git
- Automatically imports from git HEAD:.beads/issues.jsonl
- Integrated into list, ready, and stats commands
- Zero cognitive load for agents in fresh clones
- Makes JSONL truly the source of truth
- DB becomes ephemeral cache that auto-rebuilds

Also:
- Update AGENTS.md onboarding section with import instructions
- Merge PR #98 (enhanced .gitignore)

Amp-Thread-ID: https://ampcode.com/threads/T-ffcb5e95-e5a0-486b-a0ae-ce8bd861ab9d
Co-authored-by: Amp <amp@ampcode.com>
2025-10-21 14:10:26 -07:00
Steve Yegge
a86f3e139e Add native Windows support (#91)
- Native Windows daemon using TCP loopback endpoints
- Direct-mode fallback for CLI/daemon compatibility
- Comment operations over RPC
- PowerShell installer script
- Go 1.24 requirement
- Cross-OS testing documented

Co-authored-by: danshapiro <danshapiro@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-c6230265-055f-4af1-9712-4481061886db
Co-authored-by: Amp <amp@ampcode.com>
2025-10-20 21:08:49 -07:00
Steve Yegge
422c102f46 Add label filtering to bd list with AND/OR semantics
- Add --label flag for AND filtering (must have ALL labels)
- Add --label-any flag for OR filtering (must have AT LEAST ONE label)
- Add normalizeLabels() helper to trim, dedupe, and clean inputs
- Fix RPC title filtering parity bug (forward via Query field)
- Add comprehensive tests for label filtering including combined AND+OR
- Update documentation in README and CHANGELOG
- Improve flag help text to clarify combined semantics

Closes bd-161
2025-10-19 23:03:02 -07:00
Steve Yegge
f1ec927a7c feat: Add label display to bd show and bd list
- Populate labels in bd list human-readable output (direct mode)
- Populate labels in bd list JSON output (direct and daemon modes)
- Populate labels in daemon RPC handlers (handleList, handleShow)
- handleShow now returns full IssueDetails with labels/deps/dependents
- Labels displayed with 'Labels: [label1, label2]' format

Closes bd-164

Amp-Thread-ID: https://ampcode.com/threads/T-30cd607d-c509-4a8c-9cac-c2aea2ad75c6
Co-authored-by: Amp <amp@ampcode.com>
2025-10-19 22:44:39 -07:00
Steve Yegge
c17174b80a fix: bd list --status all showing 0 issues (bd-148)
The status filter was treating 'all' as a literal status value instead of
a special case meaning 'show all statuses'. This caused the SQL query to
filter for 'WHERE status = all' which matched no issues.

Fixed by checking if status is 'all' and skipping the filter in that case.

- Fix list.go to skip status filter when status == 'all'
- Update CHANGELOG with fix details
- All tests pass
2025-10-17 21:56:03 -07:00
Steve Yegge
39b586a7be Phase 2: Add client auto-detection in bd commands (bd-112)
- Add daemon client infrastructure to main.go with TryConnect logic
- Update PersistentPreRun to detect daemon socket and route through RPC
- Add --no-daemon flag to force direct storage mode
- Update all commands (create, update, close, show, list, ready) to use daemon when available
- Maintain backward compatibility with graceful fallback to direct mode
- All commands work identically in both daemon and direct modes

Part of bd-110 daemon architecture implementation.

Amp-Thread-ID: https://ampcode.com/threads/T-bfe2c083-be7c-4064-8673-fa69c22a730e
Co-authored-by: Amp <amp@ampcode.com>
2025-10-16 23:13:22 -07:00
Steve Yegge
e2c42c35c4 Add label and title filtering to bd list (closes #45, bd-269)
- Add --label/-l flag to filter issues by labels (AND logic)
- Add --title flag to filter issues by title substring
- Add TitleSearch field to IssueFilter type
- Implement label and title filtering in SearchIssues
- Perfect for worktree-specific issue management

Examples:
  bd list --label worktree,feature-x
  bd list --title "authentication"
  bd list --label worktree --title "bug"
2025-10-15 23:51:57 -07:00
Travis Cline
4131e6bf38 list: add status-based color coding to dot format
Enhance Graphviz dot output with status-based fill colors:
- open: white background (default)
- in_progress: light yellow background
- blocked: light coral background
- closed: light gray background with dimmed text

Node labels show: ID, type, priority, title, and status.
Priority is visible in the label (e.g., [bug P0]) but not color-coded
to keep the visualization clean and focused on status.
2025-10-15 15:27:49 -07:00
Travis Cline
6f357ea536 list: add --format flag with template support
Add flexible --format flag to 'bd list' command supporting:
- Built-in presets: 'digraph' (basic 'from to' format) and 'dot' (Graphviz)
- Custom Go templates for dependency output
- Template variables: IssueID, DependsOnID, Type, Issue, Dependency

This enables graph analysis with tools like golang.org/x/tools/cmd/digraph while allowing users to customize output format for their specific needs.

Examples:
  bd list --format=digraph | digraph nodes
  bd list --format=dot | dot -Tsvg -o deps.svg
  bd list --format='{{.IssueID}} -> {{.DependsOnID}} [{{.Type}}]'
2025-10-15 15:27:24 -07:00
Travis Cline
0c3c613890 list: add filter value enums to help 2025-10-15 15:27:24 -07:00
Travis Cline
cf8ff4227d list: extract command to separate file 2025-10-15 15:27:24 -07:00