From ec4925135c19f1ffb80849c3b8780222dd23ce27 Mon Sep 17 00:00:00 2001 From: Jun <39075334+mc856@users.noreply.github.com> Date: Tue, 30 Jun 2026 09:38:24 +0800 Subject: [PATCH] fix(gateguard): finish tool-agnostic checklist across edit gate and SKILL.md copies (#2274) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit b3268fef (#2272) made the write-gate "confirm no existing file" item tool-agnostic in the JS hook, but the rest of the checklist surface still names Glob/Grep. On hosts without those tools the agent still hits a dead tool call on: - the edit-gate "list importers" item in the hook (scripts/hooks/gateguard-fact-force.js) - both checklist items in all three SKILL.md copies (en, ja-JP, zh-CN) Apply the same wording b3268fef introduced — "(search the tree — Glob/Grep, or find/grep via Bash)" — to those five remaining spots so the whole gate is consistent. Prose-only; no logic change. Follow-up to #2272 / b3268fef. --- docs/ja-JP/skills/gateguard/SKILL.md | 4 ++-- docs/zh-CN/skills/gateguard/SKILL.md | 4 ++-- scripts/hooks/gateguard-fact-force.js | 2 +- skills/gateguard/SKILL.md | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/ja-JP/skills/gateguard/SKILL.md b/docs/ja-JP/skills/gateguard/SKILL.md index 7048d868..bdf78b27 100644 --- a/docs/ja-JP/skills/gateguard/SKILL.md +++ b/docs/ja-JP/skills/gateguard/SKILL.md @@ -52,7 +52,7 @@ MultiEdit is handled identically — each file in the batch is gated individuall ``` Before editing {file_path}, present these facts: -1. List ALL files that import/require this file (use Grep) +1. List ALL files that import/require this file (search the tree — Glob/Grep, or find/grep via Bash) 2. List the public functions/classes affected by this change 3. If this file reads/writes data files, show field names, structure, and date format (use redacted or synthetic values, not raw production data) @@ -65,7 +65,7 @@ Before editing {file_path}, present these facts: Before creating {file_path}, present these facts: 1. Name the file(s) and line(s) that will call this new file -2. Confirm no existing file serves the same purpose (use Glob) +2. Confirm no existing file serves the same purpose (search the tree — Glob/Grep, or find/grep via Bash) 3. If this file reads/writes data files, show field names, structure, and date format (use redacted or synthetic values, not raw production data) 4. Quote the user's current instruction verbatim diff --git a/docs/zh-CN/skills/gateguard/SKILL.md b/docs/zh-CN/skills/gateguard/SKILL.md index 7da52bf6..05b651d3 100644 --- a/docs/zh-CN/skills/gateguard/SKILL.md +++ b/docs/zh-CN/skills/gateguard/SKILL.md @@ -52,7 +52,7 @@ LLM 的自我评估不起作用。问"你是否违反了任何策略?"答案 ``` 在编辑 {file_path} 之前,请先呈现以下事实: -1. 列出所有导入/引用此文件的文件(使用 Grep) +1. 列出所有导入/引用此文件的文件(在代码树中搜索——Glob/Grep,或通过 Bash 用 find/grep) 2. 列出受此更改影响的公共函数/类 3. 如果此文件读取/写入数据文件,请显示字段名称、结构以及日期格式(使用脱敏或合成值,而非原始生产数据) 4. 逐字引用用户当前的指令 @@ -64,7 +64,7 @@ LLM 的自我评估不起作用。问"你是否违反了任何策略?"答案 在创建 {file_path} 之前,请先说明以下事实: 1. 命名将调用此新文件的文件及行号 -2. 确认没有现有文件具有相同功能(使用 Glob) +2. 确认没有现有文件具有相同功能(在代码树中搜索——Glob/Grep,或通过 Bash 用 find/grep) 3. 如果此文件读取/写入数据文件,请展示字段名称、结构及日期格式(使用脱敏或合成值,而非原始生产数据) 4. 逐字引用用户当前的指令 ``` diff --git a/scripts/hooks/gateguard-fact-force.js b/scripts/hooks/gateguard-fact-force.js index 99e72cc1..4bc7b036 100644 --- a/scripts/hooks/gateguard-fact-force.js +++ b/scripts/hooks/gateguard-fact-force.js @@ -1020,7 +1020,7 @@ function editGateMsg(filePath) { '', `Before editing ${safe}, present these facts:`, '', - '1. List ALL files that import/require this file (use Grep)', + '1. List ALL files that import/require this file (search the tree — Glob/Grep, or find/grep via Bash)', '2. List the public functions/classes affected by this change', '3. If this file reads/writes data files, show field names, structure, and date format (use redacted or synthetic values, not raw production data)', "4. Quote the user's current instruction verbatim", diff --git a/skills/gateguard/SKILL.md b/skills/gateguard/SKILL.md index 59cb39ec..9a4bb031 100644 --- a/skills/gateguard/SKILL.md +++ b/skills/gateguard/SKILL.md @@ -53,7 +53,7 @@ MultiEdit is handled identically — each file in the batch is gated individuall ``` Before editing {file_path}, present these facts: -1. List ALL files that import/require this file (use Grep) +1. List ALL files that import/require this file (search the tree — Glob/Grep, or find/grep via Bash) 2. List the public functions/classes affected by this change 3. If this file reads/writes data files, show field names, structure, and date format (use redacted or synthetic values, not raw production data) @@ -66,7 +66,7 @@ Before editing {file_path}, present these facts: Before creating {file_path}, present these facts: 1. Name the file(s) and line(s) that will call this new file -2. Confirm no existing file serves the same purpose (use Glob) +2. Confirm no existing file serves the same purpose (search the tree — Glob/Grep, or find/grep via Bash) 3. If this file reads/writes data files, show field names, structure, and date format (use redacted or synthetic values, not raw production data) 4. Quote the user's current instruction verbatim