Graph Health

Reach for this when the base is mostly true and still hard to search. Decay makes no noise, so we schedule the structure check rather than wait to notice it.

Nobody thinks their knowledge base is out of date, and nearly every one is. Decay makes no noise, so the check has to run on a schedule, and /graph-health measures the shape of the whole base: whether tags get reused, whether notes connect to each other, whether provisional notes ever got a decision, and whether links still point at something real.

The Six Measures

Measure Threshold Decision it returns
Tag sprawl, the share of tags used once Under 20% healthy, 20% to 40% warning, over 40% unhealthy Merge the variants or keep them
Orphans, notes with fewer than 3 links Each one Link or retire
Hubs, notes over 10 links Each one Split or leave
Provisional notes aged 31 to 60 days Each one Set a decision date
Provisional notes aged over 60 days Each one Promote or retire
Broken links Each one, after its target is opened Repair or de-link

Provisional notes are the ones with status emergent, and their age runs from the updated date, because copies and syncs reset file dates.

How The Score Works

The score starts at 100 and takes points off for each problem, and each class has a cap. Single-use tags cost 2 each, up to 10, and tags missing from your tag list cost 3 each, up to 15. Orphans cost 1 each, up to 10, and hubs cost 2 each, up to 10. Broken links cost 4 each, up to 20. Provisional notes cost 1 each at 31 to 60 days and 2 each over 60 days, each band capped at 10. Sprawl costs 2 in the warning band and 5 in the unhealthy band. Without a tag list, that line reads null and the score is marked partial.

The bands run 90 to 100 Excellent, 70 to 89 Good, 50 to 69 Fair, and under 50 Poor. Every line prints, zeros included.

Structure Score, Not Content Score

The score measures structure only: tags, links, provisional age and broken links, so it says nothing about whether an item is true. Content age and expiry belong to Dream's separate content count, which uses the same four bands, and we keep the two apart on purpose. A base can land in the Excellent band and still hold expired notes, and that's exactly the case the split is for, because the structure score then says the links are sound while Dream's count shows which notes went stale.

Hard Limits

It never edits an item, and it doesn't invent a link or a tag to clear a deduction. We open every broken link before reporting it, because a renamed item can look broken when it isn't.