From 2da692318961c822d95447f8e1b3e58c6ac85f2e Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Thu, 12 Feb 2026 00:39:16 +0100 Subject: [PATCH] docs(config): prefer ticket CLI over raw SQL in CLAUDE.md Agents were writing raw SQL with incorrect column names (e.g. `sprint` instead of `sprint_id`). Leading with the ticket CLI as the preferred approach avoids this class of errors. Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 0b12f1652..acd32bb7d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -57,10 +57,15 @@ See [docs/DEVOPS.md](docs/DEVOPS.md) for build, test, lint, and CI procedures. A 3. Read the relevant `decisions/*.md` domain file(s) referenced in the briefing 4. Background context: `docs/briefings/{your-name}.md`, `docs/discussions/` -### SQLite access -**Never use the `sqlite3` CLI** - it crashes in Claude Code due to a known std::bad_alloc bug. +### Ticket and database access +**Prefer the ticket CLI over raw SQL.** The CLI handles column names, joins, and output formatting correctly: +```bash +db/connectors/ticket list --sprint 2 --team server +db/connectors/ticket show 78 +db/connectors/ticket sprint --active +``` -Use the whitelistable wrapper scripts: +Only fall back to raw SQL for queries the CLI doesn't support. **Never use the `sqlite3` CLI** — it crashes in Claude Code due to a known std::bad_alloc bug. Use the wrapper scripts instead: ```bash db/connectors/sqlite-query "SELECT * FROM tickets WHERE status='in_progress'" db/connectors/sqlite-exec "UPDATE tickets SET status='done' WHERE id=1"