-
Notifications
You must be signed in to change notification settings - Fork 4
Contributing and Development
Language: English · 简体中文
LWC welcomes focused bug fixes, tests, documentation, compatibility updates, and capabilities grounded in a real Agent workflow. Preserve canonical-state safety and machine-readable contracts before optimizing convenience.
Search existing issues and current code first. Open an issue before a large behavior change, new external integration, Store migration, or public contract change so the user problem and acceptance boundary are reviewable.
Small, clearly scoped fixes can go directly to a pull request when the reproduction and expected result are unambiguous.
Do not base a contribution on a maintainer's private HOME, AMC installation, plugin cache, absolute binary path, or undocumented Agent format.
| Path | Responsibility |
|---|---|
src/ |
Rust CLI, Store, search, graphs, Work, conversion, MCP, Viewer server, and Agent integration |
src/agent/targets/ |
One handwritten AgentTarget adapter per supported host |
tests/ |
CLI, integration, packaging, release, safety, and platform regression tests |
web/ |
Read-only Viewer source and frontend tests |
web/dist/ |
Embedded Viewer build output tracked with the Rust binary |
npm/ |
npm shim and checksum-verified release-binary installer |
.github/workflows/ |
CI and cross-platform release gates |
install.sh and root test helpers |
Installation and release verification entry points |
Follow the nearest AGENTS.md and repository-native instructions before editing.
Requirements are a current Rust toolchain, Git, and Node.js 22 or newer for npm and Viewer work.
git clone https://github.com/JanYork/llm-wiki-cli.git
cd llm-wiki-cli
cargo build --locked
./target/debug/lwc --versionFor Viewer work:
cd web
npm ci
npm test
npm run typecheck
npm run buildOptional MarkItDown, AnyDoc, graph-engine, CodeGraph, and Agent-host acceptance should use isolated environments. Do not install optional tools globally merely to make an unrelated unit test pass.
- Fix the shared root cause. Trace every caller before patching one symptom.
- Keep SQLite canonical. Markdown, FTS, spans, Work artifacts, and graph sidecars remain derived or deployment-local.
- Preserve JSON contracts. Add typed details rather than requiring message parsing.
- Make partial success explicit. A post-canonical failure needs recovery metadata and an idempotent command.
- Bound dense work. Pagination, limits, cancellation, and query budgets are product behavior.
- Preserve foreign files. Agent install, refresh, migration, and uninstall may touch only proven owned content.
- Use official integration evidence. MCP is standard; host config, Hook, Skill, Instructions, plugin, and permissions formats are not.
- Prefer the smallest complete change. Do not add a framework for one implementation or a configuration knob without a demonstrated need.
For production behavior:
- write the smallest regression that reproduces the user-visible defect;
- run it and confirm the expected failure reason;
- implement the root-cause fix at the shared boundary;
- rerun the focused test and direct dependents;
- exercise the real CLI or UI path with isolated data;
- run the final gates appropriate to the changed surface.
A test that failed because its fixture was wrong is not red evidence. Correct the fixture, then demonstrate the intended product failure before implementing.
| Changed surface | Minimum local evidence |
|---|---|
| Rust formatting or code |
cargo fmt --all -- --check plus focused tests |
| Shared Rust behavior |
cargo clippy --locked --all-targets --all-features -- -D warnings and relevant suites |
| Viewer | frontend unit tests, typecheck, build, and a real browser flow |
| npm installer | Node package tests plus an isolated install and binary identity check |
| AgentTarget | global/local install, status, refresh idempotence, uninstall precision, Hook, and MCP acceptance |
| Graph or Work | real queue/watch terminal state, readback, cancellation or recovery as applicable, and graph verify
|
| Windows path behavior | Windows CI or a real Windows runner; do not claim it from macOS-only tests |
| Documentation | bilingual semantic review, command check, Markdown lint, and internal-link validation |
During development, test the complete modified range and its direct dependents. Do not rerun unchanged expensive suites after every edit. The final CI and release gate still cover the full supported matrix.
State-changing code should cover:
- path containment and symlink ancestors;
- concurrent writers and bounded busy behavior;
- failure before and after canonical commit;
- idempotent retry and cleanup;
- draft/live and project/global isolation;
- Windows file-handle behavior where paths are deleted or replaced;
- foreign configuration preservation;
- secret and oversized-input rejection.
Do not make tests pass with --allow-lint-issues, direct SQLite edits, arbitrary sleeps, or cleanup that deletes the failing evidence before diagnosis.
English is canonical, and every core page has a complete Simplified Chinese mirror. Update both in one commit. Chinese should be idiomatic technical prose, not English syntax with Chinese words substituted.
Preserve commands, JSON fields, limits, warnings, and acceptance criteria across languages. Add a sidebar entry only after both pages and every internal link pass. Follow the Wiki style guide.
External contributors cannot open a pull request directly against GitHub's separate Wiki Git repository. Open an issue with the proposed Markdown and evidence unless a maintainer gives direct Wiki write access.
A pull request should include:
- the user-visible problem and why it matters;
- the chosen scope and deliberate non-goals;
- reproduction or acceptance criteria;
- focused test evidence and real-use evidence;
- compatibility, migration, security, and performance impact;
- documentation changes for public behavior;
- any remaining platform limitation stated without overclaiming.
Keep commits reviewable. Do not combine unrelated formatting, generated-file churn, dependency upgrades, and behavior changes.
- The change matches a demonstrated requirement.
- Canonical and derived boundaries remain explicit.
- Error and partial-success contracts are machine-readable.
- The changed surface and direct dependents have real evidence.
- Optional capabilities remain consent-aware.
- Agent integrations use public official conventions only.
- No secret, private path, or user-owned change was committed.
- English and Chinese documentation remain semantically aligned.
The full maintainer gate and publication order are documented in Testing and release process.
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 编写规范