Skip to content

feat(miner-rag): wire issue-centric RAG retrieval into a scoped MCP tool #4293

Description

@JSONbored

This item is genuinely blocked, and this issue should say so plainly rather than pretend it's fully scoped.

The pure half is already handled separately: buildIssueRagQuery (src/review/issue-rag-wire.ts:24-38) composes a retrieval query from an issue's title/body/labels, and is explicitly marked "Intentionally pre-built and currently unreached: no miner-side issue-analysis caller exists yet (#2320)" (issue-rag-wire.ts:23). Its extraction to packages/gittensory-engine/ is filed and open separately as #4254 — that issue is a small, zero-risk move of the pure query-builder only, and does not need to wait for anything here.

What actually blocks "wire ... into a scoped MCP tool" is the retrieval backend itself: retrieveContext (src/review/rag.ts:488, with a metrics-wrapped variant retrieveContextWithMetrics at line 412) is Vectorize/D1-bound infrastructure that only exists server-side inside the hosted Worker. A local miner CLI or local MCP process cannot call it directly — there's no local equivalent, and reaching it means either a new authenticated hosted API round-trip, a local retrieval stack, or deferring RAG entirely for v1. That decision is tracked in #4258 and is explicitly unresolved as of this writing (open, three options laid out, no chosen direction). Building "the MCP tool" today would mean guessing at that decision.

Deliverables

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions