MX Workflow Contracts specification

Version: 1.0 Status: MX specification, maintained by CogNovaMX Date: 27 April 2026 Author: Tom Cranstoun License: MIT

1. Abstract

This specification specifies a small set of optional public-extension fields used by workflow contract cogs - documents that declare an executable approval, review, or procedural workflow.

The fields defined here are top-level (Zone 1) so that they form part of the cog's signed contract surface: their values name the limits, the people, and the procedures that the cog promises to honour. The shape of each field's object is domain-specific; an explicit schema reference on the cog (a top-level pointer to a JSON Schema, YAML schema, or Schema.org type) is the authoritative source for the precise structure.

All fields in this specification are conformance level MAY. They apply only to documents that explicitly declare a workflow contract.

2. Conformance

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Field definitions in this specification conform to the MX Field Definition Pattern specification. That pattern governs the structural template for every field - heading, property table, definition prose, example - and is binding on this specification. This specification adopts the pattern's authoring rules and does not restate them.

A workflow contract cog is conformant with this specification if every field it declares from §3 satisfies the field's own type and placement requirements (top-level Zone 1 placement, type as declared, value-shape consistent with the cog's schema reference where present).

A document that does not declare any of the fields in §3 makes no claim against this specification and is unaffected by it.

2.1 Draft status

This specification is maintained by CogNovaMX as part of MX. It is not a Gathering proposal. A change to its text is published as a new version, and implementations SHOULD note the version they implemented against.

3. Workflow contract fields

All fields in this section appear at the top level of the cog's frontmatter, not under mx:, so that they form part of the cog's signed contract surface.

3.1 x-mx-thresholds

Property Value
Type object
Zone 1 (top-level)
Profile x-mx-public
Conformance MAY

Definition: Domain workflow thresholds attached to a contract cog. Object whose keys are domain-named limits (e.g. autoApproveBelow, requireSecondaryAbove, escalateAt) and whose values are numeric, monetary, or categorical bounds. The cog's referenced schema specifies which keys are required and what types they accept.

Example:

x-mx-thresholds:
  autoApproveBelow: 1000
  requireSecondaryAbove: 10000

3.2 x-mx-approvers

Property Value
Type object
Zone 1 (top-level)
Profile x-mx-public
Conformance MAY

Definition: Mapping of approver-role names to identities. Keys are role names (primary, secondary, finance, legal, ...). Values are user identities, group references, or role descriptors resolved by the cog runtime.

Example:

x-mx-approvers:
  primary: line-manager
  secondary: finance-director

3.3 x-mx-approvalProcedure

Property Value
Type object
Zone 1 (top-level)
Profile x-mx-public
Conformance MAY

Definition: Approval procedure declaration. Object with runner (the engine that executes the procedure) and phases (an ordered array of phase objects, each typically with an id and optional inputs).

Example:

x-mx-approvalProcedure:
  runner: cog-runtime
  phases:
    - id: triage
    - id: review
    - id: sign-off

3.4 x-mx-reviewProcedure

Property Value
Type object
Zone 1 (top-level)
Profile x-mx-public
Conformance MAY

Definition: Review procedure declaration. Same shape as x-mx-approvalProcedure (runner + phases) applied to review rather than approval workflows.

Example:

x-mx-reviewProcedure:
  runner: cog-runtime
  phases:
    - id: collect-feedback
    - id: revise
    - id: publish

3.5 x-mx-targetEnvironment

Property Value
Type string
Zone 1 (top-level)
Profile x-mx-public
Conformance MAY

Definition: Named deployment or runtime environment a contract cog targets (e.g. production, staging, test). Resolved by the cog runtime to apply environment-specific settings.

Example:

x-mx-targetEnvironment: production

3.6 Group rules

The following rules apply across all fields in §3:

4. Out of scope

5. Security and privacy considerations

6. References

6.1 Normative references

6.2 Informative references

End of MX Workflow Contracts specification draft.