Episteme: Instructions file for Codex

AGENTS.md

Episteme AGENTS.md is an instructions file for Codex, OpenCode from epicsagas/Episteme. It costs 2,723 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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions .claude-plugin; mentions AGENTS.md; mentions Codex.

This is epicsagas/Episteme's own configuration. It tells Codex and OpenCode how to work on Episteme 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 Episteme configures →

Reuse

Borrowing it

Nothing to install: this file belongs to epicsagas/Episteme. 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/epicsagas/Episteme/main/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/github.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/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 Episteme AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/epicsagas/episteme/agents-md"><img src="https://agentmods.dev/badge/instructions/epicsagas/episteme/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,723 This file is loaded in full into every session.
When invoked 2,723 The same file — it is already loaded in full.
Security scan A 0 findings. 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.02723 $0.02723
Opus 5.5 $0.01089 $0.01089
Sonnet 5.5 $0.00545 $0.00545
Haiku 4.5 $0.00272 $0.00272

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

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 · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 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 · 119 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 · +7 lines · +321 tokens per session 4eea131ee688
  2. 1mo 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 (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 2,723 tokens to every session, about $0.0109 per session on Opus 5.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.

Related

Other instructions, from other repositories