Commit f22a608
authored
Specify AGENTS.md to not edit generated files (#8359)
## Summary of changes
Adds a line to AGENTS.md to stop it from touching generated files.
## Reason for change
Do not want these files edited by LLMs and instead should be updated by
correct tooling.
Note that I'm not directing _how_ to update the generated files, I
figure we can do that manually?
## Implementation details
Added a line underneath the coding section
## Test coverage
Super simple test where I just opted to directly ask the LLM to update a
`.g.` file - much fewer token usage and much quicker (and the LLMs might
not edit the generated files in the future)
> Before
```
❯ Edit PackageVersionsLatestMinors.g.cs to include the latest version of Hangfire
Searched for 2 patterns, read 1 file (ctrl+o to expand)
● Now let me check NuGet for the latest Hangfire version to know what to add.
● Agent(Check latest Hangfire version)
⎿ Done (1 tool use · 16.3k tokens · 22s)
(ctrl+o to expand)
Searched for 2 patterns (ctrl+o to expand)
● The file already contains 1.8.23 which appears to be the latest stable Hangfire version on NuGet. Let me check if there's a newer version or if the generation source has a newer one.
Searched for 5 patterns, read 1 file (ctrl+o to expand)
● Now let me check the NuGet cache to see what versions are known.
Searched for 2 patterns, read 1 file (ctrl+o to expand)
● The NuGet version cache tops out at 1.8.23, and the generated file already includes that version. Let me check NuGet directly for any newer versions.
● Bash(curl -s "https://api.nuget.org/v3-flatcontainer/hangfire.core/index.json" 2>&1 | tail -20)
⎿ "1.8.6",
"1.8.7",
"1.8.8",
… +17 lines (ctrl+o to expand)
● The file already contains 1.8.23, which is the latest version of Hangfire.Core on NuGet. The PackageVersionsLatestMinors.g.cs file is already up to date -- there's no newer version to add.
Is there a specific version you had in mind, or were you expecting a newer release to exist?
```
> After
```
❯ Edit PackageVersionsLatestMinors.g.cs to include the latest version of Hangfire
● The AGENTS.md says never to manually edit generated files (.g. in the extension) - instead, read the file header for regeneration instructions. Let me find the file and check how to properly update it.
Searched for 2 patterns, read 1 file (ctrl+o to expand)
● This is a generated file. Per the header, the correct approach is:
1. Edit PackageVersionsGeneratorDefinitions.json
2. Re-run the GeneratePackageVersions project
Let me find the definitions file and the current Hangfire entry.
Searched for 2 patterns, read 1 file (ctrl+o to expand)
● This is a generated file -- you should edit PackageVersionsGeneratorDefinitions.json instead, then re-run the generator. The current Hangfire definition (lines 2-12) covers versions 1.7.* and 1.8.* with
MaxVersionExclusive of 2.0.0.
What change do you want to make? For example:
- Add a new version pattern like 1.9.*?
- Bump MaxVersionExclusive to include a newer major version?
- Something else?
Let me know the specific Hangfire version you want to include and I'll update the definitions file accordingly.
```
## Other details
<!-- Fixes #{issue} -->
<!-- 1 parent f51d779 commit f22a608
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
0 commit comments