Quality Commands
Quality commands are the review and verification gates in PP Core: code review, automated audit fixes, test generation, security and UI audits, validation coverage, debugging, post-mortems, AI evaluation checks, and cross-AI peer review.
/pp-code-review
Scans the changes made during a phase for bugs, security flaws, and code-quality problems, then emits a severity-classified findings report.
/pp-code-review 3
/pp-code-review 3 --depth=deep
/pp-code-review 3 --fix --auto
/pp-code-review 3 --files src/auth.ts,src/session.ts
| Flag / Argument | Behavior |
|---|---|
N | Phase number to review. |
--depth [quick|standard|deep] | Sets review intensity (default standard): quick is fastest, deep is most thorough. |
--files [list] | Comma-separated file paths to review, overriding automatic change detection. |
--fix | Applies fixes automatically via the fixer agent. |
--fix --all | Includes Info-level findings when applying fixes. |
--fix --auto | Iterates the fix-then-review loop (up to three cycles) until no Critical or Warning findings remain. |
Output: a {phase}-REVIEW.md file listing Critical, Warning, and Info findings with remediation guidance.
/pp-audit-fix
An autonomous pipeline that discovers audit issues, classifies how fixable each is, applies the fixes, verifies them with tests, and commits atomically.
/pp-audit-fix --source audit-uat
/pp-audit-fix --source audit-uat --severity high --max 10
/pp-audit-fix --source audit-uat --dry-run
| Flag | Behavior |
|---|---|
--source [audit-type] | The audit to run (required; defaults to audit-uat). |
--severity [high|medium|all] | Minimum severity threshold to act on (default medium). |
--max N | Caps how many findings are fixed per run (default 5). |
--dry-run | Prints the classification table without applying any fixes. |
/pp-add-tests
Generates unit and end-to-end tests for a completed phase based on its implementation artifacts.
/pp-add-tests 4
/pp-add-tests 4 focus on edge cases in the pricing module
| Argument | Behavior |
|---|---|
N | Phase number to generate tests for. |
[instructions] | Optional free-form guidance steering what the tests should target. |
Output: test files committed with a test(phase-{N}) message.
/pp-secure-phase
Retroactively verifies that a completed phase's threat mitigations exist in the code, checked against its threat model.
/pp-secure-phase 3
/pp-secure-phase
| Argument | Behavior |
|---|---|
N | Phase number; defaults to the last completed phase when omitted. |
Output: an updated {phase_num}-SECURITY.md recording mitigation status and gaps.
/pp-ui-review
Performs a six-pillar visual audit of implemented frontend code, grading each pillar from 1 to 4.
/pp-ui-review 5
/pp-ui-review
| Argument | Behavior |
|---|---|
N | Phase number; defaults to the last completed phase when omitted. |
Output: a {phase_num}-UI-REVIEW.md with pillar grades and improvement recommendations.
/pp-validate-phase
Audits a phase's Nyquist validation coverage and generates tests for paths that were never validated.
/pp-validate-phase 2
/pp-validate-phase
| Argument | Behavior |
|---|---|
N | Phase number; defaults to the last completed phase when omitted. |
Output: an updated VALIDATION.md plus new test files covering the gaps.
/pp-debug
Applies the scientific method to debugging, persisting session state so investigations survive context resets.
/pp-debug "login fails with 401 after token refresh"
/pp-debug --diagnose "memory leak in the image processor"
/pp-debug list
/pp-debug status auth-401-fix
/pp-debug continue auth-401-fix
| Flag / Argument / Subcommand | Behavior |
|---|---|
[description] | Describes the bug or issue to investigate. |
--diagnose | Investigates only, returning a root-cause report without applying a fix. |
list | Lists all active, unresolved debug sessions. |
status [slug] | Shows the current status of a named session. |
continue [slug] | Resumes an interrupted session. |
/pp-forensics
Runs a read-only post-mortem on a failed or stuck workflow, analyzing history and artifacts to explain what went wrong.
/pp-forensics "plan-phase got stuck on phase 4"
/pp-forensics
| Argument | Behavior |
|---|---|
[description] | Optional failure description; prompts interactively when omitted. |
Output: a timestamped report under .planning/forensics/ covering evidence, anomalies, root cause, and corrective actions.
/pp-eval-review
Audits whether an AI phase's evaluation strategy from AI-SPEC.md was actually implemented.
/pp-eval-review 6
/pp-eval-review
| Argument | Behavior |
|---|---|
N | Phase number; defaults to the last completed phase when omitted. |
Output: a {phase_num}-EVAL-REVIEW.md with a coverage score, verdict, gaps, and remediation steps.
/pp-review
Invokes external AI CLIs to independently peer-review phase plans and collects their feedback in a structured report.
/pp-review --phase 3
/pp-review --phase 3 --gemini --codex
/pp-review --phase 3 --all
| Flag | Behavior |
|---|---|
--phase N | The phase to review (required). |
--gemini | Includes the Gemini CLI. |
--claude | Includes a separate Claude CLI session. |
--codex | Includes the Codex CLI. |
--opencode | Includes OpenCode. |
--qwen | Includes Qwen Code. |
--cursor | Includes the Cursor agent. |
--agy / --antigravity | Includes the Antigravity CLI. |
--coderabbit | Includes CodeRabbit. |
--ollama | Includes a local Ollama server. |
--lm-studio | Includes a local LM Studio server. |
--llama-cpp | Includes a local llama.cpp server. |
--all | Includes every available CLI and local model server. |
Output: a {phase_num}-REVIEWS.md with per-reviewer feedback classified as HIGH, MEDIUM, or LOW.