From 7fc6c8a8ef44abfc4da3d1eb2d40ad71e260cb51 Mon Sep 17 00:00:00 2001 From: Loretta Date: Mon, 13 Jul 2026 14:04:34 +0200 Subject: [PATCH] Clarify agent protocol: sequential doc reads required Added critical instructions to AGENTS.md mandating that `.github/copilot-instructions.md` must be read first in every session, with all session-start steps executed before any code or query actions. Documented a strict sequential execution override, prohibiting parallel doc/code reads, and mapped Copilot tool names to Codex shell commands. No functional changes to appsettings.json. --- AGENTS.md | 17 +++++++++++++++++ FruitBankHybrid.Shared/appsettings.json | 1 - .../wwwroot/appsettings.json | 1 - 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..0b0c543d --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,17 @@ +CRITICAL: Your FIRST action in every session MUST be reading `.github/copilot-instructions.md`. Execute ALL session-start instructions found there before responding to any user query. It is the single source of truth for this repo. + +## SEQUENTIAL EXECUTION OVERRIDE +The AI AGENT CORE PROTOCOL in copilot-instructions.md requires STRICT SEQUENTIAL execution. This OVERRIDES any default parallelization behavior. Do NOT parallelize doc reads with code searches. The sequence is: +1. Read copilot-instructions.md → process its rules FULLY +2. Read ALL docs/ .md files listed in the protocol → wait for completion +3. Output [LOADED_DOCS: ...] prefix +4. ONLY THEN respond to the user's query or search code + +## Tool mapping for AI AGENT CORE PROTOCOL +The copilot-instructions.md references Copilot tool names. Codex works through its shell + `apply_patch`, not named tools. Map them to Codex actions: +- `get_file` / `file_search` → shell: `cat`, `sed -n`, `rg --files` +- `code_search` / `get_symbols_by_name` / `find_symbol` → shell: `rg` +- `replace_string_in_file` / `edit_file` → `apply_patch` (update) +- `create_file` → `apply_patch` (add file) + +Follow the protocol using YOUR tools. The rules (LOADED_DOCS prefix, hard-gate, no-re-read, context recovery, explicit consent) apply equally to Codex. diff --git a/FruitBankHybrid.Shared/appsettings.json b/FruitBankHybrid.Shared/appsettings.json index 0c0a21c5..366ba808 100644 --- a/FruitBankHybrid.Shared/appsettings.json +++ b/FruitBankHybrid.Shared/appsettings.json @@ -23,7 +23,6 @@ } ] } - }, "AcHubConnection": { // Az Url innen KIVÉVE: az fbHub és a loggerHub is az AyCode:Urls:BaseUrl-ből származik (kódban: +/fbHub, +/loggerHub). diff --git a/FruitBankHybrid.Web.Client/wwwroot/appsettings.json b/FruitBankHybrid.Web.Client/wwwroot/appsettings.json index 0c0a21c5..366ba808 100644 --- a/FruitBankHybrid.Web.Client/wwwroot/appsettings.json +++ b/FruitBankHybrid.Web.Client/wwwroot/appsettings.json @@ -23,7 +23,6 @@ } ] } - }, "AcHubConnection": { // Az Url innen KIVÉVE: az fbHub és a loggerHub is az AyCode:Urls:BaseUrl-ből származik (kódban: +/fbHub, +/loggerHub).