Create an optional hook system for externally-managed verification

This commit is contained in:
Ohad Livne 2026-02-10 18:52:52 +02:00
parent d8f0429537
commit 185199aaad
Signed by: libohad-dev
GPG key ID: 34FDC68B51191A4D
5 changed files with 99 additions and 9 deletions

View file

@ -19,6 +19,10 @@ If either is missing, tell the user to run `/formspec.formalize.2` first and sto
### 2. Run TLC
If `spec/hooks/run-checks` exists and is executable, delegate verification to it instead of running TLC locally (see `/formspec.init` for the hook interface). Build the request from `spec/formal/traceability.md` (properties and their types) and `spec/formal/System.cfg` (the TLC invocation hint). Present the returned results to the developer, including any dashboard URLs.
If the hook does not exist or fails, run TLC locally:
```bash
tlc spec/formal/System.tla -config spec/formal/System.cfg -workers auto -metadir /tmp/tlc-states -cleanup
```
@ -27,12 +31,13 @@ Run from the project root directory. The `-metadir` flag directs TLC's working s
### 3. Parse and report
Read the TLC output and produce a structured report:
Read the TLC output (or hook response) and produce a structured report:
**Summary**:
- States explored / distinct states
- Duration
- Overall result: PASS or FAIL
- Dashboard URL (if provided by hook)
**Property results** (table format):