Skip to content

build-qa-plan

build-qa-plan

buildwriteshands-off

Use this when: you want the open PRs for a sprint or epic planned

Build QA Plan

One live, mobile-readable issue that tells you — at a glance from a phone — which open PRs to review, in what order, what to watch, and what to do next. It is a status board, not a snapshot: every run re-derives the facts from GitHub.

Contract

  • Task class: build — produces/refreshes a tracking artifact.
  • Allowed tools: gh (pr list/view JSON, issue view/create/edit, label create) per docs/agents/issue-tracker.md; Read/Grep for repo context. (In the web/remote env the mcp__github__* tools stand in for gh.)
  • Direct vs fork: direct. Fork a scanner/general-purpose gather only when the PR set is large (≳15) and you want the digest, not the raw JSON, in-thread.
  • Verifiable artifact: exactly one open issue titled "QA Plan", labelled plan, whose body reflects the current state of every in-scope open PR in the format below.

The fresh-data audit — this is the skill

Re-derive every fact from GitHub on every run. Never copy a claim from the existing plan body — a PR that was clean last run may now be dirty; a review comment may be resolved; a base branch may have moved. A stale plan is worse than no plan, because it's trusted. Per in-scope PR pull live: state/draft, mergeableState (clean / dirty / unstable / blocked), baseRefName + headRefName, review threads (count + resolved?), and the Closes #NN trailer. Spend the effort here; the formatting is mechanical.

Re-poll mergeableState: unknown. GitHub computes mergeability asynchronously — the first read after a base change returns unknown and kicks the job; the next read returns the real value. Never record unknown as clean/dirty — poll again until it settles.

Workflow

  1. Resolve scope — by selector: a sprint (its child Tasks' PRs), an epic (all its sprints' PRs), an explicit PR list, or the default all open PRs. gh pr list --state open --json number,title,headRefName,baseRefName,mergeable,reviewDecision,isDraft.
  2. Group Epic → Sprint. For each PR, read its Closes #NN, walk the sub-issue tree (Task → Sprint → Epic) to place it under ## Epic #NN — <title> / ### Sprint <n> · <title> (#NN). PRs with no sprint parent go under a **Standalone** group.
  3. Order within a group by merge order — derive from the stack: a PR whose base is another open PR's head (or whose body declares a merge order) lands after its ancestor. Stacked = depends on another open PR first (📚); independent = 📕.
  4. Per PR, fill the block (template below) from the live data + a one-line read of what it does and what to watch.
  5. Find-or-update the plan. gh issue list --label plan --state open → if one exists, gh issue edit <n> its body; else create it. Title is always exactly QA Plan. If the plan label is missing, gh label create plan first (surface-then-confirm the create).
  6. Confirm before writing the issue (create or edit) and before creating the label — this writes outward.

Format (the per-PR block)

- [ ] <🖥️|📖> #NN - **<summarised, readable title>** <📚|📕>

_<one concise line: what the PR does>_

**State**: <clean ✅ | ⚠️ dirty — merge conflict | N review comments to confirm | wrong base · …>

**Pay attention to:** <the file/area worth scrutiny>

**Claude can:** <a check/action the agent can run for you>   ← omit the line if none

**Recommend**: <Read / Merge / rebase → Merge last / retarget & fold in …>

Group blocks under their Epic → Sprint headers; a **Then** group at the end for the sprint→main PR + closing the Sprint. Close with the legend:🖥️ test in a browser · 📖 code-QA is enough · 📚 stacked · 📕 not stacked. Every #NN is a clickable Markdown link (mobile-first — see CLAUDE.md). Keep titles bold; keep each PR to its block — no nested bullet trees (they waste horizontal space on a phone).

Failure branch

If a PR's epic/sprint can't be resolved (no Closes, orphan branch), place it under **Standalone** and say why in its State line — don't guess a parent. If gh can't read a PR (permissions/deleted), list it with State: ⚠️ unreadable rather than dropping it silently.

Output / handoff

The single open QA Plan issue, current. Then offer build-from-qa-plan to action the doable items, and (if a PR set is being watched) subscribe_pr_activity to keep it live.