AIRL Patch Engine - Semantic patch operations on IR graphs.
Provides the core editing interface for AI agents: instead of rewriting entire modules, agents produce small semantic patches that are validated, applied, and can be inverted.
Key property
Every patch can be inverted exactly:
apply(inverse(p), apply(p, module)) == module
This is verified by property tests.
Modules
- [
ops] — [Patch] and [PatchOp] type definitions - [
apply] — forward application of patches - [
inverse] — compute undo patches before applying - [
validate] — structural checks before application - [
traverse] — IR tree walking helpers - [
impact] — analysis of which functions a patch affects