Automated task implementation with Claude Code and Codex
Project description
ralph-code
Automated task implementation with Claude Code and Codex for "Ralph Coding". What is Ralph Coding? It's a method of coding where context rot is avoided by controlling the retention of information. This method involves re-invoking claude or codex for each task, and passing information about the requirements, acceptance testing, and any progress that's made (or roadblocks/challenges faced) through files, rather than retaining all prompts + thinking + response tokens. It tends to result in more requests, some duplicated token work, but fairly consistent performance, and best of all it can largely be done unattended. Ralph now defaults to continuing past PRD-to-task conversion instead of pausing there, and non-interactive harness calls are bounded by timeouts and turn caps so stuck agent runs fail fast instead of hanging forever. Recommend Claude Max account or codex equivalent, but be aware that GPT-5 - GPT5.2's slow reasoning and response makes this ponderous, it's fine overnight.
Because LLMs are carrying out the work, we can specify a job of "Find all the python files in the project that directly or indirectly access sqlalchemy objects, and upgrade the code to work with sqlalchemy 2.* This will result in probably a single-task project, but that one task might add 50 other tasks (on per file) to the backlog, which are then processed sequentially."
Installation
pipx install ralph-code
Or with pip:
pip install ralph-code
Usage
ralph [OPTIONS] [DIRECTORY]
Recent changes
Version 0.6.2 includes:
- Bounded non-interactive harness execution with timeout and turn limits
- Structured
tasks.jsongeneration for more reliable PRD conversion - Automatic continuation after task generation by default
PRDs/as the standard task directory, with legacyPRD/compatibility- Refreshed model catalogs and current defaults
Options
--debug: Enable debug logging, logs are saved into the .ralph subdirectory of the projectDIRECTORY: Target project directory (defaults to current directory)
Usage
First create a task in PRDs/, give a short name for the task (used for the branch commits will be added to), and then give a description.
Then you run ralph, it will produce a .md file of the specifications, which will be broken into small tasks put into a tasks.json file. Each task will be worked on independently.
Requirements
- Python 3.10+
- Claude Code or Codex CLI installed and configured
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ralph_code-0.6.2.tar.gz.
File metadata
- Download URL: ralph_code-0.6.2.tar.gz
- Upload date:
- Size: 87.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e077eb78d27e18ada609e303670d6fdca2a001a0261d6bbdb10b5f21b09bb3e9
|
|
| MD5 |
fd0c4a5cde560586fee88c1fbe47db0b
|
|
| BLAKE2b-256 |
971f1cc7034078e912eee4f328c8789723a0ca9de07b6ca048af149ba4471f04
|
File details
Details for the file ralph_code-0.6.2-py3-none-any.whl.
File metadata
- Download URL: ralph_code-0.6.2-py3-none-any.whl
- Upload date:
- Size: 65.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e70256ab9b694c285afdc886eaeb8831dec5d1b7211e2e151dba0e54fe155e1a
|
|
| MD5 |
ee4bf08e7f6438d780b44a107b1eda40
|
|
| BLAKE2b-256 |
584b09501928ba1033bb9ca086197f1111897d8d3961d15ce162d9b4311e3f00
|