Skip to main content

migrate

Migrate legacy modules to v2.2 format.

Recommended (unambiguous) usage:

  • npx cogn@2.2.12 migrate ...

Syntax

npx cogn@2.2.12 migrate <module> [--dry-run] [--no-backup]
npx cogn@2.2.12 migrate --all [--dry-run] [--no-backup]

Options

OptionDescription
--dry-runPreview changes without modifying files
--no-backupSkip backup before migration
--allMigrate all modules in search paths

What It Does

  • v1 (MODULE.md) → v2.2: creates module.yaml + prompt.md, keeps legacy file
  • v2.1 → v2.2: adds tier/overflow/enums/compat and meta schema

Examples

# Preview
npx cogn@2.2.12 migrate code-reviewer --dry-run

# Execute
npx cogn@2.2.12 migrate code-reviewer

# Migrate all
npx cogn@2.2.12 migrate --all --dry-run

Post-Migration

npx cogn@2.2.12 validate code-reviewer --v22
npx cogn@2.2.12 run code-reviewer --args "test code" --pretty