Skip to content

Project Overview

JanYork edited this page Aug 14, 2026 · 1 revision

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.

The problem

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

What LWC is

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.

What LWC is not

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.

Who it is for

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.

Design principles

Knowledge compounds

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.

Evidence and synthesis stay separate

Sources are immutable snapshots. Wiki pages are maintained interpretations. Citations and explicit provenance connect the two without rewriting source truth.

Recall stays bounded

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.

Optional indexes do not own knowledge

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.

Mutations are recoverable

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.

Agents need timing guidance, not only commands

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.

A three-plane model

Maintained memory     Current code structure     Raw evidence
LWC Wiki              CodeGraph                  Sources and repository files
     \                       |                       /
      +-------------- Agent reasoning --------------+

These planes complement one another:

  1. Recall earlier decisions and verified conclusions from the Wiki.
  2. Inspect current symbol and dependency structure through CodeGraph when the task needs it.
  3. Read the smallest current source surface that proves the claim.
  4. Preserve the verified result if it will help a later session.

Next steps

LWC Wiki

English · 简体中文


Start here · 开始使用

Core capabilities · 核心能力

Practical guides · 实战指南

Capability configuration · 能力配置

Technical design · 技术设计

Operations · 运行与维护

Reference · 参考资料

Contributing · 参与贡献


Repository · Releases

Clone this wiki locally