---
name: epistemic-output-layer
description: Final RAM artifact producer. Computes and renders three-axis confidence (evidence / transportability / decision) per claim with feature-slot substitution by claim type, renders the Surprise Register, and renders the visible Search Ledger as an Evaluator-ready artifact. Use when an Orchestrator+Governor packet is ready for final rendering or when the user asks for the audit-ready research output.
---

# Epistemic Output Layer (RAM S4)

## 1. Scope

### 1.1 In Scope
- Receive the Orchestrator triangulated-claims packet plus the Warrant & Saturation Governor's stopping decision and warrant rationale.
- Receive the Surprise Register (cross-cutting state, owned by Claim-Typing Engine) and the Search Ledger (cross-cutting state, owned by THIS layer).
- For every claim, compute three independent axes -- evidence, transportability, decision -- using the per-claim-type profile in section 2.2.2.
- Render the three axes separately and visibly. No collapse. No single trust score. No binary pass/fail.
- Render the Surprise Register section. Render the Search Ledger section.
- Emit the **Source Page**: a naked, copy-paste-ready list of the resolvable links for the kept (accepted) sources only, one link per line, no labels or sections. Additive deliverable; see `references/SOURCE_PAGE_RENDER_SPEC.md`.
- Adapt the per-discipline output skeleton inherited from the invoked Librarian discipline so it carries three-axis confidence and the Surprise Register.
- Emit the Evaluator-ready artifact: structured, audit-consumable, methodology-traced.

### 1.2 Out of Scope
- Computing the underlying signals (those come from Fitness Adjudicator, Source Integrity Screen, Orchestrator triangulation, Adversarial Pass Engine, Warrant Governor). This layer does NOT recompute upstream signals; it composes them.
- Reopen authority. The Evaluator owns reopen. This layer prepares audit input only.
- Search execution, source verification, claim typing. All upstream.

### 1.3 Classified Knowledge Inventory
- **R3.1 (load-bearing):** Realist CMO is a transportability signal -- mechanism-context match, NOT a property of the finding. C-features and C'-features must be decomposed and the mechanism scored under the C -> C' delta. Read `references/THREE_AXIS_COMPUTATION_SPEC.md`.
- **R3.2 (load-bearing):** External-validity decomposes into population (X), treatment (T), outcome (Y), context (C). Per claim type the dominant signal differs. Pearl-Bareinboim transport calculus formalizes the causal/predictive case.
- **R3.3 (load-bearing):** Transportability computation uses **feature-slot substitution**, NOT reweighting. Normative substitutes value-commensurability for mechanism-stability. Interpretive substitutes reader-relevance-proxy. Reweighting alone collapses the schema. Read `references/FEATURE_SLOT_SUBSTITUTION.md`.
- **PIET-T (Schloemer & Schroder-Back 2018):** 44 criteria across Population / Intervention / Environment / Transfer -- the concrete feature vector for descriptive/causal/predictive transportability scoring.
- **GRADE-CERQual:** the operational source of the reader-relevance-proxy for interpretive claims (methodological limitations + coherence + adequacy + relevance).
- **Drisko 2025 / Lincoln & Guba 1985 (CONTRADICTION SOURCE):** for interpretive claims, transportability is NOT researcher-computable in principle. Transferability is the reader's judgment given thick description. Any computed score for an interpretive claim risks being ceremonial. This is why `reader-judgment-required` caveat is mandatory.
- **Non-collapse doctrine:** Read `references/NON_COLLAPSE_DOCTRINE.md` before every render. The three-axis separation is load-bearing and re-stated at start of Phase B and again at Phase E validation.
- **Search Ledger render authority:** THIS layer owns the rendered schema. Read `references/RAM_SEARCH_LEDGER_RENDER_SPEC.md`. Other components write the ledger state; only this layer renders.

### 1.4 Ambiguity Register
| Ambiguity | Resolution rule | Type-coded caveat? |
|---|---|---|
| Normative claim transportability | Compute value-commensurability axis-substitute; do NOT compute mechanism-stability. Return score with caveat. | YES -- `value-commensurability-required` |
| Interpretive claim transportability | Compute reader-relevance-proxy via CERQual; do NOT claim researcher-side transport. Return score with caveat. | YES -- `reader-judgment-required` |
| Stacked-intent question with multiple claim types | Compute three axes per claim, render claims grouped by claim type; do NOT collapse to one composite score for the question. | NO (each claim self-typed) |
| Surprise Register has anomaly with no clear claim binding | Render in Surprise Register section regardless; do NOT silently drop. Mark as `unbound-anomaly`. | NO |
| Warrant Governor returned `nothing-found-after-expand` | Render decision axis with `defensible-null` decision, render expansion record from Search Ledger. Do NOT mark as low confidence by default -- a defensible null is a finding. | NO |
| Two axes computable but third has no evidence | Render the missing axis as `axis-not-computable` with reason. Do NOT impute. Do NOT skip. | YES -- `axis-not-computable` |
| Source Integrity Screen flagged a source that triangulation kept | Surface in Surprise Register AND in Search Ledger. Render decision axis with explicit flag. | NO |

### 1.5 File Registry
- `references/THREE_AXIS_COMPUTATION_SPEC.md` -- evidence / transportability / decision computation spec.
- `references/FEATURE_SLOT_SUBSTITUTION.md` -- per-claim-type feature-slot table; PIET-T and CERQual bindings.
- `references/NON_COLLAPSE_DOCTRINE.md` -- load-bearing non-collapse rule with anti-patterns.
- `references/DISCIPLINE_SKELETON_OVERLAY.md` -- adaptation protocol for the 11 inherited discipline output skeletons.
- `references/RAM_SEARCH_LEDGER_RENDER_SPEC.md` -- render authority schema for the Search Ledger (this layer's OWNED artifact).
- `references/SOURCE_PAGE_RENDER_SPEC.md` -- render authority schema for the Source Page (kept-source naked link list; this layer's OWNED artifact).
- `templates/EVALUATOR_READY_ARTIFACT.md` -- final artifact skeleton, emitted to the bridge.
- Public-RAM discipline skeletons (read-only): `../_public/discipline-skeletons/*.md` -- 11 inherited Librarian output skeletons, overlaid at Phase D.

---

## 2. Procedure Skeleton

### 2.1 Phase A -- Intake and Validation
1. Receive packet from Orchestrator: `{claims: [...], warrant: {stopping_reason, marginal_yield_record}, surprise_register, search_ledger, decision_context_descriptor, invoked_discipline}`.
2. Validate the packet. Required fields per claim: `claim_id`, `claim_type` in {descriptive, causal, predictive, normative, interpretive}, `triangulated_findings` (may be empty if defensible null), `fitness_inputs` (may be empty if null finding), `integrity_inputs`.
3. Validate `decision_context_descriptor` is present. If absent, transportability axis cannot be computed -- mark `axis-not-computable` with reason `no-decision-context-supplied`. Do NOT fabricate one.
4. Validate Search Ledger is present and non-empty. If absent or empty -> ERROR class E3 (Section 4).
5. Confirm Surprise Register reference is present even if empty.

### 2.2 Phase B -- Per-Claim Three-Axis Computation
For each claim, run three independent computations. NEVER share intermediate scores across axes. Render each separately. **NON-COLLAPSE PRIMACY:** the three axes are separately reasoned AND separately displayed -- re-read `references/NON_COLLAPSE_DOCTRINE.md` if any rendering function tries to combine them.

#### 2.2.1 Axis 1 -- Evidence
Inputs: `triangulated_findings`, `fitness_inputs` (per source: claim-type fitness score + rationale), `integrity_inputs` (retraction / AI-contamination / publication-bias screen results), `adversarial_findings` (disconfirmation pass), Surprise Register entries bound to this claim.

Computation (see `references/THREE_AXIS_COMPUTATION_SPEC.md` Section 2):
- Aggregate fitness scores across sources weighted by integrity-screen pass.
- Triangulation strength: count of methodologically independent sources converging on the claim (Orchestrator already labels independence per discipline).
- Adversarial-pass result: contradictions EXPAND the evidence statement as a `contradiction-record`, they never tiebreak it away.
- Output: `evidence_axis = {strength_band: weak|moderate|strong|defensible-null, supporting_source_count, independent_method_count, contradiction_record, fitness_distribution}`.

#### 2.2.2 Axis 2 -- Transportability
**Inputs:** `claim_type`, `decision_context_descriptor`, study-context features from triangulated sources.

**Per-claim-type profile (feature-slot substitution -- MANDATORY; see `references/FEATURE_SLOT_SUBSTITUTION.md`):**

| Claim type | Feature slot filled | Primitive | Caveat |
|---|---|---|---|
| Descriptive | `sampling_representativeness` | Brunswik X-validity match (PIET-T Population block) | none (unless `axis-not-computable`) |
| Causal | `mechanism_context_coupling` | CMO decomposition + Pearl-Bareinboim selection-diagram + PIET-T full 44 | none (unless `axis-not-computable`) |
| Predictive | `covariate_shift + mechanism_stability` | Pearl-Bareinboim transport formula + mechanism-stability sub-score | none (unless `axis-not-computable`) |
| Normative | `value_commensurability` | Substitute slot; mechanism-stability is NOT computed | `value-commensurability-required` MANDATORY |
| Interpretive | `reader_relevance_proxy` | Substitute slot; CERQual (methodological limitations + coherence + adequacy + relevance) | `reader-judgment-required` MANDATORY |

Detailed computation table and output schemas in `references/FEATURE_SLOT_SUBSTITUTION.md`. For normative and interpretive, render the type-coded caveat inline with the axis -- NEVER as a footnote.

If transportability cannot be computed (missing decision context, ungrounded study context, claim type mis-typed upstream): `transportability_axis = {axis_not_computable: true, reason: <string>}`. Do NOT impute. Do NOT default to "moderate."

#### 2.2.3 Axis 3 -- Decision
Inputs: `claim_type`, evidence axis output, transportability axis output, warrant-rationale, decision-context-descriptor, surprise-register entries bound to this claim, adversarial findings.

Computation:
- Decision band: `act-on | act-with-caveat | hold | seek-more-evidence | defensible-null`.
- Reasoning names: which axis dominates the recommendation (evidence-bound / transportability-bound / both), what Register entries bear on action, what the warrant rationale implies for next step.
- Output: `decision_axis = {band, dominant_constraint, rationale, action_caveats, register_bindings}`.

**Non-collapse enforcement after computation:** the three axis outputs are three independent objects. The render step (Phase D) MUST display them as three separate blocks. Any rendering function that combines them returns ERROR class E1.

### 2.3 Phase C -- Cross-Cutting Artifact Renders

#### 2.3.1 Surprise Register render
- Input: full Surprise Register (owner: Claim-Typing Engine; writers: S3, S5, S7, S8).
- Render EVERY entry. Group by binding: claim-bound entries appear with their claim AND in the Register section; unbound anomalies appear in the Register section only with `unbound-anomaly` flag.
- Per entry render: `{anomaly_id, anomaly_type, source_or_claim_binding, writer, rationale}`.
- The Surprise Register is a TOP-LEVEL section, NEVER a footnote. Registry entries EXPAND the report; they do NOT tiebreak. Any rendering that uses the Register to collapse the decision axis returns ERROR class E4.

#### 2.3.2 Search Ledger render (THIS LAYER OWNS SCHEMA AND RENDER)
- Input: Search Ledger as accumulated by writers (S1, S2, S3, S7, S8).
- Schema: four record kinds -- `every-query`, `every-accepted`, `every-rejected`, `every-skipped`. Full schema in `references/RAM_SEARCH_LEDGER_RENDER_SPEC.md`.
- Render EVERY entry. Do NOT summarize away rejected queries or skipped avenues. If the Search Ledger is missing from the final artifact -> ERROR class E3.

#### 2.3.3 Source Page render (THIS LAYER OWNS SCHEMA AND RENDER)
- Full spec: `references/SOURCE_PAGE_RENDER_SPEC.md`. This is the single new deliverable in this version; it is additive and does NOT replace or summarize the Search Ledger.
- Selection: **kept sources only** = final-cycle `every-accepted` records that are NOT `auto_block` and do NOT also appear in `every-rejected`. Everything in `every-rejected` and `every-skipped` is excluded. RAM producer ledger only; the Evaluator's retrieval is not included.
- Link derivation per kept source: retrieval access URL if present; else DOI as `https://doi.org/<doi>`; else a stable URL `source_id`. Deduplicate by normalized link, first occurrence wins.
- Output: a naked plain-text file `source-page.txt` -- one bare URL per line, ledger acceptance order, LF-separated, UTF-8. NO titles, numbering, bullets, sections, labels, annotations, markdown link syntax, or blank lines. Nothing but links. Format violation -> ERROR class E9.
- A kept source with no resolvable link is omitted from the page and its `source_id` + reason is recorded in the Search Ledger notes (never on the page). Zero kept links -> emit an empty file; never omit the deliverable.

### 2.4 Phase D -- Per-Discipline Skeleton Adaptation
- Read `invoked_discipline` from Orchestrator packet (one or more of the 11 inherited Librarian disciplines: systematic-review, scoping-review, realist-review, content-analysis, qualitative-synthesis, secondary-data-analysis, competitive-intelligence, comparative-analysis, discourse-analysis, historiography, research-auditor).
- Load the discipline's skeleton from `../_public/discipline-skeletons/<discipline>.md`.
- Adapt per `references/DISCIPLINE_SKELETON_OVERLAY.md`:
  - Each claim slot in the native skeleton carries the three-axis block.
  - The Surprise Register section is added as a top-level block.
  - The Search Ledger section is added as a top-level block.
  - Methodology trace is added (which discipline, which corpora, which methods, warrant rationale).
- If multiple disciplines were invoked (multi-method on a single claim): merge skeletons by claim, three-axis block once per claim, methodology trace per discipline.

### 2.5 Phase E -- Final Audit-Ready Artifact for Evaluator
- Assemble per `templates/EVALUATOR_READY_ARTIFACT.md`.
- Validation pass before emit:
  1. Every claim has three axis blocks (or `axis-not-computable` with reason).
  2. No single trust score, composite score, or `overall` field appears anywhere.
  3. Surprise Register and Search Ledger are both present (Ledger MUST be non-empty; Register may be empty ONLY IF the Register itself recorded "no anomalies surfaced").
  4. Type-coded caveats appear inline for normative and interpretive claims.
  5. Per-discipline skeleton is recognizable as the named discipline's structure.
  6. Source Page emitted and naked-format valid: every line is a bare URL; zero kept sources appear that are in `every-rejected`/`every-skipped`; no labels, sections, numbering, or annotations present (else E9).
- Emit. Tag artifact `evaluator-ready=true`. Drop to `bridge/ram-to-evaluator-handoff/`. Emit `source-page.txt` alongside as the companion kept-source link list.

### 2.6 Decision Points
| Decision | Rule |
|---|---|
| When to use full PIET-T 44 vs Population subset | Causal/predictive use full 44; descriptive uses Population block only; normative/interpretive do NOT use PIET-T (slot is substituted). |
| When to surface a type-coded caveat | Normative and interpretive ALWAYS. Descriptive/causal/predictive only when `axis-not-computable`. |
| When axis scores are comparable across claims | Same claim type AND same slot label -> comparable. Otherwise -> render side-by-side, do NOT arithmetic. |
| When to render `defensible-null` decision band | Warrant Governor returned `nothing-found-after-expand` AND adversarial pass returned no contradictions AND Search Ledger documents the expansion. |
| When to render `act-with-caveat` vs `hold` | `act-with-caveat`: evidence-strong AND transportability-moderate-or-uncomputable AND no register-bound contradictions. `hold`: any axis weak OR contradictions present without resolution. |

---

## 3. Anti-Deviation

### 3.1 Primacy / Recency for the Non-Collapse Rule
**The three axes (evidence / transportability / decision) MUST be separately reasoned AND separately displayed. A single trust score is THROWN. A binary pass/fail is THROWN.**
This rule is repeated at the start of Phase B and again at the validation pass in Phase E. If at any rendering step a function tries to compute a weighted average, harmonic mean, or any single-number summary across the three axes -> HALT and emit ERROR class E1.

### 3.2 Anti-Examples (see `references/NON_COLLAPSE_DOCTRINE.md` for full catalog)
- **FAILURE -- single executive-summary with collapsed axes:** "Overall Confidence: 7/10" collapses the three axes. THROWN.
- **FAILURE -- ceremonial transportability:** transportability axis displays label only, no slot, no rationale, no sub-scores. THROWN.
- **FAILURE -- transportability without computation:** "transportability: moderate" with no feature-slot substitution. CEREMONIAL. THROWN.
- **FAILURE -- reweighting masquerading as substitution:** normative value-commensurability rendered as a weight on mechanism-stability. THROWN.
- **FAILURE -- Search Ledger summarized:** "ran 47 queries, 14 sources accepted" without per-query, per-rejection, per-skip entries. THROWN.
- **FAILURE -- Surprise Register collapsed into a footnote:** register-as-parenthetical. THROWN.
- **FAILURE -- type-coded caveat omitted:** `value-commensurability-required` or `reader-judgment-required` flag stripped for comparability appearance. THROWN.
- **FAILURE -- Source Page contaminated:** a discarded (rejected/skipped) source appears on the Source Page, OR the page carries labels, section headings, numbering, per-claim grouping, admiralty grades, or any text that is not a bare link. THROWN (E9).

### 3.3 Anti-Sycophancy NEVER Rules
- NEVER simplify the three axes into a single score for readability.
- NEVER omit the type-coded caveat for normative or interpretive claims.
- NEVER drop Search Ledger entries to make the artifact shorter.
- NEVER use the Surprise Register as a tiebreaker for the decision axis.
- NEVER impute a transportability score when decision context is missing.
- NEVER reorder the axes (evidence -> transportability -> decision is canonical).
- NEVER render the artifact without methodology trace.

---

## 4. Failure Audit

### 4.1 Error Classes
| Class | Trigger | Response |
|---|---|---|
| E1 -- Axis collapse | Any rendering combines two or more axes into a single score, or omits an axis without `axis-not-computable` reason. | HALT. Re-run Phase B and Phase D for the offending claim. Emit failure log to Surprise Register as `output-layer-collapse-attempt`. |
| E2 -- Ceremonial axis | Transportability rendered with no slot, no sub-scores, no rationale. | HALT. Recompute Phase B Axis 2 with explicit slot substitution. If decision context genuinely absent, emit `axis-not-computable`. |
| E3 -- Search Ledger omitted | Final artifact emitted without Search Ledger, or Ledger empty when Retrieval Router ran. | HALT. Re-run Phase C.2. If genuinely empty, escalate to Orchestrator (upstream defect). |
| E4 -- Surprise Register used as tiebreaker | Decision axis rationale references Register entries to adjudicate (not expand). | HALT. Re-run Phase B Axis 3 with rationale that uses Register only to surface. |
| E5 -- Type-coded caveat omitted | Normative or interpretive claim without required caveat. | HALT. Re-render Axis 2 with caveat inline. |
| E6 -- Reweighting masquerading as substitution | Normative/interpretive transportability rendered as mechanism-stability reweighted. | HALT. Re-run Phase B Axis 2 with proper slot substitution. |
| E7 -- Methodology trace missing | Final artifact without per-discipline methodology trace. | HALT. Re-run Phase D. |
| E8 -- Decision context fabricated | Transportability rendered with a decision context not supplied. | HALT. Re-run Phase A validation; mark `axis-not-computable` if absent. |
| E9 -- Source Page contaminated | Source Page includes a discarded (rejected/skipped) source, or carries any non-link content (labels, sections, numbering, annotations, markdown link syntax). | HALT. Re-run Phase C.3 from the final-cycle `every-accepted` set; strip everything except bare deduplicated links per `references/SOURCE_PAGE_RENDER_SPEC.md`. |

### 4.2 Recovery Protocol
1. Each error class has a specific recompute path. Follow it. Do NOT route to a generic fallback.
2. If recompute fails twice on the same claim, emit the artifact with the offending claim marked `output-defect-blocking-emit` and surface the defect in the Surprise Register section. Do NOT silently emit a degraded artifact.
3. Repeated E1 within a session indicates a downstream rendering library defect -> escalate to system-engineer.

---

## 5. Interfaces

### 5.1 Inputs
- From **Multi-Method Orchestrator**: triangulated-claims packet.
- From **Warrant & Saturation Governor**: stopping decision, warrant rationale, marginal-yield record.
- From **Surprise Register** (owner: Claim-Typing Engine): anomaly entries with bindings.
- From **Search Ledger** (OWNED BY THIS LAYER): all writer entries.
- From caller / question-intake: `decision_context_descriptor`.

### 5.2 Outputs
- **Evaluator-ready artifact** per `templates/EVALUATOR_READY_ARTIFACT.md`, tagged `evaluator-ready=true`, dropped to bridge.
- **Source Page** (`source-page.txt`) per `references/SOURCE_PAGE_RENDER_SPEC.md`: naked, deduplicated, kept-source links only, one per line. Companion deliverable carried into the final artifact by the Top-Level Loop.
- **Render-failure log** (on error class trigger): goes to Surprise Register AND to the artifact's defect section.

### 5.3 Owns
- **RAM Search Ledger schema and render authority** (cross-cutting artifact). Other components write; this layer renders. Schema additions require this layer's sign-off.
- **Source Page schema and render authority** (`references/SOURCE_PAGE_RENDER_SPEC.md`). Derived from the kept (accepted) subset of the ledger. No upstream writer may add annotations to the page.

---

## 6. Final SKILL Summary

This skill is the epistemic contract endpoint of the RAM producer system. The dual-system audit collapses if output fidelity fails. Three load-bearing rules: (1) non-collapse of three axes; (2) feature-slot substitution by claim type (not reweighting); (3) visible Search Ledger with every query, accepted, rejected, skipped. Layered disclosure is allowed as a rendering pattern but never as a substitute for non-collapse.
