---
title: "Contract Spec v1"
description: "Pipeline Lock contract specification, examples, templates, and runtime enforcement checklist."
canonical: https://www.norcaster.com/docs/contracts
---
<!-- Generated at build time from the rendered page by portal/scripts/generate-llms.mjs. The page is the source of truth; edit it, not this file. -->

# Contract Spec v1

Pipeline Lock is designed to enforce that inference requests cannot silently diverge from your declared input and preprocessing contract.

## Documentation

Spec, examples, and reference implementations in the repo.

- **Spec v1** — Schema rules, feature contract, violation codes
- **Examples** — Text, tabular, RAG, agent configs
- **Runtime enforcement checklist** — Pre-production checklist

Path: `docs/contracts/`

## Templates

Starter templates for FastAPI, Node.js, and agent use cases.

- **FastAPI** — Python REST API, text-prompt contract
- **Node** — Express, text-prompt contract
- **Agent** — Messages/tools, warn mode

Path: `templates/`

## Enforced contracts

- Request schema (JSON Schema draft-07 subset)
- Feature contract (tabular or text, ordering)
- Preprocessing artifact integrity (checksums)
- No coercion — values must match declared types

## APIs

- `POST /run` — Inference (validated)
- `POST /contract/validate` — Validate config (CI)
- `POST /deployments/{id}/validate` — Dry-run input
- `GET /deployments/{id}/schema-stats` — Observed keys, violations
