docs(nbd): update CLAUDE.md with init and ready subcommands
- Add nbd init and nbd ready to the CLI Interface reference - Replace mkdir workaround with `cargo run -- init` in Task Tracking - Restore the --json guideline to its original wording - Add `nbd ready` as the preferred "what to work on next" command Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>quotesdb
parent
3c17918a47
commit
8a970a559b
@ -0,0 +1,14 @@
|
||||
---
|
||||
name: work
|
||||
description: work on the highest priority thing
|
||||
---
|
||||
|
||||
* Use nbd to choose the highest priority issue with no outstanding dependencies.
|
||||
* Thoroughly investigate the relevant parts of the codebase to ensure you understand the problem and how to implement the solution as describe in the ticket.
|
||||
* Implement the plan in the selected ticket.
|
||||
* Once complete validate changes with cargo fmt, cargo check, cargo clippy, and cargo test.
|
||||
* Iteratively fix warnings and errors then repeat the validation steps until everything is good.
|
||||
* Update the ticket with the new status.
|
||||
* Create additional tickets based on work that may have come up during this work.
|
||||
* Add or Update docs including README.md and CLAUDE.md if relevant.
|
||||
* Commit changes with a concise message and reference the ticket ID.
|
||||
@ -1,9 +1,8 @@
|
||||
{
|
||||
"id": "c9d551",
|
||||
"title": "Partial ID matching",
|
||||
"body": "Allow `nbd read`, `nbd update`, and dependency resolution to accept a prefix of a ticket ID (e.g. `nbd read a3f` resolves to `a3f9c2`).\n\n## Motivation\n\n6-character hex IDs are tedious to type in full. Prefix matching — like git's short-SHA resolution — significantly improves interactive ergonomics and makes agent-generated commands shorter.\n\n## Approach\n\nAdd `resolve_id(root: &Path, id_or_prefix: &str) -> Result<String>` in `store.rs`:\n1. If `id_or_prefix` is exactly 6 characters, try `read_ticket` as-is (fast path, existing behaviour).\n2. Otherwise (or if not found), scan `.nbd/tickets/` for files whose stem starts with `id_or_prefix`.\n3. Collect all matches.\n - 0 matches → error: `\"no ticket found matching '{prefix}'\"`\n - 1 match → return the full ID\n - 2+ matches → error: `\"ambiguous prefix '{prefix}' matches: {id1}, {id2}, ...\"`\n\nUse `resolve_id` inside `cmd_read` and `cmd_update` (replacing the bare `id` string passed to `read_ticket`). Also use it inside `validate_deps` so dependency flags can use short IDs too.\n\n## Tests\n\nUnit tests in `src/tests.rs`:\n- Exact 6-char match still works.\n- 3-char prefix resolves correctly.\n- Ambiguous prefix returns an error listing all matching IDs.\n- Unknown prefix returns a not-found error.\n\nIntegration tests in `tests/integration.rs`:\n- `nbd read <3-char-prefix>` resolves and prints the ticket.\n- `nbd update <3-char-prefix> --status done` succeeds.\n- Ambiguous prefix exits non-zero with an informative message.\n\n## Files touched\n- `src/store.rs` — new `resolve_id` function\n- `src/main.rs` — `cmd_read`, `cmd_update`, `validate_deps` use `resolve_id`\n- `src/tests.rs` — unit tests\n- `tests/integration.rs` — integration tests",
|
||||
"priority": 8,
|
||||
"status": "todo",
|
||||
"status": "done",
|
||||
"dependencies": [],
|
||||
"ticket_type": "feature"
|
||||
}
|
||||
Loading…
Reference in New Issue