-
Notifications
You must be signed in to change notification settings - Fork 4
Common Workflows and Recipes
Language: English · 简体中文
This page turns LWC's individual commands into repeatable Agent workflows. Choose the smallest recipe that matches the task, preserve explicit scope, and finish with evidence rather than assuming that a queued action completed.
Use LWC when work produces knowledge that should survive the current conversation: a verified architectural conclusion, an operational rule, a source-backed explanation, a recurring investigation, or a relationship that future tasks will need.
Skip durable writes for transient command output, unverified guesses, raw chain-of-thought, secrets, and results that are already clear from one cheap source lookup.
Use once when the project has no Wiki:
lwc --scope project init
lwc --scope project purpose show
lwc --scope project schema show
lwc --scope project lintRun from the project root or a descendant. Initialization does not enable document graph, install CodeGraph, or select a conversion engine. Offer those separately when the project will benefit from them.
Acceptance: lint completes, scope resolves to the intended project, and no unrelated repository file was added to Git.
lwc --scope project source add docs/design.md --title "Design source"
lwc --scope project ingest claim <source-id> --source-max-chars 100000
lwc --scope project ingest analyze <source-id> --file analysis.md
lwc --scope project page put source-<source-id> \
--title "Design source summary" --kind source \
--file source-summary.md --source <source-id>
lwc --scope project page put project-design \
--title "Project design" --kind concept \
--file project-design.md --source <source-id>
lwc --scope project ingest complete <source-id>
lwc --scope project lintRead every Source window before writing conclusions. The source-summary Page answers “what does this evidence say?”; the shared Page answers “what does the project currently know?” Update an existing shared Page instead of creating one Page per document when the topic is the same.
Acceptance: the ingest job is completed, the shared Page cites the Source, lint is clean, and two fixed natural-language searches return the Page near the top.
lwc --scope project context --limit 25
lwc --scope project search "how does release recovery work" --limit 5 --explain
lwc --scope project page show release-recoverySearch first, then open the exact Page and cited Sources needed for the decision. Use --scope all only when reusable global knowledge is relevant. Do not load the entire Wiki into the prompt.
If existing knowledge is stale, correct it after verifying current evidence; do not merely answer around it.
Use a query Page when an investigation is likely to recur and its answer is not already a stable concept Page:
lwc --scope project page put why-release-retries-are-safe \
--title "Why release retries are safe" --kind query \
--summary "Verified retry and idempotence boundaries" \
--file verified-answer.md --source <source-id>
lwc --scope project lintRecord the conclusion, evidence, conditions, and known uncertainty. Do not preserve a transcript of the investigation.
lwc --scope project tag set rules release-policy \
--priority 100 --reason "Mandatory release boundary"
lwc --scope project tag autoload rules --enable \
--priority 100 --limit 10 --max-chars 50000 \
--reason "Load reviewed project rules at lifecycle boundaries"
lwc --scope project load tag rules --limit 10Use a strong tag only for a small set of highly relevant core Pages. Tag membership is not a substitute for search taxonomy, and autoload is not a place for entire handbooks.
Acceptance: returned Pages are complete, ordered by membership priority, inside the character budget, and safe to include in every intended session.
lwc --scope project graph status
lwc --scope project graph verify
lwc --scope project graph neighbors page:project-design --limit 50
lwc --scope project graph path page:project-design source:<source-id> --max-depth 4
lwc --scope project graph impact page:project-design --max-depth 4 --limit 100Enable the document graph only with user consent. Verify it before relying on traversal. Use explicit semantic relations only for reviewed meaning that citations and Wiki links cannot express.
lwc --scope project cg status
lwc --scope project cg init
lwc --scope project cg statusThen use the Agent-facing lwc_explore tool in code mode for symbol search, callers, callees, dependencies, or blast radius. The runtime is reused globally; the index remains project-local. Reinitialize when status reports that the index is missing or invalid, not before every query.
lwc --scope project config show
lwc --scope project config set --trans markitdown
lwc --scope project trans docs/report.docx --output converted/report.mdConversion creates a Markdown file; it does not ingest it. Review the output, then add it as a Source only if it is authorized, useful, and free of secrets. Existing outputs are never overwritten.
lwc --scope project changeset begin operations-update
lwc --scope project --changeset operations-update page put operations-policy \
--title "Operations policy" --kind policy \
--file operations-policy.md --source <source-id>
lwc --scope project --changeset operations-update lint
lwc --scope project changeset show operations-update
lwc --scope project changeset commit operations-update
lwc --scope project graph verifyUse a changeset when several commands must become visible together. A sparse draft reads untouched live knowledge through an overlay. Resolve conflicts from the current live baseline; do not bypass lint to hide an overlay bug.
lwc --scope project lint --limit 100
lwc --scope project work list
lwc --scope project maintenance materialize
lwc --scope project work watch <work-id>
lwc --scope project lintChoose maintenance reindex for search-index drift or reapply the selected graph configuration for graph drift. Use checkpoint restore only when canonical Wiki state itself must move backward.
Every recipe ends with the same four questions:
- Did the command operate on the intended scope or draft?
- Did every returned Work reach
succeeded? - Does canonical readback show the intended state?
- Do lint, fixed retrieval checks, and graph verification pass where applicable?
For command details, continue with CLI and configuration reference. For failures, use Troubleshooting and FAQ.
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 编写规范