.agents/skills/work-issue-migrations/SKILL.md

Define update migrations

Read the entry point's shared rules.

Input: issue and comments, proposed solution, current/target plugin versions, compatibility impact, and available historical formats. Missing product decisions return to definition; do not invent compatibility or approval.

  1. Inspect the affected prior releases and existing docs/migrations/ instructions. Identify which records, configuration, paths and workflow contracts change, and whether migration is needed. An internal-only change or compatible update may need no migration; record the evidence and reason in the solution/PR instead of creating an issue-level migration. The release still writes one step for its version, a checkpoint-only one when nothing changes, as work-issue-release describes.
  2. For a release integrated through a release branch, write a single plan per release, docs/migrations/<version>-release.md with migration_id: release-<version with dots as hyphens> (for example release-0-5-0), from the release work rather than from individual issues. Other descriptors follow the name rule below. Use the migration template and descriptor schema to author docs/migrations/<target-version>-<migration-id>.md. Declare only the target version and target layout, alongside descriptor schema version and migration ID; do not define source selectors or prerequisite-ID graphs. Projects behind several versions follow all intervening release instructions in ascending semantic-version order, verifying each target before continuing. Use the last verified project checkpoint, not the installed plugin version, as the starting point; reconstruct unknown progress read-only. Keep the consumer migrate command generic: it reads the release index and descriptors, while target-specific behavior belongs in those documents.
  3. Define read-only applicability/inventory, per-project preview and approval gates, external backup, ordered changes, preserved evidence, verification, interrupted/repeat-run behavior, and non-destructive recovery. Separate storage moves from schema/approval changes and product cleanup. Define skip/already-applied outcomes without writes; missing evidence or conflicting destinations must stop rather than overwrite.
  4. Link the descriptor from docs/updating.md in target-version order. Declare any release's no-migration decision explicitly as an indexed descriptor that writes only its checkpoint, never as prose alone in the index; do not treat missing instructions as permission to skip it. State within-release ordering when multiple descriptors share a target. Keep release-specific instructions in descriptors, rather than duplicating them in skills. Present the migration with the proposed solution for developer approval before implementing the release. Authoring instructions does not authorize executing them in a consumer project, committing, pushing or merging.
  5. During implementation, verify supported historical fixtures or isolated copies, including conflicts, partial progress, repeats and recovery. Record actual commands/results and limitations in the PR; do not claim template completeness proves upgrade safety. Include the descriptor in independent review with its implementation.

Handoff: descriptor path/ID, target version/layout, position in the sequential upgrade, approval or unresolved decisions, and verification plan/evidence. Return to definition for solution approval, or implementation when the solution and migration are already approved. This internal stage authors instructions; the separate shipped migrate command applies them only after project-specific approval.

Original Markdown, including metadata
---
name: work-issue-migrations
description: Define version-scoped migration instructions for an internal factory issue using the migration template. Use when an update changes existing project records or workflow contracts; not to execute migrations in consumer projects.
---

# Define update migrations

Read the [entry point's shared rules](../work-issue/SKILL.md).

**Input:** issue and comments, proposed solution, current/target plugin versions, compatibility impact, and available historical formats. Missing product decisions return to definition; do not invent compatibility or approval.

1. Inspect the affected prior releases and existing `docs/migrations/` instructions. Identify which records, configuration, paths and workflow contracts change, and whether migration is needed. An internal-only change or compatible update may need no migration; record the evidence and reason in the solution/PR instead of creating an issue-level migration. The release still writes one step for its version, a checkpoint-only one when nothing changes, as [work-issue-release](../work-issue-release/SKILL.md) describes.
2. For a release integrated through a release branch, write a single plan per release, `docs/migrations/<version>-release.md` with `migration_id: release-<version with dots as hyphens>` (for example `release-0-5-0`), from the release work rather than from individual issues. Other descriptors follow the name rule below. Use the [migration template and descriptor schema](migration-template.md) to author `docs/migrations/<target-version>-<migration-id>.md`. Declare only the target version and target layout, alongside descriptor schema version and migration ID; do not define source selectors or prerequisite-ID graphs. Projects behind several versions follow all intervening release instructions in ascending semantic-version order, verifying each target before continuing. Use the last verified project checkpoint, not the installed plugin version, as the starting point; reconstruct unknown progress read-only. Keep the consumer [migrate command](../../../skills/migrate/SKILL.md) generic: it reads the release index and descriptors, while target-specific behavior belongs in those documents.
3. Define read-only applicability/inventory, per-project preview and approval gates, external backup, ordered changes, preserved evidence, verification, interrupted/repeat-run behavior, and non-destructive recovery. Separate storage moves from schema/approval changes and product cleanup. Define skip/already-applied outcomes without writes; missing evidence or conflicting destinations must stop rather than overwrite.
4. Link the descriptor from `docs/updating.md` in target-version order. Declare any release's no-migration decision explicitly as an indexed descriptor that writes only its checkpoint, never as prose alone in the index; do not treat missing instructions as permission to skip it. State within-release ordering when multiple descriptors share a target. Keep release-specific instructions in descriptors, rather than duplicating them in skills. Present the migration with the proposed solution for developer approval before implementing the release. Authoring instructions does not authorize executing them in a consumer project, committing, pushing or merging.
5. During implementation, verify supported historical fixtures or isolated copies, including conflicts, partial progress, repeats and recovery. Record actual commands/results and limitations in the PR; do not claim template completeness proves upgrade safety. Include the descriptor in independent review with its implementation.

**Handoff:** descriptor path/ID, target version/layout, position in the sequential upgrade, approval or unresolved decisions, and verification plan/evidence. Return to definition for solution approval, or implementation when the solution and migration are already approved. This internal stage authors instructions; the separate shipped `migrate` command applies them only after project-specific approval.