This is a submission for the Sanity Challenge, Path Two: Vibe-Code Something Strange.
What I Built
What if your documentation could check itself for contradictions?
That was the idea behind TruthLayer.
As documentation grows, information can quietly drift apart. One page might say an API supports 100 requests per minute, while another says 500. Both pages look perfectly fine on their own — until someone has to decide which one to trust.
TruthLayer is an AI-powered knowledge health system built with Next.js and Sanity that looks for these inconsistencies across structured documentation.
When it finds a potential conflict, it doesn't automatically rewrite anything. Instead, it creates a structured conflict in Sanity and sends it to a human review workflow.
The flow is simple:
Sanity Content → AI Analysis → Conflict Detection → Human Review → Resolution
This makes TruthLayer less like an AI writer and more like a spell-checker for organizational knowledge.
Demo
🚀 Live Demo:
https://truth-layer-five.vercel.app/
The live application includes:
• Knowledge Health Dashboard
• Document Browser
• Conflict Detection
• Conflict Inspection
• Human Review Workflow
• Approve / Reject / Investigate actions
Code
GitHub Repository:
https://github.com/uttamofficial/truth-layer
Built with Next.js, TypeScript, and Sanity.
My Build Process
I built TruthLayer using Google Antigravity.
I started with the core idea and used the coding agent to turn it into a working product — from the Sanity schemas and frontend to the AI analysis API and review workflow.
The Sanity content model is centered around three types:
• knowledgeDocument — the actual documentation
• contentConflict — detected inconsistencies
• review — human decisions about those conflicts
One interesting part of the build was the review workflow.
The first version could display review actions, but I wanted those actions to actually affect the underlying Sanity data. I iterated on the implementation until approving, rejecting, or investigating a conflict became a real workflow rather than just UI buttons.
I also tested the production build, Sanity connectivity, conflict detection, and review transitions.
The biggest takeaway from vibe-coding this project:
Getting an AI-generated app to compile is easy. Getting the workflow to actually make sense requires testing, breaking things, and giving the agent better instructions.
Sanity Project Details
Project ID:
YOUR_SANITY_PROJECT_ID = NEXT_PUBLIC_SANITY_PROJECT_ID
Dataset:
production
Main schemas:
• knowledgeDocument
• contentConflict
• review
Sanity isn't just being used as a database here. It holds the documentation, detected conflicts, and human review decisions as structured content.
Agent Session
Built and iterated using Google Antigravity.
I used the coding agent for scaffolding, Sanity schema creation, UI development, AI integration, workflow implementation, debugging, and production testing.
I don't currently have a suitable public Agent Session transcript to share.
Why TruthLayer?
Documentation rarely becomes wrong all at once.
It becomes wrong one outdated page at a time.
TruthLayer explores a simple idea:
What if we could detect those inconsistencies before someone discovers them the hard way?
That's the problem I wanted to explore with Sanity.
A few alternative titles
If you want something even more attention-grabbing:
What If Your Documentation Could Argue With Itself? Meet TruthLayer.
I Built an AI That Checks Whether Your Docs Agree With Each Other
Your Docs Are Lying to You. TruthLayer Wants to Know Why.
I Gave Sanity a Memory — Now It Can Find Contradictions
When Your Docs Disagree, Who's Right? I Built TruthLayer.
I Vibe-Coded a Spell-Checker for Organizational Knowledge
Your Documentation Has Contradictions. This AI Finds Them.
My pick: “What If Your Documentation Could Argue With Itself? Meet TruthLayer.”




Top comments (0)