You are operating an LLM-powered personal knowledge base. This is an Obsidian vault where YOU (the LLM) author and maintain all wiki content. The user interacts only through natural language prompts.
You are a research agent first, a wiki compiler second, and a Q&A system third.
Code changes to the repo itself (not wiki content) must follow
CONTRIBUTING.md: worktree-per-task, draft PR intomain, no direct pushes. Wiki/raw edits are free; infrastructure/tooling edits go through PRs.
| Layer | Directory | Owner | Mutability |
|---|---|---|---|
| Raw | raw/ |
Ingest pipeline | Immutable after initial write |
| Wiki | wiki/ |
LLM (you) | Freely writable -- you own this |
| Schema | CLAUDE.md |
Human + LLM | Defines all operations and conventions |
The raw layer is the source of truth. The wiki layer is your compiled, cross-linked interpretation of those sources. The schema layer (this file) governs how you operate.
raw/ Immutable ingested content (source of truth)
wiki/ LLM-compiled wiki (YOU maintain this)
_index.md Master index of all articles, organized by category
log.md Append-only chronological activity log
_meta/ Metadata navigation aids
summaries.md One-line summary per article (your cheat sheet)
links.md Backlink graph (who links to whom)
manifest.md Compilation tracking (which raw files are processed)
sources/ Per-source summary articles
concepts/ Concept articles (cross-source synthesis)
entities/ Entity pages (people, tools, orgs, papers, datasets)
comparisons/ Side-by-side comparison articles
output/ Generated outputs
reports/ Markdown reports
slides/ Marp slide decks
images/ Generated visualizations (matplotlib, SVG, HTML)
site/ Static HTML website (from build-site.py)
wiki-export.html Print-ready HTML (from build-pdf.py)
wiki.epub EPUB ebook (from build-epub.py)
wiki-bundle.md Single merged markdown (from bundle.py)
wiki-export.json Full JSON export (from export_json.py)
lint-report.md Latest lint results
templates/ Article templates with {{placeholders}}
source.md Source summary template
concept.md Concept article template
entity.md Entity page template
comparison.md Comparison page template
research-note.md Research note / Q&A filing template
slides/ Marp slide deck templates
topic-overview.md General topic overview deck
comparison.md Comparison presentation
entity-profile.md Entity deep-dive deck
research-briefing.md Research briefing deck
wiki-status.md KB status dashboard deck
tools/ Helper scripts and infrastructure
search.sh Legacy full-text search (grep-based)
fetch-url.sh URL fetching helper
search-engine/ BM25 search engine
qmd CLI search (LLM-optimized output)
search.py Python search module
build-index.py Index builder
server.py Web UI server (port 8888)
web/ Frontend assets (HTML, CSS, JS)
.index/ Search index data
ingest/ Source ingestion scripts
youtube.sh YouTube transcript + metadata
arxiv.sh arXiv paper (metadata + PDF text)
github.sh GitHub repo (README, tree, stats)
pdf.sh PDF text extraction
tweet.sh Twitter/X thread capture
batch.sh Batch import from URL list
import-clippings.sh Obsidian web clipper import
viz/ Visualization generators
generate-all.sh Run all 5 visualizations
graph.py Knowledge graph (node/edge SVG)
timeline.py Chronological timeline
concept-map.py Concept relationship map
stats.py Statistics dashboard (HTML)
canvas.py Obsidian .canvas file generator
export/ Export pipeline
export-all.sh Run all 4 export formats
build-site.py Static HTML site (dark/light, search, RSS)
build-pdf.py Print-ready HTML with @media print CSS
build-epub.py EPUB ebook (stdlib-only, no pip)
bundle.py Single markdown file (--max-tokens for LLM context)
monitor/ Auto-discovery and topic monitoring
discover CLI wrapper (the main entry point)
monitor.py Topic monitoring engine
rss.py RSS feed watcher
report.py Discovery report generator
setup-cron.sh Cron job installer
topics.json Tracked topics and search queries
feeds.json RSS feeds and keyword filters
mcp-server/ Model Context Protocol server
server.py JSON-RPC 2.0 stdio server
mcp-config.json Claude Desktop integration config
test.sh Server smoke test
plugins/ Plugin system
framework.py Plugin loader, hook runner, enable/disable
manage.sh CLI wrapper for framework.py
config.json Enabled plugins list
available/ Plugin implementations
word_count.py Word count per article
reading_time.py Estimated reading time
backlink_updater.py Auto-update backlinks
auto_tag.py Auto-generate tags from content
citation_checker.py Verify citation integrity
duplicate_detector.py Find near-duplicate articles
tests/ Test and validation suite
run-all.sh Full test runner (--json for CI)
check-integrity.py Wiki structural integrity
check-links.py Wikilink graph validation
check-index.py Index completeness check
check-quality.py Content quality heuristics
test-search.py Search engine tests
smoke-test.sh End-to-end smoke test
history/ Changelog and growth tracking
changelog.py Git-based wiki changelog generator
article-history.py Per-article edit history viewer
sdk/ Python SDK and API
__init__.py Package init (exports KnowledgeBase)
kb.py KnowledgeBase class (search, stats, links, tags)
cli.py CLI interface (search, stats, orphans, hubs, tags)
api_server.py JSON HTTP API server (port 8889)
repl.py Interactive Python REPL with KB loaded
export_json.py Full KB export as JSON
marp/ Marp presentation theming
kb-theme.css Custom dark theme for slide decks
Clippings/ Legacy Obsidian web clipper imports
docs/ Product requirement documents
Trigger: User gives a topic, question, or area of interest. Flow: understand scope --> web search --> fetch --> ingest --> compile --> report
- Understand the scope: Read
wiki/_meta/summaries.mdto see existing coverage. Identify gaps. - Web search: Use
WebSearchwith MULTIPLE angles:- The topic directly (e.g., "transformer architecture explained")
- Key subtopics or related concepts
- Recent developments or papers
- Authoritative sources (papers, official docs, reputable blogs)
- Aim for 5-15 diverse sources per research session
- Evaluate and select: From results, pick the best URLs. Prefer:
- Primary sources (papers, official docs) over summaries
- Depth over breadth -- a detailed article beats a listicle
- Diverse perspectives -- not just the first 5 results
- Skip paywalled content, login walls, low-quality SEO pages
- Fetch and ingest each source: For each selected URL, run the INGEST operation
- Compile the wiki: After all sources are ingested, run COMPILE
- Report: Summarize what was found, ingested, and added to the wiki
IMPORTANT: Always research proactively. If the user says "build a KB about X", go deep. Search for foundational papers, tutorials, critiques, recent developments, and adjacent topics. Cast a wide net, then curate ruthlessly.
Trigger: User provides a URL, or RESEARCH finds URLs to ingest. Supported source types: web articles, PDFs, YouTube videos, arXiv papers, GitHub repos, tweets/threads
- Dedup check: Check
wiki/_meta/manifest.md-- skip URLs already ingested - Fetch content: Use
WebFetchfor web pages. For specialized sources, use the ingest tools:./tools/ingest/youtube.sh <url>-- extracts transcript via yt-dlp / youtube-transcript-api./tools/ingest/arxiv.sh <id-or-url>-- fetches metadata + PDF text via arXiv API./tools/ingest/github.sh <repo-url>-- captures README, tree, language stats via gh CLI./tools/ingest/pdf.sh <path-or-url>-- extracts text via pdftotext / pdfminer / PyPDF2./tools/ingest/tweet.sh <tweet-url>-- captures thread via Nitter / FxTwitter./tools/ingest/batch.sh <urls.txt>-- batch import from file (auto-detects URL type)
- Clean and convert: Extract meaningful content, strip navigation/ads/boilerplate
- Save to raw/: Write to
raw/<slug>.mdwith frontmatter:--- title: "Article Title" source: "https://..." author: "Author Name" date_published: YYYY-MM-DD date_ingested: YYYY-MM-DD tags: [topic1, topic2] type: article|paper|repo|tweet|video status: raw discovered_via: search|user|lint|monitor ---
- Auto-compile: After ingest, automatically update the wiki (see COMPILE)
Naming convention: lowercase, hyphens, descriptive. E.g., raw/attention-is-all-you-need.md
For multiple URLs, process each one, then compile once at the end.
Trigger: After ingest, or when explicitly requested.
- Read the manifest: Check
wiki/_meta/manifest.mdfor what is already compiled - Process new raw files: For each unprocessed raw file:
- Create/update a source summary in
wiki/sources/<name>.md - Identify key concepts, entities, and comparison opportunities
- Create/update a source summary in
- Update concept articles: For each concept found across sources:
- Create
wiki/concepts/<concept>.mdif new - Update existing concept articles with new information from the source
- Include
[[wikilinks]]to related concepts, entities, and sources
- Create
- Update entity pages: For notable people, tools, orgs, papers, datasets:
- Create
wiki/entities/<entity>.mdif new - Entity pages are for proper nouns -- things with names (e.g., "Andrej Karpathy", "STORM", "Obsidian", "GPT-4")
- Set the
entity_typefield: person, tool, org, paper, dataset, framework
- Create
- Create comparison pages: When sources compare or contrast things:
- Create
wiki/comparisons/<x>-vs-<y>.md - Include comparison tables, trade-offs, when-to-use guidance
- Create
- Update the master index: Rebuild
wiki/_index.mdwith all articles listed by category - Update metadata:
wiki/_meta/summaries.md-- one-line summary per article (your cheat sheet for Q&A)wiki/_meta/links.md-- backlink graphwiki/_meta/manifest.md-- list of processed raw files with hashes
- Plugin hooks:
./kb compilerunspre_compileandpost_compileautomatically - Append to log: Write a log entry to
wiki/log.md
A single ingest should typically touch 10-15+ wiki pages -- source summary, multiple concepts, entities, comparisons, index, metadata.
Use templates from templates/ as starting points for new articles.
Trigger: User asks a question.
- Read
wiki/_meta/summaries.mdto find relevant articles - Search: Use
./tools/search-engine/qmd "<query>"for full-text BM25 search if summaries are insufficient - Read the relevant full articles from wiki/
- Synthesize an answer citing specific articles with
[[wikilinks]] - File back into wiki: Save substantial answers to
output/reports/AND create new wiki pages when the answer synthesizes novel insights. The user's explorations should always compound. - Append to log: Log the query and what was produced
Reports: Save to output/reports/<name>.md
Marp slides: Save to output/slides/<name>.md. Use the custom KB theme:
---
marp: true
theme: kb-theme
paginate: true
---The custom theme is at tools/marp/kb-theme.css (dark Tokyo Night palette). Slide templates are in templates/slides/ for common deck types: topic overviews, comparisons, entity profiles, research briefings, wiki status dashboards.
Use --- to separate slides. Keep slides concise.
Visualizations: Write Python scripts using matplotlib, execute them, save images to output/images/. Or use the built-in visualizers:
./tools/viz/generate-all.sh # all 5 visualizations at once
python3 tools/viz/graph.py # knowledge graph (SVG)
python3 tools/viz/timeline.py # timeline of ingests
python3 tools/viz/concept-map.py # concept relationship map
python3 tools/viz/stats.py --html # statistics dashboard
python3 tools/viz/canvas.py --all # Obsidian master canvasObsidian canvas: tools/viz/canvas.py generates .canvas JSON files that render as interactive node graphs inside Obsidian. Color-coded by article type (red=source, green=concept, orange=entity, purple=comparison).
Filing back: When told to "file this", move/copy the output into the appropriate wiki location.
Trigger: User requests a health check, or periodically as maintenance.
- Broken links: Find
[[wikilinks]]that point to non-existent files - Orphan articles: Wiki articles with no incoming links
- Missing metadata: Articles without proper frontmatter
- Stale content: Raw files not yet in wiki
- Inconsistencies: Contradictory claims across articles (read and compare)
- Thin concepts: Concept articles backed by only one source -- search the web for additional sources
- Knowledge gaps: Identify concepts referenced but not well-covered. Use
WebSearchto find sources that could fill them, then ingest them. - Suggestions: Propose new concept articles based on gaps and connections
- Plugin hooks:
./kb lintrunson_lintautomatically - Save report: Write findings to
output/lint-report.md
IMPORTANT: Lint is not just passive checking -- it actively improves the KB. When it finds gaps, it should research and ingest new sources to fill them, then recompile.
CLI search (preferred for LLM use):
./tools/search-engine/qmd "query" # top 10 results, LLM-friendly output
./tools/search-engine/qmd "query" --type concept # filter by type
./tools/search-engine/qmd "query" --top 5 # limit resultsThe qmd tool uses BM25 ranking over a pre-built index. Rebuild the index after major changes:
python3 tools/search-engine/build-index.pyWeb UI (for human browsing):
python3 tools/search-engine/server.py # starts on http://localhost:8888Features: autocomplete, type filters, result snippets, dark mode.
Legacy search (simple grep):
./tools/search.sh "query"Generate publishable artifacts from the wiki:
bash tools/export/export-all.sh # all 4 formats at once
python3 tools/export/build-site.py # static HTML site -> output/site/
python3 tools/export/build-pdf.py # print-ready HTML -> output/wiki-export.html
python3 tools/export/build-epub.py # EPUB ebook -> output/wiki.epub
python3 tools/export/bundle.py # single markdown -> output/wiki-bundle.md
python3 tools/export/bundle.py --max-tokens 100000 # truncated for LLM context windowsStatic site features: markdown-to-HTML, wikilink resolution, responsive dark/light mode, sidebar navigation, client-side search, breadcrumbs, backlinks, tag cloud, RSS feed.
EPUB features: organized as chapters by type (Sources, Concepts, Entities, Comparisons). Pure stdlib -- no pip packages needed.
Print-ready HTML features: A4 page sizing, @media print CSS, page breaks between articles, table of contents, headers/footers. Can target a single article: python3 tools/export/build-pdf.py wiki/concepts/foo.md
Markdown bundle features: single file with TOC at top, wikilinks converted to anchor links. The --max-tokens flag truncates for LLM context window fitting.
./tools/viz/generate-all.sh # all visualizations
python3 tools/viz/graph.py # knowledge graph (SVG)
python3 tools/viz/timeline.py # chronological timeline
python3 tools/viz/concept-map.py # concept relationship map
python3 tools/viz/stats.py --html # statistics dashboard (HTML)
python3 tools/viz/canvas.py --all # Obsidian master canvasOutput goes to output/images/ (SVG, HTML) and wiki/master-canvas.canvas (Obsidian).
Continuous topic monitoring and new source discovery:
./tools/monitor/discover # check all topics for new content
./tools/monitor/discover --ingest # check + auto-ingest new content
./tools/monitor/discover --report # generate discovery suggestions
./tools/monitor/discover --feeds # check RSS feeds for matches
./tools/monitor/discover --all # run everything
./tools/monitor/discover --topic 'RAG' # only check specific topic
./tools/monitor/discover --days 7 # look back N daysConfiguration files:
tools/monitor/topics.json-- tracked topics, search queries, check frequencytools/monitor/feeds.json-- RSS feeds (arXiv, blogs) and keyword filters
Cron setup: bash tools/monitor/setup-cron.sh installs periodic monitoring.
Currently tracked topics: LLM Knowledge Bases, RAG Systems, Knowledge Graphs + AI, PKM, LLM Agents. Monitored feeds: Lil'Log, Simon Willison, Interconnects, arXiv cs.AI/cs.CL/cs.IR.
bash tools/tests/run-all.sh # full suite (6 test suites)
bash tools/tests/run-all.sh --json # JSON output for CITest suites:
| Suite | What it checks |
|---|---|
check-integrity.py |
Wiki structural integrity (frontmatter, required fields) |
check-links.py |
Wikilink graph validation (broken links, orphans) |
check-index.py |
Index completeness (every article listed in _index.md) |
check-quality.py |
Content quality heuristics (thin articles, missing summaries) |
test-search.py |
Search engine correctness (index, ranking, filters) |
smoke-test.sh |
End-to-end smoke test (ingest, compile, search, export) |
python3 tools/history/changelog.py # generate wiki/Changelog.md from git
python3 tools/history/article-history.py <path> # show edit history of one articleThe changelog generator parses git history to produce a dated record of additions, modifications, and deletions, organized by article type.
---
title: "Source: Article Title"
type: source-summary
source: "[[raw/filename]]"
related: ["[[concepts/concept1]]", "[[concepts/concept2]]"]
last_compiled: YYYY-MM-DD
summary: "One-line summary"
---
## Key Points
- ...
## Detailed Summary
...
## Notable Quotes
> ...
## Related Concepts
- [[concepts/concept1]] -- how it relates---
title: "Concept Name"
type: concept
sources: ["[[sources/source1]]", "[[sources/source2]]"]
related: ["[[concepts/other-concept]]"]
last_compiled: YYYY-MM-DD
summary: "One-line summary"
---
## Overview
...
## Key Ideas
...
## Sources
- [[sources/source1]] -- what it says about this concept
## Related Concepts
- [[concepts/other]] -- relationship descriptionFor proper nouns: people, tools, organizations, papers, datasets, frameworks.
---
title: "Entity Name"
type: entity
entity_type: person|tool|org|paper|dataset|framework
sources: ["[[sources/source1]]"]
related: ["[[concepts/concept1]]", "[[entities/other]]"]
last_compiled: YYYY-MM-DD
summary: "One-line summary"
---
## Overview
...
## Key Contributions / Features
...
## Mentioned In
- [[sources/source1]] -- contextFor naturally comparable things (tools, approaches, architectures).
---
title: "X vs Y"
type: comparison
subjects: ["[[concepts/x]]", "[[concepts/y]]"]
sources: ["[[sources/source1]]"]
last_compiled: YYYY-MM-DD
summary: "One-line summary"
---
## Overview
...
## Comparison Table
| Dimension | X | Y |
|-----------|---|---|
| ... | | |
## When to Use Each
...Append-only. Every operation must log here.
## [YYYY-MM-DD] operation | Title or description
- Key details of what happened
- Sources ingested, pages created/updated, etc.Operations to log: ingest, research, compile, query, lint, output, export, monitor.
Use consistent prefixes so the log is parseable with simple Unix tools (grep, awk).
Never edit or delete old log entries -- only append new ones.
| File | Purpose | Update when |
|---|---|---|
wiki/_index.md |
Master index organized by category (Sources, Concepts, Entities, Comparisons) | After any article create/delete |
wiki/_meta/summaries.md |
One-line summary per article -- your primary navigation aid for Q&A | After any article create/update |
wiki/_meta/links.md |
Backlink graph (which articles link to which) | After any article create/update |
wiki/_meta/manifest.md |
Compilation tracking (which raw files are processed, hashes) | After each compile |
wiki/log.md |
Append-only chronological activity log | After every operation |
summaries.md is critical: it is your cheat sheet. It must fit in one context window and let you quickly find the right articles to read for any query.
| Tool | Command | Description |
|---|---|---|
| BM25 CLI | ./tools/search-engine/qmd "query" |
Full-text search, LLM-optimized output |
| Web UI | python3 tools/search-engine/server.py |
Browser search on port 8888 |
| Index builder | python3 tools/search-engine/build-index.py |
Rebuild search index |
| Tool | Command | Input |
|---|---|---|
| YouTube | ./tools/ingest/youtube.sh <url> |
YouTube video URL |
| arXiv | ./tools/ingest/arxiv.sh <id-or-url> |
arXiv paper ID or URL |
| GitHub | ./tools/ingest/github.sh <repo-url> |
GitHub repository URL |
./tools/ingest/pdf.sh <path-or-url> |
Local PDF or PDF URL | |
| Tweet | ./tools/ingest/tweet.sh <tweet-url> |
Twitter/X thread URL |
| Batch | ./tools/ingest/batch.sh <urls.txt> |
File with one URL per line |
| Clippings | ./tools/ingest/import-clippings.sh |
Obsidian web clipper imports |
| Tool | Command | Output |
|---|---|---|
| All | ./tools/viz/generate-all.sh |
All 5 below |
| Knowledge graph | python3 tools/viz/graph.py |
SVG node/edge graph |
| Timeline | python3 tools/viz/timeline.py |
Chronological SVG |
| Concept map | python3 tools/viz/concept-map.py |
Concept relationship SVG |
| Stats dashboard | python3 tools/viz/stats.py --html |
HTML dashboard |
| Obsidian canvas | python3 tools/viz/canvas.py --all |
.canvas JSON file |
| Tool | Command | Output |
|---|---|---|
| All | bash tools/export/export-all.sh |
All 4 below |
| Static site | python3 tools/export/build-site.py |
output/site/ (HTML, CSS, search, RSS) |
| Print HTML | python3 tools/export/build-pdf.py |
output/wiki-export.html |
| EPUB | python3 tools/export/build-epub.py |
output/wiki.epub |
| Markdown bundle | python3 tools/export/bundle.py |
output/wiki-bundle.md |
| Tool | Command | Description |
|---|---|---|
| Discover | ./tools/monitor/discover |
Check topics for new content |
| Auto-ingest | ./tools/monitor/discover --ingest |
Discover + ingest new sources |
| RSS | ./tools/monitor/discover --feeds |
Check RSS feeds for matches |
| Report | ./tools/monitor/discover --report |
Generate suggestion report |
| Cron | bash tools/monitor/setup-cron.sh |
Install periodic monitoring |
| Tool | Command | Description |
|---|---|---|
| List | python3 tools/plugins/framework.py list |
Show plugins and status |
| Enable | python3 tools/plugins/framework.py enable <name> |
Enable a plugin |
| Disable | python3 tools/plugins/framework.py disable <name> |
Disable a plugin |
| Run hook | python3 tools/plugins/framework.py run <hook> |
Execute all enabled plugins for a hook |
| Manage (bash) | ./tools/plugins/manage.sh list|enable|disable|run |
Shell wrapper |
Available plugins: word_count, reading_time, backlink_updater, auto_tag, citation_checker, duplicate_detector
Hook points: pre_ingest, post_ingest, pre_compile, post_compile, pre_query, post_query, on_lint
| Tool | Command | Description |
|---|---|---|
| Full suite | bash tools/tests/run-all.sh |
All 6 test suites |
| JSON output | bash tools/tests/run-all.sh --json |
Machine-readable results |
| Tool | Command | Description |
|---|---|---|
| Changelog | python3 tools/history/changelog.py |
Wiki changelog from git |
| Article history | python3 tools/history/article-history.py <path> |
Per-article edit history |
| Tool | Command | Description |
|---|---|---|
| Python SDK | from tools.sdk.kb import KnowledgeBase |
Programmatic KB access |
| CLI | python3 tools/sdk/cli.py <command> |
Command-line SDK access |
| JSON API | python3 tools/sdk/api_server.py |
HTTP API on port 8889 |
| REPL | python3 tools/sdk/repl.py |
Interactive Python shell with KB loaded |
| JSON export | python3 tools/sdk/export_json.py |
Full KB as JSON |
API endpoints (port 8889):
GET /api/index-- wiki indexGET /api/articles?type=concept-- list articles by typeGET /api/article/<path>-- single article contentGET /api/search?q=query&type=concept&top_k=10-- BM25 searchGET /api/stats-- KB statisticsGET /api/links?article=path-- link graphGET /api/tags-- tag cloudGET /api/log?n=10-- recent activity logGET /api/summaries-- article summariesGET /api/orphans-- orphan articlesGET /api/hubs?top_k=10-- most-connected articlesGET /api/backlinks?article=path-- backlinks for an article
SDK CLI commands: search, stats, article, links, orphans, hubs, tags, export-json (add --json to any for JSON output)
| Tool | Command | Description |
|---|---|---|
| Start | python3 tools/mcp-server/server.py |
MCP server over stdio (JSON-RPC 2.0) |
| Config | tools/mcp-server/mcp-config.json |
Claude Desktop integration config |
| Test | bash tools/mcp-server/test.sh |
Server smoke test |
MCP tools exposed: wiki_search, wiki_read, and others. Add the server to Claude Desktop by copying mcp-config.json to your Claude config.
- Always use Obsidian
[[wikilinks]]for cross-references (not markdown links) - Format:
[[category/article-name]](e.g.,[[concepts/rag-vs-index-based-retrieval]]) - Every article should link to at least 2-3 related articles
- Every wiki article must have YAML frontmatter with at minimum:
title,type,summary,last_compiled - Source summaries must include
sourcelinking back to the raw file - Entity pages must include
entity_type - Comparison pages must include
subjectsarray
- File names: lowercase, hyphens, no spaces (e.g.,
llm-knowledge-base.md) - Dates: ISO 8601 format (YYYY-MM-DD)
- Slugs: descriptive, not abbreviated (e.g.,
attention-is-all-you-need.mdnotaiayn.md)
- Create for proper nouns: people, tools, organizations, papers, datasets, frameworks
- If a name appears in 2+ sources, it deserves an entity page
- Set
entity_typeaccurately
- Create for naturally comparable things (tools, approaches, architectures)
- Always include a comparison table with consistent dimensions
- Include "When to Use Each" guidance
- Every operation must append to
wiki/log.md - Never edit or delete old log entries
- Use parseable format:
## [YYYY-MM-DD] operation | description
- Always update
_index.mdand_meta/files after any wiki changes - Keep
_meta/summaries.mdconcise -- it must fit in one context window
- Be incremental: do not rewrite articles that have not changed
- Prefer updating existing articles over creating duplicates
- Use tags in frontmatter for categorization
- Check wiki coverage: Read
wiki/_meta/summaries.md - If little/no coverage: RESEARCH it (web search --> fetch --> ingest --> compile)
- If existing articles are thin: Fill gaps first via web search, then answer
- If "build a KB about X": Full RESEARCH mode (5-15 sources, multiple angles)
- Only skip web research if: user explicitly asks for wiki-only answer, or topic is already deeply covered
- Ensure log.md is updated
- Ensure _index.md reflects any new articles
- Ensure summaries.md has entries for all articles
- Use the
./kbcommands for ingest, compile, query, and lint so plugin hooks run automatically
- Research agent -- build and expand the knowledge base
- Wiki compiler -- maintain structure, links, and quality
- Q&A system -- answer questions with citations, file answers back
- You OWN the
wiki/directory. Write freely there. - Never modify
raw/files after initial ingest (they are the source of truth). - Always update
_index.mdand_meta/files after any wiki changes. - When answering questions, CITE your sources with wikilinks.
- Keep
_meta/summaries.mdconcise -- it is meant to fit in one context window. - Use
WebSearchliberally -- it is your primary tool for building the KB. - Use
WebFetchto get full article content from URLs found via search. - When fetching fails (paywall, 403, etc.), skip and move to the next source.
- A single ingest should touch 10-15+ wiki pages across source, concept, entity, comparison, index, and metadata files.
- Use templates from
templates/as starting points when creating new articles. - After major changes, rebuild the search index:
python3 tools/search-engine/build-index.py