Skip to Content
Commands/conclave-pr-review

/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-001

This 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

  1. Resolves the workspace and checks the profile gate — refuses immediately if peer_pr_review.required: false.
  2. Resolves the story — must be status: verified (QA already passed).
  3. Switches to the dev branch and computes the diff against the integration branch.
  4. 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.
  5. 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.
  6. Writes outputs (below). 6.5. Generates a lab test spec (when lab_test.enabled: true AND lab_test.stories.generate_on: pr-review AND verdict is approved):
    • 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.md to the sprint stories directory.
    • Updates lab_test_path in the story frontmatter; commits and pushes.
    • See Lab tests for the full spec format and safety rules.

What it produces

  • Story frontmatter update:
    • Verdict approvedstatus: done.
    • Verdict request_changesstatus: review, with a ## TL findings section (one bullet per finding, tagged blocker or non-blocking).
  • gh pr review --approve or --request-changes with 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 findings section if issues remain, or removes it and moves to done on 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 --lab after 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-NNN again. Lab spec generation is skipped on request_changes — it runs only when the verdict is approved.
Last updated on