You are helping the user update their wrangler project to the latest version.
Generates step-by-step migration instructions for upgrading wrangler projects to the latest version.
/plugin marketplace add samjhecht/wrangler/plugin install wrangler@samjhecht-pluginsYou are helping the user update their wrangler project to the latest version.
Generate clear, step-by-step migration instructions for upgrading a wrangler project from its current version to the latest version. The instructions should be optimized for AI execution (not bash scripts).
Read project version:
.wrangler/governance/CONSTITUTION.md frontmatter for wranglerVersion fieldspecifications/_CONSTITUTION.mdwranglerVersion field missing, assume v1.0.0 (pre-versioning era)Read current version:
skills/.wrangler-releases/CURRENT_VERSION from wrangler plugin directoryCompare versions:
List version gap:
Load release notes:
skills/.wrangler-releases/{version}.mdversion: Version numberreleaseDate: Release datebreakingChanges: true/falsemigrationRequired: true/falseFilter to breaking changes:
breakingChanges: trueCreate a comprehensive migration plan with:
Important: Instructions should be written for an AI assistant to execute, NOT bash scripts for humans to run.
Generate output in this format:
Your project is currently at v{project}. Latest wrangler version is v{current}.
Status: {X} releases behind
{if breaking changes detected}
The following versions contain breaking changes:
{for each breaking version}
MIGRATION REQUIRED - These changes will affect your project structure and governance files.
{for each breaking change version in order}
Released: {releaseDate}
{Extract "Breaking Changes" section from release note - list major items}
{Extract "Migration Requirements" or "Manual Migration Steps" section from release note}
Follow these steps in order:
After completing this migration step, verify:
{Suggest specific commands or checks, e.g., "Run /wrangler:verify-governance"}
If this migration step fails:
# Restore from git
git reset --hard HEAD~1
# Set skip flags
export WRANGLER_SKIP_VERSION_CHECK=true
Then report the issue with error details.
{end for each version}
After all migration steps complete:
Verify constitution version:
.wrangler/governance/CONSTITUTION.md frontmatterwranglerVersion: "{current}"Run governance verification:
/wrangler:verify-governanceRun startup skill:
Commit migration:
git add .wrangler/
git commit -m "Migrate to wrangler v{current}"
Back up your work:
git commit -am "Pre-migration backup before v{current} update"
Restore previous state:
# Undo all migration changes
git reset --hard HEAD~1
Skip version check temporarily:
export WRANGLER_SKIP_VERSION_CHECK=true
Report issue:
tree .wrangler/ or ls -R .wrangler/)WRANGLER_DEBUG_VERSION=true{end if breaking changes}
{if NO breaking changes}
Your project (v{project}) can be updated to v{current}.
Good news: These are non-breaking enhancements. Migration is optional.
{for each version in gap}
Changes: {Extract "New Features" or "Features" section from release note - summarize key items}
Affected Skills: {Extract "Affected Skills" section - list changed skills}
{end for}
While these updates are non-breaking, we recommend updating to get the latest features:
Read the full release notes for versions you're missing: {for each version in gap}
skills/.wrangler-releases/{version}.md
{end for}Edit .wrangler/governance/CONSTITUTION.md (or specifications/_CONSTITUTION.md if legacy):
Update frontmatter:
---
wranglerVersion: "{current}"
lastUpdated: "{today's date}"
---
Check if any new skills are relevant to your project: {List new skills from release notes}
Run startup skill again:
git add .wrangler/governance/CONSTITUTION.md
git commit -m "Update to wrangler v{current} (non-breaking)"
{end if no breaking changes}
{if breaking changes} I'm ready to help you execute this migration. Would you like me to:
WRANGLER_SKIP_VERSION_CHECK=true and continue with current versionWhich would you prefer? {end if}
{if no breaking changes} Since these are non-breaking updates, you can:
Which would you prefer? {end if}
Skip version checks:
export WRANGLER_SKIP_VERSION_CHECK=true
Skip automatic migration:
export WRANGLER_SKIP_MIGRATION=true
Enable debug output:
export WRANGLER_DEBUG_VERSION=true
docs/MCP-USAGE.md for MCP features.claude-plugin/plugin.json for plugin configurationNote: This command provides instructions only. I (the AI) will help you execute the migration, but you'll need to verify each step succeeds before proceeding.