Update agent protocol docs and refactor service registration

Added critical sequential execution and tool mapping rules to AGENTS.md, enforcing that copilot-instructions.md is always read first and protocol steps are strictly sequential. Reformatted IMessageTokenProvider registration in PluginNopStartup.cs for code clarity; no functional changes.
This commit is contained in:
Loretta 2026-07-13 14:04:52 +02:00
parent eed95f193d
commit 4851d26af7
1 changed files with 17 additions and 0 deletions

17
AGENTS.md Normal file
View File

@ -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.