Imported from zhoushoujianwork/llm-wiki (
AGENTS.md). Install upstream withnpx skills add zhoushoujianwork/llm-wiki. Copyright stays with the author.
AGENTS.md — For AI Coding Assistants
This project follows the LLM Wiki architecture described in /Volumes/1TB/github/llm-wiki/docs/ARCHITECTURE.md.
Key Principles
- Source Layer is read-only: Never modify source files; only read them.
- Compilation is idempotent: Re-running compile should be safe and incremental.
- Wiki pages are the source of truth for queries: Query layer reads wiki, not raw sources.
- No vector database: Use LLM for retrieval via structured wiki pages.
- Namespace isolation: Each source repo gets its own namespace in the wiki.
Directory Structure
cmd/llm-wiki/ # CLI entry point
internal/
source/ # GitHub repo management, file discovery
compiler/ # LLM compilation engine
wiki/ # Wiki page storage and retrieval
query/ # Query processing and answering
index/ # Concept/entity to page mapping
sources/ # Cloned repos and cached sources (gitignored)
wiki/ # Generated wiki pages (committable)
Compilation Flow
- Discover documents in source layer
- For each document, check if it needs compilation (mtime, existing wiki page)
- Send document to LLM with compilation prompt
- LLM returns: summary page, entity pages, cross-reference updates
- Write wiki pages to
wiki/directory - Update index
Query Flow
- User asks question
- Identify relevant namespaces/pages from index
- Read top 3-5 relevant wiki pages
- Send pages + question to LLM
- Return answer with source citations
Adding New Sources
llm-wiki source add <repo-url> # GitHub repo
llm-wiki source add <local-path> # Local directory
llm-wiki source add <url> # URL to scrape
ClawFlow — Issue → PR Automation
This repo participates in ClawFlow, the OpenClaw automated issue → PR pipeline.
How it works
- Owner creates a GitHub issue and applies the
ready-for-agentlabel - OpenClaw cron agent picks it up, evaluates confidence
- If confidence ≥ 7/10, spawns a sub-agent to fix the issue
- Sub-agent creates a branch, implements the fix, opens a PR
- PR link is sent back to the owner
Labels
| Label | Who sets | Meaning |
|---|---|---|
ready-for-agent |
Owner only | Triggers ClawFlow收割 |
bug |
Owner or agent | Bug report |
enhancement |
Owner or agent | Feature request |
in-progress |
Agent | Work in progress |
Constraint
- Do NOT apply
ready-for-agentyourself — only the repo owner sets this tag - You may evaluate issues and report confidence, but the actual tagging is owner-only
Skills
- Skill definition:
~/.openclaw/workspace/skills/llm-wiki/SKILL.md - Full ClawFlow docs:
~/.openclaw/workspace/ClawFlow.md
Compilation Modes
full: Re-compile everything, overwrite existing pagesincremental: Only compile new/changed sources (default)single <source>: Compile specific source only
