Episteme AGENTS.md

Episteme AGENTS.md is an instructions file for Codex, OpenCode from epicsagas/Episteme. It costs 2,402 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Episteme, a Rust command-line tool for searching and analyzing code through a knowledge graph. A knowledge graph stores connected facts, while the tool also detects code problems and ranks refactoring ideas.

In plain words
What is it for?
Use them when building, testing, formatting, linting, running, or editing Episteme and its analysis, search, graph, indexing, and refactoring components.
Why use it?
They give a coding agent the commands, source layout, and design boundaries needed to make changes without mixing business logic with infrastructure code.

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/epicsagas/episteme/agents-md
Clone the repo
git clone --depth 1 https://github.com/epicsagas/Episteme

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 Episteme AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/epicsagas/episteme/agents-md.svg)](https://agentmods.dev/instructions/epicsagas/episteme/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/epicsagas/episteme/agents-md"><img src="https://agentmods.dev/badge/instructions/epicsagas/episteme/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,402 This file is loaded in full into every session.
When invoked 2,402 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 $0.02402 $0.02402
Opus 5 $0.01201 $0.01201
Sonnet 5 $0.00480 $0.00480
Haiku 4.5 $0.00240 $0.00240

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

Security

Grade A, and why

Episteme AGENTS.md 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 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.

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.

AGENTS.md · 112 lines

How it starts

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

AGENTS.md

Commands

  • Build: cargo build | Build (release): cargo build --release
  • Test: cargo test | Test single: cargo test <test_name> | Test module: cargo test --lib <module>::tests
  • Lint: cargo clippy -- -D warnings | Format: cargo fmt | Run: cargo run -- <subcommand>
  • Gen/Sync: N/A

Project Structure

  • src/main.rs — CLI entry point (clap derive, 13 subcommands)
  • src/lib.rs — Library root, re-exports primary types
  • src/cli.rs — Clap command enum definitions
  • src/commands/ — CLI subcommand handlers: analysis, build, search, graph, install, service, other
  • src/domain/ — Business logic (no external deps): graph (KnowledgeGraph, BFS, inverse relation derivation), detectors (16 smell detectors), engine (RefactoringRanker), inference, summarizer, problem_mapper, types (Entity, EntityType, RelationType, SmellType), metrics (CodeMetrics, SmellDetection)
  • src/ports/ — Traits (hexagonal boundaries): parser (CodeParser), search (SearchIndex), graph (GraphRepository), embeddings (EmbeddingProvider)
  • src/adapters/ — Infrastructure: regex_parsers (GenericParser, 10 langs), python_ast_parser (rustpython-parser), search_engines (FTS5 + cosine), sqlite_db, cache, local_embeddings (fastembed/ONNX), openai_embeddings, service (MCP HTTP daemon), installer (Transport enum, upsert_dir, multi-tool seeding), install_wizard (TUI transport selection), config, metrics, telemetry, paths, hooks, json_loader, constants, error, rate_limiter, structured_logging, chunker, builder, rate_limiter_mw
  • src/server/ — HTTP layer (axum): api_routes (REST endpoints), api_server, api_app, api_middleware, api_models, mcp_handler (MCP facade), mcp_dispatcher, mcp_search, mcp_graph, mcp_analysis, mcp_schemas, mcp_transport_http, mcp_auth, web_viewer (D3-force graph UI)
  • raw/ — Knowledge base source data: code-smells/, design-patterns/, refactoring/, software-engineering/
  • meta/ — Generated metadata: relations.json (solves is SSOT; solved_by derived at load time), taxonomy.json, schema.json, code_smells.json
  • registry/ — Seedable artifacts: agents/ (4 AI agent definitions), skills/episteme/ (skill definition)
  • docs/ — User documentation: api.md, mcp-integration-guide.md, distribution.md, alcove-integration.md
  • benchmarks/ — Search quality benchmarks and evaluation
  • monitoring/ — Prometheus + Grafana + Alertmanager config
  • db/ — Pre-built SQLite database (episteme.db)
  • dist/ — Release packaging artifacts

Read the full file on GitHub · 112 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 · 112 lines · 2,402 tokens per session scan A fee9366d01e5

Subscribe to this mod's changes

Episteme AGENTS.md is an instructions file published in the GitHub repository epicsagas/Episteme (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 2,402 tokens to every session, about $0.0120 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.