Contract
- Input: problem or task defined by the skill body.
- Output: Markdown artifact or structured result with completion criteria met.
- Side effects: none (design/review/documentation only unless explicitly stated).
- Dependencies: none (self-contained unless linked to other skills).
- Stop condition: all process steps completed; artifact saved; criteria checked.
- Risk: low.
- Boundary: produces reasoning or documentation artifacts; does not modify external systems unless explicitly instructed.
Do not merge, close, or delete branches here; this skill coordinates the loop only.
Review Fix Loop
Overview
Coordinate review, planning, and implementation without diluting any one skill's responsibility. The review remains the measurement instrument; this skill decides whether to plan fixes, implement them, repeat, or hand off to ship-subissue.
Use the canonical work-item metadata format in docs/agents/work-item-format.md as the source of truth for labels, milestone, and project metadata when preserving the loop state in comments or handoffs.
Keep the loop tight: if the same review-fix plan would be posted again without a new finding, stop rather than restating the same repair in different words.
Contract
- Input: one PR, one fixed point, and one spec source when needed.
- Output: either a clean review state or a blocked repair loop with a documented cause.
- Scope: repair review findings only; do not expand into unrelated refactors.
- Rule: re-enter the loop only when the latest plan is current and the next fix is still scoped.
- Rule: if the same blocker repeats, stop rather than churn.
Inputs
- PR number or current branch with an associated PR.
- Fixed point for review-pr, such as
main, a base branch, a commit SHA, or a tag.
- Spec source when review-pr cannot infer one.
If the fixed point is missing, ask for it before starting. If the PR is missing, identify it with gh pr view or stop.
Workflow
Run review-pr.
- Use the user-provided fixed point.
- Preserve the output exactly enough that plan-review-fixes can cite Standards and Spec separately.
Decide.
- If Standards and Spec both have no findings, stop the loop and tell the user the PR is ready for ship-subissue.
- If either axis has findings, continue.
- If the same blocking condition repeats for three consecutive loop passes, stop and report the blocker instead of looping indefinitely.
- If the latest review changes only wording but not substance, treat it as the same blocker.
- If a conflicted branch state was resolved, rerun review-pr on the cleaned branch before deciding whether to plan more fixes or hand off to ship-subissue.
Plan.
- Use plan-review-fixes to turn the review findings into a PR comment headed
## Review Fix Plan.
- Treat the PR comment as the durable handoff between review and implementation.
Implement.
- Use implement-review-fixes to apply the latest planned fixes.
- Require local validation or an explicit explanation of skipped validation before the next review pass.
- If the branch is conflicted, resolve that branch state first with
resolving-merge-conflicts, then return here and continue the review-fix plan.
Repeat.
- Run review-pr again against the same fixed point.
- Continue until clean or blocked.
- Do not widen scope during a repeat pass unless a new review finding makes it unavoidable.
Loop State
Track these facts in the working response or PR comments:
- PR number and branch.
- Fixed point.
- Review pass count.
- Whether the last plan was posted.
- Whether the last implementation completed.
- Validation commands and results.
- Any metadata that must stay aligned with the linked issue: labels, milestone, and project fields.
Exit Conditions
- Clean: review-pr reports no Standards findings and no Spec findings. Say that ship-subissue may proceed when the user wants merge/close/project updates or when a separate ship step will handle them.
- Blocked: missing PR, missing fixed point, stale or contradictory plan, failing validation without an obvious scoped fix, or the same findings recurring after three passes.
- User stop: user pauses or redirects the loop.
Completion criteria
- the latest review state is preserved accurately
- the next action is either a scoped fix, a re-review, or a stop
- validation evidence exists for the most recent implementation pass
- the loop does not attempt to merge or close the PR
- the loop does not continue past the repeat threshold for the same blocker
Guardrails
- Do not merge, close, or delete branches; ship-subissue owns that.
- Do not hide review findings by reclassifying them as planned work.
- Do not keep looping when the next action needs user judgement.
- Do not change the fixed point mid-loop unless the user explicitly changes it.
1---2name: review-fix-loop3description: Orchestrate the PR repair loop: run review-pr, use plan-review-fixes when findings exist, use implement-review-fixes to apply them, and repeat until the PR is clean or blocked. This skill coordinates the loop only.4---56## Contract78- **Input:** problem or task defined by the skill body.9- **Output:** Markdown artifact or structured result with completion criteria met.10- **Side effects:** none (design/review/documentation only unless explicitly stated).11- **Dependencies:** none (self-contained unless linked to other skills).12- **Stop condition:** all process steps completed; artifact saved; criteria checked.13- **Risk:** low.14- **Boundary:** produces reasoning or documentation artifacts; does not modify external systems unless explicitly instructed.151617Do not merge, close, or delete branches here; this skill coordinates the loop only.1819# Review Fix Loop2021## Overview2223Coordinate review, planning, and implementation without diluting any one skill's responsibility. The review remains the measurement instrument; this skill decides whether to plan fixes, implement them, repeat, or hand off to ship-subissue.24Use the canonical work-item metadata format in [`docs/agents/work-item-format.md`](../../../../docs/agents/work-item-format.md) as the source of truth for labels, milestone, and project metadata when preserving the loop state in comments or handoffs.25Keep the loop tight: if the same review-fix plan would be posted again without a new finding, stop rather than restating the same repair in different words.2627## Contract2829- Input: one PR, one fixed point, and one spec source when needed.30- Output: either a clean review state or a blocked repair loop with a documented cause.31- Scope: repair review findings only; do not expand into unrelated refactors.32- Rule: re-enter the loop only when the latest plan is current and the next fix is still scoped.33- Rule: if the same blocker repeats, stop rather than churn.3435## Inputs3637- PR number or current branch with an associated PR.38- Fixed point for review-pr, such as `main`, a base branch, a commit SHA, or a tag.39- Spec source when review-pr cannot infer one.4041If the fixed point is missing, ask for it before starting. If the PR is missing, identify it with `gh pr view` or stop.4243## Workflow44451. Run review-pr.46 - Use the user-provided fixed point.47 - Preserve the output exactly enough that plan-review-fixes can cite Standards and Spec separately.48492. Decide.50 - If Standards and Spec both have no findings, stop the loop and tell the user the PR is ready for ship-subissue.51 - If either axis has findings, continue.52 - If the same blocking condition repeats for three consecutive loop passes, stop and report the blocker instead of looping indefinitely.53 - If the latest review changes only wording but not substance, treat it as the same blocker.54 - If a conflicted branch state was resolved, rerun review-pr on the cleaned branch before deciding whether to plan more fixes or hand off to ship-subissue.55563. Plan.57 - Use plan-review-fixes to turn the review findings into a PR comment headed `## Review Fix Plan`.58 - Treat the PR comment as the durable handoff between review and implementation.59604. Implement.61 - Use implement-review-fixes to apply the latest planned fixes.62 - Require local validation or an explicit explanation of skipped validation before the next review pass.63 - If the branch is conflicted, resolve that branch state first with `resolving-merge-conflicts`, then return here and continue the review-fix plan.64655. Repeat.66 - Run review-pr again against the same fixed point.67 - Continue until clean or blocked.68 - Do not widen scope during a repeat pass unless a new review finding makes it unavoidable.6970## Loop State7172Track these facts in the working response or PR comments:7374- PR number and branch.75- Fixed point.76- Review pass count.77- Whether the last plan was posted.78- Whether the last implementation completed.79- Validation commands and results.80- Any metadata that must stay aligned with the linked issue: labels, milestone, and project fields.8182## Exit Conditions8384- **Clean:** review-pr reports no Standards findings and no Spec findings. Say that ship-subissue may proceed when the user wants merge/close/project updates or when a separate ship step will handle them.85- **Blocked:** missing PR, missing fixed point, stale or contradictory plan, failing validation without an obvious scoped fix, or the same findings recurring after three passes.86- **User stop:** user pauses or redirects the loop.8788## Completion criteria8990- the latest review state is preserved accurately91- the next action is either a scoped fix, a re-review, or a stop92- validation evidence exists for the most recent implementation pass93- the loop does not attempt to merge or close the PR94- the loop does not continue past the repeat threshold for the same blocker9596## Guardrails9798- Do not merge, close, or delete branches; ship-subissue owns that.99- Do not hide review findings by reclassifying them as planned work.100- Do not keep looping when the next action needs user judgement.101- Do not change the fixed point mid-loop unless the user explicitly changes it.