# Journey: Veritas evidence trail

Veritas is a hybrid evidence walk. The lead at `/veritas` comes from the live
BFF adapter; claim, source, counterclaim, story, and topic depth boards are
polished fixture-backed surfaces. The journey verifies that each board is
internally inspectable and that exact citation fields stay aligned. It does not
pretend that every board is linked into one uninterrupted route.

| Surface                         | Data/runtime boundary                               |
| ------------------------------- | --------------------------------------------------- |
| Today's lead                    | BFF-backed Veritas mock adapter                     |
| Lead evidence rail              | Live lead payload and in-page jump                  |
| Claim/source/counterclaim/story | Depth fixtures                                      |
| Topic follow                    | Real followed-topic BFF write/read                  |
| Save to notebook                | Real saved-items BFF write and clean-device hydrate |
| Retraction                      | Adjacent journey, not this evidence walk            |

## Personas

- **Quick reader** — reads the grounded lead and confidence summary without
  entering every depth board.
- **Evidence inspector** — selects claims, opens sources, and reads provenance
  and counter-evidence.
- **Topic follower** — persists a Veritas topic follow through the BFF.
- **Library saver** — saves the lead and expects it on another signed-in browser
  context.

## Pre-conditions

- The customer session is valid; persistence checks use the same seeded user.
- The Veritas adapter is available. Standard E2E uses
  `OSHUN_VERITAS_ADAPTER=mock`; a separate outage stack proves the honest
  failure state.
- Depth fixtures from `veritas-depth.ts` are present for the claim, source,
  counterclaim, story, and topic routes.
- The saved-items and followed-topic BFF routes are available for the two
  cross-reload writes.
- No service worker or offline mode is required by this journey.

## Steps

### 1. Read the BFF-backed lead

- [x] `/veritas` renders a dated lead, headline, byline, article body,
      confidence summary, and evidence rail from `getVeritas()`.
- [x] Every lead claim presents a confidence value and named sources.
- [x] A live BFF non-2xx response renders an honest no-lead state rather than
      grounded article actions.
- [ ] The depth boards below do not inherit this live payload; they are
      independent fixture projections.

### 2. Jump from the article to its evidence rail

- [x] **Read sources** targets `#veritas-evidence-rail` on the current page.
- [x] Focus and scroll land at the real lead evidence region.
- [x] **Save to notebook** and **Share excerpt** remain separate article
      actions.
- [ ] This action does not navigate to `/veritas/claim`. Claim mode is reached
      directly or from a saved/bookmarked route.

### 3. Inspect claim mode

- [x] `/veritas/claim` renders focusable, underlined claim sentences and a
      selected-claim rail.
- [x] Hover, focus, click, and the all-claims table select the same claim model.
- [x] The selected rail exposes confidence, aligned source count, source quality
      band, date, quote, and source-profile href.
- [x] The high/medium/low legend explains the underline encoding without making
      color the only selected-state cue.
- [ ] There is no lead-to-claim navigation asserted in this journey.

### 4. Open a source profile

- [x] Source rows are real links, not decorative rows.
- [x] Selecting Statnett navigates to `/veritas/source/statnett-operator-data`.
- [x] The profile renders source-specific facts, band rationale, track record,
      conflicts, notable retractions, and recent history.
- [x] The profile's source id, name, and quality band align with the selected
      claim citation.

### 5. Compare counter-evidence

- [x] `/veritas/counterclaims` renders two sides with named sources, stances,
      quality bands, pull quotes, and evidence disclosures.
- [x] Native `<details>` controls open and close from pointer and keyboard.
- [x] Each inspection panel carries provenance, reviewer attribution, inspected
      time, excerpt hash, weakness rationale, and a resolution action.
- [x] The board ends with a fixture verdict and next steps.
- [ ] The claim surface does not currently provide a tested navigation link to
      this board; direct route is the honest fallback.

### 6. Read story and topic context

- [x] `/veritas/story` renders chronological event, update, contested, and
      retracted fixture entries plus a data-derived SVG confidence trajectory.
- [x] Retraction entries use text treatment as well as color and the change
      notes explain the trajectory.
- [x] `/veritas/topic` renders settled/open claims, reading-history cells,
      primary sources, gaps, and follow state.
- [x] Follow/unfollow writes through the real Veritas followed-topic BFF,
      survives reload, and cleans up.
- [ ] Some subnav and in-copy destinations remain direct-route or text-only;
      these boards should not be documented as one continuous link graph.

### 7. Verify the citation contract across depth boards

- [x] Claim citations expose source name, quality band, href, date, and quote.
- [x] The chosen source profile agrees with those source identity and band
      fields.
- [x] Counterclaim evidence adds provenance, reviewer attestation, inspection
      time, and excerpt hash.
- [ ] This is UI citation-contract consistency across fixture models. It is not
      a live Sophia answer or a runtime-generated Sophia evidence pack.

### 8. Save the lead and read it on a clean device

- [x] **Save to notebook** writes a saved item of kind `passage` through the
      real saved-items BFF.
