cc65-Chess: Instructions file for Codex

AGENTS.md

cc65-Chess AGENTS.md is an instructions file for Codex, OpenCode from StewBC/cc65-Chess. It costs 7,380 tokens per session, scanned A, original, Unlicense.

Project-specific instructions for developing and testing cc65 Chess, a chess program written for older computers such as the Commodore 64 and other 6502-based machines.

In plain words
What is it for?
Use it when modifying the chess engine, platform code, search or evaluation logic, or build and test workflow for the project's supported computers.
Why use it?
It records fixed design constraints, known traps, required reading, and performance limits so changes do not accidentally break supported ports or past decisions.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 cc65-Chess AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/stewbc/cc65-chess/agents-md"><img src="https://agentmods.dev/badge/instructions/stewbc/cc65-chess/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,380 This file is loaded in full into every session.
When invoked 7,380 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.07380 $0.07380
Opus 5.5 $0.02952 $0.02952
Sonnet 5.5 $0.01476 $0.01476
Haiku 4.5 $0.00738 $0.00738

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

Security

Grade A, and why

cc65-Chess 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 9d 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 · 436 lines

How it starts

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

Working on cc65 Chess

A chess program in C, originally for ~1 MHz 6502 machines — c64, apple2, atmos, plus4, atari. Faster 6502s came later: cx16 and rp6502, at up to 8 MHz. Other toolchains cover spectrum, mac68k, ti99, coco3, agon, archie, amiga and native mega65, plus a native SDL2 desktop port and a terminal build used for development. Each port uses whichever compiler that machine needs. The MEGA65 build uses LLVM-MOS, not cc65.

doc/engine.md explains how the engine works and is the right thing to read first. This file is the short list of constraints that are easy to violate by accident.

doc/rework-log.md is the working journal, and its last section is the closed search and evaluation portfolios. Read that before proposing a search technique or an evaluation term. B3+B4 shipped (−17.2% per node on a C64). The skill budgets are 400 / 1,200 / 18,000 / 65,000. Do not reopen a rejected candidate by renaming it.

Hard constraints

plat.h and the 0–63 tile numbering are frozen. The 0x88 board representation stays inside the engine and converts at the boundary. This is what lets the platform files that cannot be built here stay untouched.

There is one addition to plat.h since the freeze, and the bar it had to clear is the point. plat_GetSeed() returns a byte of entropy for the opening randomiser. It went in because every machine has a free-running counter, cc65's own asminc names all of them, and the implementation is three lines a port that reads a register and cannot fail visibly — a wrong address gives repeating openings, which is what the engine did anyway. Anything asking to be added here should be held to that: no writes to hardware on a port that cannot be run, and a failure mode nobody has to debug. There are eighteen platform files now; make list names the ports. c64.chr is a separate port, and term is the one that must return a constant.

The frozen interface is wider than plat.h. Every port also reads four globals directly, and this was discovered the hard way:

Read the full file on GitHub · 436 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. 9d ago Changed · +14 lines · +247 tokens per session f1a5e6f54793
  2. 25d ago Changed · +17 lines · +318 tokens per session e4482606562f
  3. 26d ago Changed · +24 lines · +460 tokens per session c0555a3fee9f
  4. 2mo ago First seen · 381 lines · 6,355 tokens per session scan A abc027b7c2be

Subscribe to this mod's changes

cc65-Chess AGENTS.md is an instructions file published in the GitHub repository StewBC/cc65-Chess (52 stars, last pushed 10d ago), licensed Unlicense. It adds 7,380 tokens to every session, about $0.0295 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-30.

Related

cc65-Chess AGENTS.md compared with instructions from other repositories

cc65-Chess AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cc65-Chess AGENTS.mdStewBC/cc65-ChessInstructions file5210d agoUnlicenseA7,380Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot