opencode-swarm 7.195.0 → 7.197.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/.opencode/skills/brainstorm/SKILL.md +2 -1
  2. package/.opencode/skills/ci-failure-batching/SKILL.md +2 -1
  3. package/.opencode/skills/ci-fix-monitor/SKILL.md +2 -1
  4. package/.opencode/skills/clarify/SKILL.md +2 -1
  5. package/.opencode/skills/clarify-spec/SKILL.md +2 -1
  6. package/.opencode/skills/codebase-review-swarm/SKILL.md +1 -1
  7. package/.opencode/skills/commit-pr/SKILL.md +3 -2
  8. package/.opencode/skills/consult/SKILL.md +2 -1
  9. package/.opencode/skills/council/SKILL.md +2 -1
  10. package/.opencode/skills/critic-gate/SKILL.md +2 -1
  11. package/.opencode/skills/deep-dive/SKILL.md +2 -1
  12. package/.opencode/skills/deep-research/SKILL.md +2 -1
  13. package/.opencode/skills/design-docs/SKILL.md +2 -1
  14. package/.opencode/skills/discover/SKILL.md +2 -1
  15. package/.opencode/skills/durable-session-state/SKILL.md +2 -1
  16. package/.opencode/skills/engineering-conventions/SKILL.md +2 -1
  17. package/.opencode/skills/execute/SKILL.md +2 -1
  18. package/.opencode/skills/fork-pr-operations/SKILL.md +2 -1
  19. package/.opencode/skills/gate-attribution/SKILL.md +2 -1
  20. package/.opencode/skills/issue-ingest/SKILL.md +2 -1
  21. package/.opencode/skills/issue-tracer/SKILL.md +1 -1
  22. package/.opencode/skills/loop/SKILL.md +2 -1
  23. package/.opencode/skills/merge-queue-readiness/SKILL.md +2 -1
  24. package/.opencode/skills/orchestrating-subagents/SKILL.md +2 -1
  25. package/.opencode/skills/parallel-work-check/SKILL.md +17 -16
  26. package/.opencode/skills/phase-wrap/SKILL.md +2 -1
  27. package/.opencode/skills/pre-phase-briefing/SKILL.md +2 -1
  28. package/.opencode/skills/running-tests/SKILL.md +2 -1
  29. package/.opencode/skills/skill-edit-validation/SKILL.md +2 -1
  30. package/.opencode/skills/specify/SKILL.md +2 -1
  31. package/.opencode/skills/swarm/SKILL.md +2 -1
  32. package/.opencode/skills/swarm-ci-monitor/SKILL.md +3 -2
  33. package/.opencode/skills/swarm-implement/SKILL.md +2 -1
  34. package/.opencode/skills/swarm-plan/SKILL.md +2 -1
  35. package/.opencode/skills/swarm-pr-feedback/SKILL.md +9 -162
  36. package/.opencode/skills/swarm-pr-feedback/references/gate-evidence-scope.md +20 -0
  37. package/.opencode/skills/swarm-pr-feedback/references/intake-surfaces.md +107 -0
  38. package/.opencode/skills/swarm-pr-feedback/references/preflight-checkout.md +67 -0
  39. package/.opencode/skills/swarm-pr-review/SKILL.md +12 -344
  40. package/.opencode/skills/swarm-pr-review/references/council-mode.md +38 -0
  41. package/.opencode/skills/swarm-pr-review/references/explorer-output-format.md +54 -0
  42. package/.opencode/skills/swarm-pr-review/references/findings-persistence-detail.md +15 -0
  43. package/.opencode/skills/swarm-pr-review/references/parser-candidate-extraction.md +75 -0
  44. package/.opencode/skills/swarm-pr-review/references/phase0a-intake.md +61 -0
  45. package/.opencode/skills/swarm-pr-review/references/scope-detection.md +103 -0
  46. package/.opencode/skills/swarm-pr-review/references/writeback-phases.md +68 -0
  47. package/.opencode/skills/swarm-pr-subscribe/SKILL.md +3 -2
  48. package/.opencode/skills/swarm-resume/SKILL.md +2 -1
  49. package/.opencode/skills/test-file-split/SKILL.md +2 -1
  50. package/.opencode/skills/worktree-retry-cleanup/SKILL.md +2 -1
  51. package/.opencode/skills/writing-tests/SKILL.md +7 -437
  52. package/.opencode/skills/writing-tests/references/cross-platform-patterns.md +237 -0
  53. package/.opencode/skills/writing-tests/references/mock-tiers.md +207 -0
  54. package/README.md +1 -1
  55. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  56. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  57. package/dist/cli/{auto-checkpoint-anf21wwa.js → auto-checkpoint-s05sxmg6.js} +4 -4
  58. package/dist/cli/{checkpoint-ngdw2qx2.js → checkpoint-kzyy9b7y.js} +8 -8
  59. package/dist/cli/{coder-settlement-bqb059y2.js → coder-settlement-d1qqfgdm.js} +3 -3
  60. package/dist/cli/{config-doctor-vetg215g.js → config-doctor-yrven0ya.js} +7 -7
  61. package/dist/cli/{core-8qgvsm6x.js → core-qpmksfae.js} +1 -1
  62. package/dist/cli/{curator-drift-3gjycbkv.js → curator-drift-2h6nf0mw.js} +5 -5
  63. package/dist/cli/{curator-llm-factory-d17ybmgm.js → curator-llm-factory-kt3jhgs9.js} +25 -25
  64. package/dist/cli/{curator-hh0n9wgz.js → curator-mqnqst1g.js} +25 -25
  65. package/dist/cli/{doctor-knowledge-receipt-phase-id-1d465vkg.js → doctor-knowledge-receipt-phase-id-d8arz38j.js} +4 -4
  66. package/dist/cli/{evidence-summary-service-rkd3yc5x.js → evidence-summary-service-gjs4zssz.js} +9 -9
  67. package/dist/cli/{gate-evidence-wtjrerkh.js → gate-evidence-9n5r17hq.js} +2 -2
  68. package/dist/cli/{guardrail-explain-8xh3r0dn.js → guardrail-explain-g4wcr664.js} +26 -26
  69. package/dist/cli/{guardrail-log-jrey2myg.js → guardrail-log-0hy23f7d.js} +3 -3
  70. package/dist/cli/{guardrail-reset-m5qbg30j.js → guardrail-reset-9z5rmp3f.js} +25 -25
  71. package/dist/cli/{hive-promoter-36yhdfre.js → hive-promoter-w8f840ah.js} +25 -25
  72. package/dist/cli/{index-gz16dke1.js → index-1cks27mv.js} +6 -6
  73. package/dist/cli/{index-epdzvp4w.js → index-1gnrtz76.js} +5 -5
  74. package/dist/cli/{index-jn4mmhqc.js → index-20m9q2z9.js} +1 -1
  75. package/dist/cli/{index-yryy781f.js → index-29xr45xr.js} +153 -52
  76. package/dist/cli/{index-bpq6z8qe.js → index-3qqnz0jg.js} +3 -3
  77. package/dist/cli/{index-kmvy5fr8.js → index-401a12w5.js} +1 -1
  78. package/dist/cli/{index-jatgbm7k.js → index-5p0jhn2s.js} +1 -1
  79. package/dist/cli/{index-gns3gc87.js → index-67w61x1b.js} +3 -3
  80. package/dist/cli/{index-ha8xc5d3.js → index-8ahnfc03.js} +2 -2
  81. package/dist/cli/{index-akb436kn.js → index-8zwmfh9d.js} +1 -1
  82. package/dist/cli/{index-3k65kdfp.js → index-9px1knpj.js} +1 -1
  83. package/dist/cli/{index-1hcjxz6w.js → index-9sqcmzc2.js} +2 -2
  84. package/dist/cli/{index-9teqkkp4.js → index-agvmmvdt.js} +25 -25
  85. package/dist/cli/{index-tc8x0zc5.js → index-avbvxmw2.js} +1 -1
  86. package/dist/cli/{index-c6hyd8hg.js → index-bpnpvhja.js} +1 -1
  87. package/dist/cli/{index-8448vj9w.js → index-dgvf1jey.js} +1 -1
  88. package/dist/cli/{index-bftpd2m5.js → index-eabxecjf.js} +2 -2
  89. package/dist/cli/{index-6vpqe4ws.js → index-fzx1wfxn.js} +1 -1
  90. package/dist/cli/{index-h7275akd.js → index-g1r94prs.js} +27 -27
  91. package/dist/cli/{index-82aj6gaj.js → index-g749xs7c.js} +2 -2
  92. package/dist/cli/{index-7kbpzg05.js → index-jvpvghyh.js} +328 -224
  93. package/dist/cli/{index-780g1hht.js → index-jvzfw0n5.js} +1 -1
  94. package/dist/cli/{index-479kf368.js → index-mbdkr2sh.js} +1 -1
  95. package/dist/cli/{index-c4hx57tz.js → index-ng6me2hh.js} +2 -2
  96. package/dist/cli/{index-fk4j26km.js → index-njfkqr77.js} +3 -3
  97. package/dist/cli/{index-peyz4k9k.js → index-t3tzk566.js} +1 -1
  98. package/dist/cli/{index-z59414gv.js → index-v8jhmn8x.js} +1 -1
  99. package/dist/cli/{index-5gf2wx2c.js → index-xb3h5tvj.js} +4 -4
  100. package/dist/cli/{index-xs9cn3c0.js → index-xf6tdsyr.js} +3 -3
  101. package/dist/cli/{index-863hst4e.js → index-ysbmrmzk.js} +1 -1
  102. package/dist/cli/index.js +26 -26
  103. package/dist/cli/{knowledge-escalator-6sgrjbcj.js → knowledge-escalator-42cvn0ec.js} +7 -7
  104. package/dist/cli/{knowledge-events-hztjt63y.js → knowledge-events-v0xavjkd.js} +5 -5
  105. package/dist/cli/{knowledge-store-3sd2034v.js → knowledge-store-s01cread.js} +1 -1
  106. package/dist/cli/{knowledge-validator-3fe82zy4.js → knowledge-validator-kvtcqpke.js} +2 -2
  107. package/dist/cli/{mcp-spbx3efe.js → mcp-ff73w9z7.js} +1 -1
  108. package/dist/cli/{model-preflight-k2bw7rt1.js → model-preflight-0k8bd388.js} +25 -25
  109. package/dist/cli/{pending-delegations-kcvd9t41.js → pending-delegations-bmj7djk1.js} +2 -2
  110. package/dist/cli/{pr-subscriptions-nqby87en.js → pr-subscriptions-9dbrw7ky.js} +1 -1
  111. package/dist/cli/{pr-workflow-gate-cgbc0x1z.js → pr-workflow-gate-wg003fkd.js} +25 -25
  112. package/dist/cli/{scan-cursor-sphr9phs.js → scan-cursor-d93q0q3s.js} +2 -2
  113. package/dist/cli/{schema-x892aatt.js → schema-0ny9ef6s.js} +1 -1
  114. package/dist/cli/{scope-persistence-n9xksct2.js → scope-persistence-ekcfq34x.js} +5 -5
  115. package/dist/cli/{server-am2y11yn.js → server-rpx7pkg1.js} +25 -25
  116. package/dist/cli/{skill-generator-p71b6h5k.js → skill-generator-h1w7s5dh.js} +8 -8
  117. package/dist/cli/{snapshot-coordination-init-x9b4t9sk.js → snapshot-coordination-init-f6ecsn9c.js} +25 -25
  118. package/dist/cli/{speckit-checkoff-xp9vsp9k.js → speckit-checkoff-kf0zkpdw.js} +3 -3
  119. package/dist/cli/{worktree-collision-ownership-2pmyww6g.js → worktree-collision-ownership-p7zmj4ag.js} +2 -2
  120. package/dist/cli/{worktree-isolation-379tmkta.js → worktree-isolation-nz90xvw5.js} +25 -25
  121. package/dist/commands/registry.d.ts +1 -1
  122. package/dist/config/skill-contract-digest.d.ts +6 -0
  123. package/dist/epic/start.d.ts +5 -4
  124. package/dist/hooks/skill-scoring.d.ts +1 -1
  125. package/dist/hooks/skill-usage-log.d.ts +2 -0
  126. package/dist/host/v2/agents-commands.d.ts +13 -3
  127. package/dist/index.js +103 -98
  128. package/dist/sbom/detectors/index.d.ts +15 -0
  129. package/dist/services/skill-evaluator.d.ts +2 -0
  130. package/dist/services/skill-generator.d.ts +13 -0
  131. package/dist/tools/sbom-generate.d.ts +1 -1
  132. package/package.json +1 -1
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  name: swarm-pr-review
3
- audience: swarm-plugin
4
3
  description: Run a graph-guided, tool-augmented PR review using context packing, parallel exploration, mandatory repository-agnostic risk-family coverage with dispatch scaled to diff size and risk, independent reviewer validation, critic challenge, and metrics writeback. Use for deep pull request review with low false-positive tolerance and high recall in any repository, on any agent harness (structured lane controller, native parallel subagents, or single-context sequential passes).
