audit_file
Audit a single file change instantly by providing the file path and change type. Applies relevant file-specific rules to the change and returns structured audit results without blocking the workflow.
Instructions
单文件变更即时审计——Agent 编辑文件时调用,跑单文件适用规则,返回结构化结果(不阻断)。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"change_type": "<change_type>"
},
"name": "audit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | No | 文件变更 diff 内容(可选,用于 A2/A9 等内容级规则) | |
| path | Yes | 变更文件路径(必填) | |
| task | No | 任务描述(可选,传入时启用 A3/A14 上下文规则) | |
| change_type | Yes | 变更类型:create / modify / delete |