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 internal cross-links throughout cookbook recipes (category 2)
Link key terms (commands, args, timeouts, placeholders, self-healing
loop, --stop-on-error, --log-dir, helper scripts) to their reference
pages on first mention in each recipe, improving navigation for readers
who land on the cookbook directly.
Co-authored-by: Ralphify <noreply@ralphify.co>
Copy file name to clipboardExpand all lines: docs/cookbook.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ All recipes use **Claude Code** as the agent. To use a different agent, swap the
20
20
21
21
## Run autonomous ML experiments {: #autoresearch }
22
22
23
-
An autonomous ML research loop inspired by [Karpathy's autoresearch](https://github.com/karpathy/autoresearch). The agent runs experiments on a training script to minimize validation loss — modifying code, training for 5 minutes, keeping improvements and reverting failures.
23
+
An autonomous ML research loop inspired by [Karpathy's autoresearch](https://github.com/karpathy/autoresearch). The agent runs experiments on a training script to minimize validation loss — modifying code, training for 5 minutes, keeping improvements and reverting failures. This recipe uses [helper scripts](writing-prompts.md#shell-features-in-commands) as commands to surface experiment state each iteration.
24
24
25
25
**`autoresearch/RALPH.md`**
26
26
@@ -65,7 +65,7 @@ The `train_script` and `prepare_script` args let you point the ralph at any auto
A loop that continuously improves code quality without changing functionality. It runs tests, type checking, and lint each iteration, then picks one improvement to make.
68
+
A loop that continuously improves code quality without changing functionality. It runs [commands](quick-reference.md#command-fields) (tests, type checking, lint) each iteration to give the agent a [self-healing feedback loop](how-it-works.md#how-broken-code-gets-fixed-automatically), then picks one improvement to make.
69
69
70
70
**`improve-codebase/RALPH.md`**
71
71
@@ -150,7 +150,7 @@ ralph run bug-hunter -n 5 --focus "focus on input validation" --log-dir ralph_lo
150
150
151
151
A structured research loop that builds up a report over many iterations. Uses shell scripts as commands to track maturity, show the question tree, and even run an editorial review agent that gives feedback between iterations.
152
152
153
-
This is a more advanced ralph — it uses `args` for the research topic, helper scripts (run with `./` relative to the ralph directory), and a `timeout` on the review command.
153
+
This is a more advanced ralph — it uses [`args`](writing-prompts.md#parameterized-ralphs) for the research topic, helper scripts (run with `./`[relative to the ralph directory](how-it-works.md#2-run-commands-and-capture-output)), and a [`timeout`](writing-prompts.md#command-timeouts) on the review command.
154
154
155
155
**`research/RALPH.md`**
156
156
@@ -174,13 +174,13 @@ ralph run research --workspace ai-safety --focus "current approaches to AI align
174
174
✓ Iteration 1 completed (185.6s)
175
175
```
176
176
177
-
This recipe shows several advanced patterns: commands that call scripts relative to the ralph directory (`./show-focus.sh`), a command with a `timeout`, a command that itself calls an AI agent (`review.sh` pipes to `claude -p`), and `args` used in the prompt body via `{{ args.workspace }}` placeholders.
177
+
This recipe shows several advanced patterns: commands that call scripts relative to the ralph directory (`./show-focus.sh`), a command with a `timeout`, a command that itself calls an AI agent (`review.sh` pipes to `claude -p`), and `args` used in the prompt body via [`{{ args.workspace }}` placeholders](writing-prompts.md#ralph-context-placeholders).
178
178
179
179
---
180
180
181
181
## Migrate code patterns across a codebase {: #code-migration }
182
182
183
-
A loop for batch code transformations — migrating from one pattern to another across a codebase. The `remaining` command counts how many files still need migration, giving the agent a clear finish line.
183
+
A loop for batch code transformations — migrating from one pattern to another across a codebase. The `remaining` command counts how many files still need migration, giving the agent a clear finish line. Use [`--stop-on-error`](cli.md#ralph-run) to halt the loop once all files are migrated.
184
184
185
185
**`migrate/RALPH.md`**
186
186
@@ -215,7 +215,7 @@ The `remaining` command gives the agent a shrinking counter and a list of files
215
215
216
216
## Automate security scanning and fixes {: #security-scan }
217
217
218
-
An iterative security review loop. The agent runs a scanner each iteration, picks one finding, fixes it, and verifies the fix. Good for systematically hardening a codebase.
218
+
An iterative security review loop. The agent runs a scanner each iteration, picks one finding, fixes it, and verifies the fix. Good for systematically hardening a codebase. Use [`-n`](cli.md#ralph-run) to limit iterations and [`--log-dir`](cli.md#ralph-run) to keep an audit trail.
219
219
220
220
**`security/RALPH.md`**
221
221
@@ -243,7 +243,7 @@ Swap `bandit` for your scanner of choice — `semgrep`, `npm audit`, `cargo audi
243
243
244
244
## Increase test coverage automatically {: #test-coverage }
245
245
246
-
A loop that systematically increases test coverage. The agent sees the current coverage percentage and a list of uncovered functions, then writes tests for one module per iteration.
246
+
A loop that systematically increases test coverage. The agent sees the current coverage percentage and a list of uncovered functions, then writes tests for one module per iteration. The coverage command output feeds into the prompt via [`{{ commands.coverage }}`](writing-prompts.md#using-commands-for-dynamic-data) so the agent always knows where to focus.
0 commit comments