beads/internal/types
matt wilkie f03d4e7fac
feat(issues): add started_at timestamp (GH#2796) (#3206)
* 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>
2026-04-14 09:24:08 -07:00
..
explain_test.go tests: add coverage for explain logic, cycle detection, and engine warnings 2026-03-30 09:15:52 -07:00
id_generator.go refactor: consolidate ExtractPrefix into types package 2026-03-02 23:17:14 -08:00
id_generator_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
orphans.go chore: clean up stale SQLite references in comments (bd-nlw2m) 2026-02-18 11:50:52 -08:00
storage_ext.go refactor(rpc): fix leaky abstraction - remove direct sqlite imports (bd-oslm) 2026-01-26 20:28:27 -08:00
types.go feat(issues): add started_at timestamp (GH#2796) (#3206) 2026-04-14 09:24:08 -07:00
types_test.go fix: backward-compatible JSONL import for all pre-v1.0 formats (#3021) 2026-04-04 22:34:12 -07:00