Your Policies Are Out of Date: How I Built a Sanity AI Agent to Catch Fact Drift
说明与用途
Fact Ledger 使用 Sanity 的事实文档和 AI 生成的补丁自动检测并纠正政策漂移,确保单一真相来源和审计追踪。
问题
When a policy value changes in a CMS, hard‑coded copies across many pages remain stale, causing fact drift and potential legal risk.
结果
Fact Ledger achieves 100% precision and recall on a seeded dataset of 31 violations, automatically propagates policy changes, and provides a single‑click remediation workflow with audit logging.
工作流
- Edit a fact document in Sanity Studio
- Webhook triggers deterministic scanner (R1–R5)
- Scanner identifies stale or contradictory text and creates finding documents
- AI agent drafts Sanity patch mutations for each finding
- Editor reviews diffs in Studio or dashboard and approves fixes
- Client.transaction() atomically patches pages, updates findings, publishes remediation, and logs audit event
证据
Fact Ledger fixes this at the data model level.
Run the benchmark against the seeded dataset of 31 planted violations: 100% precision, 100% recall.
The core principle, distilled to four words per step: Rules flag. AI drafts. Human approves. Sanity remembers.
- 记录日期: 2026-10-03T22:40:53.737Z