opencode-swarm 7.123.0 → 7.125.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.
- package/.opencode/skills/critic-gate/SKILL.md +8 -0
- package/.opencode/skills/swarm/SKILL.md +12 -8
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +252 -62
- package/.opencode/skills/swarm-pr-review/SKILL.md +242 -76
- package/README.md +6 -1
- package/dist/background/lane-output-store.d.ts +10 -0
- package/dist/background/pending-delegations.d.ts +3 -0
- package/dist/background/workspace-snapshot.d.ts +59 -0
- package/dist/cli/{config-doctor-3ksh1534.js → config-doctor-be9sxqx8.js} +6 -6
- package/dist/cli/{core-cwgb7ev8.js → core-d38hc85b.js} +4 -4
- package/dist/cli/{curation-policy-4j4qce5a.js → curation-policy-52kt6d7t.js} +2 -2
- package/dist/cli/{curator-drift-6b2fjsgr.js → curator-drift-h9a2sjvf.js} +7 -7
- package/dist/cli/{curator-tkyn9bzz.js → curator-hbst8nbc.js} +32 -30
- package/dist/cli/curator-llm-factory-frde1955.js +54 -0
- package/dist/cli/{dispatch-07jgc3hn.js → dispatch-f4hj1cj7.js} +3 -3
- package/dist/cli/{evidence-summary-service-96ndczbk.js → evidence-summary-service-9hq7n9k9.js} +12 -12
- package/dist/cli/{gate-evidence-xqks3kk2.js → gate-evidence-cy2te3x8.js} +2 -2
- package/dist/cli/guardrail-explain-112kqmbc.js +55 -0
- package/dist/cli/guardrail-log-c8zcab91.js +16 -0
- package/dist/cli/hive-promoter-448xs2tp.js +69 -0
- package/dist/cli/{index-hns7xjm7.js → index-09vd53pz.js} +4 -2
- package/dist/cli/{pending-delegations-68cbaqv2.js → index-0cz1ws47.js} +9 -21
- package/dist/cli/{index-det5jwfk.js → index-0y6tmm9v.js} +5 -1
- package/dist/cli/index-134d35c1.js +116 -0
- package/dist/cli/{index-m1abzg93.js → index-1kz6da87.js} +4 -2
- package/dist/cli/{index-22e127jw.js → index-23zsx7dm.js} +5 -3
- package/dist/cli/{index-kzj3fp7c.js → index-2445sx3d.js} +1 -1
- package/dist/cli/{index-ctpgsj84.js → index-2tn5h2zp.js} +1 -1
- package/dist/cli/{index-6xnxz6z0.js → index-3x761jqv.js} +4 -2
- package/dist/cli/{index-7cspygmb.js → index-4rzzzjtg.js} +11 -8
- package/dist/cli/{index-cqsak7bf.js → index-67hqr2zv.js} +1 -1
- package/dist/cli/{index-nprawcc0.js → index-6n2jpz7x.js} +1 -1
- package/dist/cli/{index-19zn67q6.js → index-6vfvc36k.js} +5 -1
- package/dist/cli/{index-6sgqnvpw.js → index-7j3sm7h8.js} +2 -2
- package/dist/cli/{index-2j25br0p.js → index-958hf0yr.js} +9 -9
- package/dist/cli/{index-j9kxwshw.js → index-99ed0h32.js} +8 -6
- package/dist/cli/{index-7g91saha.js → index-9hbwa5x1.js} +40 -32
- package/dist/cli/{index-jyrhy4ww.js → index-amspa811.js} +3179 -1557
- package/dist/cli/index-bk5tah7q.js +19 -0
- package/dist/cli/{index-293f68mj.js → index-bpmtbmy9.js} +4680 -4342
- package/dist/cli/{index-m0bmh3w0.js → index-dx2c2wjt.js} +2 -2
- package/dist/cli/{index-ye3fndsw.js → index-gacm5s2n.js} +9 -5
- package/dist/cli/{index-d6h5hq91.js → index-gnvg72y1.js} +2 -2
- package/dist/cli/{index-17eybc3z.js → index-jh6s75f6.js} +1 -1
- package/dist/cli/{index-vcgfqd8f.js → index-k5jrywpr.js} +4 -2
- package/dist/cli/{index-3rr0ese8.js → index-kt0awv1n.js} +41 -9
- package/dist/cli/index-mg54y5gc.js +564 -0
- package/dist/cli/{index-dywekeen.js → index-n6chz2g8.js} +1 -1
- package/dist/cli/{index-gnp9x6se.js → index-n832052r.js} +4 -2
- package/dist/cli/{index-816rkp4y.js → index-s9mj4rb9.js} +5 -3
- package/dist/cli/{index-gw3m5fw0.js → index-v2rdhwx8.js} +5 -3
- package/dist/cli/{index-q00e4s1s.js → index-vtwqjr4z.js} +11 -7
- package/dist/cli/index-xattnmyb.js +2502 -0
- package/dist/cli/{index-n2712byd.js → index-yt1v62pv.js} +8 -5
- package/dist/cli/{index-5e4e2hvv.js → index-z6xqpmqg.js} +4 -0
- package/dist/cli/{index-p0arc26j.js → index-zjygnfay.js} +7 -2
- package/dist/cli/index.js +35 -31
- package/dist/cli/{knowledge-escalator-dyxsm78k.js → knowledge-escalator-htafbhxg.js} +4 -4
- package/dist/cli/{knowledge-events-36q6nvae.js → knowledge-events-havw8c4t.js} +1 -1
- package/dist/cli/{knowledge-store-e07b4s54.js → knowledge-store-hqngpt2v.js} +2 -2
- package/dist/cli/{knowledge-validator-sfyf7wn2.js → knowledge-validator-g7mpnazh.js} +5 -5
- package/dist/cli/pending-delegations-7j8xqg5f.js +34 -0
- package/dist/cli/{pr-subscriptions-x653151h.js → pr-subscriptions-bxpqde8w.js} +5 -5
- package/dist/cli/{scan-cursor-hm0aqqae.js → scan-cursor-sx7cvh8v.js} +3 -3
- package/dist/cli/{schema-13bnng2n.js → schema-2418eqy3.js} +7 -4
- package/dist/cli/{scope-persistence-d9erwnvb.js → scope-persistence-habn4q8a.js} +4 -4
- package/dist/cli/{skill-generator-63r20a9k.js → skill-generator-zggy797r.js} +7 -7
- package/dist/cli/sqlite-loader-r1kgt2pq.js +12 -0
- package/dist/cli/workspace-snapshot-c9pxxt9a.js +48 -0
- package/dist/commands/memory-link.d.ts +28 -0
- package/dist/commands/registry.d.ts +26 -1
- package/dist/config/schema.d.ts +6 -0
- package/dist/hooks/pr-workflow-gate.d.ts +211 -0
- package/dist/hooks/pr-workflow-response-gate.d.ts +23 -0
- package/dist/hooks/pr-workflow-session-resolver.d.ts +14 -0
- package/dist/index.js +496 -451
- package/dist/knowledge/family-migration-shared.d.ts +24 -0
- package/dist/knowledge/family-migration.d.ts +5 -0
- package/dist/memory/config.d.ts +11 -0
- package/dist/memory/consolidation-log.d.ts +8 -2
- package/dist/memory/finalize-reward-sweep.d.ts +2 -1
- package/dist/memory/gateway.d.ts +13 -0
- package/dist/memory/index.d.ts +4 -2
- package/dist/memory/local-jsonl-provider.d.ts +25 -1
- package/dist/memory/memory-family-manifest.d.ts +52 -0
- package/dist/memory/memory-family-migration.d.ts +94 -0
- package/dist/memory/memory-link.d.ts +103 -0
- package/dist/memory/provider-pool.d.ts +35 -0
- package/dist/memory/redaction.d.ts +31 -0
- package/dist/memory/schema.d.ts +21 -0
- package/dist/memory/sqlite-provider.d.ts +58 -1
- package/dist/memory/storage-root.d.ts +93 -0
- package/dist/memory/types.d.ts +20 -1
- package/dist/services/knowledge-diagnostics.d.ts +25 -0
- package/dist/services/status-service.d.ts +16 -0
- package/dist/tools/complete-pr-workflow.d.ts +5 -0
- package/dist/tools/dispatch-lanes.d.ts +44 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/manifest.d.ts +2 -0
- package/dist/tools/run-pr-feedback-stage-a.d.ts +69 -0
- package/dist/tools/tool-metadata.d.ts +8 -0
- package/dist/tools/write-pr-review-trigger-eval.d.ts +56 -46
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-mfvd4sqx.js +0 -52
- package/dist/cli/guardrail-explain-4vytbchb.js +0 -53
- package/dist/cli/guardrail-log-z291m4gw.js +0 -16
- package/dist/cli/hive-promoter-y5wsztkc.js +0 -67
- package/dist/cli/index-4rhcth7a.js +0 -14
- package/dist/cli/index-dqh3zhhc.js +0 -133
- package/dist/cli/index-wr8qgpz5.js +0 -2463
- package/dist/cli/workspace-snapshot-eyf6gd0d.js +0 -22
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: swarm-pr-review
|
|
3
3
|
audience: swarm-plugin
|
|
4
|
-
description: Run a graph-guided, tool-augmented
|
|
4
|
+
description: Run a graph-guided, tool-augmented PR review using context packing, parallel exploration, mandatory repository-agnostic micro-lanes, 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.
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ Run a structured, high-confidence PR review that maximizes valid findings withou
|
|
|
11
11
|
|
|
12
12
|
The review ladder is:
|
|
13
13
|
|
|
14
|
-
**Scope → obligations → context pack → deterministic signals → parallel explorers →
|
|
14
|
+
**Scope → obligations → context pack → deterministic signals → parallel explorers → all repository-agnostic review micro-lanes → independent reviewer validation → critic challenge → grouped synthesis → metrics / knowledge writeback.**
|
|
15
15
|
|
|
16
16
|
## Handoff To PR Feedback
|
|
17
17
|
|
|
@@ -47,11 +47,11 @@ subscribed session.
|
|
|
47
47
|
|
|
48
48
|
**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.
|
|
49
49
|
|
|
50
|
-
This workflow is designed for
|
|
50
|
+
This workflow is designed for any repo that benefits from Swarm-style review. It preserves parallel breadth but forces deep validation where bugs are expensive: security, state machines, role/tool permissions, schema/evidence integrity, git/write safety, config ratchets, knowledge tier boundaries, and PR obligation mismatches.
|
|
51
51
|
|
|
52
52
|
Never APPROVE a PR with unresolved CRITICAL findings. Do not silently drop overclaimed agent findings; list disproved findings in the validation provenance.
|
|
53
53
|
|
|
54
|
-
**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.
|
|
54
|
+
**Quality is the ONLY metric.** There is no speed, efficiency, or time exception. 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.
|
|
55
55
|
|
|
56
56
|
---
|
|
57
57
|
|
|
@@ -59,7 +59,7 @@ Never APPROVE a PR with unresolved CRITICAL findings. Do not silently drop overc
|
|
|
59
59
|
|
|
60
60
|
### Default layered workflow
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Always run the default mechanical workflow. Explorers produce only candidates. The orchestrator does not confirm or disprove candidates.
|
|
63
63
|
|
|
64
64
|
### Council mode — opt in only
|
|
65
65
|
|
|
@@ -73,7 +73,7 @@ Council mode applies only when the user explicitly says one of:
|
|
|
73
73
|
- `[MODE: PR_REVIEW … council=true]`
|
|
74
74
|
- `assume all work is wrong`
|
|
75
75
|
|
|
76
|
-
Council mode is
|
|
76
|
+
Council mode supplements the default mechanical workflow; it never replaces or weakens it. Even when council mode is triggered, first complete the exact-six base dispatch, micro-lane ledger persistence, and every repository-agnostic micro-lane at the same exact `pr_head_sha`. Route supplementary council output into the candidate ledger before independent reviewer classification. If the council request arrives after classification has begun, run the council as an additional candidate pass and dispatch a new structured reviewer batch for those candidates before synthesis.
|
|
77
77
|
|
|
78
78
|
---
|
|
79
79
|
|
|
@@ -85,7 +85,7 @@ The orchestrator may:
|
|
|
85
85
|
|
|
86
86
|
- determine scope,
|
|
87
87
|
- build or request the context pack,
|
|
88
|
-
- launch explorers and
|
|
88
|
+
- launch explorers and every mandatory repository-agnostic micro-lane,
|
|
89
89
|
- extract candidates from lane artifacts via `parse_lane_candidates` or equivalent parser,
|
|
90
90
|
- filter, group, and chunk candidates for reviewer dispatch,
|
|
91
91
|
- route candidates to reviewers,
|
|
@@ -137,7 +137,7 @@ If scope cannot be determined, review the narrowest safe scope available and sta
|
|
|
137
137
|
Before launching explorers (Phase 3), confirm the PR branch refs are available:
|
|
138
138
|
- If `head_ref` is a remote branch that is not checked out locally, fetch it via `git fetch origin <head_ref>`
|
|
139
139
|
- **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` / `Glob` / `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.**
|
|
140
|
-
- Explicitly pass the
|
|
140
|
+
- Explicitly pass the verified merge-base range (`base_sha...pr_head_sha`) in every explorer delegation so explorers inspect exactly the controller-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.
|
|
141
141
|
|
|
142
142
|
If refs cannot be fetched or checked out, state the limitation in the context pack.
|
|
143
143
|
|
|
@@ -149,14 +149,37 @@ pre-confirmed findings.
|
|
|
149
149
|
|
|
150
150
|
### PR title and body compliance check
|
|
151
151
|
|
|
152
|
-
Before deeper analysis,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
152
|
+
Before deeper analysis, discover whether the repository defines a PR
|
|
153
|
+
publication contract (for example a local `commit-pr` skill, `CONTRIBUTING`
|
|
154
|
+
guidance, a PR template, or a CI check such as `pr-standards`). If it does,
|
|
155
|
+
verify the PR against that contract and record any gap as an advisory ledger
|
|
156
|
+
item. If it does not, do not invent opencode-swarm-specific title/body
|
|
157
|
+
sections; still verify that the PR text is not misleading about what the diff
|
|
158
|
+
does or proves.
|
|
159
|
+
|
|
160
|
+
At minimum, check:
|
|
161
|
+
|
|
162
|
+
- required title/body/linked-issue structure from the discovered repository
|
|
163
|
+
contract,
|
|
164
|
+
- issue-closing, migration, release-note, invariant, or test-plan claims made
|
|
165
|
+
in the PR text,
|
|
166
|
+
- whether those claims are supported by the actual diff and the current issue
|
|
167
|
+
state.
|
|
168
|
+
|
|
169
|
+
**Issue-closing claim-integrity check:** if the PR body uses an issue-closing
|
|
170
|
+
keyword such as `Closes #<issue-number>`, verify (a) the issue is currently open
|
|
171
|
+
(`gh issue view <N> --json state` when the host is GitHub), and (b) the diff
|
|
172
|
+
addresses the issue's acceptance criteria (read the issue, map each criterion
|
|
173
|
+
to changed files/symbols, and inspect the diff for those areas). If the issue
|
|
174
|
+
is already closed by another merged PR, do NOT re-close it — the duplicate
|
|
175
|
+
closing reference is misleading. If the issue is open but the diff does not
|
|
176
|
+
address the acceptance criteria, mark the claim as `UNVERIFIED — claim
|
|
177
|
+
integrity` in the validation provenance and surface the unresolved gap to the
|
|
178
|
+
user before synthesis.
|
|
179
|
+
|
|
180
|
+
Contract non-compliance is a ledger item (advisory unless the repository
|
|
181
|
+
explicitly makes it blocking). If the PR is from an external contributor, note
|
|
182
|
+
the compliance gap for the maintainer to address before merge.
|
|
160
183
|
|
|
161
184
|
This intake includes:
|
|
162
185
|
|
|
@@ -172,6 +195,11 @@ If GraphQL is unavailable, keep the signal and mark
|
|
|
172
195
|
|
|
173
196
|
### Step 1 — Fetch all PR feedback surfaces
|
|
174
197
|
|
|
198
|
+
The commands below are GitHub examples. On GitLab, Bitbucket, Gerrit, or
|
|
199
|
+
another code host, use the host's API/connector/CLI to enumerate the same full
|
|
200
|
+
surface, including pagination and unresolved-thread state. Host choice never
|
|
201
|
+
reduces the intake ledger.
|
|
202
|
+
|
|
175
203
|
```bash
|
|
176
204
|
# Issue comments (general PR thread)
|
|
177
205
|
gh api --paginate repos/{owner}/{repo}/issues/{PR_NUMBER}/comments
|
|
@@ -230,6 +258,10 @@ feedback handoff artifact.
|
|
|
230
258
|
|
|
231
259
|
### Step 1 — Check merge state
|
|
232
260
|
|
|
261
|
+
The field names and values below are GitHub-specific examples. On another code
|
|
262
|
+
host, record the equivalent mergeability, conflict, required-check, base-drift,
|
|
263
|
+
and stale-head signals and preserve the same read-only behavior.
|
|
264
|
+
|
|
233
265
|
```bash
|
|
234
266
|
gh pr view <PR_NUMBER> --json mergeable,mergeStateStatus
|
|
235
267
|
```
|
|
@@ -562,7 +594,26 @@ Tool candidate rules:
|
|
|
562
594
|
|
|
563
595
|
## Phase 3: Parallel Base Explorer Lanes
|
|
564
596
|
|
|
565
|
-
Launch all base lanes with `dispatch_lanes_async` when available. Pass the six
|
|
597
|
+
Launch all base lanes with `dispatch_lanes_async` when available. Pass the six
|
|
598
|
+
lane specs together, set `mode: "swarm-pr-review:base"`, assign each lane its
|
|
599
|
+
exact `workflow_lane` identifier from the table below, set `max_concurrent` to
|
|
600
|
+
`6`, bind the batch with the exact current `pr_head_sha`, record the returned
|
|
601
|
+
`batch_id`, and pass the exact reviewed merge base and its live base tip/ref as
|
|
602
|
+
`base_sha` and `base_ref`. Every later base retry, micro, council, reviewer, and
|
|
603
|
+
critic dispatch repeats those same exact bindings. The controller recomputes
|
|
604
|
+
`git merge-base -- <base_ref> <pr_head_sha>`, rejects mismatches, and replaces
|
|
605
|
+
caller `scope` text with the complete verified `base_sha...pr_head_sha` PR diff;
|
|
606
|
+
caller scope is retained only as a non-authoritative focus hint. Continue only non-dependent architect
|
|
607
|
+
work: refine the obligation ledger, inspect PR metadata, prepare micro-lane
|
|
608
|
+
trigger checks, and run deterministic read-only local tools. The runtime rejects
|
|
609
|
+
partial, duplicate, mislabelled, or non-explorer base waves. Do not synthesize
|
|
610
|
+
findings from running lanes. Keep each lane `prompt` compact: send the shared
|
|
611
|
+
review context (PR diff, obligation ledger, scope) ONCE via the `common_prompt`
|
|
612
|
+
field, or have lanes read it from a file by absolute path, instead of inlining
|
|
613
|
+
the same large blob into all six prompts — oversized inline prompts produce
|
|
614
|
+
malformed or truncated tool-call JSON and force clumsy file workarounds.
|
|
615
|
+
|
|
616
|
+
This is an exact six-lane gate, not a soft target. If the base wave is launched with fewer than six lanes, the review is BLOCKED until the missing lanes are dispatched and settled; "small PR", "docs-only", "CI-only", and "time-saving" are not exceptions.
|
|
566
617
|
|
|
567
618
|
**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.
|
|
568
619
|
|
|
@@ -570,11 +621,11 @@ Before Phase 4 or synthesis, all base lanes must be settled. `dispatch_lanes_asy
|
|
|
570
621
|
|
|
571
622
|
**COVERAGE GATE — zero tolerance for unclosed gaps.** After `collect_lane_results`, verify every lane produced validated output. Two failure modes exist:
|
|
572
623
|
- **Mode A (empty output):** Lane returns 0 chars, `status: cancelled`, `output_digest` matches SHA-256 of empty string (`e3b0c442...b855`).
|
|
573
|
-
- **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.
|
|
624
|
+
- **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 and no parseable `[CLEAN] | workflow_lane | coverage_scope | evidence` attestation. 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 or clean proof.
|
|
574
625
|
|
|
575
626
|
For ANY lane that failed (either mode):
|
|
576
|
-
1. **Retry** (max 2 attempts) with materially different parameters — different session
|
|
577
|
-
2. If
|
|
627
|
+
1. **Retry** (max 2 attempts) with materially different parameters — different session or prompt decomposition, while preserving the required structured async mode and exact head provenance.
|
|
628
|
+
2. If a base lane fails, retry only the failed `workflow_lane` identifiers with `dispatch_lanes_async`, `mode: "swarm-pr-review:base"`, the same exact `pr_head_sha`, and explorer agents. The durable gate joins successful provenance across the initial wave and retry batches. Blocking `dispatch_lanes` and direct Task dispatch are not equivalent under this workflow because they cannot satisfy the structured provenance gate.
|
|
578
629
|
3. If no equivalent alternative can be verified, **STOP and surface the lane failure to the user as BLOCKED** with the lane id, scope, failure mode, retry attempts, and why equivalence could not be proven. Do not present partial findings, do not issue a review verdict, and do not synthesize from successful lanes. A low-quality partial review is worse than no review.
|
|
579
630
|
|
|
580
631
|
### Candidate extraction via parser
|
|
@@ -598,7 +649,7 @@ rather than preview-text extraction:
|
|
|
598
649
|
4. Stage reviewer-sized chunks, but do not dispatch reviewers yet. Phase 4 must
|
|
599
650
|
complete trigger accounting and settle every launched micro-lane first.
|
|
600
651
|
|
|
601
|
-
If a lane has `output_degraded: true`, `transcript_incomplete: true`, or no usable `output_ref`, apply the COVERAGE GATE from Phase 3
|
|
652
|
+
If a lane has `output_degraded: true`, `transcript_incomplete: true`, or no usable `output_ref`, apply the COVERAGE GATE from Phase 3 with a structured async retry using the applicable workflow mode and the same exact `pr_head_sha`. If the gap cannot be closed, stop and surface the lane failure to the user as BLOCKED. Do not use blocking or direct-Task fallbacks, mark affected candidates UNVERIFIED to proceed, or infer candidate absence from a preview.
|
|
602
653
|
|
|
603
654
|
After candidate parsing and before reviewer dispatch, persist the post-explorer
|
|
604
655
|
candidate ledger using the Review Finding Persistence contract. This is the
|
|
@@ -617,16 +668,24 @@ in the same batch unless intentionally replacing that exact lane before dispatch
|
|
|
617
668
|
|
|
618
669
|
Explorers optimize for recall. Over-reporting is expected. Explorers produce candidates only.
|
|
619
670
|
|
|
620
|
-
The six lanes are a fixed **check-type** partition
|
|
621
|
-
|
|
622
|
-
|
|
671
|
+
The six lanes are a fixed **check-type** partition, not an area partition: the
|
|
672
|
+
count is intentionally constant — every PR needs all six review dimensions —
|
|
673
|
+
and the lanes deliberately overlap by file, each receiving the same diff via
|
|
674
|
+
`common_prompt` and viewing it through a different lens. Six is this workflow's
|
|
675
|
+
high-assurance policy floor, not a claim that research proves a universal optimal
|
|
676
|
+
agent count. Repository policy may add scrutiny but may never reduce the six.
|
|
677
|
+
This is the deliberate exception to surface-scaled fan-out. Coverage is
|
|
678
|
+
guaranteed by all six dimensions reading the whole diff, so the disjoint-partition
|
|
679
|
+
rule that governs area-split fan-outs does not apply.
|
|
680
|
+
|
|
681
|
+
| `workflow_lane` | Focus | Required checks |
|
|
623
682
|
|---|---|---|
|
|
624
|
-
|
|
|
625
|
-
|
|
|
626
|
-
|
|
|
627
|
-
|
|
|
628
|
-
|
|
|
629
|
-
|
|
|
683
|
+
| `intent-architecture` | Intent, scope, architecture, and integration | obligation mapping, design fit, callers/consumers, sibling patterns, docs and claimed-vs-actual behavior |
|
|
684
|
+
| `correctness-state` | Functional correctness, data/state flow, edge cases, and failure paths | input domains, nullability, ordering, transactions, error behavior, rollback, backwards behavior |
|
|
685
|
+
| `tests-falsifiability` | Tests, test validity, regressions, and claimed validation | assertion strength, negative paths, isolation, fixtures, deterministic timing, missing proof |
|
|
686
|
+
| `security-trust` | Security, privacy, trust boundaries, unsafe inputs/sinks, and supply chain | authorization, injection, secrets, provenance, dependency risk, data exposure, abuse paths |
|
|
687
|
+
| `reliability-performance` | Reliability, concurrency, retries, resource bounds, and performance | races, retry semantics, timeouts, lifecycle, caching, algorithmic cost, operational failure modes |
|
|
688
|
+
| `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 |
|
|
630
689
|
|
|
631
690
|
### Explorer context contract
|
|
632
691
|
|
|
@@ -639,7 +698,7 @@ Every explorer must inspect or explicitly mark unavailable:
|
|
|
639
698
|
5. the nearest relevant test or missing-test location,
|
|
640
699
|
6. deterministic signal entries mapped to its files/symbols,
|
|
641
700
|
7. relevant Swarm knowledge/evidence entries, if present.
|
|
642
|
-
8. the
|
|
701
|
+
8. the exact controller-bound range to analyze (`base_sha...pr_head_sha`),
|
|
643
702
|
|
|
644
703
|
### Explorer output format
|
|
645
704
|
|
|
@@ -656,31 +715,57 @@ directly in the lane output as a fallback convention.
|
|
|
656
715
|
|
|
657
716
|
Explorers must not use `CONFIRMED`, `DISPROVED`, or `PRE_EXISTING`.
|
|
658
717
|
|
|
718
|
+
A base lane that finds no surviving candidates must emit exactly one fully
|
|
719
|
+
populated clean row:
|
|
720
|
+
|
|
721
|
+
```text
|
|
722
|
+
[CLEAN] | workflow_lane | coverage_scope | evidence
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
Header-only `[CLEAN]` markers, prose-only "clean" claims, or empty output do
|
|
726
|
+
not settle the lane.
|
|
727
|
+
|
|
659
728
|
---
|
|
660
729
|
|
|
661
|
-
## Phase 4:
|
|
730
|
+
## Phase 4: Mandatory Repository-Agnostic Micro-Lanes
|
|
662
731
|
|
|
663
|
-
After base lanes settle,
|
|
664
|
-
mandatory ledger with one row per
|
|
732
|
+
After base lanes settle, inspect the exact diff/context pack to focus every row
|
|
733
|
+
in the micro-lane map and print a mandatory ledger with one row per map row:
|
|
665
734
|
|
|
666
735
|
```text
|
|
667
|
-
[TRIGGER-EVAL] | trigger_row | MATCHED
|
|
736
|
+
[TRIGGER-EVAL] | trigger_row | MATCHED | focus_evidence
|
|
668
737
|
```
|
|
669
738
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
739
|
+
Focus evidence must name the changed files, manifests, imports/symbols, semantic
|
|
740
|
+
signals, or explicit absence conditions the lane should examine. `MATCHED` means
|
|
741
|
+
the lane is required, not that a keyword heuristic guessed applicability.
|
|
742
|
+
Repository identity, technology stack, PR size, elapsed time, or predicted risk
|
|
743
|
+
never justifies skipping a row.
|
|
744
|
+
|
|
745
|
+
Launch one focused micro-lane for every row, using
|
|
746
|
+
`dispatch_lanes_async` with `mode: "swarm-pr-review:micro"` and each lane's
|
|
747
|
+
`workflow_lane` equal to its trigger ID. Include the complete exact-set
|
|
748
|
+
`trigger_evaluation` ledger and the same exact current `pr_head_sha` in that
|
|
749
|
+
dispatch. Use a separate batch from base
|
|
750
|
+
lanes. Because the dispatcher accepts at most eight lanes per call, split the
|
|
751
|
+
eleven mandatory micro-lanes across bounded async batches. The runtime rejects
|
|
752
|
+
unrelated or duplicate micro-lanes within a batch, and final ledger persistence
|
|
753
|
+
rejects any row whose completed unique provenance is absent.
|
|
754
|
+
Poll incrementally, then settle every launched lane. Persist
|
|
678
755
|
the complete ledger with `write_pr_review_trigger_eval`; its rows use the stable
|
|
679
|
-
trigger IDs below, and every
|
|
680
|
-
`
|
|
756
|
+
trigger IDs below, and every row includes its returned `source_batch_id` and
|
|
757
|
+
`source_lane_id`. Missing, extra, duplicate, `NO-MATCH`, or unprovenanced
|
|
681
758
|
rows make persistence fail and Phase 4 BLOCKED. The tool atomically writes
|
|
682
759
|
`.swarm/pr-review/<run_id>/trigger-eval.json`, separate from `findings.jsonl`;
|
|
683
|
-
|
|
760
|
+
pass the exact reviewed merge-base as `base_sha`, the exact live base branch
|
|
761
|
+
tip/ref used to compute it as `base_ref`, and the same `pr_head_sha` to the
|
|
762
|
+
writer. The writer runs bounded `git merge-base -- <base_ref> <pr_head_sha>` and
|
|
763
|
+
rejects any claimed `base_sha` that is not the exact result. It accepts only the
|
|
764
|
+
exact eleven-row `MATCHED` set backed by
|
|
765
|
+
eleven completed, non-degraded, exact-head artifacts. It never uses keyword
|
|
766
|
+
classification as permission to waive a lane. Any head mismatch makes
|
|
767
|
+
persistence fail.
|
|
768
|
+
Do not add trigger results to the finding-status enum.
|
|
684
769
|
|
|
685
770
|
For each micro `output_ref`, call `parse_lane_candidates` with
|
|
686
771
|
`producer: "swarm-pr-review"`, `expected_family: "micro_lane"`, and
|
|
@@ -698,10 +783,11 @@ errors, zero malformed rows, and a complete, non-degraded source:
|
|
|
698
783
|
```
|
|
699
784
|
|
|
700
785
|
Header-only or malformed zero output is `UNATTESTED` and must follow the
|
|
701
|
-
canonical COVERAGE GATE retry path.
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
786
|
+
canonical COVERAGE GATE retry path. Only the structured async PR-workflow path
|
|
787
|
+
preserves the required `L1`, exact-head, batch, and workflow-lane provenance;
|
|
788
|
+
the active controller rejects blocking and direct-Task substitutes. Task-derived
|
|
789
|
+
findings or CLEAN prose cannot satisfy Phase 4; if bounded structured retries
|
|
790
|
+
cannot produce an artifact, the phase is BLOCKED.
|
|
705
791
|
|
|
706
792
|
Each micro-lane receives:
|
|
707
793
|
|
|
@@ -714,23 +800,28 @@ Each micro-lane receives:
|
|
|
714
800
|
- structured candidate output (parser-extracted). If the parser is unavailable,
|
|
715
801
|
the micro-lane MAY emit `[CANDIDATE]` rows as a fallback convention.
|
|
716
802
|
|
|
717
|
-
###
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
|
727
|
-
|
|
728
|
-
| `
|
|
729
|
-
| `
|
|
730
|
-
| `
|
|
731
|
-
| `
|
|
732
|
-
| `
|
|
733
|
-
| `
|
|
803
|
+
### Repository-agnostic mandatory micro-lane map
|
|
804
|
+
|
|
805
|
+
Every row runs in every repository. Diff/context analysis focuses each lane but
|
|
806
|
+
cannot waive it: semantic applicability is not reliably decidable from paths or
|
|
807
|
+
keywords, so `NO-MATCH` is invalid. Repository policy may require supplementary
|
|
808
|
+
specialist review outside this canonical ledger, but supplementary work never
|
|
809
|
+
replaces these portable rows. The `unclassified-risk` lane always runs to cover
|
|
810
|
+
novel failure modes and classification gaps.
|
|
811
|
+
|
|
812
|
+
| Trigger ID | Scope | Trigger in diff or context pack | Launch micro-lane | Invariants to check |
|
|
813
|
+
|---|---|---|---|---|
|
|
814
|
+
| `auth-identity-secrets` | universal | authentication, authorization, identity, sessions, permissions, secrets, cryptography | Identity and secret boundaries | least privilege, confused-deputy paths, credential lifecycle, cryptographic misuse, safe defaults |
|
|
815
|
+
| `untrusted-input-boundaries` | universal | parsing, serialization, queries, templates/rendering, file or network input/output | Untrusted input and sink analysis | injection, traversal, SSRF, unsafe deserialization, output escaping, resource limits |
|
|
816
|
+
| `subprocess-platform` | universal | subprocesses, shell commands, filesystem operations, OS/runtime-specific code | Subprocess and platform safety | array argv, bounded execution, path containment, portability, cleanup, non-interactive behavior |
|
|
817
|
+
| `concurrency-state` | universal | queues, caches, retries, transactions, locks, state machines, async coordination | Concurrency and state transitions | races, atomicity, idempotency, retry accounting, rollback, stale state, bounded growth |
|
|
818
|
+
| `dependencies-build-release` | universal | dependency manifests, lockfiles, installers, build scripts, CI, packaging, deployment | Dependency and delivery integrity | provenance, version/lock consistency, install safety, platform matrices, rollback and release completeness |
|
|
819
|
+
| `api-schema-migrations` | universal | public API, wire/schema/config/storage formats, migrations, feature flags | Compatibility and migration safety | backward/forward compatibility, defaults, validation, mixed-version operation, recovery |
|
|
820
|
+
| `test-infrastructure` | universal | tests, mocks, fixtures, harnesses, coverage, CI matrices | Test validity and isolation | meaningful assertions, contamination, determinism, negative paths, cross-platform proof, test theater |
|
|
821
|
+
| `ui-accessibility-i18n` | universal | user interfaces, interaction flows, rendering, accessibility, localization | UI and human-interface quality | keyboard/screen-reader behavior, focus, error states, responsive behavior, locale-safe formatting |
|
|
822
|
+
| `privacy-observability` | universal | telemetry, logs, analytics, traces, retention, diagnostics | Privacy and observability safety | minimization, redaction, consent, retention, stable metrics, non-gameable evidence |
|
|
823
|
+
| `generated-provenance` | universal | generated, vendored, binary, model-produced, codegen or checked-in build artifacts | Generated artifact provenance | reproducibility, source linkage, tamper evidence, reviewable diffs, licensing and stale output |
|
|
824
|
+
| `unclassified-risk` | universal | any changed artifact or behavior not confidently classified by the rows above | Unclassified high-risk fallback | full change-path review, hidden trust boundaries, novel failure modes, missing specialist classification |
|
|
734
825
|
|
|
735
826
|
Micro-lane output format:
|
|
736
827
|
|
|
@@ -761,8 +852,8 @@ Verifier output is advisory until incorporated by the independent reviewer or cr
|
|
|
761
852
|
|
|
762
853
|
## Phase 6: Independent Reviewer Confirmation
|
|
763
854
|
|
|
764
|
-
**Reviewer-dispatch join barrier:** reviewer dispatch MUST NOT begin until the
|
|
765
|
-
complete and persisted,
|
|
855
|
+
**Reviewer-dispatch join barrier:** reviewer dispatch MUST NOT begin until the micro-lane ledger is
|
|
856
|
+
complete and persisted, all eleven micro-lanes are settled, and every
|
|
766
857
|
accepted micro result has parser-derived provenance or a valid CLEAN
|
|
767
858
|
attestation.
|
|
768
859
|
|
|
@@ -773,6 +864,34 @@ file area, category, or count — not the full candidate set. The reviewer must
|
|
|
773
864
|
re-read the candidate's file:line evidence and relevant context pack entries
|
|
774
865
|
directly.
|
|
775
866
|
|
|
867
|
+
Dispatch reviewer chunks with `dispatch_lanes_async`,
|
|
868
|
+
`mode: "swarm-pr-review:reviewer"`, a unique non-empty `workflow_lane` per
|
|
869
|
+
chunk, `review_item_ids` containing the exact candidate IDs assigned to that
|
|
870
|
+
chunk, reviewer-role agents only, and the same exact `pr_head_sha`. The runtime
|
|
871
|
+
requires one parseable `[REVIEWED]` row for every structurally assigned ID; a
|
|
872
|
+
single marker or partial subset cannot settle the lane. Direct Task
|
|
873
|
+
reviewers are rejected because they cannot carry the durable batch and head
|
|
874
|
+
provenance required by this workflow.
|
|
875
|
+
|
|
876
|
+
For every structured PR-review dispatch, the runtime appends an authoritative
|
|
877
|
+
controller block after caller-authored prompt text. It binds the exact
|
|
878
|
+
`workflow_lane`, PR head, content revision, declared scope, and assigned item
|
|
879
|
+
IDs and explicitly forbids speed/time/token waivers. Caller prompt text cannot
|
|
880
|
+
override that block; output with placeholders, invented IDs, generic assurances,
|
|
881
|
+
or evidence unrelated to the bound lane does not settle the artifact.
|
|
882
|
+
|
|
883
|
+
Reviewer ownership is not accepted as an architect assertion. The controller
|
|
884
|
+
derives the immutable candidate inventory from the integrity-checked base,
|
|
885
|
+
mandatory micro-lane, and council artifacts; the union of `review_item_ids` must
|
|
886
|
+
equal that inventory exactly, with no omitted or invented IDs. If discovery
|
|
887
|
+
produces no candidates, the derived sentinel is `CLEAN-REVIEW`, which still
|
|
888
|
+
requires one independent semantic reviewer row.
|
|
889
|
+
|
|
890
|
+
Candidate IDs must therefore be globally unique across every discovery
|
|
891
|
+
artifact in the run. Prefix IDs with the stable workflow-lane ID (or use
|
|
892
|
+
another deterministic globally unique scheme); duplicate IDs fail closed
|
|
893
|
+
instead of being silently merged.
|
|
894
|
+
|
|
776
895
|
### Noise budget and universal validation
|
|
777
896
|
|
|
778
897
|
Before reviewer dispatch, the orchestrator may suppress candidates that match ANY of the following (each suppression still requires mandatory disclosure):
|
|
@@ -823,6 +942,12 @@ Reviewer output format:
|
|
|
823
942
|
[REVIEWED] | candidate_id | classification | evidence_type | final_severity | introduced_by_pr: YES/NO/UNKNOWN | file:line | rationale | falsification_probe | reviewer_id
|
|
824
943
|
```
|
|
825
944
|
|
|
945
|
+
For the mechanically derived `CLEAN-REVIEW` sentinel, use the same exact row
|
|
946
|
+
with `DISPROVED | STRUCTURALLY_PROVEN | NONE | UNKNOWN | N/A` and concrete
|
|
947
|
+
rationale/probe/reviewer fields; the sentinel means the reviewer independently
|
|
948
|
+
found no surviving actionable candidate, not that reviewer validation was
|
|
949
|
+
skipped.
|
|
950
|
+
|
|
826
951
|
Every reviewer response must end with one parseable `[REVIEWED]` row per
|
|
827
952
|
assigned candidate. A malformed `[REVIEWED]` row is not a verdict: re-dispatch
|
|
828
953
|
with the exact contract (max 2), then mark the reviewer dimension BLOCKED if no
|
|
@@ -858,6 +983,31 @@ A finding may still be reported without a runnable command if it is structurally
|
|
|
858
983
|
|
|
859
984
|
Route 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/tool permissions, git safety, or config ratchets.
|
|
860
985
|
|
|
986
|
+
The controller conservatively derives critic ownership from semantic reviewer
|
|
987
|
+
rows: every reviewer-confirmed CRITICAL, HIGH, or MEDIUM item is mandatory
|
|
988
|
+
critic inventory. This intentionally over-routes ordinary MEDIUM items because
|
|
989
|
+
machine enforcement cannot safely infer every repository-specific trust
|
|
990
|
+
boundary from prose. Completion is blocked until that exact derived inventory
|
|
991
|
+
has valid critic rows.
|
|
992
|
+
|
|
993
|
+
Reviewer and critic retries cannot be combined as complementary partial verdict
|
|
994
|
+
sets. Each phase requires at least one fully successful exact batch covering its
|
|
995
|
+
entire mechanically assigned inventory on one revision. A later degraded,
|
|
996
|
+
truncated, stale, wrong-identity, or malformed batch cannot replace an earlier
|
|
997
|
+
valid batch or suppress critic routing.
|
|
998
|
+
|
|
999
|
+
Any newer reviewer batch invalidates every older critic batch, even when the
|
|
1000
|
+
new reviewer rows happen to be identical. Dispatch a fresh critic wave from the
|
|
1001
|
+
latest coherent reviewer batch; critic evidence can never predate the reviewer
|
|
1002
|
+
evidence it purports to challenge.
|
|
1003
|
+
|
|
1004
|
+
Dispatch critic chunks with `dispatch_lanes_async`,
|
|
1005
|
+
`mode: "swarm-pr-review:critic"`, a unique non-empty `workflow_lane` per
|
|
1006
|
+
chunk, `review_item_ids` containing the exact finding IDs assigned to that
|
|
1007
|
+
chunk, critic-role agents only, and the same exact `pr_head_sha`. The runtime
|
|
1008
|
+
requires one parseable `[CRITIC]` row for every structurally assigned ID and
|
|
1009
|
+
requires one coherent fully successful exact reviewer batch before a critic wave.
|
|
1010
|
+
|
|
861
1011
|
The critic must challenge:
|
|
862
1012
|
|
|
863
1013
|
- severity inflation,
|
|
@@ -885,7 +1035,13 @@ The `[CRITIC]` row in the format above is **mandatory contract**, not advisory o
|
|
|
885
1035
|
|
|
886
1036
|
**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/DOWNGRADED/DISPROVED/NEEDS_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.
|
|
887
1037
|
|
|
888
|
-
|
|
1038
|
+
`NEEDS_MORE_EVIDENCE` is deliberately non-terminal and never satisfies critic
|
|
1039
|
+
settlement. Re-dispatch a narrower critic/probe lane or report the dimension
|
|
1040
|
+
BLOCKED. Terminal critic rows are cross-field checked: `DISPROVED` requires
|
|
1041
|
+
`NONE`, `UPHELD` requires CRITICAL/HIGH/MEDIUM, and `DOWNGRADED` cannot remain
|
|
1042
|
+
CRITICAL.
|
|
1043
|
+
|
|
1044
|
+
**COVERAGE GATE alignment:** Critic lane failures follow the same COVERAGE GATE as explorer lanes: retry (max 2 attempts) with materially different parameters using `dispatch_lanes_async`, `mode: "swarm-pr-review:critic"`, and the same exact `pr_head_sha`. Blocking and direct-Task fallbacks are not provenance-equivalent and are rejected. If no structured retry closes coverage, stop and surface the critic-lane failure to the user as BLOCKED — do NOT mark findings UNVERIFIED or continue past the gap. The orchestrator NEVER fabricates a critic verdict by parsing prose, by tolerating a planning preamble, by presenting partial findings, or by silently accepting reduced coverage.
|
|
889
1045
|
|
|
890
1046
|
Refuted findings become `DISPROVED` or `ADVISORY`, depending on critic rationale. Downgrades must be listed in the final validation provenance.
|
|
891
1047
|
|
|
@@ -1258,11 +1414,11 @@ Council mode is opt-in only and adversarial.
|
|
|
1258
1414
|
When triggered:
|
|
1259
1415
|
|
|
1260
1416
|
1. Build the same context pack as default mode.
|
|
1261
|
-
2.
|
|
1417
|
+
2. After the default exact-six base lanes and required micro-lanes are mechanically covered, launch all supplementary council agents with one `dispatch_lanes_async` call using `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. Use `wait: true` only when no independent work remains and agents are still pending. All agents must be settled and their candidates added to the ledger before reviewer classification; the runtime enforces this join barrier. If structured asynchronous dispatch with exact-head and workflow-lane provenance is unavailable, stop as `BLOCKED`; blocking, sequential, or direct-Task fallback is not equivalent.
|
|
1262
1418
|
3. Each council agent assumes all work is wrong until code evidence proves otherwise.
|
|
1263
1419
|
4. Each agent hunts within its lane only.
|
|
1264
|
-
5. Agents return
|
|
1265
|
-
6. Agents must not return `CONFIRMED`, `DISPROVED`, or final severity.
|
|
1420
|
+
5. Agents return the same mechanically parseable candidate contract as other discovery lanes: one `[CANDIDATE]` row per `EVIDENCE_FOUND` or `SUSPICIOUS` claim, or a fully populated `[CLEAN] | workflow_lane | coverage_scope | evidence` row when no candidate survives. Council prose without one of those markers does not settle the lane.
|
|
1421
|
+
6. Agents must not return `CONFIRMED`, `DISPROVED`, or final severity; candidate severity remains provisional until reviewer classification.
|
|
1266
1422
|
7. The independent reviewer then classifies every council candidate as `CONFIRMED`, `DISPROVED`, `UNVERIFIED`, or `PRE_EXISTING`.
|
|
1267
1423
|
8. Apply critic challenge to reviewer-confirmed HIGH/CRITICAL or borderline findings.
|
|
1268
1424
|
9. Final synthesis distinguishes real blockers, real low-severity issues, accepted caveats, disproved council claims, and follow-up quality work.
|
|
@@ -1319,7 +1475,7 @@ Council findings are supplementary, not authoritative overrides. Do not adopt co
|
|
|
1319
1475
|
11. Obligation precedence is deterministic. Do not skip higher-precedence sources to fill gaps with LLM synthesis.
|
|
1320
1476
|
12. Do not leak secrets from logs, evidence bundles, config files, URLs, or scanner output.
|
|
1321
1477
|
13. Do not recommend destructive git or filesystem actions as fixes unless they are clearly scoped, safe, and necessary.
|
|
1322
|
-
14. If subagents fail, timeout, or return malformed output, retry with corrected parameters (max 2 attempts)
|
|
1478
|
+
14. If subagents fail, timeout, or return malformed output, retry with corrected parameters (max 2 attempts) through the same structured `dispatch_lanes_async` workflow mode and exact `pr_head_sha`. Blocking or direct-Task dispatch cannot preserve the durable provenance contract and is not an equivalent fallback. If structured retries fail, the affected coverage dimension is BLOCKED and must be surfaced to the user before synthesis. Do not fabricate validation results, do not present partial findings, and do not silently mark candidates UNVERIFIED to proceed past the gap.
|
|
1323
1479
|
|
|
1324
1480
|
15. 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 BLOCKED and must be surfaced to the user. Do not proceed to synthesis with unclosed coverage gaps under a "best available evidence" rationale — the architect is not authorized to produce a degraded review.
|
|
1325
1481
|
|
|
@@ -1338,7 +1494,7 @@ Before writing the final output, print this checklist with filled values. Every
|
|
|
1338
1494
|
[VALIDATION] deterministic lane dispatcher used: YES/NO — ___
|
|
1339
1495
|
[VALIDATION] base explorer lanes dispatched: ___ / 6
|
|
1340
1496
|
[VALIDATION] base explorer lanes returned: ___ / 6
|
|
1341
|
-
[VALIDATION]
|
|
1497
|
+
[VALIDATION] mandatory micro-lanes dispatched and settled: ___ / 11 OR BLOCKED — <missing rows>
|
|
1342
1498
|
[VALIDATION] Swarm verifier routing used: ___
|
|
1343
1499
|
[VALIDATION] raw candidates: ___
|
|
1344
1500
|
[VALIDATION] tool candidates: ___
|
|
@@ -1561,12 +1717,13 @@ You must inspect or mark unavailable:
|
|
|
1561
1717
|
5. nearest test or missing-test location,
|
|
1562
1718
|
6. deterministic signals,
|
|
1563
1719
|
7. Swarm artifacts/knowledge,
|
|
1564
|
-
8. the exact `
|
|
1720
|
+
8. the exact `base_sha...pr_head_sha` merge-base range and both endpoint revisions.
|
|
1565
1721
|
|
|
1566
1722
|
Return:
|
|
1567
1723
|
[CANDIDATE] | candidate_id | lane | severity | category | file:line | claim | evidence_summary | impact_context | confidence
|
|
1568
1724
|
Emit the marker-bearing header once, then unprefixed data rows.
|
|
1569
1725
|
For a clean micro-lane, emit `[CLEAN] | micro_lane | coverage_scope | evidence`.
|
|
1726
|
+
For a clean base lane, emit `[CLEAN] | workflow_lane | coverage_scope | evidence`.
|
|
1570
1727
|
```
|
|
1571
1728
|
|
|
1572
1729
|
The orchestrator extracts candidates from the full lane artifact via
|
|
@@ -1576,3 +1733,12 @@ unavailable. Explorers should still emit structured records regardless of
|
|
|
1576
1733
|
whether the parser is present.
|
|
1577
1734
|
|
|
1578
1735
|
Do not let speed degrade validation quality.
|
|
1736
|
+
|
|
1737
|
+
After metrics and durable review artifacts are complete, but before emitting the
|
|
1738
|
+
user-facing final report, call `complete_pr_workflow` with mode `PR_REVIEW` and
|
|
1739
|
+
the same exact
|
|
1740
|
+
`pr_head_sha`. The tool refuses to clear the session gate while required base,
|
|
1741
|
+
trigger, declared reviewer/critic, or open-lane obligations remain incomplete.
|
|
1742
|
+
While the gate remains active, the runtime replaces architect final-response
|
|
1743
|
+
text with a mechanical blocked notice and re-wakes an idle parent session. Only
|
|
1744
|
+
emit the final report after the completion tool confirms that the gate cleared.
|
package/README.md
CHANGED
|
@@ -810,7 +810,9 @@ Every candidate passes a 3-gate pipeline before entering quarantine:
|
|
|
810
810
|
| generate_mutants | Architect-only: generates LLM-based mutation patches (5–10 per function across 6 types: off-by-one, null substitution, operator swap, guard removal, branch swap, side-effect deletion) for direct consumption by the mutation_test tool; returns SKIP verdict on LLM failure rather than throwing |
|
|
811
811
|
| write_mutation_evidence | Architect-only: writes mutation gate results atomically to `.swarm/evidence/{phase}/mutation-gate.json`; accepts verdict (PASS/WARN/FAIL/SKIP), kill rate metrics, and optional survived mutant details; normalizes uppercase-to-lowercase before persisting |
|
|
812
812
|
| parse_lane_candidates | Architect-only: parses `[CANDIDATE]` rows and micro-lane `[CLEAN]` attestations from a lane `output_ref`; supports asserted batch families, preserves dispatch provenance, and persists sidecar JSONL records |
|
|
813
|
-
| write_pr_review_trigger_eval | Architect-only: validates the exact PR-review
|
|
813
|
+
| write_pr_review_trigger_eval | Architect-only: validates the exact mandatory PR-review micro-lane ID set, requires completed provenance for all 11 repository-agnostic lanes, verifies the claimed merge base against an exact live base ref, rejects every `NO-MATCH` waiver, and atomically persists `.swarm/pr-review/<run_id>/trigger-eval.json` |
|
|
814
|
+
| complete_pr_workflow | Architect-only: validates terminal PR-review or PR-feedback coverage; feedback uses a two-call arm/publish protocol and clears only after the approved content is observed on both the bound remote-tracking ref and the actual remote branch |
|
|
815
|
+
| run_pr_feedback_stage_a | Architect-only: executes targeted reproduction/regression and exact `git diff --check` plus every mechanically applicable workspace/category/source build, typecheck, and lint obligation, then persists content-bound Stage A receipts before ordered feedback review gates |
|
|
814
816
|
| git_blame | Per-line git blame metadata (sha, author, date, summary) via `git blame --porcelain`; supports optional line range filtering |
|
|
815
817
|
| diff | Structured git diff with contract change detection; supports `summaryOnly` mode returning file list with additions/deletions counts |
|
|
816
818
|
| suggest_patch | Reviewer-safe structured patch suggestion; supports `format` parameter ('json' or 'unified') where unified outputs valid unified diff with `diff --git` headers, hunks, and context |
|
|
@@ -1144,6 +1146,9 @@ Control how tool outputs are summarized for LLM context.
|
|
|
1144
1146
|
| `/swarm memory evaluate` | Run memory recall evaluation fixtures |
|
|
1145
1147
|
| `/swarm memory import` | Import legacy JSONL memory into SQLite |
|
|
1146
1148
|
| `/swarm memory migrate` | Run the one-time JSONL to SQLite migration |
|
|
1149
|
+
| `/swarm memory link [name]` | Share memory across linked worktrees (requires `memory.link.enabled`) |
|
|
1150
|
+
| `/swarm memory link status` | Show whether memory is cohort-linked (distinct from knowledge link) |
|
|
1151
|
+
| `/swarm memory unlink` | Stop sharing memory; copies cohort family back to local |
|
|
1147
1152
|
| `/swarm concurrency <set|status|reset>` | Manage session-scoped runtime concurrency override |
|
|
1148
1153
|
| `/swarm turbo` | Enable turbo mode for the current session (bypasses QA gates) |
|
|
1149
1154
|
| `/swarm full-auto` | Toggle Full-Auto Mode for the current session [on|off] |
|
|
@@ -11,6 +11,11 @@ declare const LaneOutputArtifactSchema: z.ZodObject<{
|
|
|
11
11
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
12
12
|
parentSessionId: z.ZodOptional<z.ZodString>;
|
|
13
13
|
mode: z.ZodOptional<z.ZodString>;
|
|
14
|
+
workflowLane: z.ZodOptional<z.ZodString>;
|
|
15
|
+
prHeadSha: z.ZodOptional<z.ZodString>;
|
|
16
|
+
gitHead: z.ZodOptional<z.ZodString>;
|
|
17
|
+
revisionDigest: z.ZodOptional<z.ZodString>;
|
|
18
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
14
19
|
source: z.ZodEnum<{
|
|
15
20
|
dispatch_lanes: "dispatch_lanes";
|
|
16
21
|
collect_lane_results: "collect_lane_results";
|
|
@@ -34,6 +39,11 @@ export interface StoreLaneOutputInput {
|
|
|
34
39
|
sessionId?: string;
|
|
35
40
|
parentSessionId?: string;
|
|
36
41
|
mode?: string;
|
|
42
|
+
workflowLane?: string;
|
|
43
|
+
prHeadSha?: string;
|
|
44
|
+
gitHead?: string;
|
|
45
|
+
revisionDigest?: string;
|
|
46
|
+
scope?: string;
|
|
37
47
|
source: LaneOutputSource;
|
|
38
48
|
text: string;
|
|
39
49
|
messageCount?: number;
|