triagelisted
Install: claude install-skill patdhlk/skills
# Triage
One state machine, schema-enforced on the local backend (ADR_0005):
```
needs-triage ──► needs-info | ready-for-agent | ready-for-human | wontfix
needs-info ──► (answered) ──► needs-triage
ready-for-* ──► in-progress ──► done | wontfix
```
`/triage` owns the routing decisions; `in-progress`/`done` belong to whoever
does the work. Never jump states (e.g. `needs-triage → done`) — the enum
won't catch it, you must.
## Workflow
### 1. Resolve configuration and load the queue
Read `[tool.patdhlk-skills]` from `ubproject.toml` (missing → point to
`/setup-patdhlk-skills`).
- **sphinx-needs**: `pds status` first — it rebuilds needs.json (ADR_0006)
and emits the per-status counts, the "what needs attention" buckets, in
one query. Then the queue = issues with `status == "needs-triage"` (jq
over the fresh needs.json), plus `needs-info` ones whose question got
answered since.
- **github**: `gh issue list --label needs-triage` **plus** open issues with
no state label at all (treat unlabeled as needs-triage; offer to label
them). Ensure the five state labels exist (`gh label create`, idempotent).
Empty queue → say so and stop.
### 2. Route each issue
Before routing, gather search evidence for each issue (sphinx-needs backend
only). If `pds` is not on PATH, print a loud warning pointing to
`/setup-patdhlk-skills` and skip this enrichment step.
```bash
pds search "<issue title> <issue body>" --config ubproject.toml
# exit 0 → hits JSON; exit 2 → stop and escal