Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
c1c1cf0
update pixi
blooop Jan 16, 2026
f5da0b8
update pixi.lock
blooop Jan 16, 2026
e43d70e
Add upper version bound for gh dependency
blooop Jan 17, 2026
550973a
first pass on ralph
blooop Jan 18, 2026
42616a0
update gitignore
blooop Jan 18, 2026
0b44634
docs: address PR review feedback
blooop Jan 18, 2026
0d32b9f
Merge pull request #131 from blooop/feature/ralph_pixi
blooop Jan 18, 2026
1942e6e
Merge branch 'main' into feature/gh-version-upper-bound
blooop Jan 18, 2026
c072386
update version
blooop Jan 18, 2026
363681a
update pixi.lock
blooop Jan 18, 2026
77e3531
Merge pull request #129 from blooop/feature/gh-version-upper-bound
blooop Jan 18, 2026
f462716
Add ralph-orchestrator as pixi dependency
blooop Jan 29, 2026
b85c697
build(deps): bump prefix-dev/setup-pixi from 0.9.3 to 0.9.4
dependabot[bot] Feb 1, 2026
19c1c31
build(deps-dev): update ty requirement in the lib-dependencies group
dependabot[bot] Feb 1, 2026
77fba4e
Merge pull request #135 from blooop/dependabot/pip/lib-dependencies-f…
blooop Feb 1, 2026
bd2bb50
build(deps-dev): bump the dev-dependencies group with 4 updates
dependabot[bot] Feb 1, 2026
03794b1
Merge pull request #134 from blooop/dependabot/pip/dev-dependencies-9…
blooop Feb 1, 2026
4a93c4b
Merge branch 'main' into dependabot/github_actions/prefix-dev/setup-p…
blooop Feb 2, 2026
64d31b5
Add prebuilt devcontainer image support via GHCR
claude Feb 9, 2026
e818c80
Merge pull request #133 from blooop/dependabot/github_actions/prefix-…
blooop Feb 10, 2026
e344e27
restore commented out features.
blooop Feb 10, 2026
0451e82
Merge pull request #136 from blooop/claude/prebuilt-images-devcontain…
blooop Feb 10, 2026
a571e7a
build(deps): bump actions/checkout from 4 to 6
dependabot[bot] Feb 10, 2026
c877c18
build(deps-dev): bump the dev-dependencies group with 3 updates
dependabot[bot] Feb 10, 2026
8138b39
Merge pull request #137 from blooop/dependabot/github_actions/actions…
blooop Feb 10, 2026
30140e6
build(deps-dev): update ty requirement in the lib-dependencies group
dependabot[bot] Feb 10, 2026
867454b
Document GHCR package visibility and how to make it public
blooop Feb 10, 2026
799c95b
Default to local builds for template portability
blooop Feb 10, 2026
1e73f3b
Merge pull request #138 from blooop/dependabot/pip/dev-dependencies-0…
blooop Feb 10, 2026
a13dbe1
Merge pull request #139 from blooop/dependabot/pip/lib-dependencies-8…
blooop Feb 10, 2026
f44873a
Add pixi task to migrate devcontainer to prebuilt GHCR image
blooop Feb 10, 2026
37cc4f3
Address Sourcery review: clarify org vs user package paths
blooop Feb 10, 2026
dab0704
Fix portability and add gh CLI check in migration script
blooop Feb 10, 2026
330f1d0
Address subagent review feedback
blooop Feb 10, 2026
37688f0
Fix syntax error in gh api error handling
blooop Feb 10, 2026
cedc565
Merge pull request #140 from blooop/fix/ghcr-package-visibility-docs
blooop Feb 10, 2026
8d42e7a
feat: pull changes from remote template
blooop Feb 11, 2026
cb73d65
update pixi.lock
blooop Feb 11, 2026
0eb519b
update pixi.lock
blooop Feb 11, 2026
dec885e
Default devcontainer to template's prebuilt image for fast startup
blooop Feb 11, 2026
e5f2878
Escape sed-special characters in rename_project.sh
blooop Feb 11, 2026
8389c8f
Merge pull request #141 from blooop/feat/default-template-prebuilt-image
blooop Feb 11, 2026
0fb7546
feat: pull changes from remote template
blooop Feb 11, 2026
27025af
build(deps-dev): bump the dev-dependencies group with 3 updates
dependabot[bot] Mar 1, 2026
dd1d103
build(deps-dev): update ty requirement in the lib-dependencies group
dependabot[bot] Mar 1, 2026
c9bd15b
Merge pull request #143 from blooop/dependabot/pip/lib-dependencies-0…
blooop Mar 1, 2026
db84f21
Merge pull request #142 from blooop/dependabot/pip/dev-dependencies-e…
blooop Mar 1, 2026
f1ef7a2
Merge branch 'feature/update_from_template' of github.com:blooop/benc…
blooop Mar 1, 2026
2ae2fcd
update pixi.lock
blooop Mar 1, 2026
5887938
ignore ralph folder
blooop Mar 1, 2026
faf12fb
update pixi
blooop Mar 1, 2026
e81e8bf
update ralph orchestrator version
blooop Mar 1, 2026
7889ff7
Merge main into feature/update_lock, resolve conflicts
blooop Mar 1, 2026
fd3df5d
bump pixi version
blooop Mar 1, 2026
d5b8d40
restore gh
blooop Mar 1, 2026
5d86fe8
Merge pull request #132 from blooop/feature/update_lock
blooop Mar 1, 2026
0a7d40a
add shellcheck
blooop Mar 1, 2026
1582f29
add shellcheck
blooop Mar 1, 2026
88da858
turn off common utils and docker-in-docker by default
blooop Mar 1, 2026
7eb3b1d
add pipefile to scripts
blooop Mar 1, 2026
b1d7630
update pixi.lock
blooop Mar 1, 2026
e6af7f3
fix shellcheck pre-commit hook to work in CI
blooop Mar 1, 2026
b1f3b99
Merge pull request #144 from blooop/feature/shellcheck
blooop Mar 1, 2026
71f7b9c
Merge branch 'feature/update_from_template' of github.com:blooop/benc…
blooop Mar 1, 2026
3c63f24
turn off features in ci devcontainer
blooop Mar 1, 2026
f07c079
Merge pull request #145 from blooop/feature/ci_devcontaine
blooop Mar 1, 2026
f6dc466
feat: pull changes from remote template
blooop Mar 1, 2026
cb793be
chore: update pixi.lock after template merge
blooop Mar 1, 2026
0e9c27a
remove old ralph-claude-code files
blooop Mar 1, 2026
6cb9c31
feat: pull changes from remote template
blooop Mar 1, 2026
5542922
update pixi.lock
blooop Mar 1, 2026
6c79f62
update pixi.lock
blooop Mar 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions .claude/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Claude Code Configuration

