ai-format: Instructions file for Codex

AGENTS.md

ai-format AGENTS.md is an instructions file for Codex, OpenCode from CoderBhoid/ai-format. It costs 602 tokens per session, scanned A, original, MIT.

Repository instructions for keeping an agent's working memory across tasks and interruptions. They require recalling saved project context, recording temporary notes, and synchronising notes with delegated agents.

In plain words
What is it for?
They guide session startup, scratch-note creation before substantial work, and recording results after another agent finishes.
Why use it?
They reduce lost context when work is interrupted or passed between agents. They also make memory checkpoints a required part of multi-file work and delegation.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 ai-format AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/coderbhoid/ai-format/agents-md"><img src="https://agentmods.dev/badge/instructions/coderbhoid/ai-format/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 602 This file is loaded in full into every session.
When invoked 602 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.00602 $0.00602
Opus 5.5 $0.00241 $0.00241
Sonnet 5.5 $0.00120 $0.00120
Haiku 4.5 $0.00060 $0.00060

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

Security

Grade A, and why

ai-format 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 10d 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 · 38 lines

How it starts

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

AIF V4 Cognitive Memory & Synaptic Bridge

Mandatory Cognitive Persistence Invariant

This invariant governs cognitive memory lifecycle across ALL execution harnesses, workflows, and subagent delegates (including poteto-mode, agystack, autonomous swarms, and coordinator sessions).

Subagent delegation (such as poteto-agent or research) does NOT waive this invariant. The coordinator MUST execute the boot recall and scratch checkpoints before spawning subagents, and MUST commit turn notes upon receiving subagent results.

1. Chat Boot Recall (Mandatory on First Turn)

Before invoking subagents, reading playbooks, or modifying files: Check for the aif executable or ./ai.sh script, and run:

aif recall --core-and-bridge
  • Instantly loads active project Red Core (INT16_CORE) blocks, including any [PAUSED_MID_TASK] checkpoint from interrupted prior sessions.
  • Injects relevant cross-project pointers from the Cross-Project Bridge Nexus (bridge_nexus.ai) into working context.

2. Pre-Task Volatile Scratch (Interrupt Protection)

Before initiating multi-file edits, long test runs, refactors, or delegating code writes to a subagent:

aif scratch "<current goal, subagent task spec, and active working state>"
  • Arms the OS-level signal trap. If execution is interrupted (Ctrl+C, SIGINT, SIGTERM), the engine automatically flushes this scratch buffer into the active project's INT16_CORE with importance 0.95 and the [PAUSED_MID_TASK] marker.

3. Subagent Memory Synchronization

When coordinating delegate subagents (e.g., poteto-agent):

  • Pass relevant INT16_CORE architectural constraints and schemas directly in the subagent prompt.
  • When the subagent yields control or returns diffs, record the completed milestone and architectural changes into AIF immediately.

4. End-of-Turn Cognitive Commit (Every Productive Turn)

Before concluding any productive turn, evaluate the cognitive importance of the turn (0.0 to 1.0) and commit a note:

aif note --importance <0.0-1.0> --summary "<concise summary of decisions and code modifications>"
  • 0.70 - 1.00 (Red Core / INT16_CORE): Critical architecture, API schemas, breaking changes, or interrupted tasks. Automatically indexed into bridge_nexus.ai.
  • 0.30 - 0.69 (Black Middle Ring / INT8_RING): Implementation notes, bug fixes, routine turn summaries. Pruned for token efficiency.
  • 0.00 - 0.29 (Blue Outer Crust / INT2_CRUST): Transient observations, fleeting logs, deep summaries.

Read the full file on GitHub · 38 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. 10d ago First seen · 38 lines · 602 tokens per session scan A 39ae6e31c203

Subscribe to this mod's changes

ai-format AGENTS.md is an instructions file published in the GitHub repository CoderBhoid/ai-format (12 stars, last pushed 2d ago), licensed MIT. It adds 602 tokens to every session, about $0.0024 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-10-18.

Related

Other instructions, from other repositories