From ralph
This skill should be used when the user invokes "/ralph" to initialize a project for autonomous development. Creates .ralph/ directory with stories.json, progress.txt, and learnings.txt for the Ralph loop.
npx claudepluginhub mischasigtermans/claude-ralphThis skill uses the workspace's default tool permissions.
Initialize a project for the Ralph autonomous development loop.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Guides code writing, review, and refactoring with Karpathy-inspired rules to avoid overcomplication, ensure simplicity, surgical changes, and verifiable success criteria.
Executes ctx7 CLI to fetch up-to-date library documentation, manage AI coding skills (install/search/generate/remove/suggest), and configure Context7 MCP. Useful for current API refs, skill handling, or agent setup.
Share bugs, ideas, or general feedback.
Initialize a project for the Ralph autonomous development loop.
CRITICAL: NEVER start implementing within this session. After setup is complete, instruct the user to run ralph from their terminal to begin implementation.
When the user invokes /ralph:
First, analyze the user's request to determine scope:
Single phase indicators (create stories directly):
Multi-phase indicators (offer roadmap):
If multi-phase detected, ask:
This looks like it could be split into phases:
1. [Phase name]
2. [Phase name]
...
Should I create a roadmap with phases, or keep it as one set of stories?
.ralph/ directory if needed.ralph/roadmap.json with phase structure (see format below).ralph/learnings.txt if it doesn't existstories.json or progress.txt yet.gitignoreralph --roadmap.ralph/ already exists:Ask the user what they want to do:
stories.json and add new ones. Progress and learnings are preserved.learnings.txt, no → reset it).ralph to .gitignore (create if needed){
"project": "Project Name",
"phases": [
{
"id": 1,
"title": "Phase Title",
"description": [
"Description bullet 1",
"Description bullet 2"
],
"complete": false
},
{
"id": 2,
"title": "Another Phase",
"description": [
"Description bullet 1"
],
"complete": false
}
]
}
{
"project": "Project Name",
"description": "One-line description",
"stories": [
{
"id": "PROJ-001",
"title": "Short title",
"description": "Detailed description of what needs to be built",
"acceptance_criteria": [
"Criterion 1",
"Criterion 2",
"Tests pass"
],
"priority": 1,
"passes": false
}
]
}
# {Project Name} Progress Log
---
Only create this file if it doesn't already exist. Preserve existing learnings across ralph runs.
# {Project Name} Learnings
## Codebase Patterns
(Patterns discovered during implementation will be added here)
## Gotchas
(Project-specific warnings will be added here)
---
Each story must be completable in ONE iteration (one Claude context window).
Right-sized stories:
Too big (split these):
Rule of thumb: If you can't describe the change in 2-3 sentences, split it.
Stories execute in priority order. Earlier stories must not depend on later ones.
Correct order:
Each criterion must be verifiable, not vague.
Good:
Bad:
For every story, include at least one of:
Detect project type to set appropriate defaults:
Laravel projects (has artisan file):
php artisan test --compactPROJ-001 format (use project name prefix)Node.js projects (has package.json):
PROJ-001 formatPython projects (has pyproject.toml or setup.py):
pytestPROJ-001 formatralph --roadmap)When invoked with phase context, you'll receive a prompt like:
Run /ralph for this phase:
Phase: Phase 1: Data Models
- User and Project models with migrations
- Basic validation and relationships
Create stories only for this phase. Preserve learnings.txt if it exists.
In this mode:
.ralph/progress.txt (new phase = fresh progress).ralph/learnings.txt if it exists<ready>PHASE_READY</ready>Tell the user what happened:
If roadmap created:
.ralph/roadmap.json - created with N phases.ralph/learnings.txt - created (if new).ralph added to .gitignoreralph --roadmap from terminal to startIf stories created:
.ralph/stories.json - created/updated with N stories (N new if adding).ralph/progress.txt - initialized or reset.ralph/learnings.txt - preserved, created, or reset (based on user choice).ralph added to .gitignore (if not already)ralph from terminal to start the autonomous loopralph 1 for a single iterationDo NOT start implementing. The user must run ralph from their terminal.