vet

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Vet

Vet

Run vet immediately after ANY logical unit of code changes. Do not batch changes, do not wait to be asked to run vet, make sure you are proactive.
Vet reviews git diffs and conversation history to find issues in code changes and conversation history. It is most effective when run frequently with conversation history, which helps it catch misunderstandings between what was requested and what was implemented. Despite this, vet is not a replacement for running tests.
在完成任意逻辑单元的代码变更后立即运行vet。不要批量处理变更,不要等别人要求才运行vet,要主动执行。
Vet会检查git diff和对话历史,找出代码变更和对话历史中的问题。当结合对话历史频繁运行时,它的效果最佳,这有助于它发现需求与实现之间的误解。尽管如此,vet不能替代测试。

Installation

安装

Install vet using pip, pipx, or uv:
bash
undefined
使用pip、pipx或uv安装vet:
bash
undefined

Using pip

Using pip

pip install verify-everything
pip install verify-everything

Using pipx

Using pipx

pipx install verify-everything
pipx install verify-everything

Using uv

Using uv

uv tool install verify-everything
uv tool install verify-everything

Verify installation:

Verify installation:

vet --help
undefined
vet --help
undefined

Running Vet

运行Vet

Standard Usage

标准用法

Before running vet, determine the correct Python binary:
bash
$(command -v python3 || command -v python)
Use whichever resolves (prefer
python3
). The examples below use
python3
, substitute
python
if that is what your system provides.
OpenCode:
bash
vet "goal" --history-loader "python3 ~/.agents/skills/vet/scripts/export_opencode_session.py --session-id <ses_ID>"
Codex:
bash
vet "goal" --history-loader "python3 ~/.codex/skills/vet/scripts/export_codex_session.py --session-file <path-to-session.jsonl>"
Claude Code:
bash
vet "goal" --history-loader "python3 ~/.claude/skills/vet/scripts/export_claude_code_session.py --session-file <path-to-session.jsonl>"
Without Conversation History
bash
vet "goal"
运行vet之前,确定正确的Python二进制文件:
bash
$(command -v python3 || command -v python)
使用能解析到的那个(优先选择
python3
)。下面的示例使用
python3
,如果你的系统提供的是
python
,请替换它。
OpenCode:
bash
vet "goal" --history-loader "python3 ~/.agents/skills/vet/scripts/export_opencode_session.py --session-id <ses_ID>"
Codex:
bash
vet "goal" --history-loader "python3 ~/.codex/skills/vet/scripts/export_codex_session.py --session-file <path-to-session.jsonl>"
Claude Code:
bash
vet "goal" --history-loader "python3 ~/.claude/skills/vet/scripts/export_claude_code_session.py --session-file <path-to-session.jsonl>"
无对话历史
bash
vet "goal"

Finding Your Session

查找会话

You should only search for sessions from your coding harness. If a user requests you use a different harness, they are likely referring to vet's agentic mode, not the session.
OpenCode: The
--session-id
argument requires a
ses_...
session ID. To find the current session ID:
  1. Run:
    opencode session list --format json
    to list recent sessions with their IDs and titles.
  2. Identify the current session from the list by matching the title or timestamp.
    • IMPORTANT: Verify the session you found matches the current conversation. If the title is ambiguous, compare timestamps or check multiple candidates.
  3. Pass the session ID as
    --session-id
    .
Codex: Session files are stored in
~/.codex/sessions/YYYY/MM/DD/
. To find the correct session file:
  1. Find the most unique sentence / question / string in the current conversation.
  2. Run:
    grep -rl "UNIQUE_MESSAGE" ~/.codex/sessions/
    to find the matching session file.
    • IMPORTANT: Verify the conversation you found matches the current conversation and that it is not another conversation with the same search string.
  3. Pass the matched file path as
    --session-file
    .
Claude Code: Session files are stored in
~/.claude/projects/<encoded-path>/
. The encoded path replaces
/
with
-
(e.g.
/home/user/myproject
becomes
-home-user-myproject
). To find the correct session file:
  1. Find the most unique sentence / question / string in the current conversation.
  2. Run:
    grep -rl "UNIQUE_MESSAGE" ~/.claude/projects/
    to find the matching session file.
    • IMPORTANT: Verify the conversation you found matches the current conversation and that it is not another conversation with the same search string.
  3. Pass the matched file path as
    --session-file
    .
NOTE: The examples in the standard usage section assume the user installed the vet skill at the user level, not the project level. Prior to trying to run vet, check if it was installed at the project level which should take precedence over the user level. If it is installed at the project level, ensure the history-loader option points to the correct location.
你应该只从你的代码开发工具中查找会话。如果用户要求你使用其他工具,他们可能指的是vet的智能代理模式,而不是会话。
OpenCode:
--session-id
参数需要一个
ses_...
格式的会话ID。查找当前会话ID的方法:
  1. 运行:
    opencode session list --format json
    列出最近的会话及其ID和标题。
  2. 通过匹配标题或时间戳,从列表中确定当前会话。
    • 重要提示:确认你找到的会话与当前对话匹配。如果标题不明确,比较时间戳或检查多个候选会话。
  3. 将会话ID作为
    --session-id
    参数传入。
