🌀 coru-agent

AI-Powered Closed-Loop Refactor Orchestration

Automate large-scale code transformation across multi-repo workspaces.
Detect → Plan → Execute → Verify → Heal → Repeat

See Koru in Action

The Koru closed-loop refactor orchestration in action: detect, plan, execute, verify, heal, and repeat.

Core Mission

Transform how teams approach large-scale code modernization with intelligent, auditable automation.

🔄

Closed-Loop Automation

Detect issues → plan fixes → execute changes → verify safety → heal failures → repeat

🎫

Ticket-Driven Workflow

Structured, auditable refactor pipelines with zero-trust policy gates

🛡️

Regression-Free Verification

Multi-tier validation (unit tests, integration tests, semantic analysis)

🧠

LLM Orchestration

Coordinate multiple AI agents (Windsurf, Cursor, Claude Code, aider, OpenRouter)

Key Features

🤖 Autopilot Daemon

Terminal-driven IDE control with keyboard injection + plugin routing

🔁 Autonomous Loop

Unattended 24/7 refactor execution with human-safe fallbacks

🎫 Planfile Integration

Ticket-as-code with lifecycle state machines

🔐 Policy Gates

Safe-by-default LLM agent guardrails (no commits, no pushes by default)

🌍 Multi-Repo Runner

One command across matching repos with closed-loop retry

📊 JSON-Lines Auditing

Machine-readable event logs for CI/CD integration

The Koru Loop

1
DETECT
regix, TestQL, redup, Probe
2
PLAN
planfile, Prometheus
3
EXECUTE
Windsurf, Cursor, OpenRouter
4
VERIFY
pytest, TestQL, vallm
5
HEAL
Webhook API, retry loops
6
LEARN
pyqual, metrics, dashboards

Connected Ecosystem

20+ integrated tools for the complete refactor automation pipeline

planfile

Ticket backlog & execution gateway

regix

Python regression metrics & tracking

redup

Duplicate detection & deduplication

testql

Declarative HTTP scenario tests

wup

Real-time service dependency health

vallm

Multi-tier semantic patch validator

redsl

OpenRouter-powered auto-refactor

prefact

Proactive LLM-aware linter

costs

Zero-config AI cost per commit

Quick Start

Step 1: Install
pip install koru
Step 2: Initialize
koru --init
Step 3: View Brief
koru
Step 4: Run Loop
koru --queue --loop

Operational Modes

IDE-Native (Default)
When: Ticket work
Executor: Windsurf/Cursor LLM + regix/pytest
Headless Automation (Opt-in)
When: Infra tests, scheduled runs
Executor: OpenRouter (redsl, vallm, llx)
Autonomous Loop (24/7)
When: Unattended execution
Executor: Both modes + autopilot injection

By The Numbers

$13.86
LLM Usage
257 commits
0.1.197
Current Version
May 2026
82.8h
Human Dev Time
$8,285 value
20+
Integrated Tools
Full pipeline

Documentation

Ready to Automate at Scale?

Join teams using coru for closed-loop code transformation