Skip to content

Commit 3a08d1d

Browse files
Kasper Jungeclaude
authored andcommitted
release: v0.1.11 β€” improved ralph new experience
- Launch claude with --dangerously-skip-permissions for uninterrupted setup - Rewrite skill to accept plain-English descriptions instead of asking about internals - Add user arguments knowledge to the skill Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 66f1468 commit 3a08d1d

7 files changed

Lines changed: 90 additions & 64 deletions

File tree

β€Ždocs/changelog.mdβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ description: Ralphify release history β€” new features, bug fixes, and breaking
66

77
All notable changes to ralphify are documented here.
88

9+
## 0.1.11 β€” 2026-03-18
10+
11+
### Improved
12+
13+
- **`ralph new` runs without permission prompts** β€” Claude Code is now launched with `--dangerously-skip-permissions` so the AI-guided setup flow is uninterrupted.
14+
- **Simpler `ralph new` experience** β€” the skill no longer asks users about checks, contexts, or frontmatter. Just describe what you want to automate in plain English and the agent builds the ralph for you.
15+
- **`ralph new` knows about user arguments** β€” the skill can now suggest `{{ args.name }}` placeholders when a ralph would benefit from being reusable across projects.
16+
17+
---
18+
919
## 0.1.10 β€” 2026-03-18
1020

1121
### Added

β€Žpyproject.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ralphify"
3-
version = "0.1.10"
3+
version = "0.1.11"
44
description = "Harness toolkit for autonomous AI coding loops"
55
readme = "README.md"
66
license = "MIT"

β€Žsrc/ralphify/_skills.pyβ€Ž

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,17 @@ class _AgentConfig(NamedTuple):
3030

3131
skill_dir: str
3232
skill_prefix: str
33+
extra_flags: tuple[str, ...] = ()
3334

3435

3536
# Single source of truth for agent-specific skill settings.
3637
# To add a new agent, add one entry here β€” no other changes needed.
3738
_AGENTS: dict[str, _AgentConfig] = {
38-
"claude": _AgentConfig(skill_dir=".claude/skills", skill_prefix="/"),
39+
"claude": _AgentConfig(
40+
skill_dir=".claude/skills",
41+
skill_prefix="/",
42+
extra_flags=("--dangerously-skip-permissions",),
43+
),
3944
"codex": _AgentConfig(skill_dir=".agents/skills", skill_prefix="$"),
4045
}
4146

@@ -126,4 +131,4 @@ def build_agent_command(agent_name: str, skill_name: str, ralph_name: str | None
126131
invocation = f"{agent_config.skill_prefix}{skill_name}"
127132
if ralph_name:
128133
invocation = f"{invocation} {ralph_name}"
129-
return [agent_name, invocation]
134+
return [agent_name, *agent_config.extra_flags, invocation]
Lines changed: 67 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,49 @@
11
---
22
name: new-ralph
3-
description: Create a new ralph with prompt, checks, and contexts via guided conversation
3+
description: Create a new ralph from a plain-English description of what you want to automate
44
argument-hint: "[name]"
55
disable-model-invocation: true
66
---
77

8-
You are helping the user create a new **ralph** β€” a reusable task-focused prompt with checks and contexts for autonomous AI coding loops powered by [ralphify](https://github.com/computerlovetech/ralphify).
8+
You are helping the user create a new **ralph** β€” a reusable automation for autonomous AI coding loops powered by ralphify. The user does NOT need to know how ralphify works internally. Your job is to translate their plain description into a working ralph setup.
99

10-
## Ralphify primitives reference
10+
## What you need from the user
1111

12-
A ralph lives at `.ralphify/ralphs/<name>/RALPH.md` and consists of:
12+
Ask the user to **describe what they want to automate** in plain language. For example:
13+
- "I want to write tests for my Python project until I hit 90% coverage"
14+
- "I want to refactor all my JavaScript files to TypeScript"
15+
- "I want to fix linting errors across the codebase"
1316

14-
### RALPH.md
17+
If `$ARGUMENTS` was provided, use it as the ralph name. Otherwise, derive a short kebab-case name from their description.
18+
19+
Ask **only what you need** to build a good setup:
20+
- What does "done" look like for one cycle of work?
21+
- What language/tools/framework is the project using?
22+
- Any conventions or constraints to follow?
23+
24+
Do NOT ask the user about checks, contexts, frontmatter, or other ralphify internals. Figure those out yourself based on their description.
25+
26+
## How ralphs work (internal reference β€” do not expose to user)
27+
28+
A ralph is a directory at `.ralphify/ralphs/<name>/` containing a prompt and optional validation and data injection.
29+
30+
### RALPH.md β€” the prompt
1531

1632
```markdown
1733
---
1834
description: What this ralph does (one line)
35+
checks: [global-check-name] # optional: include global checks
36+
contexts: [global-context-name] # optional: include global contexts
37+
args: [dir, focus] # optional: declare positional CLI arg names
1938
enabled: true
2039
---
2140

22-
Your prompt content here. This is piped to the agent as stdin each iteration.
41+
Prompt text piped to the agent each iteration.
42+
Use {{ contexts.context-name }} to place context output.
43+
Use {{ args.name }} for user arguments passed from the CLI.
2344
```
2445

25-
### Checks
26-
27-
Checks validate the agent's work **after each iteration**. If a check fails, its output and failure instruction are appended to the next iteration's prompt.
46+
### Checks β€” post-iteration validation
2847

2948
Location: `.ralphify/ralphs/<name>/checks/<check-name>/CHECK.md`
3049

@@ -37,15 +56,11 @@ enabled: true
3756
Fix all failing tests. Do not skip or delete tests.
3857
```
3958

40-
- `command`: parsed with `shlex.split()` β€” no shell features (pipes, `&&`, redirections)
41-
- `timeout`: seconds before the check is killed (default: 60)
42-
- `enabled`: set to `false` to skip without deleting
59+
- `command` is parsed with `shlex.split()` β€” no shell features (pipes, `&&`, redirections)
4360
- Body text = failure instruction shown to the agent when the check fails
44-
- If you need shell features, create a `run.sh` or `run.py` script in the check directory instead of using `command`
45-
46-
### Contexts
61+
- For shell features, create a `run.sh` or `run.py` script instead of using `command`
4762

48-
Contexts inject **dynamic data** into the prompt **before each iteration** β€” git history, coverage reports, file listings, etc.
63+
### Contexts β€” dynamic data injected before each iteration
4964

5065
Location: `.ralphify/ralphs/<name>/contexts/<context-name>/CONTEXT.md`
5166

@@ -59,58 +74,54 @@ enabled: true
5974
```
6075

6176
- Body text appears as a label above the command output
62-
- Contexts run regardless of command exit code
63-
- Place contexts in the prompt with `{{ contexts.context-name }}` β€” each context must be referenced by name
77+
- Reference in the prompt with `{{ contexts.context-name }}`
78+
79+
### User arguments
80+
81+
Ralphs can accept CLI arguments, making them reusable across different projects or configurations:
82+
83+
- **Named flags**: `ralph run research --dir ./src --focus "perf"` β†’ `{{ args.dir }}`, `{{ args.focus }}`
84+
- **Positional args**: `ralph run research ./src "perf"` β€” requires `args: [dir, focus]` in frontmatter
85+
- Missing args resolve to empty string
86+
- Context and check scripts receive them as `RALPH_ARG_<KEY>` environment variables (uppercase, hyphens β†’ underscores)
87+
88+
Use args when a ralph could be reused across different directories, files, thresholds, or configurations.
6489

6590
### Scripts
6691

67-
For commands needing shell features (pipes, redirects, `&&`), create a `run.sh` or `run.py` in the primitive directory. If both a `command` and a `run.*` script exist, the script takes precedence. Remember to `chmod +x` scripts.
92+
For commands needing shell features, create `run.sh` / `run.py` in the primitive directory. Script takes precedence over `command`. Remember `chmod +x`.
6893

6994
### Execution order
7095

71-
Primitives run in alphabetical order by directory name. Use number prefixes to control order: `01-lint/`, `02-tests/`.
96+
Primitives run alphabetically. Use number prefixes: `01-lint/`, `02-tests/`.
7297

7398
### Output truncation
7499

75100
All primitive output is truncated to 5000 characters.
76101

77102
## Your workflow
78103

79-
1. **Get the ralph name.** If `$ARGUMENTS` was provided, use it as the ralph name (convert to kebab-case if needed). Otherwise, ask the user what task they want to automate and derive a short kebab-case name.
80-
81-
2. **Ask clarifying questions.** Understand the task well enough to write a good prompt:
82-
- What does the agent need to accomplish each iteration?
83-
- What codebase, language, or tools are involved?
84-
- What validation matters? (tests, linting, type checking, builds, etc.)
85-
- Are there existing patterns or conventions to follow?
86-
87-
3. **Create the RALPH.md** at `.ralphify/ralphs/<name>/RALPH.md` with:
88-
- Frontmatter with a clear `description`
89-
- A well-structured prompt that tells the agent:
90-
- What it is and what it's doing
91-
- That each iteration starts fresh (progress lives in code and git)
92-
- Specific rules and constraints
93-
- Where to place context output (use named placeholders like `{{ contexts.name }}`)
94-
- Follow these prompt patterns:
95-
- Start with role and loop awareness: "You are an autonomous X agent running in a loop."
96-
- Include "Each iteration starts with a fresh context. Your progress lives in the code and git."
97-
- Be specific about what "one iteration" means
98-
- Include rules as a bulleted list
99-
- End with commit message conventions
100-
101-
4. **Create checks** at `.ralphify/ralphs/<name>/checks/<check-name>/CHECK.md`:
102-
- Always include relevant validation (tests, linting, type checking, builds)
103-
- Write clear failure instructions that tell the agent HOW to fix the problem
104-
- Use scripts (`run.sh`) when shell features are needed
104+
1. **Understand the task.** Get a plain-English description. Ask short clarifying questions if needed β€” no more than 2-3.
105105

106-
5. **Create contexts** at `.ralphify/ralphs/<name>/contexts/<context-name>/CONTEXT.md` if useful:
107-
- Git log for tracking progress across iterations
108-
- Coverage reports for test-writing tasks
109-
- File listings for navigation
110-
- Use scripts for commands needing shell features
106+
2. **Design the ralph.** Based on the description, decide:
107+
- What prompt to write
108+
- What checks will catch mistakes (tests, lint, type checks, builds, etc.)
109+
- What context the agent needs each iteration (git log, coverage reports, file listings, etc.)
110+
- Whether user arguments would make the ralph more reusable
111111

112-
6. **Set permissions** β€” run `chmod +x` on any `run.sh` or `run.py` scripts you create.
113-
114-
7. **Show a summary** of everything you created (file tree with paths).
115-
116-
8. **Suggest testing** with: `ralph run <name> -n 1`
112+
3. **Create everything:**
113+
- `RALPH.md` with a clear, specific prompt. Follow these patterns:
114+
- Start with role and loop awareness: "You are an autonomous X agent running in a loop."
115+
- Include: "Each iteration starts with a fresh context. Your progress lives in the code and git."
116+
- Be specific about what one iteration of work looks like
117+
- Include rules as a bulleted list
118+
- End with commit conventions
119+
- Checks for any validation that matters (tests, linting, type checking, builds)
120+
- Contexts for dynamic data the agent needs
121+
- `chmod +x` on any scripts
122+
123+
4. **Present a summary** to the user:
124+
- Show the file tree of what you created
125+
- Briefly explain what the ralph will do in each iteration
126+
- Mention any checks that will catch errors
127+
- Suggest running: `ralph run <name> -n 1`

β€Žtests/test_cli.pyβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ def test_installs_skill_and_launches_agent(self, mock_which, mock_execvp, tmp_pa
621621
skill_file = tmp_path / ".claude" / "skills" / "new-ralph" / "SKILL.md"
622622
assert skill_file.exists()
623623
assert "new-ralph" in skill_file.read_text()
624-
mock_execvp.assert_called_once_with("claude", ["claude", "/new-ralph my-task"])
624+
mock_execvp.assert_called_once_with("claude", ["claude", "--dangerously-skip-permissions", "/new-ralph my-task"])
625625

626626
@patch("ralphify.cli.os.execvp")
627627
@patch("shutil.which", return_value="/usr/bin/claude")
@@ -631,7 +631,7 @@ def test_name_is_optional(self, mock_which, mock_execvp, tmp_path, monkeypatch):
631631

632632
result = runner.invoke(app, ["new"])
633633
assert result.exit_code == 0
634-
mock_execvp.assert_called_once_with("claude", ["claude", "/new-ralph"])
634+
mock_execvp.assert_called_once_with("claude", ["claude", "--dangerously-skip-permissions", "/new-ralph"])
635635

636636
@patch("shutil.which", return_value=None)
637637
def test_errors_when_no_agent_found(self, mock_which, tmp_path, monkeypatch):

β€Žtests/test_skills.pyβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ def test_overwrites_existing(self, tmp_path, monkeypatch):
111111
class TestBuildAgentCommand:
112112
def test_claude_with_name(self):
113113
cmd = build_agent_command("claude", "new-ralph", "my-task")
114-
assert cmd == ["claude", "/new-ralph my-task"]
114+
assert cmd == ["claude", "--dangerously-skip-permissions", "/new-ralph my-task"]
115115

116116
def test_claude_without_name(self):
117117
cmd = build_agent_command("claude", "new-ralph", None)
118-
assert cmd == ["claude", "/new-ralph"]
118+
assert cmd == ["claude", "--dangerously-skip-permissions", "/new-ralph"]
119119

120120
def test_codex_with_name(self):
121121
cmd = build_agent_command("codex", "new-ralph", "my-task")

β€Žuv.lockβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)