legalis-diff
Statute diffing and change detection for Legalis-RS.
Overview
legalis-diff provides tools for comparing statute versions, detecting changes, and assessing the impact of legislative amendments.
Features
- Structural Diff: Compare statute structure (conditions, effects, metadata)
- Change Categorization: Classify changes as added, removed, or modified
- Impact Assessment: Evaluate severity of changes (minor, moderate, major, breaking)
- Change Reports: Generate human-readable diff reports
Usage
use ;
use Statute;
// Compare two statute versions
let old_statute = /* ... */;
let new_statute = /* ... */;
let diff = compare;
// Check for changes
if diff.has_changes
// Get impact assessment
let impact = diff.assess_impact;
match impact.level
Change Types
| Type | Description |
|---|---|
Added |
New element added |
Removed |
Element removed |
Modified |
Element changed |
Impact Levels
| Level | Description |
|---|---|
Minor |
Cosmetic or documentation changes |
Moderate |
Changes to discretionary elements |
Major |
Changes to conditions or effects |
Breaking |
Fundamental structural changes |
CLI Integration
# Compare two statute files
# Output as JSON
License
MIT OR Apache-2.0