openralph 2.0.0 → 2.1.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.
Files changed (2) hide show
  1. package/README.md +35 -38
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -97,6 +97,16 @@ The agent never pushes—only commits—so you maintain review control.
97
97
  - [ghuntley.com/ralph](https://ghuntley.com/ralph/)
98
98
  - [lukeparker.dev/stop-chatting-with-ai-start-loops-ralph-driven-development](https://lukeparker.dev/stop-chatting-with-ai-start-loops-ralph-driven-development)
99
99
 
100
+ ### For LLM Agents
101
+
102
+ When tasked by a user to set up or run Ralph:
103
+ 1. Run `ralph init` to create required files (`prd.json`, `.ralph-prompt.md`, `AGENTS.md`)
104
+ 2. Populate `prd.json` with tasks from the user's plan or requirements
105
+ 3. Add project-specific notes to `AGENTS.md` (build commands, pitfalls, conventions)
106
+ 4. Run `ralph` — the loop handles the rest
107
+
108
+ Do NOT manually edit `.ralph-state.json` or `.ralph-lock`. Never `git push` — only commit.
109
+
100
110
  ---
101
111
 
102
112
  ## Usage
@@ -107,6 +117,7 @@ ralph --plan BACKLOG.json # different PRD file
107
117
  ralph --progress progress.txt # custom progress log
108
118
  ralph --model anthropic/claude-opus-4 # different model
109
119
  ralph --reset # remove generated files and state, then exit
120
+ ralph --verbose # enable debug logging to file
110
121
  ralph init --from plan.md # convert unstructured plan to PRD JSON
111
122
  ```
112
123
 
@@ -132,7 +143,8 @@ ralph init --from plan.md # convert unstructured plan to PRD JSON
132
143
  | `--debug, -d` | `false` | Manual session creation |
133
144
  | `--yes` | `false` | Auto-confirm prompts |
134
145
  | `--auto-reset` | `true` | Auto-reset when no TTY prompt |
135
- | `--force` | `false` | Force acquire session lock |
146
+ | `--force, -f` | `false` | Force acquire session lock |
147
+ | `--verbose, -V` | `false` | Enable verbose debug logging to file |
136
148
  | `--fallback-agent` | (none) | Fallback agent mapping (format: `primary:fallback`) |
137
149
 
138
150
  ### Init Subcommand
@@ -218,6 +230,7 @@ CLI arguments override config file values.
218
230
  | `RALPH_PLAN` | Override plan file path |
219
231
  | `RALPH_PROGRESS` | Override progress log path |
220
232
  | `RALPH_SERVER` | Override OpenCode server URL |
233
+ | `RALPH_LOG_DIR` | Override debug log directory |
221
234
 
222
235
  ### Safety & Reliability
223
236
 
@@ -237,48 +250,31 @@ CLI arguments override config file values.
237
250
 
238
251
  ## Writing PRDs
239
252
 
240
- Prefer PRD JSON with `passes` flags so Ralph can track scope and progress. Two formats are supported:
253
+ PRD JSON uses `passes` flags so Ralph can track scope and progress. Two formats supported:
241
254
 
242
- **Plain array (user-created):**
243
- ```json
244
- [
245
- {
246
- "category": "functional",
247
- "description": "Create the CLI entry point",
248
- "steps": [
249
- "Run the CLI with --help",
250
- "Verify the help output renders"
251
- ],
252
- "passes": false
253
- }
254
- ]
255
- ```
255
+ **Plain array** (user-created) or **wrapped format** (generated by `ralph init` with metadata).
256
256
 
257
- **Wrapped format (generated by `ralph init`):**
258
- ```json
259
- {
260
- "metadata": {
261
- "generated": true,
262
- "generator": "ralph-init",
263
- "createdAt": "2025-01-13T00:00:00.000Z",
264
- "sourceFile": "plan.md"
265
- },
266
- "items": [
267
- {
268
- "category": "functional",
269
- "description": "Create the CLI entry point",
270
- "passes": false
271
- }
272
- ]
273
- }
274
- ```
257
+ ### Task Item Fields
258
+
259
+ | Field | Required | Description |
260
+ |-------|----------|-------------|
261
+ | `description` | ✅ | Task description |
262
+ | `passes` | ✅ | Whether complete |
263
+ | `id` | ❌ | Custom ID (e.g., `"1.1.1"`) |
264
+ | `category` | ❌ | Category (e.g., `functional`, `setup`) |
265
+ | `steps` | ❌ | Verification steps |
266
+ | `status` | ❌ | `pending` / `actionable` / `active` / `done` / `blocked` / `error` |
267
+ | `effort` | ❌ | `XS` / `S` / `M` / `L` / `XL` |
268
+ | `risk` | ❌ | `L` / `M` / `H` |
269
+
270
+ **See [`prd.example.json`](prd.example.json) for a complete example with all fields.**
271
+
272
+ ### Tips
275
273
 
276
- **Tips:**
277
274
  - Small, isolated tasks — one commit each
278
275
  - Explicit verification steps
279
- - Set `passes` to true only when verified
280
- - 1000+ lines is normal; more detail = fewer hallucinations
281
- - Legacy markdown checkboxes work too, but `ralph init --from plan.md` is the upgrade path
276
+ - Use `effort` and `risk` for prioritization (high-risk first)
277
+ - Legacy markdown checkboxes work, but `ralph init --from plan.md` is the upgrade path
282
278
 
283
279
  ---
284
280
 
@@ -295,6 +291,7 @@ Prefer PRD JSON with `passes` flags so Ralph can track scope and progress. Two f
295
291
  | `.ralph-pause` | Created by `p` key to pause loop |
296
292
  | `.opencode/plugin/ralph-write-guardrail.ts` | Protects files from AI modification |
297
293
  | `AGENTS.md` | Project configuration for AI agents |
294
+ | `~/.local/state/ralph/logs/*.log` | Debug and memory logs (when `--verbose` is enabled) |
298
295
 
299
296
  Add to `.gitignore`:
300
297
  ```
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "openralph",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Ralph Driven Development using OpenCode SDK and OpenTUI",
5
5
  "bin": {
6
6
  "ralph": "./bin/ralph"
7
7
  },
8
8
  "optionalDependencies": {
9
- "openralph-darwin-arm64": "2.0.0",
10
- "openralph-darwin-x64": "2.0.0",
11
- "openralph-linux-arm64": "2.0.0",
12
- "openralph-linux-x64": "2.0.0",
13
- "openralph-windows-x64": "2.0.0"
9
+ "openralph-darwin-arm64": "2.1.0",
10
+ "openralph-darwin-x64": "2.1.0",
11
+ "openralph-linux-arm64": "2.1.0",
12
+ "openralph-linux-x64": "2.1.0",
13
+ "openralph-windows-x64": "2.1.0"
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",