You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add checks, contexts, and instructions to README for users who want to understand the full value proposition
The README previously only showed the basic loop, making ralphify look
like a simple bash wrapper. The three primitives (especially the
self-healing check feedback loop) are the key differentiators and are
now visible from the front door.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+64-4Lines changed: 64 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,16 +70,76 @@ The Ralph Wiggum technique works because:
70
70
71
71
Read the full writeup: [Ralph Wiggum as a "software engineer"](https://ghuntley.com/ralph/)
72
72
73
+
## Beyond the basic loop
74
+
75
+
The simple loop works, but ralphify's real power comes from three primitives that live in the `.ralph/` directory.
76
+
77
+
### Checks — the self-healing loop
78
+
79
+
Checks validate the agent's work after each iteration. When one fails, its output automatically feeds into the next iteration so the agent can fix its own mistakes.
80
+
81
+
```bash
82
+
ralph new check tests
83
+
```
84
+
85
+
Edit `.ralph/checks/tests/CHECK.md`:
86
+
87
+
```markdown
88
+
---
89
+
command: uv run pytest -x
90
+
timeout: 120
91
+
---
92
+
Fix all failing tests. Do not skip or delete tests.
You define what "valid" means. Ralphify feeds failures back automatically.
104
+
105
+
### Contexts — dynamic data injection
106
+
107
+
Contexts inject fresh data into the prompt each iteration — git history, test status, anything a shell command can produce.
108
+
109
+
```bash
110
+
ralph new context git-log
111
+
```
112
+
113
+
Edit `.ralph/contexts/git-log/CONTEXT.md`:
114
+
115
+
```markdown
116
+
---
117
+
command: git log --oneline -10
118
+
---
119
+
## Recent commits
120
+
```
121
+
122
+
The command runs before each iteration. Use `{{ contexts.git-log }}` in your `PROMPT.md` to control where the output appears.
123
+
124
+
### Instructions — reusable rules
125
+
126
+
Instructions are static text blocks (coding standards, commit conventions) you can toggle on and off without editing the prompt.
127
+
128
+
```bash
129
+
ralph new instruction code-style
130
+
```
131
+
132
+
Drop `{{ instructions }}` into `PROMPT.md` to inject all enabled instructions.
133
+
73
134
## Customizing your prompt
74
135
75
136
The generated `PROMPT.md` is a starting point. A good prompt for autonomous loops typically includes:
76
137
77
138
- What to work on (specs, plan file, TODO list)
78
-
- How to validate (run tests, type check, build)
79
-
- What NOT to do (no placeholders, no skipping tests)
80
-
- When to commit (after tests pass)
139
+
- Constraints — what NOT to do (no placeholders, no skipping tests)
140
+
- Process — how to validate and commit
81
141
82
-
The agent reads this prompt fresh every iteration, so you can edit it while the loop is running.
142
+
The agent reads this prompt fresh every iteration, so you can edit it while the loop is running. When the agent does something dumb, add a sign to the prompt — the next iteration follows the new rules.
0 commit comments