`nbd archive` now sets status to `archived` (completed, soft-deleted)
instead of `closed`. The `closed` status is reserved for tickets that
will not be completed (cancelled, superseded, won't-fix).
Both statuses count as resolved for dependency purposes and are excluded
from `nbd list`, `nbd ready`, and `nbd next` by default.
Changes:
- Add `Status::Archived` variant (serialises as "archived")
- `cmd_archive`: sets `Status::Archived` instead of `Status::Closed`
- `parse_status`: add "archived" arm
- `cmd_list`, `cmd_ready`, `cmd_next`: exclude/resolve `Archived`
- `display`, `graph`, `filter`: add `Archived` arm to `status_str`
- Tests: rename/update archive tests, add archived/closed test variants
- Docs: update README.md and CLAUDE.md status tables and descriptions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a new `backlog` Status variant for tickets that are created but
intentionally deferred. Backlog tickets are excluded from `nbd list`,
`nbd ready`, and `nbd next` by default, but unlike `done` and `closed`
they do not count as resolved for dependency purposes — a ticket whose
dependency is `backlog` remains blocked.
Visible via `--all` or `--filter status=backlog`.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Status::Closed variant serialised as "closed", providing a
soft-delete for tickets that should be hidden from normal listings.
- nbd archive <id>: sets status to closed (sugar for update --status closed)
- nbd list: excludes closed tickets by default (same as done)
- nbd list --all: bypasses default status exclusion, shows everything
- nbd list --filter status=closed: shows only closed tickets
- Closed tickets count as resolved for dependency purposes (unblock dependents)
- nbd ready / nbd next: closed tickets excluded from actionable set
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The ticket id is now stored only in the filename stem (.nbd/tickets/{id}.json).
`id` is annotated with `#[serde(skip)]` so it is never written to disk,
eliminating the consistency hazard of id-in-body vs. filename disagreement.
- ticket.rs: add `#[serde(skip)]` to `Ticket::id`
- store.rs: `read_ticket` and `list_tickets` inject id from filename stem
- display.rs: `ticket_to_json_value` re-inserts id for CLI `--json` output
- tests.rs: new unit tests for omission, injection, and old-format compat
- integration.rs: assert written files lack "id"; assert read --json has id
Backwards-compatible: old files with "id" in JSON body still parse correctly
(serde ignores the unknown field), so existing stores work without migration.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Define Status and TicketType enums with serde snake_case/lowercase
serialization, Ticket struct with all fields, Ticket::new constructor,
validate_priority, and generate_id using RandomState entropy. Add 9
unit tests covering roundtrips, enum serialization, priority validation,
and ID format/uniqueness.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>