ralph: Instructions file for Codex

AGENTS.md

ralph AGENTS.md is an instructions file for Codex, OpenCode from marc0der/ralph. It costs 4,267 tokens per session, scanned B, original, MIT.

A set of project instructions for coding agents working on the ralph repository. It explains the project, available commands, and how to run all tests or one test file.

In plain words
What is it for?
Use it to understand ralph, follow its project conventions, and check changes with the full test suite or an individual test file.
Why use it?
It gives the agent the repository’s working rules and test commands in one place, reducing guesswork when changing code.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/marc0der/ralph/agents-md"><img src="https://agentmods.dev/badge/instructions/marc0der/ralph/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,267 This file is loaded in full into every session.
When invoked 4,267 The same file — it is already loaded in full.
Security scan B 1 finding. 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.04267 $0.04267
Opus 5.5 $0.01707 $0.01707
Sonnet 5.5 $0.00853 $0.00853
Haiku 4.5 $0.00427 $0.00427

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

Security

Grade B, and why

ralph AGENTS.md scanned grade B with 1 finding 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 24d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Runs as `node` user with passwordless sudo ### Installation layout
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 124 lines

How it starts

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

AGENTS.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What is Ralph?

Ralph is an autonomous AI coding agent loop runner. It runs iterative plan/build cycles using a configurable backend (Claude Code, OpenAI Codex, GitHub Copilot CLI, or pi) in headless mode, with shared artifacts (IMPLEMENTATION_PLAN.md, PROGRESS.md) as handoffs between iterations. All execution happens inside isolated devcontainers.

Commands

# Run all tests
bats test/

# Run a single test file
bats test/sandbox.bats

# Run a specific test by name
bats test/sandbox.bats -f "sandbox fails when config is missing"

# Lint
shellcheck ralph install.sh

CI runs both ShellCheck and BATS on every push/PR to main.

Architecture

Ralph is a single Bash script (ralph) with these commands:

Command Purpose
plan Run planning loop (max 6 iterations, exits on convergence) — requires a goal (-g), reads specs/source, produces IMPLEMENTATION_PLAN.md
build Run build loop (default: open items plus 20% headroom) — picks next task, implements, tests, commits, pushes
fix Run the build loop with the fix section of the config file — auto runs it as phase 6
review Run one review pass — reviews the cycle's work against its cited specs, the written rules and the review catalogue, files findings as new - [ ] items
sandbox Enter/manage devcontainer (sandbox, sandbox clean, sandbox --rebuild)
init Initialize workspace artifacts and directories; --config copies the central config.yaml to ./ralph.yaml
archive Move artifacts to .ralph/<timestamp>/
clean Delete artifacts
auto Run archive, init, plan, build, review, fix as child processes — requires -g, rejects -n, skips a phase whose guard fails, refuses phase 3 over a stale cycle base or an uncommitted specs/ or a spec repository on a detached HEAD, refuses to run outside a container without --force, records a failure or interrupt in .ralph/auto-state for --resume
metrics Summarise a run's metrics.jsonl, the latest run by default
version Print the version

Read the full file on GitHub · 124 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. 24d ago Changed · +10 lines · +402 tokens per session a76fa70c0a0d
  2. 29d ago Changed · +190 tokens per session 921091e41ab1
  3. 1mo ago Changed · +3 tokens per session 8bcf11e5f613
  4. 1mo ago Changed · +2 lines · +418 tokens per session 861e11ba6359
  5. 1mo ago Changed · +6 lines · +309 tokens per session 40b8e15c19ef
  6. 1mo ago Changed · +2 lines · +466 tokens per session fc96299b2175
  7. 1mo ago Changed · +195 tokens per session d75d58a17f8c
  8. 1mo ago Changed · -1 lines · -53 tokens per session 0bd8f8d5cd03
  9. 1mo ago Changed · +31 tokens per session c210d3351609
  10. 1mo ago First seen · 105 lines · 2,306 tokens per session scan B 439ab52d1af2

Subscribe to this mod's changes

ralph AGENTS.md is an instructions file published in the GitHub repository marc0der/ralph (11 stars, last pushed 2d ago), licensed MIT. It adds 4,267 tokens to every session, about $0.0171 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

ralph AGENTS.md compared with instructions from other repositories

ralph AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ralph AGENTS.mdmarc0der/ralphInstructions file112d agoMITB4,267Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot