You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
3.1 KiB
Markdown

+++
title = "Add triage status: new default for tickets lacking implementation detail"
priority = 6
status = "todo"
ticket_type = "feature"
dependencies = []
+++
## Problem
New tickets are created with `status=todo`, implying they are ready to work on. But many tickets need further research or implementation details before work can begin. The TODO describes a `triage` status for exactly this case — tickets that need an LLM or human to fill in details before they become `todo`.
## Status semantics
- `triage` — the ticket exists but lacks sufficient detail to begin implementation. An LLM or human should flesh out the body and move it to `todo` when ready.
- `triage` is excluded from `nbd ready` and `nbd next` (not actionable yet).
- `triage` is excluded from `nbd list` by default (like `backlog`).
- `triage` is the new **default status** for `nbd create` (replaces `todo`).
## Changes
### `src/ticket.rs`
Add `Triage` variant to `Status`:
```rust
/// The ticket needs more detail before it can be worked on.
///
/// A triage ticket should have its body updated with implementation
/// details and then moved to `todo`.
Triage,
```
Change the `#[default]` attribute from `Todo` to `Triage`.
### `src/main.rs`
- `parse_status`: add `"triage" => Ok(Status::Triage)` and update the error message.
- `Commands::Create`: change the default value for `--status` from `"todo"` to `"triage"`.
- **Note:** If `.nbd/config.toml` support (separate ticket) is implemented first, the default should be settable via config; fall back to `"triage"` if config is absent.
- `cmd_ready` and `cmd_next`: add `Status::Triage` to the exclusion list.
- `cmd_list`: add `Status::Triage` to the default exclusion list.
### `src/filter.rs`
- `status_str`: add `Status::Triage => "triage"`.
### `src/display.rs`
- `status_str`: add `Status::Triage => "triage"`.
- Column widths: `STATUS` column is currently 13 chars (`"in_progress" + 2`). `"triage"" is 6 chars — no width change needed.
### `src/graph.rs`
- `status_str`: add `Status::Triage => "triage"`.
### `src/claude_md_snippet.md`
Update the embedded snippet to document the triage workflow:
- `triage` tickets need implementation details added to their body before they can be worked on.
- When creating a ticket that is ready to work on immediately, pass `--status todo` explicitly.
- Default: `nbd create --title "..."` creates a `triage` ticket.
### `CLAUDE.md` (project-level)
Update the workflow section to reflect the new default and document when to use `--status todo` vs. leaving the default.
### `src/tests.rs`
Add unit tests:
- `Status::Triage` serialises to `"triage"`
- Round-trip deserialisation
- Default `Ticket::new` has `status == Status::Triage`
### `tests/integration.rs`
- `nbd create` with no `--status` flag creates a `triage` ticket.
- `nbd create --status todo` creates a `todo` ticket.
- `nbd ready` does not include `triage` tickets.
- `nbd next` does not include `triage` tickets.
- `nbd list` does not include `triage` tickets by default.
- `nbd list --filter status=triage` shows only triage tickets.
- `nbd list --all` includes `triage` tickets.