Expand description
tt-retrieval — RAG / context-compression engine.
See docs/superpowers/specs/2026-05-28-trackE-rag-context-compression-design.md.
Re-exports§
pub use error::RetrievalError;pub use store::RetrievalStore;pub use substitute::substitute_in_messages;pub use substitute::SubstitutionReport;pub use substitute::DEFAULT_MIN_SIMILARITY;pub use types::Chunk;pub use types::Corpus;pub use types::Document;pub use types::RetrievableTag;pub use types::RetrievalResult;
Modules§
- chunking
- 512-token chunks with 64-token overlap. Tokenizer: tiktoken cl100k_base.
- embed
- OpenAI text-embedding-3-small client. 1536-dim output.
- error
- search
- Top-k cosine over a RetrievalStore.
- store
- substitute
- Orchestrator: take a message body, parse retrievable tags, embed the rest, retrieve top-k above a similarity floor, splice the retrieved chunks into the tag spans.
- tags
- Parse
<retrievable corpus="X" k="N">...</retrievable>tags from message text. Returns each tag’s corpus, k, and span in the text. - types
- Data shapes shared across the crate.