Presets¶
Presets are pre-configured workflows for common development patterns. They save you from writing hat configurations from scratch.
Using Presets¶
# List all presets
ralph init --list-presets
# Initialize with a preset
ralph init --preset feature
# Combine with backend
ralph init --preset spec-driven --backend kiro
# Overwrite existing config
ralph init --preset debug --force
Available Presets¶
Development Workflows¶
feature¶
Standard feature development with planning and building.
Hats: Builder → Reviewer Best for: General feature implementation
code-assist¶
TDD implementation from specs, tasks, or rough descriptions.
Hats: Planner → Builder → Validator → Committer Best for: Structured TDD development, working from specs or task definitions
spec-driven¶
Specification-first development with contract-based implementation.
Hats: Spec Writer → Spec Critic → Implementer → Verifier Best for: Complex features with clear requirements, given-when-then acceptance criteria
refactor¶
Code refactoring workflow with atomic steps.
Hats: Refactorer → Verifier Best for: Large refactors, technical debt cleanup
pdd-to-code-assist¶
Full autonomous idea-to-code pipeline (9-hat orchestration).
Hats: Inquisitor → Architect → Design Critic → Explorer → Planner → Task Writer → Builder → Validator → Committer Best for: End-to-end autonomous development from a rough idea
Bug Fixing & Debugging¶
bugfix¶
Systematic bug reproduction, fix, and verification.
Hats: Reproducer → Fixer → Verifier → Committer Best for: Bug fixes with reproducible test cases
debug¶
Bug investigation and root cause analysis using hypothesis-driven approach.
Hats: Investigator → Tester → Fixer → Verifier Best for: Bug hunting, issue resolution, unknown root causes
Review & Quality¶
review¶
Code review workflow producing structured feedback.
Hats: Reviewer → Analyzer Best for: Code quality checks, structured feedback
pr-review¶
Multi-perspective PR review with specialized reviewers.
Hats: Correctness Reviewer → Security Reviewer → Architecture Reviewer → Synthesizer Best for: Comprehensive PR reviews from multiple angles
gap-analysis¶
Compare specifications against implementation to find discrepancies.
Hats: Analyzer → Verifier → Reporter Best for: Audit, compliance, spec-vs-implementation comparison
Documentation & Research¶
docs¶
Documentation writing with writer/editor review cycle.
Hats: Writer → Reviewer Best for: Creating and updating documentation
research¶
Deep exploration and analysis (no code changes).
Hats: Researcher → Synthesizer Best for: Codebase exploration, technical investigation, market research
Operations¶
deploy¶
Deployment and release workflow with validation and monitoring.
Hats: Builder → Deployer → Verifier Best for: Deployment pipelines, release management
Preset Patterns¶
Pipeline¶
Linear A → B → C flow:
flowchart LR
A[Hat A] --> B[Hat B]
B --> C[Hat C] Examples: feature, bugfix, docs
Supervisor-Worker¶
Coordinator with specialists:
flowchart TB
S[Supervisor] --> A[Worker A]
S --> B[Worker B]
A --> S
B --> S Examples: pr-review, pdd-to-code-assist
Critic-Actor¶
One proposes, another critiques:
flowchart LR
A[Actor] --> C[Critic]
C -->|approved| Done
C -->|rejected| A Examples: spec-driven, review
Customizing Presets¶
After initializing with a preset, modify ralph.yml:
# Start with preset
ralph init --preset feature
# Edit ralph.yml to customize
hats:
builder:
instructions: |
Custom instructions for your project...
Creating Your Own Presets¶
Presets are stored in /presets/. Create a new one:
# presets/my-workflow.yml
name: "My Workflow"
description: "Custom workflow for my team"
event_loop:
starting_event: "task.start"
completion_promise: "LOOP_COMPLETE"
hats:
first_hat:
triggers: ["task.start"]
publishes: ["step.done"]
instructions: "..."
second_hat:
triggers: ["step.done"]
publishes: ["LOOP_COMPLETE"]
instructions: "..."
Then use it:
Next Steps¶
- Learn about Configuration for full options
- Explore Writing Prompts for better results
- See Creating Custom Hats for advanced workflows