yzr-llm-workspace-management

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

LLM Workspace Management

LLM Workspace Management

维护一个本地多 wiki 工作区的"全局视图"和跨 wiki 编排——单 wiki 的 ingest / query / lint 走
yzr-llm-wiki-management
skill。本 skill 站在所有 wiki 之上,做需要跨 wiki 判断的事。
两块交付物:
  • SKILL.md(本文)——工作流 + 边界
  • 确定性执行归 llmw CLI——本 skill 零代码,收敛为两条命令,不一致时以探测器为准:
    • llmw check-fixtures
      :只探测(输出 drift 报告,不写盘)
    • llmw upgrade
      :workspace 骨架 + 逐 wiki 聚合确定性升级(默认 dry-run)
Maintain a global view and cross-wiki orchestration for a local multi-wiki workspace — single-wiki ingest / query / lint operations go to the
yzr-llm-wiki-management
skill. This skill sits above all wikis and handles tasks requiring cross-wiki judgment.
Two 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:
    • llmw check-fixtures
      : Only detect (output drift report, no disk writes)
    • llmw upgrade
      : Workspace skeleton + per-wiki aggregated deterministic upgrade (dry-run by default)

输入 / 输出

Input / Output

启动时需具备的信息

Information Required at Startup

信息来源备注
Workspace 路径
$LLMW_WORKSPACE
或默认
~/yzr-llm-wiki-workspace
或交互问
CLI 通常在 enter 时设好变量
操作类型用户自然语言scan / query / link / lint / upgrade
Query 范围(仅 query)用户自然语言或显式指定 wiki 名不指定走全局 INDEX 路由
InformationSourceNotes
Workspace path
$LLMW_WORKSPACE
or default
~/yzr-llm-wiki-workspace
or interactive query
CLI usually sets the variable on enter
Operation typeUser natural languagescan / query / link / lint / upgrade
Query scope (query only)User natural language or explicitly specified wiki namesUse global INDEX routing if not specified

操作产物

Operation Products

  • scan → 写
    <workspace>/INDEX.md
    +
    <workspace>/STATS.md
    (格式 A2/A3)
  • query → 对话给出答案(带每 wiki 引用);可选归档
    <workspace>/cross_queries/<slug>.md
    (格式 A4)
  • link → 通过
    yzr-llm-wiki-management
    ingest 流程在涉及 wiki 加跨 wiki 链接
  • lint → 写
    <workspace>/LINT.md
    (格式 A5)+ 对话总结
  • upgrade → 跑
    llmw upgrade
    (默认 dry-run,加
    --apply [--yes]
    落盘); 3 终态 JSON 由 CLI 输出;详见 §6
  • scan → Write
    <workspace>/INDEX.md
    +
    <workspace>/STATS.md
    (format A2/A3)
  • query → Provide answers in conversation (with per-wiki references); optional archive to
    <workspace>/cross_queries/<slug>.md
    (format A4)
  • link → Add cross-wiki links in involved wikis via the
    yzr-llm-wiki-management
    ingest process
  • lint → Write
    <workspace>/LINT.md
    (format A5) + conversation summary
  • upgrade → Run
    llmw upgrade
    (dry-run by default; add
    --apply [--yes]
    to write to disk); 3 final-state JSON outputs from CLI; see §6 for details

执行原则 / 边界

Execution Principles / Boundaries

与 workspace CLI 的边界

Boundary with Workspace CLI

