<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: prabhakar srivastava</title>
    <description>The latest articles on DEV Community by prabhakar srivastava (@prabhakar_srivastava_488f).</description>
    <link>https://dev.to/prabhakar_srivastava_488f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4157179%2F3cacd235-7718-43e6-8a92-3ff2ed9b856f.jpg</url>
      <title>DEV Community: prabhakar srivastava</title>
      <link>https://dev.to/prabhakar_srivastava_488f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prabhakar_srivastava_488f"/>
    <language>en</language>
    <item>
      <title>Afterlight: tiny objects, improbable afterlives, and a human final say</title>
      <dc:creator>prabhakar srivastava</dc:creator>
      <pubDate>Fri, 02 Oct 2026 15:28:57 +0000</pubDate>
      <link>https://dev.to/prabhakar_srivastava_488f/afterlight-tiny-objects-improbable-afterlives-and-a-human-final-say-4jkd</link>
      <guid>https://dev.to/prabhakar_srivastava_488f/afterlight-tiny-objects-improbable-afterlives-and-a-human-final-say-4jkd</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/sanity-2026-09-16"&gt;Sanity Challenge, Path Two: Vibe-Code Something Strange&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A museum from 2126. Everyday objects, imagined stories, and a curator’s final say.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What would a museum a hundred years from now make of a cassette, a house key, or a light bulb?&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Afterlight&lt;/strong&gt;, a cassette can become a pocket-sized time machine. A key is permission to come home. A light bulb is borrowed sunrise. Visitors explore ordinary objects with improbable afterlives, while curators decide which stories belong in the exhibition.&lt;/p&gt;

&lt;p&gt;The app opens directly into the collection. You can rotate eight original 3D reconstructions, filter collections, inspect objects, and export catalogue records. You can also upload an image of your own object and take it through a complete curator workflow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intake → Draft → Review → Exhibition → Withdrawal&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The central rule is simple: &lt;strong&gt;AI can propose a story. A human decides whether to exhibit it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Observed details and fictional interpretations have separate fields. Uploaded images remain images; the app does not pretend to reconstruct them in 3D. Gemini’s suggested catalogue details are labelled unverified, and they only enter the form when a curator explicitly selects &lt;strong&gt;Use these details&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://afterlight-beige.vercel.app/" rel="noopener noreferrer"&gt;Open Afterlight&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://afterlight-beige.vercel.app/demo.html" rel="noopener noreferrer"&gt;Watch the 1 minute 38 second demo&lt;/a&gt;&lt;/strong&gt; — English narration and captions, no login required.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://afterlight-beige.vercel.app/demo/afterlight-demo.mp4" rel="noopener noreferrer"&gt;Direct video&lt;/a&gt; · &lt;a href="https://afterlight-beige.vercel.app/demo/narration.txt" rel="noopener noreferrer"&gt;Transcript&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwl3d3539lzfej2v01ujl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwl3d3539lzfej2v01ujl.png" alt="Gemini suggests catalogue details, which stay separate from the form until the curator accepts them" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The recording uses the deployed app with real Sanity and Gemini. The sample upload is a render of an original cup model. Authentication and provider waits were edited out; the narration uses a synthetic Microsoft Ava voice. The temporary exhibit was withdrawn and cleaned up after recording.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try the curator workflow
&lt;/h3&gt;

