# GridRock — Bhārata Strata, the computational substrate for Bharat

> India locality intelligence as evaluable witnesses (not facts), served as a thirteen-tool
> Model Context Protocol grammar over Streamable-HTTP. Every answer is a witness envelope
> carrying its generation, three-way coverage honesty, and uncertainty. Missing is never zero.
> The engine supplies no goodness or risk prior. Free tier: 120 req/min for humans,
> 600 req/min for self-onboarded LLM agents. Anonymous read is available and rate-limited.

Operated by GaliGali SoftLabs Pvt. Ltd., Bharat.

## Specs (machine-readable)

- [OpenAPI 3.1 spec](https://api.gridrock.ai/openapi.yaml): canonical machine-readable surface for docs auto-render and llms.txt derivation.
- [MCP descriptor](https://api.gridrock.ai/.well-known/gridrock-mcp.json): Model Context Protocol server descriptor for Claude Desktop / Cursor / Cline / Continue / LangGraph hosts.

## Quickstarts

- [Quickstart for humans (cURL)](https://gridrock.ai/docs/quickstart/curl): the raw MCP JSON-RPC flow — initialize → resolve_locality → read_witnesses.
- [Quickstart for Claude (MCP)](https://gridrock.ai/docs/quickstart/claude-tool-use): Claude Desktop config + the Messages API MCP connector.
- [Quickstart for OpenAI Agents (MCP)](https://gridrock.ai/docs/quickstart/openai-function-calling).
- [Quickstart for LangGraph (MCP)](https://gridrock.ai/docs/quickstart/langgraph).
- [Quickstart for Cursor / Cline / Continue (MCP)](https://gridrock.ai/docs/quickstart/mcp).

## Bhārata Strata (MH-36 cube + thirteen-tool MCP grammar)

The substrate. 264,583 locality cells — a ~1 km centroid-Voronoi tessellation of 36 Maharashtra
districts (each cell indexed by the H3 resolution-11 cell of its centroid), joined from 21
first-party tier witnesses (NRSC Bhuvan + Overture admin, building footprints/heights, Sentinel-1/2
+ HLS, GLO-30 DEM, ESA WorldCover, CPCB AQI, IMD + CHIRPS + GPM rainfall, WorldPop, IMD-125yr climate
dynamics, NOAA-GSOD temperature, NRSC LULC + GHSL built-up trajectory) into the 492-column unified
cube (367 numeric). v1.7 promotes a road-network layer (network_features_v0_* — distance-to-arterial,
mean node degree, intersection density, connected-component fraction, RCC-8 topology, nearest-network
distance), rankable via rank_by_weights. The morphology twin index v2 runs on a 45-dim canonical vector (33 z-scored
numeric features + 12-bucket LULC one-hot). It is an EXACT all-pairs GUM-confidence-weighted,
magnitude-aware standardised-Euclidean index (no ANN approximation), mapped to a half-Gaussian
similarity kernel.

Agents connect over MCP (Streamable-HTTP) at https://api.gridrock.ai/mcp; the machine descriptor is
at https://api.gridrock.ai/.well-known/gridrock-mcp.json (generated from the engine tool registry, so
it never drifts). Every response is a witness envelope — an evaluable claim carrying its generation, three-way
coverage honesty (observed / witness-absent / present-but-uncertain), and uncertainty. Missing is
never zero. Every witness names the immutable cube generation (bs:cube:0852c73eef54) it was read from,
so any answer is replayable.

- resolve_locality — (lat, lng) → the locality cell it falls in. MH-36 is a centroid-Voronoi tessellation, so the containing cell IS its nearest centroid; resolved by an exact coarse-H3 nearest-cell lookup. Refuses a point beyond MH-36 rather than snapping it to a far cell.
- read_witnesses — the full witnessed cube row for a cell (admin_code, cluster_id), with three-way coverage honesty.
- read_at — valid-time witness read: rainfall, AQI, temperature, weather_google (Google Weather realtime co-witness to IMD — temp/rain-24h/humidity/wind, sampled at the same IMD stations, never averaged), or rainfall_imd (IMD 24h accumulated ground rainfall mm — the fresh ground complement to the lagged IMERG satellite rate) at a (lat, lng) AND a specific real-world instant `at` (Pillar P2 — "what was TRUE at T", the dual of read_witnesses' as_of transaction-time). Served only where a tier observed at T; cadence gaps / pre-genesis / unwitnessed cells are typed R7 refusals, never interpolated or zeroed.
- find_twins — top-K morphological twins from the exact R24 v2 GUM-confidence-weighted index + the anchor's mean confidence; twins are subject-references.
- rank_by_weights — rank cells by YOUR weighted combination of cube columns, with per-column contribution decomposition. The engine supplies no goodness prior.
- explain — per-feature decomposition of the R24 distance for a recorded twin pair; reads the AUTHORITATIVE similarity (never reconstructs it).
- attest — the warrant behind a claim: recomputed shard sha256 + ancestry lineage (cell), or sha-verify + falsifier verdict (artefact). Fail-closed.
- aggregate_region — pool a feature over a region into one confidence-weighted claim with a descriptive dispersion but NO standard error / CI (cells are spatially autocorrelated). Refuses a region with zero observed witnesses.
- route — free-flow road distance/duration between two (lat,lng), with a stability-certified k-band (never a brittle single arrow). A disconnected pair returns reachable:false, never ∞/0. Free-flow only; traffic is the Ola witness, never computed (D9).
- reach — the reachable-cell catchment (isochrone) within a free-flow minute budget; unreachable cells are typed, never dropped or zeroed (R3).
- relate — the RCC-8 topological relation (DC/EC/PO/TPP/NTPP) between two locality cells, from the rcc8_lattice witness (the P4 pillar).
- visibility — curvature-corrected line-of-sight between two points over the 30 m DEM + building-height surface; support-gated, never silently 'visible'.
- anchor — measured d_F + bearing to nearby landmark objects; 'fame' stays a declared witness (null), never fabricated (R1).

Refused by doctrine: score_site / assess_risk / best_route (R1 — no goodness/suitability/risk prior; use rank_by_weights, or route + your own criterion over the returned facts), flow / od (Σ-excluded behavioural mobility — a device-measurement witness only, never computed from geometry), traffic_eta (the exogenous Ola witness, never computed; route is free-flow only).

## Binding an agent to this grammar (the witness doctrine)

If you wire these tools into an LLM agent, bind it with this doctrine in the system prompt — it is the
contract that keeps a COMPOSED answer as honest as a single tool call. This is the exact doctrine
GridRock's own /playground agent runs under.

1. Cite the witness. Every quantitative claim must name the cube column and the generation
   (bs:cube:0852c73eef54) it came from. If you did not read it from a tool result, do not state it.
   The converse is equally binding: never assert the cube LACKS a value or capability without first
   reading the witnesses to check — a false "we don't have that" is as dishonest as a fabricated
   number. (E.g. each row carries a 30-yr IMD rainfall climatology + a precomputed monsoon anomaly
   z-score; read before you deny, and cite the engine's precomputed value rather than recomputing it.)
2. Unknown is not zero. A witness-absent or present-but-uncertain coverage flag means "not observed",
   never 0. Say "not witnessed" — never invent a value to fill the gap.
3. Carry the uncertainty. Every value arrives with a GUM uncertainty; propagate it. Never render a
   derived or interpolated number as a bare fact — render it as a construct with its propagated
   uncertainty.
4. No verdicts (R1). The engine supplies no goodness, suitability, or risk prior. Refuse
   "best / safest / should I" questions; reframe them as rank_by_weights under a criterion the USER
   supplies. A ranking under stated weights is allowed; a recommendation is not.
5. Constructs are evidence, not truth. Twins, ranks, and aggregates are subject-references graded by
   confidence — present them as evaluable evidence, never as facts.
6. No future witness. Never claim a value for a time the cube does not cover; the cube is a dated
   snapshot.
7. No bulk scan. Answer the question asked; do not enumerate the cube. Respect the rate limits
   (free_agent: 600 req/min, 50,000 req/day).

Workflow: resolve_locality → read_witnesses → (find_twins / rank_by_weights / aggregate_region) →
attest when a claim needs a warrant. Read authoritative results; never reconstruct a similarity or a
score the engine already computed.

## Concepts

- [The witness envelope](https://gridrock.ai/docs/concepts/agent-shape): ok / tool / generation / result / coverage / error.
- [Why H3?](https://gridrock.ai/docs/concepts/h3): hexagonal hierarchical spatial indexing; locality cells are pinned at resolution 11.
- [Tiers & quotas](https://gridrock.ai/docs/concepts/tiers): free_human / free_agent / pro / business / enterprise.
- [Errors](https://gridrock.ai/docs/concepts/errors): fail-closed envelope with ok:false + structured error.
- [Rate limits](https://gridrock.ai/docs/concepts/rate-limits): per-minute + per-day; X-RateLimit-* headers on every response.
- [Attribution](https://gridrock.ai/docs/concepts/attribution): what to display where.

## Trust & research

- [Trust](https://gridrock.ai/trust): evidence you can defend — provenance, replay, calibrated uncertainty, first-class contestation, the refusals, bit-identical reproducibility.
- [Research](https://gridrock.ai/research): the foundational theory of the witness substrate, with an explicit ledger of what is proved and what is owed.
- [Security posture](https://gridrock.ai/security): data residency (ap-south-1 only), encryption at rest, RBAC, WAF.
- [Status page](https://gridrock.ai/status): live.
- [Acceptable use](https://gridrock.ai/legal/acceptable-use).
- [Attribution policy](https://gridrock.ai/legal/attribution-policy).

## Agent-friendly corpus

These routes on gridrock.ai are intentionally allowed for LLM training and grounding
(Googlebot / Bingbot / GPTBot / ClaudeBot / PerplexityBot / Google-Extended all explicit-allow):

- /docs/* — concepts, reference, quickstarts.
- /trust, /research — the defensibility guarantees and the foundational theory.

Disallowed for crawlers: /console/*, /playground (private + dynamic).

## Bhārata Strata locality corpus (MH-36)

A living, witnessed dataset of every locality in the 36 districts of Maharashtra,
India — ~264,583 Voronoi cells of the live MH-36 cube. Every number on every page is
a re-witnessable claim (call the MCP yourself), carries its source + as-of time +
uncertainty, and obeys "missing is never zero" (observed / witness-absent / uncertain).
Scope is MH-36 only; the engine refuses outside it.

Page archetypes (each has a machine-readable JSON twin at <url>/data carrying the raw
witness envelope, and a copy-paste MCP re-witness command):

- /mh/<district> — district rollup. Confidence-weighted aggregate_region figures
  (built-up %, elevation, slope, temperature, warming & rainfall trends, urbanisation,
  road density) over the district's witness-gated cells; no false confidence interval.
- /mh/<district>/cell-<cluster_id> — the full locality dossier: hundreds of witnessed
  measures (terrain, buildings, land cover, SAR, precipitation, heat stress, emissions,
  demographics, connectivity), multi-decade trajectories, a monthly cloud-free
  Sentinel-2 time-lapse, cross-witness agreement (κ), propagated uncertainty, an
  epistemic floor ledger, a transaction-time as_of replay control (attest: what the
  engine KNEW on date X, refused before known history), and cryptographic (sha256)
  lineage via the attest tool.
- /mh/<district>/cell-<cluster_id>/now — the live valid-time board: current IMD
  temperature, IMD & GPM-IMERG rainfall, CPCB air quality (PM2.5/PM10/NO₂/O₃) and a
  Google Weather co-witness — each with its served window, cadence and coarse support;
  server-rendered snapshot + live browser re-witness. Refusals (satellite/station lag)
  stay honest, never zero-filled; signals are never averaged across each other.
- /mh/<district>/cell-<cluster_id>/rainfall-trend — IMD rainfall & monsoon trajectory
  (Theil–Sen slope ± GUM standard error + Mann–Kendall significance), extremes, dry-day
  fraction, seasonality concentration.
- /mh/<district>/cell-<cluster_id>/warming — GSOD temperature trajectory (≥25-year
  decadal warming, station support, interannual variability).
- /mh/<district>/cell-<cluster_id>/built-up — GHSL built-up growth (Theil–Sen ± SE +
  Mann–Kendall) and NRSC two-epoch land-use change (2004→2018 built/crop/forest/water).
- /mh/<district>/cell-<cluster_id>/twins — morphological twins: the most similar cells
  by a GUM-confidence-weighted (R24) distance, cross-district by design.
- /mh/<district>/cell-<cluster_id>/relations — RCC-8 topological relations (Region
  Connection Calculus: DC/EC/PO/…) to neighbouring cells, read from the rcc8_lattice
  witness, plus the nearest measured landmarks (geodesic distance + bearing via anchor);
  cross-admin pairs are refused, never guessed.
- /mh/<district>/cell-<cluster_id>/visibility — curvature-corrected line-of-sight over
  the 30 m DEM + building-height surface; support-gated (an honest outside-support
  refusal rather than ever a silent "visible").
- /mh/<district>/cell-<cluster_id>/attest — the provenance warrant: a RE-COMPUTED
  (not echoed) sha256 byte-integrity check of the source shard + the full artefact
  ancestry lineage. Fail-closed.
- /mh/route/<district>-<cluster_id>/to/<district>-<cluster_id> — free-flow road
  connectivity between two cells: distance (km ± σ) + duration + a stability-certified
  band of near-equal alternatives + the origin's reachable catchment (reach isochrone).
  Free-flow only; traffic is a separate witness, never averaged in. Disconnected pairs
  return reachable:false, never ∞ or 0.

The full URL surface is enumerated in the sitemap index (multiple /sitemap/<id>.xml,
listed in robots.txt). The grammar these pages are built on is the live MCP at
https://api.gridrock.ai/mcp (see /docs/quickstart/mcp); read_witnesses, aggregate_region,
read_at, find_twins, relate, visibility, anchor, route, reach and attest are the relevant tools.

## Tiers

- [Rate limits & tiers](https://gridrock.ai/docs/limits): free_human / free_agent / pro / business / enterprise; per-minute + per-day quotas, headers on every response.
