packages/api/src/api-contract.ts, which the Worker dispatches in protected-api.ts. To change an API operation, update its catalog entry (method, path, scope, validation, handler, and documentation), then run:
packages/docs/openapi.yaml with the change. CI regenerates it and rejects a diff; parsed contract tests also require exact method/path equality with the executable catalog. Shared schemas and general API metadata live beside the catalog in flow-schemas.ts, trace-replay-schemas.ts, and api-document.json.
Run npm run validate --workspace=factorize-docs to verify the generated artifact, parsed operation contract, and Mintlify configuration before publishing.