Skip to content

Phase 5: Finalize

Final quality verification and merge readiness using the finalization-orchestrator. Produces a Go/No-Go decision.

Command: /vt-c-5-finalize [--env production] [--migration]

When to use

After the code review in Phase 4 passes. This is the final gate before code is merged to main.

What happens

  1. Test gate verification -- Reads .test-gate.md and verifies:
    • File exists (if missing, finalization is blocked)
    • status: PASS (if FAIL, finalization is blocked)
    • branch matches the current branch (stale gates are rejected)

See Testing Procedures for the gate file format and how to generate it.

  1. Version gate check -- Runs check-finalize-versions.sh to verify plugin versioning is in order:

    Gate State Result
    VERSION_GATE: PASS Finalization proceeds
    VERSION_GATE: WARN Warning displayed, finalization proceeds
    VERSION_GATE: FAIL Blocked — version bump or changelog entry missing

    The script checks each plugin for code changes since the last release. If code changed, it requires a version bump in registry.json and a corresponding CHANGELOG.md entry. To resolve a FAIL: bump the version in plugins/registry.json and add a changelog entry to the plugin's CHANGELOG.md.

  2. Documentation build (when docs/user-manual/ exists) -- Runs mkdocs build --strict to verify the docs site builds without broken links or missing pages. Build failures block finalization.

  3. Repo governance audit -- If .repo-manifest.yaml exists, runs /vt-c-repo-audit --ci-mode to verify zero context bleed and LFS compliance. Fails on any context artifacts in deployable paths.
  4. Dependency security audit -- Runs npm audit or bundle audit to find known vulnerabilities in dependencies.
  5. Final security scan -- Last-pass review for anything missed in Phase 4.
  6. Migration safety -- If database migrations are pending, checks for zero-downtime compatibility, rollback capability, and data loss risks.
  7. Compliance verification -- GDPR data handling, SOC2 logging, PII protection, and audit trail completeness.
  8. Constitution compliance (when SpecKit active) -- Verifies all constitution principles are respected and reports spec coverage percentage.

Output

  • Finalization report with check results for each category
  • Go/No-Go decision with rationale
  • Rollback plan (previous version, rollback command, monitoring targets)
  • Post-merge monitoring checklist

Next step

  • If GO: Merge PR to main, then Phase 6: Operate
  • If NO-GO: Fix blocking issues, then run /vt-c-5-finalize again.