Procurement Contract v1¶
Source schema: doc/schemas/procurement-contract.v1.schema.json
Machine-readable schema for a selected responder contract linked to a procurement question lifecycle.
Governing Basis¶
doc/project/30-stories/story-001.mddoc/project/30-stories/story-004.mddoc/project/50-requirements/requirements-001.mddoc/project/40-proposals/011-federated-answer-procurement-lifecycle.mddoc/project/40-proposals/016-supervised-prepaid-gateway-and-escrow-mvp.mddoc/project/50-requirements/requirements-007.mddoc/project/40-proposals/017-organization-subjects-and-org-did-key.mddoc/project/50-requirements/requirements-008.md
Project Lineage¶
Requirements¶
doc/project/50-requirements/requirements-001.mddoc/project/50-requirements/requirements-006.mddoc/project/50-requirements/requirements-007.mddoc/project/50-requirements/requirements-008.md
Stories¶
Fields¶
| Field | Required | Shape | Description |
|---|---|---|---|
schema/v |
yes |
const: 1 |
Schema version. |
contract/id |
yes |
string | Stable identifier of the procurement contract. |
question/id |
yes |
string | Question lifecycle identifier to which the contract belongs. |
room/id |
yes |
string | Room or execution channel bound to the selected responder path. |
selected-offer/id |
yes |
string | Identifier of the offer chosen for contract formation. |
created-at |
yes |
string | Contract creation timestamp. |
asker/node-id |
yes |
string | Node acting for the asking side of the contract as the routing or hosting identity. |
asker/participant-id |
yes |
string | Participation-role identity on whose behalf the asking side entered the contract. |
asker/pod-user-id |
no |
string | Hosted-user identity when the contract was created on behalf of a later pod-backed client flow. This is additive to, not a replacement for, asker/participant-id. |
responder/node-id |
yes |
string | Node selected to fulfill the answer contract as the routing or hosting identity. |
responder/participant-id |
yes |
string | Participation-role identity selected to fulfill or lead the responder side of the contract. |
payment/amount |
yes |
integer | Agreed payment amount in minor units. When payment/currency = ORC, the value uses ORC minor units with fixed scale 2. |
payment/currency |
yes |
string | Currency or settlement unit symbol for the contract payment. |
payer/account-ref |
no |
string | Optional payer-side canonical settlement owner reference. The role lives in the identifier prefix, so no separate payer/kind field is used. This becomes required for the host-ledger rail. |
payee/account-ref |
no |
string | Optional payee-side canonical settlement owner reference. The role lives in the identifier prefix, so no separate payee/kind field is used. This becomes required for the host-ledger rail. |
settlement/rail |
no |
enum: external-invoice, host-ledger, manual-transfer, none |
Settlement rail chosen outside the protocol core. |
deadline-at |
yes |
string | Deadline by which the responder must deliver or the contract expires. |
escrow/node-id |
no |
string | Supervisory node responsible for the host-ledger escrow path. |
escrow/hold-ref |
no |
string | Reference to the host-ledger hold created for this contract. |
escrow-policy/ref |
no |
string | Escrow policy in force for this host-ledger contract. |
deadlines/work-by |
no |
string | Responder delivery deadline in the host-ledger timeout cascade. This SHOULD align with deadline-at. |
deadlines/accept-by |
no |
string | Deadline by which the payer should acknowledge delivered work. |
deadlines/dispute-by |
no |
string | Last moment for opening a formal dispute under the contract policy. |
deadlines/auto-release |
no |
string | Moment when escrow may auto-release if contract conditions are satisfied and no dispute is open. |
acceptance/answer-format |
yes |
enum: plain-text, markdown, json, edn, mixed |
Expected answer format used for acceptance checks. |
acceptance/min-length |
yes |
integer | Minimum accepted answer length. |
acceptance/max-length |
yes |
integer | Maximum accepted answer length. |
acceptance/arbiter-set |
no |
array | Arbiter identities required when arbiter confirmation is part of the contract. |
confirmation/mode |
yes |
enum: arbiter-confirmed, self-confirmed, manual-review-only |
Confirmation mode required before settlement. |
status |
yes |
enum: pending, settled, rejected, expired, canceled |
Current lifecycle status of the contract. |
transport/encryption-mode |
no |
enum: none, recipient-key, federation-policy |
Expected transport-level privacy mode for the narrowed execution path. |
policy_annotations |
no |
object |
Conditional Rules¶
Rule 1¶
When:
{
"properties": {
"confirmation/mode": {
"const": "arbiter-confirmed"
}
},
"required": [
"confirmation/mode"
]
}
Then:
{
"required": [
"acceptance/arbiter-set"
]
}
Rule 2¶
When:
{
"properties": {
"settlement/rail": {
"const": "host-ledger"
}
},
"required": [
"settlement/rail"
]
}
Then:
{
"required": [
"payer/account-ref",
"payee/account-ref",
"escrow/node-id",
"escrow/hold-ref",
"escrow-policy/ref",
"deadlines/work-by",
"deadlines/accept-by",
"deadlines/dispute-by",
"deadlines/auto-release"
],
"properties": {
"payment/currency": {
"const": "ORC"
}
}
}
Rule 3¶
When:
{
"anyOf": [
{
"required": [
"deadlines/work-by"
]
},
{
"required": [
"deadlines/accept-by"
]
},
{
"required": [
"deadlines/dispute-by"
]
},
{
"required": [
"deadlines/auto-release"
]
}
]
}
Then:
{
"required": [
"deadlines/work-by",
"deadlines/accept-by",
"deadlines/dispute-by",
"deadlines/auto-release"
]
}
Field Semantics¶
schema/v¶
- Required:
yes - Shape: const:
1
Schema version.
contract/id¶
- Required:
yes - Shape: string
Stable identifier of the procurement contract.
question/id¶
- Required:
yes - Shape: string
Question lifecycle identifier to which the contract belongs.
room/id¶
- Required:
yes - Shape: string
Room or execution channel bound to the selected responder path.
selected-offer/id¶
- Required:
yes - Shape: string
Identifier of the offer chosen for contract formation.
created-at¶
- Required:
yes - Shape: string
Contract creation timestamp.
asker/node-id¶
- Required:
yes - Shape: string
Node acting for the asking side of the contract as the routing or hosting identity.
asker/participant-id¶
- Required:
yes - Shape: string
Participation-role identity on whose behalf the asking side entered the contract.
asker/pod-user-id¶
- Required:
no - Shape: string
Hosted-user identity when the contract was created on behalf of a later pod-backed client flow. This is additive to, not a replacement for, asker/participant-id.
responder/node-id¶
- Required:
yes - Shape: string
Node selected to fulfill the answer contract as the routing or hosting identity.
responder/participant-id¶
- Required:
yes - Shape: string
Participation-role identity selected to fulfill or lead the responder side of the contract.
payment/amount¶
- Required:
yes - Shape: integer
Agreed payment amount in minor units. When payment/currency = ORC, the value uses ORC minor units with fixed scale 2.
payment/currency¶
- Required:
yes - Shape: string
Currency or settlement unit symbol for the contract payment.
payer/account-ref¶
- Required:
no - Shape: string
Optional payer-side canonical settlement owner reference. The role lives in the identifier prefix, so no separate payer/kind field is used. This becomes required for the host-ledger rail.
payee/account-ref¶
- Required:
no - Shape: string
Optional payee-side canonical settlement owner reference. The role lives in the identifier prefix, so no separate payee/kind field is used. This becomes required for the host-ledger rail.
settlement/rail¶
- Required:
no - Shape: enum:
external-invoice,host-ledger,manual-transfer,none
Settlement rail chosen outside the protocol core.
deadline-at¶
- Required:
yes - Shape: string
Deadline by which the responder must deliver or the contract expires.
escrow/node-id¶
- Required:
no - Shape: string
Supervisory node responsible for the host-ledger escrow path.
escrow/hold-ref¶
- Required:
no - Shape: string
Reference to the host-ledger hold created for this contract.
escrow-policy/ref¶
- Required:
no - Shape: string
Escrow policy in force for this host-ledger contract.
deadlines/work-by¶
- Required:
no - Shape: string
Responder delivery deadline in the host-ledger timeout cascade. This SHOULD align with deadline-at.
deadlines/accept-by¶
- Required:
no - Shape: string
Deadline by which the payer should acknowledge delivered work.
deadlines/dispute-by¶
- Required:
no - Shape: string
Last moment for opening a formal dispute under the contract policy.
deadlines/auto-release¶
- Required:
no - Shape: string
Moment when escrow may auto-release if contract conditions are satisfied and no dispute is open.
acceptance/answer-format¶
- Required:
yes - Shape: enum:
plain-text,markdown,json,edn,mixed
Expected answer format used for acceptance checks.
acceptance/min-length¶
- Required:
yes - Shape: integer
Minimum accepted answer length.
acceptance/max-length¶
- Required:
yes - Shape: integer
Maximum accepted answer length.
acceptance/arbiter-set¶
- Required:
no - Shape: array
Arbiter identities required when arbiter confirmation is part of the contract.
confirmation/mode¶
- Required:
yes - Shape: enum:
arbiter-confirmed,self-confirmed,manual-review-only
Confirmation mode required before settlement.
status¶
- Required:
yes - Shape: enum:
pending,settled,rejected,expired,canceled
Current lifecycle status of the contract.
transport/encryption-mode¶
- Required:
no - Shape: enum:
none,recipient-key,federation-policy
Expected transport-level privacy mode for the narrowed execution path.
policy_annotations¶
- Required:
no - Shape: object