Hand an agent the contract for pipeline transforms

Vibe codingMedium25 minAnthropic and Databricks style

Your task

Your team's Python pipeline runs about 200 transforms, and each one follows a contract. You asked an agent for a transform that dedupes user events. It worked locally, but it changed its input in place, logged with print() and never got registered, so it would not have run. Now you need 6 more transforms from the same agent.

Write the context you would give the agent once, for all 6.

What you know:

  • a transform takes a pandas DataFrame and returns a new one, and declares its input and output columns in a Schema from pipeline/schema.py
  • logging goes through get_logger from pipeline/log.py, and every transform needs an entry in pipeline/manifest.yaml
  • transforms/sessionize.py is a transform the team considers a model one
  • the scheduler reruns a failed day from scratch, so a rerun on the same input must give the same output

Then, in a few sentences: why does each rule belong in the context, not only in review?