Resolve pull request review comments with disciplined triage, scoped fixes, thread closure, and final validation.
From workflow-orchestrationnpx claudepluginhub mikecubed/agent-orchestration --plugin workflow-orchestrationThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Implements structured self-debugging workflow for AI agent failures: capture errors, diagnose patterns like loops or context overflow, apply contained recoveries, and generate introspection reports.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Use this skill when a developer wants to work through pull request or branch review feedback in a disciplined loop.
This skill is for review resolution, not first-pass implementation. It assumes there is already an active branch or review surface and a set of comments or threads to evaluate.
Persistent team, squad, or fleet-style long-lived orchestration is out of scope for this skill. Use a separate orchestration layer if persistent coordination is needed.
Activate when the developer asks for things like:
Before you start, identify:
Use separate roles for:
In Claude Code, spawn each role as a separate agent using the Agent tool. Pass the implementer the exact fix scope and constraints. Pass the reviewer the resulting diff and the review criteria.
Both roles may receive the discovery brief (see Workflow Step 1) as factual context — file lists, task boundaries, validation commands, and comparison baseline. Do not pass one role's conclusions or assessments to the other; the reviewer must form an independent judgment from the diff.
If the active runtime offers a higher-cost orchestration mode such as a Fleet command or Claude Code agent teams, use it only as an optional escalation path for large review batches.
Default to standard implementer and reviewer agents first. Before escalating, tell the developer why the larger team would help and ask whether they want the added token spend.
Escalate only when:
If team mode is approved, still keep one durable triage view and one final reviewer accountable for the integrated result.
Resolve the active model for each role using this priority chain:
Project config — look for the runtime-specific config file in the current project root:
.copilot/models.yaml.claude/models.yamlThese are plain YAML files (no markdown, no fenced blocks). Read the implementer, reviewer, and scout keys directly. If a key is absent, fall back to the baked-in default for that role — do not re-prompt for a key that is missing.
Session cache — if models were already confirmed earlier in this session, reuse them without asking again.
Baked-in defaults — if neither config file nor session cache exists, show the defaults below, ask the user to confirm or override them once, then cache the answer for the rest of the session.
The config files are plain YAML (not markdown). Create the file for the active runtime and set only the keys you want to override — absent keys fall back to the baked-in defaults. The keys for this skill are:
implementer: <model-name>
reviewer: <model-name>
scout: <model-name>
See docs/models-config-template.md in this plugin for ready-to-copy templates for both runtimes.
| Runtime | Role | Default model |
|---|---|---|
| Copilot CLI | Implementer | claude-opus-4.6 |
| Copilot CLI | Reviewer | gpt-5.4 |
| Copilot CLI | Scout | claude-haiku-4.5 |
| Claude Code | Implementer | claude-opus-4.6 |
| Claude Code | Reviewer | claude-opus-4.6 |
| Claude Code | Scout | claude-haiku-4.5 |
Every review item must be triaged into one of these outcomes:
Never churn the code just to satisfy a weak, stale, or incorrect comment.
For comments that become fixes:
Every review thread or platform-equivalent discussion item should end in one of these states:
Do not stop with code changes only.
Before making changes:
Do not act on comment text alone if the code has moved.
Before triaging, use the scout model (see Model Selection) to produce a short discovery brief covering:
Use the discovery brief template from docs/workflow-artifact-templates.md with Task shape: review-resolution-batch.
Skip condition: Skip discovery when the review batch is already narrow and fully scoped — a single comment on a single file, or a batch where every item was already triaged in a prior pass. When skipped, record the skip reason in the brief.
Pass the completed brief to the coordinator for triage and as factual context to implementers and reviewers in subsequent steps. Do not allow the brief to persist beyond the current review batch.
For each item, classify whether it is:
Then decide whether to fix, decline, or clarify first.
Process accepted items in this default priority order:
At this gate (after all review items are triaged), write .agent/SESSION.md. Record:
current-task: the overall PR review task descriptioncurrent-phase: "triage-complete"next-action: "begin fix batch 1"workspace: the active branch or PR referencelast-updated: current ISO-8601 datetime## Decisions: triage decisions (accepted, declined, clarify-first) per item## Files Touched: files read so far## Open Questions: items needing developer clarification## Blockers: active blockers (empty if none)## Failed Hypotheses: (empty — not applicable for this skill)If the write fails: log a warning and continue. Do not block triage completion.
If multiple accepted fixes are independent:
/workflow-orchestration:parallel-implementation-loop for each independent fix batch;If review items interact heavily, resolve them serially.
For every accepted fix:
After each fix:
When the reviewer finds substantive issues in a fix:
Allow at most 2 resend attempts per fix. If the fix still has unresolved substantive issues after the second resend:
Do not loop indefinitely. A fix that cannot converge in two rounds needs human judgment or a narrower scope.
If a fix attempt stalls — the implementer cannot make progress, the change grows beyond its original scope, or successive attempts do not move closer to resolving the review item:
Do not allow a single stalled fix to block the rest of the review batch. Move to the next independent fix and return to the stalled item after the developer provides guidance or approves the re-scoped change.
When the reviewer and implementer disagree on whether a comment should be fixed or declined:
Do not allow a fix-vs-decline disagreement to stall the rest of the batch. Move to the next independent item and return to the disputed comment after escalation or re-scoping resolves it.
After each fix or decline:
GitHub and Azure DevOps expose different thread status labels, but the workflow outcome should still map to the same three states above: fixed, declined, or intentionally left open.
Silent declines are not allowed.
After all relevant review items are handled:
/workflow-orchestration:final-pr-readiness-gate on the stable diff;docs/workflow-artifact-templates.md. The summary MUST capture decisions, validation outcome, and remaining concerns;docs/workflow-artifact-templates.md. The block MUST include at minimum: discovery-reuse, rescue-attempts, and re-review-loops.Use a durable summary shape so another reviewer or contributor can quickly see what was fixed, declined, or left open. For example:
Review surface: PR 128 against main
Reviewer source: Azure DevOps PR review
Decisions:
- comment-14 | correctness | fixed | Added a null-input guard and coverage for the empty payload path
- comment-19 | test | fixed | Strengthened the regression test to assert the exact status code
- comment-23 | stale | declined | Current diff already removed the old helper the comment referred to
Validation:
- npm test
- npm run validate:plugin
Result:
- pass
Remaining concerns:
- Waiting on reviewer confirmation for one clarify-first thread about ownership of normalization
Outcome measures:
discovery-reuse: yes
rescue-attempts: 0
re-review-loops:
comment-14: 0
comment-19: 1
comment-23: 0
Prefer the repository's canonical review-resolution artifact template when one exists.
Use short, concrete replies that make the outcome obvious, then apply the matching platform action. For example:
Fixed in 9ab12cd by tightening the null-path guard and adding coverage for the empty-input case.Declining this one because the current contract intentionally allows duplicate labels during draft creation. Keeping the existing behavior.I could address this either in the serializer or in the caller. Which boundary did you intend to own the normalization rule?A comment is not complete until:
A fix is not complete until:
At this gate (per fix batch, after the fix gate passes), write .agent/SESSION.md. Record:
current-task: the overall PR review task descriptioncurrent-phase: "fix-batch-[N]-complete" (substitute the batch number)next-action: "begin next fix batch or run post-fix validation"workspace: the active branch or PR referencelast-updated: current ISO-8601 datetime## Decisions: which items were fixed in this batch, which remain pending## Files Touched: files changed in this fix batch## Open Questions: any open questions from the fix review## Blockers: active blockers (empty if none)## Failed Hypotheses: (empty — not applicable for this skill)If the write fails: log a warning and continue. Do not block fix batch completion.
The batch is not complete until:
docs/workflow-artifact-templates.md;Before declaring the resolution loop done, confirm ALL of the following.
Per-thread gate
Post-fix gate
If any item is FAIL: list the unresolved thread IDs or failing validation output. Do not declare the loop done.
Before stopping for a disagreement or stall, always attempt rescue first: apply the bounded resend loop (Step 5), then the rescue policy, then disagreement resolution for fix-vs-decline conflicts. Only stop after those options are exhausted or the developer explicitly declines re-scoping.
When a stop condition is met, stop batching, restate the blocker, and continue only after the review surface is stable again.