hindsight-cloud

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Hindsight Memory Skill (Cloud)

Hindsight Memory Skill(云端版)

You have persistent memory via Hindsight Cloud. This memory bank is shared with the team, so knowledge stored here benefits everyone working on this codebase.
Proactively store team knowledge and recall context to provide better assistance.
你可以通过Hindsight Cloud拥有持久化存储的记忆库。该记忆库为团队共享,因此存储在此的知识将惠及所有参与该代码库工作的成员。
主动存储团队知识并调取背景信息,以提供更优质的协助。

Setup Check (First-Time Only)

配置检查(仅首次使用)

Before using memory commands, verify the Hindsight CLI is configured:
bash
cat ~/.hindsight/config
If the file doesn't exist or is missing credentials, help the user set it up:
  1. Install the CLI (if
    hindsight
    command not found):
    bash
    curl -fsSL https://hindsight.vectorize.io/get-cli | bash
  2. Create the config file - ask the user for their API Key (get it from https://ui.hindsight.vectorize.io):
    bash
    mkdir -p ~/.hindsight
    cat > ~/.hindsight/config << 'EOF'
    api_url = "https://api.hindsight.vectorize.io"
    api_key = "<user's API key>"
    EOF
    chmod 600 ~/.hindsight/config
  3. Get the bank ID - ask the user for their team's bank ID (e.g.,
    team-myproject
    )
