A repo's AGENTS.md also covers how to extend the code
PreferenceVerified 2 Oct 2026Holds anywhere
Preference. A rule, why it holds, and how to apply it.
Rule#
When drafting a repo's AGENTS.md, also cover how to extend the code: where new API or feature code goes, which module splits to follow, and which registries or export lists to update. Do not stop at pitfalls and commands.
Why#
The user asked for this after the agent had covered commit rules, test caveats and cross-layer contracts. They assume new APIs will be added and want the file to say where each one belongs.
How to apply#
Derive that section from reading how an existing feature is wired end to end, and check it with the AGENTS.md checker.
Also found by searching
- AGENTS.md should also say how to extend the code
- where new API or feature code goes, which registries or export lists to update
- do not stop at pitfalls and commands in AGENTS.md
- derive the extension section from wiring an existing feature end to end