Address PR review comments by spawning domain-specific implementation agents in parallel. Reads from ~/.agentic-workflow/<repo-slug>/reviews/<pr>.json as source of truth, merges any new human GitHub comments, implements fixes, and updates the state file. Can be re-run to continue the review loop.
Recursos
2Instal·la
npx skillscat add jthorare/agentic-workflow/addressreview Instal·la des del registre de SkillsCat.
Before anything else: read $HOME/.agentic-workflow/toolkit/skills/_preamble.md and follow it (skill index, provider capability map, bootstrap check, session context). Run its Session Close section when this skill finishes.
Address PR Review
Implements fixes for outstanding review issues. The local state file is the source of truth — run this as many times as needed until all issues are resolved.
Step 1: Resolve the PR
If an argument was provided, use it directly:
gh pr view <argument> --json number,title,headRefName,baseRefName,url,headRepositoryIf no argument, auto-detect from the current branch:
gh pr list --head $(git branch --show-current) --json number,title,urlIf multiple PRs are found, Ask the user to pick one.
If no PRs are found: "No open PR found for the current branch. Use /addressReview <number> to specify one."
Step 2: Load State File
Read ~/.agentic-workflow/<repo-slug>/reviews/{number}.json.
If the file does not exist:
"No local review state found for PR #{number}. Run
/reviewfirst."
Step 3: Fetch New Human Comments from GitHub
Fetch all GitHub comments created after the human_comments_fetched_at cursor in the state file (fall back to reviewed_at only if the cursor is unset — reviewed_at never advances):
# Top-level issue comments
gh api repos/{owner}/{repo}/issues/{number}/comments \
--jq '[.[] | select(.created_at > "{human_comments_fetched_at}") | {id, body, user: .user.login, created_at, path: null, diff_position: null, source: "human"}]'
# Inline PR review comments
gh api repos/{owner}/{repo}/pulls/{number}/comments \
--jq '[.[] | select(.created_at > "{human_comments_fetched_at}") | {id, body, user: .user.login, created_at, path, position, source: "human"}]'Filter out comments posted by bots or CI systems (check user.login for [bot] suffix or known CI usernames).
Append any new comments to a human_comments array in the state file, then advance the cursor: set human_comments_fetched_at to now — this prevents re-triaging the same comments on every loop iteration.
Step 4: Build the Issue List
Collect all unaddressed items:
From state file (addressed: false):
- All issues across all
reviewers[].issuesentries
From new human comments (all — humans comment when something needs attention):
- Each comment becomes a candidate issue for triage
Filter by severity (for structured issues):
- Default:
blockingandissueonly - Pass
--allto includesuggestionandnit./specToProvenPRfixes only blocking findings (everyissue, plus anything that loses data, breaks a real path or makes a relied-on doc false, whatever its label) and resolves the rest in writing; see its "Blocking or not" section
Report to the user:
PR #{number}: "{title}"
Outstanding items:
X blocking (structured)
Y issue (structured)
Z new human comments
(W suggestions/nits excluded — pass --all to include)
Already addressed: N itemsIf everything is already addressed, stop:
"All review items have been addressed. Consider running /postReview if you haven't published yet."
Step 5: Triage for Implementation
Spawn a subagent (general-purpose) with the triage prompt from address-triage-prompt.md.
Inject:
{structured_issues}— JSON array of unaddressed structured issues{human_comments}— JSON array of new human comments{diff}— output ofgh pr diff {number}{file_list}— changed file paths
Parse the returned JSON array of implementation assignments.
Step 6: Checkout and Spawn Parallel Implementers
Check out the PR branch:
gh pr checkout {number}Then Dispatch in parallel all implementation agents at once (per _shared/parallel-dispatch.md). Each receives the prompt from implementer-prompt.md with:
{agent},{focus},{issues}— from triage output{number},{owner},{repo},{branch}— PR coordinates{repo_slug}— repo slug derived in the preamble
Step 6.5: Re-verify Before Marking Addressed
Self-reported fixes are not proof. After all implementers complete:
SHARED_DIR="$HOME/.agentic-workflow/toolkit/skills/_shared"
source "$SHARED_DIR/repo-slug.sh"- Tests — detect the runner per
$SHARED_DIR/test-runner-detection.md(read it) and run the detectedTEST_CMD. - User-facing fixes (routes, UI components, styles) — Invoke skill
verify-appwith args--yesand a journey covering each changed flow; require a non-FAIL verdict. - Push once —
git push origin {branch}, only after 1–2 pass (implementers never push; one serialized push avoids parallel-push races). If tests fail or verify-app returns FAIL, the affected issues stayaddressed: false— never mark an issue addressed without passing verification.
Step 7: Update State File
After Step 6.5, update ~/.agentic-workflow/<repo-slug>/reviews/{number}.json:
For each result with status fixed or answered (the only statuses — there is no defer status), when covered by passing verification:
- Set
"addressed": true - Set
"addressed_at"to current ISO timestamp - Set
"addressed_by"to the agent name - Set
"fix_commit"to the commit SHA the agent reported
For each unresolved entry an implementer returned: keep "addressed": false and record the reason under "unresolved_reason".
For new human comments that were addressed, add them to the state file under human_comments with the same fields.
Update "last_addressed_at" at the top level.
Edit the file in place.
Step 8: Report
Address complete for PR #{number}: "{title}"
Implemented:
• security-engineer — 2 issues fixed (commit abc1234)
• typescript-pro — 1 issue fixed (commit def5678)
WARNING — unresolved items remain (addressed: false):
[blocking] src/auth.ts — JWT not verified (reason: requires refactor beyond flagged scope)
These are NOT deferred to a follow-up. Re-run /addressReview or fix manually before shipping.
Run /addressReview again to continue, or /postReview to publish.Next steps
/review— verify fixes don't introduce new issues/shipRelease— if all blockers resolved, ship the changes