Codex: 会话文件存储在
~/.codex/sessions/YYYY/MM/DD/
目录下。查找正确会话文件的方法:
  1. 在当前对话中找到最独特的句子/问题/字符串。
  2. 运行:
    grep -rl "UNIQUE_MESSAGE" ~/.codex/sessions/
    查找匹配的会话文件。
    • 重要提示:确认你找到的对话与当前对话匹配,且不是包含相同搜索字符串的其他对话。
  3. 将匹配到的文件路径作为
    --session-file
    参数传入。
Claude Code: 会话文件存储在
~/.claude/projects/<encoded-path>/
目录下。编码路径会将
/
替换为
-
(例如
/home/user/myproject
变为
-home-user-myproject
)。查找正确会话文件的方法:
  1. 在当前对话中找到最独特的句子/问题/字符串。
  2. 运行:
    grep -rl "UNIQUE_MESSAGE" ~/.claude/projects/
    查找匹配的会话文件。
    • 重要提示:确认你找到的对话与当前对话匹配,且不是包含相同搜索字符串的其他对话。
  3. 将匹配到的文件路径作为
    --session-file
    参数传入。
注意:标准用法部分的示例假设用户在用户级别安装了vet技能,而不是项目级别。在尝试运行vet之前,检查磁盘上存在哪些技能目录,并确保history-loader选项指向正确的位置。

Interpreting Results

解读结果

Vet analyzes the full git diff from the base commit. This may include changes from other agents or sessions working in the same repository. If vet reports issues that relate to changes you did not make in this session, disregard them, assuming they belong to another agent or the user.
Vet会分析来自基准提交的完整git diff。这可能包含同一仓库中其他代理或会话的变更。如果vet报告的问题与你在本次会话中所做的变更无关,请忽略它们,假设这些问题属于其他代理或用户。

Common Options

常用选项

  • --base-commit REF
    : Git ref for diff base (default: HEAD)
  • --model MODEL
    : LLM to use (default: claude-opus-4-6)
  • --list-models
    : list all models that are supported by vet
    • Run
      vet --help
      and look at the vet repo's readme for details about defining custom OpenAI-compatible models.
  • --confidence-threshold N
    : Minimum confidence 0.0-1.0 (default: 0.8)
  • --output-format FORMAT
    : Output as
    text
    ,
    json
    , or
    github
  • --quiet
    : Suppress status messages and 'No issues found.'
  • --agentic
    : Mode that routes analysis through the locally installed Claude Code or Codex CLI instead of calling the API directly. Try this if vet fails due to missing API keys. This is slower (~3 min) so it is not the default, but it often results in higher precision issue identification.
  • --agent-harness
    : The two options for this are
    codex
    and
    claude
    . Claude Code is the default.
  • --help
    : Show comprehensive list of options
  • --base-commit REF
    :diff基准的Git引用(默认值:HEAD)
  • --model MODEL
    :使用的大语言模型(默认值:claude-opus-4-6)
  • --list-models
    :列出vet支持的所有模型
    • 运行
      vet --help
      并查看vet仓库的README,了解定义自定义OpenAI兼容模型的详细信息。
  • --confidence-threshold N
    :最低置信度0.0-1.0(默认值:0.8)
  • --output-format FORMAT
    :输出格式为
    text
    json
    github
  • --quiet
    :抑制状态消息和“未发现问题”提示
  • --agentic
    :通过本地安装的Claude Code或Codex CLI路由分析,而不是直接调用API。如果vet因缺少API密钥而失败,请尝试此模式。此模式速度较慢(约3分钟),因此不是默认模式,但通常能更精准地识别问题。
  • --agent-harness
    :有两个选项:
    codex
    claude
    。默认是Claude Code。
  • --help
    :显示完整的选项列表

Updating

更新

The vet CLI, skill files, and export scripts can become outdated as agent harnesses and LLM APIs change.
If this happens, try updating them. Run
which vet
to determine how vet was installed and update accordingly. For the skill files, check which skill directories exist on disk and update them with the latest versions from https://github.com/imbue-ai/vet/tree/main/skills/vet.
随着代理开发工具和大语言模型API的变化,vet CLI、技能文件和导出脚本可能会过时。
如果出现这种情况,请尝试更新它们。运行
which vet
确定vet的安装方式,然后进行相应的更新。对于技能文件,检查磁盘上存在哪些技能目录,并从https://github.com/imbue-ai/vet/tree/main/skills/vet获取最新版本进行更新。

Additional Information

更多信息

Additional information can be found in the vet repo:
更多信息可在vet仓库中找到: