guides/agents-md.md +65 −20
78 82
79Here is a sample repository after you add a global file and a payments-specific override:83Here is a sample repository after you add a global file and a payments-specific override:
80 84
8185- AGENTS.md Repository expectations<FileTree
8286- services/ class="mt-4"
8387 tree={[
8488 - payments/ {
8589 name: "AGENTS.md",
8690 - AGENTS.md Ignored because an override exists comment: "Repository expectations",
8791 - AGENTS.override.md Payments service rules highlight: true,
8892 - README.md },
8993 - search/ {
9094 name: "services/",
9195 - AGENTS.md open: true,
9296 - … children: [
97 {
98 name: "payments/",
99 open: true,
100 children: [
101 {
102 name: "AGENTS.md",
103 comment: "Ignored because an override exists",
104 },
105 {
106 name: "AGENTS.override.md",
107 comment: "Payments service rules",
108 highlight: true,
109 },
110 { name: "README.md" },
111 ],
112 },
113 {
114 name: "search/",
115 children: [{ name: "AGENTS.md" }, { name: "…", placeholder: true }],
116 },
117 ],
118 },
119 ]}
120/>
93 121
94## Customize fallback filenames122## Customize fallback filenames
95 123
108 137
109With the fallback list in place, Codex treats the alternate files as instructions:138With the fallback list in place, Codex treats the alternate files as instructions:
110 139
111140- TEAM\_GUIDE.md Detected via fallback list<FileTree
112141- .agents.md Fallback file in root class="mt-4"
113142- support/ tree={[
114143 {
115144 - AGENTS.override.md Overrides fallback guidance name: "TEAM_GUIDE.md",
116145 - playbooks/ comment: "Detected via fallback list",
117146 highlight: true,
118147 - … },
148 {
149 name: ".agents.md",
150 comment: "Fallback file in root",
151 },
152 {
153 name: "support/",
154 open: true,
155 children: [
156 {
157 name: "AGENTS.override.md",
158 comment: "Overrides fallback guidance",
159 highlight: true,
160 },
161 {
162 name: "playbooks/",
163 children: [{ name: "…", placeholder: true }],
164 },
165 ],
166 },
167 ]}
168/>
119 169
120Set the `CODEX_HOME` environment variable when you want a different profile, such as a project-specific automation user:170Set the `CODEX_HOME` environment variable when you want a different profile, such as a project-specific automation user:
121 171