v0.5.0.md
docs/release-notes/v0.5.0.md
Tesserae v0.5.0 — The engine spine and the On-Demand Context Compiler
<!-- translations:start -->
한국어 · 中文 · 日本語 · Русский · Español · Français · Deutsch
<!-- translations:end -->
Released 2026-06-06 · PyPI · GitHub release · pip install --upgrade tesserae==0.5.0
Tesserae 0.5.0 is the release where the project becomes the context engine its mission describes. It ships the engine spine — a pipeline orchestrator, a supervisor daemon, and a live session monitor — and the Pillar-3 headline feature: the On-Demand Context Compiler, which turns "give me context on X" into a tailored, cited, agent-ready bundle. Underneath, the self-improvement passes are now activated and persisted via the node_memory sidecar (numeric recurrence confidence in output, supersede default-on), real default embeddings replace the hash-bucket stub (Track B), and the incremental-compile infrastructure lands but stays flag-OFF / experimental. Two real compile bugs found along the way are fixed (changed-only idempotence, the injected-store contract), and the test suite reaches 1544 passed / 0 failed. This is the release that delivers Phases 0–6 of the context-engine roadmap.
Table of contents:
- On-Demand Context Compiler — MD0 (Pillar 3, headline)
- The engine spine — orchestrator, daemon, live session monitor
- Self-improvement, activated and persisted ( MD0 sidecar)
- Real default embeddings (Track B)
- Incremental-compile infrastructure (flag-OFF) + two compile fixes
- Upgrading from v0.4.0
- Strategic context
1. On-Demand Context Compiler — compile_context (Pillar 3, headline)
What it is
The feature the whole roadmap pointed at: a query (or a set of seed nodes) in, a tailored, cited, agent-ready context bundle out. compile_context is a pure function — it reads the graph and returns an in-memory ContextBundle, writing nothing to disk. The pipeline is: query/seeds → PPR + hybrid search for seeds → depth-bounded k-hop neighborhood walk → assemble the relevant wiki bodies → optional LLM synthesis (with a graceful deterministic fallback) → budget control with a word-boundary truncation marker. Every node that contributes is recorded as a ContextCitation, so the bundle's citations all resolve back to real graph nodes.
| Type | Role | |
|---|---|---|
| `compile_context(query \ | seeds, depth, budget, …)` | Pure entry point; returns a ContextBundle. |
ContextBundle | The assembled context plus its list of citations. | |
ContextCitation | One resolvable citation (node id → contributed body). |
The compiler is exposed three ways:
- MCP tool
compile_context— for an agent to call mid-conversation.budget=0means uncapped. - CLI
tesserae project context— exit-0 / stdout /--output/ deterministic, for scripting and pipelines. - Topic-scoped exports —
slice_export_context_for_topicproduces a topic-scopedllms.txtslice, and the agent harness brief is now rendered per topic viacompile_context(Pattern 4 + Pattern 6) instead of a hard-coded top-12.
Two related retrieval upgrades ship alongside it: node_context gains a use_ppr ranked path (with suppression-aware neighbor fill and edge/limit controls), and the topic slice uses the canonical wiki slug so citations and exports line up.
How to use
# CLI: compile a cited context doc for a topic, print to stdout or a file
tesserae project context "retrieval ranking and RRF fusion"
tesserae project context "retrieval ranking" --output ./context-retrieval.md
From an MCP client:
{
"tool": "compile_context",
"arguments": {
"query": "How does our retrieval stack rank candidates?",
"depth": 2,
"budget": 4000
}
}
// → returns a ContextBundle: assembled body + a list of resolvable citations.
// budget: 0 means uncapped.
You can also seed directly from node ids (skipping the search step) when you already know the anchors:
{
"tool": "compile_context",
"arguments": {
"seeds": ["decision-2026-05-22-switch-to-rrf-fusion"],
"depth": 2,
"budget": 0
}
}
When to use it
- An agent needs a focused brief on one topic, not the whole-corpus
llms.txtdump or a singlewiki_pagebody. - You want citations that resolve — every claim in the bundle traces back to a graph node — so the agent can follow up.
- You're scripting a handoff and want a deterministic context artifact (
--output, no-LLM assembly mode) that regenerates per topic.