vt-c-complete¶
Mark the active specs as completed and advance to the next ready spec.
Plugin: core-standards
Category: Other
Command: /vt-c-complete
/vt-c-complete — specs Completion¶
Workflow position: /vt-c-activate → /vt-c-2-plan → /vt-c-3-build → /vt-c-4-review →
/vt-c-complete→ next specsMarks the current spec as done and offers to activate the next one.
Purpose¶
Completes the active specs and advances the execution sequence. This is the counterpart to /vt-c-activate — activation starts work, completion finishes it.
When to Use¶
- After
/vt-c-4-reviewpasses and the feature is ready - When all implementation work for the current spec is done
Prerequisites¶
- A spec must be currently
in_progress(derived from branch name or.active-specfile) - The spec's
specs/[N]-feature/state.yamlmust exist
Invocation¶
Execution Steps¶
Step 1: Derive Active Spec¶
Determine the active spec using this priority order:
.active-specfile (if exists in project root):- Read the file content (single line: e.g.,
SPEC-012) -
Use this as the active spec
-
Git branch name (if no
.active-spec): - Run:
git branch --show-current - If branch matches
feature/spec-NNN-*: extract NNN → SPEC-NNN → continue to Step 2 - If branch matches
fix/bug-NNN-*: extract NNN → BUG-NNN → go to Step 1.5 (Bug Completion) - Example:
feature/spec-012-design-state-split→ SPEC-012 -
Example:
fix/bug-007-login-safari→ BUG-007 -
Fallback: No active spec or bug found
- Display: "No active spec or bug found. Use /vt-c-activate to start working on a spec or bug."
- Exit gracefully
Step 1.5: Bug Completion (for fix/bug-NNN-* branches)¶
- Extract NNN from the branch name:
fix/bug-007-login-safari→007 - Glob
bugs/007-*/state.yaml(replace007with the extracted number) to find the bug directory - If not found:
- Display: "BUG-007 directory not found in bugs/. Cannot mark as verified."
- Exit gracefully
- Read
bugs/NNN-slug/state.yaml - If
status: verifiedalready: - Display: "BUG-NNN is already verified."
- Exit without changes
- Update
bugs/NNN-slug/state.yaml: setstatus: verified, addverified_at: [ISO-8601 now] - Display:
- Exit — do not continue to Step 2 (spec completion flow does not apply)
Step 2: Read Spec State¶
- Read
specs/[N]-feature/state.yamlfor the active spec - If
state.yamldoes not exist: - Display: "No state file found for SPEC-NNN. Use /vt-c-activate to properly activate a spec first."
- Exit gracefully
Step 2.5: Verify Workflow Gates¶
Read specs/[N]-feature/state.yaml and check all 4 phase gates. Display a dashboard:
Workflow Gate Check:
[✓/✗] Plan — [status or NOT RUN]
[✓/✗] Build — [status or NOT RUN]
[✓/✗] Review — [status or NOT RUN]
[✓/✗] Finalize — [status or NOT RUN]
Gate check logic:
plan_gateexists ANDplan_gate.status == COMPLETE→ ✓build_gateexists ANDbuild_gate.status == COMPLETE→ ✓review_gateexists ANDreview_gate.status == PASS→ ✓ (FAIL → ✗)finalize_gateexists ANDfinalize_gate.status == GO→ ✓ (NO-GO → ✗)
If all 4 gates pass:
Continue to Step 3.If any gate is missing or failing:
BLOCKED: Workflow gates incomplete.
Missing/failing gates:
[✗] Review — NOT RUN → Run /vt-c-4-review
[✗] Finalize — NOT RUN → Run /vt-c-5-finalize
Complete the missing phases before marking this spec done.
Use AskUserQuestion: - Run the missing phase — exit and run the next required phase - Skip gate check (emergency only) — records bypass permanently in state.yaml
If emergency bypass selected: Ask for a reason via AskUserQuestion (free text). Then write to state.yaml:
gate_bypass:
date: "YYYY-MM-DD"
reason: "[user-provided reason]"
skipped_gates: [list of missing gates]
Backward compatibility: If state.yaml has no gate fields at all (old spec completed before SPEC-095), skip this check silently — do not retroactively enforce on specs that predate the gate system.
Step 3: Check Already Completed¶
If state.yaml already shows status: completed:
- Display: "SPEC-NNN is already completed. Use /vt-c-activate to pick the next spec."
- Exit without modifying state
Step 4: Warn on Incomplete Steps¶
If steps: exists in state.yaml and any step is not completed:
Use AskUserQuestion: - Yes, complete anyway — proceed to Step 4.5 - No, go back — exit without changes
Step 4.5: State Documentation Check (advisory)¶
Check whether this spec's changes may have affected UI state documentation.
-
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 to Step 5 silently. -
Get changed files for this spec:
If the git command fails → skip to Step 5 silently. -
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: ───────────────────────────────────────────────────────────────── This spec changed {N} file(s) with UI state logic. Consider updating: • 01-docs/deliverables/implementation-readiness/ui-state-matrix.md • Test dataset (if permutations changed) ───────────────────────────────────────────────────────────────── -
Proceed to Step 4.6 regardless (advisory only).
Step 4.6: Compound Knowledge Capture¶
Before marking the spec done, check whether it produced reusable learnings worth documenting.
Auto-skip conditions (any ONE is sufficient to skip — proceed to Step 5 silently):
- No plan.md exists for this spec (was a quick fix, not a planned feature)
- Git diff from branch is small (<50 lines changed) AND all review findings were LOW or informational
If none of the auto-skip conditions are met, proceed with compound capture.
If compound capture is warranted:
- Read the spec's artifacts:
specs/[N]-feature/spec.md— problem and goalspecs/[N]-feature/plan.md— key architecture decisions- Review findings from
specs/[N]-feature/review-triage.md(if exists) -
Session journal entries from
docs/vt-c-journal/(if any for this spec) -
Identify compound-worthy learnings:
- Non-obvious solutions (the fix wasn't what you'd expect)
- Architecture decisions with rationale (chose X over Y because Z)
- Patterns applicable beyond this spec (reusable across projects)
-
Gotchas or pitfalls discovered during implementation
-
If learnings found, present a preview:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Compound Knowledge Capture ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ From SPEC-{NNN}: {title} Learning: {1-2 sentence summary of the reusable insight} Problem: {from spec problem section} Solution: {from plan key decisions} Prevention: {how this pattern prevents future issues} Tags: {extracted from spec and review} ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -
Use AskUserQuestion:
- Capture — Write compound doc using
/vt-c-compoundformat - Edit first — User modifies the summary before writing
-
Skip — No learnings worth capturing, proceed to Step 5
-
If "Capture" or "Edit first": invoke the compound-docs skill's writing logic — the doc is written to the appropriate
docs/solutions/{category}/subdirectory using the compound-docs YAML frontmatter schema (symptoms, root_cause, resolution_type, severity, module, problem_type, date, tags). Reference SPEC-NNN in the body.
Step 5: Mark as Completed¶
Update specs/[N]-feature/state.yaml:
- Set status: completed
- Set completed_at timestamp (ISO 8601 format)
Step 5.5: User Manual Update (optional)¶
If docs/user-manual/mkdocs.yml exists:
- Check if the completed spec has a
docs_pagefield in itsstate.yaml, OR if a matching feature page exists indocs/user-manual/docs/features/ - If a matching page is found or
docs_pageexists: Use AskUserQuestion: - Update user manual (Recommended) — runs
/vt-c-user-manual-updatefor this spec - Skip — continue without updating the manual
- If no match found: skip silently (feature may not have a manual page)
If docs/user-manual/ does not exist: skip this step silently.
Step 6: Identify Next Ready specs¶
- Read
.design-state.yamlfor static metadata (dependencies, priorities) - Scan all
specs/[N]-feature/state.yamlfiles for current status - Find specs whose dependencies are all
completedand whose own status is notcompletedorin_progress - Sort by priority (P0 first), then by numeric ID
Step 7: Offer Next Spec or Show Completion¶
If next ready specs exist:
Use AskUserQuestion:
- Yes, activate SPEC-003 — delegate to /vt-c-activate SPEC-003
- No, show dashboard — run /vt-c-activate --status
If all specs completed: