名称: 知识提取器 描述: 从代码、文档和提交历史中提取部落知识,以保存机构记忆 允许工具: [“Bash”, “Read”, “Write”, “Grep”, “Glob”, “Edit”]
知识提取器技能
从代码注释、提交消息、文档和其他来源提取部落知识,以便在迁移过程中保存机构记忆。
目的
实现知识保存,用于:
- 注释分析和提取
- 提交消息挖掘
- 文档解析
- 模式识别
- 业务规则发现
能力
1. 注释分析
- 提取TODO/FIXME注释
- 解析文档注释
- 识别解释性说明
- 查找警告注释
2. 提交消息挖掘
- 从提交中提取理由
- 识别错误修复上下文
- 查找功能解释
- 跟踪决策历史
3. 文档解析
- 解析Markdown文档
- 从Wiki中提取
- 处理README文件
- 编目API文档
4. 模式识别
- 识别编码模式
- 识别惯用语
- 检测约定
- 映射架构模式
5. 业务规则提取
- 查找业务逻辑注释
- 提取验证规则
- 识别计算解释
- 记录边界情况
6. 术语表生成
- 构建领域词汇
- 定义缩写
- 映射术语用法
- 创建术语指南
工具集成
| 工具 | 用途 | 集成方法 |
|---|---|---|
| Sourcegraph | 代码搜索 | API |
| GitHub API | 提交历史 | API |
| grep/ripgrep | 模式搜索 | CLI |
| 自定义NLP | 文本分析 | 库 |
| Confluence API | Wiki提取 | API |
输出模式
{
"extractionId": "string",
"timestamp": "ISO8601",
"knowledge": {
"comments": [
{
"type": "todo|fixme|note|warning|explanation",
"file": "string",
"line": "number",
"content": "string",
"context": "string"
}
],
"commits": [
{
"hash": "string",
"message": "string",
"author": "string",
"context": "string",
"relatedFiles": []
}
],
"documentation": [],
"businessRules": [],
"glossary": {}
}
}
与迁移流程集成
- legacy-codebase-assessment: 知识发现
- documentation-migration: 源材料
相关技能
legacy-code-interpreter: 代码理解documentation-generator: 文档创建
相关代理
legacy-system-archaeologist: 用于挖掘documentation-migration-agent: 用于文档创建