repovine-policy

repovine-policy is a cursor rule for Cursor from legann/repovine. It costs 1,950 tokens per session, scanned A, original, MIT.

A set of working rules for coding agents that use MCP, a tool interface for finding repository context, before reading files and add notes after changing code.

In plain words
What is it for?
It guides context searches, navigation, response sizing, and annotations for changed modules. It also covers how to handle truncated results and context-quality checks.
Why use it?
It helps agents find the right code first and keep the repository’s shared knowledge current after edits.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/legann/repovine/repovine-policy
Clone the repo
git clone --depth 1 https://github.com/legann/repovine

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for repovine-policy

README.md
[![agentmods](https://agentmods.dev/badge/rules/legann/repovine/repovine-policy.svg)](https://agentmods.dev/rules/legann/repovine/repovine-policy)
Your own site
<a href="https://agentmods.dev/rules/legann/repovine/repovine-policy"><img src="https://agentmods.dev/badge/rules/legann/repovine/repovine-policy.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,950 This file is loaded in full into every session.
When invoked 1,950 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01950 $0.01950
Opus 5 $0.00975 $0.00975
Sonnet 5 $0.00390 $0.00390
Haiku 4.5 $0.00195 $0.00195

Measured 5d ago against content hash 64d0229c0d16, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

repovine-policy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/repovine-policy.mdc · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

repovine -- Core Policy

Rule 1: Call MCP before reading files

First action on any non-trivial task: call MCP.

Use search_context when the target is fuzzy, or map_context when the user names a domain/package/module. Follow navigation suggestions when the response includes them. Skip only for trivial single-file edits.

All MCP tools accept responseFormat: "concise" | "debug". Prefer concise; use debug only for full payloads. Concise navigation may return refs like "$3x9a1". The server keeps the 500 most recently issued and drops the oldest beyond that, so reuse a ref while it is recent, or expand it from refs — a dropped ref is passed through as the literal $… and fails to resolve. For context-quality runs, pass the provided contextSessionId on repovine calls and inspect with get_context_session_quality.

A capped answer carries a truncation block beside what it bounded, keyed by the bounded field: shown/total on the scale named by unit, and more saying how to reach the rest — page (pass the named offset arg), arg (pass the named argument, when the tool declares it), narrow (ask a narrower question), inline (the rest is elsewhere in this same response), unavailable (no call returns it). Fixed-size shaping is not uniform: attention records its three-item preview as truncation.attention with more.kind: "inline", while each navigation section keeps its first 4 entries without a bound and a row preview such as context.topExports keeps its first 10 next to its own count (context.exportCount). Treating a bounded or fixed-preview list as the whole set is the failure these signals prevent; unavailable is the one case where no call returns the omitted items.

If the call fails with a connection error, the MCP server is not running. Tell the user and do not fall back to blind file reading.

If the response is a successful envelope with result.status:"building" (not an error), the MCP server is up but the graph is still being built. stageEtaSec estimates only the current stage, not time until ready. Call get_build_status({ "waitSec": 45 }) once to long-poll instead of repeated calls; respect retryAfterSec. If the long-poll still returns building, report stage and remainingStages, then fall back to direct file reads for this turn when the task can proceed without graph structure. get_build_status({ "cancel": true }) abandons a cold build; it returns cancelled (no graph) or keeps a prior ready graph. A cancelled server has no graph to serve, so every other tool reports an error carrying the recovery action: call refresh_context to start a fresh build, or run repovine build and restart the server.

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 71 lines · 1,950 tokens per session scan A 64d0229c0d16

Subscribe to this mod's changes

repovine-policy is a cursor rule published in the GitHub repository legann/repovine (0 stars, last pushed 1mo ago), licensed MIT. It adds 1,950 tokens to every session, about $0.0097 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.