repo-wiki-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Repo Wiki

仓库维基

Overview

概述

Create a large, accurate, multi-page Markdown wiki directory for a substantial repository. This skill is optimized for codebases large enough to create maintainer pressure: monorepos, frameworks, compilers, platforms, services, or products with hundreds of thousands of lines of code. Prefer evidence from files over guesses, cover the whole repository at useful granularity, and explain core code, decisions, algorithms, and tradeoffs in dedicated pages.
为大型仓库创建一个内容详实、准确的多页面Markdown维基目录。本技能针对会给维护者带来压力的大型代码库进行优化:如单体仓库、框架、编译器、平台、服务或拥有数十万行代码的产品。优先基于文件证据而非猜测,以实用的粒度覆盖整个仓库,并在专门页面中讲解核心代码、决策、算法及权衡方案。

Operating Principles

操作原则

  • Produce a wiki directory, not a single giant Markdown file, unless the user explicitly asks for one file.
  • Default output directory:
    docs/wiki/
    .
  • Read the repository as a system, not as isolated files.
  • Optimize for maintainers and code learners who need to navigate a large, stressful codebase.
  • Be exhaustive in coverage but selective in depth: explain important, surprising, or risky code paths deeply; summarize boilerplate and generated code briefly.
  • Ground claims in concrete file paths, symbols, config names, scripts, tests, and observed behavior.
  • Mark uncertainty explicitly when evidence is incomplete.
  • Use Mermaid and KaTeX when they clarify architecture, data flow, state machines, dependency graphs, or algorithms. Prefer Mermaid for diagrams in plain wiki output. Use Graphviz (DOT) only when the user explicitly requests a documentation site, since it requires a build-time plugin to render.
  • Treat numeric size targets as a floor, not the goal. Passing the quality checker is necessary but never sufficient; do not write repetitive, template-heavy, file-index-dominated, or count-driven prose.
  • Do not bulk-generate a wiki from file names alone. Use scripts for inventory and quality checks, but write architecture, subsystem, algorithm, and maintainer guidance from actual source reading and design reasoning.
  • Scripts may scaffold navigation and inventories, but they must not author the core explanatory prose. Manually synthesize the architecture pages from source evidence before producing broad generated support pages.
  • Treat documentation-site deployment as optional. If the user asks to publish the wiki as an Rspress/docs site, read
    references/rspress_docs_site.md
    ; otherwise do not include site setup in the main workflow.
  • 生成维基目录,而非单个大型Markdown文件,除非用户明确要求生成单个文件。
  • 默认输出目录:
    docs/wiki/
  • 将仓库作为一个系统来研读,而非孤立的文件集合。
  • 针对需要驾驭大型复杂代码库的维护者和代码学习者进行优化。
  • 覆盖范围要全面,但深度需有所取舍:对重要、特殊或高风险的代码路径进行深度讲解;对样板代码和生成代码进行简要总结。
  • 所有结论需基于具体的文件路径、符号、配置名称、脚本、测试及观测到的行为。
  • 当证据不足时,需明确标注不确定性。
  • 当有助于阐明架构、数据流、状态机、依赖图或算法时,使用Mermaid和KaTeX。在纯维基输出中优先使用Mermaid绘制图表。仅当用户明确要求搭建文档站点时才使用Graphviz(DOT),因为它需要构建时插件才能渲染。
  • 将数字规模目标视为最低要求,而非最终目标。通过质量检查是必要条件,但绝非充分条件;请勿撰写重复、模板化、以文件索引为主或为凑数量而生硬堆砌的内容。
  • 不得仅通过文件名批量生成维基内容。可使用脚本进行清单整理和质量检查,但架构、子系统、算法及维护指南需基于实际源码研读和设计推理来撰写。
  • 脚本可用于搭建导航结构和生成清单,但不得撰写核心解释性内容。需先基于源码证据手动整合架构页面,再生成广泛的支持页面。
  • 将文档站点部署视为可选操作。如果用户要求将维基发布为Rspress/docs站点,请阅读
    references/rspress_docs_site.md
    ;否则主工作流程中不包含站点搭建步骤。

