validator-help
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/validator-help
/validator-help
Evidence-based diagnosis of validator behavior. This skill is diagnosis-only — it explains what happened and why, but does not auto-fix issues. It operates from runtime artifacts and CLI outputs, not source code.
基于证据的验证器行为诊断。本技能仅用于诊断——它会解释发生了什么及原因,但不会自动修复问题。它基于运行时产物和CLI输出而非源代码运行。
Diagnostic Workflow
诊断工作流
Follow this order for every diagnostic question:
- Resolve : Read
log_dirand extract the.validator/config.ymlfield (default:log_dir). All log paths below are relative tovalidator_logs.<log_dir>/ - Passive evidence first: Read files before running commands.
- — timestamped event log (commands, gate results, state changes, errors)
<log_dir>/.debug.log - — JSON with
<log_dir>/.execution_state,last_run_completed_at,branch,commit, andworking_tree_ref(adapter name →unhealthy_adapters){marked_at, reason} - — console output per run (highest number = latest)
<log_dir>/console.*.log - — check gate output
<log_dir>/check_*.log - — review gate results with violations (
<log_dir>/review_*.json,file,line,issue,fix,priority)status - — project configuration
.validator/config.yml
- Active evidence when needed: Run CLI commands only when passive evidence is insufficient for a confident diagnosis.
- Explain with evidence: Clearly distinguish confirmed findings from inference.
针对每个诊断问题,请遵循以下顺序:
- 解析:读取
log_dir并提取.validator/config.yml字段(默认值:log_dir)。以下所有日志路径均相对于validator_logs。<log_dir>/ - 优先使用被动证据:先读取文件,再运行命令。
- —— 带时间戳的事件日志(命令、检查门结果、状态变更、错误信息)
<log_dir>/.debug.log - —— JSON文件,包含
<log_dir>/.execution_state、last_run_completed_at、branch、commit和working_tree_ref(适配器名称 →unhealthy_adapters){marked_at, reason} - —— 每次运行的控制台输出(数字越大表示最新)
<log_dir>/console.*.log - —— 检查门输出
<log_dir>/check_*.log - —— 包含违规项的检查门结果(
<log_dir>/review_*.json、file、line、issue、fix、priority)status - —— 项目配置文件
.validator/config.yml
- 必要时使用主动证据:仅当被动证据不足以做出可靠诊断时,才运行CLI命令。
- 结合证据进行解释:明确区分已确认的发现与推断内容。
Evidence Sources
证据来源
| Source | What It Confirms |
|---|---|
| |
| Timestamped event history: commands executed, gate results, state transitions, errors |
| Last successful run timestamp, branch/commit at that time, working tree stash ref, unhealthy adapter cooldowns |
| Human-readable output from each run iteration |
| Raw output from check gate commands (linters, test runners, etc.) |
| Structured review violations with file, line, issue, priority, and resolution status |
| Lock file (contains PID) — present only during active execution |
| CI wait attempt counter |
| 来源 | 可确认内容 |
|---|---|
| |
| 带时间戳的事件历史:执行的命令、检查门结果、状态转换、错误信息 |
| 上次成功运行的时间戳、当时的分支/提交、工作树暂存引用、不健康适配器冷却时间 |
| 每次运行迭代的人类可读输出 |
| 检查门命令的原始输出(代码检查器、测试运行器等) |
| 结构化的检查违规项,包含文件、行号、问题、优先级和解决状态 |
| 锁定文件(包含PID)——仅在执行过程中存在 |
| CI等待尝试计数器 |
CLI Command Quick-Reference
CLI命令速查
Use these only when passive evidence is insufficient:
| Command | When to Use |
|---|---|
| See configured gates and entry points |
| Check adapter availability and health status |
| See which files changed and which gates would apply |
| Validate config.yml syntax and schema |
| Archive current logs and reset state (destructive — confirm with user first) |
仅在被动证据不足时使用以下命令:
| 命令 | 使用场景 |
|---|---|
| 查看已配置的检查门和入口点 |
| 检查适配器的可用性和健康状态 |
| 查看哪些文件已变更以及将应用哪些检查门 |
| 验证config.yml的语法和 schema |
| 归档当前日志并重置状态(具有破坏性——需先征得用户确认) |
Routing Logic
路由逻辑
Based on the user's question, load the appropriate reference file for detailed guidance:
| Question Domain | Reference File |
|---|---|
| Missing config, YAML errors, misconfiguration, init problems | |
| Check failures, review failures, no_changes, no_applicable_gates, rerun mode | |
| Lock conflict, stale locks, parallel runs, cleanup | |
| Adapter health, missing tools, usage limits, cooldown | |
If the question spans multiple domains, load each relevant reference.
根据用户的问题,加载相应的参考文件以获取详细指导:
| 问题领域 | 参考文件 |
|---|---|
| 配置缺失、YAML错误、配置错误、初始化问题 | |
| 检查失败、审核失败、无变更、无适用检查门、重运行模式 | |
| 锁定冲突、过期锁定、并行运行、清理 | |
| 适配器健康、工具缺失、使用限制、冷却 | |
如果问题涉及多个领域,请加载所有相关参考文件。
Output Contract
输出约定
Every diagnostic response MUST include these sections:
每个诊断响应必须包含以下部分:
Diagnosis
诊断结果
What happened and why, stated clearly.
明确说明发生了什么及原因。
Evidence
证据
Specific files read, field values observed, and command outputs that support the diagnosis. Quote relevant log lines or config values.
支持诊断结果的具体读取文件、观察到的字段值和命令输出。引用相关日志行或配置值。
Confidence
置信度
One of:
- High — diagnosis is fully supported by direct evidence
- Medium — diagnosis is likely but some evidence is missing or ambiguous
- Low — diagnosis is inferred; key evidence is unavailable
Downgrade confidence when:
- or
.debug.logis missing or empty.execution_state - Log files referenced in output don't exist
- Config values can't be verified
- CLI commands fail or return unexpected output
以下选项之一:
- 高——诊断结果完全由直接证据支持
- 中——诊断结果大概率成立,但部分证据缺失或模糊
- 低——诊断结果为推断;关键证据不可用
出现以下情况时降低置信度:
- 或
.debug.log缺失或为空.execution_state - 输出中引用的日志文件不存在
- 无法验证配置值
- CLI命令执行失败或返回意外输出
Next Steps
下一步操作
Actionable recommendations for the user. If confidence is not high, suggest what additional evidence would confirm the diagnosis.
为用户提供可执行的建议。如果置信度不高,建议用户提供哪些额外证据以确认诊断结果。
Bug Filing
Bug提交
After completing your diagnosis, apply the following routing logic to determine whether to file a GitHub issue:
- High confidence + bug indicated (evidence points to a defect in agent-validator, not a configuration issue, user error, or expected behavior): Automatically invoke with
validator-issueas arguments. This passes the diagnosis summary as the bug description and skips the interactive confirmation — the issue is filed immediately after showing the draft.--auto-file <diagnosis summary> - High confidence + not a bug (diagnosis concludes configuration issue, user error, or expected behavior): Do nothing. Do not invoke .
validator-issue - Medium confidence + possible bug (evidence suggests a possible validator defect but is not conclusive): Ask the user: "This may be a validator bug. Want me to file a GitHub issue?" If the user confirms, invoke with the diagnosis summary as the bug description. If the user declines, exit without filing.
validator-issue - Low confidence: Do nothing. Do not prompt the user and do not invoke .
validator-issue
完成诊断后,应用以下路由逻辑判断是否提交GitHub Issue:
- 高置信度 + 确认存在Bug(证据表明问题源于agent-validator的缺陷,而非配置问题、用户错误或预期行为):自动调用并传入
validator-issue作为参数。这会将诊断摘要作为Bug描述传递,并跳过交互式确认——在显示草稿后立即提交Issue。--auto-file <诊断摘要> - 高置信度 + 非Bug(诊断结果表明是配置问题、用户错误或预期行为):不执行任何操作。请勿调用。
validator-issue - 中置信度 + 可能存在Bug(证据表明可能存在验证器缺陷,但结论不明确):询问用户:“这可能是一个验证器Bug。需要我提交GitHub Issue吗?”如果用户确认,调用并将诊断摘要作为Bug描述。如果用户拒绝,则退出且不提交。
validator-issue - 低置信度:不执行任何操作。请勿提示用户,也不要调用。
validator-issue