This is a submission for the Sanity Challenge, Path One: Ship an Agent That Queries Real Content
At 02:14 UTC in the southern throat of the Red Sea, the bridge of a 174,000 cubic meter liquefied natural gas carrier is pitch black. The watch officer watches a high-speed radar track bloom fourteen nautical miles to the east. A salvo of loitering drones has launched from coastal positions, heading straight for the commercial shipping lane.
Historically, Arab sailors called this strait the Bab-el-Mandeb: the Gate of Tears.
The watch officer turns to the bridge navigation console and queries the automated routing system:
"Active drone threat acquired. Should we silence our AIS transponder and go dark?"
If you feed that dilemma into a standard search or document retrieval pipeline, the engine matches keywords across treaty databases and produces a dangerous compromise:
"Maintain continuous AIS broadcast to comply with international maritime law while minimizing active surface transmissions to lower radar visibility."
A radio transponder is binary. If you transmit, your GPS coordinates, heading, speed, and maritime identification number radiate across the VHF band at 12.5 watts. Hostile targeting radars and drone operators receive your telemetry in real time. If you switch it off, you are electronically silent. There is no middle ground.
Yet behind that impossible sentence lies a genuine legal nightmare that plays out across global trade corridors every night.
The ship's captain is caught in a three-way regulatory trap: IMO SOLAS Regulation V/19: International statutory law mandates continuous carriage and broadcast of the Automatic Identification System (AIS) for collision avoidance. Violating this mandate exposes the Master to criminal prosecution and license revocation by the Flag State. UK Maritime Trade Operations (Advisory 04/26): Military naval authorities advise merchantmen entering hostile drone sectors to turn off their AIS beacons to preserve human life. Lloyd's Joint War Committee (JWLA-032 §4.1): War-risk underwriters enforce a strict warranty. Going dark without an official allied naval escort automatically repudiates the vessel's sixty-five million dollar Hull and Machinery policy.
If the captain broadcasts, the crew risks a missile strike. If the captain goes dark, the vessel forfeits insurance. If the ship survives without insurance, the captain faces criminal charges in port.
Standard search engines cannot resolve this because keyword and vector similarity algorithms measure semantic overlap, not legal hierarchy or contractual conditions. When statutory rules contradict each other, text similarity simply blends them together.
NAVI-SANCTION is an autonomous maritime war-risk arbitration engine. It models statutory treaties, military advisories, insurance warranties, and operational telemetry as relational entities inside Sanity Content Lake. Using Sanity Context MCP and graph-relational GROQ queries, it pinpoints statutory contradictions, computes an auditable legal defense corridor, and commits binding precedent mutations back to Sanity Content Lake with cryptographic SHA-256 audit signatures.
Inside the cockpit, you can: Select transit corridors (Bab-el-Mandeb, Strait of Hormuz, Black Sea). Toggle hostile threat tiers (Tier 1 Clear, Tier 2 Radar Spoofing, Tier 3 Kinetic Deadlock). Switch between a 2D PPI Naval Radar sweep and an interactive 3D Tactical Holographic Globe. Run live GROQ AST queries against the Content Lake. Open the Dual-Key Adjudication Console to invoke statutory emergency defense clauses and commit precedent mutations with cryptographic proofs.
GitHub Repository: https://github.com/EmmaSofiaDev/navi-sanction License: Permissive MIT License
Built using Next.js 16 (Turbopack static export), TypeScript 5, Pure Vanilla CSS, Web Crypto API, and Playwright.
Instead of dumping legal PDFs into an unstructured chunk index, we structured the maritime legal domain into four distinct document schemas in Sanity Content Lake:
maritimeTreaty: Represents formal international conventions. Contains clauses, strictness levels (absolute vs discretionary), and enforcement penalties (such as Flag State certificate revocation). operationalAdvisory: Represents time-sensitive military directives published by naval coalitions (UKMTO, MARAD, CTF-153). Contains recommended posture (Dark vs Active), threat vectors (drones, anti-ship missiles, mines), and validity windows. insuranceWarranty: Represents underwriting terms from the Lloyd's Joint War Committee. Contains specific warranty clauses, forfeiture conditions, and explicit naval escort exception parameters. transitCorridor: Defines geographic chokepoints, current threat tier, and active naval escort presence. adjudicatedDecision: Stores historical arbitration rulings committed by human directors, providing a searchable legal precedent for sister ships entering the same zone. Multi-Hop Graph Traversal with GROQ
