Clawpatch automates code review with semantic units and patch loops

Clawpatch has just rolled out an automated code review tool that maps repos into semantic work units, not just files. It runs an explicit patch-and-revalidate loop with guardrails, audit trails, and schema-checked provider responses. Defaults to the local Codex CLI.

Clawpatch automates code review with semantic units and patch loops

TL;DR

  • New Code Review Tool by Peter Steinberger
  • Semantic unit mapping: Repository split into feature-level work units for provider review and auditable findings persistence
  • Context-rich feature records: Entrypoints, owned files, nearby tests, trust boundaries; findings include severity, confidence, evidence, recommendation
  • Review grouping: Semantic units such as routes, commands, packages, CLI scripts, and tests
  • Patch loop workflow: clawpatch init, map, review --limit 10, report, fix --finding, revalidate --finding
  • Validation and history: Format, type, lint, and test checks; results stored in patch history under .clawpatch/
  • Guardrails and providers: Clean-worktree default, no implicit commits/destructive Git; default provider shells out to local Codex CLI

Peter Steinberger, creator of OpenClaw, recently released Clawpatch, described as an automated code review tool that "goes beyond traditional linters" by mapping a repository into semantic work units, sending those units to a provider for review, and persisting findings for later audit and follow-up.

The tool focuses on feature-level context rather than file-by-file scanning. Its feature records can include entrypoints, owned files, nearby tests, and trust boundaries, and each finding carries severity, confidence, evidence, and a recommendation. The project also groups reviews around semantic units such as routes, commands, packages, CLI scripts, and tests.

Clawpatch’s workflow is built around an explicit patch loop. The documented process includes clawpatch init, clawpatch map, clawpatch review --limit 10, clawpatch report, clawpatch fix --finding abc123, and clawpatch revalidate --finding abc123. Validation for patch attempts can include format, type, lint, and test checks, with results recorded in the patch history.

The project particularly emphasizes guardrails: according to the documentation, it uses a clean-worktree check by default for fixes, avoids implicit commits and destructive Git operations, and keeps an audit trail in .clawpatch/. It also validates provider responses against strict JSON schemas before use.

Clawpatch’s default provider shells out to the local Codex CLI. The source also notes that initialization auto-detects project types including Node.js, TypeScript, Next.js, Python, Flask, FastAPI, Go, Rust/Cargo, and SwiftPM, and that settings are written to .clawpatch/config.json. A full configuration reference is linked from the project documentation at GitHub.

Source: Clawpatch

Continue the conversation on Slack

Did this article spark your interest? Join our community of experts and enthusiasts to dive deeper, ask questions, and share your ideas.

Join our community