v0.1.3 now available

Catch breaking API
changes before merge

ImpactGuard analyzes your code across 14+ programming languages, detects breaking changes, quantifies risk with the S×E×C×λ model, and auto-generates patches.

Get Started
$pip install impactguard
MIT Licensed · Python 3.11+
terminal
$ impactguard check-commits HEAD~1 HEAD
Analyzing API changes...
Extracted 47 signatures from HEAD~1
Extracted 49 signatures from HEAD
Found 3 breaking changes
⚠ Breaking Change Detected:
Function: process_data(data, options)
Change: Required parameter 'options' removed
Risk: HIGH (S=1.0 × E=0.8 × C=0.95 × λ=1.0 = 0.76)

Everything you need for API stability

A complete toolkit for detecting, analyzing, and fixing API breaking changes across your entire codebase.

Multi-Language Extraction

Automatically extract function signatures from Python, TypeScript, JavaScript, Java, Kotlin, Go, Rust, Swift, C/C++, C#, Ruby, Haskell, and Zig.

Semantic API Diffing

Classify changes into breaking vs non-breaking categories. Understand the difference between removing parameters and adding optional ones.

Risk Assessment

Quantify danger using the S×E×C×λ model: Severity × Exposure × Confidence × Lambda for accurate risk scoring.

Impact Analysis

Correlate signature changes with static call-site extraction and optional runtime tracing to identify affected downstream code.

Automated Remediation

Generate format-preserving patches using LibCST to automatically fix broken call sites in your codebase.

Call-Site Analysis

Deep module analysis tracks imports and assignments to resolve method calls to their actual definitions with FQN resolution.

CI/CD Integration

Block or permit CI/CD pipelines automatically based on risk levels. Install git hooks with a single command.

Git Hooks

Pre-commit and post-commit hooks using the pre-commit framework. Catch breaking changes before they reach your main branch.

14+ Languages Supported

Powered by tree-sitter grammars for accurate, battle-tested AST parsing with regex fallback when needed.

LanguageType AnnotationsStatus
PythonStable
TypeScriptStable
JavaScriptStable
JavaStable
KotlinStable
GoStable
RustStable
SwiftStable
CStable
C++Stable
C#Stable
RubyStable
HaskellStable
ZigStable

Install tree-sitter support with pip install "impactguard[languages]"

Pipe-and-Filter Architecture

Artifacts from one stage inform the next, creating a comprehensive analysis pipeline.

01

Signature Extraction

Deep inspection of source files using AST for Python and tree-sitter grammars for all other languages. Extracts function metadata including FQN, parameters, defaults, and decorators.

Output:.signatures.json
02

Semantic Comparison

Performs semantic diff between two snapshots. Categorizes changes into Breaking (removing parameters, reordering) vs Non-breaking (adding optional args).

Output:Change classification
03

Impact & Risk Analysis

Correlates API changes with call sites. Integrates runtime data to provide context on execution frequency. Applies S×E×C×λ risk scoring.

Output:Risk assessment
04

Remediation

Generates format-preserving patches using LibCST. Provides high-level suggestions and precise code transformations to fix broken call sites.

Output:Patch files

Quantitative Risk Framework

Transform raw signature changes into actionable risk levels using the S×E×C×λ model.

S×E×C×λ=Risk Score
S

Severity

0.1 – 1.0

Score based on change type. REMOVED = 1.0, ADDED = 0.1

E

Exposure

0.0 – 1.0

Logarithmic scale mapping call counts to exposure level

C

Confidence

0.0 – 1.0

Measures data reliability based on sample size threshold

λ

Lambda

0.5 – 2.0

Sensitivity multiplier. Higher = more sensitive detection

Risk Classification

HIGH

Blocks CI/CD pipeline

Exit code 1
MEDIUM

Requires review

Warning issued
LOW

Safe to proceed

Exit code 0
UNKNOWN

Insufficient data

Warning issued

Powerful CLI

The impactguard command-line tool is your primary entry point for analysis and automation.

Quick Check

Compare two versions of your code

$ impactguard check-commits HEAD~1 HEAD

Extract Signatures

Extract function metadata from source files

$ impactguard extract $(git ls-files '*.py')

Install Git Hooks

Set up pre-commit and post-commit hooks

$ impactguard install-hooks . --both

Generate Report

Create HTML report from risk analysis

$ impactguard report risk.json output.html

Python API

example.py
from impactguard import run_pipeline

# Full pipeline analysis
result = run_pipeline(
    old_files=["old/"],
    new_files=["new/"],
    suggest_patch=True,
)

# Access results
print(f"Breaking: {len(
    result['comparison']['breaking']
)}")

Also available:

  • quick_check() — Extract + compare only
  • run_pipeline_git() — Compare git commits
  • ImpactGuard class — Full control

Start protecting your APIs today

ImpactGuard is open source and free to use. Install it now and catch breaking changes before they reach production.

MIT Licensed
Python 3.11+
14+ Languages
CI/CD Ready