vt-c-5-finalize¶
Phase 5 - Final quality verification and merge readiness using the finalization-orchestrator. Runs security audit, migration checks, and compliance validation.
Plugin: core-standards
Category: Development Workflow
Command: /vt-c-5-finalize
Phase 5: Finalize - Quality Verification & Merge Readiness¶
Verify your code is safe to merge with security audits, migration checks, and compliance validation.
Workflow Position¶
/activate → /vt-c-2-plan → /vt-c-3-build → /vt-c-4-review → [ /vt-c-5-finalize ] → /vt-c-complete
▲ YOU ARE HERE
↑ deliverable_types determines gate enforcement
Invocation¶
/vt-c-5-finalize # Standard finalization check
/vt-c-5-finalize --env production # Specify environment
/vt-c-5-finalize --migration # Include migration safety check
Intent Constraints¶
This skill MUST NOT: - Proceed without both .review-gate.md (status: PASS) and .test-gate.md (status: PASS) - Override a NO-GO decision without explicit user approval and documented rationale - Skip the security scan, even for urgent deployments - Modify any source code, tests, or configuration (verification only) - Downgrade the severity of any finding to achieve a GO decision
This skill MUST STOP and surface to the user when: - A finalization check returns an unexpected or ambiguous result - npm audit reveals critical vulnerabilities with no available fix - The review gate branch does not match the current branch - Migration safety analysis identifies potential data loss
Execution Instructions¶
This command invokes the finalization-orchestrator agent.
Step 0a: Read Phase Checkpoint¶
If .claude-checkpoint.md exists in the project root:
1. Read the file
2. Display: Resuming from checkpoint: {completed_phase} completed at {timestamp}
3. Display the "Context for Next Phase" section content
4. If next_phase is 4-review (review not yet completed): HARD BLOCK — display "Code review required before finalization. Run /vt-c-4-review first." and stop.
5. If next_phase doesn't match 5-finalize (other mismatch): warn (advisory, not blocking)
If no checkpoint exists: proceed silently.
Step 0: Review Gate Check (Mandatory)¶
Before any finalization work, verify that code review has been completed and passed.
Note: After this gate check passes, proceed to Step 0.5 before continuing.
Step 0.5: Project Registration Check¶
- Read
TOOLKIT_ROOT/intake/projects.yaml(resolve TOOLKIT_ROOT from this skill's base directory) - Check if the current working directory appears in the
projectslist - If NOT registered and the project has a CLAUDE.md or .design-state.yaml:
- Ask: "This project is not registered in the toolkit. Register now to enable cross-project scanning and journal aggregation?"
- Options: Register now (invoke /vt-c-project-register) | Skip for now
- If registered: continue silently
Step 0.7: Read Deliverable Types¶
- Read
deliverable_typesfromspecs/[N]-feature/spec.mdYAML frontmatter - If present and non-empty: use as-is
- If missing: warn "No
deliverable_typesin spec frontmatter — defaulting to[code]" and treat as[code] - Display: "Deliverable types: {list}"
The detected types determine which gates are enforced and which finalization checks are run.
-
Read
.review-gate.mdfrom the project root -
If file is missing:
STOP. Do not proceed with finalization.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BLOCKED: No Review Gate Found ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Code review has not been run. Finalization requires a passing review. Run /vt-c-4-review first, then retry /vt-c-5-finalize. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -
If
status: FAIL:STOP. Do not proceed with finalization.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BLOCKED: Review Gate FAILED ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ The last code review did not pass. Critical: [critical_count] | High: [high_count] Fix the issues listed in the review, then re-run /vt-c-4-review. Only after the review passes can /vt-c-5-finalize proceed. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -
If
Display warning but allow the user to decide whether to proceed.branchdoesn't match current branch: -
If
status: PASSand branch matches: Display confirmation and proceed.
Step 0b: Test Gate Check¶
After verifying the review gate, also verify that automated tests have passed.
When code is NOT in deliverable_types:
Accept .test-gate.md with status: NOT_RUN. Display "Test gate: NOT_RUN (accepted — no code deliverables)" and proceed. If the file is missing entirely, this is also acceptable for non-code specs — display the same message and proceed.
When code in deliverable_types (existing behavior):
-
Read
.test-gate.mdfrom the project root -
If file is missing:
STOP. Do not proceed with finalization.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BLOCKED: No Test Gate Found ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Automated tests were not run. Finalization requires passing tests. Run /vt-c-4-review first (which runs the test suite), then retry /vt-c-5-finalize. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -
If
status: FAIL:STOP. Do not proceed with finalization.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BLOCKED: Test Gate FAILED ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [failed] of [total] tests failed. Finalization requires all tests passing. Fix failing tests and re-run /vt-c-4-review. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -
If
branchdoesn't match current branch: Display warning (advisory, same as review gate). -
If
status: PASSand branch matches: Display confirmation and proceed.
Step 0c: Version Gate Check¶
When code is NOT in deliverable_types: Skip the version gate entirely. Display "Version gate: SKIPPED (no code deliverables)" and proceed to Step 0a.
When code in deliverable_types (existing behavior):
After verifying review and test gates, verify that plugin version bumps and changelogs are in order.
-
Run the version gate script using the Bash tool:
If$CLAUDE_PLUGIN_ROOTis not set, locate the script relative to this skill file at../../scripts/check-finalize-versions.sh. -
If output starts with
VERSION_GATE: FAIL:
Auto-fix instead of blocking. Determine and apply the version bump automatically:
2a. Determine bump type:
# Check if new files were added under plugins/*/skills/ or plugins/*/agents/
git diff --name-status main...HEAD -- 'plugins/*/skills/' 'plugins/*/agents/'
A (added): bump type = MINOR (new capability)
- If only M (modified): bump type = PATCH (improvement/fix)
2b. Compute new version:
- Read current version from plugins/registry.json (parse JSON, extract version for affected plugin)
- For MINOR: increment middle number (3.21.0 → 3.22.0)
- For PATCH: increment last number (3.21.0 → 3.21.1)
2c. Count current skills:
2d. Apply auto-fix:
- Update version in
plugins/registry.json(Edit tool) - Update version AND skill count in
plugins/{name}/.claude-plugin/plugin.json(Edit tool) - Generate CHANGELOG entry:
- Read active spec title from
specs/[N]-feature/spec.mdfrontmatter (title:field) - Read branch commits:
git log main..HEAD --oneline - Write a
## [new-version] - YYYY-MM-DDsection at the top ofplugins/{name}/CHANGELOG.md: - If a section for this version already exists in CHANGELOG: skip CHANGELOG generation
- Read active spec title from
- Stage the changes:
- Commit:
2e. Report and continue:
✓ Version auto-bumped: 3.21.0 → 3.22.0 (MINOR — new skill added)
- plugins/registry.json updated
- plugin.json updated (skills: 104 → 105)
- CHANGELOG.md entry added
Exception — MAJOR bump: If the script output mentions breaking changes or the spec title contains "breaking" or "remove", do NOT auto-bump. Instead display:
⚠ Potential breaking change detected — manual version bump required.
Review the changes and bump the MAJOR version manually if appropriate.
-
If output starts with
Display warning but proceed with finalization.VERSION_GATE: WARN: -
If output starts with
If VERSION_CHANGES lines are present, also display them: If the NOTE line says "No plugin code changes detected", display:VERSION_GATE: PASS: -
If the script fails to run (command not found, Python3 missing, etc.):
Display warning but proceed. Do not block finalization due to script infrastructure issues.
Important: Save the VERSION_CHANGES output from this step for use in the TL;DR summary (Step 5).
Step 0a: Check for Spec-Driven Mode¶
If .specify/ directory exists:
- Load constitution -
.specify/memory/constitution.mdfor principles - Derive active spec from branch — check
.active-specfile first, then parse branch name (feature/spec-NNN-*→ SPEC-NNN), then look upspecs_dirin.design-state.yaml - Read completion status from
specs/[N]-feature/state.yaml - Load spec -
specs/[N]-feature/spec.mdfor completeness verification - Display status:
If NO .specify/:
Step 1: Load Institutional Knowledge¶
Before finalization checks:
- Load
docs/solutions/patterns/critical-patterns.md- Check for known issues - Load
docs/runbooks/- Reference existing procedures - Check recent incidents that might affect this release
- If SpecKit: Load constitution and spec from Step 0
Step 2: Run Finalization Checks¶
The finalization-orchestrator coordinates:
| Check | Tool | Purpose |
|---|---|---|
| Repo Governance | /vt-c-repo-audit --ci-mode | Zero context bleed, LFS compliance |
| Dependency Audit | npm audit / bundle audit | Known vulnerabilities |
| Security Scan | security-sentinel | Final security review |
| Migration Safety | data-integrity-guardian | Zero-downtime migrations |
| Compliance | compliance-checklist | GDPR/SOC2 requirements |
Step 2 (non-code): Content Finalization Checks¶
When non-code types present in deliverable_types, run these additional checks:
- Link validation — All internal and external links in deliverables resolve correctly
- Format verification — Consistent heading hierarchy, proper list formatting, no skipped heading levels
- Placeholder detection — No TODO, FIXME, TBD, [fill in], or other placeholder content remains
When document or presentation in types, also run delivery checks (absorbed from kw-4-publish):
- Delivery format checklist:
- [ ] Correct file format (Markdown, PDF, PPTX as specified)
- [ ] File names follow conventions
- [ ] Version/date stamp present
-
[ ] Access permissions appropriate
-
Stakeholder readiness checklist:
- [ ] Executive summary or key highlights prepared
- [ ] Key points are prominent and easy to find
- [ ] Next steps clearly identified
- [ ] Stakeholder communication template generated:
Step 2a: Repo Governance Audit (if .repo-manifest.yaml exists)¶
Run /vt-c-repo-audit --ci-mode before other checks:
- FAIL if any context bleed detected (context artifacts in deployable paths or build output)
- FAIL if oversized untracked binaries found in deployable paths
- WARN (non-blocking) for traceability gaps or stale sandbox files
- SKIP if no
.repo-manifest.yamlpresent
This is the "Finalization Auditor" from the Unified Repo Governance model — ensures zero leakage of design, prompt, or prototype files into the production bundle.
Step 2b: State Documentation Maintenance Gate (advisory)¶
Check whether UI state documentation may need updating based on changed files.
-
Check for state matrix existence: Look for
01-docs/deliverables/implementation-readiness/ui-state-matrix.mdin the project. If the file does not exist → skip this step silently. -
Get changed files:
If the git command fails → display "State documentation check: SKIPPED (git diff unavailable)" and continue. -
Grep for state-affecting patterns in changed file names and content:
- Filename patterns:
*state*,*State*,*guard*,*route* -
Content patterns:
enum.*State,interface.*State,type.*State,ngIf,ngSwitch,@if,@switch,[hidden],canActivate -
If matches found (advisory, non-blocking):
State documentation advisory: ───────────────────────────────────────────────────────────────── UI logic changes detected in {N} file(s). Verify that the state matrix (01-docs/deliverables/implementation-readiness/ui-state-matrix.md) is still current. Changed files with state-affecting patterns: • {file1} • {file2} ───────────────────────────────────────────────────────────────── -
If no matches found → continue silently.
Step 2.5: User Manual Build Gate¶
Skip silently if docs/user-manual/mkdocs.yml does not exist.
When docs/user-manual/mkdocs.yml exists:
-
Build the manual:
-
If build fails (exit code != 0):
BLOCK finalization — broken documentation must not ship. -
If build succeeds:
-
If mkdocs is not installed (command not found):
Continue without blocking — do not fail finalization due to missing local tooling. -
Draft marker detection:
If matches found, report as Medium severity (non-blocking): -
Documentation coverage report:
- Scan all
specs/*/state.yamlfiles fordocs_pagefields - For each
docs_page, check if the file exists - Report: Missing pages are reported as Low severity (advisory). Orphaned pages are informational only.
Step 3: Produce Finalization Report¶
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Phase 5: Quality Verification & Merge Readiness
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Environment: [production/staging]
Branch: [current branch]
Last Commit: [commit hash and message]
Check Results:
─────────────────────────────────────────────────────────────────
[✓/✗] Dependency Security Audit
• High vulnerabilities: X
• Critical vulnerabilities: X
[✓/✗] Final Security Scan
• Issues found: X
[✓/✗] Migration Safety (if applicable)
• Migrations: X pending
• Zero-downtime compatible: Yes/No
[✓/✗] Compliance Verification
• GDPR: Compliant/Issues found
• Data handling: Reviewed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Step 3b: Built-In Security Review Gate¶
When code is NOT in deliverable_types: Skip the security review gate. Display "Security review: SKIPPED (no code deliverables)" and proceed to Step 4.
When code in deliverable_types (existing behavior):
After producing the finalization report, invoke the built-in /security-review command for a final automated security pass before the Go/No-Go decision.
-
Invoke
/security-reviewscoped to the branch diff for a final security verification. -
Fallback: If
Log the warning and continue to Step 4. Do not block finalization due to tool unavailability./security-reviewis not available (command not recognized or returns an error): -
Blocking behavior: If
/security-reviewfinds HIGH severity findings that are unresolved: - Add to blocking issues for the NO-GO decision
-
All HIGH findings must be enumerated individually (EC4)
-
Quality gates checklist item: Add to the finalization checklist:
-
Merge results: Include
/security-reviewfindings in the finalization report alongside the security-sentinel results from Step 2.
Step 4: Go/No-Go Decision¶
If GO:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DECISION: GO - Safe to Merge
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
All checks passed. You may proceed with merging.
Rollback Plan:
─────────────────────────────────────────────────────────────────
Previous version: [version/vt-c-commit]
Rollback command: [specific rollback instructions]
Monitoring: Check [service] for errors post-merge
Post-Merge Steps:
1. Documentation sync (Step 4.5 — runs automatically next)
2. Monitor error rates for 15 minutes
3. Verify key user flows work
4. Check logs for unexpected errors
TIP: Pre-PR simplify ritual (optional):
1. git commit (save current work)
2. /simplify (run 3 parallel quality agents)
3. git diff (review improvements)
4. git commit -m "refactor: simplify" (commit improvements)
See references/simplify-guide.md for focused mode and skip conditions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NEXT: Merge PR to main
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
After successful merge, Phase 6 (/vt-c-6-operate) covers:
• Bug investigation if issues arise
• Incident response procedures
• Continuous improvement
If NO-GO:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DECISION: NO-GO - Blocking Issues Found
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Finalization blocked due to:
[List of blocking issues with details...]
Required Actions:
─────────────────────────────────────────────────────────────────
1. [Specific action to fix issue 1]
2. [Specific action to fix issue 2]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ACTION: Fix issues, then run /vt-c-5-finalize again
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Recommended: Address the blocking issues listed above, then re-run /vt-c-5-finalize.
Step 4.5: Documentation Sync (GO only)¶
Only execute this step if the decision was GO or GO WITH CAUTION.
4.5a: Capture change ledger entry
Invoke /vt-c-doc-sync --log to interactively record what changed:
- What was added, modified, or removed
- Why (the spec/feature that drove it)
- Key files affected
This appends an entry to docs/change-ledger.md.
4.5b: Apply mechanical documentation fixes
Invoke /vt-c-doc-sync --fix to automatically update:
- Component counts in README.md, docs/index.md, macros.py, plugin.json
- Version references against plugins/registry.json
- Deprecated terminology
- What's New section (regenerated from change ledger)
- MkDocs nav entries if needed
4.5c: Report result
Documentation Sync:
─────────────────────────────────────────────────────────────────
Change ledger: Entry added for [spec/feature name]
Counts updated: [N] files fixed
What's New: Regenerated
Remaining drift: [0 | N items — list them]
If /vt-c-doc-sync --fix reports remaining manual-fix items, list them as advisories (non-blocking — finalization continues).
Step 4.7: Non-code Delivery Summary¶
Only when non-code types present in deliverable_types.
Synthesize a delivery summary from journal entries and deliverable content:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Delivery Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Goals achieved:
• [goal 1 from spec, with status]
• [goal 2 from spec, with status]
Key decisions:
• [decision 1 from journal entries]
• [decision 2 from journal entries]
Lessons learned:
• [lesson 1 from journal entries]
Post-delivery actions:
─────────────────────────────────────────────────────────────────
1. Run /vt-c-consolidate to archive session learnings
2. Capture stakeholder feedback via /vt-c-journal "Feedback: ..."
3. Consider /vt-c-compound if this solved a reusable problem
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
If no journal entries exist, base the summary on the spec goals and deliverable content only.
Step 4.8: Persist Finalize Gate in state.yaml¶
After the GO/NO-GO decision, persist the finalize result for committed audit trail:
- Derive the active spec from the branch name (
feature/spec-NNN-*→ SPEC-NNN) - Look up
specs_dirin.design-state.yaml - Read
specs/[N]-feature/state.yaml - Add or update the
finalize_gatesection: - Write the updated state.yaml
- Stage:
git add specs/[N]-feature/state.yaml
If no active spec or no state.yaml: skip silently. If write is denied (context: fork): skip silently — the GO/NO-GO decision in the TL;DR output is sufficient for the current session.
Step 4.9: Write Phase Checkpoint¶
Write .claude-checkpoint.md to the project root:
- completed_phase: 5-finalize
- next_phase: complete
- next_command: /vt-c-complete
- branch: current git branch
- active_spec: derived from branch or .active-spec
- clear_recommended: false
- clear_reason: "Completion is brief — merge and mark done"
- Key Outcomes: GO/NO-GO decision, version bump, checks passed
- Context for Next Phase: merge instructions, post-merge steps
Display the clear recommendation per the phase-checkpoint protocol.
Step 5: TL;DR Summary (Final Output)¶
This MUST be the absolute last output of the finalization check. Nothing may follow it. Max 10 lines between delimiters.
After ALL previous steps (including the GO/NO-GO decision and any file writes), output a concise summary using the format below. Fill in values from Steps 2–4.
If GO:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TL;DR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Decision: GO
Checks: [N] passed | [N] failed | [N] warnings
Constitution: COMPLIANT
Version: [VERSION_CHANGES from Step 0c, e.g. "core-standards 3.0.0 → 3.1.0 (MINOR)"]
Docs: Synced (change ledger + counts updated)
Branch: [branch-name]
Next: Merge PR to main
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
If GO WITH CAUTION:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TL;DR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Decision: GO WITH CAUTION
Checks: [N] passed | [N] failed | [N] warnings
Constitution: COMPLIANT
Version: [VERSION_CHANGES from Step 0c, e.g. "core-standards 3.0.0 → 3.1.0 (MINOR)"]
Spec Coverage: [Z]% (some requirements pending)
Docs: Synced (change ledger + counts updated)
Branch: [branch-name]
Next: Merge PR to main, track pending requirements in backlog
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
If NO-GO:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TL;DR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Decision: NO-GO
Checks: [N] passed | [N] failed | [N] warnings
Constitution: [COMPLIANT / VIOLATIONS]
Version: [VERSION_CHANGES from Step 0c, or "BLOCKED" if version gate failed]
Branch: [branch-name]
Blockers: [list of blocking issues]
Next: Address blockers, then re-run /vt-c-5-finalize
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
If stale gates detected:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TL;DR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Decision: NO-GO (stale gates)
Branch: [branch-name]
Stale: [review-gate/test-gate] from branch [other-branch]
Next: Re-run /vt-c-4-review on current branch, then /vt-c-5-finalize
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Notes:
- Omit the "Constitution" line if SpecKit is not active (no .specify/ directory)
- Omit the "Blockers" line if there are no blocking issues
- The "Version" line uses the VERSION_CHANGES from Step 0c. If no plugin changes were detected, use "No plugin changes". If the version gate was skipped, omit the line.
- The TL;DR summarizes Steps 2–4; do not repeat the full report
Error Handling (context: fork)¶
This skill runs with context: fork — it executes as an isolated sub-agent that returns only its output to the parent conversation. Fork sub-agents CANNOT interact with the user.
Critical rules for fork context:
-
NEVER ask interactive questions. No "Would you like...?", no "Should I...?", no AskUserQuestion calls. The question will be swallowed, the sub-agent will die, and the parent conversation receives no output at all.
-
If a file write fails, report it inline and continue. Use this format:
Warning — file not persisted: Could not write
{filename}. The full content is included in the output above. To persist, copy the content manually or re-run with write permissions. -
Always produce the full formatted output as the primary deliverable. The formatted finalization report returned to the parent conversation is the primary output. File persistence is secondary. Complete all analysis, checks, and formatting BEFORE attempting any file writes.
-
Finalization report is the primary output: The GO/NO-GO decision with full check results MUST always be returned to the parent conversation as formatted text, regardless of whether any file writes succeed.
Finalization Checks Detail¶
Dependency Security Audit¶
- Runs
npm auditorbundle audit - Identifies known vulnerabilities in dependencies
- Flags high/critical issues as blocking
Final Security Scan¶
- Last-pass security review
- Checks for any issues missed in Phase 4
- Validates authentication/authorization
Migration Safety¶
If database migrations are pending: - Checks for zero-downtime compatibility - Validates rollback capability - Checks for data loss risks - Verifies large table handling
Compliance Verification¶
- GDPR data handling review
- SOC2 logging requirements
- PII protection validation
- Audit trail completeness
Constitution Compliance (When SpecKit Active)¶
If .specify/ exists, finalization checks include:
Constitution Verification¶
Constitution Compliance Check:
─────────────────────────────────────────────────────────────────
Verifying release meets .specify/memory/constitution.md principles...
[✓/✗] [Principle 1 from constitution]
[✓/✗] [Principle 2 from constitution]
[✓/✗] [Principle 3 from constitution]
...
Constitution Status: COMPLIANT / VIOLATIONS FOUND
Spec Coverage Verification¶
Spec Coverage Check:
─────────────────────────────────────────────────────────────────
Verifying specs/[N]-feature/spec.md requirements are implemented...
Total Requirements: X
Implemented: Y
Coverage: Z%
Unimplemented (if any):
• [Requirement not yet implemented]
Finalization Decision with SpecKit¶
GO with full spec compliance:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DECISION: GO - Spec Compliant
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ All constitution principles respected
✓ Spec requirements implemented
✓ Standard checks passed
CAUTION with partial spec coverage:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DECISION: GO WITH CAUTION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ Constitution principles respected
⚠ Spec coverage: X% (some requirements pending)
✓ Standard checks passed
Pending requirements should be tracked in backlog.
Feature Flag Recommendation¶
For risky changes, consider:
TIP: Use feature flags for gradual rollout
The feature-flags skill provides patterns for:
• Percentage-based rollouts
• User segment targeting
• Kill switches for quick rollback
This allows deploying code with features disabled,
then gradually enabling for users.
Open Brain Capture (Optional)¶
After producing the Go/No-Go decision, if the capture_thought MCP tool is available, capture the finalization outcome.
When to capture: After every completed finalization (GO, NO-GO, or GO WITH CAUTION).
How:
1. Check if capture_thought tool is available. If not: skip silently.
2. Call capture_thought with: