brain-taxonomist

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

brain-taxonomist

brain-taxonomist

Purpose

用途

Gate function: Before creating ANY new brain page, consult this skill to determine the correct filing path. This prevents misfiling at write time rather than cleaning up drift after the fact.
Drift function: Periodic scan for pages that have outgrown their current location.
网关功能: 创建任何新brain页面之前,需咨询此技能以确定正确的归档路径。这能在写入时防止归档错误,而非事后清理分类漂移。
漂移检测功能: 定期扫描已不再适合当前位置的页面。

Contract

约定

This skill guarantees:
  • Every new page is filed at the path determined by the ACTIVE schema pack — never against a hardcoded directory table baked into this skill.
  • The decision is reproducible: invoking brain-taxonomist twice on the same content produces the same recommended path.
  • Ambiguous cases surface to the user via
    skills/ask-user/
    rather than silently picking a default.
  • Per-source overrides via
    --source <id>
    are honored — multi-brain users (Persona B) get a different recommendation per source if their packs diverge.
  • When no matching
    page_types[]
    entry exists in the active pack, the skill signals to EIIRP Phase 3 (SCHEMA CHECK) rather than picking the closest-fitting fallback.
此技能保证:
  • 每个新页面都按照ACTIVE schema pack确定的路径归档——绝不会依据此技能中内置的硬编码目录表。
  • 决策可复现:对同一内容两次调用brain-taxonomist会生成相同的推荐路径。
  • 模糊场景会通过
    skills/ask-user/
    告知用户,而非默认选择某一选项。
  • 支持通过
    --source <id>
    进行按来源覆盖——多brain用户(Persona B)若其pack存在差异,每个来源会得到不同的推荐。
  • 当活跃pack中不存在匹配的
    page_types[]
    条目时,技能会触发EIIRP第三阶段(SCHEMA CHECK),而非选择最接近的备选类型。

Critical: this skill reads the ACTIVE schema pack as data

关键说明:此技能将ACTIVE schema pack作为数据读取

brain-taxonomist
has NO hardcoded directory table. Every decision is driven by
gbrain schema show --json
. This means:
  • A user who runs
    gbrain schema use gbrain-recommended
    gets the full recommended directory set (deal, meeting, concept, project, source, daily, personal, civic, original, place, trip, conversation, writing, plus all gbrain-base types).
  • A user who authored a custom pack via
    gbrain schema init
    + edit gets filing recommendations based on THEIR taxonomy, not gbrain's defaults.
  • Per-source overrides (tier 3 in the 7-tier resolution chain) are honored when
    --source <id>
    is passed to brain-taxonomist.
This is the single-source-of-truth principle (D9 from the v0.39 plan-eng-review).
brain-taxonomist
没有硬编码目录表。所有决策均由
gbrain schema show --json
驱动。这意味着:
  • 运行
    gbrain schema use gbrain-recommended
    的用户会获得完整的推荐目录集(deal、meeting、concept、project、source、daily、personal、civic、original、place、trip、conversation、writing,以及所有gbrain-base类型)。
  • 通过
    gbrain schema init
    + 编辑创建自定义pack的用户,会基于他们自己的分类法获得归档推荐,而非gbrain的默认设置。
  • 当向brain-taxonomist传递
    --source <id>
    时,会遵循按来源覆盖规则(7层解析链中的第3层)。
这遵循了单一数据源原则(v0.39计划工程评审中的D9)。

When to Consult (MANDATORY)

何时咨询(强制要求)

Run the taxonomist check before writing to the brain in these cases:
  1. New brain page — any
    type
    (person, company, concept, book, meeting, etc.)
  2. Bulk import — before committing a batch of new pages
  3. Uncertain filing — when the primary subject is ambiguous
You do NOT need to consult for:
  • Updating an existing page in place (same path)
  • Appending to a Timeline section
  • Meeting entity propagation to existing pages
在以下场景中,向brain写入前需运行分类学家检查:
  1. 新brain页面 —— 任何
    type
    (person、company、concept、book、meeting等)
  2. 批量导入 —— 提交一批新页面之前
  3. 归档存疑 —— 主要主题不明确时
无需咨询的场景:
  • 原地更新现有页面(路径不变)
  • 向Timeline部分追加内容
  • 将会议实体关联到现有页面

Decision Protocol

决策流程

Step 1: Identify primary subject type

步骤1:确定主要主题类型

Walk these questions in order:
  1. Is the primary subject a NAMED PERSON? → person-typed directory
  2. Is the primary subject a NAMED ORGANIZATION? → company-typed directory
  3. Is it about a TIME-BOUNDED EVENT (meeting, deal, trip)? → temporal-typed directory
  4. Is it a REUSABLE MENTAL MODEL? → concept-typed directory
  5. Is it RAW MEDIA (article, video, book, PDF)? → media-typed directory
  6. Is it BULK SOURCE DATA? → source-typed directory
  7. None of the above → consult EIIRP Phase 3 for schema-pack candidate creation.
