codument: Instructions file for Codex

AGENTS.md

codument AGENTS.md is an instructions file for Codex, OpenCode from jakubsuplicki/codument. It costs 5,715 tokens per session, scanned A, original, Apache-2.0.

The main project guide for Codument, a tool that helps AI coding agents manage work through plans, tests, documentation, and reviews. It is the shared contract for agents working on the project.

In plain words
What is it for?
Use it when developing Codument itself. It defines the work cycle, required build and test commands, project folders, and rules such as getting an approved plan before editing source code.
Why use it?
It keeps work traceable across sessions by treating project documents as the lasting record instead of relying only on chat history.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/jakubsuplicki/codument/agents-md"><img src="https://agentmods.dev/badge/instructions/jakubsuplicki/codument/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,715 This file is loaded in full into every session.
When invoked 5,715 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.05715 $0.05715
Opus 5.5 $0.02286 $0.02286
Sonnet 5.5 $0.01143 $0.01143
Haiku 4.5 $0.00571 $0.00571

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

Security

Grade A, and why

codument 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 23d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 189 lines

How it starts

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

Codument Agent Guide

This is the canonical cross-agent guide for working on Codument. CLAUDE.md may exist for Claude-specific tooling, but this file is the shared contract.

Product Direction

Codument is a docs-backed delivery workflow for AI coding agents. The core loop is:

grill -> plan -> approve -> implement -> verify -> document -> review -> commit -> repeat

Do not treat docs as an afterthought. The docs are the control plane that lets an agent resume work without relying on chat history.

Build & Test

npm run typecheck
npm run build
npm test

Project Structure

  • src/commands/ — CLI commands (init, scan, update)
  • src/lib/ — Core libraries for profiles, registry, scaffolding, detection, codemods, markers, and versioning
  • src/hooks/ — Claude profile hook script
  • skills/ — Workflow skills shipped with the package
  • agents/ — Claude profile subagent definitions
  • rules/ — Claude profile path-scoped rule templates
  • templates/ — Documentation templates copied on init
  • tests/ — Node test runner tests

Working Rules

  • Use the approved feature plan before source edits.
  • Keep implementation slices small enough to review and commit independently.
  • Ground the affected paths once with codument context --paths <paths...> and refresh when routing changes. Use --owner for lean answers; the staged boundary checks every affected owner. Read docs/.registry.json when editing or inspecting the map itself.
  • Update mapped docs as part of the same change.
  • Keep docs compact and durable; do not preserve working chatter.
  • Use conventional commit prefixes.

Codument Delivery Workflow

Core loop

Use Codument as the durable control plane for agent-led engineering work:

  1. Grill the request against existing docs, code, ADRs, and project language.
  2. Plan the feature in docs before changing source code.
  3. Wait for explicit user approval before implementation.
  4. Implement one planned step at a time.
  5. Build the strongest practical feedback loop, preferring red-green-refactor when it fits.
  6. Update the mapped docs + docs/.registry.json as part of the same step: register new sources together with codument map materialize <files...>; when a contract changed, update its doc at intent altitude (a move that changed no contract owes nothing at all — the gate reports it and never blocks, so there is no signature to write). Never a junk mirror edit to clear the gate.
  7. Review the diff against the approved plan, tests, docs, and architecture.
  8. Commit focused work with a conventional commit, authored as the user with no AI Co-Authored-By trailer.
  9. Move to the next unchecked step.

Read the full file on GitHub · 189 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. 23d ago Changed · +3 lines · +363 tokens per session 0e0953781dba
  2. 1mo ago Changed · +2 lines · +78 tokens per session 451f913ff954
  3. 1mo ago Changed · +7 lines · +282 tokens per session 35be55cb059b
  4. 1mo ago First seen · 177 lines · 4,992 tokens per session scan A 0622f76d8649

Subscribe to this mod's changes

codument AGENTS.md is an instructions file published in the GitHub repository jakubsuplicki/codument (48 stars, last pushed 23d ago), licensed Apache-2.0. It adds 5,715 tokens to every session, about $0.0229 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-30.

Related

Other instructions, from other repositories