/jig:reviewfrom jig
Dispatches parallel specialist review agents for code, PRDs, specs, and plans. Operates in four modes with configurable swarm tiers and deep review models.
Ships in jig. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
PURPOSE: Dispatch parallel specialist review agents, each focused on one concern. Operates in four modes: code (diff review), prd (product requirements review, read as a non-engineer would), spec (technical spec review), and plan (implementation plan review). The orchestrator coordinates discovery, dispatch, scoring, and reporting across all modes.
CONFIGURATION: Reads jig.config.md for swarm-tiers (code), prd-swarm-tiers (prd), spec-swarm-tiers (spec), plan-swarm-tiers (plan), deep-review-model, plan-deep-review-model, design-review-model, and specialist-model-default.
code-review agent invokes this with mode: code, tier: all (pre-PR, full swarm)team-dev quality gate invokes this with mode: code, tier: fast-pass (per-task, blocking checks only)postmortem and extend invoke this with mode: code, specialists: [framework-fit], and also [security] for an artifact that handles untrusted input, and the paths they changed, for the fit review (framework/LEARNING_LOOP.md)/review for manual code reviewsprd skill invokes this with mode: prd after drafting a PRD/review with a PRD document path or PRD artifact linkspec skill invokes this with mode: spec after drafting a spec/review with a spec document pathplan skill invokes this with mode: plan after drafting a plan/review with a plan document pathLogic reviewer: In code mode, dispatched for tier: all invocations, unless the caller passed specialists. In plan mode, always dispatched after the specialist swarm. Not dispatched in prd or spec mode.
Collect specialists from all three discovery directories (see framework/DISCOVERY.md):
team/specialists/, packs/*/specialists/, and core/specialists/ for *.md filesname, description, model, tier, stage, globs, severity, and tools if presentname (team > pack > core)mode: code → include specialists where stage is absent (backward compatible — existing specialists have no stage)stage names the mode. stage is a single value (prd, spec, plan) or a list ([spec, plan]). The legacy value both means [spec, plan].specialists: [...], keep only those names, skip the tier filter, and skip Stage 2's glob filter: a named specialist reviews every changed path the caller passed. If a name matches no specialist discovered for this mode, stop and report Specialist not found: {name} as an error, never as a score. Without specialists, filter by the requested tier:
tier: all → include all specialists matching the modetier: fast-pass → include only tier: fast-pass specialists matching the modeCheck jig.config.md for the appropriate tier config:
mode: code → swarm-tiersmode: prd → prd-swarm-tiersmode: spec → spec-swarm-tiersmode: plan → plan-swarm-tiersTeam memory. In code and plan modes, when Stage 5 will run and this skill runs in the stage's own agent (not as a subagent, such as the code-review agent), search team memory once if it is on (the memory skill): root causes and traps for the changed areas in code mode, decisions for the feature in plan mode. Write a short summary in your own words with note ids. It goes only to the logic reviewer; swarm specialists and fast-pass get none.
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
From the fit review (postmortem, extend), before each push (Fit Review in framework/LEARNING_LOOP.md), limited to the paths the caller changed. Fetch the remote the main branch tracks, if it has one, and fall back to the local {main-branch}, saying so, when there is none or the fetch fails:
remote=$(git config branch.{main-branch}.remote)
if [ -n "$remote" ] && git fetch "$remote" {main-branch}; then main_ref="$remote/{main-branch}"; else main_ref={main-branch}; echo "fit review: using local $main_ref (no remote, or fetch failed)" >&2; fi
base=$(git merge-base "$main_ref" HEAD) || { echo "fit review: no merge base with $main_ref" >&2; exit 1; }
{ git diff "$base" --name-only -- <paths>; git ls-files --others --exclude-standard -- <paths>; } | sort -u
git diff "$base" -- <paths>
git diff --no-index /dev/null <untracked-file> # once per untracked file: its whole content (exits 1 when it prints a diff)
If merge-base fails, stop and report the error; never review an empty diff in its place.
Extract the list of changed file paths: the --name-only output, plus the untracked files for the fit review. If the list is empty, stop and report Nothing reviewed: no changed files as an error, never as a score, a pass or a skipped line.
For each specialist the caller did not name, 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 (every changed file, for a named specialist). This is the filtered diff that the specialist will review. An untracked file's hunk is its whole content.
*-prd.md file, read it directly. For a PRD artifact link, read the artifact and use the Markdown inside its <script type="text/markdown" id="prd-source"> block.plain-language → "Focus on: every section, as a reader who has never written code"mvp-cut → "Focus on: Phases, What it does, Scope"testable-outcomes → "Focus on: What it does (each 'you'll know it works when' line), Measures"missing-moments → "Focus on: Moments, People, What it does"> **PRD:** line) if it existsdata-dependency → "Focus on: Data Model, API Contract, Business Logic"ui-conflict → "Focus on: UI States, Component Behavior, Entry Points"blast-radius → "Focus on: All sections (cross-cutting)"state-completeness → "Focus on: Business Logic, API Contract"> **Spec:** line) and the PRD (> **PRD:**) if they existtask-dependency → "Focus on: Task list, Dependencies"migration-safety → "Focus on: Tasks involving DB/schema changes"blast-radius → "Focus on: All tasks (cross-cutting)"state-completeness → "Focus on: Tasks involving state/status changes"For each specialist with matching files, and each specialist the caller named, spawn a parallel subagent using the Agent tool:
Agent tool:
description: "Review: {specialist.name}"
model: {specialist.model} <- from frontmatter (haiku, sonnet, or opus)
agent type: {read-only type with specialist.tools} <- only if it declares `tools`
prompt: |
{specialist body} <- everything below the frontmatter in the specialist file
---
## Diff to Review
{filtered diff} <- matching files only; every changed file for a named specialist
A specialist that declares tools (e.g. framework-fit) is dispatched as an agent type that has those tools and no write access. This is Jig's rule for a read-only subagent: an agent type whose tools are exactly read, search and list (framework/HARNESS.md says which each harness has, e.g. Jig's reader agent in Claude Code, not Explore, which keeps Bash). If the session has no such agent, or the harness cannot limit a subagent's tools, say so on the report's Tools line; never fall back silently to an agent that can write. A specialist without tools works from the diff in its prompt.
For each specialist with a matching stage, spawn a parallel subagent:
Agent tool:
description: "Review: {specialist.name}"
model: {specialist.model from frontmatter, or design-review-model
from config as fallback}
prompt: |
{specialist body}
---
## Document to Review
{full PRD or spec content}
## Section Hints
{computed section hints for this specialist}
## PRD Reference <- spec mode only
{PRD content if available, or "No PRD available"}
For each specialist with a matching stage, spawn a parallel subagent:
Agent tool:
description: "Review: {specialist.name}"
model: {specialist.model from frontmatter, or design-review-model
from config as fallback}
prompt: |
{specialist body}
---
## Document to Review
{full plan content}
## Section Hints
{computed section hints for this specialist}
## Spec Reference
{spec content if available, or "No spec available"}
All specialists in prd/spec/plan modes receive codebase access tools: Read, Grep, Glob. In prd mode the codebase may be absent (a PM running in Claude.ai); specialists then review the document alone.
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)Out of scope: → from a specialist the caller named (the fit review), not clean: report it as an error naming those paths, never as N/A or a score. From one the swarm picked by its globs, record it as out of scope, like N/A, with no effect on the scoreSkip this stage when tier: fast-pass, or when the caller passed specialists. The code logic reviewer only runs for pre-PR reviews (tier: all).
After collecting swarm findings, dispatch the code logic reviewer:
logic-reviewer.md from this skill's directorymodel: opus (or deep-review-model from jig.config.md)Skip. No deep reviewer for PRD or spec mode.
Always dispatch after the specialist swarm completes:
plan-logic-reviewer.md from core/skills/plan/model: opus (or plan-deep-review-model from jig.config.md)[plan-logic] formatApply 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. An error (Nothing reviewed, Specialist not found, or a specialist the caller named answering Out of scope:) gets no score; the report says so (Stage 7).
Deduplication (mode-aware):
Mode: code:
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 connectionMode: prd, spec or plan:
Produce the unified report. Adapt the header by mode:
mode: code → ## Code Review Summarymode: prd → ## PRD Review Summarymode: spec → ## Spec Review Summarymode: plan → ## Plan Review SummaryThe rest of the report format is identical across modes:
Confidence Score: X/10, or none (error): not a pass; fix the cause and re-run when any error is listed
Risk Level: Low/Medium/High
Specialists: N dispatched, M skipped, K N/A, E errors
Logic reviewer: {ran / skipped (fast-pass) / skipped (specialists)}
Tools: {enforced / not enforced: / none declared}
{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 / out of scope / skipped / error: } | {one-line summary or —} |
| logic-reviewer | {N blocking / N major / N minor / clean / skipped} | {one-line summary or —} |
Skipped vs N/A distinction:
Out of scope: (e.g. framework-fit on a team's own framework/); counted with N/AOut of scope:); never cleanTeam memory. If it is on (the memory skill) and this skill runs in the stage's own agent (never as a subagent, such as code-review), save a trap or practice that qualifies, per its Saving section. The report text never does.
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, severity, and tools only if the specialist must read files outside the diffstage: prd, stage: spec, stage: plan, or a list such as stage: [spec, plan]stage (backward compatible default)When 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.
prd skillThe prd skill invokes this with mode: prd after drafting a PRD. Specialists whose stage includes prd are dispatched. No deep reviewer. When the PRD is a live artifact, the prd skill records the review in the artifact's log and the title block's "Checked" field.
spec skillThe spec skill invokes this with mode: spec after drafting a spec. Specialists whose stage includes spec are dispatched. No deep reviewer. Automatic for medium-to-large work.
plan skillThe plan skill invokes this with mode: plan after drafting a plan. Specialists whose stage includes plan are dispatched, followed by the plan logic reviewer (Opus). Automatic for medium-to-large work.
postmortemWhen a finding is missed, the postmortem uses the Specialist Summary table to diagnose which specialist should have caught it. Postmortem and extend also run this skill as the fit review: specialists: [framework-fit] on the paths they changed, with no logic reviewer, and also specialists: [security] for an artifact that handles untrusted input (Fit Review in framework/LEARNING_LOOP.md).
pr-briefThis skill reviews your own changes. To brief yourself on someone else's PR, use pr-brief. pr-brief (and team-dev's lead-playbook, for untrusted input) use Stage 3's rule for a read-only subagent, the reader agent in Claude Code; a change to that rule changes pr-brief's untrusted-input gate.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
code-review, prd-review, spec-review, plan-review, swarm-architecture
npx claudepluginhub duronext/jig --plugin jig26 skills in this plugin
/brainstormUse when exploring ideas, comparing approaches, or refining an unclear problem — at any point in the workflow. A discovery-time tool, not a pipeline stage. Invokable directly via /brainstorm or offered by kickoff during DISCOVER. Produces understanding, not artifacts.
/buildUse when you have an implementation plan and want to execute it. Analyzes the plan's task graph, determines the best execution strategy (parallel via team-dev or serial via sdd), and orchestrates the full build with quality gates. The single entry point for plan execution — you don't need to choose between team-dev and sdd yourself.
/debugUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes. Enforces root cause investigation through four phases: investigation, pattern analysis, hypothesis testing, and implementation. Prevents guess-and-check thrashing.
/eng-copywritingUse when writing ANY user-facing text -- UI labels, button text, error messages, notifications, tooltips, placeholders, or application content./eng-loggingUse when implementing logging in application code. Covers log level selection, structured logging, error tracking integration, and avoiding noise./eng-testingUse when writing tests, designing test strategy, or reviewing test coverage. Covers test pyramid, naming, mocking, and flaky test policy.Other plugins' skills for the same job