diff --git a/graphify/skill-copilot.md b/graphify/skill-copilot.md index 397669ae1..62992f977 100644 --- a/graphify/skill-copilot.md +++ b/graphify/skill-copilot.md @@ -819,7 +819,10 @@ deleted = set(incremental.get('deleted_files', [])) if deleted: to_remove = [n for n, d in G_existing.nodes(data=True) if d.get('source_file') in deleted] G_existing.remove_nodes_from(to_remove) - print(f'Pruned {len(to_remove)} ghost nodes from {len(deleted)} deleted file(s)') + if to_remove: + print(f'Pruned {len(to_remove)} ghost node(s) from {len(deleted)} deleted file(s) — drift detected and corrected.') + else: + print(f'{len(deleted)} file(s) deleted since last run, but no ghost nodes were present in the graph — no drift.') # Merge: new nodes/edges into existing graph G_existing.update(G_new) diff --git a/graphify/skill.md b/graphify/skill.md index dde2fc386..f04d71ff6 100644 --- a/graphify/skill.md +++ b/graphify/skill.md @@ -923,7 +923,10 @@ deleted = set(incremental.get('deleted_files', [])) if deleted: to_remove = [n for n, d in G_existing.nodes(data=True) if d.get('source_file') in deleted] G_existing.remove_nodes_from(to_remove) - print(f'Pruned {len(to_remove)} ghost nodes from {len(deleted)} deleted file(s)') + if to_remove: + print(f'Pruned {len(to_remove)} ghost node(s) from {len(deleted)} deleted file(s) — drift detected and corrected.') + else: + print(f'{len(deleted)} file(s) deleted since last run, but no ghost nodes were present in the graph — no drift.') # Merge: new nodes/edges into existing graph G_existing.update(G_new)