afc-resolve
Address LLM bot review comments on PR — fix valid issues, dismiss false positives
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Address LLM bot review comments on PR — fix valid issues, dismiss false positives
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Code and component analysis — analyze code, trace flows, audit consistency, inspect components
Architecture analysis and design review
Full auto pipeline — run spec-to-clean cycle automatically for new features
Save session state for later resumption
Resolve spec ambiguities with clarifying questions
Pipeline artifact cleanup and codebase hygiene
| name | afc:resolve |
| description | Address LLM bot review comments on PR — fix valid issues, dismiss false positives |
| argument-hint | <PR number or URL> |
| allowed-tools | ["Read","Grep","Glob","Bash","Edit","Write","AskUserQuestion"] |
| model | sonnet |
Collects LLM bot review comments from a PR, classifies as VALID/NOISE/DISCUSS, fixes VALID items, resolves addressed threads on GitHub, and outputs a summary report.
$ARGUMENTS — (required) Any format that identifies a PR (number, URL, cross-repo, etc.)!gh pr view $(echo "$ARGUMENTS" | grep -oE '[0-9]+' | head -1) --json url,title,headRefName,comments 2>/dev/null || echo "PR_FETCH_FAILED"
gh --version >/dev/null 2>&1 && gh auth status >/dev/null 2>&1
Fails → [afc:resolve] Error: gh CLI not installed or not authenticated. → abort.
Extract PR number from $ARGUMENTS by intent. If owner/repo info is included, use --repo flag. Otherwise derive via gh repo view --json owner,name.
If "PR Context" above shows PR_FETCH_FAILED, parse $ARGUMENTS manually and retry.
gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate
Also fetch review threads for resolve (Step 8). See graphql.md for the query.
Keep only comments from authors whose login ends with [bot]. Tag outdated comments as [OUTDATED].
0 bot comments → No LLM bot review comments found on PR #{number}. → exit.
git status --porcelain
Dirty → list files, ask user to confirm before proceeding.
Read each comment's target file (±10 lines context), then classify:
| Class | When | Action |
|---|---|---|
| VALID | Objectively verifiable bug, single fix approach, resolvable within existing code | Fix |
| NOISE | Style preference, intentional design, false positive, [OUTDATED] | Skip |
| DISCUSS | Requires judgment (new dependency, tradeoff, threshold, API change, etc.) | Ask |
Key: when in doubt, classify as DISCUSS. Be conservative with VALID.
MUST output before any code changes:
PR #{number}: {title}
Branch: {headRefName}
Bot comments: {total} ({bot_names})
VALID ({n}): 1. [{bot}] {file}:{line} — {summary}
NOISE ({n}): 1. [{bot}] {file}:{line} — {skip reason}
DISCUSS ({n}): 1. [{bot}] {file}:{line} — {question}
Each item → present comment, target code (5 lines), tradeoff → ask user:
For each VALID item:
Feedback loop: after all fixes, run project tests if available. If tests fail → diagnose and fix → rerun. Repeat until pass or user decides to stop.
See graphql.md for the mutation.
| Classification | Resolve? |
|---|---|
| VALID (fixed) | Yes |
| NOISE | Yes (user decided to skip) |
| DISCUSS-Apply | Yes |
| DISCUSS-Skip | Yes |
| DISCUSS-Defer | No (revisit later) |
| Already resolved | Skip |
GraphQL failure → warn, do not abort.
No fixes applied → skip to Step 12.
Show summary + resolved thread count → wait for user confirmation (NFR-003).
resolve LLM review comments on #{number}
- fix: {description} ({bot_name})
- skip: {reason} (NOISE, {count} items)
Do NOT push.
MUST always output, even if interrupted:
Resolve complete
├─ PR: #{number} — {title}
├─ Bot comments: {total} ({bot_names})
├─ VALID: {n} (applied)
├─ NOISE: {n} (skipped)
├─ DISCUSS: {n} (applied: {a}, skipped: {s}, deferred: {d})
├─ Tests: {pass}/{total} passed
├─ Threads resolved: {resolved}/{addressed}
├─ Commit: {hash} ({files} files, +{add}/-{del})
└─ Push: not pushed (run 'git push' when ready)
MUST reach Step 12 before returning control. If user sends unrelated request mid-flow → output partial report with [INTERRUPTED] → then address new request.
afc:review). No auto-push. Thread resolution needs repo scope.