* fix: enable auto-export by default with canonical issues.jsonl name (GH#2973)
Users expected JSONL export to refresh automatically but export.auto
defaulted to false, requiring explicit opt-in. Also the default filename
(export.jsonl) didn't match the canonical issues.jsonl used in docs and
git hooks. Change defaults: export.auto=true, export.path=issues.jsonl,
export.git-add=true so viewers (bv) and git workflows see fresh data
without extra configuration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(init): add auto-export prompt and document export.* config (GH#2973)
Interactive bd init now asks whether to enable auto-export (default: yes).
Users can opt out during setup instead of discovering the setting later.
Also documents the export.* config namespace in bd config --help with
all four keys (export.auto, export.path, export.interval, export.git-add)
and adds export examples.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(issues): add started_at timestamp (GH#2796)
Adds a `started_at` field to issues that is auto-populated when an
issue transitions to in_progress status. Preserved across subsequent
status changes.
- Migration 0027 adds started_at column to issues and wisps tables
- ManageStartedAt() in issueops mirrors ManageClosedAt() pattern
- Query filter support: `started>2026-01-01`, `started<...`
- Displayed in `bd show` between Created and Updated
- Exposed in --json output via struct tag
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: gofmt alignment in update.go and types.go
Amp-Thread-ID: https://ampcode.com/threads/T-019d887d-4eb1-7648-96be-8d906797c382
Co-authored-by: Amp <amp@ampcode.com>
* fix(claim): set started_at when claiming via --claim (GH#2796)
ClaimIssueInTx had its own bespoke UPDATE that only wrote assignee, status,
and updated_at. Since `bd update --claim` is the canonical way agents transition
issues to in_progress, started_at was left NULL in the common case. Set it on
first transition, mirroring ManageStartedAt's guard (preserve existing value on
re-claim).
Also document the `started` field in `bd query --help`.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Amp <amp@ampcode.com>
The --status flag filters by the stored status column, but dependency-
blocked issues keep status "open" — they only appear via 'bd blocked'.
The old help text listed "blocked" without explaining this distinction,
leading users to expect 'bd list --status blocked' to find dependency-
blocked issues.
Updated help text for list, count, search, and query to say "stored
status" and point to 'bd blocked' for dependency-blocked issues.
Adds TestBUG4_BlockedStatusVsBlocked protocol test documenting the
distinction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Convert ~250 instances of direct fmt.Fprintf(os.Stderr)+os.Exit(1)
to FatalError/FatalErrorWithHint/FatalErrorRespectJSON across 54 files.
Complex multi-line messages, warnings, loop-internal errors, and
JSON-branching patterns intentionally preserved where the helpers
do not fit cleanly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Run make fmt to fix all gofmt issues. Add nolint directives for:
- G204 (gosec) in cmd/bd/stubs.go: git args are internal, not user-supplied
- unparam in internal/syncbranch/worktree.go: error return kept for callers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/polecats/obsidian
Rig: beads
Role: polecats
Code health review found 30+ instances of error suppression using blank
identifier without explanation. Added comments to 82 files explaining WHY
each error is safely ignored (best-effort cleanup, advisory operations,
safe defaults, etc.) to improve code maintainability.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/polecats/jasper
Rig: beads
Role: polecats
Projects track what they're doing (issues) and what happened (events),
but not why they chose a particular approach. Decisions are a missing
first-class concept -- every project has them, they're distinct from
tasks, and they're the context hardest to recover after the fact.
Adds TypeDecision as a core work type alongside bug/feature/task/epic/chore.
Includes aliases (dec, adr), required sections template (Decision, Rationale,
Alternatives Considered), and a Claude plugin command for structured recording.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
Phase 2 of Dolt transition (woho.2): Remove the entire daemon/RPC layer
now that all commands use direct storage access.
- Delete internal/rpc/ directory (40 files, ~11K lines)
- Delete daemon_deprecated.go stub layer
- Delete compact_rpc.go (daemon-only compact via RPC)
- Delete daemon-specific test files (delete_rpc_test.go, direct_mode_test.go,
dual_mode_test.go, list_watch_test.go)
- Clean up remaining daemon references in ~25 source files:
- Remove daemon RPC branches from update, create, template, markdown,
gate_discover, mol_stale, mol_current, import, query, version, prime
- Remove rpc.Client parameter from show_thread functions
- Simplify info.go to always show "direct" mode
- Simplify sync_import.go to always use inline import
- Remove daemon status checks from staleness, migrate_dolt, rename_prefix
- Remove unused fallbackToDirectMode function
- Remove stale daemon comments from sync.go
- Add daemon_compat.go with --no-daemon flag (backward compat for hooks)
and utility functions (boolToFlag, truncateString, formatUptime, progressBar)
- Fix test files: remove daemonClient cleanup blocks, update findRepliesTo/
findReplies call signatures, remove RPC test functions
- go vet ./... passes clean
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Since daemonClient is always nil (daemon_deprecated.go stub), every
`if daemonClient != nil` branch was dead code. This removes all 171
occurrences across 56 command files, keeping only the direct storage
(else) branches. Also cleans up unused rpc/json/types imports and
fixes variable shadowing issues left behind.
Part of Dolt transition Phase 2 (dolt-test-woho epic).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
The ensureDatabaseFresh + daemonClient nil check + error handling
pattern was duplicated across 16 command files with inconsistent
error handling (some used FatalErrorRespectJSON, others fmt.Fprintf).
Extracted into requireFreshDB() wrapper that standardizes on
FatalErrorRespectJSON for consistent --json support.
Closes dolt-test-7y4
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a new `bd query` command that enables complex filtering with a simple
query language supporting boolean operators, comparisons, and date-relative
expressions.
Features:
- Field comparisons: status=open, priority>1, updated>7d
- Boolean operators: AND, OR, NOT (case-insensitive)
- Parentheses for grouping: (status=open OR status=blocked) AND priority<2
- Date-relative expressions: 7d, 24h, 2w (interpreted as "X ago")
- Supports all IssueFilter fields: status, priority, type, assignee, label,
title, description, notes, created, updated, closed, id, spec, pinned,
ephemeral, template, parent, mol_type
Implementation:
- New internal/query package with lexer, parser, and evaluator
- Simple AND queries converted directly to IssueFilter for SQL efficiency
- Complex OR queries use predicate functions for in-memory filtering
- Comprehensive test coverage (62 tests)
Examples:
bd query "status=open AND priority>1"
bd query "(status=open OR status=blocked) AND updated>7d"
bd query "NOT status=closed AND type=bug"
bd query "label=urgent OR label=critical"
Closes: bd-o9g
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>