corpus-kb: Instructions file for Codex

AGENTS.md

corpus-kb AGENTS.md is an instructions file for Codex, OpenCode from moliver28/corpus-kb. It costs 3,940 tokens per session, scanned A, original, MIT.

Project instructions for corpus-kb, including its repository layout, quick reference, installation method, and the directory from which commands must be run. A knowledge base is an organised collection of information for later search or use.

In plain words
What is it for?
Installing, navigating, and running commands in the corpus-kb project.
Why use it?
They reduce mistakes caused by working from the wrong directory or overlooking the repository's required structure.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to moliver28/corpus-kb. 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/moliver28/corpus-kb/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/moliver28/corpus-kb

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 corpus-kb AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/moliver28/corpus-kb/agents-md/github.svg)](https://agentmods.dev/instructions/moliver28/corpus-kb/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/moliver28/corpus-kb/agents-md"><img src="https://agentmods.dev/badge/instructions/moliver28/corpus-kb/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 corpus-kb AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/moliver28/corpus-kb/agents-md"><img src="https://agentmods.dev/badge/instructions/moliver28/corpus-kb/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,940 This file is loaded in full into every session.
When invoked 3,940 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.03940 $0.03940
Opus 5.5 $0.01576 $0.01576
Sonnet 5.5 $0.00788 $0.00788
Haiku 4.5 $0.00394 $0.00394

Measured 2d ago against content hash 1c7164df169b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

corpus-kb 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 2d 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 · 153 lines

How it starts

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

Corpus-KB Agent Instructions

Repository Layout (read first)

Single source tree; all new code goes in src/corpus_kb/. Commands below run from the repo root.

  • src/corpus_kb/ — active Python package (packaged default config at src/corpus_kb/config.yaml)
  • tests/ — root-level pytest suite
  • config.yaml — root runtime config
  • src/corpus_kb/migrations/ — idempotent SQL migrations
  • scripts/ — backward-compat shims
  • src/corpus_kb/_setup/ — installer, migration runner, config validator
  • ui_src/ — TypeScript SPA source (React 19 + antd 6, pnpm)
  • src/corpus_kb/ui_dist/ — built SPA assets served at /app/

Quick Reference

pip install -e ".[dev]"                          # install (editable)
ruff check src/ tests/                           # lint (ruff — NOT flake8/black)
ruff format --check src/ tests/
pyright src/                                     # type-check (pyright — NOT mypy; basic mode per pyrightconfig.json)
python src/corpus_kb/_setup/validate_configs.py  # validate MCP configs pre-push
python scripts/schema_parity_gate.py             # schema parity, both migration sets (sqlglot, static; poe schema-parity)
python src/corpus_kb/_setup/validate_profiles.py # profile gate: schema + strategy/template/seeds cross-refs (poe validate-profiles)
python -m pytest tests/ -v --tb=short --durations=10   # tests (Ollama up, nomic-embed-text pulled)
pytest --cov=corpus_kb --cov-report=term-missing      # coverage

CLI

corpus-kb → corpus_kb.cli:app:

corpus-kb setup --dry-run   # preview (docker compose, database, migrations, models)
corpus-kb setup             # apply
corpus-kb doctor            # read-only diagnostics
corpus-kb start --transport http --port 8010

Old scripts/install.py is a deprecation shim delegating to corpus_kb._setup.install.

Toolchain

Build: setuptools (not hatch/poetry), packages in src/. Lint/type-check tools: see Quick Reference.

CI (.github/workflows/ci.yml)

Gate order: lint (ruff check src/ tests/, no deps) → type-check (pyright src/, project deps installed) → validate-configs (command above) → test (ubuntu/windows/macos: Ollama + python -m pytest tests/ from repo root).

Read the full file on GitHub · 153 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. 2d ago Changed · +43 tokens per session 1c7164df169b
  2. 4d ago Changed · +2 lines · +121 tokens per session fc9b5ff801fe
  3. 6d ago Changed · +135 tokens per session 5ce5cfa5fc49
  4. 7d ago Changed · +60 tokens per session 495b9b5ca08b
  5. 9d ago Changed · +1 lines · +145 tokens per session cb29bbba4465
  6. 10d ago Changed · +4 lines · +204 tokens per session 067a2cada506
  7. 12d ago Changed · -69 lines · -1,002 tokens per session scan C → A d8e477bede50
  8. 13d ago Changed · +3 lines · +33 tokens per session 76549a85f9da
  9. 14d ago Changed · +3 lines · +108 tokens per session 977aa2baa531
  10. 19d ago First seen · 209 lines · 4,093 tokens per session scan C e74f62acee0c

Subscribe to this mod's changes

corpus-kb AGENTS.md is an instructions file published in the GitHub repository moliver28/corpus-kb (1 stars, last pushed today), licensed MIT. It adds 3,940 tokens to every session, about $0.0158 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

corpus-kb AGENTS.md compared with instructions from other repositories

corpus-kb AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
corpus-kb AGENTS.mdmoliver28/corpus-kbInstructions file1todayMITA3,940Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode