Skip to content

Commit b9b7943

Browse files
Kasper JungeRalphify
authored andcommitted
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>
1 parent b76be12 commit b9b7943

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

docs/cookbook.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ All recipes use **Claude Code** as the agent. To use a different agent, swap the
2020

2121
## Run autonomous ML experiments {: #autoresearch }
2222

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.
2424

2525
**`autoresearch/RALPH.md`**
2626

@@ -65,7 +65,7 @@ The `train_script` and `prepare_script` args let you point the ralph at any auto
6565

6666
## Improve code quality continuously {: #codebase-improvement }
6767

68-
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.
6969

7070
**`improve-codebase/RALPH.md`**
7171

@@ -150,7 +150,7 @@ ralph run bug-hunter -n 5 --focus "focus on input validation" --log-dir ralph_lo
150150

151151
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.
152152

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.
154154

155155
**`research/RALPH.md`**
156156

@@ -174,13 +174,13 @@ ralph run research --workspace ai-safety --focus "current approaches to AI align
174174
✓ Iteration 1 completed (185.6s)
175175
```
176176

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).
178178

179179
---
180180

181181
## Migrate code patterns across a codebase {: #code-migration }
182182

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.
184184

185185
**`migrate/RALPH.md`**
186186

@@ -215,7 +215,7 @@ The `remaining` command gives the agent a shrinking counter and a list of files
215215

216216
## Automate security scanning and fixes {: #security-scan }
217217

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.
219219

220220
**`security/RALPH.md`**
221221

@@ -243,7 +243,7 @@ Swap `bandit` for your scanner of choice — `semgrep`, `npm audit`, `cargo audi
243243

244244
## Increase test coverage automatically {: #test-coverage }
245245

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.
247247

248248
**`test-coverage/RALPH.md`**
249249

0 commit comments

Comments
 (0)