knowledge-ops
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseKnowledge Operations
知识运营
Manage a multi-layered knowledge system for ingesting, organizing, syncing, and retrieving knowledge across multiple stores.
Prefer the live workspace model:
- code work lives in the real cloned repos
- active execution context lives in GitHub, Linear, and repo-local working-context files
- broader human-facing notes can live in a non-repo context/archive folder
- durable cross-machine memory belongs in the knowledge base, not in a shadow repo workspace
管理多层级知识体系,实现跨多存储源的知识摄入、整理、同步与检索。
推荐使用实时工作区模式:
- 代码工作内容存放在实际克隆的仓库中
- 活跃执行上下文存放在 GitHub、Linear 和仓库本地工作上下文文件中
- 面向用户的通用笔记可存放在非仓库上下文/归档文件夹中
- 持久化跨设备内存属于知识库,而非影子仓库工作区
When to Activate
何时启用
- User wants to save information to their knowledge base
- Ingesting documents, conversations, or data into structured storage
- Syncing knowledge across systems (local files, MCP memory, Supabase, Git repos)
- Deduplicating or organizing existing knowledge
- User says "save this to KB", "sync knowledge", "what do I know about X", "ingest this", "update the knowledge base"
- Any knowledge management task beyond simple memory recall
- 用户需要将信息保存到知识库
- 将文档、对话或数据摄入到结构化存储中
- 跨系统同步知识(本地文件、MCP memory、Supabase、Git 仓库)
- 对现有知识进行去重或整理
- 用户说「把这个保存到KB」、「同步知识」、「我有哪些关于X的信息」、「摄入这个内容」、「更新知识库」
- 任何超出简单记忆召回的知识管理任务
Knowledge Architecture
知识架构
Layer 1: Active execution truth
第1层:活跃执行真实数据源
- Sources: GitHub issues, PRs, discussions, release notes, Linear issues/projects/docs
- Use for: the current operational state of the work
- Rule: if something affects an active engineering plan, roadmap, rollout, or release, prefer putting it here first
- 来源: GitHub issue、PR、讨论、发布说明、Linear issue/项目/文档
- 适用场景: 工作的当前运营状态
- 规则: 如果内容会影响活跃的工程计划、路线图、上线或发布,优先存放在这里
Layer 2: Claude Code Memory (Quick Access)
第2层:Claude Code Memory(快速访问)
- Path:
~/.claude/projects/*/memory/ - Format: Markdown files with frontmatter
- Types: user preferences, feedback, project context, reference
- Use for: quick-access context that persists across conversations
- Automatically loaded at session start
- 路径:
~/.claude/projects/*/memory/ - 格式: 带frontmatter的Markdown文件
- 类型: 用户偏好、反馈、项目上下文、参考资料
- 适用场景: 跨会话持久化的快速访问上下文
- 会话启动时自动加载
Layer 3: MCP Memory Server (Structured Knowledge Graph)
第3层:MCP Memory Server(结构化知识图谱)
- Access: MCP memory tools (create_entities, create_relations, add_observations, search_nodes)
- Use for: Semantic search across all stored memories, relationship mapping
- Cross-session persistence with queryable graph structure
- 访问方式: MCP memory工具(create_entities、create_relations、add_observations、search_nodes)
- 适用场景: 所有存储记忆的语义搜索、关系映射
- 带可查询图谱结构的跨会话持久化
Layer 4: Knowledge base repo / durable document store
第4层:知识库仓库/持久化文档存储
- Use for: curated durable notes, session exports, synthesized research, operator memory, long-form docs
- Rule: this is the preferred durable store for cross-machine context when the content is not repo-owned code
- 适用场景: 经过整理的持久化笔记、会话导出、合成研究成果、运营记忆、长文档
- 规则: 当内容不属于仓库所有的代码时,这里是跨设备上下文首选的持久化存储位置
Layer 5: External Data Store (Supabase, PostgreSQL, etc.)
第5层:外部数据存储(Supabase、PostgreSQL等)
- Use for: Structured data, large document storage, full-text search
- Good for: Documents too large for memory files, data needing SQL queries
- 适用场景: 结构化数据、大型文档存储、全文搜索
- 优势: 适合存储超出内存文件大小限制的文档、需要SQL查询的数据
Layer 6: Local context/archive folder
第6层:本地上下文/归档文件夹
- Use for: human-facing notes, archived gameplans, local media organization, temporary non-code docs
- Rule: writable for information storage, but not a shadow code workspace
- Do not use for: active code changes or repo truth that should live upstream
- 适用场景: 面向用户的笔记、已归档的方案、本地媒体整理、临时非代码文档
- 规则: 可写入用于信息存储,但不作为影子代码工作区
- 禁止用于: 应该存放在上游的活跃代码变更或仓库真实数据源
Ingestion Workflow
摄入工作流
When new knowledge needs to be captured:
当需要捕获新知识时:
1. Classify
1. 分类
What type of knowledge is it?
- Business decision -> memory file (project type) + MCP memory
- Active roadmap / release / implementation state -> GitHub + Linear first
- Personal preference -> memory file (user/feedback type)
- Reference info -> memory file (reference type) + MCP memory
- Large document -> external data store + summary in memory
- Conversation/session -> knowledge base repo + short summary in memory
判断知识类型:
- 业务决策 -> 内存文件(项目类型) + MCP memory
- 活跃路线图/发布/实现状态 -> 优先存放到GitHub + Linear
- 个人偏好 -> 内存文件(用户/反馈类型)
- 参考信息 -> 内存文件(参考类型) + MCP memory
- 大型文档 -> 外部数据存储 + 内存中存放摘要
- 对话/会话 -> 知识库仓库 + 内存中存放简短摘要
2. Deduplicate
2. 去重
Check if this knowledge already exists:
- Search memory files for existing entries
- Query MCP memory with relevant terms
- Check whether the information already exists in GitHub or Linear before creating another local note
- Do not create duplicates. Update existing entries instead.
检查该知识是否已存在:
- 搜索内存文件中的现有条目
- 使用相关关键词查询MCP memory
- 创建新的本地笔记前,先检查GitHub或Linear中是否已有该信息
- 不要创建重复内容,优先更新现有条目
3. Store
3. 存储
Write to appropriate layer(s):
- Always update Claude Code memory for quick access
- Use MCP memory for semantic searchability and relationship mapping
- Update GitHub / Linear first when the information changes live project truth
- Commit to the knowledge base repo for durable long-form additions
写入到合适的层级:
- 始终更新Claude Code Memory以便快速访问
- 使用MCP memory实现语义搜索能力和关系映射
- 当信息会变更实时项目真实数据源时,优先更新GitHub / Linear
- 持久化的长内容新增提交到知识库仓库
4. Index
4. 索引
Update any relevant indexes or summary files.
更新所有相关的索引或摘要文件
Sync Operations
同步操作
Conversation Sync
对话同步
Periodically sync conversation history into the knowledge base:
- Sources: Claude session files, Codex sessions, other agent sessions
- Destination: knowledge base repo
- Generate a session index for quick browsing
- Commit and push
定期将会话历史同步到知识库:
- 来源:Claude会话文件、Codex会话、其他Agent会话
- 目标:知识库仓库
- 生成会话索引便于快速浏览
- 提交并推送
Workspace State Sync
工作区状态同步
Mirror important workspace configuration and scripts to the knowledge base:
- Generate directory maps
- Redact sensitive config before committing
- Track changes over time
- Do not treat the knowledge base or archive folder as the live code workspace
将重要的工作区配置和脚本镜像到知识库:
- 生成目录映射
- 提交前脱敏敏感配置
- 跟踪历史变更
- 不要将知识库或归档文件夹当做实时代码工作区
GitHub / Linear Sync
GitHub / Linear同步
When the information affects active execution:
- update the relevant GitHub issue, PR, discussion, release notes, or roadmap thread
- attach supporting docs to Linear when the work needs durable planning context
- only mirror a local note afterwards if it still adds value
当信息会影响活跃执行时:
- 更新相关的GitHub issue、PR、讨论、发布说明或路线图线程
- 当工作需要持久化规划上下文时,将支撑文档附加到Linear
- 仅当本地笔记仍有额外价值时,再做镜像留存
Cross-Source Knowledge Sync
跨源知识同步
Pull knowledge from multiple sources into one place:
- Claude/ChatGPT/Grok conversation exports
- Browser bookmarks
- GitHub activity events
- Write status summary, commit and push
将多个来源的知识聚合到同一位置:
- Claude/ChatGPT/Grok对话导出内容
- 浏览器书签
- GitHub活动事件
- 编写状态摘要,提交并推送
Memory Patterns
记忆模式
undefinedundefinedShort-term: current session context
Short-term: current session context
Use TodoWrite for in-session task tracking
Use TodoWrite for in-session task tracking
Medium-term: project memory files
Medium-term: project memory files
Write to ~/.claude/projects/*/memory/ for cross-session recall
Write to ~/.claude/projects/*/memory/ for cross-session recall
Long-term: GitHub / Linear / KB
Long-term: GitHub / Linear / KB
Put active execution truth in GitHub + Linear
Put durable synthesized context in the knowledge base repo
Put active execution truth in GitHub + Linear
Put durable synthesized context in the knowledge base repo
Semantic layer: MCP knowledge graph
Semantic layer: MCP knowledge graph
Use mcp__memory__create_entities for permanent structured data
Use mcp__memory__create_relations for relationship mapping
Use mcp__memory__add_observations for new facts about known entities
Use mcp__memory__search_nodes to find existing knowledge
undefinedUse mcp__memory__create_entities for permanent structured data
Use mcp__memory__create_relations for relationship mapping
Use mcp__memory__add_observations for new facts about known entities
Use mcp__memory__search_nodes to find existing knowledge
undefinedBest Practices
最佳实践
- Keep memory files concise. Archive old data rather than letting files grow unbounded.
- Use frontmatter (YAML) for metadata on all knowledge files.
- Deduplicate before storing. Search first, then create or update.
- Prefer one canonical home per fact set. Avoid parallel copies of the same plan across local notes, repo files, and tracker docs.
- Redact sensitive information (API keys, passwords) before committing to Git.
- Use consistent naming conventions for knowledge files (lowercase-kebab-case).
- Tag entries with topics/categories for easier retrieval.
- 保持内存文件简洁,归档旧数据而不是让文件无限制增长
- 所有知识文件使用frontmatter(YAML)存放元数据
- 存储前先去重,先搜索,再创建或更新
- 每组事实优先使用唯一规范存储位置,避免在本地笔记、仓库文件和跟踪器文档中同时存放同一计划的并行副本
- 提交到Git前脱敏敏感信息(API密钥、密码)
- 知识文件使用统一命名规范(小写短横线分隔命名)
- 为条目添加主题/分类标签便于检索
Quality Gate
质量校验
Before completing any knowledge operation:
- no duplicate entries created
- sensitive data redacted from any Git-tracked files
- indexes and summaries updated
- appropriate storage layer chosen for the data type
- cross-references added where relevant
完成任何知识操作前确认:
- 未创建重复条目
- 所有Git跟踪文件中的敏感数据已脱敏
- 索引和摘要已更新
- 为数据类型选择了合适的存储层
- 相关位置已添加交叉引用