code2llm 0.5.161__tar.gz → 0.5.162__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.
- {code2llm-0.5.161/code2llm.egg-info → code2llm-0.5.162}/PKG-INFO +5 -6
- {code2llm-0.5.161 → code2llm-0.5.162}/README.md +4 -5
- code2llm-0.5.162/VERSION +1 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/__init__.py +1 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/pipeline_detector.py +1 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/smells.py +32 -7
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli_exports/formats.py +2 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli_exports/prompt.py +74 -35
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli_parser.py +1 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/ts_parser.py +1 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/typescript.py +4 -4
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/toon_size_manager.py +3 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/dashboard_data.py +1 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/dashboard_renderer.py +10 -10
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/index_generator/renderer.py +9 -9
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/map/header.py +2 -2
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/map/yaml_export.py +4 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/project_yaml/hotspots.py +1 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/readme/content.py +4 -4
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/readme/sections.py +6 -6
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon/helpers.py +1 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon/metrics_health.py +1 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/yaml_exporter.py +10 -10
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/llm_flow.py +0 -2
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/mermaid/png.py +1 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/nlp/__init__.py +1 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/parsers/toon_parser.py +1 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/refactor/prompt_engine.py +6 -7
- {code2llm-0.5.161 → code2llm-0.5.162/code2llm.egg-info}/PKG-INFO +5 -6
- {code2llm-0.5.161 → code2llm-0.5.162}/pyproject.toml +1 -1
- code2llm-0.5.161/VERSION +0 -1
- {code2llm-0.5.161 → code2llm-0.5.162}/LICENSE +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/MANIFEST.in +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/__main__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/_data_impl.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/call_graph.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/cfg.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/coupling.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/data_analysis.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/dfg.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/pipeline_classifier.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/pipeline_resolver.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/side_effects.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/type_inference.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/utils/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/analysis/utils/ast_helpers.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/api.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli_analysis.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli_commands.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli_exports/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli_exports/code2logic.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli_exports/orchestrator.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli_exports/orchestrator_chunked.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli_exports/orchestrator_constants.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/cli_exports/orchestrator_handlers.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/analyzer.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/ast_registry.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/config.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/export_pipeline.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/file_analyzer.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/file_cache.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/file_filter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/gitignore.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/incremental.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/_c_parser.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/_calls.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/_complexity.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/base.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/cpp.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/csharp.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/generic.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/go_lang.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/java.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/php.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/ruby.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/rust.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/lang/ts_extractors.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/large_repo.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/models.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/persistent_cache.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/refactoring.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/repo_files.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/source_classifier.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/streaming/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/streaming/cache.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/streaming/incremental.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/streaming/prioritizer.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/streaming/scanner.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/streaming/strategies.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/core/streaming_analyzer.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/article_view.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/base.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/context_exporter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/context_view.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/evolution/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/evolution/computation.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/evolution/constants.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/evolution/exclusion.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/evolution/render.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/evolution/yaml_export.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/evolution_exporter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/flow_constants.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/flow_exporter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/flow_renderer.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/html_dashboard.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/index_generator/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/index_generator/scanner.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/index_generator.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/json_exporter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/llm_exporter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/map/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/map/alerts.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/map/details.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/map/module_list.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/map/utils.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/map_exporter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/mermaid/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/mermaid/calls.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/mermaid/classic.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/mermaid/compact.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/mermaid/flow_compact.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/mermaid/flow_detailed.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/mermaid/flow_full.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/mermaid/utils.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/mermaid_exporter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/mermaid_flow_helpers.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/planfile_tickets.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/project_yaml/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/project_yaml/constants.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/project_yaml/core.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/project_yaml/evolution.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/project_yaml/health.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/project_yaml/modules.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/project_yaml_exporter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/readme/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/readme/files.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/readme/insights.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/readme_exporter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/report_generators.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon/_render_coupling_helpers.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon/_render_section_helpers.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon/constants.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon/metrics.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon/metrics_core.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon/metrics_duplicates.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon/module_detail.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon/renderer.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/toon_view.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/exporters/validate_project.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/_utils.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/llm_flow/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/llm_flow/analysis.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/llm_flow/cli.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/llm_flow/generator.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/llm_flow/nodes.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/llm_flow/parsing.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/llm_flow/utils.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/llm_task.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/mermaid/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/mermaid/fix.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/mermaid/validation.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/generators/mermaid.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/nlp/config.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/nlp/entity_resolution.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/nlp/intent_matching.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/nlp/normalization.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/nlp/pipeline.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/patterns/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/patterns/detector.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm/refactor/__init__.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm.egg-info/SOURCES.txt +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm.egg-info/dependency_links.txt +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm.egg-info/entry_points.txt +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm.egg-info/requires.txt +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/code2llm.egg-info/top_level.txt +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/setup.cfg +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/setup.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_advanced_analysis.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_analyzer.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_cache_invalidation_e2e.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_calls_toon_export.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_declarative_collection.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_deep_analysis.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_edge_cases.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_export_cache_flags.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_file_analyzer_tagging.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_flow_exporter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_format_quality.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_multilanguage_e2e.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_nlp_pipeline.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_nonpython_cc_calls.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_orchestrator_cache_mtime.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_persistent_cache.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_pipeline_detector.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_planfile_tickets_exporter.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_project_toon_export.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_prompt_engine.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_prompt_txt.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_refactoring_engine.py +0 -0
- {code2llm-0.5.161 → code2llm-0.5.162}/tests/test_toon_v2.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code2llm
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.162
|
|
4
4
|
Summary: High-performance Python code flow analysis with optimized TOON format - CFG, DFG, call graphs, and intelligent code queries
|
|
5
5
|
Home-page: https://github.com/wronai/stts
|
|
6
6
|
Author: STTS Project
|
|
@@ -66,17 +66,16 @@ Dynamic: requires-python
|
|
|
66
66
|
|
|
67
67
|
## AI Cost Tracking
|
|
68
68
|
|
|
69
|
-
     
|
|
70
|
+
  
