Make Claude Code the primary interface — no API key needed
Add .claude/commands/ slash commands (/wiki-ingest, /wiki-query, /wiki-lint, /wiki-graph) so the wiki works directly inside Claude Code without any Python or API key. CLAUDE.md updated to lead with Claude Code usage. Python tools remain as optional standalone scripts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
18
.claude/commands/wiki-graph.md
Normal file
18
.claude/commands/wiki-graph.md
Normal file
@@ -0,0 +1,18 @@
|
||||
Build the LLM Wiki knowledge graph.
|
||||
|
||||
Usage: /wiki-graph
|
||||
|
||||
First try running: python tools/build_graph.py --open
|
||||
|
||||
If that fails (missing dependencies), build the graph manually:
|
||||
|
||||
1. Use Grep to find all [[wikilinks]] across every file in wiki/
|
||||
2. Build a nodes list: one node per wiki page, with id=relative-path, label=title, type from frontmatter
|
||||
3. Build an edges list: one edge per [[wikilink]], tagged EXTRACTED
|
||||
4. Infer additional implicit relationships between pages not captured by wikilinks — tag these INFERRED with a confidence score (0.0–1.0); tag low-confidence ones AMBIGUOUS
|
||||
5. Write graph/graph.json with {nodes, edges, built: today}
|
||||
6. Write graph/graph.html as a self-contained vis.js page (nodes colored by type, edges colored by type, interactive, searchable)
|
||||
|
||||
After building, summarize: node count, edge count, breakdown by type, and the most connected nodes (hubs).
|
||||
|
||||
Append to wiki/log.md: ## [today's date] graph | Knowledge graph rebuilt
|
||||
Reference in New Issue
Block a user