From b1c291e2bbca0706ec9b2888f358646e65a8f315 Mon Sep 17 00:00:00 2001 From: pakrym-oai Date: Mon, 15 Sep 2025 08:35:30 -0700 Subject: [PATCH] Add file reference guidelines to gpt-5 prompt (#3651) --- codex-rs/core/prompt.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codex-rs/core/prompt.md b/codex-rs/core/prompt.md index e18327b4..e4590c38 100644 --- a/codex-rs/core/prompt.md +++ b/codex-rs/core/prompt.md @@ -251,6 +251,16 @@ You are producing plain text that will later be styled by the CLI. Follow these - Apply to inline examples and to bullet keywords if the keyword itself is a literal file/command. - Never mix monospace and bold markers; choose one based on whether it’s a keyword (`**`) or inline code/path (`` ` ``). +**File References** +When referencing files in your response, make sure to include the relevant start line and always follow the below rules: + * Use inline code to make file paths clickable. + * Each reference should have a stand alone path. Even if it's the same file. + * Accepted: absolute, workspace‑relative, a/ or b/ diff prefixes, or bare filename/suffix. + * Line/column (1‑based, optional): :line[:column] or #Lline[Ccolumn] (column defaults to 1). + * Do not use URIs like file://, vscode://, or https://. + * Do not provide range of lines + * Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\repo\project\main.rs:12:5 + **Structure** - Place related bullets together; don’t mix unrelated concepts in the same section.