resolve-pr-parallel
Resolve all PR comments using parallel processing, then extract reusable conventions
What this skill does
Resolve all PR comments using parallel processing, then extract lasting conventions from the review.
The active agent runtime should detect and understand the git context:
- Current branch detection
- Associated PR context
- All PR comments and review threads
- Can work with any PR by specifying the PR number, or ask it.
## Workflow
### 1. Analyze
Get all unresolved comments for PR
```bash
gh pr status
gh pr view PR_NUMBER --json reviewRequests,reviews,comments
gh api repos/{owner}/{repo}/pulls/PR_NUMBER/comments
```
### 2. Plan
Create a todo/progress tool list of all unresolved items grouped by type:
- **code_change** — specific code fix requested
- **pattern_change** — applies same fix across multiple files
- **architecture_feedback** — structural or design-level change
- **nit** — style or formatting preference
- **question** — reviewer asking for clarification (may need code comment or doc update)
### 3. Implement (PARALLEL)
Spawn a general-purpose agent for each unresolved item in parallel.
So if there are 3 comments, spawn 3 agents in parallel:
1. Launch subagent `general-purpose` with prompt (comment1)
2. Launch subagent `general-purpose` with prompt (comment2)
3. Launch subagent `general-purpose` with prompt (comment3)
Always run all in parallel subagents for each Todo item.
**For pattern_change comments:** the agent MUST list every affected file, apply to ALL locations, and grep/search to confirm no instances were missed. One commit for the entire pattern change.
### 4. Commit & Resolve
- Commit changes
- Push to remote
- Reply to resolved threads with a brief summary of changes made
Last, check `gh pr view PR_NUMBER --json comments` again to see if all comments are resolved. They should be, if not, repeat the process from 1.
### 5. Extract Conventions
After all comments are resolved, extract reusable conventions from the review. This is the most valuable long-term output — every review comment is a signal about how this codebase/team expects things done.
#### 5.1 Identify Conventions
For each resolved comment, determine if it reveals a reusable convention:
**Is a convention if:**
- Reviewer says "always do X" or "we do X this way"
- Reviewer corrects a naming pattern (implies the convention applies everywhere)
- Reviewer asks for a structural change that would apply to all similar code
- Reviewer flags a missing practice that should be standard
- The change is about consistency with existing code, not a one-off fix
- Reviewer references a team standard, style guide, or established pattern
**Is NOT a convention if:**
- One-off bug fix specific to this code
- Reviewer preference that contradicts established codebase patterns
- Factual correction (wrong variable name, typo)
- Removing dead code or fixing a mistake unique to this PR
#### 5.2 Write Each Convention as a Rule
````markdown
### [Convention Title]
**Source:** PR #[number], comment by @[reviewer] on [file]
**Added:** [date]
**Rule:** [Clear, specific instruction — not vague. Should be copy-pasteable into a spec.]
**Example (before):**
```[language]
[code before]
```
**Example (after):**
```[language]
[code after]
```
**Rationale:** [Why this convention exists]
````
#### 5.3 Write to Layer Files
Conventions accumulate in `docs/conventions/` — one file per layer, growing over time across PRs:
- `docs/conventions/frontend.md` — hooks, components, state, UI patterns, data fetching, forms, error handling
- `docs/conventions/backend.md` — routes, controllers, services, database, auth, middleware, API design, validation
- `docs/conventions/general.md` — project-wide: naming, DTO structure, git practices, testing strategy, file organisation
**If the layer file doesn't exist:** create it with category headings relevant to that layer.
**If it already exists — merge and dedupe:**
1. Read the existing file
2. For each new convention, check for semantic duplicates:
- Same rule about same pattern → **duplicate, skip**
- Same category but different rule → **not duplicate, add**
- Same rule but better example from new PR → **update existing entry**, add new PR as additional source
- Contradicts existing convention → **flag to user** with structured user-question tool
3. Append new conventions at the end of the correct category section
4. Preserve existing conventions exactly — don't rewrite or reorganise
**Dedupe heuristic:** Two conventions are duplicates if they would produce the same code change when applied to the same codebase. Compare by effect, not wording.
#### 5.4 Commit Convention Files
```bash
git add docs/conventions/
git commit -m "docs(conventions): extract [N] conventions from PR #[number]
Layers updated: [frontend, backend, general — whichever were touched]
New conventions: [count]
Updated conventions: [count]
Duplicates skipped: [count]"
```
Separate commit from code changes — conventions are documentation, not code fixes.
### 6. Report
```
## PR Review Comments Addressed
**PR #[number]:** [title]
**Comments addressed:** [N] of [M] actionable
**Comments skipped:** [list with reasons, if any]
## Conventions Extracted
**New conventions:** [count]
**Updated conventions:** [count]
**Duplicates skipped:** [count]
**Layer files updated:** [list]
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.