Found during a 2026-07-08 miner-roadmap audit. src/review/issue-rag-wire.ts::buildIssueRagQuery is pure, isolated, string-only query-building logic — already tagged as forward groundwork for the miner (#2320) and explicitly preserved as intentional (not dead code) in commit 39cc9583c's message.
This is scoped narrowly: only the pure query-builder function, not the retrieval backend itself. retrieveContext (src/review/rag.ts) is Vectorize/D1-bound and not portable to a local CLI without a hosted round-trip — that's tracked as a separate open product-design question, not part of this issue. This extraction is independent of and doesn't need to wait for that decision.
Deliverables
References
Found during a 2026-07-08 miner-roadmap audit.
src/review/issue-rag-wire.ts::buildIssueRagQueryis pure, isolated, string-only query-building logic — already tagged as forward groundwork for the miner (#2320) and explicitly preserved as intentional (not dead code) in commit39cc9583c's message.This is scoped narrowly: only the pure query-builder function, not the retrieval backend itself.
retrieveContext(src/review/rag.ts) is Vectorize/D1-bound and not portable to a local CLI without a hosted round-trip — that's tracked as a separate open product-design question, not part of this issue. This extraction is independent of and doesn't need to wait for that decision.Deliverables
buildIssueRagQuerytopackages/gittensory-engine/src/(a new small module or an existing suitable one)src/review/issue-rag-wire.tsbecomes a thin re-export shim, OR keep the function there and just re-export fromgittensory-enginefor the miner side to import — whichever avoids awkward circular imports, sinceissue-rag-wire.tsalso wires intorag.tsbuildIssueRagQuerypasses unmodifiedReferences
src/review/issue-rag-wire.ts(source, feat(miner-rag): issue-centric RAG query builder (issue title/body → embeddable query text) #2320)src/review/rag.ts::retrieveContext(the NOT-in-scope retrieval backend — see the separate RAG-access design-decision issue)