/qa-flow:promote-to-regressionfrom qa-flow
Promotes a manually tested QA scenario into a committed Playwright regression spec after gating for worthiness, rewriting in suite conventions, proving stability, and independent review.
Ships in qa-flow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Takes one scenario that was tested by hand — usually a manual-test run, with its throwaway
script under _local/scripts/, its report and its evidence — and, if it is worth it, turns it into a
spec that lives in the project's committed e2e suite.
Two things make this harder than copying the throwaway script:
Pairs with
manual-test(produces the runs) andscan-regression-candidates(finds which runs in a scratch root are worth promoting). This skill handles one scenario at a time.
| Tier | Meaning |
|---|---|
balanced | Follows a documented playbook well (Sonnet-class, GPT standard, Gemini Pro-class) |
deep | Open-ended reasoning, judgement (Opus-class, top reasoning tier of your provider) |
This skill is a router. The main conversation resolves what needs the user and owns every gate; the reading, writing and checking go to subagents.
Stays in the main conversation:
Delegated, one subagent per step, fresh context:
| Step | Role | Tier |
|---|---|---|
| 2 — gate | read the run and the suite, score against the criteria | deep |
| 3–5 — author | study conventions, write the spec, prove it stable and able to fail | deep for a multi-step flow or new page objects; balanced for a single assertion with existing page objects |
| 6 — review | independent, read-only check of the spec | deep, never a fork of the author |
If a subagent comes back blocked, resolve it with the user and redispatch one tier up. Without subagents, run the steps yourself and say in Step 7 that the review was not independent.
tests/, e2e/), its config, and how it is
run in CI (project names, tags such as @smoke / @regression).AGENTS.md / CLAUDE.md) — the author reads them before writing._local/).gh pr create, glab mr create, a project skill).
Only used after the user's explicit OK.Input is one of: a manual-test slug, a throwaway spec path, a ticket id, or a candidate from a
scan-regression-candidates report. With no argument, list the PROMOTE candidates of the most
recent scan report (or, without one, the reviewed runs in _local/reports/) and ask which one.
Collect:
_local/scripts/ and the run's saved result (_local/reports/<slug>.json,
which manual-test writes after its review — reviewer_verdict, accepted_steps,
confirmed_findings, reviewed_at — or the report text when there is none);PASS. Without one, the gate
caps the candidate at MAYBE;If several scenarios match, list them and ask which one. If there is no accepted result for the
scenario (only BLOCKED / INCONCLUSIVE / PO-DECISION), stop: there is nothing verified to assert.
Score the scenario with references/promotion-criteria.md:
value, cost, disqualifiers — including a search of the committed suite for existing coverage of the
same route and outcome. Report PROMOTE / MAYBE / SKIP with the score and one line per
criterion.
SKIP → stop and say why. The user may override; record that it was an override.MAYBE → say what would make it PROMOTE (a seeding helper, a fixture user, a stub) and ask.Read, in this order: the project's agent instructions; the suite config; the page objects and fixtures for the area; two or three neighbouring specs for the same feature. Write down the conventions the new spec must follow — folder and file naming, test naming, tags, how auth and data are set up, how base URLs are configured, which locator style the suite uses, how steps are reported. If the suite has no home for this area, the author returns and the orchestrator asks the user.
Rewrite — do not copy — the throwaway script:
| Throwaway script had | Regression spec has |
|---|---|
| Expected values taken from the screen, the recon, or the run | Expected values from the ACs / product rules, verbatim |
| Hard-coded staging URL | The suite's baseURL and route helpers |
Raw locators, getByText guesses | The suite's page objects; add or extend one when the flow needs it |
console.log, text dumps, network capture, evidence screenshots | Nothing — the reporter and trace on failure are enough |
Login through the UI, or a personal storageState | The suite's auth fixture |
| Data a person created by hand on staging | Data created by the test (and cleaned up), or the suite's seed |
| Many observations per step | The few assertions that prove the outcome |
waitForTimeout, force: true, try/catch around actions | Web-first assertions; none of the forbidden workarounds |
Two habits that keep the expected values honest:
toContainText("(1)")), not the whole heading as the screen showed it
("Listings (1)"): the extra words came from the screen, and a copy change would break a test that
is about the counter.getByRole("status") belongs in the page
object; "Filters saved" belongs in the spec's assertion. A locator filtered by the expected text
turns a wrong-text regression into an unreadable "element not found".Keep it to one user-meaningful outcome per test; fold variants into test.steps or a parameterised
loop (see Folding, not adding in the criteria). Tag it the way the suite tags regression tests. Add
the ticket id in a comment or annotation if the suite does that.
Before writing, check the working tree. Run git status and note the branch: if the files you
are about to touch (a page object, a fixture) already have uncommitted changes, or the branch is the
default branch, return and let the orchestrator ask the user (a new branch or a separate worktree is
the usual answer). Never mix the promotion into someone's unrelated edits.
Write only inside the suite's folders (spec, page objects, fixtures). No commits. Nothing under the scratch root becomes part of the change.
A spec is not done until it has shown both that it passes reliably and that it can fail:
Every run below goes to a non-production environment (staging or local) — check the base URL the config resolves to before the first run; a spec that creates data is never repeated against production.
--repeat-each=3 (or 5 for anything with async waits). All runs pass; any flake is fixed at the
cause (a missing web-first assertion, shared state) — never with retries or longer timeouts.Return: the files changed, the conventions followed, the stability and sensitivity results, and anything left undone.
A fresh-context reviewer — never a fork of the author — gets the ACs, the gate verdict, the diff and the author's proof, and checks:
MAYBE).It returns: blocking issues, non-blocking suggestions, and a verdict (approve / changes needed).
On changes needed, the author fixes and the reviewer re-checks the fixed points.
Show: the gate score, the diff summary (files, lines), the proof (stability runs, sensitivity checks, static checks), the review verdict, and what is left. Then ask before each of: creating a branch, committing, pushing, opening the merge request. Use the team's merge-request path and the project's commit conventions. Never push to the default branch.
storageState contents from the scratch root into the
suite.manual-test.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub qamarcos/claude-qa-flow --plugin qa-flow5 skills in this plugin
/create-test-plan-scenariosTurn a task/ticket into a structured, professional QA test plan — a checklist of atomic, executable scenarios — and (optionally) post it back to your issue tracker. Use whenever the user asks to "create a test plan", "list test scenarios", "criar cenários de teste", "QA checklist for TICKET-XXXX", or otherwise wants a ticket turned into a verifiable QA plan. Works for any story type (UI, API, mobile, infra). Always runs a self-review pass before writing anything back./file-bug-ticketFile a bug (or feature/chore) ticket in your issue tracker via its REST API with a terse, budgeted description, attached screenshot evidence, owner/priority/placement filled in, and a verification GET before reporting done. Use whenever the user asks to "file a bug", "open a ticket", "criar um card", "abrir um bug", "report this to the tracker", or when manual-test hands over findings to file. Tracker-agnostic (Jira, Linear, GitHub Issues, Shortcut, ...)./manual-testExecute exploratory/manual QA against a web app, driven by either a ticket's test plan or a single ad-hoc scenario the user describes. Use whenever the user asks to "run a manual test", "fazer um teste manual", "execute this scenario", "validate this ticket manually", "manual test for TICKET-XXXX", or otherwise wants the agent to step through a behavior in the real app and report pass/fail with evidence. Resolves context with the user, delegates execution to an executor subagent, has the evidence checked by an independent reviewer, and only then (with approval) writes back to the tracker./scan-regression-candidatesSweep a QA scratch root (default `_local/`, where manual-test keeps its throwaway scripts, evidence and logs) and list the few scenarios worth turning into committed regression tests — scored for value and cost, checked against the existing suite, with probes, one-offs and already-covered flows filtered out as noise. Read-only; produces a ranked backlog report and hands chosen candidates to promote-to-regression. Use whenever the user asks to "varrer a pasta local", "find regression candidates", "o que vale automatizar?", "which manual tests should become automated", "levantar testes pendentes de automação", or wants a backlog of automation from past manual runs.Other plugins' skills for the same job