5
4
  disable-model-invocation: true
6
- swarm-contract-digest: 66db247ce302
5
+ metadata:
6
+ audience: swarm-plugin
7
+ swarm-contract-digest: "ce38f6d7bb74"
7
8
  ---
8
9
 
9
10
  # /swarm-pr-review
@@ -235,66 +236,7 @@ Exception: in explicit Council mode only, the main thread may act as the indepen
235
236
 
236
237
  ## Scope Detection
237
238
 
238
- Determine review scope using this priority:
239
-
240
- 1. explicit user-provided PR URL, PR number, commit, branch, or file scope,
241
- 2. current feature branch diff vs the remote-tracking base ref (`origin/main`,
242
- `origin/master`; a local `main`/`master` only as a last resort — it is only as
243
- fresh as the last fetch and yields a different merge base),
244
- 3. staged changes,
245
- 4. latest commit,
246
- 5. user-specified files or directories.
247
-
248
- Record:
249
-
250
- - base ref,
251
- - head ref,
252
- - commit range,
253
- - changed files,
254
- - deleted files,
255
- - generated files,
256
- - lockfiles,
257
- - test files,
258
- - docs/config/schema files,
259
- - whether the working tree is dirty.
260
-
261
- If scope cannot be determined, review the narrowest safe scope available and state the limitation.
262
-
263
- ### Pre-flight git ref availability
264
-
265
- Before launching explorers (Phase 3), perform this exact standalone sequence:
266
-
267
- 1. Resolve and retain the authoritative full `pr_head_sha` from PR metadata.
268
- 2. Verify the working tree is clean with `git status --porcelain`. If it is
269
- dirty at all — tracked changes, untracked files, or both — call
270
- `prepare_pr_workflow_checkout` (Profile A). The tool supports
271
- self-discovery: call it with no `paths` argument to auto-discover and
272
- preserve every dirty path in one step, including untracked files; an
273
- already-clean tree returns a no-op (nothing is stashed, no receipt is
274
- written). Pass explicit `paths` only when you already have the exact,
275
- bounded list of dirty tracked files and want the older exact-match
276
- contract. Without the controller (Profiles B/C), do not blind-stash over
277
- dirty state: surface tracked changes to the user, or abort. Do not issue
278
- `git stash` through shell.
279
- Treat the controller's Git-state result as final for this attempt: `clean`
280
- proceeds, `stashable` permits exactly one checkout-preparation call, and
281
- `recovery-required` or `indeterminate` means report the typed
282
- `required_action`, abort/clear any already-active gate, and stop. Retry only
283
- when the controller explicitly returns `retryable: true`; never fight an
284
- unmerged index or in-progress Git operation with repeated stash attempts.
285
- 3. Fetch the PR head as one standalone command, for example
286
- `git fetch origin refs/pull/<N>/head`. Do not compose fetch and checkout.
287
- 3a. Fetch the base branch as its own standalone command, for example
288
- `git fetch origin main`. Skipping this is the single most common cause of a
289
- rejected dispatch: the merge base is recomputed against `base_ref`, and a
290
- local `main`/`refs/heads/main` that was never refreshed resolves to a
291
- different commit than `origin/main` for the same `base_sha`.
292
- 4. Prove the full commit exists locally with two portable standalone commands:
293
- `git rev-parse --verify <full_pr_head_sha>^0`, then
294
- `git cat-file -t <full_pr_head_sha>`. The second command must print
295
- `commit`. This avoids shell/wrapper parsing differences around the
296
- `^{commit}` suffix on Windows.
297
- 5. Check out the exact PR filesystem with
239
+ Detailed reference material moved to `.opencode/skills/swarm-pr-review/references/scope-detection.md` (issue #2907 progressive-disclosure budget).
298
240
  `git switch --detach <full_pr_head_sha>`. Do not use `--track FETCH_HEAD`:
299
241
  `FETCH_HEAD` is not a remote-tracking branch.
300
242
  6. Confirm `git rev-parse HEAD` equals the full `pr_head_sha`, bind that exact
@@ -302,39 +244,7 @@ Before launching explorers (Phase 3), perform this exact standalone sequence:
302
244
  record it at the top of the findings ledger and repeat it in every lane
303
245
  prompt), and finish this before dispatching explorer lanes.
