[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76RX65E76K05RXEYZX0QWRG":3,"skill-same:01M76RX65E76K05RXEYZX0QWRG":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":43},"01M76RX65E76K05RXEYZX0QWRG","swarm-pr-review",null,"Run a graph-guided, tool-augmented Swarm PR review using context packing, parallel exploration, triggered plugin micro-lanes, independent reviewer validation, critic challenge, and metrics writeback. Use for deep pull request review with low false-positive tolerance and high recall.","AlexanderNarbaev\u002Fagi","AlexanderNarbaev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F33544956?v=4","01M755ZKB1JJ26ZBNZSDJ4C0TV","01M755ZKBX072HZMHVQBWK7MK7",1,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fswarm-pr-review\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: swarm-pr-review\ndescription: Run a graph-guided, tool-augmented Swarm PR review using context packing, parallel exploration, triggered plugin micro-lanes, independent reviewer validation, critic challenge, and metrics writeback. Use for deep pull request review with low false-positive tolerance and high recall.\ndisable-model-invocation: true\n---\n\n# \u002Fswarm-pr-review\n\nRun a structured, high-confidence PR review that maximizes valid findings without flooding the user with unvalidated noise.\n\nThe review ladder is:\n\n**Scope → obligations → context pack → deterministic signals → parallel explorers → triggered Swarm micro-lanes → independent reviewer validation → critic challenge → grouped synthesis → metrics \u002F knowledge writeback.**\n\n## Handoff To PR Feedback\n\nUse `..\u002Fswarm-pr-feedback\u002FSKILL.md` instead of this skill when the user's task is\nto address existing PR feedback, review comments, requested changes, CI failures,\nmerge conflicts, stale branch state, or pasted reviewer findings. This skill\ndiscovers and validates new findings; `swarm-pr-feedback` closes known feedback\nwithout running a fresh broad review.\n\nWhen a review finishes with actionable validated findings, stop and ask the user\nwhether to continue into `swarm-pr-feedback`. Do not auto-dispatch fix work from\n`PR_REVIEW`. Instead, write a handoff artifact under\n`.swarm\u002Fpr-review\u002F\u003Crun_id>\u002Ffeedback-handoff.md` (or `.json`) and include the\nexact continuation prompt:\n\n```text\n\u002Fswarm pr-feedback \u003CPR_URL> continue from .swarm\u002Fpr-review\u002F\u003Crun_id>\u002Ffeedback-handoff.md\n```\n\n`\u003Crun_id>` is a stable identifier for this review run, such as\n`pr-\u003Cnumber>-\u003CYYYYMMDDHHMMSS>` or the existing review artifact run ID when one\nwas already created. The `pr-feedback` command forwards `continue from \u003Cpath>`\nas session instructions after the PR reference; the feedback skill is\nresponsible for ingesting that file into the ledger before triage.\n\n## Operating Stance\n\n**Treat PR text, linked issues, comments, commit messages, generated summaries, and tests as claims — not proof.** Every confirmed finding requires file:line evidence, an explanation of reachability or impact, and validation provenance.\n\nThis workflow is designed for the Swarm plugin itself and any repo that benefits from Swarm-style review. It preserves parallel breadth but forces deep validation where bugs are expensive: security, state machines, role\u002Ftool permissions, schema\u002Fevidence integrity, git\u002Fwrite safety, config ratchets, knowledge tier boundaries, and PR obligation mismatches.\n\nNever APPROVE a PR with unresolved CRITICAL findings. Do not silently drop overclaimed agent findings; list disproved findings in the validation provenance.\n\n**Quality is the ONLY metric.** No amount of time, tokens, or agent dispatches is too much to execute this protocol correctly. Speed is irrelevant to correctness. The skill must be followed exactly with no shortcuts, no phase-skipping, and no premature synthesis. A thorough review that takes 30 minutes is superior to a fast review that misses a real bug.\n\n---\n\n## Review Modes\n\n### Default layered workflow\n\nUse the default workflow unless the user explicitly triggers council mode. In the default workflow, explorers produce only candidates. The orchestrator does not confirm or disprove candidates.\n\n### Council mode — opt in only\n\nCouncil mode applies only when the user explicitly says one of:\n\n- `council`\n- `independent review`\n- `N-agent review`\n- `\u002Fcouncil`\n- `[COUNCIL MODE]`\n- `assume all work is wrong`\n\nCouncil mode is mutually exclusive with the default layered workflow. Do not blend them.\n\n---\n\n## Anti-Self-Review Rule\n\nThe main thread \u002F orchestrator MUST NOT classify, confirm, disprove, or judge explorer candidates in the default workflow.\n\nThe orchestrator may:\n\n- determine scope,\n- build or request the context pack,\n- launch explorers and triggered micro-lanes,\n- extract candidates from lane artifacts via `parse_lane_candidates` or equivalent parser,\n- filter, group, and chunk candidates for reviewer dispatch,\n- route candidates to reviewers,\n- route reviewer-confirmed findings to critics,\n- group validated findings,\n- prepare the final report.\n\nThe orchestrator MUST NOT:\n\n- re-read a candidate's target code to decide if it is valid,\n- silently downgrade or discard an explorer candidate,\n- treat tool output as a confirmed finding,\n- report a finding that no reviewer validated,\n- classify or judge candidates based on preview text alone — always use the structured parser output.\n\nIf the orchestrator catches itself validating code, it must stop and delegate validation to a reviewer subagent.\n\nException: in explicit Council mode only, the main thread may act as the independent reviewer as described in the Council Mode section. Prefer a reviewer subagent when available.\n\n---\n\n## Scope Detection\n\nDetermine review scope using this priority:\n\n1. explicit user-provided PR URL, PR number, commit, branch, or file scope,\n2. current feature branch diff vs `origin\u002Fmain`, `main`, `origin\u002Fmaster`, or `master`,\n3. staged changes,\n4. latest commit,\n5. user-specified files or directories.\n\nRecord:\n\n- base ref,\n- head ref,\n- commit range,\n- changed files,\n- deleted files,\n- generated files,\n- lockfiles,\n- test files,\n- docs\u002Fconfig\u002Fschema files,\n- whether the working tree is dirty.\n\nIf scope cannot be determined, review the narrowest safe scope available and state the limitation.\n\n### Pre-flight git ref availability\n\nBefore launching explorers (Phase 3), confirm the PR branch refs are available:\n- If `head_ref` is a remote branch that is not checked out locally, fetch it via `git fetch origin \u003Chead_ref>`\n- **Check out the head branch locally.** Explorer agents read files from the working tree, not from git history — passing the commit range in the delegation prompt is not sufficient because `Read` \u002F `Glob` \u002F `Grep` tools operate on the filesystem. Without a checkout, explorers silently read the base branch's version of changed files and produce invalid candidates. **Before checking out, verify the working tree is clean (`git status --porcelain`). If uncommitted changes exist, stash them or abort the checkout to prevent data loss.**\n- Explicitly pass the commit range (`base_ref..head_ref`) in every explorer delegation so explorers have the revision context for `git show` commands if they need to inspect specific versions.\n\nIf refs cannot be fetched or checked out, state the limitation in the context pack.\n\n## Phase 0A: Existing PR Signal Ingestion\n\nWhen reviewing a PR, ingest and triage every existing signal BEFORE starting\nPhase 0. These are candidate generators and obligation sources, not\npre-confirmed findings.\n\n### PR title and body compliance check\n\nBefore deeper analysis, verify the PR meets the commit-pr skill's publication contract (the CI `pr-standards` check enforces the same requirements server-side — this step surfaces issues earlier):\n\n- **Title format:** `\u003Ctype>(\u003Cscope>): \u003Cdescription>` — lowercase description, no trailing period, allowed types: `feat`, `fix`, `perf`, `revert`, `docs`, `chore`, `refactor`, `test`, `ci`, `build`.\n- **Body contract:** `Closes #\u003Cissue-number>` as the first line (when the PR resolves an issue), followed by `## Summary`, `## Invariant audit` (all 12 invariants), and `## Test plan` sections.\n\n**`Closes #N` claim integrity (apply the COVERAGE GATE):** if the PR body claims `Closes #\u003Cissue-number>`, verify (a) the issue is currently open (`gh issue view \u003CN> --json state`), and (b) the diff addresses the issue's acceptance criteria (read the issue, map each criterion to changed files\u002Fsymbols, and inspect the diff for those areas). If the issue is already closed by another merged PR, do NOT re-close it — the duplicate `Closes #N` reference is misleading and will confuse release-please aggregation. If the issue is open but the diff does not address the acceptance criteria, mark the claim as `UNVERIFIED — claim integrity` in the validation provenance and report INCOMPLETE to the user.\n\nNon-compliance is a ledger item (advisory, not blocking — CI will catch it). If the PR is from an external contributor, note the compliance gap for the maintainer to address before merge.\n\nThis intake includes:\n\n- review comments, review summaries, requested changes, and bot findings,\n- CI\u002Fcheck failures, annotations, and relevant logs,\n- mergeability\u002Fconflicts, `mergeStateStatus`, and stale\u002Fbase-drift state,\n- PR body claims, linked issues, acceptance criteria, and test-plan claims,\n- commit messages and app\u002Fbot commits on the PR branch.\n\nWhen thread resolution state matters, prefer GraphQL review-thread inspection.\nIf GraphQL is unavailable, keep the signal and mark\n`resolution_state: UNKNOWN`; do not drop it from scope.\n\n### Step 1 — Fetch all PR feedback surfaces\n\n```bash\n# Issue comments (general PR thread)\ngh pr view \u003CPR_NUMBER> --json comments\n\n# Review comments (inline code comments)\ngh api repos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR_NUMBER}\u002Fcomments\n\n# Review summaries (approve\u002Frequest-changes\u002Fcomment events)\ngh pr view \u003CPR_NUMBER> --json reviews\n\n# Bot\u002Fautomated reviews (Copilot, Codex, CodeRabbit, etc.)\n# Inline review comments — use REST API for reliable bot detection via user.type\ngh api repos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR_NUMBER}\u002Fcomments --jq '.[] | select((.user.type \u002F\u002F \"\") == \"Bot\" or (.user.login \u002F\u002F \"\" | test(\"bot|copilot|coderabbit|codex\"; \"i\")))'\n```\n\nFor general PR comments (not inline), use the issue comments endpoint:\n```bash\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues\u002F{PR_NUMBER}\u002Fcomments --jq '.[] | select((.user.type \u002F\u002F \"\") == \"Bot\" or (.user.login \u002F\u002F \"\" | test(\"bot|copilot|coderabbit|codex\"; \"i\")))'\n```\n\n### Step 2 — Classify each comment\n\n| Category | Action |\n|----------|--------|\n| **Human review with file:line evidence** | Add as candidate finding with `source: existing-review` — still needs reviewer validation |\n| **Bot\u002Fautomated finding with specific code reference** | Add as candidate finding with `source: bot-review` — high false-positive rate, treat as unverified |\n| **General feedback \u002F style preference** | Add as advisory obligation |\n| **Resolved\u002Foutdated comment** | Skip — note in report under \"Ingested Resolved Comments\" |\n| **Requested changes not yet addressed** | Add as HIGH-priority obligation |\n\n### Step 3 — Merge into review pipeline\n\nAll ingested comments become candidate findings or obligations. They follow the\nsame Phase 3-8 pipeline as freshly discovered findings. Ingested findings are\nNOT pre-confirmed — they still require independent reviewer validation per the\nAnti-Self-Review Rule.\n\n**Comment-ledger output:**\n```\n[INGESTED] | source | category | file:line (if applicable) | original_author | status: PENDING_VALIDATION \u002F SKIPPED_OUTDATED \u002F ADVISORY\n```\n\n### Anti-patterns\n- ✗ Ignoring bot reviews because \"bots produce false positives\" — they also catch real issues\n- ✗ Pre-confirming human review comments without independent validation — even senior reviewers make mistakes\n- ✗ Skipping inline review comments and only reading the summary — inline comments contain the evidence\n\n## Phase 0B: Mergeability and Branch-State Intake\n\nBefore investing effort in review lanes, verify the PR is mergeable and record\nbranch-state signals. `PR_REVIEW` remains read-only: do not resolve conflicts,\ncommit, push, rebase, merge, or reset from this mode. Instead, carry current\nmergeability, stale-head, and branch-drift facts into the review ledger and the\nfeedback handoff artifact.\n\n### Step 1 — Check merge state\n\n```bash\ngh pr view \u003CPR_NUMBER> --json mergeable,mergeStateStatus\n```\n\nThe response has two independent fields. Handle each:\n\n**`mergeable` field** — whether GitHub can compute mergeability:\n| Value | Meaning | Action |\n|-------|---------|--------|\n| `MERGEABLE` | No conflicts detected | Proceed — check `mergeStateStatus` below |\n| `CONFLICTING` | Merge conflicts exist | Record the blocker, keep the review read-only, and hand conflict resolution to `swarm-pr-feedback` |\n| `UNKNOWN` | GitHub still computing | Wait 30s, re-check |\n\n**`mergeStateStatus` field** — overall branch state:\n| Value | Action |\n|-------|--------|\n| `CLEAN` | All checks pass, no conflicts — proceed to Phase 0 |\n| `BEHIND` | Branch behind base — note in report; non-blocking if merge queue handles it |\n| `DIRTY` | Merge conflicts exist — keep reviewing, but record the conflict as a first-class blocker in the ledger and handoff artifact |\n| `BLOCKED` | External blocker (branch protection, failing required check) — investigate and record the blocker |\n\n### Step 2 — Record conflicts and blockers (when CONFLICTING or DIRTY)\n\nWhen the PR has merge conflicts:\n\n1. **Determine the PR's base branch and verify the state:**\n   ```bash\n   BASE_REF=$(gh pr view \u003CPR_NUMBER> --json baseRefName --jq '.baseRefName')\n   git fetch origin $BASE_REF\n   gh pr view \u003CPR_NUMBER> --json mergeable,mergeStateStatus,baseRefName,headRefName\n   ```\n\n2. **Capture the affected scope without changing the branch:**\n   - List the files or subsystems implicated by the conflict if GitHub exposes them,\n     or note that the exact conflict set is still unknown.\n   - Identify whether the conflict appears mechanical (lockfile \u002F generated output \u002F\n     simple overlap) or semantic (logic changed on both sides). This is triage\n     signal for the follow-on feedback run, not permission to resolve it here.\n\n3. **Record explicit next action for the handoff artifact:**\n   - `CONFLICT-### | mechanical | likely resolvable during pr-feedback`\n   - `CONFLICT-### | semantic | requires focused fix + validation during pr-feedback`\n   - `STALE-### | behind base by policy` when the branch is only stale, not conflicted\n\n4. **Document in report:** List the branch-state facts, why they matter to the\n   review, and what `swarm-pr-feedback` must verify before it edits code.\n\n### Conflict resolution anti-patterns\n- ✗ Accepting \"ours\" or \"theirs\" for all conflicts without reading them\n- ✗ Resolving semantic conflicts without understanding both sides\n- ✗ Pushing resolution without running tests on the merged result\n- ✗ Treating `PR_REVIEW` as the place to fix branch state — this mode stays read-only\n\n## Phase 0B-bis: Pre-Handoff Parallel Work Snapshot\n\nWhen the review surfaces findings that will likely need `swarm-pr-feedback`,\nre-check for **parallel work** since the last fetch. The PR author, the bot\nreviewer, or another swarm may have pushed commits while you were reviewing.\nThis is still read-only: capture the remote state so the handoff artifact starts\nfrom the right branch facts.\n\n### Step 1 — Refetch and compare\n\n```bash\ngit fetch origin \u003Cpr-branch>\ngit log HEAD..origin\u002F\u003Cpr-branch> --oneline\n```\n\n### Step 2 — Evaluate new commits\n\nFor each new commit on the remote:\n\n1. **Read the commit message and diff.** Use `git show \u003Ccommit> --stat` to see\n   file scope, then `git show \u003Ccommit> -- \u003Cfile>` to see the actual changes.\n2. **Compare against the pending handoff scope:**\n   - Does the remote commit touch the same files as the validated findings?\n   - Does the remote commit appear to already address a finding you planned to\n     hand off?\n   - Does the remote commit introduce a new branch-state fact the handoff should\n     mention?\n3. **Default stance: prefer the remote state as the next baseline.** Run\n   the [`parallel-work-check`](..\u002Fgenerated\u002Fparallel-work-check\u002FSKILL.md)\n   protocol for the formal decision template and record the outcome in the\n   handoff artifact.\n\n### Step 3 — Three outcomes\n\n- **Parallel work supersedes:** Mark the older local checkout as stale in the\n  handoff artifact and tell `swarm-pr-feedback` to re-check out the current\n  remote head before editing.\n- **Parallel work complements:** Carry both the validated findings and the new\n  remote commits into the handoff artifact so `swarm-pr-feedback` can verify the\n  combined state before patching.\n- **Parallel work unrelated:** Note that the remote moved, but keep the same\n  validated finding set.\n\n### Anti-patterns\n\n- ✗ Pushing your fix without checking if the remote already fixed it — causes\n  duplicate work and may even fail the push if the commits conflict\n- ✗ Force-pushing over parallel work because \"I started this first\" — the\n  parallel agent may have access to context you don't (different swarm\n  configuration, different model, different time budget)\n- ✗ Blindly taking remote work without verifying it's actually better — the\n  parallel work may be incomplete or take a different approach that doesn't\n  match the original finding's intent\n\n### Example: parallel swarm superseded local fix work\n\n```\nPARALLEL WORK CHECK (pre-fix):\n- Branch: copilot\u002Ffix-legacy-hive-data-migration\n- Local HEAD: 3c04997c fix: resolve PR #1238 review findings\n- Remote HEAD: 79d7ec64 fix(knowledge-migrator): harden legacy migration loop\n- Diverged: yes (remote is 2 commits ahead with more comprehensive fix)\n- New commits on remote: 2\n- Parallel swarm work detected: yes (different author)\n- Decision: abandon-use-remote\n- Rationale: Remote added 17 unit tests + try\u002Fcatch error handling that\n  surpassed my planned batch-rewrite. Verified by re-running the test suite:\n  remote has 25\u002F25 passing, my local plan would have produced 9\u002F9.\n```\n\n---\n\n# Default Review Workflow\n\n## Phase 0: Context Pack and Review Signal Collection\n\nBefore launching explorers, build a compact `swarm-pr-review-context` in scratch or as a local artifact if file writes are allowed.\n\nThe context pack must include, when available:\n\n```json\n{\n  \"scope\": {\n    \"base_ref\": \"...\",\n    \"head_ref\": \"...\",\n    \"commit_range\": \"...\",\n    \"changed_files\": [],\n    \"changed_hunks\": [],\n    \"public_api_changes\": [],\n    \"deleted_or_renamed_files\": [],\n    \"generated_files\": []\n  },\n  \"pr_metadata\": {\n    \"title\": \"...\",\n    \"body_claims\": [],\n    \"checkboxes\": [],\n    \"linked_issues\": [],\n    \"review_comments\": [],\n    \"commit_messages\": []\n  },\n  \"obligations\": [],\n  \"repo_graph\": {\n    \"source\": \".swarm\u002Frepo-graph.json or fallback search\",\n    \"changed_symbols\": [],\n    \"callers\": [],\n    \"callees\": [],\n    \"imports\": [],\n    \"exports\": [],\n    \"sibling_implementations\": []\n  },\n  \"deterministic_signals\": {\n    \"ci\": [],\n    \"tests\": [],\n    \"coverage_delta\": [],\n    \"lint_typecheck_build\": [],\n    \"security_scanners\": [],\n    \"dependency_audit\": [],\n    \"secrets_scan\": [],\n    \"mutation_testing\": []\n  },\n  \"swarm_artifacts\": {\n    \"evidence_bundles\": [],\n    \"knowledge_hits\": [],\n    \"phase_state\": [],\n    \"metrics\": []\n  },\n  \"risk_triggers\": []\n}\n```\n\n### Context pack rules\n\n- Diff-only review is allowed for quick orientation, but not enough to confirm nontrivial findings.\n- For every changed production file, identify at least one caller, consumer, import path, route entrypoint, or reason none exists.\n- If `.swarm\u002Frepo-graph.json` exists, use it to seed impact cones.\n- If no repo graph exists, build a shallow impact cone using imports, exports, symbol search, route registration, CLI registration, or test references.\n- Pull in relevant `.swarm\u002Fevidence\u002F`, `.swarm\u002Fstate`, `.swarm\u002Fknowledge`, or hive\u002Fproject knowledge entries when present.\n- Historical knowledge may guide candidate generation but cannot confirm a finding by itself.\n- Mark stale, quarantined, or cross-project knowledge as advisory until independently verified in this repo.\n\n---\n\n## Phase 1: Intent Reconstruction \u002F Obligation Extraction\n\nReconstruct what the PR is obligated to deliver before looking for bugs.\n\nUse deterministic precedence, highest to lowest:\n\n1. PR checkboxes and acceptance criteria,\n2. linked issues \u002F tickets,\n3. explicit user request in the current conversation,\n4. commit scopes and commit messages,\n5. test names and test assertions,\n6. interface diff \u002F exported API changes,\n7. changelog, README, migration, or docs edits,\n8. LLM synthesis only when no higher-precedence source exists.\n\nOutput an obligation list:\n\n```text\nO-001 | source | claim | affected files\u002Fsymbols | status: UNVERIFIED | evidence refs: []\n```\n\nFor each obligation, record:\n\n- source,\n- exact claim,\n- affected files or symbols,\n- verification status: `UNVERIFIED → IN_PROGRESS → MET \u002F PARTIALLY_MET \u002F NOT_MET \u002F UNVERIFIABLE`,\n- linked finding ID when unmet,\n- reason if unverifiable.\n\nTests are claims. A passing or added test does not prove the obligation unless the reviewer inspects the assertion strength and relevant code path.\n\n### Quantitative claim verification\n\nPR body numerical claims (test counts, coverage percentages, assertion counts, performance benchmarks) are obligations, not proof. For each quantitative claim:\n\n1. Extract the claim and its source (PR body, comment, commit message).\n2. Verify against actual tool output or CI artifacts when available.\n3. If the claim cannot be independently verified, mark the obligation `UNVERIFIABLE` with reason.\n4. If the claim is disproved by evidence, create a finding linking the discrepancy.\n\nCommon patterns to verify:\n- \"N tests pass\" → count actual test results from CI logs or test runner output\n- \"N% coverage\" → compare against coverage report\n- \"No regressions\" → verify against test runner failure count\n\n---\n\n## Phase 2: Deterministic Signal Ingestion\n\nIngest deterministic signals as candidate generators. They are never final findings.\n\nUse available local artifacts first. Run safe read-only or standard project validation commands only when appropriate for the environment.\n\nCandidate signal sources include:\n\n- CI failures and logs,\n- test failures,\n- coverage delta,\n- lint\u002Ftypecheck\u002Fbuild output,\n- `git diff --check`,\n- dependency audit output,\n- lockfile diff,\n- CodeQL alerts,\n- Semgrep or SAST findings,\n- secrets scan findings,\n- license scan findings,\n- mutation testing output,\n- package manager warnings,\n- generated schema diffs.\n\nRecord each signal as:\n\n```text\n[TOOL_CANDIDATE] | tool | severity | file:line | claim | raw_signal_summary | confidence\n```\n\nTool candidate rules:\n\n- Confirm reachability before reporting.\n- Confirm PR-introducedness before reporting as a PR blocker.\n- Confirm that a framework, schema, middleware, caller guard, or test isolation rule does not already mitigate it.\n- Do not report scanner output verbatim without reviewer validation.\n- Redact secrets; never paste raw credentials into the final output.\n\n---\n\n## Phase 3: Parallel Base Explorer Lanes\n\nLaunch all base lanes with `dispatch_lanes_async` when available. Pass the six lane specs together, set `max_concurrent` to `6`, record the returned `batch_id`, and continue only non-dependent architect work: refine the obligation ledger, inspect PR metadata, prepare micro-lane trigger checks, and run deterministic read-only local tools. Do not synthesize findings from running lanes. Keep each lane `prompt` compact: send the shared review context (PR diff, obligation ledger, scope) ONCE via the `common_prompt` field, or have lanes read it from a file by absolute path, instead of inlining the same large blob into all six prompts — oversized inline prompts produce malformed or truncated tool-call JSON and force clumsy file workarounds.\n\n**Incremental collection:** While base lanes are running, poll with `collect_lane_results` (without `wait` or `wait: false`) to check progress and process settled lanes as they complete — call `retrieve_lane_output` for full text when `output_ref` is present, then extract candidates via `parse_lane_candidates`, update the candidate ledger, validate output quality — while continuing independent architect work (obligation refinement, micro-lane trigger checks, local reads) between polls. Only use `wait: true` if lanes are still pending and no more independent work remains.\n\nBefore Phase 4 or synthesis, all base lanes must be settled. `dispatch_lanes_async` accepts a maximum of 8 lanes per call; base lanes (6) and micro-lanes (Phase 4) are dispatched in separate calls by design. Do not let one lane's conclusions bias another lane.\n\n**COVERAGE GATE — zero tolerance for unclosed gaps.** After `collect_lane_results`, verify every lane produced validated output. Two failure modes exist:\n- **Mode A (empty output):** Lane returns 0 chars, `status: cancelled`, `output_digest` matches SHA-256 of empty string (`e3b0c442...b855`).\n- **Mode B (intermediate reasoning only):** Lane reports `status: completed` with non-empty output, but the output is preliminary reasoning (\"Now let me check...\") with zero `[CANDIDATE]` rows. The `output_digest` does NOT match the empty-string hash. `parse_lane_candidates` returns 0 candidates. This mode is MORE dangerous — the lane appears successful but produced no findings.\n\nFor ANY lane that failed (either mode):\n1. **Retry** (max 2 attempts) with materially different parameters — different session, different prompt decomposition, or blocking `dispatch_lanes`.\n2. If retries fail, **deploy an equivalent alternative** and **verify equivalence**: same agent type, same prompt, same scope, same isolation. State the equivalence verification explicitly. Task is not an early-poll or empty-partial-output fallback; use it only as a last-resort equivalent dispatch mechanism after `dispatch_lanes_async` is unavailable or a settled lane result is confirmed failed\u002Fempty, and after blocking `dispatch_lanes` is unavailable or inappropriate. Use `retrieve_lane_output` to inspect the full artifact before declaring equivalence or failure.\n3. If no equivalent alternative can be verified, **report to the user as INCOMPLETE**. Present partial findings from successful lanes alongside the INCOMPLETE verdict. The user decides whether to accept reduced coverage. The architect NEVER makes that call.\n\n### Candidate extraction via parser\n\nAfter `collect_lane_results` returns for base lanes, process each lane result\nthat carries an `output_ref`. The orchestrator MUST use the candidate parser\nrather than preview-text extraction:\n\n1. For each `output_ref` (or batched), call `parse_lane_candidates` (or the\n   internal `parseAndPersist` module function) with `output_ref` and `producer`\n   flags; the parser auto-detects the format family per row. The parser reads\n   the full artifact from disk (no preview truncation issue) and returns\n   structured `ParseResultWithSidecar` records.\n2. Filter the returned `candidates[]` array by `producer: \"swarm-pr-review\"` and\n   the relevant `row_format_family` (e.g., `base_explorer` for base lanes,\n   `micro_lane` for micro-lanes). Filtering happens on the parsed results, NOT\n   on the tool input.\n3. Group the filtered candidates into reviewer-sized chunks:\n   - by file area (group by the directory or module of the `file_line` field),\n   - by category (group by the `category` field),\n   - by count (target max 50 candidates per chunk; smaller chunks are fine).\n4. Dispatch reviewer lanes (one per chunk) with bounded in-context candidate\n   lists. Each reviewer lane receives only the candidates from its assigned\n   chunk.\n\nIf a lane has `output_degraded: true`, `transcript_incomplete: true`, or no usable `output_ref`, apply the COVERAGE GATE from Phase 3: retry (max 2) with materially different parameters, deploy a verified equivalent alternative, or report INCOMPLETE to the user. Do not mark affected candidates UNVERIFIED to proceed past the gap. Never infer candidate absence from a preview.\n\n**Fallback convention:** If the parser is unavailable, the explorer MAY emit\n`[CANDIDATE]` rows in the lane output as a fallback convention (see the\nExplorer Prompt Template at the end of this skill), but the orchestrator\nSHOULD use the parser as the primary extraction mechanism.\n\n**lane id uniqueness for parallel dispatches:** When re-dispatching failed or\nre-running explorer lanes, every `dispatch_lanes_async` or `dispatch_lanes`\nlane `id` MUST be unique within that dispatch batch and should include lane and\nattempt suffixes (e.g., `pr_review_explore_lane1_attempt2`). Never reuse an id\nin the same batch unless intentionally replacing that exact lane before dispatch.\n\nExplorers optimize for recall. Over-reporting is expected. Explorers produce candidates only.\n\nThe six lanes are a fixed **check-type** partition (correctness \u002F security \u002F deps \u002F docs \u002F tests \u002F performance), not an area partition: the count is intentionally constant — every PR needs all six review dimensions — and the lanes deliberately overlap by file, each receiving the same diff via `common_prompt` and viewing it through a different lens. This is the deliberate exception to surface-scaled fan-out: the base wave is a fixed six by design, never collapsed or expanded with the size of the change. Coverage is guaranteed by the six dimensions each reading the whole diff, not by partitioning files across lanes — so the disjoint-partition rule that governs area-split fan-outs does not apply to these check-type lanes.\n\n| Lane | Focus | Required checks |\n|---|---|---|\n| Lane 1: Correctness and edge cases | Logic errors, null\u002Fundefined handling, incorrect operators, async ordering, races, off-by-one, error paths | input domain, nullability, async\u002Fawait, loop termination, exception behavior, backward compatibility |\n| Lane 2: Security and trust boundaries | Injection, authz\u002Fauthn bypass, SSRF, path traversal, secret exposure, unsafe deserialization, prompt injection | untrusted input sources, sanitization, credential handling, permission boundary, private network access, output escaping |\n| Lane 3: Dependencies and deployment safety | Import changes, version bumps, lockfile drift, breaking APIs, package scripts, runtime assumptions | lockfile consistency, new transitive deps, Node\u002FBun\u002Fruntime compatibility, platform assumptions, license red flags |\n| Lane 4: Docs, intent, and drift | PR claims vs implementation, docs mismatch, migration\u002Fchangelog gaps, stale examples | obligation mapping, changed behavior not documented, docs promising behavior not implemented |\n| Lane 5: Tests and falsifiability | Weak assertions, missing edge tests, flaky patterns, mock leakage, fixture drift | assertion strength, tautology patterns (`expect(true).toBe(true)`, `expect(res).toBeDefined()` without further checks), `assertDoesNotThrow` wrapping trivial code), negative paths, isolation, deterministic timing, cross-platform path coverage |\n| Lane 6: Performance and architecture | Complexity regressions, memory leaks, over-coupling, inefficient graph scans, global mutable state | algorithmic deltas, caching, resource lifecycle, state ownership, architectural boundary violations |\n\n### Explorer context contract\n\nEvery explorer must inspect or explicitly mark unavailable:\n\n1. the changed hunk,\n2. at least one caller, consumer, or downstream impact-cone node,\n3. at least one callee, dependency, or upstream assumption,\n4. at least one sibling implementation or prior pattern,\n5. the nearest relevant test or missing-test location,\n6. deterministic signal entries mapped to its files\u002Fsymbols,\n7. relevant Swarm knowledge\u002Fevidence entries, if present.\n8. the commit range to analyze (`base_ref..head_ref`),\n\n### Explorer output format\n\nExplorers emit structured candidate records. The parser reads the full lane\nartifact and extracts these records. The canonical record shape is:\n\n```text\n[CANDIDATE] | candidate_id | lane | severity | category | file:line | claim | evidence_summary | impact_context | confidence: LOW\u002FMEDIUM\u002FHIGH\n```\n\nThe parser normalizes this into a structured `candidates[]` array. If the\nparser is unavailable, the explorer MAY emit the `[CANDIDATE]` row format\ndirectly in the lane output as a fallback convention.\n\nExplorers must not use `CONFIRMED`, `DISPROVED`, or `PRE_EXISTING`.\n\n---\n\n## Phase 4: Triggered Swarm Plugin Micro-Lanes\n\nAfter base lanes are settled, inspect the context pack risk triggers. Launch focused micro-lanes for triggered categories only, using `dispatch_lanes_async` again when more than one read-only micro-lane is needed (`dispatch_lanes_async` accepts max 8 lanes per call — micro-lanes are dispatched in a separate batch from base lanes). Use the same incremental collection pattern: poll with `collect_lane_results` (without `wait`) to process settled micro-lanes while continuing independent work, falling back to `wait: true` only when no independent work remains. All micro-lanes must be settled before reviewer classification. Do not launch irrelevant micro-lanes.\n\nApply the same parser-based extraction to micro-lanes: call `parse_lane_candidates` on each micro-lane `output_ref` (filter the returned `candidates[]` array by `row_format_family === \"micro_lane\"` after parsing). Apply the COVERAGE GATE from Phase 3 to micro-lanes: degraded, incomplete, or candidate-less lane artifacts are coverage gaps that must be closed by retry, verified equivalent alternative, or reported as INCOMPLETE — not treated as clean negative evidence.\n\nEach micro-lane receives:\n\n- exact files and hunks in scope,\n- related obligations,\n- impact cone entries,\n- relevant deterministic signals,\n- related historical knowledge with quarantine\u002Fstaleness status,\n- expected invariants,\n- structured candidate output (parser-extracted). If the parser is unavailable,\n  the micro-lane MAY emit `[CANDIDATE]` rows as a fallback convention.\n\n### Swarm plugin risk trigger map\n\n| Trigger in diff or context pack | Launch micro-lane | Invariants to check |\n|---|---|---|\n| `agents`, `prompts`, `templates`, prompt interpolation, role text | Architect prompt integrity | no scope escape, no system prompt leakage, safe `{{variable}}` interpolation, untrusted text isolated from instructions |\n| `council`, `verdict`, `quorum`, `veto`, synthesis | Council orchestration | quorum math correct, veto enforced, evidence not lost, dissent preserved, no explorer result treated as final |\n| `guardrail`, `gate`, `delegation`, `rate limit`, approval checks | Guardrail bypass paths | gates cannot be skipped, delegation cannot bypass policy, rate limits cannot be reset by user-controlled state |\n| `schema`, `evidence`, JSONL, migrations, serializers | Evidence schema drift | backward compatibility, required fields preserved, version migration safe, malformed evidence rejected |\n| `knowledge`, `curator`, `hive`, `quarantine`, memory | Knowledge base contract | project vs hive tiers not confused, quarantine honored, CRUD semantics stable, stale knowledge not injected as fact |\n| `phase`, `state`, `plan`, `.swarm\u002Fstate`, completion markers | Phase transition validation | ordering enforced, retro requirements handled, no premature completion, rollback safe |\n| `model`, `role`, `prefix`, `tool`, agent config | Model-to-role mapping | role prefix enforced, tool permissions least-privilege, unauthorized tools impossible, model fallback safe |\n| `config`, defaults, ratchet, locks, policy flags | Config ratchet semantics | once-enabled gates cannot silently disable, downgrade attempts detected, lock-state integrity preserved |\n| `url`, `fetch`, `http`, GitHub PR\u002Fissue parsing, package fetch | URL sanitization and external fetch | scheme allowlist, credential stripping, private IP \u002F localhost \u002F metadata IP blocking, redirect handling, timeout safe |\n| `git`, branch, checkout, reset, worktree, `.git` | Git safety | branch detection reliable, no unsafe `reset --hard`, .git protected, path normalization cross-platform, worktree state preserved |\n| `shell`, `exec`, command parser, file writes, delete\u002Fmove\u002Fcopy | Shell\u002Fwrite authority and path containment | destructive commands gated, dry-run preferred, symlink\u002Fpath escape blocked, writes scoped, command injection impossible |\n| `test`, `bun`, mocks, fixtures, CI matrix | Test infrastructure | `bun:test` API correct, mock isolation, cross-platform paths, no hidden dependency on test order, fixtures reset |\n| `metrics`, telemetry, logs, serialized traces | Metrics and evidence privacy | no secrets in logs, evidence reproducible, privacy preserved, counts cannot be gamed, metrics schema stable |\n\nMicro-lane output format:\n\n```text\n[CANDIDATE] | candidate_id | micro_lane | severity | category | file:line | claim | invariant_violated | evidence_summary | confidence\n```\n\n---\n\n## Phase 5: Swarm-Native Verifier Routing\n\nUse Swarm-native agents and artifacts when available. If exact agent names are unavailable, route the same task to the closest equivalent reviewer\u002Fcritic role.\n\n| Swarm verifier \u002F artifact | When to use | Purpose |\n|---|---|---|\n| `critic_drift_verifier` | obligation-vs-code, docs-vs-code, phase\u002Fgate changes, schema\u002Fconfig changes | detect drift between stated behavior and actual implementation |\n| `critic_hallucination_verifier` | external APIs, package claims, URLs, CLI flags, GitHub behavior, model\u002Ftool names | verify claims against source or mark as unverified |\n| `curator_phase` | before exploration and after synthesis | retrieve relevant lessons; write back confirmed true positives \u002F false positives |\n| `test_engineer` | confirmed\u002Fborderline correctness, security, state, schema, or config findings | propose or run falsification probes and regression tests |\n| `prm_scorer` | long or contentious reviews | score whether review trajectory is drifting toward unsupported speculation |\n| `.swarm\u002Frepo-graph.json` | all nontrivial code changes | build impact cones and sibling-pattern checks |\n| `.swarm\u002Fevidence\u002F` | schema, phase, state, council, and guardrail changes | verify evidence compatibility and serialized provenance |\n| `\u002Fswarm metrics` or stored metrics | after synthesis | record review quality and recurring false positives |\n\nVerifier output is advisory until incorporated by the independent reviewer or critic.\n\n---\n\n## Phase 6: Independent Reviewer Confirmation\n\nRoute candidates to reviewer subagents. The orchestrator routes candidates\nin bounded chunks produced by the parser-based extraction in Phase 3-4. Each\nreviewer lane receives a bounded list of candidates from a single chunk — by\nfile area, category, or count — not the full candidate set. The reviewer must\nre-read the candidate's file:line evidence and relevant context pack entries\ndirectly.\n\n### Noise budget and universal validation\n\nBefore reviewer dispatch, the orchestrator may suppress candidates that are ALL of:\n- purely stylistic without correctness, security, test, maintainability, or user-impact implications,\n- exact duplicates of a candidate already queued for validation,\n- explorer-stated confidence=LOW with zero structural evidence (no file:line, no code path, no invariant reference).\n\nEvery suppressed candidate must appear in the final report under \"Suppressed Candidates\" with the reason. Suppression without disclosure is a hard rule violation.\n\n**All remaining candidates — regardless of severity — must be routed to independent reviewer validation.** Severity alone does not determine validation eligibility; it determines routing priority. A LOW-severity candidate with file:line evidence and a specific code path gets the same reviewer attention as a HIGH-severity candidate.\n\nCandidates not routed to reviewers must be listed as UNVERIFIED with reason in the validation provenance. Do not silently drop them.\n\n### Reviewer required checks\n\nFor each candidate, the reviewer must determine:\n\n- exact file:line evidence,\n- whether the issue is introduced by this PR or pre-existing,\n- reachability from realistic execution paths,\n- whether caller guards, schema validation, middleware, framework defaults, feature flags, or state-machine constraints mitigate it,\n- whether tests cover the negative path,\n- whether sibling files or docs must change together,\n- whether the severity is justified,\n- the smallest falsification probe that would prove or disprove it.\n\n### Reviewer classifications\n\n| Classification | Meaning |\n|---|---|\n| `CONFIRMED` | Evidence is real, reachable or structurally proven, and introduced or exposed by this PR |\n| `DISPROVED` | Candidate claim is incorrect, unreachable, mitigated, or based on a misunderstanding |\n| `UNVERIFIED` | Available evidence is insufficient to determine validity |\n| `PRE_EXISTING` | Issue exists on the base branch and is not materially worsened by this PR |\n\n### Evidence classifications\n\n| Type | Definition |\n|---|---|\n| `STRUCTURALLY_PROVEN` | File:line evidence directly demonstrates the bug or violated invariant |\n| `EXECUTION_PROVEN` | A test, trace, reproduction, or command demonstrates failure |\n| `STATIC_TRACE_PROVEN` | Static analysis plus reviewed path\u002Fcontext demonstrates reachability |\n| `PLAUSIBLE_BUT_UNVERIFIED` | Pattern suggests risk, but reachability or mitigation is unresolved |\n\nReviewer output format:\n\n```text\n[REVIEWED] | candidate_id | classification | evidence_type | final_severity | introduced_by_pr: YES\u002FNO\u002FUNKNOWN | file:line | rationale | falsification_probe | reviewer_id\n```\n\n`DISPROVED` findings must include the reason. `PRE_EXISTING` findings must include the base-branch evidence if available.\n\n---\n\n## Phase 7: Falsification Probe Requirement\n\nEach confirmed nontrivial finding must include at least one falsification artifact:\n\n- runnable failing command,\n- proposed regression test,\n- mutation that current tests fail to kill,\n- static-analysis trace,\n- minimal execution path,\n- exact reason no runtime probe is available.\n\nNontrivial means any finding that affects correctness, security, state transitions, write authority, git safety, config, schema\u002Fevidence integrity, model\u002Ftool permissions, external fetches, persistence, or user-visible behavior.\n\nA finding may still be reported without a runnable command if it is structurally proven, but the report must state why a runtime probe was not available.\n\n---\n\n## Phase 8: Critic Challenge\n\nRoute every reviewer-confirmed HIGH or CRITICAL finding to a critic. Also route borderline MEDIUM findings when they involve security, state machines, write authority, evidence integrity, model\u002Ftool permissions, git safety, or config ratchets.\n\nThe critic must challenge:\n\n- severity inflation,\n- weak or incomplete evidence,\n- missing mitigating context,\n- false reachability assumptions,\n- framework or middleware defaults,\n- schema validation gates,\n- state-machine constraints,\n- feature flags or dead code,\n- pre-existing status,\n- non-actionable or unsafe fix recommendations,\n- sibling-file gaps,\n- whether multiple comments should be grouped into one root cause.\n\nCritic output format:\n\n```text\n[CRITIC] | finding_id | UPHELD\u002FDOWNGRADED\u002FDISPROVED\u002FNEEDS_MORE_EVIDENCE | final_severity | reason | required_report_change\n```\n\n## Verdict row contract\n\nThe `[CRITIC]` row in the format above is **mandatory contract**, not advisory output. A critic response that does not end with that exact row format is treated as a planning preamble, not a verdict, and must be re-dispatched. Do not proceed past Phase 8 join barrier until each dispatched critic lane has produced a parseable `[CRITIC]` row.\n\n**Re-dispatch trigger:** when a critic lane response is missing the verdict row, the orchestrator must automatically re-dispatch that lane with the explicit instruction: \"Your final line MUST be exactly the Phase 8 contract row: `[CRITIC] | finding_id | UPHELD\u002FDOWNGRADED\u002FDISPROVED\u002FNEEDS_MORE_EVIDENCE | final_severity | reason | required_report_change`. A response without that exact row will be treated as a planning message and re-dispatched.\" Do not synthesize findings from the planning preamble; only from the re-dispatched verdict.\n\n**COVERAGE GATE alignment:** Critic lane failures follow the same COVERAGE GATE as explorer lanes: retry (max 2 attempts) with materially different parameters. If retries fail, deploy a verified equivalent alternative (same agent type, same prompt, same scope, same isolation). If no equivalent can be verified, report INCOMPLETE to the user — do NOT mark findings UNVERIFIED to continue past the gap. The orchestrator NEVER fabricates a critic verdict by parsing prose, by tolerating a planning preamble, or by silently accepting reduced coverage.\n\nRefuted findings become `DISPROVED` or `ADVISORY`, depending on critic rationale. Downgrades must be listed in the final validation provenance.\n\n---\n\n## Runtime-Aware False-Positive Guard Checklist\n\nBefore confirming any finding, the reviewer and critic must check all that apply:\n\n- [ ] Schema validation gate: does schema validation reject malformed input before the flagged line?\n- [ ] Middleware interception: does middleware handle the request or command before the flagged path?\n- [ ] Framework default mitigation: does the framework inherently prevent this class of issue?\n- [ ] Caller context correctness: who invokes this code, and can untrusted input reach it?\n- [ ] Execution reachability: is the path reachable, or behind a feature flag, dead branch, build-only path, or commented-out code?\n- [ ] State-machine constraints: do ordering rules, locks, mutexes, phase gates, or transition guards prevent the state?\n- [ ] Permission boundary: does role\u002Ftool mapping prevent the operation?\n- [ ] Data lifetime: is the flagged state persisted, serialized, logged, or only transient?\n- [ ] Cross-platform behavior: does Windows\u002FmacOS\u002FLinux path or shell behavior change the result?\n- [ ] Test environment mismatch: is the finding only true under a mock or fixture that cannot occur in production?\n\nIf a mitigation applies and was not accounted for, downgrade to `ADVISORY`, `UNVERIFIED`, or `DISPROVED`.\n\n---\n\n## Phase 9: Synthesis, Grouping, and Noise Budget\n\nBefore final output:\n\n- group duplicate candidates by root cause,\n- report one finding per root cause,\n- attach all affected file:line references under that finding,\n- separate ship blockers from advisory notes,\n- suppress pure style\u002Fnit findings unless they indicate correctness, security, test, maintainability, or user-impact risk,\n- distinguish PR-introduced from pre-existing,\n- distinguish confirmed from plausible-but-unverified,\n- include disproved agent\u002Ftool claims,\n- keep final comments actionable.\n\n### Finding ID format\n\n```text\nF-001 | severity | category | root cause | affected file:line refs | reviewer | critic status\n```\n\n### Suggested final grouping\n\n1. Ship blockers,\n2. Important non-blockers,\n3. Test \u002F coverage gaps,\n4. Pre-existing issues,\n5. Unverified plausible risks,\n6. Disproved candidates \u002F false positives,\n7. Clean lane summary.\n\n---\n\n## Phase 10: Metrics and Knowledge Writeback\n\nAt the end of the review, record review quality metrics when Swarm metrics or local evidence storage is available.\n\nRecord:\n\n- raw candidates by base lane,\n- raw candidates by micro-lane,\n- deterministic tool candidates,\n- reviewer-confirmed findings,\n- reviewer-disproved findings,\n- reviewer-unverified findings,\n- critic-upheld findings,\n- critic-downgraded findings,\n- critic-disproved findings,\n- final reported findings,\n- suppressed non-actionable candidates,\n- recurring false-positive patterns,\n- commands or probes used,\n- token\u002Ftime cost if available,\n- accepted\u002Ffixed findings when known.\n\nKnowledge writeback rules:\n\n- Write back only validated true positives or validated false-positive patterns.\n- Include file patterns, invariant, evidence, and why it was confirmed\u002Fdisproved.\n- Mark repo-specific lessons as project-tier unless there is strong evidence they generalize.\n- Never promote quarantined or unvalidated knowledge to hive-tier.\n- Never store secrets, private tokens, or raw sensitive logs.\n\n---\n\n## Phase 11: Post-Fix Re-verification\n\nWhen the PR author pushes fixes after a review, perform a targeted re-verification before updating the verdict.\n\n### Re-verification scope\n\nOnly re-verify findings the author claims to have fixed. Do not re-run the full review pipeline.\n\n### Re-verification steps\n\n1. For each finding the author claims fixed:\n   a. Read the changed file(s) from the updated branch at the specific lines referenced in the original finding.\n   b. Verify the fix addresses the root cause, not just the symptom.\n   c. Check that the fix does not introduce a new issue in the same area.\n2. Run CI checks on the updated branch to confirm no regressions.\n3. For findings the author did not address, carry forward the original finding with unchanged status.\n\n### Re-verification output\n\n```\n[REVERIFIED] | finding_id | FIXED \u002F PARTIALLY_FIXED \u002F NOT_FIXED \u002F NEW_ISSUE | evidence | updated_severity\n```\n\n- `FIXED`: the root cause is resolved and no new issue introduced.\n- `PARTIALLY_FIXED`: the root cause is partially addressed or a residual concern remains.\n- `NOT_FIXED`: the root cause persists unchanged.\n- `NEW_ISSUE`: the fix introduced a new problem at the same location.\n\nUpdate the verdict only after re-verifying all previously blocking findings.\n\n---\n\n## Dry-Run: Parser-Based Candidate Extraction\n\nThis section demonstrates the new parser-based extraction path end-to-end\nusing synthetic data. It is concrete enough to implement the same pattern in\nanother skill.\n\n### Scenario\n\nA PR review has dispatched six base explorer lanes via `dispatch_lanes_async`.\nThe batch completed and `collect_lane_results` returned:\n\n```json\n{\n  \"batch_id\": \"batch-a1b2c3\",\n  \"lane_results\": [\n    {\n      \"lane_id\": \"pr_review_lane1_correctness\",\n      \"status\": \"completed\",\n      \"output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fout-abc123.json\",\n      \"output_degraded\": false\n    },\n    {\n      \"lane_id\": \"pr_review_lane2_security\",\n      \"status\": \"completed\",\n      \"output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-2\u002Fout-def456.json\",\n      \"output_degraded\": false\n    }\n  ]\n}\n```\n\n### Step 1 — Call the parser\n\nThe orchestrator calls `parse_lane_candidates` for each `output_ref`:\n\n```json\n{\n  \"tool\": \"parse_lane_candidates\",\n  \"arguments\": {\n    \"output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fout-abc123.json\",\n    \"producer\": \"swarm-pr-review\"\n  }\n}\n```\n\n### Step 2 — Structured response\n\nThe parser returns a `ParseResultWithSidecar`. On success, `error` and `error_code` are absent:\n\n```json\n{\n  \"candidates\": [\n    {\n      \"record_type\": \"candidate\",\n      \"row_format_family\": \"base_explorer\",\n      \"row_format_version\": 1,\n      \"record_version\": { \"major\": 1, \"minor\": 0 },\n      \"source_output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fout-abc123.json\",\n      \"source_batch_id\": \"B-2025-06-22-001\",\n      \"source_lane_id\": \"explorer-1\",\n      \"source_agent\": \"paid_explorer\",\n      \"source_digest\": \"sha256:abc123def456...\",\n      \"extracted_from_partial_source\": false,\n      \"sessionId\": \"ses_01HXYZ...\",\n      \"parentSessionId\": \"ses_01HABC...\",\n      \"producer\": \"swarm-pr-review\",\n      \"candidate_id\": \"C-001\",\n      \"lane\": \"Lane 1: Correctness and edge cases\",\n      \"micro_lane\": null,\n      \"severity\": \"HIGH\",\n      \"category\": \"null-safety\",\n      \"file_line\": \"src\u002Futils\u002Fcache.ts:142\",\n      \"claim\": \"Uncached getter may return undefined on cold start\",\n      \"evidence_summary\": \"The `getCached` function returns `cache[key]` without a fallback when the cache is empty.\",\n      \"impact_context\": \"Downstream callers in `src\u002Fhandlers\u002F*.ts` expect a defined value and call `.toString()` directly.\",\n      \"invariant_violated\": null,\n      \"confidence\": \"HIGH\"\n    },\n    {\n      \"record_type\": \"candidate\",\n      \"row_format_family\": \"base_explorer\",\n      \"row_format_version\": 1,\n      \"record_version\": { \"major\": 1, \"minor\": 0 },\n      \"source_output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fout-abc123.json\",\n      \"source_batch_id\": \"B-2025-06-22-001\",\n      \"source_lane_id\": \"explorer-1\",\n      \"source_agent\": \"paid_explorer\",\n      \"source_digest\": \"sha256:abc123def456...\",\n      \"extracted_from_partial_source\": false,\n      \"sessionId\": \"ses_01HXYZ...\",\n      \"parentSessionId\": \"ses_01HABC...\",\n      \"producer\": \"swarm-pr-review\",\n      \"candidate_id\": \"C-002\",\n      \"lane\": \"Lane 1: Correctness and edge cases\",\n      \"micro_lane\": null,\n      \"severity\": \"MEDIUM\",\n      \"category\": \"async-ordering\",\n      \"file_line\": \"src\u002Fservices\u002Fqueue.ts:88\",\n      \"claim\": \"Race between `drain` and `processNext` may drop items\",\n      \"evidence_summary\": \"`drain` sets `active = false` before awaiting `processNext`, which also checks `active`.\",\n      \"impact_context\": \"Items submitted during the drain window are silently dropped.\",\n      \"invariant_violated\": null,\n      \"confidence\": \"MEDIUM\"\n    }\n  ],\n  \"invocation_envelope\": {\n    \"record_type\": \"invocation\",\n    \"source_output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fout-abc123.json\",\n    \"source_batch_id\": \"B-2025-06-22-001\",\n    \"source_lane_id\": \"explorer-1\",\n    \"source_agent\": \"paid_explorer\",\n    \"source_digest\": \"sha256:abc123def456...\",\n    \"row_format_version\": 1,\n    \"record_version\": { \"major\": 1, \"minor\": 0 },\n    \"sessionId\": \"ses_01HXYZ...\",\n    \"parentSessionId\": \"ses_01HABC...\",\n    \"producer\": \"swarm-pr-review\",\n    \"produced_at\": \"2025-06-22T14:30:00.000Z\",\n     \"format_families_detected\": [\"base_explorer\"],\n     \"candidate_count\": 2,\n     \"parse_errors\": 2,\n     \"malformed_rows\": 0\n  },\n  \"diagnostics\": {\n    \"candidate_count\": 2,\n    \"parse_errors\": 2,\n    \"parse_error_details\": [\n      {\n        \"row_index\": 0,\n        \"field\": \"row\",\n        \"message\": \"Both format-family discriminators present; defaulting to base_explorer\"\n      },\n      {\n        \"row_index\": 1,\n        \"field\": \"row\",\n        \"message\": \"Both format-family discriminators present; defaulting to base_explorer\"\n      }\n    ],\n    \"malformed_rows\": 0,\n    \"duplicate_id_count\": 0,\n    \"duplicate_id_warnings\": [],\n    \"degraded_source_count\": 0,\n    \"incomplete_source_count\": 0,\n     \"format_families_detected\": [\"base_explorer\"]\n   }\n}\n```\n> **Note**: `parse_errors: 2` reflects FR-017\u002FSC-017 position-based detection: when a `[CANDIDATE]` row has both `evidence_summary` and `impact_context` populated, the parser emits a `parse_error_details` entry per row with `field: \"row\"` and `message: \"Both format-family discriminators present; defaulting to base_explorer\"`. This is documented behavior, not a parser bug. To get `parse_errors: 0` with the row format, leave one of the two fields empty; to silence the warning entirely, emit structured JSON candidate records.\n\nOn refusal (e.g. `output_ref` does not exist), `error` and `error_code` are present; `candidates` is `[]`; `invocation_envelope` and `diagnostics` are populated with empty fields for traceability:\n\n```json\n{\n  \"error\": \"Artifact reference not found in store\",\n  \"error_code\": \"ref-not-found\",\n  \"candidates\": [],\n  \"invocation_envelope\": {\n    \"record_type\": \"invocation\",\n    \"source_output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fmissing.json\",\n    \"source_batch_id\": \"\",\n    \"source_lane_id\": \"\",\n    \"source_agent\": \"\",\n    \"source_digest\": \"\",\n    \"row_format_version\": 1,\n    \"record_version\": { \"major\": 1, \"minor\": 0 },\n    \"produced_at\": \"2025-06-22T14:30:00.000Z\",\n    \"format_families_detected\": [],\n    \"candidate_count\": 0,\n    \"parse_errors\": 0,\n    \"malformed_rows\": 0\n  },\n  \"diagnostics\": {\n    \"candidate_count\": 0,\n    \"parse_errors\": 0,\n    \"parse_error_details\": [],\n    \"malformed_rows\": 0,\n    \"duplicate_id_count\": 0,\n    \"duplicate_id_warnings\": [],\n    \"degraded_source_count\": 0,\n    \"incomplete_source_count\": 0,\n     \"format_families_detected\": []\n   }\n}\n```\n\n### Step 3 — Filter and group\n\nThe orchestrator filters the returned `candidates[]` array by `producer: \"swarm-pr-review\"` and `row_format_family` (e.g. `base_explorer` or `micro_lane`), then groups\nthe candidates. In this synthetic example, the two candidates above are grouped\nby file area:\n\n- **Chunk A — `src\u002Futils\u002F`** (1 candidate): C-001\n- **Chunk B — `src\u002Fservices\u002F`** (1 candidate): C-002\n\nIf there were more candidates, the orchestrator would also group by category\n(e.g., `null-safety`, `async-ordering`) and cap each chunk at 50 candidates.\n\n### Step 4 — Dispatch reviewer lanes\n\nThe orchestrator dispatches one reviewer lane per chunk:\n\n```text\nYou are the independent reviewer. Validate only the candidates assigned below.\nDo not search for new issues except where needed to validate reachability or\nmitigation. Do not trust explorer severity.\n\nContext pack summary:\n- scope: ...\n- obligations: ...\n- impact cone: ...\n- deterministic signals: ...\n- relevant Swarm artifacts \u002F knowledge: ...\n- base_ref: \u003Ccommit SHA of base branch>\n- head_ref: \u003Ccommit SHA of PR head branch>\n\nCandidates (Chunk A — src\u002Futils\u002F):\n- C-001 | HIGH | null-safety | src\u002Futils\u002Fcache.ts:142 | Uncached getter may return undefined on cold start\n\nFor each candidate, return:\n[REVIEWED] | candidate_id | CONFIRMED\u002FDISPROVED\u002FUNVERIFIED\u002FPRE_EXISTING | evidence_type | final_severity | introduced_by_pr | file:line | rationale | falsification_probe | reviewer_id\n\nYou must check caller context, reachability, schema\u002Fmiddleware\u002Fframework mitigations, state-machine constraints, test coverage, PR-introducedness, and severity.\n\nIMPORTANT: If a finding claims behavior is \"new\" or \"introduced by the PR\", you MUST read the equivalent code on the base branch (git show \u003Cbase_ref>:\u003Cfile>) to verify it was not present before. A reviewer claim of \"this is new\" is invalid without base-branch evidence. Do not compare the new code to an idealized baseline — compare it to what actually existed on the base branch at the time of the PR.\n```\n\n### Key invariants\n\n- The parser reads the **full artifact**, not a preview. Truncation in the\n  `dispatch_lanes` preview does not affect candidate extraction.\n- The orchestrator never classifies candidates — it only filters, groups, and\n  routes them.\n- Each reviewer receives a bounded chunk. A chunk with more than 50 candidates\n  is split before dispatch.\n- The `invocation_envelope` in the parser response provides audit provenance\n  for every extracted candidate.\n\n---\n\n# Council Mode Workflow\n\nCouncil mode is opt-in only and adversarial.\n\nWhen triggered:\n\n1. Build the same context pack as default mode.\n2. Launch all council agents with one `dispatch_lanes_async` call when available; continue independent context preparation while they run, polling with `collect_lane_results` (without `wait`) to process settled agents incrementally. Use `wait: true` only when no independent work remains and agents are still pending. All agents must be settled before reviewer classification. Fall back to blocking `dispatch_lanes` when async launch is unavailable.\n3. Each council agent assumes all work is wrong until code evidence proves otherwise.\n4. Each agent hunts within its lane only.\n5. Agents return evidence states only: `EVIDENCE_FOUND`, `SUSPICIOUS`, or `CLEAN`.\n6. Agents must not return `CONFIRMED`, `DISPROVED`, or final severity.\n7. The independent reviewer then classifies every council candidate as `CONFIRMED`, `DISPROVED`, `UNVERIFIED`, or `PRE_EXISTING`.\n8. Apply critic challenge to reviewer-confirmed HIGH\u002FCRITICAL or borderline findings.\n9. Final synthesis distinguishes real blockers, real low-severity issues, accepted caveats, disproved council claims, and follow-up quality work.\n\nDefault council lanes:\n\n- correctness and edge cases,\n- security and trust boundaries,\n- dependency and deployment safety,\n- docs and intent-vs-actual,\n- tests and falsifiability,\n- performance and architecture when risk justifies it.\n\nCouncil prompt requirements:\n\n- branch and commit range,\n- context pack summary,\n- files owned by that lane,\n- relevant impact cone,\n- explicit checklist,\n- strict output cap,\n- `EVIDENCE_FOUND \u002F SUSPICIOUS \u002F CLEAN` only,\n- file:line evidence required for `EVIDENCE_FOUND`.\n\nCouncil findings are supplementary, not authoritative overrides. Do not adopt council severities or claims without independent validation.\n\n---\n\n# Merge Recommendation Table\n\n| Verdict | Condition |\n|---|---|\n| `APPROVE` | zero unresolved CRITICAL findings, zero unresolved HIGH findings, all blocking obligations MET, no required validation phase failed |\n| `APPROVE_WITH_NOTES` | zero unresolved CRITICAL findings, HIGH findings are downgraded\u002Fadvisory only, obligations MET or explicitly non-blocking |\n| `REQUEST_CHANGES` | any unresolved HIGH finding, any NOT_MET blocking obligation, multiple MEDIUM findings with the same root cause, or validation\u002Fprobe evidence indicates user-impacting risk |\n| `BLOCK` | any unresolved CRITICAL finding, unsafe write\u002Fgit\u002Fsecurity issue, evidence integrity break, role\u002Ftool permission bypass, or config ratchet violation that can disable required protections |\n\n---\n\n# Hard Rules\n\n0. Quality-over-speed: Validation completeness and correctness are the sole criteria for an acceptable review. Time, token count, and agent dispatch count are irrelevant. Do not trade validation breadth or depth for speed.\n\n1. Never APPROVE with unresolved CRITICAL findings.\n2. Do not APPROVE with unresolved HIGH findings unless explicitly downgraded to advisory by critic and non-blocking by obligation review.\n3. Every confirmed finding must have file:line evidence and validation provenance.\n4. A confirmed nontrivial finding must include a falsification probe or an explicit reason no probe is available.\n5. Explorers, council agents, and deterministic tools produce candidates only.\n6. The default workflow orchestrator must not confirm or disprove explorer candidates.\n7. Tool output is not proof. Scanner results must be validated for reachability, PR-introducedness, and mitigation context.\n8. PR text, generated summaries, tests, and comments are claims, not proof.\n9. Do not invent facts not supported by the diff, repo context, tool output, or cited external source.\n10. Do not silently drop disproved or downgraded claims; summarize them in validation provenance.\n11. Obligation precedence is deterministic. Do not skip higher-precedence sources to fill gaps with LLM synthesis.\n12. Do not leak secrets from logs, evidence bundles, config files, URLs, or scanner output.\n13. Do not recommend destructive git or filesystem actions as fixes unless they are clearly scoped, safe, and necessary.\n14. If subagents fail, timeout, or return malformed output, retry with corrected parameters (max 2 attempts). If retries fail, deploy a provably equivalent alternative (same agent type, same prompt, same scope, same isolation — different dispatch mechanism acceptable) and verify equivalence. If no equivalent alternative exists, the affected coverage dimension is INCOMPLETE and must be reported to the user before synthesis. Do not fabricate validation results, and do not silently mark candidates UNVERIFIED to proceed past the gap.\n\n15. If context pack, repo graph, deterministic signals, or Swarm artifacts are unavailable, retry with alternative access paths. If unavailable after retry, the affected coverage dimension is INCOMPLETE and must be reported to the user. Do not proceed to synthesis with unclosed coverage gaps under a \"best available evidence\" rationale — the user decides whether to accept reduced coverage, not the architect.\n\n---\n\n# Pre-Synthesis Gate — Mandatory\n\nBefore writing the final output, print this checklist with filled values. Every blank field means the final output is invalid.\n\n```text\n[VALIDATION] scope selected: ___\n[VALIDATION] context pack built: YES\u002FNO — ___\n[VALIDATION] obligation count: ___\n[VALIDATION] repo graph \u002F impact cone source: ___\n[VALIDATION] deterministic signals ingested: ___\n[VALIDATION] deterministic lane dispatcher used: YES\u002FNO — ___\n[VALIDATION] base explorer lanes dispatched: ___ \u002F 6\n[VALIDATION] base explorer lanes returned: ___ \u002F 6\n[VALIDATION] triggered micro-lanes: ___\n[VALIDATION] Swarm verifier routing used: ___\n[VALIDATION] raw candidates: ___\n[VALIDATION] tool candidates: ___\n[VALIDATION] reviewer dispatched: ___ (agent type, task description)\n[VALIDATION] reviewer returned: ___ (APPROVED \u002F REJECTED \u002F CONCERNS — copy verdict text)\n[VALIDATION] findings confirmed by reviewer: ___\n[VALIDATION] findings rejected by reviewer as false positive: ___\n[VALIDATION] findings marked PRE_EXISTING: ___\n[VALIDATION] findings left UNVERIFIED: ___\n[VALIDATION] findings escalated to critic: ___\n[VALIDATION] critic dispatched: ___ OR \"SKIPPED — no reviewer-confirmed HIGH\u002FCRITICAL or borderline findings\"\n[VALIDATION] critic returned: ___ OR \"N\u002FA\"\n[VALIDATION] findings upheld by critic: ___\n[VALIDATION] findings downgraded by critic: ___\n[VALIDATION] findings disproved by critic: ___\n[VALIDATION] falsification probes included: ___\n[VALIDATION] grouped root-cause findings: ___\n[VALIDATION] metrics \u002F knowledge writeback: ___\n[VALIDATION] all explorers verified to diff against PR branch, not HEAD: YES\u002FNO\n[VALIDATION] noise-filter suppressed candidates: ___ (count, each with reason in final report)\n[VALIDATION] all non-suppressed candidates routed to reviewer: YES\u002FNO\n```\n\nIf the reviewer returned `REJECTED` or `CONCERNS`, route the issue back to implementation context or mark the candidate invalid with reason. Do not silently downgrade a rejection.\n\n**COVERAGE GATE CONDITION:** If ANY validation dimension shows incomplete coverage (lanes that failed and were not closed by retry or verified equivalent alternative, CI that did not run, tools that were unavailable after retry), the Pre-Synthesis Gate FAILS. Do not proceed to final output. Report the unclosed gaps to the user as INCOMPLETE with the partial findings from successful dimensions. The architect is NEVER authorized to silently accept reduced coverage.\n\n---\n\n# Final Output Format\n\nProduce the final review in this order:\n\n## PR intent\n\nSummarize the obligations and user-visible intent.\n\n## Implementation summary\n\nSummarize what changed, including major files, public APIs, schemas, configs, tests, and Swarm artifacts.\n\n## Intended vs actual mapping\n\n| Obligation | Source | Actual evidence | Status | Linked finding |\n|---|---|---|---|---|\n\nUse `MET`, `PARTIALLY_MET`, `NOT_MET`, or `UNVERIFIABLE`.\n\n## Validation provenance\n\nInclude:\n\n- context pack limitations,\n- explorer lanes launched and returned,\n- micro-lanes triggered,\n- deterministic signals ingested,\n- reviewer identity \u002F role for each finding,\n- critic result for each escalated finding,\n- findings DISPROVED by reviewer with reason,\n- findings DOWNGRADED by critic with reason,\n- findings left UNVERIFIED with reason.\n\nIf zero findings, explicitly state:\n\n```text\nNo confirmed findings — all validated lanes CLEAN.\n```\n\nThen provide a lane-by-lane clean summary.\n\n## Confirmed findings\n\nFor each finding:\n\n```text\nF-001 — Severity — Category — Root cause\nFiles: path:line, path:line\nStatus: CONFIRMED \u002F critic status\nEvidence type: STRUCTURALLY_PROVEN \u002F EXECUTION_PROVEN \u002F STATIC_TRACE_PROVEN\nWhy it matters:\nValidation:\nFalsification probe:\nSuggested fix:\n```\n\n## Pre-existing findings\n\nList separately from PR-introduced findings.\n\n## Unverified but plausible risks\n\nOnly include if useful and clearly labeled as unverified.\n\n## Test \u002F coverage gaps\n\nFocus on missing tests that would catch real risks, not generic coverage requests.\n\n## Disproved candidates and false positives\n\nList concise reasons for notable false positives from explorers, tools, council agents, or reviewers.\n\n## Verdict\n\nUse one of:\n\n- `APPROVE`\n- `APPROVE_WITH_NOTES`\n- `REQUEST_CHANGES`\n- `BLOCK`\n\n## Merge recommendation\n\nExplain the recommendation in one short paragraph and list required actions before merge if applicable.\n\n## Feedback handoff\n\nWhen the review produced actionable validated findings or operational blockers,\ninclude:\n\n- the handoff artifact path,\n- the preserved finding IDs and provenance that `swarm-pr-feedback` must carry\n  forward,\n- and an explicit question asking whether to continue into\n  `swarm-pr-feedback`.\n\nUse this exact continuation prompt format:\n\n```text\n\u002Fswarm pr-feedback \u003CPR_URL> continue from .swarm\u002Fpr-review\u002F\u003Crun_id>\u002Ffeedback-handoff.md\n```\n\n---\n\n# Reviewer Prompt Template\n\nUse this template when dispatching reviewer subagents:\n\n```text\nYou are the independent reviewer. Validate only the candidates assigned below.\nDo not search for new issues except where needed to validate reachability or mitigation.\nDo not trust explorer severity.\n\nContext pack summary:\n- scope: ...\n- obligations: ...\n- impact cone: ...\n- deterministic signals: ...\n- relevant Swarm artifacts \u002F knowledge: ...\n- base_ref: \u003Ccommit SHA of base branch>\n- head_ref: \u003Ccommit SHA of PR head branch>\n\nCandidates:\n- ...\n\nFor each candidate, return:\n[REVIEWED] | candidate_id | CONFIRMED\u002FDISPROVED\u002FUNVERIFIED\u002FPRE_EXISTING | evidence_type | final_severity | introduced_by_pr | file:line | rationale | falsification_probe | reviewer_id\n\nYou must check caller context, reachability, schema\u002Fmiddleware\u002Fframework mitigations, state-machine constraints, test coverage, PR-introducedness, and severity.\n\nIMPORTANT: If a finding claims behavior is \"new\" or \"introduced by the PR\", you MUST read the equivalent code on the base branch (git show \u003Cbase_ref>:\u003Cfile>) to verify it was not present before. A reviewer claim of \"this is new\" is invalid without base-branch evidence. Do not compare the new code to an idealized baseline — compare it to what actually existed on the base branch at the time of the PR.\n```\n\n---\n\n# Critic Prompt Template\n\nUse this template when dispatching critic subagents:\n\n```text\nYou are the adversarial critic. Challenge only reviewer-confirmed findings assigned below.\nYour goal is to reduce false positives, severity inflation, and non-actionable reports.\n\nFor each finding, challenge:\n- whether evidence proves the claim,\n- whether the path is reachable,\n- whether mitigations apply,\n- whether severity is inflated,\n- whether it is PR-introduced,\n- whether suggested fixes are safe\u002Factionable,\n- whether related files were missed,\n- whether multiple findings should be grouped.\n\nReturn:\n[CRITIC] | finding_id | UPHELD\u002FDOWNGRADED\u002FDISPROVED\u002FNEEDS_MORE_EVIDENCE | final_severity | reason | required_report_change\n\nREQUIRED FINAL LINE — your final line MUST be exactly the row above (no variations, no labeled fields, no placeholders):\n[CRITIC] | finding_id | UPHELD\u002FDOWNGRADED\u002FDISPROVED\u002FNEEDS_MORE_EVIDENCE | final_severity | reason | required_report_change\n\nA response without this exact row is treated as a planning preamble and re-dispatched. Do not output only a planning or investigation message.\n```\n\n---\n\n# Explorer Prompt Template\n\nUse this template when dispatching base explorer or micro-lane agents:\n\n```text\nYou are an explorer. Optimize for recall, not final judgment.\nReturn candidates only. Do not use CONFIRMED, DISPROVED, or PRE_EXISTING.\n\nLane:\nScope:\nObligations:\nChanged files\u002Fhunks:\nImpact cone:\nRelevant deterministic signals:\nRelevant Swarm artifacts \u002F knowledge:\nChecklist:\n\nYou must inspect or mark unavailable:\n1. changed hunk,\n2. caller\u002Fconsumer,\n3. callee\u002Fdependency,\n4. sibling implementation or prior pattern,\n5. nearest test or missing-test location,\n6. deterministic signals,\n7. Swarm artifacts\u002Fknowledge.\n\nReturn:\n[CANDIDATE] | candidate_id | lane | severity | category | file:line | claim | evidence_summary | impact_context | confidence\n```\n\nThe orchestrator extracts candidates from the full lane artifact via\n`parse_lane_candidates` as the primary mechanism. The `[CANDIDATE]` row\nformat above is a fallback convention for environments where the parser is\nunavailable. Explorers should still emit structured records regardless of\nwhether the parser is present.\n\nDo not let speed degrade validation quality.\n","# \u002Fswarm-pr-review\n\nRun a structured, high-confidence PR review that maximizes valid findings without flooding the user with unvalidated noise.\n\nThe review ladder is:\n\n**Scope → obligations → context pack → deterministic signals → parallel explorers → triggered Swarm micro-lanes → independent reviewer validation → critic challenge → grouped synthesis → metrics \u002F knowledge writeback.**\n\n## Handoff To PR Feedback\n\nUse `..\u002Fswarm-pr-feedback\u002FSKILL.md` instead of this skill when the user's task is\nto address existing PR feedback, review comments, requested changes, CI failures,\nmerge conflicts, stale branch state, or pasted reviewer findings. This skill\ndiscovers and validates new findings; `swarm-pr-feedback` closes known feedback\nwithout running a fresh broad review.\n\nWhen a review finishes with actionable validated findings, stop and ask the user\nwhether to continue into `swarm-pr-feedback`. Do not auto-dispatch fix work from\n`PR_REVIEW`. Instead, write a handoff artifact under\n`.swarm\u002Fpr-review\u002F\u003Crun_id>\u002Ffeedback-handoff.md` (or `.json`) and include the\nexact continuation prompt:\n\n```text\n\u002Fswarm pr-feedback \u003CPR_URL> continue from .swarm\u002Fpr-review\u002F\u003Crun_id>\u002Ffeedback-handoff.md\n```\n\n`\u003Crun_id>` is a stable identifier for this review run, such as\n`pr-\u003Cnumber>-\u003CYYYYMMDDHHMMSS>` or the existing review artifact run ID when one\nwas already created. The `pr-feedback` command forwards `continue from \u003Cpath>`\nas session instructions after the PR reference; the feedback skill is\nresponsible for ingesting that file into the ledger before triage.\n\n## Operating Stance\n\n**Treat PR text, linked issues, comments, commit messages, generated summaries, and tests as claims — not proof.** Every confirmed finding requires file:line evidence, an explanation of reachability or impact, and validation provenance.\n\nThis workflow is designed for the Swarm plugin itself and any repo that benefits from Swarm-style review. It preserves parallel breadth but forces deep validation where bugs are expensive: security, state machines, role\u002Ftool permissions, schema\u002Fevidence integrity, git\u002Fwrite safety, config ratchets, knowledge tier boundaries, and PR obligation mismatches.\n\nNever APPROVE a PR with unresolved CRITICAL findings. Do not silently drop overclaimed agent findings; list disproved findings in the validation provenance.\n\n**Quality is the ONLY metric.** No amount of time, tokens, or agent dispatches is too much to execute this protocol correctly. Speed is irrelevant to correctness. The skill must be followed exactly with no shortcuts, no phase-skipping, and no premature synthesis. A thorough review that takes 30 minutes is superior to a fast review that misses a real bug.\n\n---\n\n## Review Modes\n\n### Default layered workflow\n\nUse the default workflow unless the user explicitly triggers council mode. In the default workflow, explorers produce only candidates. The orchestrator does not confirm or disprove candidates.\n\n### Council mode — opt in only\n\nCouncil mode applies only when the user explicitly says one of:\n\n- `council`\n- `independent review`\n- `N-agent review`\n- `\u002Fcouncil`\n- `[COUNCIL MODE]`\n- `assume all work is wrong`\n\nCouncil mode is mutually exclusive with the default layered workflow. Do not blend them.\n\n---\n\n## Anti-Self-Review Rule\n\nThe main thread \u002F orchestrator MUST NOT classify, confirm, disprove, or judge explorer candidates in the default workflow.\n\nThe orchestrator may:\n\n- determine scope,\n- build or request the context pack,\n- launch explorers and triggered micro-lanes,\n- extract candidates from lane artifacts via `parse_lane_candidates` or equivalent parser,\n- filter, group, and chunk candidates for reviewer dispatch,\n- route candidates to reviewers,\n- route reviewer-confirmed findings to critics,\n- group validated findings,\n- prepare the final report.\n\nThe orchestrator MUST NOT:\n\n- re-read a candidate's target code to decide if it is valid,\n- silently downgrade or discard an explorer candidate,\n- treat tool output as a confirmed finding,\n- report a finding that no reviewer validated,\n- classify or judge candidates based on preview text alone — always use the structured parser output.\n\nIf the orchestrator catches itself validating code, it must stop and delegate validation to a reviewer subagent.\n\nException: in explicit Council mode only, the main thread may act as the independent reviewer as described in the Council Mode section. Prefer a reviewer subagent when available.\n\n---\n\n## Scope Detection\n\nDetermine review scope using this priority:\n\n1. explicit user-provided PR URL, PR number, commit, branch, or file scope,\n2. current feature branch diff vs `origin\u002Fmain`, `main`, `origin\u002Fmaster`, or `master`,\n3. staged changes,\n4. latest commit,\n5. user-specified files or directories.\n\nRecord:\n\n- base ref,\n- head ref,\n- commit range,\n- changed files,\n- deleted files,\n- generated files,\n- lockfiles,\n- test files,\n- docs\u002Fconfig\u002Fschema files,\n- whether the working tree is dirty.\n\nIf scope cannot be determined, review the narrowest safe scope available and state the limitation.\n\n### Pre-flight git ref availability\n\nBefore launching explorers (Phase 3), confirm the PR branch refs are available:\n- If `head_ref` is a remote branch that is not checked out locally, fetch it via `git fetch origin \u003Chead_ref>`\n- **Check out the head branch locally.** Explorer agents read files from the working tree, not from git history — passing the commit range in the delegation prompt is not sufficient because `Read` \u002F `Glob` \u002F `Grep` tools operate on the filesystem. Without a checkout, explorers silently read the base branch's version of changed files and produce invalid candidates. **Before checking out, verify the working tree is clean (`git status --porcelain`). If uncommitted changes exist, stash them or abort the checkout to prevent data loss.**\n- Explicitly pass the commit range (`base_ref..head_ref`) in every explorer delegation so explorers have the revision context for `git show` commands if they need to inspect specific versions.\n\nIf refs cannot be fetched or checked out, state the limitation in the context pack.\n\n## Phase 0A: Existing PR Signal Ingestion\n\nWhen reviewing a PR, ingest and triage every existing signal BEFORE starting\nPhase 0. These are candidate generators and obligation sources, not\npre-confirmed findings.\n\n### PR title and body compliance check\n\nBefore deeper analysis, verify the PR meets the commit-pr skill's publication contract (the CI `pr-standards` check enforces the same requirements server-side — this step surfaces issues earlier):\n\n- **Title format:** `\u003Ctype>(\u003Cscope>): \u003Cdescription>` — lowercase description, no trailing period, allowed types: `feat`, `fix`, `perf`, `revert`, `docs`, `chore`, `refactor`, `test`, `ci`, `build`.\n- **Body contract:** `Closes #\u003Cissue-number>` as the first line (when the PR resolves an issue), followed by `## Summary`, `## Invariant audit` (all 12 invariants), and `## Test plan` sections.\n\n**`Closes #N` claim integrity (apply the COVERAGE GATE):** if the PR body claims `Closes #\u003Cissue-number>`, verify (a) the issue is currently open (`gh issue view \u003CN> --json state`), and (b) the diff addresses the issue's acceptance criteria (read the issue, map each criterion to changed files\u002Fsymbols, and inspect the diff for those areas). If the issue is already closed by another merged PR, do NOT re-close it — the duplicate `Closes #N` reference is misleading and will confuse release-please aggregation. If the issue is open but the diff does not address the acceptance criteria, mark the claim as `UNVERIFIED — claim integrity` in the validation provenance and report INCOMPLETE to the user.\n\nNon-compliance is a ledger item (advisory, not blocking — CI will catch it). If the PR is from an external contributor, note the compliance gap for the maintainer to address before merge.\n\nThis intake includes:\n\n- review comments, review summaries, requested changes, and bot findings,\n- CI\u002Fcheck failures, annotations, and relevant logs,\n- mergeability\u002Fconflicts, `mergeStateStatus`, and stale\u002Fbase-drift state,\n- PR body claims, linked issues, acceptance criteria, and test-plan claims,\n- commit messages and app\u002Fbot commits on the PR branch.\n\nWhen thread resolution state matters, prefer GraphQL review-thread inspection.\nIf GraphQL is unavailable, keep the signal and mark\n`resolution_state: UNKNOWN`; do not drop it from scope.\n\n### Step 1 — Fetch all PR feedback surfaces\n\n```bash\n# Issue comments (general PR thread)\ngh pr view \u003CPR_NUMBER> --json comments\n\n# Review comments (inline code comments)\ngh api repos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR_NUMBER}\u002Fcomments\n\n# Review summaries (approve\u002Frequest-changes\u002Fcomment events)\ngh pr view \u003CPR_NUMBER> --json reviews\n\n# Bot\u002Fautomated reviews (Copilot, Codex, CodeRabbit, etc.)\n# Inline review comments — use REST API for reliable bot detection via user.type\ngh api repos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR_NUMBER}\u002Fcomments --jq '.[] | select((.user.type \u002F\u002F \"\") == \"Bot\" or (.user.login \u002F\u002F \"\" | test(\"bot|copilot|coderabbit|codex\"; \"i\")))'\n```\n\nFor general PR comments (not inline), use the issue comments endpoint:\n```bash\ngh api repos\u002F{owner}\u002F{repo}\u002Fissues\u002F{PR_NUMBER}\u002Fcomments --jq '.[] | select((.user.type \u002F\u002F \"\") == \"Bot\" or (.user.login \u002F\u002F \"\" | test(\"bot|copilot|coderabbit|codex\"; \"i\")))'\n```\n\n### Step 2 — Classify each comment\n\n| Category | Action |\n|----------|--------|\n| **Human review with file:line evidence** | Add as candidate finding with `source: existing-review` — still needs reviewer validation |\n| **Bot\u002Fautomated finding with specific code reference** | Add as candidate finding with `source: bot-review` — high false-positive rate, treat as unverified |\n| **General feedback \u002F style preference** | Add as advisory obligation |\n| **Resolved\u002Foutdated comment** | Skip — note in report under \"Ingested Resolved Comments\" |\n| **Requested changes not yet addressed** | Add as HIGH-priority obligation |\n\n### Step 3 — Merge into review pipeline\n\nAll ingested comments become candidate findings or obligations. They follow the\nsame Phase 3-8 pipeline as freshly discovered findings. Ingested findings are\nNOT pre-confirmed — they still require independent reviewer validation per the\nAnti-Self-Review Rule.\n\n**Comment-ledger output:**\n```\n[INGESTED] | source | category | file:line (if applicable) | original_author | status: PENDING_VALIDATION \u002F SKIPPED_OUTDATED \u002F ADVISORY\n```\n\n### Anti-patterns\n- ✗ Ignoring bot reviews because \"bots produce false positives\" — they also catch real issues\n- ✗ Pre-confirming human review comments without independent validation — even senior reviewers make mistakes\n- ✗ Skipping inline review comments and only reading the summary — inline comments contain the evidence\n\n## Phase 0B: Mergeability and Branch-State Intake\n\nBefore investing effort in review lanes, verify the PR is mergeable and record\nbranch-state signals. `PR_REVIEW` remains read-only: do not resolve conflicts,\ncommit, push, rebase, merge, or reset from this mode. Instead, carry current\nmergeability, stale-head, and branch-drift facts into the review ledger and the\nfeedback handoff artifact.\n\n### Step 1 — Check merge state\n\n```bash\ngh pr view \u003CPR_NUMBER> --json mergeable,mergeStateStatus\n```\n\nThe response has two independent fields. Handle each:\n\n**`mergeable` field** — whether GitHub can compute mergeability:\n| Value | Meaning | Action |\n|-------|---------|--------|\n| `MERGEABLE` | No conflicts detected | Proceed — check `mergeStateStatus` below |\n| `CONFLICTING` | Merge conflicts exist | Record the blocker, keep the review read-only, and hand conflict resolution to `swarm-pr-feedback` |\n| `UNKNOWN` | GitHub still computing | Wait 30s, re-check |\n\n**`mergeStateStatus` field** — overall branch state:\n| Value | Action |\n|-------|--------|\n| `CLEAN` | All checks pass, no conflicts — proceed to Phase 0 |\n| `BEHIND` | Branch behind base — note in report; non-blocking if merge queue handles it |\n| `DIRTY` | Merge conflicts exist — keep reviewing, but record the conflict as a first-class blocker in the ledger and handoff artifact |\n| `BLOCKED` | External blocker (branch protection, failing required check) — investigate and record the blocker |\n\n### Step 2 — Record conflicts and blockers (when CONFLICTING or DIRTY)\n\nWhen the PR has merge conflicts:\n\n1. **Determine the PR's base branch and verify the state:**\n   ```bash\n   BASE_REF=$(gh pr view \u003CPR_NUMBER> --json baseRefName --jq '.baseRefName')\n   git fetch origin $BASE_REF\n   gh pr view \u003CPR_NUMBER> --json mergeable,mergeStateStatus,baseRefName,headRefName\n   ```\n\n2. **Capture the affected scope without changing the branch:**\n   - List the files or subsystems implicated by the conflict if GitHub exposes them,\n     or note that the exact conflict set is still unknown.\n   - Identify whether the conflict appears mechanical (lockfile \u002F generated output \u002F\n     simple overlap) or semantic (logic changed on both sides). This is triage\n     signal for the follow-on feedback run, not permission to resolve it here.\n\n3. **Record explicit next action for the handoff artifact:**\n   - `CONFLICT-### | mechanical | likely resolvable during pr-feedback`\n   - `CONFLICT-### | semantic | requires focused fix + validation during pr-feedback`\n   - `STALE-### | behind base by policy` when the branch is only stale, not conflicted\n\n4. **Document in report:** List the branch-state facts, why they matter to the\n   review, and what `swarm-pr-feedback` must verify before it edits code.\n\n### Conflict resolution anti-patterns\n- ✗ Accepting \"ours\" or \"theirs\" for all conflicts without reading them\n- ✗ Resolving semantic conflicts without understanding both sides\n- ✗ Pushing resolution without running tests on the merged result\n- ✗ Treating `PR_REVIEW` as the place to fix branch state — this mode stays read-only\n\n## Phase 0B-bis: Pre-Handoff Parallel Work Snapshot\n\nWhen the review surfaces findings that will likely need `swarm-pr-feedback`,\nre-check for **parallel work** since the last fetch. The PR author, the bot\nreviewer, or another swarm may have pushed commits while you were reviewing.\nThis is still read-only: capture the remote state so the handoff artifact starts\nfrom the right branch facts.\n\n### Step 1 — Refetch and compare\n\n```bash\ngit fetch origin \u003Cpr-branch>\ngit log HEAD..origin\u002F\u003Cpr-branch> --oneline\n```\n\n### Step 2 — Evaluate new commits\n\nFor each new commit on the remote:\n\n1. **Read the commit message and diff.** Use `git show \u003Ccommit> --stat` to see\n   file scope, then `git show \u003Ccommit> -- \u003Cfile>` to see the actual changes.\n2. **Compare against the pending handoff scope:**\n   - Does the remote commit touch the same files as the validated findings?\n   - Does the remote commit appear to already address a finding you planned to\n     hand off?\n   - Does the remote commit introduce a new branch-state fact the handoff should\n     mention?\n3. **Default stance: prefer the remote state as the next baseline.** Run\n   the [`parallel-work-check`](..\u002Fgenerated\u002Fparallel-work-check\u002FSKILL.md)\n   protocol for the formal decision template and record the outcome in the\n   handoff artifact.\n\n### Step 3 — Three outcomes\n\n- **Parallel work supersedes:** Mark the older local checkout as stale in the\n  handoff artifact and tell `swarm-pr-feedback` to re-check out the current\n  remote head before editing.\n- **Parallel work complements:** Carry both the validated findings and the new\n  remote commits into the handoff artifact so `swarm-pr-feedback` can verify the\n  combined state before patching.\n- **Parallel work unrelated:** Note that the remote moved, but keep the same\n  validated finding set.\n\n### Anti-patterns\n\n- ✗ Pushing your fix without checking if the remote already fixed it — causes\n  duplicate work and may even fail the push if the commits conflict\n- ✗ Force-pushing over parallel work because \"I started this first\" — the\n  parallel agent may have access to context you don't (different swarm\n  configuration, different model, different time budget)\n- ✗ Blindly taking remote work without verifying it's actually better — the\n  parallel work may be incomplete or take a different approach that doesn't\n  match the original finding's intent\n\n### Example: parallel swarm superseded local fix work\n\n```\nPARALLEL WORK CHECK (pre-fix):\n- Branch: copilot\u002Ffix-legacy-hive-data-migration\n- Local HEAD: 3c04997c fix: resolve PR #1238 review findings\n- Remote HEAD: 79d7ec64 fix(knowledge-migrator): harden legacy migration loop\n- Diverged: yes (remote is 2 commits ahead with more comprehensive fix)\n- New commits on remote: 2\n- Parallel swarm work detected: yes (different author)\n- Decision: abandon-use-remote\n- Rationale: Remote added 17 unit tests + try\u002Fcatch error handling that\n  surpassed my planned batch-rewrite. Verified by re-running the test suite:\n  remote has 25\u002F25 passing, my local plan would have produced 9\u002F9.\n```\n\n---\n\n# Default Review Workflow\n\n## Phase 0: Context Pack and Review Signal Collection\n\nBefore launching explorers, build a compact `swarm-pr-review-context` in scratch or as a local artifact if file writes are allowed.\n\nThe context pack must include, when available:\n\n```json\n{\n  \"scope\": {\n    \"base_ref\": \"...\",\n    \"head_ref\": \"...\",\n    \"commit_range\": \"...\",\n    \"changed_files\": [],\n    \"changed_hunks\": [],\n    \"public_api_changes\": [],\n    \"deleted_or_renamed_files\": [],\n    \"generated_files\": []\n  },\n  \"pr_metadata\": {\n    \"title\": \"...\",\n    \"body_claims\": [],\n    \"checkboxes\": [],\n    \"linked_issues\": [],\n    \"review_comments\": [],\n    \"commit_messages\": []\n  },\n  \"obligations\": [],\n  \"repo_graph\": {\n    \"source\": \".swarm\u002Frepo-graph.json or fallback search\",\n    \"changed_symbols\": [],\n    \"callers\": [],\n    \"callees\": [],\n    \"imports\": [],\n    \"exports\": [],\n    \"sibling_implementations\": []\n  },\n  \"deterministic_signals\": {\n    \"ci\": [],\n    \"tests\": [],\n    \"coverage_delta\": [],\n    \"lint_typecheck_build\": [],\n    \"security_scanners\": [],\n    \"dependency_audit\": [],\n    \"secrets_scan\": [],\n    \"mutation_testing\": []\n  },\n  \"swarm_artifacts\": {\n    \"evidence_bundles\": [],\n    \"knowledge_hits\": [],\n    \"phase_state\": [],\n    \"metrics\": []\n  },\n  \"risk_triggers\": []\n}\n```\n\n### Context pack rules\n\n- Diff-only review is allowed for quick orientation, but not enough to confirm nontrivial findings.\n- For every changed production file, identify at least one caller, consumer, import path, route entrypoint, or reason none exists.\n- If `.swarm\u002Frepo-graph.json` exists, use it to seed impact cones.\n- If no repo graph exists, build a shallow impact cone using imports, exports, symbol search, route registration, CLI registration, or test references.\n- Pull in relevant `.swarm\u002Fevidence\u002F`, `.swarm\u002Fstate`, `.swarm\u002Fknowledge`, or hive\u002Fproject knowledge entries when present.\n- Historical knowledge may guide candidate generation but cannot confirm a finding by itself.\n- Mark stale, quarantined, or cross-project knowledge as advisory until independently verified in this repo.\n\n---\n\n## Phase 1: Intent Reconstruction \u002F Obligation Extraction\n\nReconstruct what the PR is obligated to deliver before looking for bugs.\n\nUse deterministic precedence, highest to lowest:\n\n1. PR checkboxes and acceptance criteria,\n2. linked issues \u002F tickets,\n3. explicit user request in the current conversation,\n4. commit scopes and commit messages,\n5. test names and test assertions,\n6. interface diff \u002F exported API changes,\n7. changelog, README, migration, or docs edits,\n8. LLM synthesis only when no higher-precedence source exists.\n\nOutput an obligation list:\n\n```text\nO-001 | source | claim | affected files\u002Fsymbols | status: UNVERIFIED | evidence refs: []\n```\n\nFor each obligation, record:\n\n- source,\n- exact claim,\n- affected files or symbols,\n- verification status: `UNVERIFIED → IN_PROGRESS → MET \u002F PARTIALLY_MET \u002F NOT_MET \u002F UNVERIFIABLE`,\n- linked finding ID when unmet,\n- reason if unverifiable.\n\nTests are claims. A passing or added test does not prove the obligation unless the reviewer inspects the assertion strength and relevant code path.\n\n### Quantitative claim verification\n\nPR body numerical claims (test counts, coverage percentages, assertion counts, performance benchmarks) are obligations, not proof. For each quantitative claim:\n\n1. Extract the claim and its source (PR body, comment, commit message).\n2. Verify against actual tool output or CI artifacts when available.\n3. If the claim cannot be independently verified, mark the obligation `UNVERIFIABLE` with reason.\n4. If the claim is disproved by evidence, create a finding linking the discrepancy.\n\nCommon patterns to verify:\n- \"N tests pass\" → count actual test results from CI logs or test runner output\n- \"N% coverage\" → compare against coverage report\n- \"No regressions\" → verify against test runner failure count\n\n---\n\n## Phase 2: Deterministic Signal Ingestion\n\nIngest deterministic signals as candidate generators. They are never final findings.\n\nUse available local artifacts first. Run safe read-only or standard project validation commands only when appropriate for the environment.\n\nCandidate signal sources include:\n\n- CI failures and logs,\n- test failures,\n- coverage delta,\n- lint\u002Ftypecheck\u002Fbuild output,\n- `git diff --check`,\n- dependency audit output,\n- lockfile diff,\n- CodeQL alerts,\n- Semgrep or SAST findings,\n- secrets scan findings,\n- license scan findings,\n- mutation testing output,\n- package manager warnings,\n- generated schema diffs.\n\nRecord each signal as:\n\n```text\n[TOOL_CANDIDATE] | tool | severity | file:line | claim | raw_signal_summary | confidence\n```\n\nTool candidate rules:\n\n- Confirm reachability before reporting.\n- Confirm PR-introducedness before reporting as a PR blocker.\n- Confirm that a framework, schema, middleware, caller guard, or test isolation rule does not already mitigate it.\n- Do not report scanner output verbatim without reviewer validation.\n- Redact secrets; never paste raw credentials into the final output.\n\n---\n\n## Phase 3: Parallel Base Explorer Lanes\n\nLaunch all base lanes with `dispatch_lanes_async` when available. Pass the six lane specs together, set `max_concurrent` to `6`, record the returned `batch_id`, and continue only non-dependent architect work: refine the obligation ledger, inspect PR metadata, prepare micro-lane trigger checks, and run deterministic read-only local tools. Do not synthesize findings from running lanes. Keep each lane `prompt` compact: send the shared review context (PR diff, obligation ledger, scope) ONCE via the `common_prompt` field, or have lanes read it from a file by absolute path, instead of inlining the same large blob into all six prompts — oversized inline prompts produce malformed or truncated tool-call JSON and force clumsy file workarounds.\n\n**Incremental collection:** While base lanes are running, poll with `collect_lane_results` (without `wait` or `wait: false`) to check progress and process settled lanes as they complete — call `retrieve_lane_output` for full text when `output_ref` is present, then extract candidates via `parse_lane_candidates`, update the candidate ledger, validate output quality — while continuing independent architect work (obligation refinement, micro-lane trigger checks, local reads) between polls. Only use `wait: true` if lanes are still pending and no more independent work remains.\n\nBefore Phase 4 or synthesis, all base lanes must be settled. `dispatch_lanes_async` accepts a maximum of 8 lanes per call; base lanes (6) and micro-lanes (Phase 4) are dispatched in separate calls by design. Do not let one lane's conclusions bias another lane.\n\n**COVERAGE GATE — zero tolerance for unclosed gaps.** After `collect_lane_results`, verify every lane produced validated output. Two failure modes exist:\n- **Mode A (empty output):** Lane returns 0 chars, `status: cancelled`, `output_digest` matches SHA-256 of empty string (`e3b0c442...b855`).\n- **Mode B (intermediate reasoning only):** Lane reports `status: completed` with non-empty output, but the output is preliminary reasoning (\"Now let me check...\") with zero `[CANDIDATE]` rows. The `output_digest` does NOT match the empty-string hash. `parse_lane_candidates` returns 0 candidates. This mode is MORE dangerous — the lane appears successful but produced no findings.\n\nFor ANY lane that failed (either mode):\n1. **Retry** (max 2 attempts) with materially different parameters — different session, different prompt decomposition, or blocking `dispatch_lanes`.\n2. If retries fail, **deploy an equivalent alternative** and **verify equivalence**: same agent type, same prompt, same scope, same isolation. State the equivalence verification explicitly. Task is not an early-poll or empty-partial-output fallback; use it only as a last-resort equivalent dispatch mechanism after `dispatch_lanes_async` is unavailable or a settled lane result is confirmed failed\u002Fempty, and after blocking `dispatch_lanes` is unavailable or inappropriate. Use `retrieve_lane_output` to inspect the full artifact before declaring equivalence or failure.\n3. If no equivalent alternative can be verified, **report to the user as INCOMPLETE**. Present partial findings from successful lanes alongside the INCOMPLETE verdict. The user decides whether to accept reduced coverage. The architect NEVER makes that call.\n\n### Candidate extraction via parser\n\nAfter `collect_lane_results` returns for base lanes, process each lane result\nthat carries an `output_ref`. The orchestrator MUST use the candidate parser\nrather than preview-text extraction:\n\n1. For each `output_ref` (or batched), call `parse_lane_candidates` (or the\n   internal `parseAndPersist` module function) with `output_ref` and `producer`\n   flags; the parser auto-detects the format family per row. The parser reads\n   the full artifact from disk (no preview truncation issue) and returns\n   structured `ParseResultWithSidecar` records.\n2. Filter the returned `candidates[]` array by `producer: \"swarm-pr-review\"` and\n   the relevant `row_format_family` (e.g., `base_explorer` for base lanes,\n   `micro_lane` for micro-lanes). Filtering happens on the parsed results, NOT\n   on the tool input.\n3. Group the filtered candidates into reviewer-sized chunks:\n   - by file area (group by the directory or module of the `file_line` field),\n   - by category (group by the `category` field),\n   - by count (target max 50 candidates per chunk; smaller chunks are fine).\n4. Dispatch reviewer lanes (one per chunk) with bounded in-context candidate\n   lists. Each reviewer lane receives only the candidates from its assigned\n   chunk.\n\nIf a lane has `output_degraded: true`, `transcript_incomplete: true`, or no usable `output_ref`, apply the COVERAGE GATE from Phase 3: retry (max 2) with materially different parameters, deploy a verified equivalent alternative, or report INCOMPLETE to the user. Do not mark affected candidates UNVERIFIED to proceed past the gap. Never infer candidate absence from a preview.\n\n**Fallback convention:** If the parser is unavailable, the explorer MAY emit\n`[CANDIDATE]` rows in the lane output as a fallback convention (see the\nExplorer Prompt Template at the end of this skill), but the orchestrator\nSHOULD use the parser as the primary extraction mechanism.\n\n**lane id uniqueness for parallel dispatches:** When re-dispatching failed or\nre-running explorer lanes, every `dispatch_lanes_async` or `dispatch_lanes`\nlane `id` MUST be unique within that dispatch batch and should include lane and\nattempt suffixes (e.g., `pr_review_explore_lane1_attempt2`). Never reuse an id\nin the same batch unless intentionally replacing that exact lane before dispatch.\n\nExplorers optimize for recall. Over-reporting is expected. Explorers produce candidates only.\n\nThe six lanes are a fixed **check-type** partition (correctness \u002F security \u002F deps \u002F docs \u002F tests \u002F performance), not an area partition: the count is intentionally constant — every PR needs all six review dimensions — and the lanes deliberately overlap by file, each receiving the same diff via `common_prompt` and viewing it through a different lens. This is the deliberate exception to surface-scaled fan-out: the base wave is a fixed six by design, never collapsed or expanded with the size of the change. Coverage is guaranteed by the six dimensions each reading the whole diff, not by partitioning files across lanes — so the disjoint-partition rule that governs area-split fan-outs does not apply to these check-type lanes.\n\n| Lane | Focus | Required checks |\n|---|---|---|\n| Lane 1: Correctness and edge cases | Logic errors, null\u002Fundefined handling, incorrect operators, async ordering, races, off-by-one, error paths | input domain, nullability, async\u002Fawait, loop termination, exception behavior, backward compatibility |\n| Lane 2: Security and trust boundaries | Injection, authz\u002Fauthn bypass, SSRF, path traversal, secret exposure, unsafe deserialization, prompt injection | untrusted input sources, sanitization, credential handling, permission boundary, private network access, output escaping |\n| Lane 3: Dependencies and deployment safety | Import changes, version bumps, lockfile drift, breaking APIs, package scripts, runtime assumptions | lockfile consistency, new transitive deps, Node\u002FBun\u002Fruntime compatibility, platform assumptions, license red flags |\n| Lane 4: Docs, intent, and drift | PR claims vs implementation, docs mismatch, migration\u002Fchangelog gaps, stale examples | obligation mapping, changed behavior not documented, docs promising behavior not implemented |\n| Lane 5: Tests and falsifiability | Weak assertions, missing edge tests, flaky patterns, mock leakage, fixture drift | assertion strength, tautology patterns (`expect(true).toBe(true)`, `expect(res).toBeDefined()` without further checks), `assertDoesNotThrow` wrapping trivial code), negative paths, isolation, deterministic timing, cross-platform path coverage |\n| Lane 6: Performance and architecture | Complexity regressions, memory leaks, over-coupling, inefficient graph scans, global mutable state | algorithmic deltas, caching, resource lifecycle, state ownership, architectural boundary violations |\n\n### Explorer context contract\n\nEvery explorer must inspect or explicitly mark unavailable:\n\n1. the changed hunk,\n2. at least one caller, consumer, or downstream impact-cone node,\n3. at least one callee, dependency, or upstream assumption,\n4. at least one sibling implementation or prior pattern,\n5. the nearest relevant test or missing-test location,\n6. deterministic signal entries mapped to its files\u002Fsymbols,\n7. relevant Swarm knowledge\u002Fevidence entries, if present.\n8. the commit range to analyze (`base_ref..head_ref`),\n\n### Explorer output format\n\nExplorers emit structured candidate records. The parser reads the full lane\nartifact and extracts these records. The canonical record shape is:\n\n```text\n[CANDIDATE] | candidate_id | lane | severity | category | file:line | claim | evidence_summary | impact_context | confidence: LOW\u002FMEDIUM\u002FHIGH\n```\n\nThe parser normalizes this into a structured `candidates[]` array. If the\nparser is unavailable, the explorer MAY emit the `[CANDIDATE]` row format\ndirectly in the lane output as a fallback convention.\n\nExplorers must not use `CONFIRMED`, `DISPROVED`, or `PRE_EXISTING`.\n\n---\n\n## Phase 4: Triggered Swarm Plugin Micro-Lanes\n\nAfter base lanes are settled, inspect the context pack risk triggers. Launch focused micro-lanes for triggered categories only, using `dispatch_lanes_async` again when more than one read-only micro-lane is needed (`dispatch_lanes_async` accepts max 8 lanes per call — micro-lanes are dispatched in a separate batch from base lanes). Use the same incremental collection pattern: poll with `collect_lane_results` (without `wait`) to process settled micro-lanes while continuing independent work, falling back to `wait: true` only when no independent work remains. All micro-lanes must be settled before reviewer classification. Do not launch irrelevant micro-lanes.\n\nApply the same parser-based extraction to micro-lanes: call `parse_lane_candidates` on each micro-lane `output_ref` (filter the returned `candidates[]` array by `row_format_family === \"micro_lane\"` after parsing). Apply the COVERAGE GATE from Phase 3 to micro-lanes: degraded, incomplete, or candidate-less lane artifacts are coverage gaps that must be closed by retry, verified equivalent alternative, or reported as INCOMPLETE — not treated as clean negative evidence.\n\nEach micro-lane receives:\n\n- exact files and hunks in scope,\n- related obligations,\n- impact cone entries,\n- relevant deterministic signals,\n- related historical knowledge with quarantine\u002Fstaleness status,\n- expected invariants,\n- structured candidate output (parser-extracted). If the parser is unavailable,\n  the micro-lane MAY emit `[CANDIDATE]` rows as a fallback convention.\n\n### Swarm plugin risk trigger map\n\n| Trigger in diff or context pack | Launch micro-lane | Invariants to check |\n|---|---|---|\n| `agents`, `prompts`, `templates`, prompt interpolation, role text | Architect prompt integrity | no scope escape, no system prompt leakage, safe `{{variable}}` interpolation, untrusted text isolated from instructions |\n| `council`, `verdict`, `quorum`, `veto`, synthesis | Council orchestration | quorum math correct, veto enforced, evidence not lost, dissent preserved, no explorer result treated as final |\n| `guardrail`, `gate`, `delegation`, `rate limit`, approval checks | Guardrail bypass paths | gates cannot be skipped, delegation cannot bypass policy, rate limits cannot be reset by user-controlled state |\n| `schema`, `evidence`, JSONL, migrations, serializers | Evidence schema drift | backward compatibility, required fields preserved, version migration safe, malformed evidence rejected |\n| `knowledge`, `curator`, `hive`, `quarantine`, memory | Knowledge base contract | project vs hive tiers not confused, quarantine honored, CRUD semantics stable, stale knowledge not injected as fact |\n| `phase`, `state`, `plan`, `.swarm\u002Fstate`, completion markers | Phase transition validation | ordering enforced, retro requirements handled, no premature completion, rollback safe |\n| `model`, `role`, `prefix`, `tool`, agent config | Model-to-role mapping | role prefix enforced, tool permissions least-privilege, unauthorized tools impossible, model fallback safe |\n| `config`, defaults, ratchet, locks, policy flags | Config ratchet semantics | once-enabled gates cannot silently disable, downgrade attempts detected, lock-state integrity preserved |\n| `url`, `fetch`, `http`, GitHub PR\u002Fissue parsing, package fetch | URL sanitization and external fetch | scheme allowlist, credential stripping, private IP \u002F localhost \u002F metadata IP blocking, redirect handling, timeout safe |\n| `git`, branch, checkout, reset, worktree, `.git` | Git safety | branch detection reliable, no unsafe `reset --hard`, .git protected, path normalization cross-platform, worktree state preserved |\n| `shell`, `exec`, command parser, file writes, delete\u002Fmove\u002Fcopy | Shell\u002Fwrite authority and path containment | destructive commands gated, dry-run preferred, symlink\u002Fpath escape blocked, writes scoped, command injection impossible |\n| `test`, `bun`, mocks, fixtures, CI matrix | Test infrastructure | `bun:test` API correct, mock isolation, cross-platform paths, no hidden dependency on test order, fixtures reset |\n| `metrics`, telemetry, logs, serialized traces | Metrics and evidence privacy | no secrets in logs, evidence reproducible, privacy preserved, counts cannot be gamed, metrics schema stable |\n\nMicro-lane output format:\n\n```text\n[CANDIDATE] | candidate_id | micro_lane | severity | category | file:line | claim | invariant_violated | evidence_summary | confidence\n```\n\n---\n\n## Phase 5: Swarm-Native Verifier Routing\n\nUse Swarm-native agents and artifacts when available. If exact agent names are unavailable, route the same task to the closest equivalent reviewer\u002Fcritic role.\n\n| Swarm verifier \u002F artifact | When to use | Purpose |\n|---|---|---|\n| `critic_drift_verifier` | obligation-vs-code, docs-vs-code, phase\u002Fgate changes, schema\u002Fconfig changes | detect drift between stated behavior and actual implementation |\n| `critic_hallucination_verifier` | external APIs, package claims, URLs, CLI flags, GitHub behavior, model\u002Ftool names | verify claims against source or mark as unverified |\n| `curator_phase` | before exploration and after synthesis | retrieve relevant lessons; write back confirmed true positives \u002F false positives |\n| `test_engineer` | confirmed\u002Fborderline correctness, security, state, schema, or config findings | propose or run falsification probes and regression tests |\n| `prm_scorer` | long or contentious reviews | score whether review trajectory is drifting toward unsupported speculation |\n| `.swarm\u002Frepo-graph.json` | all nontrivial code changes | build impact cones and sibling-pattern checks |\n| `.swarm\u002Fevidence\u002F` | schema, phase, state, council, and guardrail changes | verify evidence compatibility and serialized provenance |\n| `\u002Fswarm metrics` or stored metrics | after synthesis | record review quality and recurring false positives |\n\nVerifier output is advisory until incorporated by the independent reviewer or critic.\n\n---\n\n## Phase 6: Independent Reviewer Confirmation\n\nRoute candidates to reviewer subagents. The orchestrator routes candidates\nin bounded chunks produced by the parser-based extraction in Phase 3-4. Each\nreviewer lane receives a bounded list of candidates from a single chunk — by\nfile area, category, or count — not the full candidate set. The reviewer must\nre-read the candidate's file:line evidence and relevant context pack entries\ndirectly.\n\n### Noise budget and universal validation\n\nBefore reviewer dispatch, the orchestrator may suppress candidates that are ALL of:\n- purely stylistic without correctness, security, test, maintainability, or user-impact implications,\n- exact duplicates of a candidate already queued for validation,\n- explorer-stated confidence=LOW with zero structural evidence (no file:line, no code path, no invariant reference).\n\nEvery suppressed candidate must appear in the final report under \"Suppressed Candidates\" with the reason. Suppression without disclosure is a hard rule violation.\n\n**All remaining candidates — regardless of severity — must be routed to independent reviewer validation.** Severity alone does not determine validation eligibility; it determines routing priority. A LOW-severity candidate with file:line evidence and a specific code path gets the same reviewer attention as a HIGH-severity candidate.\n\nCandidates not routed to reviewers must be listed as UNVERIFIED with reason in the validation provenance. Do not silently drop them.\n\n### Reviewer required checks\n\nFor each candidate, the reviewer must determine:\n\n- exact file:line evidence,\n- whether the issue is introduced by this PR or pre-existing,\n- reachability from realistic execution paths,\n- whether caller guards, schema validation, middleware, framework defaults, feature flags, or state-machine constraints mitigate it,\n- whether tests cover the negative path,\n- whether sibling files or docs must change together,\n- whether the severity is justified,\n- the smallest falsification probe that would prove or disprove it.\n\n### Reviewer classifications\n\n| Classification | Meaning |\n|---|---|\n| `CONFIRMED` | Evidence is real, reachable or structurally proven, and introduced or exposed by this PR |\n| `DISPROVED` | Candidate claim is incorrect, unreachable, mitigated, or based on a misunderstanding |\n| `UNVERIFIED` | Available evidence is insufficient to determine validity |\n| `PRE_EXISTING` | Issue exists on the base branch and is not materially worsened by this PR |\n\n### Evidence classifications\n\n| Type | Definition |\n|---|---|\n| `STRUCTURALLY_PROVEN` | File:line evidence directly demonstrates the bug or violated invariant |\n| `EXECUTION_PROVEN` | A test, trace, reproduction, or command demonstrates failure |\n| `STATIC_TRACE_PROVEN` | Static analysis plus reviewed path\u002Fcontext demonstrates reachability |\n| `PLAUSIBLE_BUT_UNVERIFIED` | Pattern suggests risk, but reachability or mitigation is unresolved |\n\nReviewer output format:\n\n```text\n[REVIEWED] | candidate_id | classification | evidence_type | final_severity | introduced_by_pr: YES\u002FNO\u002FUNKNOWN | file:line | rationale | falsification_probe | reviewer_id\n```\n\n`DISPROVED` findings must include the reason. `PRE_EXISTING` findings must include the base-branch evidence if available.\n\n---\n\n## Phase 7: Falsification Probe Requirement\n\nEach confirmed nontrivial finding must include at least one falsification artifact:\n\n- runnable failing command,\n- proposed regression test,\n- mutation that current tests fail to kill,\n- static-analysis trace,\n- minimal execution path,\n- exact reason no runtime probe is available.\n\nNontrivial means any finding that affects correctness, security, state transitions, write authority, git safety, config, schema\u002Fevidence integrity, model\u002Ftool permissions, external fetches, persistence, or user-visible behavior.\n\nA finding may still be reported without a runnable command if it is structurally proven, but the report must state why a runtime probe was not available.\n\n---\n\n## Phase 8: Critic Challenge\n\nRoute every reviewer-confirmed HIGH or CRITICAL finding to a critic. Also route borderline MEDIUM findings when they involve security, state machines, write authority, evidence integrity, model\u002Ftool permissions, git safety, or config ratchets.\n\nThe critic must challenge:\n\n- severity inflation,\n- weak or incomplete evidence,\n- missing mitigating context,\n- false reachability assumptions,\n- framework or middleware defaults,\n- schema validation gates,\n- state-machine constraints,\n- feature flags or dead code,\n- pre-existing status,\n- non-actionable or unsafe fix recommendations,\n- sibling-file gaps,\n- whether multiple comments should be grouped into one root cause.\n\nCritic output format:\n\n```text\n[CRITIC] | finding_id | UPHELD\u002FDOWNGRADED\u002FDISPROVED\u002FNEEDS_MORE_EVIDENCE | final_severity | reason | required_report_change\n```\n\n## Verdict row contract\n\nThe `[CRITIC]` row in the format above is **mandatory contract**, not advisory output. A critic response that does not end with that exact row format is treated as a planning preamble, not a verdict, and must be re-dispatched. Do not proceed past Phase 8 join barrier until each dispatched critic lane has produced a parseable `[CRITIC]` row.\n\n**Re-dispatch trigger:** when a critic lane response is missing the verdict row, the orchestrator must automatically re-dispatch that lane with the explicit instruction: \"Your final line MUST be exactly the Phase 8 contract row: `[CRITIC] | finding_id | UPHELD\u002FDOWNGRADED\u002FDISPROVED\u002FNEEDS_MORE_EVIDENCE | final_severity | reason | required_report_change`. A response without that exact row will be treated as a planning message and re-dispatched.\" Do not synthesize findings from the planning preamble; only from the re-dispatched verdict.\n\n**COVERAGE GATE alignment:** Critic lane failures follow the same COVERAGE GATE as explorer lanes: retry (max 2 attempts) with materially different parameters. If retries fail, deploy a verified equivalent alternative (same agent type, same prompt, same scope, same isolation). If no equivalent can be verified, report INCOMPLETE to the user — do NOT mark findings UNVERIFIED to continue past the gap. The orchestrator NEVER fabricates a critic verdict by parsing prose, by tolerating a planning preamble, or by silently accepting reduced coverage.\n\nRefuted findings become `DISPROVED` or `ADVISORY`, depending on critic rationale. Downgrades must be listed in the final validation provenance.\n\n---\n\n## Runtime-Aware False-Positive Guard Checklist\n\nBefore confirming any finding, the reviewer and critic must check all that apply:\n\n- [ ] Schema validation gate: does schema validation reject malformed input before the flagged line?\n- [ ] Middleware interception: does middleware handle the request or command before the flagged path?\n- [ ] Framework default mitigation: does the framework inherently prevent this class of issue?\n- [ ] Caller context correctness: who invokes this code, and can untrusted input reach it?\n- [ ] Execution reachability: is the path reachable, or behind a feature flag, dead branch, build-only path, or commented-out code?\n- [ ] State-machine constraints: do ordering rules, locks, mutexes, phase gates, or transition guards prevent the state?\n- [ ] Permission boundary: does role\u002Ftool mapping prevent the operation?\n- [ ] Data lifetime: is the flagged state persisted, serialized, logged, or only transient?\n- [ ] Cross-platform behavior: does Windows\u002FmacOS\u002FLinux path or shell behavior change the result?\n- [ ] Test environment mismatch: is the finding only true under a mock or fixture that cannot occur in production?\n\nIf a mitigation applies and was not accounted for, downgrade to `ADVISORY`, `UNVERIFIED`, or `DISPROVED`.\n\n---\n\n## Phase 9: Synthesis, Grouping, and Noise Budget\n\nBefore final output:\n\n- group duplicate candidates by root cause,\n- report one finding per root cause,\n- attach all affected file:line references under that finding,\n- separate ship blockers from advisory notes,\n- suppress pure style\u002Fnit findings unless they indicate correctness, security, test, maintainability, or user-impact risk,\n- distinguish PR-introduced from pre-existing,\n- distinguish confirmed from plausible-but-unverified,\n- include disproved agent\u002Ftool claims,\n- keep final comments actionable.\n\n### Finding ID format\n\n```text\nF-001 | severity | category | root cause | affected file:line refs | reviewer | critic status\n```\n\n### Suggested final grouping\n\n1. Ship blockers,\n2. Important non-blockers,\n3. Test \u002F coverage gaps,\n4. Pre-existing issues,\n5. Unverified plausible risks,\n6. Disproved candidates \u002F false positives,\n7. Clean lane summary.\n\n---\n\n## Phase 10: Metrics and Knowledge Writeback\n\nAt the end of the review, record review quality metrics when Swarm metrics or local evidence storage is available.\n\nRecord:\n\n- raw candidates by base lane,\n- raw candidates by micro-lane,\n- deterministic tool candidates,\n- reviewer-confirmed findings,\n- reviewer-disproved findings,\n- reviewer-unverified findings,\n- critic-upheld findings,\n- critic-downgraded findings,\n- critic-disproved findings,\n- final reported findings,\n- suppressed non-actionable candidates,\n- recurring false-positive patterns,\n- commands or probes used,\n- token\u002Ftime cost if available,\n- accepted\u002Ffixed findings when known.\n\nKnowledge writeback rules:\n\n- Write back only validated true positives or validated false-positive patterns.\n- Include file patterns, invariant, evidence, and why it was confirmed\u002Fdisproved.\n- Mark repo-specific lessons as project-tier unless there is strong evidence they generalize.\n- Never promote quarantined or unvalidated knowledge to hive-tier.\n- Never store secrets, private tokens, or raw sensitive logs.\n\n---\n\n## Phase 11: Post-Fix Re-verification\n\nWhen the PR author pushes fixes after a review, perform a targeted re-verification before updating the verdict.\n\n### Re-verification scope\n\nOnly re-verify findings the author claims to have fixed. Do not re-run the full review pipeline.\n\n### Re-verification steps\n\n1. For each finding the author claims fixed:\n   a. Read the changed file(s) from the updated branch at the specific lines referenced in the original finding.\n   b. Verify the fix addresses the root cause, not just the symptom.\n   c. Check that the fix does not introduce a new issue in the same area.\n2. Run CI checks on the updated branch to confirm no regressions.\n3. For findings the author did not address, carry forward the original finding with unchanged status.\n\n### Re-verification output\n\n```\n[REVERIFIED] | finding_id | FIXED \u002F PARTIALLY_FIXED \u002F NOT_FIXED \u002F NEW_ISSUE | evidence | updated_severity\n```\n\n- `FIXED`: the root cause is resolved and no new issue introduced.\n- `PARTIALLY_FIXED`: the root cause is partially addressed or a residual concern remains.\n- `NOT_FIXED`: the root cause persists unchanged.\n- `NEW_ISSUE`: the fix introduced a new problem at the same location.\n\nUpdate the verdict only after re-verifying all previously blocking findings.\n\n---\n\n## Dry-Run: Parser-Based Candidate Extraction\n\nThis section demonstrates the new parser-based extraction path end-to-end\nusing synthetic data. It is concrete enough to implement the same pattern in\nanother skill.\n\n### Scenario\n\nA PR review has dispatched six base explorer lanes via `dispatch_lanes_async`.\nThe batch completed and `collect_lane_results` returned:\n\n```json\n{\n  \"batch_id\": \"batch-a1b2c3\",\n  \"lane_results\": [\n    {\n      \"lane_id\": \"pr_review_lane1_correctness\",\n      \"status\": \"completed\",\n      \"output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fout-abc123.json\",\n      \"output_degraded\": false\n    },\n    {\n      \"lane_id\": \"pr_review_lane2_security\",\n      \"status\": \"completed\",\n      \"output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-2\u002Fout-def456.json\",\n      \"output_degraded\": false\n    }\n  ]\n}\n```\n\n### Step 1 — Call the parser\n\nThe orchestrator calls `parse_lane_candidates` for each `output_ref`:\n\n```json\n{\n  \"tool\": \"parse_lane_candidates\",\n  \"arguments\": {\n    \"output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fout-abc123.json\",\n    \"producer\": \"swarm-pr-review\"\n  }\n}\n```\n\n### Step 2 — Structured response\n\nThe parser returns a `ParseResultWithSidecar`. On success, `error` and `error_code` are absent:\n\n```json\n{\n  \"candidates\": [\n    {\n      \"record_type\": \"candidate\",\n      \"row_format_family\": \"base_explorer\",\n      \"row_format_version\": 1,\n      \"record_version\": { \"major\": 1, \"minor\": 0 },\n      \"source_output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fout-abc123.json\",\n      \"source_batch_id\": \"B-2025-06-22-001\",\n      \"source_lane_id\": \"explorer-1\",\n      \"source_agent\": \"paid_explorer\",\n      \"source_digest\": \"sha256:abc123def456...\",\n      \"extracted_from_partial_source\": false,\n      \"sessionId\": \"ses_01HXYZ...\",\n      \"parentSessionId\": \"ses_01HABC...\",\n      \"producer\": \"swarm-pr-review\",\n      \"candidate_id\": \"C-001\",\n      \"lane\": \"Lane 1: Correctness and edge cases\",\n      \"micro_lane\": null,\n      \"severity\": \"HIGH\",\n      \"category\": \"null-safety\",\n      \"file_line\": \"src\u002Futils\u002Fcache.ts:142\",\n      \"claim\": \"Uncached getter may return undefined on cold start\",\n      \"evidence_summary\": \"The `getCached` function returns `cache[key]` without a fallback when the cache is empty.\",\n      \"impact_context\": \"Downstream callers in `src\u002Fhandlers\u002F*.ts` expect a defined value and call `.toString()` directly.\",\n      \"invariant_violated\": null,\n      \"confidence\": \"HIGH\"\n    },\n    {\n      \"record_type\": \"candidate\",\n      \"row_format_family\": \"base_explorer\",\n      \"row_format_version\": 1,\n      \"record_version\": { \"major\": 1, \"minor\": 0 },\n      \"source_output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fout-abc123.json\",\n      \"source_batch_id\": \"B-2025-06-22-001\",\n      \"source_lane_id\": \"explorer-1\",\n      \"source_agent\": \"paid_explorer\",\n      \"source_digest\": \"sha256:abc123def456...\",\n      \"extracted_from_partial_source\": false,\n      \"sessionId\": \"ses_01HXYZ...\",\n      \"parentSessionId\": \"ses_01HABC...\",\n      \"producer\": \"swarm-pr-review\",\n      \"candidate_id\": \"C-002\",\n      \"lane\": \"Lane 1: Correctness and edge cases\",\n      \"micro_lane\": null,\n      \"severity\": \"MEDIUM\",\n      \"category\": \"async-ordering\",\n      \"file_line\": \"src\u002Fservices\u002Fqueue.ts:88\",\n      \"claim\": \"Race between `drain` and `processNext` may drop items\",\n      \"evidence_summary\": \"`drain` sets `active = false` before awaiting `processNext`, which also checks `active`.\",\n      \"impact_context\": \"Items submitted during the drain window are silently dropped.\",\n      \"invariant_violated\": null,\n      \"confidence\": \"MEDIUM\"\n    }\n  ],\n  \"invocation_envelope\": {\n    \"record_type\": \"invocation\",\n    \"source_output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fout-abc123.json\",\n    \"source_batch_id\": \"B-2025-06-22-001\",\n    \"source_lane_id\": \"explorer-1\",\n    \"source_agent\": \"paid_explorer\",\n    \"source_digest\": \"sha256:abc123def456...\",\n    \"row_format_version\": 1,\n    \"record_version\": { \"major\": 1, \"minor\": 0 },\n    \"sessionId\": \"ses_01HXYZ...\",\n    \"parentSessionId\": \"ses_01HABC...\",\n    \"producer\": \"swarm-pr-review\",\n    \"produced_at\": \"2025-06-22T14:30:00.000Z\",\n     \"format_families_detected\": [\"base_explorer\"],\n     \"candidate_count\": 2,\n     \"parse_errors\": 2,\n     \"malformed_rows\": 0\n  },\n  \"diagnostics\": {\n    \"candidate_count\": 2,\n    \"parse_errors\": 2,\n    \"parse_error_details\": [\n      {\n        \"row_index\": 0,\n        \"field\": \"row\",\n        \"message\": \"Both format-family discriminators present; defaulting to base_explorer\"\n      },\n      {\n        \"row_index\": 1,\n        \"field\": \"row\",\n        \"message\": \"Both format-family discriminators present; defaulting to base_explorer\"\n      }\n    ],\n    \"malformed_rows\": 0,\n    \"duplicate_id_count\": 0,\n    \"duplicate_id_warnings\": [],\n    \"degraded_source_count\": 0,\n    \"incomplete_source_count\": 0,\n     \"format_families_detected\": [\"base_explorer\"]\n   }\n}\n```\n> **Note**: `parse_errors: 2` reflects FR-017\u002FSC-017 position-based detection: when a `[CANDIDATE]` row has both `evidence_summary` and `impact_context` populated, the parser emits a `parse_error_details` entry per row with `field: \"row\"` and `message: \"Both format-family discriminators present; defaulting to base_explorer\"`. This is documented behavior, not a parser bug. To get `parse_errors: 0` with the row format, leave one of the two fields empty; to silence the warning entirely, emit structured JSON candidate records.\n\nOn refusal (e.g. `output_ref` does not exist), `error` and `error_code` are present; `candidates` is `[]`; `invocation_envelope` and `diagnostics` are populated with empty fields for traceability:\n\n```json\n{\n  \"error\": \"Artifact reference not found in store\",\n  \"error_code\": \"ref-not-found\",\n  \"candidates\": [],\n  \"invocation_envelope\": {\n    \"record_type\": \"invocation\",\n    \"source_output_ref\": \".swarm\u002Flane-results\u002Fbatch-a1b2c3\u002Flane-1\u002Fmissing.json\",\n    \"source_batch_id\": \"\",\n    \"source_lane_id\": \"\",\n    \"source_agent\": \"\",\n    \"source_digest\": \"\",\n    \"row_format_version\": 1,\n    \"record_version\": { \"major\": 1, \"minor\": 0 },\n    \"produced_at\": \"2025-06-22T14:30:00.000Z\",\n    \"format_families_detected\": [],\n    \"candidate_count\": 0,\n    \"parse_errors\": 0,\n    \"malformed_rows\": 0\n  },\n  \"diagnostics\": {\n    \"candidate_count\": 0,\n    \"parse_errors\": 0,\n    \"parse_error_details\": [],\n    \"malformed_rows\": 0,\n    \"duplicate_id_count\": 0,\n    \"duplicate_id_warnings\": [],\n    \"degraded_source_count\": 0,\n    \"incomplete_source_count\": 0,\n     \"format_families_detected\": []\n   }\n}\n```\n\n### Step 3 — Filter and group\n\nThe orchestrator filters the returned `candidates[]` array by `producer: \"swarm-pr-review\"` and `row_format_family` (e.g. `base_explorer` or `micro_lane`), then groups\nthe candidates. In this synthetic example, the two candidates above are grouped\nby file area:\n\n- **Chunk A — `src\u002Futils\u002F`** (1 candidate): C-001\n- **Chunk B — `src\u002Fservices\u002F`** (1 candidate): C-002\n\nIf there were more candidates, the orchestrator would also group by category\n(e.g., `null-safety`, `async-ordering`) and cap each chunk at 50 candidates.\n\n### Step 4 — Dispatch reviewer lanes\n\nThe orchestrator dispatches one reviewer lane per chunk:\n\n```text\nYou are the independent reviewer. Validate only the candidates assigned below.\nDo not search for new issues except where needed to validate reachability or\nmitigation. Do not trust explorer severity.\n\nContext pack summary:\n- scope: ...\n- obligations: ...\n- impact cone: ...\n- deterministic signals: ...\n- relevant Swarm artifacts \u002F knowledge: ...\n- base_ref: \u003Ccommit SHA of base branch>\n- head_ref: \u003Ccommit SHA of PR head branch>\n\nCandidates (Chunk A — src\u002Futils\u002F):\n- C-001 | HIGH | null-safety | src\u002Futils\u002Fcache.ts:142 | Uncached getter may return undefined on cold start\n\nFor each candidate, return:\n[REVIEWED] | candidate_id | CONFIRMED\u002FDISPROVED\u002FUNVERIFIED\u002FPRE_EXISTING | evidence_type | final_severity | introduced_by_pr | file:line | rationale | falsification_probe | reviewer_id\n\nYou must check caller context, reachability, schema\u002Fmiddleware\u002Fframework mitigations, state-machine constraints, test coverage, PR-introducedness, and severity.\n\nIMPORTANT: If a finding claims behavior is \"new\" or \"introduced by the PR\", you MUST read the equivalent code on the base branch (git show \u003Cbase_ref>:\u003Cfile>) to verify it was not present before. A reviewer claim of \"this is new\" is invalid without base-branch evidence. Do not compare the new code to an idealized baseline — compare it to what actually existed on the base branch at the time of the PR.\n```\n\n### Key invariants\n\n- The parser reads the **full artifact**, not a preview. Truncation in the\n  `dispatch_lanes` preview does not affect candidate extraction.\n- The orchestrator never classifies candidates — it only filters, groups, and\n  routes them.\n- Each reviewer receives a bounded chunk. A chunk with more than 50 candidates\n  is split before dispatch.\n- The `invocation_envelope` in the parser response provides audit provenance\n  for every extracted candidate.\n\n---\n\n# Council Mode Workflow\n\nCouncil mode is opt-in only and adversarial.\n\nWhen triggered:\n\n1. Build the same context pack as default mode.\n2. Launch all council agents with one `dispatch_lanes_async` call when available; continue independent context preparation while they run, polling with `collect_lane_results` (without `wait`) to process settled agents incrementally. Use `wait: true` only when no independent work remains and agents are still pending. All agents must be settled before reviewer classification. Fall back to blocking `dispatch_lanes` when async launch is unavailable.\n3. Each council agent assumes all work is wrong until code evidence proves otherwise.\n4. Each agent hunts within its lane only.\n5. Agents return evidence states only: `EVIDENCE_FOUND`, `SUSPICIOUS`, or `CLEAN`.\n6. Agents must not return `CONFIRMED`, `DISPROVED`, or final severity.\n7. The independent reviewer then classifies every council candidate as `CONFIRMED`, `DISPROVED`, `UNVERIFIED`, or `PRE_EXISTING`.\n8. Apply critic challenge to reviewer-confirmed HIGH\u002FCRITICAL or borderline findings.\n9. Final synthesis distinguishes real blockers, real low-severity issues, accepted caveats, disproved council claims, and follow-up quality work.\n\nDefault council lanes:\n\n- correctness and edge cases,\n- security and trust boundaries,\n- dependency and deployment safety,\n- docs and intent-vs-actual,\n- tests and falsifiability,\n- performance and architecture when risk justifies it.\n\nCouncil prompt requirements:\n\n- branch and commit range,\n- context pack summary,\n- files owned by that lane,\n- relevant impact cone,\n- explicit checklist,\n- strict output cap,\n- `EVIDENCE_FOUND \u002F SUSPICIOUS \u002F CLEAN` only,\n- file:line evidence required for `EVIDENCE_FOUND`.\n\nCouncil findings are supplementary, not authoritative overrides. Do not adopt council severities or claims without independent validation.\n\n---\n\n# Merge Recommendation Table\n\n| Verdict | Condition |\n|---|---|\n| `APPROVE` | zero unresolved CRITICAL findings, zero unresolved HIGH findings, all blocking obligations MET, no required validation phase failed |\n| `APPROVE_WITH_NOTES` | zero unresolved CRITICAL findings, HIGH findings are downgraded\u002Fadvisory only, obligations MET or explicitly non-blocking |\n| `REQUEST_CHANGES` | any unresolved HIGH finding, any NOT_MET blocking obligation, multiple MEDIUM findings with the same root cause, or validation\u002Fprobe evidence indicates user-impacting risk |\n| `BLOCK` | any unresolved CRITICAL finding, unsafe write\u002Fgit\u002Fsecurity issue, evidence integrity break, role\u002Ftool permission bypass, or config ratchet violation that can disable required protections |\n\n---\n\n# Hard Rules\n\n0. Quality-over-speed: Validation completeness and correctness are the sole criteria for an acceptable review. Time, token count, and agent dispatch count are irrelevant. Do not trade validation breadth or depth for speed.\n\n1. Never APPROVE with unresolved CRITICAL findings.\n2. Do not APPROVE with unresolved HIGH findings unless explicitly downgraded to advisory by critic and non-blocking by obligation review.\n3. Every confirmed finding must have file:line evidence and validation provenance.\n4. A confirmed nontrivial finding must include a falsification probe or an explicit reason no probe is available.\n5. Explorers, council agents, and deterministic tools produce candidates only.\n6. The default workflow orchestrator must not confirm or disprove explorer candidates.\n7. Tool output is not proof. Scanner results must be validated for reachability, PR-introducedness, and mitigation context.\n8. PR text, generated summaries, tests, and comments are claims, not proof.\n9. Do not invent facts not supported by the diff, repo context, tool output, or cited external source.\n10. Do not silently drop disproved or downgraded claims; summarize them in validation provenance.\n11. Obligation precedence is deterministic. Do not skip higher-precedence sources to fill gaps with LLM synthesis.\n12. Do not leak secrets from logs, evidence bundles, config files, URLs, or scanner output.\n13. Do not recommend destructive git or filesystem actions as fixes unless they are clearly scoped, safe, and necessary.\n14. If subagents fail, timeout, or return malformed output, retry with corrected parameters (max 2 attempts). If retries fail, deploy a provably equivalent alternative (same agent type, same prompt, same scope, same isolation — different dispatch mechanism acceptable) and verify equivalence. If no equivalent alternative exists, the affected coverage dimension is INCOMPLETE and must be reported to the user before synthesis. Do not fabricate validation results, and do not silently mark candidates UNVERIFIED to proceed past the gap.\n\n15. If context pack, repo graph, deterministic signals, or Swarm artifacts are unavailable, retry with alternative access paths. If unavailable after retry, the affected coverage dimension is INCOMPLETE and must be reported to the user. Do not proceed to synthesis with unclosed coverage gaps under a \"best available evidence\" rationale — the user decides whether to accept reduced coverage, not the architect.\n\n---\n\n# Pre-Synthesis Gate — Mandatory\n\nBefore writing the final output, print this checklist with filled values. Every blank field means the final output is invalid.\n\n```text\n[VALIDATION] scope selected: ___\n[VALIDATION] context pack built: YES\u002FNO — ___\n[VALIDATION] obligation count: ___\n[VALIDATION] repo graph \u002F impact cone source: ___\n[VALIDATION] deterministic signals ingested: ___\n[VALIDATION] deterministic lane dispatcher used: YES\u002FNO — ___\n[VALIDATION] base explorer lanes dispatched: ___ \u002F 6\n[VALIDATION] base explorer lanes returned: ___ \u002F 6\n[VALIDATION] triggered micro-lanes: ___\n[VALIDATION] Swarm verifier routing used: ___\n[VALIDATION] raw candidates: ___\n[VALIDATION] tool candidates: ___\n[VALIDATION] reviewer dispatched: ___ (agent type, task description)\n[VALIDATION] reviewer returned: ___ (APPROVED \u002F REJECTED \u002F CONCERNS — copy verdict text)\n[VALIDATION] findings confirmed by reviewer: ___\n[VALIDATION] findings rejected by reviewer as false positive: ___\n[VALIDATION] findings marked PRE_EXISTING: ___\n[VALIDATION] findings left UNVERIFIED: ___\n[VALIDATION] findings escalated to critic: ___\n[VALIDATION] critic dispatched: ___ OR \"SKIPPED — no reviewer-confirmed HIGH\u002FCRITICAL or borderline findings\"\n[VALIDATION] critic returned: ___ OR \"N\u002FA\"\n[VALIDATION] findings upheld by critic: ___\n[VALIDATION] findings downgraded by critic: ___\n[VALIDATION] findings disproved by critic: ___\n[VALIDATION] falsification probes included: ___\n[VALIDATION] grouped root-cause findings: ___\n[VALIDATION] metrics \u002F knowledge writeback: ___\n[VALIDATION] all explorers verified to diff against PR branch, not HEAD: YES\u002FNO\n[VALIDATION] noise-filter suppressed candidates: ___ (count, each with reason in final report)\n[VALIDATION] all non-suppressed candidates routed to reviewer: YES\u002FNO\n```\n\nIf the reviewer returned `REJECTED` or `CONCERNS`, route the issue back to implementation context or mark the candidate invalid with reason. Do not silently downgrade a rejection.\n\n**COVERAGE GATE CONDITION:** If ANY validation dimension shows incomplete coverage (lanes that failed and were not closed by retry or verified equivalent alternative, CI that did not run, tools that were unavailable after retry), the Pre-Synthesis Gate FAILS. Do not proceed to final output. Report the unclosed gaps to the user as INCOMPLETE with the partial findings from successful dimensions. The architect is NEVER authorized to silently accept reduced coverage.\n\n---\n\n# Final Output Format\n\nProduce the final review in this order:\n\n## PR intent\n\nSummarize the obligations and user-visible intent.\n\n## Implementation summary\n\nSummarize what changed, including major files, public APIs, schemas, configs, tests, and Swarm artifacts.\n\n## Intended vs actual mapping\n\n| Obligation | Source | Actual evidence | Status | Linked finding |\n|---|---|---|---|---|\n\nUse `MET`, `PARTIALLY_MET`, `NOT_MET`, or `UNVERIFIABLE`.\n\n## Validation provenance\n\nInclude:\n\n- context pack limitations,\n- explorer lanes launched and returned,\n- micro-lanes triggered,\n- deterministic signals ingested,\n- reviewer identity \u002F role for each finding,\n- critic result for each escalated finding,\n- findings DISPROVED by reviewer with reason,\n- findings DOWNGRADED by critic with reason,\n- findings left UNVERIFIED with reason.\n\nIf zero findings, explicitly state:\n\n```text\nNo confirmed findings — all validated lanes CLEAN.\n```\n\nThen provide a lane-by-lane clean summary.\n\n## Confirmed findings\n\nFor each finding:\n\n```text\nF-001 — Severity — Category — Root cause\nFiles: path:line, path:line\nStatus: CONFIRMED \u002F critic status\nEvidence type: STRUCTURALLY_PROVEN \u002F EXECUTION_PROVEN \u002F STATIC_TRACE_PROVEN\nWhy it matters:\nValidation:\nFalsification probe:\nSuggested fix:\n```\n\n## Pre-existing findings\n\nList separately from PR-introduced findings.\n\n## Unverified but plausible risks\n\nOnly include if useful and clearly labeled as unverified.\n\n## Test \u002F coverage gaps\n\nFocus on missing tests that would catch real risks, not generic coverage requests.\n\n## Disproved candidates and false positives\n\nList concise reasons for notable false positives from explorers, tools, council agents, or reviewers.\n\n## Verdict\n\nUse one of:\n\n- `APPROVE`\n- `APPROVE_WITH_NOTES`\n- `REQUEST_CHANGES`\n- `BLOCK`\n\n## Merge recommendation\n\nExplain the recommendation in one short paragraph and list required actions before merge if applicable.\n\n## Feedback handoff\n\nWhen the review produced actionable validated findings or operational blockers,\ninclude:\n\n- the handoff artifact path,\n- the preserved finding IDs and provenance that `swarm-pr-feedback` must carry\n  forward,\n- and an explicit question asking whether to continue into\n  `swarm-pr-feedback`.\n\nUse this exact continuation prompt format:\n\n```text\n\u002Fswarm pr-feedback \u003CPR_URL> continue from .swarm\u002Fpr-review\u002F\u003Crun_id>\u002Ffeedback-handoff.md\n```\n\n---\n\n# Reviewer Prompt Template\n\nUse this template when dispatching reviewer subagents:\n\n```text\nYou are the independent reviewer. Validate only the candidates assigned below.\nDo not search for new issues except where needed to validate reachability or mitigation.\nDo not trust explorer severity.\n\nContext pack summary:\n- scope: ...\n- obligations: ...\n- impact cone: ...\n- deterministic signals: ...\n- relevant Swarm artifacts \u002F knowledge: ...\n- base_ref: \u003Ccommit SHA of base branch>\n- head_ref: \u003Ccommit SHA of PR head branch>\n\nCandidates:\n- ...\n\nFor each candidate, return:\n[REVIEWED] | candidate_id | CONFIRMED\u002FDISPROVED\u002FUNVERIFIED\u002FPRE_EXISTING | evidence_type | final_severity | introduced_by_pr | file:line | rationale | falsification_probe | reviewer_id\n\nYou must check caller context, reachability, schema\u002Fmiddleware\u002Fframework mitigations, state-machine constraints, test coverage, PR-introducedness, and severity.\n\nIMPORTANT: If a finding claims behavior is \"new\" or \"introduced by the PR\", you MUST read the equivalent code on the base branch (git show \u003Cbase_ref>:\u003Cfile>) to verify it was not present before. A reviewer claim of \"this is new\" is invalid without base-branch evidence. Do not compare the new code to an idealized baseline — compare it to what actually existed on the base branch at the time of the PR.\n```\n\n---\n\n# Critic Prompt Template\n\nUse this template when dispatching critic subagents:\n\n```text\nYou are the adversarial critic. Challenge only reviewer-confirmed findings assigned below.\nYour goal is to reduce false positives, severity inflation, and non-actionable reports.\n\nFor each finding, challenge:\n- whether evidence proves the claim,\n- whether the path is reachable,\n- whether mitigations apply,\n- whether severity is inflated,\n- whether it is PR-introduced,\n- whether suggested fixes are safe\u002Factionable,\n- whether related files were missed,\n- whether multiple findings should be grouped.\n\nReturn:\n[CRITIC] | finding_id | UPHELD\u002FDOWNGRADED\u002FDISPROVED\u002FNEEDS_MORE_EVIDENCE | final_severity | reason | required_report_change\n\nREQUIRED FINAL LINE — your final line MUST be exactly the row above (no variations, no labeled fields, no placeholders):\n[CRITIC] | finding_id | UPHELD\u002FDOWNGRADED\u002FDISPROVED\u002FNEEDS_MORE_EVIDENCE | final_severity | reason | required_report_change\n\nA response without this exact row is treated as a planning preamble and re-dispatched. Do not output only a planning or investigation message.\n```\n\n---\n\n# Explorer Prompt Template\n\nUse this template when dispatching base explorer or micro-lane agents:\n\n```text\nYou are an explorer. Optimize for recall, not final judgment.\nReturn candidates only. Do not use CONFIRMED, DISPROVED, or PRE_EXISTING.\n\nLane:\nScope:\nObligations:\nChanged files\u002Fhunks:\nImpact cone:\nRelevant deterministic signals:\nRelevant Swarm artifacts \u002F knowledge:\nChecklist:\n\nYou must inspect or mark unavailable:\n1. changed hunk,\n2. caller\u002Fconsumer,\n3. callee\u002Fdependency,\n4. sibling implementation or prior pattern,\n5. nearest test or missing-test location,\n6. deterministic signals,\n7. Swarm artifacts\u002Fknowledge.\n\nReturn:\n[CANDIDATE] | candidate_id | lane | severity | category | file:line | claim | evidence_summary | impact_context | confidence\n```\n\nThe orchestrator extracts candidates from the full lane artifact via\n`parse_lane_candidates` as the primary mechanism. The `[CANDIDATE]` row\nformat above is a fallback convention for environments where the parser is\nunavailable. Explorers should still emit structured records regardless of\nwhether the parser is present.\n\nDo not let speed degrade validation quality.\n",{"name":5,"description":7,"disable-model-invocation":23},true,"main","7709dc9e5ebd3bd641124ad2a3f6bb053ac2dab6",".opencode\u002Fskills\u002Fswarm-pr-review",0,"https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev","2026-11-15 04:35:36",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":23},[33,36,39],{"tool":34,"command":35},"npx","npx skills add AlexanderNarbaev\u002Fagi --skill swarm-pr-review",{"tool":37,"command":38},"bunx","bunx skills add AlexanderNarbaev\u002Fagi --skill swarm-pr-review",{"tool":40,"command":41},"pnpm","pnpm dlx skills add AlexanderNarbaev\u002Fagi --skill swarm-pr-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fswarm-pr-review\u002FSKILL.md",[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M76RZHYHMGE1WP9JBCMNA801","springboot-patterns","Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fspringboot-patterns\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M76RZE6JNZH5HV7Q8JM7R0PN","search-first","Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. Invokes the researcher agent.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fsearch-first\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M76RZBV42EMQV77H7GMFY4AJ","scholar-evaluation","Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fscholar-evaluation\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M76RZ97GC3XAY48H126C30PM","redis-patterns","Redis data structure patterns, caching strategies, distributed locks, rate limiting, pub\u002Fsub, and connection management for production applications.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fredis-patterns\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M76RZ528FANTKX7Q9XR0CXM7","react-patterns","React 18\u002F19 patterns including hooks discipline, server\u002Fclient component boundaries, Suspense + error boundaries, form actions, data fetching, state management decision trees, and accessibility-first composition. Use when writing or reviewing React components.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Freact-patterns\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M76RZ1244PZQRQV5HBQ4PVYQ","query-patterns","SQL patterns, relational database design, query optimization, transactions, analytics, and dialect-aware best practices.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fquery-patterns\u002FSKILL.md",[],[]]