Repository navigation
Feature/update from template - #721
Conversation
Adds <3.0 upper bound to the gh dependency to match the pattern used by other tooling dependencies (shellcheck, devpod) and reduce risk of unexpected breaking changes from future major versions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Clarify that ty is a type checker (not a typo) in PROMPT.md - Remove hardcoded path from @AGENT.md for template portability Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add ralph-claude-code integration and agent documentation
Add upper version bound for gh dependency
Replace previous ralph implementation with ralph-orchestrator from the blooop conda channel. Adds configuration files and documentation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.3 to 0.9.4. - [Release notes](https://github.com/prefix-dev/setup-pixi/releases) - [Commits](prefix-dev/setup-pixi@v0.9.3...v0.9.4) --- updated-dependencies: - dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Updates the requirements on [ty](https://github.com/astral-sh/ty) to permit the latest version. Updates `ty` to 0.0.14 - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](astral-sh/ty@0.0.12...0.0.14) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.14 dependency-type: direct:development dependency-group: lib-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
…deb95912b build(deps-dev): update ty requirement from <=0.0.12,>=0.0.12 to >=0.0.12,<=0.0.14 in the lib-dependencies group
Updates the requirements on [hypothesis](https://github.com/HypothesisWorks/hypothesis), [ruff](https://github.com/astral-sh/ruff), [coverage](https://github.com/coveragepy/coveragepy) and [prek](https://github.com/j178/prek) to permit the latest version. Updates `hypothesis` to 6.151.4 - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](HypothesisWorks/hypothesis@hypothesis-python-6.104.2...hypothesis-python-6.151.4) Updates `ruff` to 0.14.14 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.5.0...0.14.14) Updates `coverage` to 7.13.2 - [Release notes](https://github.com/coveragepy/coveragepy/releases) - [Changelog](https://github.com/coveragepy/coveragepy/blob/main/CHANGES.rst) - [Commits](coveragepy/coveragepy@7.5.4...7.13.2) Updates `prek` to 0.3.1 - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](j178/prek@v0.2.28...v0.3.1) --- updated-dependencies: - dependency-name: hypothesis dependency-version: 6.151.4 dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: ruff dependency-version: 0.14.14 dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: coverage dependency-version: 7.13.2 dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: prek dependency-version: 0.3.1 dependency-type: direct:development dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
…169ddd55f build(deps-dev): bump the dev-dependencies group with 4 updates
- Add CI workflow to build and publish devcontainer image to ghcr.io on changes to .devcontainer/ files (with PR validation builds) - Create .devcontainer/ci/ config for CI image builds with features baked in - Update devcontainer.json to pull prebuilt image instead of building locally (local build instructions preserved as comments) - Absorb claude-code feature runtime config (mount, extension) into devcontainer.json since features are pre-baked in the image - Add docker ecosystem to dependabot for base image update tracking https://claude.ai/code/session_01P15jZtANbd9QQm4SiY3Nzh
…dev/setup-pixi-0.9.4 build(deps): bump prefix-dev/setup-pixi from 0.9.3 to 0.9.4
…er-tuiW0 Add prebuilt devcontainer image support via GHCR
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Updates the requirements on [hypothesis](https://github.com/HypothesisWorks/hypothesis), [ruff](https://github.com/astral-sh/ruff) and [coverage](https://github.com/coveragepy/coveragepy) to permit the latest version. Updates `hypothesis` to 6.151.5 - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](HypothesisWorks/hypothesis@hypothesis-python-6.104.2...hypothesis-python-6.151.5) Updates `ruff` to 0.15.0 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.5.0...0.15.0) Updates `coverage` to 7.13.4 - [Release notes](https://github.com/coveragepy/coveragepy/releases) - [Changelog](https://github.com/coveragepy/coveragepy/blob/main/CHANGES.rst) - [Commits](coveragepy/coveragepy@7.5.4...7.13.4) --- updated-dependencies: - dependency-name: hypothesis dependency-version: 6.151.5 dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: ruff dependency-version: 0.15.0 dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: coverage dependency-version: 7.13.4 dependency-type: direct:development dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
…/checkout-6 build(deps): bump actions/checkout from 4 to 6
Updates the requirements on [ty](https://github.com/astral-sh/ty) to permit the latest version. Updates `ty` to 0.0.15 - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](astral-sh/ty@0.0.12...0.0.15) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.15 dependency-type: direct:development dependency-group: lib-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
GHCR packages are private by default, which causes MANIFEST_UNKNOWN errors when pulling the prebuilt devcontainer image. Add documentation explaining the issue and providing instructions for making the package public via the GitHub UI or CLI. Also fix missing commas in the commented-out features block in devcontainer.json that would cause JSON parse errors if uncommented.
Switch devcontainer.json from prebuilt GHCR image to local builds as the default. This ensures the template works out of the box for forks and new projects without depending on a pre-existing GHCR image. The prebuilt image is preserved as a commented-out option with instructions in the README for enabling it, including the requirement to make the GHCR package public (private by default).
…ad0c9d8fd build(deps-dev): bump the dev-dependencies group with 3 updates
…efcf0f305 build(deps-dev): update ty requirement from <=0.0.14,>=0.0.12 to >=0.0.12,<=0.0.15 in the lib-dependencies group
…ab445de5a build(deps-dev): bump the dev-dependencies group with 3 updates
…her into feature/update_from_template
Resolve conflicts keeping ralph-orchestrator over ralph-claude-code: - pyproject.toml: keep ralph-orchestrator dependency, drop ralph-claude-code and gh - .gitignore: keep .ralph/ ignore, add .claude/settings.local.json from main - PROMPT.md: keep clean ralph-orchestrator template - .claude/README.md: keep ralph-orchestrator documentation - pixi.lock: regenerated with updated dependencies
Add ralph-orchestrator as pixi dependency
The local system hook using `pixi run shellcheck` fails in CI because pixi is not available in the prek-action environment. Switch to the official shellcheck-precommit repo which bundles its own binary.
Feature/shellcheck
…her into feature/update_from_template
turn off features in ci devcontainer
Reviewer's GuideUpdates the project template integration by hardening shell scripts, adding devcontainer CI and prebuilt/local image switch scripts, integrating Ralph Orchestrator and Claude Code configuration, and adjusting dependencies and automation around devcontainers and tooling. Flow diagram for devcontainer_use_prebuilt.sh behaviorflowchart TD
A[Start_devcontainer_use_prebuilt] --> B[Set_DEVCONTAINER_JSON_path]
B --> C{gh_CLI_available?}
C -- yes --> D[GH_AVAILABLE=true]
C -- no --> E[GH_AVAILABLE=false_and_warn]
D --> F
E --> F
F[Get_origin_remote_URL] --> G{origin_found?}
G -- no --> H[Exit_with_error]
G -- yes --> I[Parse_owner_repo_from_URL]
I --> J{Valid_owner/repo?}
J -- no --> H
J -- yes --> K[Build_IMAGE_ghcr.io/owner/repo/devcontainer:latest]
K --> L{devcontainer.json_already_uses_IMAGE?}
L -- yes --> M[Print_nothing_to_do_and_exit]
L -- no --> N[Transform_devcontainer.json_with_awk]
N -->|comment_build_block| N1[Comment_features_block]
N1 --> N2[Set_image_line_to_repo_IMAGE]
N2 --> O[Write_back_devcontainer.json]
O --> P[Print_updated_message]
P --> Q[Attempt_to_make_GHCR_package_public]
Q --> R[Derive_OWNER_and_PACKAGE]
R --> S{GH_AVAILABLE?}
S -- no --> T[Print_manual_visibility_instructions_and_exit]
S -- yes --> U[Check_if_OWNER_is_org_or_user]
U --> V[Set_API_PATH_and_SETTINGS_URL]
V --> W{gh_api_PATCH_visibility_public_success?}
W -- yes --> X[Print_package_public]
W -- no --> Y[Print_API_error_and_manual_steps]
X --> Z[End]
Y --> Z
Flow diagram for devcontainer_use_local.sh behaviorflowchart TD
A[Start_devcontainer_use_local] --> B[Set_DEVCONTAINER_JSON_path]
B --> C{Has_uncommented_build_block?}
C -- yes --> D[Print_already_using_local_and_exit]
C -- no --> E[Run_awk_on_devcontainer.json]
E --> F[Uncomment_build_block]
F --> G[Uncomment_features_block]
G --> H[Comment_out_uncommented_image_line]
H --> I[Write_back_devcontainer.json_tmp_to_file]
I --> J[Print_switched_to_local_build]
J --> K[End]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 3 issues, and left some high level feedback:
- The
setup-git-merge-driverpixi task was changed fromgit config merge.ours.driver truetogit config merge.ourslock.driver true, which looks like a typo (ourslockinstead ofours) and will likely break the intended merge driver configuration. - In
scripts/setup_host.sh,sudo groupadd dockerwill now run underset -eo pipefailand will fail if thedockergroup already exists; consider adding|| trueor checking for the group before creating it to keep the script idempotent.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `setup-git-merge-driver` pixi task was changed from `git config merge.ours.driver true` to `git config merge.ourslock.driver true`, which looks like a typo (`ourslock` instead of `ours`) and will likely break the intended merge driver configuration.
- In `scripts/setup_host.sh`, `sudo groupadd docker` will now run under `set -eo pipefail` and will fail if the `docker` group already exists; consider adding `|| true` or checking for the group before creating it to keep the script idempotent.
## Individual Comments
### Comment 1
<location path="pyproject.toml" line_range="151" />
<code_context>
clear-pixi = "rm -rf .pixi pixi.lock"
-setup-git-merge-driver = "git config merge.ours.driver true"
+ralph = "ralph"
+setup-git-merge-driver = "git config merge.ourslock.driver true"
update-from-template-repo = "./scripts/update_from_template.sh"
+dev-use-prebuilt = "./scripts/devcontainer_use_prebuilt.sh"
</code_context>
<issue_to_address>
**issue (bug_risk):** Typo in git merge driver config key (`merge.ourslock.driver` vs `merge.ours.driver`)
Changing `merge.ours.driver` to `merge.ourslock.driver` appears to be a typo and will configure a merge driver that doesn’t exist, so the intended merge behavior won’t apply. Unless you’ve added a custom `ourslock` driver, this should stay as `merge.ours.driver`.
</issue_to_address>
### Comment 2
<location path="scripts/devcontainer_use_prebuilt.sh" line_range="41-50" />
<code_context>
+fi
+
+# --- Transform devcontainer.json ---
+awk -v image="$IMAGE" '
+ # Comment out uncommented build block
+ /^ "build": \{/ { in_build=1 }
+ in_build {
+ sub(/^ /, " // ")
+ if (/^ \/\/ \}/) in_build=0
+ print; next
+ }
+
+ # Comment out uncommented features block
+ /^ "features": \{/ { in_features=1 }
+ in_features {
+ sub(/^ /, " // ")
+ if (/^ \/\/ \}/) in_features=0
+ print; next
+ }
+
+ # Uncomment commented image line and set repo URL
+ /^ \/\/ "image":/ {
+ printf " \"image\": \"%s\",\n", image
+ next
+ }
+
+ # Replace uncommented image line (e.g. template URL) with repo URL
+ /^ "image":/ {
+ printf " \"image\": \"%s\",\n", image
+ next
+ }
+
+ { print }
+' "$DEVCONTAINER_JSON" > "${DEVCONTAINER_JSON}.tmp" && mv "${DEVCONTAINER_JSON}.tmp" "$DEVCONTAINER_JSON"
+
</code_context>
<issue_to_address>
**suggestion (bug_risk):** The AWK transforms are tightly coupled to exact indentation and block shapes in devcontainer.json
The `awk` logic depends on exact spacing, brace placement, and comment style for the `build` and `features` blocks. Any reformatting (e.g., prettier or VS Code) could break the transform without obvious errors. Please either make the patterns more tolerant (e.g., flexible whitespace) or add checks that fail with a clear message when the expected structure isn’t found, so we avoid silent partial updates.
Suggested implementation:
```
# --- Transform devcontainer.json ---
awk -v image="$IMAGE" '
# Return 1 if the line is already commented with //
function is_commented(line) {
return match(line, /^[[:space:]]*\/\//)
}
# Comment out an uncommented object block starting at "build": { ... }
/^[[:space:]]*"build"[[:space:]]*:[[:space:]]*\{/ {
if (!is_commented($0)) {
in_build = 1
}
}
in_build {
# Prefix // after existing indentation, but only if not already commented
if (!is_commented($0)) {
sub(/^([[:space:]]*)/, "&// ")
}
# Close block when we hit a closing brace line
if ($0 ~ /^[[:space:]]*}[[:space:]]*(,)?[[:space:]]*$/) {
in_build = 0
}
print
next
}
# Comment out an uncommented object block starting at "features": { ... }
/^[[:space:]]*"features"[[:space:]]*:[[:space:]]*\{/ {
if (!is_commented($0)) {
in_features = 1
}
}
in_features {
if (!is_commented($0)) {
sub(/^([[:space:]]*)/, "&// ")
}
if ($0 ~ /^[[:space:]]*}[[:space:]]*(,)?[[:space:]]*$/) {
in_features = 0
}
print
next
}
# Uncomment commented image line and set repo URL (preserve indentation)
/^[[:space:]]*\/\/[[:space:]]*"image"[[:space:]]*:/ {
match($0, /^([[:space:]]*)/)
indent = substr($0, RSTART, RLENGTH)
printf "%s\"image\": \"%s\",\n", indent, image
next
}
# Replace uncommented image line (e.g. template URL) with repo URL (preserve indentation)
/^[[:space:]]*"image"[[:space:]]*:/ {
match($0, /^([[:space:]]*)/)
indent = substr($0, RSTART, RLENGTH)
printf "%s\"image\": \"%s\",\n", indent, image
next
}
{ print }
' "$DEVCONTAINER_JSON" > "${DEVCONTAINER_JSON}.tmp" && mv "${DEVCONTAINER_JSON}.tmp" "$DEVCONTAINER_JSON" && {
# Verify that the expected image line was actually written; fail loudly if not
if ! grep -q '^[[:space:]]*"image"[[:space:]]*:[[:space:]]*"'\""$IMAGE"\"'"' "$DEVCONTAINER_JSON"; then
echo "ERROR: Failed to update devcontainer.json to use image $IMAGE. Check the devcontainer.json structure and try again." >&2
exit 1
fi
}
```
If there are any other helper scripts or tests that assert specific spacing for the `"build"`, `"features"`, or `"image"` lines in `devcontainer.json`, they may need to be updated to tolerate the more flexible whitespace handling introduced here.
</issue_to_address>
### Comment 3
<location path=".claude/README.md" line_range="94" />
<code_context>
+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.)
+- `hats` - Define custom personas for multi-agent workflows
+
</code_context>
<issue_to_address>
**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.
```suggestion
- `cli.backend` - AI backend (Claude, Gemini, Codex, etc.)
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| clear-pixi = "rm -rf .pixi pixi.lock" | ||
| setup-git-merge-driver = "git config merge.ours.driver true" | ||
| ralph = "ralph" | ||
| setup-git-merge-driver = "git config merge.ourslock.driver true" |
There was a problem hiding this comment.
issue (bug_risk): Typo in git merge driver config key (merge.ourslock.driver vs merge.ours.driver)
Changing merge.ours.driver to merge.ourslock.driver appears to be a typo and will configure a merge driver that doesn’t exist, so the intended merge behavior won’t apply. Unless you’ve added a custom ourslock driver, this should stay as merge.ours.driver.
| awk -v image="$IMAGE" ' | ||
| # Comment out uncommented build block | ||
| /^ "build": \{/ { in_build=1 } | ||
| in_build { | ||
| sub(/^ /, " // ") | ||
| if (/^ \/\/ \}/) in_build=0 | ||
| print; next | ||
| } | ||
|
|
||
| # Comment out uncommented features block |
There was a problem hiding this comment.
suggestion (bug_risk): The AWK transforms are tightly coupled to exact indentation and block shapes in devcontainer.json
The awk logic depends on exact spacing, brace placement, and comment style for the build and features blocks. Any reformatting (e.g., prettier or VS Code) could break the transform without obvious errors. Please either make the patterns more tolerant (e.g., flexible whitespace) or add checks that fail with a clear message when the expected structure isn’t found, so we avoid silent partial updates.
Suggested implementation:
# --- Transform devcontainer.json ---
awk -v image="$IMAGE" '
# Return 1 if the line is already commented with //
function is_commented(line) {
return match(line, /^[[:space:]]*\/\//)
}
# Comment out an uncommented object block starting at "build": { ... }
/^[[:space:]]*"build"[[:space:]]*:[[:space:]]*\{/ {
if (!is_commented($0)) {
in_build = 1
}
}
in_build {
# Prefix // after existing indentation, but only if not already commented
if (!is_commented($0)) {
sub(/^([[:space:]]*)/, "&// ")
}
# Close block when we hit a closing brace line
if ($0 ~ /^[[:space:]]*}[[:space:]]*(,)?[[:space:]]*$/) {
in_build = 0
}
print
next
}
# Comment out an uncommented object block starting at "features": { ... }
/^[[:space:]]*"features"[[:space:]]*:[[:space:]]*\{/ {
if (!is_commented($0)) {
in_features = 1
}
}
in_features {
if (!is_commented($0)) {
sub(/^([[:space:]]*)/, "&// ")
}
if ($0 ~ /^[[:space:]]*}[[:space:]]*(,)?[[:space:]]*$/) {
in_features = 0
}
print
next
}
# Uncomment commented image line and set repo URL (preserve indentation)
/^[[:space:]]*\/\/[[:space:]]*"image"[[:space:]]*:/ {
match($0, /^([[:space:]]*)/)
indent = substr($0, RSTART, RLENGTH)
printf "%s\"image\": \"%s\",\n", indent, image
next
}
# Replace uncommented image line (e.g. template URL) with repo URL (preserve indentation)
/^[[:space:]]*"image"[[:space:]]*:/ {
match($0, /^([[:space:]]*)/)
indent = substr($0, RSTART, RLENGTH)
printf "%s\"image\": \"%s\",\n", indent, image
next
}
{ print }
' "$DEVCONTAINER_JSON" > "${DEVCONTAINER_JSON}.tmp" && mv "${DEVCONTAINER_JSON}.tmp" "$DEVCONTAINER_JSON" && {
# Verify that the expected image line was actually written; fail loudly if not
if ! grep -q '^[[:space:]]*"image"[[:space:]]*:[[:space:]]*"'\""$IMAGE"\"'"' "$DEVCONTAINER_JSON"; then
echo "ERROR: Failed to update devcontainer.json to use image $IMAGE. Check the devcontainer.json structure and try again." >&2
exit 1
fi
}
If there are any other helper scripts or tests that assert specific spacing for the "build", "features", or "image" lines in devcontainer.json, they may need to be updated to tolerate the more flexible whitespace handling introduced here.
| 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.) |
There was a problem hiding this comment.
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.
| - `cli.backend` - AI backend (claude, gemini, codex, etc.) | |
| - `cli.backend` - AI backend (Claude, Gemini, Codex, etc.) |
Summary by Sourcery
Update development tooling, devcontainer workflow, and Claude/Ralph integration to align the project with the latest template and improve automation.
New Features:
Bug Fixes:
Enhancements:
CI:
Documentation: