-
Notifications
You must be signed in to change notification settings - Fork 4
Project Overview
Language: English · 简体中文
LWC gives an AI agent a durable, auditable memory layer for project and cross-project knowledge. It is designed for work that spans sessions, depends on source evidence, or becomes more valuable when earlier analysis can be reused.
Agents can read a repository or a document collection, answer a question, and make a sound decision. Without an external memory system, most of that work disappears with the session. A later agent must search the same files, reconstruct the same relationships, and repeat the same reasoning.
Conventional retrieval-augmented generation helps locate raw chunks, but it usually does not preserve the synthesis produced after retrieval. The retrieval step repeats; the useful intermediate knowledge does not compound.
LWC keeps that intermediate knowledge as a maintained Wiki:
task
-> recall maintained knowledge
-> inspect current sources and code
-> reason and act
-> preserve verified improvements
LWC is a local-first Rust CLI that gives agents a structured protocol for:
- storing immutable UTF-8 source snapshots;
- compiling sources into maintained Wiki pages;
- recording citations, provenance, links, contradictions, and history;
- searching at document, passage, and sentence granularity;
- traversing optional document and code graphs;
- loading explicitly tagged core pages in full;
- staging multi-entity updates in atomic changesets;
- recovering derived projections through durable Work and checkpoints;
- integrating with Agent hosts through one read-only MCP tool plus Skills, Hooks, and Instructions.
SQLite is the canonical store. Projected Markdown is for people and Markdown-aware tools; optional graph databases and search indexes are derived and can be rebuilt.
LWC is not:
- an LLM or an Agent runtime;
- a chat transcript archive;
- a vector database or an embedding service;
- a replacement for the checked-out repository, tests, or current source files;
- a hosted multi-user knowledge platform;
- a reason to save secrets, transient logs, unsupported guesses, or hidden reasoning.
The checked-out code and reviewed source material remain the authority for current facts. Wiki pages are maintained knowledge that helps an agent find and interpret that evidence faster.
LWC is useful when you:
- work with coding agents across many sessions;
- maintain a large project whose decisions are scattered across code, issues, and documents;
- conduct research that accumulates sources and evolving conclusions;
- need operational rules or runbooks to load reliably at session boundaries;
- want source-backed answers instead of untraceable summaries;
- need separate document relationships and code-structure intelligence.
LWC can run with any Agent that can execute the CLI. It includes strong, host-specific adapters for supported AgentTargets and a portable fallback for other runtimes.
Useful synthesis becomes a durable page instead of remaining only in chat. New evidence updates existing concepts, comparisons, and decisions rather than creating isolated summaries.
Sources are immutable snapshots. Wiki pages are maintained interpretations. Citations and explicit provenance connect the two without rewriting source truth.
Agents load a compact page index, search for relevant material, and open only the pages or source windows needed for the task. Strong tags are explicit and limited; Word Graph queries are sampled and paginated.
SQLite remains canonical. Markdown, full-text indexes, the document graph, Word Graph projections, and CodeGraph are derived capabilities. A failed optional index does not invalidate the underlying Wiki.
Single writes are transactional. Related writes can be staged in a changeset, inspected, linted, and committed together. Checkpoints and structured recovery fields protect larger maintenance operations.
The bundled Skill and lifecycle Hooks teach agents when to recall, when to write back, when to initialize optional graphs, and when to leave the user's primary task alone.
Maintained memory Current code structure Raw evidence
LWC Wiki CodeGraph Sources and repository files
\ | /
+-------------- Agent reasoning --------------+
These planes complement one another:
- Recall earlier decisions and verified conclusions from the Wiki.
- Inspect current symbol and dependency structure through CodeGraph when the task needs it.
- Read the smallest current source surface that proves the claim.
- Preserve the verified result if it will help a later session.
- Learn the basic concepts.
- Decide whether your task matches the documented use cases.
- Follow installation and upgrades, then complete the quick start.
LWC Wiki
- Home · 首页
- Project overview · 项目简介
- Basic concepts · 基本概念
- Use cases · 应用场景
- Installation and upgrades · 安装与升级
- Quick start · 快速开始
- Persistent memory · 持久记忆体系
- Agent workflow and memory policy · Agent 工作流与主动记忆策略
- Sources and ingestion · 来源与知识整合
- Wiki pages and provenance · Wiki 页面与来源证明
- Search and context · 搜索与上下文载入
- Document knowledge graph · 文档知识图(记忆图网)
- Code graph · 代码图
- Word graph · 词图
- Tags and strong context · 标签与强上下文
- Document conversion · 文档转换
-
MCP server and
lwc_explore· MCP 服务与lwc_explore - Skills, Hooks, and Instructions · Skills、Hooks 与 Instructions
- AgentTarget installation · AgentTarget 安装与集成
- Changesets · Changeset 原子变更
- Work system · Work 任务系统
- Checkpoints and rollback · Checkpoint、恢复与回滚
- Read-only Viewer · 只读可视化界面
- Architecture overview · 总体架构
- Storage and data model · 存储与数据模型
- Retrieval and indexing · 检索与索引设计
- Graph projection and performance · 图投影与性能设计
- MCP, Hooks, and AgentTarget design · MCP、Hook 与 AgentTarget 设计
- Safety and trust boundaries · 安全模型与信任边界
- Maintenance and diagnostics · 维护与诊断
- Troubleshooting and FAQ · 故障排查与常见问题
- Migration and compatibility · 迁移与版本兼容
- Support and issue reporting · 获取帮助与问题反馈
- CLI and configuration reference · CLI 与配置参考
- JSON output and error contract · JSON 输出与错误契约
- Limits and glossary · 系统限制与术语表
- Contributing and development · 贡献与开发指南
- Testing and release process · 测试与发布流程
- Wiki style guide · Wiki 编写规范