# Triage

> Use after every CI Playwright run to triage failures end-to-end. Runs RCA, hands locator failures to heal, runs the flaky detector over recent runs, files Jira bugs for product defects, returns a one-line summary.

- Skill: `pramoddutta/triage` (Agent Skill)
- Install (CLI): `npx skillmds@latest add pramoddutta/triage`
- Raw SKILL.md: https://api.skillmd.com/api/skills/pramoddutta/triage/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: PramodDutta (https://skillmd.com/u/pramoddutta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/pramoddutta/triage

---


# /triage · the crew

When a Playwright run finishes red on CI (or main), run this skill to triage everything in one shot.

## Procedure

1. Spawn the `@rca` subagent · pass `./test-results/results.json`.
2. Collect verdicts. If any have `routeTo: heal`, spawn `@heal` per locator failure.
3. If `./runs/` has ≥ 3 JSON reports of the same commit, spawn `@flaky` over the directory.
4. Wait for all subagents. Aggregate:
   - `<N>` failures classified by RCA · counts per category.
   - `<K>` locators healed (auto-patched + verified) · `<M>` escalated to human.
   - `<P>` flaky tests detected · `<Q>` quarantined with `@flaky`.
   - `<R>` Jira bugs filed.

## Output

A markdown summary suitable to paste into a PR comment or Slack thread:

```
🤖 Triage · ✅ 18/20 specs green · ❌ 2 failures handled
- RCA: 1 product (Jira QA-941 filed) · 1 locator (auto-patched)
- Flaky: 3 detected · 2 quarantined as @flaky
- Heal: 1/1 patched · spec is now green
```

## Stop conditions

- All three sub-pipelines finished.
- Markdown summary printed.

## Hard rules

- Do not file the same Jira bug twice · the RCA subagent dedupes via JQL.
- Do not commit any patches · only edit + verify.

