Skip to content

Review Workflows

Audits and code review. These run after execution and either produce a sidecar report (for human review) or auto-fix in atomic commits.

np:code-review

Per-file review via np-code-reviewer (tier=opus). Scores against CLAUDE.md conventions, the ADRs in docs/adr/, PROJECT.md constraints, and common security/perf anti-patterns.

Output: <NN>-REVIEW.md sidecar with critical / warning / info findings. Each finding carries an anchor ({file, line}), a category, and a short remediation note.

bash
np:code-review --depth quick     # one-pass scan
np:code-review --depth standard  # default
np:code-review --depth deep      # multi-pass

np:code-review-fix

Auto-fixer for <NN>-REVIEW.md findings. Spawns np-code-fixer (tier=sonnet), which:

  1. Reads the REVIEW.md frontmatter,
  2. Applies fixes finding-by-finding,
  3. Emits one atomic commit per successful fix (the D-21 exception to one-commit-per-task),
  4. Writes <NN>-REVIEW-FIX.md with status all_fixed | partial | none_fixed.

--auto enables the iteration loop, capped at 3 cycles.

np:review

Cross-AI peer review via 7-CLI fan-out. Invokes the local installations of gemini, claude, codex, coderabbit, opencode, qwen, and cursor against the same diff and aggregates the results. Useful before merging a phase.

np:secure-phase

Threat-mitigation audit. Spawns np-security-auditor (tier=opus), which reads <NN>-<MM>-PLAN.md's <threat_model> block plus the implementation, scores each threat as MITIGATED / PARTIAL / UNMITIGATED, and writes <NN>-SECURITY.md from the templates/SECURITY.md skeleton.

np:validate-phase

Nyquist validation gap-fill. Spawns np-nyquist-auditor (tier=haiku), which checks each requirement in the phase scope against test coverage and scores it COVERED / UNDER_SAMPLED / UNCOVERED. Output uses templates/VALIDATION.md as the skeleton.

The Nyquist rule: every production-code task must be observed by at least one test that exercises the implementation directly (not a mock).

np:ui-review

Retroactive 6-pillar visual audit on a completed phase. Spawns np-ui-auditor (tier=haiku) which scores Hierarchy, Typography, Color, Spacing, Density and Interaction. Output: <NN>-UI-REVIEW.md.

np:eval-review

Retroactive eval-coverage audit on a completed AI phase. Spawns np-eval-auditor (tier=haiku) which checks the implementation against the <NN>-AI-SPEC.md evaluation plan and scores each dimension COVERED / PARTIAL / MISSING. Output: <NN>-EVAL-REVIEW.md.