Skip to content

Commit b5bd1ab

Browse files
Kasper Jungeclaude
authored andcommitted
chore: rename cookbooks/ to examples/ and add typecheck/lint commands
Rename the cookbooks directory to examples for clarity. Add ty check and ruff check commands to examples that were missing them: python-dev, bug-hunter, migrate, security, and test-coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f05a7f5 commit b5bd1ab

16 files changed

Lines changed: 71 additions & 13 deletions

File tree

docs/cookbook.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords: ralphify cookbook, autonomous coding recipes, RALPH.md examples, docum
66

77
# Cookbook
88

9-
Copy-pasteable setups for common autonomous workflows. Each recipe is a real, runnable ralph from the [`cookbooks/`](https://github.com/computerlovetech/ralphify/tree/main/cookbooks) directory.
9+
Copy-pasteable setups for common autonomous workflows. Each recipe is a real, runnable ralph from the [`examples/`](https://github.com/computerlovetech/ralphify/tree/main/examples) directory.
1010

1111
All recipes use **Claude Code** as the agent. To use a different agent, swap the `agent` field — see [Using with Different Agents](agents.md).
1212

@@ -22,7 +22,7 @@ A general-purpose loop for a Python project using pytest and ruff.
2222
**`python-dev/RALPH.md`**
2323

2424
```markdown
25-
--8<-- "cookbooks/python-dev/RALPH.md"
25+
--8<-- "examples/python-dev/RALPH.md"
2626
```
2727

2828
```bash
@@ -38,7 +38,7 @@ A loop that continuously improves code quality without changing functionality. I
3838
**`improve-codebase/RALPH.md`**
3939

4040
```markdown
41-
--8<-- "cookbooks/improve-codebase/RALPH.md"
41+
--8<-- "examples/improve-codebase/RALPH.md"
4242
```
4343

4444
```bash
@@ -55,7 +55,7 @@ A loop focused on writing and improving documentation.
5555
**`docs/RALPH.md`**
5656

5757
```markdown
58-
--8<-- "cookbooks/docs/RALPH.md"
58+
--8<-- "examples/docs/RALPH.md"
5959
```
6060

6161
```bash
@@ -72,7 +72,7 @@ A loop that discovers bugs and fixes them. The agent reads the codebase, finds a
7272
**`bug-hunter/RALPH.md`**
7373

7474
```markdown
75-
--8<-- "cookbooks/bug-hunter/RALPH.md"
75+
--8<-- "examples/bug-hunter/RALPH.md"
7676
```
7777

7878
```bash
@@ -91,7 +91,7 @@ This is a more advanced ralph — it uses `args` for the research topic, helper
9191
**`research/RALPH.md`**
9292

9393
```markdown
94-
--8<-- "cookbooks/research/RALPH.md"
94+
--8<-- "examples/research/RALPH.md"
9595
```
9696

9797
The helper scripts (`show-focus.sh`, `show-questions.sh`, etc.) read from the workspace files and surface key state. The `review.sh` script pipes the full workspace to a separate Claude call that acts as an editorial reviewer — giving the research agent targeted feedback each iteration.
@@ -111,13 +111,13 @@ A loop for batch code transformations — migrating from one pattern to another
111111
**`migrate/RALPH.md`**
112112

113113
```markdown
114-
--8<-- "cookbooks/migrate/RALPH.md"
114+
--8<-- "examples/migrate/RALPH.md"
115115
```
116116

117117
The `count-remaining.sh` script receives the pattern as an argument (resolved from `{{ args.old_pattern }}` in the `run` field) to find files that still need migration:
118118

119119
```bash
120-
--8<-- "cookbooks/migrate/count-remaining.sh"
120+
--8<-- "examples/migrate/count-remaining.sh"
121121
```
122122

123123
```bash
@@ -136,7 +136,7 @@ An iterative security review loop. The agent runs a scanner each iteration, pick
136136
**`security/RALPH.md`**
137137

138138
```markdown
139-
--8<-- "cookbooks/security/RALPH.md"
139+
--8<-- "examples/security/RALPH.md"
140140
```
141141

142142
```bash
@@ -154,7 +154,7 @@ A loop that systematically increases test coverage. The agent sees the current c
154154
**`test-coverage/RALPH.md`**
155155

156156
```markdown
157-
--8<-- "cookbooks/test-coverage/RALPH.md"
157+
--8<-- "examples/test-coverage/RALPH.md"
158158
```
159159

160160
```bash
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ agent: claude -p --dangerously-skip-permissions
33
commands:
44
- name: tests
55
run: uv run pytest -x
6+
- name: types
7+
run: uv run ty check
8+
- name: lint
9+
run: uv run ruff check .
610
- name: git-log
711
run: git log --oneline -10
812
args:
@@ -19,11 +23,19 @@ code and git.
1923

2024
{{ commands.tests }}
2125

26+
## Type checking
27+
28+
{{ commands.types }}
29+
30+
## Lint
31+
32+
{{ commands.lint }}
33+
2234
## Recent commits
2335

2436
{{ commands.git-log }}
2537

26-
If tests are failing, fix them before hunting for new bugs.
38+
If tests, types, or lint are failing, fix that before hunting for new bugs.
2739

2840
## Task
2941

File renamed without changes.
File renamed without changes.
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ commands:
55
run: uv run pytest -x
66
- name: remaining
77
run: ./count-remaining.sh {{ args.old_pattern }}
8+
- name: types
9+
run: uv run ty check
10+
- name: lint
11+
run: uv run ruff check .
812
- name: git-log
913
run: git log --oneline -10
1014
args:
@@ -29,11 +33,19 @@ Migrate all usages of `{{ args.old_pattern }}` to `{{ args.new_pattern }}`.
2933

3034
{{ commands.tests }}
3135

36+
## Type checking
37+
38+
{{ commands.types }}
39+
40+
## Lint
41+
42+
{{ commands.lint }}
43+
3244
## Recent commits
3345

3446
{{ commands.git-log }}
3547

36-
If tests are failing, fix them before migrating more files.
48+
If tests, types, or lint are failing, fix them before migrating more files.
3749

3850
## Rules
3951

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ agent: claude -p --dangerously-skip-permissions
33
commands:
44
- name: tests
55
run: uv run pytest -x
6+
- name: types
7+
run: uv run ty check
68
- name: lint
79
run: uv run ruff check .
810
- name: git-log
@@ -19,10 +21,16 @@ commands:
1921

2022
{{ commands.tests }}
2123

24+
## Type checking
25+
26+
{{ commands.types }}
27+
2228
## Lint results
2329

2430
{{ commands.lint }}
2531

32+
Fix any type errors or lint violations above before starting new work.
33+
2634
You are an autonomous coding agent running in a loop. Each iteration
2735
starts with a fresh context. Your progress lives in the code and git.
2836

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)