Thanks for your interest in contributing! ralph is a dependency-free Bash /
PowerShell loop wrapper that runs an AI coding CLI in a fresh session each
iteration. Contributions of all kinds are welcome: bug reports, documentation,
new agent integrations, skill improvements, and code.
By participating, you agree to abide by our Code of Conduct.
- Report a bug — open a bug report issue.
- Request a feature — open a feature request issue.
- Submit a change — follow the fork-based pull request flow below.
- Report a vulnerability — see SECURITY.md (do not open a public issue).
- Fork the repository to your GitHub account.
- Create a branch from
mainwith a descriptive name:git checkout -b feature/add-new-agent
- Make your changes following the Code Style guidelines.
- Keep Bash and PowerShell in sync — see Bash ↔ PowerShell parity.
- Add or update tests for any new behaviour.
- Update documentation (
README.md) if your change affects configuration or usage. - Commit with clear messages following Conventional Commits:
feat: add support for a new agent CLI fix: keep previous config when .env has an invalid value docs: clarify the RALPH_MEMORY_MAX behaviour - Push your branch and open a Pull Request against
main. - Sign the CLA when prompted by the CLA Assistant bot.
- Wait for review — a maintainer will review your PR within 2 weeks (SLA).
- Create a branch from
main(no fork needed if you are a member of the org). - Follow steps 3-8 above.
- Request review from the maintainer team in CODEOWNERS.
All pull requests must pass the following automated checks before merge:
- CI lint and tests (
ci) — ShellCheck, PSScriptAnalyzer, and the bats test suite - License check (
license-check) — SPDX header verification - Pattern check (
pattern-check) — No internal URLs, IPs, or corporate email addresses - Supply-chain (
scorecard) — OpenSSF Scorecard analysis - CLA signed (for external contributors)
Additionally:
- At least 1 maintainer approval is required.
- All review conversations must be resolved.
- The branch must be up to date with
main.
The loop ships as two equivalent implementations:
ralph-loop.sh— Bash version (canonical reference).ralph-loop.ps1— PowerShell version (pwsh 6+), with the same capabilities.
Mandatory rule: any behavioural change (a new RALPH_* option, a change to
the tool-rotation cycle, to token-exhaustion detection, to the log format, to
stop.md handling, to default flags, etc.) must be applied to BOTH files in
the same commit, so their observable behaviour stays identical. Do not leave
one lagging behind the other.
Known and accepted difference: the RAM limit (RALPH_MEMORY_MAX) is enforced
only on Linux via systemd-run --user --scope. On other platforms both versions
print a one-time warning and run the agent without a limit.
- Bash targets
bashwithset -u; pass ShellCheck with no warnings. - PowerShell targets
pwsh6+ withSet-StrictMode -Version Latest; pass PSScriptAnalyzer. - Prefer small, single-purpose functions; quote all expansions; avoid
eval.
Every script must include the copyright header (after the shebang line):
# Copyright (c) 2026 César Gallego Rodríguez
# SPDX-License-Identifier: Apache-2.0Follow Conventional Commits:
| Prefix | Use |
|---|---|
feat: |
New feature |
fix: |
Bug fix |
docs: |
Documentation only |
test: |
Adding or updating tests |
refactor: |
Code refactoring (no feature/fix) |
ci: |
CI/CD changes |
chore: |
Maintenance tasks |
- Tests live in
tests/and use bats (Bash Automated Testing System). - Run the suite locally before submitting a PR:
bats tests/
- New behaviour in
ralph-loop.shshould come with a bats test that does not require any AI CLI to be installed (use the argument-validation andstop.mdpaths, which exit before launching an agent).
By submitting a pull request, you agree to the terms of our Contributor License Agreement. The CLA Assistant bot will automatically check your PR and ask you to sign the CLA if you have not already done so.
The CLA ensures that contributions can be distributed under the project's Apache 2.0 license.
This project follows Semantic Versioning (SemVer):
- MAJOR — Incompatible changes to configuration keys or CLI contract
- MINOR — New features (backward-compatible)
- PATCH — Bug fixes (backward-compatible)
Releases are managed by maintainers. If you believe a release is warranted, open an issue to discuss.
Thank you for contributing to ralph!