ralphie 1.1.2 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -40
- package/dist/cli.js +2612 -1246
- package/package.json +4 -3
- package/skills/SKILLS.md +6 -52
- package/skills/ralphie-spec/SKILL.md +75 -8
- package/templates/.ralphie/llms.txt +88 -0
- package/templates/.ralphie/settings.json +29 -0
- package/templates/.ralphie/specs/templates/.gitkeep +0 -0
- package/skills/ralphie-iterate/SKILL.md +0 -472
- package/skills/review-spec/SKILL.md +0 -539
- package/skills/verify/SKILL.md +0 -496
- package/templates/specs/lessons.md +0 -18
- /package/templates/{specs → .ralphie/specs}/active/.gitkeep +0 -0
- /package/templates/{specs → .ralphie/specs}/completed/.gitkeep +0 -0
- /package/templates/{STATE.txt → .ralphie/state.txt} +0 -0
package/README.md
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
# Ralphie
|
|
10
10
|
|
|
11
|
-
**
|
|
11
|
+
**Autonomous AI coding loops.**
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Based on the [Ralph Wiggum technique](https://github.com/ghuntley/how-to-ralph-wiggum): describe what you want → AI builds it task by task → each task gets committed → come back to working code.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
16
|
+
ralphie spec "Todo app with auth" # Creates spec
|
|
17
17
|
ralphie run --all # Builds until done
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -38,26 +38,19 @@ npm install -g @openai/codex && export OPENAI_API_KEY=sk-...
|
|
|
38
38
|
npm install -g opencode-ai && opencode auth login
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
**3.
|
|
41
|
+
**3. Build something**
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
**4. Build something**
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
# Option A: Interactive (user present) - run in Claude/Codex/OpenCode:
|
|
51
|
-
/ralphie-spec "REST API with JWT auth"
|
|
52
|
-
|
|
53
|
-
# Option B: Autonomous (unattended) - run from CLI:
|
|
44
|
+
# Create a spec
|
|
54
45
|
ralphie spec "REST API with JWT auth"
|
|
55
46
|
|
|
56
|
-
#
|
|
57
|
-
ralphie run --all
|
|
58
|
-
git log --oneline
|
|
47
|
+
# Run the loop
|
|
48
|
+
ralphie run --all
|
|
49
|
+
git log --oneline # See what was built
|
|
59
50
|
```
|
|
60
51
|
|
|
52
|
+
**What happens next?** Ralphie generates a structured spec with research and analysis, then executes task-by-task with fresh context each iteration. Progress lives in git commits—the AI can fail, the loop restarts clean.
|
|
53
|
+
|
|
61
54
|
## How It Works
|
|
62
55
|
|
|
63
56
|
Each iteration:
|
|
@@ -68,40 +61,51 @@ Each iteration:
|
|
|
68
61
|
|
|
69
62
|
**The insight:** Progress lives in git, not the LLM's context. The AI can fail—next iteration starts fresh and sees only committed work.
|
|
70
63
|
|
|
71
|
-
|
|
64
|
+
**What makes Ralphie different:** Structured specs with task IDs, status tracking, size budgeting, and verify commands. The AI knows exactly what to build, how to check it worked, and when it's done. No ambiguity, no drift.
|
|
65
|
+
|
|
66
|
+
## Key Features
|
|
67
|
+
|
|
68
|
+
**Compound Engineering** - Each failure makes the system better:
|
|
69
|
+
- **Research phase**: Fetches framework-specific best practices from [skills.sh](https://skills.sh) (React, Next.js, Expo, etc.) and web research
|
|
70
|
+
- **Dynamic tool selection**: Discovers best-in-class libraries for your stack (not hardcoded recommendations)
|
|
71
|
+
- **Multi-agent review**: Security, performance, architecture checks before implementation
|
|
72
|
+
- **Learnings system**: Captures failure→fix transitions as reusable knowledge
|
|
73
|
+
- **Quality enforcement**: >80% test coverage mandatory, typed interfaces required, security by default
|
|
74
|
+
- **Debug logs**: Full audit trail in `.ralphie/logs/` viewable with `ralphie logs`
|
|
72
75
|
|
|
73
|
-
|
|
76
|
+
**Senior Engineer Output** - Code quality built-in:
|
|
77
|
+
- Research recommends current best tools (Zod, bcrypt, expo-auth-session)
|
|
78
|
+
- Specs include explicit quality requirements (tests, security, architecture)
|
|
79
|
+
- Test validator blocks task completion without >80% coverage
|
|
80
|
+
- Clean, maintainable code with proper separation of concerns
|
|
81
|
+
- See [Code Quality Standards](docs/code-quality-standards.md) for details
|
|
82
|
+
|
|
83
|
+
Inspired by [EveryInc/compound-engineering-plugin](https://github.com/EveryInc/compound-engineering-plugin). See [Architecture docs](docs/architecture.md) for details.
|
|
84
|
+
|
|
85
|
+
## Commands
|
|
74
86
|
|
|
75
87
|
| Command | Description |
|
|
76
88
|
|---------|-------------|
|
|
77
|
-
| `ralphie spec "desc"` | Generate spec autonomously
|
|
89
|
+
| `ralphie spec "desc"` | Generate spec autonomously with research + analysis |
|
|
90
|
+
| `ralphie spec --skip-research` | Skip deep research phase |
|
|
91
|
+
| `ralphie spec --skip-analyze` | Skip SpecFlow analysis phase |
|
|
78
92
|
| `ralphie run` | Run one iteration |
|
|
79
93
|
| `ralphie run -n 5` | Run 5 iterations |
|
|
80
94
|
| `ralphie run --all` | Run until spec complete |
|
|
95
|
+
| `ralphie run --review` | Run multi-agent review before iteration |
|
|
96
|
+
| `ralphie run --force` | Override P1 blocking (use with `--review`) |
|
|
81
97
|
| `ralphie run --greedy` | Multiple tasks per iteration |
|
|
82
98
|
| `ralphie run --headless` | JSON output for CI/CD |
|
|
83
99
|
| `ralphie init` | Add to existing project |
|
|
84
100
|
| `ralphie validate` | Check spec format |
|
|
85
101
|
| `ralphie status` | Show progress of active spec |
|
|
86
102
|
| `ralphie spec-list` | List active and completed specs |
|
|
103
|
+
| `ralphie logs` | View iteration logs (with --tail, --filter) |
|
|
87
104
|
| `ralphie archive` | Move completed spec to archive |
|
|
88
105
|
|
|
89
|
-
Use `--harness codex` or `--harness opencode` to switch AI providers. See [CLI Reference](docs/cli.md) for all options.
|
|
90
|
-
|
|
91
|
-
### Skills (via [add-skill](https://github.com/vercel-labs/add-skill))
|
|
92
|
-
|
|
93
|
-
| Skill | Description |
|
|
94
|
-
|-------|-------------|
|
|
95
|
-
| `/ralphie-spec` | Generate spec through user interview (requires user) |
|
|
96
|
-
| `/review-spec` | Validate spec format and content |
|
|
97
|
-
| `/ralphie-iterate` | Execute one iteration (used by `ralphie run`) |
|
|
98
|
-
| `/verify` | Pre-commit verification |
|
|
99
|
-
|
|
100
|
-
Install all skills: `npx add-skill skylarbarrera/ralphie`
|
|
101
|
-
|
|
102
106
|
## Spec Format
|
|
103
107
|
|
|
104
|
-
Ralphie works from structured specs in
|
|
108
|
+
Ralphie works from structured specs in `.ralphie/specs/active/`:
|
|
105
109
|
|
|
106
110
|
```markdown
|
|
107
111
|
# My Project
|
|
@@ -136,6 +140,15 @@ Goal: Build a REST API with authentication
|
|
|
136
140
|
|
|
137
141
|
Tasks transition from `pending` → `in_progress` → `passed`/`failed`. See [Spec Guide](docs/spec-guide.md) for best practices.
|
|
138
142
|
|
|
143
|
+
## Project Structure
|
|
144
|
+
|
|
145
|
+
After `ralphie init`, you'll have:
|
|
146
|
+
- `.ralphie/specs/active/` - Generated specs with task tracking
|
|
147
|
+
- `.ralphie/logs/` - Timestamped logs (research, spec generation, iterations)
|
|
148
|
+
- `.ralphie/learnings/` - Captured failure→fix knowledge
|
|
149
|
+
- `.ralphie/state.txt` - Iteration progress log
|
|
150
|
+
|
|
151
|
+
See [Architecture docs](docs/architecture.md) for complete structure and file formats.
|
|
139
152
|
|
|
140
153
|
## Troubleshooting
|
|
141
154
|
|
|
@@ -146,15 +159,15 @@ Tasks transition from `pending` → `in_progress` → `passed`/`failed`. See [Sp
|
|
|
146
159
|
| `Missing ANTHROPIC_API_KEY` | `export ANTHROPIC_API_KEY=sk-ant-...` (add to .zshrc) |
|
|
147
160
|
| `Missing OPENAI_API_KEY` | `export OPENAI_API_KEY=sk-...` (add to .zshrc) |
|
|
148
161
|
| Stuck on same task | Check task status. Run `ralphie validate` |
|
|
149
|
-
| No spec found |
|
|
162
|
+
| No spec found | `ralphie spec "description"` to create one |
|
|
150
163
|
|
|
151
164
|
## Documentation
|
|
152
165
|
|
|
153
|
-
- [CLI Reference](docs/cli.md)
|
|
154
|
-
- [Spec Guide](docs/spec-guide.md)
|
|
155
|
-
- [
|
|
156
|
-
- [
|
|
157
|
-
- [
|
|
166
|
+
- [CLI Reference](docs/cli.md) - All commands, flags, harness options
|
|
167
|
+
- [Spec Guide](docs/spec-guide.md) - Writing effective specs
|
|
168
|
+
- [Architecture](docs/architecture.md) - How the loop works, compound engineering details
|
|
169
|
+
- [Code Quality Standards](docs/code-quality-standards.md) - Senior engineer code quality expectations
|
|
170
|
+
- [Comparison](docs/comparison.md) - How Ralphie compares to other tools
|
|
158
171
|
|
|
159
172
|
## Requirements
|
|
160
173
|
|