repovine

v0.1.1
io.github.legann/repovine Checked 3 days ago Published 4 months ago

Checkout-local repository context graph over MCP; `npx repovine setup` wires skills, agents, hooks.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_context

Find likely repository context for a task. Searches domains, packages, modules, exports, templates, services, entrypoints, and config names. Use this when the task is still fuzzy or starts from a keyword/symbol. Combines a deterministic token index with optional local embeddings over graph node cards when semantic_search_embeddings is enabled. Multi-token queries default to match auto: AND (every token on one node) first, then bounded OR per token when AND finds nothing. emptyDiagnostic appears only when totalResults is 0 and there are no config/entrypoint aux matches — not when OR-relax pro…

ParameterTypeDescription
query *stringTask keyword, feature name, symbol, route, package, config name, or other search text.
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
includearrayAccepted and ignored: the response is identical with and without it. trace_flow selects response sections through its own include enum.
limitintegerMax items to return. Default depends on the tool, usually 10-20.
matchstringToken matching strategy. auto (default): AND first, then bounded OR — OR hits set strategy.relaxedFrom:"and" and omit emptyDiagnostic; weak-only OR noise may set weakTokenOnlySuppressed with emptyDi…
offsetintegerPagination offset. Default 0.
perTokenLimitintegerMax OR candidates considered per query token before final ranking. Default scales with limit, capped at 100.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
typesarrayOptional result type filter.

map_context

Map the architectural area for a scope before reading code. Returns domain/package/module context, top connected modules, subdomains, semantic summary, and navigation. Use this after search_context or when the user names a feature/package/module directly. Empty/unresolved maps include emptyDiagnostic with reason and conditional nextActions. On a domain scope, taggedModules counts modules and taggedNonModuleCount the resources and subdomains beside them; byPackage keys are package ids, and modules under no package sit in withoutPackage.

ParameterTypeDescription
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
includearrayAccepted and ignored: the response is identical with and without it. trace_flow selects response sections through its own include enum.
includeSecondaryMatchesbooleanRead on view modules: include domain members matched by regex pattern only, not by directory or import cluster. The domain summary counts those members either way. Default false.
limitintegerMax items to return. Default depends on the tool, usually 10-20.
offsetintegerPagination offset. Default 0.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
scopestringScope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path…
viewstringMap shape. On a domain scope, modules selects the module slice and any other value the domain summary; on a node scope, summary returns the shortened path and any other value the full path. all and qu…

inspect_node

Inspect one graph node in detail. For modules it returns exports/signatures/line ranges/annotations; for exports it returns signature/calls and can include source body. Use this only after narrowing context. The response points deeper, sideways, up, and cross-layer; package and domain scopes also point at validation. Annotations hint and constrain; they do not bound inspect scope — no annotation means no pre-written checklist, not skip. Stating a nodeId is unchanged requires inspect_node on that nodeId in the same session; annotation on another nodeId is not evidence for it. A derived capabi…

ParameterTypeDescription
bodyLimitintegerMax body characters. Default 12000; hard max 50000.
bodyOffsetintegerCharacter offset for body pagination.
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
exportLimitintegerMax child/export entries to return. Default 20.
exportOffsetintegerPagination offset for child/export entries. Default 0.
grepBodystringRegex to search inside the node body with context lines.
includearrayAccepted and ignored: the response is identical with and without it. trace_flow selects response sections through its own include enum.
includeBodybooleanInclude source body for a module or export. Default false.
includeInternalsbooleanFor large function exports, include internal declarations.
includePrivatebooleanFor class exports, include private/protected members.
nodeIdstringNode id to inspect. Preferred for module/export-symbol/runtime-resource/template/domain inspection.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
scopestringScope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path…

get_entrypoints

List execution entrypoints independent of stack: pages, routes, APIs, webhooks, queue consumers, schedules, websockets, and unknown starts. The kind filter also accepts cli, worker and test, which no shipped interpreter emits — a filter on one of them returns nothing about a repository that has them. Routes are just one entrypoint kind; provider/runtime details are returned as metadata instead of being baked into the tool name. Prefer package, module, service, or query scopes for runtime lookup; domain scopes are semantic/path tags and may be empty. Empty results include emptyDiagnostic with…

ParameterTypeDescription
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
includearrayAccepted and ignored: the response is identical with and without it. trace_flow selects response sections through its own include enum.
kindstringEntrypoint kind to filter. Default all.
kindsarrayEntrypoint kinds to filter. Overrides kind when provided.
layerstringOptional layer filter. Entrypoints carry frontend or backend; IaC-derived service triggers carry backend. A filter on infra matches nothing. Default all.
limitintegerMax items to return. Default depends on the tool, usually 10-20.
offsetintegerPagination offset. Default 0.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
scopestringScope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path…

