detect_incremental() treats generated graphify-out docs as source input and creates false semantic-refresh pressure
Draft: graphify incremental ingests generated outputs
Title
detect_incremental() treats generated graphify-out docs as source input and creates false semantic-refresh pressure
Body
Summary
detect_incremental() can treat generated graphify-out artifacts as source documents, especially:
graphify-out/wiki/*graphify-out/GRAPH_REPORT.md
Combined with the manifest baseline being saved from an early detect snapshot, this can make the next --update look like a large non-code delta even when the real source-doc delta is tiny.
That pushes the skill toward an unnecessary expensive semantic refresh.
Example
Observed in a real repo with:
- installed package:
graphifyy 0.4.23 - checked current release:
v0.4.32
After a previous full run, the next incremental detection reported:
new_total = 2485code files243document files
Breakdown of the 243 documents:
240weregraphify-out/wiki/*1wasgraphify-out/GRAPH_REPORT.md2were genuine new docs
After excluding generated outputs from corpus scans, the same incremental detection dropped to:
new_total = 75code files2real documents
So almost all of the detected doc delta was generated graphify output, not real corpus input.
Repro
- Run a full graph build inside a repository root.
- Generate normal outputs, especially
graphify-out/wiki/*andgraphify-out/GRAPH_REPORT.md. - Save the manifest from the original detect snapshot taken before later output-generation steps.
- Run
--update/detect_incremental()on the same root.
Observed behavior
detect_incremental()includes generatedgraphify-out/wiki/*markdown as document input.GRAPH_REPORT.mdcan also appear as changed because it is rewritten during rebuilds.- The skill gets pushed toward semantic re-extraction even though the true source-doc delta is small.
Expected behavior
- Generated graph outputs should not be treated as source corpus input by default.
- Incremental detection should react to real corpus changes, not to
graphify's own generated markdown artifacts.
Likely root cause
There seem to be two overlapping problems:
detect()/detect_incremental()do not exclude generated outputs like:graphify-out/wiki/**graphify-out/GRAPH_REPORT.md
- The skill saves
manifest.jsonfrom an early detect snapshot instead of a final post-output detect snapshot.
That means generated wiki/report files can be absent from the manifest baseline and show up as new source docs on the next incremental run.
Proposed fix
- Exclude generated outputs from default corpus detection:
graphify-out/wiki/**graphify-out/GRAPH_REPORT.md- likely also other generated human-readable outputs like
graph.html,graph.svg,cypher.txt
- Keep
graphify-out/memory/**included, since that appears to be an intentional feedback-loop input. - Save
manifest.jsonfrom a finaldetect()pass after outputs are written, not from the initial detect snapshot.
Related issues
- This is distinct from
#479, which is about--updatemerge/overwrite behavior. - It is adjacent to
#467, because outputs live under the processed root, but this report is specifically about incremental detection and false semantic-refresh pressure.
Fixed in v0.5.0. See https://github.com/safishamsi/graphify/discussions/528 for release notes.