按顺序回答以下问题:
  1. 主要主题是命名人物吗?→ 人物类型目录
  2. 主要主题是命名组织吗?→ 公司类型目录
  3. 它是关于有时间限制的事件(会议、交易、旅行)吗?→ 时间类型目录
  4. 它是可复用的思维模型吗?→ 概念类型目录
  5. 它是原始媒体(文章、视频、书籍、PDF)吗?→ 媒体类型目录
  6. 它是批量源数据吗?→ 源数据类型目录
  7. 以上都不是 → 咨询EIIRP第三阶段以创建schema-pack候选类型。

Step 2: Look up the directory for that type in the active pack

步骤2:在活跃pack中查找该类型对应的目录

bash
gbrain schema show --json | jq '.page_types[] | select(.primitive == "entity")'
Each
page_types[]
entry has a
path_prefixes:
array. The first prefix is the canonical path. If multiple types match (e.g. both
person
and
founder
exist in the pack with
expert_routing: true
), prefer the more specific one (the one with the more specific path prefix).
bash
gbrain schema show --json | jq '.page_types[] | select(.primitive == "entity")'
每个
page_types[]
条目都有一个
path_prefixes:
数组。第一个前缀是标准路径。如果多个类型匹配(例如,pack中同时存在
person
founder
expert_routing: true
),优先选择更具体的类型(路径前缀更具体的那个)。

Step 3: For books — determine sub-category

步骤3:针对书籍——确定子类别

The
gbrain-recommended
pack treats books as
media/books/<category>/<slug>.md
where category is one of: psychology, philosophy, spirituality, business, media-and-society, family-and-divorce, heritage, science, fiction, biography, arts-and-design. If your active pack has a different scheme, walk it from
gbrain schema show --json
instead of hardcoding here.
gbrain-recommended
pack将书籍归档为
media/books/<category>/<slug>.md
,其中category为以下类别之一:psychology、philosophy、spirituality、business、media-and-society、family-and-divorce、heritage、science、fiction、biography、arts-and-design。如果你的活跃pack有不同的规则,请从
gbrain schema show --json
中读取,而非在此硬编码。

Step 4: Construct the slug

步骤4:构造slug

  • kebab-case, descriptive
  • no author name unless disambiguation is needed
  • match the canonical path prefix exactly (no leading slash)
  • 使用kebab-case,描述性命名
  • 除非需要区分,否则不包含作者姓名
  • 完全匹配标准路径前缀(无前导斜杠)

Step 5: Validate before writing

步骤5:写入前验证

  • Path follows the active pack's
    page_types[].path_prefixes
  • Slug is kebab-case, descriptive
  • Frontmatter includes
    type:
    matching one of the pack's
    page_types[].name
  • Cross-links to related pages are included
If the active pack doesn't have a type for what you're trying to file, DON'T pick the closest-fitting one. Instead, signal to EIIRP that a new type is needed and let the schema-pack cathedral handle the proposal flow.
  • 路径符合活跃pack的
    page_types[].path_prefixes
  • Slug采用kebab-case,描述性命名
  • Frontmatter包含与pack中某一
    page_types[].name
    匹配的
    type:
  • 包含到相关页面的交叉链接
如果活跃pack中没有你要归档内容对应的类型,不要选择最接近的类型。而是向EIIRP发出信号,表明需要新类型,并让schema-pack体系处理提案流程。

Integration with Other Skills

与其他技能的集成

  • eiirp
    — calls this skill as Phase 2 TAXONOMY for every output in its inventory.
  • ingest
    — article/media ingestion consults brain-taxonomist for filing.
  • repo-architecture
    — delegates the filing decision to this skill.
  • book-mirror
    — after generating a mirror, files it via brain-taxonomist.
  • eiirp
    —— 在其清单中的每个输出的第二阶段TAXONOMY调用此技能。
  • ingest
    —— 文章/媒体导入时会咨询brain-taxonomist以确定归档路径。
  • repo-architecture
    —— 将归档决策委托给此技能。
  • book-mirror
    —— 生成镜像后,通过brain-taxonomist进行归档。

Periodic Drift Detection

定期漂移检测

bash
undefined
bash
undefined

What pages have no type matching the active pack?

哪些页面的类型与活跃pack不匹配?

gbrain schema review-orphans --json
gbrain schema review-orphans --json

What's the overall health?

整体健康状况如何?

gbrain doctor --json | jq '.checks[] | select(.name == "schema_pack_consistency")'

When `schema_pack_consistency` warns at >10% untyped, run the EIIRP
Phase 3 SCHEMA CHECK flow to surface candidate types via `schema detect`.
gbrain doctor --json | jq '.checks[] | select(.name == "schema_pack_consistency")'

当`schema_pack_consistency`警告不匹配页面占比超过10%时,运行EIIRP第三阶段SCHEMA CHECK流程,通过`schema detect`呈现候选类型。

Output Format

输出格式

