Skip to content

Commit 5d86fe8

Browse files
authored
Merge pull request #132 from blooop/feature/update_lock
Add ralph-orchestrator as pixi dependency
2 parents db84f21 + d5b8d40 commit 5d86fe8

7 files changed

Lines changed: 495 additions & 938 deletions

File tree

.claude/README.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Claude Code Configuration
2+
3+
This directory contains configuration for using this project with Claude Code, particularly in the online environment.
4+
5+
## SessionStart Hook
6+
7+
The `hooks/SessionStart` script automatically runs when a new Claude Code session begins. It:
8+
9+
1. **Installs pixi** (if not already installed) - The package and environment manager
10+
2. **Installs project dependencies** - All Python packages and tools defined in `pyproject.toml`
11+
3. **Sets up prek hooks** - For automatic code quality checks
12+
4. **Configures git** - Sets up merge drivers for lockfiles
13+
14+
## Usage with Claude Code Online
15+
16+
When you start a Claude Code online session, the SessionStart hook will automatically run and set up your environment. You'll see output indicating the setup progress.
17+
18+
### Available Commands
19+
20+
Once setup is complete, Claude can use these pixi tasks:
21+
22+
#### Testing & Quality
23+
- `pixi run test` - Run pytest tests
24+
- `pixi run coverage` - Run tests with coverage report
25+
- `pixi run lint` - Run ruff and pylint linters
26+
- `pixi run format` - Format code with ruff
27+
28+
#### CI Tasks
29+
- `pixi run ci` - Run full CI pipeline (format, lint, test, coverage)
30+
- `pixi run fix` - Auto-fix common issues (update lock, format, lint)
31+
32+
#### Prek Hooks
33+
- `pixi run prek` - Run all prek hooks
34+
- `pixi run prek-update` - Update prek hook versions
35+
36+
### How It Works
37+
38+
1. **First session**: The hook installs pixi and all dependencies (may take a few minutes)
39+
2. **Subsequent sessions**: The hook verifies the environment is ready (much faster)
40+
3. **Environment activated**: All pixi commands are available to Claude
41+
42+
### Troubleshooting
43+
44+
If you encounter issues:
45+
46+
1. **Dependencies not found**: Run `pixi install` manually
47+
2. **Lockfile conflicts**: Run `pixi run update-lock`
48+
3. **Prek issues**: Run `pixi run prek-update`
49+
4. **Full reset**: Delete `.pixi` directory and restart session
50+
51+
### Customization
52+
53+
You can modify `hooks/SessionStart` to:
54+
- Install additional tools
55+
- Run custom setup scripts
56+
- Configure environment variables
57+
- Set up external services
58+
59+
## Ralph Orchestrator
60+
61+
This project includes [ralph-orchestrator](https://github.com/mikeyobrien/ralph-orchestrator), an autonomous agent orchestrator for managing complex multi-step tasks.
62+
63+
### Installation
64+
65+
Ralph is installed as a pixi dependency. After running `pixi install`, it's available in the environment.
66+
67+
### Basic Usage
68+
69+
```bash
70+
# Initialize ralph (creates ralph.yml and PROMPT.md if not present)
71+
pixi run ralph init
72+
73+
# Plan a task (creates a spec file)
74+
pixi run ralph plan "Implement feature X"
75+
76+
# Run ralph with the current PROMPT.md
77+
pixi run ralph run
78+
79+
# Check ralph version
80+
pixi run ralph --version
81+
```
82+
83+
### Configuration Files
84+
85+
- `ralph.yml` - Main configuration (event loop, hats, backends)
86+
- `PROMPT.md` - Task description for ralph to execute
87+
- `specs/` - Directory for task specifications
88+
89+
### Customization
90+
91+
Edit `ralph.yml` to customize:
92+
- `event_loop.max_iterations` - Maximum iterations before stopping
93+
- `event_loop.max_runtime_seconds` - Maximum runtime
94+
- `cli.backend` - AI backend (claude, gemini, codex, etc.)
95+
- `hats` - Define custom personas for multi-agent workflows
96+
97+
See the [ralph-orchestrator documentation](https://github.com/mikeyobrien/ralph-orchestrator) for more details.
98+
99+
## Learn More
100+
101+
- [Claude Code Documentation](https://docs.claude.com/claude-code)
102+
- [Pixi Documentation](https://pixi.sh)
103+
- [Ralph Orchestrator](https://github.com/mikeyobrien/ralph-orchestrator)
104+
- [Project README](../README.md)

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
22

3-
ARG PIXI_VERSION=v0.63.1
3+
ARG PIXI_VERSION=v0.65.0
44

55
RUN curl -L -o /usr/local/bin/pixi -fsSL --compressed "https://github.com/prefix-dev/pixi/releases/download/${PIXI_VERSION}/pixi-$(uname -m)-unknown-linux-musl" \
66
&& chmod +x /usr/local/bin/pixi \

.gitignore

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,7 @@ test_suite_analysis/metadata.json
173173

174174
.devpod/
175175
.devpod-internal/
176+
.ralph/
176177

177178
# Claude Code local settings (personal, not shared)
178179
.claude/settings.local.json
179-
180-
# Ralph autonomous agent state files
181-
.call_count
182-
.circuit_breaker_history
183-
.circuit_breaker_state
184-
.exit_signals
185-
.last_reset
186-
.ralph_session
187-
.ralph_session_history
188-
.response_analysis
189-
.claude_session_id
190-
progress.json
191-
status.json
192-
logs/

0 commit comments

Comments
 (0)