COMMANDS / VERIFY

Trust through
Proof.

The verify domain currently provides diagnostics — pulling compiler warnings and language-server errors for a given file. Broader capabilities (policy checks, test orchestration, provenance) are planned, not implemented yet.

Synopsis

Each verify operation checks a facet of code health via the daemon. Currently only diagnostics is implemented.

SYNTAX
weaver verify <OPERATION> [ARG ...]
Language inferred from file extension

Operations

Operation Source Description
diagnostics LSP Pull compiler warnings and language-server errors for a file. Requires --uri.
policy Planned Sempai Enforce architectural constraints and forbidden patterns via Sempai queries.
tests Planned Runner Orchestrate test suites and report results as structured JSONL.
ARCHITECTURE

The Verification Stack

Today, diagnostics is the working layer. Policy enforcement and test orchestration are planned follow-on layers.

Illustration of Weaver's staged verification stack, with diagnostics active today and policy plus test layers planned for later phases.
CURRENT

Diagnostics

Pulls compiler warnings and LSP errors for any file with a supported language server.

! unused variable `x`
mismatched types
PLANNED

Policy Enforcement

Architectural constraints and forbidden-pattern detection via Sempai queries.

no_unsafe_blocks
! cyclomatic_complexity
PLANNED

Test Orchestration

Run test suites and report results as structured JSONL for CI gating.

cargo test
pytest tests/

Planned: Policy Rules

Planned

Future verify policy operations will combine standard linters with custom Sempai queries to enforce architectural constraints. The schema below is illustrative.

  • Block dangerous functions or imports
  • Enforce type hints and documentation standards
  • Require specific test coverage thresholds

"Verification is not just about catching bugs; it is about ensuring the AI acts within the boundaries of the system's design philosophy."

weaver.policy.yaml (illustrative)
version: "1.0"
rules:
  # Enforce security patterns
  - name: "no-raw-sql"
    severity: "error"
    query: "sempai: pattern: sql_query($X) where $X is string_literal"

  # Ensure testing standards
  - name: "test-coverage"
    severity: "warning"
    check: "coverage > 85%"

Output & Integration

01

CLI Output Modes

The daemon uses a kind-based JSONL envelope on the wire, but the CLI strips that wrapper before printing. In JSON mode it forwards the inner payload verbatim; in human mode it renders recognised diagnostics with source context.

$ weaver verify diagnostics --output json --uri file:///src/lib.rs

// CLI JSON output
{"diagnostics":[{"line":12,"column":5,"message":"unused variable `x`"}]}
02

Human Mode

Point at a file URI to pull every diagnostic the language server reports. Human-readable output is the default when stdout is a TTY, so recognised diagnostics render with source context instead of raw JSON.

$ weaver verify diagnostics --uri file:///src/lib.rs

src/lib.rs
  --> 12:5
   |
12 | let x = 42;
       ^ unused variable `x`

Ready to secure your agents?

Learn how the sandbox keeps execution safe.

Next: Safety Model