/** * Codex's instruction chain — the one file a repo-root session loads, and why * every other `AGENTS.md`-shaped file in the map does not. * * Verbatim from the vendor page (`https://developers.openai.com/codex/guides/agents-md`, * fetched 2026-09-21 and recorded in zernie/vigiles#262): starting at the * project root Codex walks DOWN to the current working directory, taking **at * most one file per directory** along that path, checking `AGENTS.override.md` * first, then `AGENTS.md`, then fallback names the repo itself declares via * `project_doc_fallback_filenames` in `config.toml`. The files are concatenated * root-down and truncated at a byte cap on file boundaries. * * 🔴 SO `"**\/AGENTS.md"` WAS NOT MERELY UNBOUNDED, IT WAS WRONG. At a repo-root * session the chain is the ROOT DIRECTORY ALONE — cwd and root are the same * directory, so there is no path to walk down. Summing every nested `AGENTS.md` * added up files that never load together: a monorepo with twelve package-level * files was told it was 12× over a budget no session ever approaches. Codex * TRUNCATES silently over its budget, so this number is the only warning a user * gets, and it was crying wolf on the harness where wolf means "your rules do * not exist". * * And `AGENTS.override.md` is the mirror image of Claude Code's local file: it * REPLACES the committed file rather than being appended after it. That is the * difference the `replaced` reason exists to carry — the combination rule is the * harness's, the fact that a file was hidden is reported to the core. */ import type { InstructionChain } from "../../core/instruction-chain.js"; /** `AGENTS.md` → `AGENTS.override.md`: the per-machine file that REPLACES it. */ export declare function overrideSiblingOf(instructionFile: string): string; /** Inputs the layout supplies so this module names no path of its own. */ export interface CodexChainInput { /** `AGENTS.md`. */ readonly instructionFile: string; /** The settings files, in precedence order (repo, then the local sibling). */ readonly settingsPaths: readonly string[]; /** The layout's own codec — this module does not know the encoding. */ readonly parseSettings: (text: string) => Record; } export declare function codexInstructionChain(files: Readonly>, input: CodexChainInput): InstructionChain; //# sourceMappingURL=instruction-chain.d.ts.map