Skip to content

Commit 2eb8921

Browse files
committed
feat: end-to-end columnar pipeline — eliminate Row[] through merge
- WASM → QMCB (wasmResultToQMCB memcpy for numerics) - FragmentDO returns columnarData over RPC (structured clone, not JSON) - scanPages (Lance + Parquet paths) returns QMCB via executeQueryColumnar - merge.ts stays columnar: columnarKWayMerge, concatColumnarBatches, sliceColumnarBatch - computePartialAggQMCB reads typed arrays directly, no Row[] intermediate - Row[] materialized only at executeQuery exit guard (response boundary) - docs: update agentic design doc with industry standard memory approaches
1 parent 32c0433 commit 2eb8921

File tree

10 files changed

+1601
-65
lines changed

10 files changed

+1601
-65
lines changed

docs/design/agentic-infrastructure.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,25 @@ QueryMode covers Query. Source→Preprocess and Context Management are open gaps
1515
- **Source→Preprocess**: Google indexes everything but their quality signals have been gamed for 20 years. AI-generated, SEO-optimized content scores high on PageRank but carries no information. Gemini inherits this — brilliant model, garbage source.
1616
- **Context Management**: RAG is one-shot retrieval (embed → top-k → stuff). Misses structure, can't follow references, no progressive refinement. Hybrid search (BM25 + vector) just doubles down on the wrong model. Special formats (TOON, etc.) optimize the container but not the selection.
1717

18-
## Core insight: iteration
18+
## Core insight
1919

20-
The main reason code navigation works for agents is that **you can iterate on it**. You can't iterate on RAG.
20+
Agents handle huge codebases because code is addressable (file paths, function names), navigable (grep, imports), and DRY (define once, reference everywhere). The agent never loads everything — it navigates to what it needs via Glob → Grep → Read → refine.
2121

22-
RAG is a black box: embed → retrieve → stuff → hope. If the result is wrong, you can't:
23-
- Diff what changed between two retrievals
24-
- Version control your retrieval strategy
25-
- Write a test that asserts "this query should return these documents"
26-
- Gradually refine the result by narrowing the search
22+
RAG can't do this. It's one-shot: embed → retrieve → stuff → hope.
2723

28-
Code navigation is iterative: Glob → Grep → Read → refine → Read more. Each step is observable, testable, version-controllable. The agent sees what it got, decides if it's enough, and adjusts.
24+
### Industry standard for agent memory
2925

30-
**Context management as code** means the same thing: the context selection logic is code you can diff, test, version, and iterate on. Not a pipeline you configure and pray.
26+
Every shipping tool uses flat markdown files:
27+
28+
| Tool | File |
29+
|---|---|
30+
| Claude Code | `CLAUDE.md` + `MEMORY.md` |
31+
| Cursor | `.cursorrules` |
32+
| Windsurf | `.windsurfrules` |
33+
| GitHub Copilot | `.github/copilot-instructions.md` |
34+
| Cline | `.clinerules` |
35+
36+
No graphs, no query systems. Text files in the context window. Works at small scale (<200 lines, single repo). Breaks at scale — memory grows unbounded, drifts from reality, no selective retrieval. Nobody has solved this.
3137

3238
## Landscape analysis
3339

@@ -101,9 +107,11 @@ QueryMode's operator pipeline is uniquely positioned here.
101107

102108
## Thesis
103109

104-
QueryMode's composable operator model already solves columnar data problems at scale. Documents are rows. Quality, freshness, embedding, topic — these are columns. Filter, dedup, aggregate, project — these are operators.
110+
QueryMode solves the **Source → Preprocess** layer: crawl → dedup → quality score → store. Documents are rows, quality/freshness/embedding are columns, filter/dedup/aggregate are operators. This is a data problem and QueryMode is a data engine.
111+
112+
The **Context Management** layer is a different problem. The operators below (TokenBudget, SectionExtract, RedundancyFilter) are useful for document retrieval. The memory problem — how an agent accumulates and retrieves knowledge across sessions — remains unsolved industry-wide (see above). The industry standard is flat markdown files, and nothing has proven better at the scale of single-repo agent workflows.
105113

106-
Extend QueryMode with domain-specific operators to cover all three layers. Same engine, same API, same infrastructure. The key property: **every step is code** — testable, versionable, iterable.
114+
QueryMode handles document ingestion and retrieval. Memory uses markdown files — same as every other shipping tool.
107115

108116
## Non-goals
109117

0 commit comments

Comments
 (0)