codeboarding 0.13.4__tar.gz → 0.13.6__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.
- {codeboarding-0.13.4/codeboarding.egg-info → codeboarding-0.13.6}/PKG-INFO +1 -1
- {codeboarding-0.13.4 → codeboarding-0.13.6}/README.md +3 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/agent_responses.py +0 -99
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/prompts/claude_prompts.py +0 -54
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/prompts/deepseek_prompts.py +0 -51
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/prompts/gemini_flash_prompts.py +0 -42
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/prompts/glm_prompts.py +0 -55
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/prompts/gpt_prompts.py +0 -93
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/prompts/kimi_prompts.py +0 -55
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/prompts/prompt_factory.py +0 -12
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/validation.py +0 -32
- {codeboarding-0.13.4 → codeboarding-0.13.6/codeboarding.egg-info}/PKG-INFO +1 -1
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding.egg-info/SOURCES.txt +2 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/cluster_snapshot.py +1 -1
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/io_utils.py +2 -93
- {codeboarding-0.13.4 → codeboarding-0.13.6}/pyproject.toml +1 -1
- {codeboarding-0.13.4 → codeboarding-0.13.6}/repo_utils/ignore.py +15 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/__init__.py +18 -3
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/adapters/csharp_adapter.py +50 -1
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/call_graph_builder.py +28 -16
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/edge_build_context.py +4 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/edge_builder.py +15 -2
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/language_adapter.py +12 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/lsp_client.py +32 -1
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/lsp_constants.py +12 -0
- codeboarding-0.13.6/static_analyzer/engine/lsp_recycler.py +142 -0
- codeboarding-0.13.6/static_analyzer/engine/process_memory.py +104 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/source_inspector.py +54 -13
- {codeboarding-0.13.4 → codeboarding-0.13.6}/LICENSE +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/PYPI.md +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/abstraction_agent.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/agent.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/change_status.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/cluster_ids.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/cluster_methods_mixin.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/constants.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/content_hash.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/dependency_discovery.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/details_agent.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/file_index_models.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/incremental_agent.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/incremental_results.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/llm_config.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/llm_errors.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/meta_agent.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/model_capabilities.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/planner_agent.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/prompts/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/prompts/abstract_prompt_factory.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/relation_edges.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/repair.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/retry.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/scope_ids.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/base.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/component_bridge_edges.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/get_external_deps.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/get_method_invocations.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/list_git_changes.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/read_cfg.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/read_docs.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/read_file.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/read_file_structure.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/read_packages.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/read_source.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/read_structure.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/agents/tools/toolkit.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/caching/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/caching/cache.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/caching/details_cache.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/caching/meta_cache.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding.egg-info/dependency_links.txt +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding.egg-info/entry_points.txt +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding.egg-info/requires.txt +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding.egg-info/top_level.txt +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_cli/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_cli/bootstrap.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_cli/commands/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_cli/commands/full_analysis.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_cli/commands/incremental_analysis.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_cli/commands/partial_analysis.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_cli/view_instructions.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_workflows/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_workflows/analysis.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_workflows/orchestration.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_workflows/rendering.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_workflows/sources/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_workflows/sources/local.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/codeboarding_workflows/sources/remote.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/constants.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/core/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/core/plugin_loader.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/core/protocols.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/core/registry.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/analysis_json.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/cluster_delta.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/diagram_generator.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/exceptions.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/file_coverage.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/file_index.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/run_context.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/run_mode.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/scope_plan.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/diagram_analysis/tree_shape.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/github_action.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/checks/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/checks/circular_deps.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/checks/cohesion.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/checks/coupling.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/checks/function_size.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/checks/god_class.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/checks/inheritance.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/checks/instability.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/checks/unused_code_diagnostics.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/config.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/models.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/health/runner.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/install.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/logging_config.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/main.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/monitoring/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/monitoring/callbacks.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/monitoring/context.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/monitoring/mixin.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/monitoring/paths.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/monitoring/stats.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/monitoring/writers.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/output_generators/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/output_generators/html.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/output_generators/html_template.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/output_generators/markdown.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/output_generators/mdx.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/output_generators/sphinx.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/repo_utils/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/repo_utils/change_detector.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/repo_utils/errors.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/repo_utils/fingerprint_diff.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/repo_utils/git_ops.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/repo_utils/path_utils.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/setup.cfg +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/analysis_cache.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/analysis_result.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/cluster_helpers.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/cluster_relations.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/constants.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/csharp_config_scanner.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/dotnet_sdk.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/adapters/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/adapters/go_adapter.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/adapters/java_adapter.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/adapters/php_adapter.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/adapters/python_adapter.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/adapters/rust_adapter.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/adapters/typescript_adapter.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/hierarchy_builder.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/models.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/progress.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/protocols.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/result_converter.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/symbol_table.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/engine/utils.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/graph.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/incremental_orchestrator.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/internal_references.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/java_config_scanner.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/java_utils.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/language_results.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/leiden_utils.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/lsp_client/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/lsp_client/diagnostics.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/method_cluster_paths.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/node.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/programming_language.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/reference_resolver.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/scanner.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/static_analyzer/typescript_config_scanner.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/telemetry/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/telemetry/device_id.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/telemetry/events.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/telemetry/schemas.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/telemetry/service.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_cli_parser.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_github_action.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_install.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_logging_config.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_main.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_pyproject_packages.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_registry_coverage.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_telemetry_events.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_telemetry_service.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_tool_registry.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_user_config.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_view_instructions.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_vscode_constants.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_windows_compatibility.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tests/test_windows_encoding.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tool_registry/__init__.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tool_registry/installers.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tool_registry/manifest.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tool_registry/paths.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/tool_registry/registry.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/user_config.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/utils.py +0 -0
- {codeboarding-0.13.4 → codeboarding-0.13.6}/vscode_constants.py +0 -0
|
@@ -104,6 +104,7 @@ On first run, CodeBoarding creates `~/.codeboarding/config.toml`. Set one provid
|
|
|
104
104
|
```toml
|
|
105
105
|
[provider]
|
|
106
106
|
# openai_api_key = "sk-..."
|
|
107
|
+
# openai_base_url = "https://api.example.com/v1" # any OpenAI-compatible gateway
|
|
107
108
|
# anthropic_api_key = "sk-ant-..."
|
|
108
109
|
# google_api_key = "AIza..."
|
|
109
110
|
# vercel_api_key = "vck_..."
|
|
@@ -118,6 +119,8 @@ On first run, CodeBoarding creates `~/.codeboarding/config.toml`. Set one provid
|
|
|
118
119
|
# parsing_model = "gemini-3-flash"
|
|
119
120
|
```
|
|
120
121
|
|
|
122
|
+
`openai_base_url` points CodeBoarding at any OpenAI-compatible gateway. Set the gateway API key as `openai_api_key`, then choose its model IDs with `agent_model` and `parsing_model`. The equivalent shell variables are `OPENAI_BASE_URL`, `OPENAI_API_KEY`, `AGENT_MODEL`, and `PARSING_MODEL`.
|
|
123
|
+
|
|
121
124
|
Shell environment variables such as `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`, and `OLLAMA_BASE_URL` take precedence over the config file. For private repositories, set `GITHUB_TOKEN` in your environment.
|
|
122
125
|
|
|
123
126
|
## Common commands
|
|
@@ -5,7 +5,6 @@ import logging
|
|
|
5
5
|
from abc import abstractmethod
|
|
6
6
|
from collections.abc import Hashable
|
|
7
7
|
from enum import StrEnum
|
|
8
|
-
from pathlib import PurePosixPath
|
|
9
8
|
from typing import TYPE_CHECKING, get_origin
|
|
10
9
|
|
|
11
10
|
from pydantic import BaseModel, Field
|
|
@@ -377,14 +376,6 @@ class Relation(LLMBaseModel):
|
|
|
377
376
|
def edge_count(self) -> int:
|
|
378
377
|
return len(self.all_edges)
|
|
379
378
|
|
|
380
|
-
def analysis_dump(self) -> dict:
|
|
381
|
-
data = self.model_dump(exclude_none=True)
|
|
382
|
-
data["src_id"] = self.src_id
|
|
383
|
-
data["dst_id"] = self.dst_id
|
|
384
|
-
data["edge_count"] = self.edge_count
|
|
385
|
-
data["is_static"] = self.is_static
|
|
386
|
-
return data
|
|
387
|
-
|
|
388
379
|
|
|
389
380
|
class ClustersComponent(LLMBaseModel):
|
|
390
381
|
"""A grouped component from cluster analysis - may contain multiple clusters."""
|
|
@@ -529,10 +520,6 @@ class AnalysisInsights(LLMBaseModel):
|
|
|
529
520
|
relations = "\n".join(cr.llm_str() for cr in self.components_relations)
|
|
530
521
|
return title + body + relations
|
|
531
522
|
|
|
532
|
-
def file_to_component(self) -> dict[str, str]:
|
|
533
|
-
"""Build file path -> component_id mapping from root components."""
|
|
534
|
-
return {str(PurePosixPath(fg.file_path)): c.component_id for c in self.components for fg in c.file_methods}
|
|
535
|
-
|
|
536
523
|
|
|
537
524
|
class ComponentArchitecture(LLMBaseModel):
|
|
538
525
|
"""Component-only architecture before relation discovery."""
|
|
@@ -697,75 +684,6 @@ def index_components_by_id(
|
|
|
697
684
|
return {c.component_id: c for c in iter_components(root_analysis, sub_analyses) if c.component_id}
|
|
698
685
|
|
|
699
686
|
|
|
700
|
-
class CFGComponent(LLMBaseModel):
|
|
701
|
-
"""A component derived from control flow graph analysis."""
|
|
702
|
-
|
|
703
|
-
name: str = Field(description="Name of the abstract component")
|
|
704
|
-
description: str = Field(description="One paragraph explaining the component.")
|
|
705
|
-
referenced_source: list[str] = Field(
|
|
706
|
-
description="List of the qualified names of the methods and classes that are within this component."
|
|
707
|
-
)
|
|
708
|
-
|
|
709
|
-
def llm_str(self):
|
|
710
|
-
n = f"**Component:** `{self.name}`"
|
|
711
|
-
d = f" - *Description*: {self.description}"
|
|
712
|
-
qn = ""
|
|
713
|
-
if self.referenced_source:
|
|
714
|
-
qn += " - *Related Classes/Methods*: "
|
|
715
|
-
qn += ", ".join(f"`{q}`" for q in self.referenced_source)
|
|
716
|
-
return "\n".join([n, d, qn]).strip()
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
class CFGAnalysisInsights(LLMBaseModel):
|
|
720
|
-
"""Insights from control flow graph analysis including components and relations."""
|
|
721
|
-
|
|
722
|
-
components: list[CFGComponent] = Field(description="List of components identified in the CFG.")
|
|
723
|
-
components_relations: list[Relation] = Field(description="List of relations among the components in the CFG.")
|
|
724
|
-
|
|
725
|
-
def llm_str(self):
|
|
726
|
-
if not self.components:
|
|
727
|
-
return "No abstract components found in the CFG."
|
|
728
|
-
title = "# Abstract Components Overview from CFG\n"
|
|
729
|
-
body = "\n".join(ac.llm_str() for ac in self.components)
|
|
730
|
-
relations = "\n".join(cr.llm_str() for cr in self.components_relations)
|
|
731
|
-
return title + body + relations
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
class ExpandComponent(LLMBaseModel):
|
|
735
|
-
"""Decision on whether to expand a component with reasoning."""
|
|
736
|
-
|
|
737
|
-
should_expand: bool = Field(description="Whether the component should be expanded in detail or not.")
|
|
738
|
-
reason: str = Field(description="Reasoning behind the decision to expand or not.")
|
|
739
|
-
|
|
740
|
-
def llm_str(self):
|
|
741
|
-
return f"- *Should Expand:* {self.should_expand}\n- *Reason:* {self.reason}"
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
class ValidationInsights(LLMBaseModel):
|
|
745
|
-
"""Validation results with status and additional information."""
|
|
746
|
-
|
|
747
|
-
is_valid: bool = Field(description="Indicates whether the validation results in valid or not.")
|
|
748
|
-
additional_info: str | None = Field(
|
|
749
|
-
default=None,
|
|
750
|
-
description="Any additional information or context related to the validation.",
|
|
751
|
-
)
|
|
752
|
-
|
|
753
|
-
def llm_str(self):
|
|
754
|
-
return f"**Feedback Information:**\n{self.additional_info}"
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
class UpdateAnalysis(LLMBaseModel):
|
|
758
|
-
"""Feedback on how much a diagram needs updating."""
|
|
759
|
-
|
|
760
|
-
update_degree: int = Field(
|
|
761
|
-
description="Degree to which the diagram needs update. 0 means no update, 10 means complete update."
|
|
762
|
-
)
|
|
763
|
-
feedback: str = Field(description="Feedback provided on the analysis.")
|
|
764
|
-
|
|
765
|
-
def llm_str(self):
|
|
766
|
-
return f"**Feedback:**\n{self.feedback}"
|
|
767
|
-
|
|
768
|
-
|
|
769
687
|
class MetaAnalysisInsights(LLMBaseModel):
|
|
770
688
|
"""Insights from analyzing project metadata including type, domain, and architecture."""
|
|
771
689
|
|
|
@@ -881,20 +799,3 @@ class ScopeUpdateDecision(LLMBaseModel):
|
|
|
881
799
|
if not self.operations:
|
|
882
800
|
return "No scope operations."
|
|
883
801
|
return "\n".join(operation.llm_str() for operation in self.operations)
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
class FilePath(LLMBaseModel):
|
|
887
|
-
"""File path with optional line range reference."""
|
|
888
|
-
|
|
889
|
-
file_path: str = Field(description="Full file path for the reference")
|
|
890
|
-
start_line: int | None = Field(
|
|
891
|
-
default=None,
|
|
892
|
-
description="Starting line number in the file for the reference (if applicable).",
|
|
893
|
-
)
|
|
894
|
-
end_line: int | None = Field(
|
|
895
|
-
default=None,
|
|
896
|
-
description="Ending line number in the file for the reference (if applicable).",
|
|
897
|
-
)
|
|
898
|
-
|
|
899
|
-
def llm_str(self):
|
|
900
|
-
return f"`{self.file_path}`: ({self.start_line}:{self.end_line})"
|
|
@@ -115,51 +115,6 @@ Complex subsystems (multiple interacting modules): CONSIDER expansion
|
|
|
115
115
|
|
|
116
116
|
Provide clear reasoning based on architectural complexity."""
|
|
117
117
|
|
|
118
|
-
VALIDATOR_SYSTEM_MESSAGE = """You validate architectural analysis quality.
|
|
119
|
-
|
|
120
|
-
<instructions>
|
|
121
|
-
1. Review analysis structure and component definitions first
|
|
122
|
-
2. If component validity is questionable, you MUST use getClassHierarchy
|
|
123
|
-
3. Assess component clarity, relationship accuracy, source references, and overall coherence
|
|
124
|
-
4. Verify source file references are accurate and meaningful
|
|
125
|
-
5. Ensure component naming reflects the actual code structure
|
|
126
|
-
</instructions>
|
|
127
|
-
|
|
128
|
-
<thinking>
|
|
129
|
-
Validation criteria:
|
|
130
|
-
- Component clarity and responsibility definition
|
|
131
|
-
- Valid source file references
|
|
132
|
-
- Appropriate relationship mapping
|
|
133
|
-
- Meaningful component naming with code references
|
|
134
|
-
</thinking>"""
|
|
135
|
-
|
|
136
|
-
COMPONENT_VALIDATION_COMPONENT = """Review component structure for clarity and validity.
|
|
137
|
-
|
|
138
|
-
Analysis to validate:
|
|
139
|
-
{analysis}
|
|
140
|
-
|
|
141
|
-
Validation requirements:
|
|
142
|
-
- Component clarity and purpose definition
|
|
143
|
-
- Source file completeness and relevance
|
|
144
|
-
- Responsibilities are well-defined
|
|
145
|
-
- Component naming appropriateness
|
|
146
|
-
|
|
147
|
-
Output:
|
|
148
|
-
Provide validation assessment without tool usage."""
|
|
149
|
-
|
|
150
|
-
RELATIONSHIPS_VALIDATION = """Validate component relationships and interactions.
|
|
151
|
-
|
|
152
|
-
Relationships to validate:
|
|
153
|
-
{analysis}
|
|
154
|
-
|
|
155
|
-
Validation requirements:
|
|
156
|
-
- Relationship clarity and necessity
|
|
157
|
-
- Maximum 2 relationships per component pair (avoid relations in which we have sends/returns i.e. ComponentA sends a message to ComponentB and ComponentB returns result to ComponentA)
|
|
158
|
-
- Logical consistency of interactions
|
|
159
|
-
- Appropriate relationship descriptions
|
|
160
|
-
|
|
161
|
-
Output:
|
|
162
|
-
Conclude with VALID or INVALID assessment and specific reasoning."""
|
|
163
118
|
|
|
164
119
|
SYSTEM_META_ANALYSIS_MESSAGE = """You extract architectural metadata from projects.
|
|
165
120
|
|
|
@@ -289,15 +244,6 @@ class ClaudePromptFactory(AbstractPromptFactory):
|
|
|
289
244
|
def get_expansion_prompt(self) -> str:
|
|
290
245
|
return EXPANSION_PROMPT
|
|
291
246
|
|
|
292
|
-
def get_validator_system_message(self) -> str:
|
|
293
|
-
return VALIDATOR_SYSTEM_MESSAGE
|
|
294
|
-
|
|
295
|
-
def get_component_validation_component(self) -> str:
|
|
296
|
-
return COMPONENT_VALIDATION_COMPONENT
|
|
297
|
-
|
|
298
|
-
def get_relationships_validation(self) -> str:
|
|
299
|
-
return RELATIONSHIPS_VALIDATION
|
|
300
|
-
|
|
301
247
|
def get_system_meta_analysis_message(self) -> str:
|
|
302
248
|
return SYSTEM_META_ANALYSIS_MESSAGE
|
|
303
249
|
|
|
@@ -114,48 +114,6 @@ Evaluate component expansion necessity for: {component}
|
|
|
114
114
|
# Output
|
|
115
115
|
Provide clear reasoning for expansion decision based on architectural complexity."""
|
|
116
116
|
|
|
117
|
-
VALIDATOR_SYSTEM_MESSAGE = """You are a software architecture expert.
|
|
118
|
-
|
|
119
|
-
# Task
|
|
120
|
-
Validate analysis quality.
|
|
121
|
-
|
|
122
|
-
# Instructions (execute in order)
|
|
123
|
-
1. Review analysis structure and component definitions.
|
|
124
|
-
2. Use getClassHierarchy if component validity is questionable.
|
|
125
|
-
|
|
126
|
-
# Validation criteria
|
|
127
|
-
- Component clarity and responsibility definition
|
|
128
|
-
- Valid source file references
|
|
129
|
-
- Appropriate relationship mapping
|
|
130
|
-
- Meaningful component naming with code references"""
|
|
131
|
-
|
|
132
|
-
COMPONENT_VALIDATION_COMPONENT = """# Task
|
|
133
|
-
Validate component analysis.
|
|
134
|
-
|
|
135
|
-
# Analysis
|
|
136
|
-
{analysis}
|
|
137
|
-
|
|
138
|
-
# Instructions (execute in order)
|
|
139
|
-
1. Assess component clarity and purpose definition.
|
|
140
|
-
2. Verify source file completeness and relevance.
|
|
141
|
-
3. Confirm responsibilities are well-defined.
|
|
142
|
-
|
|
143
|
-
# Output
|
|
144
|
-
Provide validation assessment without additional tool usage."""
|
|
145
|
-
|
|
146
|
-
RELATIONSHIPS_VALIDATION = """# Task
|
|
147
|
-
Validate component relationships.
|
|
148
|
-
|
|
149
|
-
# Analysis
|
|
150
|
-
{analysis}
|
|
151
|
-
|
|
152
|
-
# Instructions (execute in order)
|
|
153
|
-
1. Check relationship clarity and necessity.
|
|
154
|
-
2. Verify max 2 relationships per component pair (avoid bidirectional relations like ComponentA sends message to ComponentB and ComponentB returns result to ComponentA).
|
|
155
|
-
3. Assess relationship logical consistency.
|
|
156
|
-
|
|
157
|
-
# Output
|
|
158
|
-
Conclude with VALID or INVALID assessment and specific reasoning."""
|
|
159
117
|
|
|
160
118
|
SYSTEM_META_ANALYSIS_MESSAGE = """You are a senior software architect.
|
|
161
119
|
|
|
@@ -295,15 +253,6 @@ class DeepSeekPromptFactory(AbstractPromptFactory):
|
|
|
295
253
|
def get_expansion_prompt(self) -> str:
|
|
296
254
|
return EXPANSION_PROMPT
|
|
297
255
|
|
|
298
|
-
def get_validator_system_message(self) -> str:
|
|
299
|
-
return VALIDATOR_SYSTEM_MESSAGE
|
|
300
|
-
|
|
301
|
-
def get_component_validation_component(self) -> str:
|
|
302
|
-
return COMPONENT_VALIDATION_COMPONENT
|
|
303
|
-
|
|
304
|
-
def get_relationships_validation(self) -> str:
|
|
305
|
-
return RELATIONSHIPS_VALIDATION
|
|
306
|
-
|
|
307
256
|
def get_system_meta_analysis_message(self) -> str:
|
|
308
257
|
return SYSTEM_META_ANALYSIS_MESSAGE
|
|
309
258
|
|
|
@@ -96,39 +96,6 @@ Instructions:
|
|
|
96
96
|
Output:
|
|
97
97
|
Provide clear reasoning for expansion decision based on architectural complexity."""
|
|
98
98
|
|
|
99
|
-
VALIDATOR_SYSTEM_MESSAGE = """You are a software architecture expert validating analysis quality.
|
|
100
|
-
|
|
101
|
-
Instructions:
|
|
102
|
-
1. Review analysis structure and component definitions
|
|
103
|
-
2. Use getClassHierarchy if component validity is questionable
|
|
104
|
-
|
|
105
|
-
Validation criteria:
|
|
106
|
-
- Component clarity and responsibility definition
|
|
107
|
-
- Valid source file references
|
|
108
|
-
- Appropriate relationship mapping
|
|
109
|
-
- Meaningful component naming with code references"""
|
|
110
|
-
|
|
111
|
-
COMPONENT_VALIDATION_COMPONENT = """Validate component analysis:
|
|
112
|
-
{analysis}
|
|
113
|
-
|
|
114
|
-
Instructions:
|
|
115
|
-
1. Assess component clarity and purpose definition
|
|
116
|
-
2. Verify source file completeness and relevance
|
|
117
|
-
3. Confirm responsibilities are well-defined
|
|
118
|
-
|
|
119
|
-
Output:
|
|
120
|
-
Provide validation assessment without additional tool usage."""
|
|
121
|
-
|
|
122
|
-
RELATIONSHIPS_VALIDATION = """Validate component relationships:
|
|
123
|
-
{analysis}
|
|
124
|
-
|
|
125
|
-
Instructions:
|
|
126
|
-
1. Check relationship clarity and necessity
|
|
127
|
-
2. Verify max 2 relationships per component pair (avoid relations in which we have sends/returns i.e. ComponentA sends a message to ComponentB and ComponentB returns result to ComponentA)
|
|
128
|
-
3. Assess relationship logical consistency
|
|
129
|
-
|
|
130
|
-
Output:
|
|
131
|
-
Conclude with VALID or INVALID assessment and specific reasoning."""
|
|
132
99
|
|
|
133
100
|
SYSTEM_META_ANALYSIS_MESSAGE = """You are a senior software architect with expertise in project analysis and architectural pattern recognition.
|
|
134
101
|
|
|
@@ -259,15 +226,6 @@ class GeminiFlashPromptFactory(AbstractPromptFactory):
|
|
|
259
226
|
def get_expansion_prompt(self) -> str:
|
|
260
227
|
return EXPANSION_PROMPT
|
|
261
228
|
|
|
262
|
-
def get_validator_system_message(self) -> str:
|
|
263
|
-
return VALIDATOR_SYSTEM_MESSAGE
|
|
264
|
-
|
|
265
|
-
def get_component_validation_component(self) -> str:
|
|
266
|
-
return COMPONENT_VALIDATION_COMPONENT
|
|
267
|
-
|
|
268
|
-
def get_relationships_validation(self) -> str:
|
|
269
|
-
return RELATIONSHIPS_VALIDATION
|
|
270
|
-
|
|
271
229
|
def get_system_meta_analysis_message(self) -> str:
|
|
272
230
|
return SYSTEM_META_ANALYSIS_MESSAGE
|
|
273
231
|
|
|
@@ -122,52 +122,6 @@ REQUIRED STEPS (execute in order):
|
|
|
122
122
|
REQUIRED OUTPUT:
|
|
123
123
|
MUST provide clear reasoning for expansion decision based on architectural complexity."""
|
|
124
124
|
|
|
125
|
-
VALIDATOR_SYSTEM_MESSAGE = """You are a software architecture quality validator. STRICTLY follow these rules:
|
|
126
|
-
|
|
127
|
-
MANDATORY TASK:
|
|
128
|
-
Validate analysis quality.
|
|
129
|
-
|
|
130
|
-
REQUIRED STEPS (execute in order):
|
|
131
|
-
1. Review analysis structure and component definitions.
|
|
132
|
-
2. Use getClassHierarchy ONLY if component validity is questionable.
|
|
133
|
-
|
|
134
|
-
VALIDATION CRITERIA (MUST check):
|
|
135
|
-
- Component clarity and responsibility definition
|
|
136
|
-
- Valid source file references
|
|
137
|
-
- Appropriate relationship mapping
|
|
138
|
-
- Meaningful component naming with code references"""
|
|
139
|
-
|
|
140
|
-
COMPONENT_VALIDATION_COMPONENT = """You are an analysis quality reviewer. STRICTLY follow these rules:
|
|
141
|
-
|
|
142
|
-
MANDATORY TASK:
|
|
143
|
-
Validate component analysis.
|
|
144
|
-
|
|
145
|
-
Analysis to validate:
|
|
146
|
-
{analysis}
|
|
147
|
-
|
|
148
|
-
REQUIRED STEPS (execute in order):
|
|
149
|
-
1. Assess component clarity and purpose definition.
|
|
150
|
-
2. Verify source file completeness and relevance.
|
|
151
|
-
3. Confirm responsibilities are well-defined.
|
|
152
|
-
|
|
153
|
-
REQUIRED OUTPUT:
|
|
154
|
-
MUST provide validation assessment without additional tool usage."""
|
|
155
|
-
|
|
156
|
-
RELATIONSHIPS_VALIDATION = """You are a relationship correctness validator. STRICTLY follow these rules:
|
|
157
|
-
|
|
158
|
-
MANDATORY TASK:
|
|
159
|
-
Validate component relationships.
|
|
160
|
-
|
|
161
|
-
Analysis to validate:
|
|
162
|
-
{analysis}
|
|
163
|
-
|
|
164
|
-
REQUIRED STEPS (execute in order):
|
|
165
|
-
1. Check relationship clarity and necessity.
|
|
166
|
-
2. Verify max 2 relationships per component pair (STRICTLY avoid bidirectional relations like ComponentA sends message to ComponentB and ComponentB returns result to ComponentA).
|
|
167
|
-
3. Assess relationship logical consistency.
|
|
168
|
-
|
|
169
|
-
REQUIRED OUTPUT:
|
|
170
|
-
MUST conclude with VALID or INVALID assessment and specific reasoning."""
|
|
171
125
|
|
|
172
126
|
SYSTEM_META_ANALYSIS_MESSAGE = """You are a senior software architect. STRICTLY follow these rules:
|
|
173
127
|
|
|
@@ -316,15 +270,6 @@ class GLMPromptFactory(AbstractPromptFactory):
|
|
|
316
270
|
def get_expansion_prompt(self) -> str:
|
|
317
271
|
return EXPANSION_PROMPT
|
|
318
272
|
|
|
319
|
-
def get_validator_system_message(self) -> str:
|
|
320
|
-
return VALIDATOR_SYSTEM_MESSAGE
|
|
321
|
-
|
|
322
|
-
def get_component_validation_component(self) -> str:
|
|
323
|
-
return COMPONENT_VALIDATION_COMPONENT
|
|
324
|
-
|
|
325
|
-
def get_relationships_validation(self) -> str:
|
|
326
|
-
return RELATIONSHIPS_VALIDATION
|
|
327
|
-
|
|
328
273
|
def get_system_meta_analysis_message(self) -> str:
|
|
329
274
|
return SYSTEM_META_ANALYSIS_MESSAGE
|
|
330
275
|
|
|
@@ -104,90 +104,6 @@ EXPANSION_PROMPT = """Expand the architectural analysis with additional detail.
|
|
|
104
104
|
|
|
105
105
|
**Goal:** Deeper architectural insights while maintaining overall coherence."""
|
|
106
106
|
|
|
107
|
-
VALIDATOR_SYSTEM_MESSAGE = """You are a software architecture validation expert.
|
|
108
|
-
|
|
109
|
-
**Role:** Validate architectural analysis for accuracy, completeness, and clarity.
|
|
110
|
-
|
|
111
|
-
**Validation Criteria:**
|
|
112
|
-
1. **Accuracy:** All components and relationships are correctly identified
|
|
113
|
-
2. **Completeness:** No critical components or relationships are missing
|
|
114
|
-
3. **Clarity:** Documentation is clear and understandable
|
|
115
|
-
4. **Consistency:** Analysis follows stated architectural patterns
|
|
116
|
-
5. **Diagram Suitability:** Components and relationships are suitable for visualization
|
|
117
|
-
|
|
118
|
-
**Approach:**
|
|
119
|
-
- Systematically review each component
|
|
120
|
-
- Verify relationships and data flow
|
|
121
|
-
- Check source file references
|
|
122
|
-
- Validate against project type patterns
|
|
123
|
-
- Assess documentation clarity
|
|
124
|
-
|
|
125
|
-
**Output:** Detailed validation feedback with specific improvement suggestions."""
|
|
126
|
-
|
|
127
|
-
COMPONENT_VALIDATION_COMPONENT = """Validate component definition and structure.
|
|
128
|
-
|
|
129
|
-
**Validation Checklist:**
|
|
130
|
-
|
|
131
|
-
1. **Component Identity:**
|
|
132
|
-
- [ ] Clear, descriptive name
|
|
133
|
-
- [ ] Distinct responsibility
|
|
134
|
-
- [ ] Well-defined boundary
|
|
135
|
-
|
|
136
|
-
2. **Component Content:**
|
|
137
|
-
- [ ] Accurate description
|
|
138
|
-
- [ ] Complete responsibility list
|
|
139
|
-
- [ ] Valid source file references
|
|
140
|
-
- [ ] Appropriate abstraction level
|
|
141
|
-
|
|
142
|
-
3. **Relationships:**
|
|
143
|
-
- [ ] All relationships are valid
|
|
144
|
-
- [ ] Relationship types are appropriate
|
|
145
|
-
- [ ] No missing critical relationships
|
|
146
|
-
- [ ] No redundant relationships (max 2 per pair (avoid relations in which we have sends/returns i.e. ComponentA sends a message to ComponentB and ComponentB returns result to ComponentA))
|
|
147
|
-
|
|
148
|
-
4. **Documentation Quality:**
|
|
149
|
-
- [ ] Clear for new developers
|
|
150
|
-
- [ ] Suitable for diagram visualization
|
|
151
|
-
- [ ] Follows project type patterns
|
|
152
|
-
|
|
153
|
-
**Instructions:**
|
|
154
|
-
- Review each checklist item
|
|
155
|
-
- Provide specific feedback for any issues
|
|
156
|
-
- Suggest improvements where needed
|
|
157
|
-
|
|
158
|
-
**Output:** Validation results with actionable feedback."""
|
|
159
|
-
|
|
160
|
-
RELATIONSHIPS_VALIDATION = """Validate component relationships for accuracy and completeness.
|
|
161
|
-
|
|
162
|
-
**Relationship Validation Criteria:**
|
|
163
|
-
|
|
164
|
-
1. **Accuracy:**
|
|
165
|
-
- [ ] Relationship type is correct (dependency, composition, inheritance, etc.)
|
|
166
|
-
- [ ] Direction is accurate (source -> target)
|
|
167
|
-
- [ ] Both components exist in the analysis
|
|
168
|
-
|
|
169
|
-
2. **Completeness:**
|
|
170
|
-
- [ ] All critical relationships are documented
|
|
171
|
-
- [ ] No orphaned components (unless intentional)
|
|
172
|
-
- [ ] Relationship strength/importance is appropriate
|
|
173
|
-
|
|
174
|
-
3. **Quality:**
|
|
175
|
-
- [ ] Maximum 2 relationships per component pair (avoid relations in which we have sends/returns i.e. ComponentA sends a message to ComponentB and ComponentB returns result to ComponentA)
|
|
176
|
-
- [ ] Relationships support diagram clarity
|
|
177
|
-
- [ ] Relationship descriptions are clear
|
|
178
|
-
|
|
179
|
-
4. **Consistency:**
|
|
180
|
-
- [ ] Relationships align with project type patterns
|
|
181
|
-
- [ ] Relationships are correctly represented
|
|
182
|
-
- [ ] No contradictory relationships
|
|
183
|
-
|
|
184
|
-
**Instructions:**
|
|
185
|
-
- Validate all relationships against criteria
|
|
186
|
-
- Identify missing relationships
|
|
187
|
-
- Flag inappropriate or redundant relationships
|
|
188
|
-
- Suggest improvements
|
|
189
|
-
|
|
190
|
-
**Output:** Relationship validation report with specific feedback."""
|
|
191
107
|
|
|
192
108
|
SYSTEM_META_ANALYSIS_MESSAGE = """You are performing meta-analysis on software project characteristics.
|
|
193
109
|
|
|
@@ -372,15 +288,6 @@ class GPTPromptFactory(AbstractPromptFactory):
|
|
|
372
288
|
def get_expansion_prompt(self) -> str:
|
|
373
289
|
return EXPANSION_PROMPT
|
|
374
290
|
|
|
375
|
-
def get_validator_system_message(self) -> str:
|
|
376
|
-
return VALIDATOR_SYSTEM_MESSAGE
|
|
377
|
-
|
|
378
|
-
def get_component_validation_component(self) -> str:
|
|
379
|
-
return COMPONENT_VALIDATION_COMPONENT
|
|
380
|
-
|
|
381
|
-
def get_relationships_validation(self) -> str:
|
|
382
|
-
return RELATIONSHIPS_VALIDATION
|
|
383
|
-
|
|
384
291
|
def get_system_meta_analysis_message(self) -> str:
|
|
385
292
|
return SYSTEM_META_ANALYSIS_MESSAGE
|
|
386
293
|
|
|
@@ -110,52 +110,6 @@ Think aloud first (reasoning), then decide:
|
|
|
110
110
|
Output:
|
|
111
111
|
Provide clear reasoning for expansion decision based on architectural complexity."""
|
|
112
112
|
|
|
113
|
-
VALIDATOR_SYSTEM_MESSAGE = """You are Kimi, an AI assistant created by Moonshot AI.
|
|
114
|
-
|
|
115
|
-
Task: Validate analysis quality.
|
|
116
|
-
|
|
117
|
-
Use tools proactively to verify facts:
|
|
118
|
-
|
|
119
|
-
1. Review analysis structure and component definitions.
|
|
120
|
-
2. Use getClassHierarchy if component validity is questionable.
|
|
121
|
-
|
|
122
|
-
Validation criteria:
|
|
123
|
-
- Component clarity and responsibility definition
|
|
124
|
-
- Valid source file references
|
|
125
|
-
- Appropriate relationship mapping
|
|
126
|
-
- Meaningful component naming with code references"""
|
|
127
|
-
|
|
128
|
-
COMPONENT_VALIDATION_COMPONENT = """You are Kimi, an AI assistant created by Moonshot AI.
|
|
129
|
-
|
|
130
|
-
Task: Validate component analysis.
|
|
131
|
-
|
|
132
|
-
Analysis:
|
|
133
|
-
{analysis}
|
|
134
|
-
|
|
135
|
-
Reason step-by-step:
|
|
136
|
-
|
|
137
|
-
1. Assess component clarity and purpose definition.
|
|
138
|
-
2. Verify source file completeness and relevance.
|
|
139
|
-
3. Confirm responsibilities are well-defined.
|
|
140
|
-
|
|
141
|
-
Output:
|
|
142
|
-
Provide validation assessment without additional tool usage."""
|
|
143
|
-
|
|
144
|
-
RELATIONSHIPS_VALIDATION = """You are Kimi, an AI assistant created by Moonshot AI.
|
|
145
|
-
|
|
146
|
-
Task: Validate component relationships.
|
|
147
|
-
|
|
148
|
-
Analysis:
|
|
149
|
-
{analysis}
|
|
150
|
-
|
|
151
|
-
Think carefully, then verify:
|
|
152
|
-
|
|
153
|
-
1. Check relationship clarity and necessity.
|
|
154
|
-
2. Verify max 2 relationships per component pair (avoid relations in which we have sends/returns i.e. ComponentA sends a message to ComponentB and ComponentB returns result to ComponentA).
|
|
155
|
-
3. Assess relationship logical consistency.
|
|
156
|
-
|
|
157
|
-
Output:
|
|
158
|
-
Conclude with VALID or INVALID assessment and specific reasoning."""
|
|
159
113
|
|
|
160
114
|
SYSTEM_META_ANALYSIS_MESSAGE = """You are Kimi, an AI assistant created by Moonshot AI.
|
|
161
115
|
|
|
@@ -298,15 +252,6 @@ class KimiPromptFactory(AbstractPromptFactory):
|
|
|
298
252
|
def get_expansion_prompt(self) -> str:
|
|
299
253
|
return EXPANSION_PROMPT
|
|
300
254
|
|
|
301
|
-
def get_validator_system_message(self) -> str:
|
|
302
|
-
return VALIDATOR_SYSTEM_MESSAGE
|
|
303
|
-
|
|
304
|
-
def get_component_validation_component(self) -> str:
|
|
305
|
-
return COMPONENT_VALIDATION_COMPONENT
|
|
306
|
-
|
|
307
|
-
def get_relationships_validation(self) -> str:
|
|
308
|
-
return RELATIONSHIPS_VALIDATION
|
|
309
|
-
|
|
310
255
|
def get_system_meta_analysis_message(self) -> str:
|
|
311
256
|
return SYSTEM_META_ANALYSIS_MESSAGE
|
|
312
257
|
|
|
@@ -89,18 +89,6 @@ class PromptFactory:
|
|
|
89
89
|
else:
|
|
90
90
|
raise AttributeError(f"Prompt method '{method_name}' not found in factory")
|
|
91
91
|
|
|
92
|
-
def get_all_prompts(self) -> dict[str, str]:
|
|
93
|
-
prompts = {}
|
|
94
|
-
for method_name in dir(self._prompt_factory):
|
|
95
|
-
if method_name.startswith("get_") and not method_name.startswith("_"):
|
|
96
|
-
try:
|
|
97
|
-
prompt_value = getattr(self._prompt_factory, method_name)()
|
|
98
|
-
constant_name = method_name[4:].upper()
|
|
99
|
-
prompts[constant_name] = prompt_value
|
|
100
|
-
except Exception:
|
|
101
|
-
continue
|
|
102
|
-
return prompts
|
|
103
|
-
|
|
104
92
|
|
|
105
93
|
# Global factory instance - will be initialized by configuration
|
|
106
94
|
_global_factory: PromptFactory | None = None
|
|
@@ -46,7 +46,6 @@ class ValidationContext:
|
|
|
46
46
|
cfg_graphs: dict[str, CallGraph] = field(default_factory=dict) # For edge checking
|
|
47
47
|
expected_files: set[str] = field(default_factory=set)
|
|
48
48
|
valid_component_names: set[str] = field(default_factory=set) # For file classification validation
|
|
49
|
-
existing_component_ids: set[str] = field(default_factory=set) # For incremental ID-based routing validation
|
|
50
49
|
repo_dir: str | None = None # For path normalization
|
|
51
50
|
static_analysis: StaticAnalysisResults | None = None # For qualified name validation
|
|
52
51
|
llm_cluster_analysis: ClusterAnalysis | None = None # For group name coverage validation
|
|
@@ -511,34 +510,3 @@ def _cluster_sets_have_edge(
|
|
|
511
510
|
if src_cluster in src_set and dst_cluster in dst_set:
|
|
512
511
|
return True
|
|
513
512
|
return False
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
def _check_edge_between_cluster_sets(
|
|
517
|
-
src_cluster_ids: list[int],
|
|
518
|
-
dst_cluster_ids: list[int],
|
|
519
|
-
cluster_results: dict[str, ClusterResult],
|
|
520
|
-
cfg_graphs: dict[str, CallGraph],
|
|
521
|
-
cluster_edge_lookup: dict[str, set[tuple[int, int]]] | None = None,
|
|
522
|
-
) -> bool:
|
|
523
|
-
"""
|
|
524
|
-
Check if there's an edge between any pair of clusters from two sets.
|
|
525
|
-
|
|
526
|
-
Args:
|
|
527
|
-
src_cluster_ids: Source cluster IDs
|
|
528
|
-
dst_cluster_ids: Destination cluster IDs
|
|
529
|
-
cluster_results: dict mapping language -> ClusterResult
|
|
530
|
-
cfg_graphs: dict mapping language -> CallGraph
|
|
531
|
-
cluster_edge_lookup: Optional precomputed (src_cluster, dst_cluster) edges per language
|
|
532
|
-
|
|
533
|
-
Returns:
|
|
534
|
-
True if any edge exists between the cluster sets
|
|
535
|
-
"""
|
|
536
|
-
if not src_cluster_ids or not dst_cluster_ids:
|
|
537
|
-
return False
|
|
538
|
-
|
|
539
|
-
if cluster_edge_lookup is None:
|
|
540
|
-
cluster_edge_lookup = _build_cluster_edge_lookup(cluster_results, cfg_graphs)
|
|
541
|
-
|
|
542
|
-
return _cluster_sets_have_edge(src_cluster_ids, dst_cluster_ids, cluster_edge_lookup) or _cluster_sets_have_edge(
|
|
543
|
-
dst_cluster_ids, src_cluster_ids, cluster_edge_lookup
|
|
544
|
-
)
|
|
@@ -160,7 +160,9 @@ static_analyzer/engine/hierarchy_builder.py
|
|
|
160
160
|
static_analyzer/engine/language_adapter.py
|
|
161
161
|
static_analyzer/engine/lsp_client.py
|
|
162
162
|
static_analyzer/engine/lsp_constants.py
|
|
163
|
+
static_analyzer/engine/lsp_recycler.py
|
|
163
164
|
static_analyzer/engine/models.py
|
|
165
|
+
static_analyzer/engine/process_memory.py
|
|
164
166
|
static_analyzer/engine/progress.py
|
|
165
167
|
static_analyzer/engine/protocols.py
|
|
166
168
|
static_analyzer/engine/result_converter.py
|
|
@@ -84,7 +84,7 @@ def _entries_from_cfg_cache(
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
def snapshot_from_cluster_results(cluster_results: dict[str, ClusterResult]) -> ClusterSnapshot:
|
|
87
|
-
"""
|
|
87
|
+
"""Convert lightweight ``ClusterResult`` fixtures into snapshots for tests.
|
|
88
88
|
|
|
89
89
|
``member_files`` is left empty since ``ClusterResult`` has no per-qname
|
|
90
90
|
file map; tests needing diff-scoping must populate it manually.
|