+++ title = "Add status convenience sub-commands (open, start, complete, close)" priority = 5 status = "todo" ticket_type = "feature" dependencies = [] +++ ## Problem `nbd update --status ` is verbose for the most common lifecycle transitions. `nbd archive` already exists as a top-level convenience — the same pattern should apply to all transitions. ## Sub-commands to add | Command | Status set | |---|---| | `nbd open ` | `todo` | | `nbd start ` | `in_progress` | | `nbd complete ` | `done` | | `nbd close ` | `closed` | (`nbd archive` already exists — do not duplicate it.) ## Implementation **`src/main.rs`** Add four variants to the `Commands` enum, following the existing `Archive` pattern (line 183): ```rust Open { id: String }, Start { id: String }, Complete { id: String }, Close { id: String }, ``` Add handler functions `cmd_open`, `cmd_start`, `cmd_complete`, `cmd_close`. Each handler should: 1. Call `resolve_id` (supports partial IDs) 2. `find_ticket_path` + `detect_format` to preserve existing file format 3. `read_ticket` 4. Set `ticket.status` to the target status 5. `write_ticket` in the same format 6. Print the ticket (tabular or JSON via `--json`) Wire up in `dispatch()` following the same pattern as `Commands::Archive`. **`tests/integration.rs`** Add integration tests for each command analogous to the existing archive test.