Advisory: a single recommendation block plus a one-line reasoning trail.
markdown
**File at:** `<directory>/<slug>.md`
**Reasoning:**
- Primary subject: <person|company|concept|...>
- Matched page_type: <name> (primitive: <entity|temporal|concept|media|annotation>)
- Active pack: <pack-name> v<version>
- Source: <source_id>
When ambiguous, surface 2 candidates via
skills/ask-user/
rather than silently choosing.
When the active pack has NO matching type, signal to EIIRP Phase 3 (SCHEMA CHECK) and emit:
markdown
**No match in active pack `<name>`.**
**Suggested next step:** `gbrain schema detect --source <source_id>` then
`gbrain schema review-candidates`.
建议格式:单个推荐块加上一行推理轨迹。
markdown
**归档路径:** `<directory>/<slug>.md`
**推理:**
- 主要主题:<person|company|concept|...>
- 匹配的page_type:<name>(primitive: <entity|temporal|concept|media|annotation>- 活跃pack:<pack-name> v<version>
- 来源:<source_id>
当存在歧义时,通过
skills/ask-user/
呈现2个候选选项,而非默认选择。
当活跃pack中无匹配类型时,触发EIIRP第三阶段(SCHEMA CHECK)并输出:
markdown
**活跃pack `<name>`中无匹配类型。**
**建议下一步:** `gbrain schema detect --source <source_id>` 然后
`gbrain schema review-candidates`

Anti-Patterns

反模式

  • Hardcoded directory table in this skill. Every decision goes through
    gbrain schema show --json
    . v0.39+ broke the old hardcoded table on purpose so users on
    gbrain-recommended
    or custom packs get the right routing automatically.
  • Picking the closest-fitting type when no type matches. Closest-fit silently degrades user filing. Surface to EIIRP Phase 3 instead.
  • Ignoring
    --source <id>
    on multi-brain setups.
    Per-source overrides are tier-3 in the 7-tier resolution chain; missing the flag silently uses the brain-wide active pack.
  • Auto-applying a
    gbrain schema review-candidates --apply
    decision.
    Even high-confidence suggestions need user approval — this skill is a GATE, not an automator.
  • 在此技能中硬编码目录表。 所有决策都需通过
    gbrain schema show --json
    。v0.39+版本特意移除了旧的硬编码表,以便使用
    gbrain-recommended
    或自定义pack的用户能自动获得正确的路由。
  • 当无匹配类型时选择最接近的类型。 选择最接近的类型会悄无声息地降低用户归档质量。应触发EIIRP第三阶段。
  • 在多brain设置中忽略
    --source <id>
    按来源覆盖是7层解析链中的第3层;遗漏该标志会默认使用全brain范围内的活跃pack。
  • 自动应用
    gbrain schema review-candidates --apply
    的决策。
    即使是高置信度的建议也需要用户批准——此技能是一个网关,而非自动化工具。

Hard Rules

硬性规则

  • Never hardcode a directory table in this skill. Every decision goes through
    gbrain schema show --json
    . The active pack is canonical.
  • Per-source flag is first-class. Pass
    --source <id>
    to every CLI call when working with a non-default source.
  • Confidence-floor honor. EIIRP's Phase 3 produces suggestions with confidence < 0.6 that brain-taxonomist must surface to the user rather than auto-apply. Don't silently promote a low-confidence schema delta.
  • 绝不在此技能中硬编码目录表。 所有决策都需通过
    gbrain schema show --json
    。活跃pack是权威来源。
  • 按来源标志是一等公民。 处理非默认来源时,需在每个CLI调用中传递
    --source <id>
  • 遵循置信度下限。 EIIRP第三阶段生成的置信度<0.6的建议,brain-taxonomist必须呈现给用户,而非自动应用。不要悄无声息地提升低置信度的schema增量。

Changelog

更新日志

v1.0.0 — gbrain v0.39.0.0

v1.0.0 —— gbrain v0.39.0.0

  • Initial port from upstream OpenClaw. Genericized — no references to private fork names per CLAUDE.md privacy rules.
  • Hardcoded directory table REMOVED. Every decision now reads the active schema pack via
    gbrain schema show --json
    . Single source of truth.
  • Book taxonomy moved from skill-text to the
    gbrain-recommended
    pack's media/books/ branch (see
    src/core/schema-pack/base/gbrain-recommended.yaml
    ).
  • --source <id>
    propagation documented for multi-brain users (Persona B).
  • 从上游OpenClaw首次移植。已通用化——根据CLAUDE.md隐私规则,无私有分支名称引用。
  • 移除硬编码目录表。现在所有决策都通过
    gbrain schema show --json
    读取活跃schema pack。单一数据源。
  • 书籍分类法从skill-text迁移至
    gbrain-recommended
    pack的media/books/分支(参见
    src/core/schema-pack/base/gbrain-recommended.yaml
    )。
  • 记录了针对多brain用户(Persona B)的
    --source <id>
    传播规则。