CHRON-0003: Day Three — From Library to Knowledge Engine
What Happened
The third development session transformed the companion site from a static content display into an active knowledge engine with four AI-powered tools and an external MCP server.
Episode Architecture Complete
Perplexity populated episode lists for all 19 series across 6 tracks — 197 episodes total. Mystery Schools S2-S6 episode lists were designed from the strategy doc's core episodes and "additional episodes" pools. Western Canon A-E, Eastern Traditions F-J ported from existing series docs. The site's /series page now shows every episode with expandable lists.
Library → Sources
The Library page was renamed to Sources and restructured. The old page was a flat
dump of 347 CSV-imported book stubs. The new page filters to 57 books actively
referenced by the knowledge graph (episodes, concepts, or figures) and shows
cross-reference badges linking each source to its KG connections. A back-population
script (scripts/backpopulate-kg.py) was written and run, updating 60 LIB entries
with reverse-index fields.
AI Surface Brainstorm (FL-0004 through FL-0009)
Six feedback loops across three models (Claude Code, Grok, Gemini) produced an elaborate conceptual architecture for the site's AI interface — "The Telesterion," "The Apophatic Mirror," "The Coniunctio Engine." The human reviewed the output and identified the core problem: the spec was too conceptual, too synthetic. The models had amplified each other's metaphors into ceremony that built nothing useful.
The spec was rewritten from the ground up, grounded in the existing backlog (SUB-010 through SUB-013). The final architecture: concrete tools that do useful things, with the thesis showing up in how they work (honest gap reporting, corpus-grounded responses, visible provenance) rather than in theatrical UI.
Four AI Tools Shipped
All four built and deployed in a single morning session:
-
Corpus Search (
/search) — Semantic search across 4,691 embedded passages. Confidence-proportional opacity. Gap reporting when coverage is thin. -
Knowledge Graph Explorer (
/explore) — D3.js force-directed visualization. 97 nodes (20 concepts, 20 figures, 57 connected books), 207 edges. Interactive: click to inspect, drag to rearrange, scroll to zoom. -
Research Chat (
/chat) — RAG pipeline: embed user message → query Upstash Vector (top 8 passages) → inject into system prompt → stream via Claude Sonnet 4.6 through Vercel AI SDK. Scholarly voice enforced by system prompt. Sources shown in responses. -
MCP Server (
/api/mcp/[transport]) — Six tools exposing the full knowledge graph to external AI clients. SSE and streamable HTTP transports. Tested from Cursor: all 6 tools passing. Public, read-only, no auth.
AI Optimization Layer
Cursor (working in parallel) added llms.txt and /md endpoints for all pages —
structured markdown representations optimized for AI consumption. This complements
the MCP server by making the site's content directly ingestible by any AI system.
Agent Contributions
| Agent | What |
|---|---|
| Perplexity | Episode lists (197 eps), Sources rename/restructure, KG back-population, AI surface brainstorm + spec, corpus search, knowledge graph explorer, research chat, MCP server, documentation sweep |
| Claude Code | AI surface critique (FL-0004, FL-0008), episode title review |
| Cursor | AI optimization layer (llms.txt, /md endpoints), lint cleanup |
| Human | Editorial direction, brainstorm feedback ("too conceptual — strip it back"), Grok/Gemini prompting |
Decisions Made
- DEC-0009: Library → Sources (rename + filter to KG-connected entries only)
- DEC-0010: AI tools spec v1 rejected as "too conceptual, empty ritual" — rewritten as concrete tools grounded in backlog
- DEC-0011: MCP server approved as public endpoint for external AI access
Homepage Redesign + Chat Tray
The session concluded with a UX review that identified the homepage as "bolted on iteratively" and the nav as "a junk drawer." The homepage was recomposed from six sections to three (Hero, Featured Episode, Knowledge Engine). The nav was consolidated from six items (Series, Search, Explore, Sources, Chat, Log) to three (Series, Knowledge, Log). The Research Chat was moved from a dedicated /chat page to a floating tray component in the root layout, making it persistent across all pages. The Knowledge Engine section now shows two primary cards (Search, Explore) with secondary links (Concepts, Figures, Sources, Log) below.
Stats at Session End
| Metric | Count |
|---|---|
| Tracks | 6 |
| Series | 19 |
| Episodes (listed) | 197 |
| KB entries | 397 (347 books + 20 concepts + 20 figures + 10 relations) |
| Corpus texts | 131 |
| Embedded vectors | 4,691 |
| Graph nodes | 97 |
| Graph edges | 207 |
| Site routes | 8 pages + 5 API routes + MCP server + floating chat tray |
| Feedback loops | FL-0001 through FL-0009 |
| Commits this session | ~30 |