Memory reviewer writes Knowledge notes with no links or links to notes that do not exist; KnowledgeLint does not check links
What happens. skills/Cortex/SKILL.md says no Knowledge note ships without 2–4 typed related: links (Canonical Linking Requirement, add step 4) and that every related: slug must exist before saving (add step 7). The autonomic path does neither:
MemoryReviewer.tsasks the model forrelatedon ideas and knowledge items, but the prompt never lists existing notes, so the model has no slugs to choose from. It either returns none, andMemorySystem.tsrenderRelatedBlockwritesrelated: []("ready for future enrichment by the reviewer"), or it guesses a plausible slug that is not in the archive.MemorySystem.tsvalidates the shape of each link (slug and type strings) but not that the slug resolves to a note.KnowledgeLint.tsreports a note withrelated: []or with only dead links as fully conformant, so nothing surfaces the gap./knowledge developis the designed repair, but its only prompt is the weekly distill digest.
Measured on one install, 24.10.2026, v7.40.4 (main the same): 27 notes written by the reviewer in four weeks (25.09–23.10); 20 of them have no live link: 13 have related: [], 7 carry only links to slugs that do not exist. KnowledgeLint: 478/478 fully conformant.
Reproduce. Run the reviewer over a conversation that produces an idea item. The prompt (buildReviewerUserPrompt) contains no existing slug, and the written note has related: [] or a slug that ls MEMORY/KNOWLEDGE/*/<slug>.md does not find.
Possible fixes, any one helps:
- Pass the reviewer a short candidate list (for example
rankNotes(discoverNotes(), <exchange text>, { topN: 25 })fromMemoryRetriever.ts) and ask it to pick links from that list only. - In
MemorySystem.ts, droprelatedentries whose slug does not resolve, before writing. - In
KnowledgeLint.ts, report notes with zero liverelated:links and dead slugs as an enrichment gap, the same way missingsource_urlis reported.
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
Thanks @IvanLeontev-stack. You were right on each point: the reviewer asked for related links without showing it which notes exist, the writer checked only the shape of a slug, and KnowledgeLint never looked at links.
Fixed in source:
-
Writer. It now keeps only
relatedslugs that resolve to a real note in the archive. Dead ones are dropped and counted. -
Reviewer. It now gets a candidate list of existing Knowledge notes drawn from the current index, and is told to pick links only from that list or leave them empty. Your
rankNotes/discoverNotesAPI no longer exists, so this ports the idea rather than the code. -
KnowledgeLint. A note with no live links, or with dead slugs, now counts as a completeness gap. Envelope conformance is unchanged.
Heads-up: on an archive with many old notes that have related: [], the conformance percentage that KnowledgeLint reports will drop sharply after upgrading. That drop is the gap becoming visible, not a regression. Hooks that call validate() directly are unaffected.
This ships in the next release.