Verify Contract Baseline
verify_contractAudit on-disk pointer files against a contract's SHA-256 baseline or committed snapshot before or after code tasks, confirming consistency without changing state.
Instructions
Read-only pre-flight and post-completion consistency check (ADR-0004 / ADR-0006 / ADR-0007): audits on-disk pointer files against the contract's SHA-256 baseline or committed post-mutation snapshot.
Behavior & Side Effects
Zero side effects: Pure read-only operation. Never updates SQLite state and never consumes a TOCTOU strike.
Track-aware verification:
Read-only tasks & CLAIMED write_mode="proposal" contracts: checks immutable baseline SHA-256.
CLAIMED write_mode="direct" mutation contracts: checks path safety & file existence while reporting modified files.
COMPLETED mutation contracts: verifies on-disk files against committed verified_sha256.
Return Value
Returns { ok: true, valid, fulfillable, contract_id, status, target_agent, toctou_strike, max_toctou_strikes, dirty_files, remediation?, message }.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"contract_id": "<contract_id>"
},
"name": "verify_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | No | Optional caller agent identifier for audit logging. Does not restrict read-only verification. | |
| claim_token | No | Optional lease token for caller verification (FC-301). | |
| contract_id | Yes | The contract ID whose on-disk pointer files should be verified against the baseline SHA-256 snapshot without mutating contract state. |