AI agent loop. Each task runs in a fresh invocation — no context pollution.
RalphVideo.mp4
npm install -g ralphmd- Initialize — drop a config file in your project:
cd your-project
ralphmd init- Plan — describe what you want and the AI creates structured tasks:
ralphmd plan "Refactor the auth module into separate files"- Run — execute tasks one at a time in fresh AI invocations:
ralphmd runOpen ralph.md to watch tasks get checked off as they complete. That's it — no directory scaffolding, no scripts, no boilerplate.
ralphmd init
ralphmd init --recipe llms-txtCreates a single ralph.md file in your project root. No subdirectory, no package.json, no scripts.
ralphmd plan "Add error handling to all API endpoints"The AI analyzes your codebase and populates ralph.md with structured tasks. It runs in restricted mode — it can only read your code and write to ralph.md. No Bash, no Edit, no file modifications. The boundary between planning and execution is enforced structurally, not by prompting.
ralphmd run
ralphmd run --max 20Ralph reads ralph.md, validates the task format, then executes tasks one per iteration in fresh AI invocations. Open ralph.md to watch tasks get checked off.
Every task in ralph.md must follow this format:
- [ ] **Task title**
- Read: `src/auth/login.js`, `src/auth/session.js`
- Do: Split into separate authenticate(), authorize(), refreshToken() functions
- Output: Modified files in `src/auth/`
- Done when: All three functions exist and tests pass| Field | Required | Purpose |
|---|---|---|
| Title | Yes | Bold, concise description |
| Read | Recommended | Files the AI should study before starting |
| Do | Yes | Specific instructions — unambiguous enough for a fresh AI session |
| Output | Recommended | What files or changes this task produces |
| Done when | Yes | Concrete acceptance criteria |
ralphmd validate checks this format before running. Malformed tasks are flagged.
Recipes are pre-packaged setups for common tasks.
ralphmd init --recipe llms-txt
ralphmd planAvailable recipes:
| Recipe | Description |
|---|---|
llms-txt |
Add hierarchical llms.txt documentation to a project |
llms-txt-general |
Create hierarchical llms.txt documentation for any subject (website, book, API, docs, etc.) |
self-improve |
Analyze, evaluate, and implement clear-win improvements for any part of a project |
List all: ralphmd list-recipes
recipes/my-recipe/
├── recipe.json # name + description
├── instructions.md # AI planning instructions (injected into ralph.md)
└── specs/ # reference files the AI needs
└── my-guide.md
ralphmd init [--recipe <name>] # Create ralph.md in current directory
ralphmd plan "<goal>" # AI creates tasks (restricted mode)
ralphmd run [--max <n>] # Execute tasks one at a time
ralphmd validate # Check task format
ralphmd list-recipes # Show available recipes