- [x] The record preserves `formatLabel: "Today's lead"`,
      `resumePath: "/veritas"`, and `resumeLabel: "Resume reading"`.
- [x] A clean second browser context for the same user opens
      `/library?domain=veritas&kind=passage` and hydrates the row without copied
      local storage.
- [ ] This save proves saved-item persistence, not capture of the complete
      claim/source fixture graph.

## Post-conditions

- The reader can inspect the live lead evidence rail and each fixture-backed
  depth board without mistaking their data origins.
- Citation identity and quality metadata remain consistent from a selected claim
  to its source profile and counterclaim evidence.
- Topic follow and lead save survive reload through their real BFF paths.
- Broken or absent cross-board links are represented as route discontinuities,
  not silently described as working transitions.
- Retraction delivery and cascade behavior remain owned by the adjacent
  retraction journey.

## Failure modes

- **Veritas adapter outage** — `/veritas` renders the no-lead state and
  suppresses grounded actions.
- **Read sources treated as navigation** — it is an in-page anchor, so an
  assertion for `/veritas/claim` would be false.
- **Depth fixture treated as live evidence** — claim and related boards do not
  prove backend grounding or shared live state.
- **Missing route link** — direct URL remains the tested fallback for several
  depth surfaces.
- **Source-id regression** — a selected citation must land on its own dynamic
  source route, not the generic fallback profile.
- **Topic write failure** — the UI must not claim a persisted follow after BFF
  read-back fails.
- **Saved-item write failure** — a local optimistic label is not sufficient;
  clean-context Library hydrate is the completion proof.
- **Citation drift** — source id, band, date, quote, or provenance disagree
  between the fixture boards.
- **Retraction expectation** — correction letters and downstream markers are
  outside this journey.

## E2E coverage

- [apps/oshun/web/e2e/veritas-evidence-trail.spec.ts](../../apps/oshun/web/e2e/veritas-evidence-trail.spec.ts)
  drives the grounded lead, in-page evidence jump, claim selection, source-id
  drill, counterclaim disclosures, story trajectory, topic follow/unfollow
  persistence, citation alignment, and the real save-to-clean-device Library
  chain.
- [apps/oshun/web/e2e/veritas-full-journey.spec.ts](../../apps/oshun/web/e2e/veritas-full-journey.spec.ts)
  covers the broader Veritas entry and depth-surface traversal.
- [apps/oshun/web/e2e/veritas-home-outage.spec.ts](../../apps/oshun/web/e2e/veritas-home-outage.spec.ts)
  boots the dedicated outage adapter and proves the honest BFF 503 state.

Coverage is **deep for the hybrid contract**. It proves live lead, follow, and
save seams plus fixture-board interaction; it does not prove a shared live
evidence graph, a Sophia runtime, complete cross-route linking, or retraction
delivery.

## Per-view files touched by this journey

- [customer/05-veritas/veritas.md](../customer/05-veritas/veritas.md) —
  BFF-backed lead, evidence rail, and actions.
- [customer/05-veritas/veritas-claim.md](../customer/05-veritas/veritas-claim.md)
  — underlined claims and selected evidence.
- [customer/05-veritas/veritas-source.md](../customer/05-veritas/veritas-source.md)
  — source identity, band, history, and conflicts.
- [customer/05-veritas/veritas-counterclaims.md](../customer/05-veritas/veritas-counterclaims.md)
  — paired evidence and weaknesses.
- [customer/05-veritas/veritas-story.md](../customer/05-veritas/veritas-story.md)
  — timeline and trajectory.
- [customer/05-veritas/veritas-topic.md](../customer/05-veritas/veritas-topic.md)
  — topic reading history and persisted follow.
- [customer/02-home-discovery/library.md](../customer/02-home-discovery/library.md)
  — clean-device saved-item destination.

## Cross-references

- [veritas-to-nisaba-deeper.md](./veritas-to-nisaba-deeper.md) — explicit
  cross-domain source-lineage bridge.
- [veritas-retraction-cascade-customer-view.md](./veritas-retraction-cascade-customer-view.md)
  — correction and retraction evidence lanes.
- [nisaba-scholarly-read.md](./nisaba-scholarly-read.md) — a separate
  scholarly-reading and notebook flow.
- `apps/oshun/web/src/lib/lilith-data/veritas.ts` — lead loader.
- `apps/oshun/web/src/lib/lilith-data/veritas-depth.ts` — depth fixtures.
- `apps/oshun/web/src/components/lilith/VeritasClaimInteractive.tsx` — selected
  claim/source interaction.

## Open questions

- [ ] Which depth boards should be rebuilt from a shared live claim graph?
- [ ] Which missing cross-board links are intentional, and which should become
      first-class navigation?
- [ ] Should the lead expose a direct claim-mode action in addition to its
      in-page evidence jump?
- [ ] What runtime evidence proves Sophia grounding on the customer surface?
- [ ] Should a notebook save capture a versioned evidence graph rather than only
      the lead resume record?
- [ ] Which explicit offline contract, if any, should be added and tested?
