Adios
BlogEngineering

Engineering

The Deploy Contract for AI-Generated Apps

AI-generated code still needs a contract: build it, start it, configure it, check it, and route traffic to the exact version you reviewed.

Adios team8 min read

The model can write code quickly. A deploy contract explains how that code becomes a repeatable runtime.

A deploy contract answers five questions

A generated project may contain good application logic and still be impossible to run consistently. The deploy contract fills that gap by naming the commands, runtime, dependencies, health behavior, and route.

Keep those answers close to the source. If the app needs a database, a queue, a cache, or a private provider key, that dependency should be visible before deployment.

  • How is the app built from a clean checkout?
  • How does the production process start?
  • Which port and health path prove readiness?
  • Which secrets and managed services are required?
  • Which version receives public traffic?

Generated code should not hide operations

AI tools often choose convenient defaults. That is useful during exploration, but developers still need to check whether the server binds to the right host, whether migrations run safely, and whether credentials are referenced rather than committed.

The contract is also where reviewers can spot risky changes. A new start command, health path, resource dependency, or public route can change availability even when the application diff looks small.

name: worker-api
build_cmd: go build -o /app/server ./cmd/server
start_cmd: /app/server

runtime:
  name: go@1.25
  port: 8080
  health_path: /healthz

requires:
  - db
  - queue

Use previews to test the contract

A preview should exercise the same build and start assumptions the deployment will use. If the app fails to bind to the configured port, cannot read a required secret, or reports healthy while its database is unreachable, fix that before promotion.

This is the point of connecting source-backed workspaces and deployment. The developer can ask the agent to make a change, run the preview, inspect logs, adjust the manifest, and deploy the version that passed.

  All articles