AI agents are great at building data pipelines that look like they work until you dig into the results.
Write-audit-publish (WAP) helps fix that. Stage the data, audit it against a declared contract, and only publish once every clause passes. Netflix popularized this pattern in 2017.
A pipeline that finishes successfully is not the same as one whose output is correct.
We’ve built a number of internal skills to make our own data pipelines safer, and this one felt useful enough to release as a free WAP skill for coding agents.
The first test was on Netflix’s Top 10 dataset. The initial run stopped at the gate. Our contract said every film should have “N/A” as the season title, but the agent found nine rows that didn’t match. The contract was wrong, not the data. We fixed it, started a fresh run, and the second attempt published cleanly, with the total reconciling to exactly 185,656,120,000 hours viewed.
We ran it again on an NFL play-by-play pipeline (converting play description strings into structured stat tables). It caught a parser bug that left 1,723 completed passes without matching receptions, exactly the kind of thing a "successful" run hides.
Below, we dig a bit more into how the skill works. Give it a read, or point your coding agent at this URL and try it yourself.
How the Skill Works
The contract is seven concrete promises about the batch, written so a machine can test them:
Volume. Is the batch non-empty and within the expected size range?
Grain. What does one row represent?
Conservation. How should source rows map to target rows? Exact-count rules catch dropped joins and silent filters.
Bounds. Are all the measures within valid ranges?
Reconciliation. Which aggregates have to match on both sides? Matching row counts do not mean the numbers are right.
Freshness. How old is the newest record allowed to be, based on the source’s actual publishing cadence?
Known quirks. Every odd edge case you have already discovered, turned into an assertion.
These executable checks run on every publish. When something upstream changes, you find out from a failed batch instead of an angry stakeholder.
The contract and audit log become the human-in-the-loop validation surface. I don’t rely on reading every line of agent-written code; I review the pass/fail evidence against the rules I set.
NFL Play-by-Play Example
We also tested the pattern on something messier than the clean Netflix data: our NFL play-by-play pipeline. It takes 473,105 raw plays across nine season tables and turns them into 10,962 staged player-season rows through a JavaScript parser working from free-text descriptions.
Seven of eight audits passed. Reconciliation failed.
We had 121,252 completed passes but only 119,529 receptions, along with similar mismatches in passing and receiving yards. Every completed pass should credit one passer and one receiver with the same yardage under our declared model.
The parser was missing receiver formats such as “Ja.Brown” and “D. Thomas.” The failed run left all 10,962 rows in staging, exactly where a bad batch should stop.
How We Use It in Belvedere
In Belvedere, agents build the pipeline. They don’t become the pipeline. The output is normal, readable, versionable code with no model in the runtime path.
Skills are the repeatable procedures the building agents follow.
The contracts are how we catch bad data before it ships.
The seven clauses in this skill are a starting point. Encode your team’s validation strategy once as contracts and skills, and every pipeline your agents build can inherit it.
Where It Came From
In 2017, Michelle Ufford from Netflix data engineering gave a Hadoop Summit talk titled “Whoops, the Numbers are Wrong! Scaling Data Quality @ Netflix”. The problem she described is still common: the job succeeds, the dashboard turns green, and the numbers are wrong.
A failed audit can make a table late.
Skipping the audit can produce a wrong decision.
When Not to Use It
Skip the gate when the cost of running it exceeds the cost of being wrong. Don’t use it for:
Exploratory notebooks and one-off queries. If you are the only consumer and the table dies with the session, the contract is unnecessary.
Prototypes with no downstream users. A staging table nobody trusts is already its own gate.
Domains where you cannot yet write falsifiable promises. Learn the grain and conservation rules first.
But if a bad publish could affect a real decision, budget, or mission metric, use the skill.
Grab the Skill
The write-audit-publish skill is plain Markdown you can use for free. Your agent can pull it directly:
curl -o SKILL.md https://www.clearfracture.ai/skills/write-audit-publish.md
It works in the coding agent you already use (Claude Code, Cursor, Codex, or another tool) on your own machine. PostgreSQL is the reference implementation; adapting it to another engine requires verifying that engine’s promotion, dependency, and transaction semantics.
The database itself can live anywhere your agent can reach. Give the agent the name of the environment variable containing your connection string, never the credential itself.
Everything the workflow creates lives in the database, including staging tables, the audit log, and the gate. Each run gets a fresh ID, and the agent stops at the gate until you explicitly approve that specific run for publication.
To invoke it:
Apply this write-audit-publish skill. Read the database connection from the
DATABASE_URLenvironment variable; do not print it. SOURCE: YOUR_SOURCE. TARGET: YOUR_TARGET_TABLE. Contract: YOUR_SEVEN_CLAUSES, or “profile the source and propose one.” After the gate, show me the audit log. If anything fails, stop and report; do not publish.
We run pipelines under these guarantees every day. Book a demo to see the gate live in Belvedere.
Clear Fracture builds Belvedere, an agentic data manager where agents build the pipeline, but contracts and gates decide what gets published.





