Inspiration
AI coding agents can generate technically valid schema changes while still breaking real downstream systems because they often lack the organisation's actual data context.
SchemaShield was built to make DataHub context a mandatory safety gate before an agent recommends a schema change.
What it does
SchemaShield takes a proposed data-schema change and first queries DataHub for the real dataset and its downstream lineage.
It then applies a deterministic blast-radius gate and returns one of three outcomes:
- ALLOW — no downstream dependencies were found.
- REVIEW — dependencies exist and require a coordinated migration.
- BLOCK — authoritative context is missing or the blast radius is too large for an automatic recommendation.
The agent then produces an evidence-backed migration and rollout plan without allowing model confidence to override DataHub evidence.
How we built it
SchemaShield is implemented in Python with FastAPI.
It integrates the official DataHub MCP Server and uses its search and get_lineage tools to retrieve authoritative metadata and dependency context.
A deterministic policy layer converts that evidence into ALLOW, REVIEW or BLOCK.
Google ADK orchestrates Gemini 3.6 Flash to explain the decision and generate the migration plan.
The service is designed to fail closed if the required DataHub context step is not observed.
Challenges we ran into
The main challenge was keeping the language model from becoming the source of truth.
Schema changes can have serious downstream consequences, so we separated reasoning from authority: DataHub provides the context, deterministic code makes the safety decision, and the model explains and plans within that decision.
We also designed the integration so missing catalogue evidence causes a BLOCK rather than silently allowing the agent to continue.
Accomplishments that we're proud of
- DataHub context is mandatory before a recommendation.
- Downstream lineage directly affects the decision.
- Deterministic ALLOW / REVIEW / BLOCK policy.
- Fail-closed behaviour when authoritative context is missing.
- Reproducible repository and automated policy tests.
- 10/10 deterministic gate tests passing in the initial build.
What we learned
Context is most useful to agents when it is treated as an authority rather than just additional prompt text.
DataHub provides the missing organisational knowledge that a general-purpose coding model cannot safely infer: real assets, lineage and downstream dependencies.
What's next for SchemaShield
Next we want to expand SchemaShield from schema changes into broader metadata-aware development workflows, including generated SQL, dbt model changes, API contracts and pull-request checks.
The same pattern can provide a reusable safety layer for coding agents operating against production data systems.
Log in or sign up for Devpost to join the conversation.