Navigator

ai.mentu由 mentu.ai 發布v1.0.2更新於 Oct 24, 2026

Read-only repo navigation and progressive disclosure; BM25 locator with registered evidence.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

唯讀的儲存庫導覽器,回傳附排序理由的檔案與行號範圍,讓助理不必載入整個儲存庫就能找到回答問題的文件。

可以做什麼
定位並閱讀文件:依 BM25 排序的檔案與行號範圍,附上檢索器歸屬與排序理由,接著回傳以標題為界的片段,frontmatter 另外回傳;降權檔案只會降低排名,不會移除文件。盤點儲存庫:檔案、語言、契約、清單、具型別的文件與 Git 狀態。查詢與路由:精確檢索流程,以及指向文件與具型別關係的前置資料指標,並標示需要補充讀取。檢視程式結構:符號脈絡(定義、引用、測試、文件、設定)與變更影響(Git 範圍、工單、契約、測試、風險訊號)。
適用情境
適合文件密集的儲存庫:助理需要找到回答問題的作業手冊、架構決策記錄或規格,而不必把整個語料載入脈絡;也適合檢視助理讀了什麼的人。README 說明其排序只在 markdown 文件上量測過,未在原始碼上量測,並建議從問題描述定位程式碼時改用原生或程式碼感知的檢索。
執行需求
本機程序,需要 Node.js 20 或更新版本。可透過 npm 套件 mentu-navigator 全域安裝,或以 npx 加 -p 參數執行,因為套件名稱與指令名稱不同。MCP 伺服器執行檔為 mentu-navigator-mcp。未宣告驗證、環境變數或標頭。
安裝前請注意
對目標儲存庫唯讀:不寫入、無背景索引、索引留在記憶體中。遙測以本機 JSONL 寫入使用者目錄,可用 MENTU_NAV_TELEMETRY=off 關閉;README 稱資料不會離開本機。含密鑰的路徑在讀取內容前即被排除。setup 指令會把內建技能連結到 Codex 與 Claude,並拒絕覆蓋已存在的路徑。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Navigator,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mentu-navigator

[DOI]

Read-only, provenance-first repository navigation for humans and AI agents.

Point it at a repository and ask a question. It returns ranked file-and-line ranges to read, each carrying the reason it ranked, and it never writes to the repository it reads. It is built for agents that must find the document that answers a question in a documentation-heavy repository, without pulling the whole thing into context, and for the people reviewing what those agents did.

Scope. The ranking default is measured on documentation: markdown corpora, in pre-registered studies (see Evidence). It has not been measured on source code, where published comparisons favour other locators (see Scope of the evidence). The code-structure commands (map, symbol, impact) work on any repository; their usefulness has not been measured.

mentu-navigator is the product name. mentu-nav is its short CLI.

Install

Requires Node.js 20 or newer.

sh
npm install -g mentu-navigator     # CLI: mentu-nav, MCP server: mentu-navigator-mcp

To run it without installing:

sh
npx -p mentu-navigator mentu-nav "where is retry handled?"

The package name and the command name differ, so npx mentu-navigator on its own cannot resolve a binary. Pass -p as above.

License: Apache-2.0. Telemetry is local-only JSONL under ~/.mentu/pd1/ (spec: docs/TELEMETRY-SPEC.md); disable with MENTU_NAV_TELEMETRY=off. Nothing ever leaves the machine.

Where it sits in Mentu

mentu-navigator is the retrieval surface. mentu-pdv validates the frontmatter schema this tool consumes and emits the demotion sets locate applies. The two are designed as a pair, and the schema is published as a spec (SPEC-frontmatter.md).

Why it exists

Search tools find matching text. A repository navigator also preserves the question's intent and returns the nearby contracts, tests, docs, Git lineage, and risk surfaces needed to act safely.

The first release is intentionally deterministic:

  • no embeddings;
  • no background index;
  • no writes to target repositories;
  • on-demand, bounded frontmatter handles that route to documents but never replace reading them;
  • bounded snippets with file-and-line provenance;
  • known secret-bearing paths excluded before content reads.

One-command start

bash
cd /path/to/repositorymentu-navmentu-nav "where is DEMO-274 implemented and tested?"

Interactive terminals receive a concise human view. Pipes receive compact JSON; --json requests the full envelope. Agents should use --agent for a compact, token-efficient JSON contract:

bash
mentu-nav --agent "where is DEMO-274 implemented and tested?"

The front door auto-routes to map, query, handles, symbol, or impact. Their explicit commands remain available for scripts and advanced use.

For a docs-as-code network:

bash
mentu-nav handles "catalog lineage"

This returns metadata pointers, typed relationships, and diagnostics. Every pointer carries requiresHydration: true. query keeps these pointers separate from source-body evidence so a summary cannot silently become an answer.

Capabilities

CapabilityQuestion answeredEvidence
mapWhat is here?files, languages, contracts, manifests, typed docs, Git state
queryWhere is the relevant evidence?ranked path/line/snippet hits and routing reason
locateWhich ranges should I read?BM25-ranked hits with retriever attribution (evidence-backed default)
read-rangeWhat does that range say?heading-bounded slice, frontmatter returned separately
handlesWhich docs and typed relationships may matter?frontmatter pointers, relationship resolution, diagnostics; hydration required
symbolWhat surrounds this symbol?definitions, references, tests, docs, config
impactWhat may this change affect?Git range, tickets, contracts, tests, risk signals

Progressive disclosure: locate and read-range

