Fix task directory gap in upgrade process
The additive extension model refactor moved prompts/contracts/scripts into .automaton/ but never addressed where tasks live. Two conventions existed: framework keeps tasks in .automaton/tasks/, Orchestrator creates project tasks at tasks/. Fixes: - Dashboard _find_tasks_dir() now scope-aware: framework mode prefers .automaton/tasks/, project mode prefers tasks/ at project root - migrate-project.sh: if tasks exist in .automaton/tasks/ (old model), move them to tasks/ (project root) - Orchestrator prompt: documents that tasks location depends on scope
This commit is contained in:
@@ -107,6 +107,18 @@ while IFS= read -r -d '' project_file; do
|
||||
fi
|
||||
done < <(find "$PROJECT_AUTOMATON" -maxdepth 1 -type f -name "*.md" -o -name "*.sh" -print0 2>/dev/null || true)
|
||||
|
||||
# Task directory — old model stored tasks in .automaton/tasks/, new model uses tasks/
|
||||
OLD_TASKS="$PROJECT_AUTOMATON/tasks"
|
||||
NEW_TASKS="$PROJECT_DIR/tasks"
|
||||
if [ -d "$OLD_TASKS" ] && [ ! -e "$NEW_TASKS" ]; then
|
||||
echo " MOVING .automaton/tasks/ → tasks/ (tasks should be at project root)"
|
||||
mv "$OLD_TASKS" "$NEW_TASKS"
|
||||
MOVED+=(".automaton/tasks/ -> tasks/")
|
||||
elif [ -d "$OLD_TASKS" ] && [ -d "$NEW_TASKS" ]; then
|
||||
echo " NOTICE Both .automaton/tasks/ and tasks/ exist — keeping both"
|
||||
KEPT+=(".automaton/tasks/ and tasks/")
|
||||
fi
|
||||
|
||||
# Report
|
||||
echo ""
|
||||
echo "=== Migration Summary ==="
|
||||
|
||||
Reference in New Issue
Block a user