# SOURCE_PAGE_RENDER_SPEC -- Kept-Source Link List (naked)

**Owner:** Epistemic Output Layer (S4) -- RENDER AUTHORITY (same authority that owns the Search Ledger render).
**Library:** Private RAM. **Consumers:** Top-Level Loop (emits it as a companion deliverable), operator (copy-paste).
**Status:** draft. Added as the single new deliverable in this version. Additive only -- it does NOT replace, summarize, or alter the visible Search Ledger (`RAM_SEARCH_LEDGER_RENDER_SPEC.md`), which still renders every query / accepted / rejected / skipped entry in full.

---

## 1. Purpose

After a run reaches TERMINAL and sources are compiled, produce one extra artifact: a **Source Page**. It is a naked list of the resolvable links for the sources the research **kept**, one link per line, and nothing else. The operator copies the whole page in one motion and pastes it straight into a notebook (for example the destination notebook platform) to seed it with exactly the sources that survived screening.

The Source Page is a convenience deliverable for humans. It carries no audit weight -- the Search Ledger remains the audit surface. This page exists only to make the kept links trivially copy-pasteable.

---

## 2. What counts as "kept"

**Kept** = a source that survived every screen and is retained in the **final RAM cycle** (the cycle whose output is carried into the final artifact after any reopen loops).

Precisely, a source is **kept** iff, in the final cycle's Search Ledger, it has an `every-accepted` record (it passed the Source Integrity Screen S2 **and** the Fitness Adjudicator S7) **and** it is NOT `auto_block` (no retraction / tier-3 block) **and** it does not also appear in `every-rejected`.

**Discarded** = anything in `every-rejected` (rejected by integrity, fitness, or any other gate) or `every-skipped` (avenues never pursued). Discarded sources **never** appear on the Source Page. There is no exception: a source flagged by integrity but retained by triangulation is `every-accepted` and therefore kept; a source that was rejected is discarded even if it was once considered.

The set is drawn from the RAM producer's ledger only. The Evaluator's independent retrieval is an audit surface and is **not** included -- the page is "the sources the research kept," not the sources the auditor consulted.

---

## 3. From kept source to link

Each kept source resolves to exactly one link, chosen by this precedence:

1. The source's retrieval access URL (the `url` / `uri` captured by the Retrieval Router S1 at fetch time), if present and well-formed.
2. Else, if `source_id` is a DOI, the resolver form `https://doi.org/<doi>` (DOI lowercased, no surrounding text).
3. Else, if `source_id` is itself a stable URL, that URL verbatim.

Normalize each link (trim whitespace; strip tracking fragments only if the Retrieval Router already recorded a canonical form -- do NOT invent canonicalization). **Deduplicate** by normalized link, keeping the first occurrence.

A kept source with **no** resolvable link (no access URL, no DOI, no stable URL -- e.g., an offline document or a retrieval-router-assigned local ID) cannot appear on a links-only page. Such a source is **omitted from the Source Page** and its `source_id` + reason is recorded in the final artifact's Search Ledger notes / degraded section (Section 5 of `RAM_SEARCH_LEDGER_RENDER_SPEC.md`). This omission is transparent, never silent -- but the omission note lives in the artifact, **never on the page**. The page stays naked.

---

## 4. Format -- STRICT (the page is naked)

The Source Page is a plain-text file. Emitted filename: `source-page.txt`.

Exactly this, and nothing else:

- One link per line, in order (Section 5), LF-separated, UTF-8.
- The **only** content on any line is a single URL. Nothing precedes it, nothing follows it.

FORBIDDEN on the page (any of these is a format violation, error class E9):

- Titles, headers, or a filename banner.
- Numbering, bullets, dashes, or any list marker.
- Section headings, groupings, or per-claim organization.
- Labels, annotations, or relevance notes ("supports claim X", "primary source", admiralty grades, dates, author names).
- Markdown link syntax (`[title](url)`) -- the link is the bare URL, not a formatted link.
- Blank lines between entries, leading/trailing blank lines, or trailing commentary.
- Any text that is not itself a link.

If you find yourself wanting to explain, group, or caption the links, stop: that content belongs in the Search Ledger, not on this page.

---

## 5. Ordering and empty case

- **Order:** ledger acceptance order (chronological by the `every-accepted` timestamp of the final cycle), deduplicated keeping the first occurrence. Do NOT reorder to rank or to hide.
- **Empty case:** if the run kept zero linkable sources, emit an **empty** `source-page.txt` (zero bytes). The page is still emitted -- never omitted. The zero-kept condition (and any Section 3 non-resolvable omissions) is recorded in the final artifact's Search Ledger notes, not on the page.

---

## 6. Relationship to the audit surfaces

- The Source Page is **additive**. It does not satisfy, replace, or weaken the visible Search Ledger requirement. A run still fails E3 if the full Search Ledger is missing, regardless of whether the Source Page was emitted.
- The Source Page contains **no** rejected or skipped entries by construction; it is not a summary of the ledger and must never be described as one.
- Non-collapse is unaffected: the Source Page carries no scores, no axes, no verdicts.

---

## 7. Schema authority

This spec is owned by the Epistemic Output Layer (S4), the same render authority that owns `RAM_SEARCH_LEDGER_RENDER_SPEC.md`. Any change to the kept-source selection rule (Section 2) or the naked format (Section 4) requires this layer's sign-off. No upstream writer may add annotations to the Source Page.
