Use when reviewing code before PRs or as quality gate during parallel execution. Dispatches parallel specialist review agents via the swarm architecture. Invoked by code-review agent, team-dev quality gate, or /review.
From casaflownpx claudepluginhub casaperks/casaflow --plugin casaflowThis skill uses the workspace's default tool permissions.
logic-reviewer.mdtiers.mdDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
PURPOSE: Dispatch parallel specialist review agents, each focused on one concern, to break the context ceiling that monolithic review prompts hit. The orchestrator coordinates dispatch, collects findings, scores mechanically, and produces a unified report.
CONFIGURATION: Reads jig.config.md for swarm-tiers (which specialists block vs advise), deep-review-model, and specialist-model-default.
code-review agent invokes this with tier: all (pre-PR, full swarm)team-dev quality gate invokes this with tier: fast-pass (per-task, blocking checks only)/review for manual reviewsLogic reviewer (pre-PR only): When invoked with tier: all, the orchestrator also dispatches a logic reviewer after the swarm specialists complete. The logic reviewer is skipped for tier: fast-pass invocations.
Collect specialists from all three discovery directories (see framework/DISCOVERY.md):
team/specialists/, packs/*/specialists/, and core/specialists/ for *.md filesname, description, model, tier, globs, severityname (team > pack > core)tier: all → include all specialists (both fast-pass and full-only)tier: fast-pass → include only specialists where tier: fast-passCheck jig.config.md for swarm-tiers to confirm which specialists are assigned to which tier.
Obtain the diff based on the caller:
From code-review agent (pre-PR):
git fetch origin
git diff origin/{main-branch}...HEAD
git diff origin/{main-branch}...HEAD --name-only
Read main-branch from jig.config.md (default: main).
From team-dev quality gate (per-task):
git diff <BASE_SHA>..<HEAD_SHA>
git diff <BASE_SHA>..<HEAD_SHA> --name-only
Extract the list of changed file paths. For each specialist, intersect its globs array with the changed file paths. A specialist whose globs match zero changed files is skipped — log it as skipped: no matching files but do not spawn it.
For each matching specialist, extract only the diff hunks for its matched files. This is the filtered diff that the specialist will review.
For each specialist with matching files, spawn a parallel subagent using the Agent tool:
Agent tool:
description: "Review: {specialist.name}"
model: {specialist.model} <- from frontmatter (haiku, sonnet, or opus)
prompt: |
{specialist body} <- everything below the frontmatter in the specialist file
---
## Diff to Review
{filtered diff} <- only the files matching this specialist's globs
All matching specialists are dispatched in a single message (parallel Agent calls). Do not dispatch sequentially.
Wait for all specialist subagents to complete. For each result:
N/A → record as N/A (ran but found nothing)Skip this stage when tier: fast-pass. The logic reviewer only runs for pre-PR reviews (tier: all).
After collecting swarm findings, dispatch the logic reviewer:
logic-reviewer.md from this skill's directorymodel: opus (or deep-review-model from jig.config.md)Apply mechanical scoring based on the highest severity finding. All findings are always reported regardless of score.
| When this is the highest severity | Score cannot be higher than |
|---|---|
blocking | 4 |
major (no blocking) | 7 |
minor only | 8-9 |
| No findings | 10 |
No exceptions, no bumps for positives.
Deduplication:
file:line → merge into one finding, use the higher severity, note all specialistsfile:line as a specialist → drop the logic reviewer's finding (specialist caught it first)file:line but same root cause as a specialist → keep both, note the connectionProduce the unified report in this exact format:
Confidence Score: X/10 Risk Level: Low/Medium/High Specialists: N dispatched, M skipped, K N/A Logic reviewer: {ran / skipped (fast-pass)}
{if any — grouped by specialist}
{if any — same format}
{if any — same format, using "Suggestion" instead of "Fix"}
{if logic reviewer ran — findings grouped by severity, using the [logic] prefix}
{code suggestion}
| Specialist | Status | Findings |
|---|---|---|
| {name} | {N blocking / N major / N minor / clean / N/A / skipped} | {one-line summary or —} |
| logic-reviewer | {N blocking / N major / N minor / clean / skipped} | {one-line summary or —} |
Skipped vs N/A distinction:
See tiers.md for tier definitions, severity levels, and the default specialist inventory.
.md file in team/specialists/ (for team-specific) or core/specialists/ (for framework)name, description, model, tier, globs, severityWhen a specialist's prompt grows too large:
code-review agentThe agent fetches git diff origin/{main-branch}...HEAD, then follows this skill's pipeline with tier: all.
team-devThe lead dispatches this skill as a subagent after spec compliance passes. Diff is scoped to the task's commits (BASE_SHA..HEAD_SHA). Uses tier: fast-pass.
postmortemWhen a finding is missed, the postmortem uses the Specialist Summary table to diagnose which specialist should have caught it.