Standard Workflow

标准工作流程

1. Establish Scope and Output Target

1. 确定范围和输出目标

Confirm or infer:
  • Repository root and any subdirectory scope.
  • Output directory. If not specified, create
    docs/wiki/
    .
  • Desired language and audience if the user specifies them.
If not specified, produce a multi-page wiki directory aimed at repository learners and new maintainers.
确认或推断:
  • 仓库根目录及任何子目录范围。
  • 输出目录。若未指定,则创建
    docs/wiki/
  • 用户指定的目标语言和受众(如有)。
若未指定,生成面向仓库学习者和新维护者的多页面维基目录。

2. Create a Repository Map

2. 创建仓库映射

Use fast local inspection before detailed reading. Prefer
rg --files
,
find
, and language-native metadata commands. Run
scripts/repo_snapshot.cjs
with Node when useful to generate a structured inventory without loading every file into context.
Recommended first pass:
bash
node <skill_dir>/scripts/repo_snapshot.cjs <repo_root> --output /tmp/repo-snapshot.md
Inspect at least:
  • Root documentation:
    README*
    ,
    CONTRIBUTING*
    ,
    CHANGELOG*
    ,
    LICENSE*
    ,
    docs/
    ,
    wiki/
    .
  • Package and build metadata:
    package.json
    ,
    pnpm-workspace.yaml
    ,
    Cargo.toml
    ,
    go.mod
    ,
    pyproject.toml
    ,
    requirements*.txt
    ,
    pom.xml
    ,
    build.gradle
    ,
    Makefile
    , CI configs.
  • Source roots:
    src/
    ,
    lib/
    ,
    app/
    ,
    packages/
    ,
    crates/
    ,
    cmd/
    ,
    internal/
    ,
    pkg/
    ,
    tests/
    ,
    examples/
    .
  • Configuration: bundlers, linters, formatters, test runners, codegen, deployment, Docker, environment examples.
  • Generated, vendored, lock, build, and cache directories; identify but do not deeply read unless relevant.
在深度阅读前,先进行快速本地检查。优先使用
rg --files
find
及语言原生元数据命令。必要时使用Node运行
scripts/repo_snapshot.cjs
,在不将所有文件加载到上下文的情况下生成结构化清单。
推荐的首次检查命令:
bash
node <skill_dir>/scripts/repo_snapshot.cjs <repo_root> --output /tmp/repo-snapshot.md
至少检查以下内容:
  • 根目录文档:
    README*
    CONTRIBUTING*
    CHANGELOG*
    LICENSE*
    docs/
    wiki/
  • 包和构建元数据:
    package.json
    pnpm-workspace.yaml
    Cargo.toml
    go.mod
    pyproject.toml
    requirements*.txt
    pom.xml
    build.gradle
    Makefile
    、CI配置文件。
  • 源码根目录:
    src/
    lib/
    app/
    packages/
    crates/
    cmd/
    internal/
    pkg/
    tests/
    examples/
  • 配置文件:打包工具、代码检查工具、格式化工具、测试运行器、代码生成工具、部署配置、Docker配置、环境示例。
  • 生成目录、第三方依赖目录、锁文件目录、构建目录及缓存目录;识别这些目录但无需深度研读,除非相关。

3. Build a Wiki Plan

3. 制定维基计划

Before writing pages, create a short plan for the wiki directory:
  • index.md
    : navigation hub, audience, reading order, executive summary.
  • repository-map.md
    : top-level directory and package tour.
  • architecture/
    : architecture overview and major runtime flows.
  • modules/
    : module, package, or directory deep dives; use one file only for simple modules, and use subdirectories with multiple pages for complex modules.
  • subsystems/
    : core domain, algorithm, state, persistence, network, security, plugin, or compiler subsystems; use one file only for simple subsystems, and use subdirectories with multiple pages for complex subsystems.
  • development/
    : setup, build, test, lint, debug, release, CI, and operations.
  • maintainer-playbook.md
    : common change recipes, safe edit points, risks, troubleshooting.
  • reference/
    : glossary, file index, symbol index, open questions.
Adapt this structure to the repository, but keep the output multi-page and navigable.
Before bulk writing, identify the repository's actual design centers: the primary runtime path, the core data model, boundary interfaces, configuration model, persistence/cache/network layers, extension points, and tests that define behavior. Turn those into named architecture or subsystem pages first. File indexes and module catalogs come later and must not dominate the wiki.
Create and keep a short
analysis-plan.md
or equivalent scratch outline while working. It should list the design centers, the source files already read for each one, the main hypotheses, and which wiki pages will explain them. Delete or omit this scratch file from the final wiki unless the user wants process notes.
在撰写页面之前,为维基目录制定一个简短计划:
  • index.md
    :导航中心、受众说明、阅读顺序、执行摘要。
  • repository-map.md
    :顶层目录和包导览。
  • architecture/
    :架构概述及主要运行时流程。
  • modules/
    :模块、包或目录深度剖析;简单模块使用单个文件,复杂模块使用包含多个页面的子目录。
  • subsystems/
    :核心领域、算法、状态、持久化、网络、安全、插件或编译器子系统;简单子系统使用单个文件,复杂子系统使用包含多个页面的子目录。
  • development/
    :环境搭建、构建、测试、代码检查、调试、发布、CI及运维流程。
  • maintainer-playbook.md
    :常见变更方案、安全修改点、风险点、故障排查指南。
  • reference/
    :术语表、文件索引、符号索引、待解决问题。
根据仓库情况调整此结构,但需保持输出为多页面且便于导航。
在批量撰写之前,确定仓库的实际设计核心:主要运行路径、核心数据模型、边界接口、配置模型、持久化/缓存/网络层、扩展点及定义行为的测试。先将这些内容转化为命名的架构或子系统页面。文件索引和模块目录需延后处理,且不得占据维基的主导地位。
工作过程中创建并保留一个简短的
analysis-plan.md
或等效的草稿大纲。其中应列出设计核心、已研读的源码文件、主要假设以及将解释这些内容的维基页面。最终维基中需删除或省略此草稿文件,除非用户需要过程记录。

4. Read Deeply by Importance

4. 按优先级深度研读

Prioritize detailed reading in this order:
  1. Public APIs, entry points, CLI commands, server routes, plugin hooks, exported packages.
  2. Core domain modules and orchestration code.
  3. Algorithms, parsers, compilers, schedulers, state machines, caching, concurrency, security, persistence, network boundaries, and error handling.
  4. Tests that reveal expected behavior and edge cases.
  5. Build, CI, release, and developer tooling.
  6. Examples, fixtures, migrations, generated artifacts, and legacy code.
For each important subsystem, identify:
  • Key files and symbols.
  • Responsibilities and boundaries.
  • Inputs, outputs, side effects, and invariants.
  • Happy paths and failure paths.
  • Design tradeoffs and likely reasons for the shape of the code.
  • Tests or missing tests.
  • Maintenance hazards and safe modification points.
For each deep-dive page, read enough implementation and tests to support all of these design-quality signals: design/architecture, control or data flow, tradeoffs or decisions, invariants or contracts, failure modes, testing evidence, and maintainer risks. If you cannot support most signals from source, downgrade the page to medium coverage instead of padding it.
按以下优先级进行深度阅读:
  1. 公共API、入口点、CLI命令、服务器路由、插件钩子、导出包。
  2. 核心领域模块和编排代码。
  3. 算法、解析器、编译器、调度器、状态机、缓存、并发、安全、持久化、网络边界及错误处理。
  4. 揭示预期行为和边缘情况的测试。
  5. 构建、CI、发布及开发者工具。
  6. 示例、测试数据、迁移脚本、生成产物及遗留代码。
针对每个重要子系统,确定:
  • 关键文件和符号。
  • 职责和边界。
  • 输入、输出、副作用及不变量。
  • 正常路径和异常路径。
  • 设计权衡及代码结构的可能原因。
  • 已有的测试或缺失的测试。
  • 维护风险点和安全修改点。
