ralphie 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Skylar Barrera
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,110 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="ralphie-white.png">
4
+ <source media="(prefers-color-scheme: light)" srcset="ralphie-black.png">
5
+ <img src="ralphie-black.png" alt="Ralphie" width="200">
6
+ </picture>
7
+ </p>
8
+
9
+ # Ralphie
10
+
11
+ **Let AI code while you sleep.**
12
+
13
+ Ralphie runs AI in a loop until your project is done. 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
+
15
+ ```bash
16
+ ralphie spec "Todo app with auth" # AI interviews you, creates SPEC.md
17
+ ralphie run --all # Builds until done
18
+ ```
19
+
20
+ ## Quick Start
21
+
22
+ **1. Install Ralphie**
23
+
24
+ ```bash
25
+ npm install -g ralphie
26
+ ```
27
+
28
+ **2. Set up your AI provider**
29
+
30
+ ```bash
31
+ # Claude (default)
32
+ curl -fsSL https://anthropic.com/install-claude.sh | sh
33
+
34
+ # Or Codex
35
+ npm install -g @openai/codex && export OPENAI_API_KEY=sk-...
36
+ ```
37
+
38
+ **3. Build something**
39
+
40
+ ```bash
41
+ ralphie spec "REST API with JWT auth" # Creates SPEC.md
42
+ ralphie run --all # Builds it
43
+ git log --oneline # See what was built
44
+ ```
45
+
46
+ ## How It Works
47
+
48
+ Each iteration:
49
+ 1. Fresh context (no accumulated confusion)
50
+ 2. Reads SPEC.md → picks next unchecked task
51
+ 3. Implements, tests, commits
52
+ 4. Exits → loop restarts clean
53
+
54
+ **The insight:** Progress lives in git, not the LLM's context. The AI can fail—next iteration starts fresh and sees only committed work.
55
+
56
+ ## Commands
57
+
58
+ | Command | Description |
59
+ |---------|-------------|
60
+ | `ralphie spec "desc"` | Generate SPEC via AI interview |
61
+ | `ralphie run` | Run one iteration |
62
+ | `ralphie run -n 5` | Run 5 iterations |
63
+ | `ralphie run --all` | Run until SPEC complete |
64
+ | `ralphie run --greedy` | Multiple tasks per iteration |
65
+ | `ralphie run --headless` | JSON output for CI/CD |
66
+ | `ralphie init` | Add to existing project |
67
+ | `ralphie validate` | Check SPEC format |
68
+
69
+ Use `--harness codex` to switch AI providers. See [CLI Reference](docs/cli.md) for all options.
70
+
71
+ ## SPEC Format
72
+
73
+ Ralphie works from a `SPEC.md` checklist:
74
+
75
+ ```markdown
76
+ # My Project
77
+
78
+ - [ ] Set up Express with TypeScript
79
+ - [ ] Create User model with bcrypt
80
+ - [ ] Add /auth/login endpoint
81
+ - [ ] Add /auth/register endpoint
82
+ - [ ] Write tests
83
+ ```
84
+
85
+ Tasks get checked off as completed. See [SPEC Guide](docs/spec-guide.md) for best practices.
86
+
87
+ ## Troubleshooting
88
+
89
+ | Problem | Solution |
90
+ |---------|----------|
91
+ | `command not found: ralphie` | `npm install -g ralphie` |
92
+ | `command not found: claude` | `export PATH="$HOME/.local/bin:$PATH"` |
93
+ | Stuck on same task | Check `- [ ]` format. Run `ralphie validate` |
94
+
95
+ ## Documentation
96
+
97
+ - [CLI Reference](docs/cli.md) — All commands and options
98
+ - [SPEC Guide](docs/spec-guide.md) — Writing effective SPECs
99
+ - [Architecture](docs/architecture.md) — How the loop works
100
+ - [Harnesses](docs/harnesses.md) — Multi-AI provider support
101
+
102
+ ## Requirements
103
+
104
+ - Node.js 18+
105
+ - Claude Code CLI or OpenAI Codex CLI
106
+ - Git
107
+
108
+ ## License
109
+
110
+ MIT
package/bin/ralphie ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '../dist/cli.js';