Context
2026-04-04 Discord 對話,根據 Karpathy LLM Knowledge Bases 的 linting 概念 + Claude 官方 best practice,規劃適合此 vault 使用情境的 linter 實作方向。
核心定位
Karpathy 的 linting 是 “health check”,目標三件事:
- 找出 inconsistent / missing data
- 用 web search 補上缺失資料
- 發現新的 article candidate / connection
架構:兩層設計
Layer 1 — Python 結構檢查(deterministic,快速)
放在 scripts/lint-vault.py,不需要 LLM:
- Frontmatter 完整性:Clippings 缺 title/source/analyzed/source_hash;notes/ 缺 date/tags
- Tag taxonomy enforcement:對照 vault-codemap 白名單,找 typo 或過時 tag
- Broken wikilinks:掃所有
[[...]],找指向不存在檔案的連結 - Analyzed backlog:
analyzed: false且超過 N 天沒處理的 Clippings - Duplicate detection:用
source_hash找重複 clip - Orphan detection:notes/ 和 research/ 裡沒有任何 wikilink 指向的孤立知識
Layer 2 — LLM 語義檢查(semantic,較慢)
整合成 /lint-vault skill:
- Interest alignment check:找和 interest-map 對不上的低關聯文章;找新興主題 cluster
- Connection discovery:找多篇 Clippings 共同提到但未被串起的概念 → 新 article candidate
- Staleness check on interest-map.md:比對 ai/ 新文章 tags vs interest-map 分類
- Missing description imputation:description 為空時用 LLM 補一句話摘要
輸出格式
結果寫入 inbox/lint-YYYY-MM-DD.md:
## 🔴 需要修復(結構問題)
## 🟡 需要注意(知識健康)
## 🟢 建議探索(semantic 發現)
實作順序
scripts/lint-vault.py(Layer 1)/lint-vaultskill 包裝,加--semanticflag- cron 每週自動跑 + Discord notify
Connections
- Clippings-llm-knowledge-bases — Karpathy 原文(linting 概念來源)
- 2026-04-03-karpathy-llm-wiki-vault-improvements — 前次分析:vault 三層架構與 compounding loop