agentleFS
PythonShePythonShe/Repertoire/skills/coda/SKILL.md

coda

Skill0 starsChanged 4 months agoApache-2.0View on GitHub

Works an open GitHub pull request's review feedback to closure via the gh CLI — harvests every formal review, inline thread, conversation comment, and failing CI check; verifies each item against codebase reality with a read-only Opus verifier; fixes only what verification confirms; seals the run with an evidence-based QC gate plus one cross-model Codex review; then drafts thread replies and gates pushing and posting behind one user approval. Never merges, never resolves threads, never force-pushes.

  • Commits and pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. gsimone/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository10 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use Coda when an open PR has accumulated review feedback — human or bot reviews, inline threads, conversation comments, failing CI — and …

    line 76
  2. Distinctive:

    Verify — a read-only Opus verifier judges the whole ledger.

    line 98
  3. Distinctive:

    If resuming: read TodoWrite and git log --oneline first.

    line 111
  4. Very specific:

    Resolve the PR: Use the PR number or URL the user gave.

    line 115
  5. Very specific:

    Create a TodoWrite list: one item per ledger item, plus Verify, Fix, Panel, Final verdict (strikes 0/3), and Publish gate.

    line 134
  6. Very specific:

    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 …

    line 166
  7. Distinctive:

    No performative agreement, no gratitude: Never "You're absolutely right!", "Great catch!", or thanks of any kind.

    line 324
  8. Distinctive:

    Proven wrong later?: When a reviewer answers pushback with context the verifier lacked, the next Coda run verifies again.

    line 330
  9. Distinctive:

    Never merge, never resolve threads, never approve or dismiss reviews, never edit anyone's comments, never force-push or rebase the PR …

    line 340

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Coda

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.

