triage-failedlisted
Install: claude install-skill a-canary/arc-agents
# triage-failed — Failed Row Triage
When a worker leaves a row in `state=failed`, the director runs this skill to decide whether to (a) auto-decompose into smaller slices and cancel the parent, or (b) flag for the owner.
Wraps the pure module at `src/ledger/failed-classifier.ts`. The skill is the I/O shell; the classifier is the decision.
## Inputs
- `--id <issue-id>` — required. Id of the failed row.
## Procedure
1. **Load the row + events:**
```
bun ~/repos/arc-agents/bin/ledger.ts show <id>
```
Returns `{ issue, events }`.
2. **Resolve related context** (informational, not fed to the classifier directly):
- Parent PRD if `.scratch/<slug>/PRD.md` exists for the row's project.
- `CHOICES.md` sections relevant to the row's evidence.
- Recent commits touching files mentioned in evidence (`git log -p -- <file>`).
- Sibling / ancestor rows: `bun ~/repos/arc-agents/bin/ledger.ts list --kind task --limit 50` filtered by `parent_id` or `blocked_by`.
3. **Classify:**
```ts
import { classifyFailed } from "~/repos/arc-agents/src/ledger/failed-classifier";
const verdict = classifyFailed(
{ id, type, title, body_md, evidence_md },
events.map(e => ({ kind: e.kind, payload_md: e.payload_md })),
);
```
4. **Branch on `verdict.verdict`:**
**low-risk** — split + cancel:
- Call bookie `decompose --text "<short PRD-like text reconstructed from row + context>"` to mint N new mvp slices.
- Cancel parent with evidence:
```