ralphctl 0.21.0 → 0.22.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 (32) hide show
  1. package/README.md +66 -47
  2. package/dist/{cli-3OPZOXH6.mjs → cli-LJZZGXAY.mjs} +6276 -3584
  3. package/dist/cli.mjs +1 -1
  4. package/dist/manifest.json +9 -2
  5. package/dist/prompts/_partials/autonomous-operation.md +16 -0
  6. package/dist/prompts/_partials/decisions.md +1 -1
  7. package/dist/prompts/_partials/evaluation-checkpoint.md +23 -0
  8. package/dist/prompts/_partials/evaluator-failure-modes.md +13 -0
  9. package/dist/prompts/_partials/evidence-bound.md +6 -0
  10. package/dist/prompts/_partials/parallel-tool-calls.md +7 -0
  11. package/dist/prompts/_partials/task-fields.md +35 -0
  12. package/dist/prompts/_partials/task-sizing.md +26 -0
  13. package/dist/prompts/detect-scripts/template.md +10 -10
  14. package/dist/prompts/distill-learnings/template.md +4 -2
  15. package/dist/prompts/evaluate/template.md +20 -49
  16. package/dist/prompts/evaluate-continuation/template.md +14 -45
  17. package/dist/prompts/ideate/template.md +34 -52
  18. package/dist/prompts/implement/template.md +42 -17
  19. package/dist/prompts/implement-continuation/template.md +63 -25
  20. package/dist/prompts/plan/template.md +52 -102
  21. package/dist/prompts/readiness/template.md +25 -26
  22. package/dist/prompts/reproduce/template.md +3 -3
  23. package/dist/skills/ralphctl-alignment/SKILL.md +4 -3
  24. package/dist/skills/ralphctl-cherny-workflow/SKILL.md +3 -3
  25. package/dist/skills/ralphctl-code-review-and-quality/SKILL.md +18 -11
  26. package/dist/skills/ralphctl-debugging-and-error-recovery/SKILL.md +10 -9
  27. package/dist/skills/ralphctl-iterative-review/SKILL.md +8 -4
  28. package/dist/skills/ralphctl-karpathy-guidelines/SKILL.md +2 -2
  29. package/dist/skills/ralphctl-ponytail/SKILL.md +7 -3
  30. package/dist/skills/ralphctl-surgical-simplicity/SKILL.md +5 -3
  31. package/dist/skills/ralphctl-test-driven-development/SKILL.md +4 -3
  32. package/package.json +19 -16
package/README.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![GitHub Copilot CLI](https://img.shields.io/badge/GitHub_Copilot_CLI-supported-000?style=flat&logo=githubcopilot&logoColor=white)](https://docs.github.com/en/copilot/github-copilot-in-the-cli)
10
10
  [![OpenAI Codex CLI](https://img.shields.io/badge/OpenAI_Codex_CLI-supported-412991?style=flat&logo=openai&logoColor=white)](https://github.com/openai/codex)
11
11
  [![OpenCode](https://img.shields.io/badge/OpenCode-supported-f59e0b?style=flat&logo=opencollective&logoColor=white)](https://opencode.ai/)
12
+ [![Grok Build CLI](https://img.shields.io/badge/Grok_Build_CLI-supported-000?style=flat)](https://docs.x.ai/build/overview)
12
13
  [![Built with Donuts](https://img.shields.io/badge/%F0%9F%8D%A9-Built_with_Donuts-ff6f00?style=flat)](https://github.com/lukas-grigis/ralphctl)
13
14
 
14
15
  <p align="center">
@@ -20,7 +21,8 @@
20
21
  **A ralph harness for long-running AI coding tasks — a hardened ralph loop that drives your coding agent of choice
21
22
  ([Claude Code](https://docs.anthropic.com/en/docs/claude-code),
22
23
  [GitHub Copilot CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli),
23
- [OpenAI Codex CLI](https://github.com/openai/codex), or [OpenCode](https://opencode.ai/)) across one or more
24
+ [OpenAI Codex CLI](https://github.com/openai/codex), [OpenCode](https://opencode.ai/), or
25
+ [Grok Build CLI](https://docs.x.ai/build/overview)) across one or more
24
26
  repositories.**
25
27
 
26
28
  > _"I'm helping!"_ — Ralph Wiggum
@@ -48,7 +50,7 @@ plan → generate → evaluate → verify loop turns one-shot prompting into a r
48
50
 
49
51
  AI coding agents are powerful but lose context on long tasks, need babysitting when things break, and have no way to
50
52
  coordinate changes across multiple repositories. ralphctl wraps your chosen AI CLI — Claude Code, GitHub Copilot CLI,
51
- OpenAI Codex CLI, or OpenCode — in a
53
+ OpenAI Codex CLI, OpenCode, or Grok Build CLI — in a
52
54
  structured harness that decomposes your work into dependency-ordered tasks, drives each one through
53
55
  a [generator-evaluator loop](https://www.anthropic.com/engineering/harness-design-long-running-apps) that catches issues
54
56
  before moving on, and persists context across sessions so nothing gets lost.
@@ -74,12 +76,13 @@ ralphctl demo
74
76
 
75
77
  Otherwise, install one of the supported CLIs and authenticate it:
76
78
 
77
- | CLI | Install | Auth |
78
- | ---------------------------------------------------------------------------------- | ------------------------------------ | --------------------- |
79
- | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `npm i -g @anthropic-ai/claude-code` | Anthropic account |
80
- | [GitHub Copilot CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli) | `npm i -g @github/copilot` | GitHub Copilot seat |
81
- | [OpenAI Codex CLI](https://github.com/openai/codex) | `npm i -g @openai/codex` | ChatGPT / OpenAI |
82
- | [OpenCode](https://opencode.ai/) | `npm i -g opencode-ai` | your own key, or none |
79
+ | CLI | Install | Auth |
80
+ | ---------------------------------------------------------------------------------- | ------------------------------------ | -------------------------- |
81
+ | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `npm i -g @anthropic-ai/claude-code` | Anthropic account |
82
+ | [GitHub Copilot CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli) | `npm i -g @github/copilot` | GitHub Copilot seat |
83
+ | [OpenAI Codex CLI](https://github.com/openai/codex) | `npm i -g @openai/codex` | ChatGPT / OpenAI |
84
+ | [OpenCode](https://opencode.ai/) | `npm i -g opencode-ai` | your own key, or none |
85
+ | [Grok Build CLI](https://docs.x.ai/build/overview) | `npm i -g @xai-official/grok` | xAI account (`grok login`) |
83
86
 
84
87
  Then confirm ralphctl can see it:
85
88
 
@@ -89,7 +92,8 @@ ralphctl doctor # checks your provider CLI is on PATH — and reports auth fo
89
92
 
90
93
  `doctor`'s auth check is only as honest as each CLI lets it be: Claude Code and OpenAI Codex answer locally via their own
91
94
  `auth status` / `login status` verbs, OpenCode reports whether it has a saved credential (its free tier works with zero),
92
- and GitHub Copilot has no non-interactive auth-status command at all — that row always reports `unknown`, not a guess.
95
+ and GitHub Copilot and Grok expose no non-interactive auth-status command at all — those rows always report `unknown`,
96
+ not a guess. Sign in to Grok with `grok login`.
93
97
 
94
98
  When `doctor` is green, launch:
95
99
 
@@ -124,7 +128,8 @@ ralphctl ticket list
124
128
 
125
129
  # Manage sprint state
126
130
  ralphctl sprint activate <sprint-id>
127
- ralphctl sprint close <sprint-id> # review → done
131
+ ralphctl sprint close <sprint-id> [-y] # review → done (-y skips the blocked-task confirm)
132
+ ralphctl sprint reopen <sprint-id> # done → review (makes blocked work reachable again)
128
133
  ralphctl sprint remove <sprint-id>
129
134
 
130
135
  # Open a PR for the sprint branch
@@ -136,7 +141,7 @@ ralphctl export-context --sprint <id> --project <id> --output <path>
136
141
 
137
142
  # Settings
138
143
  ralphctl settings show
139
- ralphctl settings apply-preset claude-only # or mixed / copilot-only / codex-only / opencode-only / *-economic / *-strong-gate / *-fast / *-frontier
144
+ ralphctl settings apply-preset claude-only # or mixed / copilot-only / codex-only / opencode-only / grok-only / *-economic / *-strong-gate / *-fast / *-frontier
140
145
  ralphctl settings set ai.implement.generator.provider claude-code
141
146
  ralphctl settings set ai.implement.generator.model <model-id>
142
147
  ralphctl settings set ai.implement.generator.effort high
@@ -220,34 +225,44 @@ For the full architectural picture see [`.claude/docs/ARCHITECTURE.md`](./.claud
220
225
 
221
226
  ## Providers
222
227
 
223
- ralphctl drives four AI coding CLIs. All four run every flow and are supported first-class. Pick one per
228
+ ralphctl drives five AI coding CLIs. All five run every flow and are supported first-class. Pick one per
224
229
  flow — or mix them, say plan with one and implement with another — through a [preset](#configuration) or
225
230
  per-row settings.
226
231
 
227
- | Provider | CLI | Install | Auth | Context file |
228
- | ----------------------------------------- | ---------- | ------------------------------------ | --------------------- | --------------------------------- |
229
- | **Claude Code** (`claude-code`) | `claude` | `npm i -g @anthropic-ai/claude-code` | Anthropic account | `CLAUDE.md` |
230
- | **GitHub Copilot CLI** (`github-copilot`) | `copilot` | `npm i -g @github/copilot` | GitHub Copilot seat | `.github/copilot-instructions.md` |
231
- | **OpenAI Codex CLI** (`openai-codex`) | `codex` | `npm i -g @openai/codex` | ChatGPT / OpenAI | `AGENTS.md` |
232
- | **OpenCode** (`opencode`) | `opencode` | `npm i -g opencode-ai` | your own key, or none | `AGENTS.md` |
232
+ | Provider | CLI | Install | Auth | Context file |
233
+ | ----------------------------------------- | ---------- | ------------------------------------ | -------------------------- | --------------------------------- |
234
+ | **Claude Code** (`claude-code`) | `claude` | `npm i -g @anthropic-ai/claude-code` | Anthropic account | `CLAUDE.md` |
235
+ | **GitHub Copilot CLI** (`github-copilot`) | `copilot` | `npm i -g @github/copilot` | GitHub Copilot seat | `.github/copilot-instructions.md` |
236
+ | **OpenAI Codex CLI** (`openai-codex`) | `codex` | `npm i -g @openai/codex` | ChatGPT / OpenAI | `AGENTS.md` |
237
+ | **OpenCode** (`opencode`) | `opencode` | `npm i -g opencode-ai` | your own key, or none | `AGENTS.md` |
238
+ | **Grok Build CLI** (`xai-grok`) | `grok` | `npm i -g @xai-official/grok` | xAI account (`grok login`) | `AGENTS.md` |
239
+
240
+ Codex, OpenCode, and Grok share one repo-root `AGENTS.md`. Readiness for more than one of them writes
241
+ that file in sequence; each later pass keeps the previous body at `AGENTS.md.bak.<timestamp>`.
233
242
 
234
243
  **Which one?**
235
244
 
236
245
  - **Claude Code** — read-only flows deny the edit, shell and network tools at the CLI level, the finest-grained
237
- gate of the four.
246
+ gate of the five.
238
247
  - **GitHub Copilot CLI** — no extra billing relationship if you already have a seat. Read-only flows deny the
239
248
  shell tool; file writes stay open, bounded by path scope.
240
249
  - **OpenAI Codex CLI** — a natural fit inside the ChatGPT/OpenAI ecosystem. Its sandbox has two modes only,
241
250
  so path scope is the fine-grained safety envelope.
242
251
  - **OpenCode** — vendor-neutral: it fronts 75+ providers and local runtimes on a bring-your-own-key model, so
243
252
  you can run a specific model, a local model, or no account at all.
244
-
245
- On every backend the `Write` tool stays open by design — the harness's `signals.json` lands through it — so
246
- path scope (cwd + mounted roots) is always part of the safety envelope. See the
253
+ - **Grok Build CLI** — xAI's coding CLI (`grok-4.6` / `grok-4.5`). Read-only flows deny edit and shell by
254
+ permission rule (`--deny 'Edit(./**)'`, cwd-rooted, plus `--deny 'Bash(*)'` and both shell tool ids); Grok
255
+ has no separate `write` tool, so creating `signals.json` outside the denied path stays possible. Both Grok
256
+ surfaces pass `--trust`, since the `AGENTS.md` and `.grok/skills` it loads at startup are files ralphctl
257
+ wrote itself. Extra roots are a named over-grant — Grok has no `--add-dir` and `--sandbox off` is forced.
258
+
259
+ On every backend the agent can always create the harness's `signals.json` — four keep the `Write` tool open,
260
+ and Grok, which has no `write` tool, scopes its edit deny rule to `--cwd` instead — so path scope (cwd +
261
+ mounted roots) is always part of the safety envelope. See the
247
262
  [provider reference](./docs/providers.md#permission-model-per-backend) for the exact mapping.
248
263
 
249
- Bundled skill injection and forensic capture work on all four; only the on-disk skills directory differs
250
- (`.claude/` / `.github/` / `.agents/` / `.opencode/`). Parallel execution is provider-agnostic. Claude Code
264
+ Bundled skill injection and forensic capture work on all five; only the on-disk skills directory differs
265
+ (`.claude/` / `.github/` / `.agents/` / `.opencode/` / `.grok/`). Parallel execution is provider-agnostic. Claude Code
251
266
  has the most real-world mileage simply because it came first — the others are equally supported, with
252
267
  correspondingly less of it.
253
268
 
@@ -256,9 +271,9 @@ model ids, mixing backends, and known limitations.
256
271
 
257
272
  Hit a rough edge with any provider? Please [open an issue](https://github.com/lukas-grigis/ralphctl/issues).
258
273
 
259
- One-shot configuration: `ralphctl settings apply-preset <name>` where `<name>` is one of 21 presets —
274
+ One-shot configuration: `ralphctl settings apply-preset <name>` where `<name>` is one of 22 presets —
260
275
  `standard`, `economic`, `strong-gate`, `fast`, and `frontier` families, each in `mixed` / `claude-only` /
261
- `copilot-only` / `codex-only` variants, plus `opencode-only`.
276
+ `copilot-only` / `codex-only` variants, plus `opencode-only` and `grok-only`.
262
277
 
263
278
  ---
264
279
 
@@ -280,7 +295,7 @@ One-shot configuration: `ralphctl settings apply-preset <name>` where `<name>` i
280
295
  first — the crashed attempt is settled as aborted (kept in history) and a fresh attempt opens automatically
281
296
  - **Pair or let it run** — work alongside your AI agent interactively, or let it execute unattended
282
297
  - **Zero-memorization start** — run `ralphctl` with no args for a guided menu
283
- - **Bring your own model** — four backends to choose from, one of which (OpenCode) is vendor-neutral, so the
298
+ - **Bring your own model** — five backends to choose from, one of which (OpenCode) is vendor-neutral, so the
284
299
  harness reaches hosted, aggregated, and local models alike
285
300
 
286
301
  ---
@@ -293,7 +308,7 @@ Configure via the TUI `Settings` view or one-shot CLI commands.
293
308
  `apply-preset`.
294
309
 
295
310
  <details>
296
- <summary>All 21 presets</summary>
311
+ <summary>All 22 presets</summary>
297
312
 
298
313
  ```bash
299
314
  # Standard — flagship model per flow
@@ -302,6 +317,7 @@ ralphctl settings apply-preset claude-only # every flow on Claude Code
302
317
  ralphctl settings apply-preset copilot-only # every flow on GitHub Copilot CLI
303
318
  ralphctl settings apply-preset codex-only # every flow on OpenAI Codex CLI
304
319
  ralphctl settings apply-preset opencode-only # every flow on OpenCode's free tier (no auth)
320
+ ralphctl settings apply-preset grok-only # every flow on Grok Build CLI
305
321
 
306
322
  # Economic — implement starts one tier below flagship; escalation ladder climbs only on plateau
307
323
  ralphctl settings apply-preset mixed-economic
@@ -328,9 +344,11 @@ ralphctl settings apply-preset copilot-frontier
328
344
  ralphctl settings apply-preset codex-frontier
329
345
  ```
330
346
 
331
- Twenty-one presets ship, all equally first-class — none is marked default. `opencode-only` sits outside the
332
- five-family grid on purpose: every free-tier model is at the same (zero) price point, so `economic` / `frontier`
333
- variants of it would differ in name only. Applying a
347
+ Twenty-two presets ship, all equally first-class — none is marked default. `opencode-only` and `grok-only`
348
+ sit in the standard family as single-member extras: `opencode-only` because every free-tier model is at the
349
+ same (zero) price point, so `economic` / `frontier` variants of it would differ in name only; `grok-only`
350
+ because mixed presets were not rerouted onto Grok and no grok-economic / fast / frontier / strong-gate
351
+ variants ship. Applying a
334
352
  preset stamps the entire `ai` section plus `harness.escalateOnPlateau` in one transaction (`fast` stamps it
335
353
  `false` so a plateau settles; all others stamp it `true`). On a fresh install the welcome view silently
336
354
  auto-seeds a preset based on which provider CLIs it detects on `PATH`.
@@ -431,17 +449,17 @@ readiness / create sprint) stay TUI-only by design. The CLI exposes inspection +
431
449
 
432
450
  ### Getting Started
433
451
 
434
- | Command | Description |
435
- | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
436
- | `ralphctl` | Interactive TUI (primary surface) |
437
- | `ralphctl demo` | Seed a throwaway sandbox project and launch straight into it — zero setup, no provider CLI required to look around (`--no-launch` to seed only, `--home <dir>` to relocate) |
438
- | `ralphctl doctor` | Check environment health |
439
- | `ralphctl settings show` | Print current settings |
440
- | `ralphctl settings set <key> <value>` | Set a single settings key |
441
- | `ralphctl settings apply-preset <name>` | Stamp the entire `ai` section — 21 presets: `standard` / `economic` / `strong-gate` / `fast` / `frontier` families, each in `mixed` / `*-only` variants, plus `opencode-only` |
442
- | `ralphctl completion <shell>` | Print shell tab-completion script |
443
- | `ralphctl agents list` | List bundled + operator agent definitions and the implement role each is bound to |
444
- | `ralphctl skills list` | List bundled + manually-dropped skills — tier, enabled flows, provenance |
452
+ | Command | Description |
453
+ | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
454
+ | `ralphctl` | Interactive TUI (primary surface) |
455
+ | `ralphctl demo` | Seed a throwaway sandbox project and launch straight into it — zero setup, no provider CLI required to look around (`--no-launch` to seed only, `--home <dir>` to relocate) |
456
+ | `ralphctl doctor` | Check environment health |
457
+ | `ralphctl settings show` | Print current settings |
458
+ | `ralphctl settings set <key> <value>` | Set a single settings key |
459
+ | `ralphctl settings apply-preset <name>` | Stamp the entire `ai` section — 22 presets: `standard` / `economic` / `strong-gate` / `fast` / `frontier` families, each in `mixed` / `*-only` variants, plus `opencode-only` and `grok-only` |
460
+ | `ralphctl completion <shell>` | Print shell tab-completion script |
461
+ | `ralphctl agents list` | List bundled + operator agent definitions and the implement role each is bound to |
462
+ | `ralphctl skills list` | List bundled + manually-dropped skills — tier, enabled flows, provenance |
445
463
 
446
464
  ### Project & Sprint Inspection
447
465
 
@@ -463,11 +481,12 @@ readiness / create sprint) stay TUI-only by design. The CLI exposes inspection +
463
481
 
464
482
  ### Sprint Lifecycle
465
483
 
466
- | Command | Description |
467
- | ------------------------------- | ------------------------------- |
468
- | `ralphctl sprint activate <id>` | Flip a draft sprint to `active` |
469
- | `ralphctl sprint close <id>` | Transition `review` → `done` |
470
- | `ralphctl sprint remove <id>` | Delete a sprint permanently |
484
+ | Command | Description |
485
+ | --------------------------------- | ----------------------------------------------------------------------------------------------------------- |
486
+ | `ralphctl sprint activate <id>` | Flip a draft sprint to `active` |
487
+ | `ralphctl sprint close <id> [-y]` | Transition `review` → `done`; confirms first when any task is still blocked (`-y`/`--yes` skips the prompt) |
488
+ | `ralphctl sprint reopen <id>` | Reopen a closed sprint `done` → `review` so its blocked work is reachable again (idempotent) |
489
+ | `ralphctl sprint remove <id>` | Delete a sprint permanently |
471
490
 
472
491
  ### Export & PR
473
492