---
name: review-remediation
description: Remediate a frozen set of pull-request feedback with evidence-backed dispositions and minimum durable fixes.
title: review-remediation
canonical_url: https://skilld.dev/gh/khoahyh/skills/review-remediation
last_updated: 2026-11-13T21:12:31.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install khoahyh/skills/review-remediation`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/review-remediation`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/khoahyh/skills/review-remediation) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/review-remediation`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/review-remediation --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/review-remediation --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Review Remediation

Consume one frozen set of existing PR feedback, establish the truth of every finding, and remediate confirmed problems. Reviewer identity and delivery surface are metadata; human comments, bot findings, security alerts, review bodies, threads, issue comments, checks, and annotations follow the same workflow.

## Boundaries

- Address only the selected existing feedback. Later feedback belongs to another run; do not request, trigger, or wait for a new review.
- A remediation request includes investigation, fixes, and verification. Follow `ground-rules` for authority; resolve commit, push, and publication grants from the task/repository. Replies and thread resolution on selected items need a standing or task grant in local/private instructions or the work item; other provider state changes retain their separate authority. Carry same-task grants through the repair instead of asking again.
- Continue authorized fixes through verification and repair of attributable failures. Keep blocked items visible while completing independent work.

Inputs may identify a PR, exact review/comment/check/thread/run IDs or URLs, a reviewer, an expected SHA or time window, or a fixed set supplied by a supervising loop. Detect the PR from the current branch only when it is omitted.

## Freeze The Feedback Set

Identify the PR, provider, branch, and head SHA. Collect concrete claims, questions, and requested changes from every provider surface relevant to the selector.

Selection rules:

- When exact IDs or URLs are supplied, use only those objects and their directly attached findings.
- Apply every supplied reviewer, revision, and time constraint together.
- When only a reviewer is supplied, use that reviewer's currently open feedback.
- When no selector is supplied, use all currently open feedback on the PR, regardless of author or delivery surface.
- Exclude progress notices, eligibility notices, duplicate summaries, and other artifacts without a concrete claim, question, or requested change.

Before editing, record each item's stable ID or URL, author, surface, body, and reviewed SHA or observed timestamp. Do not guess ambiguous attribution: mark separable ambiguous items blocked and continue; ask only when ambiguity prevents freezing the set.

## Establish Each Finding

Compare each claim with the PR goal and current code; reproduce claimed behavior when useful. Treat diagnoses and suggested patches as hypotheses, not product policy.

Separate a concrete implementation defect from a proposed business rule. Before adopting a restriction, check explicit user intent and owning product requirements, starting with the closest existing context and following relevant linked business references only as needed. Bound lookup to the finding and existing authorized access. Honor explicit decisions; surface unresolved consequential product ambiguity as blocked rather than silently choosing policy or expanding into speculative future algorithm work.

Classify every item:

- **Confirmed**: evidence shows a behavior, correctness, security, or maintainability gap requiring a fix.
- **Already addressed**: the current head no longer has the reported gap.
- **Question or informational**: requires an answer or acknowledgement, not code.
- **Rejected with evidence**: the claim does not apply, conflicts with requirements, or would make the system worse.
- **Blocked**: remediation needs product intent, credentials, infrastructure, or another user decision.

Use repository code, tests, requirements, and runtime evidence directly when they settle the claim. Consult current, version-matched primary sources when correctness hinges on external library, platform, protocol, or security behavior, or when direct evidence remains uncertain. Reviewer links are leads, not proof; external guidance does not override repository requirements or the installed version.

## Apply Minimum Durable Remediation

For each confirmed item, make the smallest semantic change that fixes the root cause:

- Put the invariant at the boundary that owns it rather than compensating at a caller or symptom site.
- Use documented public APIs and the repository's established architecture.
- Preserve unrelated behavior and avoid opportunistic refactors.
- Reuse or extend proof at the strongest practical existing boundary. Add a regression test only for a credible behavior gap existing coverage would miss; use `test-audit`'s authoring bar when installed or supplied by the repository, otherwise follow the owning test contract and checks.
- Cover only evidenced boundary, failure, concurrency, and security cases; prefer deleting a faulty path over adding parallel machinery.

Leave an item blocked rather than landing an unsupported workaround.

## Verify And Close

Run each focused reproduction or regression test, then only the broader format, lint, typecheck, test, build, or security checks warranted by the change's risk and repository conventions. Inspect the final diff against the PR goal and frozen set.

When provider access is available, re-fetch selected items by stable ID before closing. Each response gives the disposition and evidence: the root-cause fix and verification, conflicting evidence for a rejection, a direct answer, or the blocker and what would resolve it.

When a grant covers it, send replies through the provider's native thread and update addressed/resolved state. Otherwise prepare the exact responses inline and finish all authorized local work.

Done when every frozen item is accounted for, all risk-matched verification passes or has a reported blocker, and authorized replies or prepared responses are complete. Report the PR and head SHA, item count and dispositions, fixes, external sources used where applicable, verification, external actions, and unresolved items.
