Local Review
Announce at start: "I'm using the local-review skill."
Usage
/local-review
/local-review --uncommitted
/local-review --since HEAD~3
/local-review --max-iterations 5 --required-clean-runs 2
/local-review --no-fix
/local-review --dry-run
Execution
Step 1 — Parse arguments
--uncommitted→ review only unstaged/staged changes--since→ base ref for diff (default: auto-detected from branch)--max-iterations→ cap on review-fix cycles (default: 10)--required-clean-runs→ consecutive clean passes needed (default: 2)--no-fix→ report issues only, no code changes--no-commit→ fix but don't commit (leave staged)--dry-run→ log decisions only; do not write edits or commits
Step 2 — Initialize FSM
onex run-node node_local_review \
--input '{"uncommitted": false, "since": null, "max_iterations": 3, "required_clean_runs": 2, "no_fix": false, "no_commit": false, "dry_run": false}' \
--timeout 300
On non-zero exit, a SkillRoutingError JSON envelope is returned — surface it directly, do not produce prose.
Outputs ModelLocalReviewState JSON with initial phase.
Step 3 — Execute review loop
Repeat until N consecutive clean passes or max iterations reached:
- REVIEW: Inspect changed files (ruff, mypy, tests, CLAUDE.md conventions, aislop patterns)
- FIX: Apply fixes for each finding (unless
--no-fix) - COMMIT: Stage and commit fixes with
fix(review): <description>(unless--no-commit) - CHECK_CLEAN: Re-run review on committed changes; count consecutive clean passes
→ DONE when consecutive_clean >= required_clean_runs
→ FAILED if circuit breaker (3 consecutive phase failures) trips
Step 4 — Report
Write ModelSkillResult to $ONEX_STATE_DIR/skill-results/{context_id}/local-review.json.
Display: iterations run, issues found/fixed, final clean status, any remaining nits.
Architecture
SKILL.md -> thin shell (this file)
node -> omnimarket/src/omnimarket/nodes/node_local_review/ (FSM logic)
contract -> node_local_review/contract.yaml