---
name: evolution_ticket_triage_routine
description: Daily bug-triage routine over prod evolution.supportTickets (pull + evaluate + write verdict to internalNotes + digest)
metadata: 
  node_type: memory
  type: project
  originSessionId: e3c89570-61b2-4510-ab98-c2fc49aa615c
  modified: 2026-07-20T06:17:29.187Z
---

Daily triage of open bug tickets, built 2026-07-20. Lives in the evolution repo at
`.claude/skills/ticket-triage/` (git-tracked, rehydrates on redeploy):

- **SKILL.md** — the `/ticket-triage` procedure: pull → evaluate (genuine? / missing info? / fix-confidence HIGH·MEDIUM·LOW, citing file:line) → write verdict → digest.
- **pull_tickets.sh** — deterministic read-only SQL pull. Scope: `status=1 AND type='Bug' AND parent=0 AND priority IN (1,2,3)`. Priority map **1=Critical 2=Urgent 3=High 4=Standard**. Reads the `sqlClaude*` trio from `evolution/.env` (see [[prod_mysql_access]]). Pass `1,2` to narrow to Critical+Urgent.
- **run_daily.sh** — durable OS-cron driver (`claude -p ...` headless) → dated digest in `digests/` (gitignored). Add to crontab / codeserver-setup for permanence: `57 8 * * *`.

**Config chosen by Shane:** scope = Critical+Urgent+High; output = write verdict back to `internalNotes` (append-only, idempotent via a dated `[[AI-TRIAGE YYYY-MM-DD]]` marker, ASCII because the column is latin1); optional `more_info_required=1` on clear needs-info tickets; run = daily cron + digest.

**Gotcha:** the in-session `CronCreate` is session-only + 7-day expiry — NOT durable. For the permanent routine use `run_daily.sh` from the OS crontab. Triage only WRITES to the 5 whitelisted `evolution.*` tables; tenant-DB *data* fixes (reactivating a deleted invoice row, inspecting a tenant job) must be done in-app by staff.

As of first run there were **11 open Critical bugs, 0 Urgent** (49 incl. High). Highest-confidence fix found: ticket **#1063** — the "Undelete Invoice" button is dead code (`$status=='xDeleted'` typo, `invoiceadd.inc:1433`; deleted-invoice JSON recovery already exists at `invoiceadd.inc:42`). Also flagged SQLi in the invoice "not invoiced" filter (`invoiceaddsave.php:197`).
