chore(rules): add ticket CLI usage rule
Documents positional argument syntax and key rules for the ticket CLI to prevent --title flag misuse and sqlite3 crashes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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 <type> <title> [--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
|
||||
Reference in New Issue
Block a user