From Repertoire
Closing-passage pipeline for an open GitHub pull request's review feedback (via the gh CLI) — a conductor that fetches every formal review, inline comment thread, conversation comment, and failing CI check; verifies all of it against codebase reality with one read-only Opus verifier (evidence decides — no blind implementation, no performative agreement); fixes only what verification confirms with sequential fixers; panel-reviews big or risky fixes with 3 diverse-lens Opus skeptics; seals every run with a staged final verdict — an evidence-based QC gate that reads each fix in full, then one cross-model Codex review over the whole PR once QC passes; then drafts thread replies (fix confirmations, technical pushback, clarifying questions) and gates pushing and posting behind one user approval. Pushes to the PR branch but never merges, never resolves threads, never force-pushes. MANUAL-ONLY — invoke only when the user explicitly asks for Coda by name or runs /coda (e.g. "run Coda on PR 42", "Coda, work through the review feedback", "address these reviews with Coda", "resume the Coda run"). Do NOT auto-trigger on generic "address the review comments", "fix the PR feedback", "respond to my PR reviews", or "go through the review comments and fix them" requests, and never on other senses of the word "coda" (a musical or document coda, the Coda/coda.io app, the film); if the user has not named Coda as this skill, stay silent and leave review handling to other workflows.
How this skill is triggered — by the user, by Claude, or both
Slash command
/repertoire:codaThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the conductor, back at the podium after the performance. The piece has
You are the conductor, back at the podium after the performance. The piece has been played and the critics have answered: reviews, inline comments, conversation threads, failing checks. A coda's job is to resolve every open line so the piece can close. You direct the same kind of ensemble Maestro does — a clerk who harvests the feedback, a verifier who tests every claim against the code, fixers who repair what verification confirms, panel reviewers who try to break risky fixes, and a staged final verdict — QC, then a cross-model Codex pass — that proves the branch is sound. You never play an instrument yourself.
Why work this way. Review feedback is a pile of claims, not a work order. Some claims are right, some are wrong for this codebase, and some are too vague to act on — and you cannot tell which is which without checking the code. Blindly implementing every suggestion is as dangerous as defensively rejecting them. Fresh, purpose-built subagents make every check rigorous, and only compact verdicts, directives, and draft replies return to you — so your context survives a feedback-heavy PR from harvest to publish.
gh pr view, gh pr checks), and read-only
git metadata (merge-base, rev-parse, log --oneline, status,
diff --stat — numbers, not code). Two write actions are also yours, by
design: gh pr checkout at setup, and the single git push after the
publish gate clears. Reading feedback is conducting; reading code is playing.Use Coda when an open PR has accumulated review feedback — human or bot
reviews, inline threads, conversation comments, failing CI — and you want it
worked through in this session: verified, fixed, re-reviewed, and answered. It
is the natural closer after Maestro pushes a branch and reviews land on its PR,
but it works on any PR. It needs the gh CLI, authenticated. If there is no
open PR for the branch, stop and say so. If the harvest finds nothing
actionable, report that and stop.
Coda is manual-only: run it when the user invokes it explicitly (by name or
/coda), not as an automatic response to "address the review comments".
digraph coda {
rankdir=TB;
"Resolve PR, checkout branch, capture BASE + BUILD/TEST, TodoWrite" [shape=box];
"Feedback clerk: harvest reviews/threads/comments/CI" [shape=box];
"Ledger empty?" [shape=diamond];
"Report: nothing to address" [shape=doublecircle];
"Verifier (Opus, read-only, whole ledger)" [shape=box];
"Any VALID or PARTIAL?" [shape=diamond];
"Fixer(s), sequential: blocking -> simple -> complex" [shape=box];
"Big or risky fixes?" [shape=diamond];
"Panel: 3 Opus lenses (parallel)" [shape=box];
"Panel findings -> fixer(s), sequential" [shape=box];
"QC agent (Opus): build + tests + full fix read" [shape=box];
"Mergeable?" [shape=diamond];
"QC failed 3x?" [shape=diamond];
"Route blockers -> fixer(s), sequential" [shape=box];
"Codex (cross-model, whole PR, runs once)" [shape=box];
"Codex findings?" [shape=diamond];
"Fix findings -> one confirming QC re-run" [shape=box];
"Draft replies -> one AskUserQuestion gate" [shape=box];
"Push, confirm, then post approved replies + report" [shape=doublecircle];
"Stop + AskUserQuestion" [shape=box];
"Resolve PR, checkout branch, capture BASE + BUILD/TEST, TodoWrite" -> "Feedback clerk: harvest reviews/threads/comments/CI" -> "Ledger empty?";
"Ledger empty?" -> "Report: nothing to address" [label="yes"];
"Ledger empty?" -> "Verifier (Opus, read-only, whole ledger)" [label="no"];
"Verifier (Opus, read-only, whole ledger)" -> "Any VALID or PARTIAL?";
"Any VALID or PARTIAL?" -> "Draft replies -> one AskUserQuestion gate" [label="no - nothing to fix"];
"Any VALID or PARTIAL?" -> "Fixer(s), sequential: blocking -> simple -> complex" [label="yes"];
"Fixer(s), sequential: blocking -> simple -> complex" -> "Big or risky fixes?";
"Big or risky fixes?" -> "Panel: 3 Opus lenses (parallel)" [label="yes"];
"Big or risky fixes?" -> "QC agent (Opus): build + tests + full fix read" [label="no"];
"Panel: 3 Opus lenses (parallel)" -> "Panel findings -> fixer(s), sequential" -> "QC agent (Opus): build + tests + full fix read";
"QC agent (Opus): build + tests + full fix read" -> "Mergeable?";
"Mergeable?" -> "Codex (cross-model, whole PR, runs once)" [label="yes"];
"Mergeable?" -> "QC failed 3x?" [label="no"];
"QC failed 3x?" -> "Stop + AskUserQuestion" [label="yes"];
"QC failed 3x?" -> "Route blockers -> fixer(s), sequential" [label="no"];
"Route blockers -> fixer(s), sequential" -> "QC agent (Opus): build + tests + full fix read";
"Codex (cross-model, whole PR, runs once)" -> "Codex findings?";
"Codex findings?" -> "Draft replies -> one AskUserQuestion gate" [label="none / absent"];
"Codex findings?" -> "Fix findings -> one confirming QC re-run" [label="critical / important"];
"Fix findings -> one confirming QC re-run" -> "Draft replies -> one AskUserQuestion gate";
"Draft replies -> one AskUserQuestion gate" -> "Push, confirm, then post approved replies + report";
}
Happy path only — re-dispatch edges (NEEDS_CONTEXT/BLOCKED), resume, and the strike budget on the confirming QC re-run are described in the text below. A clean panel (no findings) passes straight through to QC.
git log --oneline first. There is no
state file — re-dispatch the clerk to rebuild the ledger (answered and
resolved threads drop out on their own), keep the verdicts recorded in your
todo notes, and resume at the first phase not marked done.gh pr view --json number,title,headRefName,baseRefName,isCrossRepository,url
on the current branch. No open PR → stop and tell the user. Note
isCrossRepository: a fork PR means the final git push can fail unless
the fork allows maintainer edits — flag this at the publish gate rather
than discovering it after approval.gh pr checkout <number>) if you are not
already on it. Require a clean worktree; uncommitted changes are the user's
work, so ask before touching anything.git merge-base HEAD <base-branch> → keep it
as BASE. Determine BUILD and TEST from the plan, README, or
package manifest; if you cannot find them, ask the user — never let agents
guess.feedback-clerk-prompt.md). It fetches the
reviews, inline threads, conversation comments, and failing checks, filters
the noise, and returns the ledger — one numbered item (F1, F2, …) per
piece of actionable feedback, with author, location, the demand, and reply
routing. The raw JSON and CI logs stay in the clerk's context, never in
yours.Verify, Fix,
Panel, Final verdict (strikes 0/3), and Publish gate.verifier-prompt.md) — fresh Opus, read-only —
with the entire ledger, the PR's purpose, BASE..HEAD, BUILD, and
TEST. One
verifier sees every item, so related items get one shared verdict (noted on
each F-id it covers), and its build/test runs never collide. Only for an
unusually large ledger (roughly 15+ items) split it into sequential
batches — never parallel verifiers: they would run the test suite
concurrently in one worktree and corrupt each other's results.NEEDS_CONTEXT → supply what is missing
and re-dispatch.A CI failure is just another claim ("this code is broken") — the verifier diagnoses the root cause rather than trusting the red X, and calling it flaky requires evidence, not hope.
If the fix queue is empty, mark the Fix, Panel, and Final verdict
todos as skipped — nothing changed on the branch, so there is nothing to
re-review or push — and go to Phase 4 for replies only.
HEAD before the first fixer → keep it as FIXBASE.
Dispatch fixers (fixer-prompt.md); each gets the verifier's directive (the
directive is authoritative, not the reviewer's literal wording), the
original ledger entry, and TEST, and commits its own work. Record each
returned SHA in the item's todo note — the replies need them.reviewer-prompt.md),
scope FIXBASE..HEAD with the whole PR (BASE..HEAD) as regression
context; every brief includes the feedback items the fixes claim to
resolve — a fix that dodges its item is a finding. Consolidate findings
from the text only — match by file:line + description, drop
duplicates, discard non-defects — and route real defects to fixer(s),
sequential, each committing. Small, low-risk fix queues skip the panel
entirely: the QC agent reads them in full at the next step, so nothing
ships unread.qc-prompt.md) — hand it the resolved BASE, FIXBASE,
BUILD, and TEST. It runs the build and tests and reads the fix range
in full against every verified item; verdict MERGEABLE or
NOT_MERGEABLE with evidence.
[defect] → fixer,
[implementation] → re-verify the item or escalate to the user — then
re-run QC. A round is one QC dispatch that does not clear; update
Final verdict (strikes N/3) after each, and re-verify excursions live
inside the same budget. On the third failed round, stop looping and
hand the decision to the user via AskUserQuestion — never silently loop
past three. Codex has not run yet: the cross-model pass is never spent
on a branch that same-model QC would bounce.codex-reviewer-prompt.md): a
cross-model adversarial pass over the whole PR (BASE..HEAD) — the
last reviewer in the pipeline. If Codex is unavailable or returns nothing,
the verdict rests on QC alone — say so in your report, never silently
drop it.
MERGEABLE → clear → Phase 4.Fixed in <sha> — <one line on what changed>.git push (plain — never force). Confirm it
succeeded before posting anything — a "Fixed in " reply pointing
at an unpushed commit points at nothing. If the push fails, stop and
report; do not post.gh api repos/{owner}/{repo}/pulls/{pr}/comments/{first-comment-id}/replies -f body=…
(the ledger carries each thread's reply-to id).gh api repos/{owner}/{repo}/issues/{pr}/comments -f body=… — quoting
and answering each review-body point, plus any CI-item outcomes from
step 1.Coda is re-runnable: after reviewers respond, a later run's clerk harvests only what is new (answered and resolved threads drop out), and the cycle repeats until the PR closes clean.
Most fix queues skip the panel — the QC agent reads the full fix diff at the verdict and Codex follows cross-model, so a second same-model read of a small diff buys nothing. Escalate to the 3-lens panel when the fixes are big or risky — any of:
git diff --stat FIXBASE..HEAD — numeric metadata, allowed bookkeeping).Pick three lenses that fit what the fixes did, as in Maestro: behavior changes → correctness & edge cases · regression risk · test coverage; any security feedback → make one lens security; interface or schema fixes → contracts & compatibility. Hand each reviewer exactly one lens.
Skipping the panel never skips scrutiny: every run still ends with QC's full fix read and the cross-model Codex pass.
A cross-model reviewer catches what a room full of Claudes will happily agree
to miss — so Coda spends it exactly once, where it counts most: after QC
returns MERGEABLE, with global scope (BASE..HEAD, the whole PR). It
never runs before or alongside QC — no cross-model pass on a branch that
same-model QC would bounce — and it never re-runs on strike rounds: if its
findings get fixed, one confirming QC re-run closes the loop. Dispatch it
through Codex's adversarial-review runtime — see
codex-reviewer-prompt.md for the exact invocation and its gotchas. Do not
use the codex-rescue subagent: it is a write-capable implementation forwarder
that refuses reviews and would try to change code instead. If neither the Codex
plugin nor the codex CLI is available — or the call returns nothing — treat
the reviewer as absent: the verdict rests on QC alone, and you say so in your
report. Never silently drop a reviewer.
Clerk: LEDGER → proceed. NO_FEEDBACK → report and stop. BLOCKED (no
gh auth, no PR access) → surface the blocker to the user; do not harvest by
hand.
Verifier: per-item VALID / PARTIAL / INVALID / UNCLEAR as in
Phase 1; overall COMPLETE or NEEDS_CONTEXT — supply what is missing and
re-dispatch; never re-dispatch unchanged.
Fixer: FIXED → record the SHA. PARTIALLY_FIXED / COULD_NOT_FIX → into
the re-review brief plus an honest reply draft.
Panel reviewer reports PASS/FAIL with findings; QC reports
MERGEABLE/NOT_MERGEABLE with typed blockers; Codex reports
PASS/FAIL once, or is absent. Handle all three as the Phase 3 steps
describe.
Replies are part of the work product and carry the same rigor as the code:
file:line evidence behind it.feedback-clerk-prompt.md — harvest the PR's feedback into the ledger.verifier-prompt.md — test the whole ledger against the codebase
(read-only, one agent).fixer-prompt.md — implement a verified directive and commit.reviewer-prompt.md — adversarial panel review, one lens per reviewer.codex-reviewer-prompt.md — cross-model, whole-PR pass once QC clears.qc-prompt.md — evidence-based mergeability verdict (reads every fix in
full).Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub pythonshe/repertoire --plugin repertoire