mandible AGENTS.md

mandible AGENTS.md is an instructions file for Codex, OpenCode from AS-FOSS/mandible. It costs 4,741 tokens per session, scanned A, original, Apache-2.0.

Repository working agreements for Mandible, a tool that extracts information from developer tools without hard-coded rules for each tool. They define the project's core design rule, architecture boundaries, and verification approach.

In plain words
What is it for?
Making architecture-compliant changes, locating user-specific overrides, and checking behavior beyond merely seeing that automated tests pass.
Why use it?
They prevent tool-specific exceptions from spreading through the code and explain which document takes priority when design rules conflict.

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/as-foss/mandible/agents-md
Clone the repo
git clone --depth 1 https://github.com/AS-FOSS/mandible

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/as-foss/mandible/agents-md.svg)](https://agentmods.dev/instructions/as-foss/mandible/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/as-foss/mandible/agents-md"><img src="https://agentmods.dev/badge/instructions/as-foss/mandible/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,741 This file is loaded in full into every session.
When invoked 4,741 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.04741 $0.04741
Opus 5 $0.02371 $0.02371
Sonnet 5 $0.00948 $0.00948
Haiku 4.5 $0.00474 $0.00474

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

Security

Grade A, and why

mandible 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 today.

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

How it starts

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

AGENTS.md — working agreements for AI agents in this repo

Read this before touching code. Every rule a script can check is a pointer to that script. What is left is prose, because no lint can catch it.

Precedence: docs/design.md is the design authority, so it says what to build and why. This file is the operational authority, so it says how to work here. CONTRIBUTING.md is for humans. If this file and docs/design.md disagree about design, docs/design.md wins and you should fix this file.


1. The invariant that defines the project

No per-tool logic, ever. No if tool == "docker", no tool-name-keyed special case in any extraction tier, no per-tool patch file vendored into this repo.

Tool-specific knowledge lives in exactly one place: user-local override files under ~/.config/mandible/overrides/, which are never committed here. (Spec revision 3 deleted the vendored catalog that used to be the second place — a per-tool catalog is per-tool knowledge relocated into data, and it cannot stay current with the tool actually installed. Parsing is keyed by framework now: see spec §7 Tier A′ and mandible-extract/src/help_text/profile.rs, where adding a framework is one match arm plus one fingerprint.)

If a tool renders badly, the fix is a better general parser, a new general tier, or an honest low-confidence badge in the UI. It is never a special case. This is the entire reason the tiered architecture exists; one exception starts the erosion that the architecture was built to prevent.


2. Hard limits

Every number here is enforced, and none of them is a law of nature. Changing one is a decision, and a decision goes in docs/design.md §16.

Limit Number Enforced by
Code lines in a .rs file before mod tests 800 scripts/shape_guard.sh
Lines in a function 150 clippy.toml, clippy::too_many_lines
Cognitive complexity of a function 30 clippy.toml, clippy::cognitive_complexity
Lines in one comment block 12 scripts/shape_guard.sh
Comment lines over code lines in a file 0.5 scripts/shape_guard.sh
Tools a new parser heuristic must move 5 xtask sweep-diff, read by a human

Read the full file on GitHub · 361 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. today Changed · -100 lines · -3,186 tokens per session scan B → A e96e1d2a64ae
  2. 5d ago First seen · 461 lines · 7,927 tokens per session scan B 6eab7ac79a3d

Subscribe to this mod's changes

mandible AGENTS.md is an instructions file published in the GitHub repository AS-FOSS/mandible (141 stars, last pushed today), licensed Apache-2.0. It adds 4,741 tokens to every session, about $0.0237 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-30.