Gadoes is building a citation ledger for Mike's answers

Every source the AI cites gets tracked, deduplicated, and flagged for whether the link still works.

chat-uicompliance

Gadoes is laying the groundwork for source accountability. The model records each source Mike cites in an answer and tags it with a status - unchecked, reachable, or dead link - so a stale or broken citation can be spotted rather than trusted blindly. Repeat citations from the same source collapse into one, and quoted excerpts are capped so the record stays tidy. There's also a placeholder for a future "hallucination council" that would actively verify whether a citation is real, though that work hasn't landed yet.

The front end now shows these as citation cards, with right-to-left rendering for Arabic sources and a tidy flag for EU law references. One caveat worth knowing: at this stage citations are shown to the user but not yet saved, so a mid-answer crash loses them silently.

So what Anyone evaluating Mike for work where a wrong or fabricated citation is a real liability should watch this thread - it's the start of making the AI's sources auditable.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

4 commits from Gadoes/dispumike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
d17c6e96 Chunk 4: Citation Data Model + Storage Gadoes 2026-05-02 ↗ GitHub
commit body
- Migration 001_citations.sql: citations table with liveness_status
  (unchecked|live|unreachable only - verified/unverified reserved for
  hallucination council Feature 2)
- Updated types.ts: Citation, CitationLivenessStatus, CitationSourceType types
- citationParser.ts: parseSingleCitation() and parseMcpResultToCitations()
  map MCP tool results to Citation schema for all 6 sources
- chatTools.ts: runToolCalls() extracts and accumulates citations from MCP results
- chatTools.ts: runLLMStream() emits mcp_citations SSE event at end of each
  assistant message (empty array emitted if no MCP tools called)

Acceptance criteria:
[x] Citation parser maps mock MCP response to citation schema for each source_type
[x] mcp_citations SSE event emitted with correct shape
[x] Empty array emitted if no MCP tools called
[x] Excerpt truncated to ≤500 chars
[x] liveness_status defaults to 'unchecked'

Tests: 37 pass (13 new citation parser tests)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2797ac86 Merge Chunk 4: Citation Data Model + Storage Gadoes 2026-05-02 ↗ GitHub
3631a865 Chunk 5: Citation rendering component with CitationCard, compact list, RTL support Gadoes 2026-05-02 ↗ GitHub
commit body
- Add McpCitation and McpCitationLiveness types to shared/types.ts
- Create CitationCard.tsx with SingleCitationCard, CompactRow, CitationList
  - ≤3 citations: expanded card view; ≥4: compact list with expand-on-click
  - RTL support for Arabic excerpts (dir=rtl on U+0600-U+06FF detection)
  - Liveness dot (grey/green/red), source badge with region glyph
  - "Verify & read" button stub (to be wired in Chunk 20)
- Add mcp_citations SSE event handler in useAssistantChat.ts
- Update AssistantMessage.tsx to render CitationList below message content
- Set up Vitest + React Testing Library; 22 component tests all passing
- npx tsc --noEmit passes with no errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4c3d2b52 Merge chunk-5-citation-rendering into main Gadoes 2026-05-02 ↗ GitHub

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-21.md from inside the repo you want the changes in.

⬇ Download capture-thread-21.md