skills/opencode/review/SKILL.md
Single adversarial review pass over the integrated branch diff — spec-compliance, code quality, and test adequacy judged together by one fresh-context reviewer. Triggers: /review, 'review the changes', or after delegation completes. Emits one verdict (reviews.review.status). Do NOT use for plan-review (that is its own dispatched gate) or for debugging.
npx skillsauth add lvlup-sw/exarchos reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
One adversarial review pass over the complete integrated diff (the feature branch vs main). A single fresh-context reviewer judges spec-compliance, code quality, and test adequacy together — there is no separate spec-then-quality staging. The pass emits one verdict (reviews.review.status).
Posture: you are an ADVERSARIAL reviewer. Your job is to find what is wrong, not to confirm what is right.
MANDATORY: before accepting any rationalization for approving without full verification, consult
references/rationalization-refutation.md. Every common excuse is catalogued with a counter-argument and the correct action.
This skill runs in a SUBAGENT spawned by the orchestrator, not inline — a clean reviewer with no authoring transcript, provisioned with the diff + the spec.
The orchestrator:
exarchos_orchestrate({ action: "review_diff", baseBranch: "main" }) (or git diff main...HEAD).The subagent reads the spec from state, runs the gates against the working tree, performs the adversarial walkthrough, and returns one structured JSON verdict.
The orchestrator captures the intended change as artifacts.intent and threads it into the dispatch as an intentGrounding directive. When present, verify the delivered diff against it:
spec issue.spec issue.When no intentGrounding is supplied, review against the diff alone — do not fabricate an intent.
Pick the approach first: exarchos_orchestrate({ action: "runbook", id: "review-strategy" }) — single-pass vs two-pass, by diff size and prior fix-cycle count.
Review the combined diff across all tasks in one view — this catches cross-task interface mismatches, bugs invisible in isolation, and inconsistent patterns. Cover all three lenses in the single pass:
references/spec-compliance-checklist.md.exarchos_orchestrate({
action: "check_test_adequacy",
featureId: "<featureId>",
taskId: "<taskId>",
branch: "<branch>",
riskTier: "<low|medium|high>",
phase: "review"
})
references/code-quality-checklist.md, references/security-checklist.md, references/typescript-standards.md.Run the quality-evaluation gates via runbook — exarchos_orchestrate({ action: "runbook", id: "quality-evaluation" }) — then execute the MCP-served quality-check catalog. See references/gate-execution.md for signatures.
check_static_analysis — lint + typecheck (D2). Must pass.check_security_scan — security pattern detection (D1).prepare_review — returns the deterministic check catalog (grep / structural / heuristic) + pluginStatus. Execute each check against the changed files; collect findings as pluginFindings.check_context_economy, check_operational_resilience, check_workflow_determinism) — advisory; feed the convergence view.mutation-adequacy (HIGH tier only): a separate required dimension that gates the HIGH risk tier at the
/reviewboundary — see@skills/mutation-adequacy/SKILL.md. Do not run mutation testing in this skill; the closest in-scope proxy is the Specific test-desiderata property plus the delegation-timecheck_test_adequacygate.
Compute the verdict once over the merged finding set. Route it via the decision runbook — exarchos_orchestrate({ action: "runbook", id: "review-escalation" }). See references/convergence-and-verdict.md.
check_review_verdict takes the finding counts + the pluginFindings, emits the gate event, and returns APPROVED or NEEDS_FIXES:
exarchos_orchestrate({
action: "check_review_verdict",
featureId: "<id>",
high: nativeHighCount,
medium: nativeMediumCount,
low: nativeLowCount,
pluginFindings: catalogFindings,
})
The fix loop is bounded by the shared escalation policy (config-resolvable escalation.maxIterations, default 5) — the same bound the shepherd loop uses. check_review_verdict reads the event-sourced fix-cycle count and returns the escalate decision the loop MUST honor:
escalate absent/falsy: re-dispatch to the implementer with the findings and re-review.escalate: true: surface the findings + escalationReason and ask how to proceed, when EITHER the bound is reached OR a finding is intent-touching (a spec issue that changes what was asked for — a human decides, not the loop).Companion plugin (platform-dependent): on platforms with skill support the orchestrator may also invoke
impeccable:critiquefor frontend diffs; feed its findings as additionalpluginFindings.
Gate events: do NOT manually emit
gate.executed—check_review_verdictemits it. Manual emission duplicates.
The subagent MUST return one structured JSON verdict. Any other format is an error.
{
"verdict": "pass | fail | blocked",
"summary": "1-2 sentence summary",
"issues": [
{
"severity": "HIGH | MEDIUM | LOW",
"category": "spec | tdd | coverage | security | solid | dry | perf | naming | test-quality | other",
"file": "path/to/file",
"line": 123,
"description": "Issue description",
"required_fix": "What must change"
}
],
"test_results": { "passed": 0, "failed": 0, "coverage_percent": 0 }
}
Record the verdict as an object with a status field (a flat string is silently ignored by the guard):
APPROVED:
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
reviews: { "review": { status: "pass", summary: "...", issues: [] } }
}})
exarchos_workflow({ action: "transition", featureId: "<id>", target: "synthesize" })
Then invoke /synthesize.
NEEDS_FIXES:
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
reviews: { "review": { status: "fail", summary: "...", issues: [{ severity: "HIGH", file: "...", description: "..." }] } }
}})
Then invoke /delegate --fixes.
Guard:
review → synthesizerequiresall-reviews-passed— every required dimension'sreviews.{name}.statusmust be a passing value (pass | passed | approved | fixes-applied, case-insensitive). The feature roster isreview(+mutation-adequacyat HIGH tier).review → delegatefires onany-review-failed.
All transitions are automatic — this is not a human checkpoint. See references/auto-transition.md.
| Don't | Do instead |
|-------|-----------|
| Confirm what's right | Hunt for what's wrong (adversarial posture) |
| Approve without the kill-probe | Run check_test_adequacy — a test that can't fail is not coverage |
| Rubber-stamp on a rationalization | Consult references/rationalization-refutation.md |
| Let scope creep pass | Flag intended-vs-delivered drift as a spec issue |
| Block on LOW-priority nits | Record and track; reserve blocking for HIGH |
Use exarchos_workflow({ action: "describe", actions: ["update"] }) and
exarchos_orchestrate({ action: "describe", actions: ["check_static_analysis", "check_security_scan", "check_test_adequacy", "check_review_verdict", "prepare_review"] }) for current parameter schemas.
testing
Create pull request from completed feature branch using GitHub-native stacked PRs. Use when the user says 'create PR', 'submit for review', 'synthesize', or runs /synthesize. Validates branch readiness, creates PR with structured description, and manages merge queue. Do NOT use before review phase completes. Not for draft PRs.
testing
Shepherd PRs through CI and reviews to merge readiness. Operates as an iteration loop within the synthesize phase (not a separate HSM phase). Uses assess_stack to check PR health, fix failures, and request approval. Triggers: 'shepherd', 'tend PRs', 'check CI', or /shepherd.
development
Single adversarial review pass over the integrated branch diff — spec-compliance, code quality, and test adequacy judged together by one fresh-context reviewer. Triggers: /review, 'review the changes', or after delegation completes. Emits one verdict (reviews.review.status). Do NOT use for plan-review (that is its own dispatched gate) or for debugging.
testing
Restore and read workflow state after a context break — re-inject workflow phase, task progress, and behavioral guidance into the current session, reconcile state against git reality, and verify whether a workflow exists. Use when the user says 'resume', 'rehydrate', 'where were we', or runs /rehydrate, or when the agent has drifted after context compaction. Do NOT use for saving or mutating state (that is /checkpoint).