Roots are now tickets with no dependents (nobody depends on them —
top-level goals), and the ASCII tree traverses dependency edges so
prerequisites appear indented beneath the goal that needs them.
JSON edges are now {from: dependent, to: dependency} rather than
{from: blocker, to: blocked}.
All graph-related unit and integration tests updated to match the
new semantics.
Closes#668150
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
`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>
Implements TicketGraph<'a> with build(), roots(), subtree(),
to_json_value(), and to_subtree_json_value(). Tracks both forward
(dependencies) and reverse (dependents) edges. Cycle-safe DFS via
visited set. No new crate dependencies. 14 unit tests covering empty
graph, chains, branching, cycles, dangling refs, and JSON output.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>