code2llm 0.5.32__tar.gz → 0.5.34__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.32 → code2llm-0.5.34}/PKG-INFO +5 -5
- {code2llm-0.5.32 → code2llm-0.5.34}/README.md +4 -4
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/__init__.py +1 -1
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/cli.py +79 -11
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/cli_exports.py +59 -3
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/large_repo.py +2 -2
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/__init__.py +12 -0
- code2llm-0.5.34/code2llm/exporters/report_generators.py +601 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/nlp/__init__.py +1 -1
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm.egg-info/PKG-INFO +5 -5
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm.egg-info/SOURCES.txt +1 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/pyproject.toml +1 -1
- {code2llm-0.5.32 → code2llm-0.5.34}/LICENSE +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/__main__.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/analysis/__init__.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/analysis/call_graph.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/analysis/cfg.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/analysis/coupling.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/analysis/data_analysis.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/analysis/dfg.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/analysis/pipeline_detector.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/analysis/side_effects.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/analysis/smells.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/analysis/type_inference.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/__init__.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/analyzer.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/config.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/core/__init__.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/core/file_analyzer.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/core/file_cache.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/core/file_filter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/core/refactoring.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/models.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/streaming/__init__.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/streaming/cache.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/streaming/incremental.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/streaming/prioritizer.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/streaming/scanner.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/streaming/strategies.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/streaming_analyzer.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/core/toon_size_manager.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/base.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/context_exporter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/evolution_exporter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/flow_constants.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/flow_exporter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/flow_renderer.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/json_exporter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/llm_exporter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/map_exporter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/mermaid_exporter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/project_yaml_exporter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/readme_exporter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/toon/__init__.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/toon/helpers.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/toon/metrics.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/toon/module_detail.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/toon/renderer.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/toon.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/exporters/yaml_exporter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/generators/__init__.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/generators/llm_flow.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/generators/llm_task.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/generators/mermaid.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/nlp/config.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/nlp/entity_resolution.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/nlp/intent_matching.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/nlp/normalization.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/nlp/pipeline.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/patterns/__init__.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/patterns/detector.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/refactor/__init__.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm/refactor/prompt_engine.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm.egg-info/dependency_links.txt +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm.egg-info/entry_points.txt +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm.egg-info/requires.txt +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/code2llm.egg-info/top_level.txt +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/setup.cfg +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/setup.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/tests/test_advanced_analysis.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/tests/test_analyzer.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/tests/test_deep_analysis.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/tests/test_edge_cases.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/tests/test_flow_exporter.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/tests/test_format_quality.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/tests/test_nlp_pipeline.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/tests/test_pipeline_detector.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/tests/test_prompt_engine.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/tests/test_prompt_txt.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/tests/test_refactoring_engine.py +0 -0
- {code2llm-0.5.32 → code2llm-0.5.34}/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.34
|
|
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
|
|
@@ -60,7 +60,7 @@ When you run `code2llm ./ -f all`, the following files are created:
|
|
|
60
60
|
|
|
61
61
|
| File | Format | Purpose | Key Insights |
|
|
62
62
|
|------|--------|---------|--------------|
|
|
63
|
-
| `analysis.toon` | **TOON** | **🔥 Health diagnostics** - Complexity, god modules, coupling |
|
|
63
|
+
| `analysis.toon` | **TOON** | **🔥 Health diagnostics** - Complexity, god modules, coupling | 55 critical functions, 1 god modules |
|
|
64
64
|
| `project.toon` | **TOON** | **🧠 Project logic** - Compact module view from code2logic | Generated via code2logic integration |
|
|
65
65
|
|
|
66
66
|
### 🤖 LLM-Ready Documentation
|
|
@@ -375,9 +375,9 @@ code2llm ./ -f yaml --separate-orphans
|
|
|
375
375
|
|
|
376
376
|
**Generated by**: `code2llm ./ -f all --readme`
|
|
377
377
|
**Analysis Date**: 2026-03-05
|
|
378
|
-
**Total Functions**:
|
|
379
|
-
**Total Classes**:
|
|
380
|
-
**Modules**:
|
|
378
|
+
**Total Functions**: 774
|
|
379
|
+
**Total Classes**: 104
|
|
380
|
+
**Modules**: 92
|
|
381
381
|
|
|
382
382
|
For more information about code2llm, visit: https://github.com/tom-sapletta/code2llm
|
|
383
383
|
|
|
@@ -10,7 +10,7 @@ When you run `code2llm ./ -f all`, the following files are created:
|
|
|
10
10
|
|
|
11
11
|
| File | Format | Purpose | Key Insights |
|
|
12
12
|
|------|--------|---------|--------------|
|
|
13
|
-
| `analysis.toon` | **TOON** | **🔥 Health diagnostics** - Complexity, god modules, coupling |
|
|
13
|
+
| `analysis.toon` | **TOON** | **🔥 Health diagnostics** - Complexity, god modules, coupling | 55 critical functions, 1 god modules |
|
|
14
14
|
| `project.toon` | **TOON** | **🧠 Project logic** - Compact module view from code2logic | Generated via code2logic integration |
|
|
15
15
|
|
|
16
16
|
### 🤖 LLM-Ready Documentation
|
|
@@ -325,9 +325,9 @@ code2llm ./ -f yaml --separate-orphans
|
|
|
325
325
|
|
|
326
326
|
**Generated by**: `code2llm ./ -f all --readme`
|
|
327
327
|
**Analysis Date**: 2026-03-05
|
|
328
|
-
**Total Functions**:
|
|
329
|
-
**Total Classes**:
|
|
330
|
-
**Modules**:
|
|
328
|
+
**Total Functions**: 774
|
|
329
|
+
**Total Classes**: 104
|
|
330
|
+
**Modules**: 92
|
|
331
331
|
|
|
332
332
|
For more information about code2llm, visit: https://github.com/tom-sapletta/code2llm
|
|
333
333
|
|
|
@@ -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.34"
|
|
12
12
|
__author__ = "STTS Project"
|
|
13
13
|
|
|
14
14
|
# Core analysis components (lightweight, always needed)
|
|
@@ -16,6 +16,7 @@ from .cli_exports import (
|
|
|
16
16
|
_export_evolution, _export_data_structures, _export_context_fallback,
|
|
17
17
|
_export_readme, _export_code2logic, _export_prompt_txt, _run_exports,
|
|
18
18
|
_export_simple_formats, _export_yaml, _export_mermaid, _export_refactor_prompts,
|
|
19
|
+
_export_project_yaml, _run_report,
|
|
19
20
|
)
|
|
20
21
|
|
|
21
22
|
|
|
@@ -41,20 +42,24 @@ Examples:
|
|
|
41
42
|
code2llm ./ -f mermaid --no-png # Mermaid diagrams without PNG
|
|
42
43
|
code2llm ./ -m static -v -o ./analysis # Static mode, verbose
|
|
43
44
|
code2llm ./ --no-readme # Disable README generation
|
|
45
|
+
code2llm ./ -f project-yaml # Unified project.yaml (single source of truth)
|
|
46
|
+
code2llm report --format toon # Generate view from project.yaml
|
|
47
|
+
code2llm report --format all # All views from project.yaml
|
|
44
48
|
code2llm llm-flow # Generate LLM flow summary
|
|
45
49
|
code2llm llm-context ./ # Generate LLM context only
|
|
46
50
|
|
|
47
51
|
Format Options (-f):
|
|
48
|
-
toon
|
|
49
|
-
map
|
|
50
|
-
flow
|
|
51
|
-
context
|
|
52
|
-
code2logic
|
|
53
|
-
yaml
|
|
54
|
-
json
|
|
55
|
-
mermaid
|
|
56
|
-
evolution
|
|
57
|
-
|
|
52
|
+
toon — Health diagnostics (analysis.toon) [default]
|
|
53
|
+
map — Structural map (map.toon) — modules, imports, signatures
|
|
54
|
+
flow — Data-flow analysis (flow.toon) — pipelines, contracts, types
|
|
55
|
+
context — LLM narrative (context.md) — architecture summary
|
|
56
|
+
code2logic — Generate project logic (project.toon) via external code2logic
|
|
57
|
+
yaml — Standard YAML format
|
|
58
|
+
json — Machine-readable JSON
|
|
59
|
+
mermaid — Flowchart diagrams (flow.mmd, calls.mmd, compact_flow.mmd)
|
|
60
|
+
evolution — Refactoring queue (evolution.toon)
|
|
61
|
+
project-yaml — Unified project.yaml (single source of truth) + generated views
|
|
62
|
+
all — Generate all formats (including project-yaml)
|
|
58
63
|
|
|
59
64
|
Strategy Options (--strategy):
|
|
60
65
|
quick — Fast overview, fewer files analyzed
|
|
@@ -244,15 +249,78 @@ Strategy Options (--strategy):
|
|
|
244
249
|
|
|
245
250
|
|
|
246
251
|
def _handle_special_commands() -> Optional[int]:
|
|
247
|
-
"""Handle special sub-commands (llm-flow, llm-context)."""
|
|
252
|
+
"""Handle special sub-commands (llm-flow, llm-context, report)."""
|
|
248
253
|
if len(sys.argv) > 1 and sys.argv[1] == 'llm-flow':
|
|
249
254
|
from .generators.llm_flow import main as llm_flow_main
|
|
250
255
|
return llm_flow_main(sys.argv[2:])
|
|
251
256
|
if len(sys.argv) > 1 and sys.argv[1] == 'llm-context':
|
|
252
257
|
return generate_llm_context(sys.argv[2:])
|
|
258
|
+
if len(sys.argv) > 1 and sys.argv[1] == 'report':
|
|
259
|
+
return _handle_report_command(sys.argv[2:])
|
|
253
260
|
return None
|
|
254
261
|
|
|
255
262
|
|
|
263
|
+
def _handle_report_command(args_list) -> int:
|
|
264
|
+
"""Generate views from an existing project.yaml.
|
|
265
|
+
|
|
266
|
+
Usage:
|
|
267
|
+
code2llm report --format toon # → project.toon
|
|
268
|
+
code2llm report --format context # → context.md
|
|
269
|
+
code2llm report --format article # → status.md
|
|
270
|
+
code2llm report --format html # → dashboard.html
|
|
271
|
+
code2llm report --format all # → all views
|
|
272
|
+
"""
|
|
273
|
+
import argparse
|
|
274
|
+
|
|
275
|
+
parser = argparse.ArgumentParser(
|
|
276
|
+
prog='code2llm report',
|
|
277
|
+
description='Generate views from project.yaml (single source of truth)',
|
|
278
|
+
)
|
|
279
|
+
parser.add_argument(
|
|
280
|
+
'--input', '-i',
|
|
281
|
+
default='./project.yaml',
|
|
282
|
+
help='Path to project.yaml (default: ./project.yaml)',
|
|
283
|
+
)
|
|
284
|
+
parser.add_argument(
|
|
285
|
+
'--format', '-f',
|
|
286
|
+
dest='report_format',
|
|
287
|
+
default='all',
|
|
288
|
+
help='Output format: toon, context, article, html, all (default: all)',
|
|
289
|
+
)
|
|
290
|
+
parser.add_argument(
|
|
291
|
+
'-o', '--output',
|
|
292
|
+
default='.',
|
|
293
|
+
help='Output directory (default: current directory)',
|
|
294
|
+
)
|
|
295
|
+
parser.add_argument(
|
|
296
|
+
'-v', '--verbose',
|
|
297
|
+
action='store_true',
|
|
298
|
+
help='Verbose output',
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
args = parser.parse_args(args_list)
|
|
302
|
+
|
|
303
|
+
input_path = Path(args.input)
|
|
304
|
+
if not input_path.exists():
|
|
305
|
+
print(f"Error: project.yaml not found: {input_path}", file=sys.stderr)
|
|
306
|
+
print("Run 'code2llm <source> -f project-yaml' first to generate it.", file=sys.stderr)
|
|
307
|
+
return 1
|
|
308
|
+
|
|
309
|
+
output_dir = Path(args.output)
|
|
310
|
+
output_dir.mkdir(parents=True, exist_ok=True)
|
|
311
|
+
|
|
312
|
+
if args.verbose:
|
|
313
|
+
print(f"Generating views from: {input_path}")
|
|
314
|
+
print(f"Output directory: {output_dir}")
|
|
315
|
+
|
|
316
|
+
_run_report(args, str(input_path), output_dir)
|
|
317
|
+
|
|
318
|
+
if args.verbose:
|
|
319
|
+
print(f"\nAll views saved to: {output_dir}")
|
|
320
|
+
|
|
321
|
+
return 0
|
|
322
|
+
|
|
323
|
+
|
|
256
324
|
def _validate_and_setup(args) -> tuple[Path, Path]:
|
|
257
325
|
"""Validate source path and setup output directory."""
|
|
258
326
|
if not args.source:
|
|
@@ -10,7 +10,10 @@ from typing import List, Optional, Tuple
|
|
|
10
10
|
from .exporters import (
|
|
11
11
|
YAMLExporter, JSONExporter, MermaidExporter,
|
|
12
12
|
ContextExporter, ToonExporter, MapExporter, FlowExporter,
|
|
13
|
-
EvolutionExporter, READMEExporter,
|
|
13
|
+
EvolutionExporter, READMEExporter, ProjectYAMLExporter,
|
|
14
|
+
ToonViewGenerator, ContextViewGenerator,
|
|
15
|
+
ArticleViewGenerator, HTMLDashboardGenerator,
|
|
16
|
+
load_project_yaml,
|
|
14
17
|
)
|
|
15
18
|
|
|
16
19
|
|
|
@@ -386,8 +389,46 @@ def _export_prompt_txt(args, output_dir: Path, formats: list[str], source_path:
|
|
|
386
389
|
print(f" - PROMPT: {prompt_path}")
|
|
387
390
|
|
|
388
391
|
|
|
392
|
+
def _export_project_yaml(args, result, output_dir: Path):
|
|
393
|
+
"""Export unified project.yaml — single source of truth."""
|
|
394
|
+
exporter = ProjectYAMLExporter()
|
|
395
|
+
filepath = output_dir / 'project.yaml'
|
|
396
|
+
exporter.export(result, str(filepath))
|
|
397
|
+
if getattr(args, 'verbose', False):
|
|
398
|
+
print(f" - PROJECT-YAML (single source of truth): {filepath}")
|
|
399
|
+
return filepath
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
def _run_report(args, project_yaml_path: str, output_dir: Path) -> None:
|
|
403
|
+
"""Generate views from project.yaml.
|
|
404
|
+
|
|
405
|
+
Supported formats: toon, context, article, html, all.
|
|
406
|
+
"""
|
|
407
|
+
data = load_project_yaml(project_yaml_path)
|
|
408
|
+
report_formats = [f.strip() for f in args.report_format.split(',')]
|
|
409
|
+
if 'all' in report_formats:
|
|
410
|
+
report_formats = ['toon', 'context', 'article', 'html']
|
|
411
|
+
|
|
412
|
+
generator_map = {
|
|
413
|
+
'toon': ('project.toon', ToonViewGenerator(), 'TOON view'),
|
|
414
|
+
'context': ('context.md', ContextViewGenerator(), 'Context view'),
|
|
415
|
+
'article': ('status.md', ArticleViewGenerator(), 'Article view'),
|
|
416
|
+
'html': ('dashboard.html', HTMLDashboardGenerator(), 'HTML dashboard'),
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
for fmt in report_formats:
|
|
420
|
+
if fmt not in generator_map:
|
|
421
|
+
print(f"Warning: unknown report format '{fmt}', skipping", file=sys.stderr)
|
|
422
|
+
continue
|
|
423
|
+
filename, generator, label = generator_map[fmt]
|
|
424
|
+
filepath = output_dir / filename
|
|
425
|
+
generator.generate(data, str(filepath))
|
|
426
|
+
if getattr(args, 'verbose', False):
|
|
427
|
+
print(f" - {label}: {filepath}")
|
|
428
|
+
|
|
429
|
+
|
|
389
430
|
def _export_simple_formats(args, result, output_dir: Path, formats):
|
|
390
|
-
"""Export toon, map, flow, context, yaml, json formats."""
|
|
431
|
+
"""Export toon, map, flow, context, yaml, json, project-yaml formats."""
|
|
391
432
|
format_map = {
|
|
392
433
|
'toon': ('analysis.toon', ToonExporter, 'TOON (diagnostics)'),
|
|
393
434
|
'map': ('map.toon', MapExporter, 'MAP (structure)'),
|
|
@@ -403,6 +444,21 @@ def _export_simple_formats(args, result, output_dir: Path, formats):
|
|
|
403
444
|
if args.verbose:
|
|
404
445
|
print(f" - {label}: {filepath}")
|
|
405
446
|
|
|
447
|
+
# Unified project.yaml (single source of truth)
|
|
448
|
+
if 'project-yaml' in formats or 'all' in formats:
|
|
449
|
+
yaml_path = _export_project_yaml(args, result, output_dir)
|
|
450
|
+
# Auto-generate all views from project.yaml
|
|
451
|
+
data = load_project_yaml(str(yaml_path))
|
|
452
|
+
view_map = {
|
|
453
|
+
'project.toon': ToonViewGenerator(),
|
|
454
|
+
'dashboard.html': HTMLDashboardGenerator(),
|
|
455
|
+
}
|
|
456
|
+
for filename, generator in view_map.items():
|
|
457
|
+
filepath = output_dir / filename
|
|
458
|
+
generator.generate(data, str(filepath))
|
|
459
|
+
if args.verbose:
|
|
460
|
+
print(f" - Generated view: {filepath}")
|
|
461
|
+
|
|
406
462
|
if 'yaml' in formats:
|
|
407
463
|
_export_yaml(args, result, output_dir)
|
|
408
464
|
|
|
@@ -498,7 +554,7 @@ def _run_exports(args, result, output_dir: Path, source_path: Optional[Path] = N
|
|
|
498
554
|
"""
|
|
499
555
|
formats = [f.strip() for f in args.format.split(',')]
|
|
500
556
|
if 'all' in formats:
|
|
501
|
-
formats = ['toon', 'map', 'flow', 'context', 'code2logic', 'yaml', 'json', 'mermaid', 'evolution']
|
|
557
|
+
formats = ['toon', 'map', 'flow', 'context', 'code2logic', 'yaml', 'json', 'mermaid', 'evolution', 'project-yaml']
|
|
502
558
|
|
|
503
559
|
# Check if this is a chunked analysis (has subproject subdirs)
|
|
504
560
|
is_chunked = args.chunk if hasattr(args, 'chunk') else False
|
|
@@ -26,9 +26,9 @@ class SubProject:
|
|
|
26
26
|
@property
|
|
27
27
|
def estimated_size_kb(self) -> int:
|
|
28
28
|
"""Estimate output size based on file count."""
|
|
29
|
-
# Rough estimate: ~
|
|
29
|
+
# Rough estimate: ~1KB per file in TOON format
|
|
30
30
|
file_count = len(self.files)
|
|
31
|
-
return max(1, file_count *
|
|
31
|
+
return max(1, file_count * 1)
|
|
32
32
|
|
|
33
33
|
@property
|
|
34
34
|
def file_count(self) -> int:
|
|
@@ -25,6 +25,12 @@ from .map_exporter import MapExporter
|
|
|
25
25
|
from .flow_exporter import FlowExporter
|
|
26
26
|
from .evolution_exporter import EvolutionExporter
|
|
27
27
|
from .readme_exporter import READMEExporter
|
|
28
|
+
from .project_yaml_exporter import ProjectYAMLExporter
|
|
29
|
+
from .report_generators import (
|
|
30
|
+
ToonViewGenerator, ContextViewGenerator,
|
|
31
|
+
ArticleViewGenerator, HTMLDashboardGenerator,
|
|
32
|
+
load_project_yaml,
|
|
33
|
+
)
|
|
28
34
|
|
|
29
35
|
__all__ = [
|
|
30
36
|
'Exporter',
|
|
@@ -38,4 +44,10 @@ __all__ = [
|
|
|
38
44
|
'FlowExporter',
|
|
39
45
|
'EvolutionExporter',
|
|
40
46
|
'READMEExporter',
|
|
47
|
+
'ProjectYAMLExporter',
|
|
48
|
+
'ToonViewGenerator',
|
|
49
|
+
'ContextViewGenerator',
|
|
50
|
+
'ArticleViewGenerator',
|
|
51
|
+
'HTMLDashboardGenerator',
|
|
52
|
+
'load_project_yaml',
|
|
41
53
|
]
|