Labels: bug, hook, drift
Body:
Problem
Running /graphify . (full rebuild) regenerates graph.json but leaves manifest.json untouched. The next /graphify --update then compares a stale manifest (from the prior save) against the current filesystem and reports ghosts / new files that are already reflected in the graph.
Reproducer:
- Run
/graphify . — produces graph.json with 5,812 nodes.
- 4 days later, with several deletes + new files in between, run
/graphify --update.
- Observe:
Pruned 0 ghost nodes from 13 deleted file(s) — the deleted files were already absent from graph.json because step 1's rebuild excluded them. The manifest just hadn't caught up.
Expected
detect() save its output as manifest.json at the end of every successful full rebuild (Step 9 of the skill's pipeline). Currently only detect_incremental() → save_manifest() persists; the full-rebuild path never calls save_manifest().
Suggested fix
In the skill's Step 9 for the /graphify <path> (non-incremental) path, add:
from graphify.detect import detect, save_manifest
full = detect(Path(input_path))
save_manifest(full['files'])
Or, move save_manifest() into the pipeline wrapper so both paths invoke it.
Workaround
Manually save the manifest at end of run:
from graphify.detect import detect, save_manifest
save_manifest(detect(Path('.'))['files'])
Labels: bug, hook, drift
Body:
Problem
Running
/graphify .(full rebuild) regeneratesgraph.jsonbut leavesmanifest.jsonuntouched. The next/graphify --updatethen compares a stale manifest (from the prior save) against the current filesystem and reports ghosts / new files that are already reflected in the graph.Reproducer:
/graphify .— producesgraph.jsonwith 5,812 nodes./graphify --update.Pruned 0 ghost nodes from 13 deleted file(s)— the deleted files were already absent fromgraph.jsonbecause step 1's rebuild excluded them. The manifest just hadn't caught up.Expected
detect()save its output asmanifest.jsonat the end of every successful full rebuild (Step 9 of the skill's pipeline). Currently onlydetect_incremental()→save_manifest()persists; the full-rebuild path never callssave_manifest().Suggested fix
In the skill's Step 9 for the
/graphify <path>(non-incremental) path, add:Or, move
save_manifest()into the pipeline wrapper so both paths invoke it.Workaround
Manually save the manifest at end of run: