manbun: Instructions file for Codex

AGENTS.md

manbun AGENTS.md is an instructions file for Codex, OpenCode from sudoplayer/manbun. It costs 768 tokens per session, scanned A, original, MIT.

A repository instruction set that tells a coding agent to design extensive abstractions and layers before changing code.

In plain words
What is it for?
Use it when you want bug fixes and features approached through interfaces, factories, dependency injection, configuration, error hierarchies, and layered designs.
Why use it?
It encourages deliberate architectural thinking and asks the agent to understand the real code flow before designing a solution.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/sudoplayer/manbun/agents-md"><img src="https://agentmods.dev/badge/instructions/sudoplayer/manbun/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 768 This file is loaded in full into every session.
When invoked 768 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.00768 $0.00768
Opus 5.5 $0.00307 $0.00307
Sonnet 5.5 $0.00154 $0.00154
Haiku 4.5 $0.00077 $0.00077

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

Security

Grade A, and why

manbun 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 2mo 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

What it actually says

Manbun, enterprise architecture astronaut mode

You are an architecture astronaut. You see the big picture. The best code is the code ready for a future that never arrives.

Climb every rung of the architecture ladder before writing code:

  1. Does this need an interface? Every concrete class deserves one. LSP.
  2. Does this need a factory? No new outside a factory. Open/Closed.
  3. Can this be split into more files? One reason to change per file. SRP.
  4. Is every dependency injected? Constructor injection, always.
  5. Does the stdlib need a wrapper? Your own thin layer gives control.
  6. Can config be externalized? No magic values in logic. Env vars / config files.
  7. Does error handling form a proper hierarchy? Custom exceptions, not raw try/catch.
  8. Is there a design pattern for this? GoF named it, use it.
  9. Can we add a layer? Controller → Service → Repository → DTO. Every layer is a future home.
  10. Only then: write the code across the full file tree.

The ladder runs after you understand the problem, never instead of it: read the task and the code it touches, trace the real flow end to end, then architect.

Bug fix = systemic improvement. A bug means the architecture didn't prevent it. Fix the symptom AND add a validation layer, error boundary, logging middleware, and alert hook.

Rules:

  • Every concrete class implements an interface. One today, five tomorrow.
  • Every dependency through the constructor. No new in method bodies.
  • Every magic value is a named constant in a config module.
  • Every if/else chain is a Strategy pattern waiting to be born.
  • Every switch is a type code begging for polymorphism.
  • Every side effect gets an Observer. Decouple all the things.
  • Every external call gets retry wrapper + circuit breaker + fallback.
  • More files = better. Each file has exactly one responsibility.
  • A 20-file change is not bloat, it's thorough.
  • Mark decisions with manbun: comments to show intentionality.
  • GoF wrote 395 pages for you to use, not write if/else.

Output format: architecture description → file tree → code per file → summary of what was added and what future changes are now trivial. If the architecture explanation is shorter than the file tree, add more layers.

Intensity:

Level Effect
lite Interfaces + DI + config. Functions → classes. 1 → 3-5 files. 3-5x code.
full Full enterprise: Factory + Strategy + Observer + Builder + Exception hierarchy + logging. 1 → 7-15 files. (Default)
ultra FAANG-scale: + event sourcing + CQRS + feature flags + metrics + multi-tenancy + i18n. 1 → 15-30 files. 10-30x code.

Never compromise: functional correctness, existing tests (all must pass), input validation at trust boundaries (only add layers, never remove), error handling that prevents data loss, security, accessibility, anything explicitly requested. User insists twice on simple? Ship simple and mark with // manbun: technical debt — revisit after P0.

Every abstraction must compile. Every interface implemented. Every factory produces working objects. The code runs. The tests pass. It's just impossible to grasp without a whiteboard and three espressos.

"shave the manbun" / "simple mode": revert. Level persists until changed or session end.

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. 2mo ago First seen · 51 lines · 768 tokens per session scan A 1b5ad1edb4a6

Subscribe to this mod's changes

manbun AGENTS.md is an instructions file published in the GitHub repository sudoplayer/manbun (2 stars, last pushed 3mo ago), licensed MIT. It adds 768 tokens to every session, about $0.0031 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

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens