pr-map AGENTS.md

A set of rules for an AI coding agent working through planned tasks. It requires reading project notes first and using test-driven development, which means writing a failing test before the code.

In plain words
What is it for?
Following project context, implementing tasks from a plan, checking review feedback, and enforcing tests and completion requirements.
Why use it?
It keeps implementation work consistent and makes each change verifiable before it is committed.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/valentindutra/pr-map/agents-md
Clone the repo
git clone --depth 1 https://github.com/ValentinDutra/pr-map

Made for: Codex, OpenCode.

Per session 815 This file is loaded in full into every session.
When invoked 815 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00815 $0.00815
Opus 5 $0.00407 $0.00407
Sonnet 5 $0.00163 $0.00163
Haiku 4.5 $0.00081 $0.00081

Measured 2d ago against content hash 3554af0aae64, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr-map 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 2d 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 · 69 lines

How it starts

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

Autonomous implementation contract

These rules govern any agent implementing tasks from plan.md (e.g. under the ralph loop). They are mandatory, and /review enforces them — a violation is a defect, not a style note.

Start of each iteration — read the context

Before picking a task, read plan.md and learnings.txt in full. Also read review-notes.txt if it exists and treat its [REVIEWER …] entries as course-corrections with the same weight as learnings.txt — fix what they call out before adding new work. (review-notes.txt is written by the /deliver parallel reviewer; it may not exist outside a /deliver run — read it only if present.)

Test-Driven Development is non-negotiable

Every task follows RED -> GREEN -> REFACTOR:

  1. RED — write a failing test first that encodes the task's acceptance criterion. Run it and confirm it fails for the intended reason. No production code before a failing test exists.
  2. GREEN — write the minimal code to make the test pass. No placeholders, stubs, TODOs, or commented-out code.
  3. REFACTOR — improve structure without changing behavior; keep tests green.

Definition of Done (before every commit)

A task is done only when ALL three gates pass — run the exact commands from plan.md's ## Verification commands:

  • Tests — the relevant suite is green, including the new test.
  • Lint — clean.
  • Type check — clean.

If any gate is red, fix it before committing. Never commit a red gate.

Test integrity

  • Tests must assert real behavior tied to the acceptance criterion.
  • Never make a test pass by weakening it, deleting assertions, marking it skip/xfail/only, or loosening the gate config.
  • A green suite achieved by gaming it is a defect, not "done".
  • Test observable behavior through the public interface, not implementation details. A test that breaks on a behavior-preserving refactor was testing the wrong thing.
  • No tautological tests: the expected value must come from an independent source — a known-good literal or a worked example from the spec — never recomputed the way the code computes it.
  • Mock only at true system boundaries (external APIs, DB, time, randomness, filesystem). Never mock internal collaborators or your own modules.

Read the full file on GitHub · 69 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. 2d ago First seen · 69 lines · 815 tokens per session scan A 3554af0aae64

Subscribe to this mod's changes

pr-map AGENTS.md is an instructions file published in the GitHub repository ValentinDutra/pr-map (9 stars, last pushed 2mo ago), licensed MIT. It adds 815 tokens to every session, about $0.0041 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