From d49dc88e613e4a97eb455b3f873fbded9286647e Mon Sep 17 00:00:00 2001 From: laptran Date: Sat, 13 Jun 2026 21:39:29 -0400 Subject: [PATCH] Integrate migration detection into update.sh update.sh now checks the current project after pulling latest changes. If it detects stale prompt/contract/script copies or tasks at the deprecated root-level location, it prompts the user to run migration. No more needing to know about migrate-project.sh separately. --- scripts/update.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/scripts/update.sh b/scripts/update.sh index f728ec3..90a4d68 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -22,5 +22,30 @@ fi # Fetch and pull latest changes git pull origin main +echo "" +echo "Framework updated to $(git rev-parse --short HEAD)." + +# Check current project for stale files or deprecated task location +if [ -d ".automaton" ] && [ "$PWD" != "$FRAMEWORK_DIR" ]; then + NEEDS_MIGRATION=false + # Check for stale prompt/contract/script copies + for dir in prompts contracts scripts; do + if [ -d ".automaton/$dir" ]; then + NEEDS_MIGRATION=true + break + fi + done + # Check for tasks at project root (deprecated location) + if [ -d "tasks" ] && [ -d ".automaton" ] && [ ! -e ".automaton/tasks" ]; then + NEEDS_MIGRATION=true + fi + if $NEEDS_MIGRATION; then + echo "" + echo "⚠️ This project has deprecated file locations." + echo " Run migration: bash $FRAMEWORK_DIR/scripts/migrate-project.sh \"$PWD\"" + echo " Or tell the agent: 'Upgrade automaton for this project'" + fi +fi + echo "" echo "Update complete."