Code review
Run/gsd-code-review N to review all files changed during a phase. The reviewer agent classifies findings by severity — Critical, Warning, and Info — and writes a structured REVIEW.md that you can act on immediately or feed into the fix pipeline.
Flag reference
Flag reference
| Flag | Effect |
|---|---|
--depth=quick | Pattern-matching only, approximately 2 minutes |
--depth=standard | Per-file analysis with language-specific checks, 5–15 minutes (default) |
--depth=deep | Cross-file analysis including import graphs and call chains, 15–30 minutes |
--files file1,file2 | Review explicit comma-separated files; skips SUMMARY/git scoping |
--fix | Auto-fix Critical and Warning findings after review |
--fix --all | Expand fix scope to include Info-level findings |
--fix --auto | Fix-and-re-review loop, capped at 3 iterations |
{phase}-REVIEW.md with severity-classified findings; {phase}-REVIEW-FIX.md when --fix is used
You can set a default review depth in config with
workflow.code_review_depth: "quick" | "standard" | "deep". Override it per run with --depth=. Set workflow.code_review: false to gate the command project-wide.Structural pre-pass with fallow
Enable the optional fallow structural analysis pre-pass to catch architectural issues before the agent review runs. Setcode_quality.fallow.enabled: true in config.json and GSD will produce a {phase}/FALLOW.json artifact and embed a Structural Findings section in REVIEW.md.
Autonomous audit-to-fix pipeline
Run/gsd-audit-fix to run a full audit, classify all findings, auto-fix what can be fixed safely, verify each fix with tests, and commit atomically — all without manual intervention.
Flag reference
Flag reference
| Flag | Effect |
|---|---|
--source <audit> | Audit to run (default: audit-uat) |
--severity high|medium|all | Minimum severity to process (default: medium) |
--max N | Maximum number of findings to fix in one run (default: 5) |
--dry-run | Classify findings and print a classification table without applying any fixes |
Test generation
Run/gsd-add-tests N after a phase completes to generate a test suite for the code it produced. The command reads the phase’s PLAN.md and SUMMARY.md to understand what was built and generates tests that verify the expected behavior.
Security threat verification
Run/gsd-secure-phase N to retroactively verify that threat mitigations were implemented for a completed phase. The command reads the phase’s threat model (from PLAN.md or an existing SECURITY.md) and walks through each threat to confirm the mitigation was actually applied.
SECURITY.md exists
Audits and verifies existing threat mitigations against the shipped code.
No SECURITY.md, PLAN.md has threat model
Generates SECURITY.md from planning artifacts and then verifies mitigations.
Phase not yet executed
Exits with guidance — security verification requires executed code to analyze.
{phase}-SECURITY.md with per-threat verification results
Configure security enforcement settings in config.json:
Nyquist coverage audit
Run/gsd-validate-phase N to perform a retroactive Nyquist test coverage audit — verifying that the test coverage written during execution maps correctly to the requirements laid out in the phase plan.
The Nyquist audit uses the same coverage mapping engine as the plan-phase research step (controlled by
workflow.nyquist_validation). Running /gsd-validate-phase gives you retroactive coverage analysis on phases that were executed before Nyquist was enabled, or after requirements have been revised.Quality gate summary
/gsd-code-review
Review phase changes by depth level. Use
--fix --auto for a fully autonomous review-and-fix loop./gsd-audit-fix
Autonomous audit-to-fix pipeline with severity filtering, dry-run preview, and atomic commits.
/gsd-add-tests
Generate a test suite for any completed phase based on its plan and implementation artifacts.
/gsd-secure-phase
Retroactive threat mitigation verification anchored to OWASP ASVS levels.
/gsd-validate-phase
Nyquist test coverage audit that maps requirements to tests and flags gaps.
