LLM Wiki
🦊 阿舟 · LLM Wiki
📚 知识要留得住,也要经得起查证。
Use a project-local Markdown knowledge base for verified architecture, decisions, patterns, debugging facts, environment notes, conventions, references, and reviewed session learnings.
Brand and progress
For an interactive run, read brand-layer.md, then start exactly once:
🦊 阿舟 · LLM Wiki 启动|operation=<operation>|scope=<project-root>
Use one fixed anchor per completed material stage. Keep machine JSON, paths, commands, schema values, page content, and raw evidence emoji-free. Never emit ✅ 验证通过 after a fail, hold, or skipped machine receipt. A host without Unicode may remove emoji without changing prefixes, separators, fields, or values.
Every runtime entry uses the canonical <project>/.azhou/llm-wiki/ store. The CLI is scripts/llm_wiki.py; the optional stdio MCP server is scripts/llm_wiki_mcp.py.
Operating contract
- Resolve the project root before reading or writing. Normal operations never select an alternate store.
- Query or list before adding related knowledge. Use
ingestto append a sourced update; useaddonly when duplicate titles should fail. - Record evidence in
--source, choose an honest confidence, and exclude secrets, raw private transcripts, tokens, and unrelated personal data. - Run
lint --no-logafter mutations. Broken references, invalid pages, andimplemented/rejecteddecision pages without an## Alternatives consideredsection keep statusfail; warnings remain visible. Decision pages may carry alifecycle(proposed,implemented,archived,rejected), set at creation via--lifecycle; ingest never changes an existing page's lifecycle. - Freeze a settled decision with
archive; the page becomes byte-frozen under a recorded content hash, andingestanddeleteboth refuse it afterwards. Any later byte change, a missing archived page, or a corrupt archive lock fails lint. - Return the script's
llm-wiki.receipt.v3fields, includingcurrentTruthandlearningSignal. Do not claim a lifecycle event, migration, or deletion succeeded without its receipt.
query writes an operation log by default. Add --no-log for a strictly read-only task. delete is destructive: require direct user authorization immediately before running it, then pass --yes.
Lifecycle wiring is optional and explicit. autoCapture defaults to false, records only session metadata when enabled, and never reads transcripts. Rendered configuration is review-only and never mutates host files.
Commands
SKILL_DIR=/absolute/path/to/llm-wiki
PROJECT_ROOT=/absolute/path/to/project
python "$SKILL_DIR/scripts/llm_wiki.py" --root "$PROJECT_ROOT" init
python "$SKILL_DIR/scripts/llm_wiki.py" --root "$PROJECT_ROOT" ingest --title "Auth decision" --content-file /absolute/note.md --tag auth --category decision --source issue-42 --confidence high
python "$SKILL_DIR/scripts/llm_wiki.py" --root "$PROJECT_ROOT" query auth --no-log
python "$SKILL_DIR/scripts/llm_wiki.py" --root "$PROJECT_ROOT" archive --title "Auth decision"
python "$SKILL_DIR/scripts/llm_wiki.py" --root "$PROJECT_ROOT" lint --no-log
Use --content-file - for reviewed stdin content. Prefer file input over shell-escaped multiline text.
Configured MCP clients receive exactly eight tools: wiki_ingest, wiki_query, wiki_lint, wiki_add, wiki_list, wiki_read, wiki_delete, and wiki_archive. Apply the same evidence, privacy, lint, and deletion checkpoints as the CLI; wiki_delete and wiki_archive require confirm: true after direct authorization, and wiki_archive freezes an implemented decision page under a recorded content hash.
Migration checkpoint
Normal operations never read another store. To preserve data from any prior project-relative directory, run migrate --from-store <path> first for a dry-run receipt, review conflicts and file counts, then rerun with --apply. Migration creates the canonical store atomically, resets session capture to false, and never deletes the source.
References
- Read design.md for architecture, trust boundaries, failure modes, migration, rollback, and production gates.
- Read schema.md when creating pages, interpreting lint, or consuming receipts.
- Read setup.md for MCP, lifecycle, smoke checks, migration, and rollback.
- Read provenance.md before updating adapted behavior or notices.
- Follow brand-layer.md for interactive stages and closeout wording.