Problem
Diffguard has no baseline mode. Teams with existing codebases cannot adopt without immediately failing on all pre-existing violations. This is the #1 enterprise adoption blocker.
Impact
- Teams cannot adopt diffguard on repos with any existing violations
- Forces teams to either ignore all violations or fix everything before adopting
- Uncompetitive with tools that support baseline comparison
Proposed design
Add --baseline flag to check command:
diffguard check --base main --baseline previous-receipt.json
When --baseline is provided:
- Run checks normally
- Compare findings against baseline receipt fingerprint
- Exit code 0 if only pre-existing violations found
- Exit code 2 if NEW violations found (only new violations in output)
- Optional: --report-mode=new-only to ONLY report new findings
Acceptance Criteria
- --baseline flag accepts path to previous receipt JSON
- Only NEW findings trigger failure
- Output clearly distinguishes new vs existing violations
- Tests cover: no baseline, baseline with no new findings, baseline with new findings
- Snapshots cover the new output modes
Problem
Diffguard has no baseline mode. Teams with existing codebases cannot adopt without immediately failing on all pre-existing violations. This is the #1 enterprise adoption blocker.
Impact
Proposed design
Add --baseline flag to check command:
diffguard check --base main --baseline previous-receipt.json
When --baseline is provided:
Acceptance Criteria