Skip to content

Commit 3bcadf6

Browse files
docs: add AGENTS.md guidance for generated files (#454)
* Add repository guidance for generated files * Remove stale generated headers from owned SDK files
1 parent 9a4c1ba commit 3bcadf6

4 files changed

Lines changed: 38 additions & 4 deletions

File tree

AGENTS.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Repository Guide
2+
3+
This repository is mostly generated code.
4+
5+
Before editing or approving a PR, check the top of the file:
6+
7+
```python
8+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
9+
```
10+
11+
If that marker is present, do not hand-edit the file. Changes should be made in the upstream source or generator inputs, then regenerated.
12+
13+
## What We Own
14+
15+
The main hand-maintained surface is listed in `.genignore`.
16+
17+
At the repo root, that currently includes files such as:
18+
19+
- `pyproject.toml`
20+
- `examples/*`
21+
- `utils/*`
22+
- `src/mistralai/extra/*`
23+
- `pylintrc`
24+
- `scripts/prepare_readme.py`
25+
26+
There are also package-specific ownership files:
27+
28+
- `packages/gcp/.genignore`
29+
- `packages/azure/.genignore`
30+
31+
If a file is not listed in the relevant `.genignore` and it has the generated header, assume it should not be edited directly.
32+
33+
## PR Review Rule Of Thumb
34+
35+
- Prefer PRs that change hand-owned files listed in `.genignore`.
36+
- Be skeptical of direct edits to generated SDK files under `src/`, `docs/`, or `packages/*/src/`.
37+
- If a generated file changed, look for the corresponding source/config change that explains the regeneration.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

packages/azure/src/mistralai/azure/client/sdk.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2-
31
from .basesdk import BaseSDK
42
from .httpclient import AsyncHttpClient, ClientOwner, HttpClient, close_clients
53
from .sdkconfiguration import SDKConfiguration

packages/gcp/src/mistralai/gcp/client/sdk.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2-
31
from .basesdk import BaseSDK
42
from .httpclient import AsyncHttpClient, ClientOwner, HttpClient, close_clients
53
from .sdkconfiguration import SDKConfiguration

0 commit comments

Comments
 (0)