You pass the agent prompt, the context and the tools. Provely compiles a completion contract: the steps, the evidence, the correlation keys and the negative postconditions. You confirm it once. You never write it.
A contract is a postcondition, and a negative postcondition is the check that catches a duplicate side effect. Writing them by hand is the work this removes. A language model may propose the contract. The contract decides completion. A language model judgement is never completion evidence.
A contract can be honest and still answer the wrong question. "Buy the cheapest blue shirt under 50 dollars" compiled to "an order exists" verifies truthfully and misses the ask. The three controls below stop that.
What do you pass?
- intent "Refund order 4471 for $142 and email the customer."
- context { order_id: "4471", customer: "cus_8k2Rv1LmQ9xT" }
- tools [stripe.refunds, shopify.inventory, resend.emails]
What does the compiler return?
- stripe.refund.succeeded E2 + E3 Read the refund by id, then wait for refund.updated. Correlate by refund id and payment intent. Amount 14200 usd.
- shopify.inventory.adjusted E2 Read the inventory level back. Correlate by line item, never by a matching count.
- resend.email.delivered E3 Wait for the delivery event. Accepted and sent are different promises.
No second settled refund exists for this payment intent.
“the customer” must resolve to one address. Confirm it before the run.
Provely never drops a part of the task in silence. A part that no contract can check is marked REQUIRES_REVIEW, and it says so on the confirmation screen.
What does the code look like?
// Three lines. Provely compiles the rest.
const op = await provely.begin({ intent: task.prompt, context })
await agent.run(task)
const v = await op.verify()contract: order.refund.completed # compiled from the intent
subject: { order_id: "4471" }
steps:
- stripe.refund.succeeded # E2 readback + E3 event
correlate: [refund_id, payment_intent]
amount: 14200 usd
- shopify.inventory.adjusted # E2 readback, by line item
- resend.email.delivered # E3 delivery event
negative:
- no second settled refund for this payment intent
review:
- "the customer" resolves to one addresslet v = await op.verify()
// PENDING: wait. Never run the action again.
while (v.verdict === "PENDING" && v.retry.remaining > 0) {
await sleep(v.retry.after_ms)
v = await op.verify()
}
// No evidence for a step: v.feedback names it. Hand it back.
while (v.verdict === "UNVERIFIABLE" && v.retry.remaining > 0) {
await agent.run(task, { feedback: v.feedback })
v = await op.verify()
}
// FAILED: the provider refused. The first key stops a double effect.
if (v.verdict === "FAILED") {
await stripe.refunds.create(input, { idempotencyKey: op.idempotency_key })
v = await op.verify()
}
// CONTRADICTED: reality already differs. A person decides.
if (v.verdict === "CONTRADICTED") await escalate(v)Which controls hold intent fidelity?
- You confirm the compiled contract before it runs. The screen states what the contract does not check.
- The receipt binds the intent to the promise. It carries the intent statement, the contract id, the contract version and the contract hash, so an auditor compares the ask with the promise.
- A part that no contract can check is marked REQUIRES_REVIEW. That is the assertion the compiler will not write for you. Provely never drops a part of the task in silence.
The contract is immutable, versioned, hashed and signed before it verifies anything. Read what a completion contract contains.
Can a language model decide that the task is complete?
No. A language model may propose the contract. The runtime evaluates the contract with operators against provider evidence, and it gives no evidence to a language model.
What happens to a part of the task that no contract can check?
The compiler marks it REQUIRES_REVIEW and shows it on the confirmation screen. The verdict never covers it, and the page never claims it.
Can I still write a contract by hand?
Yes. The schema and the loader are public. Read what a completion contract contains for the members and the rules.