# Code Review

> Orchestrates a 3-agent parallel code review combining pattern compliance, Go conventions, and architectural analysis. Use when this capability is needed.

- Skill: `tomevault-io/code-review-297` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/code-review-297`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/code-review-297/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/code-review-297

---


# Code Review Skill

Orchestrate a comprehensive code review using three specialist agents in parallel, then synthesize their findings.

## Inputs

This Skill reads `$ARGUMENTS`. Accept these patterns:

- A file path, directory path, or glob pattern to review
- A PR number (e.g., `#42` or `42`)
- `--diff` to review staged/unstaged git changes
- No arguments defaults to reviewing uncommitted changes (`git diff`)

If the user didn't supply arguments, ask what they want reviewed.

## Step-by-step procedure

### Step 1: Determine review scope

Identify what code to review:

- **PR**: Run `git diff <base>...<head>` to get changed files
- **Files/directories**: Use the provided paths
- **Staged changes**: Run `git diff --cached`
- **Uncommitted changes**: Run `git diff`

Collect the list of changed/target files and their contents.

### Step 2: Delegate to three agents in parallel

Launch all three agents simultaneously using the Task tool:

1. **`code reviewer`** (tactical)
   - Pattern compliance, linting, best practices
   - Prompt: Provide the file paths and ask it to review against Cognee patterns, run linters, and return structured findings

2. **`solution architect`** (strategic)
   - Architectural concerns, design coherence
   - Prompt: Provide the file paths and ask it to evaluate architectural consistency, separation of concerns, and design coherence

3. **`go software architect`** (Go-specific)
   - Go coding conventions, naming conventions, implementation conventions
   - Prompt: Provide the Go file paths and ask it to check for idiomatic Go (stuttering, interface design, error wrapping, context propagation, package structure, naming)

### Step 3: Synthesize findings

When all three agents return:

1. **Identify agreements** — Issues flagged by multiple agents
2. **Identify unique findings** — Issues only one agent caught
3. **Identify disagreements** — Conflicting recommendations

### Step 4: Reconcile disagreements

If disagreements exist:

1. Present the conflicting views back to each disagreeing agent
2. Ask each to provide reasoning
3. Request they reach consensus
4. If no consensus, present both perspectives to the user

### Step 5: Compile unified findings

**IMPORTANT**: Read the template at `skills/code-review/templates/code-review-template.md` BEFORE delegating. When delegating to the documentation agent:

1. Provide the **template path** so the agent reads it and follows its section order exactly
2. Provide a **prior review** from `docs/code-reviews/` as a style reference (e.g., the most recent one)
3. Provide the **review content** only (findings, metadata, compliance checks) — do NOT dictate document structure in the prompt
4. The agent must use the template's sections, not invent its own

Create a new file under `docs/code-reviews/` named for the scope, for example `docs/code-reviews/phase-09-routing-engine.md`. Keep the template section order intact.

If you must show a summary to the user, include only a short synopsis plus a linkable file reference to the completed review document.

### Step 6: Collaborate with user on resolution

- Discuss trade-offs for architectural decisions
- Get user approval before delegating fixes
- Do NOT auto-fix without user consent

### Step 7: Delegate approved fixes

After user approves specific fixes, delegate to appropriate specialists:

- Go issues → `go-software-agent`
- Shell issues → `shell-script-agent`
- DevOps issues → `go-devops-agent`
- Documentation → `documentation-agent`

## Key principles

- Three perspectives: tactical (code-review) + Go-specific (go-architect) + strategic (solution-architect)
- Agents reconcile disagreements BEFORE presenting to user
- User is involved in resolution decisions, not just notified
- Documentation updated to capture learnings from review
- Pattern compliance checked against Cognee knowledge base

## Finding categories

- **Pattern Violation**: Deviates from documented Cognee pattern
- **Go Idiom**: Non-idiomatic Go (stuttering, interface placement, error handling)
- **Architecture**: Structural or design concern
- **Security**: Potential security issue
- **Error Handling**: Missing or inadequate error handling
- **Testing**: Missing tests or edge cases
- **Performance**: Inefficient implementation
- **Style**: Naming, formatting, organization issues

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/twistingmercury) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-14 -->

