From 5a1092512f5ac2cbd485db0b8b5d1ddbe608e54f Mon Sep 17 00:00:00 2001 From: Steve Dodier-Lazaro Date: Fri, 29 May 2026 10:56:56 +0200 Subject: [PATCH] Tell agents to preserve generated code unless relevant changes --- AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AGENTS.md b/AGENTS.md index e9066b8bb45c..490744300d4a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -299,6 +299,7 @@ These are recurring failure modes in agent-authored changes to this repo. Apply - **Test contracts (including side effects), not private implementation details.** It is valid to assert side effects when they are part of the public contract. Avoid assertions about internals that are not part of an exported contract, user-visible DOM output, or externally observable behavior. - **Bias toward broader coverage for security and migrations.** For security-sensitive code paths and legacy data migration logic, prefer handling more edge cases and documenting evidence for the chosen safeguards. Migration compatibility code should be explicitly version-scoped so it can be removed once the support window ends. - **Prefer deletion and simplicity over speculative generality.** No abstraction, fallback, or "flexibility" for a consumer or scenario that does not exist in this codebase today. If a change adds many lines, check whether the right change removes them. +- **Don't commit accidental overrides to generated code.** Files like `code/core/src/manager/globals/exports.ts` are auto-generated, as stated in their JSDoc header. Only commit changes if they match changes you made on your PR, otherwise leave them untouched and flag flaky generated files in the PR description. ## Maintenance Rules For Agents