---
model: opus
---

# Post-Implementation Review (Isolated Agent)

After implementing or fixing, run review through **independent Agent** — don't use current session to avoid reviewer bias from implementation process.

## How to use

Call `Agent` tool with following prompt (replace placeholders `{}`):

```
You are code reviewer. No context from previous session — review completely objectively.

Artifact: {path-to-artifact-file}
Changed files: {list of files just changed}
Stack: {stack from CLAUDE.md}

Execute:
1. Hygiene scan: leftover debug code (console.log, debugger, print), hardcoded secrets,
   large commented-out blocks (>5 lines).
1b. Silent failure scan — find following patterns:
   - Swallowed exceptions: empty catch {}, catch only logs but continues like no error
   - Silent async failures: fire-and-forget (unawaited task/Promise), async void (.NET),
     .catch(() => {}) with no handling
   - Null blindspots: .FirstOrDefault() used directly without null-check (.NET),
     missing optional chaining on deeply nested object access (TS/JS),
     dict.get() result used as non-None (Python)
   - Error propagation wrong: HTTP calls don't check status before parse,
     function returns bool/null when error instead of throwing (caller ignores result)
   - Config reads don't check existence
2. Run tests: detect test runner (package.json → npm test / *.csproj → dotnet test /
   pytest.ini → python -m pytest), report results.
3. Inline review — Architecture & Correctness lane (this agent, read .tas/rules/common/code-review.md):
   Focus: architecture & layer conformance, logic correctness, edge cases, error handling, DRY, function size, nesting depth.
   Does NOT cover language style/idioms/naming/async — that is the {lang_agent} lane below. Don't duplicate it.
3b. Parallel specialized agents — launch simultaneously (non-overlapping lanes):
   - security-reviewer: read .tas/rules/common/security.md.
     Focus: OWASP Top 10, injection, hardcoded secrets, auth/authz.
   - {lang_agent}: read .tas/rules/[stack]/coding-style.md + .tas/rules/[stack]/patterns.md.
     Focus: language idioms & naming conventions, async/await, type safety, stack-specific anti-patterns. Correctness/error-handling is the inline lane — skip it.
   - database-reviewer (only when {db_agent} = database-reviewer AND scope touches schema/migrations/queries):
     Focus: schema correctness, migration safety, missing indexes, N+1 patterns, data integrity.
4. Synthesize findings: Critical / High / Medium / Low with file:line and specific fix.
   Lanes are non-overlapping (steps 3 / 3b), so dedupe is light — only merge where two lanes land on the same file:line. On a collision, keep the higher-severity finding.

Return full Review Summary.
```

## Gate Rule

Defers to the canonical severity/gate table in `.tas/rules/common/code-review.md` — Critical/High block, Medium/Low are advisory.

| Result | Action |
|---|---|
| Has **Critical** or **High** | List findings, **STOP**, require fix before continuing |
| Only **Medium / Low** | List findings, recommend fixes, ask user — may continue |
| No findings | Continue normally |
