This reference is the merge leaf's part of the review finish (`references/finish-input.md`). The merge leaf runs Stage 5 and Stage 5b steps 1 through 3 and writes `synthesized-findings.json` and `validator-input.json`. The dispatch context then runs Stage 5b step 4 as `references/finish-input.md` states it and writes `validator-verdicts.json` plus `validator-outcome.json`. A report leaf then runs Stage 5b step 5, Stage 5c, and Stage 6 from `references/finish-report.md`. Read `/finish-input.json` first. Wherever this reference refers to an earlier stage's result, the intent summary, the roster, the plan, the scope, or conversation context, that value is the matching field of that file, and `` is its `docs_root`. The cross-model peer is already terminal and classified when the merge leaf starts: it folds `peer.artifact` when set and copies `peer.coverage`, and never reads job state or starts a route. A leaf launches no subagents; its return is exactly what `finish-input.md` names for it. Give each file you read its own tool call, so its output comes back on its own, never several files in one command or one script. A read counts only when the whole file came back. Some hosts cut the middle out of a long tool output and leave a truncation marker in its place, so when a read comes back shortened, read the missing lines in smaller ranges before you act on that file. ### Stage 5: Merge findings Read `references/action-class-rubric.md` before routing any finding: it defines the severity scale and the action-routing rules synthesis applies, and it states that synthesis makes the final routing decision. Convert multiple reviewer compact JSON returns into one deduplicated, confidence-filtered finding set. Use `scripts/findings-mechanics.py` from this skill's directory for schema/value validation, exact-fingerprint deduplication, conservative route merging, the quote and confidence checks, deterministic sorting, and stable numbering. These are mechanics, not model judgment. Write the compact reviewer returns as a JSON array, then run the command below exactly. Do not inspect the helper source or run its `--help`; its contract is this reference and its JSON output. Input is one JSON array of reviewer-return objects. Output is one object with `findings`, `pre_existing_findings`, `suppressed_findings`, `suppressed_by_confidence`, `malformed_findings`, `malformed_returns`, and `first_evidence_backfilled`; use those fields directly and do not inspect implementation to infer additional behavior. ```bash SKILL_DIR=""; PY="$(for c in python3 python py; do command -v "$c" >/dev/null 2>&1 && "$c" -c '' >/dev/null 2>&1 && { echo "$c"; break; }; done)"; [ -n "$PY" ] || { echo "no working Python 3 interpreter on PATH" >&2; exit 1; }; "$PY" "$SKILL_DIR/scripts/findings-mechanics.py" < "$RUN_DIR/raw-returns.json" > "$RUN_DIR/mechanical-findings.json" ``` Before the first helper run, load every available per-reviewer artifact and build a source-detail map keyed by reviewer plus the helper fingerprint: normalized `file`, string `line`, and whitespace-normalized lowercase `title`. The map holds each source finding's `why_it_matters` and `evidence`; compact returns are merge inputs, not final report objects. Before writing the helper input, attach each matching artifact's `evidence` array to its compact finding using the same key. Preserve the compact finding's other fields. For findings at anchor 75 or 100, the helper fills missing or empty `first_evidence` from a non-empty string at `evidence[0]` before validation. Other anchors keep their existing quote and promotion behavior; findings without either usable quote remain subject to the quote gate. `first_evidence_backfilled` counts valid input findings recovered this way before deduplication. Preserve the initial count across synthesis reruns and add any further recoveries, so a rerun with already-normalized findings does not erase it. A Compound Pack rule the `learnings-researcher` reports the diff **contradicts** is a finding candidate, and before the first helper run each candidate that passes the ordinary checks (quote-the-line, validation, the false-positive check) is serialized as a complete compact reviewer return in the shape `references/dispatch-reviewers.md` defines, so it receives a stable `#` and the ordinary route. Reviewer is `learnings`; `file`, `line`, and `first_evidence` come from the violating line the researcher quoted; severity follows the rule's consequence per `references/action-class-rubric.md`; the anchor is 100 when the researcher quoted both the rule text and the line, otherwise 75. The source-detail map entry holds its `evidence`: the rule's quoted text and the `(pack: , )` citation. A rule violated only by an unchanged line the researcher quoted is serialized the same way with `pre_existing: true`. The merge test in step 1 applies unchanged: a structured reviewer's finding merges with it only when both describe the same defect and fix path, and the merged finding keeps the citation. Rules the diff honors and relevant past solutions are Stage 6 (Synthesize and present) section 7 notes. Inspect the helper's `findings`, `pre_existing_findings`, and `suppressed_findings` for semantic duplicates that use different wording or nearby anchors, for the direct-dependency exception, and for settlement conflicts below. Merge only when candidates describe the same defect and fix path. If semantic reconciliation, direct-dependency reclassification, settlement reconciliation, or the review policy changed the set, serialize every reconciled candidate from all three partitions as one valid synthetic reviewer return and run the helper again to restore the deterministic checks, partitions, sort order, and numbering. Never ask the helper to decide semantic equivalence or settlement conflicts. When reconciling a semantic duplicate, carry its original source-map keys alongside the candidate in working memory so detail hydration does not depend on the rewritten title. The helper's deterministic `suppressed_findings` partition is not primary review output; after settlement reconciliation, inspect it for the soft-bucket route below, then discard the remainder while preserving `suppressed_by_confidence` counts. Then apply only the judgment the helper cannot make. Treat every reviewer output as a claim: verify its consequence against the intended outcome and the current source. A concrete maintenance benefit can justify a finding without a runtime bug, but preference, demands for completeness without evidence of a problem, and reviewer agreement cannot. Resolve disputes from evidence before asking the user to decide. **Scoped standards authority.** The local `project-standards` review and synthesis are the sole owners of scoped-rule coverage (they alone decide which scoped rules apply); the external adversarial peer is corroborative. A peer candidate enters the final report only when it is compatible with every applicable scoped rule established locally; reject it otherwise. A replacement candidate requires independent local evidence. 1. **Semantic reconciliation.** Merge differently worded findings only when they describe the same defect and fix path. Keep disagreements visible. Union the mechanics-produced `reviewers` and `independent_reviewers` lists from the merged candidates; never add an identity to `independent_reviewers` merely because it appears in `reviewers`. A pre-existing gap stays primary only when the new change directly depends on it for correctness; mark that reconciled candidate `pre_existing: false` before the final helper pass. Nearby cleanup remains pre-existing. 2. **Settled decisions.** Inspect both surviving `findings` and `suppressed_findings`. Discard findings that merely prefer an alternative to a `session-settled:` KTD (a Key Technical Decision in the discovered plan), including candidates already stamped `settled_conflict`. Keep evidence of a real defect or that the settled approach cannot achieve the agreed outcome, with normal severity. A retained finding does not authorize reversing the settled decision. Honor inferred-plan settlements only when the match is unambiguous. **Review policy.** When `finish-input.json` names a review policy, apply it now to both surviving `findings` and `suppressed_findings`, by the Repository Review Policy section of `references/action-class-rubric.md`, and write the Coverage sentence that section requires. A finding the policy removes or regrades has changed the set, so step 3 runs. 3. **Restore mechanics.** After semantic reconciliation, direct-dependency reclassification, settlement reconciliation, or a review-policy change, rerun the helper with every reconciled candidate, including unchanged primary and pre-existing candidates plus remaining suppressed candidates. Omit candidates discarded during settlement reconciliation or removed by the review policy. It enforces the quote-the-line check, discrete confidence anchors, exact dedup, independent-agreement promotion, conservative routing, pre-existing partition, confidence threshold, deterministic sort, and stable `#` numbering. Agreement raises the anchor one step only when the merged group includes an `adversarial-` peer whose return records `independence_verified: true`; in-process reviewers share one serving model, so their agreement is recorded in `reviewers` but never raises confidence, and `fast-pass` never counts at all. Peer findings never carry apply authority. 4. **Soft-bucket demotion before validation.** After the final helper pass, inspect both surviving `findings` and the remaining `suppressed_findings`. Reject claims with no established significant consequence or worthwhile benefit, even if the automated helper raised their confidence. Record the decision internally; do not recycle rejected claims into remaining risks or missing tests. Retain an uncertain risk only when project evidence establishes its relevance. - A current P0/P1 remains primary unless it is a semantic duplicate, preference-only settled conflict, or genuinely pre-existing. No validator verdict exists at this step, so verdict-based retention and drops belong to Stage 5b. Never move it to `residual_risks` or `testing_gaps` merely because only one reviewer found it. Findings with different failure modes or fix paths are not duplicates even when they touch the same lines (for example, awaiting a ledger append does not solve a later publish-failure retry that appends twice). - For testing-only absence-of-coverage findings, keep at most one umbrella primary finding per changed subsystem when the lack of tests is itself material; retain narrower cases in `testing_gaps` only when they add a consequential uncovered scenario beyond that umbrella. - A retained single-reviewer P2/P3 advisory from `testing` belongs in `testing_gaps`, and one from `maintainability`, `reliability`, or an adversarial reviewer belongs in `residual_risks`, unless it quotes an explicit violated contract or proves a current user-facing defect. Reviewer identity and severity do not require keeping a concern that failed admission. - Do not widen a repository contract with an assumed deployment topology or process lifetime. Retain such a risk only when repository evidence establishes the operating condition and a material consequence; an imagined configuration is not an unresolved project risk. - Suppressed candidates routed here remain absent from primary `findings`; discard all other `suppressed_findings` after this step. Record the mode-aware demotion count. Only the remaining primary set enters Stage 5b (Validation pass). **Detail hydration check (before validation and rendering).** Hydrate every retained primary and pre-existing finding from its source-detail map entries. For exact merges, union and deduplicate the contributing `evidence` arrays and keep the most specific source `why_it_matters`; for semantic merges, use the carried original source-map keys. `actionable_findings` later reuses these hydrated objects rather than rebuilding a compact subset. Every retained finding must have a non-empty `why_it_matters` string and non-empty `evidence` array. If an artifact is unavailable or malformed, re-read the cited changed line and use `first_evidence` when present to reconstruct only directly verified detail. Never invent impact from the title alone. If the required fields still cannot be established, drop the candidate as malformed before Stage 5b and record it in Coverage; never emit a partial finding in markdown, `mode:agent`, or `review.json`. 5. **Partition work.** The actionable queue is `gated_auto` or `manual` plus owner `downstream-resolver`; advisory findings and findings owned by `human` or `release` are report-only. Reuse the helper's stable `#` everywhere. A concrete current P0/P1 with a specific code or test response belongs to `downstream-resolver` even when the subsystem is financially or operationally sensitive; the downstream caller still reviews, applies, and verifies it. Use owner `human` only when the next step genuinely requires a product/design decision, unavailable authority, external coordination, or release action. Reviewer caution and `requires_verification:true` do not by themselves remove a fixable defect from the caller's actionable queue. Before rendering, normalize every concrete P0/P1 to `downstream-resolver` unless its report entry names the specific product/design choice, unavailable authority, external dependency, or release decision that blocks implementation. A broad redesign, several related edits, or sensitive code is not such a blocker. A finding Stage 5b routed as `validation_status: "unresolved"` is exempt from this normalization: it stays report-only with `owner: "human"` and `autofix_class: "advisory"`, and no later synthesis pass pulls it back into the actionable queue. The Actionable Findings section contains only the resulting `downstream-resolver` queue; items owned by `human` or `release` appear outside it as decisions a person must make. 6. **Build thematic triage groups.** Group related findings so the reader can triage themes instead of items. This is distinct from deduplication: groups never merge findings or change severity, confidence, route, owner, or stable `#`. Groups span the full primary set. A group may name a finding Stage 5b left unresolved as a verification gate, but it must never direct a fixer to apply an unresolved claim. - **`grouping:off`:** skip this step. - **`grouping:auto` (default):** build groups when findings span distinct concerns; the trigger is distinct concerns, not item count (mirroring how plan Requirements group by capability). Skip only when all findings are genuinely about the same thing; prefer no groups over decorative single-item groups. - **`grouping:always`:** always build groups; use single-finding groups only when no meaningful multi-finding grouping exists. - **Grouping signals:** shared root cause, affected subsystem, user-facing failure mode, overlapping fix path, dependency ordering, or repeated symptoms of one design choice. - **Group shape:** short title, the included stable finding `#`s, one-line context, preferred resolution, and why. When one fix path resolves several findings, name it and say which finding to handle first. - **Ordering:** order groups by the highest-severity finding they contain, then by lowest stable `#`. A finding appears in at most one group; leave genuinely unrelated findings ungrouped. 7. **Collect coverage and advisory assets.** Keep helper drop/suppression counts. Admit persona-supplied residual risks and testing gaps under the same rules about importance and relevance as the primary findings; do not preserve rejected claims through these fields. Deduplicate surviving concerns and preserve any selected learnings and deployment-verification outputs. Schema drift from `data-migration` is already in the merged finding set. ### Stage 5b: Validation pass (optional quality gate) This stage is an optional second check on the findings. Independent verification remains required for findings that lack cross-model corroboration. Do not spend another model call re-verifying evidence already established independently across serving families. 1. Skip a validator only when the finding has `first_evidence` and both an ordinary reviewer plus an `adversarial-` reviewer whose artifact records `independence_verified:true`. Same-model corroboration never licenses this shortcut. Record the skip count in Coverage. 2. Select every remaining P0/P1 and every remaining actionable finding. Single-source P0s are always selected. P2/P3 advisory items should already have moved to the soft buckets; do not validate them merely to keep them primary. 3. Put the selected set into **one** deterministic validator batch, ordered by severity and stable `#`, using `references/validator-batch-template.md`. Eight findings is the normal cap. When more than eight P0/P1 survive, expand that same batch past the normal cap to include every surviving P0/P1 rather than silently omitting a blocker; never split the work into another batch. The validator returns one independent verdict per finding. Cost, elapsed time, confidence, or a finding appearing mechanically obvious never licenses an additional skip; when the required validator cannot run, keep P0/P1 as validation-degraded and say so. 4. Launch and collect the validator batch: the dispatch context runs this step as `references/finish-input.md` states it under "The validator (dispatch context)", including the bounded wait, the failure classification, and the agent lifecycle rule; no leaf runs it. ## Protected Artifacts The protected-artifact rule is part of the finding contract in `references/action-class-rubric.md` (## Protected Artifacts); it binds every depth path. Discard any protected file's cleanup or removal finding during synthesis.