(loc: Location)
| 61 | return path.join(configDir(loc), 'config.toml'); |
| 62 | } |
| 63 | function instructionsPath(loc: Location): string { |
| 64 | // Global AGENTS.md lives under ~/.codex/; project-local AGENTS.md |
| 65 | // lives at the project root (NOT under .codex/) — that's the file |
| 66 | // Codex reads for repo instructions, and it matches the local |
| 67 | // layout the opencode and gemini targets already use. |
| 68 | return loc === 'global' |
| 69 | ? path.join(configDir('global'), 'AGENTS.md') |
| 70 | : path.join(process.cwd(), 'AGENTS.md'); |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Project layers are "loaded but disabled when untrusted" (openai/codex |
no test coverage detected