Slice doc (canonical): 04-retrieval.md · milestone.md
Goal
Each turn's prompt gains a retrieved slice: the pre-retrieval sync
stage embeds dirty rows, three query vectors rank per-type
candidate pools through the pure ranker module (scoring, decay,
pinning, high-similarity bypass, MMR, greedy budget-fill), and the
selected bundle renders into the prompt through new memory pack
templates. js-tiktoken lands as the first budget-accounting
consumer; injected awareness rows get their retrieval_count
increment; lore.keywords drives the keyword pathway.
Dependencies
Depends on: #376 (Slice 3.1a). Develops against pnpm db:seed rows — no build gate on #379 (Slice 3.3); real-data validation is a milestone DoD item
Blocks: #381 (Slice 3.5)
Pairs with: #377 (Slice 3.1b) via C8 (swap-dialog route) — doc-contract, not a gate
The slice doc is the brief (scope, acceptance criteria, tests, contracts); this ticket tracks execution. Doc wins on conflict.
View on Discord
Slice doc (canonical): 04-retrieval.md · milestone.md
Goal
Each turn's prompt gains a retrieved slice: the pre-retrieval sync
stage embeds dirty rows, three query vectors rank per-type
candidate pools through the pure ranker module (scoring, decay,
pinning, high-similarity bypass, MMR, greedy budget-fill), and the
selected bundle renders into the prompt through new memory pack
templates.
js-tiktokenlands as the first budget-accountingconsumer; injected awareness rows get their
retrieval_countincrement;
lore.keywordsdrives the keyword pathway.Dependencies
Depends on: #376 (Slice 3.1a). Develops against
pnpm db:seedrows — no build gate on #379 (Slice 3.3); real-data validation is a milestone DoD itemBlocks: #381 (Slice 3.5)
Pairs with: #377 (Slice 3.1b) via C8 (swap-dialog route) — doc-contract, not a gate
The slice doc is the brief (scope, acceptance criteria, tests, contracts); this ticket tracks execution. Doc wins on conflict.
View on Discord