DEV Community

Cover image for Improving Python AST Parsing for Multi-File Code Edits in LuxurAI Coder
Achyut Srivastava
Achyut Srivastava

Posted on

Improving Python AST Parsing for Multi-File Code Edits in LuxurAI Coder

What We Built Today

Today, I improved LuxurAI Coder’s Python AST parsing pipeline for multi-file code edits and sandbox test runners. This ensures syntax integrity and test reliability across complex Python projects.

The Problem We Solved

Editing multi-file Python projects often leads to broken imports or missed dependencies. Traditional diffs lack context, making it hard to maintain codebase integrity.

How The Architecture Works

Our multi-stage pipeline:

  1. Dependency Mapping: Uses AST traversal to map imports and dependencies across files.
  2. Syntax Validation: Checks syntax integrity before applying changes.
  3. Sandbox Testing: Runs tests in an isolated worker, feeding runtime errors back into the agent for self-healing loops.

Transparent Economics

LuxurAI operates on a transparent ₹0.25/credit pricing model, ensuring affordability for developers worldwide.

How We Can Make This Better

This is still experimental, and I’m debugging edge cases like circular imports and large repository traversal overhead. I’d love feedback from Python devs on improving sandbox test runners or AST parsing accuracy.

Try LuxurAI Coder today: https://luxurai.in

Top comments (0)