Contract first · with a coding agent

Build a data product with AI.

A coding agent builds it. You give it three inputs: a data contract (what), skills (how), and a data marketplace (the data to build on).

Data contractthe what Skillsthe how Browse the skill hub → Marketplacethe data to build on Coding agent Data product
Data contract · the whatA YAML file in the Open Data Contract Standard (ODCS): schema, data quality rules, SLA, owner, and terms of use. Its fields are anchored in your business ontology, so brand means the same everywhere. Agreed with the consumer before any code is written, then used as the test the result must pass.See how a conversation becomes a contract ↓
Skills · the howInstructions, templates, and hooks that teach the agent your conventions: how to scaffold a dbt project, implement the models, test against the contract, and publish. Pick a library for your platform, then adapt it.Browse the skill hub →
Data marketplace · the data to build onThe existing data products of your organization, each with its data contract. The agent searches it for input data, requests access, and publishes the finished data product back, so the next one can build on it.Explore the marketplace ↓
Coding agent · builds itClaude Code, OpenAI Codex, GitHub Copilot CLI, or any agent that reads skills. It reads the contract, follows the skills, finds and requests the input data in the marketplace, writes and runs the dbt project, and tests the result against the contract.Watch the agent run ↓
Data product · the resultA dbt project with input and output ports, a table on your data platform, passing contract tests, and lineage. Published to the marketplace with its data contract, so others can find it, request access, and build on it.See the result ↓
Data contract · the what

From conversation to data contract

Maxi (category manager) needs to know which brands barely sell. John owns the sales data. Each answer becomes part of the contract.

Maxi · category managerWhich of our brands barely sell? I want to talk to them, run a campaign, or take them out of the assortment.
John · product owner, salesLet's make that a data product with a contract: slow selling brands.
+ purpose
John · product owner, salesWhat do you need to see per brand?
Maxi · category managerHow many of its products sell slowly, and when one of them last sold.
+ schema
John · product owner, salesBrand as in our product catalog?
Maxi · category managerYes, the brand everyone in the company means.
John · product owner, salesThen we link it to the Brand concept in our ontology.
+ semantics
John · product owner, salesWhen is a product slow-selling? Do returns count as sales?
Maxi · category managerNo sale in six months. And returns are not sales.
+ definition
Maxi · category managerOne row per brand, please. No duplicates.
+ data quality
Maxi · category managerI look at it every Monday morning.
John · product owner, salesWe refresh it daily.
+ SLA
Maxi · category managerWho do I ask when something looks off?
John · product owner, salesUs, the sales team.
+ owner
John · product owner, salesAnything it must not be used for?
Maxi · category managerIt is about brands, not people. Not for rating individual buyers.
+ terms of use
John · product owner, salesWe serve it from Snowflake. The contract is done, now the agent can build it.
+ server
Business ontology Brand Product belongs to Brand name slow_selling_brands Data contract · purpose: find brands that barely sell ColumnType brandstring slow_selling_productsinteger latest_sold_datedate → Brand name No sale in 6 months · returns are not sales ✓ Quality: one row per brand ◷ SLA: refreshed daily Owner: sales team ⊘ Not for rating buyers Snowflake · SALES_PROD · to be built
apiVersion: v3.1.0
kind: DataContract
id: slow-selling-brands
name: Slow Selling Brands
version: 1.0.0
status: draft
description:
  purpose: Find brands that barely sell
  usage: Brand talks, campaigns, assortment decisions
  limitations: Not for rating individual buyers
schema:
  - name: slow_selling_brands
    physicalType: table
    properties:
      - name: brand
        logicalType: string
        required: true
        authoritativeDefinitions:
          - type: semantics
            url: ontology/brand#brand-name
      - name: slow_selling_products
        logicalType: integer
        required: true
        description: No sale in the last 6 months, returns are not sales
      - name: latest_sold_date
        logicalType: date
        description: When a product of the brand last sold
    quality:
      - type: sql
        description: One row per brand
        query: SELECT COUNT(*) - COUNT(DISTINCT brand) FROM slow_selling_brands
        mustBe: 0
slaProperties:
  - property: freshness
    value: 1
    unit: d
team:
  name: sales
servers:
  - server: production
    type: snowflake
    account: acme-eu1
    database: SALES_PROD
    schema: slow_selling_brands_v1
Skills · the how

The skill hub for building data products.

Open skill libraries with skills, templates, and hooks that any coding agent reads. Pick one from the skill hub, then adapt it to your conventions.

Skill library used hereentropy-data/dataproduct-builder-demodbtSnowflake
dataproduct-builder-demo/ skills/ hooks/

Browse all skill libraries in the skill hub →

skills/dataproduct-implement/SKILL.md

Implement a data product

Turns a data product from Entropy Data into a working dbt pipeline, and proves it works.

Tools
entropy-datadbtdbt-oldatacontract
Steps
  1. Pre-checksdbt project exists, all four CLIs are installed, entropy-data connection test succeeds.
  2. Resolve the data productentropy-data dataproducts get: name, owner, output ports.
  3. Fetch the data contractentropy-data datacontracts get, saved under models/output_ports/v1/.
  4. Translate the schema to dbtOne model per contract table, columns cast to Snowflake types, tests from the contract.
  5. Wire the input portsEach approved access becomes a dbt source, with the upstream contract as a trust snapshot.
  6. dbt parseFix obvious mistakes before anything runs.
  7. dbt-ol runMaterializes the tables in Snowflake and ships lineage to Entropy Data.
  8. dbt testnot_null, unique, and accepted_values from the contract.
  9. datacontract testChecks the live Snowflake data against every rule in the contract.
  10. Stamp as builder-managedMarks the data product in Entropy Data as built with this plugin.
  11. Final reportStatus of every artifact: created, updated, passed, failed.
The contract is the source of truth for the schema, not for the logic.
Data marketplace · the data to build on

Build on other data products.

The agent searches the data marketplace for data products to build on, reads their contracts, and requests access. Search like the agent does.

Articles Latestused below

Current articles with brand, category, and list price.

Product catalogSnowflakeData contract
articles-latestODCS · v1.0.0 · active
skustring→ SKU
brand_namestring→ Brand name
categorystring
list_pricedecimal
Quality: sku is unique.
Owner: product catalog team
Shelf Warmersused below

Articles without a sale in the last six months.

FulfillmentSnowflakeData contract
shelf-warmersODCS · v1.0.0 · active
skustring→ SKU
last_sold_datedate
stockinteger
No sale in the last six months.
Owner: fulfillment team
Orders

All orders and line items, updated hourly.

CheckoutSnowflakecontract
Customers

Customer master data. Contains personal data.

CRMSnowflakecontract
Stock Levels

Daily stock per article and warehouse.

WarehouseSnowflakecontract
Returns

Returned items with reason codes.

FulfillmentSnowflakecontract
Web Sessions

Sessions and page views from the web shop.

MarketingSnowflakecontract
Price History

List price changes per article.

PricingSnowflakecontract

Illustrative marketplace. The two highlighted data products are the ones the agent builds on below. Hover them to preview their data contracts.

Coding agent · builds it

Implement it.

One prompt. The agent uses the contract, the skills from dataproduct-builder-demo (one of the libraries in the skill hub), and the marketplace, then runs the pipeline and publishes the result.

claude · slow-selling-brands0:00
❯ Implement the data product slow-selling-brands with its data contract
Don't ask questions. Approve access requests if you have the rights.
● Reading data contract slow-selling-brands.odcs.yaml
created dbt project, dataproduct.odps.yaml
● entropy-data search query "articles sales"
found articles-latest, shelf-warmers (join on sku)
● Requesting access to articles-latest
✓ approved
● Requesting access to shelf-warmers
✓ approved
input_ports/ · intermediate/ · output_port/slow_selling_brands.sql
● datacontract lint ✓ dataproduct lint ✓
● dbt-ol run ✓ SLOW_SELLING_BRANDS, 41 rows
● dbt test ✓ 3/3
● datacontract test ✓ 11/11
● dataproduct publish dataproduct.odps.yaml ✓
● datacontract test --publish ✓ test results published to Entropy Data
● Lineage sent via OpenLineage
✓ Done. Data product slow-selling-brands is active.
Data marketplace articles-latestProduct catalog shelf-warmersFulfillment ordersCheckout returnsFulfillment pending access ✓ pending access ✓ slow-selling-brandsnew · built by the agent publish test resultstests 11/11 active lineage via OpenLineage Data contract Skills Codingagent search request access dbt projectdataproduct.odps.yamlwrites input_ports/output_ports/v1/ lint ODCS ✓ · ODPS ✓ Snowflake dbt-ol run SLOW_SELLING_BRANDStable · 41 rows dbt test 3/3 ✓ contract test 11/11 ✓ dataproduct publish
Data product · the result

The fully operationalized data product

The agent produced a complete dbt project, built on articles-latest and shelf-warmers: 41 brands in Snowflake, 3/3 dbt tests and 11/11 contract tests green.

slow-selling-brands/models/input_ports/output_ports/v1/
slow_selling_brands.sqlThe model the agent wrote. Joined on SKU, cast to the contract types. Simplified.
with shelf_warmers as (select * from {{ ref('shelf_warmers') }}),
     articles      as (select * from {{ ref('articles_latest') }})

select
  a.brand_name::varchar         as brand,
  count(*)::integer            as slow_selling_products,
  max(sw.last_sold_date)::date as latest_sold_date
from shelf_warmers sw
join articles a on sw.sku = a.sku   -- same concept in the semantics
group by a.brand_name
11/11
Data contract slow-selling-brands is valid.
Server production · Snowflake · run by datacontract test --publish · results published to Entropy Data
ResultCheckFieldType
✓ passedTable existsslow_selling_brandsschema
✓ passedField is presentbrandschema
✓ passedField is presentslow_selling_productsschema
✓ passedField is presentlatest_sold_dateschema
✓ passedType is stringbrandschema
✓ passedType is integerslow_selling_productsschema
✓ passedType is datelatest_sold_dateschema
✓ passedRequired: no null valuesbrandschema
✓ passedRequired: no null valuesslow_selling_productsschema
✓ passedOne row per brandslow_selling_brandsquality
✓ passedFreshness: within 1 daylatest_sold_dateSLA
Business ontology ProductBrand belongs to SKUBrand name join on sku shelf-warmersdata contractskulast_sold_datestock articles-latestdata contractskubrand_namecategorylist_price slow-selling-brandsnew data contractbrandslow_selling_productslatest_sold_date
sku in articles-latest and shelf-warmers links to the same SKU concept, so the agent joins on it. brand in the new contract links to the same Brand name as brand_name upstream.
articles-latestexisting data product shelf-warmersexisting data product slow-selling-brandsnew · built by the agent next?
Lineage from the OpenLineage events of dbt-ol run, as shown in the marketplace.
Do it yourself

What it takes to build this yourself.

Three steps, all open source or free. Then every new data product starts the same way: with a data contract.

1 · The data to build on

Set up Entropy Data as your data marketplace

The free Community Edition runs anywhere Docker runs. Register your existing data products, so the agent can find them, read their contracts, and request access.

docker compose up --detach
Community Edition on GitHub →
2 · The how

Customize the skills with Claude Code

Fork a skill library from the hub as a base. Point Claude Code at one of your exemplary data products and let it adapt the skills to your platform, conventions, and policies.

> Adapt these skills to how we build data products. Use <our best data product repo> as the reference.
Pick a skill library from the hub →
3 · The what

Begin with your first data contract

Write down what the data product must deliver, together with business, producers, and consumers, in the Data Contract Editor. Then tell your agent to implement it.

Implement.
Data Contract Editor →
FAQ

Questions

What is a data product?

A data product is a unit of data, code, and metadata, owned by one team, that offers its data to others through output ports. Each output port is described by a data contract. Data products are defined in the Open Data Product Standard (ODPS).

What is a data contract?

A data contract is a YAML document in the Open Data Contract Standard (ODCS) that states everything guaranteed about a dataset: schema, semantics, data quality rules, SLAs, owner, terms of use, and where the data lives. The open-source Data Contract CLI tests real data against it.

How do you build a data product with AI?

Give a coding agent such as Claude Code three inputs: a data contract that says what to build, a skill library that says how to build it (pick one from the skill hub), and a data marketplace with the data to build on. Then prompt it to implement the data product. The agent requests access to input data products, generates a dbt project, runs the pipeline, tests the data against the contract, and publishes the data product with test results and lineage.

What does contract-first mean?

Contract-first means agreeing on the data contract with the business and the consumers before any data is extracted or any pipeline is written. The contract becomes the specification the coding agent implements and the test the result must pass.

Which standards and tools are used?

The Open Data Contract Standard (ODCS) and the Open Data Product Standard (ODPS) from the Linux Foundation, Apache Ossie for semantics, dbt and Snowflake for the pipeline, the Data Contract CLI and Data Product CLI for testing and publishing, and Entropy Data as the data marketplace.