&lt;p&gt;Visitors can browse without signing in. To test editing, open &lt;strong&gt;Curator desk&lt;/strong&gt; and enter this shared application curator code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;88100113c855c22b561f2af754a350f8c69f88b9dcabd61f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the app’s curator access code, not a Sanity or AI-provider API key. It enables changes in the shared demonstration collection.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Inspect the cassette. Rotate it and compare the observed details with its fictional interpretation.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Curator desk&lt;/strong&gt;, choose &lt;strong&gt;New object → Your photo&lt;/strong&gt;. Use an image you own or have permission to upload publicly.&lt;/li&gt;
&lt;li&gt;Give consent, request Gemini suggestions, review them, and select &lt;strong&gt;Use these details&lt;/strong&gt; if appropriate.&lt;/li&gt;
&lt;li&gt;Save the intake record, draft a fictional interpretation with AI, edit the exhibition label, and submit it for review.&lt;/li&gt;
&lt;li&gt;Approve the exhibit. Open the public collection in another tab to see it appear, then inspect &lt;strong&gt;From object to exhibit&lt;/strong&gt; for its recorded decisions.&lt;/li&gt;
&lt;li&gt;Return your test exhibit to draft with a reason when finished. It disappears from the public gallery while its workflow history remains.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Please create your own test object and leave the starter exhibits intact. Uploaded images can remain accessible by their CDN URLs after withdrawal, so use a non-sensitive image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6w9bj9ok1lfh0hsht642.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6w9bj9ok1lfh0hsht642.png" alt="The curator reviews the exhibition label before approving the object" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/prabhakarcs786/afterlight" rel="noopener noreferrer"&gt;Public GitHub repository: prabhakarcs786/afterlight&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The repository includes setup instructions, Sanity schemas, workflow logic, tests, and the demo assets.&lt;/p&gt;

&lt;p&gt;The stack is &lt;strong&gt;Next.js, TypeScript, Sanity Content Lake, Three.js, Gemini, and Vercel&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sanity Project Details
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Project ID:&lt;/strong&gt; &lt;code&gt;solj2ppn&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dataset:&lt;/strong&gt; &lt;code&gt;production&lt;/code&gt; — private&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public access:&lt;/strong&gt; approved exhibits through the application&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Curator access:&lt;/strong&gt; the application code above&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How Sanity shapes the experience
&lt;/h3&gt;

&lt;p&gt;The schema models &lt;strong&gt;collections&lt;/strong&gt;, &lt;strong&gt;artifacts&lt;/strong&gt;, and embedded &lt;strong&gt;workflow events&lt;/strong&gt;. Each artifact references a collection and separates observed material and details from fictional interpretation, exhibition copy, and a strangeness rating.&lt;/p&gt;

&lt;p&gt;Photo exhibits use native Sanity image assets with alternative text. Images are validated, resized, and stripped of metadata before upload.&lt;/p&gt;

&lt;p&gt;A workflow transition writes its new state and event together, guarded by Sanity’s revision precondition. If another curator changes the record, an outdated editor receives a conflict instead of silently overwriting it. The UI preserves the unsaved text so the curator can recover their work.&lt;/p&gt;

&lt;p&gt;A server-side Sanity listener notifies browsers of changes. Each browser then refetches its public or protected view. This lets a visitor see an approval or withdrawal without manually reloading, while Sanity credentials stay on the server.&lt;/p&gt;

&lt;p&gt;This is a custom application workflow built on Content Lake. I did not use the early-access Workflows engine or App SDK.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb0zg47ytfkv0u2ujdbzf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb0zg47ytfkv0u2ujdbzf.png" alt="An exhibited object exposes its retained workflow decisions to visitors" width="800" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Starter exhibits are explicitly identified as seed snapshots. The app does not manufacture approval events for them; newly processed objects show their actual retained events.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Build Process
&lt;/h2&gt;

&lt;p&gt;I used &lt;strong&gt;GitHub Copilot in VS Code&lt;/strong&gt; for the initial build and &lt;strong&gt;Codex&lt;/strong&gt; for release review, verification, and the narrated showcase. The concept, implementation, models, and tests were developed with AI assistance. These are retrospective build notes rather than a verbatim prompt transcript.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Start with the rules
&lt;/h3&gt;

&lt;p&gt;Before polishing the screens, I established three constraints: automation cannot approve, incomplete labels cannot enter review, and an exhibited object must return to draft before editing.&lt;/p&gt;

&lt;p&gt;Those rules became a shared transition function used by the local demo and the live persistence path. That made the behavior easier to check than rules scattered across buttons.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Give the museum real objects
&lt;/h3&gt;

&lt;p&gt;Eight original models were assembled in Three.js. A rendering script generated their thumbnails, and the detail view kept them interactive. Browser checks verified that the scene contained visible pixels and changed when rotation was enabled.&lt;/p&gt;

&lt;p&gt;One release issue was surprisingly mundane: development UI badges had been captured in thumbnail screenshots. Exporting the canvas directly fixed the images.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Make participation personal
&lt;/h3&gt;

&lt;p&gt;Choosing from eight objects was a useful beginning, but contributing your own object made the idea more compelling. Photo intake added that possibility.&lt;/p&gt;

&lt;p&gt;It also introduced another decision: should AI fill the form automatically? I chose reviewable suggestions with explicit acceptance. The curator can distinguish what they entered from what the model inferred before saving anything.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Let testing challenge the implementation
&lt;/h3&gt;

&lt;p&gt;Type-checking caught overly broad Sanity create types and, later, a renderer that incorrectly accepted the new &lt;code&gt;photo&lt;/code&gt; kind. The renderer now accepts only the eight actual model kinds.&lt;/p&gt;

&lt;p&gt;Browser accessibility checks caught low-contrast workflow counters. Reusing the existing muted text color fixed the measured issue. The first Vercel deployment also used the wrong framework preset; explicitly configuring Next.js resolved it.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Verify the live loop before recording
&lt;/h3&gt;

&lt;p&gt;Local checks were followed by real Sanity and Gemini exercises on the deployed application: image suggestions, asset storage, AI drafting, review, approval, withdrawal, and stale-write rejection.&lt;/p&gt;

&lt;p&gt;Separate curator and visitor browser sessions confirmed that public exhibits appeared and disappeared through live updates. Temporary verification objects and their newly uploaded assets were removed afterward.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verification
&lt;/h2&gt;

&lt;p&gt;On &lt;strong&gt;2 October 2026&lt;/strong&gt;, the release passed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;57 unit tests&lt;/strong&gt; and &lt;strong&gt;12 desktop/mobile browser tests&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Lint, TypeScript checking, production build, and Sanity schema extraction.&lt;/li&gt;
&lt;li&gt;Automated accessibility checks and a dependency audit with zero reported vulnerabilities.&lt;/li&gt;
&lt;li&gt;Hosted photo and curator workflows using real Sanity and Gemini.&lt;/li&gt;
&lt;li&gt;GitHub CI, plus checks of the recording, captions, screenshots, and public media links.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The demo uses a shared curator code and retains the latest 100 workflow events per object. It does not provide individual curator identities or an immutable audit log. Those are clear next steps for a larger museum deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;The most useful part of this experiment was turning a strange premise into precise content rules.&lt;/p&gt;

&lt;p&gt;Sanity’s schema helped define what had been observed, what had been invented, and what a human had approved. AI made the museum imaginative; those boundaries made it understandable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://afterlight-beige.vercel.app/" rel="noopener noreferrer"&gt;Visit Afterlight&lt;/a&gt; · &lt;a href="https://afterlight-beige.vercel.app/demo.html" rel="noopener noreferrer"&gt;Watch the walkthrough&lt;/a&gt; · &lt;a href="https://github.com/prabhakarcs786/afterlight" rel="noopener noreferrer"&gt;Explore the code&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>sanitychallenge</category>
      <category>sanity</category>
      <category>ai</category>
    </item>
    <item>
      <title>TruthGraph: the right rule depends on when—and for whom</title>
      <dc:creator>prabhakar srivastava</dc:creator>
      <pubDate>Fri, 02 Oct 2026 11:11:18 +0000</pubDate>
      <link>https://dev.to/prabhakar_srivastava_488f/truthgraph-the-right-rule-depends-on-when-and-for-whom-1dbk</link>
      <guid>https://dev.to/prabhakar_srivastava_488f/truthgraph-the-right-rule-depends-on-when-and-for-whom-1dbk</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/sanity-2026-09-16"&gt;Sanity Challenge, Path One: Ship an Agent That Queries Real Content&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Ask what happens when a goalkeeper holds the ball too long. Then ask the same question about a match on 1 March 2025.&lt;/p&gt;

&lt;p&gt;The wording barely changes. The applicable rule does.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TruthGraph is an evidence agent that works out which rule applies to your situation.&lt;/strong&gt; It uses Sanity Context to retrieve evidence, then checks dates, match conditions, and relationships between claims before composing an answer with sources.&lt;/p&gt;

&lt;p&gt;I built three sports collections: football, cricket, and chess. They contain short, structured claims linked to official rulebooks and announcements. These domains make the problem tangible: the newest rule can be wrong for an older match, and a rule for international play may not apply to a club game.&lt;/p&gt;

&lt;p&gt;Every result includes a comparison with a simple keyword baseline over the same claims. When that baseline agrees, the app says so. When it disagrees, you can inspect the condition or relationship that changes the answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://truthgraph-mauve.vercel.app/" rel="noopener noreferrer"&gt;Open TruthGraph&lt;/a&gt; · &lt;a href="https://truthgraph-mauve.vercel.app/demo.html" rel="noopener noreferrer"&gt;Watch the 1 minute 42 second walkthrough&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The walkthrough includes English narration and captions. &lt;a href="https://truthgraph-mauve.vercel.app/demo/truthgraph-demo.mp4" rel="noopener noreferrer"&gt;Download the MP4&lt;/a&gt; or &lt;a href="https://truthgraph-mauve.vercel.app/demo/narration.txt" rel="noopener noreferrer"&gt;read the transcript&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://truthgraph-mauve.vercel.app/demo.html" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6yddx4nplw4e4l7lvk0m.png" alt="Watch the TruthGraph walkthrough" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How judges can try it
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open the app and choose &lt;strong&gt;Start the guided tour&lt;/strong&gt;. No account or access code is needed.&lt;/li&gt;
&lt;li&gt;Try the historical goalkeeper question, then the substitutes question. Inspect the answer, keyword comparison, and supporting claims.&lt;/li&gt;
&lt;li&gt;For a custom question, choose a collection and paste this application access code into &lt;strong&gt;Access code&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   989d7decc7cf43958bbad8e3eca301c8c8fce67dc3eb09ec
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Try an everyday question about offside, LBW, or castling in the corresponding collection. Custom questions use the live model and Sanity Context; the code does not grant content-management access.&lt;/p&gt;

&lt;h3&gt;
  
  
  Three moments worth exploring
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. A relevant rule can be wrong for the date.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For the historical goalkeeper example, TruthGraph selects the six-second rule and indirect free kick that applied on 1 March 2025. The keyword baseline selects the newer eight-second rule and corner kick. The effective-date fields explain the difference.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa6ck7fdn9g97bk73rvxe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa6ck7fdn9g97bk73rvxe.png" alt="Historical match date: the applicable rule differs from the newest keyword match" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Missing context should trigger a question.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;“How many substitutes can a team use?” needs a match type. TruthGraph asks for that context instead of treating one match category's rule as universal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe7u7p99uirr9s6zmygcm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe7u7p99uirr9s6zmygcm.png" alt="TruthGraph asks which kind of match before selecting a substitutes rule" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. You can inspect what changes the evidence.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Evidence Lab lets you supply a hypothetical condition, such as “club friendly,” and see how it changes the applicability of retrieved claims. It operates on the retrieved snapshot without another model call. The comparison is labelled hypothetical, and the original answer stays visible.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6zpw2uekepx7mmseazyb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6zpw2uekepx7mmseazyb.png" alt="The Evidence Lab evaluates a hypothetical club-friendly condition" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/prabhakarcs786/truthgraph" rel="noopener noreferrer"&gt;Public GitHub repository: prabhakarcs786/truthgraph&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The README includes setup instructions, architecture notes, and commands for unit and browser checks.&lt;/p&gt;

&lt;p&gt;Built with Next.js, React, TypeScript, Sanity, the Vercel AI SDK with Gemini, Zod, and semver. I used GitHub Copilot and Codex during development and submission preparation.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Used Sanity
&lt;/h2&gt;

&lt;p&gt;I pointed a Sanity Knowledge Base at structured records in Content Lake: sources, claims, and collections. The agent accesses it through a Knowledge Base-only Sanity Context MCP endpoint.&lt;/p&gt;

&lt;p&gt;The investigation flow is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read the Knowledge Base outline with &lt;code&gt;initial_context&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Retrieve relevant entries with &lt;code&gt;knowledge_base_read&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Extract the question's intent and select claim IDs. The server restricts retrieval to the configured Knowledge Base.&lt;/li&gt;
&lt;li&gt;Check that each selected claim is cited by a retrieved entry.&lt;/li&gt;
&lt;li&gt;Evaluate the canonical claims against dates, versions, named conditions, and explicit replacement or correction relationships.&lt;/li&gt;
&lt;li&gt;Compose the answer from those canonical statements and source URLs, with an inspectable trace.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The model helps navigate and select evidence. Deterministic code evaluates applicability and unresolved conflicts. A generated paragraph alone is not accepted as evidence.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2r54jd8hu13rwaaoz2yi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2r54jd8hu13rwaaoz2yi.png" alt="The trace shows the recorded Sanity Context retrieval and citation validation" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why the structure matters
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Record&lt;/th&gt;
&lt;th&gt;Information the agent can use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tgSource&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Official URL, publisher, authority, and publication/review dates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tgClaim&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Statement, subject, property, value, effective dates, optional version range, named conditions, and &lt;code&gt;supersedes&lt;/code&gt;/&lt;code&gt;corrects&lt;/code&gt; references&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tgKnowledgeBase&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Collection purpose, Context Knowledge Base mapping, and guided examples&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These fields let the application explain &lt;em&gt;why&lt;/em&gt; a retrieved statement applies. It can retain an older rule for historical questions, ask for an absent match condition, and show conflicting evidence when there is no recorded resolution.&lt;/p&gt;

&lt;p&gt;The optional Curate workflow stores precedence decisions as relationships on Sanity claims. Content management is disabled on the public deployment; the local setup supports it with separate administrator credentials.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sanity Project Details
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Project ID:&lt;/strong&gt; &lt;code&gt;d7k23z8r&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dataset:&lt;/strong&gt; &lt;code&gt;production&lt;/code&gt; (public)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sanity Context Knowledge Base:&lt;/strong&gt; TruthGraph (&lt;code&gt;kb0JA1DdQw6D&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sports corpus:&lt;/strong&gt; three collections, 34 source records, and 91 claims&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Current document count:&lt;/strong&gt; 143 of the 150-document budget, including recorded tour data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Football sources include IFAB; cricket sources include MCC and ICC; chess sources include the FIDE Handbook. Each claim links to its source so readers can inspect the underlying publication.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Live, What Is Recorded, and Current Limits
&lt;/h2&gt;

&lt;p&gt;The guided tour replays labelled investigations previously run through Sanity Context to conserve the model's free-tier quota. Cached answers are reused only while the relevant question and content checks still match. The result and trace identify recorded runs. &lt;strong&gt;Custom questions run live.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The video demonstrates those recorded tour results and uses a synthetic Microsoft Ava voice.&lt;/p&gt;

&lt;p&gt;The collections are deliberately small. They are not complete rulebooks. The system can return insufficient evidence, and different phrasings can affect what the model retrieves. Unsupported or uncited selections are rejected; that does not make retrieval infallible. Free-tier provider limits can also temporarily prevent a live response.&lt;/p&gt;

&lt;p&gt;The repository includes unit checks for reasoning, grounding, and access controls, plus desktop/mobile browser checks. The deployed recording, screenshots, and public media links were checked on 2 October 2026.&lt;/p&gt;

&lt;p&gt;My aim with TruthGraph is to make the path from question to applicable evidence visible: which claim was retrieved, which conditions mattered, and which source supports the answer.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>sanitychallenge</category>
      <category>ai</category>
      <category>sanity</category>
    </item>
  </channel>
</rss>
