Guidelines for writing efficient AGENTS.md
A valid AGENTS.md should contain the following core modules:
- development specification: Clarify coding standards (e.g., PEP8), submission message formats, prohibited modes, etc., examples:
## 编码规范 - 所有Python函数必须包含类型注解 - 禁用全局变量(特定情况需添加# bypass注释)
- Testing process: Define the test command chain and qualification criteria:
- Layered test instructions (unit/integration/end-to-end)
- Coverage threshold requirements
- Special Test Marking Instructions
- Architecture Navigation: Illustrate key module responsibilities in a tree structure, for example:
src/auth/ ├── oauth_adapter.py # 第三方认证适配层 └── session_manager.py # 会话生命周期管理
RecommendedProgressive configuration: Write the minimum usable version (with test commands and base specification) first, and gradually add missing constraints by analyzing Codex execution logs. For multi-repository projects, hierarchical AGENTS.md files can be placed in the root directory and sub-modules respectively.
This answer comes from the articleChatGPT Codex: Intelligence for Automating Software Engineering TasksThe
