针对每个深度剖析页面,需研读足够的实现代码和测试,以支撑所有这些设计质量信号:设计/架构、控制流或数据流、权衡或决策、不变量或契约、故障模式、测试证据及维护风险。如果无法从源码中支撑大部分信号,则将页面降级为中等覆盖度,而非生硬填充内容。

5. Write the Wiki Directory

5. 撰写维基目录

Use the outline in
references/wiki_structure.md
as the default directory framework. Adapt file names and headings to the repository instead of forcing irrelevant sections.
Write the first pass in this order:
  1. index.md
    ,
    repository-map.md
    , architecture overview, and maintainer playbook.
  2. End-to-end runtime flows and the 5-15 hardest subsystems.
  3. Complex module directories with separate design, flow, testing, and maintainer pages.
  4. Supporting module pages, development pages, glossary, and indexes.
Do not start by generating hundreds of near-identical file pages. A file index is allowed only as a navigation aid after the conceptual pages are useful.
Do not label pages as generated, do not include repeated numbered maintenance sections, and do not use generic phrases like "needs maintainer confirmation" as a substitute for analysis. Use bounded open questions only after explaining what the code does prove.
The wiki directory should normally include:
  • A root
    index.md
    with a complete page index and recommended reading paths.
  • Repository map and directory tour.
  • Quickstart for local development.
  • Architecture overview with diagrams.
  • End-to-end execution path pages.
  • Module/package/directory deep-dive pages or subdirectories.
  • Core subsystem pages or subdirectories.
  • Important algorithms, data structures, and invariants.
  • Configuration, build, test, release, and operations pages.
  • Maintainer playbook with common change recipes.
  • Troubleshooting, glossary, file index, symbol index, and open questions.
references/wiki_structure.md
中的大纲作为默认目录框架。根据仓库情况调整文件名和标题,而非强行添加无关章节。
按以下顺序完成初稿:
  1. index.md
    repository-map.md
    、架构概述及维护者手册。
  2. 端到端运行时流程及5-15个最复杂的子系统。
  3. 包含单独设计、流程、测试及维护页面的复杂模块目录。
  4. 支持性模块页面、开发页面、术语表及索引。
不要从生成数百个近乎相同的文件页面开始。只有在概念页面具备实用价值后,才可将文件索引作为导航辅助工具。
不要将页面标记为自动生成,不要包含重复的编号维护章节,不要使用诸如“需维护者确认”之类的通用短语替代分析内容。只有在解释完代码已证明的内容后,才可提出有边界的开放性问题。
维基目录通常应包含:
  • 根目录
    index.md
    ,包含完整的页面索引和推荐阅读路径。
  • 仓库映射和目录导览。
  • 本地开发快速入门。
  • 带图表的架构概述。
  • 端到端执行路径页面。
  • 模块/包/目录深度剖析页面或子目录。
  • 核心子系统页面或子目录。
  • 重要算法、数据结构及不变量。
  • 配置、构建、测试、发布及运维页面。
  • 包含常见变更方案的维护者手册。
  • 故障排查、术语表、文件索引、符号索引及待解决问题。

Minimum Size and Structure Targets

最小规模和结构目标

Do not produce a short overview. This skill is for codebases where maintainers need serious documentation. The quality checker supports two modes:
Dynamic mode (recommended): Pass the project's lines of code with
--loc
and let the script compute proportional thresholds. This avoids over- or under-sizing the wiki relative to the project:
bash
node <skill_dir>/scripts/wiki_quality_check.cjs <wiki_dir> --loc <project_loc>
The formula scales words (~4× LOC), files (~1 per 2000 LOC), file references (~7% of LOC), and deep-dive pages proportionally. Anti-padding checks remain fixed.
Language note (CJK / non-English wikis): The word-count and non-blank-line targets are calibrated for English prose, where roughly one token equals one word. Chinese, Japanese, and Korean writing is far more information-dense per character, so the same architecture explained well in Chinese produces a much lower word count. The checker auto-detects the CJK ratio and softens the word/line targets accordingly (a pure-CJK wiki gets roughly half the English word target); structure, file-reference, deep-dive, and anti-padding thresholds are language-independent and are never softened. Even after softening, a CJK wiki may still FAIL the word count — that is acceptable when the anti-padding gates are clean and the design depth is real. Never pad to hit a word number; that trades quality for a metric the skill explicitly forbids.
Profile mode (reference baselines for very large projects):
ProfileTypical triggerMinimum target
Largesubstantial application/library, tens of thousands of LOC30+ Markdown files, 250,000+ words, 15,000+ non-blank lines, 1,200+ headings, 1,800+ unique backticked file references
Hugehundreds of thousands of LOC, monorepo/platform/framework80+ Markdown files, 600,000+ words, 35,000+ non-blank lines, 2,600+ headings, 4,500+ unique backticked file references
Massivevery large monorepo or multi-product system150+ Markdown files, 1,200,000+ words, 70,000+ non-blank lines, 5,200+ headings, 9,000+ unique backticked file references
These profiles are reference baselines for very large projects. For most repositories, prefer
--loc
mode to get proportional expectations. The checker is an advisory tool, not a hard gate — the real quality standard is design depth, architectural clarity, and usefulness to maintainers.
For an unknown repository, estimate LOC with a quick count (e.g.
find src -name '*.rs' | xargs wc -l
) and use
--loc
. For every substantial top-level directory, create or include a dedicated section/page. For every complex module or core subsystem, prefer a subdirectory with multiple focused pages over one overlong page. Include key files/symbols, how it works, tests, failure modes, and maintainer notes. Prefer adding missing pages and evidence-backed explanations over padding generic prose.
不要生成简短的概述内容。本技能适用于维护者需要专业文档的代码库。质量检查工具支持两种模式:
动态模式(推荐):通过
--loc
参数传入项目代码行数,让脚本计算比例阈值。这样可避免维基规模与项目规模不匹配:
bash
node <skill_dir>/scripts/wiki_quality_check.cjs <wiki_dir> --loc <project_loc>
计算公式会按比例缩放字数(约为LOC的4倍)、文件数(约每2000 LOC对应1个文件)、文件引用数(约为LOC的7%)及深度剖析页面数。反填充检查保持固定。
语言说明(CJK/非英文维基):字数和非空行目标是针对英文 prose 校准的,大致一个token对应一个单词。中文、日文和韩文的字符信息密度远高于英文,因此用中文清晰解释相同架构时,字数会少得多。检查工具会自动检测CJK比例,并相应降低字数/行数目标(纯CJK维基的字数目标约为英文的一半);结构、文件引用、深度剖析及反填充阈值与语言无关,不会降低。即使降低目标后,CJK维基仍可能未通过字数检查——当反填充检查合格且设计深度足够时,这种情况是可接受的。切勿为达到字数要求而生硬填充内容,这会以牺牲质量为代价换取技能明确禁止的指标。
配置文件模式(超大型项目参考基准)
配置文件典型触发场景最低目标
Large大型应用/库,数万行LOC30+个Markdown文件,250,000+单词,15,000+非空行,1,200+个标题,1,800+个唯一反引号包裹的文件引用
Huge数十万行LOC,单体仓库/平台/框架80+个Markdown文件,600,000+单词,35,000+非空行,2,600+个标题,4,500+个唯一反引号包裹的文件引用
Massive超大型单体仓库或多产品系统150+个Markdown文件,1,200,000+单词,70,000+非空行,5,200+个标题,9,000+个唯一反引号包裹的文件引用
这些配置文件是超大型项目的参考基准。对于大多数仓库,优先使用
--loc
模式获取比例化预期。检查工具是咨询性工具,而非硬性门槛——真正的质量标准是设计深度、架构清晰度及对维护者的实用性。
对于未知仓库,可通过快速计数估算LOC(例如
find src -name '*.rs' | xargs wc -l
),并使用
--loc
参数。针对每个重要的顶层目录,创建或包含一个专门的章节/页面。针对每个复杂模块或核心子系统,优先使用包含多个聚焦页面的子目录,而非单个过长页面。包含关键文件/符号、工作原理、测试、故障模式及维护说明。优先添加缺失的页面和基于证据的解释,而非填充通用内容。

6. Verify Coverage and Accuracy

6. 验证覆盖范围和准确性

