ledger AGENTS.md

ledger AGENTS.md is an instructions file for Codex, OpenCode from eternal-roman/ledger. It costs 517 tokens per session, scanned A, original, MIT.

Instructions for using a financial accounting kernel in the Ledger project. The kernel is the part of the system that performs exact money calculations, checks double-entry transactions, and proves ledger invariants.

In plain words
What is it for?
Use it whenever work involves amounts, accounts, recognition, measurement, or risk pricing, including choosing assumptions, citing financial rules, validating entries, and posting them to a ledger.
Why use it?
It prevents agents from using rounded numbers, posting entries whose debits and credits do not match, or claiming audit evidence that was not actually produced.

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/eternal-roman/ledger/agents-md
Clone the repo
git clone --depth 1 https://github.com/eternal-roman/ledger

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/eternal-roman/ledger/agents-md.svg)](https://agentmods.dev/instructions/eternal-roman/ledger/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/eternal-roman/ledger/agents-md"><img src="https://agentmods.dev/badge/instructions/eternal-roman/ledger/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 517 This file is loaded in full into every session.
When invoked 517 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.00517 $0.00517
Opus 5 $0.00259 $0.00259
Sonnet 5 $0.00103 $0.00103
Haiku 4.5 $0.00052 $0.00052

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

Security

Grade A, and why

ledger 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 · 51 lines

How it starts

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

Ledger

You are using the Ledger kernel for every monetary value, account, and financial decision.

Do not compute money in tokens. Do not use native floats. Do not post unbalanced entries.

The executable truth is Money.from, JournalEntry, validateEntry, Ledger.apply. Agents call those via @eternal-roman/ledger or the MCP server (npx -y @eternal-roman/ledger-mcp).

Zero-Skip

  1. Touches value, accounts, recognition, measurement, or risk pricing?
  2. Expressible with the immutable kernel?
  3. Canon fact governs it? Cite it.
  4. Deterministic and reproducible?
  5. Invariants proven with validateEntry + Ledger?

See docs/CORE-PROTOCOL.md.

Non-negotiable

  • Every amount: Money.from(...) or MCP money_compute. Never number / parseFloat.
  • Every movement: JournalEntryvalidateEntryLedger.apply (or entry_validate / ledger_post).
  • Debits equal credits per currency. The accounting equation holds.
  • Assumptions, rates, jurisdiction, and policy are explicit and cited.
  • auditHash is a digest a kernel call actually returned. Do not invent one.

Output contract

Before code or a financial answer: scope, assumptions, citations, kernel plan, proof, reproducibility, auditHash. Then the result.

Commands (when the host loads this plugin)

  • /ledger-verify — this change: floats, balance, citations
  • /ledger-audit — whole-repo monetary hygiene
  • /ledger-review — kernel + any host review layers
  • /ledger-cite — IFRS/GAAP fact from the graph
  • /ledger-reconcile — assumptions → validated entries
  • /ledger-sim — seeded scenario with a full trace

Standalone: npx ledger-verify --scan .

MCP (preferred for agents)

Read ledger://canon/rules, then ledger://canon/workflow. Catalog: ledger://tools/catalog.

Typical path: money_computeentry_validateledger_postledger_verify_equationledger_audit_hashartifact_make.

Boundaries

Ledger governs financial value and structure. It is not advice. The MIT LICENSE and the README disclaimer apply. Developing this repository: CONTRIBUTING.md.

Read the full file on GitHub · 51 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 · 51 lines · 517 tokens per session scan A 0b6b1730df1e

Subscribe to this mod's changes

ledger AGENTS.md is an instructions file published in the GitHub repository eternal-roman/ledger (1 stars, last pushed yesterday), licensed MIT. It adds 517 tokens to every session, about $0.0026 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.

Related

Other instructions, from other repositories

bukio-cli AGENTS.md

AGENTS.md instructions for erikvankempen/bukio-cli, covering agents.md — bukio-cli agent manual, 1. house rules (non-negotiable), 2. environment, 3. command quick reference and 3.1 jurisdiction profiles (16 markets).

erikvankempen/bukio-cli · 24,515 tokens

noxctl CLAUDE.md

Claude Code instructions for Magnus-Gille/noxctl, covering claude.md — noxctl, what is this?, cli-first in claude code, reading data and dry run first.

Magnus-Gille/noxctl · 698 tokens

counterpoise-ledger CLAUDE.md

Instructions for jeffjjohnston/counterpoise-ledger, covering claude.md, project overview, development commands, essential commands and testing.

jeffjjohnston/counterpoise-ledger · 22,175 tokens

lexware-office-mcp CLAUDE.md

Claude Code instructions for benethos-hub/lexware-office-mcp, covering working guidelines for claude, golden rules, environment, project layout and how to add or change a tool.

benethos-hub/lexware-office-mcp · 4,280 tokens

ai-accounting-skills CLAUDE.md

Instructions for cynco-labs/ai-accounting-skills, covering claude for accounting — repo guide for agents, first principles (read these), when working in this repo, plugin map → engagement flow and layout.

cynco-labs/ai-accounting-skills · 1,056 tokens

dubbl CLAUDE.md

Instructions for dubbl-org/dubbl, a project described as: A full-featured, open-source alternative to Xero and QuickBooks. It is API-first, developer-friendly, and built for teams that want full control over their financial data.

dubbl-org/dubbl · 3 tokens