Truth Guard
Truth Guard is CaseSolo's deterministic legal-safety layer for AI outputs. It runs after generation and before consequential output is treated as safe for user-facing legal work.
What It Checks
src/lib/ai/truth-guard.ts currently verifies:
- Citation references resolve to retrieved source spans.
- Quantitative/date claims are cited when source spans are available.
- Dates are plausible and do not precede the incident date unless flagged.
- Large uncited dollar claims are warned.
- Jurisdiction-specific statute references fit the case state.
- Unsafe overconfident language is warned.
- SOL year/date claims match the sourced state rule catalog.
- Answer-deadline day claims match the jurisdiction deadline table.
Rule Sources
src/lib/legal/sol-database.ts is the shared SOL catalog for all 50 states plus DC. Each row includes:
yearsstatutesourceUrlwhere currently availablesourceLastReviewedclaimScopeverificationnotes
Florida's current general negligence baseline is two years under Fla. Stat. § 95.11(5)(a). Entries marked claim_specific_review_required produce warnings rather than hard blocks so the product does not overstate certainty when the governing rule can depend on claim classification.
Integration Points
src/lib/cases/deadline-rules.tsgenerates SOL deadline rules from the shared SOL catalog and carries source citations into calculated deadlines.src/app/api/sol-calculator/route.tsexposes statute/source metadata with SOL results.src/app/api/dashboard/sol-heatmap/route.tsuses the shared catalog for general PI baselines.- Truth Guard report issues include
ruleCitation,sourceUrl,expectedValue, andactualValuewhere applicable.
Verification
Run the focused rule checks with:
npm run test:run -- sol-database deadline-rules truth-guard
Task-level verification should also include targeted ESLint, npm run typecheck, and git diff --check.