Commit Graph
2 Commits
Author SHA1 Message Date
Lum1104andClaude Opus 4.6 7e41ba7a68 fix: address Codex review — stable layout, scoped infra filter, basename dedup
P1: Separate force layout computation from visual state updates so
clicking/searching/touring doesn't re-randomize node positions. Layout
only recomputes when the graph data or filters change.

P1: Restrict infrastructure-file skipping (index.md, log.md, etc.) to
the wiki root level only. Nested files like concepts/index.md are now
correctly treated as content articles.

P2: Track ambiguous bare basenames in the wikilink resolution map.
Duplicate basenames (e.g., a/foo.md and b/foo.md) are removed from
the flat lookup so [[foo]] doesn't silently resolve to the wrong page.

Also fixed: edge IDs now use stable source-target-type keys instead of
array indices for proper React reconciliation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:21:24 +08:00
Lum1104andClaude Opus 4.6 2fc85e68c3 feat: add /understand-knowledge for Karpathy LLM wiki knowledge bases
Support the Karpathy LLM wiki pattern — a three-layer architecture
(raw sources + wiki markdown + schema) with wikilinks, index.md
categories, and append-only log.md.

Pipeline:
- parse-knowledge-base.py: deterministic extraction of articles,
  wikilinks, categories from index.md, source nodes from raw/
- article-analyzer agent: LLM-based entity/claim extraction and
  implicit relationship discovery (builds_on, contradicts, etc.)
- merge-knowledge-graph.py: combines scan + analysis with entity
  dedup, layer assignment from categories, tour generation

Dashboard:
- KnowledgeGraphView with d3-force layout (community clustering
  by index.md categories, degree-proportional sizing)
- 5 knowledge node types (article, entity, topic, claim, source)
- 6 knowledge edge types with visual styling
- KnowledgeNodeDetails sidebar (wikilinks, backlinks, preview)
- Auto-detect kind:"knowledge" → knowledge-only view mode

Core:
- 5 node types + 6 edge types added to NodeType/EdgeType unions
- KnowledgeMeta interface (wikilinks, backlinks, category, content)
- kind field on KnowledgeGraph for view mode detection
- Zod schemas + node/edge type aliases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:09:41 +08:00