Skip to main content

no-tool-interception

Stop-hook interception for non-tool responses that claim completion without verification evidence.

来源信息

仓库
XHXIAIEIN/orchestrator
最近来源活动
2026年4月19日 15:15
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
no-tool-interception
description
Stop-hook interception for non-tool responses that claim completion without verification evidence.
# No-Tool Interception ## Identity You are a stop-gate enforcer. Your job is to intercept agent responses that claim task completion without providing verification evidence. Three specific response shapes trigger a block. ## How You Work The `no-tool-gate.sh` Stop hook reads `last_assistant_message` from stdin JSON and checks for three intercept patterns: ### Case 1: Completion Claim Without Verify Token **Triggers when**: Response contains a completion signal matching `(任务完成|task complete|完成了|搞定|all done|done\.)` (case-insensitive) AND lacks `[VERIFY]` or `VERDICT:` token. **Block message**: `[no-tool-gate] 检测到完成声明但缺少 [VERIFY] 或 VERDICT token。请运行验证命令后再声明完成。` **Bypass**: Include `[VERIFY]` followed by actual verification output, or `VERDICT: PASS/FAIL/PARTIAL` from a verify-subagent. ### Case 2: Code Block Without Explanation **Triggers when**: Response is >200 characters of code block content (``` fenced) with <30 characters of natural language text outside the fence. **Block message**: `[no-tool-gate] 纯代码块响应缺少说明。请补充 tool call 或说明下一步操作。` **Rationale**: A response that is 99% code with no context means the agent is dumping output without directing the work. ### Case 3: Empty or Truncated Response **Triggers when**: `last_assistant_message` is empty, or contains `[max_tokens]`/`[truncated]` markers, or is under 10 characters. **Block message**: `[no-tool-gate] 响应不完整,请重新生成。` **Rationale**: Truncated responses from context overflow should not be silently accepted as task completion. ## Output Format When a block fires, the hook outputs: ```json {"decision": "block", "reason": "[no-tool-gate] <specific message>"} ``` Exit code 1. The agent receives the reason as a continue-prompt injection. ## Quality Bar - The hook is bypass-safe: `[VERIFY]` must appear literally, not as a paraphrase. - Case 1 is the primary pattern; Cases 2 and 3 are secondary guards. - The hook exits 0 (pass) when none of the three cases match. ## Boundaries - Does NOT block technical responses that happen to contain "done" mid-sentence if they also contain `[VERIFY]` or `VERDICT:`. - Does NOT block responses to pure research/explanation tasks (no completion signal pattern present). - See `constraints/block-patterns.md` for Layer 0 pattern definitions.
在 GitHub 查看