ruler AGENTS.md

A set of instructions for an AI coding assistant covering how to develop, test, format, commit, and review code.

In plain words
What is it for?
It helps with test-driven development (writing tests before implementation), unit, integration, and end-to-end testing, code formatting, CI checks, commits, and pull requests.
Why use it?
It gives the assistant consistent project rules, such as writing tests first where possible, formatting code, and using feature branches and pull requests.

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/intellectronica/ruler/agents-md
Clone the repo
git clone --depth 1 https://github.com/intellectronica/ruler

Made for: Codex, OpenCode.

Per session 279 This file is loaded in full into every session.
When invoked 279 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.00279 $0.00279
Opus 5 $0.00139 $0.00139
Sonnet 5 $0.00056 $0.00056
Haiku 4.5 $0.00028 $0.00028

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

Security

Grade A, and why

ruler 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 3d 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 · 33 lines

What it actually says

Ruler

Development Process

Testing

  • Always follow TDD where possible - first adding or adjusting tests, verifying that they fail, then making the minimal changes to pass the tests.
  • Everything in this repository should be covered by tests. That always includes:
    • Unit tests
    • Integration tests
    • End-to-end tests

Code Formatting

  • Always ensure that the code is formatted correctly by running prettier before committing changes.

Branches and Pull Requests

  • Unless specifically instructed otherwise, all changes should be made in a feature branch and submitted as a pull request for review.
  • Pull requests should be descriptive and clearly explain the changes being made, including the rationale behind the change, the functional changes, the specific files and modules affected.
  • Before declaring a pull request ready for review, you must ensure that all the CI tests pass. These include:
    • npm ci
    • npm run lint
    • npm test
    • npm run build
  • IMPORTANT: Before committing, always use Prettier to ensure that the code is formatted correctly.
  • IMPORTANT: When committing yourself with git commit, always pass --author="AI <[email protected]>" so that your commits can be easily identified.
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. 3d ago First seen · 33 lines · 279 tokens per session scan A 010293e2b4b1

Subscribe to this mod's changes

ruler AGENTS.md is an instructions file published in the GitHub repository intellectronica/ruler (2,906 stars, last pushed 6d ago), licensed MIT. It adds 279 tokens to every session, about $0.0014 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-30.

Related

Other instructions, from other repositories

codedb AGENTS.md

AGENTS.md instructions for justrach/codedb, covering codedb agent guidelines, what codedb is (and isn't), review guidelines, pre-merge verification and security-sensitive areas.

justrach/codedb · 509 tokens

codedb copilot-instructions.md

Copilot instructions for justrach/codedb, covering codedb — agent instructions, project, rules, filing issues and test style.

justrach/codedb · 385 tokens

Puppetmaster AGENTS.md

Instructions for professorpalmer/Puppetmaster, covering agents.md, first: are you a puppetmaster worker?, default subagent runtime: puppetmaster, when to start a puppetmaster swarm (do this by default) and match the verb to the task shape (single feature ≠ swarm).

professorpalmer/Puppetmaster · 4,520 tokens

claude-code-blueprint CLAUDE.md

Instructions for faizkhairi/claude-code-blueprint, covering global claude behavior rules, verify-after-complete (mandatory), what to verify depends on what was built, verification mindset and after verification.

faizkhairi/claude-code-blueprint · 3,009 tokens

awesome-reviewers CLAUDE.md

Instructions for baz-scm/awesome-reviewers, covering awesome reviewers — repository guidelines, what this project is, source of truth, site layer and machine interface.

baz-scm/awesome-reviewers · 1,008 tokens

agent-native-setup AGENTS.md

Instructions for luca-mastrostefano/agent-native-setup, covering agent-native-setup — agent contract, navigation and command surface.

luca-mastrostefano/agent-native-setup · 400 tokens