responding-to-review-on-a-stack
Skill5 starsChanged 4 months agoMITView on GitHub
Respond to code review across a dependent PR stack — fix on the PR that introduced the issue, propagate the fix up-stack, keep each review fix a distinct commit, lease-protect any rewrite, and re-audit threads, approvals, and checks after every rewrite. Use when review comments span several stacked PRs.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- code-conventionsSkill
- defensive-patternsSkill
- extension-points-and-seamsSkill
- module-layeringSkill
- documentation-placementSkill
- event-contract-matrixSkill
- prose-standardSkill
- code-reviewSkill
- decision-recordsSkill
- minimal-evidence-checksSkill
- postmortemSkill
- pr-history-hygieneSkill
- runtime-invariantsSkill
- testing-tiersSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
A fix lands on the introducing PR, then flows up-stack: When a comment on PR B points at code B introduced, fix it on B and propagate into …
- Distinctive: line 23
Triage every comment on the merits: before acting: verify the claim against the code — a reviewer flagging the right symptom can still …
- Distinctive: line 41
Every fixed PR's current diff contains the intended correction at the layer that introduced the issue.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
Responding to Review on a Stack
A discipline for acting on review comments that span several PRs in a dependent stack (A ← B ← C …). It owns review-fix placement and propagation; pr-history-hygiene owns linkage checks and landing, and code-review owns finding the issues.
The defining constraint: a fix lands on the PR that introduced the issue, then flows up-stack — never downstream, where the introducing PR ships the unfixed code and the fix is hidden from its reviewer.
Ground rules
- One worktree per PR branch. Each PR's fixes happen in that PR's own worktree; parallel fixes never share a checkout.
- The stack object is authoritative. Base branches establish the expected dependency order; the platform's stack metadata proves it is recognized. Do not treat a matching branch chain as an official stack without checking that metadata.
- A fix lands on the introducing PR, then flows up-stack. When a comment on PR
Bpoints at codeBintroduced, fix it onBand propagate intoC— even ifCalso carries the file. - Each review fix remains a distinct commit. A later rebase may change its OID, but do not amend a reviewed fix out of the branch history. Amend only your own not-yet-pushed, not-yet-reviewed work.
- Choose merge-forward or rebase deliberately. Both are allowed after review. A rewritten push must be lease-protected and must abort rather than overwrite a concurrently advanced remote head; raw force is forbidden.
Resolve comments through the stack
- Triage every comment on the merits before acting: verify the claim against the code — a reviewer flagging the right symptom can still misdiagnose the cause.
- Map each accepted finding to its originating PR and fix it there.
- Propagate the fixed layer through every affected child in order — merge-forward (merge the fixed parent into the child, validate, continue upward) or a native cascading rebase (validate the rewritten layers, then publish).
- Trust but verify delegated fixes — a sub-agent's report describes intent, not necessarily what landed. Re-run the gates on the actual tree; prove a regression guard fails on the unfixed code.
- Reply in the review thread, not as a top-level comment, stating the fix and the current commit or head that carries it.
- After any rewritten push, re-read unresolved threads, approvals, mergeability, and checks. A force-pushed OID or outdated inline anchor is not current evidence that the finding remains resolved.
Workflow
- Ground — one worktree per PR; confirm the stack object, not just the branch chain.
- Triage — verify each comment on the merits; accept or rebut.
- Fix at origin — land each accepted fix on the introducing PR, as a distinct commit.
- Propagate — move the fixed layer up-stack via merge-forward or a validated cascading rebase.
- Verify — re-run gates on every affected PR; re-audit threads, approvals, and checks after any rewrite.
- Reply — state the fix and its commit in the review thread.
Completion criteria
- Every fixed PR's current diff contains the intended correction at the layer that introduced the issue.
- The stack is recognized by the platform and each child's diff against its parent shows only that child's changes.
- Unresolved threads, approvals, mergeability, and checks were re-audited after every rewritten push.
- The relevant gates pass on every affected PR, not just the top.
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
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.

