The watch command monitors ISL files for changes and automatically re-runs verification. Optionally runs the gate and auto-healer on each change.
Usage
shipgate watch [files...] [options]
Options
| Flag | Description |
|---|
--gate | Run gate after each check |
--heal | Run auto-healer after each check |
--changed-only | Only process changed files (not all) |
-i, --impl <file> | Implementation path (required with --gate) |
-t, --threshold <score> | Gate threshold (default: 95) |
Examples
Basic watch
# Watch all ISL files and re-check on changes
shipgate watch specs/user-service.isl specs/payment-service.isl
Watch with gate
# Re-run gate on every change
shipgate watch specs/ --gate --impl src/ --threshold 80
Watch with auto-healing
# Automatically fix violations on change
shipgate watch specs/ --heal
Watch only changed files
# Only re-check files that changed (faster for large projects)
shipgate watch specs/ --changed-only
Output
[watch] Watching 5 ISL files...
[watch] specs/user-service.isl changed
[watch] specs/payment-service.isl changed
✗ Type error: unknown type "PaymentCard" at line 12
With --gate
[watch] specs/user-service.isl changed
✓ Parsed and type-checked
Verdict: SHIP ✓ Trust Score: 92/100
Auto-healing
The heal command (and --heal flag on watch) automatically fixes violations in your code to pass the gate:
shipgate heal specs/*.isl --spec user-service.isl
shipgate heal specs/*.isl \
--spec user-service.isl \
| Flag | Description |
|---|
-s, --spec <file> | ISL spec file |
--max-iterations <n> | Max healing iterations (default: 8) |
--stop-on-repeat <n> | Stop after N identical results (default: 2) |
Exit codes
| Code | Meaning |
|---|
0 | Watch started successfully |
1 | Watch failed to start |