review-cycle

0
0
Source

Unified multi-dimensional code review with automated fix orchestration. Supports session-based (git changes) and module-based (path patterns) review modes with 7-dimension parallel analysis, iterative deep-dive, and automated fix pipeline. Triggers on "workflow:review-cycle", "workflow:review-session-cycle", "workflow:review-module-cycle", "workflow:review-cycle-fix".

Install

mkdir -p .claude/skills/review-cycle && curl -L -o skill.zip "https://mcp.directory/api/skills/download/5355" && unzip -o skill.zip -d .claude/skills/review-cycle && rm skill.zip

Installs to .claude/skills/review-cycle

About this skill

Review Cycle

Unified multi-dimensional code review orchestrator with dual-mode (session/module) file discovery, 7-dimension parallel analysis, iterative deep-dive on critical findings, and optional automated fix pipeline with intelligent batching and parallel planning.

Architecture Overview

┌──────────────────────────────────────────────────────────────────────┐
│  Review Cycle Orchestrator (SKILL.md)                                │
│  → Pure coordinator: mode detection, phase dispatch, state tracking  │
└───────────────────────────────┬──────────────────────────────────────┘
                                │
  ┌─────────────────────────────┼─────────────────────────────────┐
  │           Review Pipeline (Phase 1-5)                          │
  │                                                                │
  │  ┌─────────┐  ┌─────────┐  ┌─────────┐  ┌─────────┐  ┌─────────┐
  │  │ Phase 1 │→ │ Phase 2 │→ │ Phase 3 │→ │ Phase 4 │→ │ Phase 5 │
  │  │Discovery│  │Parallel │  │Aggregate│  │Deep-Dive│  │Complete │
  │  │  Init   │  │ Review  │  │         │  │(cond.)  │  │         │
  │  └─────────┘  └─────────┘  └─────────┘  └─────────┘  └─────────┘
  │   session|      7 agents     severity     N agents     finalize
  │   module        ×cli-explore  calc        ×cli-explore  state
  │                                  ↕ loop
  └────────────────────────────────────────────────────────────────┘
                                │
                          (optional --fix)
                                │
  ┌─────────────────────────────┼─────────────────────────────────┐
  │           Fix Pipeline (Phase 6-9)                             │
  │                                                                │
  │  ┌─────────┐  ┌─────────┐  ┌──────────┐  ┌─────────┐  ┌─────────┐
  │  │ Phase 6 │→ │ Phase 7 │→ │Phase 7.5 │→ │ Phase 8 │→ │ Phase 9 │
  │  │Discovery│  │Parallel │  │Export to │  │Execution│  │Complete │
  │  │Batching │  │Planning │  │Task JSON │  │Orchestr.│  │         │
  │  └─────────┘  └─────────┘  └──────────┘  └─────────┘  └─────────┘
  │   grouping     N agents     fix-plan →    M agents     aggregate
  │   + batch      ×cli-plan    .task/FIX-*   ×cli-exec    + summary
  └────────────────────────────────────────────────────────────────────┘

Key Design Principles

  1. Dual-Mode Review: Session-based (git changes) and module-based (path patterns) share the same review pipeline (Phase 2-5), differing only in file discovery (Phase 1)
  2. Pure Orchestrator: Execute phases in sequence, parse outputs, pass context between them
  3. Progressive Phase Loading: Phase docs are read on-demand when that phase executes, not all at once
  4. Auto-Continue: All phases run autonomously without user intervention between phases
  5. Subagent Lifecycle: Explicit lifecycle management with spawn_agent → wait → close_agent
  6. Role via agent_type: Subagent roles loaded via TOML agent_type parameter in spawn_agent (e.g., "cli_explore_agent")
  7. Optional Fix Pipeline: Phase 6-9 triggered only by explicit --fix flag or user confirmation after Phase 5
  8. Content Preservation: All agent prompts, code, schemas preserved verbatim from source commands

Usage

# Review Pipeline (Phase 1-5)
review-cycle <path-pattern>                                    # Module mode
review-cycle [session-id]                                      # Session mode
review-cycle [session-id|path-pattern] [FLAGS]                 # With flags

# Fix Pipeline (Phase 6-9)
review-cycle --fix <review-dir|export-file>                    # Fix mode
review-cycle --fix <review-dir> [FLAGS]                        # Fix with flags

# Flags
--dimensions=dim1,dim2,...    Custom dimensions (default: all 7)
--max-iterations=N           Max deep-dive iterations (default: 3)
--fix                        Enter fix pipeline after review or standalone
--resume                     Resume interrupted fix session
--batch-size=N               Findings per planning batch (default: 5, fix mode only)
--export-tasks               Export fix-plan findings to .task/FIX-*.json (auto-enabled with --fix)

