kb-management

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

KB Management

知识库(KB)管理

The knowledge base (
kb/
) is the project's durable memory. Every agent reads from it for context. This skill covers how to maintain it well.
知识库(
kb/
)是项目的持久记忆库。所有Agent都会从中读取上下文信息。本技能介绍如何妥善维护知识库。

Layers

层级结构

Canon: established facts the story has committed to. Once a chapter is published/finalized, the facts it establishes are canon. Contradicting canon breaks reader trust.
Wiki: synthesized reference pages. How the magic system works, character relationships, faction politics. Living documents that evolve as the story develops.
Styles: voice reference files derived from prose samples. The writer and critic agents depend on these for voice consistency.
Vocab: canonical story terms, aliases, and exclusions. Project-wide terms live in
kb/vocab.md
; domain terms live beside the domain they govern, such as
kb/world/vocab.md
.
Issues: tracked writing problems that span multiple chapters (recurring tics, pacing patterns, continuity errors). See the story-memory skill.
Canon(正史):故事已确定的既定事实。一旦章节发布/定稿,其中确立的事实即为Canon。违背Canon会破坏读者的信任。
Wiki(维基):整合后的参考页面。比如魔法系统的运作方式、角色关系、派系政治等。这些是随故事发展而不断演进的动态文档。
Styles(风格):从散文样本中提取的语气参考文件。作者Agent和评论Agent依赖这些文件保持语气一致性。
Vocab(词汇表):Canon中的故事术语、别名及禁用词。项目级术语存于
kb/vocab.md
;领域术语存于其对应的领域目录旁,例如
kb/world/vocab.md
Issues(问题):跨多章节追踪的写作问题(如重复出现的笔法、节奏模式、连续性错误)。请参考story-memory技能。

Page Conventions

页面规范

One Concept Per Document

一文档一概念

Each doc covers one coherent topic: one character, one location, one system. When a doc covers two unrelated topics, split it. When two docs explain the same thing from different angles, merge or cross-reference.
Name files by what they describe (
fire-magic.md
,
protagonist.md
), not when they were written (
session-3-notes.md
).
每个文档仅涵盖一个连贯主题:一个角色、一个地点、一个系统。若文档涉及两个不相关主题,需拆分;若两个文档从不同角度解释同一内容,需合并或建立交叉引用。
文件名应根据描述的内容命名(如
fire-magic.md
protagonist.md
),而非根据撰写时间(如
session-3-notes.md
)。

Organization

组织结构

text
kb/
  characters/
    <name>.md              # one file per character
  vocab.md                 # project-wide canonical terms
  world/
    vocab.md               # worldbuilding terms when needed
    <topic>.md             # locations, factions, systems
    <domain>/
      vocab.md             # subdomain terms when needed
      <topic>.md           # nest when a domain has many pages
  timeline/
    <arc-or-period>.md     # chronological entries
  canon/
    <chapter-or-arc>.md    # hard facts per chapter/arc
  styles/
    <style-name>.md        # voice reference files
  issues/
    <issue-name>.md        # tracked writing problems
The project's
CLAUDE.md
may customize this. Read it first.
text
kb/
  characters/
    <name>.md              # 每个角色对应一个文件
  vocab.md                 # 项目级Canon术语
  world/
    vocab.md               # 必要时存放世界构建术语
    <topic>.md             # 地点、派系、系统相关文件
    <domain>/
      vocab.md             # 必要时存放子领域术语
      <topic>.md           # 当某领域包含大量页面时进行嵌套
  timeline/
    <arc-or-period>.md     # 按时间顺序记录的条目
  canon/
    <chapter-or-arc>.md    # 各章节/故事弧的硬性事实
  styles/
    <style-name>.md        # 语气参考文件
  issues/
    <issue-name>.md        # 追踪的写作问题
项目的
CLAUDE.md
可能会对此结构进行自定义,请先阅读该文件。

Linking

链接规范

Link to related pages with relative paths. Cross-reference instead of duplicating: one source of truth per concept. A character page links to the location page for their home, the timeline entry for their arc, etc.
使用相对路径链接至相关页面。采用交叉引用而非重复内容:每个概念仅保留一个权威来源。例如,角色页面可链接至其家乡的地点页面、其故事弧的时间线条目等。

Readability

可读性

Write pages that work in isolation:
  • Self-contained: enough context that a reader doesn't need three other pages first
  • Scannable: headers, bullets, tables. Bold key terms on first use.
  • Concrete: specific quotes, chapter references, scene citations
  • Current: update when the story invalidates or extends what's here
页面需具备独立可读性:
  • 自包含性:提供足够上下文,读者无需先查阅其他三个页面
  • 易扫描性:使用标题、项目符号、表格。首次出现的关键术语需加粗。
  • 具体化:包含具体引文、章节参考、场景引用
  • 时效性:当故事内容使现有信息失效或扩展时,及时更新页面

Vocab Pages

Vocab(词汇表)页面

Use vocab pages when terms matter across agents: magic names, faction labels, place names, titles, relationship labels, invented words, recurring in-world phrases, and genre terms with project-specific meanings.
Each entry should include:
  • Canonical name: the form agents should use
  • Definition: one to three sentences, including what the term is not when ambiguity is likely
  • Aliases: names the author, characters, drafts, or older kb pages actually use
  • Source: where the usage was established or decided
Resolve conflicts early. If two terms seem to name the same thing, pick the canonical form with the author or flag it in the report instead of carrying both forward silently.
当术语对所有Agent都重要时,使用词汇表页面:魔法名称、派系标签、地名、头衔、关系标签、自创词汇、反复出现的世界观短语,以及具有项目特定含义的流派术语。
每个条目应包含:
  • 标准名称:Agent应使用的规范形式
  • 定义:1-3句话,若存在歧义需说明该术语不是什么
  • 别名:作者、角色、草稿或旧知识库页面实际使用的名称
  • 来源:该用法确立或被决定的出处
尽早解决冲突。若两个术语似乎指代同一事物,需与作者确认标准形式,或在报告中标记,而非默默保留两个术语。

When to Create vs Update

创建与更新的时机

Create a new page when a concept is finalized enough to be referenced by other agents. Don't create pages for things still in story-planning.
Update an existing page when new chapters establish facts about it, when the author makes decisions that change it, or when a page has become stale.
Split when a page grows past ~200 lines or covers multiple unrelated concepts.
创建新页面:当某个概念已足够成熟,可供其他Agent参考时。请勿为仍处于故事规划阶段的内容创建页面。
更新现有页面:当新章节确立了与该页面相关的事实、作者做出了改变页面内容的决定,或页面内容已过时。
拆分页面:当页面篇幅超过约200行,或涵盖多个不相关概念时。

What Belongs in KB vs Work

知识库(KB)与工作目录(Work)的内容划分

  • Finalized knowledge →
    kb/
  • Draft iterations, brainstorm captures, critique reports →
    work/
  • Promoted facts after a draft completes →
    kb/canon/
    or relevant wiki page
Use
/story-memory
for routine fact extraction from completed chapters. Direct kb edits are for the author or muse when capturing decisions interactively.
  • 已确定的知识 →
    kb/
  • 草稿迭代、头脑风暴记录、评论报告 →
    work/
  • 草稿完成后升级为Canon的内容 →
    kb/canon/
    或相关Wiki页面
使用
/story-memory
技能从已完成的章节中提取常规事实。直接编辑知识库的操作应由作者或灵感Agent在交互式记录决策时执行。