mastermind: Instructions file for Codex

AGENTS.md

mastermind AGENTS.md is an instructions file for Codex, OpenCode from xcrft/mastermind. It costs 420 tokens per session, scanned A, original, MIT.

A project instruction file for the mastermind repository. It tells a coding agent how to organize code, write tests, update documentation, and validate Python changes.

In plain words
What is it for?
Guiding code changes, Python tests, subprocess tests, documentation, runbooks, and validation in the mastermind project.
Why use it?
It gives the agent project-specific rules so changes follow the repository's structure and testing practices. It also records which commands to run before considering work complete.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/xcrft/mastermind/agents-md"><img src="https://agentmods.dev/badge/instructions/xcrft/mastermind/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 420 This file is loaded in full into every session.
When invoked 420 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.00420 $0.00420
Opus 5.5 $0.00168 $0.00168
Sonnet 5.5 $0.00084 $0.00084
Haiku 4.5 $0.00042 $0.00042

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

Security

Grade A, and why

mastermind 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 5d 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 · 15 lines

What it actually says

Engineering rules

  • Keep code in packages by responsibility. Put shared code in shared only when multiple packages use the same contract.
  • Use SOLID, DRY, KISS and YAGNI to guide changes. Prefer a small function or module over an interface with one implementation.
  • Fix the owning implementation. Update callers, commands, CI and documentation together when moving code.
  • Put Python tests in tests/, mirroring the runtime packages. Keep reusable fixtures in tests/evals/support/; do not instantiate another test class for setup.
  • Test observable behavior and failure boundaries. Avoid duplicate cases and assertions that only mirror implementation details.
  • Synchronize subprocess tests on readiness. Use controlled clocks for deadline logic and state polling for cleanup. Do not assert machine-dependent execution speed.
  • just check is the gate before every push. It runs fmt, clippy, cargo tests, the validator, the npm and Lens tests, the Python suite with the corpus check, and cargo deny. For Python-only changes, python3 -m unittest discover -s tests -t . and python3 scripts/validate.py are enough while iterating. Model-backed experiments are separate from deterministic tests.
  • Run the gate outside the Bash sandbox. Lens and invocation tests bind local ports and manage process groups, so the sandbox reports false failures. Give each parallel stream of work its own CARGO_TARGET_DIR.
  • Local clippy covers only the host target. Windows and Linux lints run in CI, so code under #[cfg(unix)] or #[cfg(windows)] needs a look at the imports it shares with other platforms.
  • Write READMEs and runbooks as instructions: purpose, prerequisites, commands, inputs, outputs and recovery. Use tables for choices and contracts; keep historical measurements in retained reports.
  • Comments explain a constraint or decision. Do not put task labels or ticket identifiers in comments.
  • Preserve source bindings, failure denominators, unknown measurements and immutable result records. Passing transport or harness checks does not establish semantic quality.
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. 5d ago Changed · +2 lines · +138 tokens per session f323a66c591c
  2. 1mo ago First seen · 13 lines · 282 tokens per session scan A 575f36244125

Subscribe to this mod's changes

mastermind AGENTS.md is an instructions file published in the GitHub repository xcrft/mastermind (13 stars, last pushed today), licensed MIT. It adds 420 tokens to every session, about $0.0017 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-10.

Related

mastermind AGENTS.md compared with instructions from other repositories

mastermind AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mastermind AGENTS.mdxcrft/mastermindInstructions file13todayMITA420Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,303GitHub Copilot
deno copilot-instructions.mddenoland/denoInstructions file109kyesterdayMITA3,077GitHub Copilot