/conclave-qa US-NNN [US-NNN …] [—lab]
Verify one or more user stories in status: review against their acceptance criteria — or, with --lab, execute a post-merge lab test.
/conclave-qa US-001 # single story — identical to previous behaviour
/conclave-qa US-001 US-002 US-003 # three stories in parallel, each on the integration branch
/conclave-qa US-001 --lab # execute US-001's lab test (post-merge, single story only)
/conclave-qa BUG-004 --lab # execute BUG-004's lab test--lab is only accepted for a single story or bug ID, and only after the PR is already merged. It does not run Gherkin verification — it runs the Tech Lead’s lab spec instead.
When this finishes, each story has moved to one of four states:
verified— QA passed, awaiting Tech Lead PR approval. Happens whenpeer_pr_review.required: true.done— QA passed and there is no separate TL gate. Happens whenpeer_pr_review.required: false.review(pending UAT) — UAT artifacts were generated and pushed and nothing has failed, but a mobile checklist is awaiting a human, or was left incomplete. Not a defect.review(with blockers) — QA found failures — in the Gherkin scenarios, the DoD, or the generated UAT tests’ CI run. The dev (or tester) fixes, and QA re-runs.
This is one of the two structural Scrum gates Conclave enforces (along with Sprint Planning). It cannot be skipped by any profile. QA does not approve the PR itself — code-level approval belongs to the Tech Lead via /conclave-pr-review. QA’s verdict goes into the verification report and a PR comment.
Multi-story behaviour
When more than one story ID is passed, the same upfront-validation → concurrent-batches-of-≤-3 → failure-isolation → final-summary-table pattern applies as in /conclave-dev. Each QA subagent runs fully independently on the integration branch, including UAT generation, CI wait, and PR comment. A final summary table shows the verdict for every story:
| Story | PR | Verdict |
|--------|------------------------------|---------------------|
| US-001 | https://github.com/…/pull/42 | ✓ passed |
| US-002 | https://github.com/…/pull/43 | ✗ blocked (2 items) |
| US-003 | https://github.com/…/pull/44 | ⏳ pending_uat |What it does
- Resolves the workspace and confirms
qa_verification.required: true(always true — refuses if a malformed config says otherwise). - Resolves the story — must be
status: review. Readsrepo.integration_branchfromconfig.md(defaults todevelop). - Switches to the integration branch (
developor the configuredrepo.integration_branch). Captures the PR URL for this story’s feature branch (feat/US-NNN-<slug>) viagh pr list— the feature branch does not need to be checked out. Verification is anchored to the integrated state of the codebase, not the isolated feature branch. - Loads context in parallel: config, DoD, story, acceptance file,
conclave/team/testing-environments.md, the verification-report/UAT-report templates, and PR metadata (reviews, CI status) ifghis available. Iftesting-environments.mdis missing or every row is stillTBD, UAT is skipped for this run — QA verifies exactly as it always has. - Generates UAT test artifacts, when UAT is enabled, based on the story’s
discipline:frontend/multi→ a Playwright spec (tests/uat/US-NNN.spec.ts), one test case per Gherkin scenario.backend/multi→ merges this story’s endpoints into the single, evolvingtests/uat/api-collection.postman_collection.json, run via Newman — never overwrites another story’s requests.mobile→ a manual functional checklist (tests/uat/US-NNN-UAT.md) for a human tester to execute and record a verdict into. No CI wait for mobile.- If no CI job runs
tests/uat/yet, proposes the minimal addition and confirms with the human viaAskUserQuestionbefore writing it.
- Pushes and waits for CI (skipped for
mobile) — polls the CI run triggered by the pushed commit, up toceremonies.qa_verification.ci_wait_timeout_minutes(default 20). A CI failure, or no run found / a timed-out wait, is treated exactly like a failing Gherkin scenario. - Delegates to the QA subagent, which re-derives PASS/FAIL for every Gherkin scenario from first principles — adversarially, not by trusting the dev’s own claims — and folds in the UAT/CI outcome (or the current state of a mobile checklist on a later run).
- Writes outputs (below):
- 8.1 — Passed: standard verification outputs (below).
- 8.2 — Blocked: in addition to the standard
## QA blockerssection, every reproducible defect that is linked to a specific story is written as a sprint bug file:- Path:
conclave/sprints/<SPRINT_ID>/bugs/BUG-NNN-<slug>.md - Frontmatter includes:
linked_story,linked_acceptance(file path),introduced_by_pr(the feature PR URL),severity(minor | major | critical),status: open. - A sprint cannot close if any file in
conclave/sprints/<SPRINT_ID>/bugs/hasseverity: criticalandstatusother thandone.
- Path:
QA never executes the generated tests itself — the target repo’s own CI does, and never resolves, reads, or writes a secret value at any point.
What it produces
- A
## Verification — <date>section appended toacceptance/AC-US-NNN.md— never overwrites previous verification runs, now including a UAT execution subsection (CI run + result, or mobile checklist state). - New UAT artifacts committed to the target repo under
tests/uat/(when UAT is enabled). - Story frontmatter update:
- Verdict
passed+peer_pr_review.required: true→status: verified. - Verdict
passed+peer_pr_review.required: false→status: donedirectly. - Verdict
pending_uat→ staysstatus: review, with a## QA pendingsection naming what a human needs to complete — worded as awaiting completion, not a defect. - Verdict
blocked→ staysstatus: review, with a## QA blockerssection listing each failing scenario/DoD item/CI failure and its reproduction or evidence (log excerpt + CI run URL).
- Verdict
conclave/sprints/<SPRINT_ID>/bugs/BUG-NNN-<slug>.md— one file per reproducible defect found (blocked verdict only).- A PR comment with the verdict (never a review/approval —
gh pr reviewis never called from here).
Sprint bug files
When QA is blocked, each reproducible defect becomes a sprint bug file at:
conclave/sprints/SPRINT-NNN/bugs/BUG-NNN-<slug>.mdThe file links back to the story, its acceptance criteria, and the PR that introduced the regression. severity: critical bugs block sprint closing. These files are separate from bugs reported manually via /conclave-bug report (which go to conclave/product/bugs/).
Lab test execution (--lab)
When --lab is passed, the standard Gherkin verification steps are replaced by lab test execution. This requires:
lab_test.enabled: trueinconclave/config.md- A lab spec file (
US-NNN-lab.mdorBUG-NNN-lab.md) already written by the Tech Lead conclave/lab-config.mdpresent and gitignored (hard stop if missing)- The PR for this entity is already merged into
lab_test.integration_branch
What --lab does
- Loads
conclave/lab-config.md, reads the variable registry, confirms the file is gitignored. - Switches to
LAB_TEST_BRANCH, captures the commit SHA (LAB_SHA). - Selects the
integrationenvironment vars (with user confirmation ifintegration.varsis empty, fallback tolocal.vars). - Exports integration env vars to the shell (values never printed). Generates
LAB_TEST_TAG=lab-<timestamp>. - Safety pre-checks (hard abort if either fails):
payment_modemust equaltestSTRIPE_SECRET_KEYmust start withsk_test_
- Executes the Verify command from the lab spec, with the configured timebox. Captures exit code and 200 chars of output.
- Appends a row to the Evidence log in the lab spec (Tier A: command + exit code + output + SHA). Updates
status,last_run_at,last_run_sha. - If failed: dispatches the QA subagent to write a bug report. Bug is written to
conclave/product/bugs/BUG-NNN-lab-failure-<slug>.md. Lab spec’slinked_bugis updated. - Commits and pushes the lab spec (with updated Evidence log) to
LAB_TEST_BRANCH.
A timeout during execution results in status: blocked (not failed). Blocked specs can be re-run after the timeout is resolved.
See Lab tests for the full reference including safety rules, idempotency patterns, and bug filing.
Guardrails
- Only ever modifies
conclave/, this story’s acceptance file, andtests/uat/US-NNN.spec.ts/ the shared Postman collection+environment files /tests/uat/US-NNN-UAT.md— QA writes verification reports and UAT artifacts, QA does not fix code. - May propose (with human confirmation) adding the one CI job/step that runs
tests/uat/— no other pipeline changes. - Never deletes prior verification sections — the acceptance file is the story’s full audit trail.
- Never overwrites another story’s requests in the shared Postman collection.
- Never resolves, reads, or writes a secret value, anywhere, at any step — including during
--labexecution (values are exported to the shell; QA never sees them). - Never runs
gh pr review --approveor--request-changes. That is the Tech Lead’s call via/conclave-pr-review. - Never passes a story when any scenario fails, any required DoD item is unmet, or the generated UAT tests’ CI run failed or timed out.
- Never conflates
pending_uatwithblocked. - Does not merge the PR, even when the verdict directly produces
status: done. --labis single-entity, post-merge only — never accepted in a batch or before the PR merges.--labnever prints env var values — only variable names appear in logs.
After it runs
- Verdict
passed,peer_pr_review.required: true— Tech Lead runs/conclave-pr-review US-NNNto approve and merge. - Verdict
passed,peer_pr_review.required: false— no separate gate; the PR is ready to merge. - Verdict
pending_uat— a human completestests/uat/US-NNN-UAT.md(mobile checklist), then re-run/conclave-qa US-NNN. - Verdict
blocked— dev fixes and pushes (or a mobile tester records a FAIL with notes), then re-run/conclave-qa US-NNN. Sprint bug files remain open until the fix is verified.
After the PR is merged (and lab_test.enabled: true):
- Lab test
passed— Tier A evidence is in the lab spec’s Evidence log. Done. - Lab test
failed— a bug file was written toconclave/product/bugs/. Fix and re-run/conclave-qa US-NNN --lab. - Lab test
blocked— the Verify command timed out or the lab spec had no runnable command. Check the lab spec and re-run after the issue is resolved.