add-module-migration

Creates version migrations that edit consumer application metadata during module install or update.

23|10|Updated Aug 31, 2017
One-click install
npx skills add https://github.com/IntentArchitect/Intent.Modules --skill add-module-migration-intentarchitect
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-module-migration
Source: https://github.com/IntentArchitect/Intent.Modules/tree/main/Tests/ModuleBuilderSkills/.opencode/skills/add-module-migration
Command: npx skills add https://github.com/IntentArchitect/Intent.Modules --skill add-module-migration-intentarchitect

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When an Intent Architect module changes its templates, stereotypes, or folder structure between versions, applications that installed an earlier version keep stale persisted metadata that nothing regenerates automatically. This Skill guides the creation of a Module Migration that programmatically edits the consumer application's own persisted metadata during install or update so it converges onto the shape a fresh install already gets. ## Core Features & Use Cases - Version Migration Elements: Models a Version Migration element under a Module Migrations container, named exactly with the target semver string, and scaffolds an IModuleMigration class via the Software Factory. - Direct Metadata Editing: Uses IPersistenceLoader from Intent.Persistence.SDK to load the consumer application, locate designers, packages, and elements by GUID or name, and remove or restructure stale elements. - Use Case: After flattening a module's File Template folder layout, add a Version Migration that finds the consumer's orphaned old Folder elements in its Codebase Structure designer, removes them and their nested subfolders recursively, and saves the package. ## Quick Start Add a version migration to my module that removes the stale folders left in consumer applications by the previous template layout.

Frequently Asked Questions about add-module-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a version migration to an Intent Architect module?▼

Increment the module's version first, then create a Version Migration element under the Module Migrations container named exactly with the target semver string. Run the Software Factory to scaffold the IModuleMigration class, then hand-author the constructor and Up/Down bodies.

How do I edit a consumer application's metadata during module install?▼

Add an IPersistenceLoader constructor parameter from the Intent.Persistence.SDK package, call LoadCurrentApplication, and locate designers, packages, and elements by their raw GUIDs or names. Modify or remove elements, then call package.Save() to persist changes.

When should I use a module migration instead of a file template?▼

Use a migration only when a module's own restructuring or shape change must fix metadata already persisted in consumer applications. Use file templates when generating new code output into a consumer, since templates do not repair stale installed metadata.

Why does adding Intent.Persistence.SDK cause an NU1605 downgrade error?▼

The Software Factory pins an old alpha version of Intent.Persistence.SDK that conflicts with the transitive floor from Intent.Modules.Common. Manually bump the .csproj package reference to a current stable version to resolve the downgrade error.

Should a version migration skip cleanup if a folder still has children?▼

No. Gating removal on whether a folder is empty is fragile because migration timing relative to template output relocation is unreliable. Identify the specific obsolete element directly and remove it and everything nested under it unconditionally.