1.4 KiB
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:
- Scans
{project}/.automaton/for files that now live in~/.automaton/ - For each matching file:
- Identical to global → delete (framework provides them)
- Different from global → move to
.automaton/extensions/
- Preserves
.agent.mdand.rules.mdas-is - 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.shexists and is executable- Script correctly identifies identical vs customized files
- Customized files are moved to
extensions/, not deleted .agent.mdand.rules.mdare never touched- Onboarding detects stale projects and offers migration