knowledge-base-query

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Query the knowledge base

查询知识库

Read information from the knowledge base — projects, books, and foundational topics — and answer grounded in it. The root
README.md
is the index: it maps names to folders, so start there and go straight to the target. Do not read the whole repository; use the indexes to open only the file(s) the question needs.
从知识库读取信息——包括项目、书籍和基础主题——并以其中的内容为依据进行回答。根目录的
README.md
是索引:它将名称映射到文件夹,因此应从那里开始,直接定位目标。不要读取整个仓库;使用索引只打开回答问题所需的文件。

Locate the knowledge base

定位知识库

Work inside the knowledge-base repository. The canonical local checkout is
~/code/knowledge-base
; if it is absent,
git clone git@github.com:mmontes11/knowledge-base.git ~/code/knowledge-base
. All paths below are relative to the repository root.
在 knowledge-base 仓库中操作。标准的本地 checkout 位于
~/code/knowledge-base
;如果该目录不存在,则执行
git clone git@github.com:mmontes11/knowledge-base.git ~/code/knowledge-base
。以下所有路径均相对于仓库根目录。

Step 0 — Find it in the index

第 0 步——在索引中查找

The root
README.md
holds the indexes:
  • Tracked projects table — maps each project to its
    projects/<category>/<project>/
    folder and its upstream URL.
  • Tracked books table — maps each book to its
    books/<book>/
    folder.
  • Tracked foundational knowledge table — maps each foundational topic to its
    foundation/<topic>/
    folder.
If the thing you were asked about is not in the index, say so — the knowledge base does not cover it — and stop. If a Tracked projects row exists and further research would help, surface its upstream URL.
根目录的
README.md
包含以下索引:
  • 跟踪项目表——将每个项目映射到
    projects/<category>/<project>/
    文件夹及其 upstream URL。
  • 跟踪书籍表——将每本书映射到
    books/<book>/
    文件夹。
  • 跟踪的基础知识表——将每个基础主题映射到
    foundation/<topic>/
    文件夹。
如果所询问的对象不在索引中,应明确说明知识库未涵盖该内容,然后停止。如果“跟踪项目”表中存在相应条目,且进一步研究会有所帮助,则应提供其 upstream URL。

Step 1 — Read the right file

第 1 步——读取正确的文件

Go straight to the file that answers the question:
QuestionRead
What is the project / what problem does it solve
projects/<c>/<p>/README.md
What is its API / resource / CLI surface
projects/<c>/<p>/api-reference.md
What is the latest release / what changed
projects/<c>/<p>/releases.md
What features does it have
projects/<c>/<p>/features.md
How is it architected
projects/<c>/<p>/architecture.md
(only if present)
What a book teaches / a chapter's content
books/<book>/README.md
, then
NN-<chapter>.md
How a concept actually works
foundation/<topic>/README.md
直接读取能够回答问题的文件:
问题读取内容
项目是什么/它解决什么问题
projects/<c>/<p>/README.md
它的 API/资源/CLI 接口是什么
projects/<c>/<p>/api-reference.md
最新版本是什么/有哪些变化
projects/<c>/<p>/releases.md
它有哪些功能
projects/<c>/<p>/features.md
它采用了什么架构
projects/<c>/<p>/architecture.md
(仅在存在时读取)
一本书讲了什么/某一章的内容
books/<book>/README.md
,然后读取
NN-<chapter>.md
某个概念的实际工作原理
foundation/<topic>/README.md

Step 2 — Answer

第 2 步——回答

  • Answer from the knowledge base, citing the file you read and, where useful, its
    last_updated
    frontmatter so the reader knows how current it is.
  • For projects the KB links rather than copies upstream. If the entry is thin or stale, say so and surface the upstream link from the Tracked projects table so the reader can verify.
  • If the question spans several files (e.g. "give me the picture of <project>"), read
    README.md
    first, then pull in only the specific files the question needs.
  • 基于知识库回答问题,并引用已读取的文件;必要时引用其
    last_updated
    frontmatter,让读者了解内容的时效性。
  • 对于项目,KB 只是提供 链接,而不是复制 upstream 内容。如果条目内容过于简略或已经过时,应明确说明,并提供“跟踪项目”表中的 upstream 链接,以便读者核实。
  • 如果问题涉及多个文件(例如“介绍 <project> 的整体情况”),先读取
    README.md
    ,然后只提取回答问题所需的具体文件。

Scope

范围

This skill is read-only — it never edits, adds, or removes knowledge-base content. Adding a project or a book, and refreshing a project, belong to the
knowledge-base-add-project
and
knowledge-base-add-book
skills.
此 skill 是只读的——它绝不会编辑、添加或删除知识库内容。添加项目或书籍以及更新项目,分别属于
knowledge-base-add-project
和
knowledge-base-add-book
skill。