compendio-mcp: Instructions file for Codex

AGENTS.md

compendio-mcp AGENTS.md is an instructions file for Codex, OpenCode from RuloGB/compendio-mcp. It costs 4,076 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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is RuloGB/compendio-mcp's own configuration. It tells Codex and OpenCode how to work on compendio-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything compendio-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to RuloGB/compendio-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/RuloGB/compendio-mcp/main/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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for compendio-mcp AGENTS.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,076 This file is loaded in full into every session.
When invoked 4,076 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.04076 $0.04076
Opus 5.5 $0.01630 $0.01630
Sonnet 5.5 $0.00815 $0.00815
Haiku 4.5 $0.00408 $0.00408

Measured 1mo ago against content hash d6c3a08cc2d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

- **DO NOT CHANGE: `cli.ts`'s entry-point guard uses `realpathSync`, not `realpathSync.native`** — `.native` breaks it on Windows 8.3 paths (exit 0, empty stdout). `test/cli-subprocess.test.ts` — [more](docs/design-decis
AGENTS.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 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.

Keeping this file small. This file is loaded into every agent session, so it holds only what an agent must know before touching code and cannot deduce from reading it — one line per item, with a pointer to where the detail lives (file + symbol, never a line number — those go stale). Measurements, manual gates, before/after tables and history go to docs/ (docs/manual-gates.md, docs/design-decisions.md, docs/release-and-registry.md) or to the change's openspec/ artifacts. Rationale that belongs to one piece of code goes in a comment next to that code. Do not repeat here what a code comment or a test already states.

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 gates (progress-bar smoke test, vector reach, fence handling, excerpt anchoring, chunk bound, word boundaries): procedures, expected numbers and RED verifications in docs/manual-gates.md. Always run node dist/cli.js, never a bare compendio (that resolves to the global npm install).
  • Releases and the MCP registry (mcpName, namespace case, server.json, mcp-publisher): docs/release-and-registry.md.

Read the full file on GitHub · 120 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. 1mo ago Changed · +81 tokens per session d6c3a08cc2d2
  2. 1mo ago Changed · -462 lines · -12,600 tokens per session 2c979e78eede
  3. 1mo ago Changed · +31 lines · +609 tokens per session 6f0168b02e8d
  4. 1mo ago Changed · +164 lines · +3,948 tokens per session b033c77f7958
  5. 1mo 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 (5 stars, last pushed 1mo ago), licensed MIT. It adds 4,076 tokens to every session, about $0.0163 per session on Opus 5.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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens