codewiki-plus 5.2.0__tar.gz → 5.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/PKG-INFO +67 -19
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/README.md +66 -18
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/__init__.py +13 -13
- codewiki_plus-5.2.2/codewiki/hooks/__init__.py +8 -0
- codewiki_plus-5.2.2/codewiki/hooks/capture_session_end.py +208 -0
- codewiki_plus-5.2.2/codewiki/mcp/_ide_hook.py +473 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/cache.py +104 -5
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/prompts.py +592 -350
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/registry.py +143 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/resources.py +271 -271
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/server.py +5 -3
- codewiki_plus-5.2.2/codewiki/mcp/tools/capture_conversation.py +574 -0
- codewiki_plus-5.2.2/codewiki/mcp/tools/distill_conversation.py +900 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/doc_writer.py +30 -2
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/init_wiki.py +18 -2
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/knowledge_loop.py +40 -10
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/prompt_server.py +119 -10
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/wiki_search.py +16 -2
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/documentation_generator.py +383 -383
- codewiki_plus-5.2.2/codewiki/templates/ontology.yaml +14 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki_plus.egg-info/PKG-INFO +67 -19
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki_plus.egg-info/SOURCES.txt +11 -1
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/pyproject.toml +3 -2
- codewiki_plus-5.2.2/tests/test_distill_cleanup.py +101 -0
- codewiki_plus-5.2.2/tests/test_ide_hook_capture.py +522 -0
- codewiki_plus-5.2.2/tests/test_ontology_graph.py +184 -0
- codewiki_plus-5.2.2/tests/test_strip_system_injection.py +83 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/__main__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/adapters/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/adapters/doc_generator.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/commands/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/commands/config.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/commands/generate.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/config_manager.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/git_manager.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/html_generator.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/main.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/models/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/models/config.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/models/job.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/utils/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/utils/api_errors.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/utils/errors.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/utils/fs.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/utils/instructions.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/utils/logging.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/utils/progress.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/utils/repo_validator.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/cli/utils/validation.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/cbm_client.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/session.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/agents_md.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/analysis.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/batch_ingest.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/cbm_integration.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/close_session.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/code_reader.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/component_list.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/cross_service.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/crosslink.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/file_param.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/file_viewer.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/html_export.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/impact.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/issue_tracker.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/legacy_tools.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/module_tree.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/page_router.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/reading_guide.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/schema_generator.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/source_ingest.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/wiki_index.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/wiki_lint.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/workspace_analyzer.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/tools/workspace_result.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/mcp/workspace.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/py.typed +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/run_web_app.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/agent_tools/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/agent_tools/deps.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/agent_tools/generate_sub_module_documentations.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/agent_tools/read_code_components.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/agent_tools/str_replace_editor.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/backend.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/caw_backend.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/caw_toolkit.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/cluster_modules.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analysis/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analysis/analysis_service.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analysis/call_graph_analyzer.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analysis/cloning.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analysis/cross_service_matcher.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analysis/infra_scanner.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analysis/repo_analyzer.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analysis/service_detector.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analysis/topology_visualizer.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/c.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/cpp.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/csharp.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/go.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/java.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/javascript.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/kotlin.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/php.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/python.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/route_extractors/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/route_extractors/go_routes.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/route_extractors/java_routes.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/route_extractors/js_routes.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/route_extractors/mq_patterns.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/route_extractors/python_routes.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/analyzers/typescript.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/ast_parser.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/dependency_graphs_builder.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/models/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/models/analysis.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/models/core.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/models/cross_service.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/topo_sort.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/utils/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/utils/external_symbols.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/utils/logging_config.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/utils/path_canonicalizer.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/utils/patterns.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/dependency_analyzer/utils/security.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/llm_services.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/main.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/prompt_template.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/pydantic_ai_backend.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/be/utils.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/config.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/fe/__init__.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/fe/background_worker.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/fe/cache_manager.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/fe/config.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/fe/github_processor.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/fe/models.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/fe/routes.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/fe/template_utils.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/fe/templates.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/fe/visualise_docs.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/fe/web_app.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/src/utils.py +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/templates/github_pages/viewer_template.html +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki/templates/schema.yaml +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki_plus.egg-info/dependency_links.txt +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki_plus.egg-info/entry_points.txt +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki_plus.egg-info/requires.txt +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/codewiki_plus.egg-info/top_level.txt +0 -0
- {codewiki_plus-5.2.0 → codewiki_plus-5.2.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codewiki-plus
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.2
|
|
4
4
|
Summary: Transform codebases into comprehensive documentation using AI-powered analysis
|
|
5
5
|
Author: CodeWiki Contributors
|
|
6
6
|
License: MIT
|
|
@@ -103,7 +103,7 @@ CodeWiki-Plus 是 [FSoft-AI4Code/CodeWiki](https://github.com/FSoft-AI4Code/Code
|
|
|
103
103
|
|
|
104
104
|
实际上,CodeWiki 的核心工具链——AST 解析、依赖图、Mermaid 校验——完全不需要 LLM。真正需要 LLM 智能的 4 个环节(模块聚类、文档撰写、子模块递归、总览合成),恰好是 AI IDE 的 Agent 最擅长做的事情。
|
|
105
105
|
|
|
106
|
-
因此,我们将 CodeWiki 的 MCP Server 从"黑盒式一键生成"拆分为**
|
|
106
|
+
因此,我们将 CodeWiki 的 MCP Server 从"黑盒式一键生成"拆分为**28 个细粒度工具**,让它退化为纯工具链服务器。AI IDE 的 Agent 通过 MCP 协议调用这些工具,用自己的推理能力完成全部文档生成工作:
|
|
107
107
|
|
|
108
108
|
```
|
|
109
109
|
改造前:
|
|
@@ -119,7 +119,7 @@ CodeWiki-Plus 是 [FSoft-AI4Code/CodeWiki](https://github.com/FSoft-AI4Code/Code
|
|
|
119
119
|
| 能力维度 | 原版 CodeWiki | CodeWiki-Plus |
|
|
120
120
|
|----------|--------------|---------------|
|
|
121
121
|
| LLM 配置 | 必须自行配置 API Key | 零配置,IDE 自身模型驱动 |
|
|
122
|
-
| 生成模式 | 黑盒一键生成 |
|
|
122
|
+
| 生成模式 | 黑盒一键生成 | 28 个细粒度工具,Agent 全程可控 |
|
|
123
123
|
| 文档质量 | 通用描述 | Evidence-Based 断言(代码引用 + 置信度) |
|
|
124
124
|
| 生成效率 | 所有组件同等处理 | 代码路由分类,boilerplate 仅保留签名 |
|
|
125
125
|
| 上下文精度 | 模块内组件 | BFS 1-hop 调用图扩展 + 约束索引表 |
|
|
@@ -127,7 +127,7 @@ CodeWiki-Plus 是 [FSoft-AI4Code/CodeWiki](https://github.com/FSoft-AI4Code/Code
|
|
|
127
127
|
| 知识管理 | 无 | 结构化 Wiki + 笔记飞轮 + 外部文档管理 |
|
|
128
128
|
| 搜索能力 | 无 | BM25 + wikilink 图谱多跳 + 渐进式阅读 |
|
|
129
129
|
| 跨服务分析 | 无 | Monorepo 子服务检测 + 跨服务调用追踪 |
|
|
130
|
-
| 质量保障 | 无 |
|
|
130
|
+
| 质量保障 | 无 | 16 项 lint 检查 + health score + 问题追踪 |
|
|
131
131
|
|
|
132
132
|
### 前置条件
|
|
133
133
|
|
|
@@ -175,7 +175,7 @@ codewiki --version
|
|
|
175
175
|
}
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
配置完成后,CodeBuddy 的 MCP 工具列表中应出现 `codewiki` 相关的
|
|
178
|
+
配置完成后,CodeBuddy 的 MCP 工具列表中应出现 `codewiki` 相关的 28 个工具。
|
|
179
179
|
|
|
180
180
|
**第 3 步:在 Agent 模式中输入提示词**
|
|
181
181
|
|
|
@@ -244,7 +244,7 @@ repowiki/
|
|
|
244
244
|
|
|
245
245
|
### MCP 工具速查
|
|
246
246
|
|
|
247
|
-
所有工具均不需要 LLM 配置,由 IDE Agent 通过 MCP 协议调用。MCP Server 内置 **instructions**(能力概览与工作流指南)、**
|
|
247
|
+
所有工具均不需要 LLM 配置,由 IDE Agent 通过 MCP 协议调用。MCP Server 内置 **instructions**(能力概览与工作流指南)、**14 个工作流 Prompt**(覆盖初始化、生成、增量、搜索、质检、跨服务、团队记忆融合等全流程)和 **6 个 Resource**(wiki-catalog / module-tree / index-status 等)。
|
|
248
248
|
|
|
249
249
|
**代码分析(6 个):**
|
|
250
250
|
|
|
@@ -284,7 +284,7 @@ repowiki/
|
|
|
284
284
|
|
|
285
285
|
| 工具 | 用途 |
|
|
286
286
|
|------|------|
|
|
287
|
-
| `lint_wiki` | 文档-代码一致性检查:**
|
|
287
|
+
| `lint_wiki` | 文档-代码一致性检查:**16 项检查**(含 unsupported_claims 无证据断言检测) |
|
|
288
288
|
| `flag_issue` | 标记 Wiki 质量问题,驱动 health score 计算 |
|
|
289
289
|
|
|
290
290
|
**跨服务分析(1 个):**
|
|
@@ -293,6 +293,13 @@ repowiki/
|
|
|
293
293
|
|------|------|
|
|
294
294
|
| `query_cross_service` | 查询跨服务调用关系(HTTP + MQ),支持 by_service / by_method / by_path / trace 过滤 |
|
|
295
295
|
|
|
296
|
+
**团队记忆融合(2 个):**
|
|
297
|
+
|
|
298
|
+
| 工具 | 用途 |
|
|
299
|
+
|------|------|
|
|
300
|
+
| `capture_conversation` | 采集对话转录到 repowiki/raw/,仅落盘不蒸馏,支持 session 覆盖去重 |
|
|
301
|
+
| `distill_conversation` | 蒸馏 raw 对话为 Wiki 笔记:Mode C prepare → Agent 提取 → submit 入库(status=draft),需 confirm_note 确认 |
|
|
302
|
+
|
|
296
303
|
> 另有 2 个遗留工具(`generate_docs`、`get_module_tree`)保留向后兼容,需先通过 `codewiki config set` 配置 LLM API。
|
|
297
304
|
|
|
298
305
|
### 文档生成质量增强
|
|
@@ -396,6 +403,21 @@ LLM 发现跨功能约束
|
|
|
396
403
|
|
|
397
404
|
旧版词汇(candidate/confirmed/rejected/superseded)在读取端自动归一化,存量笔记无需立即迁移。
|
|
398
405
|
|
|
406
|
+
### 团队记忆融合(Team Memory Fusion)
|
|
407
|
+
|
|
408
|
+
借鉴 Team-Agent-Memory 的"从对话中提取可检索经验"能力,融合进知识飞轮,让 Agent 与研发的日常对话也能沉淀为可检索的实践经验。
|
|
409
|
+
|
|
410
|
+
**核心工具:**
|
|
411
|
+
|
|
412
|
+
- `capture_conversation`:将对话转录采集到 `repowiki/raw/`(仅落盘、不蒸馏),支持 session 覆盖去重。可由 IDE 的 SessionEnd 事件自动触发(默认关闭,通过 `team-memory-hook` Prompt 启用)。
|
|
413
|
+
- `distill_conversation`:将 raw 对话蒸馏为结构化 Wiki 笔记(标题/类型/关联模块)。采用 Mode C 协议——`prepare` 取出 transcript+system prompt → Agent 自行提取 → `submit` 交回 `distilled` JSON,全程无状态、不自动发生。产出入库为 `status=draft`,需 `confirm_note` 确认才成正式知识。
|
|
414
|
+
|
|
415
|
+
**关键约束:**
|
|
416
|
+
|
|
417
|
+
- 自动采集 Hook 只落 raw,永不自动蒸馏;蒸馏须显式调用 `distill_conversation`。
|
|
418
|
+
- `repowiki/raw/` 是暂存区,不进 `query_wiki` 检索;蒸馏完成后由工具自动清理(除非 `keep_raw`)。
|
|
419
|
+
- 触发形态为 **both**:手动命令(主)+ IDE Hook(可选)。
|
|
420
|
+
|
|
399
421
|
### 渐进式阅读协议
|
|
400
422
|
|
|
401
423
|
`query_wiki` 支持三种消费模式,让 Agent 按需逐层深入,避免一次性加载过多内容:
|
|
@@ -557,7 +579,7 @@ CodeWiki-Plus 采用 **SQLite 主存储 + JSON 兼容副本** 的双层架构:
|
|
|
557
579
|
|
|
558
580
|
#### 工作流 Prompt
|
|
559
581
|
|
|
560
|
-
MCP Server 内置 **
|
|
582
|
+
MCP Server 内置 **14 个工作流 Prompt**,在 AI IDE 中通过 Prompt 面板直接触发,Agent 自动编排多工具调用:
|
|
561
583
|
|
|
562
584
|
| Prompt 名称 | 面向场景 | 核心步骤 |
|
|
563
585
|
|-------------|----------|----------|
|
|
@@ -571,8 +593,10 @@ MCP Server 内置 **12 个工作流 Prompt**,在 AI IDE 中通过 Prompt 面
|
|
|
571
593
|
| `architecture-review` | 架构审查与热点分析 | 依赖图分析 → 核心层/服务层/应用层识别 → Top 5 热点 → 耦合风险 → 入口点 |
|
|
572
594
|
| `extract-knowledge` | 外部文档知识提取 | ingest_source 导入 → extraction_scan 候选提取 → 实体/概念页面生成 → wikilink 图谱 |
|
|
573
595
|
| `search-wiki` | 知识库搜索策略指引 | query_wiki(BM25)→ 图谱多跳扩展 → 渐进式阅读(overview → directory → detail) |
|
|
574
|
-
| `quality-check` | Wiki 质量全面检查 | lint_wiki(
|
|
596
|
+
| `quality-check` | Wiki 质量全面检查 | lint_wiki(16 项检查)→ health_score → flag_issue 标记 → 修复建议 |
|
|
575
597
|
| `ingest-note` | 经验知识归档 | ingest_note(8 种类型)→ candidate 状态 → confirm/reject 流转 → BM25 索引 |
|
|
598
|
+
| `team-memory-hook` | 对话自动采集管理 | 检查状态 → 启用(注册 SessionEnd 事件)/ 关闭 → 验证 |
|
|
599
|
+
| `distill-conversations` | 对话蒸馏提取经验 | prepare 取 transcript → Agent 提取知识 → submit 去重入库 → confirm/reject 评审 |
|
|
576
600
|
|
|
577
601
|
### 使用场景示例
|
|
578
602
|
|
|
@@ -626,7 +650,7 @@ Agent 调用 `confirm_note(note_file="pitfall-redis-connection-pool.md")`,升
|
|
|
626
650
|
检查一下 Wiki 文档的健康状况。
|
|
627
651
|
```
|
|
628
652
|
|
|
629
|
-
Agent 调用 `lint_wiki`,返回
|
|
653
|
+
Agent 调用 `lint_wiki`,返回 16 项诊断报告和 health_score。
|
|
630
654
|
|
|
631
655
|
**场景 8:跨服务调用分析**
|
|
632
656
|
|
|
@@ -676,7 +700,7 @@ Python、Java、JavaScript、TypeScript、C、C++、C#、Kotlin、Go、PHP
|
|
|
676
700
|
- [Tencent/WeKnora](https://github.com/Tencent/WeKnora) — 外部文档管理、文档健康检查、自适应分块思路
|
|
677
701
|
- [CodingHub](https://github.com/mambo-wang/CodingHub) — MCP Server 最佳实践(instructions / prompts / resources)
|
|
678
702
|
|
|
679
|
-
我们在上游基础上将 MCP Server 从黑盒模式拆分为 **
|
|
703
|
+
我们在上游基础上将 MCP Server 从黑盒模式拆分为 **28 个细粒度工具**,并新增结构化 Wiki、Evidence-Based 断言、代码路由分类、知识飞轮、渐进式阅读、方法级增量检测、monorepo 跨服务分析、团队记忆融合等能力。
|
|
680
704
|
|
|
681
705
|
上游论文:[CodeWiki: Evaluating AI's Ability to Generate Holistic Documentation for Large-Scale Codebases](https://arxiv.org/abs/2510.24428)
|
|
682
706
|
|
|
@@ -708,7 +732,7 @@ The original CodeWiki is an excellent repository-level documentation framework.
|
|
|
708
732
|
|
|
709
733
|
In practice, CodeWiki's core toolchain—Tree-sitter AST parsing, dependency graph construction, topological sorting, and Mermaid validation—does not need an LLM at all. The 4 stages that do require LLM intelligence (module clustering, document writing, sub-module recursion, and overview synthesis) are exactly what AI IDE Agents excel at.
|
|
710
734
|
|
|
711
|
-
We refactored CodeWiki's MCP Server from a "one-click black box" into **
|
|
735
|
+
We refactored CodeWiki's MCP Server from a "one-click black box" into **28 fine-grained tools**, turning it into a pure toolchain server. The AI IDE's Agent calls these tools via MCP and uses its own reasoning to complete all documentation work:
|
|
712
736
|
|
|
713
737
|
```
|
|
714
738
|
Before:
|
|
@@ -724,7 +748,7 @@ After:
|
|
|
724
748
|
| Dimension | Upstream CodeWiki | CodeWiki-Plus |
|
|
725
749
|
|-----------|------------------|---------------|
|
|
726
750
|
| LLM config | Must configure API key | Zero-config, IDE model driven |
|
|
727
|
-
| Generation mode | Black-box one-click |
|
|
751
|
+
| Generation mode | Black-box one-click | 28 fine-grained tools, full Agent control |
|
|
728
752
|
| Doc quality | Generic descriptions | Evidence-Based assertions (code quotes + confidence) |
|
|
729
753
|
| Generation efficiency | All components equal | Code routing: boilerplate gets signature-only |
|
|
730
754
|
| Context precision | Intra-module components | BFS 1-hop call graph + constraint index table |
|
|
@@ -732,7 +756,7 @@ After:
|
|
|
732
756
|
| Knowledge management | None | Structured Wiki + note flywheel + external docs |
|
|
733
757
|
| Search | None | BM25 + wikilink graph multi-hop + progressive reading |
|
|
734
758
|
| Cross-service | None | Monorepo sub-service detection + call tracing |
|
|
735
|
-
| Quality assurance | None |
|
|
759
|
+
| Quality assurance | None | 16 lint checks + health score + issue tracking |
|
|
736
760
|
|
|
737
761
|
### Prerequisites
|
|
738
762
|
|
|
@@ -803,7 +827,7 @@ Stage 5: Call close_session to free resources, build search index
|
|
|
803
827
|
|
|
804
828
|
### MCP Tools
|
|
805
829
|
|
|
806
|
-
All tools require zero LLM config. The IDE Agent invokes them via MCP. The server includes built-in **instructions**, **
|
|
830
|
+
All tools require zero LLM config. The IDE Agent invokes them via MCP. The server includes built-in **instructions**, **14 Workflow Prompts** (covering init, generation, incremental update, search, quality check, cross-service analysis, team memory fusion), and **6 Resources**.
|
|
807
831
|
|
|
808
832
|
**Code Analysis (6):**
|
|
809
833
|
|
|
@@ -824,7 +848,7 @@ All tools require zero LLM config. The IDE Agent invokes them via MCP. The serve
|
|
|
824
848
|
| `edit_doc_file` | Edit docs (str_replace / insert / undo) |
|
|
825
849
|
| `save_module_tree` | Persist module clustering results |
|
|
826
850
|
| `get_processing_order` | Get leaf-first documentation order |
|
|
827
|
-
| `get_prompt` | Retrieve prompt templates (
|
|
851
|
+
| `get_prompt` | Retrieve prompt templates (23 prompt_types) |
|
|
828
852
|
| `close_session` | Close session, build BM25 index + wikilink graph, write metadata |
|
|
829
853
|
|
|
830
854
|
**Knowledge Management (7):**
|
|
@@ -843,7 +867,7 @@ All tools require zero LLM config. The IDE Agent invokes them via MCP. The serve
|
|
|
843
867
|
|
|
844
868
|
| Tool | Purpose |
|
|
845
869
|
|------|---------|
|
|
846
|
-
| `lint_wiki` | Doc-code consistency: **
|
|
870
|
+
| `lint_wiki` | Doc-code consistency: **16 checks** (incl. unsupported_claims evidence detection) |
|
|
847
871
|
| `flag_issue` | Flag quality issues, drives health score |
|
|
848
872
|
|
|
849
873
|
**Cross-Service Analysis (1):**
|
|
@@ -852,6 +876,13 @@ All tools require zero LLM config. The IDE Agent invokes them via MCP. The serve
|
|
|
852
876
|
|------|---------|
|
|
853
877
|
| `query_cross_service` | Query cross-service calls (HTTP + MQ), filter by service/method/path/trace |
|
|
854
878
|
|
|
879
|
+
**Team Memory Fusion (2):**
|
|
880
|
+
|
|
881
|
+
| Tool | Purpose |
|
|
882
|
+
|------|---------|
|
|
883
|
+
| `capture_conversation` | Capture conversation transcripts to repowiki/raw/ (persistence only, no distillation); session-level supersede dedup |
|
|
884
|
+
| `distill_conversation` | Distill raw conversations into Wiki notes: Mode C prepare → Agent extracts → submit (status=draft); requires confirm_note |
|
|
885
|
+
|
|
855
886
|
> 2 legacy tools (`generate_docs`, `get_module_tree`) retained for backward compatibility.
|
|
856
887
|
|
|
857
888
|
### Documentation Quality Enhancements
|
|
@@ -910,6 +941,21 @@ LLM discovers cross-cutting constraint
|
|
|
910
941
|
→ Developer rejects: reject_note → marked deprecated, excluded from search (record preserved)
|
|
911
942
|
```
|
|
912
943
|
|
|
944
|
+
### Team Memory Fusion
|
|
945
|
+
|
|
946
|
+
Inspired by Team-Agent-Memory's "extract retrievable experience from conversations", this capability is fused into the Knowledge Flywheel so day-to-day dialog between the Agent and developers also becomes retrievable practical knowledge.
|
|
947
|
+
|
|
948
|
+
**Core tools:**
|
|
949
|
+
|
|
950
|
+
- `capture_conversation`: Capture conversation transcripts into `repowiki/raw/` (persistence only, no distillation); supports session-level supersede dedup. Can be triggered automatically by the IDE's SessionEnd event (off by default; enable via the `team-memory-hook` prompt).
|
|
951
|
+
- `distill_conversation`: Distill raw conversations into structured Wiki notes (title/type/related modules). Uses Mode C protocol — `prepare` returns transcript + system prompt → Agent extracts → `submit` returns the `distilled` JSON. Fully stateless, never runs automatically. Output is ingested as `status=draft` and requires `confirm_note` to become live knowledge.
|
|
952
|
+
|
|
953
|
+
**Key constraints:**
|
|
954
|
+
|
|
955
|
+
- The automatic capture hook only writes raw; it never distills. Distillation must be invoked explicitly via `distill_conversation`.
|
|
956
|
+
- `repowiki/raw/` is a staging area excluded from `query_wiki`; it is cleaned up after distillation automatically (unless `keep_raw`).
|
|
957
|
+
- Trigger form is **both**: manual command (primary) + IDE hook (optional).
|
|
958
|
+
|
|
913
959
|
### Progressive Reading Protocol
|
|
914
960
|
|
|
915
961
|
`query_wiki` supports three consumption modes:
|
|
@@ -923,7 +969,7 @@ LLM discovers cross-cutting constraint
|
|
|
923
969
|
|
|
924
970
|
### Workflow Prompts
|
|
925
971
|
|
|
926
|
-
The MCP server includes **
|
|
972
|
+
The MCP server includes **14 built-in workflow prompts** that can be triggered from the AI IDE's prompt panel. The Agent automatically orchestrates multi-tool calls:
|
|
927
973
|
|
|
928
974
|
| Prompt | Scenario | Core Steps |
|
|
929
975
|
|--------|----------|------------|
|
|
@@ -937,8 +983,10 @@ The MCP server includes **12 built-in workflow prompts** that can be triggered f
|
|
|
937
983
|
| `architecture-review` | Architecture review & hotspot analysis | Dependency graph → layer identification → Top 5 hotspots → coupling risks → entry points |
|
|
938
984
|
| `extract-knowledge` | External document knowledge extraction | ingest_source → extraction_scan → entity/concept pages → wikilink graph |
|
|
939
985
|
| `search-wiki` | Knowledge base search strategy | query_wiki (BM25) → graph multi-hop expansion → progressive reading |
|
|
940
|
-
| `quality-check` | Comprehensive Wiki quality check | lint_wiki (
|
|
986
|
+
| `quality-check` | Comprehensive Wiki quality check | lint_wiki (16 checks) → health_score → flag_issue → fix suggestions |
|
|
941
987
|
| `ingest-note` | Experience knowledge archiving | ingest_note (8 types) → candidate status → confirm/reject → BM25 index |
|
|
988
|
+
| `team-memory-hook` | Conversation capture hook management | Check status → enable (register SessionEnd event) / disable → verify |
|
|
989
|
+
| `distill-conversations` | Conversation distillation | prepare fetch transcripts → Agent extracts → submit ingest → confirm/reject review |
|
|
942
990
|
|
|
943
991
|
### Supported Languages
|
|
944
992
|
|
|
@@ -36,7 +36,7 @@ CodeWiki-Plus 是 [FSoft-AI4Code/CodeWiki](https://github.com/FSoft-AI4Code/Code
|
|
|
36
36
|
|
|
37
37
|
实际上,CodeWiki 的核心工具链——AST 解析、依赖图、Mermaid 校验——完全不需要 LLM。真正需要 LLM 智能的 4 个环节(模块聚类、文档撰写、子模块递归、总览合成),恰好是 AI IDE 的 Agent 最擅长做的事情。
|
|
38
38
|
|
|
39
|
-
因此,我们将 CodeWiki 的 MCP Server 从"黑盒式一键生成"拆分为**
|
|
39
|
+
因此,我们将 CodeWiki 的 MCP Server 从"黑盒式一键生成"拆分为**28 个细粒度工具**,让它退化为纯工具链服务器。AI IDE 的 Agent 通过 MCP 协议调用这些工具,用自己的推理能力完成全部文档生成工作:
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
改造前:
|
|
@@ -52,7 +52,7 @@ CodeWiki-Plus 是 [FSoft-AI4Code/CodeWiki](https://github.com/FSoft-AI4Code/Code
|
|
|
52
52
|
| 能力维度 | 原版 CodeWiki | CodeWiki-Plus |
|
|
53
53
|
|----------|--------------|---------------|
|
|
54
54
|
| LLM 配置 | 必须自行配置 API Key | 零配置,IDE 自身模型驱动 |
|
|
55
|
-
| 生成模式 | 黑盒一键生成 |
|
|
55
|
+
| 生成模式 | 黑盒一键生成 | 28 个细粒度工具,Agent 全程可控 |
|
|
56
56
|
| 文档质量 | 通用描述 | Evidence-Based 断言(代码引用 + 置信度) |
|
|
57
57
|
| 生成效率 | 所有组件同等处理 | 代码路由分类,boilerplate 仅保留签名 |
|
|
58
58
|
| 上下文精度 | 模块内组件 | BFS 1-hop 调用图扩展 + 约束索引表 |
|
|
@@ -60,7 +60,7 @@ CodeWiki-Plus 是 [FSoft-AI4Code/CodeWiki](https://github.com/FSoft-AI4Code/Code
|
|
|
60
60
|
| 知识管理 | 无 | 结构化 Wiki + 笔记飞轮 + 外部文档管理 |
|
|
61
61
|
| 搜索能力 | 无 | BM25 + wikilink 图谱多跳 + 渐进式阅读 |
|
|
62
62
|
| 跨服务分析 | 无 | Monorepo 子服务检测 + 跨服务调用追踪 |
|
|
63
|
-
| 质量保障 | 无 |
|
|
63
|
+
| 质量保障 | 无 | 16 项 lint 检查 + health score + 问题追踪 |
|
|
64
64
|
|
|
65
65
|
### 前置条件
|
|
66
66
|
|
|
@@ -108,7 +108,7 @@ codewiki --version
|
|
|
108
108
|
}
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
配置完成后,CodeBuddy 的 MCP 工具列表中应出现 `codewiki` 相关的
|
|
111
|
+
配置完成后,CodeBuddy 的 MCP 工具列表中应出现 `codewiki` 相关的 28 个工具。
|
|
112
112
|
|
|
113
113
|
**第 3 步:在 Agent 模式中输入提示词**
|
|
114
114
|
|
|
@@ -177,7 +177,7 @@ repowiki/
|
|
|
177
177
|
|
|
178
178
|
### MCP 工具速查
|
|
179
179
|
|
|
180
|
-
所有工具均不需要 LLM 配置,由 IDE Agent 通过 MCP 协议调用。MCP Server 内置 **instructions**(能力概览与工作流指南)、**
|
|
180
|
+
所有工具均不需要 LLM 配置,由 IDE Agent 通过 MCP 协议调用。MCP Server 内置 **instructions**(能力概览与工作流指南)、**14 个工作流 Prompt**(覆盖初始化、生成、增量、搜索、质检、跨服务、团队记忆融合等全流程)和 **6 个 Resource**(wiki-catalog / module-tree / index-status 等)。
|
|
181
181
|
|
|
182
182
|
**代码分析(6 个):**
|
|
183
183
|
|
|
@@ -217,7 +217,7 @@ repowiki/
|
|
|
217
217
|
|
|
218
218
|
| 工具 | 用途 |
|
|
219
219
|
|------|------|
|
|
220
|
-
| `lint_wiki` | 文档-代码一致性检查:**
|
|
220
|
+
| `lint_wiki` | 文档-代码一致性检查:**16 项检查**(含 unsupported_claims 无证据断言检测) |
|
|
221
221
|
| `flag_issue` | 标记 Wiki 质量问题,驱动 health score 计算 |
|
|
222
222
|
|
|
223
223
|
**跨服务分析(1 个):**
|
|
@@ -226,6 +226,13 @@ repowiki/
|
|
|
226
226
|
|------|------|
|
|
227
227
|
| `query_cross_service` | 查询跨服务调用关系(HTTP + MQ),支持 by_service / by_method / by_path / trace 过滤 |
|
|
228
228
|
|
|
229
|
+
**团队记忆融合(2 个):**
|
|
230
|
+
|
|
231
|
+
| 工具 | 用途 |
|
|
232
|
+
|------|------|
|
|
233
|
+
| `capture_conversation` | 采集对话转录到 repowiki/raw/,仅落盘不蒸馏,支持 session 覆盖去重 |
|
|
234
|
+
| `distill_conversation` | 蒸馏 raw 对话为 Wiki 笔记:Mode C prepare → Agent 提取 → submit 入库(status=draft),需 confirm_note 确认 |
|
|
235
|
+
|
|
229
236
|
> 另有 2 个遗留工具(`generate_docs`、`get_module_tree`)保留向后兼容,需先通过 `codewiki config set` 配置 LLM API。
|
|
230
237
|
|
|
231
238
|
### 文档生成质量增强
|
|
@@ -329,6 +336,21 @@ LLM 发现跨功能约束
|
|
|
329
336
|
|
|
330
337
|
旧版词汇(candidate/confirmed/rejected/superseded)在读取端自动归一化,存量笔记无需立即迁移。
|
|
331
338
|
|
|
339
|
+
### 团队记忆融合(Team Memory Fusion)
|
|
340
|
+
|
|
341
|
+
借鉴 Team-Agent-Memory 的"从对话中提取可检索经验"能力,融合进知识飞轮,让 Agent 与研发的日常对话也能沉淀为可检索的实践经验。
|
|
342
|
+
|
|
343
|
+
**核心工具:**
|
|
344
|
+
|
|
345
|
+
- `capture_conversation`:将对话转录采集到 `repowiki/raw/`(仅落盘、不蒸馏),支持 session 覆盖去重。可由 IDE 的 SessionEnd 事件自动触发(默认关闭,通过 `team-memory-hook` Prompt 启用)。
|
|
346
|
+
- `distill_conversation`:将 raw 对话蒸馏为结构化 Wiki 笔记(标题/类型/关联模块)。采用 Mode C 协议——`prepare` 取出 transcript+system prompt → Agent 自行提取 → `submit` 交回 `distilled` JSON,全程无状态、不自动发生。产出入库为 `status=draft`,需 `confirm_note` 确认才成正式知识。
|
|
347
|
+
|
|
348
|
+
**关键约束:**
|
|
349
|
+
|
|
350
|
+
- 自动采集 Hook 只落 raw,永不自动蒸馏;蒸馏须显式调用 `distill_conversation`。
|
|
351
|
+
- `repowiki/raw/` 是暂存区,不进 `query_wiki` 检索;蒸馏完成后由工具自动清理(除非 `keep_raw`)。
|
|
352
|
+
- 触发形态为 **both**:手动命令(主)+ IDE Hook(可选)。
|
|
353
|
+
|
|
332
354
|
### 渐进式阅读协议
|
|
333
355
|
|
|
334
356
|
`query_wiki` 支持三种消费模式,让 Agent 按需逐层深入,避免一次性加载过多内容:
|
|
@@ -490,7 +512,7 @@ CodeWiki-Plus 采用 **SQLite 主存储 + JSON 兼容副本** 的双层架构:
|
|
|
490
512
|
|
|
491
513
|
#### 工作流 Prompt
|
|
492
514
|
|
|
493
|
-
MCP Server 内置 **
|
|
515
|
+
MCP Server 内置 **14 个工作流 Prompt**,在 AI IDE 中通过 Prompt 面板直接触发,Agent 自动编排多工具调用:
|
|
494
516
|
|
|
495
517
|
| Prompt 名称 | 面向场景 | 核心步骤 |
|
|
496
518
|
|-------------|----------|----------|
|
|
@@ -504,8 +526,10 @@ MCP Server 内置 **12 个工作流 Prompt**,在 AI IDE 中通过 Prompt 面
|
|
|
504
526
|
| `architecture-review` | 架构审查与热点分析 | 依赖图分析 → 核心层/服务层/应用层识别 → Top 5 热点 → 耦合风险 → 入口点 |
|
|
505
527
|
| `extract-knowledge` | 外部文档知识提取 | ingest_source 导入 → extraction_scan 候选提取 → 实体/概念页面生成 → wikilink 图谱 |
|
|
506
528
|
| `search-wiki` | 知识库搜索策略指引 | query_wiki(BM25)→ 图谱多跳扩展 → 渐进式阅读(overview → directory → detail) |
|
|
507
|
-
| `quality-check` | Wiki 质量全面检查 | lint_wiki(
|
|
529
|
+
| `quality-check` | Wiki 质量全面检查 | lint_wiki(16 项检查)→ health_score → flag_issue 标记 → 修复建议 |
|
|
508
530
|
| `ingest-note` | 经验知识归档 | ingest_note(8 种类型)→ candidate 状态 → confirm/reject 流转 → BM25 索引 |
|
|
531
|
+
| `team-memory-hook` | 对话自动采集管理 | 检查状态 → 启用(注册 SessionEnd 事件)/ 关闭 → 验证 |
|
|
532
|
+
| `distill-conversations` | 对话蒸馏提取经验 | prepare 取 transcript → Agent 提取知识 → submit 去重入库 → confirm/reject 评审 |
|
|
509
533
|
|
|
510
534
|
### 使用场景示例
|
|
511
535
|
|
|
@@ -559,7 +583,7 @@ Agent 调用 `confirm_note(note_file="pitfall-redis-connection-pool.md")`,升
|
|
|
559
583
|
检查一下 Wiki 文档的健康状况。
|
|
560
584
|
```
|
|
561
585
|
|
|
562
|
-
Agent 调用 `lint_wiki`,返回
|
|
586
|
+
Agent 调用 `lint_wiki`,返回 16 项诊断报告和 health_score。
|
|
563
587
|
|
|
564
588
|
**场景 8:跨服务调用分析**
|
|
565
589
|
|
|
@@ -609,7 +633,7 @@ Python、Java、JavaScript、TypeScript、C、C++、C#、Kotlin、Go、PHP
|
|
|
609
633
|
- [Tencent/WeKnora](https://github.com/Tencent/WeKnora) — 外部文档管理、文档健康检查、自适应分块思路
|
|
610
634
|
- [CodingHub](https://github.com/mambo-wang/CodingHub) — MCP Server 最佳实践(instructions / prompts / resources)
|
|
611
635
|
|
|
612
|
-
我们在上游基础上将 MCP Server 从黑盒模式拆分为 **
|
|
636
|
+
我们在上游基础上将 MCP Server 从黑盒模式拆分为 **28 个细粒度工具**,并新增结构化 Wiki、Evidence-Based 断言、代码路由分类、知识飞轮、渐进式阅读、方法级增量检测、monorepo 跨服务分析、团队记忆融合等能力。
|
|
613
637
|
|
|
614
638
|
上游论文:[CodeWiki: Evaluating AI's Ability to Generate Holistic Documentation for Large-Scale Codebases](https://arxiv.org/abs/2510.24428)
|
|
615
639
|
|
|
@@ -641,7 +665,7 @@ The original CodeWiki is an excellent repository-level documentation framework.
|
|
|
641
665
|
|
|
642
666
|
In practice, CodeWiki's core toolchain—Tree-sitter AST parsing, dependency graph construction, topological sorting, and Mermaid validation—does not need an LLM at all. The 4 stages that do require LLM intelligence (module clustering, document writing, sub-module recursion, and overview synthesis) are exactly what AI IDE Agents excel at.
|
|
643
667
|
|
|
644
|
-
We refactored CodeWiki's MCP Server from a "one-click black box" into **
|
|
668
|
+
We refactored CodeWiki's MCP Server from a "one-click black box" into **28 fine-grained tools**, turning it into a pure toolchain server. The AI IDE's Agent calls these tools via MCP and uses its own reasoning to complete all documentation work:
|
|
645
669
|
|
|
646
670
|
```
|
|
647
671
|
Before:
|
|
@@ -657,7 +681,7 @@ After:
|
|
|
657
681
|
| Dimension | Upstream CodeWiki | CodeWiki-Plus |
|
|
658
682
|
|-----------|------------------|---------------|
|
|
659
683
|
| LLM config | Must configure API key | Zero-config, IDE model driven |
|
|
660
|
-
| Generation mode | Black-box one-click |
|
|
684
|
+
| Generation mode | Black-box one-click | 28 fine-grained tools, full Agent control |
|
|
661
685
|
| Doc quality | Generic descriptions | Evidence-Based assertions (code quotes + confidence) |
|
|
662
686
|
| Generation efficiency | All components equal | Code routing: boilerplate gets signature-only |
|
|
663
687
|
| Context precision | Intra-module components | BFS 1-hop call graph + constraint index table |
|
|
@@ -665,7 +689,7 @@ After:
|
|
|
665
689
|
| Knowledge management | None | Structured Wiki + note flywheel + external docs |
|
|
666
690
|
| Search | None | BM25 + wikilink graph multi-hop + progressive reading |
|
|
667
691
|
| Cross-service | None | Monorepo sub-service detection + call tracing |
|
|
668
|
-
| Quality assurance | None |
|
|
692
|
+
| Quality assurance | None | 16 lint checks + health score + issue tracking |
|
|
669
693
|
|
|
670
694
|
### Prerequisites
|
|
671
695
|
|
|
@@ -736,7 +760,7 @@ Stage 5: Call close_session to free resources, build search index
|
|
|
736
760
|
|
|
737
761
|
### MCP Tools
|
|
738
762
|
|
|
739
|
-
All tools require zero LLM config. The IDE Agent invokes them via MCP. The server includes built-in **instructions**, **
|
|
763
|
+
All tools require zero LLM config. The IDE Agent invokes them via MCP. The server includes built-in **instructions**, **14 Workflow Prompts** (covering init, generation, incremental update, search, quality check, cross-service analysis, team memory fusion), and **6 Resources**.
|
|
740
764
|
|
|
741
765
|
**Code Analysis (6):**
|
|
742
766
|
|
|
@@ -757,7 +781,7 @@ All tools require zero LLM config. The IDE Agent invokes them via MCP. The serve
|
|
|
757
781
|
| `edit_doc_file` | Edit docs (str_replace / insert / undo) |
|
|
758
782
|
| `save_module_tree` | Persist module clustering results |
|
|
759
783
|
| `get_processing_order` | Get leaf-first documentation order |
|
|
760
|
-
| `get_prompt` | Retrieve prompt templates (
|
|
784
|
+
| `get_prompt` | Retrieve prompt templates (23 prompt_types) |
|
|
761
785
|
| `close_session` | Close session, build BM25 index + wikilink graph, write metadata |
|
|
762
786
|
|
|
763
787
|
**Knowledge Management (7):**
|
|
@@ -776,7 +800,7 @@ All tools require zero LLM config. The IDE Agent invokes them via MCP. The serve
|
|
|
776
800
|
|
|
777
801
|
| Tool | Purpose |
|
|
778
802
|
|------|---------|
|
|
779
|
-
| `lint_wiki` | Doc-code consistency: **
|
|
803
|
+
| `lint_wiki` | Doc-code consistency: **16 checks** (incl. unsupported_claims evidence detection) |
|
|
780
804
|
| `flag_issue` | Flag quality issues, drives health score |
|
|
781
805
|
|
|
782
806
|
**Cross-Service Analysis (1):**
|
|
@@ -785,6 +809,13 @@ All tools require zero LLM config. The IDE Agent invokes them via MCP. The serve
|
|
|
785
809
|
|------|---------|
|
|
786
810
|
| `query_cross_service` | Query cross-service calls (HTTP + MQ), filter by service/method/path/trace |
|
|
787
811
|
|
|
812
|
+
**Team Memory Fusion (2):**
|
|
813
|
+
|
|
814
|
+
| Tool | Purpose |
|
|
815
|
+
|------|---------|
|
|
816
|
+
| `capture_conversation` | Capture conversation transcripts to repowiki/raw/ (persistence only, no distillation); session-level supersede dedup |
|
|
817
|
+
| `distill_conversation` | Distill raw conversations into Wiki notes: Mode C prepare → Agent extracts → submit (status=draft); requires confirm_note |
|
|
818
|
+
|
|
788
819
|
> 2 legacy tools (`generate_docs`, `get_module_tree`) retained for backward compatibility.
|
|
789
820
|
|
|
790
821
|
### Documentation Quality Enhancements
|
|
@@ -843,6 +874,21 @@ LLM discovers cross-cutting constraint
|
|
|
843
874
|
→ Developer rejects: reject_note → marked deprecated, excluded from search (record preserved)
|
|
844
875
|
```
|
|
845
876
|
|
|
877
|
+
### Team Memory Fusion
|
|
878
|
+
|
|
879
|
+
Inspired by Team-Agent-Memory's "extract retrievable experience from conversations", this capability is fused into the Knowledge Flywheel so day-to-day dialog between the Agent and developers also becomes retrievable practical knowledge.
|
|
880
|
+
|
|
881
|
+
**Core tools:**
|
|
882
|
+
|
|
883
|
+
- `capture_conversation`: Capture conversation transcripts into `repowiki/raw/` (persistence only, no distillation); supports session-level supersede dedup. Can be triggered automatically by the IDE's SessionEnd event (off by default; enable via the `team-memory-hook` prompt).
|
|
884
|
+
- `distill_conversation`: Distill raw conversations into structured Wiki notes (title/type/related modules). Uses Mode C protocol — `prepare` returns transcript + system prompt → Agent extracts → `submit` returns the `distilled` JSON. Fully stateless, never runs automatically. Output is ingested as `status=draft` and requires `confirm_note` to become live knowledge.
|
|
885
|
+
|
|
886
|
+
**Key constraints:**
|
|
887
|
+
|
|
888
|
+
- The automatic capture hook only writes raw; it never distills. Distillation must be invoked explicitly via `distill_conversation`.
|
|
889
|
+
- `repowiki/raw/` is a staging area excluded from `query_wiki`; it is cleaned up after distillation automatically (unless `keep_raw`).
|
|
890
|
+
- Trigger form is **both**: manual command (primary) + IDE hook (optional).
|
|
891
|
+
|
|
846
892
|
### Progressive Reading Protocol
|
|
847
893
|
|
|
848
894
|
`query_wiki` supports three consumption modes:
|
|
@@ -856,7 +902,7 @@ LLM discovers cross-cutting constraint
|
|
|
856
902
|
|
|
857
903
|
### Workflow Prompts
|
|
858
904
|
|
|
859
|
-
The MCP server includes **
|
|
905
|
+
The MCP server includes **14 built-in workflow prompts** that can be triggered from the AI IDE's prompt panel. The Agent automatically orchestrates multi-tool calls:
|
|
860
906
|
|
|
861
907
|
| Prompt | Scenario | Core Steps |
|
|
862
908
|
|--------|----------|------------|
|
|
@@ -870,8 +916,10 @@ The MCP server includes **12 built-in workflow prompts** that can be triggered f
|
|
|
870
916
|
| `architecture-review` | Architecture review & hotspot analysis | Dependency graph → layer identification → Top 5 hotspots → coupling risks → entry points |
|
|
871
917
|
| `extract-knowledge` | External document knowledge extraction | ingest_source → extraction_scan → entity/concept pages → wikilink graph |
|
|
872
918
|
| `search-wiki` | Knowledge base search strategy | query_wiki (BM25) → graph multi-hop expansion → progressive reading |
|
|
873
|
-
| `quality-check` | Comprehensive Wiki quality check | lint_wiki (
|
|
919
|
+
| `quality-check` | Comprehensive Wiki quality check | lint_wiki (16 checks) → health_score → flag_issue → fix suggestions |
|
|
874
920
|
| `ingest-note` | Experience knowledge archiving | ingest_note (8 types) → candidate status → confirm/reject → BM25 index |
|
|
921
|
+
| `team-memory-hook` | Conversation capture hook management | Check status → enable (register SessionEnd event) / disable → verify |
|
|
922
|
+
| `distill-conversations` | Conversation distillation | prepare fetch transcripts → Agent extracts → submit ingest → confirm/reject review |
|
|
875
923
|
|
|
876
924
|
### Supported Languages
|
|
877
925
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"""
|
|
2
|
-
CodeWiki: Transform codebases into comprehensive documentation using AI-powered analysis.
|
|
3
|
-
|
|
4
|
-
This package provides a CLI tool for generating documentation from code repositories,
|
|
5
|
-
and an MCP server for IDE-driven documentation generation.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
__version__ = "5.2.
|
|
9
|
-
__author__ = "CodeWiki Contributors"
|
|
10
|
-
__license__ = "MIT"
|
|
11
|
-
|
|
12
|
-
__all__ = ["__version__"]
|
|
13
|
-
|
|
1
|
+
"""
|
|
2
|
+
CodeWiki: Transform codebases into comprehensive documentation using AI-powered analysis.
|
|
3
|
+
|
|
4
|
+
This package provides a CLI tool for generating documentation from code repositories,
|
|
5
|
+
and an MCP server for IDE-driven documentation generation.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "5.2.2"
|
|
9
|
+
__author__ = "CodeWiki Contributors"
|
|
10
|
+
__license__ = "MIT"
|
|
11
|
+
|
|
12
|
+
__all__ = ["__version__"]
|
|
13
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"""CodeBuddy IDE hook wrappers shipped with codewiki.
|
|
2
|
+
|
|
3
|
+
This subpackage holds the *source* copies of hook scripts that the
|
|
4
|
+
``team-memory-hook`` MCP prompt copies into a user's project
|
|
5
|
+
(``<repo>/.codebuddy/hooks/``) when they enable team-memory capture.
|
|
6
|
+
The scripts are not invoked from inside this package — only the copied
|
|
7
|
+
files in the target project are run by the IDE.
|
|
8
|
+
"""
|