yzr-llm-workspace-management
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLLM Workspace Management
LLM Workspace Management
维护一个本地多 wiki 工作区的"全局视图"和跨 wiki 编排——单 wiki 的 ingest / query / lint 走
skill。本 skill 站在所有 wiki 之上,做需要跨 wiki 判断的事。
yzr-llm-wiki-management两块交付物:
- SKILL.md(本文)——工作流 + 边界
- 确定性执行归 llmw CLI——本 skill 零代码,收敛为两条命令,不一致时以探测器为准:
- :只探测(输出 drift 报告,不写盘)
llmw check-fixtures - :workspace 骨架 + 逐 wiki 聚合确定性升级(默认 dry-run)
llmw upgrade
Maintain a global view and cross-wiki orchestration for a local multi-wiki workspace — single-wiki ingest / query / lint operations go to the skill. This skill sits above all wikis and handles tasks requiring cross-wiki judgment.
yzr-llm-wiki-managementTwo deliverables:
- SKILL.md (this document) — workflows + boundaries
- Deterministic execution is handled by llmw CLI — this skill is zero-code, converged into two commands; refer to the detector for inconsistencies:
- : Only detect (output drift report, no disk writes)
llmw check-fixtures - : Workspace skeleton + per-wiki aggregated deterministic upgrade (dry-run by default)
llmw upgrade
输入 / 输出
Input / Output
启动时需具备的信息
Information Required at Startup
| 信息 | 来源 | 备注 |
|---|---|---|
| Workspace 路径 | | CLI 通常在 enter 时设好变量 |
| 操作类型 | 用户自然语言 | scan / query / link / lint / upgrade |
| Query 范围(仅 query) | 用户自然语言或显式指定 wiki 名 | 不指定走全局 INDEX 路由 |
| Information | Source | Notes |
|---|---|---|
| Workspace path | | CLI usually sets the variable on enter |
| Operation type | User natural language | scan / query / link / lint / upgrade |
| Query scope (query only) | User natural language or explicitly specified wiki names | Use global INDEX routing if not specified |
操作产物
Operation Products
- scan → 写 +
<workspace>/INDEX.md(格式 A2/A3)<workspace>/STATS.md - query → 对话给出答案(带每 wiki 引用);可选归档 (格式 A4)
<workspace>/cross_queries/<slug>.md - link → 通过 ingest 流程在涉及 wiki 加跨 wiki 链接
yzr-llm-wiki-management - lint → 写 (格式 A5)+ 对话总结
<workspace>/LINT.md - upgrade → 跑 (默认 dry-run,加
llmw upgrade落盘); 3 终态 JSON 由 CLI 输出;详见 §6--apply [--yes]
- scan → Write +
<workspace>/INDEX.md(format A2/A3)<workspace>/STATS.md - query → Provide answers in conversation (with per-wiki references); optional archive to (format A4)
<workspace>/cross_queries/<slug>.md - link → Add cross-wiki links in involved wikis via the ingest process
yzr-llm-wiki-management - lint → Write (format A5) + conversation summary
<workspace>/LINT.md - upgrade → Run (dry-run by default; add
llmw upgradeto write to disk); 3 final-state JSON outputs from CLI; see §6 for details--apply [--yes]
执行原则 / 边界
Execution Principles / Boundaries
与 workspace CLI 的边界
Boundary with Workspace CLI
本 skill 在场时可调 ——读 / 探测 / 升级类命令直接执行(子命令与参数见
,不枚举);会改 workspace / wiki 元数据或影响运行中 session 的命令,
先把完整命令给用户确认后再执行。
llmwllmw --help不手写 toml——元数据写必须经 CLI(schema 校验 / 原子写 / 唯一性约束由 CLI
保证)。涉及 api_key 的命令始终由用户亲自执行(secret 不过 agent)。
When this skill is active, it can call — directly execute read / detect / upgrade commands (see for subcommands and parameters, no enumeration); for commands that modify workspace/wiki metadata or affect running sessions, provide the complete command to the user for confirmation before execution.
llmwllmw --helpDo not write toml manually — Metadata writes must go through CLI (schema validation / atomic writes / uniqueness constraints guaranteed by CLI). Commands involving api_key must always be executed by the user personally (secrets do not pass through the agent).
与 yzr-llm-wiki-management 的边界
Boundary with yzr-llm-wiki-management
单 wiki 操作(ingest / query / lint / 写 wiki 内文件)一律委托 ——
本 skill 不直接编辑 (保持 log.md 同步、frontmatter 等不变量)。本 skill
只做 workspace 层的事:scan 聚合 / 路由 / 跨 wiki 综合与对比 / 跨 wiki 链接建议 / workspace lint /
跨 wiki memory。
yzr-llm-wiki-management<wiki>/wiki/**All single-wiki operations (ingest / query / lint / write files within a wiki) are delegated to — this skill does not directly edit (maintain invariants such as log.md synchronization and frontmatter). This skill only handles workspace-level tasks: scan aggregation / routing / cross-wiki synthesis and comparison / cross-wiki link suggestions / workspace lint / cross-wiki memory.
yzr-llm-wiki-management<wiki>/wiki/**本 skill 可写的产物(不变量,强制)
Products This Skill Can Write (Invariants, Mandatory)
| 文件 / 目录 | 谁写 | 边界 |
|---|---|---|
| 本 skill | scan 时聚合写 |
| 本 skill | scan 时聚合写 |
| 本 skill | 跨 wiki 综合问答归档 |
| 本 skill | workspace 级 lint 报告 |
| 本 skill | 仅跨 wiki 经验(单 wiki 经验归 |
违反归属 = bug。完整归属表 + 四分表见 的「本 workspace 的边界」+「本文件本身的纪律」(含骨架所有权四分表)节(byte-owned 模板渲染)。
<workspace>/AGENTS.md| File / Directory | Writer | Boundary |
|---|---|---|
| This skill | Aggregated write during scan |
| This skill | Aggregated write during scan |
| This skill | Archive for cross-wiki synthetic Q&A |
| This skill | Workspace-level lint report |
| This skill | Only cross-wiki experience (single-wiki experience belongs to |
Violating ownership = bug. Complete ownership table + quadrant table can be found in the "Boundaries of This Workspace" + "Discipline of This File Itself" sections (byte-owned template rendering) of .
<workspace>/AGENTS.md工作流 / 步骤
Workflows / Steps
0. 启动检查
0. Startup Check
每次进入本 skill 时:
- 定位 workspace 路径:→ 默认
$LLMW_WORKSPACE→ 交互问~/yzr-llm-wiki-workspace - 验证 存在——不存在提示用户 "workspace 还没 init,跑
<workspace>/workspace.toml初始化"(不替用户跑)llmw init - 加载跨 wiki MEMORY 索引:在 workspace 根工作时经 的
<workspace>/AGENTS.mdimport 自动加载;非根目录工作 / 原生读 AGENTS.md 不展开@MEMORY/MEMORY.md的 agent → 显式@补齐Read <$LLMW_WORKSPACE>/MEMORY/MEMORY.md - 加载作用域边界:当 agent cwd 在 子目录内、改跑
<wiki>/时,本 skill 纪律不接管,由yzr-llm-wiki-management单 wiki 纪律生效<wiki>/AGENTS.md - 不自动跑 ——等用户给操作意图
scan
Every time this skill is entered:
- Locate workspace path: → default
$LLMW_WORKSPACE→ interactive query~/yzr-llm-wiki-workspace - Verify that exists — if not, prompt the user "Workspace not initialized yet, run
<workspace>/workspace.tomlto initialize" (do not run it for the user)llmw init - Load cross-wiki MEMORY index: Automatically loaded via import in
@MEMORY/MEMORY.mdwhen working in the workspace root; if working in a non-root directory / reading AGENTS.md natively without expanding<workspace>/AGENTS.mdagents → explicitly@to supplementRead <$LLMW_WORKSPACE>/MEMORY/MEMORY.md - Load scope boundaries: When the agent's cwd is within a subdirectory and switches to running
<wiki>/, this skill's discipline does not take over; instead, the single-wiki discipline inyzr-llm-wiki-managementtakes effect<wiki>/AGENTS.md - Do not run automatically — wait for user's operation intent
scan
1. Scan / refresh-index
1. Scan / refresh-index
触发:"扫一下 workspace" / "更新 INDEX.md" / 用户说"workspace 该刷新了"。
流程:
- 读 拿
<workspace>/workspace.toml注册表[wikis] - 对每个 wiki:
- 读 (CLI 维护)
<wiki>/wiki_metadata.toml - 读 的「本 wiki 的边界」节(拿边界)
<wiki>/AGENTS.md - 读 (已有内容 + 段落骨架)
<wiki>/wiki/index.md - 扫 拿 page counts
<wiki>/wiki/{entities,concepts,sources,comparisons,syntheses}/ - 扫 递归拿原始资料数(仅计数,不读内容)
<wiki>/raw/ - 读 末条拿 last activity
<wiki>/wiki/log.md - 读 拿 memory files 数(仅文件名)
<wiki>/MEMORY/
- 读
- 读 索引,按 A2 排序规则聚合,写 INDEX.md + STATS.md(格式 A2/A3)
<workspace>/MEMORY/MEMORY.md - 原子写(POSIX )
tmp + fsync + rename - 对话中报告:"已刷新 INDEX.md / STATS.md,X 个 wiki,Y 个 page,Z 个原始资料"
何时不做 scan:用户只想做 query → 先用现有 INDEX.md;INDEX.md 缺失或明显过期(覆盖不到新增 wiki)再提示先 scan。
Triggers: "Scan workspace" / "Update INDEX.md" / User says "Workspace needs to be refreshed".
Process:
- Read to get the
<workspace>/workspace.tomlregistry[wikis] - For each wiki:
- Read (maintained by CLI)
<wiki>/wiki_metadata.toml - Read the "Boundaries of This Wiki" section in (get boundaries)
<wiki>/AGENTS.md - Read (existing content + paragraph skeleton)
<wiki>/wiki/index.md - Scan to get page counts
<wiki>/wiki/{entities,concepts,sources,comparisons,syntheses}/ - Recursively scan to count raw materials (only count, do not read content)
<wiki>/raw/ - Read the last entry in to get last activity
<wiki>/wiki/log.md - Read to count memory files (only file names)
<wiki>/MEMORY/
- Read
- Read the index, aggregate according to A2 sorting rules, write INDEX.md + STATS.md (format A2/A3)
<workspace>/MEMORY/MEMORY.md - Atomic write (POSIX )
tmp + fsync + rename - Report in conversation: "INDEX.md / STATS.md refreshed, X wikis, Y pages, Z raw materials"
When not to scan: If the user only wants to perform a query → use the existing INDEX.md first; if INDEX.md is missing or obviously outdated (does not cover newly added wikis), prompt to scan first.
2. Query(跨 wiki Q&A)
2. Query (Cross-wiki Q&A)
触发:"总结我所有 wiki 中关于 X 的内容" / "对比 A 和 B 对 Y" / "X 该查哪个 wiki"。
4 种模式 + 判定优先级 local > compare > route > synthesis:
| 模式 | 触发关键词 | 流程 |
|---|---|---|
| local | "只看 wiki X" / "在 X 里查 Y" | 委托 |
| compare | "对比 A 和 B" / "A 和 B 的区别" | 读双侧 wiki/index.md → query → diff 风格对比 |
| route | "应该查哪个 wiki" / "属于哪个 wiki" | 读 INDEX.md → 按 topic / tag / description 匹配 → 返回 1-3 个候选 wiki |
| synthesis | "总结所有" / "综合所有 wiki" / 兜底 | route → 每候选 wiki query → 合并 + 标注每 wiki 来源 |
good query 必有"是否归档"环节——归档位置:
- 答案涉及单 wiki → (走
<wiki>/wiki/syntheses/<slug>.md)yzr-llm-wiki-management - 答案涉及多 wiki → (本 skill 直接写,格式 A4)
<workspace>/cross_queries/<slug>.md
归档正文引用上游易变事实时过感知测试——规则 SSOT 见 的 「正文引用的稳定性」节。
yzr-llm-wiki-managementreferences/ingest-workflow.mdTriggers: "Summarize content about X across all my wikis" / "Compare A and B on Y" / "Which wiki should I check for X".
4 modes + priority: local > compare > route > synthesis:
| Mode | Trigger Keywords | Process |
|---|---|---|
| local | "Only look at wiki X" / "Search Y in X" | Delegate query to |
| compare | "Compare A and B" / "Differences between A and B" | Read both wiki/index.md → query → diff-style comparison |
| route | "Which wiki should I check" / "Which wiki does this belong to" | Read INDEX.md → match by topic / tag / description → return 1-3 candidate wikis |
| synthesis | "Summarize all" / "Synthesize all wikis" / fallback | Route → query each candidate wiki → merge + label per-wiki sources |
Good queries must include an "archive or not" step — archive location:
- If the answer involves a single wiki → (via
<wiki>/wiki/syntheses/<slug>.md)yzr-llm-wiki-management - If the answer involves multiple wikis → (directly written by this skill, format A4)
<workspace>/cross_queries/<slug>.md
When archiving content that references upstream volatile facts, pass perception tests — SSOT rules can be found in the "Stability of Body References" section of 's .
yzr-llm-wiki-managementreferences/ingest-workflow.md3. Link(跨 wiki 交叉引用)
3. Link (Cross-wiki Cross-referencing)
触发:"wiki A 里的 entity X 在 wiki B 也存在,加链接" / "扫一下跨 wiki 重复 entity"。
流程:
- 扫描:对每个 wiki 的 +
wiki/entities/,提取所有 entity name(frontmatterwiki/concepts/或文件名 slug)title - 去重聚合:跨 wiki 同名 / 近义(用 description 比对)的 entity 收集为候选对
- 建议:对话中列出候选对,让用户选哪些要加跨 wiki 链接
- 写入:用户确认后,对每个涉及的 wiki,调用 的 ingest 流程更新对应 entity / concept 页——追加"跨 wiki 引用"段(xref 格式见
yzr-llm-wiki-management的「跨 wiki 约定」节)<workspace>/AGENTS.md
Triggers: "Entity X in wiki A also exists in wiki B, add a link" / "Scan for cross-wiki duplicate entities".
Process:
- Scan: For each wiki's +
wiki/entities/, extract all entity names (frontmatterwiki/concepts/or filename slug)title - Deduplicate and aggregate: Collect cross-wiki entities with the same name / similar meaning (compared by description) as candidate pairs
- Suggest: List candidate pairs in conversation and let the user select which ones need cross-wiki links
- Write: After user confirmation, for each involved wiki, call the ingest process of to update the corresponding entity / concept page — append a "Cross-wiki References" section (xref format see the "Cross-wiki Agreements" section of
yzr-llm-wiki-management)<workspace>/AGENTS.md
4. Lint(workspace 级)
4. Lint (Workspace-level)
触发:"workspace lint" / "workspace 健康检查" / 定期(如每次 scan 时顺带)。
流程:
- workspace 级 deterministic 检查(agent 内联):
- 重复 entity 跨 wiki(同名 + 不同 slug 的对)
- 失效跨 wiki 链接(cross_queries/*.md 的 路径不存在;
sources中的<wiki>/wiki/**路径不存在)../<another-wiki>/... - 未注册的 wiki 子目录(磁盘上有 但 workspace.toml 没有注册)
<wiki>/AGENTS.md - workspace.toml 注册但磁盘上不存在的 wiki(孤儿注册)
- STATS.md 与 INDEX.md 的 wiki 列表是否一致
- MEMORY 索引一致性:扫 (排除
<workspace>/MEMORY/*.md),任一文件未在MEMORY.md索引列出 → 报MEMORY/MEMORY.md(severity = info)memory-not-indexed
- 半定性检查:
- 主题重叠的 wiki 是否需要合并
- tag 体系是否混乱(同名 tag 含义不同 / 同含义 tag 命名不一)
- 本 skill 不做的:单 wiki 内部 lint——转交
yzr-llm-wiki-management - 输出:写 (格式 A5)+ 对话中报告
<workspace>/LINT.md
何时不做 lint:用户只问 query → 不 lint;用户说"扫一下" → scan 而非 lint。
Triggers: "Workspace lint" / "Workspace health check" / Periodically (e.g., alongside each scan).
Process:
- Workspace-level deterministic checks (inline in agent):
- Cross-wiki duplicate entities (pairs with same name but different slugs)
- Invalid cross-wiki links (paths in of cross_queries/*.md do not exist;
sourcespaths in../<another-wiki>/...do not exist)<wiki>/wiki/** - Unregistered wiki subdirectories (exists on disk but not registered in workspace.toml)
<wiki>/AGENTS.md - Wikis registered in workspace.toml but not present on disk (orphaned registrations)
- Consistency between wiki lists in STATS.md and INDEX.md
- MEMORY index consistency: Scan (excluding
<workspace>/MEMORY/*.md), if any file is not listed inMEMORY.mdindex → reportMEMORY/MEMORY.md(severity = info)memory-not-indexed
- Semi-qualitative checks:
- Whether wikis with overlapping topics need to be merged
- Whether the tag system is chaotic (same tag with different meanings / same meaning with different tag names)
- What this skill does not do: Single-wiki internal lint — delegate to
yzr-llm-wiki-management - Output: Write (format A5) + report in conversation
<workspace>/LINT.md
When not to lint: If the user only asks a query → do not lint; if the user says "Scan" → perform scan instead of lint.
5. Memory(跨 wiki agent 私有记忆)
5. Memory (Cross-wiki Agent Private Memory)
触发:在 scan / query / link / lint 过程中识别到跨 wiki值得沉淀的信息时主动写。
一行判别:跨 wiki偏好/关联/模式/经验 → 写;单 wiki观察 → 转交 ;跨 wiki 综合答案本身 → 归档 ;一次性观察 → 直接 chat。
yzr-llm-wiki-managementcross_queries/完整"何时写/不写" + 判别尺度 canonical = 的「Memory 纪律」节(byte-owned 模板渲染),本附录不重复。
<workspace>/AGENTS.md流程:
- 识别值得沉淀的观察 → scope 自检确认跨 wiki
- 判别条目形式(完整 / 短)
- 写入 (完整条目)或直接在
MEMORY/<slug>.md追加短条目一行MEMORY/MEMORY.md - 同步 索引一行(漏写 = 下次读不到,lint
MEMORY.md兜底)memory-not-indexed
不动 / / / 任何 。
<workspace>/INDEX.mdSTATS.mdLINT.md<wiki>/MEMORY/Triggers: Actively write when identifying cross-wiki information worth preserving during scan / query / link / lint processes.
One-line judgment: Cross-wiki preferences/associations/patterns/experiences → write; Single-wiki observations → delegate to ; Cross-wiki synthetic answers themselves → archive to ; One-time observations → directly chat.
yzr-llm-wiki-managementcross_queries/The complete "when to write/not write" + judgment scale canonical = "Memory Discipline" section (byte-owned template rendering) of , not repeated in this appendix.
<workspace>/AGENTS.mdProcess:
- Identify observations worth preserving → self-check scope to confirm cross-wiki
- Determine entry format (full / short)
- Write to (full entry) or append a short entry line directly to
MEMORY/<slug>.mdMEMORY/MEMORY.md - Synchronize one line in MEMORY.md index (missing write = unreadable next time, lint as fallback)
memory-not-indexed
Do not modify / / / any .
<workspace>/INDEX.mdSTATS.mdLINT.md<wiki>/MEMORY/6. Upgrade(升级 workspace 骨架)
6. Upgrade (Upgrade Workspace Skeleton)
触发:"升级 workspace / 检查 workspace 版本 / format 升级"。
llmw upgrade<workspace>/AGENTS.mdllmw check-fixtures流程:
- 默认 dry-run → 输出 workspace + 各 wiki 的处理计划 + 3 终态 JSON(加
llmw upgrade机器可读)--json - 解读 3 终态:
- → 收尾,提示用户"workspace 升级完成,X 个 wiki 已升"
done - → 按
blocked_drift字段把自定义内容搬hint,再MEMORY/重跑llmw upgrade --apply --yes - → 报告用户,转人工
verify_failed
- 各 wiki 的后续内容迁移走 工作流——本 skill 不代跑
yzr-llm-wiki-management
不写 / / (升级不是 scan / lint 事件)。升级只动 byte/block/header-owned 类文件,不碰含密配置。
INDEX.mdSTATS.mdLINT.mdTriggers: "Upgrade workspace / Check workspace version / Format upgrade".
llmw upgrade<workspace>/AGENTS.mdllmw check-fixturesProcess:
- defaults to dry-run → output workspace + processing plan for each wiki + 3 final-state JSON (add
llmw upgradefor machine-readable)--json - Interpret 3 final states:
- → Wrap up, prompt user "Workspace upgrade completed, X wikis upgraded"
done - → Move custom content to
blocked_driftaccording to theMEMORY/field, then re-runhintllmw upgrade --apply --yes - → Report to user, escalate to manual processing
verify_failed
- Subsequent content migration for each wiki uses the workflow — this skill does not run it on behalf of the user
yzr-llm-wiki-management
Do not write to / / (upgrade is not a scan / lint event). Upgrade only modifies byte/block/header-owned files, does not touch confidential configurations.
INDEX.mdSTATS.mdLINT.md参考样例
Reference Examples
样例 1:跨 wiki 综合问答
Example 1: Cross-wiki Synthetic Q&A
用户:"我所有 wiki 中关于 RAID 有什么记录?"
- skill 读 → 找到
<workspace>/INDEX.md的描述含"存储"huawei_storage_wiki - mode = synthesis
- 转交 给
yzr-llm-wiki-management做 query:"RAID"huawei_storage_wiki - 拿到答案(带 source 页引用),对话中给用户,附"只涉及 1 个 wiki,是否归档到 ?"
huawei_storage_wiki/wiki/syntheses/raid-overview.md - 用户确认 → 走 写 synthesis 页 + log 条目
yzr-llm-wiki-management
User: "What records do I have about RAID across all my wikis?"
- Skill reads → finds that
<workspace>/INDEX.md's description contains "storage"huawei_storage_wiki - Mode = synthesis
- Delegates query "RAID" to for
yzr-llm-wiki-managementhuawei_storage_wiki - Gets answer (with source page references), provides it to user in conversation, and asks "This only involves 1 wiki, should we archive it to ?"
huawei_storage_wiki/wiki/syntheses/raid-overview.md - User confirms → uses to write synthesis page + log entry
yzr-llm-wiki-management
样例 2:路由
Example 2: Routing
用户:"我刚下了一篇 LLM inference 论文,应该放哪个 wiki?"
- skill 读 INDEX.md + 读每个 wiki 的 description / tags
- mode = route
- 返回:"主题是存储,不相关;
huawei_storage_wikiwiki 主题是 test,也不相关;建议新建一个 wiki(test)"llmw wiki --name=llm-inference add ... - 提议代跑 ——用户确认后执行(skill 在场做 route,顺手闭环)
llmw wiki --name=llm-inference add
User: "I just downloaded an LLM inference paper, which wiki should I put it in?"
- Skill reads INDEX.md + reads description / tags of each wiki
- Mode = route
- Returns: "focuses on storage, not relevant;
huawei_storage_wikiwiki focuses on test, not relevant; recommend creating a new wiki (test)"llmw wiki --name=llm-inference add ... - Offers to run on behalf of the user — execute after user confirmation (skill handles routing and closes the loop)
llmw wiki --name=llm-inference add
参考文件
Reference Documents
- 必读:(=
<workspace>/AGENTS.md模板渲染稿,byte-owned)——workspace 级契约的 canonicalworkspace-agents-md-template.md - 单 wiki 契约:SKILL.md + references/(本 skill 读 wiki 文件时按其契约理解,不直接写)
yzr-llm-wiki-management - CLI 文档:workspace CLI(命令 ,与本 skill 同仓维护)——
llmw命令参考此处init / add / remove / config / enter / model ...
- Required Reading: (= rendered from
<workspace>/AGENTS.mdtemplate, byte-owned) — canonical workspace-level contractworkspace-agents-md-template.md - Single-wiki Contract: SKILL.md + references/ (this skill reads wiki files according to its contract, does not write directly)
yzr-llm-wiki-management - CLI Documentation: Workspace CLI (command , maintained in the same repo as this skill) — reference for commands like
llmwhereinit / add / remove / config / enter / model ...
附录:产物格式契约与读取契约
Appendix: Product Format Contracts and Reading Contracts
附录承载 skill 写盘文件的格式契约。读取契约与实例归属见。<workspace>/AGENTS.md
This appendix carries format contracts for files written to disk by the skill. Reading contracts and instance ownership can be found in.<workspace>/AGENTS.md
A1. workspace.toml 读取契约
A1. workspace.toml Reading Contract
- 路径:
<workspace-root>/workspace.toml - 完整 schema 权威在 CLI 代码;check 校验读取契约完整性
workspace-toml-reads-satisfied
skill 实际读取的字段( / 用):
scanupgrade| 字段 | 用途 |
|---|---|
| |
| skill |
| INDEX 内 wiki 排序 |
- Path:
<workspace-root>/workspace.toml - Complete schema authority is in CLI code; check verifies reading contract integrity
workspace-toml-reads-satisfied
Fields actually read by the skill (used in / ):
scanupgrade| Field | Purpose |
|---|---|
| |
| Skill |
| Wiki sorting within INDEX |
A2. INDEX.md
A2. INDEX.md
-
维护方:skill 在时写;CLI 不写
scan -
frontmatter 必填(A7) +;
type: workspace-index推荐title;"Workspace Index"推荐tags[workspace, index] -
正文骨架:markdown
# <Workspace Display Name> — Workspace Index > workspace 入口文档。每个 wiki 一节,按 wiki name 字母序;同字母序内按 `created_at` 升序。 ## Wikis ### <wiki-name> - **display_name**: ... - **topic**: ... - **description**: ... - **tags**: [...] - **created**: YYYY-MM-DD - **last activity**: YYYY-MM-DD (log entry kind) - **page counts**: 0 entities / 0 concepts / ... - **key entities**: [...] - **one-line summary**: ... ## Cross-wiki Links ...(短描述) ## Recent Activity (across all wikis) ...
-
Maintainer: Skill writes during; CLI does not write
scan -
Required frontmatter (A7) +;
type: workspace-indexrecommended astitle;"Workspace Index"recommended astags[workspace, index] -
Body skeleton:markdown
# <Workspace Display Name> — Workspace Index > Workspace entry document. One section per wiki, sorted alphabetically by wiki name; sorted by `created_at` ascending within the same alphabetical group. ## Wikis ### <wiki-name> - **display_name**: ... - **topic**: ... - **description**: ... - **tags**: [...] - **created**: YYYY-MM-DD - **last activity**: YYYY-MM-DD (log entry kind) - **page counts**: 0 entities / 0 concepts / ... - **key entities**: [...] - **one-line summary**: ... ## Cross-wiki Links ...(short description) ## Recent Activity (across all wikis) ...
A3. STATS.md
A3. STATS.md
- 维护方:skill 在 时一并写;与 INDEX.md 区别:结构化(表格)
scan - frontmatter 必填(A7) +
type: workspace-stats - 正文骨架:+
# <Workspace> — Workspace Stats总表 +## Overview每 wiki 一节分表(pages / entities / concepts / sources / comparisons / syntheses / raw_files / last_log_entry / tags / memory_files)## Per-wiki - skill 写入场景:(与 INDEX.md 同一次刷新)
scan
- Maintainer: Skill writes alongside ; difference from INDEX.md: structured (table)
scan - Required frontmatter (A7) +
type: workspace-stats - Body skeleton: +
# <Workspace> — Workspace Statssummary table +## Overviewsection with per-wiki sub-tables (pages / entities / concepts / sources / comparisons / syntheses / raw_files / last_log_entry / tags / memory_files)## Per-wiki - Skill write scenario: (same refresh as INDEX.md)
scan
A4. cross_queries/
A4. cross_queries/
- 维护方:skill 在 输出适合归档时
queryWrite - 文件命名:,kebab-case
<slug>.md(A8)^[a-z0-9][a-z0-9-]*$ - frontmatter 必填(A7) + ;
type: cross-query推荐tags;必填[workspace, cross-query, <涉及 wiki 的 tag>...](引用 wiki 内页路径数组)+sources(涉及 wiki 名数组)wikis - skill 写入场景:输出用户确认归档时
query
- Maintainer: Skill writes when query output is suitable for archiving
- File naming: , kebab-case
<slug>.md(A8)^[a-z0-9][a-z0-9-]*$ - Required frontmatter (A7) + ;
type: cross-queryrecommended astags; required[workspace, cross-query, <tags of involved wikis>...](array of paths to wiki pages referenced, relative to workspace root) +sources(array of involved wiki names)wikis - Skill write scenario: When user confirms archiving of query output
A5. LINT.md
A5. LINT.md
- 维护方:skill 在 时写最近一次报告(不累积,每次 lint 覆盖,是快照)
lint - frontmatter 必填(A7) +
type: workspace-lint - 正文骨架:+
# <Workspace> — Lint Report (<YYYY-MM-DD>)(每 wiki 一段,本 wiki 内 lint 走 yzr-llm-wiki-management)+## Per-wiki Issues(跨 wiki 重复 entity / 未注册子目录 / STATS 过期 / MEMORY 索引一致 / ...)## Workspace-level Issues - skill 写入场景:(每次覆盖)
lint
- Maintainer: Skill writes the latest report during (does not accumulate, overwrites each time, is a snapshot)
lint - Required frontmatter (A7) +
type: workspace-lint - Body skeleton: +
# <Workspace> — Lint Report (<YYYY-MM-DD>)(one section per wiki, single-wiki lint goes to yzr-llm-wiki-management) +## Per-wiki Issues(cross-wiki duplicate entities / unregistered subdirectories / outdated STATS / MEMORY index consistency / ...)## Workspace-level Issues - Skill write scenario: (overwrites each time)
lint
A6. workspace MEMORY/
A6. workspace MEMORY/
- 维护方:CLI init 时创建空目录 + 写 索引占位;后续条目由 skill 写入 + 同步追加 MEMORY.md 索引一行。人类不写;CLI 不写
MEMORY/MEMORY.md - MEMORY 不在 INDEX.md 中强制列出(agent 私有入口)
- 条目形式(完整 / 短)+ 何时写/不写 + 索引行格式 canonical = 的「Memory 纪律」节(byte-owned 模板渲染),本附录不重复
<workspace>/AGENTS.md
- Maintainer: CLI creates empty directory and writes index placeholder during init; subsequent entries are written by skill + synchronized to append one line to MEMORY.md index. Humans do not write; CLI does not write
MEMORY/MEMORY.md - MEMORY is not mandatory to be listed in INDEX.md (private agent entry)
- Entry format (full / short) + when to write/not write + index line format canonical = "Memory Discipline" section (byte-owned template rendering) of , not repeated in this appendix
<workspace>/AGENTS.md
A6.1 MEMORY/MEMORY.md(索引)
A6.1 MEMORY/MEMORY.md (Index)
无 frontmatter(被 用 内联加载);正文:顶部 1 段说明 + 段(完整/短两条格式共存)。
<workspace>/AGENTS.md@MEMORY/MEMORY.md@import## 索引No frontmatter (loaded inline via in ); body: 1 introductory paragraph at the top + section (coexistence of full/short entry formats).
@MEMORY/MEMORY.md@import<workspace>/AGENTS.md## IndexA6.2 MEMORY/*.md(非 MEMORY.md)
A6.2 MEMORY/*.md (excluding MEMORY.md)
frontmatter 仅 必填; 若写固定 (与 wiki 侧 MEMORY 解耦口径对齐);//// 全 optional。lint 兜底;不强制 inbound 链接,不在 INDEX.md 列出。
titletypeworkspace-memorycreatedupdatedtagsdescriptionwikismemory-not-indexedOnly is required in frontmatter; can be fixed as (aligned with wiki-side MEMORY decoupling specification); //// are all optional. Lint as fallback; no mandatory inbound links, not listed in INDEX.md.
titletypeworkspace-memorycreatedupdatedtagsdescriptionwikismemory-not-indexedA7. Frontmatter 字段通用规则
A7. General Frontmatter Field Rules
通用必填 5 项(workspace 级 markdown,MEMORY/*.md 例外——见 A6.2):
| 字段 | 类型 | 说明 |
|---|---|---|
| string | 不含扩展名 |
| enum | 见下表 |
| array | 可空 |
| date | |
| date | |
type | 备注 |
|---|---|
| |
| |
| |
| |
| |
类型特化字段:
| 字段 | 适用 type | 必填 | 含义 |
|---|---|---|---|
| | 是 | 引用的 wiki 内页路径数组(相对 workspace 根) |
| | | 涉及的 wiki 名列表 |
| 所有 | 推荐 | 一句话 |
字段语义写法(怎么写好 / / )SSOT = page-templates.md §一。
titledescriptiontagsyzr-llm-wiki-management5 general required fields (workspace-level markdown, except MEMORY/*.md — see A6.2):
| Field | Type | Description |
|---|---|---|
| string | Without file extension |
| enum | See table below |
| array | Can be empty |
| date | |
| date | |
type | Notes |
|---|---|
| |
| |
| |
| |
| |
Type-specialized fields:
| Field | Applicable type | Required | Meaning |
|---|---|---|---|
| | Yes | Array of paths to referenced wiki pages (relative to workspace root) |
| | Required for | List of involved wiki names |
| All | Recommended | One-sentence description |
Semantic writing rules for fields (how to write good / / ) SSOT = §1 of page-templates.md.
titledescriptiontagsyzr-llm-wiki-managementA8. 命名约束
A8. Naming Constraints
本表只承载 skill 写盘文件的命名约束(这些文件 CLI 不读写、无机械 gate,约束唯一承载点 = 本节)。wiki name( 创建时校验)与 CLI 内部标识符归 CLI;wiki 命名推荐风格见 的「跨 wiki 约定」节。
llmw wiki add<workspace>/AGENTS.md| 维度 | 规则 | 适用对象 |
|---|---|---|
| cross_query slug | kebab-case | |
| MEMORY 文件名 | kebab-case | |
| frontmatter 字段名 | 严格小写 + 下划线 | 所有 workspace 级 markdown |
frontmatter | 严格小写 + 连字符( | 所有 workspace 级 markdown |
This table only carries naming constraints for files written to disk by the skill (these files are not read/written by CLI, no mechanical gate; the only constraint carrier = this section). Wiki names (validated when created via ) and CLI internal identifiers belong to CLI; recommended wiki naming style can be found in the "Cross-wiki Agreements" section of .
llmw wiki add<workspace>/AGENTS.md| Dimension | Rule | Applicable Object |
|---|---|---|
| cross_query slug | kebab-case | |
| MEMORY filename | kebab-case | |
| frontmatter field name | Strict lowercase + underscore | All workspace-level markdown |
frontmatter | Strict lowercase + hyphen (e.g., | All workspace-level markdown |