mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-28 02:01:37 +00:00
Completes the source_file convention fix begun in #1344 (build_merge replace-on-re-extract) and #1361 (pass root= to build_merge in the --update runbook). Two gaps still let the full build and incremental --update emit different source_file bases for the same file, so the source_file-keyed replace missed and duplicates accumulated: 1. extraction-spec(.md/-compact.md): the subagent's source_file slot was an unpinned "relative/path", so it invented a base per run (and the node id, derived from the same path, drifted too). Pin it to the verbatim FILE_LIST path so _norm_source_file(root) canonicalizes every run identically. 2. core.md: the full build called build_from_json WITHOUT root=, so #1361's update-side root= had no matching base on the full-build side. Pass root='INPUT_PATH' at both sites (Step 4 export, Step 5 report) so the full build and --update relativize to the same base. update.md prune_sources = deleted only. Changed files are replaced by build_merge (#1344); once root= aligns the bases, leaving `changed` in prune_sources would delete the freshly re-extracted nodes. Engine (build.py) unchanged. Regenerated all skill artifacts via tools/skillgen/gen.py. Adds test_build_merge_root_collapses_convention_drift. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>