From 7c826492364e9139ad627fbb8b0fdeb110d9453b Mon Sep 17 00:00:00 2001 From: Louis Sanna Date: Sun, 29 Mar 2026 12:53:47 +0200 Subject: [PATCH 1/2] Add repository guidance for generated files --- AGENTS.md | 37 +++++++++++++++++++++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 38 insertions(+) create mode 100644 AGENTS.md create mode 120000 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..6a8cb9d5 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,37 @@ +# Repository Guide + +This repository is mostly generated code. + +Before editing or approving a PR, check the top of the file: + +```python +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +``` + +If that marker is present, do not hand-edit the file. Changes should be made in the upstream source or generator inputs, then regenerated. + +## What We Own + +The main hand-maintained surface is listed in `.genignore`. + +At the repo root, that currently includes files such as: + +- `pyproject.toml` +- `examples/*` +- `utils/*` +- `src/mistralai/extra/*` +- `pylintrc` +- `scripts/prepare_readme.py` + +There are also package-specific ownership files: + +- `packages/gcp/.genignore` +- `packages/azure/.genignore` + +If a file is not listed in the relevant `.genignore` and it has the generated header, assume it should not be edited directly. + +## PR Review Rule Of Thumb + +- Prefer PRs that change hand-owned files listed in `.genignore`. +- Be skeptical of direct edits to generated SDK files under `src/`, `docs/`, or `packages/*/src/`. +- If a generated file changed, look for the corresponding source/config change that explains the regeneration. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 00000000..47dc3e3d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file From 4ba0524958fc34ffa0639e240fde77a39827aad4 Mon Sep 17 00:00:00 2001 From: Louis Sanna Date: Mon, 30 Mar 2026 09:38:37 +0200 Subject: [PATCH 2/2] Remove stale generated headers from owned SDK files --- packages/azure/src/mistralai/azure/client/sdk.py | 2 -- packages/gcp/src/mistralai/gcp/client/sdk.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/packages/azure/src/mistralai/azure/client/sdk.py b/packages/azure/src/mistralai/azure/client/sdk.py index 985cb9a8..3203463e 100644 --- a/packages/azure/src/mistralai/azure/client/sdk.py +++ b/packages/azure/src/mistralai/azure/client/sdk.py @@ -1,5 +1,3 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - from .basesdk import BaseSDK from .httpclient import AsyncHttpClient, ClientOwner, HttpClient, close_clients from .sdkconfiguration import SDKConfiguration diff --git a/packages/gcp/src/mistralai/gcp/client/sdk.py b/packages/gcp/src/mistralai/gcp/client/sdk.py index e6e83839..b3f48158 100644 --- a/packages/gcp/src/mistralai/gcp/client/sdk.py +++ b/packages/gcp/src/mistralai/gcp/client/sdk.py @@ -1,5 +1,3 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - from .basesdk import BaseSDK from .httpclient import AsyncHttpClient, ClientOwner, HttpClient, close_clients from .sdkconfiguration import SDKConfiguration