/conclave-pr-review US-NNN
Tech Lead PR approval gate. Reviews the code of a story that QA has already verified behaviorally. On approve, the PR is approved and the story moves to status: done. On request-changes, the story moves back to review and the dev fixes.
/conclave-pr-review US-001This command runs only when ceremonies.peer_pr_review.required: true in conclave/config.md. In lean profile (flag off), QA’s pass is the merge signal and there is no separate TL gate.
What it does
- Resolves the workspace and checks the profile gate — refuses immediately if
peer_pr_review.required: false. - Resolves the story — must be
status: verified(QA already passed). - Switches to the dev branch and computes the diff against the integration branch.
- Loads context in parallel: config, architecture, DoD, the story and acceptance files (including QA’s latest verification block), the full diff, PR metadata, and the
lab_test.*config block. - Delegates to the Tech Lead subagent, which checks ADR compliance, code-level DoD items (linter, coverage, docs), and code quality — race conditions, security smells, abstraction mistakes — the things QA’s behavioral verification can’t catch.
- Writes outputs (below).
6.5. Generates a lab test spec (when
lab_test.enabled: trueANDlab_test.stories.generate_on: pr-reviewAND verdict isapproved):- Skips silently if a usable lab spec already exists (i.e.
status != blocked). - Requires
conclave/lab-config.md— prints setup instructions and skips if missing (not a hard error for approval). - Dispatches the Tech Lead subagent with the story file, acceptance criteria, PR diff, lab config variable registry, and
base_url. - Writes
US-NNN-lab.mdto the sprint stories directory. - Updates
lab_test_pathin the story frontmatter; commits and pushes. - See Lab tests for the full spec format and safety rules.
- Skips silently if a usable lab spec already exists (i.e.
What it produces
- Story frontmatter update:
- Verdict
approved→status: done. - Verdict
request_changes→status: review, with a## TL findingssection (one bullet per finding, taggedblockerornon-blocking).
- Verdict
gh pr review --approveor--request-changeswith the rendered review body.
Guardrails
- Never approves a story whose status is not
verified— the QA gate always comes first. - Never runs on a workspace where
peer_pr_review.required: false— refuses at the first step. - Does not merge the PR. Approval is sufficient; merging is a separate human decision (release windows, batching).
- Does not modify code on the dev branch — findings go in the review body, the dev addresses them.
- A single
blocker-severity finding is enough to withhold approval. No “approve with notes” when one exists. - Re-runs are append-only on the story file: after dev fixes, a second run adds a new
## TL findingssection if issues remain, or removes it and moves todoneon approval.
After it runs
- Approved — the PR is ready to merge (a separate human action). If lab tests are enabled, a lab spec was also generated — run
/conclave-qa US-NNN --labafter the PR merges. - Request changes — dev pushes fixes, then re-run
/conclave-qa US-NNN(criteria may have shifted) followed by/conclave-pr-review US-NNNagain. Lab spec generation is skipped onrequest_changes— it runs only when the verdict isapproved.
Last updated on