knowledge-base

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Knowledge Base pack — how to work here

知识库启动包——工作指南

This project uses the source-grounded knowledge-base layout. The whole point is a closed evidence loop: nothing canonical exists without a traceable chain back to a preserved source. This skill holds the workflow so the templates and
log.md
can stay clean — when you create a doc from a template you get structure, and the how lives here.
This skill is pack guidance. The platform
/open-knowledge
skill (read/write/preview/linking/grounding rules) still governs every markdown operation — this layers the KB workflow on top.
本项目采用溯源型知识库架构。核心目标是构建闭环证据链:所有权威内容都必须能追溯到已保存的原始来源。本技能承载工作流相关内容,以便模板和
log.md
保持简洁——使用模板创建文档时仅获取结构,而具体操作方法则在此处说明。
本技能是启动包的指导文档。平台
/open-knowledge
技能(读写/预览/链接/溯源规则)仍管控所有Markdown操作——本技能仅在其基础上叠加知识库工作流。

Link at creation

创建时添加链接

The user watches your build live — the editor follows the file you're writing, and the knowledge graph assembles on screen as pages get linked. No view management on your part; just author well: every page carries its links from the moment it's written (at minimum the hub/index page and its most related siblings — an unlinked page is invisible in the graph), and related pages share a
cluster:
frontmatter value (e.g.
cluster: architecture
) so the graph's cluster coloring makes the map read at a glance.
用户会实时查看你的构建过程——编辑器会跟随你正在编写的文件,知识图谱会随着页面链接的建立在屏幕上逐步生成。无需你管理视图;只需规范创作:每个页面从编写之初就必须包含链接(至少包含枢纽/索引页及其最相关的同级页面——未链接的页面在图谱中不可见),且相关页面需共享
cluster:
前置属性值(例如
cluster: architecture
),以便图谱的集群颜色能让用户一目了然。

The three layers

三层架构

external-sources/   raw sources, saved verbatim     (produced by `ingest`)
      ↓ cite
research/           provisional analysis            (produced by `research`)
      ↓ promote
articles/           canonical, decided knowledge     (produced by `consolidate`)
The loop is ingest → research → consolidate, mapped to Karpathy's three-layer knowledge-base pattern. Every downstream claim traces upstream to a preserved source. Cite local paths in
external-sources/
, never bare web URLs — the KB must survive link rot.
Karpathy's insight: "The tedious part of maintaining a knowledge base is not the reading or the thinking — it's the bookkeeping." Humans abandon wikis because maintenance costs exceed perceived value. These procedures exist so an agent can do the bookkeeping (fetching, summarizing, cross-linking, superseding) without fatigue. Skipping the cross-linking, supersedes chains, or raw-source preservation is what turns a useful wiki back into an abandoned one.
external-sources/   原始来源,完整保存     (由`ingest`流程生成)
      ↓ 引用
research/           临时分析内容            (由`research`流程生成)
      ↓ 升级
articles/           权威确定的知识内容     (由`consolidate`流程生成)
工作流为ingest → research → consolidate,对应Karpathy的三层知识库模式。每个下游结论都能追溯到上游已保存的来源。引用
external-sources/
中的本地路径,而非直接使用网页URL——知识库必须能抵御链接失效问题。
Karpathy的核心观点:“维护知识库最繁琐的部分不是阅读或思考——而是记录管理。”人们放弃维基是因为维护成本超过其价值。这些流程的存在是为了让Agent能完成记录管理工作(获取、总结、交叉链接、更新)而不会疲劳。跳过交叉链接、更新链或原始来源保存,会让实用的维基重新沦为废弃项目。

The three procedures

三个核心流程

Each layer has a full, STOP-gated procedure, and each ships as its own skill so it loads only when the work calls for it. Execute the procedure yourself with the OK verbs — these are your default move over a bare
write
when the work fits a layer.
ProcedureWhere it livesWhen
ingestPlatform
/open-knowledge
skill (
references/ingest-and-sources.md
) — its Grounding rule depends on it everywhere, so it ships with every project, not just this pack.
Preserve a shared URL / PDF / file verbatim, OR you fetched a URL to ground a KB claim (binary sources preserved, not scraped).
researchSibling skill
/research-with-sources
Investigate / compare / synthesize multiple sources →
status: provisional
article +
sources:
.
consolidateSibling skill
/consolidate-notes
A decision was actually made → commit canonical source-of-truth with a
supersedes:
chain.
Typical day-2 flow: user shares a URL → ingest (preserve) → user asks "now research this" → research (provisional article, ingesting more sources as needed) → decision lands → consolidate (canonical article, supersedes the research).
Don't chain silently. After ingest, ask whether to proceed to research. After research, let the user decide whether the findings are ready to consolidate. Each procedure completes on its own terms — the user drives the transitions.
Autonomy gates vs session-level autonomy. A procedure's STOP gates (research's scoping gate, consolidate's decision-confirmation gate) are NOT overridden by session-level "work without stopping for clarifying questions" hints. Those hints cover trivial back-and-forth ("which file did you mean?"); the gates exist for one-way-door decisions. When in doubt, the gate is authoritative.
每个层级都有完整的、带停止 gate 的流程,且每个流程都作为独立技能存在,仅在需要时加载。使用OK动词执行这些流程——当工作对应某个层级时,这些是你优先于直接
write
的默认操作。
流程所在位置适用场景
ingest平台
/open-knowledge
技能(
references/ingest-and-sources.md
)——其溯源规则在所有场景都依赖该流程,因此它随每个项目发布,而非仅属于本启动包。
完整保存共享URL/PDF/文件,或你为支撑知识库结论获取了某个URL(保存二进制来源,而非仅抓取文本)。
research同级技能
/research-with-sources
调查/对比/综合多个来源 → 生成
status: provisional
的文章 +
sources:
属性。
consolidate同级技能
/consolidate-notes
已做出明确决策 → 提交带
supersedes:
链的权威可信来源内容。
典型的次日工作流:用户分享URL → ingest(保存)→ 用户询问“现在研究这个内容” → research(生成临时文章,按需获取更多来源)→ 做出决策 → consolidate(生成权威文章,替代research阶段的内容)。
不要静默执行链式操作。完成ingest后,询问用户是否继续research。完成research后,让用户决定研究结果是否准备好进入consolidate阶段。每个流程都独立完成——由用户驱动阶段转换。
自主 gate 与会话级自主。流程的停止 gate(research的范围确认gate,consolidate的决策确认gate)不会被会话级“无需停顿询问澄清问题即可工作”的提示覆盖。这些提示仅适用于琐碎的来回沟通(如“你指的是哪个文件?”);gate的存在是为了处理不可逆决策。如有疑问,以gate的要求为准。

Per-folder rules

各文件夹规则

external-sources/
— Raw sources saved verbatim, not just cited: the actual fetched text of URLs, extracted text of PDFs, copies of referenced files. Each file's frontmatter carries the original URL, access date, and any author/publisher metadata. Produced by the ingest procedure (applies whether the user shared the URL or you fetched it yourself to ground a claim). Immutable after capture — update only to refresh a stale fetch. No analysis here; that belongs in
research/
.
research/
— Provisional analysis synthesizing external sources. Produced by the
/research-with-sources
skill. Every factual claim cites a specific doc in
external-sources/
(or an inline URL if ingest was skipped); no unsourced assertions. Keep the
sources:
frontmatter list aligned with the docs actually linked in the body. Promote to
articles/
via the
/consolidate-notes
skill once the team decides the findings are stable.
articles/
— Canonical knowledge, committed after a team decision. Produced by the
/consolidate-notes
skill. Carries a
supersedes:
chain tying back to the
research/
docs it replaces (which in turn cite
external-sources/
) so the full evidence chain is traceable without leaving the repo. Source-of-truth for the domain; update only when a new decision supersedes it.
external-sources/
—— 完整保存原始来源,而非仅引用:包括URL的实际抓取文本、PDF提取文本、引用文件的副本。每个文件的前置属性需包含原始URL、访问日期及作者/发布者元数据。由ingest流程生成(无论URL是用户分享的还是你为支撑结论自行获取的)。捕获后不可修改——仅可更新以刷新过期的抓取内容。此处禁止分析内容;分析内容应放在
research/
中。
research/
—— 综合外部来源的临时分析内容。由
/research-with-sources
技能生成。每个事实性结论都需引用
external-sources/
中的特定文档(若跳过ingest则可使用内联URL);禁止无来源的断言。保持
sources:
前置属性列表与正文中实际链接的文档一致。一旦团队确认研究结果稳定,通过
/consolidate-notes
技能将其升级到
articles/
articles/
—— 团队决策后确定的权威知识内容。由
/consolidate-notes
技能生成。包含
sources:
链,指向其替代的
research/
文档(这些文档又引用
external-sources/
),因此无需离开仓库即可追溯完整的证据链。是该领域的可信来源;仅当新决策替代现有内容时才可更新。

Status flow

状态流转

Layer
status
Set when
research/
provisional
created
articles/
canonical
promoted by consolidate after a decision
When a new article supersedes an older one, add the older article's path to the new one's
supersedes:
list.
层级
status
属性
设置时机
research/
provisional
创建时
articles/
canonical
经consolidate流程升级且完成决策后
当新文章替代旧文章时,将旧文章的路径添加到新文章的
supersedes:
列表中。

Log discipline (MUST)

日志规范(必须遵守)

There is a
log.md
at the project root. Append one dated entry after any turn that creates, edits, or restructures content — one entry per turn, not per file. Silent edits break the audit trail.
Log:
ingest
runs (new sources),
research
/
consolidate
runs (provisional or canonical articles), direct
write
/
edit
/
move
/
delete
outside the three procedures, project-onboarding runs, folder restructures, and
.ok/config.yml
changes.
Reference docs as markdown links, not bare paths
[path/to/doc](./path/to/doc.md)
, so the entry shows up in
links({ kind: "backlinks" })
for those docs. A bare path string does not register in the graph.
Entry shape:
markdown
undefined
项目根目录下有一个
log.md
文件。每次创建、编辑或重构内容后,添加一条带日期的日志条目——每次操作对应一条条目,而非每个文件对应一条。静默编辑会破坏审计追踪。
需记录的内容:
ingest
流程运行(新增来源)、
research
/
consolidate
流程运行(生成临时或权威文章)、三个流程之外的直接
write
/
edit
/
move
/
delete
操作、项目入职流程运行、文件夹重构、
.ok/config.yml
变更。
使用Markdown链接引用文档,而非直接路径——格式为
[path/to/doc](./path/to/doc.md)
,以便该条目能在这些文档的
links({ kind: "backlinks" })
中显示。直接路径字符串不会在图谱中被识别。
条目格式:
markdown
undefined

YYYY-MM-DD: <short title>

YYYY-MM-DD: <简短标题>

  • <what was done>
  • Files touched: doc-a, doc-b
  • Sources ingested: source-slug
  • Open follow-ups: <topic-1>, <topic-2>
undefined
  • <完成的操作>
  • 涉及文件: doc-a, doc-b
  • 获取的来源: source-slug
  • 待跟进事项: <主题1>, <主题2>
undefined

Templates

模板

Each folder has a starter template (
clip
,
research-log
,
article
). Create with
write({ document: { path, template: "<name>" } })
. Templates carry only structure (headings + frontmatter scaffold) — the meaning of each field and section is described above, not repeated inside the document body.
每个文件夹都有一个启动模板(
clip
research-log
article
)。使用
write({ document: { path, template: "<name>" } })
创建模板。模板仅包含结构(标题 + 前置属性框架)——每个字段和章节的含义已在上述内容中说明,不会在文档主体中重复。