Skip to content

Commit 25765e7

Browse files
Kasper Jungeclaude
authored andcommitted
docs: redesign landing page with Material feature cards for users who want to quickly evaluate the tool
The previous index.md was plain text duplicating the README. The new landing page uses MkDocs Material grid cards, icon badges, and CTA buttons to help visitors understand what ralphify does, why it works, and where to go next — all within 60 seconds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e86a6af commit 25765e7

2 files changed

Lines changed: 121 additions & 39 deletions

File tree

docs/index.md

Lines changed: 118 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,154 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
16
# Ralphify
27

3-
Put your AI coding agent in a `while True` loop and let it ship.
8+
**Put your AI coding agent in a `while True` loop and let it ship.**
9+
10+
Ralphify is a minimal CLI harness for autonomous AI coding loops, inspired by the [Ralph Wiggum technique](https://ghuntley.com/ralph/). It pipes a prompt to an AI coding agent, validates the work with checks, and repeats — each iteration starts with a fresh context window.
411

5-
Ralphify is a minimal harness for running autonomous AI coding loops, inspired by the [Ralph Wiggum technique](https://ghuntley.com/ralph/). It pipes a prompt to an AI coding agent, lets it do one thing, commits, and repeats — each iteration starts with a fresh context window.
12+
[Get Started](getting-started.md){ .md-button .md-button--primary }
13+
[View Cookbook](cookbook.md){ .md-button }
14+
15+
---
616

717
## Install
818

919
```bash
1020
uv tool install ralphify
1121
```
1222

13-
This gives you the `ralph` command.
14-
15-
## Quickstart
23+
## Two commands to start
1624

1725
```bash
1826
ralph init # Creates ralph.toml + PROMPT.md
1927
ralph run # Starts the loop (Ctrl+C to stop)
2028
```
2129

22-
### What `ralph init` creates
30+
`ralph init` creates a config file and a starter prompt. `ralph run` reads the prompt, pipes it to the agent, waits for it to finish, and does it again. Edit `PROMPT.md` while the loop is running — changes take effect on the next iteration.
2331

24-
**`ralph.toml`** — tells ralphify which agent to call:
32+
---
2533

26-
```toml
27-
[agent]
28-
command = "claude"
29-
args = ["-p", "--dangerously-skip-permissions"]
30-
prompt = "PROMPT.md"
31-
```
34+
## Why it works
3235

33-
**`PROMPT.md`** — a starter prompt template. This file is the prompt. It gets piped directly to your agent each iteration. Edit it to fit your project.
36+
<div class="grid cards" markdown>
3437

35-
### What `ralph run` does
38+
- :material-repeat:{ .lg .middle } **One thing per loop**
3639

37-
Each iteration:
40+
---
3841

39-
1. Reads `PROMPT.md`
40-
2. Resolves any [contexts and instructions](primitives.md) into the prompt
41-
3. Pipes the assembled prompt to your agent command
42-
4. Waits for the agent to finish
43-
5. Runs any configured [checks](primitives.md#checks) and feeds failures into the next iteration
44-
6. Repeats
42+
The agent picks a task, implements it, tests it, and commits. Then the next iteration starts fresh — no accumulated state, no context window bloat.
43+
44+
- :material-refresh:{ .lg .middle } **Fresh context every time**
45+
46+
---
47+
48+
Each iteration re-reads `PROMPT.md` and the codebase from scratch. The agent always works from the current state, not stale assumptions.
49+
50+
- :material-source-branch:{ .lg .middle } **Progress lives in git**
51+
52+
---
53+
54+
Code and commits are the only state that persists. If something goes wrong, `git reset --hard` and run more loops. No hidden state to debug.
55+
56+
- :material-sign-direction:{ .lg .middle } **The prompt is a tuning knob**
57+
58+
---
59+
60+
When the agent does something dumb, add a sign to the prompt. "SLIDE DOWN, DON'T JUMP." The next iteration follows the new rules.
61+
62+
</div>
63+
64+
---
65+
66+
## Three primitives
67+
68+
Ralphify extends the basic loop with three building blocks that live in the `.ralph/` directory:
69+
70+
<div class="grid cards" markdown>
71+
72+
- :material-check-circle-outline:{ .lg .middle } **Checks**
73+
74+
---
75+
76+
Run after each iteration to validate the agent's work — tests, linters, type checks. Failed check output feeds into the next iteration so the agent can fix its own mistakes.
77+
78+
[:octicons-arrow-right-24: Learn more](primitives.md#checks)
79+
80+
- :material-database-outline:{ .lg .middle } **Contexts**
81+
82+
---
83+
84+
Inject dynamic data into the prompt before each iteration — recent git history, current test status, API responses. The agent always sees fresh information.
85+
86+
[:octicons-arrow-right-24: Learn more](primitives.md#contexts)
87+
88+
- :material-file-document-edit-outline:{ .lg .middle } **Instructions**
89+
90+
---
91+
92+
Reusable rules and coding standards injected into the prompt. Toggle them on and off without editing `PROMPT.md` — useful for style guides, commit conventions, or safety constraints.
93+
94+
[:octicons-arrow-right-24: Learn more](primitives.md#instructions)
95+
96+
</div>
97+
98+
---
99+
100+
## The self-healing loop
101+
102+
Checks create a feedback loop that makes the agent self-correcting:
45103

46-
```bash
47-
ralph run # Run forever
48-
ralph run -n 10 # Run 10 iterations then stop
49104
```
105+
Iteration N Agent makes a change
106+
Check runs → test fails
50107
51-
## The technique
108+
Iteration N+1 Agent sees failure output in prompt
109+
Fixes the broken test → checks pass
52110
53-
The Ralph Wiggum technique works because:
111+
Iteration N+2 No failures from previous iteration
112+
Agent moves on to the next task
113+
```
54114

55-
- **One thing per loop.** The agent picks the most important task, implements it, tests it, and commits. Then the next iteration starts fresh.
56-
- **Fresh context every time.** No context window bloat. Each loop starts clean and reads the current state of the codebase.
57-
- **Progress lives in git.** Code and commits are the only state that persists between iterations. If something goes wrong, `git reset --hard` and run more loops.
58-
- **The prompt is a tuning knob.** When the agent does something dumb, you add a sign. Like telling Ralph not to jump off the slide — add "SLIDE DOWN, DON'T JUMP" to the prompt.
115+
You define what "valid" means. Ralphify feeds failures back into the prompt automatically. The agent doesn't need to remember anything — check output tells it exactly what went wrong.
59116

60-
Read the full writeup: [Ralph Wiggum as a "software engineer"](https://ghuntley.com/ralph/)
117+
---
61118

62119
## Requirements
63120

64121
- Python 3.11+
65122
- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) (or any agent CLI that accepts piped input)
66123

124+
---
125+
67126
## Next steps
68127

69-
- [Getting Started](getting-started.md) — step-by-step tutorial from install to a running loop with checks and contexts
70-
- [How It Works](how-it-works.md) — the iteration lifecycle, prompt assembly, and feedback loop explained
71-
- [Writing Your Prompt](prompts.md) — how to write prompts that produce useful work
72-
- [Cookbook](cookbook.md) — complete, copy-pasteable setups for Python, TypeScript, bug fixing, and docs
73-
- [Primitives](primitives.md) — add checks, contexts, and instructions to your loop
74-
- [Configuration & CLI](cli.md)`ralph.toml` format, all commands, and options
75-
- [Troubleshooting](troubleshooting.md) — common issues and how to fix them
128+
<div class="grid cards" markdown>
129+
130+
- **[Getting Started](getting-started.md)**
131+
132+
---
133+
134+
Step-by-step tutorial from install to a running loop with checks and contexts.
135+
136+
- **[Writing Your Prompt](prompts.md)**
137+
138+
---
139+
140+
How to write prompts that produce useful work — anatomy, patterns, and tips.
141+
142+
- **[Cookbook](cookbook.md)**
143+
144+
---
145+
146+
Complete, copy-pasteable setups for Python, TypeScript, bug fixing, and docs.
147+
148+
- **[How It Works](how-it-works.md)**
149+
150+
---
151+
152+
The iteration lifecycle, prompt assembly, and feedback loop explained.
153+
154+
</div>

mkdocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ markdown_extensions:
4545
- pymdownx.details
4646
- attr_list
4747
- md_in_html
48+
- pymdownx.emoji:
49+
emoji_index: !!python/name:material.extensions.emoji.twemoji
50+
emoji_generator: !!python/name:material.extensions.emoji.to_svg
4851
- toc:
4952
permalink: true
5053

0 commit comments

Comments
 (0)