14 Commits (297f2d6d2f703f593e7b86439a8d66c7c1090092)

Author SHA1 Message Date
Elijah Voigt 61ac72aee4 fix(nbd): change graph repeat-node marker from [cycle] to * [8b4041]
The [cycle] label was misleading — a node marked this way is not
necessarily in a true cycle, it is simply a shared dependency appearing
in multiple branches of the tree. The `*` marker is more neutral and
concise.

Changes: render_node in display.rs, test in tests.rs, README.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 16635a908d feat(nbd): add --version flag with X.Y.Z+GitSha format [c24ee8]
build.rs captures the short git SHA at compile time via
`git rev-parse --short HEAD` and emits it as GIT_SHORT_SHA. Falls back
to "unknown" when git is unavailable (e.g. Nix sandboxed builds).

main.rs adds a VERSION const (`env!("CARGO_PKG_VERSION") + "+" + SHA`)
and passes it to clap's `version =` attribute, enabling both -V and
--version flags.

Example output: `nbd 0.1.0+8f4d25b`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 05beff7752 feat(nbd): split archive/closed — archive=archived, closed=cancelled [feb901]
`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>
3 months ago
Elijah Voigt 7e311d6b47 feat(nbd): add backlog status to tickets [c12091]
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>
3 months ago
Elijah Voigt ffbb0157e3 feat(nbd): add Nix flake for building and running nbd [6e4239]
Add flake.nix so nbd can be consumed as a reproducible Nix package.
Exposes packages.default, apps.default (nix run), and a devShell with
stable Rust toolchain and the nbd binary. Uses cargoLock for
dependency hashing without a pre-computed cargoHash.

Also adds an Installation section to README.md covering nix run and
nix build usage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt b0359c4392 feat(nbd): add 'nbd graph' CLI subcommand [9ad11f]
Wires up the graph command in main.rs with cmd_graph(). Supports
full dependency forest (nbd graph), subtree by ID/prefix (nbd graph
<id>), --filter narrowing, and --json machine-readable output. Fixes
tree-rendering indentation bug (child_base vs prefix separation).
Updates README.md and CLAUDE.md with graph command documentation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 0bd7bd8c0f feat(nbd): add multi-format ticket storage (md, toml, jsonb) [460caf]
Tickets can now be stored in four formats, selected with --ftype:
  json  (.json) — pretty-printed JSON, default, unchanged
  md    (.md)   — Markdown body with TOML frontmatter
  toml  (.toml) — full TOML
  jsonb (.jsonb) — CBOR binary via ciborium

Changes:
- store.rs: FileFormat enum, detect_format(), find_ticket_path(),
  per-format serialize/deserialize helpers; read_ticket/list_tickets/
  resolve_id/migrate_tickets all scan all known extensions
- main.rs: --ftype on create (default "json") and update (optional,
  converts format and removes old file); archive/update preserve
  existing format when --ftype is absent
- tests.rs: update write_ticket/ticket_path call sites; add TOML,
  Markdown, and CBOR roundtrip unit tests
- integration.rs: 8 new format tests covering create, list, update
  conversion, format preservation, body roundtrip, unknown-ftype error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt ba0efeb622 feat(nbd): add claude-md command [fc444f]
Adds `nbd claude-md` subcommand that prints a ready-to-paste CLAUDE.md
snippet for adopting nbd in any project. The snippet is embedded at
compile time via `include_str!` from `src/claude_md_snippet.md`, so it
stays in sync with the installed binary automatically.

- `nbd claude-md` prints raw markdown (suitable for `>> CLAUDE.md`)
- `nbd claude-md --json` outputs `{"snippet": "..."}` for programmatic use
- Works without a `.nbd/` store present (no find_nbd_root call)
- 4 new integration tests covering all specified behaviours

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt deecdba592 feat(nbd): add archive command and Closed status [1939a7]
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>
3 months ago
Elijah Voigt fa60cb844d feat(nbd): add nbd next subcommand [fc6df4]
Adds `nbd next` which selects the single highest-priority ready ticket.
Supports `--filter` narrowing, `--json` output as `{"next": ...}` or
`{"next": null}` when nothing is ready. Makes `ticket_to_json_value`
pub(crate) for reuse. Adds 7 integration tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt d6d2cd91d5 feat(nbd): exclude done tickets from nbd list by default [92e45b]
nbd list now hides done tickets unless the caller explicitly provides a
status filter. Pass --filter status=* to see all tickets or
--filter status=done to see only completed ones.

- Add matches_status and matches_except_status to TicketFilter
- Update cmd_list to apply implicit done-exclusion when no status filter given
- Update List command help text
- Add unit tests for new filter methods
- Add integration tests for the new default behaviour
- Update README usage section
3 months ago
Elijah Voigt 3c17918a47 feat(nbd): implement nbd init and nbd ready commands [4d2359, e1968f]
- `nbd init` creates `.nbd/tickets/` in cwd (idempotent, no find_nbd_root)
- `nbd ready` lists actionable tickets: not done with all deps completed
- Both commands support `--json` for machine-readable output
- 6 new integration tests covering init and ready behaviour

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt df71fc9e09 feat(nbd): implement nbd migrate command [0f51af]
Adds `nbd migrate` to bring ticket files on disk into conformance with
the current serde schema. Re-serialises every *.json file through the
current Ticket model — removing stale fields (e.g. old \"id\" key),
adding new fields with their defaults, and normalising formatting.

- store: MigrateReport struct and migrate_tickets() function
- display: format/print_migrate_report and _json variants
- main: Migrate command with --dry-run flag and cmd_migrate handler
- 6 unit tests (rewrites old format, already-current, dry-run, invalid JSON, empty store, no tickets dir)
- 4 integration tests (rewrite, dry-run, parse error tolerance, --json output)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 7ada8ef951 docs(nbd): add README, PLANNING, ARCHITECTURE, and complete Phase 6
Write the three required documentation files for the nbd crate:
- README.md: usage guide, field reference, dev workflow, dual-license
  footer, and Claude Code disclaimer
- docs/PLANNING.md: development phase log and post-MVP roadmap
- docs/ARCHITECTURE.md: module responsibilities, data flow diagram,
  storage layout, and testing strategy

Run and verify cargo fmt, check, clippy, and test (34 tests pass).
Mark all Phase 6 items as complete in PLAN.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago