<?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: dhruv</title>
    <description>The latest articles on DEV Community by dhruv (@xeni7h).</description>
    <link>https://dev.to/xeni7h</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%2F3979924%2F0254724a-5e76-4a67-a2eb-21ca325a2110.png</url>
      <title>DEV Community: dhruv</title>
      <link>https://dev.to/xeni7h</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xeni7h"/>
    <language>en</language>
    <item>
      <title>Disruption Desk: flight rights with a paper trail</title>
      <dc:creator>dhruv</dc:creator>
      <pubDate>Sun, 04 Oct 2026 14:38:39 +0000</pubDate>
      <link>https://dev.to/xeni7h/disruption-desk-flight-rights-with-a-paper-trail-125a</link>
      <guid>https://dev.to/xeni7h/disruption-desk-flight-rights-with-a-paper-trail-125a</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;Disruption Desk helps passengers work out what they may be entitled to after a flight disruption.&lt;/p&gt;

&lt;p&gt;A cancellation or long delay can leave you reading regulations, airline policies and guidance pages that answer slightly different questions. Compensation, refunds and care also have different conditions. Being entitled to one does not necessarily mean you qualify for the others.&lt;/p&gt;

&lt;p&gt;I built a flight facts form that turns those conditions into a sourced assessment. You enter the route, carrier, disruption and relevant details. The app returns an amount where it can determine one, the applicable entitlements, and the sources behind the result. Missing facts and unsupported cases stay visible.&lt;/p&gt;

&lt;p&gt;The app covers selected passenger-rights rules for the EU, UK, US and India. Indian coverage includes cancellation, involuntary denied boarding, delay assistance and specific connecting-flight situations. Baggage results provide claims guidance; an individual loss still needs individual evidence.&lt;/p&gt;

&lt;p&gt;The stack is Next.js 16, the Vercel AI SDK and Gemini, deployed on Vercel.&lt;/p&gt;

&lt;p&gt;One deliberate constraint: the model cannot write the compensation amount. A calculation function applies the structured rules and returns the money, conditions and citations. Gemini retrieves content and completes the review through tools.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;&lt;a href="https://sanitychallenge.vercel.app/" rel="noopener noreferrer"&gt;Open Disruption Desk&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No login is required. You can start with an example, change the facts and run a fresh assessment.&lt;/p&gt;

&lt;p&gt;For the production check, I submitted this case through &lt;code&gt;/api/ruling&lt;/code&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An IndiGo domestic flight on 1 October 2026 was cancelled with no notice. The scheduled block time was 60 minutes, and the basic fare plus fuel surcharge was ₹6,000. The passenger had a confirmed booking, provided contact details and did not accept an alternative flight. No extraordinary-circumstances defense was proven. What applies?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The result was &lt;strong&gt;₹5,000 compensation, with the ticket refund separate&lt;/strong&gt;. It also returned refund-process and escalation guidance, citing the DGCA cancellation and refund sources stored in Sanity.&lt;/p&gt;

&lt;p&gt;That request completed in about ten seconds with the runtime reporting &lt;code&gt;FULL&lt;/code&gt;, &lt;code&gt;google&lt;/code&gt; and &lt;code&gt;SANITY_LIVE&lt;/code&gt;.&lt;/p&gt;

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

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

&lt;p&gt;The repository includes the content model, calculation code, source records and tests.&lt;/p&gt;

&lt;p&gt;Validation included 87 passing tests, a successful typecheck and production build, and a 40-case deterministic evaluation. The evaluation is a small, curated suite, so I treat it as a regression check rather than a general claim of legal accuracy. The deployed agent was tested separately against live Sanity content.&lt;/p&gt;

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

&lt;p&gt;I pointed Sanity Context at a dedicated &lt;code&gt;corpus&lt;/code&gt; dataset containing &lt;code&gt;corpusDoc&lt;/code&gt; documents prepared from passenger-rights source material. These include regulations, official guidance, labeled court summaries and selected airline-policy excerpts. The documents retain source links and provenance.&lt;/p&gt;

&lt;p&gt;The structured rules live in the &lt;code&gt;production&lt;/code&gt; dataset. Sources, regimes, rules, compensation bands, causes and airline policies are separate documents connected by references.&lt;/p&gt;

&lt;p&gt;The agent uses two Context MCP endpoints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;disruption-kb&lt;/code&gt; exposes &lt;code&gt;knowledge_base_read&lt;/code&gt; for reading the Knowledge Base.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;disruption-data&lt;/code&gt; exposes &lt;code&gt;groq_query&lt;/code&gt; for querying the structured content.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The application prefixes those tool names so their origins are clear. The live production request invoked:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kb_knowledge_base_read
data_groq_query
query_rules
compute_entitlement
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first two calls retrieve through Sanity Context. The application’s &lt;code&gt;query_rules&lt;/code&gt; tool then loads a fixed, parameterized GROQ dossier from Sanity, and &lt;code&gt;compute_entitlement&lt;/code&gt; applies the conditions to the supplied flight facts.&lt;/p&gt;

