validator-issue
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/validator-issue
/validator-issue
Collect runtime evidence, draft a structured GitHub issue for a suspected agent-validator bug, present a full preview, and file only after confirmation — unless invoked in auto-file mode.
收集运行时证据,为疑似agent-validator漏洞起草结构化的GitHub问题,展示完整预览,仅在确认后提交——除非以自动提交模式调用。
Step 1: Get the Bug Description and Mode
步骤1:获取漏洞描述与模式
Check for auto-file mode: If begins with , set auto-file mode to on and strip the prefix to get the remaining text as the bug description. Skip the confirmation step (Step 4) when auto-file mode is on.
$ARGUMENTS--auto-file Get the description:
-
If a non-empty description remains after stripping anyprefix, use it as the bug description and proceed to Step 2.
--auto-file -
Ifis empty (or becomes empty after stripping), ask the user:
$ARGUMENTS"Please describe the bug you encountered with agent-validator. What happened, what did you expect, and what were you trying to do?"Wait for their response before continuing.
检查自动提交模式:如果以开头,将自动提交模式设置为开启,并移除前缀,将剩余文本作为漏洞描述。自动提交模式开启时跳过确认步骤(步骤4)。
$ARGUMENTS--auto-file 获取描述:
-
如果移除前缀后仍有非空描述,将其作为漏洞描述并进入步骤2。
--auto-file -
如果为空(或移除前缀后为空),询问用户:
$ARGUMENTS"请描述你在使用agent-validator时遇到的漏洞。发生了什么,你预期的结果是什么,以及你当时正在尝试做什么?"等待用户回复后再继续。
Step 2: Collect Evidence
步骤2:收集证据
Read first to resolve (default: if the field is absent or the file doesn't exist).
.validator/config.ymllog_dirvalidator_logsCollect the following evidence. For each item, note if it is absent — do not fail if files are missing:
- Config file: Read in full.
.validator/config.yml - Debug log (last 50 lines): Read the last 50 lines of .
<log_dir>/.debug.logbashtail -n 50 <log_dir>/.debug.log - Execution state: Read the full contents of .
<log_dir>/.execution_state
Record which files were found and which were absent.
首先读取以解析(如果该字段不存在或文件不存在,默认值为)。
.validator/config.ymllog_dirvalidator_logs收集以下证据。对于每一项,记录是否缺失——即使文件缺失也不要终止流程:
- 配置文件:完整读取。
.validator/config.yml - 调试日志(最后50行):读取的最后50行。
<log_dir>/.debug.logbashtail -n 50 <log_dir>/.debug.log - 执行状态:完整读取的内容。
<log_dir>/.execution_state
记录哪些文件已找到,哪些文件缺失。
Step 3: Draft the Issue
步骤3:起草问题
Draft a GitHub issue with the following structure:
undefined按照以下结构起草GitHub问题:
undefinedProblem
问题
<A clear, concise description of the bug. Based on the user's description.>
<清晰、简洁的漏洞描述,基于用户提供的内容。>
Steps to Reproduce
复现步骤
<Step-by-step instructions to reproduce the issue. Infer from the description and evidence, or note "Not yet determined" if unclear.>
<逐步说明复现问题的步骤。根据描述和证据推导,若不明确则注明“尚未确定”。>
Expected vs Actual
预期结果 vs 实际结果
Expected: <What should have happened>
Actual: <What actually happened>
预期: <应该发生的情况>
实际: <实际发生的情况>
Evidence
证据
Before including evidence, redact sensitive values: remove or replace tokens, API keys, email addresses, and absolute local paths that may appear in config, logs, or state. Replace them withor a generic placeholder.[REDACTED]
Config ():
<Paste only relevant, non-sensitive config values. Redact tokens, emails, and absolute paths. Note "File not found" if absent.>
.validator/config.ymlDebug log (last 50 lines of ):
<Paste minimal relevant excerpt with sensitive values redacted. Note "File not found" if absent.>
<log_dir>/.debug.logExecution state ():
<Paste only fields needed to diagnose the bug; redact sensitive values. Note "File not found" if absent.>
<log_dir>/.execution_stateAbsent files: <List any files that were not found, or "None">
Choose a concise, descriptive title: `Bug: <short summary of the problem>`.在添加证据前,请编辑敏感信息:移除或替换配置、日志或状态中可能出现的令牌、API密钥、电子邮件地址和绝对本地路径。将它们替换为或通用占位符。[REDACTED]
配置文件():
<仅粘贴相关的非敏感配置值。编辑令牌、邮箱和绝对路径。若文件缺失则注明“未找到文件”。>
.validator/config.yml调试日志(的最后50行):
<粘贴经过编辑敏感信息后的最小相关片段。若文件缺失则注明“未找到文件”。>
<log_dir>/.debug.log执行状态():
<仅粘贴诊断漏洞所需的字段;编辑敏感信息。若文件缺失则注明“未找到文件”。>
<log_dir>/.execution_state缺失的文件: <列出所有未找到的文件,若无不填“无”>
选择简洁、描述性的标题:`Bug: <问题简短摘要>`。Step 4: Show Preview and Confirm
步骤4:展示预览并确认
Present the full draft to the user — both title and body.
If auto-file mode is on: Inform the user that the issue will be filed automatically (show the title and body), then proceed directly to Step 5 without asking.
Otherwise, ask:
"Here is the draft issue. Shall I file it? (yes/no)"
- If the user confirms: proceed to Step 5.
- If the user declines: exit without creating an issue. Inform the user that no issue was filed.
向用户展示完整的草稿——包括标题和正文。
如果开启自动提交模式:告知用户将自动提交问题(展示标题和正文),然后直接进入步骤5,无需询问。
否则,询问:
"这是起草好的问题。是否要提交?(是/否)"
- 如果用户确认:进入步骤5。
- 如果用户拒绝:退出流程,不创建问题。告知用户未提交任何问题。
Step 5: File the Issue
步骤5:提交问题
Write the issue body to a temporary file and pass it via to avoid shell interpolation issues with special characters in the body text:
--body-filebash
ISSUE_TITLE=$(cat <<'TITLE_EOF'
Bug: <short summary>
TITLE_EOF
)
BODY_FILE=$(mktemp)
cat > "$BODY_FILE" << 'ISSUE_EOF'
<paste the full issue body here>
ISSUE_EOF
gh issue create --repo Codagent-AI/agent-validator --title "$ISSUE_TITLE" --body-file "$BODY_FILE"
rm -f "$BODY_FILE"Report the created issue URL to the user.
将问题正文写入临时文件,并通过传递,以避免正文中的特殊字符导致shell插值问题:
--body-filebash
ISSUE_TITLE=$(cat <<'TITLE_EOF'
Bug: <问题简短摘要>
TITLE_EOF
)
BODY_FILE=$(mktemp)
cat > "$BODY_FILE" << 'ISSUE_EOF'
<粘贴完整的问题正文>
ISSUE_EOF
gh issue create --repo Codagent-AI/agent-validator --title "$ISSUE_TITLE" --body-file "$BODY_FILE"
rm -f "$BODY_FILE"向用户报告已创建的问题URL。