Skip to content

The published contract carries structure and the pinned lane, nothing else

What a caller is told about an input is built from the bound port's own schema, reduced to the keys that describe the value's shape. Annotations are re-attached when the contract is read, not stored in it.

The rule

Normative: this is the rule
  1. Each contract fragment MUST be built from the entry's declared schema where it declares one, otherwise from the schema of the port its entry binds.
  2. An unbound entry that declares no schema MUST be built as an empty fragment, which accepts any value.
  3. The fragment MUST be reduced to these keys and nothing else: type, enum, format, default, required, properties, items, minimum, maximum, minLength, maxLength and pattern.
  4. The set is closed, because the contract states the shape of a value and nothing else.
  5. Every other key MUST be dropped, at every depth, recursing into each declared property and into an item schema.
  6. Annotations such as title, description and examples, and any extension key, therefore MUST NOT reach the stored contract.
  7. The one exception is the lane that MAN-21 pins at the top of the fragment: it is stored beside these keys and is not one of them.
  8. Annotations MUST be re-attached only when the contract is read with annotation requested.

What it means

A contract fragment is a reduction of a schema down to a fixed set of structural keys: the entry's own declared schema where it has one, otherwise the bound port's schema. An unbound entry that declares nothing accepts any value. The reduction keeps the shape of the value, never the words around it. The strip is not a top-level filter: it recurses into every declared property and into an item schema, so an annotation or an extension key buried two levels inside an object's own properties is dropped exactly as one sitting at the top would be. A non-annotation key at that same depth — maxLength, pattern — survives, because the rule keeps a closed set of keys and drops every other key, not "annotations" as a category.

The one key outside that set is the lane pin (MAN-21), written at the top of the fragment after the strip. It is why the example below keeps x-data-type while every other extension key is gone.

Author-facing words are never baked into the stored snapshot, even when the caller asks nothing special: they are re-attached only when the contract is read with annotation explicitly requested (MAN-6). The stored contract itself stays the same either way.

Example

A port's own schema carries a title and two extension keys, one nested inside properties and one inside items.

A port's declared schema, annotated at every depth
{
  "type": "object",
  "title": "Payload",
  "x-group": "advanced",
  "properties": {
    "inner": { "type": "string", "title": "Inner", "x-config-order": 3, "maxLength": 10 }
  },
  "items": { "type": "string", "description": "An item.", "x-port-order": 2, "pattern": "^a" }
}
What the published contract keeps
{
  "type": "object",
  "properties": { "inner": { "type": "string", "maxLength": 10 } },
  "items": { "type": "string", "pattern": "^a" },
  "x-data-type": "json"
}

Asking the same workflow for its contract with annotation requested fills the words back in, without changing what is stored:

Fetching the contract as stored200 — unannotated
GET /api/flowdrop/workflows/{workflow_id}/schema

{"parameter_schema": {"properties": {"name": {"type": "string"}}}}
Fetching the same contract with annotation requested200 — filled
GET /api/flowdrop/workflows/{workflow_id}/schema?annotated=1

{"parameter_schema": {"properties": {"name": {"type": "string", "title": "Text value", "description": "A plain text field."}}}}

Why

Recorded under OPEN-22, OPEN-25, OPEN-27, OPEN-30, OPEN-31.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · MAN-5 · changed in spec 1.0