From e1269de80e75806962c519e5778d72c39989d001 Mon Sep 17 00:00:00 2001 From: Oliver Wong Date: Mon, 25 May 2026 20:47:24 +0800 Subject: [PATCH] Update Tool usage instructions. --- llm-assist/AGENTS.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/llm-assist/AGENTS.md b/llm-assist/AGENTS.md index fe86c8f..49cc1a1 100644 --- a/llm-assist/AGENTS.md +++ b/llm-assist/AGENTS.md @@ -36,11 +36,31 @@ dotnet test --filter "FullyQualifiedName~ClassName.MethodName" # Run single tes - Code and comments are in **Chinese**. - Namespace: `OCES.Resonance.Core` (Core), `OCES.Resonance.AtlFieldExtractor` (extractor), `OCES.Resonance.Core.Tests` (tests). -- Git commit style: `WIP: ` (no conventional commits). -## AI 助手工具说明(DeepSeek TUI) +## AI 助手工具说明 -当前工作环境为 DeepSeek TUI,文件操作工具采用**延迟加载**机制,不在初始工具列表中。首次调用会触发加载并返回 schema 提示(不执行),用正确参数重试后正常执行。 +### 工具使用优先级 + +**优先使用 Rider MCP 服务器工具**(`Rider_*` 系列)。该类工具直接通过 IDE 执行操作,结果更准确、上下文更丰富。 + +| 场景 | 优先使用 | 回退方案 | +|------|---------|---------| +| 读取文件 | `Rider_read_file` / `Rider_get_file_text_by_path` | `read_file` | +| 写入/编辑 | `Rider_replace_text_in_file` / `Rider_create_new_file` | `write_file` / `edit_file` | +| 搜索文件 | `Rider_find_files_by_glob` / `Rider_search_file` | `list_dir` / glob | +| 搜索内容 | `Rider_search_text` / `Rider_search_in_files_by_text` | `grep_files` | +| 正则搜索 | `Rider_search_regex` / `Rider_search_in_files_by_regex` | `grep_files` | +| 代码重构 | `Rider_rename_refactoring` / `Rider_move_type_to_namespace` | `edit_file`(手动)| +| 构建 | `Rider_build_solution` | `bash dotnet build` | +| 运行测试 | `Rider_execute_run_configuration` | `bash dotnet test` | +| 代码问题 | `Rider_get_file_problems` | —(无等效回退) | +| 符号查找 | `Rider_search_symbol` / `Rider_get_symbol_info` | `grep_files`(语义降级) | + +**回退规则**:仅当 Rider MCP 工具不可用(未在工具列表中、调用报错)时,才使用对应的默认工具。 + +### 默认工具说明(DeepSeek TUI / OpenCode 等) + +当前工作环境可能为 DeepSeek TUI 或 OpenCode,文件操作工具因平台而异,采用**延迟加载**机制的工具首次调用会触发加载并返回 schema 提示(不执行),用正确参数重试后正常执行。 ### 可用文件操作工具