Skip to content

CLI: verify

The verify command is ShipGate’s primary verification tool. It checks implementations against ISL specifications and produces a trust score with a SHIP/NO_SHIP verdict.

Usage

Terminal window
shipgate verify [path] [options]

Modes

The verify command auto-detects the appropriate mode:

ModeWhenWhat it does
ISLPath contains .isl spec filesFull spec-based verification
SpeclessPath has code but no .isl filesHeuristic security and quality checks
MixedSome files have specs, some don’tISL + specless combined

Options

Spec and implementation

FlagDescription
--spec <file>ISL spec file (legacy mode)
-i, --impl <file>Implementation file or directory
--proof <bundleDir>Verify using a proof bundle instead of path

Output

FlagDescription
--jsonOutput structured JSON to stdout
--ciCI mode: JSON stdout, GitHub Actions annotations
-d, --detailedShow detailed breakdown of results
-r, --report <format>Generate report: md, pdf, json, html
-o, --report-output <path>Output path for report file

Strictness

FlagDescription
--fail-on <level>Fail on: error (default), warning, unspecced
-s, --min-score <score>Minimum trust score to pass (default: 70)
-t, --timeout <ms>Test timeout in milliseconds (default: 30000)

Verification modes

FlagDescription
--smtEnable SMT verification for pre/postconditions
--smt-timeout <ms>SMT solver timeout (default: 5000)
--pbtEnable property-based testing
--pbt-tests <num>Number of PBT iterations (default: 100)
--pbt-seed <seed>PBT random seed for reproducibility
--pbt-max-shrinks <num>Max PBT shrinking iterations (default: 100)
--temporalEnable temporal verification (latency SLAs)
--temporal-min-samples <num>Min samples for temporal checks (default: 10)
--allEnable all verification modes

Examples

Basic verification

Terminal window
# Verify a spec against an implementation
shipgate verify user-service.isl --impl ./src/user-service.ts
# Verify all specs in a directory
shipgate verify specs/ --impl src/
# Verify with specless mode (no .isl files needed)
shipgate verify src/

CI usage

Terminal window
# CI mode with JSON output and annotations
shipgate verify specs/ --impl src/ --ci --fail-on error
# Set minimum trust score
shipgate verify specs/ --impl src/ --min-score 85

Advanced verification

Terminal window
# Enable all verification modes
shipgate verify specs/ --impl src/ --all
# Property-based testing with custom parameters
shipgate verify specs/ --impl src/ --pbt --pbt-tests 500 --pbt-seed 42
# SMT formal verification
shipgate verify specs/ --impl src/ --smt --smt-timeout 10000
# Generate HTML report
shipgate verify specs/ --impl src/ --report html --report-output ./report.html

Output

Pretty output (default)

Running verification...
CreateUser:
Preconditions:
✓ email.is_valid
✓ name.length > 0
✓ not User.exists(email)
Postconditions:
✓ User.count == old(User.count) + 1
✓ result.email == email
✓ result.status == PENDING
Invariants:
✓ email.is_valid (entity)
✓ name.length > 0 (entity)
Scenarios:
✓ "successful creation"
✓ "duplicate email rejected"
Verdict: SHIP ✓ Trust Score: 100/100

JSON output

Terminal window
shipgate verify specs/ --impl src/ --json
{
"verdict": "SHIP",
"score": 100,
"confidence": 95,
"results": [
{
"behavior": "CreateUser",
"preconditions": { "passed": 3, "failed": 0 },
"postconditions": { "passed": 3, "failed": 0 },
"invariants": { "passed": 2, "failed": 0 },
"scenarios": { "passed": 2, "failed": 0 }
}
],
"duration_ms": 1234
}

Exit codes

CodeNameMeaning
0SUCCESSSHIP — all checks passed
1ISL_ERRORNO_SHIP — verification failed
2USAGE_ERRORInvalid arguments or flags
3INTERNAL_ERRORUnexpected error

See also