Ralph Harness

Coding Agents 💻 Python ⚖️ MIT 🟢 Actively maintained
20 stars

LoopGate is a harness that runs coding agents (Claude, Codex, Copilot, etc.) in a loop, enforcing quality gates before any changes are accepted. It solves the problem of agents making unvetted changes by requiring each iteration to pass linting, type checks, security scans, and tests. It is for developers who want to use AI agents but maintain strict quality control.

✨ Key features

  • Gate-enforced work: agent changes land only if they pass quality gates
  • Built-in stack: lint, format, type-checks, security audit, tests, coverage
  • Worker-agnostic: works with Claude, Codex, Copilot, or any CLI agent
  • Repo-as-memory workflow with specs and status files
  • Fresh-context iterations to reduce context rot
  • Forbidden-file containment and diff size guardrails

🎯 Use cases

  • Automated coding loops with quality checks
  • Enforcing code standards on AI-generated code
  • Running agents to implement features from a plan
  • Adding quality gates to existing repositories

📦 Installation

🧰 Requirements: Python 3.10+, Linux or macOS (Windows experimental), and pip, uv, or poetry. Requires GitHub CLI for template creation.

# Using uv
uv sync
source .venv/bin/activate
harness install
git add . && git commit
# Using poetry
poetry install
poetry run harness install
git add . && git commit
# Using pip
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt -e .
harness install
git add . && git commit

🚀 Usage

Start a new project from template
gh repo create <your-github-username>/<your-new-app-name> --template rxdt/loopgate_harness --private --clone && cd <your-new-app-name> && uv run harness install && source .venv/bin/activate && git add . && git commit --amend --no-edit
Run the gate and loop
harness gate
harness run

⚠️ Good to know

Windows support is experimental; network access required for semgrep and pip-audit; worker is not sandboxed unless configured.

❓ FAQ

What is Ralph?

Ralph is the loop runner that drives each agent iteration, as mentioned in the README.

How do I add LoopGate to an existing repository?

Run harness init to add LoopGate to an existing repository, copying configurations from your config files.

What happens if an agent edits a forbidden file?

The file will be unstaged and the agent's commit will be blocked, forcing them to fix it.

Can I use any coding agent with LoopGate?

Yes, the harness is worker-agnostic and works with any CLI agent that reads a prompt from stdin and can edit/commit.

📊 Repository

Stars★ 20
Forks🍴 12
Open issues🐛 9
Last commit🕒 Sep 4, 2026
Created📅 Jun 2026
Language💻 Python
License⚖️ MIT

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.