GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - semcod/code2llm: High-performance Python code flow analysis with optimized TOON format - CFG, DFG, call graphs, and intelligent code queries

BranchesTags
Open more actions menu

Latest commit

 

History

361 Commits
361 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.governance
.governance
 
 
.intent-koru-verify
.intent-koru-verify
 
 
.intent/cache/v1/ast-typescript-v1
.intent/cache/v1/ast-typescript-v1
 
 
.koru
.koru
 
 
.nlp2dsl
.nlp2dsl
 
 
.planfile
.planfile
 
 
.pyqual
.pyqual
 
 
badges
badges
 
 
batch_1
batch_1
 
 
benchmarks
benchmarks
 
 
calls_output
calls_output
 
 
code2llm
code2llm
 
 
code2llm_part2
code2llm_part2
 
 
demo_langs
demo_langs
 
 
docs
docs
 
 
examples
examples
 
 
packages
packages
 
 
project
project
 
 
project_calls_test
project_calls_test
 
 
root
root
 
 
scripts
scripts
 
 
test_dynamic
test_dynamic
 
 
test_dynamic2
test_dynamic2
 
 
test_langs
test_langs
 
 
test_metrics
test_metrics
 
 
test_prompt
test_prompt
 
 
test_python_only
test_python_only
 
 
test_python_only_examples_tests
test_python_only_examples_tests
 
 
testql-scenarios
testql-scenarios
 
 
tests
tests
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
.nojekyll
.nojekyll
 
 
AGENTS.md
AGENTS.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CLAUDE.md
CLAUDE.md
 
 
GEMINI.md
GEMINI.md
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
REFACTORING_PLAN.md
REFACTORING_PLAN.md
 
 
ROADMAP.md
ROADMAP.md
 
 
SUMD.md
SUMD.md
 
 
SUMR.md
SUMR.md
 
 
TICKET
TICKET
 
 
TODO.md
TODO.md
 
 
Taskfile.yml
Taskfile.yml
 
 
VERSION
VERSION
 
 
analysis.toon.yaml
analysis.toon.yaml
 
 
app.doql.less
app.doql.less
 
 
calls.mmd
calls.mmd
 
 
calls.yaml
calls.yaml
 
 
context.md
context.md
 
 
deps.json
deps.json
 
 
evolution.toon.yaml
evolution.toon.yaml
 
 
goal.yaml
goal.yaml
 
 
img.png
img.png
 
 
img_1.png
img_1.png
 
 
img_2.png
img_2.png
 
 
img_3.png
img_3.png
 
 
index.html
index.html
 
 
koru.yaml
koru.yaml
 
 
local.dev.txt
local.dev.txt
 
 
map.toon.yaml
map.toon.yaml
 
 
orchestrator.sh
orchestrator.sh
 
 
pipeline.py
pipeline.py
 
 
planfile.yaml
planfile.yaml
 
 
prefact.yaml
prefact.yaml
 
 
project.sh
project.sh
 
 
project2.sh
project2.sh
 
 
project_yaml_exporter
project_yaml_exporter
 
 
prompt_sumd_sumr_feature.md
prompt_sumd_sumr_feature.md
 
 
pyproject.toml
pyproject.toml
 
 
pyqual.yaml
pyqual.yaml
 
 
redsl.yaml
redsl.yaml
 
 
redsl_refactor_plan.md
redsl_refactor_plan.md
 
 
redsl_refactor_plan.toon.yaml
redsl_refactor_plan.toon.yaml
 
 
redsl_refactor_report.md
redsl_refactor_report.md
 
 
redsl_refactor_report.toon.yaml
redsl_refactor_report.toon.yaml
 
 
regix.yaml
regix.yaml
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 
uv.lock
uv.lock
 
 
validate_toon
validate_toon
 
 
validate_toon.py
validate_toon.py
 
 
wup.yaml
wup.yaml
 
 

Repository files navigation

code2llm - Generated Analysis Files

AI Cost Tracking

PyPI Version Python License AI Cost Human Time Model

  • πŸ€– LLM usage: $0.5710 (336 commits)
  • πŸ‘€ Human dev: ~$14034 (140.3h @ $100/h, 30min dedup)

Generated on 2026-10-18 using openrouter/deep/deep-v4-pro


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. # noqa: E501

πŸ“ Generated Files Overview

When you run code2llm ./ -f all, the following files are created:

🎯 Core Analysis Files

File Format Purpose Key Insights
evolution.toon.yaml YAML πŸ“‹ Refactoring queue - Prioritized improvements 0 refactoring actions needed
map.toon.yaml YAML πŸ—ΊοΈ Structural map + project header - Modules, imports, exports, signatures, stats, alerts, hotspots, trend Project architecture overview
projections.json JSON πŸ”Ž Bounded symbol catalog (code2llm.projection/v1) for intent retrieval / external indexers β€” deterministic, digested, capped at 2048 records Reuse contract without analyzer internals

πŸ€– LLM-Ready Documentation

File Format Purpose Use Case
context.md Markdown πŸ“– LLM narrative - Architecture summary Paste into ChatGPT/Claude for code analysis

πŸ“Š Visualizations

File Format Purpose Description
calls.mmd Mermaid πŸ“ž Call graph Function dependencies (edges only)

πŸš€ Quick Start Commands

Basic Analysis

# Quick health check (TOON format only)
code2llm ./ -f toon

# Generate all formats (what created these files)
code2llm ./ -f all

# LLM-ready context only
code2llm ./ -f context

Performance Options

# Fast analysis for large projects
code2llm ./ -f toon --strategy quick

# Memory-limited analysis
code2llm ./ -f all --max-memory 500

# Skip PNG generation (faster)
code2llm ./ -f all --no-png

Refactoring Focus

# Get refactoring recommendations
code2llm ./ -f evolution

# Focus on specific code smells
code2llm ./ -f toon --refactor --smell god_function

# Data flow analysis
code2llm ./ -f flow --data-flow

πŸ“– Understanding Each File

analysis.toon - Health Diagnostics

Purpose: Quick overview of code health issues Key sections:

  • HEALTH: Critical issues (πŸ”΄) and warnings (🟑)
  • REFACTOR: Prioritized refactoring actions
  • COUPLING: Module dependencies and potential cycles
  • LAYERS: Package complexity metrics
  • FUNCTIONS: High-complexity functions (CC β‰₯ 10)
  • CLASSES: Complex classes needing attention

Example usage:

# View health issues
cat analysis.toon | head -30

# Check refactoring priorities
grep "REFACTOR" analysis.toon

evolution.toon.yaml - Refactoring Queue

Purpose: Step-by-step refactoring plan Key sections:

  • NEXT: Immediate actions to take
  • RISKS: Potential breaking changes
  • METRICS-TARGET: Success criteria

Example usage:

# Get refactoring plan
cat evolution.toon.yaml

# Track progress
grep "NEXT" evolution.toon.yaml

flow.toon - Legacy Data Flow Analysis

Purpose: Understand data movement through the system (legacy / explicit opt-in) Key sections:

  • PIPELINES: Data processing chains
  • CONTRACTS: Function input/output contracts
  • SIDE_EFFECTS: Functions with external impacts

Example usage:

# Find data pipelines
grep "PIPELINES" flow.toon

# Identify side effects
grep "SIDE_EFFECTS" flow.toon

map.toon.yaml - Structural Map + Project Header

Purpose: High-level architecture overview plus compact project header Key sections:

  • MODULES: All modules with basic stats
  • IMPORTS: Dependency relationships
  • EXPORTS: Public API surface and signatures
  • HEADER: Stats, alerts, hotspots, evolution trend

Example usage:

# See project structure
cat map.toon.yaml | head -50

# Find public APIs
grep "SIGNATURES" map.toon.yaml

project.toon.yaml - Compact Analysis View

Purpose: Compact module view generated from project.yaml data Status: Legacy view generated on demand from unified project.yaml

Example usage:

# View compact project structure
cat project.toon.yaml | head -30

# Find largest files
grep -E "^  .*[0-9]{3,}$" project.toon.yaml | sort -t',' -k2 -n -r | head -10

prompt.txt - Ready-to-Send LLM Prompt

Purpose: Pre-formatted prompt listing all generated files for LLM conversation Generation: Written when code2llm runs with a source path and requests -f all (including --no-chunk) or code2logic # noqa: E501 Contents:

  • Files section: Lists all existing generated files with descriptions, including project.toon.yaml when generated by -f all # noqa: E501
  • Source files section: Highlights important source files such as cli_exports/orchestrator.py
  • Missing section: Shows which files weren't generated (if any)
  • Task section: Refactoring brief with concrete execution instructions, not just analysis
  • Priority Order section: State-dependent refactoring priorities, starting with blockers and then architecture cleanup # noqa: E501
  • Requirements section: Guidelines for suggested changes

Example usage:

# View the prompt
cat prompt.txt

# Copy to clipboard and paste into ChatGPT/Claude
cat prompt.txt | pbcopy  # macOS
cat prompt.txt | xclip -sel clip  # Linux

context.md - LLM Narrative

Purpose: Ready-to-paste context for AI assistants Key sections:

  • Overview: Project statistics
  • Architecture: Module breakdown
  • Entry Points: Public interfaces
  • Patterns: Design patterns detected

Example usage:

# Copy to clipboard for LLM
cat context.md | pbcopy  # macOS
cat context.md | xclip -sel clip  # Linux

# Use with Claude/ChatGPT for code analysis

Visualization Files (*.mmd, *.png)

Purpose: Visual understanding of code structure Files:

  • flow.mmd - Detailed control flow with complexity colors
  • calls.mmd - Simple call graph
  • compact_flow.mmd - High-level module view
  • *.png - Pre-rendered images

Example usage:

# View diagrams
open flow.png  # macOS
xdg-open flow.png  # Linux

# Edit in Mermaid Live Editor
# Copy content of .mmd files to https://mermaid.live

πŸ” Common Analysis Patterns

1. Code Health Assessment

# Quick health check
code2llm ./ -f toon
cat analysis.toon | grep -E "(HEALTH|REFACTOR)"

2. Refactoring Planning

# Get refactoring queue
code2llm ./ -f evolution
cat evolution.toon.yaml

# Focus on specific issues
code2llm ./ -f toon --refactor --smell god_function

3. LLM Assistance

# Generate context for AI
code2llm ./ -f context
cat context.md

# Use with Claude: "Based on this context, help me refactor the god modules"

4. Team Documentation

# Generate all docs for team
code2llm ./ -f all -o ./docs/

# Create visual diagrams
open docs/flow.png

πŸ“Š Interpreting Metrics

Complexity Metrics (CC)

  • πŸ”΄ Critical (β‰₯5.0): Immediate refactoring needed
  • 🟠 High (3.0-4.9): Consider refactoring
  • 🟑 Medium (1.5-2.9): Monitor complexity
  • 🟒 Low (0.1-1.4): Acceptable
  • βšͺ Basic (0.0): Simple functions

Module Health

  • GOD Module: Too large (>500 lines, >20 methods)
  • HUB: High fan-out (calls many modules)
  • FAN-IN: High incoming dependencies
  • CYCLES: Circular dependencies

Data Flow Indicators

  • PIPELINE: Sequential data processing
  • CONTRACT: Clear input/output specification
  • SIDE_EFFECT: External state modification

πŸ› οΈ Integration Examples

CI/CD Pipeline

#!/bin/bash
# Analyze code quality in CI
code2llm ./ -f toon -o ./analysis
if grep -q "πŸ”΄ GOD" ./analysis/analysis.toon; then
    echo "❌ God modules detected"
    exit 1
fi

Pre-commit Hook

#!/bin/sh
# .git/hooks/pre-commit
code2llm ./ -f toon -o ./temp_analysis
if grep -q "πŸ”΄" ./temp_analysis/analysis.toon; then
    echo "⚠️  Critical issues found. Review before committing."
fi
rm -rf ./temp_analysis

Documentation Generation

# Generate docs for README
code2llm ./ -f context -o ./docs/
echo "## Architecture" >> README.md
cat docs/context.md >> README.md

πŸ“š Next Steps

  1. Review analysis.toon - Identify critical issues
  2. Check evolution.toon.yaml - Plan refactoring priorities
  3. Use context.md - Get LLM assistance for complex changes
  4. Reference visualizations - Understand system architecture
  5. Track progress - Re-run analysis after changes

πŸ”§ Advanced Usage

Custom Analysis

# Deep analysis with all insights
code2llm ./ -m hybrid -f all --max-depth 15 -v

# Performance-optimized
code2llm ./ -m static -f toon --strategy quick

# Refactoring-focused
code2llm ./ -f toon,evolution --refactor

Output Customization

# Separate output directories
code2llm ./ -f all -o ./analysis-$(date +%Y%m%d)

# Split YAML into multiple files
code2llm ./ -f yaml --split-output

# Separate orphaned functions
code2llm ./ -f yaml --separate-orphans

Generated by: code2llm ./ -f all --readme
Analysis Date: 2026-05-25
Total Functions: 1312
Total Classes: 143
Modules: 427

For more information about code2llm, visit: https://github.com/tom-sapletta/code2llm

License

Licensed under Apache-2.0.

Dependency maintenance

See dependency updates and Python tool groups for locked tests, daily updates and freshness checks.

About

High-performance Python code flow analysis with optimized TOON format - CFG, DFG, call graphs, and intelligent code queries

semcod.github.io/code2llm/

Topics

astcall-graphcode-analysiscontrol-flowdata-flowllmpythonreverse-engineeringsemcodstatic-analysistoontoon-format

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

0 stars

Watchers

2 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.