Skip to content

Conversation

@blooop
Copy link
Owner

@blooop blooop commented Jan 18, 2026

Summary

  • Add ralph-claude-code dependency to pyproject.toml for autonomous agent capabilities
  • Add comprehensive agent documentation files (@AGENT.md, @fix_plan.md, PROMPT.md) with development standards and quality guidelines
  • Update .gitignore to exclude Ralph session/state files and Claude Code local settings

Test plan

  • Verify pixi install completes successfully with the new dependency
  • Confirm .gitignore properly excludes Ralph state files
  • Review agent documentation for accuracy and completeness

🤖 Generated with Claude Code

Summary by Sourcery

Add autonomous AI agent support and guidance to the Python template project.

New Features:

  • Add ralph-claude-code as a development dependency to enable Ralph autonomous agent integration.

Enhancements:

  • Introduce PROMPT.md with detailed Ralph agent operating instructions, principles, and status reporting protocol.
  • Add @AGENT.md with build, test, lint, and quality standards for agent-driven development workflows.
  • Add @fix_plan.md as a structured template for prioritizing and tracking Ralph tasks and completed work.

Build:

  • Update project dependencies via pixi.lock to reflect the new ralph-claude-code integration.

Chores:

  • Update .gitignore to exclude Ralph state/session artifacts and local Claude Code settings.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 18, 2026

Reviewer's Guide

Adds the ralph-claude-code integration to the project configuration and introduces comprehensive autonomous agent documentation and workflow standards, along with ignoring agent-related state/config files in version control.

Flow diagram for Ralph status and EXIT_SIGNAL decision logic

flowchart TD
    A["Start end_of_loop_evaluation"] --> B["All tasks in fix_plan complete?"]
    B -->|Yes| C["All requirements from specs implemented?"]
    B -->|No| D["Any blocker detected (external dependency or recurring error)?"]

    C -->|Yes| E["All tests passing or legitimately absent?"]
    C -->|No| D

    E -->|Yes| F["Set STATUS COMPLETE"]
    E -->|No| G["Set STATUS IN_PROGRESS and TESTS_STATUS FAILING"]

    F --> H["Set EXIT_SIGNAL true"]
    H --> I["Emit RALPH_STATUS block with recommendation project ready for review"]

    G --> J["Set EXIT_SIGNAL false"]
    J --> K["Emit RALPH_STATUS block with recommendation continue fixing tests"]

    D -->|Yes| L["Set STATUS BLOCKED"]
    D -->|No| M["Set STATUS IN_PROGRESS"]

    L --> N["Set EXIT_SIGNAL false"]
    N --> O["Emit RALPH_STATUS with recommendation human intervention or wait for dependency"]

    M --> P["Evaluate recent_loops_for_test_only_pattern"]
    P -->|Test_only_pattern_detected| Q["Set WORK_TYPE TESTING and recommendation no implementation needed"]
    P -->|Normal_progress| R["Set WORK_TYPE IMPLEMENTATION and recommendation continue next task"]

    Q --> S["Set EXIT_SIGNAL false"]
    R --> S
    S --> T["Emit RALPH_STATUS block for ongoing work"]
Loading

File-Level Changes

Change Details Files
Add ralph-claude-code as a development dependency for autonomous agent capabilities.
  • Extend the base dependency list in pyproject.toml to include ralph-claude-code with a minimum version constraint.
  • Regenerate/update pixi.lock to capture the new dependency resolution.
pyproject.toml
pixi.lock
Introduce detailed operational prompt and workflow for the Ralph autonomous development agent.
  • Create PROMPT.md describing Ralph’s role, objectives, execution guidelines, testing constraints, and status-reporting contract.
  • Define explicit EXIT_SIGNAL and status block semantics and multiple completion/blocked scenarios for the agent.
  • Document the project structure and expected main loop behavior, including reliance on @AGENT.md and @fix_plan.md.
PROMPT.md
Document build, test, lint, and quality standards for agent-driven development.
  • Add @AGENT.md with pixi-based setup, test, lint, and CI task commands.
  • Specify feature development quality standards including coverage expectations, git workflow, documentation requirements, and completion checklist.
  • Clarify how Ralph should maintain @fix_plan.md and integrate with project workflows.
@AGENT.md
Provide a template fix plan for Ralph-driven work tracking.
  • Create @fix_plan.md with sections for prioritized tasks (high/medium/low) and a Completed list seeded with initial Ralph setup items.
  • Add notes instructing users to adapt the plan for project-specific tasks and to use pixi run ci for validation.
@fix_plan.md
Ensure Ralph/Claude agent state and configuration files are not tracked by git.
  • Update .gitignore to exclude Ralph session/state artifacts and Claude Code local settings to avoid dirty working tree from agent tooling.
.gitignore

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • Consider whether ralph-claude-code should be a dev-only or optional extra dependency rather than a mandatory runtime dependency in pyproject.toml, so that consumers of the template aren't forced to install agent tooling if they don't need it.
  • The agent instructions currently hard-code paths and assumptions like /workspaces/pythontemplate; it may be more robust to parameterize or generalize these so the template remains accurate when cloned under different project names or directory structures.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider whether `ralph-claude-code` should be a dev-only or optional extra dependency rather than a mandatory runtime dependency in `pyproject.toml`, so that consumers of the template aren't forced to install agent tooling if they don't need it.
- The agent instructions currently hard-code paths and assumptions like `/workspaces/pythontemplate`; it may be more robust to parameterize or generalize these so the template remains accurate when cloned under different project names or directory structures.

## Individual Comments

### Comment 1
<location> `PROMPT.md:284` </location>
<code_context>
+## Existing Infrastructure
+- **Package manager**: pixi (conda-forge based)
+- **Testing**: pytest with coverage
+- **Linting**: ruff, pylint, ty
+- **CI/CD**: GitHub Actions
+- **Dev environment**: devcontainer support
</code_context>

<issue_to_address>
**question (typo):** Clarify or correct the `ty` tool name in the linting list.

The list currently says `ruff, pylint, ty`, but `ty` isn’t a standard Python linting or type-checking tool. If this is a typo (e.g., you meant `mypy` or `pyright`), please correct it; otherwise, add a brief note explaining what `ty` is.

Suggested implementation:

```
- **Linting/typing**: ruff, pylint, mypy

```

1. Confirm that `mypy` is indeed the tool used for type checking in this project (e.g., in `pyproject.toml`, `pixi` tasks, or CI workflows).  
2. If a different tool is used (e.g., `pyright` or another checker), replace `mypy` in the updated line with the actual tool name to keep the documentation accurate.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

- 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>
@blooop blooop merged commit 0d32b9f into main Jan 18, 2026
7 checks passed
@blooop blooop deleted the feature/ralph_pixi branch January 18, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants