This catalog expands the short examples in examples.md with a few operator-oriented scenarios. Every example here stays within the current shipped runtime contract.
Use this when you want to confirm the repo is runnable before touching anything else.
rrx validate
rrx doctor
rrx init --template writing
rrx run --json
rrx status --jsonWhat to expect:
- the bundled
writingtemplate initializes successfully - the first cycle writes run, decision, and frontier state
statusreports the current runtime and recovery view
Use these when you want a temporary repo that proves the loop works without manual setup. Both demos finish in seconds and need no API key.
rrx demo writing # prose ratchet (markdown draft)
rrx demo code # test-pass ratchet (tiny JavaScript calculator)What to expect:
- a temporary Git repo is created
- one accepted cycle is executed
- the command prints the temp path and run id
demo codeadditionally moves thetests_passedmetric from0to4on the bundledtests/calculator.test.mjssuite
Use this when a previous run was interrupted and the latest run is still recoverable.
rrx status
rrx runWhat to expect:
rrx statustells you whether the runtime isrunning (alive),stale (resumable), or stoppedrrx runresumes the latest recoverable run by default- if the latest run is blocked on human review,
rrx runwill not bypass it
Use this when the runtime has stopped in needs_human.
rrx status --json
rrx inspect run-0001 --json
rrx accept run-0001
rrx status --jsonWhat to expect:
inspectexplains the decision and metric stateacceptresolves the pending review and lets the runtime continuerejectis the symmetric path when the run should not be kept
Use this only after you have enabled stopping.target in the manifest.
rrx run --until-target --until-no-improve 3 --jsonWhat to expect:
- the runtime keeps iterating until the target is met
- if progress stalls, it stops after the configured no-improve window
- the bundled
writingtemplate does not enable this by default
Use the bundled writing template when you want a minimal local command metric and a single markdown artifact.
Use the bundled code template when you want a test-pass ratchet with no
external toolchain — it runs against Node's built-in test runner.
experiment:
run:
command: "node scripts/experiment.mjs"
outputs:
- id: test-results
path: out/test-results.json
metrics:
catalog:
- id: tests_passed
kind: numeric
direction: maximize
extractor:
type: command
command: "node scripts/metric.mjs"
parser: plain_numberThe repo also ships a tests/fixtures/manifests/valid-code.ralph.yaml
fixture that drives the same shape against uv run pytest. Reach for it
when your project's tests already live behind uv/pytest.
experiment:
run:
command: uv run pytest -q
metrics:
catalog:
- id: tests_passed
kind: numeric
direction: maximize
extractor:
type: command
command: ./scripts/metric_tests.sh
parser: json_path
valuePath: $.passedUse the LLM fixture when you want to preserve judge-backed quality signals in the manifest.
metrics:
catalog:
- id: paper_quality
kind: llm_score
direction: maximize
extractor:
type: llm_judge
judgePack: writing-pairwise-v1
prompt: prompts/paper_quality_judge.md