trace_flow

Trace runtime/data flow through modules, services, resources, triggers, and entrypoints. Use this for cross-layer questions: UI to API, API to queue, queue to worker, worker to DB/resource, and request routing (e.g. ingress to backend service, surfaced as routesTo/routedFrom on a service). The tool reports only graph-proven links and lists gaps when a transition cannot be proven. runtimeHandoff lists the handler module (mod:) of a traced runtime resource under three triggers, named per item: secret-binding (the resource or its handler binds a secret resource), annotation (a consumer- or bounda…

ParameterTypeDescription
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
fromstringFallback for scope: read only when scope is absent, and resolved by the same rules. An entrypoint id has no scope branch and resolves as a query scope.
includearrayRuntime sections to include. Default services/resources/flows.
limitintegerMax items to return. Default depends on the tool, usually 10-20.
offsetintegerPagination offset. Default 0.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
scopestringScope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path…

analyze_dependencies

Analyze import/export contracts and dependency risk. Replaces impact, cross-package dependencies, interface implementations, and import-map style queries. Use before changing exported APIs, types, package boundaries, interfaces, or shared modules. Empty or mode/scope-mismatch results include emptyDiagnostic with reason and conditional nextActions. impact on an export-symbol scope (or a module scope plus exportName) resolves reverse callers: precise resolved-import callers carry uses; callers matched by call name carry provenance {basis:"inferred",method:"call-name-index"} (spans re-export barr…

ParameterTypeDescription
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
depthintegerGraph traversal depth. Omitted means unbounded: the walk runs to the edge of reachability, so pass a bound when the answer should stay local.
directionstringFor package-boundaries and import-map on a pkg: scope: imports, exports, or both. Default both. Ignored by impact, callgraph and interface-implementations.
exportNamestringFilter impact to consumers of a specific export. Required when mode is callgraph and scope is a module.
interfaceNamestringRequired for mode interface-implementations unless scope names an interface.
limitintegerMax items to return. Default depends on the tool, usually 10-20.
modestringDependency analysis mode. Default impact for module/export-symbol scopes, package-boundaries otherwise. mode callgraph requires an export-symbol scope, or a module scope plus exportName.
offsetintegerPagination offset. Default 0.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
scopestringScope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path…

get_config_surface

Inspect configuration and resource-binding surface: env vars, secrets, public config, and code-to-resource bindings. Items carry kind env, secret, public-config or resource-binding; the kind filter also accepts iac-param, which no item carries, so a filter on it returns nothing. Use before adding config, changing resource names, or debugging hidden runtime coupling. Empty results include emptyDiagnostic with reason and conditional nextActions.

ParameterTypeDescription
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
groupBystringSort key for the flat item list. Items carry no module, service or resource key, so every value sorts by name. Default name.
includearrayAccepted and ignored: the response is identical with and without it. trace_flow selects response sections through its own include enum.
kindstringConfig kind to filter. Default all.
kindsarrayConfig kinds to filter. Overrides kind when provided.
limitintegerMax items to return. Default depends on the tool, usually 10-20.
namePatternstringCase-insensitive regex for config/resource names.
offsetintegerPagination offset. Default 0.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
scopestringScope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path…

analyze_architecture

Run architecture analysis for a scope or expand one finding. This is read-only and heuristic: treat findings as review candidates. Use after context mapping or when the user asks for smells, risks, duplicated responsibilities, security-sensitive boundaries, frontend state/effect issues, or event boundaries. Empty reports or missing finding detail include emptyDiagnostic with reason and conditional nextActions. Detectors read modules, runtime resources and domains, so all, pkg:, domain:, mod: and resource: scopes are inspected and every other scope kind is refused by name. A mod:/resource: scop…

ParameterTypeDescription
annotationReasoningstringAttach annotation context packets for the agent to judge as verification obligations, not background prose. Default off.
categoriesarrayOptional category filter for report mode. duplicate-like, god-module and authorization-policy-drift each fired on a clean-code counterexample, so they run only when named here.
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
detailFindingIdstringAlias that expands a finding without also passing mode: detail.
findingIdstringFinding id to expand when mode is detail.
includeComponentEntrypointsbooleanFor deep frontend flow-convergence analysis. Default false.
limitintegerMaximum report findings. Default 12, hard maximum 30; narrow scope/categories for more.
maxNodesintegerMax affected node summaries in detail mode. Default 30.
modestringreport returns findings; detail expands a findingId. Default report.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
scopestringScope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path…

get_annotation_status

Report annotation build health: coverage, stale/missing annotation queue, and orphaned annotations. Use before annotation work or when trusting graph notes. The default queue is ONE unified, bottom-up backlog spanning annotatable node types — code modules, templates, services, infra (IaC), and domain roll-ups. Queue sort order: content-stale (staleKind:content) before propagation-stale (staleKind:propagation), then unannotated; within each tier, modules/templates before domain roll-ups and lower dependency depth first. Drain via view:"queue" top pages — do not run propagation-first via der…

ParameterTypeDescription
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
fromstringFor propagation-preview: module node id of the changed upstream module.
includeAllDomainsbooleanFor coverage view, include paged per-domain breakdown. Default false.
includeDomainsbooleanFor propagation-preview: include path-domain ids affected. Default false.
includeLightweightbooleanInclude lightweight domains in anomalies. Default false.
limitintegerMax items to return. Default depends on the tool, usually 10-20.
offsetintegerPagination offset. Default 0.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
scopestringScope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path…
staleKindstringFor queue view: filter to one staleKind. Default queue already ranks content before propagation.
viewstringcoverage; queue (default drain — content-stale before propagation-stale); derived-review (propagation-only filter, not first pass); propagation-preview (requires from); orphans; risk-scope-candidate…

get_annotation_merge_status

Check whether repovine.annots.json exists, is parseable, contains conflict markers, or has an unmerged git index entry. Use before annotation work and after pull/merge/rebase. indexUnmerged marks a file-level conflict (or a hand-resolved file) that carries no markers.

ParameterTypeDescription
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.

merge_annotations

Resolve conflict markers in repovine.annots.json using annotation merge rules. Different node IDs are combined, compatible annotation fields are merged, and ambiguous scalar fields are reported for review. Scalar conflicts add patterns such as merge-review:summary plus [merge-review:…:ours/theirs] assumptions for a later write_annotation rewrite. This writes repovine.annots.json, and snapshots the replaced worktree file under .repovine/annotation-backups/ (named in replacedBackupPath) whenever git index stages are the merge input. dryRun writes neither.

ParameterTypeDescription
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
dryRunbooleanPreview the annotation merge without writing repovine.annots.json. Default false.
fromIndexbooleanMerge the git index stages when the index is unmerged but the file carries no conflict markers (file-level conflict such as a binary/-merge attribute, modify/delete, or an already hand-resolved file).…
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.

validate_annotations

Validate repovine.annots.json against the current graph after annotation-file merge, especially after pull/merge/rebase, or before handoff. Reports conflict markers, parse problems, orphaned notes, content-stale and propagation-stale notes, riskScopeCandidates advisory counts, carrierLinkGaps candidates (runtime 2-hop delegation, minus targets suppressed via decline_advisory kind "carrier-link-gaps"), counts.inconsistent (notes naming something the graph does not have — advisory, does not move status), and annotation queue next actions.

ParameterTypeDescription
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
limitintegerMax items to return. Default depends on the tool, usually 10-20.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
scopeOptional sub-agent scope (e.g. backend, frontend, infra). When set, validation also reports needsWorkInScope and scopedClean for that scope only.

write_annotation

Write or update an annotation for a module, export, template, domain, or service. Shared memory write path after understanding or changing code. Existing fields are merged; send only fields that changed. On a node whose content moved since the note was written, a partial write leaves the note content-stale and names the fields it did not resubmit — resubmit every field to clear it. New notes require annotation.summary; empty updates and obvious secret values are rejected. For code modules, every write snapshots importBaseline (direct import contentHashes) for propagation-stale detection. To…

ParameterTypeDescription
nodeId *stringNode id to annotate.
annotationobjectAnnotation object. New notes must include summary; updates may include only changed fields. Optional: assumptions, sideEffects, risks (string or { text, scope?: "local"|"consumer"|"boundary" }), invar…
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
durablebooleanWhen true, wait for the annotation to be flushed to disk before responding (result.persistence.persisted). Default false: the write is stored in memory and persisted by an 800ms debounced save. Use on…
propagationSliceobjectOptional audit trail for entrypoint-bounded derived review (anchor module, path to entrypoint, reviewedAt ISO timestamp).
refreshImportBaselinebooleanWhen true on an existing annotation, re-snapshot direct import contentHashes to clear propagation-stale. Sent alone it is refused while hard consistency issues exist; sent beside annotation fields it…
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.

refresh_context

Build or refresh the repository syntax index after code changes. Acts as a synchronization barrier. The response reports graph deltas, annotation orphan status, searchTokens (token+annotation index size), semanticSearch ({ status: disabled|up_to_date|updated|failed, embedded?, total?, error? }), which reports status disabled while semantic_search_embeddings is off, and domainsSuggestions ({ count, axes, declinedHidden }) for first-run domains advisor follow-up. annotationMergeKeeps ({ readded, reverted, sample, warning }) appears when the reload kept in-memory notes the file disagreed with —…

ParameterTypeDescription
cleanupOrphansbooleanIf true, remove orphaned annotations after rebuilding. Default false; refresh only reports cleanup navigation.
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
orphanNodeTypestringOrphan cleanup filter, read with cleanupOrphans. The orphan report counts every type. Default all.
reloadConfigbooleanIf true, re-read repovine.config.json, replace the MCP runtime, and rebuild using the new config.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.

suggest_domains_config

Return additive graph-derived suggestions for repovine.domains.json. This tool is read-only: it reports additions, counts, merge strategy, declined-hidden count, a mergedConfig preview (accept = exclude), and, when an infra-noise suggestion is keepable, a keepConfig preview (keep = a committed infra.keep marker that keeps the resource visible and stops the suggestion). Agents should show the diff to the user and only write repovine.domains.json after approval (mergedConfig to accept, keepConfig to keep), then call refresh_context. To skip without committing, call decline_advisory({ "kind": "do…

ParameterTypeDescription
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.

decline_advisory

Record declined advisory items in workspace-local state so they stop resurfacing; the advisory producers stay read-only. kind "domains-config": hide suggestion ids from suggest_domains_config in .repovine/onboarding-state.json; never writes the committed repovine.domains.json. kind "carrier-link-gaps": record reviewed-not-a-gap decisions per consumer-risk SSOT target in .repovine/carrier-review.json; each decision stores a riskHash of the target's consumer-scoped risks — a changed risk set re-surfaces the target; validate_annotations reports suppressedTargets and view:"carrier-gaps" keeps re…

ParameterTypeDescription
kind *stringWhich advisory to decline: domains-config suggestions or carrier-link gap targets.
allbooleanIf true, decline every currently visible item of this kind.
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
idsarrayIds to decline: suggestion ids from suggest_domains_config (domains-config), or consumer-risk SSOT target node ids from the carrier-gaps view (carrier-link-gaps).
reasonstringOptional review note; persisted per target for carrier-link-gaps, ignored for domains-config.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.

get_context_session_quality

Return the deterministic Context Session Quality report for a contextSessionId/sessionId recorded from repovine MCP tool responses. The report is computed from returned tool JSON and shaped response byte volume, not from agent prose. Use before accepting a subagent handoff. overall is an observation, not a graded assessment: shipped weights reduce it to 1 when the session called inspect_node and 0 otherwise, because the former 14-weight score failed its outcome-labelled falsification. acceptHandoff and rejectReasons are advisory in every mode, including harness — they emit warnings and requi…

ParameterTypeDescription
sessionId *stringContext quality session id created by the main agent/harness.
assignmentScopearrayAssignment scope for audit/report context.
byteBudgetintegerOverride shaped-response byte budget for acceptHandoff.
consumebooleanDelete the stored session after returning the report, unless retained. Default false.
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
includeEventsbooleanInclude full per-call metrics/events. Default false.
maxRecoveryAttemptsintegerHarness-owned retry budget to echo in the policy report; repovine does not count retry attempts across assignments.
minAnchorsintegerOverride minimum stable anchors required for acceptHandoff.
modestringEnforcement mode override. Selects warning wording and followups; both modes are advisory until the documented return bar is met.
phasestringPolicy phase override. Default explore.
qualityThresholdnumberOverride minimum overall score for acceptHandoff.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
retainSessionbooleanKeep the stored session even when consume=true. Useful for debug.
warningThresholdnumberOverride soft score threshold for advisory warnings.

get_build_status

Report the current build status of the repository graph. Use when other tools return a `result.status:"building"` payload to discover the current stage, remaining stage count, progress, and recommended retry delay. stageEtaSec estimates only the current stage, not time until ready. Stage 1 reports package/module counts; stage 3 reports semantic search embed card counts when `semantic_search_embeddings` is enabled. Always callable; returns immediately by default. Pass waitSec to long-poll: the call holds server-side and returns the moment the build settles (ready or failed) or the wait expires…

ParameterTypeDescription
cancelbooleanMutating: stop the in-flight startup build. It stops Stage 1 where it stands: every worker thread is asked to shut down and force-terminated after a few seconds' grace, so packages still extracting ar…
contextSessionIdstringContext-quality session id from the harness; pass on every call to score returned context.
responseFormatstringResponse shape override: concise = compact output, debug = full envelope.
waitSecintegerLong-poll: hold the request up to this many seconds, returning early as soon as the build settles. Prefer one waitSec call over repeated polling. Capped at 55s server-side (below the MCP SDK client 60…