Role
REPORT SYNTHESIS. Runs ONCE at end of pipeline. Sole output: synthesis/REPORT.md.
Invocation
/ultra-analyzer:synthesize-report
Inputs
<run-path>/state/manifest.json
<run-path>/findings/*.md — filter to those with PASS verdict in validation/findings/*.json
<run-path>/topics/done/*.md — topic specs for included findings
<run-path>/topics/failed/*.md — for Appendix B
<run-path>/config.yaml + <run-path>/seeds.md — for coverage assessment
Mode branch: SINGLE vs CHUNKED
Before loading anything:
du -sk <run-path>/findings/
- If total findings size < 400 KB → SINGLE mode: load all findings, produce one REPORT.md in one pass.
- If >= 400 KB → CHUNKED mode:
- Pass 1: produce
synthesis/REPORT.draft-chunks/{p1,p2,p3}.md (one chunk per priority tier, each reading only its tier's findings).
- Pass 2: merge pass that reads only the three chunks + manifest + reconcile notes, produces final REPORT.md.
Triangulation (redundancy pairs)
For each pair in manifest.redundancy_pairs:
- Load both findings files.
- Compare:
- Direction: same sign? (+/+, -/-, or +/-)
- Magnitude: within 2x?
- Confidence: both >=0.6?
- Write
<run-path>/synthesis/reconcile/<pair-id>.md with outcome:
- REPLICATED: same direction, within 2x magnitude → merge as single finding with doubled evidence weight.
- DIRECTION-CONFIRMED-MAGNITUDE-UNCERTAIN: same direction, 2-3x magnitude divergence → report direction only, flag magnitude as uncertain.
- DIVERGENT: opposite direction OR >3x magnitude divergence → flag in report as unresolved, rename both topics to
pending/<name>__divergence-reconcile.md for a stronger-model retry run. DO NOT AVERAGE.
Evidence weight score (0-8) per included finding
- Sample size: >500 = ✓✓ (2), 100-500 = ✓ (1), <100 = ⚠ (0)
- Validator: PASS = ✓ (1), PASS-with-warning = ⚠ (0)
- Redundancy: triangulated REPLICATED = ✓✓ (2), solo = ✓ (1), divergent = ⚠ (0)
- Citation quality: all numeric claims cite = ✓✓ (2), some uncited flagged = ⚠ (0)
Sum → 0-8. Include in report only findings with score >= 4. Score 4-5 noted as moderate evidence; >= 6 as strong.
REPORT.md structure (MANDATORY sections in order)
# <Project Name> — Analyzer Report
_Generated YYYY-MM-DD, N findings included, M excluded as FAIL, K divergent pairs._
## §0 Evidence bases (MANDATORY FIRST SECTION)
<Denominator accounting from T000-equivalent finding if present.>
<Every subsequent percentage must specify subset, NOT bare "% of users".>
## Executive summary
<3-6 paragraphs, P1 first.>
## Top N for the decision-maker call
<For each of top N (N=5 by default, configurable) most-compelling findings:>
- Headline (specific, quantitative, <20 words)
- Narrative interpretation (2-3 sentences — correlation framing only, never causation)
- Supporting quotes (1-2 verbatim, ≤200 chars, with citation anchor)
- Confidence + evidence weight
## P1: <primary domain — most detail>
### Finding 1.1 ...
## P2: <secondary domain — compressed>
## P3: <tertiary — appendix-style tables>
## Curated quotes
<10 verbatim ≤200 chars each, chosen to illustrate P1 patterns.>
## Divergent findings requiring human review
<From triangulation DIVERGENT outcomes. Never hidden by averaging.>
## Honest-ambiguity statement
<If the P1 answer is weak or ambiguous, say so explicitly. Do NOT manufacture a thesis to meet expectations.>
## Audit-trail note
<One paragraph: every number in this report traces to a topic file in topics/done/, queries listed in the topic, and validator verdict in validation/findings/. Fully reproducible.>
## Appendix A — Topics run
<Table: topic ID, priority, complexity, model, verdict, one-line summary.>
## Appendix B — Topics failed
<Table: topic ID, reason, retry count.>
## Appendix C — Coverage
<Table: unit (collection/file/etc.), topic count, notes.>
Hard rules
- NEVER cite a finding with verdict=FAIL.
- NEVER mark a report PASS if any included finding has an empty / placeholder
## Contradictions with hypothesis section (closes M-5). The validator's
Step 3a refuses such findings at verdict time, but synthesize-report MUST
re-check at compose time as defense-in-depth: any included finding whose
contradictions body is whitespace-only or matches a placeholder
(none / n/a / tbd / pending / -) FAILs the report compose with reason
empty-contradictions in TNNN. Re-run validator on those topics first.
- NEVER introduce conclusions not supported by at least one PASS finding.
- NEVER hide a divergent pair by averaging — always flag explicitly.
- EVERY numeric claim in REPORT carries [DATA:...] or [AGENT:TNNN] anchor.
- If any finding claims "% of X" without subset qualifier → flag it, rewrite with explicit subset. Fake precision is slop.
- Before the Top-N section, confirm each candidate has a non-trivial denominator (>=100 records AND >=5% of its subset).
- If seeds.md explicitly excluded causation claims, report must use correlation framing only. Label every claim "correlation" or "observational pattern" — never "causes" or "leads to".
- The composite "signal of value" construct must count only components the adapter actually supports with user-linkable data. If a signal source lacks user linkage, report it as collection-level only.
1---2name: synthesize-report3description: Opus synthesis across all PASS findings into synthesis/REPORT.md. Triangulates redundancy pairs, flags divergence without averaging, produces Top-N compelling findings with narrative + curated quotes. Runs after Gate 2 (/ultra pre-synthesize) approves.4---56# Role7REPORT SYNTHESIS. Runs ONCE at end of pipeline. Sole output: `synthesis/REPORT.md`.89# Invocation10 /ultra-analyzer:synthesize-report <run-path>1112# Inputs131. `<run-path>/state/manifest.json`142. `<run-path>/findings/*.md` — filter to those with PASS verdict in `validation/findings/*.json`153. `<run-path>/topics/done/*.md` — topic specs for included findings164. `<run-path>/topics/failed/*.md` — for Appendix B175. `<run-path>/config.yaml` + `<run-path>/seeds.md` — for coverage assessment1819# Mode branch: SINGLE vs CHUNKED2021Before loading anything:22```bash23du -sk <run-path>/findings/24```2526- If total findings size < 400 KB → SINGLE mode: load all findings, produce one REPORT.md in one pass.27- If >= 400 KB → CHUNKED mode:28 - Pass 1: produce `synthesis/REPORT.draft-chunks/{p1,p2,p3}.md` (one chunk per priority tier, each reading only its tier's findings).29 - Pass 2: merge pass that reads only the three chunks + manifest + reconcile notes, produces final REPORT.md.3031# Triangulation (redundancy pairs)3233For each pair in manifest.redundancy_pairs:341. Load both findings files.352. Compare:36 - Direction: same sign? (+/+, -/-, or +/-)37 - Magnitude: within 2x?38 - Confidence: both >=0.6?393. Write `<run-path>/synthesis/reconcile/<pair-id>.md` with outcome:40 - **REPLICATED**: same direction, within 2x magnitude → merge as single finding with doubled evidence weight.41 - **DIRECTION-CONFIRMED-MAGNITUDE-UNCERTAIN**: same direction, 2-3x magnitude divergence → report direction only, flag magnitude as uncertain.42 - **DIVERGENT**: opposite direction OR >3x magnitude divergence → flag in report as unresolved, rename both topics to `pending/<name>__divergence-reconcile.md` for a stronger-model retry run. DO NOT AVERAGE.4344# Evidence weight score (0-8) per included finding4546- Sample size: >500 = ✓✓ (2), 100-500 = ✓ (1), <100 = ⚠ (0)47- Validator: PASS = ✓ (1), PASS-with-warning = ⚠ (0)48- Redundancy: triangulated REPLICATED = ✓✓ (2), solo = ✓ (1), divergent = ⚠ (0)49- Citation quality: all numeric claims cite = ✓✓ (2), some uncited flagged = ⚠ (0)5051Sum → 0-8. Include in report only findings with score >= 4. Score 4-5 noted as moderate evidence; >= 6 as strong.5253# REPORT.md structure (MANDATORY sections in order)5455```markdown56# <Project Name> — Analyzer Report57_Generated YYYY-MM-DD, N findings included, M excluded as FAIL, K divergent pairs._5859## §0 Evidence bases (MANDATORY FIRST SECTION)60<Denominator accounting from T000-equivalent finding if present.>61<Every subsequent percentage must specify subset, NOT bare "% of users".>6263## Executive summary64<3-6 paragraphs, P1 first.>6566## Top N for the decision-maker call67<For each of top N (N=5 by default, configurable) most-compelling findings:>68- Headline (specific, quantitative, <20 words)69- Narrative interpretation (2-3 sentences — correlation framing only, never causation)70- Supporting quotes (1-2 verbatim, ≤200 chars, with citation anchor)71- Confidence + evidence weight7273## P1: <primary domain — most detail>74### Finding 1.1 ...7576## P2: <secondary domain — compressed>7778## P3: <tertiary — appendix-style tables>7980## Curated quotes81<10 verbatim ≤200 chars each, chosen to illustrate P1 patterns.>8283## Divergent findings requiring human review84<From triangulation DIVERGENT outcomes. Never hidden by averaging.>8586## Honest-ambiguity statement87<If the P1 answer is weak or ambiguous, say so explicitly. Do NOT manufacture a thesis to meet expectations.>8889## Audit-trail note90<One paragraph: every number in this report traces to a topic file in topics/done/, queries listed in the topic, and validator verdict in validation/findings/. Fully reproducible.>9192## Appendix A — Topics run93<Table: topic ID, priority, complexity, model, verdict, one-line summary.>9495## Appendix B — Topics failed96<Table: topic ID, reason, retry count.>9798## Appendix C — Coverage99<Table: unit (collection/file/etc.), topic count, notes.>100```101102# Hard rules103- NEVER cite a finding with verdict=FAIL.104- NEVER mark a report PASS if any included finding has an empty / placeholder105 `## Contradictions with hypothesis` section (closes M-5). The validator's106 Step 3a refuses such findings at verdict time, but synthesize-report MUST107 re-check at compose time as defense-in-depth: any included finding whose108 contradictions body is whitespace-only or matches a placeholder109 (none / n/a / tbd / pending / `-`) FAILs the report compose with reason110 `empty-contradictions in TNNN`. Re-run validator on those topics first.111- NEVER introduce conclusions not supported by at least one PASS finding.112- NEVER hide a divergent pair by averaging — always flag explicitly.113- EVERY numeric claim in REPORT carries [DATA:...] or [AGENT:TNNN] anchor.114- If any finding claims "% of X" without subset qualifier → flag it, rewrite with explicit subset. Fake precision is slop.115- Before the Top-N section, confirm each candidate has a non-trivial denominator (>=100 records AND >=5% of its subset).116- If seeds.md explicitly excluded causation claims, report must use correlation framing only. Label every claim "correlation" or "observational pattern" — never "causes" or "leads to".117- The composite "signal of value" construct must count only components the adapter actually supports with user-linkable data. If a signal source lacks user linkage, report it as collection-level only.