304
246
 
305
- Explorer agents read files from the working tree, not from git history. Passing
306
- the commit range in a prompt cannot substitute for this checkout because
307
- `Read` / `Glob` / `Grep` operate on the filesystem.
308
- - Explicitly pass the verified merge-base range (`base_sha...pr_head_sha`) in every explorer delegation so explorers inspect exactly the bound PR diff. Include `base_ref` only as the live ref used to recompute `base_sha`; do not substitute a two-dot branch-tip range.
309
-
310
- If refs cannot be fetched or checked out, state the limitation in the context pack.
311
-
312
- ### Shell rules under the PR_REVIEW gate
313
-
314
- The gate accepts one command per tool call — never compose commands with
315
- `&&`, `;`, shell pipelines, redirects (`>`, `>>`, `<`), or `$(...)`/`` ` ``
316
- substitution. The only literal-pipe exception is inside one closed
317
- double-quoted `gh api --jq` argument with no backslash-escaped nested double
318
- quotes; that escape is ambiguous under `cmd.exe`. The exception does not
319
- permit an outer pipeline or any other control syntax.
320
- A single leading `cd <dir> &&` prefix and a trailing `2>&1` suffix are
321
- tolerated, but only on read-only commands. State-transition verbs — `git
322
- fetch`, `git checkout`, `git switch`, `git branch`, and `gh pr checkout` —
323
- must always run bare: no `cd` prefix, no `2>&1` suffix.
324
-
325
- Allowed read-only `git` subcommands: `status`, `log`, `show`, `diff`,
326
- `rev-parse`, `merge-base`, `ls-files`, `grep`, `blame`, `cat-file`,
327
- `for-each-ref`, `branch --list` (listing only — mutation flags are blocked),
328
- `remote -v`, and `config --get`.
329
-
330
- Prefer tools over raw shell for state that a single read-only command cannot
331
- cover cleanly:
332
-
333
- - `pr_workflow_status` — observe local HEAD, branch, dirty-file state,
334
- remotes, and gate state in one read-only call.
335
- - `gh_evidence` — bounded PR/issue/run metadata without a shell round-trip.
336
- - If `gh` is not installed, the web fetch tool against the equivalent
337
- `api.github.com` REST URL is the degraded read-only path.
247
+ Detailed reference material moved to `.opencode/skills/swarm-pr-review/references/scope-detection.md` (issue #2907 progressive-disclosure budget).
338
248
 
339
249
  ## Phase 0A: Existing PR Signal Ingestion
340
250
 
@@ -394,65 +304,7 @@ When thread resolution state matters, prefer GraphQL review-thread inspection.
394
304
  If GraphQL is unavailable, keep the signal and mark
395
305
  `resolution_state: UNKNOWN`; do not drop it from scope.
396
306
 
397
- ### Step 1 — Fetch all PR feedback surfaces
398
-
399
- The commands below are GitHub examples. On GitLab, Bitbucket, Gerrit, or
400
- another code host, use the host's API/connector/CLI to enumerate the same full
401
- surface, including pagination and unresolved-thread state. Host choice never
402
- reduces the intake ledger.
403
-
404
- ```bash
405
- # Issue comments (general PR thread)
406
- gh api --paginate repos/{owner}/{repo}/issues/{PR_NUMBER}/comments
407
-
408
- # Review comments (inline code comments)
409
- gh api --paginate repos/{owner}/{repo}/pulls/{PR_NUMBER}/comments
410
-
411
- # Review summaries (approve/request-changes/comment events)
412
- gh api --paginate repos/{owner}/{repo}/pulls/{PR_NUMBER}/reviews
413
- ```
414
-
415
- `--paginate` requests every REST page. These three calls are gate-allowed as
416
- written. A literal jq filter passed as one closed double-quoted `gh api --jq`
417
- argument is also allowed when it needs no backslash-escaped nested double
418
- quotes; use `gh_evidence` when a portable filter cannot meet that shape. A real
419
- shell pipeline to `jq` or another command remains blocked. To
420
- separate bot/automated reviews (Copilot, Codex, CodeRabbit, etc.) from human
421
- ones, apply the same predicate in context to the JSON already returned above
422
- — `user.type == "Bot"` or a `user.login` match against
423
- `bot|copilot|coderabbit|codex` (case-insensitive) — instead of re-fetching
424
- with a shell-side `--jq` filter. `gh_evidence` with `target: "pr"` and
425
- `fields: "comments"` is the sanctioned read-only tool path for the same PR
426
- comment data when a tool call is preferred over a raw shell command. `gh pr
427
- view --json comments,reviews` is convenience-only because those fields have
428
- item caps; never use it as the authoritative "all signals" intake.
429
-
430
- ### Step 2 — Classify each comment
431
-
432
- | Category | Action |
433
- |----------|--------|
434
- | **Human review with file:line evidence** | Add as candidate finding with `source: existing-review` — still needs reviewer validation |
435
- | **Bot/automated finding with specific code reference** | Add as candidate finding with `source: bot-review` — high false-positive rate, treat as unverified |
436
- | **General feedback / style preference** | Add as advisory obligation |
437
- | **Resolved/outdated comment** | Skip — note in report under "Ingested Resolved Comments" |
438
- | **Requested changes not yet addressed** | Add as HIGH-priority obligation |
439
-
440
- ### Step 3 — Merge into review pipeline
441
-
442
- All ingested comments become candidate findings or obligations. They follow the
443
- same Phase 3-8 pipeline as freshly discovered findings. Ingested findings are
444
- NOT pre-confirmed — they still require independent reviewer validation per the
445
- Anti-Self-Review Rule.
446
-
447
- **Comment-ledger output:**
448
- ```
449
- [INGESTED] | source | category | file:line (if applicable) | original_author | status: PENDING_VALIDATION / SKIPPED_OUTDATED / ADVISORY
450
- ```
451
-
452
- ### Anti-patterns
453
- - ✗ Ignoring bot reviews because "bots produce false positives" — they also catch real issues
454
- - ✗ Pre-confirming human review comments without independent validation — even senior reviewers make mistakes
455
- - ✗ Skipping inline review comments and only reading the summary — inline comments contain the evidence
307
+ Detailed reference material moved to `.opencode/skills/swarm-pr-review/references/phase0a-intake.md` (issue #2907 progressive-disclosure budget).
456
308
 
457
309
  ## Phase 0B: Mergeability and Branch-State Intake
458
310
 
@@ -722,18 +574,7 @@ ledger file):
722
574
  `boundary: "post_critic"` and update final status, the authoritative
723
575
  `severity`, and final reporting or handoff action.
724
576
 
725
- **Enforced order, dispositions, and error reporting (Profile A).** The
726
- trigger evaluation must complete before every findings boundary EXCEPT the
727
- base-only `post_explorer` write above, which is admissible right after base
728
- settlement (issue #2280); beyond that exception checkpoints run strictly
729
- `post_explorer` → `post_reviewer` → `post_critic`, each requiring the prior
730
- checkpoint persisted, and `post_reviewer`/`post_critic` must exactly cover
731
- the FULL (base+micro) candidate inventory against the persisted trigger-eval
732
- artifact; records must match the authoritative reviewer/critic
733
- verdict rows, and an invalid payload is rejected in ONE call listing every
734
- violation as `finding_id: field expected <value>, got <value>`. Full contract
735
- (write order, dispositions, severity authority table, handoff schema):
736
- references/findings-persistence-contract.md.
577
+ Detailed reference material moved to `.opencode/skills/swarm-pr-review/references/findings-persistence-detail.md` (issue #2907 progressive-disclosure budget).
737
578
 
738
579
  Resume/reload procedure: read the latest `findings.jsonl` and reconstruct the
739
580
  ledger from disk before dispatching more lanes; the base-only `post_explorer`
@@ -1019,11 +860,7 @@ input was rejected. Do not guess at hidden predicates, weaken acceptance, or
1019
860
  switch to blocking/direct-Task dispatch; repair the named contract when it is
1020
861
  available, otherwise stop at the coverage gate with the diagnostic gap.
1021
862
 
1022
- ### Candidate extraction via parser
1023
-
1024
- Under Profile A, after `collect_lane_results` returns for base lanes, process
1025
- each lane result that carries an `output_ref`. The orchestrator MUST use the
1026
- candidate parser rather than preview-text extraction:
863
+ Detailed reference material moved to `.opencode/skills/swarm-pr-review/references/parser-candidate-extraction.md` (issue #2907 progressive-disclosure budget).
1027
864
 
1028
865
  1. For each singleton base `output_ref`, call `parse_lane_candidates` with
1029
866
  `output_ref`, `producer: "swarm-pr-review"`,
@@ -1046,73 +883,13 @@ candidate parser rather than preview-text extraction:
1046
883
  complete trigger accounting and settle every launched micro-lane first.
1047
884
 
1048
885
  If a lane has `output_degraded: true`, no usable `output_ref`, or `transcript_incomplete: true` without typed positive-candidate recovery, apply the COVERAGE GATE (Phase 3). An incomplete base or micro discovery lane may proceed only when it is explicitly named by a `salvaged_workflow_lane_recoveries` entry whose `kind` is `transcript-incomplete-terminal-candidate`; that recovery validates the retained positive `[CANDIDATE]` row only. Council, reviewer, and critic lanes never qualify for this incomplete-transcript recovery and must retry. Recovery never validates `[CLEAN]`, candidate absence, an unowned sibling lane, or an incomplete lane with no matching entry. Do not use blocking or direct-Task fallbacks while the controller is active, mark affected candidates UNVERIFIED to proceed, or infer candidate absence from a preview. Under Profiles B/C, which have no typed recovery validation, a truncated, incomplete, empty, or attestation-free subagent report is the same lane-output failure and takes the same COVERAGE GATE.
1049
-
1050
886
  After candidate parsing and before reviewer dispatch, persist the post-explorer
1051
887
  candidate ledger. The base-only write is admissible immediately after base
1052
888
  settlement — it is the durable recovery point for context compaction from base
1053
889
  settlement onward; once trigger evaluation completes, a full-inventory
1054
890
  (base+micro) `post_explorer` write may refresh it ahead of Phase 6.
1055
891
 
1056
- **Profiles B/C row convention:** without the parser, the `[CANDIDATE]` row
1057
- format is the extraction contract itself. Explorers emit the rows directly in
1058
- their reports (see the Explorer Prompt Template reference); the orchestrator
1059
- collects them verbatim, validates each row's field count and lane id, and
1060
- treats malformed rows — or output with neither `[CANDIDATE]` rows nor a fully
1061
- populated `[CLEAN]` attestation — as a lane-output failure under the COVERAGE
1062
- GATE. If the parser is unavailable under Profile A, the same row convention
1063
- applies as a fallback, but the orchestrator SHOULD use the parser as the
1064
- primary extraction mechanism.
1065
-
1066
- **lane id uniqueness for parallel dispatches:** When re-dispatching failed or
1067
- re-running explorer lanes, every `dispatch_lanes_async` or `dispatch_lanes`
1068
- lane `id` MUST be unique within that dispatch batch and should include lane and
1069
- attempt suffixes (e.g., `pr_review_explore_lane1_attempt2`). Never reuse an id
1070
- in the same batch unless intentionally replacing that exact lane before dispatch.
1071
-
1072
- Explorers optimize for recall. Over-reporting is expected. Explorers produce candidates only.
1073
-
1074
- The six dimensions are a fixed **check-type** partition, not an area
1075
- partition: every PR needs all six review dimensions, and the lanes
1076
- deliberately overlap by file, each receiving the same diff (via
1077
- `common_prompt` under Profile A) and viewing it through a different lens. Six
1078
- dimensions are this workflow's high-assurance coverage floor, not a claim that
1079
- research proves a universal optimal agent count — the published evidence
1080
- favors complementary, distinct-lens reviewers over duplicated generalists, and
1081
- finding rates rise with diff size, which is why dispatch (not coverage)
1082
- follows the depth tier. Repository policy may add scrutiny but may never
1083
- reduce the six dimensions. Coverage is guaranteed by all six dimensions
1084
- reading the whole diff, so the disjoint-partition rule that governs area-split
1085
- fan-outs does not apply.
1086
-
1087
- | `workflow_lane` | Focus | Required checks |
1088
- |---|---|---|
1089
- | `intent-architecture` | Intent, scope, architecture, and integration | obligation mapping, design fit, callers/consumers, sibling patterns, docs and claimed-vs-actual behavior |
1090
- | `correctness-state` | Functional correctness, data/state flow, edge cases, and failure paths | input domains, nullability, ordering, transactions, error behavior, rollback, backwards behavior |
1091
- | `tests-falsifiability` | Tests, test validity, regressions, and claimed validation | assertion strength, negative paths, isolation, fixtures, deterministic timing, missing proof |
1092
- | `security-trust` | Security, privacy, trust boundaries, unsafe inputs/sinks, and supply chain | authorization, injection, secrets, provenance, dependency risk, data exposure, abuse paths |
1093
- | `reliability-performance` | Reliability, concurrency, retries, resource bounds, and performance | races, retry semantics, timeouts, lifecycle, caching, algorithmic cost, operational failure modes |
1094
- | `compatibility-delivery` | API/schema/config compatibility, maintainability, build/deploy, docs, and release behavior | public contracts, migrations, runtime/platform support, packaging, CI, rollout and recovery guidance |
1095
-
1096
- ### Explorer context contract
1097
-
1098
- Every explorer must inspect or explicitly mark unavailable:
1099
-
1100
- 1. the changed hunk,
1101
- 2. at least one caller, consumer, or downstream impact-cone node,
1102
- 3. at least one callee, dependency, or upstream assumption,
1103
- 4. at least one sibling implementation or prior pattern,
1104
- 5. the nearest relevant test or missing-test location,
1105
- 6. deterministic signal entries mapped to its files/symbols,
1106
- 7. relevant Swarm knowledge/evidence entries, if present.
1107
- 8. the exact bound review range to analyze (`base_sha...pr_head_sha`),
1108
-
1109
- ### Explorer output format
1110
-
1111
- Explorers emit structured candidate records. The parser reads the full lane
1112
- artifact and extracts these records. The canonical record shape is:
1113
-
1114
- The fence below is documentation formatting only. Emit the header and all
1115
- machine-readable rows as unfenced plain text; do not emit the backticks.
892
+ Detailed reference material moved to `.opencode/skills/swarm-pr-review/references/explorer-output-format.md` (issue #2907 progressive-disclosure budget).
1116
893
 
1117
894
  ```text
