Files
automaton/tasks/project-migration/SPEC.md
T

1.4 KiB

SPEC: Project Migration Script for Additive Extension Model

Overview

After switching to the additive extension model, existing projects have stale copies of framework files in their {project}/.automaton/ directories. These need to be cleaned up.

Context

Under the old model, framework files (prompts, contracts, scripts) were copied into the project's .automaton/. Under the new model, the project should only contain .agent.md, .rules.md, and optionally an extensions/ directory. Everything else comes from ~/.automaton/.

Changes

1. scripts/migrate-project.sh

Script that takes a project path and:

  1. Scans {project}/.automaton/ for files that now live in ~/.automaton/
  2. For each matching file:
    • Identical to global → delete (framework provides them)
    • Different from global → move to .automaton/extensions/
  3. Preserves .agent.md and .rules.md as-is
  4. Reports what was deleted, moved, and kept

2. prompts/onboarding.md

Add a section at the top that checks if migration is needed:

  • If project has prompt/contract/script copies in .automaton/, offer to run migration

Acceptance Criteria

  • scripts/migrate-project.sh exists and is executable
  • Script correctly identifies identical vs customized files
  • Customized files are moved to extensions/, not deleted
  • .agent.md and .rules.md are never touched
  • Onboarding detects stale projects and offers migration