"Mark an Arazzo scenario or recipe as deprecated -- sets x-version deprecation metadata (deprecatedAt, replacedBy, removalDate without bumping current), verifies the replacement exists, and warns about downstream consumers. Use when retiring a scenario or recipe in favor of a successor."
Install
npx skillscat add specfuse/authoring/deprecate-scenario Install via the SkillsCat registry.
Mark an Arazzo scenario or recipe as deprecated. Updates x-version with deprecation metadata and warns about downstream impacts.
Enforces: .specfuse/authoring/handbooks/Arazzo_Handbook.md
Input
Accept the target file. The user may provide:
- A full file path
- A domain and scenario/recipe name
If ambiguous, list matching files and ask the user to pick.
Process
Read the target file. Confirm it exists. Check current
x-version.status-- if already deprecated, report:"This file is already deprecated (since {deprecatedAt}, replaced by {replacedBy}). No changes needed."
Gather deprecation metadata. Ask:
- Replacement: "What scenario/recipe replaces this one? Provide the file stem (e.g.,
refund-v2). Leave blank if no replacement exists yet." - Removal date: "When should this deprecated file be removed? Provide an ISO date (e.g.,
2026-12-01), or leave blank for no target date."
- Replacement: "What scenario/recipe replaces this one? Provide the file stem (e.g.,
Verify the replacement exists (if provided). Scan for a file matching the
replacedByvalue:- Scenarios:
api/specs/v1/domains/*/scenarios/{replacedBy}.arazzo.yamlorapi/specs/v1/scenarios/cross-domain/{replacedBy}.arazzo.yaml - Recipes:
api/specs/v1/scenarios/setup-recipes/**/{replacedBy}.recipe.yaml
If not found, warn:
"The replacement '{replacedBy}' does not exist yet. Create it with
/design-scenario(or/design-recipe) before finalizing deprecation."- Scenarios:
Update
x-version. Apply these changes to the target file:x-version: current: {unchanged -- do not increment} status: deprecated deprecatedAt: "{today's ISO date}" replacedBy: "{value}" # if provided removalDate: "{value}" # if providedVersion bump rule: Deprecation sets
status: deprecatedbut does NOT incrementx-version.current. The content has not changed -- only the lifecycle status.Check for downstream consumers. Scan for files that depend on the deprecated file:
If the deprecated file is a recipe:
- Find all recipes that
extendsthis recipe (Grep for the recipe's file stem inx-recipe.extendsacross all recipe files) - Find all scenarios with
x-setup.recipematching this recipe's file stem
If the deprecated file is a scenario:
- Check if any other scenario references it (uncommon, but possible via cross-domain links)
- Find all recipes that
Warn about downstream impacts. If consumers exist, present them:
"The following files depend on the deprecated recipe '{name}':
basic-fulfilled-orders.recipe.yaml(extends this recipe)order-lifecycle.arazzo.yaml(uses as x-setup.recipe)order-context-sync.arazzo.yaml(uses as x-setup.recipe)
These files will need to be updated to reference the replacement once it exists. This command does not modify them automatically -- the decision is yours."
Validate. Run validation to confirm the deprecated file is still valid YAML with correct extension shapes:
./scripts/specfuse/validate-arazzo-spectral.shReport. Summarize what was changed:
"Deprecated: {file path}
- status: deprecated (was: {previous status})
- deprecatedAt: {date}
- replacedBy: {value or 'not set'}
- removalDate: {value or 'not set'}
- Downstream consumers: {count} files warned"
Checklist
- Target file identified and read
- Current status checked (not already deprecated)
-
deprecatedAtset to today's date -
replacedByset (if replacement provided and verified) -
removalDateset (if provided) -
x-version.currentNOT incremented (deprecation is lifecycle, not content) - Downstream consumers identified and warned
- Validation passed after changes