diff --git a/.claude/rules/ticket-cli.md b/.claude/rules/ticket-cli.md new file mode 100644 index 000000000..0bbb2e741 --- /dev/null +++ b/.claude/rules/ticket-cli.md @@ -0,0 +1,39 @@ +# Ticket CLI + +**Use `tooling/db/ticket`** for all ticket operations. Never use `sqlite3` directly (crashes in Claude Code). + +## Positional arguments — not flags + +`ticket create` uses **positional** arguments for `type` and `title`. There is no `--title` flag. + +```bash +# CORRECT — type and title are positional +tooling/db/ticket create story "My ticket title" --description "Details here" --team server --priority low + +# WRONG — --title does not exist, gets absorbed into the title string +tooling/db/ticket create story --title "My ticket title" --description "Details here" +# Creates a ticket titled: "--title My ticket title" +``` + +## Full usage + +```bash +# Create +tooling/db/ticket create [--parent N] [--priority P] [--decision D] [--team T] [--description TEXT] +# type: initiative | epic | story | task | bug +# priority: critical | high | medium | low + +# Read +tooling/db/ticket show <id> +tooling/db/ticket list [--sprint N] [--team T] [--status S] + +# Update +tooling/db/ticket assign <id> <agent> +``` + +## Key rules + +- **Type and title are positional** — everything else is a flag +- **Quote the title** — always wrap in double quotes to handle spaces +- **Never use `sqlite3` CLI** — it crashes (std::bad_alloc). Use `tooling/db/sqlite-query` or `tooling/db/sqlite-exec` for raw SQL +- **Verify after create** — run `tooling/db/ticket show <id>` to confirm the title is clean