OmniNode-ai

Local Review

Local code review loop that iterates through review, fix, commit cycles without pushing

OmniNode-ai 4 3 Actualitzat fa 6 mesos

Recursos

2
GitHub

Instal·la

npx skillscat add omninode-ai/omniclaude/plugins-onex-skills-local-review

Instal·la des del registre de SkillsCat.

SKILL.md

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:

  1. REVIEW: Inspect changed files (ruff, mypy, tests, CLAUDE.md conventions, aislop patterns)
  2. FIX: Apply fixes for each finding (unless --no-fix)
  3. COMMIT: Stage and commit fixes with fix(review): <description> (unless --no-commit)
  4. 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