compendio-mcp AGENTS.md

compendio-mcp AGENTS.md is an instructions file for Codex, OpenCode from RuloGB/compendio-mcp. It costs 12,038 tokens per session, scanned A, original, MIT.

Repository instructions for Compendio, a local search system that indexes project Markdown files for AI assistants. It combines text search and locally generated meaning-based search in a SQLite database.

In plain words
What is it for?
Maintaining Compendio, indexing documentation, searching a project knowledge base, and checking search quality.
Why use it?
They explain how to build, test, run, and query the documentation index without relying on network access during searches.

Instructions file for CodexOpenCode

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 instructions/rulogb/compendio-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/RuloGB/compendio-mcp

Made for: Codex, OpenCode.

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 compendio-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/rulogb/compendio-mcp/agents-md.svg)](https://agentmods.dev/instructions/rulogb/compendio-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/rulogb/compendio-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/rulogb/compendio-mcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 12,038 This file is loaded in full into every session.
When invoked 12,038 The same file — it is already loaded in full.
Security scan A 1 finding. 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 $0.12038 $0.12038
Opus 5 $0.06019 $0.06019
Sonnet 5 $0.02408 $0.02408
Haiku 4.5 $0.01204 $0.01204

Measured 4d ago against content hash 644ed8348f83, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

compendio-mcp AGENTS.md scanned grade A with 1 finding 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 4d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

the link discards the 8.3 prefix with it. Pinned by `test/cli-subprocess.test.ts`'s "invoked
AGENTS.md · 387 lines

How it starts

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

AGENTS.md

This file provides guidance to working with code in this repository.

What this is

Compendio is an MCP server that indexes a project's markdown documentation and exposes it to AI agents through local hybrid search (BM25/FTS5 + embeddings via RRF fusion). Everything runs locally: one SQLite file, embeddings on CPU (transformers.js), zero network calls at query time.

Commands

npm run build            # compiles to dist/ (tsc)
npm test                 # vitest run — full suite
npm run test:watch       # vitest watch mode
npx vitest run test/domain/chunking.test.ts   # single file
npx vitest run -t "name of the test"          # single test by name
npm run typecheck        # tsc --noEmit
npm run dev -- <args>    # run the CLI without compiling (tsx src/cli.ts)

There is no lint script configured.

Manual smoke test against the example corpus:

node dist/cli.js --root ejemplos index
node dist/cli.js --root ejemplos eval
node dist/cli.js --root ejemplos search "¿cuándo se considera duplicado un lead?"

Manual smoke test for index progress reporting (not automatable in CI: a real cold download is ~129 MB). Run node dist/cli.js, not compendio — the bare name resolves to whatever is installed globally from npm, which is how a change like this gets reported as "not working" while being perfectly fine in dist/. Clear the transformers.js model cache (node_modules/@huggingface/transformers/.cache, ~130 MB), then in an interactive terminal:

node dist/cli.js --root ejemplos index
COMPENDIO_PROGRESS=bar node dist/cli.js --root ejemplos index 2>frames.txt
COMPENDIO_PROGRESS=none node dist/cli.js --root ejemplos index

What to expect (measured, not assumed — see timing-measurement.md's addendum in the archived change):

  • Cold cache: the bar tracks the download live, climbing 4% → 100% with the elapsed counter advancing. This is the case the feature exists for. Observed: 20 frames, 1 681 bytes on stderr.
  • Warm cache: the run still crosses BAR_MIN_ELAPSED_MS (1 500 ms) and draws, but few framesonnxruntime-node blocks Node's main thread for the whole of each inference call, so the repaint heartbeat only fires during network download and in the gaps between batches, never during inference itself. A near-empty frames.txt on a warm one-batch corpus is expected, not a regression.
  • COMPENDIO_PROGRESS=none: stderr carries no progress output. stdout is byte-identical in every mode apart from the run-duration figure.

Read the full file on GitHub · 387 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. 4d ago First seen · 387 lines · 12,038 tokens per session scan A 644ed8348f83

Subscribe to this mod's changes

compendio-mcp AGENTS.md is an instructions file published in the GitHub repository RuloGB/compendio-mcp (3 stars, last pushed 5d ago), licensed MIT. It adds 12,038 tokens to every session, about $0.0602 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.