pensieve

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Pensieve

Pensieve

Route user requests to the correct tool. When uncertain, confirm first.
将用户请求路由到正确的工具。存在不确定性时请先确认。

Intent Routing

意图路由

  1. Explicit intent takes priority: if the user explicitly names a tool or trigger word, route directly.
  2. Infer from session stage (when no explicit command is given):
    • New project or blank context →
      init
      | Version uncertainty →
      upgrade
      | Migration/residue uncertainty →
      migrate
    • Exploring codebase or locating issues → check
      <USER_DATA_ROOT>/knowledge/
      first, then use
      self-improve
      to write findings
    • Development complete or retrospective signals →
      self-improve
      | Complex task needing decomposition →
      loop
  3. When uncertain, confirm first.
<example> User: "Initialize pensieve for me" → Route: tools/init/_init.md User: "Check if there are any data issues" → Route: tools/doctor/_doctor.md User: "This task is complex, run it with loop" → Route: tools/loop/_loop.md </example>
  1. 显式意图优先:如果用户明确指定了工具或触发词,直接路由。
  2. 根据会话阶段推断(无显式命令时):
    • 新项目或空白上下文 →
      init
      | 版本不确定 →
      upgrade
      | 迁移/遗留问题不确定 →
      migrate
    • 探索代码库或定位问题 → 首先检查
      <USER_DATA_ROOT>/knowledge/
      ,然后使用
      self-improve
      写入发现内容
    • 开发完成或出现复盘信号 →
      self-improve
      | 需要拆解的复杂任务 →
      loop
  3. 存在不确定性时先确认
<example> 用户:"帮我初始化pensieve" → 路由:tools/init/_init.md 用户:"检查是否存在数据问题" → 路由:tools/doctor/_doctor.md 用户:"这个任务很复杂,用loop运行" → 路由:tools/loop/_loop.md </example>

Global Rules (Summary)

全局规则(摘要)

  1. Boundary priority: version/compatibility issues go through
    upgrade
    ; migration/residue cleanup goes through
    migrate
    .
  2. Confirm before executing: when the user has not explicitly issued a command, confirm first.
  3. Keep links connected:
    decision/pipeline
    must have at least one
    [[...]]
    link.
  4. Read spec before writing data: read the corresponding README before creating/checking user data.
Full rules in
references/shared-rules.md
  1. 边界优先:版本/兼容性问题走
    upgrade
    ;迁移/遗留清理走
    migrate
  2. 执行前确认:用户未明确下达命令时,先进行确认。
  3. 保持链接连通
    decision/pipeline
    必须至少包含一个
    [[...]]
    链接。
  4. 写数据前先读规范:创建/检查用户数据前请先阅读对应的README。
完整规则见
references/shared-rules.md

Tool Execution Protocol

工具执行协议

Before executing any tool, read its
### Use when
section to confirm applicability. For tool boundaries and redirect rules, see
references/tool-boundaries.md
.
执行任何工具前,请先阅读其「### Use when」部分确认适用性。工具边界和重定向规则请参考
references/tool-boundaries.md

Routing Table

路由表

IntentTool spec (read first)Trigger words
Initialize
<SYSTEM_SKILL_ROOT>/tools/init/_init.md
init, initialize
Version update
<SYSTEM_SKILL_ROOT>/tools/upgrade/_upgrade.md
upgrade, version
Structure migration
<SYSTEM_SKILL_ROOT>/tools/migrate/_migrate.md
migrate, migration, clean old paths
Health check
<SYSTEM_SKILL_ROOT>/tools/doctor/_doctor.md
doctor, check, format check
Archive experience
<SYSTEM_SKILL_ROOT>/tools/self-improve/_self-improve.md
self-improve, archive, reflect
Iterative execution
<SYSTEM_SKILL_ROOT>/tools/loop/_loop.md
loop, iterative execution, execute pipeline
意图工具规范(请先阅读)触发词
初始化
<SYSTEM_SKILL_ROOT>/tools/init/_init.md
init, initialize
版本更新
<SYSTEM_SKILL_ROOT>/tools/upgrade/_upgrade.md
upgrade, version
结构迁移
<SYSTEM_SKILL_ROOT>/tools/migrate/_migrate.md
migrate, migration, clean old paths
健康检查
<SYSTEM_SKILL_ROOT>/tools/doctor/_doctor.md
doctor, check, format check
经验归档
<SYSTEM_SKILL_ROOT>/tools/self-improve/_self-improve.md
self-improve, archive, reflect
迭代执行
<SYSTEM_SKILL_ROOT>/tools/loop/_loop.md
loop, iterative execution, execute pipeline

Routing Failure Fallback

路由失败降级方案

  1. Ambiguous intent: return candidate routes and ask the user to confirm.
  2. Tool entry unreadable: stop and report the missing path.
  3. Incomplete input: collect missing information before executing.
<SYSTEM_SKILL_ROOT>
is injected by the SessionStart hook; user data path is fixed at
<project>/.claude/skills/pensieve/
.
  1. 意图模糊:返回候选路由请用户确认。
  2. 工具入口不可读:停止执行并报告缺失路径。
  3. 输入不完整:执行前收集缺失的信息。
<SYSTEM_SKILL_ROOT>
由SessionStart钩子注入;用户数据路径固定为
<project>/.claude/skills/pensieve/