These rules name generated paths and the command that rebuilds them. Some also list related steps, such as deleting a superseded fixture.
Name the generated file, its editable source, and the rebuild command. Say whether to commit the output and which nearby files are still edited by hand.
Guard generated regions without freezing the whole file
The barrel rule protects only marked generated sections, not hand-maintained indexes or unmarked code. The guide also names the sources for generated AI docs and migration notes.
.agents/AGENTS.mdL39–42
Source excerpt starting at line 39.
39Some `index.ts` sections marked with `@barrel` are generated. Do not edit those40sections manually; update their source modules and run `pnpm codegen`.41Hand-maintained `index.ts` files and unmarked sections are not covered by this42rule.
Name the generator and permit its legitimate output
The model catalog may not be edited directly. Its generator is the authority, and the rule explicitly permits generated metadata updates that accompany regeneration.
AGENTS.mdL27
Source excerpt starting at line 27.
27- Never modify `packages/ai/src/models.generated.ts` directly; update `packages/ai/scripts/generate-models.ts` instead, then regenerate. Including the resulting `models.generated.ts` diff is always OK, even if regeneration includes unrelated upstream model metadata changes.
OpenAPI, native bindings, permissions, and translations each have an owning generation command. Stable regeneration is required; hand-editing output would leave the source of truth unchanged.
AGENTS.mdL61
Source excerpt starting at line 61.
61- Regenerate native bindings and permissions using their owning Rust build/generator; do not hand-edit generated output. The macOS desktop job checks `plugins/db/js/bindings.gen.ts`, `plugins/db/permissions/autogenerated`, and `plugins/db/permissions/schemas/schema.json` for drift. Mobile bridge generation belongs to `cargo xtask mobile-bridge`.