locate is the agent surface. Its default arm is ranked lexical retrieval (BM25). That default was set by a pre-registered study, not by taste (see Evidence below). Two legs exist:

  • a ranked lexical leg: in-memory Okapi BM25 over the same file set the walker already produces, with vendored Snowball stemmers for Spanish and English, routed by each document's lang frontmatter tag (detected as a fallback, and the detection is logged, never written);
  • an exact leg: the deterministic query pipeline, unchanged in semantics.

A fused arm (reciprocal rank fusion of the two legs) exists as a measurement arm. It was the original default and was retired from the default path by its own pre-registered ablation rule when the registered bake-off found it trailing plain BM25 by 7.8 points of localization (see Evidence). Every hit says which leg (or both) put it there.

bash
mentu-nav locate "compaction policy" --k 8mentu-nav read-range docs/adr/ADR-014-ledger-compaction.md 38 62 --widen 1

locate returns {path, line, range, snippet, score, retriever, why}. That is a range to read, not an answer. read-range returns the slice; each --widen step reaches ±20 lines further and stops at the enclosing heading boundary, and frontmatter comes back in its own field so metadata cannot be mistaken for body evidence. Handles remain the pointer layer, unchanged: every pointer still carries requiresHydration: true.

Pinned parameters

These are design parameters, not implementation details. Each is registered as an ablation and measured there; changing one is a dated decision plus a re-measurement.

ParameterValueWhat it governs
LOCATE_DEFAULT_K8hits locate returns by default
LOCATE_MAX_K40ceiling on k, whatever a caller asks for
SNIPPET_MAX_CHARS240snippet length, whitespace-normalized to one line
WIDEN_STEP_LINES20one read-range widening step
RRF_K60reciprocal rank fusion constant
DEMOTION_MULTIPLIER0.5penalty applied to a demoted document

The legacy query command keeps its own human-facing default of 40 results; the pins above govern locate.

Demotions

--demotions <path> reads a pdv demotions JSON file (resolved against the repository root) and multiplies those documents' scores by 0.5. A demoted document ranks lower and is never removed. An unavailable document is the more expensive error. An unreadable or malformed demotion set is reported in the envelope diagnostics rather than silently ignored.

--retriever is for measurement

--retriever=bm25|exact|fused selects an arm (default bm25). It exists so a registered bake-off's arms are produced by the shipped code path rather than by a harness fork. That is exactly how the defaults here were decided. The flag is not a tuning knob.

Evidence

Every performance-relevant default in this tool traces to a registered, mechanically adjudicated study, and every claim below carries its scope: one 141-document bilingual operational documentation corpus, a fresh 115-question blind set, this tool's k=8 contract. The bake-off (doi:10.5281/zenodo.21969901, companion to doi:10.5281/zenodo.21960138):

  • BM25 located the gold document on 93.0% of questions vs hardened exact search's 71.3% (McNemar p < 1e-5). That is why bm25 is the default.
  • The fused arm trailed BM25-alone by 7.8 pp (p = 0.0225), failing its frozen "fusion never costs localization" prediction; the pre-registered ablation rule retired it from the default path (docs/build/D3-REVISION-2026-08-16.md).
  • An off-the-shelf SQLite FTS5 control (89.6%) was not statistically distinguishable from this implementation. BM25 as such carries the gain.
  • Downstream answer accuracy moved +5.2 pp under the better locator, almost entirely through localization.

Nothing here claims generality beyond that corpus class; the study, corpus manifest, question set, and adjudicator are public in the DOIs above for re-running.

Scope of the evidence

Every study behind these defaults used markdown documentation; none used source code, and the difference matters. Finding the file to change from an issue description is a lower-overlap task, and published comparisons rank BM25 below embedding retrieval there. On SWE-bench Lite, BM25 placed a correct file among its top five 61.7% of the time, against 84.7% for a code-embedding retriever (Chen et al., LocAgent, Table 4). So:

  • for a question answered by a document (a runbook, an ADR, a specification), use locate, then read the range it returns;
  • to find code from an issue or a behaviour description, prefer your harness's native search, or a code-aware locator, until a study on code exists;
  • a pre-registered comparison of this tool inside a live agent, against the harness's native tools, is drafted with a code-localization stratum. It has not been run. When it has, this section will report its result either way.

What is additionally asserted by the test suite on every commit: the index writes nothing to a target repository and lives in memory for the life of the process; identical corpus and query produce byte-identical hit lists across runs and index rebuilds; secret-bearing paths are excluded before tokenization, not after; and a search pattern beginning with - is passed after a literal -- so it can never be parsed as an engine flag.

MCP

mentu-navigator-mcp exposes:

  • navigator: preferred compact, auto-routing entrypoint
  • locate: BM25-ranked ranges, with retriever and demotions
  • read_range: the disclosure step locate hands off to
  • navigator_map
  • navigator_query
  • navigator_handles
  • navigator_symbol_context
  • navigator_change_impact

An MCP client configuration:

json
{  "mcpServers": {    "mentu-navigator": {      "command": "npx",      "args": ["-y", "-p", "mentu-navigator", "mentu-navigator-mcp"]    }  }}

or launch the installed binary mentu-navigator-mcp directly.

Agent setup

bash
mentu-nav setup --target allmentu-nav doctor --human

Setup links the bundled skill into Codex and Claude without copying its logic. It refuses to replace an existing path. Repository navigation itself remains read-only.

Adoption

The executable remains centralized. Repositories adopt only a short operating contract; they do not copy the implementation. See docs/adoption.md.

來源:README.md,提交 6638cda

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分