1118
895
  [CANDIDATE] | candidate_id | lane | severity | category | file:line | claim | evidence_summary | impact_context | confidence | risk_impact | risk_tags
@@ -1120,19 +897,8 @@ machine-readable rows as unfenced plain text; do not emit the backticks.
1120
897
 
1121
898
  Profile A now treats `submit_pr_review_result` as the authoritative settlement path for base and micro discovery lanes. The caller-bound structured receipt dominates later prose, truncation, or transcript incompleteness. Transcript candidate/clean rows remain deprecated compatibility only when `pr_review_legacy_transcript_compatibility` was explicitly enabled for that lane and no structured receipt exists; a present-but-invalid structured result fails closed and never falls back.
1122
899
 
1123
- When compatibility mode is active, Profile A stores the full assistant transcript. The parser locates the first pipe-delimited line whose first field is exactly `[CANDIDATE]`, ignores unmarked preamble, and requires the exact canonical base/micro header; malformed markers or marker-prefixed rows without a header fail closed. The controller refuses a missing marker. Markerless positional fallback remains only for legacy callers outside that trust boundary; explorers should put the canonical header first.
1124
-
1125
900
  The confidence data value must be exactly LOW, MEDIUM, or HIGH.
1126
901
 
1127
- Under Profile A the parser-backed transcript path is compatibility-only; a successful `submit_pr_review_result` receipt is authoritative. On Profiles B/C — and on a Profile A lane whose snapped contract explicitly enables deprecated legacy transcript compatibility and lacks a structured receipt — the explorer emits `[CANDIDATE]` rows directly as the extraction contract.
1128
-
1129
- Explorers must not use `CONFIRMED`, `DISPROVED`, or `PRE_EXISTING`.
1130
-
1131
- A base lane that finds no surviving candidates must submit exactly one structured CLEAN result and then stop. Only a lane in the deprecated transcript-compatibility path may instead emit exactly one fully populated clean row:
1132
-
1133
- The fence below is documentation formatting only. Emit the clean attestation
1134
- as unfenced plain text; do not emit the backticks.
1135
-
1136
902
  ```text
1137
903
  [CLEAN] | lane | coverage_scope | evidence
1138
904
  ```
@@ -1140,8 +906,6 @@ as unfenced plain text; do not emit the backticks.
1140
906
  Header-only `[CLEAN]` markers, prose-only "clean" claims, or empty output do
1141
907
  not settle the lane.
1142
908
 
1143
- ---
1144
-
1145
909
  ## Phase 4: Mandatory Repository-Agnostic Micro-Lanes
1146
910
 
1147
911
  After base lanes settle, inspect the exact diff/context pack to focus every row
@@ -1605,72 +1369,7 @@ F-001 | severity | category | root cause | affected file:line refs | reviewer |
1605
1369
 
1606
1370
  ---
1607
1371
 
1608
- ## Phase 10: Metrics and Knowledge Writeback
1609
-
1610
- At the end of the review, include review quality metrics in the final report's
1611
- validation provenance. Persist them only through an invoked evidence tool and
1612
- record the exact `.swarm/evidence/` path returned by that tool; if no invoked
1613
- tool supports metrics (including all of Profiles B/C), state `NOT PERSISTED —
1614
- no metrics evidence writer` and keep the metrics block in the final report and
1615
- session ledger rather than naming a nonexistent command or path.
1616
-
1617
- Record:
1618
-
1619
- - raw candidates by base lane,
1620
- - raw candidates by micro-lane,
1621
- - deterministic tool candidates,
1622
- - reviewer-confirmed findings,
1623
- - reviewer-disproved findings,
1624
- - reviewer-unverified findings,
1625
- - critic-upheld findings,
1626
- - critic-downgraded findings,
1627
- - critic-disproved findings,
1628
- - final reported findings,
1629
- - suppressed non-actionable candidates,
1630
- - recurring false-positive patterns,
1631
- - commands or probes used,
1632
- - token/time cost if available,
1633
- - accepted/fixed findings when known.
1634
-
1635
- Knowledge writeback rules:
1636
-
1637
- - Write back only validated true positives or validated false-positive patterns.
1638
- - Include file patterns, invariant, evidence, and why it was confirmed/disproved.
1639
- - Mark repo-specific lessons as project-tier unless there is strong evidence they generalize.
1640
- - Never promote quarantined or unvalidated knowledge to hive-tier.
1641
- - Never store secrets, private tokens, or raw sensitive logs.
1642
-
1643
- ---
1644
-
1645
- ## Phase 11: Post-Fix Re-verification
1646
-
1647
- When the PR author pushes fixes after a review, perform a targeted re-verification before updating the verdict.
1648
-
1649
- ### Re-verification scope
1650
-
1651
- Only re-verify findings the author claims to have fixed. Do not re-run the full review pipeline.
1652
-
1653
- ### Re-verification steps
1654
-
1655
- 1. For each finding the author claims fixed:
1656
- a. Read the changed file(s) from the updated branch at the specific lines referenced in the original finding.
1657
- b. Verify the fix addresses the root cause, not just the symptom.
1658
- c. Check that the fix does not introduce a new issue in the same area.
1659
- 2. Run CI checks on the updated branch to confirm no regressions.
1660
- 3. For findings the author did not address, carry forward the original finding with unchanged status.
1661
-
1662
- ### Re-verification output
1663
-
1664
- ```
1665
- [REVERIFIED] | finding_id | FIXED / PARTIALLY_FIXED / NOT_FIXED / NEW_ISSUE | evidence | updated_severity
1666
- ```
1667
-
1668
- - `FIXED`: the root cause is resolved and no new issue introduced.
1669
- - `PARTIALLY_FIXED`: the root cause is partially addressed or a residual concern remains.
1670
- - `NOT_FIXED`: the root cause persists unchanged.
1671
- - `NEW_ISSUE`: the fix introduced a new problem at the same location.
1672
-
1673
- Update the verdict only after re-verifying all previously blocking findings.
1372
+ Detailed reference material moved to `.opencode/skills/swarm-pr-review/references/writeback-phases.md` (issue #2907 progressive-disclosure budget).
1674
1373
 
1675
1374
  ---
1676
1375
 
@@ -1680,41 +1379,10 @@ For the full parser-based candidate extraction dry-run example, read `references
1680
1379
 
1681
1380
  # Council Mode Workflow
1682
1381
 
1683
- Council mode is opt-in only and adversarial.
1684
-
1685
- When triggered:
1686
-
1687
- 1. Build the same context pack as default mode.
1688
- 2. After the default base-dimension and risk-family coverage is complete, launch all supplementary council agents. Under Profile A, use one `dispatch_lanes_async` call with `mode: "swarm-pr-review:council"`, the same exact `pr_head_sha`, and one unique `workflow_lane` per council member; continue independent context preparation while they run, polling with `collect_lane_results` (without `wait`) to process settled agents incrementally, and use `wait: true` only when no independent work remains. All agents must be settled and their candidates added to the ledger before reviewer classification; under Profile A the runtime enforces this join barrier, and blocking, sequential, or direct-Task fallback is not equivalent to the structured council dispatch — bypassing the active controller is `BLOCKED`. Under Profile B, dispatch council members as parallel subagents with the same marker contract and settle them all before reviewer classification; under Profile C, run each council lens as a separate sequential pass.
1689
- 3. Each council agent assumes all work is wrong until code evidence proves otherwise.
1690
- 4. Each agent hunts within its lane only.
1382
+ Detailed reference material moved to `.opencode/skills/swarm-pr-review/references/council-mode.md` (issue #2907 progressive-disclosure budget).
1383
+ 2. After the default base-dimension and risk-family coverage is complete, launch all supplementary council agents. Under Profile A, use one `dispatch_lanes_async` call with `mode: "swarm-pr-review:council"`, the same exact `pr_head_sha`, and one unique `workflow_lane` per council member; continue independent context preparation while they run, polling with `collect_lane_results` (without `wait`) to process settled agents incrementally, and use `wait: true` only when independent work remains. All agents must be settled and their candidates added to the ledger before reviewer classification; under Profile A the runtime enforces this join barrier, and blocking, sequential, or direct-Task fallback is not equivalent to the structured council dispatch — bypassing the active controller is `BLOCKED`. Under Profile B, dispatch council members as parallel subagents with the same marker contract and settle them all before reviewer classification; under Profile C, run each council lens as a separate sequential pass.
1691
1384
  5. Council uses the micro-lane row family: `[CANDIDATE] | candidate_id | micro_lane | severity | category | file:line | claim | invariant_violated | evidence_summary | confidence | risk_impact | risk_tags`. Emit one row per `EVIDENCE_FOUND` or `SUSPICIOUS` claim, or a fully populated `[CLEAN] | micro_lane | coverage_scope | evidence` row when no candidate survives. Put the exact council `workflow_lane` value in the `micro_lane` data field. Council prose without one of those markers does not settle the lane.
1692
- 6. Agents must not return `CONFIRMED`, `DISPROVED`, or final severity; candidate severity remains provisional until reviewer classification.
1693
- 7. The independent reviewer then classifies every council candidate as `CONFIRMED`, `DISPROVED`, `UNVERIFIED`, or `PRE_EXISTING`.
1694
- 8. Apply critic challenge to reviewer-confirmed HIGH/CRITICAL or borderline findings.
1695
- 9. Final synthesis distinguishes real blockers, real low-severity issues, accepted caveats, disproved council claims, and follow-up quality work.
1696
-
1697
- Default council lanes:
1698
-
1699
1385
  - correctness and edge cases,
1700
- - security and trust boundaries,
1701
- - dependency and deployment safety,
1702
- - docs and intent-vs-actual,
1703
- - tests and falsifiability,
1704
- - performance and architecture when risk justifies it.
1705
-
1706
- Council prompt requirements:
1707
-
1708
- - branch and commit range,
1709
- - context pack summary,
1710
- - files owned by that lane,
1711
- - relevant impact cone,
1712
- - explicit checklist,
1713
- - strict output cap,
1714
- - `EVIDENCE_FOUND / SUSPICIOUS / CLEAN` only,
1715
- - file:line evidence required for `EVIDENCE_FOUND`.
1716
-
1717
- Council findings are supplementary, not authoritative overrides. Do not adopt council severities or claims without independent validation.
1718
1386
 
1719
1387
  ---
1720
1388
 
@@ -0,0 +1,38 @@
1
+ # Council Mode Workflow detail
2
+
3
+
4
+ Council mode is opt-in only and adversarial.
5
+
6
+ When triggered:
7
+
8
+ 1. Build the same context pack as default mode.
9
+ 2. After the default base-dimension and risk-family coverage is complete, launch all supplementary council agents. Under Profile A, use one `dispatch_lanes_async` call with `mode: "swarm-pr-review:council"`, the same exact `pr_head_sha`, and one unique `workflow_lane` per council member; continue independent context preparation while they run, polling with `collect_lane_results` (without `wait`) to process settled agents incrementally, and use `wait: true` only when no independent work remains. All agents must be settled and their candidates added to the ledger before reviewer classification; under Profile A the runtime enforces this join barrier, and blocking, sequential, or direct-Task fallback is not equivalent to the structured council dispatch — bypassing the active controller is `BLOCKED`. Under Profile B, dispatch council members as parallel subagents with the same marker contract and settle them all before reviewer classification; under Profile C, run each council lens as a separate sequential pass.
10
+ 3. Each council agent assumes all work is wrong until code evidence proves otherwise.
11
+ 4. Each agent hunts within its lane only.
12
+ 5. Council uses the micro-lane row family: `[CANDIDATE] | candidate_id | micro_lane | severity | category | file:line | claim | invariant_violated | evidence_summary | confidence | risk_impact | risk_tags`. Emit one row per `EVIDENCE_FOUND` or `SUSPICIOUS` claim, or a fully populated `[CLEAN] | micro_lane | coverage_scope | evidence` row when no candidate survives. Put the exact council `workflow_lane` value in the `micro_lane` data field. Council prose without one of those markers does not settle the lane.
13
+ 6. Agents must not return `CONFIRMED`, `DISPROVED`, or final severity; candidate severity remains provisional until reviewer classification.
14
+ 7. The independent reviewer then classifies every council candidate as `CONFIRMED`, `DISPROVED`, `UNVERIFIED`, or `PRE_EXISTING`.
15
+ 8. Apply critic challenge to reviewer-confirmed HIGH/CRITICAL or borderline findings.
16
+ 9. Final synthesis distinguishes real blockers, real low-severity issues, accepted caveats, disproved council claims, and follow-up quality work.
17
+
18
+ Default council lanes:
19
+
20
+ - correctness and edge cases,
21
+ - security and trust boundaries,
22
+ - dependency and deployment safety,
23
+ - docs and intent-vs-actual,
24
+ - tests and falsifiability,
25
+ - performance and architecture when risk justifies it.
26
+
27
+ Council prompt requirements:
28
+
29
+ - branch and commit range,
30
+ - context pack summary,
31
+ - files owned by that lane,
32
+ - relevant impact cone,
33
+ - explicit checklist,
34
+ - strict output cap,
35
+ - `EVIDENCE_FOUND / SUSPICIOUS / CLEAN` only,
36
+ - file:line evidence required for `EVIDENCE_FOUND`.
37
+
38
+ Council findings are supplementary, not authoritative overrides. Do not adopt council severities or claims without independent validation.
@@ -0,0 +1,54 @@
1
+ # Explorer output format
2
+
3
+ ### Explorer output format
4
+
5
+ Explorers emit structured candidate records. The parser reads the full lane
6
+ artifact and extracts these records. The canonical record shape is:
7
+
8
+ The fence below is documentation formatting only. Emit the header and all
9
+ machine-readable rows as unfenced plain text; do not emit the backticks.
10
+
11
+ ```text
12
+ [CANDIDATE] | candidate_id | lane | severity | category | file:line | claim | evidence_summary | impact_context | confidence | risk_impact | risk_tags
13
+ ```
14
+
15
+ Profile A now treats `submit_pr_review_result` as the authoritative settlement path for base and micro discovery lanes. The caller-bound structured receipt dominates later prose, truncation, or transcript incompleteness. Transcript candidate/clean rows remain deprecated compatibility only when `pr_review_legacy_transcript_compatibility` was explicitly enabled for that lane and no structured receipt exists; a present-but-invalid structured result fails closed and never falls back.
16
+
17
+ When compatibility mode is active, Profile A stores the full assistant transcript. The parser locates the first pipe-delimited line whose first field is exactly `[CANDIDATE]`, ignores unmarked preamble, and requires the exact canonical base/micro header; malformed markers or marker-prefixed rows without a header fail closed. The controller refuses a missing marker. Markerless positional fallback remains only for legacy callers outside that trust boundary; explorers should put the canonical header first.
18
+
19
+ The confidence data value must be exactly LOW, MEDIUM, or HIGH.
20
+
21
+ Under Profile A the parser-backed transcript path is compatibility-only; a successful `submit_pr_review_result` receipt is authoritative. On Profiles B/C — and on a Profile A lane whose snapped contract explicitly enables deprecated legacy transcript compatibility and lacks a structured receipt — the explorer emits `[CANDIDATE]` rows directly as the extraction contract.
22
+
23
+ Explorers must not use `CONFIRMED`, `DISPROVED`, or `PRE_EXISTING`.
24
+
25
+ A base lane that finds no surviving candidates must submit exactly one structured CLEAN result and then stop. Only a lane in the deprecated transcript-compatibility path may instead emit exactly one fully populated clean row:
26
+
27
+ The fence below is documentation formatting only. Emit the clean attestation
28
+ as unfenced plain text; do not emit the backticks.
29
+
30
+ ```text
31
+ [CLEAN] | lane | coverage_scope | evidence
32
+ ```
33
+
34
+ Header-only `[CLEAN]` markers, prose-only "clean" claims, or empty output do
35
+ not settle the lane.
36
+
37
+ ---
38
+
39
+ ---
40
+
41
+ # Explorer context contract
42
+
43
+ ### Explorer context contract
44
+
45
+ Every explorer must inspect or explicitly mark unavailable:
46
+
47
+ 1. the changed hunk,
48
+ 2. at least one caller, consumer, or downstream impact-cone node,
49
+ 3. at least one callee, dependency, or upstream assumption,
50
+ 4. at least one sibling implementation or prior pattern,
51
+ 5. the nearest relevant test or missing-test location,
52
+ 6. deterministic signal entries mapped to its files/symbols,
53
+ 7. relevant Swarm knowledge/evidence entries, if present.
54
+ 8. the exact bound review range to analyze (`base_sha...pr_head_sha`),
@@ -0,0 +1,15 @@
1
+ # Review Finding Persistence enforced order and error reporting
2
+
3
+
4
+ **Enforced order, dispositions, and error reporting (Profile A).** The
5
+ trigger evaluation must complete before every findings boundary EXCEPT the
6
+ base-only `post_explorer` write above, which is admissible right after base
7
+ settlement (issue #2280); beyond that exception checkpoints run strictly
8
+ `post_explorer` → `post_reviewer` → `post_critic`, each requiring the prior
9
+ checkpoint persisted, and `post_reviewer`/`post_critic` must exactly cover
10
+ the FULL (base+micro) candidate inventory against the persisted trigger-eval
11
+ artifact; records must match the authoritative reviewer/critic
12
+ verdict rows, and an invalid payload is rejected in ONE call listing every
13
+ violation as `finding_id: field expected <value>, got <value>`. Full contract
14
+ (write order, dispositions, severity authority table, handoff schema):
15
+ references/findings-persistence-contract.md.
@@ -0,0 +1,75 @@
1
+ # Candidate extraction via parser
2
+
3
+ ### Candidate extraction via parser
4
+
5
+ Under Profile A, after `collect_lane_results` returns for base lanes, process
6
+ each lane result that carries an `output_ref`. The orchestrator MUST use the
7
+ candidate parser rather than preview-text extraction:
8
+
9
+ 1. For each singleton base `output_ref`, call `parse_lane_candidates` with
10
+ `output_ref`, `producer: "swarm-pr-review"`,
11
+ `expected_family: "base_explorer"`, and `expected_lane` set to the exact
12
+ `workflow_lane` declared at dispatch. For a consolidated tier-S/M lane, call
13
+ the parser once for each owned dimension with that dimension as
14
+ `expected_lane` and pass `expected_lanes` as the lane's complete
15
+ `owned_workflow_lanes` array on every call. The parser reads the full artifact
16
+ from disk (no preview truncation issue), rejects unowned rows, and returns
17
+ structured `ParseResultWithSidecar` records.
18
+ 2. Filter the returned `candidates[]` by `producer: "swarm-pr-review"` plus the
19
+ exact `source_batch_id` and `source_lane_id` from the base dispatch. Treat a
20
+ family mismatch or parse error as a lane-output failure; family metadata is
21
+ not the acceptance boundary.
22
+ 3. Group the filtered candidates into reviewer-sized chunks:
23
+ - by file area (group by the directory or module of the `file_line` field),
24
+ - by category (group by the `category` field),
25
+ - by count (target max 50 candidates per chunk; smaller chunks are fine).
26
+ 4. Stage reviewer-sized chunks, but do not dispatch reviewers yet. Phase 4 must
27
+ complete trigger accounting and settle every launched micro-lane first.
28
+
29
+ If a lane has `output_degraded: true`, no usable `output_ref`, or `transcript_incomplete: true` without typed positive-candidate recovery, apply the COVERAGE GATE (Phase 3). An incomplete base or micro discovery lane may proceed only when it is explicitly named by a `salvaged_workflow_lane_recoveries` entry whose `kind` is `transcript-incomplete-terminal-candidate`; that recovery validates the retained positive `[CANDIDATE]` row only. Council, reviewer, and critic lanes never qualify for this incomplete-transcript recovery and must retry. Recovery never validates `[CLEAN]`, candidate absence, an unowned sibling lane, or an incomplete lane with no matching entry. Do not use blocking or direct-Task fallbacks while the controller is active, mark affected candidates UNVERIFIED to proceed, or infer candidate absence from a preview. Under Profiles B/C, which have no typed recovery validation, a truncated, incomplete, empty, or attestation-free subagent report is the same lane-output failure and takes the same COVERAGE GATE.
30
+
31
+ After candidate parsing and before reviewer dispatch, persist the post-explorer
32
+ candidate ledger. The base-only write is admissible immediately after base
33
+ settlement — it is the durable recovery point for context compaction from base
34
+ settlement onward; once trigger evaluation completes, a full-inventory
35
+ (base+micro) `post_explorer` write may refresh it ahead of Phase 6.
36
+
37
+ **Profiles B/C row convention:** without the parser, the `[CANDIDATE]` row
38
+ format is the extraction contract itself. Explorers emit the rows directly in
39
+ their reports (see the Explorer Prompt Template reference); the orchestrator
40
+ collects them verbatim, validates each row's field count and lane id, and
41
+ treats malformed rows — or output with neither `[CANDIDATE]` rows nor a fully
42
+ populated `[CLEAN]` attestation — as a lane-output failure under the COVERAGE
43
+ GATE. If the parser is unavailable under Profile A, the same row convention
44
+ applies as a fallback, but the orchestrator SHOULD use the parser as the
45
+ primary extraction mechanism.
46
+
47
+ **lane id uniqueness for parallel dispatches:** When re-dispatching failed or
48
+ re-running explorer lanes, every `dispatch_lanes_async` or `dispatch_lanes`
49
+ lane `id` MUST be unique within that dispatch batch and should include lane and
50
+ attempt suffixes (e.g., `pr_review_explore_lane1_attempt2`). Never reuse an id
51
+ in the same batch unless intentionally replacing that exact lane before dispatch.
52
+
53
+ Explorers optimize for recall. Over-reporting is expected. Explorers produce candidates only.
54
+
55
+ The six dimensions are a fixed **check-type** partition, not an area
56
+ partition: every PR needs all six review dimensions, and the lanes
57
+ deliberately overlap by file, each receiving the same diff (via
58
+ `common_prompt` under Profile A) and viewing it through a different lens. Six
59
+ dimensions are this workflow's high-assurance coverage floor, not a claim that
60
+ research proves a universal optimal agent count — the published evidence
61
+ favors complementary, distinct-lens reviewers over duplicated generalists, and
62
+ finding rates rise with diff size, which is why dispatch (not coverage)
63
+ follows the depth tier. Repository policy may add scrutiny but may never
64
+ reduce the six dimensions. Coverage is guaranteed by all six dimensions
65
+ reading the whole diff, so the disjoint-partition rule that governs area-split
66
+ fan-outs does not apply.
67
+
68
+ | `workflow_lane` | Focus | Required checks |
69
+ |---|---|---|
70
+ | `intent-architecture` | Intent, scope, architecture, and integration | obligation mapping, design fit, callers/consumers, sibling patterns, docs and claimed-vs-actual behavior |
71
+ | `correctness-state` | Functional correctness, data/state flow, edge cases, and failure paths | input domains, nullability, ordering, transactions, error behavior, rollback, backwards behavior |
72
+ | `tests-falsifiability` | Tests, test validity, regressions, and claimed validation | assertion strength, negative paths, isolation, fixtures, deterministic timing, missing proof |
73
+ | `security-trust` | Security, privacy, trust boundaries, unsafe inputs/sinks, and supply chain | authorization, injection, secrets, provenance, dependency risk, data exposure, abuse paths |
74
+ | `reliability-performance` | Reliability, concurrency, retries, resource bounds, and performance | races, retry semantics, timeouts, lifecycle, caching, algorithmic cost, operational failure modes |
75
+ | `compatibility-delivery` | API/schema/config compatibility, maintainability, build/deploy, docs, and release behavior | public contracts, migrations, runtime/platform support, packaging, CI, rollout and recovery guidance |