Before finalizing, check:
  • A wiki directory exists, not only one Markdown file.
  • index.md
    links to every major wiki page.
  • Every top-level directory is either explained or explicitly marked as generated/vendor/cache/irrelevant.
  • Every major package/module has at least a short purpose statement.
  • Core entry points and execution paths are traced end-to-end.
  • Claims about behavior are supported by code, tests, config, or docs.
  • Diagrams match the written explanation.
  • Mermaid/Graphviz/KaTeX blocks are syntactically plausible.
  • The wiki distinguishes facts from inferences.
  • Core conceptual pages are not replaceable by tables or file lists; they explain design, data/control flow, tradeoffs, invariants, failure modes, tests, and safe modification points.
  • Repeated boilerplate, numbered generic sections, or copied paragraphs do not count as depth. Rewrite them into repository-specific analysis or remove them.
Run the Node quality gate on the wiki directory and expand the wiki if it fails:
bash
node <skill_dir>/scripts/wiki_quality_check.cjs <wiki_dir> --loc <project_loc>
Use
--profile large|huge|massive
only as reference baselines for very large projects. Prefer
--loc
for proportional expectations. The checker enforces minimum Markdown file count, word count, non-blank lines, headings, H2 sections, unique backticked file references, fenced code blocks, tables, deep-dive page count, repetition limits, banned padding phrases, and index-page dominance limits.
A page only counts as a qualified deep dive when it has enough words, file references, and distinct design-quality signals. This is intentional: a page named
architecture.md
with generic prose should fail the gate.
If the checker passes but a human or follow-up review says the wiki feels superficial, treat that as a real failure. Stop optimizing counts, re-read the core source paths, redesign the wiki around architecture and maintainership, and replace the weak pages rather than defending the metrics.
最终定稿前,检查以下内容:
  • 存在维基目录,而非仅单个Markdown文件。
  • index.md
    链接到所有主要维基页面。
  • 每个顶层目录要么已解释,要么明确标记为生成/第三方依赖/缓存/无关目录。
  • 每个主要包/模块至少有一个简短的用途说明。
  • 核心入口点和执行路径已进行端到端追踪。
  • 关于行为的声明有代码、测试、配置或文档支撑。
  • 图表与书面解释一致。
  • Mermaid/Graphviz/KaTeX块语法合理。
  • 维基区分事实与推断。
  • 核心概念页面无法被表格或文件列表替代;它们解释设计、数据/控制流、权衡方案、不变量、故障模式、测试及安全修改点。
  • 重复的样板内容、编号通用章节或复制的段落不计入深度内容。需将其重写为仓库特定分析内容或删除。
在维基目录上运行Node质量检查工具,若未通过则扩展维基内容:
bash
node <skill_dir>/scripts/wiki_quality_check.cjs <wiki_dir> --loc <project_loc>
仅将
--profile large|huge|massive
作为超大型项目的参考基准。优先使用
--loc
获取比例化预期。检查工具会强制要求最低Markdown文件数、字数、非空行、标题、H2章节、唯一反引号包裹的文件引用、代码块、表格、深度剖析页面数、重复限制、禁用填充短语及索引页面占比限制。
只有当页面具备足够的字数、文件引用及不同的设计质量信号时,才算合格的深度剖析页面。这是有意为之:名为
architecture.md
的页面若仅包含通用内容,应无法通过检查。
若检查工具通过,但人工或后续评审认为维基内容肤浅,需将其视为真正的不合格。停止优化计数指标,重新研读核心源码路径,围绕架构和维护需求重新设计维基,替换薄弱页面,而非为指标辩护。

Diagrams and Math

图表与数学公式

Use diagrams sparingly but concretely.
谨慎但具体地使用图表。

Mermaid

Mermaid

Use Mermaid for architecture, sequence, flow, state, and dependency diagrams:
markdown
```mermaid
flowchart TD
  CLI["CLI entrypoint"] --> Core["Core orchestration"]
  Core --> Adapter["Platform adapter"]
  Core --> Tests["Behavior covered by tests"]
undefined
使用Mermaid绘制架构图、序列图、流程图、状态图及依赖图:
markdown
```mermaid
flowchart TD
  CLI["CLI entrypoint"] --> Core["Core orchestration"]
  Core --> Adapter["Platform adapter"]
  Core --> Tests["Behavior covered by tests"]
