Receber por email
← Voltar para o catálogo

migrate

Manually invoke the adaptive-harness migration to update a project's .adaptive-harness directory to the current plugin version. Adds missing harnesses, updates config schema, and reports what changed.

8estrelas
Atualizado há 7 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add SeongwoongCho/adaptive-harness

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/migrate-seongwoongcho/svg)](https://www.skillteca.com.br/skills/migrate-seongwoongcho)

Skills relacionadas

Ver todas de Desenvolvimento →

Alerta por categoria

Receba novas skills de Desenvolvimento toda segunda

1 email curto, só com as skills novas de Desenvolvimento. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

adaptive-harness migrate

Run this skill whenever you need to manually migrate the project's .adaptive-harness state to match the current plugin version. Typically this is triggered automatically at session start, but you can also invoke it manually via /adaptive-harness:migrate.

When to Use

  • You updated the adaptive-harness plugin and want to apply migrations immediately
  • The session-start hook reported a migration notice but you want a detailed report
  • You suspect the project state is out of sync with the plugin version

Steps

1. Locate the migrate script

The migration script is at ${PLUGIN_ROOT}/hooks/migrate.sh. Discover PLUGIN_ROOT from .adaptive-harness/.plugin-root if set, or use the CLAUDE_PLUGIN_ROOT environment variable.

PLUGIN_ROOT=$(cat .adaptive-harness/.plugin-root 2>/dev/null || echo "${CLAUDE_PLUGIN_ROOT}")

2. Run migrate.sh

bash "${PLUGIN_ROOT}/hooks/migrate.sh"

This outputs a JSON summary to stdout. Capture it:

MIGRATE_OUTPUT=$(bash "${PLUGIN_ROOT}/hooks/migrate.sh")

3. Parse and report the JSON output

The JSON output has this structure:

{
  "status": "migrated",
  "migrated": true,
  "from_version": "0.9.0",
  "to_version": "1.0.0",
  "harnesses_added": ["new-harness-name", "another-harness"],
  "config_fields_added": ["evolution", "ensemble"],
  "changes": { ... }
}

Or when already up to date:

{
  "status": "up_to_date",
  "version": "1.0.0"
}

Or when migration was skipped:

{
  "status": "skipped",
  "reason": "ADAPTIVE_HARNESS_SKIP_MIGRATION=1"
}

4. Report to the user

After running, report in a concise format:

adaptive-harness migration complete.

Version: 0.9.0 → 1.0.0
Harnesses added: new-harness-name, another-harness
Config fields added: evolution, ensemble
Backup: .adaptive-harness/harness-pool.json.bak

If already up to date, report:

adaptive-harness is already up to date (version 1.0.0). No migration needed.

Escape Hatch

To skip migration entirely, set ADAPTIVE_HARNESS_SKIP_MIGRATION=1 before running the skill:

ADAPTIVE_HARNESS_SKIP_MIGRATION=1 bash "${PLUGIN_ROOT}/hooks/migrate.sh"

Notes

  • Migration is idempotent: running it multiple times with the same versions produces the same result
  • Existing harness weights and run history are always preserved during migration
  • Backup files (.bak) are created before any modifications
  • Config values set by the user (domain, ensemble mode, etc.) are never overwritten
Compartilhar X LinkedIn