Repository navigation
Description
Atlas program — full investigation, next-steps design & build-out (program tracking)
Drew's directive (2026-11-23): dig into the full Atlas system and design the next steps —
integrate all data sources with automatic ingest; improve query planning; integrate search for
fleet and for ID; MCP and programmatic access; more search characteristics on top of Snowflake;
reranking; a recommender; and everything else the investigation surfaces.
Ground truth (verified 2026-11-23)
- Program epic epic: Atlas program — unified search and memory index over every corpus #8983. Canonical store: laptop Turso/libSQL
~/atlas/turso-atlas/data/atlas.db- 29 topic shards. Last verified census (2026-10-31, atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125): 18,325 sessions / 122,124
messages / 107,639 chunks; the monolith has since grown to ~7.3 GB without a verified
recount — consumer-facing counts are frozen at the October publish.
- 29 topic shards. Last verified census (2026-10-31, atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125): 18,325 sessions / 122,124
- atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 phases 1–2 landed (12,092 CAS objects interned, ~2.6 GB, verify OK); phases 3–4 open.
- Production embedding model:
Snowflake/snowflake-arctic-embed-m-v2.0, 768 dims; vectors are
plain BLOBs —vector_top_kdoes not work on them; semantic search is an exact cosine scan
(~4 s). Legacy BGE-small space coexists. Second-embedder evaluation open (impl(atlas-search): search v1 — build-out, Workers fan-out, shard benchmarks, cache policy, second embedder #9092). - Retrieval: hybrid FTS + vector, RRF fusion only — no reranker in the serving path.
Query-planner flags (spell/query-class/rewritten) accepted but unimplemented
(impl(atlas-search): search v1 — build-out, Workers fan-out, shard benchmarks, cache policy, second embedder #9092/atlas search: query-understanding front-end — spell correction + LLM query planner/rewriter as toggleable stages, dual submission with provenance (extends #5741) #5773/atlas search: query-time parameter surface — every retrieval knob as a CLI flag / raw-query field, no hardcoded constants (extends #5741, #5668) #5774). Atlas search improvements: parallel branches, service/result-store shape, nix-packaged binary CLI #12900 thread 1 landed; thread 2 (multi-client) is Drew's open question. - Evaluation: golden-311 v3 + held-out 54, ablation harness (Atlas search: SPLADE investigation — third retrieval signal, eval harness, query-adaptive weighting #5741), standing programme atlas memory slice 5: cross-agent eval sets for the unified index (standing oracle) (#8567) #8627.
Feedback capture exists with no ranking consumer. Recommender: design only (design(atlas): recommendation objects, search history, retention classes #9140, epic(atlas): Part C — Atlas-facing: storage economics, benchmarks, ID search, recommendations #9109
Part C); no candidate generation exists. - Ingest is manual/script-driven (only schedule = daily backup); the target source list is
impl(atlas): continuous ingestion — queue/PM/GitHub/Muse/OpenCode/ID corpora + sources inventory #9097 Workstream E; sweep runner impl(atlas): recurring ingestion sweep runner + guardrail monitor + plan-headroom reporting (#6019) #7969 unbuilt. - Sensitivity: corpus tiers public/internal/secret vs client ceilings
shareable<personal<local-only<secret-bearing, enforced server-side. Atlas boundary remediation: secret-bearing rows still live in the production monolith and a local replica (#6021 wave 1) #8479 is open: the 638
secret-bearing chunks also live in the production monolith — the tier boundary does not
currently hold outside the shard set (purge-vs-reclassify is Drew's decision). - Census: 57 open
epic/atlas-programissues.
Workstreams
A. Automatic ingest of all data sources (pipeline: CDC/hooks + reconciliation sweeps,
classification before promotion, tombstone purge across all stores).
B. Query planning (classifier → transforms → routed retrieval → fuse → rerank; planner flags
made real).
C. More search characteristics on top of Snowflake (MRL two-resolution index, learned sparse,
late interaction, metadata pre-filtering with tier as a security boundary, ANN path to replace
the 4 s scan, second-embedder decision).
D. Reranking (cross-encoder over fused top-50–200, golden-set-gated per corpus; BGE-Reranker-v2-m3
default candidate; feedback loop wired in).
E. Recommender (single-user signals: profile centroid, session co-occurrence, recency/frequency,
graph neighbours; more-like-this / related / resurface surfaces).
F. Fleet + ID search integration (freshness for fleet search; #6062 publication format +
projectors #11182–#11186 + #9109 Part C — ID's first live query path).
G. MCP + programmatic access (one retrieval core; MCP/REST/CLI surfaces; versioned API contract
from atlas-proto; #8625 cross-client acceptance; Worker cache TTL #6805).
H. Evaluation & quality programme (golden set from real traces, per-stage metrics, CI gates).
I. Book + issue map (below).
Deliverables
- An Atlas book in bookwright form, published on the existing code-repo Pages site under
/code/atlas/, with a DOC-01-style docs-sync contract. - An issue-by-issue map of ALL Atlas issues, prioritized in best working order, with all
blockers marked on the issues and in the list. - Designs landed by PR for every workstream; implementation PRs merged wherever unblocked.
Operating rule
The prompt (posted as the first comment on this issue, and added to the repo by the starter PR)
is a starting point, not a stopping point: expand until everything possible is done, review,
repeat. Many parallel agents across analyze/research/design/document/implement workstreams.
Related: #8983, #3125, #9097, #9134, #12900, #6062, #9109.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-23T12:04:44Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "archer",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Activity
developing-today commentedon Nov 23, 2026
CODE-4827
dezren39 commentedon Nov 23, 2026
Atlas Program — Full Investigation, Next-Steps Design & Build-Out Prompt
You are the coordinator of a program-scale investigation and build-out of Atlas — Drew's
personal corpus search system in
developing-today/code(pkgs/atlas-search/,pkgs/atlas-coresurfaces, the Cloudflare Worker, and the laptop corpus at
~/atlas/). Dig into the fullsystem: what it holds, how it ingests, how it plans and ranks queries, who consumes it, and
what it should become. This prompt is a starting point, not a conclusive or final stopping
point. Work the design end to end, begin implementation wherever you are unblocked, and when a
pass finishes, review what remains, expand the plan, and repeat — until nothing more can be done
with the access and authority you have. Use subtasks and orchestration heavily: launch many
parallel agents (analyze, research, design, document, implement) and keep them pointed at the
frontier. A phase finishing is a signal to start the next one, not to stop and ask.
1. What Atlas is (ground truth — verify, don't re-derive)
Atlas is a unified search index over every corpus Drew produces, with provenance-first storage,
tiered sensitivity, and hybrid (FTS + vector) retrieval. Program epic:
#8983.
~/atlas/turso-atlas/data/atlas.dbplus 29topic shards. Last verified census (2026-10-31, on
#3125): 18,325 sessions / 122,124
messages / 107,639 chunks. Later records describe a ~7.3 GB monolith without a verified
recount — the counts consumers see are frozen at the October publish while the store has
grown. A fresh verified census is an early deliverable.
interned 12,092 content-addressed objects (~2.6 GB, 0 dedupe collisions): chatgpt-export +
sandbox-agents;
ATLAS-EXTRACTS VERIFY OK; atlas-backup covers the store. Phases 3(occurrence backfill) and 4 (catalog DB + multi-shard resolution as MCP tools) remain open.
Staged tiers exist beside the canonical store: per-unit
atlas_stagev1 staging DBs (promotegate built; the aggregator/session-close hook is not), and legacy topup/delta vector DBs
resolved at query time by content_hash, never merged into canonical identity.
pkgs/atlas-search/(atlas-core engine, atlas-embed, atlas-proto,atlas-search binary; a Python reference implementation kept for parity); the Cloudflare
Worker (
worker/src/index.ts— holds no DB credentials, per-query Durable Object cache, oneexecuteSearchpath serving REST + MCP, D1 binding present but flag-off); the Atlas MCPserver lives in that same Worker (
worker/src/mcp.ts, atlas memory slice 3: MCP query surface over the unified Atlas index (mcpx namespace) (#8567) #8625) — onesearchtool, live,wired into the laptop's mcpx as its remote
atlasserver;fleet search(
pkgs/fleet/crates/fleet-search/) is a flag-for-flag port of the atlas-search client with abyte-parity guard, documented in the fleet book. atlas-core clippy cleanup atlas-core: pre-existing clippy warnings outside c8_profile (verdict run for #12919) #13056 is open with
PR chore(atlas-core): clear the pre-existing clippy warnings recorded in #13056 #13097 unmerged (flag-held shepherd — not yours to merge without Drew's word).
Snowflake/snowflake-arctic-embed-m-v2.0(the
Snowflake/prefix is the stored model id), 768 dims, tablevec_snowflake_m_v2_768_f32, native Rust ONNX, CLS pooling,"query: "query prompt,bit-identical to the Python reference. Vectors live in the monolith/shards as plain BLOBs —
vector_top_kdoes not work on them; semantic search is an exact cosine scan (~4 s). Alegacy BGE-small vector space coexists (mixed-embedder by accretion). A second embedder
(BGE-M3 / Voyage / etc.) is an open evaluation in impl(atlas-search): search v1 — build-out, Workers fan-out, shard benchmarks, cache policy, second embedder #9092. The D1 chain (design(atlas): D1 tenant hot cache — admission, invalidation, Turso-hop skip #9134: impl(atlas): D1 hot-cache schema, binding, and store module for the atlas-search Worker #13100 closed,
impl(atlas): D1 hot-cache freshness evaluator — per-class watermark/TTL rules #13101/impl(atlas): D1 hot-cache admission policy — heat, heavy-query, tenant quotas, eviction #13103 in review, impl(atlas): D1 hot-cache read-path integration — Turso-hop skip with skip logging #13105 gated, impl(atlas): D1 hot-cache invalidation — tenant events, Worker consumption, operator purge #13106 flag-held, impl(atlas): D1 hot-cache measurement report for the storage-economics prototype #13107 behind) is a result/content
cache, not a vector store; production does not touch D1 (master flag off).
reranker in the serving path (Jaccard Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733 and SPLADE sit at eval-gate stage). Query-planner
flags (spell, query-class, rewritten) are accepted by the API but unimplemented
(impl(atlas-search): search v1 — build-out, Workers fan-out, shard benchmarks, cache policy, second embedder #9092 / atlas search: query-understanding front-end — spell correction + LLM query planner/rewriter as toggleable stages, dual submission with provenance (extends #5741) #5773 / atlas search: query-time parameter surface — every retrieval knob as a CLI flag / raw-query field, no hardcoded constants (extends #5741, #5668) #5774). Atlas search improvements: parallel branches, service/result-store shape, nix-packaged binary CLI #12900 thread 1 (parallel FTS+vector branches) landed via PR perf(atlas-search): run hybrid branches concurrently (#12900 thread 1) #13039;
thread 2 is the still-open multi-client product question (Drew's); thread 3 substantially
landed elsewhere.
eval programme atlas memory slice 5: cross-agent eval sets for the unified index (standing oracle) (#8567) #8627 (open). Feedback capture (
atlas-feedback/v1) exists with no rankingconsumer.
Recommendation snapshot paging state machine #10158 / PR feat(atlas-search): recommendation snapshot paging state machine (#10158) #12873 (flag-held shepherd). No candidate generation exists.
(28 internal shards / 107,001 chunks; 1 secret shard / 638 chunks; secret material allowed only
in the 2 secret DBs) vs client ceilings shareable < personal < local-only < secret-bearing
(default personal), enforced server-side per client identity (sandbox-scripts → personal;
drew-cli → secret-bearing; cf-worker → personal). Machinery: classification manifest design(atlas): schema-driven filter surface from the classification manifest (post-cutover) #5410
(can narrow, never widen), gitleaks + classifier + vector-neighbourhood revalidation task(atlas): classification revalidation scan — verify nothing sensitive sits at the wrong tier #6021,
Drew's own Layer-1 review Atlas Layer 1 follow-on: secret-tier review of 47 candidate chunks (67 findings) + 45 candidate messages from the 2026-11-15 revalidation scan (#6021) #10412 (closed), Presidio NER design(atlas): Presidio NER pass — full internal-tier + sampled secret-tier PII detection at corpus scale #6048. Absolute rules: candidate
secret content is never reproduced in issues, chat, or logs; secret text is never sent to a
hosted embedder (held out of sweeps until the local embedder design(atlas): secret-tier local embedder — model selection and fleet-hardware evaluation (secret text never leaves the fleet) #6059 lands).
a local replica, so the tier boundary does not currently hold outside the shard set;
purge-vs-reclassify is undecided (Drew's call — surface it with options, don't decide it).
epic/atlas-programissues (123 all-state), verified 2026-11-23.2. Drew's directions (the next-steps agenda — design all of it, build what's unblocked)
A. Integrate all data sources with automatic ingest
Ingestion today is manual/script-driven — the only laptop schedule is the daily backup
timer; ingest scripts still live in hatch-personal (#5670 migration open); the recurring sweep
runner #7969 is unbuilt. The target list already exists as #9097 Workstream E (open,
blocked): (1) Turso queue/PM data; (2) all GitHub issues/PRs/commits/files for all orgs
(comments are in — #6023 closed, writer #10688 landed; objects + continuous delta are missing;
external repos gated on licensing #6024 + zone policy #6052, both open); (3) all Muse
conversations/memory/artifacts (no connector issue exists yet — design the mechanism); (4) all
OpenCode sessions, plus the explicitly undecided thinking-traces investigation; (5) all ID
objects (reverse direction: #6062 + projectors #11182–#11186, all open/unstarted); (6) a
sources-inventory pass naming zettel/notes, Fleet Reports, the ask-ledger, quota/burn records,
laptop state stores (connectors #8622 memory-lancedb, #8626 memory files/notes/repo docs already
filed). Pipeline shape to design and build: source-of-record CDC/hooks + periodic
reconciliation crawl; detection ladder metadata → SHA-256 → full process; per-document
parser/chunking/model version stamps; chunk-level hashing so a small edit re-embeds one chunk;
staging → classification → ingest-gate promotion (#6057) → per-batch attestation (#6045);
deletion as tombstones with purge propagating across CAS + FTS + vector + recommender tables as
one operation. Every source enters under the tier machinery (§1) — classification before
promotion, never after. Gmail: no ingest is filed and Drew has paused all Gmail background
checks (2026-11-22) — record it as a named future source; do not build Gmail ingest without his
word.
B. Query planning
Design and build the planner the API already pretends to have: fast classifier (<10 ms) →
conditional transforms → routed retrieval → fuse → rerank. Components: conversational query
rewriting; expansion; multi-query / RAG-Fusion; HyDE (gated to underspecified queries);
decomposition into sub-queries; step-back; routing by source / intent / sensitivity tier;
structured filter extraction (kind/topic/project/client/date — the filters
fleet searchalready exposes). Disciplines: adaptive per-query strategy selection instead of stacking every
transform; evaluation sliced by query class so each strategy proves itself. Minimum viable
planner: routing + filter extraction + conversational rewriting; HyDE/decomposition second wave.
C. More search characteristics on top of Snowflake
The base is Arctic Embed m-v2.0 (768d; MRL truncation to 256d retains ~98% quality — a free
two-resolution index before any new model). Layer, each golden-set-measurable: lexical (BM25 —
exists), learned sparse (SPLADE), late interaction (ColBERT) as a top-100 mid-stage,
metadata pre-filtering (pre-filter/routing, never post-filter — the sensitivity tier is a
security boundary and belongs in the retrieval layer), behavioural signals, and the reranker
(§D). Fix the serving physics: replace the ~4 s exact scan with an ANN path (libSQL native
F32_BLOB+ DiskANNvector_top_kwhere the store supports it, an embedded-replica strategy,or a dedicated index) — measure recall loss against the exact scan on the golden set. Run the
second-embedder evaluation (#9092) to a decision: BGE-M3's one-pass dense+sparse+ColBERT is the
interesting challenger; any model change follows the migration discipline — model_id-tagged
vectors, shadow index, cutover on eval result, not on completion.
D. Reranking
Add a cross-encoder stage over the fused top-50–200: fixes precision, not recall; typical
+5–15 nDCG@10 at 50–500 ms CPU. Default open candidate: BGE-Reranker-v2-m3 (568M,
multilingual) via fastembed-rs
TextRerank(ONNX) or candle (avoids the ONNX Runtime AVX/SIGILLliability; v2-m3 ports as plain XLM-R). Hosted rerankers (Cohere/Voyage) are offline quality
ceilings for comparison only — and never see secret-tier text. Adoption is per-corpus and
golden-set-gated: a reranker that hurts on Atlas's own queries does not ship; pool size is
the latency knob. Wire the feedback loop (#6046/#8062 seam,
atlas-feedback/v1) into rankingexperiments — it is the prerequisite for any learning-to-rank claims.
E. Recommender
Single-user system: no cross-user collaborative filtering exists to copy. The signals are
content similarity (decaying weighted profile centroid over the existing embedding index),
session co-occurrence (item-to-item CF over Drew's own sessions — the strongest single-user
collaborative analogue), recency/frequency, and graph/provenance neighbours. Same three-stage
shape as search (candidate union → rank → MMR diversity/freshness/exploration re-rank), reusing
Atlas's stack — a trained two-tower model is overkill; the pattern collapses to the hand-built
profile vector, upgradeable in place. Surfaces: more-like-this, related results beside search,
a resurface feed, query suggestions. Build on the #9140 design and land the snapshot-paging
foundation (#10158) when its shepherd hold clears; design the DO-accumulated "next 10" fan-out
from #9109 Part C.
F. Search integration for fleet and for ID
fleet searchis live but searches a stale corpus (§1) — freshness (§A) is thefleet-facing fix. Then: result caching keyed by index version, batch search for lanes,
offline fallback via libSQL embedded replicas (native vectors work identically local/remote —
the route sqlite-vec can't take), and search-quality telemetry from real lane queries feeding
the golden set (§H).
the ID program prompt). Deliverables: the design(id/atlas): ID-graph publication format — Atlas objects + provenance/lineage relations as ID-graph objects #6062 publication format, the projectors
impl(atlas/id): projector — versions, files, relations emission (#6062 follow-on 1) #11182–impl(atlas/id): ID-graph publication conformance audit (#6062 follow-on 5) #11186 built and running, epic(atlas): Part C — Atlas-facing: storage economics, benchmarks, ID search, recommendations #9109 Part C (storage economics, ID search over the graph,
recommendations), automatic vectorization of ID content via Snowflake + the impl(atlas-search): search v1 — build-out, Workers fan-out, shard benchmarks, cache policy, second embedder #9092 second
embedder. ID has no live query path today — this workstream creates it.
G. MCP and programmatic access
One retrieval core, three surfaces, tier enforcement inside the core so every surface
inherits it: MCP for agents (the copyable shape is
search → readtwo-step tools returningreferences + snippets, never resource enumeration at corpus scale; the current server exposes a
single
searchtool — grow it deliberately: search, read, related/recommend, corpus status),REST for services (with signal-provenance
explainon results), CLI for humans(
fleet search+ atlas-search). Growatlas-proto'squery-parameters-v1.jsonseed into aversioned API contract all three surfaces honour. Close #8625's remainder: cross-client
acceptance for OpenClaw / OpenCode / OpenChamber / Muse lanes (identity-stamped, ceiling +
corpus scoping enforced in branch queries, audit-logged). #12900 thread 2 (is Atlas headed for
multi-client use?) is Drew's decision — prepare the options paper; don't pre-build for a
multi-tenant answer he hasn't given. Also fix the Worker cache: indefinite with no TTL/eviction
(#6805) is not a caching strategy.
H. Evaluation & quality programme
Everything above is gated on measurement. Grow the golden set from real traces (gold contexts
harvested from real retrieval runs — beware the 0.91-offline / 0.40-production trap), with
no-answer probes and adversarial slices (distractors, semantic twins, alias-only, long-doc).
Metrics per stage: Recall@k gates retrieval, nDCG/MRR judge ranking, Precision@k controls noise.
CI regression gate on every model / chunker / fusion / reranker / planner change (#8627).
Online: lightweight failure mining from real fleet/ID queries folded back into the set.
I. Book, issue map, and the living record
mechanical coverage proof; zero-warning build), joining the existing code-repo Pages deploy
under https://developing-today.github.io/code/atlas/ (one Pages site per repo — never a
standalone deploy). The fleet book is the form reference. Include a DOC-01-style docs-sync
contract in the atlas README surfaces: any engine/API/model change updates its chapter in
the same change.
epic/atlas-programissue (andthe atlas-adjacent atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125/impl(atlas): continuous ingestion — queue/PM/GitHub/Muse/OpenCode/ID corpora + sources inventory #9097/design(atlas): D1 tenant hot cache — admission, invalidation, Turso-hop skip #9134 families), prioritized in best working order, with all
blockers marked both on the issues themselves and in the priority list (book chapter +
tracking issue kept current). Blockers are worked, not just listed.
doc/archive) and,wherever unblocked, merged implementation PRs. CI runs on main only; merge when verified.
3. How to work (fleet rules — binding)
the owning repo the same pass for any problem found.
PR). Never
git stashin shared clones. Never force-push main.another agent is a hard stop). Re-read an issue's newest comments immediately before merging.
fleet queue dispatch), laptop fallback; a container environmentfailure is not a test result — record which route verified. Tests name their oracle.
counts computed from a named source, never estimated in prose.
secret text never goes to a hosted embedder or hosted reranker; tier enforcement lives in the
retrieval layer, not in client goodwill.
not yours to start without Drew's item-specific word. Decisions that are Drew's (Atlas boundary remediation: secret-bearing rows still live in the production monolith and a local replica (#6021 wave 1) #8479
purge-vs-reclassify, Atlas search improvements: parallel branches, service/result-store shape, nix-packaged binary CLI #12900 thread 2, the thinking-traces question in impl(atlas): continuous ingestion — queue/PM/GitHub/Muse/OpenCode/ID corpora + sources inventory #9097) get surfaced with
substance — options, ramifications, recommendation — never silently decided and never re-asked
once recorded.
vertexincorg. External communicationsneed per-item pre-approval. Quota doctrine: plan quotas only, never funds; a 402 is a wall.
4. The iteration rule
This prompt is the starting point. When every workstream has reported, do not conclude:
re-survey (corpus, issues, consumers, eval results), reconcile what the passes learned, expand
the design set and the issue map, and run the next pass. The program ends only when a full pass
finds nothing more that can be designed, documented, or implemented with the authority
available — and even then, the book, the issue map, and the docs-sync contract remain as the
living record the next pass starts from.
dezren39 commentedon Nov 23, 2026
Claim — Lane UJ (fleet docs lane): starter PR to bring the Atlas program investigation prompt into the repo (prompt doc placed per the repo's doc conventions + a short program index entry linking this issue, epic #8983, and the deliverables). Work in progress on the laptop; will post the PR link and merge SHA here when done.
Merge pull request #13242 from developing-today/lane-uj-13241
dezren39 commentedon Nov 23, 2026
Done — Lane UJ: the Atlas program investigation prompt is in the repo.
aab05194596a33406032951bbe73e7b680681344(head SHA-guarded at72e0bf51c836).doc/2026-11-23T12-06-51Z_design_atlas_program_investigation/2026-11-23T12-06-51Z_design_atlas_program_investigation.md— the full prompt, verbatim from this issue's first comment (verified: first 17,502 bytes hash identically to the source prompt file; the committed copy differs only by the trailing newline the API fetch adds). Placed as a dated design record per thedoc/<UTC>_<kind>_<name>/convention documented indoc/README.md.doc/README.md— one index line in the Dated records list linking the prompt record, this tracking issue, epic epic: Atlas program — unified search and memory index over every corpus #8983, and the deliverables (Atlas book under https://developing-today.github.io/code/atlas/ + the issue-by-issue Atlas map).This issue stays open as the program's tracking home; the book, issue map, designs, and implementation slices continue under it.