Librarian & Analyst

Separation of concerns is cognitive architecture. Python handles mechanics silently. The model handles judgment explicitly. Same database, opposite data flows. Never confuse the two.

The Librarian (Python)

Mechanical. Silent. Always runs.

Opens the drawer. Pulls folders. Counts items. Sorts by date. Filters by domain. Computes embeddings. Runs SQL queries.

The Librarian never reads the content. It doesn't know what a brief says. It only knows: "there are 12 briefs in the technology drawer, here they are."

When the drawer is empty, the Librarian reports: "0 briefs found." No error. No confusion. Just a count.

The Analyst (Model)

Judgment. Contextual. Only runs when asked.

Reads the cards the Librarian retrieved. Decides which ones matter. Connects dots across briefs. Evaluates relevance. Makes the call.

The Analyst never touches the database. It doesn't know about SQLite queries or embeddings. It only knows: "here are some cards, which ones help me think about this article?"

When the drawer is empty, the Analyst says: "No relevant past briefs found." No breakdown. Just a straightforward admission.

Same Database, Opposite Data Flows

Two phases use the same SQLite file. Direction matters.

Phase 11: WRITE — After analysis, the Librarian writes the completed brief into the database. Core_thesis, key_insight, citations — all stored. Model produced it. Python stores it.
Phase 14: READ — Before the next analysis, the Librarian reads past briefs from the database. Finds relevant ones via embedding similarity. Python retrieves them. Model reads them.
Phase 19: SWAP — The search mechanic changed from keyword to embedding. The Librarian's code changed. The Analyst never noticed. Same cards, different retrieval. Separation of concerns made the swap invisible to the thinking layer.

A Recalled Brief in Action

From trace run-019e6027. The Librarian retrieved this. The Analyst used it.

Stored: 2026-05-12 · Retrieved: 2026-06-03
"Organizations that start with customer needs and work backward to technology — rather than deploying AI capabilities and finding applications for them — achieve transformative AI outcomes instead of incremental ones."
How the Analyst used it: This brief about customer-needs-first thinking connected to the IBM article's thesis about enterprise readiness. The Analyst saw the pattern: both argue against technology-first deployment. The past brief validated the article's framing — making the Analyst more confident in choosing stop_here.

When the Drawer Is Empty

[ empty ]

No past briefs found for this domain.

The Librarian returns 0 results. The Analyst proceeds without memory. No error state. No fallback logic. The system handles absence gracefully because the separation of concerns makes absence a normal case, not a failure.

Why this matters
Python can't judge. Models can't query.
Give Python a judgment task and it breaks on ambiguity. Give a model a query task and it hallucinates database rows. The architecture assigns each task to the right agent. This isn't design philosophy — it's what makes the system actually work at scale.