validator-check

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/validator-check

/validator-check

Run validator checks only — no AI reviews.
仅运行验证器检查——不进行AI评审。

Procedure

流程

Step 1 - Clean Logs

步骤1 - 清理日志

Run
agent-validate clean
to archive any previous log files.
运行
agent-validate clean
来归档所有之前的日志文件。

Step 2 - Run Checks

步骤2 - 执行检查

Run
agent-validate check
using
Bash
with
timeout: 300000
. ALWAYS wait for and read the full command output before proceeding. Verify you can see a
Status:
line in the output before continuing.
使用
Bash
运行
agent-validate check
,设置
timeout: 300000
在继续操作前务必等待并读取完整的命令输出继续前请确认你能在输出中看到
Status:

Step 3 - Check Status

步骤3 - 检查状态

NEVER assume success — you must see an explicit
Status:
line before continuing. Check it and route accordingly:
  • Status: Passed
    → Go to Step 7.
  • Status: Passed with warnings
    → Go to Step 7.
  • Status: Failed
    → Continue to Step 4. You MUST continue — do not stop here.
  • Status: Retry limit exceeded
    → Run
    agent-validate clean
    to archive logs. Go to Step 7.
  • No status line visible → Known issue: Bun can drop all stdout/stderr. Read the console log file to get the status: find the latest
    console.*.log
    in the validator log directory (e.g.,
    validator_logs/console.1.log
    ) and look for the
    Status:
    line there. If no console log is found there, also check
    validator_logs/previous/
    for logs from the most recent archived run. If no console log exists in either location, the command may have timed out or failed to run — re-run with a longer timeout or investigate the error. Do NOT proceed as if it passed.
永远不要假设操作成功——你必须看到明确的
Status:
行才能继续。检查状态并按如下方式处理:
  • Status: Passed
    → 进入步骤7。
  • Status: Passed with warnings
    → 进入步骤7。
  • Status: Failed
    → 继续步骤4。你必须继续——不要在此处停止
  • Status: Retry limit exceeded
    → 运行
    agent-validate clean
    归档日志。进入步骤7。
  • 未看到状态行 → 已知问题:Bun可能会丢弃所有stdout/stderr。读取控制台日志文件获取状态:在验证器日志目录中找到最新的
    console.*.log
    文件(例如
    validator_logs/console.1.log
    ),并在其中查找
    Status:
    行。如果在此处未找到控制台日志,也请检查
    validator_logs/previous/
    目录中最近一次归档运行的日志。如果在这两个位置都没有找到控制台日志,说明命令可能超时或运行失败——请延长超时时间重新运行或排查错误。不要当作已通过来处理。

Step 4 - Extract Failures

步骤4 - 提取失败信息

Required when status is Failed:
  • Infer the log directory from the file paths in the console output (e.g., if output references
    validator_logs/check_._lint.1.log
    , the log directory is
    validator_logs/
    )
  • Extract log failures using the first available strategy: a. Task tool (Claude Code):
    Task
    with
    subagent_type="general-purpose"
    ,
    model="haiku"
    ,
    prompt=
    the Extract Prompt (from the Appendix below) +
    "\n\nLog directory: <inferred path>"
    . Task calls MUST be synchronous — NEVER use
    run_in_background: true
    . b. Subagent delegation: If your environment supports delegating work to a subagent but not the Task tool, delegate the Extract Prompt instructions with the log directory to a subagent for processing. c. Inline fallback: If no subagent capability is available, follow the Extract Prompt instructions yourself to read the log files and produce the compact failure summary.
当状态为Failed时需要执行:
  • 从控制台输出的文件路径推断日志目录(例如,如果输出引用了
    validator_logs/check_._lint.1.log
    ,则日志目录为
    validator_logs/
  • 提取日志失败信息,使用以下可用的第一种策略: a. 任务工具(Claude Code):使用
    Task
    ,设置
    subagent_type="general-purpose"
    model="haiku"
    prompt=
    附录中的提取提示 +
    "\n\nLog directory: <推断的路径>"
    任务调用必须是同步的——绝不能使用
    run_in_background: true
    。 b. 子代理委托:如果你的环境支持将工作委托给子代理但不支持任务工具,请将提取提示说明和日志目录委托给子代理处理。 c. 内联回退:如果没有子代理功能可用,请自行按照提取提示说明读取日志文件并生成简洁的失败摘要。

Step 5 - Fix

步骤5 - 修复

Fix all failed checks:
  • CHECK failures with Fix Skill: invoke the named skill
  • CHECK failures with Fix Instructions: follow the instructions
修复所有失败的检查:
  • 带有Fix Skill的CHECK失败:调用指定的skill
  • 带有Fix Instructions的CHECK失败:按照说明操作

Step 6 - Re-run Verification

步骤6 - 重新运行验证

NEVER skip this step — if the run failed, you MUST fix and re-run. Run
agent-validate check
again with
Bash
and
timeout: 300000
. Do NOT run
agent-validate clean
between retries. The tool detects existing logs and automatically switches to verification mode. Go back to Step 3 to check the status line and repeat.
绝不能跳过此步骤——如果运行失败,你必须修复后重新运行。再次使用
Bash
运行
agent-validate check
,设置
timeout: 300000
。重试之间不要运行
agent-validate clean
。工具会检测到现有日志并自动切换到验证模式。回到步骤3检查状态行并重复操作。

Step 7 - Summarize Session

步骤7 - 总结会话

Provide a summary of the session:
  • Final Status: (Passed / Passed with warnings / Retry limit exceeded)
  • Checks Fixed: (list key fixes)
  • Outstanding Failures: (if retry limit exceeded, list unverified fixes and remaining issues)

提供会话总结:
  • 最终状态:(已通过 / 带警告通过 / 超出重试限制)
  • 已修复的检查:(列出关键修复内容)
  • 未解决的失败:(如果超出重试限制,列出未验证的修复和剩余问题)

Appendix: Subagent Prompts

附录:子代理提示

Extract Prompt

提取提示

You are an EXTRACT subagent. Your job is to read validator check log files and return a compact error summary.
你是一个EXTRACT子代理。你的工作是读取验证器检查日志文件并返回简洁的错误摘要。

Input

输入

You receive a log directory path as your only input.
你仅会收到一个日志目录路径作为输入。

Process

流程

  1. List files directly under the log directory
  2. Find the highest-numbered
    console.N.log
    file (e.g.,
    console.3.log
    >
    console.2.log
    )
  3. Read it and find all lines containing
    [FAIL]
  4. For each
    [FAIL]
    line, extract the referenced
    .log
    file path
  5. Read each referenced log file and extract error output. Look for
    --- Fix Instructions ---
    sections and
    --- Fix Skill: <name> ---
    sections. Include their full content.
  1. 列出日志目录下的所有文件
  2. 找到编号最大的
    console.N.log
    文件(例如
    console.3.log
    >
    console.2.log
  3. 读取该文件并找到所有包含
    [FAIL]
    的行
  4. 对于每一行
    [FAIL]
    ,提取引用的
    .log
    文件路径
  5. 读取每个引用的日志文件并提取错误输出。查找
    --- Fix Instructions ---
    部分和
    --- Fix Skill: <name> ---
    部分。包含它们的完整内容。

Output Format

输出格式

Return a plain-text summary using EXACTLY this format:
text
CHECKS:
[fail] <gate_label>
<concise error description>
Fix Instructions: <extracted text if present, otherwise omit this line>
Fix Skill: <skill name if present, otherwise omit this line>
使用完全相同的格式返回纯文本摘要:
text
CHECKS:
[fail] <gate_label>
<concise error description>
Fix Instructions: <提取的文本(如果存在,否则省略此行)>
Fix Skill: <skill名称(如果存在,否则省略此行)>

Example

示例

Example Input
示例输入
Log directory:
validator_logs/
The directory contains:
  • console.2.log
  • check_src_lint.2.log
console.2.log contains:
text
[START] check:src:lint
[FAIL]  check:src:lint (1.23s) - Exited with code 1
      Log: validator_logs/check_src_lint.2.log
check_src_lint.2.log contains:
text
[2026-02-15T10:23:45.123Z] Starting check: lint
Executing command: bun run lint
Working directory: /Users/user/project/src

src/helpers.ts:3:5 - error: Unexpected var, use let or const instead

Command failed: bun run lint
Result: fail - Exited with code 1

--- Fix Instructions ---
Replace all `var` declarations with `const` or `let`.
日志目录:
validator_logs/
该目录包含:
  • console.2.log
  • check_src_lint.2.log
console.2.log内容:
text
[START] check:src:lint
[FAIL]  check:src:lint (1.23s) - Exited with code 1
      Log: validator_logs/check_src_lint.2.log
check_src_lint.2.log内容:
text
[2026-02-15T10:23:45.123Z] Starting check: lint
Executing command: bun run lint
Working directory: /Users/user/project/src

src/helpers.ts:3:5 - error: Unexpected var, use let or const instead

Command failed: bun run lint
Result: fail - Exited with code 1

--- Fix Instructions ---
Replace all `var` declarations with `const` or `let`.
Example Output
示例输出
text
CHECKS:
[fail] check:src:lint
src/helpers.ts:3:5 - error: Unexpected var, use let or const instead
Fix Instructions: Replace all `var` declarations with `const` or `let`.
text
CHECKS:
[fail] check:src:lint
src/helpers.ts:3:5 - error: Unexpected var, use let or const instead
Fix Instructions: Replace all `var` declarations with `const` or `let`.

Rules

规则

  • Do NOT summarize or editorialize — copy error details verbatim where possible
  • Do NOT skip any
    [FAIL]
    entries
  • Keep the output compact — one entry per check failure
  • Include
    Fix Instructions
    /
    Fix Skill
    lines only when present
  • 不要总结或修改内容——尽可能逐字复制错误细节
  • 不要跳过任何
    [FAIL]
    条目
  • 保持输出简洁——每个检查失败对应一个条目
  • 仅在存在时包含
    Fix Instructions
    /
    Fix Skill