- Status: Accepted
- Date: 2026-03-24
Context#
OSHUN already had typed Sophia-backed evidence contracts, citation trails, claim checks, and grounded-answer style surfaces, but the visual behavior of grounded evidence was still mostly implicit:
- Veritas RAG and claim-inspection surfaces were styling evidence states locally
- quoted passages, citation cards, and evidence summaries did not share one governed shell grammar
- Studio could inspect foundation tokens and domain accents, but not the visual rules for grounded evidence itself
The V1 TODO list explicitly requires the visual rules for grounded evidence UI to be defined. Existing shell governance already requires semantic-first truth signals, restrained use of domain accent, and reusable behavior across customer-shell and governance surfaces.
Decision#
Publish one canonical grounded-evidence UI behavior contract from
libs/oshun/design-tokens/src/tokens.ts and make the web shell consume it
through tokenized CSS variables, grounded-evidence helpers, Studio inspection
surfaces, and the current Veritas grounded-evidence flows.
The shell contract is:
-
Semantic truth signals first
- grounded, partially grounded, unsupported, and conflicting states use semantic tones before any domain accent
-
Neutral evidence shells
- evidence summaries, citation cards, and claim evidence containers stay on neutral surfaces; tone arrives through restrained washes, borders, rails, and pills
-
Source-anchored excerpts
- quoted passages must read as anchored evidence through a compact excerpt surface, visible rail, and adjacent source metadata
-
Compact metadata hierarchy
- source type, chronology, and evidence counts stay visually secondary so claims and excerpts remain the primary reading layer
-
Cross-domain reuse
- the same evidence grammar must work for Veritas claim inspection, citation-backed assistant answers, Nisaba grounded reading, and Studio evidence review surfaces
Consequences#
oshun-v1-foundationnow includes a grounded-evidence behavior contract in addition to core color, typography, spacing, elevation, motion, and domain-accent behavior.apps/oshun/web/src/design-system/globals-v2.cssnow defines shared evidence-tone, stance, summary-surface, excerpt-rail, citation-index, and metadata-dot variables.apps/oshun/web/src/design-system/grounded-evidence.tsnow provides the canonical web helper layer for evidence-status labels and derived grounding state.- Studio design-language tooling can now inspect grounded-evidence statuses, stances, and role rules as live governed artifacts.
- Veritas grounded-answer and claim-check flows now consume the same shell contract instead of hand-rolling local evidence-state styling.
Implementation#
- Shared contract:
libs/oshun/design-tokens/src/tokens.tslibs/oshun/design-tokens/src/tokens.test.ts
- Web adapter and CSS:
apps/oshun/web/src/design-system/tokens.tsapps/oshun/web/src/design-system/index.tsapps/oshun/web/src/design-system/grounded-evidence.tsapps/oshun/web/src/design-system/globals-v2.cssapps/oshun/web/src/design-system/__tests__/tokens.test.tsapps/oshun/web/src/design-system/__tests__/grounded-evidence.test.ts
- Web grounded-evidence surfaces:
apps/oshun/web/src/components/domains/veritas/VeritasRAG.tsxapps/oshun/web/src/components/domains/veritas/VeritasClaimChecker.tsxapps/oshun/web/src/components/domains/veritas/__tests__/VeritasClaimBias.test.tsxapps/oshun/web/src/components/domains/veritas/__tests__/VeritasRemainingModules.test.tsx
- Studio inspection and browser verification:
apps/oshun/web/src/components/studio/StudioDesignLanguageWorkspace.tsxapps/oshun/web/src/components/__tests__/StudioDesignLanguageWorkspace.test.tsxapps/oshun/web/e2e/studio-design-language-smoke.spec.tsapps/oshun/web/e2e/veritas-full-journey.spec.ts
Verification#
This slice is complete when:
- shared design-token tests pass
- targeted web grounded-evidence, Veritas, and Studio tests pass
- targeted eslint passes for the changed shared, web, and e2e files
- Playwright verifies both Studio grounded-evidence governance previews and the live Veritas grounded-evidence journey