Skip to main content

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.3 includes:

  • Safer git integration for staged-file commit checks
  • Correct staged diff generation
  • Deduplicated unstaged file reporting
  • Clearer errors when git is not available

Version 0.6.2 includes:

  • Bounded non-interactive harness execution with timeout and turn limits
  • Structured tasks.json generation for more reliable PRD conversion
  • Automatic continuation after task generation by default
  • PRDs/ as the standard task directory, with legacy PRD/ compatibility
  • Refreshed model catalogs and current defaults

Options

  • --debug: Enable debug logging, logs are saved into the .ralph subdirectory of the project
  • DIRECTORY: 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

ralph_code-0.6.3.tar.gz (88.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ralph_code-0.6.3-py3-none-any.whl (65.1 kB view details)

Uploaded Python 3

File details

Details for the file ralph_code-0.6.3.tar.gz.

File metadata

  • Download URL: ralph_code-0.6.3.tar.gz
  • Upload date:
  • Size: 88.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for ralph_code-0.6.3.tar.gz
Algorithm Hash digest
SHA256 e35a96b81d4728012e47db96ceb2e547521a79e65e0a61640a668bd76d82fb93
MD5 8207443fabf6f235f73e9d289b97a8b9
BLAKE2b-256 8ff138af9b1d207db0b99365ee05846448fdd6a5bd16c02471d1bdb3da6f6840

See more details on using hashes here.

File details

Details for the file ralph_code-0.6.3-py3-none-any.whl.

File metadata

  • Download URL: ralph_code-0.6.3-py3-none-any.whl
  • Upload date:
  • Size: 65.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for ralph_code-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e0de9f90a358cb6a5e505d741340de49e72b1eb769e0ea9182663b79508a039d
MD5 4822659b4df796e33504983151ed60c8
BLAKE2b-256 92a307a96b41c564224099cbb5f965c274b8b5db90f5dcad5a62dec0e1aab92a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page