How thrisha2812/logicflow works
LogicFlow has two code paths: a Python test-driven repair loop that proposes and validates fixes, and a separate C build-error extractor that emits function context as JSON. The main loop owns test execution, file changes, and calls to inference; inference owns the Ollama request. The extractor runner owns parsing compiler logs and reading/writing its inputs and output. The extractor is not shown wired into the repair loop. Edges reflect the sampled source and README; unsampled behavior is not inferred.
Main entry points: extractor_runner.py Extractor CLI · main.py Repair loop · run_inference.py Fix generation · tree_sitter_extractor.py Syntax extractor
Components 13
Automated repair
- Repair loop
main.py - Pytest runner
main.py - Sample tests
data/samples/test_calculator.py - Target code
data/samples/calculator.py
AI inference
- Fix generation
inference/run_inference.py - Ollama model
Error extraction
- Extractor CLI
extractor_runner.py - Syntax extractor
inference/tree_sitter_extractor.py - Tree-sitter
- Build log
- C source
data/samples/test.c - JSON output
Other components
- Developer
Connections 12
- Developer → Repair loop: starts
README.md - Repair loop → Pytest runner: runs tests
main.py - Pytest runner → Sample tests: tests
main.py - Repair loop → Target code: reads and writes
main.py - Repair loop → Fix generation: requests fixes
main.py - Fix generation → Ollama model: requests completion
inference/run_inference.py - Developer → Extractor CLI: runs CLI
extractor_runner.py - Extractor CLI → Build log: reads
extractor_runner.py - Extractor CLI → C source: reads
extractor_runner.py - Extractor CLI → Syntax extractor: extracts context
extractor_runner.py - Syntax extractor → Tree-sitter: parses syntax
inference/tree_sitter_extractor.py - Extractor CLI → JSON output: writes
extractor_runner.py