Answer-card projection: compact per-claim view-model for in-stream rendering
Driver: kontourai/station#1391 (per-answer provenance cards — "what did the AI base its answer on"). Every chat answer gets a collapsible card; the card drills into a full trust report.
Today a consumer must hand-roll the fold: explainClaim + buildDerivationDrilldown return the full recursive tree with complete evidence context per node — right for a panel, verbose for a chat stream. Every consumer building a card would duplicate the same reduction.
Scope
A pure, DOM-free exported function beside src/claim-explanation.ts, e.g. buildAnswerCardProjection(report, claimId), returning a compact flat view-model:
- claim status + freshness (
asOf, expiresAt, stale) + materiality
- subject/value summary
- evidence items partitioned cited vs entails (
partitionEvidenceBySupport is already exported — the card's core visual distinction)
- direct derivation inputs (one level, with
method/supportStrength/rationale per edge; drilldown handles deeper)
- transparency gaps touching this claim
- transparency-gaps-shown-never-hidden is the card's trust contract — projection must make gaps un-omittable (present in the type, not optional)
Non-goals
- No DOM/rendering (headless path stays the embedding story)
- No new schema fields — this is a projection over existing records
Notes
examples/system-card/ (LLM model card) is the closest existing template and a good test bed: the projection should render that example's bundles sensibly.
Answer-card projection: compact per-claim view-model for in-stream rendering
Driver: kontourai/station#1391 (per-answer provenance cards — "what did the AI base its answer on"). Every chat answer gets a collapsible card; the card drills into a full trust report.
Today a consumer must hand-roll the fold:
explainClaim+buildDerivationDrilldownreturn the full recursive tree with complete evidence context per node — right for a panel, verbose for a chat stream. Every consumer building a card would duplicate the same reduction.Scope
A pure, DOM-free exported function beside
src/claim-explanation.ts, e.g.buildAnswerCardProjection(report, claimId), returning a compact flat view-model:asOf,expiresAt, stale) + materialitypartitionEvidenceBySupportis already exported — the card's core visual distinction)method/supportStrength/rationaleper edge; drilldown handles deeper)Non-goals
Notes
examples/system-card/(LLM model card) is the closest existing template and a good test bed: the projection should render that example's bundles sensibly.