|
|
71
71
|
|
|
72
|
-
- 🤖 **LLM usage:** $7.5000 (
|
|
73
|
-
- 👤 **Human dev:** ~$
|
|
72
|
+
- 🤖 **LLM usage:** $7.5000 (233 commits)
|
|
73
|
+
- 👤 **Human dev:** ~$8506 (85.1h @ $100/h, 30min dedup)
|
|
74
74
|
|
|
75
75
|
Generated on 2026-05-25 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
|
|
76
76
|
|
|
77
77
|
---
|
|
78
78
|
|
|
79
|
-
|
|
80
79
|
<!-- generated in 0.00s -->
|
|
81
80
|
|
|
82
81
|
This directory contains the complete analysis of your project generated by `code2llm`. Each file serves a specific purpose for understanding, refactoring, and documenting your codebase.
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## AI Cost Tracking
|
|
4
4
|
|
|
5
|
-
     
|
|
6
|
+
  
|
|
7
7
|
|
|
8
|
-
- 🤖 **LLM usage:** $7.5000 (
|
|
9
|
-
- 👤 **Human dev:** ~$
|
|
8
|
+
- 🤖 **LLM usage:** $7.5000 (233 commits)
|
|
9
|
+
- 👤 **Human dev:** ~$8506 (85.1h @ $100/h, 30min dedup)
|
|
10
10
|
|
|
11
11
|
Generated on 2026-05-25 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
<!-- generated in 0.00s -->
|
|
17
16
|
|
|
18
17
|
This directory contains the complete analysis of your project generated by `code2llm`. Each file serves a specific purpose for understanding, refactoring, and documenting your codebase.
|
code2llm-0.5.162/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.5.162
|
|
@@ -8,7 +8,7 @@ Includes NLP Processing Pipeline for query normalization, intent matching,
|
|
|
8
8
|
and entity resolution with multilingual support.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
-
__version__ = "0.5.
|
|
11
|
+
__version__ = "0.5.162"
|
|
12
12
|
__author__ = "STTS Project"
|
|
13
13
|
|
|
14
14
|
# Core analysis components (lightweight, always needed)
|
|
@@ -13,7 +13,7 @@ Refactored v0.5.x: Extracted resolver and classifier into separate modules.
|
|
|
13
13
|
|
|
14
14
|
import logging
|
|
15
15
|
from dataclasses import dataclass, field
|
|
16
|
-
from typing import Any, Dict, List, Optional, Set
|
|
16
|
+
from typing import Any, Dict, List, Optional, Set, Tuple
|
|
17
17
|
|
|
18
18
|
import networkx as nx
|
|
19
19
|
|
|
@@ -56,7 +56,11 @@ class SmellDetector:
|
|
|
56
56
|
file=func_info.file,
|
|
57
57
|
line=func_info.line,
|
|
58
58
|
severity=severity,
|
|
59
|
-
description=
|
|
59
|
+
description=(
|
|
60
|
+
f"Function '{func_info.name}' is oversized:"
|
|
61
|
+
f" CC={complexity}, fan-out={fan_out},"
|
|
62
|
+
f" mutations={mutation_count}."
|
|
63
|
+
),
|
|
60
64
|
context={
|
|
61
65
|
"fan_out": fan_out,
|
|
62
66
|
"mutations": mutation_count,
|
|
@@ -85,7 +89,11 @@ class SmellDetector:
|
|
|
85
89
|
file=mod.file,
|
|
86
90
|
line=1,
|
|
87
91
|
severity=severity,
|
|
88
|
-
description=
|
|
92
|
+
description=(
|
|
93
|
+
f"Module '{mod_name}' is too large"
|
|
94
|
+
f" ({f_count} functions, {c_count} classes)."
|
|
95
|
+
" Consider splitting into sub-modules."
|
|
96
|
+
),
|
|
89
97
|
context={"functions": f_count, "classes": c_count},
|
|
90
98
|
)
|
|
91
99
|
)
|
|
@@ -113,7 +121,10 @@ class SmellDetector:
|
|
|
113
121
|
file=func_info.file,
|
|
114
122
|
line=func_info.line,
|
|
115
123
|
severity=0.7,
|
|
116
|
-
description=
|
|
124
|
+
description=(
|
|
125
|
+
f"Function '{func_info.name}' mutates multiple variables"
|
|
126
|
+
f" in other modules: {', '.join(set(foreign_mutations))}."
|
|
127
|
+
),
|
|
117
128
|
context={"foreign_mutations": list(set(foreign_mutations))},
|
|
118
129
|
)
|
|
119
130
|
)
|
|
@@ -142,7 +153,10 @@ class SmellDetector:
|
|
|
142
153
|
file=func_info.file,
|
|
143
154
|
line=func_info.line,
|
|
144
155
|
severity=0.6,
|
|
145
|
-
description=
|
|
156
|
+
description=(
|
|
157
|
+
f"Arguments ({', '.join(args)}) are used together"
|
|
158
|
+
f" in multiple functions: {', '.join(funcs)}."
|
|
159
|
+
),
|
|
146
160
|
context={"clump": list(args), "related_functions": funcs},
|
|
147
161
|
)
|
|
148
162
|
)
|
|
@@ -173,7 +187,10 @@ class SmellDetector:
|
|
|
173
187
|
file=func_info.file,
|
|
174
188
|
line=func_info.line,
|
|
175
189
|
severity=0.8,
|
|
176
|
-
description=
|
|
190
|
+
description=(
|
|
191
|
+
f"Mutation of variable '{var}' spans {len(funcs)} functions."
|
|
192
|
+
" Changing this logic requires work in many places."
|
|
193
|
+
),
|
|
177
194
|
context={"variable": var, "affected_functions": list(funcs)},
|
|
178
195
|
)
|
|
179
196
|
)
|
|
@@ -192,7 +209,11 @@ class SmellDetector:
|
|
|
192
209
|
file=func_info.file,
|
|
193
210
|
line=func_info.line,
|
|
194
211
|
severity=min(1.0, func_info.centrality * 5),
|
|
195
|
-
description=
|
|
212
|
+
description=(
|
|
213
|
+
f"Function '{func_info.name}' is a structural bottleneck"
|
|
214
|
+
f" (centrality={round(func_info.centrality, 3)})."
|
|
215
|
+
" Significant logic flows through this function."
|
|
216
|
+
),
|
|
196
217
|
context={"centrality": func_info.centrality},
|
|
197
218
|
)
|
|
198
219
|
)
|
|
@@ -218,7 +239,11 @@ class SmellDetector:
|
|
|
218
239
|
file=func_info.file,
|
|
219
240
|
line=func_info.line,
|
|
220
241
|
severity=0.8,
|
|
221
|
-
description=
|
|
242
|
+
description=(
|
|
243
|
+
f"Circular dependency detected: {' -> '.join(cycle)}."
|
|
244
|
+
" This indicates high coupling and may lead to"
|
|
245
|
+
" infinite recursion or initialization issues."
|
|
246
|
+
),
|
|
222
247
|
context={"cycle": cycle},
|
|
223
248
|
)
|
|
224
249
|
)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
"""Format export functions — toon, map, context, yaml, json, mermaid, evolution,
|
|
1
|
+
"""Format export functions — toon, map, context, yaml, json, mermaid, evolution,
|
|
2
|
+
and legacy project-yaml/flow exports."""
|
|
2
3
|
|
|
3
4
|
# Each _export_* function handles one output format; _export_mermaid_pngs handles optional PNG generation.
|
|
4
5
|
# Format routing is centralised in cli_exports/orchestrator.py and cli_exports/orchestrator_handlers.py.
|
|
@@ -16,11 +16,33 @@
|
|
|
16
16
|
# ── Utilities ─────────────────────────────────────────────────────────────────
|
|
17
17
|
# _format_size() : human-readable byte count (B/KB/MB).
|
|
18
18
|
# _get_missing_files() : list expected output files not yet generated.
|
|
19
|
+
#
|
|
20
|
+
# ── Output layout ─────────────────────────────────────────────────────────────
|
|
21
|
+
# prompt.txt structure (single-file mode):
|
|
22
|
+
# [HEADER] project path, date, token estimate.
|
|
23
|
+
# [MAIN FILES] analysis.toon.yaml, context.md (full embed).
|
|
24
|
+
# [OPTIONAL FILES] calls.yaml, flow.toon.yaml, map.toon.yaml (if present).
|
|
25
|
+
# [SUBPROJECTS] per-subproject mini-prompt blocks (if multi-project).
|
|
26
|
+
# [MISSING FILES] list of expected-but-absent output files.
|
|
27
|
+
#
|
|
28
|
+
# prompt_NNN.txt structure (chunked mode):
|
|
29
|
+
# Each chunk = header + slice of main/optional content ≤ chunk_size bytes.
|
|
19
30
|
|
|
20
31
|
import time
|
|
21
32
|
from pathlib import Path
|
|
22
33
|
from typing import List, Optional, Tuple
|
|
23
34
|
|
|
35
|
+
# ── Output filename constants ──────────────────────────────────────────────────
|
|
36
|
+
_F_ANALYSIS_TOON = "analysis.toon"
|
|
37
|
+
_F_MAP_TOON = "map.toon.yaml"
|
|
38
|
+
_F_EVOLUTION_TOON = "evolution.toon.yaml"
|
|
39
|
+
_F_PROJECT_TOON_YAML = "project.toon.yaml"
|
|
40
|
+
_F_CONTEXT_MD = "context.md"
|
|
41
|
+
_F_README_MD = "README.md"
|
|
42
|
+
_F_PROJECT_TOON = "project.toon"
|
|
43
|
+
_F_VALIDATION_TOON = "project/validation.toon.yaml"
|
|
44
|
+
_F_DUPLICATION_TOON = "project/duplication.toon.yaml"
|
|
45
|
+
|
|
24
46
|
|
|
25
47
|
def _export_prompt_txt(
|
|
26
48
|
args, output_dir: Path, formats: list[str], source_path: Optional[Path] = None
|
|
@@ -117,49 +139,49 @@ def _get_prompt_paths(source_path: Optional[Path], output_dir: Path) -> Tuple[st
|
|
|
117
139
|
|
|
118
140
|
_MAIN_FILES = [
|
|
119
141
|
(
|
|
120
|
-
|
|
142
|
+
_F_ANALYSIS_TOON,
|
|
121
143
|
"Health diagnostics - complexity metrics, god modules, coupling issues, refactoring priorities",
|
|
122
|
-
(
|
|
144
|
+
(_F_ANALYSIS_TOON, "analysis.toon.yaml"),
|
|
123
145
|
),
|
|
124
146
|
(
|
|
125
|
-
|
|
147
|
+
_F_MAP_TOON,
|
|
126
148
|
"Structural map - files, sizes, imports, exports, signatures, project header",
|
|
127
|
-
(
|
|
149
|
+
(_F_MAP_TOON,),
|
|
128
150
|
),
|
|
129
151
|
(
|
|
130
|
-
|
|
152
|
+
_F_EVOLUTION_TOON,
|
|
131
153
|
"Refactoring queue - ranked actions by impact/effort, risks, metrics targets, history",
|
|
132
|
-
(
|
|
154
|
+
(_F_EVOLUTION_TOON,),
|
|
133
155
|
),
|
|
134
156
|
(
|
|
135
|
-
|
|
157
|
+
_F_PROJECT_TOON_YAML,
|
|
136
158
|
"Compact project overview - generated from project.yaml data",
|
|
137
|
-
(
|
|
159
|
+
(_F_PROJECT_TOON_YAML,),
|
|
138
160
|
),
|
|
139
161
|
(
|
|
140
|
-
|
|
162
|
+
_F_CONTEXT_MD,
|
|
141
163
|
"LLM narrative - architecture summary and project context",
|
|
142
|
-
(
|
|
164
|
+
(_F_CONTEXT_MD,),
|
|
143
165
|
),
|
|
144
|
-
(
|
|
166
|
+
(_F_README_MD, "Generated documentation - overview and usage guide", (_F_README_MD,)),
|
|
145
167
|
]
|
|
146
168
|
|
|
147
169
|
|
|
148
170
|
_OPTIONAL_FILES = [
|
|
149
171
|
(
|
|
150
|
-
|
|
172
|
+
_F_PROJECT_TOON,
|
|
151
173
|
"Project logic - compact module view from code2logic",
|
|
152
|
-
(
|
|
174
|
+
(_F_PROJECT_TOON, "project/project.toon", "project.toon.txt"),
|
|
153
175
|
),
|
|
154
176
|
(
|
|
155
|
-
|
|
177
|
+
_F_VALIDATION_TOON,
|
|
156
178
|
"Validation analysis - generated by vallm tool",
|
|
157
|
-
(
|
|
179
|
+
(_F_VALIDATION_TOON,),
|
|
158
180
|
),
|
|
159
181
|
(
|
|
160
|
-
|
|
182
|
+
_F_DUPLICATION_TOON,
|
|
161
183
|
"Code duplication analysis - generated by redup tool",
|
|
162
|
-
(
|
|
184
|
+
(_F_DUPLICATION_TOON,),
|
|
163
185
|
),
|
|
164
186
|
]
|
|
165
187
|
|
|
@@ -175,7 +197,8 @@ def _build_prompt_header(project_path: str) -> List[str]:
|
|
|
175
197
|
"",
|
|
176
198
|
"Files for analysis:",
|
|
177
199
|
"",
|
|
178
|
-
"Note: project/validation.toon.yaml and project/duplication.toon.yaml
|
|
200
|
+
"Note: project/validation.toon.yaml and project/duplication.toon.yaml"
|
|
201
|
+
" are generated by external tools (vallm and redup)",
|
|
179
202
|
]
|
|
180
203
|
|
|
181
204
|
|
|
@@ -261,7 +284,7 @@ def _build_subprojects_section(
|
|
|
261
284
|
)
|
|
262
285
|
sp_files = []
|
|
263
286
|
total_size = 0
|
|
264
|
-
for f in [
|
|
287
|
+
for f in [_F_ANALYSIS_TOON, _F_CONTEXT_MD, _F_EVOLUTION_TOON]:
|
|
265
288
|
f_path = sp_dir / f
|
|
266
289
|
if f_path.exists():
|
|
267
290
|
size = f_path.stat().st_size
|
|
@@ -272,7 +295,8 @@ def _build_subprojects_section(
|
|
|
272
295
|
size_str = _format_size(total_size)
|
|
273
296
|
file_list = ", ".join(sp_files)
|
|
274
297
|
lines.append(
|
|
275
|
-
f"- {output_rel_path}/{sp.name.replace('.', '_')}/
|
|
298
|
+
f"- {output_rel_path}/{sp.name.replace('.', '_')}/"
|
|
299
|
+
f" [{level_name}] Total: {size_str} - Contains: {file_list}"
|
|
276
300
|
)
|
|
277
301
|
|
|
278
302
|
return lines
|
|
@@ -301,15 +325,24 @@ def _build_missing_files_section(output_dir: Path, output_rel_path: str) -> List
|
|
|
301
325
|
|
|
302
326
|
# (has_key, file_key, candidate_filenames, default_path)
|
|
303
327
|
_OUTPUT_FILE_SPECS = [
|
|
304
|
-
("has_analysis_toon",
|
|
305
|
-
|
|
306
|
-
("
|
|
307
|
-
|
|
308
|
-
("
|
|
309
|
-
|
|
310
|
-
("
|
|
311
|
-
|
|
312
|
-
("
|
|
328
|
+
("has_analysis_toon", "analysis_file",
|
|
329
|
+
(_F_ANALYSIS_TOON, "analysis.toon.yaml"), _F_ANALYSIS_TOON),
|
|
330
|
+
("has_map_toon", "map_file",
|
|
331
|
+
(_F_MAP_TOON,), _F_MAP_TOON),
|
|
332
|
+
("has_evolution_toon", "evolution_file",
|
|
333
|
+
(_F_EVOLUTION_TOON,), _F_EVOLUTION_TOON),
|
|
334
|
+
("has_project_toon_yaml", "project_toon_file",
|
|
335
|
+
(_F_PROJECT_TOON_YAML,), _F_PROJECT_TOON_YAML),
|
|
336
|
+
("has_context_md", "context_file",
|
|
337
|
+
(_F_CONTEXT_MD,), _F_CONTEXT_MD),
|
|
338
|
+
("has_readme_md", "readme_file",
|
|
339
|
+
(_F_README_MD,), _F_README_MD),
|
|
340
|
+
("has_project_logic", "project_logic_file",
|
|
341
|
+
(_F_PROJECT_TOON, "project/project.toon", "project.toon.txt"), _F_PROJECT_TOON),
|
|
342
|
+
("has_validation_toon", "validation_file",
|
|
343
|
+
(_F_VALIDATION_TOON,), _F_VALIDATION_TOON),
|
|
344
|
+
("has_duplication_toon", "duplication_file",
|
|
345
|
+
(_F_DUPLICATION_TOON,), _F_DUPLICATION_TOON),
|
|
313
346
|
]
|
|
314
347
|
_ACTIONABLE_KEYS = {"has_analysis_toon", "has_map_toon", "has_evolution_toon",
|
|
315
348
|
"has_project_toon_yaml", "has_project_logic",
|
|
@@ -352,7 +385,8 @@ def _build_dynamic_focus_areas(file_analysis: dict) -> List[str]:
|
|
|
352
385
|
|
|
353
386
|
if file_analysis["has_analysis_toon"]:
|
|
354
387
|
focus_areas.append(
|
|
355
|
-
f"1. **Code Health Analysis** - Review complexity metrics, god modules,
|
|
388
|
+
f"1. **Code Health Analysis** - Review complexity metrics, god modules,"
|
|
389
|
+
f" coupling issues from {analysis_file}"
|
|
356
390
|
)
|
|
357
391
|
|
|
358
392
|
if file_analysis["has_map_toon"]:
|
|
@@ -362,7 +396,8 @@ def _build_dynamic_focus_areas(file_analysis: dict) -> List[str]:
|
|
|
362
396
|
|
|
363
397
|
if file_analysis["has_evolution_toon"]:
|
|
364
398
|
focus_areas.append(
|
|
365
|
-
f"3. **Refactoring Priorities** - Examine ranked refactoring actions
|
|
399
|
+
f"3. **Refactoring Priorities** - Examine ranked refactoring actions"
|
|
400
|
+
f" and risk assessment from {evolution_file}"
|
|
366
401
|
)
|
|
367
402
|
|
|
368
403
|
if file_analysis.get("has_project_toon_yaml"):
|
|
@@ -377,7 +412,8 @@ def _build_dynamic_focus_areas(file_analysis: dict) -> List[str]:
|
|
|
377
412
|
|
|
378
413
|
if file_analysis["has_validation_toon"]:
|
|
379
414
|
focus_areas.append(
|
|
380
|
-
f"6. **Validation Analysis** - Review validation results and issues
|
|
415
|
+
f"6. **Validation Analysis** - Review validation results and issues"
|
|
416
|
+
f" identified by vallm from {validation_file}"
|
|
381
417
|
)
|
|
382
418
|
|
|
383
419
|
if file_analysis["has_duplication_toon"]:
|
|
@@ -408,9 +444,12 @@ def _build_dynamic_tasks(file_analysis: dict) -> List[str]:
|
|
|
408
444
|
project_logic_file = file_analysis.get("project_logic_file", "project.toon")
|
|
409
445
|
|
|
410
446
|
tasks = [
|
|
411
|
-
"- Treat this prompt as a refactoring brief: identify the highest-priority
|
|
412
|
-
"
|
|
413
|
-
"-
|
|
447
|
+
"- Treat this prompt as a refactoring brief: identify the highest-priority"
|
|
448
|
+
" changes and prepare concrete edits.",
|
|
449
|
+
"- Use the file set to decide whether the first pass should focus on"
|
|
450
|
+
" correctness, duplication, complexity reduction, or architecture cleanup.",
|
|
451
|
+
"- If you can safely implement the refactor, do it; otherwise give an exact"
|
|
452
|
+
" file-by-file change plan and test plan.",
|
|
414
453
|
]
|
|
415
454
|
|
|
416
455
|
if file_analysis["has_analysis_toon"]:
|
|
@@ -57,7 +57,7 @@ Format Options (-f):
|
|
|
57
57
|
code2logic — Generate project logic (legacy project.toon) via external code2logic
|
|
58
58
|
project-yaml — Legacy project.yaml export (single source of truth) + generated views
|
|
59
59
|
planfile — Planfile ticket suggestions (planfile-tickets.yaml); use --planfile-apply to create tickets
|
|
60
|
-
all — Generate core formats (analysis.toon, map.toon.yaml, evolution.toon.yaml, context, mermaid, planfile-tickets.yaml) plus project.toon.yaml and prompt.txt; PNG remains opt-in via --png
|
|
60
|
+
all — Generate core formats (analysis.toon, map.toon.yaml, evolution.toon.yaml, context, mermaid, planfile-tickets.yaml) plus project.toon.yaml and prompt.txt; PNG remains opt-in via --png # noqa: E501
|
|
61
61
|
|
|
62
62
|
Strategy Options (--strategy):
|
|
63
63
|
quick — Fast overview, fewer files analyzed
|
|
@@ -13,20 +13,20 @@ def get_typescript_patterns() -> Dict[str, re.Pattern]:
|
|
|
13
13
|
"import": re.compile(r"^\s*import\s+.*?\s+from\s+['\"]([^'\"]+)['\"]"),
|
|
14
14
|
"decorator": re.compile(r"^\s*@(\w+(?:\.\w+)?)(?:\([^)]*\))?"),
|
|
15
15
|
"class": re.compile(
|
|
16
|
-
r"^\s*(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+(\w+)\s*(?:<[^>]+>)?(?:\s+extends\s+(\w+))?(?:\s+implements\s+([^{]+))?"
|
|
16
|
+
r"^\s*(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+(\w+)\s*(?:<[^>]+>)?(?:\s+extends\s+(\w+))?(?:\s+implements\s+([^{]+))?" # noqa: E501
|
|
17
17
|
),
|
|
18
18
|
"interface": re.compile(r"^\s*(?:export\s+)?interface\s+(\w+)(?:<[^>]+>)?"),
|
|
19
19
|
"function": re.compile(
|
|
20
20
|
r"^\s*(?:export\s+)?(?:async\s+)?(?:function\s+(\w+)|(?:const|let|var)\s+(\w+)\s*=\s*(?:async\s+)?[\(\w])"
|
|
21
21
|
),
|
|
22
22
|
"arrow_func": re.compile(
|
|
23
|
-
r"^\s*(?:export\s+)?\s*(?:const|let|var)\s+(\w+)\s*(?::\s*[^=]+)?\s*=\s*(?:<[^>]+>\s*)?(?:async\s+)?\([^)]*\)\s*(?::\s*[^=]+)?\s*=>"
|
|
23
|
+
r"^\s*(?:export\s+)?\s*(?:const|let|var)\s+(\w+)\s*(?::\s*[^=]+)?\s*=\s*(?:<[^>]+>\s*)?(?:async\s+)?\([^)]*\)\s*(?::\s*[^=]+)?\s*=>" # noqa: E501
|
|
24
24
|
),
|
|
25
25
|
"method": re.compile(
|
|
26
|
-
r"^\s*(?:(?:public|private|protected|static|readonly|abstract|async|override)\s+)*(?:get\s+|set\s+)?(\w+)\s*(?:<[^>]*>)?\s*\([^)]*\)"
|
|
26
|
+
r"^\s*(?:(?:public|private|protected|static|readonly|abstract|async|override)\s+)*(?:get\s+|set\s+)?(\w+)\s*(?:<[^>]*>)?\s*\([^)]*\)" # noqa: E501
|
|
27
27
|
),
|
|
28
28
|
"arrow_prop": re.compile(
|
|
29
|
-
r"^\s*(?:(?:public|private|protected|static|readonly)\s+)*(\w+)\s*(?::\s*[^=]+)?\s*=\s*(?:<[^>]+>\s*)?(?:async\s+)?(?:\([^)]*\)|[a-zA-Z_]\w*)\s*=>"
|
|
29
|
+
r"^\s*(?:(?:public|private|protected|static|readonly)\s+)*(\w+)\s*(?::\s*[^=]+)?\s*=\s*(?:<[^>]+>\s*)?(?:async\s+)?(?:\([^)]*\)|[a-zA-Z_]\w*)\s*=>" # noqa: E501
|
|
30
30
|
),
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -256,7 +256,9 @@ def manage_toon_size(
|
|
|
256
256
|
print(f" - {prefix}.toon: {size_kb:.1f}KB (within {max_kb}KB limit)")
|
|
257
257
|
else:
|
|
258
258
|
print(
|
|
259
|
-
f" - {prefix}.toon: {size_kb:.1f}KB
|
|
259
|
+
f" - {prefix}.toon: {size_kb:.1f}KB"
|
|
260
|
+
f" (margin: {size_kb - max_kb:.1f}KB < {margin_kb:.0f}KB,"
|
|
261
|
+
" keeping single file)"
|
|
260
262
|
)
|
|
261
263
|
return [source_file]
|
|
262
264
|
|
|
@@ -153,7 +153,7 @@ class DashboardDataBuilder:
|
|
|
153
153
|
color = _LANG_COLORS.get(lang, "#6b7280")
|
|
154
154
|
html += f"""
|
|
155
155
|
<tr>
|
|
156
|
-
<td><span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:{color};margin-right:6px"></span>{Path(path).name}</td>
|
|
156
|
+
<td><span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:{color};margin-right:6px"></span>{Path(path).name}</td> # noqa: E501
|
|
157
157
|
<td style="color:var(--muted);font-size:.75rem">{"/".join(Path(path).parts[:-1]) or "."}</td>
|
|
158
158
|
<td style="text-align:right">{lines:,}</td>
|
|
159
159
|
<td style="text-align:right">{methods}</td>
|
|
@@ -104,15 +104,15 @@ class DashboardRenderer:
|
|
|
104
104
|
* {{ margin:0; padding:0; box-sizing:border-box; }}
|
|
105
105
|
body {{ font-family: 'Segoe UI',system-ui,sans-serif; background:var(--bg); color:var(--text); padding:2rem; }}
|
|
106
106
|
h1 {{ font-size:1.5rem; margin-bottom:.5rem; }}
|
|
107
|
-
h2 {{ font-size:1.1rem; color:var(--muted); margin:1.5rem 0 .75rem; border-bottom:1px solid var(--border); padding-bottom:.25rem; }}
|
|
107
|
+
h2 {{ font-size:1.1rem; color:var(--muted); margin:1.5rem 0 .75rem; border-bottom:1px solid var(--border); padding-bottom:.25rem; }} # noqa: E501
|
|
108
108
|
.grid {{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:1rem; margin:1rem 0; }}
|
|
109
109
|
.card {{ background:var(--surface); border:1px solid var(--border); border-radius:.5rem; padding:1rem; }}
|
|
110
110
|
.card .value {{ font-size:1.8rem; font-weight:700; }}
|
|
111
111
|
.card .label {{ color:var(--muted); font-size:.8rem; text-transform:uppercase; }}
|
|
112
|
-
.chart-container {{ background:var(--surface); border:1px solid var(--border); border-radius:.5rem; padding:1rem; margin:1rem 0; }}
|
|
112
|
+
.chart-container {{ background:var(--surface); border:1px solid var(--border); border-radius:.5rem; padding:1rem; margin:1rem 0; }} # noqa: E501
|
|
113
113
|
.table-wrap {{ overflow-x:auto; }}
|
|
114
114
|
table {{ width:100%; border-collapse:collapse; font-size:.85rem; }}
|
|
115
|
-
th {{ text-align:left; color:var(--muted); padding:.5rem; border-bottom:1px solid var(--border); white-space:nowrap; }}
|
|
115
|
+
th {{ text-align:left; color:var(--muted); padding:.5rem; border-bottom:1px solid var(--border); white-space:nowrap; }} # noqa: E501
|
|
116
116
|
td {{ padding:.5rem; border-bottom:1px solid var(--border); }}
|
|
117
117
|
.badge {{ padding:.15rem .5rem; border-radius:.25rem; font-size:.75rem; font-weight:600; }}
|
|
118
118
|
.badge.critical {{ background:var(--red); color:#fff; }}
|
|
@@ -130,7 +130,7 @@ class DashboardRenderer:
|
|
|
130
130
|
.evo-cards {{ display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:.75rem; }}
|
|
131
131
|
.evo-cards .card {{ text-align:center; }}
|
|
132
132
|
.trend {{ font-size:.75rem; color:var(--muted); }}
|
|
133
|
-
.lang-tag {{ display:inline-block; padding:.1rem .4rem; border-radius:.2rem; font-size:.7rem; font-weight:600; margin-right:.25rem; color:#fff; }}
|
|
133
|
+
.lang-tag {{ display:inline-block; padding:.1rem .4rem; border-radius:.2rem; font-size:.7rem; font-weight:600; margin-right:.25rem; color:#fff; }} # noqa: E501
|
|
134
134
|
@media (max-width:768px) {{ .two-col,.three-col {{ grid-template-columns:1fr; }} }}
|
|
135
135
|
footer {{ margin-top:2rem; color:var(--muted); font-size:.75rem; text-align:center; }}
|
|
136
136
|
</style>
|
|
@@ -153,7 +153,7 @@ class DashboardRenderer:
|
|
|
153
153
|
<div class="card"><div class="value">{stats.get("lines", 0):,}</div><div class="label">Lines</div></div>
|
|
154
154
|
<div class="card"><div class="value">{len(lang["names"])}</div><div class="label">Languages</div></div>
|
|
155
155
|
<div class="card"><div class="value">{cc_avg}</div><div class="label">Avg CC</div></div>
|
|
156
|
-
<div class="card"><div class="value">{health.get("critical_count", 0)}</div><div class="label">Critical (CC≥{health.get("critical_limit", 10)})</div></div>
|
|
156
|
+
<div class="card"><div class="value">{health.get("critical_count", 0)}</div><div class="label">Critical (CC≥{health.get("critical_limit", 10)})</div></div> # noqa: E501
|
|
157
157
|
<div class="card"><div class="value">{health.get("duplicates", 0)}</div><div class="label">Duplicates</div></div>
|
|
158
158
|
<div class="card"><div class="value">{health.get("cycles", 0)}</div><div class="label">Cycles</div></div>
|
|
159
159
|
</div>
|
|
@@ -179,8 +179,8 @@ class DashboardRenderer:
|
|
|
179
179
|
<h2>Top Modules ({len(modules)})</h2>
|
|
180
180
|
<div class="card"><div class="table-wrap">
|
|
181
181
|
<table>
|
|
182
|
-
<thead><tr><th>Module</th><th>Path</th><th style="text-align:right">Lines</th><th style="text-align:right">Funcs</th><th style="text-align:right">Classes</th><th style="text-align:right">CC max</th></tr></thead>
|
|
183
|
-
<tbody>{top_modules_html if top_modules_html else '<tr><td colspan="6" style="color:var(--muted)">No modules</td></tr>'}</tbody>
|
|
182
|
+
<thead><tr><th>Module</th><th>Path</th><th style="text-align:right">Lines</th><th style="text-align:right">Funcs</th><th style="text-align:right">Classes</th><th style="text-align:right">CC max</th></tr></thead> # noqa: E501
|
|
183
|
+
<tbody>{top_modules_html if top_modules_html else '<tr><td colspan="6" style="color:var(--muted)">No modules</td></tr>'}</tbody> # noqa: E501
|
|
184
184
|
</table>
|
|
185
185
|
</div></div>
|
|
186
186
|
</div>
|
|
@@ -200,7 +200,7 @@ class DashboardRenderer:
|
|
|
200
200
|
<div class="card"><div class="table-wrap">
|
|
201
201
|
<table>
|
|
202
202
|
<thead><tr><th>Function</th><th>Fan-out</th><th>Note</th></tr></thead>
|
|
203
|
-
<tbody>{hotspots_html if hotspots_html else '<tr><td colspan="3" style="color:var(--muted)">No hotspots</td></tr>'}</tbody>
|
|
203
|
+
<tbody>{hotspots_html if hotspots_html else '<tr><td colspan="3" style="color:var(--muted)">No hotspots</td></tr>'}</tbody> # noqa: E501
|
|
204
204
|
</table>
|
|
205
205
|
</div></div>
|
|
206
206
|
</div>
|
|
@@ -210,7 +210,7 @@ class DashboardRenderer:
|
|
|
210
210
|
<div class="card"><div class="table-wrap">
|
|
211
211
|
<table>
|
|
212
212
|
<thead><tr><th>#</th><th>Action</th><th>Impact</th><th>Effort</th></tr></thead>
|
|
213
|
-
<tbody>{refactor_html if refactor_html else '<tr><td colspan="4" style="color:var(--muted)">No refactoring needed</td></tr>'}</tbody>
|
|
213
|
+
<tbody>{refactor_html if refactor_html else '<tr><td colspan="4" style="color:var(--muted)">No refactoring needed</td></tr>'}</tbody> # noqa: E501
|
|
214
214
|
</table>
|
|
215
215
|
</div></div>
|
|
216
216
|
</div>
|
|
@@ -326,7 +326,7 @@ new Chart(modFuncsCtx, {{
|
|
|
326
326
|
<div class="card"><div class="value">{crit}</div><div class="label">Critical {crit_trend}</div></div>
|
|
327
327
|
<div class="card"><div class="value">{lines}</div><div class="label">Lines</div></div>
|
|
328
328
|
</div>
|
|
329
|
-
<p class="trend" style="margin-top:.5rem;">Run analysis multiple times to build a trend chart (≥3 data points needed).</p>
|
|
329
|
+
<p class="trend" style="margin-top:.5rem;">Run analysis multiple times to build a trend chart (≥3 data points needed).</p> # noqa: E501
|
|
330
330
|
</div>"""
|
|
331
331
|
|
|
332
332
|
@staticmethod
|
|
@@ -481,7 +481,7 @@ class HTMLRenderer:
|
|
|
481
481
|
<div class="content-body" id="contentBody">
|
|
482
482
|
<div class="welcome">
|
|
483
483
|
<h2>Analysis Results</h2>
|
|
484
|
-
<p>Select a file from the sidebar to view its contents. This interface works on GitHub Pages without any server required.</p>
|
|
484
|
+
<p>Select a file from the sidebar to view its contents. This interface works on GitHub Pages without any server required.</p> # noqa: E501
|
|
485
485
|
<div class="stats-grid" id="statsGrid">
|
|
486
486
|
<!-- Stats will be rendered here -->
|
|
487
487
|
</div>
|
|
@@ -563,38 +563,38 @@ class HTMLRenderer:
|
|
|
563
563
|
body.innerHTML = `<div class="markdown-content">${{marked.parse(file.content)}}</div>`;
|
|
564
564
|
}} else if (file.type === 'html') {{
|
|
565
565
|
// For HTML files, show in iframe for safety
|
|
566
|
-
body.innerHTML = `<iframe src="${{file.rel_path}}" style="width:100%;height:100%;border:none;border-radius:0.5rem;"></iframe>`;
|
|
566
|
+
body.innerHTML = `<iframe src="${{file.rel_path}}" style="width:100%;height:100%;border:none;border-radius:0.5rem;"></iframe>`; # noqa: E501
|
|
567
567
|
}} else if (file.type === 'image') {{
|
|
568
568
|
// For images, display the actual image
|
|
569
|
-
body.innerHTML = `<div class="image-preview"><img src="${{file.rel_path}}" alt="${{file.name}}" style="max-width:100%;max-height:100%;object-fit:contain;border-radius:0.5rem;"></div>`;
|
|
569
|
+
body.innerHTML = `<div class="image-preview"><img src="${{file.rel_path}}" alt="${{file.name}}" style="max-width:100%;max-height:100%;object-fit:contain;border-radius:0.5rem;"></div>`; # noqa: E501
|
|
570
570
|
}} else if (file.type === 'mermaid') {{
|
|
571
571
|
// Render mermaid diagram
|
|
572
572
|
const diagramId = 'mermaid-diagram-' + Date.now();
|
|
573
|
-
body.innerHTML = `<div class="mermaid-content"><pre class="mermaid" id="${{diagramId}}">${{file.content}}</pre></div>`;
|
|
573
|
+
body.innerHTML = `<div class="mermaid-content"><pre class="mermaid" id="${{diagramId}}">${{file.content}}</pre></div>`; # noqa: E501
|
|
574
574
|
// Initialize mermaid on the new element
|
|
575
575
|
setTimeout(() => {{
|
|
576
576
|
mermaid.init(undefined, document.getElementById(diagramId));
|
|
577
577
|
}}, 0);
|
|
578
578
|
}} else if (file.type === 'json') {{
|
|
579
579
|
try {{
|
|
580
|
-
const json = JSON.parse(file.content.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'));
|
|
580
|
+
const json = JSON.parse(file.content.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&')); # noqa: E501
|
|
581
581
|
const formatted = JSON.stringify(json, null, 2);
|
|
582
|
-
body.innerHTML = `<pre><code class="language-json">${{formatted.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}}</code></pre>`;
|
|
582
|
+
body.innerHTML = `<pre><code class="language-json">${{formatted.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}}</code></pre>`; # noqa: E501
|
|
583
583
|
hljs.highlightElement(body.querySelector('code'));
|
|
584
584
|
}} catch {{
|
|
585
585
|
body.innerHTML = `<pre>${{file.content}}</pre>`;
|
|
586
586
|
}}
|
|
587
587
|
}} else if (file.type === 'yaml') {{
|
|
588
588
|
// YAML with syntax highlighting
|
|
589
|
-
body.innerHTML = `<pre><code class="language-yaml">${{file.content.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}}</code></pre>`;
|
|
589
|
+
body.innerHTML = `<pre><code class="language-yaml">${{file.content.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}}</code></pre>`; # noqa: E501
|
|
590
590
|
hljs.highlightElement(body.querySelector('code'));
|
|
591
591
|
}} else if (file.type === 'toon') {{
|
|
592
592
|
// TOON with simple highlighting (use ini as closest match for key: value format)
|
|
593
|
-
body.innerHTML = `<pre><code class="language-ini">${{file.content.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}}</code></pre>`;
|
|
593
|
+
body.innerHTML = `<pre><code class="language-ini">${{file.content.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}}</code></pre>`; # noqa: E501
|
|
594
594
|
hljs.highlightElement(body.querySelector('code'));
|
|
595
595
|
}} else if (file.type === 'code') {{
|
|
596
596
|
// Code files with auto-highlighting
|
|
597
|
-
body.innerHTML = `<pre><code>${{file.content.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}}</code></pre>`;
|
|
597
|
+
body.innerHTML = `<pre><code>${{file.content.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}}</code></pre>`; # noqa: E501
|
|
598
598
|
hljs.highlightElement(body.querySelector('code'));
|
|
599
599
|
}} else {{
|
|
600
600
|
body.innerHTML = `<pre>${{file.content}}</pre>`;
|
|
@@ -37,8 +37,8 @@ def render_header(
|
|
|
37
37
|
)
|
|
38
38
|
|
|
39
39
|
lines = [
|
|
40
|
-
f"# {project_name} | {stats_line['files']}f {stats_line['lines']}L | {lang_str} | {datetime.now().strftime('%Y-%m-%d')}",
|
|
41
|
-
f"# stats: {stats_line['funcs']} func | {stats_line['classes']} cls | {stats_line['files']} mod | CC̄={stats_line['avg_cc']} | critical:{stats_line['critical']} | cycles:{stats_line['cycles']}",
|
|
40
|
+
f"# {project_name} | {stats_line['files']}f {stats_line['lines']}L | {lang_str} | {datetime.now().strftime('%Y-%m-%d')}", # noqa: E501
|
|
41
|
+
f"# stats: {stats_line['funcs']} func | {stats_line['classes']} cls | {stats_line['files']} mod | CC̄={stats_line['avg_cc']} | critical:{stats_line['critical']} | cycles:{stats_line['cycles']}", # noqa: E501
|
|
42
42
|
alerts_line,
|
|
43
43
|
hotspots_line,
|
|
44
44
|
f"# evolution: {trend}",
|
|
@@ -67,7 +67,7 @@ def _cycle_priorities(result: AnalysisResult) -> List[Dict]:
|
|
|
67
67
|
"""Return break-cycle actions for the first 3 circular dependencies."""
|
|
68
68
|
cycles = result.metrics.get("project", {}).get("circular_dependencies", [])
|
|
69
69
|
return [
|
|
70
|
-
{"action": f"Break circular dependency: {' → '.join(str(c) for c in cycle) if isinstance(cycle, list) else str(cycle)}",
|
|
70
|
+
{"action": f"Break circular dependency: {' → '.join(str(c) for c in cycle) if isinstance(cycle, list) else str(cycle)}", # noqa: E501
|
|
71
71
|
"impact": "medium", "effort": "low"}
|
|
72
72
|
for cycle in cycles[:3]
|
|
73
73
|
]
|