pi-go: Instructions file for Codex

AGENTS.md

pi-go AGENTS.md is an instructions file for Codex, OpenCode from dimetron/pi-go. It costs 9,409 tokens per session, scanned A, original, MIT.

Repository instructions for coding agents working on the pi-go project. They require agents to read applicable guidance and make changes in a separate Git worktree, which is an isolated working copy.

In plain words
What is it for?
Use them before editing pi-go to find the right instruction files, create or reuse a worktree, and follow the repository's required workflow.
Why use it?
They reduce the risk of losing edits or violating project conventions when branches change or multiple tasks are in progress.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 pi-go AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dimetron/pi-go/agents-md"><img src="https://agentmods.dev/badge/instructions/dimetron/pi-go/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9,409 This file is loaded in full into every session.
When invoked 9,409 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.09409 $0.09409
Opus 5.5 $0.03764 $0.03764
Sonnet 5.5 $0.01882 $0.01882
Haiku 4.5 $0.00941 $0.00941

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

Security

Grade A, and why

pi-go 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 13d 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 · 770 lines

How it starts

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

AGENTS.md — pi-go

Guidance for coding agents working in this repo. Applies to Claude Code and to pi-go's own agent; where the two differ, both are described.

Before starting work

Use an isolated git worktree for every task that edits tracked files. Before reading or changing code, enumerate the repository's instruction files and read the applicable ones:

rg --files -g 'AGENTS.md' -g 'CLAUDE.md' -g '!tmp/**' -g '!.git/**' ..

Read the root AGENTS.md first, then any instruction file in each parent directory of the files you will touch. Instructions closer to a file add constraints to the repository guidance; do not skip them because a task appears small.

Work in a git worktree, not the primary checkout

Do not make uncommitted edits in the primary checkout and leave them there. The primary checkout has its branch switched frequently, and git checkout discards uncommitted changes in tracked files without warning. Work has been lost to this. A worktree gives each task its own working directory and its own branch, so a switch in one cannot destroy another.

Check first: are you already in a worktree?

Do not create a worktree when you are already inside one. Nesting a worktree below another puts the new branch's base at the enclosing worktree's HEAD, and leaves two worktrees whose branches shadow each other on the same task. If you are already in one, work in the current directory.

The check is a comparison, because git rev-parse --git-dir and --git-common-dir differ in exactly the case that matters:

# Already in a worktree? Then the two paths differ.
if [ "$(git rev-parse --git-dir)" != "$(git rev-parse --git-common-dir)" ]; then
  echo "already in a worktree: $(git rev-parse --show-toplevel) — work here"
else
  echo "primary checkout — create a worktree for this task"
fi

In the primary checkout both report .git. Inside a linked worktree --git-dir is <repo>/.git/worktrees/<name> while --git-common-dir stays <repo>/.git.

Read the full file on GitHub · 770 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. 13d ago Changed 2f8f2ebb1dee
  2. 1mo ago Changed · +47 lines · +633 tokens per session 4b9b655506f2
  3. 1mo ago Changed · +216 lines · +3,020 tokens per session ac13b885691f
  4. 1mo ago First seen · 507 lines · 5,756 tokens per session scan A aeb7cc0b463d

Subscribe to this mod's changes

pi-go AGENTS.md is an instructions file published in the GitHub repository dimetron/pi-go (222 stars, last pushed 3d ago), licensed MIT. It adds 9,409 tokens to every session, about $0.0376 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-09-20.

Related

pi-go AGENTS.md compared with instructions from other repositories

pi-go AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pi-go AGENTS.mddimetron/pi-goInstructions file2223d agoMITA9,409Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode