Skip to content

Tool reference · open

run_contract

The canonical run contract, and the gate that executes it

Read the canonical twelve-step run contract, or check a run bundle against it. Call it with no `files` to get the contract itself: every step's id, the artifacts it must produce, the exact condition that closes it, the terminal word to report when it does not, the instruction-precedence order, the retention rule and the two legal ends of step 12. Call it with `files` — a map of run-folder paths to their text — to get the machine verdict: which step blocked, which predicate refused and why. This is the identical implementation the offline `tools/run-gate.mjs` in every edition is bundled from, so the two cannot disagree about whether a bundle satisfies the contract. What they do not share is evidence: the offline gate checks the bundle you hand it, while a connected run can also confirm against the real repository tree that the files cited exist and say what the bundle claims. Same rules, one with a witness. Free, unmetered, read-only, stateless. Never infer a step, reorder one, or declare a run finished on your own reading — run the gate and report its word.

Call it

curl -X POST https://shpbl.com/api/public/v1/tools/run_contract \
  -H 'content-type: application/json' \
  -H 'authorization: Bearer shpbl_mcp_…' \
  -d '{}'

Same handler over MCP. The free lane needs no key; a Practitioner key is what keeps a run.

Optional arguments

  • files

    The run bundle as `path: text`, relative to the run folder (for example `STEP-LEDGER.json`). Send the canonical outputs you have; the gate says what is missing. Bounded: at most 400 entries and 8 MB of text in one call, and identical diagnostics are collapsed to one line with a count rather than repeated per entry. Omit this to read the contract without evaluating anything.

  • through_step

    Evaluate gates through this step only. Defaults to 12.