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.
@@ -0,0 +1,100 @@
1
+ # Using Ralphie
2
+
3
+ Ralphie is an autonomous AI coding loop. You write a SPEC, Ralphie works through it task by task.
4
+
5
+ ## Quick Start
6
+
7
+ 1. **Create a SPEC.md** with your project requirements and tasks
8
+ 2. **Run Ralphie**: `ralphie run` or `ralphie run -n 5` for multiple iterations
9
+
10
+ ## Project Structure
11
+
12
+ Ralphie expects this structure:
13
+
14
+ ```
15
+ your-project/
16
+ ├── .claude/
17
+ │ └── ralphie.md # Coding standards (auto-created)
18
+ ├── .ai/ralphie/
19
+ │ ├── plan.md # Current task plan (Ralphie writes this)
20
+ │ └── index.md # Commit history (Ralphie appends here)
21
+ ├── SPEC.md # YOUR requirements (you write this)
22
+ ├── STATE.txt # Progress log (Ralphie updates this)
23
+ └── src/ # Your code
24
+ ```
25
+
26
+ ## Writing a SPEC
27
+
28
+ Your SPEC.md should have checkboxes for tasks. **Each checkbox = one Ralphie iteration**, so batch related work together.
29
+
30
+ ```markdown
31
+ # My Project
32
+
33
+ ## Overview
34
+ Brief description of what you're building.
35
+
36
+ ## Phase 1: Setup
37
+ - [ ] Initialize project with TypeScript, testing, and linting
38
+ - [ ] Set up database models and migrations
39
+ - User model with email, password hash, timestamps
40
+ - Post model with title, body, author reference
41
+ - Comment model with body, author, post reference
42
+
43
+ ## Phase 2: Core Features
44
+ - [ ] Implement authentication system
45
+ - POST /auth/register - create user with hashed password
46
+ - POST /auth/login - validate credentials, return JWT
47
+ - POST /auth/logout - invalidate token
48
+ - Middleware for protected routes
49
+ - Tests for all auth flows
50
+
51
+ - [ ] Build posts API with full CRUD
52
+ - GET/POST/PUT/DELETE endpoints
53
+ - Authorization (only author can edit/delete)
54
+ - Pagination for list endpoint
55
+ - Tests for all operations
56
+ ```
57
+
58
+ ### Task Design Principles
59
+
60
+ **One checkbox = one iteration.** Sub-bullets are implementation details, not separate tasks.
61
+
62
+ | Pattern | Iterations | Throughput |
63
+ |---------|------------|------------|
64
+ | `- [ ] Create db.ts`<br>`- [ ] Create redis.ts`<br>`- [ ] Create queue.ts` | 3 | Low |
65
+ | `- [ ] Create data layer (db.ts, redis.ts, queue.ts)` | 1 | High |
66
+
67
+ **Batching heuristics:**
68
+ - Same verb? Batch them. ("Create X, Create Y" → "Create X and Y")
69
+ - Same feature? Batch them. (model + API + tests = one task)
70
+ - Files that import each other? Batch them.
71
+ - Sweet spot: 3-7 files or ~200-500 lines per task
72
+
73
+ **Include with each task:**
74
+ - Implementation AND tests
75
+ - Related files that depend on each other
76
+ - All sub-components of a feature
77
+
78
+ ## Commands
79
+
80
+ ```bash
81
+ ralphie run # Run one iteration
82
+ ralphie run -n 5 # Run 5 iterations
83
+ ralphie run --help # See all options
84
+ ```
85
+
86
+ ## The Loop
87
+
88
+ Each iteration, Ralphie:
89
+ 1. Reads SPEC.md to find the next incomplete task
90
+ 2. Writes a plan to .ai/ralphie/plan.md
91
+ 3. Implements the task with tests
92
+ 4. Commits changes
93
+ 5. Updates STATE.txt and .ai/ralphie/index.md
94
+
95
+ ## Tips
96
+
97
+ - **Clean git state**: Ralphie requires no uncommitted changes before running
98
+ - **One task per iteration**: Don't expect multiple checkboxes done at once
99
+ - **Check STATE.txt**: See what's been done if you're unsure
100
+ - **Edit SPEC anytime**: Add/remove/reorder tasks between runs
@@ -0,0 +1,2 @@
1
+ # Progress Log
2
+