undefined

Graphviz

Graphviz

Use Graphviz DOT only when the user has requested a documentation site (Rspress), since it requires
rspress-plugin-viz
to render. Prefer Mermaid for plain Markdown wiki output. Graphviz is useful when clustered subgraph layout or complex dependency visualization is clearer than Mermaid:
markdown
```dot
digraph G {
  rankdir=LR;
  subgraph cluster_core { label="core"; parser; planner; executor; }
  parser -> planner -> executor;
}
undefined
仅当用户要求搭建文档站点(Rspress)时才使用Graphviz DOT,因为它需要
rspress-plugin-viz
才能渲染。纯Markdown维基输出优先使用Mermaid。当集群子图布局或复杂依赖可视化比Mermaid更清晰时,Graphviz会很有用:
markdown
```dot
digraph G {
  rankdir=LR;
  subgraph cluster_core { label="core"; parser; planner; executor; }
  parser -> planner -> executor;
}
undefined

KaTeX

KaTeX

Use KaTeX for formulas, complexity, scoring, or algorithmic invariants:
markdown
The cache hit ratio is $H = \frac{hits}{hits + misses}$, and the lookup path is expected $O(1)$ under normal hash distribution.
使用KaTeX表示公式、复杂度、评分或算法不变量:
markdown
缓存命中率为 $H = \frac{hits}{hits + misses}$,在正常哈希分布下,查找路径的期望时间复杂度为 $O(1)$。

Output Quality Bar

输出质量标准

A strong repo wiki directory:
  • Lets a newcomer explain what the repository does after reading
    index.md
    and the architecture overview.
  • Lets a maintainer find the right page for common changes without scanning a huge single document.
  • Explains why important code is structured as it is, not only what files exist.
  • Calls out non-obvious coupling, invariants, and edge cases.
  • Includes enough file/symbol references to support navigation.
  • Meets or exceeds the applicable minimum size and structure target without filler.
  • Avoids dumping raw file trees without interpretation.
  • Avoids using generated file indexes, repeated maintenance advice, or generic page templates as a substitute for design analysis.
  • Avoids hallucinated architecture: if unsure, say what evidence suggests and what remains unknown.
优质的仓库维基目录:
  • 新人阅读
    index.md
    和架构概述后,能够解释仓库的用途。
  • 维护者无需扫描大型单文档,即可找到常见变更对应的页面。
  • 解释重要代码为何采用当前结构,而非仅说明存在哪些文件。
  • 指出非明显的耦合关系、不变量及边缘情况。
  • 包含足够的文件/符号引用以支持导航。
  • 在无填充内容的情况下达到或超过适用的最小规模和结构目标。
  • 避免未经解读直接输出原始文件树。
  • 避免用生成的文件索引、重复的维护建议或通用页面模板替代设计分析。
  • 避免虚构架构:若不确定,说明现有证据指向的内容及仍未知的部分。

Using Bundled Resources

使用捆绑资源

  • Use
    scripts/repo_snapshot.cjs
    with Node to produce a repository inventory, language/config summary, and candidate reading plan.
  • Use
    scripts/wiki_quality_check.cjs
    with Node to verify that a generated wiki directory is not too small or under-structured.
  • Read
    references/wiki_structure.md
    when drafting or reviewing the final wiki directory outline.
  • Read
    references/rspress_docs_site.md
    only when the user explicitly asks to turn the wiki into an Rspress or static documentation site.
  • 使用Node运行
    scripts/repo_snapshot.cjs
    生成仓库清单、语言/配置摘要及候选阅读计划。
  • 使用Node运行
    scripts/wiki_quality_check.cjs
    验证生成的维基目录是否规模过小或结构不足。
  • 起草或评审最终维基目录大纲时,阅读
    references/wiki_structure.md
  • 仅当用户明确要求将维基转换为Rspress或静态文档站点时,才阅读
    references/rspress_docs_site.md