dwarf_fortress_mcp: Instructions file for Codex

AGENTS.md

dwarf_fortress_mcp AGENTS.md is an instructions file for Codex, OpenCode from Dicklesworthstone/dwarf_fortress_mcp. It costs 3,877 tokens per session, scanned A, original, MIT.

A strict developer guide for an MCP server that controls Dwarf Fortress, a game about managing a simulated dwarf settlement. It requires the game’s changing world state and every action to be tracked, authorized, observed, and proven.

In plain words
What is it for?
Use it when building or reviewing game-state tracking, action planning, permissions, transactions, Rust code, or integrations with the Dwarf Fortress control system.
Why use it?
It reduces mistakes when an agent acts in a complex, changing game world by requiring the right documents, explicit permissions, and evidence for changes.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dicklesworthstone/dwarf_fortress_mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/dicklesworthstone/dwarf_fortress_mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,877 This file is loaded in full into every session.
When invoked 3,877 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.03877 $0.03877
Opus 5 $0.01938 $0.01938
Sonnet 5 $0.00775 $0.00775
Haiku 4.5 $0.00388 $0.00388

Measured 6d ago against content hash 0e4cac9dcaa7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

dwarf_fortress_mcp 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 6d 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 · 373 lines

How it starts

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

AGENTS.md

This repository is designed primarily for autonomous coding and operations agents. These rules are normative.

Mission

Build the most efficient, reliable, inspectable, and economically scalable semantic control plane for Dwarf Fortress. Treat the game as a partially observed evolving civilization, not a keyboard-and-screen toy. State must be versioned explicitly; authority must be scoped; mutations must be planned, witnessed, authorized, committed, observed, and proved.

The agent-facing system is one synthetic control loop, not a bag of tools. Every successful or failed call must help the caller answer: what is true, what changed, what matters, what is possible, what should happen next, and how certain those answers are. The normative operating model is docs/AGENT_OPERATING_MODEL.md; its machine contract is architecture/agent_turn_contract.json.

Current evidence posture

The current phase is Phase 0D-R0 with an implemented but unadmitted Phase-1 announcement read slice:

  • substantial authenticated protocol-1.0 read-only DFHack source exists;
  • canonical live citizen observations and an agent-oriented read-only MCP source exist;
  • exact compatibility, monotonic-floor, artifact-receipt, and V2 process-admission machinery exist;
  • protocol-1.1 retained-announcement source, transactional publication, single-read bootstrap, and an explicitly unadmitted development MCP runtime exist;
  • the V2 production runner map contains protocol 1.0 only;
  • the checked-in compatibility registry is empty;
  • no current live tuple is admitted;
  • no live mutation RPC or capability exists;
  • the final current head does not yet have a newly checked-in full latest-nightly qualification receipt.

Never convert source presence, development execution, old evidence, a unit test, a static-only run, or a workflow badge into an admission or support claim. IMPLEMENTATION_STATUS.md, the current registry, exact receipts, the production protocol map, and local floor bytes are authoritative.

Read the full file on GitHub · 373 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. 6d ago Changed · +240 lines · +2,346 tokens per session 0e4cac9dcaa7
  2. 11d ago First seen · 133 lines · 1,531 tokens per session scan A 4fd9dcbed420

Subscribe to this mod's changes

dwarf_fortress_mcp AGENTS.md is an instructions file published in the GitHub repository Dicklesworthstone/dwarf_fortress_mcp (22 stars, last pushed 6d ago), licensed MIT. It adds 3,877 tokens to every session, about $0.0194 per session on Opus 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