# Examples
review-cycle src/auth/**                                       # Module: review auth
review-cycle src/auth/**,src/payment/**                        # Module: multiple paths
review-cycle src/auth/** --dimensions=security,architecture    # Module: custom dims
review-cycle WFS-payment-integration                           # Session: specific
review-cycle                                                   # Session: auto-detect
review-cycle --fix ${projectRoot}/.workflow/active/WFS-123/.review/           # Fix: from review dir
review-cycle --fix --resume                                    # Fix: resume session

Mode Detection

// Input parsing logic (orchestrator responsibility)
function detectMode(args) {
  if (args.includes('--fix')) return 'fix';
  if (args.match(/\*|\.ts|\.js|\.py|src\/|lib\//)) return 'module';  // glob/path patterns
  if (args.match(/^WFS-/) || args.trim() === '') return 'session';   // session ID or empty
  return 'session';  // default
}
Input PatternDetected ModePhase Entry
src/auth/**modulePhase 1 (module branch)
WFS-payment-integrationsessionPhase 1 (session branch)
(empty)sessionPhase 1 (session branch, auto-detect)
--fix .review/fixPhase 6
--fix --resumefixPhase 6 (resume)

Execution Flow

Input Parsing:
   └─ Detect mode (session|module|fix) → route to appropriate phase entry

Review Pipeline (session or module mode):

Phase 1: Discovery & Initialization
   └─ Ref: phases/01-discovery-initialization.md
      ├─ Session mode: session discovery → git changed files → resolve
      ├─ Module mode: path patterns → glob expand → resolve
      └─ Common: create session, output dirs, review-state.json, review-progress.json

Phase 2: Parallel Review Coordination
   └─ Ref: phases/02-parallel-review.md
      ├─ Spawn 7 cli-explore-agent instances (Deep Scan mode)
      ├─ Each produces dimensions/{dimension}.json + reports/{dimension}-analysis.md
      ├─ Lifecycle: spawn_agent → batch wait → close_agent
      └─ CLI fallback: Gemini → Qwen → Codex

Phase 3: Aggregation
   └─ Ref: phases/03-aggregation.md
      ├─ Load dimension JSONs, calculate severity distribution
      ├─ Identify cross-cutting concerns (files in 3+ dimensions)
      └─ Decision: critical > 0 OR high > 5 OR critical files → Phase 4
                   Else → Phase 5

Phase 4: Iterative Deep-Dive (conditional)
   └─ Ref: phases/04-iterative-deep-dive.md
      ├─ Select critical findings (max 5 per iteration)
      ├─ Spawn deep-dive agents for root cause analysis
      ├─ Re-assess severity → loop back to Phase 3 aggregation
      └─ Exit when: no critical findings OR max iterations reached

Phase 5: Review Completion
   └─ Ref: phases/05-review-completion.md
      ├─ Finalize review-state.json + review-progress.json
      ├─ Prompt user: "Run automated fixes? [Y/n]"
      └─ If yes → Continue to Phase 6

Fix Pipeline (--fix mode or after Phase 5):

Phase 6: Fix Discovery & Batching
   └─ Ref: phases/06-fix-discovery-batching.md
      ├─ Validate export file, create fix session
      └─ Intelligent grouping by file+dimension similarity → batches

Phase 7: Fix Parallel Planning
   └─ Ref: phases/07-fix-parallel-planning.md
      ├─ Spawn N cli-planning-agent instances (≤10 parallel)
      ├─ Each outputs partial-plan-{batch-id}.json
      ├─ Lifecycle: spawn_agent → batch wait → close_agent
      └─ Orchestrator aggregates → fix-plan.json

Phase 7.5: Export to Task JSON (auto with --fix, or explicit --export-tasks)
   └─ Convert fix-plan.json findings → .task/FIX-{seq}.json
      ├─ For each finding in fix-plan.json:
      │   ├─ finding.file          → files[].path (action: "modify")
      │   ├─ finding.severity      → priority (critical|high|medium|low)
      │   ├─ finding.fix_description → description
      │   ├─ finding.dimension     → scope
      │   ├─ finding.verification  → convergence.verification
      │   ├─ finding.changes[]     → convergence.criteria[]
      │   └─ finding.fix_steps[]   → implementation[]
      ├─ Output path: {projectRoot}/.workflow/active/WFS-{id}/.review/.task/FIX-{seq}.json
      ├─ Each file follows task-schema.json (IDENTITY + CONVERGENCE + FILES required)
      └─ source.tool = "review-cycle", source.session_id = WFS-{id}
      │
      ├─ Generate plan.json (plan-overview-fix-schema) after FIX task export:
      │   ```javascript
      │   const fixTaskFiles = Glob(`${reviewDir}/.task/FIX-*.json`)
      │   const taskIds = fixTaskFiles.map(f => JSON.parse(Read(f)).id).sort()
      │
      │   // Guard: skip plan.json if no fix tasks generated
      │   if (taskIds.length === 0) {
      │     console.warn('No fix tasks generated; skipping plan.json')
      │   } else {
      │
      │   const planOverview = {
      │     summary: `Fix plan from review cycle: ${reviewSummary}`,
      │     approach: "Review-driven fix pipeline",
      │     task_ids: taskIds,
      │     task_count: taskIds.length,
      │     complexity: taskIds.length > 5 ? "High" : taskIds.length > 2 ? "Medium" : "Low",
      │     fix_context: {
      │       root_cause: "Multiple review findings",
      │       strategy: "comprehensive_fix",
      │       severity: aggregatedFindings.maxSeverity || "Medium",  // Derived from max finding severity
      │       risk_level: aggregatedFindings.overallRisk || "medium" // Derived from combined risk assessment
      │     },
      │     test_strategy: {
      │       scope: "unit",
      │       specific_tests: [],
      │       manual_verification: ["Verify all review findings addressed"]
      │     },
      │     _metadata: {
      │       timestamp: getUtc8ISOString(),
      │       source: "review-cycle-agent",
      │  

---

*Content truncated.*

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.