Spec Update
Update spec files with proper change tracking: requirement IDs, changelog entries, and traceable commits.
Invocation
/vista:spec-update <feature-name> [topic-name]
Prerequisites
- •Feature must exist at
.vista/features/<name>/ - •Spec files must exist in
.vista/features/<name>/specs/(run/vista:specsfirst) - •Git repository (for commit prefix convention; gracefully skipped if unavailable)
Workflow
Step 1: Validate and Load
- •Verify
.vista/features/<feature>/exists. If not: error, suggest/vista:plan. - •If
topic-nameprovided, verifyspecs/{topic}.mdexists. If not: error, list available specs. - •If no
topic-name, list available spec files and ask which to update via AskUserQuestion. - •Read the target spec file and
domain-requirements.md. - •Check if spec has requirement IDs. If not, offer to retroactively assign them before proceeding.
Step 2: Determine Change
Ask the user via AskUserQuestion:
Question 1: What type of change?
- •Add -- New requirement discovered during implementation
- •Update -- Modify an existing requirement (wording, detail, scope)
- •Deprecate -- Mark a requirement as no longer applicable
Question 2: Describe the change. Free text: what specifically changed or needs to be added.
Question 3: Why? Free text: the reason (e.g., "edge case found during implementation", "user feedback", "architecture decision").
Step 3: Apply Changes
Reference: vista/skills/spec-update/references/conventions.md
Based on change type:
Add
- •Determine the next sequential ID for the category (parse existing IDs in the spec)
- •Add the requirement line in the correct section (Functional, Non-Functional, or Business Rule)
- •Add acceptance criteria for the new requirement
- •Add changelog row (newest first) with today's date, new ID, change description, reason
- •Add entry to Requirement Index with status
Active
Update
- •Modify the requirement text, keeping the same ID
- •Update related acceptance criteria if affected
- •Add changelog row with the existing ID, description of what changed, reason
Deprecate
- •Add
[DEPRECATED]marker to the requirement text, noting what replaces it (if applicable) - •Do NOT delete the requirement or reuse its ID
- •Update Requirement Index status to
Deprecated - •Add changelog row with the ID, "Deprecated" change, reason
Step 4: Commit
If git is available:
- •Stage the modified spec file
- •Commit with prefix:
spec(<feature>/<topic>): <description with IDs> - •Backfill the commit hash into the changelog entry
- •Stage and amend with the backfilled hash
If git is not available: warn and skip.
Step 5: Report
- •Show the changes made (requirement ID, text, changelog entry)
- •Grep the codebase for references to any affected requirement IDs
- •If code references exist, list them so the user knows what may need updating
- •Suggest next action if applicable (e.g., "update the code comment at src/service.py:42")
Retroactive ID Assignment
When a spec file has no requirement IDs (legacy or pre-convention):
- •Parse all numbered requirements in Functional, Non-Functional, Business Rule sections
- •Derive the feature prefix from the feature name
- •Assign sequential IDs to each requirement
- •Add a Changelog table with a single "Created (retroactive ID assignment)" entry
- •Add a Requirement Index at the end of the file
- •Commit with:
spec(<feature>/<topic>): retroactive requirement ID assignment
Conventions
All format details (ID format, changelog table, commit prefix, code traceability) are in:
vista/skills/spec-update/references/conventions.md