ralph-code 0.5.0__tar.gz

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 (33) hide show
  1. ralph_code-0.5.0/LICENSE +21 -0
  2. ralph_code-0.5.0/MANIFEST.in +3 -0
  3. ralph_code-0.5.0/PKG-INFO +79 -0
  4. ralph_code-0.5.0/README.md +42 -0
  5. ralph_code-0.5.0/pyproject.toml +62 -0
  6. ralph_code-0.5.0/ralph/__init__.py +20 -0
  7. ralph_code-0.5.0/ralph/__main__.py +34 -0
  8. ralph_code-0.5.0/ralph/app.py +1328 -0
  9. ralph_code-0.5.0/ralph/claude_runner.py +22 -0
  10. ralph_code-0.5.0/ralph/colors.py +183 -0
  11. ralph_code-0.5.0/ralph/config.py +227 -0
  12. ralph_code-0.5.0/ralph/git_manager.py +304 -0
  13. ralph_code-0.5.0/ralph/harness.py +393 -0
  14. ralph_code-0.5.0/ralph/harness_runner.py +972 -0
  15. ralph_code-0.5.0/ralph/prd_manager.py +348 -0
  16. ralph_code-0.5.0/ralph/schemas/ralph_tasks_schema.json +95 -0
  17. ralph_code-0.5.0/ralph/schemas/task_schema.json +92 -0
  18. ralph_code-0.5.0/ralph/spinner.py +287 -0
  19. ralph_code-0.5.0/ralph/storage.py +77 -0
  20. ralph_code-0.5.0/ralph/tasks.py +298 -0
  21. ralph_code-0.5.0/ralph/user_stories.py +283 -0
  22. ralph_code-0.5.0/ralph/workflow.py +1036 -0
  23. ralph_code-0.5.0/ralph_code.egg-info/PKG-INFO +79 -0
  24. ralph_code-0.5.0/ralph_code.egg-info/SOURCES.txt +31 -0
  25. ralph_code-0.5.0/ralph_code.egg-info/dependency_links.txt +1 -0
  26. ralph_code-0.5.0/ralph_code.egg-info/entry_points.txt +2 -0
  27. ralph_code-0.5.0/ralph_code.egg-info/requires.txt +11 -0
  28. ralph_code-0.5.0/ralph_code.egg-info/top_level.txt +1 -0
  29. ralph_code-0.5.0/setup.cfg +4 -0
  30. ralph_code-0.5.0/setup.py +32 -0
  31. ralph_code-0.5.0/tests/test_harness.py +475 -0
  32. ralph_code-0.5.0/tests/test_harness_runner.py +179 -0
  33. ralph_code-0.5.0/tests/test_spinner.py +25 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Ralph Coding
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ include README.md
2
+ include LICENSE
3
+ recursive-include ralph/schemas *.json
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.4
2
+ Name: ralph-code
3
+ Version: 0.5.0
4
+ Summary: Automated task implementation with Claude Code and Codex
5
+ Author: Ralph Coding
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/yourusername/ralph-code
8
+ Project-URL: Repository, https://github.com/yourusername/ralph-code
9
+ Project-URL: Issues, https://github.com/yourusername/ralph-code/issues
10
+ Keywords: claude,codex,ai,automation,coding,cli
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Code Generators
21
+ Classifier: Topic :: Software Development :: Build Tools
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: rich
26
+ Requires-Dist: click
27
+ Requires-Dist: jsonschema
28
+ Requires-Dist: platformdirs
29
+ Requires-Dist: questionary
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest; extra == "dev"
32
+ Requires-Dist: mypy; extra == "dev"
33
+ Requires-Dist: types-pygments; extra == "dev"
34
+ Requires-Dist: types-jsonschema; extra == "dev"
35
+ Dynamic: license-file
36
+ Dynamic: requires-python
37
+
38
+ # ralph-code
39
+
40
+ Automated task implementation with Claude Code and Codex for "Ralph Coding". What is [Ralph Coding](https://ghuntley.com/ralph/)? 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. 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.
41
+
42
+ 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."
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ pipx install ralph-code
48
+ ```
49
+
50
+ Or with pip:
51
+
52
+ ```bash
53
+ pip install ralph-code
54
+ ```
55
+
56
+ ## Usage
57
+
58
+ ```bash
59
+ ralph [OPTIONS] [DIRECTORY]
60
+ ```
61
+
62
+ ### Options
63
+
64
+ - `--debug`: Enable debug logging, logs are saved into the .ralph subdirectory of the project
65
+ - `DIRECTORY`: Target project directory (defaults to current directory)
66
+
67
+ ## Usage
68
+
69
+ First create a task, give a short name for the task (used for the branch commits will be added to), and then give a description.
70
+ Then you run the ralph-coder, 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.
71
+
72
+ ## Requirements
73
+
74
+ - Python 3.10+
75
+ - Claude Code or Codex CLI installed and configured
76
+
77
+ ## License
78
+
79
+ MIT
@@ -0,0 +1,42 @@
1
+ # ralph-code
2
+
3
+ Automated task implementation with Claude Code and Codex for "Ralph Coding". What is [Ralph Coding](https://ghuntley.com/ralph/)? 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. 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.
4
+
5
+ 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."
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pipx install ralph-code
11
+ ```
12
+
13
+ Or with pip:
14
+
15
+ ```bash
16
+ pip install ralph-code
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```bash
22
+ ralph [OPTIONS] [DIRECTORY]
23
+ ```
24
+
25
+ ### Options
26
+
27
+ - `--debug`: Enable debug logging, logs are saved into the .ralph subdirectory of the project
28
+ - `DIRECTORY`: Target project directory (defaults to current directory)
29
+
30
+ ## Usage
31
+
32
+ First create a task, give a short name for the task (used for the branch commits will be added to), and then give a description.
33
+ Then you run the ralph-coder, 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.
34
+
35
+ ## Requirements
36
+
37
+ - Python 3.10+
38
+ - Claude Code or Codex CLI installed and configured
39
+
40
+ ## License
41
+
42
+ MIT
@@ -0,0 +1,62 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ralph-code"
7
+ version = "0.5.0"
8
+ description = "Automated task implementation with Claude Code and Codex"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ authors = [
12
+ {name = "Ralph Coding"}
13
+ ]
14
+ requires-python = ">=3.10"
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Environment :: Console",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Topic :: Software Development :: Code Generators",
26
+ "Topic :: Software Development :: Build Tools",
27
+ ]
28
+ keywords = ["claude", "codex", "ai", "automation", "coding", "cli"]
29
+ dependencies = [
30
+ "rich",
31
+ "click",
32
+ "jsonschema",
33
+ "platformdirs",
34
+ "questionary",
35
+ ]
36
+
37
+ [project.optional-dependencies]
38
+ dev = [
39
+ "pytest",
40
+ "mypy",
41
+ "types-pygments",
42
+ "types-jsonschema",
43
+ ]
44
+
45
+ [project.scripts]
46
+ ralph = "ralph.__main__:cli"
47
+
48
+ [project.urls]
49
+ Homepage = "https://github.com/yourusername/ralph-code"
50
+ Repository = "https://github.com/yourusername/ralph-code"
51
+ Issues = "https://github.com/yourusername/ralph-code/issues"
52
+
53
+ [tool.setuptools.packages.find]
54
+ where = ["."]
55
+ include = ["ralph*"]
56
+
57
+ [tool.setuptools.package-data]
58
+ ralph = ["schemas/*.json"]
59
+
60
+ [tool.mypy]
61
+ strict = true
62
+ python_version = "3.12"
@@ -0,0 +1,20 @@
1
+ """ralph-code: Automated task implementation with Claude Code and Codex."""
2
+
3
+ __version__ = "0.1.0"
4
+ __author__ = "Ralph Coding"
5
+
6
+ from .app import RalphApp, main
7
+ from .config import Config, get_config
8
+ from .tasks import Task, TaskManager
9
+ from .workflow import WorkflowEngine, WorkflowState
10
+
11
+ __all__ = [
12
+ "RalphApp",
13
+ "main",
14
+ "Config",
15
+ "get_config",
16
+ "Task",
17
+ "TaskManager",
18
+ "WorkflowEngine",
19
+ "WorkflowState",
20
+ ]
@@ -0,0 +1,34 @@
1
+ """Entry point for `python -m ralph`."""
2
+
3
+ import sys
4
+ from pathlib import Path
5
+
6
+ import click
7
+
8
+ from .app import main
9
+
10
+
11
+ @click.command()
12
+ @click.option(
13
+ "--debug",
14
+ is_flag=True,
15
+ help="Enable verbose logging of all Claude interactions to .ralph/logs/",
16
+ )
17
+ @click.argument(
18
+ "directory",
19
+ required=False,
20
+ type=click.Path(exists=True, file_okay=False, dir_okay=True, path_type=Path),
21
+ )
22
+ def cli(debug: bool, directory: Path | None) -> None:
23
+ """
24
+ Ralph Coding - Automated task implementation with Claude Code.
25
+
26
+ DIRECTORY is the optional target project directory.
27
+ Defaults to the current working directory.
28
+ """
29
+ project_dir = directory or Path.cwd()
30
+ main(project_dir=project_dir, debug=debug)
31
+
32
+
33
+ if __name__ == "__main__":
34
+ cli()