Skip to content

[P3-T02] forge migrate command for v0.2.x → v0.4 upgrade #144

@firatcand

Description

@firatcand

Forge task ID: P3-T02
Phase: 3 — Launch v0.4 · Type: backend · Owner: backend-dev · Priority: P0 · Estimate: M
Depends on: P2.5-T01 (#127), P2.5-T05 (#131)

src/cli/migrate.ts: detects v0.2.x drift signatures:

  • @inherit lines in DESIGN.md
  • /push-to-linear refs (renamed in v0.3)
  • Missing .forge/settings.yaml
  • References to dropped verbs in custom skills if any (forge orchestrate next, suggest-next, session-check, intent-detect)

Generates proposed diff with chalk preview. Updates SettingsSchema (adds codex/decisions/doctor blocks); rewrites skill call sites for renamed verbs (nextclaim, suggest-next refs → phases --ready); archives any orphan workflow state files; adds templates/adr.template.md if missing. Backs up to .forge/backup-<timestamp>/. Applies on accept.

Acceptance:

  • Detects all v0.2.x drift signatures on a fixture project
  • Migration rewrites settings.yaml to include codex/decisions/doctor blocks
  • Migration rewrites skill call sites for renamed verbs
  • Backup directory contains pristine pre-migration originals
  • Aborts cleanly on user reject; no partial state
  • Re-runnable safely (idempotent)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions