From ba059ab101f5548facd2e3a09162f963c95584ea Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 4 Apr 2026 23:33:50 +0200 Subject: [PATCH] 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 --- .claude/rules/ticket-cli.md | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .claude/rules/ticket-cli.md 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