Data contracts for agents: what they miss and how to test meaning A developer tested whether written data contracts can stop coding agents from silently redefining key fields, running three agent sessions against a mock shop repository where an agent changed the `is_active_customer` window from 90 days to 12 months without breaking any structural checks. In a separate 20-row test, two chat sessions both counted 7 active customers, but only the one given a plain meanings block withheld a churn figure and pointed to the definition owner, while the other assumed a definition and reported 9. The developer cautions the results are single runs in imperfectly clean sessions, and argues meaning should live in its own written layer that both producers and consuming agents read. TL;DR. A data contract is a written, checked agreement between the people who produce or own a dataset and the people and agents who use it. The checks teams usually write type, not null, fresh test structure. The costly failures change meaning and leave structure alone. Coding agents now sit on both sides: one changes the field, another reads it by its name. A contract protects you when it carries the meaning of each key field, two named owners and a rule that a change in meaning is a breaking change, and when it lives where your agent reads it. Use a plain meanings file before launch, add a check that recomputes a key flag once customers pay, and move to the open standard with a first data person. Illustration of the method, on made-up sample data. Picture an online shop whose customer table has a flag, is active customer , meaning "placed an order in the last 90 days". Someone in marketing asks the team's coding agent to count the last 12 months instead. The agent edits one number and adds two tests. The column keeps its name and type, and every check passes. Downstream, the active customer count doubles. The weekly review celebrates growth that is not there. Nobody gets an alert, because nothing written said what "active" meant. A check only tests what someone wrote down. Andrew Jones, author of a book on data contracts, argued this in July 2026 https://andrewrjones.substack.com/p/data-contracts-anti-pattern-4-your . His example is an amount field that moves from including tax to excluding it. The pipelines keep running and the reports come out different. In my view, agents raise the cost of an unwritten definition on both sides. Before AI assistants, one analyst usually held the meaning of active in their head. Now an agent on the producing side makes the change in minutes, and it may not ask about a rule nobody wrote. An agent on the consuming side writes queries from column names, assumes is active customer means what the name suggests, and builds the report. No person with context sits between the change and the chart. Meta's analytics team describes, in an article on its internal analytics agent https://medium.com/@AnalyticsAtMeta/inside-metas-home-grown-ai-analytics-agent-4ea6779acfb3 30 March 2026 , "ingredients" that hold what the data means, kept apart from "recipes" for how to analyze it. The lesson I take at small scale is the separation: meaning lives in its own written layer, and people and agents both read it. We tested it once, on 11 November 2026, on a made-up repository holding the shop's flag. Three sessions of the same coding agent got the marketing request above. We also gave two chat sessions a 20-row export and asked for active and churned customers. Both counted 7 active. The one holding the plain block below gave no churn number and pointed to the definition owner. The other assumed a churn definition, said so, and reported 9. This is one run each, in sessions that were not fully clean, not evidence of a general effect. What I take from it: in the change test, the contract did the work, and the extra rule file added little. Put the contract where your agent works. I think a small team needs one short block per key field a decision depends on. I think the number of key fields, who can change the data, and the money riding on a number matter more than stage. Stage decides who keeps the file. Before launch. One text file with the meaning of your handful of money fields and flags, in the application repository. No repository and no coding agent? Keep this block in a shared document and paste it into your chat assistant's instructions: is active customer - Meaning: the customer placed an order in the last 90 days. - Who is counted: real customers. Test and internal accounts are never counted. - Period: rolling 90 days up to the time the flag was computed, UTC. - Producer owner: Avi Cohen made-up name . Owns the field and every change to it. - Definition owner: Maya Levi made-up name . Decides what "active" means. - Change rule: changing the window, the event or who is counted is a change in meaning. It needs the definition owner's yes before the code changes. Rule for people and agents: use this meaning. If a field a decision depends on is not written here, do not guess from its name. Ask the definition owner first. First paying customers. The same block as a small file your tools can read, plus a check that recomputes the flag from raw data. Run it in the producer's pipeline, against a replica or a nightly export, so the person or agent who made the change sees it fail. Growing with a first data person. Move the file to the Open Data Contract Standard https://bitol-io.github.io/open-data-contract-standard/latest/schema/ , so people and tools read it the same way. Make a change in meaning a major version, and tell the consumers before it ships. The meaning changed and the shape stayed. A flag moves from 90 days to 12 months and every structural check stays green. Guardrail: The contract states the meaning, and a change in meaning counts as a breaking change. Check: Recompute the flag from the raw timestamp, as of the time it was set, and count the rows that disagree with the stored flag. The contract exists, but nobody owns the field. The file sits in the repository and no person approves changes to it. Guardrail: Each key field names its two owners, and both are required reviewers on the contract file. Check: Ask who approved the field's last change. If nobody knows, it has no owner. The check lives only in the warehouse. The data fails after it has landed, and whoever made the change has moved on. Guardrail: Shift the check left. Run it in the producer's own pipeline, before a change merges or nightly. Check: Break the rule on purpose in a test branch. The producer owner should get the alert. This part gets technical. The stage two contract is our own small layout, not a standard. Names are made up. contract version: 1.0.0 a change in meaning is a major version fields: - field: customers.is active customer meaning: The customer placed an order in the 90 days before the flag was computed. who is counted: real customers; rows with is test = true are never counted period: rolling 90 days up to flag computed at, UTC producer owner: a.cohen owns the field at its source and every change to it definition owner: m.levi decides what the flag means consumers: weekly review, investor update, analytics agent change rule: a change to the window, the event or who is counted is a change in meaning; major version, owners approve, consumers told before it ships check: contracts/drift check.postgres.sql must return disagreeing = 0 The drift check runs read-only against a replica or an export. -- Meaning under test contract v1 : active = order in the 90 days before the flag was computed. -- PostgreSQL syntax. Compare as of flag computed at, not now , or every -- refresh boundary shows up as drift. with checked as select is active customer is distinct from coalesce last order at = flag computed at - interval '90 days', false as disagrees from customers where is test is not true select count as customers checked, count filter where disagrees as disagreeing, round 100.0 count filter where disagrees / nullif count , 0 , 2 as disagreeing pct from checked; We ran it on 11 November 2026 in a local PostgreSQL 16, and a SQLite version of it, on 40 made-up customers, 4 of them test accounts. With the flag following the contract it returned 36 checked and 0 disagreeing. With the same column quietly computed over 12 months it returned 15 of 36 disagreeing 41.67 percent , in both engines. It was not run on a production database. In ODCS version 3.2.0 on 11 November 2026, maintained by Bitol, a Linux Foundation AI and Data project , description and businessName carry the meaning, authoritativeDefinitions points to where it is written, quality holds the checks, and a top-level team names the owners. Our stage three file validates against the standard's published JSON schema. Caveats: See where your setup stands with the two minute self-check https://goagentdata.com/ self-check . Then read the draft checks https://goagentdata.com/guide checks your coding agent can run, and the post on checking AI data answers https://goagentdata.com/posts/evals-for-data-answers . First published on goagentdata https://goagentdata.com/posts/data-contracts-test-meaning , a free, vendor-neutral guide to data for startups with no data team.