Automated code review that lands fixes.
clawpatch maps a repo into semantic feature slices, reviews each slice with a
provider, persists findings, and can run an explicit fix loop for one finding at
a time.
Current status: early CLI. Review/report/state are implemented; patching exists
behind clawpatch fix --finding <id> and still requires manual review of the
resulting worktree changes.
pnpm add -g @openclaw/clawpatchFrom source:
pnpm install
pnpm build
pnpm link --globalclawpatch init
clawpatch map
clawpatch review --limit 3
clawpatch report
clawpatch fix --finding <id>
clawpatch revalidate --finding <id>fix does not commit, push, open PRs, or land changes. It runs configured
validation commands and records a patch attempt under .clawpatch/.
- npm package bins
- selected package scripts:
start,build,test,lint,typecheck,format - Next.js
app/andpages/routes - Go
cmd/*/main.gocommands - Go
internal/*package slices - common project config files
Swift, Rust, deeper framework mappers, and agent-assisted enrichment are next steps.
The default provider is the local Codex CLI.
codex --version
clawpatch doctorProvider calls use codex exec with strict JSON schemas. Review and revalidate
run read-only; fix planning runs with workspace-write because Codex may edit the
working tree during the explicit fix command.
Supported provider names today:
codex: local Codex CLImock: deterministic test providermock-fail: failure test provider
Direct OpenAI, Claude, Gemini, and provider panels are not implemented yet.
clawpatch init: create.clawpatch/, detect project basics, write configclawpatch map: write feature recordsclawpatch status: show project, dirty state, feature/finding countsclawpatch review: review pending or selected featuresclawpatch report: print or write a Markdown findings reportclawpatch fix --finding <id>: run the explicit patch loop for one findingclawpatch revalidate --finding <id>: re-check one findingclawpatch doctor: check provider availabilityclawpatch clean-locks: clear feature locks
Useful flags:
--root <path>--state-dir <path>--config <path>--json--plain--limit <n>--feature <id>--finding <id>--provider <name>--model <name>--output <path>/-o <path>--dry-run--force
Unknown flags fail fast.
State is project-local by default:
.clawpatch/
config.json
project.json
features/*.json
findings/*.json
patches/*.json
reports/*.md
runs/*.json
Feature records are the durable work units. Findings and patch attempts link back to features so runs can resume and be audited.
- Review does not edit files.
- Fix is explicit and selected by finding ID.
- Fix refuses a dirty source worktree by default.
- Clawpatch never commits, pushes, opens PRs, or lands changes today.
- Provider output is parsed through strict schemas.
- Symlinked directories and generated build output are skipped during mapping.
See docs/spec.md for the longer product and implementation spec.