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.
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.
| Language | Type Annotations | Status |
|---|---|---|
| Python | Stable | |
| TypeScript | Stable | |
| JavaScript | Stable | |
| Java | Stable | |
| Kotlin | Stable | |
| Go | Stable | |
| Rust | Stable | |
| Swift | Stable | |
| C | Stable | |
| C++ | Stable | |
| C# | Stable | |
| Ruby | Stable | |
| Haskell | Stable | |
| Zig | Stable |
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.
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.
.signatures.jsonSemantic Comparison
Performs semantic diff between two snapshots. Categorizes changes into Breaking (removing parameters, reordering) vs Non-breaking (adding optional args).
Change classificationImpact & Risk Analysis
Correlates API changes with call sites. Integrates runtime data to provide context on execution frequency. Applies S×E×C×λ risk scoring.
Risk assessmentRemediation
Generates format-preserving patches using LibCST. Provides high-level suggestions and precise code transformations to fix broken call sites.
Patch filesQuantitative Risk Framework
Transform raw signature changes into actionable risk levels using the S×E×C×λ model.
Severity
0.1 – 1.0Score based on change type. REMOVED = 1.0, ADDED = 0.1
Exposure
0.0 – 1.0Logarithmic scale mapping call counts to exposure level
Confidence
0.0 – 1.0Measures data reliability based on sample size threshold
Lambda
0.5 – 2.0Sensitivity multiplier. Higher = more sensitive detection
Risk Classification
Blocks CI/CD pipeline
Exit code 1Requires review
Warning issuedSafe to proceed
Exit code 0Insufficient data
Warning issuedPowerful 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 HEADExtract 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 . --bothGenerate Report
Create HTML report from risk analysis
$ impactguard report risk.json output.htmlPython API
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 - •
ImpactGuardclass — 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.