Skip to main content

Module engine

Module engine 

Source
Expand description

Fix engine: maps analysis violations to concrete text edits.

Two-tier approach:

  1. Pattern-based: deterministic renames/removals driven by incident variables
  2. LLM-assisted: complex structural changes sent to an LLM endpoint

The engine is language-agnostic. Language-specific operations (attribute removal, import deduplication, path skipping, dependency management) are delegated to a LanguageFixProvider implementation.

Functionsยง

apply_fixes
Apply a fix plan to disk.
consolidate_family_requests
Consolidate LLM fix requests by component family when a family-level strategy exists. Multiple rules targeting the same (file, family) are merged into a single request with a unified message containing the target component structure and all incident variables.
plan_fixes
Build a fix plan from analysis output.
preview_fixes
Generate a unified diff preview of the planned changes.