beads/internal
Peter Chanthamynavong d371baf2ca
feat(dates): add --due and --defer timestamp options with natural language parsing (#847)
* feat(dates): add due date schema and --due flag

- Add due_at and defer_until columns to issues table via migration 035
- Implement --due flag on create command with ISO date parsing
- Extend RPC protocol and daemon to pass DueAt from CLI to storage
- Display DueAt and DeferUntil in show command output
- Update Issue type with new date fields

Users can now set due dates when creating issues, enabling deadline-based
task management.

* feat(dates): add compact duration parser (+6h, +1d, +2w)

- Create internal/timeparsing package with layered parser architecture
- Implement parseCompactDuration with regex pattern [+-]?\d+[hdwmy]
- Add comprehensive test suite (22 cases) for duration parsing
- Integrate into create.go with fallback to ISO format

Supports hours (h), days (d), weeks (w), months (m), and years (y).
Negative values allowed for past dates.

* feat(dates): add NLP parsing for natural language dates

Integrate olebedev/when library for natural language time expressions.
The layered parser now handles: compact duration → absolute formats → NLP.

Changes:
- Add olebedev/when dependency for NLP parsing
- Implement ParseNaturalLanguage and ParseRelativeTime functions
- Reorder layers: absolute formats before NLP to avoid misinterpretation
- Simplify create.go to use unified ParseRelativeTime
- Add comprehensive NLP test coverage (22 test cases)

Supports: tomorrow, next monday, in 3 days, 3 days ago

* feat(dates): add --defer flag to create/update/defer commands

Add time-based deferral support alongside existing status-based defer.
Issues can now be hidden from bd ready until a specific time.

Changes:
- Add --defer flag to bd create (sets defer_until on creation)
- Add --due and --defer flags to bd update (modify existing issues)
- Add --until flag to bd defer (combines status=deferred with defer_until)
- Add DueAt/DeferUntil fields to UpdateArgs in protocol.go

Supports: +1h, tomorrow, next monday, 2025-01-15

* feat(dates): add defer_until filtering to ready command

Add time-based deferral support to bd ready:

- Add --include-deferred flag to show issues with future defer_until
- Filter out issues where defer_until > now by default
- Update undefer to clear defer_until alongside status change
- Add IncludeDeferred to WorkFilter and RPC ReadyArgs

Part of GH#820: Relative Date Parsing (Phase 5)

* feat(dates): add polish and tests for relative date parsing

Add user-facing warnings when defer date is in the past to help catch
common mistakes. Expand help text with format examples and document
the olebedev/when September parsing quirk.

Tests:
- TestCreateSuite/WithDueAt, WithDeferUntil, WithBothDueAndDefer
- TestReadyWorkDeferUntil (ExcludesFutureDeferredByDefault, IncludeDeferredShowsAll)

Docs:
- CLAUDE.md quick reference updated with new flags
- Help text examples for --due, --defer on create/update

Closes: Phase 6 of beads-820-relative-dates spec

* feat(list): add time-based query filters for defer/due dates

Add --deferred, --defer-before, --defer-after, --due-before, --due-after,
and --overdue flags to bd list command. All date filters now support
relative time expressions (+6h, tomorrow, next monday) via the
timeparsing package.

Filters:
- --deferred: issues with defer_until set
- --defer-before/after: filter by defer_until date range
- --due-before/after: filter by due_at date range
- --overdue: due_at in past AND status != closed

Existing date filters (--created-after, etc.) now also support relative
time expressions through updated parseTimeFlag().

* build(nix): update vendorHash for olebedev/when dependency

The olebedev/when library was added for natural language date parsing
(GH#820). This changes go.sum, requiring an updated vendorHash in the
Nix flake configuration.
2026-01-01 20:06:13 -08:00
..
audit feat(audit): add append-only agent audit trail (.beads/interactions.jsonl) 2025-12-20 03:24:51 -08:00
autoimport fix: NixOS symlink compatibility for mtime and permission checks (#459) 2025-12-05 13:22:09 -08:00
beads feat: add session_id field to issue close/update mutations (bd-tksk) 2025-12-31 13:14:15 -08:00
compact test: expand compact and ui coverage 2025-12-29 16:01:11 -08:00
config feat(config): add validation.on-create and validation.on-sync config options (bd-t7jq) 2026-01-01 19:31:12 -08:00
configfile feat: change deletions TTL default from 7 to 3 days 2025-12-03 22:44:59 -08:00
daemon chore: remove issue ID references from comments and changelogs 2025-12-28 10:05:16 -08:00
debug test(coverage): add tests to meet 45% CI threshold 2025-12-18 17:45:49 -05:00
export test(coverage): add tests to meet 45% CI threshold 2025-12-18 17:45:49 -05:00
formula feat: Implement Step.Gate evaluation (Phase 1: Human Gates) 2026-01-01 16:25:59 -08:00
git fix: bd sync fails to copy local changes TO beads-sync worktree (#810) 2025-12-30 16:49:50 -08:00
hooks refactor: remove unused bd pin/unpin/hook commands (bd-x0zl) 2025-12-27 16:02:15 -08:00
idgen fix(idgen): correct test vectors in hash_test.go 2025-12-19 18:13:56 -08:00
importer chore: remove issue ID references from comments and changelogs 2025-12-28 10:05:16 -08:00
linear test(linear): add comprehensive tests for mapping and client functions 2025-12-19 18:30:03 -08:00
lockfile fix: eliminate 5+ second delays from stale daemon.lock files (bd-htwx) 2025-12-31 13:03:49 -08:00
merge Add debug logging for tombstone resurrection events 2025-12-30 15:59:51 -08:00
molecules refactor: remove Gas Town references from codebase 2025-12-30 14:13:32 -08:00
routing refactor: remove Gas Town references from codebase 2025-12-30 14:13:32 -08:00
rpc feat(dates): add --due and --defer timestamp options with natural language parsing (#847) 2026-01-01 20:06:13 -08:00
storage feat(dates): add --due and --defer timestamp options with natural language parsing (#847) 2026-01-01 20:06:13 -08:00
syncbranch feat: add FreeBSD release builds (#832) 2026-01-01 10:51:51 -08:00
testutil Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
timeparsing feat(dates): add --due and --defer timestamp options with natural language parsing (#847) 2026-01-01 20:06:13 -08:00
types feat(dates): add --due and --defer timestamp options with natural language parsing (#847) 2026-01-01 20:06:13 -08:00
ui feat: add FreeBSD release builds (#832) 2026-01-01 10:51:51 -08:00
util feat(list): Add type aliases for --type flag (gt-pvhsv) 2026-01-01 18:17:12 -08:00
utils test: expand compact and ui coverage 2025-12-29 16:01:11 -08:00
validation feat(validation): add ValidateTemplate() function (bd-615z) 2026-01-01 12:42:43 -08:00