ralph-method
Apply Ralph Wiggum Method patterns for decomposing tasks into atomic user stories
What this skill does
# Ralph Wiggum Method
The Ralph Wiggum Method is an autonomous AI coding loop that ships features while you sleep. It breaks complex tasks into atomic user stories that can each be completed in a single AI iteration.
## Core Principles
1. **One iteration = One story = One commit**
2. Each story must be completable in a single AI iteration (5-30 minutes of work)
3. Stories are ordered by dependency (infrastructure first, consumers last)
4. Every story ends with build/test verification
5. The loop runs autonomously until all stories pass
## Story Atomicity Rules
A story is atomic when:
- It can be committed independently without breaking the build
- It leaves the codebase in a working state
- It has clear, verifiable "done" criteria
- It doesn't require human intervention mid-way
- It can be code-reviewed as a single logical change
## Story Decomposition Patterns
### API Endpoint
| Priority | Story | Purpose |
|----------|-------|---------|
| 1 | Create schema/types | Define data structures |
| 2 | Create service layer | Business logic |
| 3 | Create route handler | HTTP interface |
| 4 | Add integration test | Verification |
### Database Change
| Priority | Story | Purpose |
|----------|-------|---------|
| 1 | Create migration file | Schema change |
| 2 | Update model/entity | Code representation |
| 3 | Update seed data | Test data |
| 4 | Update consuming code | Integration |
### React Component
| Priority | Story | Purpose |
|----------|-------|---------|
| 1 | Create component skeleton | Structure |
| 2 | Add state/logic | Behavior |
| 3 | Add styling | Appearance |
| 4 | Add tests | Quality |
### Refactoring
| Priority | Story | Purpose |
|----------|-------|---------|
| 1 | Add new implementation alongside old | Parallel path |
| 2 | Migrate consumers one by one | Gradual switch |
| 3 | Remove old implementation | Cleanup |
### Configuration Change
| Priority | Story | Purpose |
|----------|-------|---------|
| 1 | Add environment variables | Define config |
| 2 | Create/update config file | Structure config |
| 3 | Update consuming code | Use config |
## prd.json Schema
```json
{
"branchName": "ralph/feature-name",
"taskDescription": "One-line summary of the task",
"projectContext": {
"framework": "e.g., Next.js, .NET",
"testCommand": "e.g., npm test, dotnet test",
"buildCommand": "e.g., npm run build, dotnet build"
},
"userStories": [
{
"id": "US-001",
"title": "Short descriptive title",
"description": "What to implement in detail",
"acceptanceCriteria": [
"Specific, verifiable criterion 1",
"Specific, verifiable criterion 2",
"Build/test passes"
],
"priority": 1,
"passes": false,
"notes": "Hints, gotchas, references to existing code"
}
]
}
```
### Field Descriptions
- **branchName**: Git branch for all work (format: `ralph/<feature-name>`)
- **taskDescription**: One-line summary for quick context
- **projectContext**: Build/test commands and framework info
- **userStories**: Array of atomic stories in dependency order
- **id**: Unique identifier (US-001, US-002, etc.)
- **title**: Short title for commit messages
- **description**: Full implementation details
- **acceptanceCriteria**: Verifiable conditions for "done"
- **priority**: Execution order (1 = first)
- **passes**: Set to true when story is complete
- **notes**: Additional context, gotchas, file references
## Anti-Patterns to Avoid
### Vague Stories
- BAD: "Update all files"
- GOOD: "Update UserController to use new AuthService"
### Unbounded Scope
- BAD: "Fix bugs as found"
- GOOD: "Fix null reference in UserService.GetById"
### Circular Dependencies
- BAD: Story 3 depends on Story 5 which depends on Story 3
- GOOD: Linear dependency chain
### Too Large
- BAD: "Implement entire authentication system"
- GOOD: Split into: schema, service, middleware, routes, tests
### Missing Verification
- BAD: Story with no acceptance criteria
- GOOD: Every story ends with "Build succeeds" or "Tests pass"
## Story Sizing Guidelines
| Size | Time | Examples |
|------|------|----------|
| XS | 5-10 min | Add config value, create empty file, update import |
| S | 10-20 min | Create simple function, add basic test, update route |
| M | 20-30 min | Create service class, add migration, implement handler |
| L | 30+ min | TOO BIG - split into smaller stories |
## Verification Commands
Every story should end with verification. Common patterns:
```bash
# JavaScript/TypeScript
npm run build && npm test
# .NET
dotnet build && dotnet test
# Python
pytest && python -m py_compile src/*.py
# Go
go build ./... && go test ./...
```
## Progress Tracking
The `progress.txt` file tracks completed stories:
```
# Progress: feature-name
# Total stories: 5
Current story: 3
Completed: 2
---
# Story log
[2025-01-10 10:00] US-001: Create user entity - PASSED
[2025-01-10 10:15] US-002: Add user repository - PASSED
```
## Commit Message Format
```
story US-XXX: <title>
<description of what was done>
```
Example:
```
story US-001: Create user entity
Added UserEntity with id, email, and created_at fields.
Configured EF Core mapping in ApplicationDbContext.
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.