Core principles

  • You conduct; you never play. You do not read source files, diffs, or CI logs, and you never edit code — every investigation and every change happens inside a subagent. Your bookkeeping carve-out: the ledger the clerk returns, read-only PR metadata (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.
  • Evidence outranks everyone. The reviewer may be right; the current code may be right; neither is right by default. A feedback item earns a fix only when the verifier has read the code and confirmed the claim, and earns pushback only when the verifier can refute it with evidence. Sycophancy (implementing a wrong suggestion to be agreeable) and defensiveness (rejecting a correct one to protect the branch) are the two failure modes this skill exists to prevent.
  • One verifier, whole ledger. A single verifier works through every feedback item in one read-only pass. It sees the full picture, so two reviewers flagging the same defect get one coherent verdict instead of two contradicting ones — and because it works alone, its build and test runs never collide in the worktree.
  • Writers run alone; only pure readers run in parallel. Fixers change the branch, so they run one at a time. The panel's lens reviewers only read, so they run together.
  • Every reviewer is spent once, where it counts. Small fix queues skip the panel — the QC agent reads them in full at the verdict, instead of a second same-model reviewer reading the same diff first. The cross-model Codex pass runs exactly once, after QC says MERGEABLE: never on a branch Opus would bounce anyway, and never again on retry rounds.
  • Everyone who changes code commits. Each fixer commits its own work, referencing the feedback item it resolves; the commits are the resume trail and their SHAs feed the replies. You push exactly once, at the publish gate.
  • Outward actions pass one gate. Pushing commits and posting replies are publishing — they go through a single AskUserQuestion together, after the final verdict. You never merge, never resolve threads, never approve or dismiss reviews, and never force-push (rewriting a shared PR branch breaks the line anchors that review comments hang on).
<!-- canonical: shared/invariants.md — keep this bullet in sync -->
  • The right model on every seat. The build seats — the feedback-clerk, the fixers, and the QC gate — run unpinned and inherit your session model; the read-only verifier and the panel skeptics stay pinned to Opus for a stable adversarial baseline. Run these skills on the most capable model you have — /model best resolves to Fable 5 where you have access, otherwise Opus — never on Sonnet. The Codex reviewer is the only non-Claude, cross-model seat, by design.

When to use

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 auto-invokes on matching requests. Cost gate: if the user did not name Coda or run /coda, confirm scope and cost first — one AskUserQuestion naming the PR and the verify→fix→verdict pipeline it triggers — before the clerk dispatches. A user who named Coda has already consented.

The pipeline

At a glance — the phase prose below is authoritative; resume, NEEDS_CONTEXT/BLOCKED re-dispatch, and the confirming re-run's strike budget live there, not here. A clean panel (no findings) passes straight to QC.

  1. Setup — cost gate if Coda wasn't named; resolve the PR, checkout the branch, capture BASE + BUILD/TEST, TodoWrite; the feedback clerk harvests the ledger. Empty ledger → report, done.
  2. Verify — a read-only Opus verifier judges the whole ledger; no VALID/PARTIAL items → straight to the publish gate, replies only.
  3. Fix — sequential fixer(s): blocking → simple → complex.
  4. Final verdict — panel (3 Opus lenses, parallel) only when the fixes are big or risky, findings → sequential fixers; then QC (build + tests + full fix read): NOT_MERGEABLE → route blockers → retry-mode re-run, third strike → AskUserQuestion; MERGEABLE → Codex once, whole PR; Codex findings → fix → one confirming QC re-run.
  5. Publish gate — draft replies → one AskUserQuestion → push, confirm, post approved replies + report.

Phase 0 — Setup

  1. If resuming: read TodoWrite and 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.
  2. Resolve the PR. Use the PR number or URL the user gave; otherwise 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.
  3. Check out the PR branch (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.
  4. Capture the base ref once: 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.
  5. Dispatch the feedback clerk (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.
  6. Create a TodoWrite list: one item per ledger item, plus Verify, Fix, Panel, Final verdict (strikes 0/3), and Publish gate.

Phase 1 — Verify every claim

  1. Dispatch one verifier (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.
  2. The verifier returns a per-item verdict for every F-id:
    • VALID — claim confirmed; comes with a fix directive (what to change, where, and the acceptance check that proves it).
    • PARTIAL — the concern is real but the suggested remedy is wrong; comes with a corrected directive.
    • INVALID — refuted; comes with evidence and a draft pushback reply.
    • UNCLEAR — cannot be evaluated as written; comes with a draft clarifying question.
  3. Record each verdict in the item's todo note: VALID and PARTIAL directives join the fix queue; INVALID and UNCLEAR drafts go to the reply pile for the publish gate. An overall 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.

Phase 2 — Fix what survived

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.

  1. Order the queue: blocking first (broken behavior, security, failing CI), then simple (typos, naming, small corrections), then complex (logic, refactors). Cheap certainty first; risk last.
  2. Choose a strategy: one fixer for the whole queue when items are few or interrelated, otherwise one fixer per item — always sequential.
  3. Note the current 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.
  4. PARTIALLY_FIXED / COULD_NOT_FIX → carry into the re-review brief and draft an honest status reply for the thread. Never a silent drop.

Phase 3 — Re-review and the final verdict

  1. Panel — only when the fixes are big or risky (see When the panel runs); say in the final report whether it ran and why. Dispatch 3 Opus reviewers with distinct lenses in parallel (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.
  2. QC gate (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.
    • NOT_MERGEABLE → route each blocker by type — [defect] → fixer, [implementation] → re-verify the item or escalate to the user — then re-run QC, filling the prompt's retry-round section (the prior blockers
      • the fix SHAs since — the retry re-runs build and tests in full but close-reads only the new fix commits). 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.
  3. Codex — once, after QC passes (codex-reviewer-prompt.md — read ${CLAUDE_PLUGIN_ROOT}/shared/codex-reviewer-core.md first; the stub composes with that shared contract): 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.
    • No critical or important findings → the PR clears → Phase 4.
    • Findings → route them to fixer(s), sequential, then one confirming QC re-run in retry mode, with Codex's findings as the prior blockers (it counts toward the same strike budget). Do not re-dispatch Codex — it runs once — unless those fixes were themselves big or risky. Confirming QC MERGEABLE → clear → Phase 4.

Phase 4 — The publish gate

  1. Assemble the package — for every ledger item, one line: verdict → action (commit SHA, reply draft, or escalation). Attach the draft replies:
    • Fixed → Fixed in <sha> — <one line on what changed>.
    • Pushback (INVALID) → the verifier's evidence-backed draft.
    • Clarification (UNCLEAR) → the verifier's question.
    • Unfixed (COULD_NOT_FIX) → honest status and what blocks it. CI items have no thread: fold anything reviewers need to know about them (a flaky verdict, an unfixed blocker) into the conversation comment of step 3; a fixed check speaks for itself when CI goes green.
  2. One AskUserQuestion presenting the package, with options: Push + post all replies / Push only — I'll reply myself / Revise the drafts first / Stop — nothing outward. On Revise, leave the gate, collect the edits in normal conversation, apply them, and re-present the gate. Nothing is pushed or posted before this gate clears. If Phase 0 flagged a fork PR, say at the gate that the push may be refused (maintainer edits off) and what the fallback is (the user pushes to the fork themselves).
  3. Publish what was approved — push first, replies second:
    • Push the branch: git push (plain — never force). Confirm it succeeded before posting anything — a "Fixed in <sha>" reply pointing at an unpushed commit points at nothing. If the push fails, stop and report; do not post.
    • Inline-thread replies, in the thread, never as a new top-level comment: gh api repos/{owner}/{repo}/pulls/{pr}/comments/{first-comment-id}/replies -f body=… (the ledger carries each thread's reply-to id).
    • One conversation comment for everything thread-less: 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.
  4. Report: the per-item table, whether the panel ran and why, the final verdict's evidence (QC output, then the Codex verdict), and what remains for the user — UNCLEAR threads awaiting reviewers, escalations, and the merge itself, which is never yours.

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.

When the panel runs (and choosing lenses)

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:

  • the fix queue had 4+ items, or any fix ended PARTIALLY_FIXED / COULD_NOT_FIX,
  • fixes touched security-sensitive code, a public interface or schema, or concurrency,
  • the fix range spans more than ~5 files or ~150 lines (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.

The Codex reviewer

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.

Handling subagent status

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.

Reply etiquette

Replies are part of the work product and carry the same rigor as the code:

  • No performative agreement, no gratitude. Never "You're absolutely right!", "Great catch!", or thanks of any kind. The fix is the acknowledgment; state what changed and where.
  • Pushback is technical reasoning, not defense. Cite the verifier's evidence — file:line, the test that covers it, the compat constraint — and, where genuinely open, end with the question that would change the verdict.
  • Proven wrong later? When a reviewer answers pushback with context the verifier lacked, the next Coda run verifies again; if the reviewer was right, fix it and state the correction factually — no apology spiral.
  • Stay in the thread. Inline feedback is answered in its thread via the replies endpoint, never as a new top-level comment.

Branch and outward policy

  • Fixers commit as they go; you push once, after the gate clears — and always before the replies post.
  • Never merge, never resolve threads, never approve or dismiss reviews, never edit anyone's comments, never force-push or rebase the PR branch mid-run.
  • The merge — and the judgment that a conversation is settled — belongs to the user and the reviewers.

Red flags

  • Reading diffs, source files, or CI logs yourself → playing, not conducting. Dispatch a subagent.
  • Fixing an item the verifier did not confirm — "the reviewer is probably right" is blind implementation.
  • A verdict, in either direction, with no file:line evidence behind it.
  • Running verifiers in parallel — their test runs collide in the worktree.
  • Pushing or posting anything before the publish gate clears, or posting replies before the push is confirmed.
  • "You're absolutely right!", praise, or thanks in a reply draft.
  • Two fixers in parallel; force-pushing or rebasing the PR branch.
  • Dispatching Codex on just the fix range, before QC has passed, or more than once — its scope is the whole PR, its slot is after MERGEABLE, and it runs once.
  • Calling a CI failure flaky without evidence.
  • Resolving threads, approving the PR, or merging — never yours.
  • Skipping the final verdict because the fixes were "trivial" — QC's full fix read plus the Codex pass are the floor.

Prompt templates

  • 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; a thin stub composing with shared/codex-reviewer-core.md (the invocation mechanics).
  • qc-prompt.md — evidence-based mergeability verdict (reads every fix in full).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.