---
name: chatondearu-cda-triage
description: "Move inbound GitHub issues and external PRs through a small triage state machine — categorize, verify the claim, grill into shape, and write a durable agent-ready brief that cda-dev can pick up. Use when grooming incoming bug reports / feature requests, deciding what's ready for an agent vs a human, or when the user asks to triage an issue or external PR."
metadata:
  decimalai-skill-id: "1baf04b3-c1d9-46e6-bece-20a809f46b37"
  decimalai-version-id: "7c2ebdd7-7a8f-4bb7-ae96-3efa5843b8b9"
  decimalai-version: "3"
  decimalai-body-sha256: "d1280b764c72678825b8d22c48bcd591fc0cbc124a82eb63856670db10b6c87f"
  decimalai-name: "chatondearu/cda-triage"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-category: "productivity"
  decimalai-source: "https://app.decimal.ai/s/chatondearu-cda-triage@3/SKILL.md"
---
# cda-triage

Move inbound issues through a small state machine of triage roles. This is the **intake front door** for externally-sourced work: a report arrives, and triage decides what it is, whether it holds up, and whether it's ready to be built — ending in a brief `cda-dev` can pick up (via board Status **Ready**) or a human can take.

A **PR is an issue with attached code**: external PRs use the same roles, states, and machine, read against the diff (deltas marked *for a PR* below).

Repo and board IDs are resolved with `cda-kanban`'s `scripts/gh-board.sh env` — never hardcode them. Role ↔ label/Status mapping and the exact `gh` recipes live in [conventions.md](conventions.md).

Every comment or issue body cda-triage posts **must** start with:

```
> *This was generated by AI during triage.*
```

## Roles

**Category** (exactly one): `bug` (`type:fix`) · `enhancement` (`type:feat`).

**State** (exactly one):

- `needs-triage` — on the board as **Backlog**, not yet evaluated.
- `needs-info` — waiting on the reporter (label `triage:needs-info`, stays Backlog).
- `ready-for-agent` — fully specified; an agent brief is attached and the card is moved to **Ready** so `cda-dev` (ready-pickup) can take it. **Fast-lane:** bugs / bounded scope may ship with the brief alone (no PRD/plan). Fuzzy features still need PRD → plan before Ready.
- `ready-for-human` — specified but needs human hands (label `triage:ready-for-human`, Status Ready); the brief notes *why* it can't be delegated.
- `wontfix` — closed (see outcomes).

If state roles conflict, flag it and ask the maintainer before doing anything.

## Invocation

The maintainer invokes in natural language — interpret and act:

- "Show me anything that needs my attention"
- "Let's look at #42" (issue or PR)
- "Move #42 to ready-for-agent"
- "What's ready for agents to pick up?"

### Show what needs attention

Query the board and present three buckets, oldest first: **Unlabeled** (never triaged), **needs-triage**, and **needs-info with reporter activity since the last triage notes**. When external PRs are in scope, include them tagged `[PR]`/`[issue]` — discovery surfaces only *external* PRs (a collaborator's in-flight PR isn't triage work), but an explicitly named PR is always triaged. Show counts + a one-line summary; let the maintainer pick.

### Triage a specific issue or PR

1. **Gather context.** Read the whole issue/PR (body, comments, labels, author, dates; for a PR, the diff). Parse prior triage notes so you don't re-ask resolved questions. Explore the codebase using the project's `GLOSSARY.md` and respecting ADRs. When `CDA_GRAPHIFY=1` and `graphify-out/graph.json` exists, read `graphify-out/GRAPH_REPORT.md` (or query the graph) before grepping or reading files. Run two checks:
   - **Redundancy** — search for an existing implementation of the requested *behavior* by domain concept, not just the request's wording; report where you looked. If found → already-implemented `wontfix`.
   - **Prior rejection** — read `cda-foam`'s out-of-scope register (`foam/features/out-of-scope.md`) and surface any entry that resembles this request.
2. **Recommend.** Give your category + state recommendation with reasoning and a short codebase summary (including whether it's already implemented). Wait for direction.
3. **Verify the claim.** Before grilling, check it holds up. Bug → reproduce from the reporter's steps. PR → check it out, run the relevant tests/commands, confirm the diff does what it claims. Report: confirmed (with the code path), failed, or insufficient detail (a strong `needs-info` signal). A confirmed verification makes a far stronger brief.
4. **Grill (if needed).** If the request needs fleshing out, call `cda-grill` and sharpen domain terms, recording glossary/ADR updates through `cda-foam` as decisions land. One round of questions at a time.
5. **Apply the outcome:**
   - **ready-for-agent** → post an agent brief ([templates/agent-brief.md](templates/agent-brief.md)); move the card to **Ready**. The brief is a *behavioral* contract — see below.
   - **ready-for-human** → same brief structure, plus why it can't be delegated (judgment calls, external access, design decisions, manual testing); label `triage:ready-for-human`, Status Ready.
   - **needs-info** → post triage notes ([templates/needs-info.md](templates/needs-info.md)); label `triage:needs-info`.
   - **wontfix** → close, comment depending on *why*:
     - *Already implemented* → point to where it lives; do **not** write to the out-of-scope register (that's for rejected, not built).
     - *Rejected bug* → polite explanation, then close.
     - *Rejected enhancement* → append to `cda-foam`'s out-of-scope register (workflow B2), link it from a comment, then close.
   - **needs-triage** → apply the category; optional comment if there's partial progress.

### Quick state override

If the maintainer says "move #42 to ready-for-agent", trust them: confirm what you'll do (role changes, comment, move, close), then act — skip grilling. If moving to ready-for-agent without a grilling session, ask whether they want an agent brief written.

## Agent briefs are durable, behavioral contracts

The brief — not the original body — is the authoritative spec the AFK agent works from. It may sit in Ready for days while the codebase moves, so write it to survive that:

- **Behavioral, not procedural.** Describe *what* the system should do, name the types / signatures / config shapes to look for — not *how* or *where*. Good: "`SkillConfig` should accept an optional `schedule: CronExpression`." Bad: "add a field on line 42 of skill.ts."
- **No file paths or line numbers** — they go stale; the agent explores fresh.
- **Complete, testable acceptance criteria** — each independently verifiable, so the agent knows when it's done.
- **Explicit scope boundaries** — state what's out of scope to prevent gold-plating.

This is the same brief discipline `cda-dev`'s worker consumes and `cda-plan` writes its tasks against — one contract language across intake, planning, and execution.

## Resuming

If prior triage notes exist, read them, check whether the reporter answered outstanding questions, and present an updated picture before continuing. Don't re-ask resolved questions.
