Changelog¶
Entries are tagged by component: [engine] for the Python package under
engine/, [plugin] for Claude Code plugin primitives (skills, agents,
commands, manifests), [docs] for documentation-only changes. The plugin
and the engine are versioned in lockstep — a single version number covers
both.
Unreleased¶
0.13.0 — 2026-10-25¶
- [engine] MCP server -- new
retrieval mcpsubcommand (andretrieval-mcpscript,mcpextra) serving stdio MCP toolssearch_domain_context,index_projectandindex_statusover the existing query/index code paths. Root:--root>RETRIEVAL_ROOT>CLAUDE_PROJECT_DIR> cwd. Lexical is built lazily; heavier strategies are used once built viaindex_project. - [plugin] Per-project MCP registration --
mcpServersin.claude-plugin/plugin.json+scripts/retrieval-mcp.shstart the server in every project where the plugin is enabled; setup syncs now include--extra mcp. - [engine] MCP tool behaviour -- steering tool descriptions and server
instructions, a
retrieval://index/statusresource and aground_implementationprompt;index_statusis annotated read-only. Search never raises: skipped strategies come back with actionable reasons, plus anindex {stale, created_at}block and{error}dicts;top_kis clamped to 25 and snippets are byte-capped with atruncatedflag. - [engine] MCP safety and performance -- the server never builds or
overwrites an LLM-enriched
lexical+ctxindex (cost opt-in stays on the CLI); loaded retrievers are cached in-process, each request walks the project once, and builds take a separate lock so status and searches stay responsive (pi-serini is skipped with a retry hint during a build). - [plugin]
domain-context-retrievalskill -- makes the agent consult the MCP tools before implementing, modifying or debugging code, with aretrieval queryCLI fallback. - [docs] zsh-safe setup snippets -- extras are passed via
set -- --extra ... ; uv sync ... "$@", which word-splits in both bash and zsh.
0.12.1 — 2026-10-24¶
- [engine] Faster
index --retriever all—hybridnow adopts thelexicalandturbovecretrievers built earlier in the same run (same chunks, same params) instead of re-indexing and re-embedding every chunk; any mismatch falls back to a full build. The corpus is chunked and fingerprinted once per run and shared across strategies. On airflow (157k chunks) a fullindex --autowent from 91.0 to 45.8 minutes, with byte-identical cache files. - [engine] Freshness checks no longer parse whole caches —
indexandquerydecide "up to date" from the meta file plus a 4 KB head of the data file (schema version, optional modules, Lucene dir), instead of loading the full multi-GB JSON. An up-to-dateindex --autoon airflow went from 136 s / 7.9 GB peak memory to 34 s / 0.46 GB.queryalso stops re-loading the cache just to read its meta, and rebuilds a stale cache without parsing it first. No cache format or schema changes.
0.12.0 — 2026-10-10¶
- [engine] Record-loader registry — new stdlib-only
retrieval.record_loaders: formats that yield oneDocumentper record register a suffix and aload(docid, text, url)callable; both chunk-granularity loaders route through it and CLI text mode prints each loader's declared detail lines. The engine core no longer special-cases any format. - [engine] Gettext PO loader (first registered record loader) — new
stdlib-only
retrieval.po_loaderturns each.poentry into its ownDocument(msgid + msgstr text) with optionalmetadata(source file, line, fuzzy flag, msgid, msgstr, untranslated flag). Fuzzy and untranslated entries are indexed but flagged..pois part ofDEFAULT_EXTENSIONS;.potis not. - [engine] Optional
metadatafield onDocument— persisted in caches; old caches without it still load. - [engine]
cjktokenizer mode — CJK-aware tokenization so Chinese and mixed Chinese/English queries retrieve relevant entries. Theplaintokenizer remains the default and is byte-identical. - [engine] Autotune picks
cjkautomatically when the corpus is predominantly CJK text. - [plugin] Skills and
/retrievalcommand updated with PO translation-memory usage (index and query a PO repo, get msgid/msgstr pairs back). - [docs] Pages updated — CLI reference, customize-indexing,
use-each-retriever, persistence-and-cache, and new
po_loaderandrecord_loadersAPI reference pages.
0.11.0 — 2026-10-10¶
- [engine] Caption files (
.srt/.vtt) as tier-1 machine-extracted media — a new stdlib-only extractor (captions/1,CAPTIONS_EXTRACTOR_VERSION) converts SRT/VTT cues into the sidecar transcript format: adjacent cues merge into[HH:MM:SS]-prefixed paragraphs, and a new## [HH:MM:SS] <label>section heading opens roughly every 180s. No third-party subtitle library, no new extra..srt/.vttare now part ofMACHINE_EXTRACTABLE_EXTENSIONSandDEFAULT_EXTENSIONS— discovered and indexed automatically, same as a PDF, withretrieval extractpre-warming them too. - [engine] Third media tier: agent-orchestrated audio/video — new
AGENT_ORCHESTRATED_EXTENSIONS(.mp4,.mov,.mkv,.webm,.mp3,.m4a,.wav,.flac), folded intoEXTRACTABLE_EXTENSIONS. Unlike the agent-only tier (docx/pptx/xlsx/images, which an agent reads/views natively), an agent cannot read a video/audio file's bytes at all — it must orchestrate an external ASR tool via Bash (WhisperX, whisper.cpp, orwhisper) and register the result viaretrieval sidecar --register, same mechanism as every other agent-authored sidecar. Every such file indexes as an"agent-orchestrated"-reason stub until registered; see theretrievalskill's new "Audio and video: orchestrate an ASR tool, then register" section for the full workflow, including anti-fabrication guidance specific to ASR output and the caption/video double-counting pitfall. - [engine] Stat-only source identity for tier 3 —
ensure_sidecar,register_sidecar, andsidecar --listnever read an audio/video source's bytes: a new shared_source_identityhelper computessha256("stat/1|{size}|{mtime_ns}")from a singleos.stat()call instead forAGENT_ORCHESTRATED_EXTENSIONS, stored under the existingsha256manifest key with a new siblingidentityfield ("stat/1"for tier 3,"sha256/1"— a real content hash, unchanged behavior — for every other tier). Audio/video is also exempted from any file-size cap at discovery (project_loader._is_eligible_file), since the engine never allocates a buffer to hash bytes it would then discard. Trade-off: an in-place edit preserving both size and mtime produces a false cache hit under"stat/1"(impossible under"sha256/1");retrieval extract --forceis the escape hatch. - [engine] Generalized unit-heading regex —
_PAGE_HEADING_REis now_UNIT_HEADING_RE, matching both## Page N(PDF) and## [HH:MM:SS] label(caption/media) headings;_truncate_at_page_boundaryis now_truncate_at_unit_boundaryand truncates a time-coded transcript at a whole-section boundary, never mid-paragraph. - [engine]
require_extractorsno longer conflates "has a machine extractor" with "needs pypdf" — it now checks the newPYPDF_EXTENSIONS({".pdf"}) instead of the broaderMACHINE_EXTRACTABLE_EXTENSIONS(which now also includes captions), so a caption-only tree'sretrieval extractsucceeds withoutpypdfinstalled.register_extractorgained an optionalversion=kwarg (backing a new_EXTRACTOR_VERSIONSper-suffix map andextractor_version_for(path)) so a non-pypdf extractor stamps its own manifestextractor_versionwithout bumping every other suffix's cache;ensure_sidecarpasses the same per-suffix version into the rendered<!-- extractor: ... -->header, so a caption sidecar's header and manifest entry both saycaptions/1. - [engine] Uncapped tier-3 discovery —
discover_filesno longer applies any size cap toAGENT_ORCHESTRATED_EXTENSIONSfiles (see stat-only identity above); a 40MB.mp4is now discovered where a 30MB.pdfstill is not. - [docs] New transcribe-audio-video.md how-to covering the external ASR toolchain (ffmpeg, whisper.cpp, ggml model download), the SRT→sidecar transcript grammar, and register/reindex/verify; install.md prerequisites, customize-indexing.md, the CLI sidecar reference, troubleshooting, and the docs landing page now link to it, and it is in the mkdocs nav.
- [plugin] Documented the Office/image sidecar authoring workflow —
new
skills/retrieval/references/office-image-transcripts.mdreference covers heading conventions, section sizing, per-format body guidance, and anti-fabrication rules for.docx/.pptx/.xlsx/image sidecars.skills/retrieval/SKILL.md's "Without thepdfextra: author the transcript yourself" section is renamed "Author the media transcript yourself (the default media path)" to reflect that this is the only workflow for these formats, not a PDF fallback. - [docs] Cross-referenced the new authoring guide —
commands/retrieval.md,docs/how-to/customize-indexing.md,docs/reference/cli.md, anddocs/reference/troubleshooting.mdnow point at the renamed SKILL.md section and the new reference doc. - [engine] Truthful zero-pages note —
retrieval sidecar --register's stderr note for a transcript with no## Page Nheadings no longer claims breadcrumbs will be absent; it now explains the manifest'spagescounter is cosmetic for non-paged formats and that breadcrumbs still come from any##heading.
Upgrade note: a corpus containing .srt/.vtt, or any
AGENT_ORCHESTRATED_EXTENSIONS audio/video file, under its indexed root
reindexes once, automatically, on the next index/query after upgrading
— these suffixes are newly discovered and fingerprinted. A corpus with none
of these file types fingerprints byte-identically to the pre-0.11.0 format.
This is the same one-time fingerprint churn 0.9.0 introduced when
agent-only media suffixes were added to discovery.
0.10.0 — 2026-08-21¶
- [engine] Terraform/HCL indexing —
.tf,.tfvars, and.hclare now inDEFAULT_EXTENSIONS, so Terraform and HCL files pass file discovery; they are also added tochunker.CONFIG_SUFFIXES, so they chunk under the structured-config policy (config_chars) like YAML/TOML. Re-index existing projects to pick them up.
0.9.0 — 2026-08-17¶
- [engine] Agent-authored PDF sidecar transcripts — on clients without
the
pdfextra, the invoking coding agent can now build a usable PDF index itself instead of leaving placeholder stubs. Newretrieval.extractors.register_sidecar(root, source, transcript)writes a durable sidecar from a hand-authored transcript (nopypdfimport on any path), stampedextractor_version: "agent-authored/1"(AGENT_EXTRACTOR_VERSION) plusauthored_by: "agent",authored_at, andsidecar_sha256manifest fields. Newagent_sidecar_revision(entry)andsidecar_states(root, sources)helpers back the CLI surface below. Newinvalidate_process_cache(source)drops a source's process-level memo so a freshly registered sidecar is served immediately instead of a stale in-process stub. - [engine] New
retrieval sidecarsubcommand —--listreports every discovered PDF's sidecar state (missing/outdated/agent-authored/stub/ok);--register SOURCE --transcript PATH|-registers a hand-authored transcript (reading from a file or stdin). Unlikeextract,sidecarnever imports/requirespypdfon either mode. - [engine]
retrieval.persistence.compute_fingerprintnow mixes an agent-authored PDF'ssidecar_sha256into that file's fingerprint line ("relpath|size|mtime|sidecar_sha256"instead of the base"relpath|size|mtime"), so re-registering a changed transcript over an otherwise-unchanged source PDF still triggers a reindex. A corpus with no agent-authored entries fingerprints byte-identically to the pre-0.9.0 format (invariant covered by a dedicated regression test). - [engine] Supersede policy: an agent-authored sidecar is never
silently replaced once
pypdfbecomes available —needs_reextraction/_is_cache_hit's backend-missing check stay pinned on the literalreason == "backend-missing"string, which an agent-authored entry never has. The one escape hatch isretrieval extract --force, which now printswarning: overwriting N agent-authored sidecar(s) with pypdf outputto stderr before doing so. - [engine]
_is_cache_hithardened:extractor_versionis now membership in_ACCEPTED_EXTRACTOR_VERSIONS(both pypdf and agent-authored) rather than equality against one constant, and a manifest entry missingstatus/sidecaris now treated as a cache miss (triggering re-extraction) instead of a latentKeyError. - [engine]
require_extractors's guidanceRuntimeErrorand thebackend-missingstub's own text both now point atretrieval sidecar --registeras the no-install alternative to thepdfextra. - [plugin]
skills/retrieval/SKILL.md: new "Without thepdfextra: author the transcript yourself" subsection walks the agent through detect -> read -> write -> register -> reindex -> verify, plus two new guardrails (never fabricate transcript content; never hand-edit a sidecar.mdfile). - [plugin] Media extraction is delegated to the agent by default —
the skill's Step 1 sync (and the
setupdispatcher) now installs every strategy extra EXCEPTpdf, making agent-authored transcripts the standard media-indexing path rather than a fallback: afterindex, thepypdf is not installedwarning is the agent's cue to run the sidecar workflow immediately, so the media index is built before any query needs it. Adding--extra pdf(orsetup pdf/setup all) remains the explicit opt-in for pypdf machine extraction (bulk text-native corpora, headlessretrieval extractpre-warms) — the engine's pypdf path is unchanged. Step 2'suv runsnippets carry the same extras list as Step 1, sinceuv runre-syncs the environment to the extras named on each invocation. - [docs] New
## sidecarsection in the CLI reference; agent-authored manifest keys and fingerprint-revision behavior documented in persistence-and-cache.md;register_sidecar/sidecar_states/supersede policy documented in api/extractors.md; new troubleshooting entry for placeholder-stub PDF results;commands/retrieval.mdand customize-indexing.md point at the new workflow. - [engine] Sidecar mechanism extended to agent-only media — the
sidecar-extraction pipeline now also covers
.docx,.pptx,.xlsx,.png,.jpg,.jpeg,.gif,.webp(AGENT_ONLY_EXTENSIONS), none of which have a machine extractor at all. Every such file always indexes as an"agent-only"-reason stub (distinct from PDF'sbackend-missing, so it never falsely self-heals once pypdf becomes available); a one-time-per-process stderr note points atretrieval sidecar --registeras the only indexing path.EXTRACTABLE_EXTENSIONSis now the union of the newMACHINE_EXTRACTABLE_EXTENSIONS(.pdf) andAGENT_ONLY_EXTENSIONS, so discovery/fingerprinting/register_sidecarvalidation extend to the new suffixes automatically;require_extractorsnow only preflightsMACHINE_EXTRACTABLE_EXTENSIONS.retrieval extractstays PDF-only — it never attempts agent-only media — and its--prunekeep-set was fixed to cover every discovered sidecar-eligible file (not just PDFs), so a registered agent-only sidecar is no longer deleted byextract --prune.
Upgrade note: no existing index is invalidated by this release —
fingerprints stay byte-identical for corpora with no agent-authored
sidecar entries. An agent-authored transcript, once registered, is never
superseded by a later pdf-extra install (only retrieval extract
--force overwrites it, and only for PDFs). Adding the new agent-only
media suffixes to discovery does change the fingerprint for any corpus
that contains .docx/.pptx/.xlsx/image files under its indexed
root: such a corpus reindexes once, automatically, on the next
index/query after upgrading, picking up the newly discovered files as
agent-only stubs. A corpus with none of these file types is unaffected.
(Audio/video support landed in 0.11.0, below, via a third
agent-orchestrated media tier rather than the agent-only tier this release
introduced — an agent can read a docx or image natively, but not an mp4's
bytes, so it needed a different mechanism.)
0.8.0 — 2026-08-03¶
- [engine] PDFs in the project tree are now indexed automatically, via
Markdown sidecar transcripts — no flag needed. New
retrieval.extractorsmodule (stdlib-only at import scope) writes each PDF's extracted text to<root>/.agentic-retrieval/extracted/<rel-path>.md, keyed by a content-hash + extractor-version manifest so re-extraction is a no-op on unchanged files acrossindex --auto's multiple loader passes. With thepdfextra installed (pypdf, included in theallextra), a PDF yields a real page-by-page transcript (dehyphenated, reflowed, running header/footer stripped); without it, a searchable placeholder stub is written instead, with a one-timewarning: pypdf is not installedline on stderr per process —index/querynever hard-fail on a missingpypdfbackend..pdfjoinedproject_loader.DEFAULT_EXTENSIONS, with a two-stage discovery size cap (extract_max_bytes, 25MB, vs. the existing 1MB plain-text cap) so real-world PDFs aren't silently excluded. - [engine] New
--no-pdfflag onindex(opt-out of PDF auto-activation), persisted in the cache'smeta.loader_kwand therefore sticky across later flag-lessindex/querycalls. - [engine] New
retrieval extractsubcommand pre-warms every PDF's sidecar transcript under a project root without touching any retriever index —--forcere-extracts,--pruneremoves manifest entries/sidecar files for PDFs no longer present,--jsonemits a machine-readable summary. This is the only place PDF extraction hard-fails (a guidanceRuntimeError) when thepdfextra isn't installed. - [engine] Fix: the CLI's
loader_kw(extensions/exclusions/size caps) is now actually threaded fromindex-time flags into fingerprinting and persisted cache metadata (_loader_kw_from_args, previously a stub returning{}) — a latent staleness bug where a loader-affecting flag wouldn't reliably trigger a rebuild. - [engine] Fix:
load_chunk_documents'sDocument.contextis now populated from each chunk'sheading(previously left at its default), so the lexical retriever's citations/consolidated-hitcontextfield carries a real breadcrumb (e.g. a PDF sidecar's## Page Nheading) instead of being blank;ContextualLexicalRetriever.indexno longer drops thatcontextwhen rebuilding its enriched Documents. - [engine]
index --retriever lexical+ctx(one LLM call per chunk) now warns above 500 chunks and refuses outright above 2000 chunks unless--allow-large-contextis passed, guarding against an accidentally expensive/slow index run on a large corpus. - Upgrade note: a project containing PDFs will rebuild its index once on
the first
index/querycall after upgrading (new discovery eligibility for.pdf, changed fingerprint); PDF-free projects are unaffected.
0.7.1 — 2026-07-27¶
- [docs] Method explainers for every strategy.
docs/concepts/retrieval-strategies.mdnow explains each method, not just pi-serini: new "The lexical method" (TF-IDF + BM25 + RRF, and the contextual-enrichment link to Anthropic's Contextual Retrieval), "The turbovec method" (dense ANN over TurboQuant-quantized embeddings), "The hybrid method" (with the RRF citation — Cormack et al., SIGIR 2009), and "The tree-sitter method" (with the cAST citation — Zhang et al., arXiv:2506.15655) sections; the hybrid-fusion how-to links to the new hybrid section.
0.7.0 — 2026-07-27¶
- [engine]
vendor/added toDEFAULT_EXCLUDE_DIRSinproject_loader, so vendored third-party code is skipped during file discovery likenode_modulesandvenvalready are. - [engine] Pluggable tokenizer modes (
plain/code) onTfidfIndexandBM25Index."code"mode emits each whole token's lowercased subtokens (split on_/-/.and camelCase/PascalCase boundaries) after the whole token, so identifier-heavy corpora can match on subtoken vocabulary (e.g.getUserById→user/by/id) without losing exact-identifier matches."plain"stays byte-identical to the prior tokenizer. The mode is persisted into_dict/from_dictand never re-derived at query time. - [engine] Breaking: cache schema bump (v2 -> v3) for
LexicalRetrieverandHybridRetriever. Tier-A hyperparameters (bm25_k1/bm25_b/tokenizer/model_name/bit_width/lucene_k1/lucene_band a chunk-size policy) are now threaded from CLI flags (or auto-derived corpus signals) through to their consumers and recorded in each cache'smeta, so query time never re-derives them; a v2 on-disk cache for either retriever is treated as unrecognized and auto-rebuilt on the nextindex/query— no manual cache-clearing needed. Newbuild_retriever/resolve_ctor_kwargsmap a filteredparamsdict onto each retriever's declaredACCEPTSset. Newretrieval.autotunemodule (stdlib-only) collects corpus signals and resolves the full hyperparameter dict viaresolve_params(), with a static-default fallback on an empty corpus. Newretrieval tunesubcommand reports auto-derived params without writing anything;index/querygain--autoplus per-hyperparameter flags (--bm25-k1,--tokenizer,--bit-width, etc.),query's--top-kdefault becomesNone(explicit > auto-resolved >5),evalgains--autoand recordsauto_params, andstatsechoeshyperparams/corpus_statswhen present. Hyperparameters recorded this way are now preserved across both query-triggered and index-triggered cache rebuilds (a barequeryor bareindex/index --forcewith no explicit flags no longer silently reverts a cache's recordedbm25_k1,tokenizer, etc. to static defaults) — an explicit flag value still takes precedence and overwrites the recovered value, and a from-scratch index with no priormetais unaffected. - [engine] [docs] Hyperparameter decisions delegated to the invoking
agent.
resolve_paramsnow also decides the turbovec/hybrid embedding model from corpus content and size (_decide_embed_model): code-dominated corpora (>0.6 code bytes) get a code-search-trained embedder, small corpora (≤2000 chunks) get the higher-qualitympnet, large corpora get the fastMiniLM, and an empty corpus degrades to theMiniLMstatic default;bit_widthis now sized from the chosen (or overridden) model's embedding dimensionality instead of a hardcoded 384.skills/retrieval/SKILL.mdStep 2 and the command dispatcher (commands/retrieval.md) now instruct the agent to decide hyperparameters inline at index/query time —indexwith--autoas the corpus- calibrated baseline plus per-flag explicit overrides,querywith--auto,top-k,--weights, and--pool— including a decision table mapping corpus/query observations to concrete flags and the persistence semantics (decide once, survives rebuilds, changed values trigger a selective rebuild). - [engine]
retrieval.__version__realigned withpyproject.toml(both0.6.0); a new regression test parsespyproject.toml's version field by regex and asserts it matchesretrieval.__version__so this can't silently drift again. This explains why on-disk caches built during the 0.6.0 development window may show differingengine_versionvalues in theirmeta.jsondepending on exactly which commit produced them. - [docs] Docs-only disambiguation. The README, docs home, per-retriever
how-to, troubleshooting table, the
lucene-retrieval-usageskill, and thePiSeriniRetrieverdocstring now state explicitly thatpi-serini(the strategy/registry key from the Pi-Serini paper) andpyserini(the Castorini library and install extra) are distinct names, not a typo for each other. No identifier, CLI flag, registry key, cache filename, class name, or extra name changed. - [docs] Pi-Serini method explainer.
docs/concepts/retrieval-strategies.mdgains a "The pi-serini method" section with the full paper citation (Hsu, Yang, Lin — Rethinking Agentic Search with Pi-Serini: Is Lexical Retrieval Sufficient?, arXiv:2605.10848): the retrieve-deeper thesis, BrowseComp-Plus results, and thek1=25, b=1tuning rationale.
0.6.0 — 2026-07-25¶
- [plugin] New default deep-answer workflow (Q/R/T/C/S). The
retrievalskill's Step 3 now runs a phased Decompose → Retrieve-per-sub-question → Trace → Coverage-gate → Synthesize loop by default for explanatory/ comprehensiveness questions (with a shallow triage fast-path for bare locate-a-symbol asks), replacing the previous four-step loop with an explicit coverage checklist that must be satisfied before answering. New optionalretrieval-traceragent (agents/retrieval-tracer.md) for fanning out Phase T across sub-aspects on broad questions (≥4 independent sub-aspects), returning detailedfile:linetraces to be stitched together by the caller.docs/how-to/consolidated-query.mdanddocs/how-to/integrate-coding-agents.mddocument the workflow's use of the--outputJSON envelope as the per-sub-question seed carrier, including a non-Claude-agent variant using only the CLI. No CLI output, JSON envelope, or engine logic changed — this is entirely plugin-primitive (skill/agent/doc) guidance.--queries-file/--path-prefixengine flags were considered to support this workflow natively but deferred; the workflow is achievable today with per-sub-questionquery --outputcalls. - [docs] Docs/guidance-only clarification. The
retrievalskill, the five per-method usage skills, and theretrieval.consolidationdocstrings/docs now spell out that the consolidated list is scaffolding for exploration (not a finished answer to hand the user directly), and thatscore/agreement/confidencemeasure cross-retriever agreement on query-text match — not that a span is current, canonical, or non-deprecated. No CLI output, JSON envelope, or engine logic changed.
0.5.0 — 2026-07-24¶
- [engine] Breaking: the default persisted index cache moved from
~/.cache/agentic-retrieval/indexes/<project-key>to<project-root>/.agentic-retrieval, resolved from the indexed root's absolute path so it follows the project regardless of where it's checked out. Existing caches under the old home-directory location are abandoned (not migrated) and lazily rebuilt at the new location on the nextindex/query. TheRETRIEVAL_INDEX_DIRenvironment variable now instead selects a shared base directory (keyed byproject_key(root)) rather than being the default location itself; its shared-base + project-key layout is otherwise unchanged. The new.agentic-retrievalcache dirname is excluded from file discovery by default (preventing a self-indexing feedback loop) and added to.gitignoreso index blobs are never committed.
0.4.0 — 2026-07-24¶
- [engine] Breaking: the distribution package was renamed from
rag-retrievaltoagentic-retrieval(therag-retrievalname was already taken on PyPI). The importable module (retrieval) and theretrievalconsole script are unchanged; only the distribution name, its self-referencingallextra, the release workflow's PyPI URL, and install instructions moved toagentic-retrieval. Any install command referencing the oldrag-retrievaldistribution name (e.g.uv pip install rag-retrieval,uvx --from rag-retrieval, or arag-retrieval[all] @ git+...requirement) must be updated toagentic-retrieval. - [engine] [docs] New
retrieval evalsubcommand runs a labeled query set against every retriever plus consolidated fusion, reporting recall@k, nDCG@k, confidence-bucket precision (agreement-signal validity), and cold/warm search latency; entirely in-memory (no on-disk cache writes). Missing extras are skipped gracefully, mirroring the consolidated query path. Ships an in-repo fixture corpus with 10 hand-labeled queries and extras-free tests, plus a new how-to guide (docs/how-to/evaluate-retrievers.md).skills/retrieval/SKILL.mdnow states what single-retriever mode trades away (the cross-retriever agreement/confidence signal) so agents can choose the opt-out deliberately; the consolidated default is unchanged.
0.3.0¶
- [engine] Breaking:
retrieval querydefault is now consolidated (all-retriever) mode. With no--retrieverflag (or the new explicit--retriever allalias),queryloads every available strategy in_DEFAULT_INDEX_SET, searches each, and merges/fuses them into a single deduplicated, ranked, explainable list via the newretrieval.consolidation.consolidate— same-file overlapping/adjacent spans across retrievers merge into one candidate, and each result carriesscore/provenance/agreement/confidence/contributors. A missing backend is skipped (never a hard failure) as long aslexicalconsolidates successfully. New consolidated- mode-only flags:--weights "name:w,..."(per-retriever RRF weight override) and--output PATH(also persist the JSON envelope to disk).--retriever <name>(single strategy) is unaffected — its plain-text and--jsonoutput stay byte-identical to before this change. See Consolidated query. - [engine] Weighted Reciprocal Rank Fusion.
retrieval.fusion.reciprocal_rank_fusiongained a trailingweights: Optional[List[float]] = Noneparameter;None(the default) weights every ranking1.0, numerically identical to the previous unweighted behavior, so every existing caller is unaffected. - [engine] New
retrieval.consolidationmodule.ConsolidatedHitdataclass +consolidate(per_retriever_hits, *, k=60, weights=None, merge_adjacent=True) -> List[ConsolidatedHit]: groups same-file overlapping/adjacentSearchHitspans across retrievers into one candidate, fuses each group's per-retriever ranks with weighted RRF, and returns a list sorted best-first, each hit carryingprovenance(which retrievers found it),agreement(how many), and aconfidencelabel (highifagreement >= 2; elsemediumif the sole contributing arm is a dense/Lucene arm —turbovec/pi-serini; elselow). - [engine] Tree-sitter (AST-boundary chunking) retrieval strategy. New
retrieval.ast_chunkermodule implements cAST-style (arXiv 2506.15655) split-then-merge chunking at AST node boundaries, viatree-sitter-language-pack(newtreesitterextra). Every chunk carries a dottedcontextbreadcrumb (enclosing function/class path, e.g."Bar.baz").retrieval.project_loader.load_ast_chunk_documentsis the AST-boundary analog ofload_chunk_documents, falling back to the line-based chunker per file when a suffix's language is unmapped or a file's AST chunking comes back empty. NewTreeSitterRetriever(REGISTRY keytreesitter) subclassesLexicalRetriever, ranking with the same TF-IDF + BM25 + RRF over AST chunks with the breadcrumb prefixed into the ranked text — the retriever class itself needs no optional dependency, only the loader does.DocumentandSearchHitgained an optional, trailing-defaultcontext: str = ""field. - [engine]
site/excluded from indexing by default.site(MkDocs/static-site build output) joinedDEFAULT_EXCLUDE_DIRSinretrieval.project_loader, so generated site assets no longer pollute the index. On-disk caches built before this change will read as stale on the nextquery(the content fingerprint now differs) and auto-rebuild — no manual cache-clearing. Override with theexclude_dirs=keyword if your project keeps real source undersite/. - [plugin] Skill guidance: post-retrieval enrichment loop. The
retrievalskill gained a Step 3 framing retrieved spans as exploration seeds (read the span, follow references outward, re-query with the vocabulary a hit reveals, stop when the question is answered) plus a noisy/low-relevance recovery subsection. The four*-retrieval-usageskills and the integrate-coding- agents how-to mirror the same "seed, not final answer" framing; the earlier "no manual grepping needed" / "no re-grepping" stop-signal phrasing was removed. - [engine] Chunk-level indexing with file:line spans. All five production
retrievers now index chunk-granularity
Documents (retrieval.project_loader.load_chunk_documents) instead of whole files:docidis"{path}:{start}-{end}", and eachDocumentcarriessource_path/start_line/end_linespan metadata. Every retriever gainedsearch_detailed(query, top_k) -> List[SearchHit], resolving each result's span from that metadata (never by parsing the docid string).search()is now a thin[h.docid for h in search_detailed(...)]projection, kept for backward compatibility. - [engine] Chunker line-span tracking.
retrieval.chunker.Chunkgainedstart_line/end_line(1-based, inclusive);chunk_documenttracks source line numbers for every paragraph and extends a chunk's span to include the heading line that introduced it. - [engine] Breaking:
retrieval query --jsonoutput shape.resultswas a flat list of docid strings; it is now a list of objects ({"docid", "path", "start_line", "end_line", "rank"}). Plain-textqueryoutput changed from one docid per line to onepath:start_line-end_linespan per line. - [engine] Cache schema bump (v1 -> v2). Every retriever's
SCHEMA_VERSIONbumped to persist the new chunk-spanunits; a v1 on-disk cache is treated as unrecognized and auto-rebuilt on the nextindex/query— no manual cache-clearing needed. - [engine]
retrieval indexprints<name>: indexed <N> chunks(was... docs);retrieval statsprints bothchunks:(chunk count) andfiles:(distinct source-file count) instead of a singledocs:line. The cache'smeta.jsongained afile_countfield alongside the existing (now chunk-counting)doc_count.
0.2.0¶
- [engine] Persistent, on-disk index cache (
retrieval.persistence) keyed by project path, with fingerprint-based staleness detection. - [engine] New
retrievalconsole-script CLI (index/query/stats), including--force,--stale-ok, and--json. - [engine]
uv-native setup — the engine's environment is managed entirely byuv sync/uv run; the deprecated no-uvfallback (scripts/setup_venv.py) has been removed. - [engine]
allextra — one-shot install of every optional retrieval extra (local,remote,turbovec,pyserini).
0.1.0¶
[engine] Initial vendored engine: LexicalRetriever (TF-IDF + BM25 + RRF),
TurbovecRetriever (dense ANN), PiSeriniRetriever (Lucene BM25), and the
heuristic/LLM contextualizers, with an in-memory-only engine API.
See GitHub Releases for the full release history and downloadable build artifacts.