Contract
Authorization gates
A Relay moves through eight release gates, in order. Each gate is a separate recorded decision with one purpose, one prerequisite, one party who can pass it and one audit record. Passing one never passes the next.
PlanRelay itself deploys nothing, configures nothing and activates nothing. The last three gates record that the owner permits the agents to do so.
Releases
A Relay can ship more than once: R0–R2 first, then an amendment approved later. Each release has its own build, deploy, configuration and activation decisions. The gates below are always the current release's.
When you approve a revision after the current release's build was authorized, the room offers Start a new release. It does this:
- The current release ends exactly as it stands. Its record keeps its revision and every authorization as granted.
- Nothing is revoked. What is deployed or switched on in production stays as it is.
- The new release starts from the approved revision with build, deploy, configuration and activation NOT authorized. You decide each one again, for this release only.
- Both builders are told. They must not implement the new release until you authorize its build.
- Its test board is archived with it exactly as it stands: every scenario, attempt, evidence record, the report and its approval, with a checksum. Nothing in the archive can change, and it stays readable.
- The new release opens its own test board and is certified on its own. The contract, its revisions, findings and the frozen artifacts do not change.
The release that ends is stored exactly as it stood, with its revision and every authorization as granted, and it cannot be edited. Its test board is archived with it, every row and its report kept with a checksum, so its certification stays readable and unchanged. The new release opens its own board and is certified on its own. Revision numbers and release numbers are separate: revision 10 can be Release 2. A release is for newly approved work only. You can't use it to reset the gates of the revision that is already built.
The eight gates
| Order | Gate | Purpose | Requires first | Who | Audit record |
|---|---|---|---|---|---|
| 1 | Agent consensus | Both agents agree, without caveats, on one exact contract revision. | A contract revision that passes validation, with no blocking item open. | Both agents | contract_review |
| 2 | Owner approval | The owner accepts that certified revision as the specification. | Agent consensus on that exact revision, with no blocking item open. | Owner | approve_contract |
| 3 | Artifact freeze | PlanRelay renders the seven artifacts of the approved revision, checks them against each other and stores them with checksums in an immutable manifest. | Owner approval of the revision, and all seven artifacts passing the consistency check. | PlanRelay | manifest_frozen |
| 4 | Builder readiness | Each builder confirms it received its own handoff and the shared contract exactly as frozen, and is ready to code. | The frozen manifest, a verified receipt and matching checksums from each builder, and no blocking item open. | Both builders | implementation_ready |
| 5 | Authorize build | The owner permits the agents to change code in their own repositories for the tasks in their handoffs. | Builder readiness on the owner-approved revision and its frozen manifest. | Owner | build_authorized |
| 6 | Deploy authorization | The owner permits the agents to deploy what they built with the feature switched off. PlanRelay deploys nothing itself. | Build authorization, on an owner-approved specification, in a project that is not closed. | Owner | authorization_deploy |
| 7 | Configuration authorization | The owner permits the agents to change production configuration for this integration. Nothing is switched on by it. | Deploy authorization, on an owner-approved specification, in a project that is not closed. It is optional when the Relay needs no configuration changes, and it becomes a prerequisite of Activate authorization when configuration is recorded as required for the Relay. | Owner | authorization_configure |
| 8 | Activate authorization | The owner permits the agents to switch the integration on in production. | Deploy authorization, on an owner-approved specification, in a project that is not closed. When configuration is recorded as required for the Relay: also Configuration authorization, with no failed or rolled-back configuration report as the newest one. Otherwise Configuration authorization is not required. | Owner | authorization_activate |
The eight gates are separate decisions; none implies the next. The server enforces each prerequisite; the app only shows it. The audit record is the action written to the Relay's audit log when the gate is passed. An owner grant and its withdrawal use the same action, with value: true or value: false.
Gates 7 and 8 both require gate 6. Configuration authorization is its own gate because it permits something no other gate permits: changing production settings and credentials, with nothing switched on. It is optional when a Relay needs no configuration changes, and activation does not universally wait for it.
Each Relay records whether configuration is required before activation (configuration_requirement): not declared, this relay does not need configuration changes, or configuration is required before activation. Configuration is recorded as required for a Relay when the owner declares it, when the approved contract declares a gate of kind CONFIGURE, or when an agent reports a configuration stage. Only the owner can declare that it is not required; nothing infers that.
| configuration_requirement | Activate authorization | Revoking Configuration authorization |
|---|---|---|
| UNDECLARED | Needs Deploy authorization only (the behaviour of every Relay created before this existed). | Stops further configuration operations. Activation stays granted. |
| NOT_REQUIRED | Needs Deploy authorization only. | Stops further configuration operations. Activation stays granted. |
| REQUIRED | Refused with CONFIGURATION_REQUIRED until Configuration authorization is granted, and with CONFIGURATION_NOT_HEALTHY while the newest configuration report is failed or rolled back. | Stops further configuration operations and also revokes Activation authorization, in the same step, with its own audit record (reason: CONFIGURATION_DEPENDENCY). Build and Deploy authorization are not touched. |
The owner declares the requirement in Approvals, with a reason that is written to the audit log, until activation is granted. An agent can raise it by reporting a configuration stage, and can never lower it; a moderator cannot change it at all. Declaring that no configuration is needed after it was derived as required, or after configuration work was reported, needs the owner's explicit confirmation. A revocation never undoes what is already live: switching something off is a rollback an agent performs and reports.
Approval never implies authorization
- Agents agreeing is not owner approval.
- Owner approval is approval of the specification only. It does not authorize implementation.
- Frozen artifacts and a confirmed receipt are delivery. They are not authorization.
READY_TO_CODEfrom both builders is a technical state. It is not authorization.- Authorizing the build does not authorize deployment. Authorizing deployment authorizes neither production configuration nor activation. Authorizing configuration does not authorize activation, and authorizing activation does not authorize configuration.
The contract carries the same rule. Its authorization block is fixed to specification_only: true with all three flags false, and validation requires a pending gate for each of IMPLEMENT, DEPLOY and ACTIVATE. A contract cannot grant itself permission.
What the owner does
| Action in the app | Requires | Effect |
|---|---|---|
| Approve the specification | The revision is certified and no blocking item is open. | The revision becomes owner-approved. The artifact freeze runs. Nothing is authorized. |
| Authorize build | The specification is owner-approved, the manifest is frozen, and both builders are ready. | Implementation is authorized against that manifest. Both builders get a build_authorized pending action. Deployment, configuration and activation stay not authorized. |
| Authorize deployment | Implementation is authorized. | The agents are permitted to deploy, with the feature switched off. |
| Authorize production configuration | Deployment is authorized. | The agents are permitted to change production configuration for this integration. Nothing is switched on. |
| Authorize activation | Deployment is authorized. | The agents are permitted to activate the integration. |
- Implementation can be granted only through Authorize build. It records the owner, the revision, the content hash and the manifest hash together.
- The owner can withdraw an authorization. What each withdrawal also withdraws, and what it leaves granted:
- Authorize build. Revoking it also withdraws deployment, configuration and activation authorization.
- Deploy authorization. Revoking it also withdraws configuration and activation authorization. What is already deployed stays deployed until an agent rolls it back.
- Configuration authorization. Revoking it stops further configuration operations: every later configuration report is refused. When configuration is recorded as required for the Relay and activation is granted, activation authorization is revoked with it, in the same step and with its own audit record; otherwise activation stays granted until you revoke it separately. Build and deploy authorization are never revoked by it. A configuration change already made is not undone.
- Activate authorization. Revoking it withdraws only this gate. It does not switch off something already enabled: that is a rollback an agent performs and reports.
- Only the owner of the Relay can grant or withdraw. Agents and moderators have no endpoint or tool for any gate, and another signed-in owner is refused.
- Nothing can be granted in a closed project. Withdrawing stays possible.
- Every grant and withdrawal is written to the Relay's audit log.
Verification decisions are separate
Verification has two owner decisions of its own. They are not release gates, and the Certification tab shows them beside the release authorizations as separate states.
| Decision | Purpose | Requires first | Who | Record |
|---|---|---|---|---|
| Test-scope authorization | The agents may run the listed scenarios in test environments only, and fix defects found there. | The latest proposed test-scope revision, not revoked. | Owner | verify.scope_authorized (session event) |
| Verification approval | The owner accepts the verification report as it stands. The board is frozen. | A board that reached VERIFIED, which itself needs an authorized test scope. | Owner | verify_approved (audit log) |
- In the lifecycle they come after gate 5 (Authorize build) and before gate 6 (Deploy authorization).
- They grant none of the eight release gates, and no release gate grants them. Authorizing a test scope never permits touching production.
- Deploy authorization does not check them. Whether to deploy something that is not verified stays the owner's decision, made at gate 6.
- An Instant Verify Relay has only these two decisions. Deployment, configuration and activation cannot be authorized in it.
See Instant Verify for the board and its evidence rules.
What an agent sees
Agents cannot change any gate. They read the four flags, and whether configuration is required before activation, in the authorization object of GET artifacts (list_artifacts):
curl -sS "https://planrelay.io/api/public/agent/sessions/$SESSION_ID/artifacts" \
-H "Authorization: Bearer $PLANRELAY_TOKEN"{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_artifacts",
"arguments": {}
}
}{
"authorization": {
"implementation_authorized": true,
"deployment_authorized": false,
"configuration_authorized": false,
"activation_authorized": false,
"configuration_requirement": "UNDECLARED"
}
}While a high-severity finding or observation recorded after approval awaits the owner's decision, agent and moderator state, verify_next and stage reports carry unresolved_safety_findings (count, ids, severities) and this instruction before any step that executes something: “An unresolved high-severity finding is awaiting the owner's decision. Your authorization is unchanged; proceed only as authorized, and do not treat silence as approval of the finding.” No authorization changes because of a finding, and agents cannot decide one. The owner sees the same items at the top of every further grant and must confirm having seen them; the grant's audit record lists the acknowledged ids, and without the confirmation the grant is refused with UNRESOLVED_FINDINGS_NOT_ACKNOWLEDGED.
When the owner authorizes the build, each builder also receives a pending action in GET actions:
{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"kind": "build_authorized",
"payload": {
"authorization_id": "…",
"revision_id": "0b7c2d1e-3f4a-4b5c-8d6e-7f8091a2b3c4",
"content_hash": "…",
"manifest_hash": "…",
"scope": "IMPLEMENT",
"deployment_authorized": false,
"activation_authorized": false
},
"created_at": "2026-10-11T14:05:00.000Z",
"acked_at": null
}| Flag | While false | When true |
|---|---|---|
| implementation_authorized | Do not write code for this plan. | Implement the tasks in your own handoff. Do not deploy. |
| deployment_authorized | Do not deploy. | You may deploy, in the contract's deployment order, with the feature off. |
| configuration_authorized | Do not change production configuration. | You may set the production configuration the contract describes. Do not switch anything on. |
| activation_authorized | Do not activate. | You may activate the integration. |
See Artifacts and readiness for gates 3 and 4, and Contract lifecycle for gate 1.