Repository navigation
Context assembly: Conventions and Architecture Decisions read from the Utopia mirror - #2794
Conversation
|
Lore is reviewing this PR — 36cf006f-b2c1-490d-a3f7-69a3203a186d. Submit a review that requests changes to have Lore push a fix for it. Comment |
🔍 Lore Spec Impact — advisoryThis PR touches 58 statement(s) across 3 spec(s), and 43 of them have validating tests this PR does not change. Feature Specification: Context Assembly Templates · 14 statement(s)
Scenario 3: Token Budget Enforcement
validated by Scenario 4: Traceable Assembly (Prompt Debug View)
validated by FR-1: lore_assemble_context MCP Tool
validated by FR-1: lore_assemble_context MCP Tool
validated by FR-2: Context Sources
validated by FR-2: Context Sources
validated by FR-2: Context Sources
validated by FR-2: Context Sources
validated by FR-2: Context Sources
validated by FR-3: Template System
validated by …and 48 more statement(s). 4 changed statement(s) had no validating test, so no coverage broke. 191 new statement(s) have no test link yet. Deterministic · graph @ |
There was a problem hiding this comment.
Lore review — Approved
Clean implementation of the Utopia context-assembly reader for the repo and adrs sections with shared budget/trace pipeline and thorough unit tests.
Must fix (0) · Consider (0) · Nits (0)
Reviewed by gemini-4-argon
Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.
Posted by floor, visit e13155e9-377d-4258-b0f5-9f5e7a9abee8.
…e Utopia mirror Under backend utopia (and the Utopia half of both), the repo and adrs sections are read from one search of the repository's knowledge base: the statements source's doc and statement chunks, grouped into one item per document (title, then statement texts in order) under the path Lore uses. A second page is asked for only when a section is short. Every other section still answers "no Utopia reader yet", as all do when the deployment has no reader or the repo no settings.utopia. Lore and Utopia now share one section pipeline (budget, serialization, debug trace), so a context eval's `found` grades Utopia's assembly the way it grades Lore's. /api/context and the evals pass the reader and the repo's mirror ids, read with the rest of its context settings. Spec: utopia-graph-mirror FR12, context-assembly FR-1.5. ADR-052 amendment 2026-10-16: the first Utopia reader is search over the mirrored statements.
|
Rebased on main after #2790: both PRs claimed FR12 in specs/utopia-graph-mirror, so this one's section is now FR13.1–FR13.6, and ADR-052 keeps both amendments in order. Tests and lint re-run green. |
d5ffb2d to
589c8c8
Compare
There was a problem hiding this comment.
Lore review — Approved
Utopia context assembly reader for repo and adrs sections is clean, well-tested, and matches ADR-052 and spec requirements.
Must fix (0) · Consider (0) · Nits (0)
Reviewed by gemini-4-argon
Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.
Posted by floor, visit ab4a017e-cfa6-447d-940d-b7500af35036.
…from (#2797) Records the first side-by-side measurement of Lore's own stores against Utopia as the source of an agent's context, in the shape of `decompose-model-comparison.md`. The comparison ran locally (the eval runner on a developer machine, against the deployed lore-api at #2794 and Utopia `0.1.0-re.7`), with the side-by-side grading from #2792: one question per document, context assembled once from each store at the full budget, answered and judged the same way. Headline: no store should switch yet. - Where Utopia has a knowledge base it often finds the right spec. On bowman-ui it found 18 of 20 documents against Lore's 15. - Less of what it returns gets used (about half Lore's useful share). The likely cause is that its reader returns whole documents' statements, not matching sections. That is not verified yet; the doc says how to check. - Utopia answered 1 question Lore missed; Lore answered 56 that Utopia missed. - Five repositories have no Utopia base, so they compare one store, not two. The doc lists the next steps in order: set up the missing bases, return only matched statements, push whole files, then run again. Docs only. Generated with [Claude Code](https://claude.com/claude-code)
The first real Utopia arm for the Lore-vs-Utopia experiment (#2787, #2792): under backend
utopia, and in the Utopia half ofboth, the context's Conventions (repo) and Architecture Decisions (adrs) sections come from Utopia instead of answering "no Utopia reader yet". It needs no new writes: it reads the spec and ADR statements the mirror (ADR-052) already pushed, through the read client from #2791.What changed
context-assembly-pipeline.ts(moved out ofcontext-assembly.ts): budget, fetching per section through a reader, packing, the debug trace. Lore and Utopia both go through it, so an eval'sfoundgrades Utopia's assembly the same way as Lore's. The Lore path is unchanged; the existing context-assembly tests pass without edits.context-assembly-utopia.ts.topK50), a second page only when a section is short and the first page sayshasMore.doc:orstmt:item (other sources are dropped, since search has no source filter yet), sorts each path intorepooradrswith Lore'sclassifyFile, and groups by path in first-rank order.settings.utopia.repoContextSettingsalso readssettings.utopia{kb_id,source_id} in the same query./api/contextand the evals passutopiaReadsFrom(env)and those ids. Underboth, the two halves now assemble in parallel; the debug trace stays Lore's.Caveats, recorded in the ADR-052 amendment: a tombstoned document can still match until Utopia's search can exclude missing documents; post-filtering by source id until search takes a source filter; code items carry no text yet; typed graph reads wait for the release that types Lore's relations.
Spec:
specs/utopia-graph-mirror"The Utopia arm" FR12.1–FR12.6,specs/context-assemblyFR-1.5. (FR12 may need renumbering if #2790 lands first.)Tests
Pure and reader tests (libs/shared): one item per spec from three statement chunks in order; another source's hits dropped; a second page only when short; code has no reader. End-to-end with the real templates (server-core): the ADR under Architecture Decisions with its statement texts; the trace lists the kept paths; no settings falls back to no-reader sections. Fixtures are built from the real
docStatementItemsoutput with a hand-written fakeUtopiaReads.repoContextSettingsreads the mirror ids.tscclean in libs/shared, server-core, lore-api; vitest libs/shared knowledge + utopia 143 passed (2 skipped), server-core context 27, lore-api context + context-evals + utopia 95; eslint clean on changed files andspecs adrs.Generated with Claude Code