Skip to content

About

Native Oh My Pi code-review extension: deterministic file filter, per-file rules, grouping, session persistence with strict resume, cross-run compare, and severity-grouped text / JSON / SARIF output. Zero LLM calls in commands. See docs/DESIGN.md for the full design.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

omp-review

Native Oh My Pi code-review extension: deterministic file filter, per-file rules, grouping, session persistence with strict resume, cross-run compare, and severity-grouped text / JSON / SARIF output. Zero LLM calls in commands. See docs/DESIGN.md for the full design.

Install

Load the compiled extension (no build step needed, dist/ is committed):

{ "omp": { "extensions": ["./dist/extension.js"] } }

Requires Node >= 22. Local dev: npm install && npm run build && npm test.

Commands

Command Purpose Key flags
/review-preview deterministic file list + skip reasons (no LLM) --from/--to/--commit/--exclude
/review-run single-command ocr equivalent: deterministic run + persist + self-dispatch reviewers --from/--to/--commit/--exclude/--rule/--format text|json|sarif/--output/--effort low|med|medium|high/--resume/--no-filter/--background/-b/--background-file/-B/--audience human|agent/--preview/--max-tokens/--concurrency/--timeout
/review-resume <id> strict-resume a range/commit run —
/review-compare <before> <after> 4-bucket finding diff —
/review-scan full-file audit, no diff --path/--exclude/--rule/--format/--output
/review-rules-check <path> which rule layer won for a path --rule

--provider / --model are rejected (role-based review only). Output is never truncated — use --output <path> for large runs.

Closed loop (review-submit tool)

/review-run (text) persists the deterministic run, then self-dispatches reviewers via the LLM turn (no manual fan-out; json/sarif stay pure with no dispatch). It prints a Dispatch plan (session id + one line per reviewer group) → reviewers are spawned with the prompt carrying session id, per-group file lists + rule layers, background context, effort→rounds, Carry-on notes, and the plan-gate hint → each reviewer records every finding with review-submit ({sessionId, path, content, category, severity, start_line, end_line, suggestion_code?, existing_code?, thinking?}) → /review-compare verifies the fix loop. Unanchored findings use start_line = end_line = 0.

Rules precedence

--rule <path> > repo .omp/review/rules.json > user ~/.omp/agent/review/rules.json > builtin rules/*.md. Never reads ~/.opencodereview/ or rule.json home-dotdir config.

State dir

Project-local only — never shared machine-wide. Sessions live under the reviewed repo: <repo>/.omp/review/sessions/<id>.jsonl + <id>.manifest.json, where <repo> is the current working directory. No env override, no platform state dir, no per-repo hash subdir.

Severity mapping

critical→P0 (blocks release), high→P1, medium→P2, low→P3 (info). SARIF levels: critical/high→error, medium→warning, low→note. Unanchored findings use start=end=0 (re-read the file, never invent lines).

Test / coverage

npm test          # build + node --test test/*.mjs
npm run coverage  # c8 gate: 80% lines/branches/functions over dist/

About

Native Oh My Pi code-review extension: deterministic file filter, per-file rules, grouping, session persistence with strict resume, cross-run compare, and severity-grouped text / JSON / SARIF output. Zero LLM calls in commands. See docs/DESIGN.md for the full design.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages