-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmap.toon.yaml
More file actions
1759 lines (1746 loc) · 90.5 KB
/
map.toon.yaml
File metadata and controls
1759 lines (1746 loc) · 90.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# code2llm | 427f 54060L | yaml:12,json:1,shell:4,md:44,python:348,txt:2,yml:3,php:2,typescript:1,conf:1,java:2,go:1,toml:2,rust:1,javascript:1,ruby:1 | 2026-05-25
# generated in 0.03s
# stats: 1312 func | 0 cls | 427 mod | CC̄=3.7 | critical:0 | cycles:0
# alerts[5]: fan-out analyze_rust=24; fan-out _analyze_go_regex=20; fan-out run_benchmark=18; fan-out NLPPipeline.process=17; fan-out _export_mermaid=17
# hotspots[5]: analyze_rust fan=24; _analyze_go_regex fan=20; run_benchmark fan=18; NLPPipeline.process fan=17; _export_mermaid fan=17
# evolution: CC̄ 3.9→3.7 (improved -0.2)
# Keys: M=modules, D=details, i=imports, e=exports, c=classes, f=functions, m=methods
M[427]:
code2llm/analysis/_data_impl.py,396
code2llm/analysis/call_graph.py,208
code2llm/analysis/cfg.py,285
code2llm/analysis/coupling.py,79
code2llm/analysis/data_analysis.py,176
code2llm/analysis/dfg.py,242
code2llm/analysis/pipeline_classifier.py,132
code2llm/analysis/pipeline_detector.py,355
code2llm/analysis/pipeline_resolver.py,92
code2llm/analysis/side_effects.py,365
code2llm/analysis/smells.py,250
code2llm/analysis/type_inference.py,304
code2llm/analysis/utils/__init__.py,17
code2llm/analysis/utils/ast_helpers.py,87
badges/server.py,132
benchmarks/benchmark_constants.py,29
benchmarks/benchmark_evolution.py,144
benchmarks/benchmark_format_quality.py,155
benchmarks/benchmark_optimizations.py,158
benchmarks/benchmark_performance.py,317
benchmarks/format_evaluator.py,173
benchmarks/project_generator.py,235
benchmarks/reporting.py,191
code2llm/cli_exports/code2logic.py,142
code2llm/cli_exports/formats.py,375
code2llm/cli_exports/orchestrator.py,404
code2llm/cli_exports/orchestrator_chunked.py,94
code2llm/cli_exports/orchestrator_constants.py,55
code2llm/cli_exports/orchestrator_handlers.py,184
code2llm/cli_exports/prompt.py,629
code2llm/__main__.py,6
code2llm/analysis/__init__.py,38
code2llm/analysis/_data_impl.py,396
code2llm/analysis/call_graph.py,208
code2llm/analysis/cfg.py,285
code2llm/analysis/coupling.py,79
code2llm/analysis/data_analysis.py,176
code2llm/analysis/dfg.py,242
code2llm/analysis/pipeline_classifier.py,132
code2llm/analysis/pipeline_detector.py,355
code2llm/analysis/pipeline_resolver.py,92
code2llm/analysis/side_effects.py,365
code2llm/analysis/smells.py,250
code2llm/analysis/type_inference.py,304
code2llm/analysis/utils/__init__.py,17
code2llm/analysis/utils/ast_helpers.py,87
code2llm/api.py,73
code2llm/cli.py,65
code2llm/cli_analysis.py,359
code2llm/cli_commands.py,335
code2llm/cli_exports/__init__.py,54
code2llm/cli_exports/code2logic.py,142
code2llm/cli_exports/formats.py,375
code2llm/cli_exports/orchestrator.py,404
code2llm/cli_exports/orchestrator_chunked.py,94
code2llm/cli_exports/orchestrator_constants.py,55
code2llm/cli_exports/orchestrator_handlers.py,184
code2llm/cli_exports/prompt.py,629
code2llm/cli_parser.py,354
code2llm/core/__init__.py,65
code2llm/core/analyzer.py,593
code2llm/core/ast_registry.py,102
code2llm/core/config.py,398
code2llm/core/export_pipeline.py,162
code2llm/core/file_analyzer.py,532
code2llm/core/file_cache.py,108
code2llm/core/file_filter.py,187
code2llm/core/gitignore.py,147
code2llm/core/incremental.py,150
code2llm/core/lang/__init__.py,171
code2llm/core/lang/_c_parser.py,416
code2llm/core/lang/_calls.py,96
code2llm/core/lang/_complexity.py,73
code2llm/core/lang/base.py,60
code2llm/core/lang/cpp.py,41
code2llm/core/lang/csharp.py,57
code2llm/core/lang/generic.py,71
code2llm/core/lang/go_lang.py,126
code2llm/core/lang/java.py,58
code2llm/core/lang/php.py,122
code2llm/core/lang/ruby.py,153
code2llm/core/lang/rust.py,116
code2llm/core/lang/ts_extractors.py,211
code2llm/core/lang/ts_parser.py,163
code2llm/core/lang/typescript.py,71
code2llm/core/large_repo.py,552
code2llm/core/models.py,207
code2llm/core/persistent_cache.py,462
code2llm/core/refactoring.py,233
code2llm/core/repo_files.py,215
code2llm/core/source_classifier.py,250
code2llm/core/streaming/__init__.py,7
code2llm/core/streaming/cache.py,52
code2llm/core/streaming/incremental.py,78
code2llm/core/streaming/prioritizer.py,133
code2llm/core/streaming/scanner.py,207
code2llm/core/streaming/strategies.py,69
code2llm/core/streaming_analyzer.py,163
code2llm/core/toon_size_manager.py,280
code2llm/exporters/__init__.py,86
code2llm/exporters/article_view.py,176
code2llm/exporters/base.py,174
code2llm/exporters/context_exporter.py,358
code2llm/exporters/context_view.py,154
code2llm/exporters/dashboard_data.py,208
code2llm/exporters/dashboard_renderer.py,356
code2llm/exporters/evolution/__init__.py,78
code2llm/exporters/evolution/computation.py,211
code2llm/exporters/evolution/constants.py,41
code2llm/exporters/evolution/exclusion.py,17
code2llm/exporters/evolution/render.py,195
code2llm/exporters/evolution/yaml_export.py,100
code2llm/exporters/evolution_exporter.py,81
code2llm/exporters/flow_constants.py,63
code2llm/exporters/flow_exporter.py,404
code2llm/exporters/flow_renderer.py,180
code2llm/exporters/html_dashboard.py,81
code2llm/exporters/index_generator/__init__.py,73
code2llm/exporters/index_generator/renderer.py,637
code2llm/exporters/index_generator/scanner.py,133
code2llm/exporters/json_exporter.py,27
code2llm/exporters/llm_exporter.py,12
code2llm/exporters/map/__init__.py,60
code2llm/exporters/map/alerts.py,84
code2llm/exporters/map/details.py,104
code2llm/exporters/map/header.py,81
code2llm/exporters/map/module_list.py,26
code2llm/exporters/map/utils.py,74
code2llm/exporters/map/yaml_export.py,121
code2llm/exporters/map_exporter.py,53
code2llm/exporters/mermaid/__init__.py,66
code2llm/exporters/mermaid/calls.py,70
code2llm/exporters/mermaid/classic.py,106
code2llm/exporters/mermaid/compact.py,52
code2llm/exporters/mermaid/flow_compact.py,180
code2llm/exporters/mermaid/flow_detailed.py,84
code2llm/exporters/mermaid/flow_full.py,84
code2llm/exporters/mermaid/utils.py,101
code2llm/exporters/mermaid_exporter.py,70
code2llm/exporters/mermaid_flow_helpers.py,295
code2llm/exporters/planfile_tickets.py,413
code2llm/exporters/project_yaml/__init__.py,15
code2llm/exporters/project_yaml/constants.py,15
code2llm/exporters/project_yaml/core.py,113
code2llm/exporters/project_yaml/evolution.py,46
code2llm/exporters/project_yaml/health.py,107
code2llm/exporters/project_yaml/hotspots.py,112
code2llm/exporters/project_yaml/modules.py,152
code2llm/exporters/project_yaml_exporter.py,15
code2llm/exporters/readme/__init__.py,40
code2llm/exporters/readme/content.py,348
code2llm/exporters/readme/files.py,26
code2llm/exporters/readme/insights.py,58
code2llm/exporters/readme/sections.py,93
code2llm/exporters/readme_exporter.py,80
code2llm/exporters/report_generators.py,87
code2llm/exporters/toon/__init__.py,241
code2llm/exporters/toon/_render_coupling_helpers.py,152
code2llm/exporters/toon/_render_section_helpers.py,191
code2llm/exporters/toon/constants.py,9
code2llm/exporters/toon/helpers.py,155
code2llm/exporters/toon/metrics.py,103
code2llm/exporters/toon/metrics_core.py,311
code2llm/exporters/toon/metrics_duplicates.py,97
code2llm/exporters/toon/metrics_health.py,123
code2llm/exporters/toon/module_detail.py,173
code2llm/exporters/toon/renderer.py,161
code2llm/exporters/toon_view.py,194
code2llm/exporters/validate_project.py,114
code2llm/exporters/yaml_exporter.py,456
code2llm/generators/__init__.py,15
code2llm/generators/_utils.py,15
code2llm/generators/llm_flow/__init__.py,98
code2llm/generators/llm_flow/analysis.py,184
code2llm/generators/llm_flow/cli.py,78
code2llm/generators/llm_flow/generator.py,121
code2llm/generators/llm_flow/nodes.py,107
code2llm/generators/llm_flow/parsing.py,39
code2llm/generators/llm_flow/utils.py,99
code2llm/generators/llm_task.py,391
code2llm/generators/mermaid/__init__.py,70
code2llm/generators/mermaid/fix.py,151
code2llm/generators/mermaid/png.py,329
code2llm/generators/mermaid/validation.py,137
code2llm/nlp/__init__.py,23
code2llm/nlp/config.yaml,86
code2llm/nlp/entity_resolution.py,314
code2llm/nlp/intent_matching.py,323
code2llm/nlp/normalization.py,123
code2llm/nlp/pipeline.py,397
code2llm/parsers/toon_parser.py,147
code2llm/patterns/detector.py,187
code2llm/refactor/__init__.py,0
code2llm/refactor/prompt_engine.py,184
code2llm/templates/extract_method.md,22
code2llm/templates/move_method.md,19
code2llm/core/analyzer.py,593
code2llm/core/ast_registry.py,102
code2llm/core/config.py,398
code2llm/core/export_pipeline.py,162
code2llm/core/file_analyzer.py,532
code2llm/core/file_cache.py,108
code2llm/core/file_filter.py,187
code2llm/core/gitignore.py,147
code2llm/core/incremental.py,150
code2llm/core/lang/__init__.py,171
code2llm/core/lang/_c_parser.py,416
code2llm/core/lang/_calls.py,96
code2llm/core/lang/_complexity.py,73
code2llm/core/lang/base.py,60
code2llm/core/lang/cpp.py,41
code2llm/core/lang/csharp.py,57
code2llm/core/lang/generic.py,71
code2llm/core/lang/go_lang.py,126
code2llm/core/lang/java.py,58
code2llm/core/lang/php.py,122
code2llm/core/lang/ruby.py,153
code2llm/core/lang/rust.py,116
code2llm/core/lang/ts_extractors.py,211
code2llm/core/lang/ts_parser.py,163
code2llm/core/lang/typescript.py,71
code2llm/core/large_repo.py,552
code2llm/core/models.py,207
code2llm/core/persistent_cache.py,462
code2llm/core/refactoring.py,233
code2llm/core/repo_files.py,215
code2llm/core/source_classifier.py,250
code2llm/core/streaming/__init__.py,7
code2llm/core/streaming/cache.py,52
code2llm/core/streaming/incremental.py,78
code2llm/core/streaming/prioritizer.py,133
code2llm/core/streaming/scanner.py,207
code2llm/core/streaming/strategies.py,69
code2llm/core/streaming_analyzer.py,163
code2llm/core/toon_size_manager.py,280
demo_langs/valid/sample.java,47
docs/API.md,396
docs/COMPARISON_AND_OPTIMIZATION.md,478
docs/LLM_USAGE.md,316
docs/METHODOLOGY.md,358
docs/PROJECT_SUMMARY.md,332
docs/README.md,1078
examples/basic-usage/README.md,138
examples/ci-cd/README.md,83
examples/claude-code/README.md,94
examples/devops-workflow/README.md,205
examples/docker-doql-example/ANALYSIS.md,116
examples/docker-doql-example/DEPENDENCY_ANALYSIS.md,97
examples/docker-doql-example/SUMMARY.md,281
examples/docker-doql-example/app/main.py,24
examples/docker-doql-example/docker-compose.yml,407
examples/docker-doql-example/fluent-bit.conf,13
examples/docker-doql-example/go/main.go,56
examples/docker-doql-example/java/Main.java,100
examples/docker-doql-example/node/index.js,37
examples/docker-doql-example/php/index.php,32
examples/docker-doql-example/prometheus.yml,24
examples/docker-doql-example/ruby/app.rb,44
examples/docker-doql-example/run-doql.sh,427
examples/docker-doql-example/rust/Cargo.toml,10
examples/docker-doql-example/rust/src/main.rs,47
examples/docker-doql-example/worker/requirements.txt,1
examples/docker-doql-example/worker/worker.py,31
examples/functional_refactoring/__init__.py,6
examples/functional_refactoring/cache.py,128
examples/functional_refactoring/cli.py,44
examples/functional_refactoring/entity_preparers.py,145
examples/functional_refactoring/generator.py,58
examples/functional_refactoring/models.py,28
examples/functional_refactoring/template_engine.py,108
examples/functional_refactoring_example.py,63
examples/litellm/README.md,32
examples/litellm/run.py,133
examples/shell-llm/README.md,114
examples/streaming-analyzer/README.md,223
examples/streaming-analyzer/demo.py,267
examples/streaming-analyzer/sample_project/__init__.py,1
examples/streaming-analyzer/sample_project/api.py,72
examples/streaming-analyzer/sample_project/auth.py,90
examples/streaming-analyzer/sample_project/database.py,154
examples/streaming-analyzer/sample_project/main.py,159
examples/streaming-analyzer/sample_project/utils.py,80
code2llm/exporters/article_view.py,176
code2llm/exporters/base.py,174
code2llm/exporters/context_exporter.py,358
code2llm/exporters/context_view.py,154
code2llm/exporters/dashboard_data.py,208
code2llm/exporters/dashboard_renderer.py,356
code2llm/exporters/evolution/__init__.py,78
code2llm/exporters/evolution/computation.py,211
code2llm/exporters/evolution/constants.py,41
code2llm/exporters/evolution/exclusion.py,17
code2llm/exporters/evolution/render.py,195
code2llm/exporters/evolution/yaml_export.py,100
code2llm/exporters/evolution_exporter.py,81
code2llm/exporters/flow_constants.py,63
code2llm/exporters/flow_exporter.py,404
code2llm/exporters/flow_renderer.py,180
code2llm/exporters/html_dashboard.py,81
code2llm/exporters/index_generator/__init__.py,73
code2llm/exporters/index_generator/renderer.py,637
code2llm/exporters/index_generator/scanner.py,133
code2llm/exporters/json_exporter.py,27
code2llm/exporters/llm_exporter.py,12
code2llm/exporters/map/__init__.py,60
code2llm/exporters/map/alerts.py,84
code2llm/exporters/map/details.py,104
code2llm/exporters/map/header.py,81
code2llm/exporters/map/module_list.py,26
code2llm/exporters/map/utils.py,74
code2llm/exporters/map/yaml_export.py,121
code2llm/exporters/map_exporter.py,53
code2llm/exporters/mermaid/__init__.py,66
code2llm/exporters/mermaid/calls.py,70
code2llm/exporters/mermaid/classic.py,106
code2llm/exporters/mermaid/compact.py,52
code2llm/exporters/mermaid/flow_compact.py,180
code2llm/exporters/mermaid/flow_detailed.py,84
code2llm/exporters/mermaid/flow_full.py,84
code2llm/exporters/mermaid/utils.py,101
code2llm/exporters/mermaid_exporter.py,70
code2llm/exporters/mermaid_flow_helpers.py,295
code2llm/exporters/planfile_tickets.py,413
code2llm/exporters/project_yaml/__init__.py,15
code2llm/exporters/project_yaml/constants.py,15
code2llm/exporters/project_yaml/core.py,113
code2llm/exporters/project_yaml/evolution.py,46
code2llm/exporters/project_yaml/health.py,107
code2llm/exporters/project_yaml/hotspots.py,112
code2llm/exporters/project_yaml/modules.py,152
code2llm/exporters/project_yaml_exporter.py,15
code2llm/exporters/readme/__init__.py,40
code2llm/exporters/readme/content.py,348
code2llm/exporters/readme/files.py,26
code2llm/exporters/readme/insights.py,58
code2llm/exporters/readme/sections.py,93
code2llm/exporters/readme_exporter.py,80
code2llm/exporters/report_generators.py,87
code2llm/exporters/toon/__init__.py,241
code2llm/exporters/toon/_render_coupling_helpers.py,152
code2llm/exporters/toon/_render_section_helpers.py,191
code2llm/exporters/toon/constants.py,9
code2llm/exporters/toon/helpers.py,155
code2llm/exporters/toon/metrics.py,103
code2llm/exporters/toon/metrics_core.py,311
code2llm/exporters/toon/metrics_duplicates.py,97
code2llm/exporters/toon/metrics_health.py,123
code2llm/exporters/toon/module_detail.py,173
code2llm/exporters/toon/renderer.py,161
code2llm/exporters/toon_view.py,194
code2llm/exporters/validate_project.py,114
code2llm/exporters/yaml_exporter.py,456
code2llm/generators/_utils.py,15
code2llm/generators/llm_flow/__init__.py,98
code2llm/generators/llm_flow/analysis.py,184
code2llm/generators/llm_flow/cli.py,78
code2llm/generators/llm_flow/generator.py,121
code2llm/generators/llm_flow/nodes.py,107
code2llm/generators/llm_flow/parsing.py,39
code2llm/generators/llm_flow/utils.py,99
code2llm/generators/llm_task.py,391
code2llm/generators/mermaid/__init__.py,70
code2llm/generators/mermaid/fix.py,151
code2llm/generators/mermaid/png.py,329
code2llm/generators/mermaid/validation.py,137
code2llm/nlp/config.yaml,86
code2llm/nlp/entity_resolution.py,314
code2llm/nlp/intent_matching.py,323
code2llm/nlp/normalization.py,123
code2llm/nlp/pipeline.py,397
code2llm/parsers/toon_parser.py,147
code2llm/patterns/detector.py,187
project_calls_test/context.md,51
redsl_refactor_plan.toon.yaml,18
redsl_refactor_report.toon.yaml,21
code2llm/refactor/prompt_engine.py,184
CHANGELOG.md,3195
Makefile,252
REFACTORING_PLAN.md,225
ROADMAP.md,332
TODO.md,317
Taskfile.yml,389
code2llm/__init__.py,59
deps.json,3198
goal.yaml,430
orchestrator.sh,82
pipeline.py,214
planfile.yaml,2077
prefact.yaml,82
project.sh,53
project2.sh,50
prompt_sumd_sumr_feature.md,176
pyproject.toml,132
pyqual.yaml,55
redsl.yaml,78
redsl_refactor_plan.md,25
redsl_refactor_report.md,39
regix.yaml,57
requirements.txt,9
setup.py,76
validate_toon.py,398
wup.yaml,127
scripts/benchmark_badges.py,393
scripts/bump_version.py,102
code2llm/templates/extract_method.md,22
code2llm/templates/move_method.md,19
test_dynamic/README.md,162
test_dynamic/batch_1/context.md,550
test_dynamic/context.md,294
test_dynamic/root/context.md,459
test_dynamic2/README.md,163
test_dynamic2/batch_1/context.md,459
test_dynamic2/context.md,294
test_dynamic2/root/context.md,459
test_langs/invalid/sample_bad.ts,20
test_langs/valid/sample.php,44
test_metrics/README.md,155
test_metrics/batch_1/context.md,459
test_metrics/context.md,294
test_metrics/root/context.md,459
test_prompt/README.md,163
test_prompt/batch_1/context.md,459
test_prompt/context.md,295
test_prompt/root/context.md,460
test_python_only/valid/__init__.py,1
test_python_only/valid/sample.py,41
testql-scenarios/generated-cli-tests.testql.toon.yaml,20
D:
benchmarks/benchmark_evolution.py:
e: parse_evolution_metrics,load_previous,save_current,run_benchmark
parse_evolution_metrics(toon_content)
load_previous(history_file)
save_current(history_file;metrics)
run_benchmark(project_path)
code2llm/analysis/pipeline_resolver.py:
e: PipelineResolver
PipelineResolver: resolve(3),_strip_self_prefix(1),_try_same_class_resolution(3),_get_suffix_candidates(2),_select_same_class_candidate(3) # Resolves callee names to qualified function names...
code2llm/core/file_analyzer.py:
e: FileAnalyzer,_analyze_single_file
FileAnalyzer: __init__(2),_route_to_language_analyzer(4),_cache_get(1),_cache_put(2),analyze_file(2),_analyze_python(3),_analyze_ast(4),_calculate_complexity(3),_perform_deep_analysis(4),_process_class(4),_extract_func_calls(1),_process_function(5),_build_cfg(4),_process_cfg_block(8),_process_if_stmt(8),_process_loop_stmt(7),_process_return_stmt(6),_get_base_name(1),_get_decorator_name(1),_get_call_name(1) # Analyzes a single file...
_analyze_single_file(args)
code2llm/core/persistent_cache.py:
e: PersistentCache,_pack,_unpack,get_all_projects,clear_all
PersistentCache: __init__(4),content_hash(1),get_file_result(1),put_file_result(2),get_changed_files(1),prune_missing(1),get_export_cache_dir(1),create_export_cache_dir(1),mark_export_complete(1),save(0),cache_size_mb(0),_cleanup_stale_exports(1),_cleanup_orphaned_files(2),auto_cleanup(1),gc(2),clear(0),_load_manifest(0),_compute_run_hash(1) # Content-addressed persistent cache stored in ~/.code2llm/.
...
_pack(obj)
_unpack(data)
get_all_projects(cache_root)
clear_all(cache_root)
code2llm/core/streaming/scanner.py:
e: StreamingScanner
StreamingScanner: __init__(2),_parse_tree(2),_scan_ast_nodes(3),quick_scan_file(1),deep_analyze_file(1),build_call_graph_streaming(1),select_important_files(2),collect_files(1) # Handles file scanning operations...
code2llm/core/lang/_complexity.py:
e: extract_function_body,calculate_complexity_regex
extract_function_body(content;start_line)
calculate_complexity_regex(content;result;lang)
code2llm/core/lang/go_lang.py:
e: _analyze_go_regex,analyze_go
_analyze_go_regex(content;file_path;module_name;stats)
analyze_go(content;file_path;module_name;ext;stats)
code2llm/nlp/pipeline.py:
e: NlpPipelineStage,NLPPipelineResult,NLPPipeline
NlpPipelineStage: # Single NLP pipeline stage result...
NLPPipelineResult: is_successful(0),get_intent(0),get_entities(0),to_dict(0) # Complete NLP pipeline result (4b-4e aggregation)...
NLPPipeline: __init__(1),process(2),_step_normalize(2),_step_match_intent(1),_step_resolve_entities(3),_infer_entity_types(1),_calculate_overall_confidence(1),_calculate_entity_confidence(1),_apply_fallback(1),_format_action(1),_format_response(1),step_4a_orchestrate(1),step_4b_aggregate(1),step_4c_confidence(1),step_4d_fallback(1),step_4e_format(1) # Main NLP processing pipeline (4a-4e)...
code2llm/exporters/context_exporter.py:
e: ContextExporter
ContextExporter(BaseExporter): export(2),_get_overview(1),_detect_languages(0),_get_architecture_by_module(1),_get_important_entries(1),_get_key_entry_points(1),_get_process_flows(2),_get_key_classes(1),_get_data_transformations(1),_get_behavioral_patterns(1),_get_api_surface(1),_get_system_interactions(1),_group_calls_by_module(2),_format_sub_flow(3),_trace_flow(5) # Export LLM-ready analysis summary with architecture and flow...
code2llm/exporters/flow_renderer.py:
e: FlowRenderer
FlowRenderer: render_header(0),render_pipelines(0),render_transforms(0),render_contracts(0),_render_hub_types(1),_count_type_sources(0),_render_type_rows(1),render_data_types(0),render_side_effects(0) # Renderer dla sekcji formatu flow.toon...
code2llm/exporters/flow_exporter.py:
e: FlowExporter
FlowExporter(BaseExporter): __init__(0),export(2),_build_context(1),_pipeline_to_dict(1),_compute_transforms(1),_transform_label(2),_compute_type_usage(2),_normalize_type(1),_type_label(3),_classify_side_effects(2),_compute_contracts(4),_build_stage_contract(4),_infer_invariant(2),_is_excluded(1) # Export to flow.toon — data-flow focused format.
Sections: P...
code2llm/exporters/toon/_render_section_helpers.py:
e: _detect_language_label,render_health_section,_build_refactor_steps,render_refactor_section,render_hotspots_section,render_classes_section,render_external_section,_trace_pipeline,_calculate_purity,render_pipelines_section
_detect_language_label(result)
render_health_section(ctx)
_build_refactor_steps(ctx)
render_refactor_section(ctx)
render_hotspots_section(ctx)
render_classes_section(ctx)
render_external_section(_ctx)
_trace_pipeline(start_func;result;depth)
_calculate_purity(chain;result)
render_pipelines_section(ctx)
code2llm/exporters/evolution/render.py:
e: render_header,render_next,render_risks,render_metrics_target,render_patterns,render_history
render_header(ctx)
render_next(ctx)
render_risks(ctx)
render_metrics_target(ctx)
render_patterns(ctx)
render_history(ctx;output_path)
code2llm/exporters/evolution/computation.py:
e: compute_func_data,_scan_from_result,_scan_from_filesystem,scan_file_sizes,aggregate_file_stats,make_relative_path,filter_god_modules,compute_god_modules,compute_hub_types,build_context
compute_func_data(result)
_scan_from_result(result)
_scan_from_filesystem(project_path)
scan_file_sizes(project_path;result)
aggregate_file_stats(result;file_lines)
make_relative_path(fpath;project_path)
filter_god_modules(file_stats;project_path)
compute_god_modules(result)
compute_hub_types(result)
build_context(result)
code2llm/generators/llm_flow/generator.py:
e: generate_llm_flow,render_llm_flow_md
generate_llm_flow(analysis;max_functions;limit_decisions;limit_calls)
render_llm_flow_md(flow)
code2llm/generators/mermaid/validation.py:
e: validate_mermaid_file,_strip_label_segments,_is_balanced_node_line,_check_bracket_balance,_scan_brackets,_check_single_node_line,_check_node_ids
validate_mermaid_file(mmd_path)
_strip_label_segments(s)
_is_balanced_node_line(line)
_check_bracket_balance(lines;errors)
_scan_brackets(text;line_num;bracket_stack;paren_stack;errors)
_check_single_node_line(line;line_num;node_pattern;errors)
_check_node_ids(lines;errors)
code2llm/cli_exports/orchestrator.py:
e: _build_export_config,_collect_dry_run_files,_show_dry_run_plan,_should_skip_export_cache,_try_serve_from_cache,_save_to_export_cache,_run_core_exports,_run_exports,_copy_cached_export,_touch_recursive,_copy_to_cache,_expand_all_formats,_export_single,_export_registry_formats,_with_planfile_apply_format,_get_format_kwargs,_export_chunked,_insert_after_first_line,_inject_generation_time
_build_export_config(args;formats)
_collect_dry_run_files(formats;output_dir)
_show_dry_run_plan(formats;output_dir;is_chunked;result)
_should_skip_export_cache(args;is_chunked)
_try_serve_from_cache(args;formats;output_dir;source_path)
_save_to_export_cache(args;formats;output_dir;source_path)
_run_core_exports(args;result;output_dir;source_path;formats;requested_formats;is_chunked;skip_cache)
_run_exports(args;result;output_dir;source_path)
_copy_cached_export(cached_dir;output_dir;verbose)
_touch_recursive(path)
_copy_to_cache(output_dir;cache_dir;verbose)
_expand_all_formats(requested;include_png)
_export_single(args;result;output_dir;formats;requested_formats;source_path)
_export_registry_formats(args;result;output_dir;formats)
_with_planfile_apply_format(args;formats)
_get_format_kwargs(fmt;args)
_export_chunked(args;result;output_dir;source_path;formats;requested_formats)
_insert_after_first_line(content;tag;pre;suf)
_inject_generation_time(filepath;elapsed)
code2llm/core/toon_size_manager.py:
e: get_file_size_kb,should_split_toon,split_toon_file,_parse_modules,_split_by_modules,_split_by_lines,_write_chunk,manage_toon_size
get_file_size_kb(filepath)
should_split_toon(filepath;max_kb)
split_toon_file(source_file;output_dir;max_kb;prefix)
_parse_modules(content)
_split_by_modules(source_file;output_dir;modules;max_kb;prefix)
_split_by_lines(source_file;output_dir;max_kb;prefix)
_write_chunk(output_dir;prefix;chunk_num;content)
manage_toon_size(source_file;output_dir;max_kb;prefix;verbose)
code2llm/core/lang/_c_parser.py:
e: _update_brace_tracking,_process_decorators,_process_classes,_process_standalone_function,_try_match_named_pattern,_match_method_name,_process_class_method,_process_functions,_clear_orphaned_decorators,_extract_declarations
_update_brace_tracking(raw_line;brace_depth;current_class;class_brace_depth;track_braces)
_process_decorators(decorator_re;line;pending_decorators)
_process_classes(class_re;interface_re;line;line_no;file_path;module_name;result;stats;current_class;class_brace_depth;pending_decorators)
_process_standalone_function(func_re;arrow_re;line;line_no;file_path;module_name;result;stats;pending_decorators;reserved)
_try_match_named_pattern(regex;line;reserved;extra_exclude)
_match_method_name(arrow_prop_re;method_re;func_re;line;reserved)
_process_class_method(method_re;arrow_prop_re;func_re;line;line_no;file_path;module_name;result;stats;current_class;pending_decorators;reserved)
_process_functions(func_re;arrow_re;method_re;arrow_prop_re;line;line_no;file_path;module_name;result;stats;current_class;pending_decorators;reserved)
_clear_orphaned_decorators(line;pending_decorators;func_re;arrow_re;class_re;interface_re;method_re)
_extract_declarations(content;file_path;module_name;patterns;stats;lang_config)
code2llm/core/analyzer.py:
e: ProjectAnalyzer
ProjectAnalyzer: __init__(2),analyze_project(1),_resolve_project_path(1),_log_cache_stats(3),_load_from_persistent_cache(2),_run_analysis(1),_store_to_persistent_cache(3),_build_stats(4),_print_summary(1),_post_process(4),_should_collect_file(3),_compute_module_name(2),_collect_files(1),_wrap_tqdm(3),_log_verbose_progress(2),_analyze_parallel(1),_analyze_sequential(1),_merge_results(2),_build_simple_name_map(1),_resolve_call(4),_collect_call_edges(2),_find_entry_points(1),_build_call_graph(1),analyze_files(2),_detect_patterns(1) # Main analyzer with parallel processing...
pipeline.py:
e: _detect_primary_language,run_pipeline
_detect_primary_language(project_dir)
run_pipeline(project_dir;output_dir)
code2llm/analysis/type_inference.py:
e: TypeInferenceEngine
TypeInferenceEngine: __init__(1),enrich_function(1),get_arg_types(1),get_return_type(1),get_typed_signature(1),extract_all_types(1),_extract_from_node(2),_extract_args(1),_annotation_to_str(1),_ann_constant(1),_ann_name(1),_ann_attribute(1),_ann_subscript(1),_ann_tuple(1),_ann_binop(1),_infer_from_name(1),_infer_arg_type(1) # Extract and infer type information from Python source files...
code2llm/analysis/call_graph.py:
e: CallGraphExtractor
CallGraphExtractor(ast.NodeVisitor): __init__(1),extract(3),_calculate_metrics(0),visit_Import(1),visit_ImportFrom(1),visit_ClassDef(1),visit_FunctionDef(1),visit_AsyncFunctionDef(1),visit_Call(1),_resolve_call(1),_resolve_with_astroid(1),_expr_to_str(1) # Extract call graph from AST...
code2llm/core/large_repo.py:
e: SubProject,HierarchicalRepoSplitter,should_use_chunking
SubProject: # Represents a sub-project within a larger repository...
HierarchicalRepoSplitter: __init__(2),get_analysis_plan(1),_split_hierarchically(1),_merge_small_l1_dirs(2),_split_level2_consolidated(3),_categorize_subdirs(2),_process_large_dirs(3),_process_level1_files(2),_merge_small_dirs(3),_chunk_by_files(5),_collect_files_in_dir(2),_collect_files_recursive(2),_collect_root_files(1),_count_py_files(1),_contains_python_files(1),_should_skip_file(1),_calculate_priority(2),_get_level1_dirs(1) # Splits large repositories using hierarchical approach.
Stra...
should_use_chunking(project_path;size_threshold_kb)
code2llm/core/source_classifier.py:
e: _relative_parts,_looks_like_generated_content,_has_code2llm_output_manifest,_is_generated_by_name,is_generated_artifact,classify_source_path,is_structural_only_file
_relative_parts(path;project_root)
_looks_like_generated_content(path)
_has_code2llm_output_manifest(path)
_is_generated_by_name(name;p)
is_generated_artifact(path;project_root)
classify_source_path(path;project_root)
is_structural_only_file(path)
code2llm/core/refactoring.py:
e: RefactoringAnalyzer
RefactoringAnalyzer: __init__(2),perform_refactoring_analysis(1),_build_call_graph(1),_calculate_centrality(2),_detect_cycles(2),_detect_communities(2),_analyze_coupling(1),_detect_smells(1),_detect_dead_code(1),_map_dead_code_to_items(2),_mark_reachable_items(1) # Performs refactoring analysis on code...
code2llm/core/file_filter.py:
e: FastFileFilter
FastFileFilter: __init__(2),should_skip_dir(1),_passes_gitignore(1),_passes_excludes(2),_passes_includes(1),should_process(1),_passes_line_count(1),_passes_visibility(3),should_skip_function(4) # Fast file filtering with pattern matching...
code2llm/core/streaming/prioritizer.py:
e: FilePriority,SmartPrioritizer
FilePriority: # Priority scoring for file analysis order...
SmartPrioritizer: __init__(1),prioritize_files(2),_build_import_graph(1),_check_has_main(1) # Smart file prioritization for optimal analysis order...
code2llm/core/lang/rust.py:
e: analyze_rust
analyze_rust(content;file_path;module_name;ext;stats)
code2llm/core/lang/ruby.py:
e: RubyParser,_is_ruby_end,_scan_ruby_body_lines,_extract_ruby_body,_adjust_ruby_module_qualnames,_track_ruby_module,_compute_ruby_cc,analyze_ruby
RubyParser: analyze(4) # Ruby language parser - registered via @register_language in ...
_is_ruby_end(line)
_scan_ruby_body_lines(lines;def_line_idx)
_extract_ruby_body(content;start_line)
_adjust_ruby_module_qualnames(result;module_name;current_module)
_track_ruby_module(lines)
_compute_ruby_cc(content;func_info)
analyze_ruby(content;file_path;module_name;_ext;stats)
code2llm/core/lang/_calls.py:
e: _resolve_call,extract_calls_regex
_resolve_call(simple_call;func_qname;module_name;known_simple;calls_seen;func_info)
extract_calls_regex(content;module_name;result)
code2llm/nlp/entity_resolution.py:
e: Entity,EntityResolutionResult,EntityResolver
Entity: # Resolved entity...
EntityResolutionResult: get_by_type(1),get_best_match(0) # Result of entity resolution...
EntityResolver: __init__(2),_apply_resolution_steps(2),resolve(3),_extract_candidates(2),_extract_from_patterns(2),_disambiguate(2),_resolve_hierarchical(1),_resolve_aliases(1),_name_similarity(2),load_from_analysis(1),step_3a_extract_entities(2),step_3b_match_threshold(1),step_3c_disambiguate(2),step_3d_hierarchical_resolve(1),step_3e_alias_resolve(1) # Resolve entities (functions, classes, etc.) from queries...
code2llm/exporters/toon/__init__.py:
e: ToonExporter
ToonExporter(BaseExporter): __init__(0),export(2),export_to_yaml(2),_build_header_dict(1),_build_health_dict(1),_build_refactor_dict(1),_build_pipelines_dict(1),_build_layers_dict(1),_build_coupling_dict(1),_build_external_dict(1),_is_excluded(1) # Export to toon v2 plain-text format — scannable, sorted by s...
code2llm/exporters/context_view.py:
e: ContextViewGenerator
ContextViewGenerator(ViewGeneratorMixin): _render(1),_render_overview(1),_render_architecture(0),_render_class_export_entry(1),_render_exports(0),_render_hotspots(0),_render_refactoring(0),_render_guidelines(-1) # Generate context.md from project.yaml data...
code2llm/exporters/validate_project.py:
e: _log_validation_result,validate_project_yaml,_check_required_keys,_cross_check_toon
_log_validation_result(verbose;issues)
validate_project_yaml(output_dir;verbose)
_check_required_keys(data)
_cross_check_toon(data;toon_path)
code2llm/exporters/toon/metrics_core.py:
e: CoreMetricsComputer
CoreMetricsComputer: __init__(2),_ensure_file_record(3),compute_file_metrics(1),_new_file_record(1),_build_suffix_index(0),_update_importers_from_called_by(3),_update_importers_from_calls(4),_compute_fan_in(1),compute_package_metrics(2),compute_function_metrics(1),compute_class_metrics(1),compute_coupling_matrix(1),_build_function_to_module_map(1),_build_coupling_matrix(2),_resolve_callee_module(4),_compute_package_fan(1) # Computes core structural and complexity metrics...
code2llm/exporters/project_yaml/modules.py:
e: build_modules,group_by_file,compute_module_entry,compute_inbound_deps,build_exports,_build_notable_method_entry,build_class_export,build_function_exports
build_modules(result;line_counts)
group_by_file(result)
compute_module_entry(fpath;result;line_counts;file_funcs;file_classes)
compute_inbound_deps(funcs;fpath;result)
build_exports(funcs;classes;result)
_build_notable_method_entry(mf)
build_class_export(ci;result)
build_function_exports(funcs;classes)
code2llm/exporters/project_yaml/core.py:
e: ProjectYAMLExporter
ProjectYAMLExporter(BaseExporter): export(2),_build_project_stats(2),_build_project_yaml(2),_detect_primary_language(1) # Export unified project.yaml — single source of truth for dia...
code2llm/exporters/mermaid/flow_compact.py:
e: should_skip_module,_get_called_funcs,is_entry_point,build_callers_graph,find_leaves,_longest_path_dfs,_select_longest_path,find_critical_path,export_flow_compact
should_skip_module(module;include_examples)
_get_called_funcs(result)
is_entry_point(func_name;fi;result)
build_callers_graph(result;name_index)
find_leaves(result;name_index)
_longest_path_dfs(result;start;visited;name_index)
_select_longest_path(result;entry_points;name_index)
find_critical_path(result;entry_points)
export_flow_compact(result;output_path;include_examples)
code2llm/generators/llm_task.py:
e: _strip_bom,_ensure_list,_deep_get,_sec,_sget,normalize_llm_task,_parse_bullets,_parse_sections,_create_empty_task_data,_apply_simple_sections,_apply_bullet_sections,_parse_acceptance_tests,parse_llm_task_text,_load_yaml,_load_json,load_input,create_parser,main
_strip_bom(text)
_ensure_list(value)
_deep_get(d;path)
_sec(data;key)
_sget(d;key;default)
normalize_llm_task(data)
_parse_bullets(lines)
_parse_sections(lines)
_create_empty_task_data()
_apply_simple_sections(sections;data)
_apply_bullet_sections(sections;data)
_parse_acceptance_tests(sections)
parse_llm_task_text(text)
_load_yaml(raw;path)
_load_json(raw;_path)
load_input(path)
create_parser()
main(argv)
code2llm/cli_exports/orchestrator_chunked.py:
e: _export_chunked,_get_filtered_subprojects,_process_subproject
_export_chunked(args;result;output_dir;source_path;formats;requested_formats)
_get_filtered_subprojects(args;source_path)
_process_subproject(args;sp;output_dir)
code2llm/patterns/detector.py:
e: PatternDetector
PatternDetector: __init__(1),detect_patterns(1),_detect_recursion(1),_detect_state_machines(1),_detect_factory_pattern(1),_detect_singleton(1),_detect_strategy_pattern(1),_check_returns_classes(2) # Detect behavioral patterns in code...
code2llm/analysis/_data_impl.py:
e: _find_data_pipelines,_is_state_func,_state_affected_by,_find_state_patterns,_find_data_dependencies,_is_event_func,_event_handlers,_find_event_flows,_detect_types_from_name,_create_type_entry,_update_type_stats,_infer_parameter_types,_infer_return_types,_analyze_data_types,_get_function_data_types,_build_data_flow_graph,_identify_process_patterns,_type_consolidations,_process_consolidations,_hub_optimizations,_analyze_optimization_opportunities
_find_data_pipelines(result;categorize_fn;make_stage_fn;max_pipelines)
_is_state_func(name_lower)
_state_affected_by(func;functions)
_find_state_patterns(result)
_find_data_dependencies(result)
_is_event_func(name_lower)
_event_handlers(func;functions)
_find_event_flows(result)
_detect_types_from_name(func_name;doc)
_create_type_entry(type_key;detected;params;returns)
_update_type_stats(entry;func_name;func_module;calls)
_infer_parameter_types(func)
_infer_return_types(func)
_analyze_data_types(result)
_get_function_data_types(func)
_build_data_flow_graph(result)
_identify_process_patterns(result)
_type_consolidations(data_types)
_process_consolidations(result)
_hub_optimizations(dfg)
_analyze_optimization_opportunities(result;data_types;dfg)
code2llm/cli_exports/prompt.py:
e: _export_prompt_txt,_export_chunked_prompt_txt,_get_prompt_paths,_build_prompt_header,_find_existing_prompt_file,_build_prompt_file_lines,_build_main_files_section,_build_optional_files_section,_format_size,_get_missing_files,_build_subprojects_section,_build_missing_files_section,_probe_output_files,_analyze_generated_files,_build_dynamic_focus_areas,_build_dynamic_tasks,_build_priority_order,_build_strategy_section,_build_prompt_footer
_export_prompt_txt(args;output_dir;formats;source_path)
_export_chunked_prompt_txt(args;output_dir;formats;source_path;subprojects)
_get_prompt_paths(source_path;output_dir)
_build_prompt_header(project_path)
_find_existing_prompt_file(output_dir;candidates)
_build_prompt_file_lines(output_dir;output_rel_path;files)
_build_main_files_section(output_dir;output_rel_path)
_build_optional_files_section(output_dir;output_rel_path)
_format_size(size_bytes)
_get_missing_files(output_dir)
_build_subprojects_section(subprojects;output_dir;output_rel_path)
_build_missing_files_section(output_dir;output_rel_path)
_probe_output_files(output_dir)
_analyze_generated_files(output_dir;subprojects)
_build_dynamic_focus_areas(file_analysis)
_build_dynamic_tasks(file_analysis)
_build_priority_order(file_analysis)
_build_strategy_section(file_analysis)
_build_prompt_footer(chunked;file_analysis)
code2llm/analysis/pipeline_classifier.py:
e: PipelineClassifier
PipelineClassifier: __init__(1),classify_domain(2),derive_pipeline_name(3),get_entry_type(1),get_exit_type(1) # Classify pipelines by domain and derive human-readable names...
code2llm/analysis/side_effects.py:
e: SideEffectInfo,SideEffectDetector
SideEffectInfo: __init__(2),to_dict(0) # Side-effect analysis result for a single function...
SideEffectDetector: analyze_function(1),analyze_all(1),get_purity_score(1),_scan_node(2),_check_io_call(3),_check_cache_call(2),_check_calls(2),_check_assignments(2),_check_globals(2),_check_yield(2),_check_delete(2),_classify(1),_heuristic_classify(2),_get_call_name(1) # Detect side effects in Python functions via AST analysis.
S...
code2llm/analysis/utils/ast_helpers.py:
e: get_ast,find_function_node,ast_unparse,qualified_name,expr_to_str
get_ast(filepath;registry)
find_function_node(tree;name;line)
ast_unparse(node;default_none)
qualified_name(module_name;class_stack;name)
expr_to_str(node)
code2llm/core/repo_files.py:
e: _get_gitignore_parser,should_skip_file,collect_files_in_dir,collect_root_files,count_py_files,contains_python_files,get_level1_dirs,calculate_priority
_get_gitignore_parser(project_path)
should_skip_file(file_str;project_path;gitignore_parser)
collect_files_in_dir(dir_path;project_path)
collect_root_files(project_path)
count_py_files(path)
contains_python_files(dir_path)
get_level1_dirs(project_path)
calculate_priority(name;level)
code2llm/core/models.py:
e: BaseModel,FlowNode,FlowEdge,FunctionInfo,ClassInfo,ModuleInfo,Pattern,CodeSmell,Mutation,DataFlow,AnalysisResult
BaseModel: to_dict(1),_filter_compact(1) # Base class for models with automated serialization...
FlowNode(BaseModel): # Represents a node in the control flow graph...
FlowEdge(BaseModel): # Represents an edge in the control flow graph...
FunctionInfo(BaseModel): # Information about a function/method...
ClassInfo(BaseModel): # Information about a class...
ModuleInfo(BaseModel): # Information about a module/package...
Pattern(BaseModel): # Detected behavioral pattern...
CodeSmell(BaseModel): # Represents a detected code smell...
Mutation(BaseModel): # Represents a mutation of a variable/object...
DataFlow(BaseModel): # Represents data flow for a variable...
AnalysisResult(BaseModel): get_function_count(0),get_class_count(0),get_node_count(0),get_edge_count(0) # Complete analysis result for a project...
code2llm/core/lang/php.py:
e: _parse_php_metadata,_adjust_qualified_names,_extract_php_traits,analyze_php
_parse_php_metadata(content;module_name;result)
_adjust_qualified_names(result;module_name;namespace)
_extract_php_traits(content;file_path;module_name;namespace;result;stats)
analyze_php(content;file_path;module_name;ext;stats)
code2llm/exporters/mermaid_flow_helpers.py:
e: _filtered_functions,_entry_points,_group_functions_by_module,_classify_architecture_module,_group_architecture_functions,_select_key_functions,_append_flow_node,_render_module_subgraphs,_resolve_callee,_add_edge_if_new,_render_flow_edges,_append_entry_styles,_render_flow_styles,_render_architecture_view
_filtered_functions(result;module_of;should_skip_module;include_examples)
_entry_points(filtered_funcs;result;is_entry_point)
_group_functions_by_module(funcs;module_of)
_classify_architecture_module(func_name;module)
_group_architecture_functions(funcs;module_of)
_select_key_functions(func_names;funcs;entry_points;critical_path;get_cc;threshold)
_append_flow_node(lines;func_name;fi;short_len;entry_points;readable_id;get_cc;high_threshold;med_threshold)
_render_module_subgraphs(lines;modules;entry_points;short_len;readable_id;safe_module;get_cc;sort_funcs;max_funcs;high_threshold;med_threshold)
_resolve_callee(callee;funcs;resolve;name_index)
_add_edge_if_new(src;dst;seen_edges;lines;limit)
_render_flow_edges(lines;funcs;readable_id;resolve;calls_per_function;limit;name_index)
_append_entry_styles(lines;entry_points;readable_id;entry_limit)
_render_flow_styles(lines;funcs;entry_points;readable_id;get_cc;high_threshold;med_threshold;high_limit;med_limit;entry_limit)
_render_architecture_view(lines;filtered_funcs;entry_points;critical_path;module_of;readable_id;get_cc)
code2llm/exporters/planfile_tickets.py:
e: PlanfileTicketSuggestion,PlanfileTicketsExporter,collect_planfile_tickets,apply_planfile_tickets,_high_cc_tickets,_god_module_tickets,_duplicate_class_tickets,_smell_tickets,_function_cc,_method_names,_rel_path,_project_root,_description_with_dedupe,_default_runner,_parse_ticket_title,_existing_planfile_titles
PlanfileTicketSuggestion: to_dict(0) # One planfile-ready ticket derived from code2llm analysis...
PlanfileTicketsExporter(BaseExporter): export(2) # Export code2llm findings as planfile-ready tickets...
collect_planfile_tickets(result)
apply_planfile_tickets(suggestions)
_high_cc_tickets(result)
_god_module_tickets(result)
_duplicate_class_tickets(result)
_smell_tickets(result)
_function_cc(func)
_method_names(cls)
_rel_path(path;project_path)
_project_root(result;override)
_description_with_dedupe(suggestion)
_default_runner(cmd;cwd)
_parse_ticket_title(entry)
_existing_planfile_titles(project_root)
code2llm/exporters/toon/metrics_duplicates.py:
e: DuplicatesMetricsComputer
DuplicatesMetricsComputer: __init__(1),detect_duplicates(1),_check_class_for_duplicates(5),_calculate_duplicate_info(7) # Detects duplicate classes in the codebase...
code2llm/exporters/evolution/yaml_export.py:
e: _build_refactoring_actions,_build_risks,export_to_yaml
_build_refactoring_actions(ctx)
_build_risks(ctx)
export_to_yaml(result;output_path)
code2llm/exporters/map/alerts.py:
e: build_alerts,build_hotspots,load_evolution_trend,_read_previous_cc_avg
build_alerts(funcs)
build_hotspots(funcs)
load_evolution_trend(evolution_path;current_cc)
_read_previous_cc_avg(evolution_path)
code2llm/exporters/map/details.py:
e: render_details,_rank_modules,_collect_module_exports,_render_map_module,_render_map_class,_function_signature
render_details(result;is_excluded_path)
_rank_modules(result;is_excluded_path)
_collect_module_exports(result;mi)
_render_map_module(result;mi;lines;is_excluded_path)
_render_map_class(result;ci;lines)
_function_signature(fi)
code2llm/exporters/map/utils.py:
e: rel_path,file_line_count,count_total_lines,detect_languages
rel_path(fpath;project_path)
file_line_count(fpath)
count_total_lines(result;is_excluded_path)
detect_languages(result;is_excluded_path)
code2llm/exporters/mermaid/classic.py:
e: export_classic,_render_subgraphs,_render_edges,_render_cc_styles
export_classic(result;output_path)
_render_subgraphs(result;lines)
_render_edges(result;lines;name_index;limit)
_render_cc_styles(result;lines)
code2llm/generators/llm_flow/analysis.py:
e: FuncSummary,_node_counts_by_function,_pick_relevant_functions,_classify_node_into,_collect_node_data,_summarize_functions,_build_call_graph,_reachable
FuncSummary: # Immutable summary of a single function's decisions and outgo...
_node_counts_by_function(nodes)
_pick_relevant_functions()
_classify_node_into(n;fn;decisions_by_func;calls_by_func)
_collect_node_data(nodes)
_summarize_functions(nodes;limit_decisions;limit_calls)
_build_call_graph(func_summaries;known_functions)
_reachable(g;roots;max_nodes)
code2llm/generators/mermaid/fix.py:
e: _sanitize_label_text,_sanitize_node_id,fix_mermaid_file,_fix_edge_line,_fix_edge_label_pipes,_fix_subgraph_line,_fix_class_line
_sanitize_label_text(txt)
_sanitize_node_id(node_id)
fix_mermaid_file(mmd_path)
_fix_edge_line(line)
_fix_edge_label_pipes(line)
_fix_subgraph_line(line)
_fix_class_line(line)
code2llm/exporters/toon/helpers.py:
e: _is_excluded,_rel_path,_package_of,_package_of_module,_traits_from_cfg,_dup_file_set,_hotspot_description,_fast_line_counts,_slow_line_counts,_scan_line_counts,_walk_compat
_is_excluded(path)
_rel_path(fpath;project_path)
_package_of(rel_path)
_package_of_module(module_name)
_traits_from_cfg(fi;result)
_dup_file_set(ctx)
_hotspot_description(fi;fan_out)
_fast_line_counts(pp;result)
_slow_line_counts(pp)
_scan_line_counts(project_path;result)
_walk_compat(path)
code2llm/exporters/map/header.py:
e: render_header,_render_stats_line,_render_alerts_line,_render_hotspots_line
render_header(result;output_path;is_excluded_path)
_render_stats_line(funcs;files;total_lines;lang_str)
_render_alerts_line(funcs)
_render_hotspots_line(funcs)
code2llm/analysis/data_analysis.py:
e: DataAnalyzer,DataFlowAnalyzer,OptimizationAdvisor,_categorize_functions,_make_stage
DataAnalyzer: analyze_data_flow(1),analyze_data_structures(1) # Analyze data flows, structures, and optimization opportuniti...
DataFlowAnalyzer: analyze(1),find_data_pipelines(1),find_state_patterns(1),find_data_dependencies(1),find_event_flows(1) # Analyze data flows: pipelines, state patterns, dependencies,...
OptimizationAdvisor: analyze_data_types(1),build_data_flow_graph(1),identify_process_patterns(1),analyze_optimization_opportunities(3) # Analyze optimization opportunities: data types and process p...
_categorize_functions(result)
_make_stage(label;func_name;func)
code2llm/exporters/map/yaml_export.py:
e: export_to_yaml,_build_module_entry,_build_module_exports,_build_module_classes_data,_build_module_functions_data
export_to_yaml(result;output_path;is_excluded_path)
_build_module_entry(mi;result;is_excluded_path)
_build_module_exports(mi;result)
_build_module_classes_data(mi;result)
_build_module_functions_data(mi;result)
code2llm/generators/mermaid/png.py:
e: _is_png_fresh,_prepare_and_render,generate_pngs,_setup_puppeteer_config,_build_renderers,_run_mmdc_subprocess,generate_single_png,generate_with_puppeteer
_is_png_fresh(mmd_file;output_dir)
_prepare_and_render(mmd_file;output_dir;timeout)
generate_pngs(input_dir;output_dir;timeout;max_workers)
_setup_puppeteer_config()
_build_renderers(mmd_file;output_file;cfg_path;puppeteer_cfg_path)
_run_mmdc_subprocess(renderers;mmd_file;output_file;timeout;max_text_size;max_edges)
generate_single_png(mmd_file;output_file;timeout)
generate_with_puppeteer(mmd_file;output_file;timeout;max_text_size;max_edges)
code2llm/parsers/toon_parser.py:
e: _parse_header_line,_parse_stats_line,_parse_health_line,_parse_functions_line,_parse_classes_line,_parse_hotspots_line,_detect_section,parse_toon_content,is_toon_file,load_toon
_parse_header_line(line;data)
_parse_stats_line(line;data)
_parse_health_line(line_stripped;data)
_parse_functions_line(line_stripped;data)
_parse_classes_line(line_stripped;data)
_parse_hotspots_line(line_stripped;data)
_detect_section(line)
parse_toon_content(content)
is_toon_file(filepath)
load_toon(filepath)
code2llm/cli_exports/formats.py:
e: _export_evolution,_export_data_structures,_export_context_fallback,_export_readme,_export_project_yaml,_export_project_toon,_run_report,_export_simple_formats,_export_yaml,_export_project_yaml_bundle,_try_subprocess_png_fallback,_export_mermaid_pngs,_export_calls_format,_export_calls,_export_calls_toon,_export_mermaid,_export_refactor_prompts,_export_index_html
_export_evolution(args;result;output_dir)
_export_data_structures(args;result;output_dir)
_export_context_fallback(args;result;output_dir;formats)
_export_readme(args;result;output_dir)
_export_project_yaml(args;result;output_dir)
_export_project_toon(args;result;output_dir)
_run_report(args;project_yaml_path;output_dir)
_export_simple_formats(args;result;output_dir;formats)
_export_yaml(args;result;output_dir)
_export_project_yaml_bundle(args;result;output_dir)
_try_subprocess_png_fallback(output_dir;verbose)
_export_mermaid_pngs(args;output_dir)
_export_calls_format(args;result;output_dir;toon)
_export_calls(args;result;output_dir)
_export_calls_toon(args;result;output_dir)
_export_mermaid(args;result;output_dir)
_export_refactor_prompts(args;result;output_dir)
_export_index_html(args;output_dir)
code2llm/core/streaming_analyzer.py:
e: StreamingAnalyzer
StreamingAnalyzer: __init__(2),set_progress_callback(1),cancel(0),_phase_quick_scan(4),_phase_deep_scan(2),analyze_streaming(2),_estimate_eta(3),_report_progress(4) # Memory-efficient streaming analyzer with progress tracking...
code2llm/exporters/yaml_exporter.py:
e: YAMLExporter
YAMLExporter(BaseExporter): __init__(0),_get_name_index(1),export(4),export_grouped(2),export_data_flow(3),export_data_structures(3),export_separated(3),export_split(3),export_calls(4),_collect_edges(3),_process_function_calls(8),_should_add_edge(2),_create_edge(2),_build_nodes(2),_create_node(3),_compute_calls_in_counts(1),_group_by_module(1),_build_calls_data(4),_resolve_callee(2),_get_cc(0),export_calls_toon(4),_render_calls_header(4),_render_hubs(1),_render_modules(3),_render_edges(1) # Export to YAML format...
code2llm/analysis/pipeline_detector.py:
e: PipelineStage,Pipeline,PipelineDetector
PipelineStage: # A single stage in a detected pipeline...
Pipeline: to_dict(0) # A detected pipeline with stages, purity info, and domain...
PipelineDetector: __init__(2),detect(2),_build_graph(1),_process_components(3),_find_pipeline_paths(1),_longest_path_from(3),_longest_path_in_dag(1),_build_pipelines(3),_build_stages(3) # Detect pipelines in a codebase using networkx graph analysis...
validate_toon.py:
e: load_yaml,load_file,extract_functions_from_yaml,_extract_names_from_toon,extract_functions_from_toon,_extract_keys_from_yaml,extract_classes_from_yaml,extract_classes_from_toon,analyze_class_differences,extract_modules_from_yaml,extract_modules_from_toon,compare_basic_stats,compare_functions,compare_classes,compare_modules,validate_toon_completeness,_run_single_file_mode,_run_comparison_mode,_compare_all_aspects,_print_comparison_summary,main
load_yaml(filepath)
load_file(filepath)
extract_functions_from_yaml(yaml_data)
_extract_names_from_toon(toon_data;key)
extract_functions_from_toon(toon_data)
_extract_keys_from_yaml(yaml_data;key)
extract_classes_from_yaml(yaml_data)
extract_classes_from_toon(toon_data)
analyze_class_differences(yaml_data;toon_data)
extract_modules_from_yaml(yaml_data)
extract_modules_from_toon(toon_data)
compare_basic_stats(yaml_data;toon_data)
compare_functions(yaml_data;toon_data)
compare_classes(yaml_data;toon_data)
compare_modules(yaml_data;toon_data)
validate_toon_completeness(toon_data)
_run_single_file_mode(file_path)
_run_comparison_mode(yaml_path;toon_path)
_compare_all_aspects(yaml_data;toon_data)
_print_comparison_summary(results)
main()
examples/streaming-analyzer/sample_project/utils.py:
e: validate_input,format_output,calculate_metrics,filter_data,transform_data
validate_input(data)
format_output(data)
calculate_metrics(data)
filter_data(data;criteria)
transform_data(data;transformations)
benchmarks/benchmark_optimizations.py:
e: clear_caches,run_analysis,benchmark_cold_vs_warm,print_summary,main
clear_caches(project_path)
run_analysis(project_path;config)
benchmark_cold_vs_warm(project_path;runs)
print_summary(results)
main()