Documentation

Verification

Auto-detect and run build, test, and lint checks with structured evidence.

Edit on GitHub

Nyzhi can automatically detect and run your project’s build, test, and lint checks. The verification system provides structured evidence of pass/fail status, making it easy for the agent to confirm its changes are correct. Use it from the TUI, as a tool, via hooks, or in autopilot QA phases.


Auto-detection

When you run /verify or the agent calls the verify tool, Nyzhi scans the project root to determine the project type and applicable checks:

Rust

CheckCommand
Buildcargo check
Testcargo test
Lintcargo clippy --all -- -D warnings

Node.js

CheckCommand
Buildnpm run build (if script exists)
Testnpm test (if script exists)
Lintnpx eslint . (if eslint is configured)

Go

CheckCommand
Buildgo build ./...
Testgo test ./...
Lintgo vet ./...

Python

CheckCommand
Testpytest (if pytest is installed)
Lintruff check . (if ruff is installed)

Detection is based on the presence of marker files (Cargo.toml, package.json, go.mod, pyproject.toml, etc.).


Evidence

Each check produces structured evidence:

  • Build / Test / Lint — The exact command run, exit code, stdout, stderr, timestamp, and elapsed time
  • passed() — true if exit_code == 0
  • is_fresh(max_age) — true if the evidence is recent enough

Verify report

Multiple checks produce a VerifyReport:

Verification Report:
  ✓ Build (cargo check) — 2.3s
  ✓ Test (cargo test) — 8.1s
  ✗ Lint (cargo clippy --all -- -D warnings) — 1.2s
    error: unused variable `x`

2/3 checks passed
  • all_passed() — true only if every check succeeded
  • summary() — human-readable report with timing and failure details

Usage

In the TUI

/verify          # show detected checks and run them

As a tool

The agent can call verify as a tool to check its work:

Tool: verify
Result:
  Build: ✓ (2.3s)
  Test: ✓ (8.1s)
  Lint: ✓ (1.2s)
  All checks passed.

In hooks

Run verification after each turn:

[[agent.hooks]]
event = "after_turn"
command = "cargo test"
timeout = 120

In persist mode

/persist activates a verify/fix loop: the agent runs checks, identifies failures, fixes them, and re-runs checks until everything passes.


Custom checks

While auto-detection covers common project types, you can run arbitrary commands through hooks:

[[agent.hooks]]
event = "after_turn"
command = "make lint && make test"
timeout = 180

Check kinds

KindDescription
BuildCompilation check (e.g., cargo check, go build)
TestTest suite (e.g., cargo test, npm test)
LintLinter/formatter (e.g., clippy, eslint, ruff)
CustomUser-defined check