Review
Analyze, simplify, and de-slopify a branch before merge
Review current branch is the pre-merge inspection flow.
It uses $review-phase as a readonly-by-default wrapper for findings, risks, missing validation, simplification opportunities, and architecture friction. Review starts with $review so Standards findings and Spec findings stay separate before $autoreview proposes structured candidates. Inside $delivery-phase, review is mandatory and can hand blocking findings back to delivery. As a standalone flow, it stops after the review report unless the operator explicitly asks to fix findings.
- Use this when: the current branch needs analysis, cleanup, refactor guidance, or de-slopification before merge.
- It gives you: OpenClaw-backed structured review grounded in the diff, scoped guidance, tests, docs, and validation evidence.
- It ends with: blocking findings, non-blocking improvements, missing checks, residual risk, and recommended next action.
- Runtime and lenses:
$review-phasestarts with$review, then uses mandatory$autoreviewruntime; mandatory review lenses are$simplify,$improve-codebase-architecture, and scopedAGENTS.mdskills;$parallel-researchremains optional.
Runtime Graph
Review turns branch material into verified findings. The graph shows the important distinction: $review keeps Standards and Spec axes separate, $autoreview proposes candidates, and $review-phase accepts only what survives source, guidance, tests, and lens checks.
Reading The Review Loop
- Name the target first: diff, PR, branch range, files, docs, plan, or runtime evidence.
$reviewframes fixed point, Standards sources, Spec source, and separate axis output.$autoreviewis input, not verdict. Candidate findings need manual verification.$simplifycatches avoidable complexity;$improve-codebase-architecturecatches boundary drift. Both are mandatory.$parallel-researchstays readonly and useful only when checks split cleanly.- Standalone review reports. Fixes route to delivery or debug when the operator asks.
Entrypoints
$review-phase: run the review wrapper.$review: pin fixed diff and separate Standards versus Spec review axes.$autoreview: run the OpenClaw structured review helper as the core review runtime.$parallel-research: fan out readonly checks when the branch can split by subsystem, risk, or hypothesis.$simplify: inspect overcomplexity, naming, derivable state, avoidable abstraction, and scope creep.$improve-codebase-architecture: surface deeper boundary or module-shape issues.
Flow
Turn candidates into findings this way:
- Identify the review target: current diff, PR, branch range, files, spec, plan, docs, or runtime evidence.
- Read relevant
AGENTS.mdguidance and source artifacts before judging the branch. - List the scoped skills named by relevant
AGENTS.mdprompts; adherence to those skills is mandatory review scope. - Apply
$review: pin fixed point, identify Standards sources, identify Spec source or skipped reason. - Run
$autoreviewfor the target, then manually verify every accepted finding against source and local guidance. - Apply
$simplifyand$improve-codebase-architectureon every review target. - Inspect the diff, touched docs, tests, validation output, and any linked spec or plan.
- Use readonly parallel research only when independent checks can run without duplicating the main pass.
- Report findings first, ordered by severity, with file or artifact references.
- Separate blocking defects from optional cleanup, design concerns, and follow-up debt.
- Run safe readonly validation when it matches the target, or state why validation was not run.
Decision Points
- If the review target is unclear, define it before reviewing.
- If the branch has runtime evidence of failure, route that part through Debugging.
- If findings require code changes, enter an owning delivery/debug/fix flow before editing.
- If the review finds broader architecture debt, record it as follow-up instead of hiding it in the review report.
Terminal Outcome
The branch has an inspectable review report: blocking issues, evidence, exact autoreview command/result, scoped skill adherence, recommended action, validation coverage, and residual risk. In delivery-owned mode, blocking in-scope findings return to $delivery-phase for fixes.
Validation
Report the exact files, diff range, PR, autoreview command, docs, scoped AGENTS.md prompts, scoped skills, or runtime artifacts reviewed. If no issues are found, say that directly and still name the checks run and remaining risk.