本 skill 在场时可调
llmw
——读 / 探测 / 升级类命令直接执行(子命令与参数见
llmw --help
,不枚举);会改 workspace / wiki 元数据或影响运行中 session 的命令, 先把完整命令给用户确认后再执行。
不手写 toml——元数据写必须经 CLI(schema 校验 / 原子写 / 唯一性约束由 CLI 保证)。涉及 api_key 的命令始终由用户亲自执行(secret 不过 agent)。
When this skill is active, it can call
llmw
— directly execute read / detect / upgrade commands (see
llmw --help
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.
Do 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 内文件)一律委托
yzr-llm-wiki-management
—— 本 skill 不直接编辑
<wiki>/wiki/**
(保持 log.md 同步、frontmatter 等不变量)。本 skill 只做 workspace 层的事:scan 聚合 / 路由 / 跨 wiki 综合与对比 / 跨 wiki 链接建议 / workspace lint / 跨 wiki memory。
All single-wiki operations (ingest / query / lint / write files within a wiki) are delegated to
yzr-llm-wiki-management
— this skill does not directly edit
<wiki>/wiki/**
(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.

本 skill 可写的产物(不变量,强制)

Products This Skill Can Write (Invariants, Mandatory)

文件 / 目录谁写边界
<workspace>/INDEX.md
本 skillscan 时聚合写
<workspace>/STATS.md
本 skillscan 时聚合写
<workspace>/cross_queries/
本 skill跨 wiki 综合问答归档
<workspace>/LINT.md
本 skillworkspace 级 lint 报告
<workspace>/MEMORY/
中的
*.md
+ 同步
MEMORY.md
索引
本 skill仅跨 wiki 经验(单 wiki 经验归
<wiki>/MEMORY/
违反归属 = bug。完整归属表 + 四分表见
<workspace>/AGENTS.md
的「本 workspace 的边界」+「本文件本身的纪律」(含骨架所有权四分表)节(byte-owned 模板渲染)。
File / DirectoryWriterBoundary
<workspace>/INDEX.md
This skillAggregated write during scan
<workspace>/STATS.md
This skillAggregated write during scan
<workspace>/cross_queries/
This skillArchive for cross-wiki synthetic Q&A
<workspace>/LINT.md
This skillWorkspace-level lint report
*.md
in
<workspace>/MEMORY/
+ synchronized
MEMORY.md
index
This skillOnly cross-wiki experience (single-wiki experience belongs to
<wiki>/MEMORY/
)
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 时:
  1. 定位 workspace 路径:
    $LLMW_WORKSPACE
    → 默认
    ~/yzr-llm-wiki-workspace
    → 交互问
  2. 验证
    <workspace>/workspace.toml
    存在——不存在提示用户 "workspace 还没 init,跑
    llmw init
    初始化"(替用户跑)
  3. 加载跨 wiki MEMORY 索引:在 workspace 根工作时经
    <workspace>/AGENTS.md
    @MEMORY/MEMORY.md
    import 自动加载;非根目录工作 / 原生读 AGENTS.md 不展开
    @
    的 agent → 显式
    Read <$LLMW_WORKSPACE>/MEMORY/MEMORY.md
    补齐
  4. 加载作用域边界:当 agent cwd 在
    <wiki>/
    子目录内、改跑
    yzr-llm-wiki-management
    时,本 skill 纪律不接管,由
    <wiki>/AGENTS.md
    单 wiki 纪律生效
  5. 自动跑
    scan
    ——等用户给操作意图
Every time this skill is entered:
  1. Locate workspace path:
    $LLMW_WORKSPACE
    → default
    ~/yzr-llm-wiki-workspace
    → interactive query
  2. Verify that
    <workspace>/workspace.toml
    exists — if not, prompt the user "Workspace not initialized yet, run
    llmw init
    to initialize" (do not run it for the user)
  3. Load cross-wiki MEMORY index: Automatically loaded via
    @MEMORY/MEMORY.md
    import in
    <workspace>/AGENTS.md
    when working in the workspace root; if working in a non-root directory / reading AGENTS.md natively without expanding
    @
    agents → explicitly
    Read <$LLMW_WORKSPACE>/MEMORY/MEMORY.md
    to supplement
  4. Load scope boundaries: When the agent's cwd is within a
    <wiki>/
    subdirectory and switches to running
    yzr-llm-wiki-management
    , this skill's discipline does not take over; instead, the single-wiki discipline in
    <wiki>/AGENTS.md
    takes effect
  5. Do not run
    scan
    automatically — wait for user's operation intent

1. Scan / refresh-index

1. Scan / refresh-index

触发:"扫一下 workspace" / "更新 INDEX.md" / 用户说"workspace 该刷新了"。
流程
  1. <workspace>/workspace.toml
    [wikis]
    注册表
  2. 对每个 wiki:
    • <wiki>/wiki_metadata.toml
      (CLI 维护)
    • <wiki>/AGENTS.md
      的「本 wiki 的边界」节(拿边界)
    • <wiki>/wiki/index.md
      (已有内容 + 段落骨架)
    • <wiki>/wiki/{entities,concepts,sources,comparisons,syntheses}/
      拿 page counts
    • <wiki>/raw/
      递归拿原始资料数(仅计数,不读内容)
    • <wiki>/wiki/log.md
      末条拿 last activity
    • <wiki>/MEMORY/
      拿 memory files 数(仅文件名)
  3. <workspace>/MEMORY/MEMORY.md
    索引,按 A2 排序规则聚合,写 INDEX.md + STATS.md(格式 A2/A3)
  4. 原子写(POSIX
    tmp + fsync + rename
  5. 对话中报告:"已刷新 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:
  1. Read
    <workspace>/workspace.toml
    to get the
    [wikis]
    registry
  2. For each wiki:
    • Read
      <wiki>/wiki_metadata.toml
      (maintained by CLI)
    • Read the "Boundaries of This Wiki" section in
      <wiki>/AGENTS.md
      (get boundaries)
    • Read
      <wiki>/wiki/index.md
      (existing content + paragraph skeleton)
    • Scan
      <wiki>/wiki/{entities,concepts,sources,comparisons,syntheses}/
      to get page counts
    • Recursively scan
      <wiki>/raw/
      to count raw materials (only count, do not read content)
    • Read the last entry in
      <wiki>/wiki/log.md
      to get last activity
    • Read
      <wiki>/MEMORY/
      to count memory files (only file names)
  3. Read the
    <workspace>/MEMORY/MEMORY.md
    index, aggregate according to A2 sorting rules, write INDEX.md + STATS.md (format A2/A3)
  4. Atomic write (POSIX
    tmp + fsync + rename
    )
  5. 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"委托
yzr-llm-wiki-management
query
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
    <workspace>/cross_queries/<slug>.md
    (本 skill 直接写,格式 A4)
归档正文引用上游易变事实时过感知测试——规则 SSOT 见
yzr-llm-wiki-management
references/ingest-workflow.md
「正文引用的稳定性」节。
Triggers: "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:
ModeTrigger KeywordsProcess
local"Only look at wiki X" / "Search Y in X"Delegate query to
yzr-llm-wiki-management
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" / fallbackRoute → 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
    <wiki>/wiki/syntheses/<slug>.md
    (via
    yzr-llm-wiki-management
    )
  • If the answer involves multiple wikis
    <workspace>/cross_queries/<slug>.md
    (directly written by this skill, format A4)
When archiving content that references upstream volatile facts, pass perception tests — SSOT rules can be found in the "Stability of Body References" section of
yzr-llm-wiki-management
's
references/ingest-workflow.md
.

3. Link(跨 wiki 交叉引用)

3. Link (Cross-wiki Cross-referencing)

触发:"wiki A 里的 entity X 在 wiki B 也存在,加链接" / "扫一下跨 wiki 重复 entity"。
流程
  1. 扫描:对每个 wiki 的
    wiki/entities/
    +
    wiki/concepts/
    ,提取所有 entity name(frontmatter
    title
    或文件名 slug)
  2. 去重聚合:跨 wiki 同名 / 近义(用 description 比对)的 entity 收集为候选对
  3. 建议:对话中列出候选对,让用户选哪些要加跨 wiki 链接
  4. 写入:用户确认后,对每个涉及的 wiki,调用
    yzr-llm-wiki-management
    的 ingest 流程更新对应 entity / concept 页——追加"跨 wiki 引用"段(xref 格式见
    <workspace>/AGENTS.md
    的「跨 wiki 约定」节)
Triggers: "Entity X in wiki A also exists in wiki B, add a link" / "Scan for cross-wiki duplicate entities".
Process:
  1. Scan: For each wiki's
    wiki/entities/
    +
    wiki/concepts/
    , extract all entity names (frontmatter
    title
    or filename slug)
  2. Deduplicate and aggregate: Collect cross-wiki entities with the same name / similar meaning (compared by description) as candidate pairs
  3. Suggest: List candidate pairs in conversation and let the user select which ones need cross-wiki links
  4. Write: After user confirmation, for each involved wiki, call the ingest process of
    yzr-llm-wiki-management
    to update the corresponding entity / concept page — append a "Cross-wiki References" section (xref format see the "Cross-wiki Agreements" section of
    <workspace>/AGENTS.md
    )

4. Lint(workspace 级)

4. Lint (Workspace-level)

触发:"workspace lint" / "workspace 健康检查" / 定期(如每次 scan 时顺带)。
流程
  1. workspace 级 deterministic 检查(agent 内联):
    • 重复 entity 跨 wiki(同名 + 不同 slug 的对)
    • 失效跨 wiki 链接(cross_queries/*.md 的
      sources
      路径不存在;
      <wiki>/wiki/**
      中的
      ../<another-wiki>/...
      路径不存在)
    • 未注册的 wiki 子目录(磁盘上有
      <wiki>/AGENTS.md
      但 workspace.toml 没有注册)
    • workspace.toml 注册但磁盘上不存在的 wiki(孤儿注册)
    • STATS.md 与 INDEX.md 的 wiki 列表是否一致
    • MEMORY 索引一致性:扫
      <workspace>/MEMORY/*.md
      (排除
      MEMORY.md
      ),任一文件未在
      MEMORY/MEMORY.md
      索引列出 → 报
      memory-not-indexed
      (severity = info)
  2. 半定性检查
    • 主题重叠的 wiki 是否需要合并
    • tag 体系是否混乱(同名 tag 含义不同 / 同含义 tag 命名不一)
  3. 本 skill 不做的:单 wiki 内部 lint——转交
    yzr-llm-wiki-management
  4. 输出:写
    <workspace>/LINT.md
    (格式 A5)+ 对话中报告
何时不做 lint:用户只问 query → 不 lint;用户说"扫一下" → scan 而非 lint。
Triggers: "Workspace lint" / "Workspace health check" / Periodically (e.g., alongside each scan).
Process:
  1. Workspace-level deterministic checks (inline in agent):
    • Cross-wiki duplicate entities (pairs with same name but different slugs)
    • Invalid cross-wiki links (paths in
      sources
      of cross_queries/*.md do not exist;
      ../<another-wiki>/...
      paths in
      <wiki>/wiki/**
      do not exist)
    • Unregistered wiki subdirectories (
      <wiki>/AGENTS.md
      exists on disk but not registered in workspace.toml)
    • 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
      <workspace>/MEMORY/*.md
      (excluding
      MEMORY.md
      ), if any file is not listed in
      MEMORY/MEMORY.md
      index → report
      memory-not-indexed
      (severity = info)
  2. 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)
  3. What this skill does not do: Single-wiki internal lint — delegate to
    yzr-llm-wiki-management
  4. Output: Write
    <workspace>/LINT.md
    (format A5) + report in conversation
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观察 → 转交
yzr-llm-wiki-management
跨 wiki 综合答案本身 → 归档
cross_queries/
一次性观察 → 直接 chat。
完整"何时写/不写" + 判别尺度 canonical =
<workspace>/AGENTS.md
的「Memory 纪律」节(byte-owned 模板渲染),本附录不重复。
流程
  1. 识别值得沉淀的观察 → scope 自检确认跨 wiki
  2. 判别条目形式(完整 / 短)
  3. 写入
    MEMORY/<slug>.md
    (完整条目)或直接在
    MEMORY/MEMORY.md
    追加短条目一行
  4. 同步
    MEMORY.md
    索引一行
    (漏写 = 下次读不到,lint
    memory-not-indexed
    兜底)
不动
<workspace>/INDEX.md
/
STATS.md
/
LINT.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
yzr-llm-wiki-management
; Cross-wiki synthetic answers themselves → archive to
cross_queries/
; One-time observations → directly chat.
The complete "when to write/not write" + judgment scale canonical = "Memory Discipline" section (byte-owned template rendering) of
<workspace>/AGENTS.md
, not repeated in this appendix.
Process:
  1. Identify observations worth preserving → self-check scope to confirm cross-wiki
  2. Determine entry format (full / short)
  3. Write to
    MEMORY/<slug>.md
    (full entry) or append a short entry line directly to
    MEMORY/MEMORY.md
  4. Synchronize one line in MEMORY.md index (missing write = unreadable next time, lint
    memory-not-indexed
    as fallback)
Do not modify
<workspace>/INDEX.md
/
STATS.md
/
LINT.md
/ any
<wiki>/MEMORY/
.

6. Upgrade(升级 workspace 骨架)

6. Upgrade (Upgrade Workspace Skeleton)

触发:"升级 workspace / 检查 workspace 版本 / format 升级"。
llmw upgrade
(CLI)= 全部确定性操作——workspace 骨架 + 逐 wiki 聚合两段式,按
<workspace>/AGENTS.md
的「本文件本身的纪律」节(含骨架所有权四分表)分类处理。
llmw check-fixtures
仅探测(不写盘)。agent = 跑命令 + 解读输出。
流程
  1. llmw upgrade
    默认 dry-run → 输出 workspace + 各 wiki 的处理计划 + 3 终态 JSON(加
    --json
    机器可读)
  2. 解读 3 终态
    • done
      → 收尾,提示用户"workspace 升级完成,X 个 wiki 已升"
    • blocked_drift
      → 按
      hint
      字段把自定义内容搬
      MEMORY/
      ,再
      llmw upgrade --apply --yes
      重跑
    • verify_failed
      → 报告用户,转人工
  3. 各 wiki 的后续内容迁移走
    yzr-llm-wiki-management
    工作流——本 skill 不代跑
INDEX.md
/
STATS.md
/
LINT.md
(升级不是 scan / lint 事件)。升级只动 byte/block/header-owned 类文件,不碰含密配置。
Triggers: "Upgrade workspace / Check workspace version / Format upgrade".
llmw upgrade
(CLI) = All deterministic operations — workspace skeleton + per-wiki aggregated two-stage processing, handled according to the "Discipline of This File Itself" section (including skeleton ownership quadrant table) of
<workspace>/AGENTS.md
.
llmw check-fixtures
only detects (no disk writes). Agent = run command + interpret output.
Process:
  1. llmw upgrade
    defaults to dry-run → output workspace + processing plan for each wiki + 3 final-state JSON (add
    --json
    for machine-readable)
  2. Interpret 3 final states:
    • done
      → Wrap up, prompt user "Workspace upgrade completed, X wikis upgraded"
    • blocked_drift
      → Move custom content to
      MEMORY/
      according to the
      hint
      field, then re-run
      llmw upgrade --apply --yes
    • verify_failed
      → Report to user, escalate to manual processing
  3. Subsequent content migration for each wiki uses the
    yzr-llm-wiki-management
    workflow — this skill does not run it on behalf of the user
Do not write to
INDEX.md
/
STATS.md
/
LINT.md
(upgrade is not a scan / lint event). Upgrade only modifies byte/block/header-owned files, does not touch confidential configurations.

参考样例

Reference Examples

样例 1:跨 wiki 综合问答

Example 1: Cross-wiki Synthetic Q&A

用户:"我所有 wiki 中关于 RAID 有什么记录?"
  1. skill 读
    <workspace>/INDEX.md
    → 找到
    huawei_storage_wiki
    的描述含"存储"
  2. mode = synthesis
  3. 转交
    yzr-llm-wiki-management
    huawei_storage_wiki
    做 query:"RAID"
  4. 拿到答案(带 source 页引用),对话中给用户,附"只涉及 1 个 wiki,是否归档到
    huawei_storage_wiki/wiki/syntheses/raid-overview.md
    ?"
  5. 用户确认 → 走
    yzr-llm-wiki-management
    写 synthesis 页 + log 条目
User: "What records do I have about RAID across all my wikis?"
  1. Skill reads
    <workspace>/INDEX.md
    → finds that
    huawei_storage_wiki
    's description contains "storage"
  2. Mode = synthesis
  3. Delegates query "RAID" to
    yzr-llm-wiki-management
    for
    huawei_storage_wiki
  4. 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
    ?"
  5. User confirms → uses
    yzr-llm-wiki-management
    to write synthesis page + log entry

样例 2:路由

Example 2: Routing

用户:"我刚下了一篇 LLM inference 论文,应该放哪个 wiki?"
  1. skill 读 INDEX.md + 读每个 wiki 的 description / tags
  2. mode = route
  3. 返回:"
    huawei_storage_wiki
    主题是存储,不相关;
    test
    wiki 主题是 test,也不相关;建议新建一个 wiki(
    llmw wiki --name=llm-inference add ...
    )"
  4. 提议代跑
    llmw wiki --name=llm-inference add
    ——用户确认后执行(skill 在场做 route,顺手闭环)
User: "I just downloaded an LLM inference paper, which wiki should I put it in?"
  1. Skill reads INDEX.md + reads description / tags of each wiki
  2. Mode = route
  3. Returns: "
    huawei_storage_wiki
    focuses on storage, not relevant;
    test
    wiki focuses on test, not relevant; recommend creating a new wiki (
    llmw wiki --name=llm-inference add ...
    )"
  4. Offers to run
    llmw wiki --name=llm-inference add
    on behalf of the user — execute after user confirmation (skill handles routing and closes the loop)

参考文件

Reference Documents

  • 必读
    <workspace>/AGENTS.md
    (=
    workspace-agents-md-template.md
    模板渲染稿,byte-owned)——workspace 级契约的 canonical
  • 单 wiki 契约
    yzr-llm-wiki-management
    SKILL.md + references/(本 skill 读 wiki 文件时按其契约理解,不直接写)
  • CLI 文档:workspace CLI(命令
    llmw
    ,与本 skill 同仓维护)——
    init / add / remove / config / enter / model ...
    命令参考此处
  • Required Reading:
    <workspace>/AGENTS.md
    (= rendered from
    workspace-agents-md-template.md
    template, byte-owned) — canonical workspace-level contract
  • Single-wiki Contract:
    yzr-llm-wiki-management
    SKILL.md + references/ (this skill reads wiki files according to its contract, does not write directly)
  • CLI Documentation: Workspace CLI (command
    llmw
    , maintained in the same repo as this skill) — reference for commands like
    init / add / remove / config / enter / model ...
    here

附录:产物格式契约与读取契约

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 代码;
    workspace-toml-reads-satisfied
    check 校验读取契约完整性
skill 实际读取的字段
scan
/
upgrade
用):
字段用途
templates_version
llmw upgrade
版本比对 + 自动 bump(含
workspace_format
/
wiki_format
双分量)
[wikis.<name>].path
skill
scan
遍历 wiki 子目录
[wikis.<name>].created_at
INDEX 内 wiki 排序
  • Path:
    <workspace-root>/workspace.toml
  • Complete schema authority is in CLI code;
    workspace-toml-reads-satisfied
    check verifies reading contract integrity
Fields actually read by the skill (used in
scan
/
upgrade
):
FieldPurpose
templates_version
llmw upgrade
version comparison + automatic bump (includes
workspace_format
/
wiki_format
dual components)
[wikis.<name>].path
Skill
scan
traverses wiki subdirectories
[wikis.<name>].created_at
Wiki sorting within INDEX

A2. INDEX.md

A2. INDEX.md

  • 维护方:skill
    scan
    时写;CLI 不写
  • 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
    scan
    ; CLI does not write
  • Required frontmatter (A7) +
    type: workspace-index
    ;
    title
    recommended as
    "Workspace Index"
    ;
    tags
    recommended as
    [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
    scan
    时一并写;与 INDEX.md 区别:结构化(表格)
  • frontmatter 必填(A7) +
    type: workspace-stats
  • 正文骨架:
    # <Workspace> — Workspace Stats
    +
    ## Overview
    总表 +
    ## Per-wiki
    每 wiki 一节分表(pages / entities / concepts / sources / comparisons / syntheses / raw_files / last_log_entry / tags / memory_files)
  • skill 写入场景:
    scan
    (与 INDEX.md 同一次刷新)
  • Maintainer: Skill writes alongside
    scan
    ; difference from INDEX.md: structured (table)
  • Required frontmatter (A7) +
    type: workspace-stats
  • Body skeleton:
    # <Workspace> — Workspace Stats
    +
    ## Overview
    summary table +
    ## Per-wiki
    section with per-wiki sub-tables (pages / entities / concepts / sources / comparisons / syntheses / raw_files / last_log_entry / tags / memory_files)
  • Skill write scenario:
    scan
    (same refresh as INDEX.md)

A4. cross_queries/

A4. cross_queries/

  • 维护方:skill
    query
    输出适合归档时
    Write
  • 文件命名:
    <slug>.md
    ,kebab-case
    ^[a-z0-9][a-z0-9-]*$
    (A8)
  • frontmatter 必填(A7) +
    type: cross-query
    tags
    推荐
    [workspace, cross-query, <涉及 wiki 的 tag>...]
    ;必填
    sources
    (引用 wiki 内页路径数组)+
    wikis
    (涉及 wiki 名数组)
  • skill 写入场景:
    query
    输出用户确认归档时
  • Maintainer: Skill writes when query output is suitable for archiving
  • File naming:
    <slug>.md
    , kebab-case
    ^[a-z0-9][a-z0-9-]*$
    (A8)
  • Required frontmatter (A7) +
    type: cross-query
    ;
    tags
    recommended as
    [workspace, cross-query, <tags of involved wikis>...]
    ; required
    sources
    (array of paths to wiki pages referenced, relative to workspace root) +
    wikis
    (array of involved wiki names)
  • 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>)
    +
    ## Per-wiki Issues
    (每 wiki 一段,本 wiki 内 lint 走 yzr-llm-wiki-management)+
    ## Workspace-level Issues
    (跨 wiki 重复 entity / 未注册子目录 / STATS 过期 / MEMORY 索引一致 / ...)
  • skill 写入场景:
    lint
    (每次覆盖)
  • Maintainer: Skill writes the latest report during
    lint
    (does not accumulate, overwrites each time, is a snapshot)
  • Required frontmatter (A7) +
    type: workspace-lint
  • Body skeleton:
    # <Workspace> — Lint Report (<YYYY-MM-DD>)
    +
    ## Per-wiki Issues
    (one section per wiki, single-wiki lint goes to yzr-llm-wiki-management) +
    ## Workspace-level Issues
    (cross-wiki duplicate entities / unregistered subdirectories / outdated STATS / MEMORY index consistency / ...)
  • Skill write scenario:
    lint
    (overwrites each time)

A6. workspace MEMORY/

A6. workspace MEMORY/

  • 维护方:CLI init 时创建空目录 + 写
    MEMORY/MEMORY.md
    索引占位;后续条目由 skill 写入 + 同步追加 MEMORY.md 索引一行。人类不写;CLI 不写
  • MEMORY 不在 INDEX.md 中强制列出(agent 私有入口)
  • 条目形式(完整 / 短)+ 何时写/不写 + 索引行格式 canonical =
    <workspace>/AGENTS.md
    的「Memory 纪律」节(byte-owned 模板渲染),本附录不重复
  • Maintainer: CLI creates empty directory and writes
    MEMORY/MEMORY.md
    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 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
    <workspace>/AGENTS.md
    , not repeated in this appendix

A6.1 MEMORY/MEMORY.md(索引)

A6.1 MEMORY/MEMORY.md (Index)

无 frontmatter(被
<workspace>/AGENTS.md
@MEMORY/MEMORY.md
@import
内联加载);正文:顶部 1 段说明 +
## 索引
段(完整/短两条格式共存)。
No frontmatter (loaded inline via
@MEMORY/MEMORY.md
@import
in
<workspace>/AGENTS.md
); body: 1 introductory paragraph at the top +
## Index
section (coexistence of full/short entry formats).

A6.2 MEMORY/*.md(非 MEMORY.md)

A6.2 MEMORY/*.md (excluding MEMORY.md)

frontmatter 仅
title
必填;
type
若写固定
workspace-memory
(与 wiki 侧 MEMORY 解耦口径对齐);
created
/
updated
/
tags
/
description
/
wikis
全 optional。lint
memory-not-indexed
兜底;不强制 inbound 链接,不在 INDEX.md 列出。
Only
title
is required in frontmatter;
type
can be fixed as
workspace-memory
(aligned with wiki-side MEMORY decoupling specification);
created
/
updated
/
tags
/
description
/
wikis
are all optional. Lint
memory-not-indexed
as fallback; no mandatory inbound links, not listed in INDEX.md.

A7. Frontmatter 字段通用规则

A7. General Frontmatter Field Rules

通用必填 5 项(workspace 级 markdown,MEMORY/*.md 例外——见 A6.2):
字段类型说明
title
string不含扩展名
type
enum见下表
tags
array可空
created
date
YYYY-MM-DD
updated
date
YYYY-MM-DD
type
取值
(workspace 级 markdown):
type
备注
workspace-index
<workspace>/INDEX.md
(唯一)
workspace-stats
<workspace>/STATS.md
(唯一)
workspace-lint
<workspace>/LINT.md
(唯一)
cross-query
<workspace>/cross_queries/<slug>.md
workspace-memory
<workspace>/MEMORY/*.md
(若写 type;optional)
类型特化字段
字段适用 type必填含义
sources
cross-query
引用的 wiki 内页路径数组(相对 workspace 根)
wikis
cross-query
/
workspace-memory
cross-query
是 /
workspace-memory
推荐
涉及的 wiki 名列表
description
所有推荐一句话
字段语义写法(怎么写好
title
/
description
/
tags
)SSOT =
yzr-llm-wiki-management
page-templates.md §一。
5 general required fields (workspace-level markdown, except MEMORY/*.md — see A6.2):
FieldTypeDescription
title
stringWithout file extension
type
enumSee table below
tags
arrayCan be empty
created
date
YYYY-MM-DD
updated
date
YYYY-MM-DD
type
values
(workspace-level markdown):
type
Notes
workspace-index
<workspace>/INDEX.md
(unique)
workspace-stats
<workspace>/STATS.md
(unique)
workspace-lint
<workspace>/LINT.md
(unique)
cross-query
<workspace>/cross_queries/<slug>.md
workspace-memory
<workspace>/MEMORY/*.md
(if type is written; optional)
Type-specialized fields:
FieldApplicable typeRequiredMeaning
sources
cross-query
YesArray of paths to referenced wiki pages (relative to workspace root)
wikis
cross-query
/
workspace-memory
Required for
cross-query
/ recommended for
workspace-memory
List of involved wiki names
description
AllRecommendedOne-sentence description
Semantic writing rules for fields (how to write good
title
/
description
/
tags
) SSOT = §1 of
yzr-llm-wiki-management
page-templates.md.

A8. 命名约束

A8. Naming Constraints

本表只承载 skill 写盘文件的命名约束(这些文件 CLI 不读写、无机械 gate,约束唯一承载点 = 本节)。wiki name(
llmw wiki add
创建时校验)与 CLI 内部标识符归 CLI;wiki 命名推荐风格见
<workspace>/AGENTS.md
的「跨 wiki 约定」节。
维度规则适用对象
cross_query slugkebab-case
^[a-z0-9][a-z0-9-]*$
cross_queries/<slug>.md
MEMORY 文件名kebab-case
^[a-z0-9][a-z0-9-]*$
<workspace>/MEMORY/*.md
(MEMORY.md 例外)
frontmatter 字段名严格小写 + 下划线所有 workspace 级 markdown
frontmatter
type
严格小写 + 连字符(
workspace-index
/
workspace-memory
等)
所有 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
llmw wiki add
) and CLI internal identifiers belong to CLI; recommended wiki naming style can be found in the "Cross-wiki Agreements" section of
<workspace>/AGENTS.md
.
DimensionRuleApplicable Object
cross_query slugkebab-case
^[a-z0-9][a-z0-9-]*$
cross_queries/<slug>.md
MEMORY filenamekebab-case
^[a-z0-9][a-z0-9-]*$
<workspace>/MEMORY/*.md
(except MEMORY.md)
frontmatter field nameStrict lowercase + underscoreAll workspace-level markdown
frontmatter
type
value
Strict lowercase + hyphen (e.g.,
workspace-index
/
workspace-memory
)
All workspace-level markdown