feat: Add all 9 cw errand CLI subcommands with tests

Wires errand command group into CLI with start, list, chat, diff,
complete, merge, resolve, abandon, and delete subcommands. All
commands call tRPC procedures via createDefaultTrpcClient(). The
start command validates description length client-side (≤200 chars)
before making any network calls.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lukas May
2026-03-06 16:26:15 +01:00
parent 377e8de5e9
commit e86a743c0b
3 changed files with 468 additions and 0 deletions

View File

@@ -116,6 +116,19 @@ Uses **Commander.js** for command parsing.
All three commands output JSON for programmatic agent consumption.
### Errand Sessions (`cw errand`)
| Command | Description |
|---------|-------------|
| `start <description> --project <id> [--base <branch>]` | Start a new errand session (description ≤200 chars) |
| `list [--project <id>] [--status <status>]` | List errands; status: active\|pending_review\|conflict\|merged\|abandoned |
| `chat <id> <message>` | Deliver a message to the running errand agent |
| `diff <id>` | Print unified git diff between base branch and errand branch |
| `complete <id>` | Mark errand as done and ready for review |
| `merge <id> [--target <branch>]` | Merge errand branch into target branch |
| `resolve <id>` | Print worktree path and conflicting files for manual resolution |
| `abandon <id>` | Stop agent, remove worktree and branch, keep DB record as abandoned |
| `delete <id>` | Stop agent, remove worktree, delete branch, and delete DB record |
### Accounts (`cw account`)
| Command | Description |
|---------|-------------|