After setup, use the bank ID in all commands below.
在使用记忆命令前,请确认Hindsight CLI已完成配置:
bash
cat ~/.hindsight/config
若该文件不存在或缺少凭证,请协助用户完成配置:
  1. 安装CLI(若未找到
    hindsight
    命令):
    bash
    curl -fsSL https://hindsight.vectorize.io/get-cli | bash
  2. 创建配置文件 - 向用户索要其API密钥(可从https://ui.hindsight.vectorize.io获取):
    bash
    mkdir -p ~/.hindsight
    cat > ~/.hindsight/config << 'EOF'
    api_url = "https://api.hindsight.vectorize.io"
    api_key = "<user's API key>"
    EOF
    chmod 600 ~/.hindsight/config
  3. 获取记忆库ID - 向用户索要其团队的记忆库ID(例如:
    team-myproject
配置完成后,在以下所有命令中使用该记忆库ID。

How Hindsight Works

Hindsight 工作原理

When you call
retain
, Hindsight does not store the string as-is. The server runs an internal pipeline that:
  1. Extracts structured facts from the content using an LLM
  2. Identifies entities (people, tools, concepts) and links related facts
  3. Builds temporal and causal relationships between facts
  4. Generates embeddings for semantic search
This means you should pass rich, full-context content — the server is better at extracting what matters than a pre-summarized string. Your job is to decide when to store, not what to extract.
当你调用
retain
命令时,Hindsight不会直接存储原始字符串。服务器会运行一个内部处理流程,步骤如下:
  1. 利用LLM从内容中提取结构化事实
  2. 识别实体(人员、工具、概念)并关联相关事实
  3. 构建事实间的时间与因果关系
  4. 生成嵌入向量(embeddings)以支持语义搜索
这意味着你应传入丰富、完整的背景内容——服务器比预先总结的字符串更擅长提取关键信息。你的职责是决定何时存储,而非存储哪些内容

Commands

命令说明

Replace
<bank-id>
with the user's actual bank ID (e.g.,
team-frontend
).
<bank-id>
替换为用户实际的记忆库ID(例如:
team-frontend
)。

Store a memory

存储记忆

Use
memory retain
to store what you learn. Pass full context — raw observations, session notes, or detailed descriptions:
bash
hindsight memory retain <bank-id> "The project uses ESLint configured with the Airbnb rule set and Prettier for formatting. Auto-fix on save is enabled in the editor config."
hindsight memory retain <bank-id> "Ran the test suite with NODE_ENV=test. Tests pass. Without NODE_ENV=test, the suite fails with a missing config error." --context procedures
hindsight memory retain <bank-id> "Build failed on Node 18 with error 'ERR_UNSUPPORTED_ESM_URL_SCHEME'. Switched to Node 20 and build succeeded." --context learnings
hindsight memory retain <bank-id> "Alice reviewed the PR and asked for verbose commit messages that explain the motivation, not just what changed." --context preferences
You can also pass a raw conversation transcript with timestamps:
bash
hindsight memory retain <bank-id> "[2026-03-16T10:12:03] User: The auth tests keep failing on CI but pass locally. Any idea?
[2026-03-16T10:12:45] Assistant: Let me check the CI logs. Looks like the tests are running without the TEST_DATABASE_URL env var set — they fall back to the production DB URL and hit a connection timeout.
[2026-03-16T10:13:20] User: Ah right, I never added that to the CI secrets. Adding it now.
[2026-03-16T10:15:02] User: That fixed it. All green now." --context learnings
使用
memory retain
命令存储你学到的内容。请传入完整背景信息——包括原始观察记录、会话笔记或详细描述:
bash
hindsight memory retain <bank-id> "The project uses ESLint configured with the Airbnb rule set and Prettier for formatting. Auto-fix on save is enabled in the editor config."
hindsight memory retain <bank-id> "Ran the test suite with NODE_ENV=test. Tests pass. Without NODE_ENV=test, the suite fails with a missing config error." --context procedures
hindsight memory retain <bank-id> "Build failed on Node 18 with error 'ERR_UNSUPPORTED_ESM_URL_SCHEME'. Switched to Node 20 and build succeeded." --context learnings
hindsight memory retain <bank-id> "Alice reviewed the PR and asked for verbose commit messages that explain the motivation, not just what changed." --context preferences
你也可以传入带时间戳的原始会话记录:
bash
hindsight memory retain <bank-id> "[2026-03-16T10:12:03] User: The auth tests keep failing on CI but pass locally. Any idea?
[2026-03-16T10:12:45] Assistant: Let me check the CI logs. Looks like the tests are running without the TEST_DATABASE_URL env var set — they fall back to the production DB URL and hit a connection timeout.
[2026-03-16T10:13:20] User: Ah right, I never added that to the CI secrets. Adding it now.
[2026-03-16T10:15:02] User: That fixed it. All green now." --context learnings

Recall memories

调取记忆

Use
memory recall
BEFORE starting tasks to get relevant context:
bash
hindsight memory recall <bank-id> "project conventions and coding standards"
hindsight memory recall <bank-id> "Alice preferences for this project"
hindsight memory recall <bank-id> "what issues have we encountered before"
hindsight memory recall <bank-id> "how does the auth module work"
在开始任务前,使用
memory recall
命令调取相关背景信息:
bash
hindsight memory recall <bank-id> "project conventions and coding standards"
hindsight memory recall <bank-id> "Alice preferences for this project"
hindsight memory recall <bank-id> "what issues have we encountered before"
hindsight memory recall <bank-id> "how does the auth module work"

Reflect on memories

记忆复盘

Use
memory reflect
to synthesize context:
bash
hindsight memory reflect <bank-id> "How should I approach this task based on past experience?"
使用
memory reflect
命令整合背景信息:
bash
hindsight memory reflect <bank-id> "How should I approach this task based on past experience?"

IMPORTANT: When to Store Memories

重要提示:何时存储记忆

This is a shared team bank. Store knowledge that benefits the team. For individual preferences, include the person's name.
这是一个团队共享的记忆库。请存储对团队有益的知识。对于个人偏好,请标注相关人员的姓名。

Project/Team Conventions (shared)

项目/团队规范(共享)

  • Coding standards ("Project uses 2-space indentation")
  • Required tools and versions ("Project requires Node 20+, PostgreSQL 15+")
  • Linting and formatting rules ("ESLint with Airbnb config")
  • Testing conventions ("Integration tests require Docker running")
  • Branch naming and PR conventions
  • 编码标准(如"项目使用2空格缩进")
  • 必备工具及版本要求(如"项目要求Node 20+、PostgreSQL 15+")
  • 代码检查与格式化规则(如"采用Airbnb配置的ESLint")
  • 测试规范(如"集成测试需要Docker运行")
  • 分支命名与PR规范

Individual Preferences (attribute to person)

个人偏好(标注人员)

  • Personal coding style ("Alice prefers explicit type annotations")
  • Communication preferences ("Bob prefers detailed PR descriptions")
  • Tool preferences ("Carol uses vim keybindings")
  • 个人编码风格(如"Alice偏好显式类型注解")
  • 沟通偏好(如"Bob偏好详细的PR描述")
  • 工具偏好(如"Carol使用vim快捷键")

Procedure Outcomes

流程结果

  • Steps that successfully completed a task
  • Commands that worked (or failed) and why
  • Workarounds discovered
  • Configuration that resolved issues
  • 成功完成任务的步骤
  • 有效(或无效)的命令及原因
  • 发现的临时解决方案
  • 解决问题的配置方案

Learnings from Tasks

任务经验总结

  • Bugs encountered and their solutions
  • Performance optimizations that worked
  • Architecture decisions and rationale
  • Dependencies or version requirements
  • 遇到的Bug及解决方案
  • 有效的性能优化手段
  • 架构决策及理由
  • 依赖或版本要求

Team Knowledge

团队知识

  • Onboarding information for new team members
  • Common pitfalls and how to avoid them
  • Architecture decisions and their rationale
  • Integration points with external systems
  • Domain knowledge and business logic explanations
  • 新成员入职信息
  • 常见陷阱及规避方法
  • 架构决策及理由
  • 与外部系统的集成点
  • 领域知识与业务逻辑说明

IMPORTANT: When to Recall Memories

重要提示:何时调取记忆

Always recall before:
  • Starting any non-trivial task
  • Making decisions about implementation
  • Suggesting tools, libraries, or approaches
  • Writing code in a new area of the project
  • When answering questions about the codebase
  • When a team member asks how something works
务必在以下场景前调取记忆
  • 启动任何非琐碎任务时
  • 做实现决策时
  • 推荐工具、库或实现方式时
  • 在项目新领域编写代码时
  • 回答关于代码库的问题时
  • 团队成员询问某功能工作原理时

Best Practices

最佳实践

  1. Store immediately: When you discover something, store it right away
  2. Pass rich context: Include full observations, not pre-summarized strings — the server extracts facts automatically
  3. Include outcomes: Store what happened AND why, including failures and workarounds
  4. Recall first: Always check for relevant context before starting work
  5. Think team-first: Store knowledge that would help other team members
  6. Attribute individual preferences: Store "Alice reviewed the PR and asked for X" not just "User prefers X"
  7. Distinguish project vs personal: Project conventions apply to everyone; personal preferences are per-person
  8. Use
    --context
    for metadata
    : The
    --context
    flag labels the type of memory (e.g.,
    procedures
    ,
    learnings
    ,
    preferences
    ), not a replacement for full content
  1. 即时存储:当你发现新信息时,立即进行存储
  2. 传入完整背景:包含完整的观察内容,而非预先总结的字符串——服务器会自动提取关键事实
  3. 包含结果信息:存储事件的发生过程及原因,包括失败案例与临时解决方案
  4. 先调取再行动:开展工作前务必检查相关背景信息
  5. 以团队为先:存储对其他团队成员有帮助的知识
  6. 标注个人偏好:存储"Alice审核PR时要求X"而非仅"用户偏好X"
  7. 区分项目与个人内容:项目规范适用于所有人;个人偏好仅针对特定人员
  8. 使用
    --context
    添加元数据
    --context
    标签用于标记记忆类型(如
    procedures
    learnings
    preferences
    ),不可替代完整内容