-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsumd.json
More file actions
126 lines (126 loc) · 79.8 KB
/
Copy pathsumd.json
File metadata and controls
126 lines (126 loc) · 79.8 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
{
"project_name": "vallm",
"description": "A complete toolkit for validating LLM-generated code",
"sections": [
{
"name": "contents",
"type": "unknown",
"content": "- [Metadata](#metadata)\n- [Architecture](#architecture)\n- [Interfaces](#interfaces)\n- [Workflows](#workflows)\n- [Quality Pipeline (`pyqual.yaml`)](#quality-pipeline-pyqualyaml)\n- [Configuration](#configuration)\n- [Dependencies](#dependencies)\n- [Deployment](#deployment)\n- [Environment Variables (`.env.example`)](#environment-variables-envexample)\n- [Release Management (`goal.yaml`)](#release-management-goalyaml)\n- [Makefile Targets](#makefile-targets)\n- [Code Analysis](#code-analysis)\n- [Intent](#intent)",
"level": 2
},
{
"name": "metadata",
"type": "metadata",
"content": "- **name**: `vallm`\n- **version**: `0.1.74`\n- **python_requires**: `>=3.10`\n- **license**: Apache-2.0\n- **ai_model**: `openrouter/qwen/qwen3-coder-next`\n- **ecosystem**: SUMD + DOQL + testql + taskfile\n- **generated_from**: pyproject.toml, Taskfile.yml, Makefile, app.doql.css, pyqual.yaml, goal.yaml, .env.example, project/(1 analysis files)",
"level": 2
},
{
"name": "architecture",
"type": "architecture",
"content": "```\nSUMD (description) → DOQL/source (code) → taskfile (automation) → testql (verification)\n```",
"level": 2
},
{
"name": "# doql application declaration (`app.doql.css`)",
"type": "unknown",
"content": "```css markpact:doql path=app.doql.css\napp {\n name: \"vallm\";\n version: \"0.1.75\";\n}\n\ninterface[type=\"cli\"] {\n framework: argparse;\n}\ninterface[type=\"cli\"] page[name=\"vallm\"] {\n\n}\n\nworkflow[name=\"venv\"] {\n trigger: \"manual\";\n step-1: run cmd=if [ ! -x \"$(PYTHON)\" ]; then \\;\n step-2: run cmd=echo \"Creating virtual environment in $(VENV)...\"; \\;\n step-3: run cmd=python3 -m venv \"$(VENV)\"; \\;\n step-4: run cmd=fi;\n}\n\nworkflow[name=\"install\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PIP) install -e .;\n step-2: run cmd=echo \"✓ code2llm installed with TOON format support\";\n}\n\nworkflow[name=\"dev-install\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PIP) install -e \".[dev]\";\n step-2: run cmd=echo \"✓ code2llm installed with dev dependencies\";\n}\n\nworkflow[name=\"test\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PYTHON) -m pytest tests/ -v --tb=short;\n}\n\nworkflow[name=\"test-fast\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PYTHON) -m pytest -m \"not slow and not integration\" -v --tb=short -n auto;\n}\n\nworkflow[name=\"test-slow\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PYTHON) -m pytest -m \"slow\" -v --tb=short;\n}\n\nworkflow[name=\"test-integration\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PYTHON) -m pytest -m \"integration\" -v --tb=short;\n}\n\nworkflow[name=\"test-unit\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PYTHON) -m pytest -m \"unit\" -v --tb=short;\n}\n\nworkflow[name=\"test-cov\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PYTHON) -m pytest tests/ --cov=code2llm --cov-report=html --cov-report=term 2>/dev/null || echo \"No tests yet\";\n}\n\nworkflow[name=\"test-toon\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"🎯 Testing TOON format...\";\n step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./test_toon -m hybrid -f toon;\n step-3: run cmd=$(PYTHON) validate_toon.py test_toon/analysis.toon;\n step-4: run cmd=echo \"✓ TOON format test complete\";\n}\n\nworkflow[name=\"validate-toon\"] {\n trigger: \"manual\";\n step-1: depend target=test-toon;\n}\n\nworkflow[name=\"test-all-formats\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"📊 Testing all output formats...\";\n step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./test_all -m hybrid -f all;\n step-3: run cmd=$(PYTHON) validate_toon.py test_all/analysis.toon;\n step-4: run cmd=echo \"✓ All formats test complete\";\n}\n\nworkflow[name=\"test-comprehensive\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"🚀 Running comprehensive test suite...\";\n step-2: run cmd=bash project.sh;\n step-3: run cmd=echo \"✓ Comprehensive tests complete\";\n}\n\nworkflow[name=\"lint\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PYTHON) -m flake8 code2llm/ --max-line-length=100 --ignore=E203,W503 2>/dev/null || echo \"flake8 not installed\";\n step-2: run cmd=$(PYTHON) -m black --check code2llm/ 2>/dev/null || echo \"black not installed\";\n step-3: run cmd=echo \"✓ Linting complete\";\n}\n\nworkflow[name=\"format\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PYTHON) -m black code2llm/ --line-length=100 2>/dev/null || echo \"black not installed, run: pip install black\";\n step-2: run cmd=echo \"✓ Code formatted\";\n}\n\nworkflow[name=\"typecheck\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PYTHON) -m mypy code2llm/ --ignore-missing-imports 2>/dev/null || echo \"mypy not installed\";\n}\n\nworkflow[name=\"check\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"✓ All checks passed\";\n}\n\nworkflow[name=\"run\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PYTHON) -m code2llm ../python/stts_core -v -o ./output;\n}\n\nworkflow[name=\"analyze\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"🎯 Running TOON format analysis on current project...\";\n step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./analysis -m hybrid -f toon;\n step-3: run cmd=$(PYTHON) validate_toon.py analysis/analysis.toon;\n step-4: run cmd=echo \"✓ TOON analysis complete - check analysis/analysis.toon\";\n}\n\nworkflow[name=\"analyze-all\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"📊 Running analysis with all formats...\";\n step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./analysis_all -m hybrid -f all;\n step-3: run cmd=$(PYTHON) validate_toon.py analysis_all/analysis.toon;\n step-4: run cmd=echo \"✓ All formats analysis complete - check analysis_all/\";\n}\n\nworkflow[name=\"toon-demo\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"🎯 Quick TOON format demo...\";\n step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./demo -m hybrid -f toon;\n step-3: run cmd=echo \"📁 Generated: demo/analysis.toon\";\n step-4: run cmd=echo \"📊 Size: $$(du -h demo/analysis.toon | cut -f1)\";\n step-5: run cmd=echo \"🔍 Preview:\";\n step-6: run cmd=head -20 demo/analysis.toon;\n}\n\nworkflow[name=\"toon-compare\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"📊 Comparing TOON vs YAML formats...\";\n step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./compare -m hybrid -f toon,yaml;\n step-3: run cmd=echo \"📁 Files generated:\";\n step-4: run cmd=echo \" - TOON: compare/analysis.toon ($$(du -h compare/analysis.toon | cut -f1))\";\n step-5: run cmd=echo \" - YAML: compare/analysis.yaml ($$(du -h compare/analysis.yaml | cut -f1))\";\n step-6: run cmd=echo \" - Ratio: $$(echo \"scale=1; $$(du -k compare/analysis.yaml | cut -f1) / $$(du -k compare/analysis.toon | cut -f1)\" | bc)x smaller\";\n step-7: run cmd=$(PYTHON) validate_toon.py compare/analysis.yaml compare/analysis.toon;\n}\n\nworkflow[name=\"toon-validate\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"🔍 Validating TOON format structure...\";\n step-2: run cmd=$(PYTHON) validate_toon.py analysis/analysis.toon 2>/dev/null || $(PYTHON) validate_toon.py test_toon/analysis.toon 2>/dev/null || echo \"Run 'make test-toon' first\";\n}\n\nworkflow[name=\"build\"] {\n trigger: \"manual\";\n step-1: run cmd=rm -rf build/ dist/ *.egg-info;\n step-2: run cmd=$(PYTHON) -m build;\n step-3: run cmd=echo \"✓ Build complete - check dist/\";\n}\n\nworkflow[name=\"publish-test\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"🚀 Publishing to TestPyPI...\";\n step-2: run cmd=bash -c 'if [ -z \"$${TWINE_USERNAME}\" ] && [ -z \"$${TWINE_PASSWORD}\" ] && [ -z \"$${PYPI_API_TOKEN}\" ]; then \\;\n step-3: run cmd=echo \"⚠️ No PyPI credentials found. Set TWINE_USERNAME and TWINE_PASSWORD or PYPI_API_TOKEN\"; \\;\n step-4: run cmd=echo \" Example: TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-xxx make publish-test\"; \\;\n step-5: run cmd=echo \" Skipping publish-test.\"; \\;\n step-6: run cmd=else \\;\n step-7: run cmd=$(PYTHON) -m venv publish-test-env && \\;\n step-8: run cmd=publish-test-env/bin/pip install twine && \\;\n step-9: run cmd=publish-test-env/bin/python -m twine upload --repository testpypi dist/* && \\;\n step-10: run cmd=rm -rf publish-test-env && \\;\n step-11: run cmd=echo \"✓ Published to TestPyPI\"; \\;\n step-12: run cmd=fi';\n}\n\nworkflow[name=\"bump-patch\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"🔢 Bumping patch version...\";\n step-2: run cmd=$(PYTHON) scripts/bump_version.py patch 2>/dev/null || echo \"Create scripts/bump_version.py or edit pyproject.toml manually\";\n}\n\nworkflow[name=\"bump-minor\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"🔢 Bumping minor version...\";\n step-2: run cmd=$(PYTHON) scripts/bump_version.py minor 2>/dev/null || echo \"Create scripts/bump_version.py or edit pyproject.toml manually\";\n}\n\nworkflow[name=\"bump-major\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"🔢 Bumping major version...\";\n step-2: run cmd=$(PYTHON) scripts/bump_version.py major 2>/dev/null || echo \"Create scripts/bump_version.py or edit pyproject.toml manually\";\n}\n\nworkflow[name=\"publish\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"🚀 Publishing to PyPI...\";\n step-2: run cmd=bash -c 'if [ -z \"$${TWINE_USERNAME}\" ] && [ -z \"$${TWINE_PASSWORD}\" ] && [ -z \"$${PYPI_API_TOKEN}\" ]; then \\;\n step-3: run cmd=echo \"⚠️ No PyPI credentials found. Set TWINE_USERNAME and TWINE_PASSWORD or PYPI_API_TOKEN\"; \\;\n step-4: run cmd=echo \" Example: TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-xxx make publish\"; \\;\n step-5: run cmd=echo \" Skipping publish.\"; \\;\n step-6: run cmd=else \\;\n step-7: run cmd=echo \"🔢 Bumping patch version...\"; \\;\n step-8: run cmd=$(MAKE) bump-patch; \\;\n step-9: run cmd=echo \"🔨 Rebuilding package with new version...\"; \\;\n step-10: run cmd=$(MAKE) build; \\;\n step-11: run cmd=echo \"📦 Publishing to PyPI...\"; \\;\n step-12: run cmd=$(PYTHON) -m venv publish-env; \\;\n step-13: run cmd=publish-env/bin/pip install twine; \\;\n step-14: run cmd=publish-env/bin/python -m twine upload dist/*; \\;\n step-15: run cmd=rm -rf publish-env; \\;\n step-16: run cmd=echo \"✓ Published to PyPI\"; \\;\n step-17: run cmd=fi';\n}\n\nworkflow[name=\"mermaid-png\"] {\n trigger: \"manual\";\n step-1: run cmd=$(PYTHON) mermaid_to_png.py --batch output output;\n}\n\nworkflow[name=\"install-mermaid\"] {\n trigger: \"manual\";\n step-1: run cmd=npm install -g @mermaid-js/mermaid-cli;\n}\n\nworkflow[name=\"check-mermaid\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"Checking available Mermaid renderers...\";\n step-2: run cmd=which mmdc > /dev/null && echo \"✓ mmdc (mermaid-cli)\" || echo \"✗ mmdc (run: npm install -g @mermaid-js/mermaid-cli)\";\n step-3: run cmd=which npx > /dev/null && echo \"✓ npx (for @mermaid-js/mermaid-cli)\" || echo \"✗ npx (install Node.js)\";\n step-4: run cmd=which puppeteer > /dev/null && echo \"✓ puppeteer\" || echo \"✗ puppeteer (run: npm install -g puppeteer)\";\n}\n\nworkflow[name=\"clean\"] {\n trigger: \"manual\";\n step-1: run cmd=rm -rf build/ dist/ *.egg-info;\n step-2: run cmd=rm -rf .pytest_cache .coverage htmlcov/;\n step-3: run cmd=rm -rf code2llm/__pycache__ code2llm/*/__pycache__;\n step-4: run cmd=rm -rf test_* demo compare analysis analysis_all output_* 2>/dev/null || true;\n step-5: run cmd=find . -name \"*.pyc\" -delete 2>/dev/null || true;\n step-6: run cmd=find . -name \"__pycache__\" -type d -exec rm -rf {} + 2>/dev/null || true;\n step-7: run cmd=echo \"✓ Cleaned build artifacts and test outputs\";\n}\n\nworkflow[name=\"clean-png\"] {\n trigger: \"manual\";\n step-1: run cmd=rm -f output/*.png;\n step-2: run cmd=echo \"✓ Cleaned PNG files\";\n}\n\nworkflow[name=\"quickstart\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"🚀 Quick Start with code2llm TOON format:\";\n step-2: run cmd=echo \"\";\n step-3: run cmd=echo \"1. Install: make install\";\n step-4: run cmd=echo \"2. Test TOON: make test-toon\";\n step-5: run cmd=echo \"3. Analyze: make analyze\";\n step-6: run cmd=echo \"4. Compare: make toon-compare\";\n step-7: run cmd=echo \"5. All formats: make test-all-formats\";\n step-8: run cmd=echo \"\";\n step-9: run cmd=echo \"📖 For more: make help\";\n}\n\nworkflow[name=\"fmt\"] {\n trigger: \"manual\";\n step-1: run cmd=ruff format .;\n}\n\nworkflow[name=\"health\"] {\n trigger: \"manual\";\n step-1: run cmd=docker compose ps;\n step-2: run cmd=docker compose exec app echo \"Health check passed\";\n}\n\nworkflow[name=\"import-makefile-hint\"] {\n trigger: \"manual\";\n step-1: run cmd=echo 'Run: taskfile import Makefile to import existing targets.';\n}\n\nworkflow[name=\"help\"] {\n trigger: \"manual\";\n step-1: run cmd=echo \"code2llm - Python Code Flow Analysis Tool with LLM Integration and TOON;\n step-2: run cmd=echo \"\";\n step-3: run cmd=echo \\\"\\U0001F680 Installation:\\; \n step-4: run cmd=echo \" make install - Install package\";\n step-5: run cmd=echo \" make dev-install - Install with development dependencies\";\n step-6: run cmd=echo \"\";\n step-7: run cmd=echo \\\"\\U0001F9EA Testing:\\; \n step-8: run cmd=echo \" make test - Run test suite\";\n step-9: run cmd=echo \" make test-toon - Test TOON format only\";\n step-10: run cmd=echo \" make validate-toon - Validate TOON format output\";\n step-11: run cmd=echo \" make test-all-formats - Test all output formats\";\n step-12: run cmd=echo \"\";\n step-13: run cmd=echo \\\"\\U0001F527 Code Quality:\\; \n step-14: run cmd=echo \" make lint - Run linters (flake8, black --check)\";\n step-15: run cmd=echo \" make format - Format code with black\";\n step-16: run cmd=echo \" make typecheck - Run mypy type checking\";\n step-17: run cmd=echo \" make check - Run all quality checks\";\n step-18: run cmd=echo \"\";\n step-19: run cmd=echo \\\"\\U0001F4CA Analysis:\\; \n step-20: run cmd=echo \" make analyze - Run analysis on current project (TOON format)\";\n step-21: run cmd=echo \" make run - Run with example arguments\";\n step-22: run cmd=echo \" make analyze-all - Run analysis with all formats\";\n step-23: run cmd=echo \"\";\n step-24: run cmd=echo \\\"\\U0001F3AF TOON Format:\\; \n step-25: run cmd=echo \" make toon-demo - Quick TOON format demo\";\n step-26: run cmd=echo \" make toon-compare - Compare TOON vs YAML formats\";\n step-27: run cmd=echo \" make toon-validate - Validate TOON format structure\";\n step-28: run cmd=echo \"\";\n step-29: run cmd=echo \\\"\\U0001F4E6 Building & Release:\\; \n step-30: run cmd=echo \" make build - Build distribution packages\";\n step-31: run cmd=echo \" make publish - Publish to PyPI (with version bump)\";\n step-32: run cmd=echo \" make publish-test - Publish to TestPyPI\";\n step-33: run cmd=echo \" make bump-patch - Bump patch version\";\n step-34: run cmd=echo \" make bump-minor - Bump minor version\";\n step-35: run cmd=echo \" make bump-major - Bump major version\";\n step-36: run cmd=echo \"\";\n step-37: run cmd=echo \\\"\\U0001F3A8 Visualization:\\; \n step-38: run cmd=echo \" make mermaid-png - Generate PNG from all Mermaid files\";\n step-39: run cmd=echo \" make install-mermaid - Install Mermaid CLI renderer\";\n step-40: run cmd=echo \" make check-mermaid - Check available Mermaid renderers\";\n step-41: run cmd=echo \"\";\n step-42: run cmd=echo \\\"\\U0001F9F9 Maintenance:\\; \n step-43: run cmd=echo \" make clean - Remove build artifacts\";\n step-44: run cmd=echo \" make clean-png - Clean PNG files\";\n step-45: run cmd=echo \"\";\n}\n\ndeploy {\n target: docker;\n}\n\nenvironment[name=\"local\"] {\n runtime: docker;\n env_file: \".env\";\n}\n\nworkflow[name=\"all\"] {\n trigger: \"manual\";\n step-1: run cmd=taskfile run install;\n step-2: run cmd=taskfile run lint;\n step-3: run cmd=taskfile run test;\n}\n```",
"level": 2
},
{
"name": "interfaces",
"type": "interfaces",
"content": "",
"level": 2
},
{
"name": "# cli entry points",
"type": "unknown",
"content": "- `vallm`",
"level": 2
},
{
"name": "workflows",
"type": "workflows",
"content": "",
"level": 2
},
{
"name": "# taskfile tasks (`taskfile.yml`)",
"type": "unknown",
"content": "```yaml markpact:taskfile path=Taskfile.yml\nversion: '1'\nname: vallm\ndescription: Minimal Taskfile\nvariables:\n APP_NAME: vallm\nenvironments:\n local:\n container_runtime: docker\n compose_command: docker compose\npipeline:\n python_version: \"3.12\"\n runner_image: ubuntu-latest\n branches: [main]\n cache: [~/.cache/pip]\n artifacts: [dist/]\n\n stages:\n - name: lint\n tasks: [lint]\n\n - name: test\n tasks: [test]\n\n - name: build\n tasks: [build]\n when: \"branch:main\"\n\ntasks:\n install:\n desc: Install Python dependencies (editable)\n cmds:\n - pip install -e .[dev]\n test:\n desc: Run quality pipeline (pyqual)\n cmds:\n - pyqual run\n lint:\n desc: Check quality gates (pyqual)\n cmds:\n - pyqual check-gates\n fmt:\n desc: Auto-format with ruff\n cmds:\n - ruff format .\n check:\n desc: Run full pyqual pipeline with fix attempts\n cmds:\n - pyqual run --auto-fix\n build:\n desc: Build wheel + sdist (via pyqual pipeline)\n cmds:\n - pyqual run --stage publish || python -m build\n clean:\n desc: Remove build artefacts\n cmds:\n - rm -rf build/ dist/ *.egg-info\n help:\n desc: '[imported from Makefile] help'\n cmds:\n - echo \"code2llm - Python Code Flow Analysis Tool with LLM Integration and TOON\n Format\"\n - echo \"\"\n - \"echo \\\"\\U0001F680 Installation:\\\"\"\n - echo \" make install - Install package\"\n - echo \" make dev-install - Install with development dependencies\"\n - echo \"\"\n - \"echo \\\"\\U0001F9EA Testing:\\\"\"\n - echo \" make test - Run test suite\"\n - echo \" make test-toon - Test TOON format only\"\n - echo \" make validate-toon - Validate TOON format output\"\n - echo \" make test-all-formats - Test all output formats\"\n - echo \"\"\n - \"echo \\\"\\U0001F527 Code Quality:\\\"\"\n - echo \" make lint - Run linters (flake8, black --check)\"\n - echo \" make format - Format code with black\"\n - echo \" make typecheck - Run mypy type checking\"\n - echo \" make check - Run all quality checks\"\n - echo \"\"\n - \"echo \\\"\\U0001F4CA Analysis:\\\"\"\n - echo \" make analyze - Run analysis on current project (TOON format)\"\n - echo \" make run - Run with example arguments\"\n - echo \" make analyze-all - Run analysis with all formats\"\n - echo \"\"\n - \"echo \\\"\\U0001F3AF TOON Format:\\\"\"\n - echo \" make toon-demo - Quick TOON format demo\"\n - echo \" make toon-compare - Compare TOON vs YAML formats\"\n - echo \" make toon-validate - Validate TOON format structure\"\n - echo \"\"\n - \"echo \\\"\\U0001F4E6 Building & Release:\\\"\"\n - echo \" make build - Build distribution packages\"\n - echo \" make publish - Publish to PyPI (with version bump)\"\n - echo \" make publish-test - Publish to TestPyPI\"\n - echo \" make bump-patch - Bump patch version\"\n - echo \" make bump-minor - Bump minor version\"\n - echo \" make bump-major - Bump major version\"\n - echo \"\"\n - \"echo \\\"\\U0001F3A8 Visualization:\\\"\"\n - echo \" make mermaid-png - Generate PNG from all Mermaid files\"\n - echo \" make install-mermaid - Install Mermaid CLI renderer\"\n - echo \" make check-mermaid - Check available Mermaid renderers\"\n - echo \"\"\n - \"echo \\\"\\U0001F9F9 Maintenance:\\\"\"\n - echo \" make clean - Remove build artifacts\"\n - echo \" make clean-png - Clean PNG files\"\n - echo \"\"\n venv:\n desc: '[imported from Makefile] venv'\n cmds:\n - if [ ! -x \"$(PYTHON)\" ]; then \\\n - echo \"Creating virtual environment in $(VENV)...\"; \\\n - python3 -m venv \"$(VENV)\"; \\\n - fi\n dev-install:\n desc: '[imported from Makefile] dev-install'\n cmds:\n - $(PIP) install -e \".[dev]\"\n - \"echo \\\"\\u2713 code2llm installed with dev dependencies\\\"\"\n test-fast:\n desc: '[imported from Makefile] test-fast'\n cmds:\n - $(PYTHON) -m pytest -m \"not slow and not integration\" -v --tb=short -n auto\n test-slow:\n desc: '[imported from Makefile] test-slow'\n cmds:\n - $(PYTHON) -m pytest -m \"slow\" -v --tb=short\n test-integration:\n desc: '[imported from Makefile] test-integration'\n cmds:\n - $(PYTHON) -m pytest -m \"integration\" -v --tb=short\n test-unit:\n desc: '[imported from Makefile] test-unit'\n cmds:\n - $(PYTHON) -m pytest -m \"unit\" -v --tb=short\n test-cov:\n desc: '[imported from Makefile] test-cov'\n cmds:\n - $(PYTHON) -m pytest tests/ --cov=code2llm --cov-report=html --cov-report=term\n 2>/dev/null || echo \"No tests yet\"\n test-toon:\n desc: '[imported from Makefile] test-toon'\n cmds:\n - \"echo \\\"\\U0001F3AF Testing TOON format...\\\"\"\n - $(PYTHON) -m code2llm ./ -v -o ./test_toon -m hybrid -f toon\n - $(PYTHON) validate_toon.py test_toon/analysis.toon\n - \"echo \\\"\\u2713 TOON format test complete\\\"\"\n validate-toon:\n desc: '[imported from Makefile] validate-toon'\n deps:\n - test-toon\n test-all-formats:\n desc: '[imported from Makefile] test-all-formats'\n cmds:\n - \"echo \\\"\\U0001F4CA Testing all output formats...\\\"\"\n - $(PYTHON) -m code2llm ./ -v -o ./test_all -m hybrid -f all\n - $(PYTHON) validate_toon.py test_all/analysis.toon\n - \"echo \\\"\\u2713 All formats test complete\\\"\"\n test-comprehensive:\n desc: '[imported from Makefile] test-comprehensive'\n cmds:\n - \"echo \\\"\\U0001F680 Running comprehensive test suite...\\\"\"\n - bash project.sh\n - \"echo \\\"\\u2713 Comprehensive tests complete\\\"\"\n format:\n desc: '[imported from Makefile] format'\n cmds:\n - '$(PYTHON) -m black code2llm/ --line-length=100 2>/dev/null || echo \"black not\n installed, run: pip install black\"'\n - \"echo \\\"\\u2713 Code formatted\\\"\"\n typecheck:\n desc: '[imported from Makefile] typecheck'\n cmds:\n - $(PYTHON) -m mypy code2llm/ --ignore-missing-imports 2>/dev/null || echo \"mypy\n not installed\"\n check:\n desc: '[imported from Makefile] check'\n cmds:\n - \"echo \\\"\\u2713 All checks passed\\\"\"\n deps:\n - lint\n - typecheck\n - test\n run:\n desc: '[imported from Makefile] run'\n cmds:\n - $(PYTHON) -m code2llm ../python/stts_core -v -o ./output\n analyze:\n desc: '[imported from Makefile] analyze'\n cmds:\n - \"echo \\\"\\U0001F3AF Running TOON format analysis on current project...\\\"\"\n - $(PYTHON) -m code2llm ./ -v -o ./analysis -m hybrid -f toon\n - $(PYTHON) validate_toon.py analysis/analysis.toon\n - \"echo \\\"\\u2713 TOON analysis complete - check analysis/analysis.toon\\\"\"\n analyze-all:\n desc: '[imported from Makefile] analyze-all'\n cmds:\n - \"echo \\\"\\U0001F4CA Running analysis with all formats...\\\"\"\n - $(PYTHON) -m code2llm ./ -v -o ./analysis_all -m hybrid -f all\n - $(PYTHON) validate_toon.py analysis_all/analysis.toon\n - \"echo \\\"\\u2713 All formats analysis complete - check analysis_all/\\\"\"\n toon-demo:\n desc: '[imported from Makefile] toon-demo'\n cmds:\n - \"echo \\\"\\U0001F3AF Quick TOON format demo...\\\"\"\n - $(PYTHON) -m code2llm ./ -v -o ./demo -m hybrid -f toon\n - \"echo \\\"\\U0001F4C1 Generated: demo/analysis.toon\\\"\"\n - \"echo \\\"\\U0001F4CA Size: $$(du -h demo/analysis.toon | cut -f1)\\\"\"\n - \"echo \\\"\\U0001F50D Preview:\\\"\"\n - head -20 demo/analysis.toon\n toon-compare:\n desc: '[imported from Makefile] toon-compare'\n cmds:\n - \"echo \\\"\\U0001F4CA Comparing TOON vs YAML formats...\\\"\"\n - $(PYTHON) -m code2llm ./ -v -o ./compare -m hybrid -f toon,yaml\n - \"echo \\\"\\U0001F4C1 Files generated:\\\"\"\n - 'echo \" - TOON: compare/analysis.toon ($$(du -h compare/analysis.toon | cut\n -f1))\"'\n - 'echo \" - YAML: compare/analysis.yaml ($$(du -h compare/analysis.yaml | cut\n -f1))\"'\n - 'echo \" - Ratio: $$(echo \"scale=1; $$(du -k compare/analysis.yaml | cut -f1)\n / $$(du -k compare/analysis.toon | cut -f1)\" | bc)x smaller\"'\n - $(PYTHON) validate_toon.py compare/analysis.yaml compare/analysis.toon\n toon-validate:\n desc: '[imported from Makefile] toon-validate'\n cmds:\n - \"echo \\\"\\U0001F50D Validating TOON format structure...\\\"\"\n - $(PYTHON) validate_toon.py analysis/analysis.toon 2>/dev/null || $(PYTHON) validate_toon.py\n test_toon/analysis.toon 2>/dev/null || echo \"Run 'make test-toon' first\"\n publish-test:\n desc: '[imported from Makefile] publish-test'\n cmds:\n - \"echo \\\"\\U0001F680 Publishing to TestPyPI...\\\"\"\n - bash -c 'if [ -z \"$${TWINE_USERNAME}\" ] && [ -z \"$${TWINE_PASSWORD}\" ] && [\n -z \"$${PYPI_API_TOKEN}\" ]; then \\\n - \"echo \\\"\\u26A0\\uFE0F No PyPI credentials found. Set TWINE_USERNAME and TWINE_PASSWORD\\\n \\ or PYPI_API_TOKEN\\\"; \\\\\"\n - 'echo \" Example: TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-xxx make publish-test\";\n \\'\n - echo \" Skipping publish-test.\"; \\\n - else \\\n - $(PYTHON) -m venv publish-test-env && \\\n - publish-test-env/bin/pip install twine && \\\n - publish-test-env/bin/python -m twine upload --repository testpypi dist/* &&\n \\\n - rm -rf publish-test-env && \\\n - \"echo \\\"\\u2713 Published to TestPyPI\\\"; \\\\\"\n - fi'\n deps:\n - build\n bump-patch:\n desc: '[imported from Makefile] bump-patch'\n cmds:\n - \"echo \\\"\\U0001F522 Bumping patch version...\\\"\"\n - $(PYTHON) scripts/bump_version.py patch 2>/dev/null || echo \"Create scripts/bump_version.py\n or edit pyproject.toml manually\"\n bump-minor:\n desc: '[imported from Makefile] bump-minor'\n cmds:\n - \"echo \\\"\\U0001F522 Bumping minor version...\\\"\"\n - $(PYTHON) scripts/bump_version.py minor 2>/dev/null || echo \"Create scripts/bump_version.py\n or edit pyproject.toml manually\"\n bump-major:\n desc: '[imported from Makefile] bump-major'\n cmds:\n - \"echo \\\"\\U0001F522 Bumping major version...\\\"\"\n - $(PYTHON) scripts/bump_version.py major 2>/dev/null || echo \"Create scripts/bump_version.py\n or edit pyproject.toml manually\"\n publish:\n desc: '[imported from Makefile] publish'\n cmds:\n - \"echo \\\"\\U0001F680 Publishing to PyPI...\\\"\"\n - bash -c 'if [ -z \"$${TWINE_USERNAME}\" ] && [ -z \"$${TWINE_PASSWORD}\" ] && [\n -z \"$${PYPI_API_TOKEN}\" ]; then \\\n - \"echo \\\"\\u26A0\\uFE0F No PyPI credentials found. Set TWINE_USERNAME and TWINE_PASSWORD\\\n \\ or PYPI_API_TOKEN\\\"; \\\\\"\n - 'echo \" Example: TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-xxx make publish\";\n \\'\n - echo \" Skipping publish.\"; \\\n - else \\\n - \"echo \\\"\\U0001F522 Bumping patch version...\\\"; \\\\\"\n - $(MAKE) bump-patch; \\\n - \"echo \\\"\\U0001F528 Rebuilding package with new version...\\\"; \\\\\"\n - $(MAKE) build; \\\n - \"echo \\\"\\U0001F4E6 Publishing to PyPI...\\\"; \\\\\"\n - $(PYTHON) -m venv publish-env; \\\n - publish-env/bin/pip install twine; \\\n - publish-env/bin/python -m twine upload dist/*; \\\n - rm -rf publish-env; \\\n - \"echo \\\"\\u2713 Published to PyPI\\\"; \\\\\"\n - fi'\n deps:\n - build\n mermaid-png:\n desc: '[imported from Makefile] mermaid-png'\n cmds:\n - $(PYTHON) mermaid_to_png.py --batch output output\n install-mermaid:\n desc: '[imported from Makefile] install-mermaid'\n cmds:\n - npm install -g @mermaid-js/mermaid-cli\n check-mermaid:\n desc: '[imported from Makefile] check-mermaid'\n cmds:\n - echo \"Checking available Mermaid renderers...\"\n - \"which mmdc > /dev/null && echo \\\"\\u2713 mmdc (mermaid-cli)\\\" || echo \\\"\\u2717\\\n \\ mmdc (run: npm install -g @mermaid-js/mermaid-cli)\\\"\"\n - \"which npx > /dev/null && echo \\\"\\u2713 npx (for @mermaid-js/mermaid-cli)\\\"\\\n \\ || echo \\\"\\u2717 npx (install Node.js)\\\"\"\n - \"which puppeteer > /dev/null && echo \\\"\\u2713 puppeteer\\\" || echo \\\"\\u2717 puppeteer\\\n \\ (run: npm install -g puppeteer)\\\"\"\n clean-png:\n desc: '[imported from Makefile] clean-png'\n cmds:\n - rm -f output/*.png\n - \"echo \\\"\\u2713 Cleaned PNG files\\\"\"\n quickstart:\n desc: '[imported from Makefile] quickstart'\n cmds:\n - \"echo \\\"\\U0001F680 Quick Start with code2llm TOON format:\\\"\"\n - echo \"\"\n - 'echo \"1. Install: make install\"'\n - 'echo \"2. Test TOON: make test-toon\"'\n - 'echo \"3. Analyze: make analyze\"'\n - 'echo \"4. Compare: make toon-compare\"'\n - 'echo \"5. All formats: make test-all-formats\"'\n - echo \"\"\n - \"echo \\\"\\U0001F4D6 For more: make help\\\"\"\n health:\n desc: '[from doql] workflow: health'\n cmds:\n - docker compose ps\n - docker compose exec app echo \"Health check passed\"\n import-makefile-hint:\n desc: '[from doql] workflow: import-makefile-hint'\n cmds:\n - 'echo ''Run: taskfile import Makefile to import existing targets.'''\n all:\n desc: Run install, lint, test\n cmds:\n - taskfile run install\n - taskfile run lint\n - taskfile run test\n sumd:\n desc: Generate SUMD (Structured Unified Markdown Descriptor) for AI-aware project description\n cmds:\n - |\n echo \"# $(basename $(pwd))\" > SUMD.md\n echo \"\" >> SUMD.md\n echo \"$(python3 -c \"import tomllib; f=open('pyproject.toml','rb'); d=tomllib.load(f); print(d.get('project',{}).get('description','Project description'))\" 2>/dev/null || echo 'Project description')\" >> SUMD.md\n echo \"\" >> SUMD.md\n echo \"## Contents\" >> SUMD.md\n echo \"\" >> SUMD.md\n echo \"- [Metadata](#metadata)\" >> SUMD.md\n echo \"- [Architecture](#architecture)\" >> SUMD.md\n echo \"- [Dependencies](#dependencies)\" >> SUMD.md\n echo \"- [Source Map](#source-map)\" >> SUMD.md\n echo \"- [Intent](#intent)\" >> SUMD.md\n echo \"\" >> SUMD.md\n echo \"## Metadata\" >> SUMD.md\n echo \"\" >> SUMD.md\n echo \"- **name**: \\`$(basename $(pwd))\\`\" >> SUMD.md\n echo \"- **version**: \\`$(python3 -c \"import tomllib; f=open('pyproject.toml','rb'); d=tomllib.load(f); print(d.get('project',{}).get('version','unknown'))\" 2>/dev/null || echo 'unknown')\\`\" >> SUMD.md\n echo \"- **python_requires**: \\`>=$(python3 --version 2>/dev/null | cut -d' ' -f2 | cut -d. -f1,2)\\`\" >> SUMD.md\n echo \"- **license**: $(python3 -c \"import tomllib; f=open('pyproject.toml','rb'); d=tomllib.load(f); print(d.get('project',{}).get('license',{}).get('text','MIT'))\" 2>/dev/null || echo 'MIT')\" >> SUMD.md\n echo \"- **ecosystem**: SUMD + DOQL + testql + taskfile\" >> SUMD.md\n echo \"- **generated_from**: pyproject.toml, Taskfile.yml, Makefile, src/\" >> SUMD.md\n echo \"\" >> SUMD.md\n echo \"## Architecture\" >> SUMD.md\n echo \"\" >> SUMD.md\n echo '```' >> SUMD.md\n echo \"SUMD (description) → DOQL/source (code) → taskfile (automation) → testql (verification)\" >> SUMD.md\n echo '```' >> SUMD.md\n echo \"\" >> SUMD.md\n echo \"## Source Map\" >> SUMD.md\n echo \"\" >> SUMD.md\n find . -name '*.py' -not -path './.venv/*' -not -path './venv/*' -not -path './__pycache__/*' -not -path './.git/*' | head -50 | sed 's|^./||' | sed 's|^|- |' >> SUMD.md\n echo \"Generated SUMD.md\"\n - |\n python3 -c \"\n import json, os, subprocess\n from pathlib import Path\n project_name = Path.cwd().name\n py_files = list(Path('.').rglob('*.py'))\n py_files = [f for f in py_files if not any(x in str(f) for x in ['.venv', 'venv', '__pycache__', '.git'])]\n data = {\n 'project_name': project_name,\n 'description': 'SUMD - Structured Unified Markdown Descriptor for AI-aware project refactorization',\n 'files': [{'path': str(f), 'type': 'python'} for f in py_files[:100]]\n }\n with open('sumd.json', 'w') as f:\n json.dump(data, f, indent=2)\n print('Generated sumd.json')\n \" 2>/dev/null || echo 'Python generation failed, using fallback'\n sumr:\n desc: Generate SUMR (Summary Report) with project metrics and health status\n cmds:\n - |\n echo \"# $(basename $(pwd)) - Summary Report\" > SUMR.md\n echo \"\" >> SUMR.md\n echo \"SUMR - Summary Report for project analysis\" >> SUMR.md\n echo \"\" >> SUMR.md\n echo \"## Contents\" >> SUMR.md\n echo \"\" >> SUMR.md\n echo \"- [Metadata](#metadata)\" >> SUMR.md\n echo \"- [Quality Status](#quality-status)\" >> SUMR.md\n echo \"- [Metrics](#metrics)\" >> SUMR.md\n echo \"- [Refactoring Analysis](#refactoring-analysis)\" >> SUMR.md\n echo \"- [Intent](#intent)\" >> SUMR.md\n echo \"\" >> SUMR.md\n echo \"## Metadata\" >> SUMR.md\n echo \"\" >> SUMR.md\n echo \"- **name**: \\`$(basename $(pwd))\\`\" >> SUMR.md\n echo \"- **version**: \\`$(python3 -c \"import tomllib; f=open('pyproject.toml','rb'); d=tomllib.load(f); print(d.get('project',{}).get('version','unknown'))\" 2>/dev/null || echo 'unknown')\\`\" >> SUMR.md\n echo \"- **generated_at**: \\`$(date -Iseconds)\\`\" >> SUMR.md\n echo \"\" >> SUMR.md\n echo \"## Quality Status\" >> SUMR.md\n echo \"\" >> SUMR.md\n if [ -f pyqual.yaml ]; then\n echo \"- **pyqual_config**: ✅ Present\" >> SUMR.md\n echo \"- **last_run**: $(stat -c %y .pyqual/pipeline.db 2>/dev/null | cut -d' ' -f1 || echo 'N/A')\" >> SUMR.md\n else\n echo \"- **pyqual_config**: ❌ Missing\" >> SUMR.md\n fi\n echo \"\" >> SUMR.md\n echo \"## Metrics\" >> SUMR.md\n echo \"\" >> SUMR.md\n py_files=$(find . -name '*.py' -not -path './.venv/*' -not -path './venv/*' | wc -l)\n echo \"- **python_files**: $py_files\" >> SUMR.md\n lines=$(find . -name '*.py' -not -path './.venv/*' -not -path './venv/*' -exec cat {} \\; 2>/dev/null | wc -l)\n echo \"- **total_lines**: $lines\" >> SUMR.md\n echo \"\" >> SUMR.md\n echo \"## Refactoring Analysis\" >> SUMR.md\n echo \"\" >> SUMR.md\n echo \"Run \\`code2llm ./ -f evolution\\` for detailed refactoring queue.\" >> SUMR.md\n echo \"Generated SUMR.md\"\n - |\n python3 -c \"\n import json, os, subprocess\n from pathlib import Path\n from datetime import datetime\n project_name = Path.cwd().name\n py_files = len([f for f in Path('.').rglob('*.py') if not any(x in str(f) for x in ['.venv', 'venv', '__pycache__', '.git'])])\n data = {\n 'project_name': project_name,\n 'report_type': 'SUMR',\n 'generated_at': datetime.now().isoformat(),\n 'metrics': {\n 'python_files': py_files,\n 'has_pyqual_config': Path('pyqual.yaml').exists()\n }\n }\n with open('SUMR.json', 'w') as f:\n json.dump(data, f, indent=2)\n print('Generated SUMR.json')\n \" 2>/dev/null || echo 'Python generation failed, using fallback'\n```",
"level": 2
},
{
"name": "quality pipeline (`pyqual.yaml`)",
"type": "unknown",
"content": "```yaml markpact:pyqual path=pyqual.yaml\npipeline:\n name: quality-loop-with-llx\n\n # Quality gates — pipeline iterates until ALL pass\n metrics:\n cc_max: 15 # cyclomatic complexity per function\n vallm_pass_min: 90 # vallm validation pass rate (%)\n coverage_min: 55 # test coverage (%) — realistic for current codebase\n # Security gates (uncomment to enable):\n # vuln_high_max: 0 # pip-audit high severity CVEs\n # bandit_high_max: 0 # bandit high severity issues\n # secrets_found_max: 0 # trufflehog/gitleaks secrets\n\n # Custom tool definitions\n custom_tools:\n - name: code2llm_vallm\n binary: .venv/bin/code2llm\n command: >-\n .venv/bin/code2llm {workdir} -f toon -o ./project --no-chunk\n --exclude .git venv dist __pycache__ .pytest_cache .mypy_cache .ruff_cache\n .code2llm_cache build *.egg-info\n output: \"\"\n allow_failure: false\n\n - name: vallm_src\n binary: .venv/bin/vallm\n command: >-\n .venv/bin/vallm batch {workdir}/src --recursive --format toon --output ./project\n --exclude .git,venv,dist,__pycache__,.pytest_cache,.mypy_cache,.ruff_cache,\n .code2llm_cache,build,*.egg-info\n output: \"\"\n allow_failure: false\n\n - name: vallm_verify\n binary: .venv/bin/vallm\n command: >-\n .venv/bin/vallm batch {workdir}/src --recursive --no-complexity --format toon --output ./project/verify\n --exclude .git,venv,dist,__pycache__,.pytest_cache,.mypy_cache,.ruff_cache,\n .code2llm_cache,build,*.egg-info\n output: \"\"\n allow_failure: false\n\n # Pipeline stages — use 'tool:' for built-in presets or 'run:' for custom\n stages:\n # Verify/install all tool dependencies before pipeline starts\n - name: setup\n run: |\n set -e\n echo \"=== pyqual dependency check ===\"\n # Python tools (pip)\n for pkg in code2llm vallm prefact llx pytest-cov goal; do\n if python -m pip show \"$pkg\" >/dev/null 2>&1; then\n echo \" ✓ $pkg\"\n else\n echo \" ✗ $pkg — installing…\"\n pip install -q \"$pkg\" || echo \" ⚠ $pkg install failed (optional)\"\n fi\n done\n # Node tools (claude)\n if command -v claude >/dev/null 2>&1; then\n echo \" ✓ claude $(claude --version 2>/dev/null)\"\n else\n echo \" ✗ claude — installing…\"\n npm install -g --prefix=\"$HOME/.local\" @anthropic-ai/claude-code 2>/dev/null \\\n && echo \" ✓ claude installed\" \\\n || echo \" ⚠ claude install failed (fix stage will use llx fallback)\"\n fi\n # Claude Code auth can be either:\n # - local OAuth session via `claude auth login`\n # - ANTHROPIC_API_KEY in CI/GitHub Actions\n # We only verify the CLI is available here.\n echo \"=== setup done ===\"\n when: first_iteration\n timeout: 300\n#\n# - name: analyze\n# tool: code2llm_vallm\n# optional: true\n# when: first_iteration\n# timeout: 0\n#\n# - name: validate\n# tool: vallm_src\n# optional: true\n# timeout: 0\n\n - name: lint\n tool: ruff\n optional: true\n\n - name: test\n run: .venv/bin/python -m pytest -q --tb=short --cov=src/vallm --cov-report=term-missing --cov-report=json:.pyqual/coverage.json\n when: always\n\n - name: prefact\n tool: prefact\n optional: true\n when: metrics_fail\n timeout: 900\n\n # # Claude Code fix — uses Claude Code CLI (Sonnet 4.5) in non-interactive mode\n # # Auth: `claude auth login` (local) or ANTHROPIC_API_KEY (CI)\n # - name: claude_fix\n # run: |\n # export PATH=\"$HOME/.local/bin:$PATH\"\n # ERRORS=\"\"\n # [ -f .pyqual/errors.json ] && ERRORS=$(cat .pyqual/errors.json)\n # [ -f TODO.md ] && ERRORS=\"$ERRORS\n # $(cat TODO.md)\"\n # if timeout 900 claude -p \"Fix all quality gate failures in this Python project. Apply changes directly.\n #\n # $ERRORS\" \\\n # --model sonnet \\\n # --allowedTools \"Edit,Read,Write,Bash(git diff),Bash(python),Bash(pytest -x)\" \\\n # --output-format text; then\n # echo \"Claude Code fix completed.\"\n # else\n # rc=$?\n # echo \"Claude Code exited with $rc (timeout=900s); falling back to llx fix.\"\n # llx fix . --apply --errors .pyqual/errors.json --verbose\n # fi\n # when: metrics_fail\n # timeout: 1200\n\n - name: fix\n tool: llx-fix\n optional: true\n when: metrics_fail\n timeout: 1800\n\n - name: verify\n tool: vallm_verify\n optional: true\n when: after_fix\n timeout: 300\n\n # Simple git push (goal push had \"Argument list too long\" issue with many files)\n - name: push\n run: |\n if [ -n \"$(git status --porcelain)\" ]; then\n git add -A\n git commit -m \"chore: pyqual auto-commit [skip ci]\" 2>/dev/null || true\n git push origin HEAD\n else\n echo \"No changes to push\"\n fi\n when: metrics_pass\n optional: true\n timeout: 120\n\n - name: publish\n run: make publish\n when: metrics_pass\n optional: true\n timeout: 300\n\n # Generate comprehensive markdown report with Mermaid diagram and ASCII flow\n - name: markdown_report\n run: python3 -m pyqual.report_generator\n when: always\n optional: true\n timeout: 30\n\n # Loop behavior\n loop:\n max_iterations: 3\n on_fail: report # report | create_ticket | block\n\n # Environment (optional)\n env:\n LLM_MODEL: openrouter/x-ai/grok-code-fast-1\n LLX_DEFAULT_TIER: balanced\n LLX_VERBOSE: true\n```",
"level": 2
},
{
"name": "configuration",
"type": "configuration",
"content": "```yaml\nproject:\n name: vallm\n version: 0.1.74\n env: local\n```",
"level": 2
},
{
"name": "dependencies",
"type": "dependencies",
"content": "",
"level": 2
},
{
"name": "# runtime",
"type": "unknown",
"content": "```text markpact:deps python\npluggy>=1.6\npydantic>=2.12\npydantic-settings>=2.13\ntyper>=0.12\nrich>=14.3\ntree-sitter>=0.25\ntree-sitter-language-pack>=1.4\nradon>=6.0\nlizard>=1.21\npyflakes>=3.4\n```",
"level": 2
},
{
"name": "# development",
"type": "unknown",
"content": "```text markpact:deps python scope=dev\npytest>=9.0\npytest-cov>=7.0\nruff>=0.15\ntox>=4.0\ngoal>=2.1.174\ncosts>=0.1.48\npfix>=0.1.72\npyqual>=0.1.59\n```",
"level": 2
},
{
"name": "deployment",
"type": "deployment",
"content": "```bash markpact:run\npip install vallm\n\n# development install\npip install -e .[dev]\n```",
"level": 2
},
{
"name": "environment variables (`.env.example`)",
"type": "unknown",
"content": "| Variable | Default | Description |\n|----------|---------|-------------|\n| `VALLM_DEFAULT_TOON_FILENAME` | `validation.toon.yaml` | Output file configurations |\n| `VALLM_DEFAULT_JSON_FILENAME` | `validation.json` | |\n| `VALLM_DEFAULT_YAML_FILENAME` | `validation.yaml` | |\n| `VALLM_DEFAULT_TXT_FILENAME` | `validation.txt` | |\n| `VALLM_OUTPUT_FORMAT` | `rich` | Default behaviors |\n| `VALLM_DEFAULT_LANGUAGE` | `python` | |\n| `VALLM_PASS_THRESHOLD` | `0.8` | Scoring thresholds |\n| `VALLM_REVIEW_THRESHOLD` | `0.5` | |\n| `VALLM_ENABLE_SYNTAX` | `true` | Validator toggles |\n| `VALLM_ENABLE_IMPORTS` | `true` | |\n| `VALLM_ENABLE_COMPLEXITY` | `true` | |\n| `VALLM_ENABLE_SECURITY` | `false` | |\n| `VALLM_ENABLE_REGRESSION` | `false` | |\n| `VALLM_ENABLE_SEMANTIC` | `false` | |\n| `VALLM_MAX_CYCLOMATIC_COMPLEXITY` | `15` | Complexity limits |\n| `VALLM_MAX_COGNITIVE_COMPLEXITY` | `20` | |\n| `VALLM_MAX_FUNCTION_LENGTH` | `100` | |\n| `VALLM_LLM_PROVIDER` | `ollama` | LLM settings (for semantic validator) |\n| `VALLM_LLM_MODEL` | `qwen2.5-coder:7b` | |\n| `VALLM_LLM_BASE_URL` | `http://localhost:11434` | |\n| `VALLM_LLM_TEMPERATURE` | `0.1` | |\n| `VALLM_SANDBOX_BACKEND` | `subprocess` | Sandbox settings |\n| `VALLM_SANDBOX_TIMEOUT` | `30` | |\n| `VALLM_SANDBOX_MEMORY_LIMIT` | `256m` | |\n| `VALLM_SEMANTIC_CACHE_ENABLED` | `true` | Cache settings |\n| `VALLM_SEMANTIC_CACHE_TTL` | `3600` | |\n| `VALLM_MAX_CONCURRENT_VALIDATIONS` | `4` | Performance settings |\n| `VALLM_TIMEOUT_SECONDS` | `300` | |",
"level": 2
},
{
"name": "release management (`goal.yaml`)",
"type": "unknown",
"content": "- **versioning**: `semver`\n- **commits**: `conventional` scope=`vallm`\n- **changelog**: `keep-a-changelog`\n- **build strategies**: `python`, `nodejs`, `rust`\n- **version files**: `VERSION`, `pyproject.toml:version`, `venv/lib/python3.13/site-packages/matplotlib/__init__.py:__version__`",
"level": 2
},
{
"name": "makefile targets",
"type": "unknown",
"content": "- `VENV`\n- `PYTHON`\n- `PIP`\n- `help` — Default target\n- `venv`\n- `VENV_TARGETS`\n- `install`\n- `dev-install`\n- `test`\n- `test-fast` — Fast tests - exclude slow and integration tests\n- `test-slow` — Slow tests only\n- `test-integration` — Integration tests only\n- `test-unit` — Unit tests only\n- `test-cov`\n- `test-toon`\n- `validate-toon`\n- `test-all-formats`\n- `test-comprehensive`\n- `lint`\n- `format`\n- `typecheck`\n- `check`\n- `run`\n- `analyze`\n- `analyze-all`\n- `toon-demo`\n- `toon-compare`\n- `toon-validate`\n- `build`\n- `publish-test`\n- `bump-patch`\n- `bump-minor`\n- `bump-major`\n- `publish`\n- `mermaid-png`\n- `install-mermaid`\n- `check-mermaid`\n- `clean`\n- `clean-png`\n- `quickstart`",
"level": 2
},
{
"name": "code analysis",
"type": "unknown",
"content": "",
"level": 2
},
{
"name": "# `project/map.toon.yaml`",
"type": "unknown",
"content": "```toon markpact:analysis path=project/map.toon.yaml\n# vallm | 116f 14651L | shell:11,python:101,javascript:4 | 2026-04-19\n# stats: 480 func | 0 cls | 116 mod | CC̄=3.3 | critical:2 | cycles:0\n# alerts[5]: fan-out process_ticket_with_redsl=20; fan-out main=19; fan-out run_autonomous_workflow=19; fan-out analyze_with_code2llm=17; CC main=16\n# hotspots[5]: process_ticket_with_redsl fan=20; run_autonomous_workflow fan=19; main fan=19; analyze_with_code2llm fan=17; analyze_with_code2llm fan=16\n# evolution: CC̄ 3.4→3.3 (improved -0.1)\n# Keys: M=modules, D=details, i=imports, e=exports, c=classes, f=functions, m=methods\nM[116]:\n backend/routers/tickets/__init__.py,19\n backend/routers/tickets/crud.py,187\n backend/routers/tickets/models.py,96\n backend/routers/tickets/redsl.py,243\n backend/routers/tickets/webhook.py,92\n examples/__init__.py,1\n examples/01_basic_validation/main.py,77\n examples/02_ast_comparison/main.py,118\n examples/03_security_check/main.py,118\n examples/04_graph_analysis/main.py,158\n examples/05_llm_semantic_review/main.py,125\n examples/05_llm_semantic_review/main_template.py,74\n examples/06_multilang_validation/main.py,217\n examples/06_multilang_validation/main_template.py,74\n examples/07_multi_language/main.py,327\n examples/08_code2llm_integration/main.py,250\n examples/09_code2logic_integration/main.py,298\n examples/10_mcp_ollama_demo/docker-entrypoint.sh,35\n examples/10_mcp_ollama_demo/legacy_code/order_processor.py,131\n examples/10_mcp_ollama_demo/mcp_demo.py,398\n examples/10_mcp_ollama_demo/refactored_output.py,127\n examples/10_mcp_ollama_demo/run.sh,260\n examples/11_claude_code_autonomous/claude_autonomous_demo.py,660\n examples/11_claude_code_autonomous/docker-entrypoint.sh,30\n examples/11_claude_code_autonomous/legacy_code/data_processor.py,224\n examples/11_claude_code_autonomous/run.sh,232\n examples/12_ollama_simple_demo/best_version.py,22\n examples/12_ollama_simple_demo/docker-entrypoint.sh,31\n examples/12_ollama_simple_demo/iteration_1.py,22\n examples/12_ollama_simple_demo/iteration_2.py,22\n examples/12_ollama_simple_demo/legacy_code/simple_buggy.py,112\n examples/12_ollama_simple_demo/ollama_simple_demo.py,338\n examples/12_ollama_simple_demo/run.sh,201\n examples/12_ollama_simple_demo/utils/__init__.py,17\n examples/12_ollama_simple_demo/utils/calculate_total.py,25\n examples/12_ollama_simple_demo/utils/load_config.py,19\n examples/12_ollama_simple_demo/utils/main.py,32\n examples/12_ollama_simple_demo/utils/process_user_input.py,45\n examples/12_ollama_simple_demo/utils/save_data.py,20\n examples/13_batch_processing/main.py,138\n examples/14_api_advanced/main.py,241\n examples/15_cli_usage/main.py,255\n examples/16_configuration/main.py,267\n examples/cycle-test/full-cycle.sh,259\n examples/cycle-test/validate-steps.sh,162\n examples/mcp_demo.py,206\n examples/run.sh,133\n examples/utils/__init__.py,195\n examples/utils/extract_code_from_response.py,32\n examples/utils/extraction.py,79\n examples/utils/logging_utils.py,89\n examples/utils/save_analysis_data.py,25\n examples/utils/validation_runner.py,104\n frontend/e2e/gui-login-enhanced.spec.js,61\n frontend/e2e/loginTestHelpers.js,98\n frontend/src/components/RedslHealthCard.jsx,49\n frontend/src/components/RedslHealthCard.parts.jsx,95\n mcp/__init__.py,1\n mcp/server/__init__.py,1\n mcp/server/_tools_vallm.py,464\n mcp/server/self_server.py,185\n mcp_server.py,28\n project.sh,37\n scripts/bump_version.py,78\n scripts/test_docker_installation.sh,106\n src/vallm/__init__.py,19\n src/vallm/__main__.py,5\n src/vallm/cli/__init__.py,45\n src/vallm/cli/batch_constants.py,23\n src/vallm/cli/batch_processor.py,5\n src/vallm/cli/batch_processor_files.py,25\n src/vallm/cli/batch_processor_filter.py,25\n src/vallm/cli/batch_processor_impl.py,487\n src/vallm/cli/batch_processor_patterns.py,126\n src/vallm/cli/batch_processor_validation.py,78\n src/vallm/cli/batch_utils.py,22\n src/vallm/cli/command_handlers.py,345\n src/vallm/cli/output_formatters/__init__.py,79\n src/vallm/cli/output_formatters/base.py,19\n src/vallm/cli/output_formatters/batch.py,315\n src/vallm/cli/output_formatters/shared.py,63\n src/vallm/cli/output_formatters/single.py,80\n src/vallm/cli/output_formatters/utils.py,11\n src/vallm/config.py,122\n src/vallm/core/__init__.py,3\n src/vallm/core/ast_compare.py,142\n src/vallm/core/gitignore.py,272\n src/vallm/core/graph_diff.py,104\n src/vallm/core/languages.py,227\n src/vallm/core/proposal.py,37\n src/vallm/hookspecs.py,33\n src/vallm/sandbox/__init__.py,1\n src/vallm/sandbox/runner.py,144\n src/vallm/scoring.py,218\n src/vallm/validators/__init__.py,1\n src/vallm/validators/base.py,21\n src/vallm/validators/complexity.py,183\n src/vallm/validators/file_cache.py,82\n src/vallm/validators/imports/__init__.py,25\n src/vallm/validators/imports/base.py,70\n src/vallm/validators/imports/c_imports.py,88\n src/vallm/validators/imports/factory.py,43\n src/vallm/validators/imports/go_imports.py,84\n src/vallm/validators/imports/java_imports.py,68\n src/vallm/validators/imports/javascript_imports.py,118\n src/vallm/validators/imports/python_imports.py,225\n src/vallm/validators/imports/rust_imports.py,78\n src/vallm/validators/imports/utils.py,166\n src/vallm/validators/imports/wrapper.py,30\n src/vallm/validators/lint.py,182\n src/vallm/validators/logical.py,142\n src/vallm/validators/regression.py,265\n src/vallm/validators/security.py,255\n src/vallm/validators/semantic.py,302\n src/vallm/validators/semantic_cache.py,187\n src/vallm/validators/syntax.py,96\nD:\n examples/13_batch_processing/main.py:\n e: main\n main()\n frontend/src/components/RedslHealthCard.jsx:\n i: ../api,./RedslHealthCard.parts,react\n e: RedslHealthCard,handleRefactor,result,h\n RedslHealthCard()\n handleRefactor()\n result()\n h()\n backend/routers/tickets/redsl.py:\n e: process_ticket_with_redsl,_create_pr_for_ticket,get_ticket_processing_status\n process_ticket_with_redsl(ticket_id;data;background_tasks;user;db)\n _create_pr_for_ticket(ticket_id;repo;provider;project_path;decisions;files_modified;token;tenant_id)\n get_ticket_processing_status(ticket_id;user;db)\n frontend/src/components/RedslHealthCard.parts.jsx:\n i: ../constants,./GradeCircle\n e: MetricRow,ok,StatusChecking,StatusUnavailable,StatusLoading,StatusError,HealthContent,grade,score\n MetricRow()\n ok()\n StatusChecking()\n StatusUnavailable()\n StatusLoading()\n StatusError()\n HealthContent()\n grade()\n score()\n src/vallm/validators/imports/python_imports.py:\n e: PythonImportValidator,_collect_guarded_lines,_get_local_modules\n PythonImportValidator(BaseImportValidator): validate(2),_relative_import_exists(3),extract_imports(1),module_exists(1),get_language(0),_get_error_message(1),_get_rule_name(0) # Python-specific import validator...\n _collect_guarded_lines(tree)\n _get_local_modules()\n src/vallm/validators/imports/utils.py:\n e: _is_gitignored,_should_skip_dir,_should_skip_entry,walk,validate_import_path\n _is_gitignored(path;project_root;gitignore_matcher)\n _should_skip_dir(name;skip_tests;skip_hidden)\n _should_skip_entry(path;name;project_root;gitignore_matcher;skip_tests;skip_hidden)\n walk(root;project_root;gitignore_matcher;skip_tests;skip_hidden;max_depth;current_depth)\n validate_import_path(import_path;source_file;project_root;known_modules;stdlib_modules)\n src/vallm/cli/batch_processor_impl.py:\n e: BatchProcessor\n BatchProcessor: __init__(1),process_batch(10),output_batch_results(5),_load_gitignore_parser(1),_build_file_list(2),_parse_filter_patterns(2),_should_exclude_file(2),_matches_include_pattern(2),_load_vallmignore(0),_filter_files(5),_handle_no_files_found(1),_show_validation_start(2),_read_file_text(1),_detect_file_language(1),_show_progress(4),_handle_validation_result(7),_show_verbose_output(3),_process_files(6),_process_files_parallel(4),_validate_single_file(2),_validate_single_file_sequential(3),_process_files_sequential(6) # Handles batch validation of multiple files...\n examples/11_claude_code_autonomous/claude_autonomous_demo.py:\n e: Colors,log_section,log_step,log_code,analyze_with_code2llm,call_claude_code,validate_with_vallm,run_runtime_tests,create_basic_tests,generate_claude_prompt,generate_feedback_prompt,run_autonomous_workflow,main\n Colors:\n log_section(title)\n log_step(step;description)\n log_code(label;code;max_lines)\n analyze_with_code2llm(code_path)\n call_claude_code(prompt;model;temperature)\n validate_with_vallm(code;description)\n run_runtime_tests(code_path;test_file)\n create_basic_tests(code_path;test_file)\n generate_claude_prompt(code;analysis;iteration)\n generate_feedback_prompt(current_code;validation;test_results;analysis)\n run_autonomous_workflow(code_path;max_iterations)\n main()\n examples/utils/__init__.py:\n e: save_analysis_data,run_validation_examples,validate_code_example,print_summary\n save_analysis_data(example_name;result_data)\n run_validation_examples(example_name;good_code;bad_code;complex_code;settings)\n validate_code_example(name;code;settings;all_results;include_issue_details)\n print_summary(all_results)\n examples/10_mcp_ollama_demo/mcp_demo.py:\n e: Colors,log_section,log_step,log_code,analyze_with_code2llm,validate_with_vallm,call_ollama,generate_refactoring_prompt,run_mcp_workflow,main\n Colors:\n log_section(title)\n log_step(step;description)\n log_code(label;code;max_lines)\n analyze_with_code2llm(code_path)\n validate_with_vallm(code;description)\n call_ollama(prompt;model;temperature)\n generate_refactoring_prompt(code;analysis)\n run_mcp_workflow(code_path;max_iterations)\n main()\n examples/utils/validation_runner.py:\n e: run_validation_examples\n run_validation_examples(example_name;good_code;bad_code;complex_code;settings)\n src/vallm/validators/complexity.py:\n e: ComplexityValidator\n ComplexityValidator(BaseValidator): __init__(1),validate(2),_check_python_complexity(1),_check_lizard(3) # Tier 2: Cyclomatic complexity, maintainability index, and fu...\n mcp/server/_tools_vallm.py:\n e: _format_issue,_compute_verdict,_run_validators,_build_pipeline_response,_build_validator_response,_build_error_response,validate_syntax,validate_imports,validate_security,validate_code,handle_validate_syntax,handle_validate_imports,handle_validate_security,handle_validate_code\n _format_issue(issue)\n _compute_verdict(overall_score;error_count)\n _run_validators(proposal;enable_syntax;enable_imports;enable_security;enable_complexity;enable_regression;reference_code)\n _build_pipeline_response(results;total_weight;verdict;all_issues)\n _build_validator_response(result;validator_name)\n _build_error_response(error;validator_name)\n validate_syntax(code;language;filename)\n validate_imports(code;language;filename)\n validate_security(code;language;filename)\n validate_code(code;language;filename;reference_code;enable_syntax;enable_imports;enable_security;enable_complexity;enable_regression)\n handle_validate_syntax(params)\n handle_validate_imports(params)\n handle_validate_security(params)\n handle_validate_code(params)\n examples/05_llm_semantic_review/main.py:\n e: main\n main()\n examples/07_multi_language/main.py:\n e: test_language_detection,validate_single_language,validate_all_languages,save_results,print_language_info,main\n test_language_detection()\n validate_single_language(lang_name;code;is_bad)\n validate_all_languages()\n save_results(results)\n print_language_info()\n main()\n src/vallm/core/gitignore.py:\n e: GitignoreParser,load_gitignore,get_default_excludes,create_default_gitignore_parser,should_exclude\n GitignoreParser: __init__(1),_parse(1),matches(1),_match_pattern(3),_fnmatch(2),_pattern_to_regex(1) # Parse .gitignore files and match paths against patterns...\n load_gitignore(path)\n get_default_excludes()\n create_default_gitignore_parser()\n should_exclude(path;gitignore_parser;use_defaults)\n examples/09_code2logic_integration/main.py:\n e: analyze_with_code2logic,validate_with_vallm,build_call_graph,generate_report,visualize_flow,main\n analyze_with_code2logic(code)\n validate_with_vallm(code)\n build_call_graph(code)\n generate_report(code2logic_result;vallm_result;graph_result;output_path)\n visualize_flow(code;output_path)\n main()\n examples/11_claude_code_autonomous/legacy_code/data_processor.py:\n e: DataProcessor,ReportGenerator,load_config,init_database,main\n DataProcessor: __init__(0),process_user_data(1),calculate_metrics(1),export_data(2),validate_email(1),validate_email_again(1),process_with_external_api(1),complex_calculation(10),unused_function(0),another_unused_function(2) # Data processor with multiple responsibilities - violates SRP...\n ReportGenerator: __init__(1),generate_report(0),export_report(1) # Report generator with tight coupling to DataProcessor...\n load_config()\n init_database()\n main()\n examples/10_mcp_ollama_demo/legacy_code/order_processor.py:\n e: OrderManager,process_order,load_config,save_data,calculate,validate_email_1,validate_email_2,calculate_shipping,dead_code\n OrderManager: __init__(0),add_order(1),execute_query(1),process_payment(2),send_email(3),get_stats(0) # Class with mixed responsibilities - SOLID violation...\n process_order(data)\n load_config()\n save_data(data;filename)\n calculate(x;y;z;a;b;c)\n validate_email_1(email)\n validate_email_2(email)\n calculate_shipping(weight)\n dead_code()\n src/vallm/cli/batch_processor_filter.py:\n e: parse_filter_patterns,should_exclude_file,matches_include_pattern\n parse_filter_patterns(include;exclude)\n should_exclude_file(file_path;compiled)\n matches_include_pattern(file_path;compiled)\n src/vallm/cli/output_formatters/batch.py:\n e: output_batch_results,output_batch_empty,_toon_row,_split_toon_results,_ordered_unsupported_items,_unsupported_bucket,_build_unsupported_summary,_print_toon_file_section,_print_toon_unsupported_section,output_batch_rich,output_batch_text,output_batch_json,output_batch_yaml,output_batch_toon,print_summary_header,build_results_table\n output_batch_results(results_by_language;filtered_files;passed_count;failed_files;output_format)\n output_batch_empty(output_format)\n _toon_row(values)\n _split_toon_results(files_details)\n _ordered_unsupported_items(unsupported_counts)\n _unsupported_bucket(file_path)\n _build_unsupported_summary(failed_files)\n _print_toon_file_section(title;files)\n _print_toon_unsupported_section(unsupported_counts)\n output_batch_rich(results_by_language;filtered_files;passed_count;failed_files)\n output_batch_text(results_by_language;filtered_files;passed_count;failed_files)\n output_batch_json(results_by_language;filtered_files;passed_count;failed_files)\n output_batch_yaml(results_by_language;filtered_files;passed_count;failed_files)\n output_batch_toon(results_by_language;filtered_files;passed_count;failed_files)\n print_summary_header()\n build_results_table(results_by_language)\n examples/04_graph_analysis/main.py:\n e: main\n main()\n examples/12_ollama_simple_demo/utils/process_user_input.py:\n e: process_user_input\n process_user_input(user_input)\n examples/12_ollama_simple_demo/ollama_simple_demo.py:\n e: Colors,log_section,log_step,analyze_with_code2llm,call_ollama,validate_with_vallm,run_simple_test,generate_ollama_prompt,run_simple_workflow,main\n Colors:\n log_section(title)\n log_step(step;description)\n analyze_with_code2llm(code_path)\n call_ollama(prompt;model)\n validate_with_vallm(code)\n run_simple_test(code)\n generate_ollama_prompt(code;analysis)\n run_simple_workflow(code_path;max_iterations)\n main()\n examples/10_mcp_ollama_demo/refactored_output.py:\n e: OrderManager,validate_email,calculate_shipping,load_config,save_data,process_order,main\n OrderManager: __init__(0),add_order(1),validate_order(1),execute_query(1),process_payment(2),send_email(3),get_stats(0) # Class with single responsibility - adheres to SOLID principl...\n validate_email(email)\n calculate_shipping(weight)\n load_config()\n save_data(data;filename)\n process_order(data)\n main()\n src/vallm/validators/security.py:\n e: SecurityValidator\n SecurityValidator(BaseValidator): validate(2),_check_patterns(2),_check_python_ast(1),_get_func_name(0),_try_bandit(0) # Tier 2: Security analysis using built-in patterns and option...\n src/vallm/validators/lint.py:\n e: LintValidator,create_validator\n LintValidator: __init__(1),validate(2),_check_ruff(1),_parse_ruff_result(1),_parse_ruff_text(1) # Validator for linting issues using ruff...\n create_validator(settings)\n src/vallm/core/graph_diff.py:\n e: GraphDiffResult,diff_graphs,diff_python_code,_diff_list\n GraphDiffResult: # Result of comparing two code graphs...\n diff_graphs(before;after)\n diff_python_code(before_code;after_code)\n _diff_list(before;after;added)\n src/vallm/cli/batch_processor_files.py:\n e: build_file_list\n build_file_list(paths;recursive)\n backend/routers/tickets/webhook.py:\n e: handle_pr_webhook,bulk_close_tickets,bulk_reprocess_tickets\n handle_pr_webhook(payload;db)\n bulk_close_tickets(ticket_ids;user;db)\n bulk_reprocess_tickets(ticket_ids;user;db)\n examples/15_cli_usage/main.py:\n e: run_cli_command,demo_single_file_validation,demo_batch_validation,demo_output_formats,demo_programmatic_cli,demo_check_command,main\n run_cli_command(cmd)\n demo_single_file_validation()\n demo_batch_validation()\n demo_output_formats()\n demo_programmatic_cli()\n demo_check_command()\n main()\n examples/12_ollama_simple_demo/legacy_code/simple_buggy.py:\n e: BadClass,process_user_input,load_config,save_data,calculate_total,duplicate_function,duplicate_function,unused_function,main\n BadClass: __init__(0),process_data(1),another_method(0) # Class with multiple issues...\n process_user_input(user_input)\n load_config()\n save_data(data;filename)\n calculate_total(items)\n duplicate_function()\n duplicate_function()\n unused_function()\n main()\n examples/08_code2llm_integration/main.py:\n e: create_sample_project,analyze_with_code2llm,validate_with_vallm,generate_report,main\n create_sample_project(base_path)\n analyze_with_code2llm(project_path)\n validate_with_vallm(project_path)\n generate_report(code2llm_result;vallm_result;output_path)\n main()\n src/vallm/cli/batch_processor_patterns.py:\n e: _CompiledPatterns,_compile_patterns,parse_filter_patterns,matches_pattern,should_exclude_file,matches_include_pattern,filter_files\n _CompiledPatterns: __init__(3) # Pre-compiled pattern set: exact names in a frozenset, globs ...\n _compile_patterns(raw)\n parse_filter_patterns(include;exclude)\n matches_pattern(path;compiled)\n should_exclude_file(path;exclude_patterns)\n matches_include_pattern(path;include_patterns)\n filter_files(files;include;exclude;gitignore_parser;use_gitignore;console)\n src/vallm/cli/output_formatters/shared.py:\n e: format_error_message,build_files_data,build_failed_files_data,_toon_today\n format_error_message(error)\n build_files_data(results_by_language)\n build_failed_files_data(failed_files)\n _toon_today()\n src/vallm/cli/command_handlers.py:\n e: validate_command,check_command,batch_command,info_command,_load_code,_load_reference,_detect_and_log_language,_build_proposal,_exit_on_verdict,_show_language_info,_show_general_info\n validate_command(code;file;language;reference;config;enable_semantic;enable_security;enable_regression;model;output_format;verbose;exit_on_verdict)\n check_command(code;file;language;output_format)\n batch_command(paths;recursive;include;exclude;no_gitignore;enable_semantic;enable_security;enable_regression;no_imports;no_complexity;model;format_;output;fail_fast;verbose;show_issues)\n info_command(language;clear_cache)\n _load_code(file;code)\n _load_reference(reference)\n _detect_and_log_language(file;language)\n _build_proposal(code_str;detected_language;ref_code;file)\n _exit_on_verdict(result)\n _show_language_info(language)\n _show_general_info()\n examples/utils/extraction.py:\n e: extract_code_from_response,extract_json_from_response\n extract_code_from_response(response;language)\n extract_json_from_response(response)\n examples/14_api_advanced/main.py:\n e: demo_proposal_creation,demo_settings_customization,demo_result_interpretation,demo_workflow_integration,main\n demo_proposal_creation()\n demo_settings_customization()\n demo_result_interpretation()\n demo_workflow_integration()\n main()\n src/vallm/validators/regression.py:\n e: RegressionValidator\n RegressionValidator(BaseValidator): __init__(3),validate(2),_resolve_test_dir(1),_write_code(2),_build_pytest_cmd(2),_run_pytest(3),_interpret(1),_parse_failures(1),_timeout_result(0),_exception_result(1) # Tier 2: Run pytest against proposed code and report pass/fai...\n src/vallm/validators/imports/java_imports.py:\n e: JavaImportValidator\n JavaImportValidator(BaseImportValidator): get_language(0),_get_error_message(1),_get_rule_name(0),extract_imports(1),module_exists(1) # Java import validator...\n src/vallm/scoring.py:\n e: Verdict,Severity,Issue,ValidationResult,PipelineResult,compute_verdict,validate,_initialize_settings,_initialize_context,_initialize_validators,_run_validation_pipeline,_get_default_validators\n Verdict(Enum):\n Severity(Enum):\n Issue: __str__(0) # A single issue found during validation...\n ValidationResult: # Result from a single validator...\n PipelineResult: # Aggregated result from all validators...\n compute_verdict(results;settings;filename)\n validate(proposal;settings;validators;context)\n _initialize_settings(settings)\n _initialize_context(context)\n _initialize_validators(validators;settings)\n _run_validation_pipeline(proposal;validators;context;settings)\n _get_default_validators(settings)\n src/vallm/cli/batch_processor_validation.py:\n e: validate_single_file,process_files\n validate_single_file(file_path;settings)\n process_files(files;settings;output_format;fail_fast;verbose;show_issues)\n backend/routers/tickets/crud.py:\n e: create_new_ticket,list_tickets,get_stats,search_tickets_endpoint,get_tickets_for_repo,get_action_required_tickets,get_single_ticket,update_existing_ticket,delete_existing_ticket\n create_new_ticket(data;user;db)\n list_tickets(status;user;db)\n get_stats(user;db)\n search_tickets_endpoint(q;user;db)\n get_tickets_for_repo(repo;user;db)\n get_action_required_tickets(user;db)\n get_single_ticket(ticket_id;user;db)\n update_existing_ticket(ticket_id;data;user;db)\n delete_existing_ticket(ticket_id;user;db)\n examples/16_configuration/main.py:\n e: demo_config_file,demo_environment_variables,demo_runtime_configuration,demo_profile_switching,demo_threshold_configuration,main\n demo_config_file()\n demo_environment_variables()\n demo_runtime_configuration()\n demo_profile_switching()\n demo_threshold_configuration()\n main()\n src/vallm/validators/logical.py:\n e: LogicalErrorValidator,create_validator\n LogicalErrorValidator: __init__(1),validate(2),_check_pyflakes(1),_parse_pyflakes_line(1) # Validator for logical errors using pyflakes...\n create_validator(settings)\n src/vallm/cli/batch_utils.py:\n e: CompiledPatterns,compile_patterns\n CompiledPatterns(NamedTuple):\n compile_patterns(raw)\n src/vallm/core/languages.py:\n e: Language,detect_language,get_language_for_validation\n Language(Enum): __init__(3),from_extension(1),from_path(1),from_string(1) # Supported programming languages with their tree-sitter ident...\n detect_language(source)\n get_language_for_validation(source;explicit)\n src/vallm/cli/output_formatters/single.py:\n e: output_json,output_text,output_rich\n output_json(result)\n output_text(result)\n output_rich(result;verbose)\n mcp/server/self_server.py:\n e: handle_initialize,handle_tools_list,handle_tools_call,handle_request,main\n handle_initialize(request_id)\n handle_tools_list(request_id)\n handle_tools_call(request_id;params)\n handle_request(request)\n main()\n examples/03_security_check/main.py:\n e: main\n main()\n src/vallm/validators/semantic_cache.py:\n e: SemanticCache,get_semantic_cache,clear_semantic_cache\n SemanticCache: __init__(1),_get_cache_key(3),get(3),set(4),clear(0),get_cache_stats(0) # Cache for semantic validation results to improve performance...\n get_semantic_cache()\n clear_semantic_cache()\n src/vallm/validators/semantic.py:\n e: SemanticValidator\n SemanticValidator(BaseValidator): __init__(1),validate(2),_build_prompt(1),_call_llm(1),_call_ollama(1),_call_litellm(1),_call_http(1),_parse_response(1),_extract_json_from_response(1),_create_parse_error_result(1),_create_json_error_result(1),_parse_scores(1),_parse_issues(1),_parse_severity(1),_parse_line_number(1) # Tier 3: LLM-as-judge semantic code review...\n src/vallm/validators/imports/javascript_imports.py:\n e: JavaScriptImportValidator\n JavaScriptImportValidator(BaseImportValidator): __init__(1),validate(2),extract_imports(1),module_exists(1),get_language(0),_get_error_message(1),_get_rule_name(0) # JavaScript/TypeScript import validator...\n src/vallm/validators/imports/go_imports.py:\n e: GoImportValidator\n GoImportValidator(BaseImportValidator): get_language(0),_get_error_message(1),_get_rule_name(0),extract_imports(1),module_exists(1) # Go import validator...\n src/vallm/validators/imports/c_imports.py:\n e: CImportValidator\n CImportValidator(BaseImportValidator): __init__(1),validate(2),extract_imports(1),module_exists(1) # C/C++ import validator...\n scripts/bump_version.py:\n e: bump_version,main\n bump_version(version_str;bump_type)\n main()\n frontend/e2e/loginTestHelpers.js:\n e: FRONTEND_URL,MOCK_GITHUB_URL,attemptLogin,element,attemptUserLogin,element,checkLoginStatus,testOAuthFlow,loginClicked,userButtonClicked,isLoggedIn\n FRONTEND_URL()\n MOCK_GITHUB_URL()\n attemptLogin()\n element()\n attemptUserLogin()\n element()\n checkLoginStatus()\n testOAuthFlow()\n loginClicked()\n userButtonClicked()\n isLoggedIn()\n examples/06_multilang_validation/main.py:\n e: main\n main()\n src/vallm/validators/syntax.py:\n e: SyntaxValidator\n SyntaxValidator(BaseValidator): validate(2),_validate_python(1),_validate_treesitter(2) # Tier 1: Fast syntax validation...\n src/vallm/core/ast_compare.py:\n e: _cached_get_parser,parse_code,parse_python_ast,normalize_python_ast,python_ast_similarity,tree_sitter_node_count,tree_sitter_error_count,structural_diff_summary\n _cached_get_parser(language)\n parse_code(code;language)\n parse_python_ast(code)\n normalize_python_ast(tree)\n python_ast_similarity(code1;code2)\n tree_sitter_node_count(code;language)\n tree_sitter_error_count(code;language)\n structural_diff_summary(code1;code2;language)\n src/vallm/cli/output_formatters/base.py:\n e: output_validate_result,output_batch_results\n output_validate_result(result;output_format;verbose)\n output_batch_results(results_by_language;filtered_files;passed_count;failed_files;output_format)\n src/vallm/cli/output_formatters/__init__.py:\n e: _toon_today,output_validate_result,output_batch_results\n _toon_today()\n output_validate_result(result;output_format;verbose)\n output_batch_results(results_by_language;filtered_files;passed_count;failed_files;output_format)\n src/vallm/sandbox/runner.py:\n e: ExecutionResult,SandboxRunner\n ExecutionResult: # Result of sandboxed code execution...\n SandboxRunner: __init__(1),run(2),_run_subprocess(2),_run_docker(2) # Unified interface for running code in a sandbox...\n backend/routers/tickets/models.py:\n e: TicketCreate,TicketUpdate,TicketResponse,TicketListResponse,TicketStatsResponse,RedslAutoPRRequest,RedslAutoPRResponse,_get_tenant_for_user\n TicketCreate(BaseModel):\n TicketUpdate(BaseModel):\n TicketResponse(BaseModel):\n TicketListResponse(BaseModel):\n TicketStatsResponse(BaseModel):\n RedslAutoPRRequest(BaseModel):\n RedslAutoPRResponse(BaseModel):\n _get_tenant_for_user(user;db)\n frontend/e2e/gui-login-enhanced.spec.js:\n i: ./loginTestHelpers,@playwright/test\n e: res,result,result,result,loginElement,content,currentUrl,isLoggedIn\n res()\n result()\n result()\n result()\n loginElement()\n content()\n currentUrl()\n isLoggedIn()\n examples/12_ollama_simple_demo/utils/calculate_total.py:\n e: calculate_total\n calculate_total(items)\n examples/mcp_demo.py:\n e: example_syntax_validation,example_security_validation,example_full_pipeline,example_selective_validation,main\n example_syntax_validation()\n example_security_validation()\n example_full_pipeline()\n example_selective_validation()\n main()\n examples/utils/extract_code_from_response.py:\n e: extract_code_from_response\n extract_code_from_response(response)\n src/vallm/validators/file_cache.py:\n e: FileValidationCache,get_file_cache,clear_file_cache\n FileValidationCache: __init__(0),_key(0),get(1),set(2),clear(0) # In-memory cache keyed on file path + mtime + size...\n get_file_cache()\n clear_file_cache()\n src/vallm/validators/imports/base.py:\n e: BaseImportValidator\n BaseImportValidator(ABC): validate(2),extract_imports(1),module_exists(1),get_language(0),_get_error_message(1),_get_rule_name(0),create_validation_result(4) # Base class for all import validators...\n src/vallm/validators/imports/rust_imports.py:\n e: RustImportValidator\n RustImportValidator(BaseImportValidator): get_language(0),_get_error_message(1),_get_rule_name(0),extract_imports(1),module_exists(1) # Rust import validator...\n src/vallm/cli/output_formatters/utils.py:\n e: format_error_message,build_files_data,build_failed_files_data\n format_error_message(error)\n build_files_data(results_by_language)\n build_failed_files_data(failed_files)\n src/vallm/config.py:\n e: VallmSettings,get_settings,reload_settings,get_default_filenames,get_default_output_format,get_default_language\n VallmSettings(BaseSettings): from_toml(1) # vallm configuration with layered sources: defaults → TOML → ...\n get_settings()\n reload_settings()\n get_default_filenames()\n get_default_output_format()\n get_default_language()\n examples/05_llm_semantic_review/main_template.py:\n e: main\n main()\n examples/01_basic_validation/main.py:\n e: main\n main()\n examples/06_multilang_validation/main_template.py:\n e: main\n main()\n examples/02_ast_comparison/main.py:\n e: main\n main()\n examples/utils/logging_utils.py:\n e: Colors,log_section,log_step,log_code,log_result\n Colors: # ANSI color codes for terminal output...\n log_section(title)\n log_step(step;description)\n log_code(label;code;max_lines)\n log_result(status;message)\n src/vallm/validators/imports/wrapper.py:\n e: ImportValidator\n ImportValidator(BaseValidator): validate(2) # Backward compatibility wrapper for the refactored import val...\n src/vallm/validators/imports/factory.py:\n e: ImportValidatorFactory\n ImportValidatorFactory: create_validator(1),supported_languages(0),register_validator(2) # Factory for creating language-specific import validators...\n examples/12_ollama_simple_demo/iteration_1.py:\n e: main\n main()\n examples/12_ollama_simple_demo/best_version.py:\n e: main\n main()\n examples/12_ollama_simple_demo/iteration_2.py:\n e: main\n main()\n examples/12_ollama_simple_demo/utils/load_config.py:\n e: load_config\n load_config()\n examples/12_ollama_simple_demo/utils/main.py:\n e: run_demo_main\n run_demo_main()\n examples/12_ollama_simple_demo/utils/save_data.py:\n e: save_data\n save_data(data;filename)\n examples/utils/save_analysis_data.py:\n e: save_analysis_data\n save_analysis_data(example_name;result_data)\n src/vallm/hookspecs.py:\n e: VallmSpec\n VallmSpec: validate_proposal(2),get_validator_name(0),get_validator_tier(0) # Hook specifications that validators must implement...\n src/vallm/validators/base.py:\n e: BaseValidator\n BaseValidator(ABC): validate(2) # Base class for all vallm validators...\n project.sh:\n mcp_server.py:\n backend/routers/tickets/__init__.py:\n examples/run.sh:\n e: run_example\n run_example()\n examples/__init__.py:\n examples/cycle-test/full-cycle.sh:\n e: semcod,print\n semcod()\n print()\n examples/cycle-test/validate-steps.sh:\n e: check,semcod\n check()\n semcod()\n examples/11_claude_code_autonomous/run.sh:\n e: print_section,print_step,print_success,print_warning,print_error\n print_section()\n print_step()\n print_success()\n print_warning()\n print_error()\n examples/11_claude_code_autonomous/docker-entrypoint.sh:\n examples/12_ollama_simple_demo/run.sh:\n examples/12_ollama_simple_demo/docker-entrypoint.sh:\n examples/12_ollama_simple_demo/utils/__init__.py:\n examples/10_mcp_ollama_demo/docker-entrypoint.sh:\n examples/10_mcp_ollama_demo/run.sh:\n e: print_section,print_step,print_success,print_warning,print_error,print,print,print,print\n print_section()\n print_step()\n print_success()\n print_warning()\n print_error()\n print()\n print()\n print()\n print()\n src/vallm/cli/__init__.py:\n src/vallm/__init__.py:\n src/vallm/__main__.py:\n src/vallm/validators/__init__.py:\n src/vallm/validators/imports/__init__.py:\n src/vallm/core/__init__.py:\n src/vallm/core/proposal.py:\n e: Proposal\n Proposal: # A code proposal to be validated.\n\nAttributes:\n code: The ...\n src/vallm/cli/batch_constants.py:\n src/vallm/cli/batch_processor.py:\n src/vallm/sandbox/__init__.py:\n scripts/test_docker_installation.sh:\n e: print_status,print_warning,print_error,test_image\n print_status()\n print_warning()\n print_error()\n test_image()\n mcp/__init__.py:\n mcp/server/__init__.py:\n```",
"level": 2
},
{
"name": "intent",
"type": "intent",
"content": "A complete toolkit for validating LLM-generated code",
"level": 2
}
]
}