This directory contains configuration for using this project with Claude Code, particularly in the online environment.

## SessionStart Hook

The `hooks/SessionStart` script automatically runs when a new Claude Code session begins. It:

1. **Installs pixi** (if not already installed) - The package and environment manager
2. **Installs project dependencies** - All Python packages and tools defined in `pyproject.toml`
3. **Sets up prek hooks** - For automatic code quality checks
4. **Configures git** - Sets up merge drivers for lockfiles

## Usage with Claude Code Online

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.

### Available Commands

Once setup is complete, Claude can use these pixi tasks:

#### Testing & Quality
- `pixi run test` - Run pytest tests
- `pixi run coverage` - Run tests with coverage report
- `pixi run lint` - Run ruff and pylint linters
- `pixi run format` - Format code with ruff

#### CI Tasks
- `pixi run ci` - Run full CI pipeline (format, lint, test, coverage)
- `pixi run fix` - Auto-fix common issues (update lock, format, lint)

#### Prek Hooks
- `pixi run prek` - Run all prek hooks
- `pixi run prek-update` - Update prek hook versions

### How It Works

1. **First session**: The hook installs pixi and all dependencies (may take a few minutes)
2. **Subsequent sessions**: The hook verifies the environment is ready (much faster)
3. **Environment activated**: All pixi commands are available to Claude

### Troubleshooting

If you encounter issues:

1. **Dependencies not found**: Run `pixi install` manually
2. **Lockfile conflicts**: Run `pixi run update-lock`
3. **Prek issues**: Run `pixi run prek-update`
4. **Full reset**: Delete `.pixi` directory and restart session

### Customization

You can modify `hooks/SessionStart` to:
- Install additional tools
- Run custom setup scripts
- Configure environment variables
- Set up external services

## Ralph Orchestrator

This project includes [ralph-orchestrator](https://github.com/mikeyobrien/ralph-orchestrator), an autonomous agent orchestrator for managing complex multi-step tasks.

### Installation

Ralph is installed as a pixi dependency. After running `pixi install`, it's available in the environment.

### Basic Usage

```bash
# Initialize ralph (creates ralph.yml and PROMPT.md if not present)
pixi run ralph init

# Plan a task (creates a spec file)
pixi run ralph plan "Implement feature X"

# Run ralph with the current PROMPT.md
pixi run ralph run

# Check ralph version
pixi run ralph --version
```

### Configuration Files

- `ralph.yml` - Main configuration (event loop, hats, backends)
- `PROMPT.md` - Task description for ralph to execute
- `specs/` - Directory for task specifications

### Customization

Edit `ralph.yml` to customize:
- `event_loop.max_iterations` - Maximum iterations before stopping
- `event_loop.max_runtime_seconds` - Maximum runtime
- `cli.backend` - AI backend (claude, gemini, codex, etc.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick (typo): Consider capitalizing AI backend names (Claude, Gemini, Codex) as proper nouns.

Using proper capitalization for these product names will keep the docs correct and consistent.

Suggested change
- `cli.backend` - AI backend (claude, gemini, codex, etc.)
- `cli.backend` - AI backend (Claude, Gemini, Codex, etc.)

- `hats` - Define custom personas for multi-agent workflows

See the [ralph-orchestrator documentation](https://github.com/mikeyobrien/ralph-orchestrator) for more details.

## Learn More

- [Claude Code Documentation](https://docs.claude.com/claude-code)
- [Pixi Documentation](https://pixi.sh)
- [Ralph Orchestrator](https://github.com/mikeyobrien/ralph-orchestrator)
- [Project README](../README.md)
3 changes: 2 additions & 1 deletion .claude/hooks/SessionStart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SessionStart hook for Claude Code online environment
# This script sets up the Python development environment using pixi

set -e
set -eo pipefail

echo "🚀 Setting up Python Template environment..."

Expand All @@ -15,6 +15,7 @@ if ! command -v pixi &> /dev/null; then
export PATH="$HOME/.pixi/bin:$PATH"

# Source bashrc to get pixi in PATH (if bashrc was updated)
# shellcheck disable=SC1091
[ -f "$HOME/.bashrc" ] && source "$HOME/.bashrc"

echo "✅ Pixi installed successfully"
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04

ARG PIXI_VERSION=v0.63.1
ARG PIXI_VERSION=v0.65.0

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" \
&& chmod +x /usr/local/bin/pixi \
Expand Down
12 changes: 12 additions & 0 deletions .devcontainer/ci/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "python_template-build",
"build": {
"dockerfile": "../Dockerfile",
"context": "../.."
},
"features": {
"../claude-code": {},
// "ghcr.io/devcontainers/features/docker-in-docker:2": {},
// "ghcr.io/devcontainers/features/common-utils:2": {}
}
}
6 changes: 4 additions & 2 deletions .devcontainer/claude-code/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
set -eu
#!/bin/bash
set -euo pipefail

# Claude Code CLI Local Feature Install Script
# Installs Claude Code via pixi and sets up configuration directories
Expand Down Expand Up @@ -83,6 +83,7 @@ install_claude_code() {

# Add pixi bin path to user's profile if not already there
local profile="$TARGET_HOME/.profile"
# shellcheck disable=SC2016
local pixi_path_line='export PATH="$HOME/.pixi/bin:$PATH"'
if [ -f "$profile" ] && ! grep -q '\.pixi/bin' "$profile"; then
echo "$pixi_path_line" >> "$profile"
Expand All @@ -93,6 +94,7 @@ install_claude_code() {

# Workaround: pixi trampoline fails for bash scripts, so add env bin directly
# This conditionally adds the path only if the env exists
# shellcheck disable=SC2016
local env_path_line='[ -d "$HOME/.pixi/envs/claude-shim/bin" ] && export PATH="$HOME/.pixi/envs/claude-shim/bin:$PATH"'
if [ -f "$profile" ] && ! grep -q 'pixi/envs/claude-shim' "$profile"; then
echo "# Workaround: pixi trampoline fails for bash scripts" >> "$profile"
Expand Down
30 changes: 17 additions & 13 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{
"name": "bencher",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
// Uses the template's prebuilt image by default for fast startup.
// To build locally: pixi run dev-use-local
// To use this repo's own prebuilt image: pixi run dev-use-prebuilt
// "build": {
// "dockerfile": "Dockerfile",
// "context": ".."
// },
"image": "ghcr.io/blooop/python_template/devcontainer:latest",
"features": {
"./claude-code": {},
// "ghcr.io/devcontainers/features/docker-in-docker:2": {},
// "ghcr.io/devcontainers/features/common-utils:2": {}
},
"initializeCommand": ".devcontainer/claude-code/init-host.sh",
"customizations": {
Expand All @@ -14,16 +23,10 @@
"jjjermiah.pixi-vscode",
"charliermarsh.ruff",
"tamasfe.even-better-toml",
"mhutchie.git-graph"
]
"mhutchie.git-graph",
"anthropic.claude-code"
]
}
},
"features": {
"./claude-code": {}
// "ghcr.io/devcontainers/features/docker-in-docker:2": {}
// "ghcr.io/devcontainers/features/common-utils:2": {},
// "ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {},
// "ghcr.io/jsburckhardt/devcontainer-features/codex:latest": {}
},
"runArgs": [
"--network=host"
Expand All @@ -38,7 +41,8 @@
"mounts": [
"source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume",
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind",
"source=${localEnv:HOME}/.config/gh,target=/home/vscode/.config/gh,type=bind"
"source=${localEnv:HOME}/.config/gh,target=/home/vscode/.config/gh,type=bind",
"source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind"
],
"postCreateCommand": "sudo chown vscode .pixi && pixi install"
}
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ updates:
- "jupyter_bokeh"
- "prek"
- "check-manifest"
- package-ecosystem: "docker"
directory: "/.devcontainer"
schedule:
interval: "monthly"
- package-ecosystem: github-actions
directory: /
schedule:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Devcontainer Image

on:
push:
branches: ["main"]
paths:
- ".devcontainer/**"
- ".github/workflows/devcontainer.yml"
pull_request:
branches: ["main"]
paths:
- ".devcontainer/**"
- ".github/workflows/devcontainer.yml"
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set image metadata
id: meta
run: |
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
DATE=$(date +%Y-%m-%d)
echo "short_sha=$SHORT_SHA" >> "$GITHUB_OUTPUT"
echo "date=$DATE" >> "$GITHUB_OUTPUT"

- name: Build and push devcontainer image
uses: devcontainers/ci@v0.3
with:
configFile: .devcontainer/ci/devcontainer.json
imageName: ghcr.io/${{ github.repository }}/devcontainer
imageTag: latest,sha-${{ steps.meta.outputs.short_sha }},${{ steps.meta.outputs.date }}
cacheFrom: ghcr.io/${{ github.repository }}/devcontainer:latest
push: ${{ github.event_name != 'pull_request' && 'always' || 'never' }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,7 @@ docs/reference/

.devpod/
.devpod-internal/
.ralph/

# Claude Code local settings (personal, not shared)
.claude/settings.local.json
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ repos:
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
# Shell script linter
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.11.0
hooks:
- id: shellcheck

# Checks for spelling mistakes
- repo: https://github.com/codespell-project/codespell
Expand Down
21 changes: 21 additions & 0 deletions PROMPT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Project Development Context

<!-- CUSTOMIZE: Replace this section with your project description -->
## Project Overview
[Describe your project here]

## Development Commands
<!-- These are from pyproject.toml - update if you customize tasks -->
- `pixi run test` - Run tests
- `pixi run lint` - Run linters (ruff, pylint, ty)
- `pixi run format` - Format code
- `pixi run ci` - Full CI pipeline

## Quality Standards
- All tests must pass
- Code must pass linting
- Follow existing code patterns

## Current Objectives
<!-- CUSTOMIZE: Add your current development goals -->
1. [Your objective here]
Loading