knowledge-consolidation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseKnowledge Consolidation
知识整合
Persist valuable knowledge from AI conversations into structured documents.
将AI对话中有价值的知识持久化保存为结构化文档。
When to Invoke
触发时机
Proactive (AI self-invoke):
- Starting new session after substantial prior work
- Accumulated debugging/architecture/pattern knowledge worth preserving
- Resolved non-trivial issues with reusable insights
Skip when:
- Simple Q&A with no novel insights
- Trivial changes with nothing worth preserving
主动触发(AI自动调用):
- 在完成大量前期工作后开启新会话
- 积累了值得留存的调试/架构/模式相关知识
- 解决了具有可复用见解的复杂问题
以下情况跳过触发:
- 无新颖见解的简单问答
- 无留存价值的微小变更
Workflow
工作流程
Step 1: Detect AI IDE Type
步骤1:检测AI IDE类型
Check project root for AI IDE indicator directory:
| Environment Indicator | AI Type | Storage Path |
|---|---|---|
| | |
| | |
| | |
| | |
检查项目根目录下的AI IDE标识目录:
| 环境标识 | AI类型 | 存储路径 |
|---|---|---|
| | |
| | |
| | |
| | |
Step 2: Identify Consolidation Candidates
步骤2:筛选知识整合候选内容
Scan conversation for knowledge worth preserving:
- Debug sessions with root cause analysis
- Architecture decisions with rationale
- Code patterns discovered or established
- Configuration knowledge (build, env, tooling)
- API integration insights
- Workflow improvements
- Lessons learned from issues
扫描会话内容,筛选值得留存的知识:
- 包含根因分析的调试会话
- 带有决策依据的架构方案
- 已发现或确立的代码模式
- 配置相关知识(构建、环境、工具链)
- API集成见解
- 工作流程优化方案
- 从问题中总结的经验教训
Step 3: Classify Knowledge Type
步骤3:知识类型分类
Select appropriate type based on content:
| Type | When to Use |
|---|---|
| Bug fixes, crash analysis, error resolution |
| System design, module structure, dependencies |
| Reusable code patterns, idioms, best practices |
| Build settings, environment, tooling setup |
| API design, integration, protocol details |
| Development processes, procedures |
| Post-mortems, retrospectives, project insights |
| Technical specs, schema docs, standards |
See knowledge-types.md for detailed guidance on each type.
根据内容选择合适的类型:
| 类型 | 使用场景 |
|---|---|
| 漏洞修复、崩溃分析、错误排查 |
| 系统设计、模块结构、依赖关系 |
| 可复用代码模式、编程范式、最佳实践 |
| 构建设置、环境配置、工具链搭建 |
| API设计、集成实现、协议细节 |
| 开发流程、操作规范 |
| 事后复盘、经验总结、项目洞察 |
| 技术规范、Schema文档、标准约定 |
各类型的详细说明请参考knowledge-types.md。
Step 4: Generate Document Path
步骤4:生成文档路径
Run path generation script:
bash
{skill_root}/scripts/get-knowledge-path.sh \
-r <project_root> -a <ai_type> -t <type> -n <filename>Output format:
{project_root}/{ai_path}/knowledges/{YYYYMMDD}_{seq}_{type}_{filename}.md运行路径生成脚本:
bash
{skill_root}/scripts/get-knowledge-path.sh \
-r <project_root> -a <ai_type> -t <type> -n <filename>输出格式:
{project_root}/{ai_path}/knowledges/{YYYYMMDD}_{seq}_{type}_{filename}.mdStep 5: Write Knowledge Document
步骤5:撰写知识文档
Create document using template:
markdown
undefined使用模板创建文档:
markdown
undefined{Title}
{标题}
Type: {type} Date: {YYYY-MM-DD} Context: {Brief context}
类型: {type} 日期: {YYYY-MM-DD} 背景概述: {简短背景}
Summary
内容摘要
{2-3 sentence summary}
{2-3句话的摘要}
Background
详细背景
{Situation/problem/context}
{场景/问题/背景}
Details
详细内容
{Technical content, code snippets, analysis}
{技术内容、代码片段、分析过程}
Key Takeaways
核心要点
{Bullet points of actionable insights}
{可执行见解的要点列表}
Related
相关链接
{Links to related files or knowledge entries}
undefined{相关文件或知识条目的链接}
undefinedStep 6: Confirm with User
步骤6:向用户确认
📚 Knowledge Consolidated:
- File: {path}
- Type: {type}
- Topic: {title}
Summary: {brief summary}📚 Knowledge Consolidated:
- File: {path}
- Type: {type}
- Topic: {title}
Summary: {brief summary}Resources
资源列表
| Resource | Purpose |
|---|---|
| Generate timestamped file path |
| Detailed type selection guide |
| Document template |
| Complete workflow example |
| 资源路径 | 用途 |
|---|---|
| 生成带时间戳的文件路径 |
| 详细的类型选择指南 |
| 知识文档模板 |
| 完整工作流程示例 |