diff --git a/understand-anything-plugin/skills/understand/SKILL.md b/understand-anything-plugin/skills/understand/SKILL.md index b66dcc2..610a9dd 100644 --- a/understand-anything-plugin/skills/understand/SKILL.md +++ b/understand-anything-plugin/skills/understand/SKILL.md @@ -770,9 +770,16 @@ Report to the user: `[Phase 7/7] Saving knowledge graph...` } ``` -4. Clean up intermediate files: +4. Clean up intermediate files, **preserving `scan-result.json`** so future incremental runs can skip Phase 1 SCAN (see issue #293): ```bash - rm -rf $PROJECT_ROOT/.understand-anything/intermediate + # Preserve scan-result.json — Phase 1's deterministic file inventory. + # Future incremental runs (Phase 2 compute-batches.mjs --changed-files=…) + # need this inventory; without it, Phase 1 must re-dispatch and pay ~157k + # tokens / ~158s per incremental run. + INTER="$PROJECT_ROOT/.understand-anything/intermediate" + if [ -d "$INTER" ]; then + find "$INTER" -mindepth 1 -maxdepth 1 -not -name 'scan-result.json' -exec rm -rf {} + + fi rm -rf $PROJECT_ROOT/.understand-anything/tmp ```