&lt;p&gt;The structure matters here. For the Indian cancellation example, the calculation needs the block-time band, basic fare plus fuel surcharge, notice period, alternative-flight choice and applicable source version. A paragraph mentioning “cancellation compensation” does not contain enough information by itself to decide the result.&lt;/p&gt;

&lt;p&gt;I also kept evaluation scenarios and gap records outside the retrieval scope. The agent should retrieve the rules and evidence, without seeing expected test answers.&lt;/p&gt;

&lt;p&gt;The production response included the actual Sanity rule and source IDs behind the ₹5,000 result. Both Context retrievals are required in full mode; a failed retrieval returns an error.&lt;/p&gt;

&lt;p&gt;Some limits remain explicit. Court announcements are labeled as summaries, foreign-carrier compensation can need further scope review, and baggage liability ceilings are not presented as automatic payouts.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;production&lt;/code&gt;: structured sources, rules, regimes, compensation bands and related content.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;corpus&lt;/code&gt;: source material prepared for the Knowledge Base.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The India update added five official source records, five compensation bands, six structured rules and six corpus summaries to the existing datasets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agent Session
&lt;/h2&gt;

&lt;p&gt;I used Codex during implementation and verification, including the Gemini integration and the India rules update.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>sanitychallenge</category>
      <category>sanity</category>
      <category>ai</category>
    </item>
    <item>
      <title>Spare: you have more to give than you think</title>
      <dc:creator>dhruv</dc:creator>
      <pubDate>Mon, 07 Sep 2026 06:52:46 +0000</pubDate>
      <link>https://dev.to/xeni7h/spare-you-have-more-to-give-than-you-think-17p3</link>
      <guid>https://dev.to/xeni7h/spare-you-have-more-to-give-than-you-think-17p3</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/weekend-2026-09-03"&gt;Weekend Challenge: Generosity Edition&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;Every charity app I've used starts with the same question: how much money can you give. If the answer is not much, you feel a bit guilty and close the tab.&lt;/p&gt;

&lt;p&gt;That's the actual problem I wanted to solve. Most people don't skip giving because they're selfish, they skip it because the ask never fits what they actually have. Two hundred rupees feels too small to matter. An hour on a Saturday doesn't feel like "volunteering." An old laptop just sits in a drawer.&lt;/p&gt;

&lt;p&gt;Spare flips the question. Instead of asking what you can donate, it asks what you have spare right now, whatever that is: some cash, a free evening, a skill, a language you speak, an object you don't use, access to something like a car or a rooftop. You type it in plain language (any language, any mix, doesn't matter), and Spare reflects it back to you as a little inventory, then gives you three specific things you can actually do with it this week. Not "go volunteer somewhere," but the actual organization, the actual first step, and a message already drafted for you to send.&lt;/p&gt;

&lt;p&gt;The thing I cared about most while building this: most tools like this stop at "here's a place near you" and leave you to figure out the rest. Spare tries to close that last gap, because that's usually where good intentions die.&lt;/p&gt;

&lt;p&gt;I also didn't want to just trust whatever an AI tells me is a real charity. So every result comes with a label telling you exactly how sure Spare is: confirmed live through search, hand checked by me beforehand, or "search this yourself" if neither of those worked out. I'd rather show you three honest results than five made up ones.&lt;/p&gt;

&lt;p&gt;Demo&lt;/p&gt;

&lt;p&gt;Live app: &lt;a href="https://spareapp.ai.studio" rel="noopener noreferrer"&gt;https://spareapp.ai.studio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Try the demo personas on the first screen if you don't want to type anything, they'll walk you through the whole flow in a few taps.&lt;/p&gt;

&lt;p&gt;Code&lt;/p&gt;

&lt;p&gt;GitHub repo: &lt;a href="https://github.com/dhruvvvgg/spare" rel="noopener noreferrer"&gt;https://github.com/dhruvvvgg/spare&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How I Built It&lt;/p&gt;

&lt;p&gt;I built this entirely on my phone using Google AI Studio, so the whole thing had to work within that constraint from the start.&lt;/p&gt;

&lt;p&gt;The matching works in three layers. First, Gemini does a live search grounded lookup based on what you typed and where you are, and only returns something if it can actually attach a real source link to it, nothing gets shown without a citation. If that comes back empty or thin, it falls back to a list of organizations I manually verified beforehand, checking every single link myself before it went into the app. And if even that doesn't have a good match for what you're offering, it hands you off to a live search on Idealist instead of pretending to have an answer.&lt;/p&gt;

&lt;p&gt;I spent a good chunk of the weekend just verifying that fallback list by hand, going through Goonj, Robin Hood Army, eVidyaloka, ConnectFor, HelpAge India, Bhumi, and a few global ones like Translators without Borders and Be My Eyes, checking that each org still exists, still does what it says, and has a live link. It felt slower than just letting the model invent something, but for a project about charity, the last thing I wanted was to point someone toward a fake or defunct organization.&lt;/p&gt;

&lt;p&gt;Once you pick one of the three results, a second Gemini call drafts an actual outreach message in your own tone, based on how you phrased your original input, so you're not stuck staring at a blank text box trying to figure out what to even say to a stranger or an NGO.&lt;/p&gt;

&lt;p&gt;Prize Categories&lt;/p&gt;

&lt;p&gt;Submitting for Best Use of Google AI. Gemini runs the entire pipeline here: pulling structured data out of free text, doing live grounded search for real local opportunities, and writing the final outreach message in your voice.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
    </item>
    <item>
      <title>Chaos Engine: I Built an AI That Settles F1 Pit Stop Arguments</title>
      <dc:creator>dhruv</dc:creator>
      <pubDate>Mon, 13 Jul 2026 06:58:48 +0000</pubDate>
      <link>https://dev.to/xeni7h/chaos-engine-i-built-an-ai-that-settles-f1-pit-stop-arguments-ffj</link>
      <guid>https://dev.to/xeni7h/chaos-engine-i-built-an-ai-that-settles-f1-pit-stop-arguments-ffj</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/weekend-2026-07-09"&gt;Weekend Challenge: Passion Edition&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;I built &lt;strong&gt;Chaos Engine&lt;/strong&gt;, an interactive F1 strategy simulator for people who can't stop arguing about pit calls.&lt;/p&gt;

&lt;p&gt;If you've ever watched a race with a die hard F1 fan, you know the argument happens every single weekend. "They should have pitted two laps earlier." "That undercut never had a chance." "Why didn't they just switch to the hards." Every fan thinks they'd have made the better call, and there's never really a way to settle it.&lt;/p&gt;

&lt;p&gt;That argument is where this whole project came from. You don't just watch F1, you live and die by strategy calls that happen in about four seconds on a pit wall. So I wanted to build something that actually lets fans test their gut calls against real race data instead of just yelling about it on Reddit or Twitter after the checkered flag.&lt;/p&gt;

&lt;p&gt;Chaos Engine takes real F1 races, automatically detects the moments in each one that were statistically the most dramatic (a pit stop that came way earlier or later than everyone else, a sudden pace spike, a big swing in track position), scores the whole race on a "Chaos Score," and then lets you pick one of those moments and rewrite it. Pick an alternate strategy, and the AI reasons over the real degradation curves, pit loss numbers, and traffic gaps from that race to tell you whether your call would have actually worked.&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://chaos-engine.ai.studio" rel="noopener noreferrer"&gt;https://chaos-engine.ai.studio&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://github.com/dhruvvvgg/Chaos-Engine" rel="noopener noreferrer"&gt;https://github.com/dhruvvvgg/Chaos-Engine&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;The whole thing runs on Google AI Studio's Build mode, using Gemini as the actual reasoning engine behind every "what if."&lt;/p&gt;

&lt;p&gt;The part I cared most about getting right was making sure the AI wasn't just generating a vibe-y paragraph. I wanted it to actually reason over real numbers, not make something up that sounded plausible. So instead of asking Gemini to freeform explain a scenario, I feed it a structured JSON block for each intervention, real pre-intervention pace data, the pit loss baseline for that race, degradation curves for the tyre compound being chosen, and the gap to nearby cars, and I have it return a structured verdict: predicted position on exit, estimated gap, a verdict of better/worse/roughly equivalent, and a confidence level. That constraint made a huge difference in how trustworthy the output actually felt.&lt;/p&gt;

&lt;p&gt;The "chaos moments" themselves aren't hand picked either. I didn't want to sit there and manually decide which lap of which race was interesting, because that doesn't scale and it's basically just my opinion dressed up as data. So those moments come from statistical detection, things like a driver's lap time deviating sharply from their own rolling average, or a pit stop landing way outside the field's typical stop window for that phase of the race. The chaos score for each race is built from those detected anomalies, not from me deciding a race was dramatic because I remember it being dramatic.&lt;/p&gt;

&lt;p&gt;I also went back and forth a lot on the UI. I wanted it to feel like an actual race engineering tool, not a generic dashboard template, so I leaned into a dark telemetry aesthetic, glass card treatments, and real F1 data (pole times, fastest laps, laps completed) pulled from the actual race weekends instead of made up placeholder numbers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;Best Use of Google AI: Gemini is the reasoning engine behind every "what if" in the app, it takes real race data (pace, pit loss, tyre degradation, traffic gaps) and returns a grounded verdict instead of a generic guess, plus it writes the "why was this race chaotic" line on each race card from the detected anomaly data. The whole thing was also built using Google AI Studio's Build mode.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
    </item>
  </channel>
</rss>
