Apply bounded optimistic changes to an owned private recipe build. After an uncertain response, inspect the build and replay the identical request with the same idempotency key; a new key duplicates the work. Use only the exact op names and payload keys in inputSchema: set_metadata takes metadata, upsert_schema takes schema_id and schema, and acceptance uses set_acceptance_cases with suite. Never invent set_schema or set_acceptance_suite. If an op appears unknown, read get_recipe_build view='authoring_schema', schema_name='update_recipe_build'; read schema_name='acceptance_suite' for the complete suite shape and every assertion operator with its required, allowed and forbidden fields. Do not guess them. Use set_contracts to replace the declared executable input and output contracts; this changes the revision and invalidates qualification. For a supervised acceptance handoff, use bind_resource only to approve an exact selector already frozen in the draft, then resume_activity or cancel_activity with the returned opaque handoff and activity references. Each handoff control operation must be the only op in its request. An acceptance suite is {version:1,cases:[{case_id,label,kind,fixtures,assertions}]}. Each fixture is {target,content_type,value}. A minimal assertion is {assertion_id:'result_exists',type:'scalar',operator:'exists',path:'/result'}. JSON Pointer paths start with '/'. A metamorphic case also requires pair_with naming another case. Use a paired assertion such as {assertion_id:'stable',type:'paired',operator:'fields_unchanged',path:'',pair_case_id:'base',fields:['/summary']}; pair_case_id is not valid on a scalar assertion. Client transport recommendation, not a server limit: keep serialized tool arguments below 32 KiB including JSON escaping and the request envelope. For larger spec, suite, or research content use begin_chunk, ordered append_chunk (seq starts at 0), then commit_chunk. Keep each complete append request below 12 KiB; split text further after measuring escaped JSON bytes. Hash the exact assembled UTF-8 text with SHA-256. Begin/append do not change the revision; commit changes it once. After an uncertain response, inspect the build and replay the identical request with the same idempotency key; do not create duplicate work with a new key.
View input schema
{
"type": "object",
"properties": {
"build_ref": {
"type": "string",
"minLength": 1,
"maxLength": 4096
},
"revision": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"maxLength": 64
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"pattern": "^[\\x20-\\x7e]+$"
},
"ops": {
"type": "array",
"minItems": 1,
"maxItems": 25,
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"op": {
"const": "replace_spec"
},
"spec": {
"type": "object"
}
},
"required": [
"op",
"spec"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "set_contracts"
},
"input_contract": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"properties": {
"handle": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"maxLength": 64
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"description": {
"type": "string",
"maxLength": 500
},
"required": {
"type": "boolean"
},
"schema": {
"type": "object",
"maxProperties": 100
}
},
"required": [
"handle",
"label",
"description",
"required",
"schema"
],
"additionalProperties": false
}
}
},
"required": [
"fields"
],
"additionalProperties": false
},
"output_contract": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"properties": {
"handle": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"maxLength": 64
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"description": {
"type": "string",
"maxLength": 500
},
"required": {
"const": true
},
"schema": {
"type": "object",
"maxProperties": 100
}
},
"required": [
"handle",
"label",
"description",
"required",
"schema"
],
"additionalProperties": false
}
}
},
"required": [
"fields"
],
"additionalProperties": false
}
},
"required": [
"op",
"input_contract",
"output_contract"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "set_metadata"
},
"metadata": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"maxLength": 4096
},
"$ui": {
"type": "object"
},
"$comment": {
"oneOf": [
{
"type": "string",
"maxLength": 4096
},
{
"type": "object"
}
]
}
},
"required": [],
"additionalProperties": false
}
},
"required": [
"op",
"metadata"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "upsert_node"
},
"node": {
"type": "object"
}
},
"required": [
"op",
"node"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "remove_node"
},
"node_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"maxLength": 64
}
},
"required": [
"op",
"node_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "reorder_nodes"
},
"node_ids": {
"type": "array",
"maxItems": 200,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"maxLength": 64
}
}
},
"required": [
"op",
"node_ids"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "upsert_schema"
},
"schema_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"maxLength": 64
},
"schema": {
"type": "object",
"maxProperties": 100
}
},
"required": [
"op",
"schema_id",
"schema"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "remove_schema"
},
"schema_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"maxLength": 64
}
},
"required": [
"op",
"schema_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "set_acceptance_cases"
},
"suite": {
"type": "object",
"additionalProperties": false,
"required": [
"version",
"cases"
],
"properties": {
"version": {
"const": 1
},
"cases": {
"type": "array",
"minItems": 1,
"maxItems": 50,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"case_id",
"label",
"kind",
"fixtures",
"assertions"
],
"properties": {
"case_id": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"kind": {
"enum": [
"adversarial",
"empty",
"injection",
"malformed",
"metamorphic",
"normal"
]
},
"fixtures": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"target",
"content_type",
"value"
],
"properties": {
"target": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
},
"content_type": {
"enum": [
"application/json",
"text/plain"
]
},
"value": {
"type": "string",
"maxLength": 32768
}
}
}
},
"assertions": {
"type": "array",
"minItems": 1,
"maxItems": 50,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"assertion_id",
"type",
"operator"
],
"properties": {
"assertion_id": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
},
"accepted_limitation": {
"type": "string",
"minLength": 20,
"maxLength": 500,
"description": "User-approved semantic limitation and reason for accepting it for supervised private use. Never invent approval. Failure remains visible but does not block this case."
},
"type": {
"enum": [
"classification",
"collection",
"coverage",
"html",
"paired",
"quote_present",
"reconcile",
"scalar",
"security"
]
},
"operator": {
"enum": [
"answer_not_leaked",
"any",
"between",
"branch_covered",
"contains",
"count_equals",
"coverage_at_least",
"covers_records",
"enum_covered",
"equals",
"equals_computed",
"escaped",
"every",
"exists",
"fields_unchanged",
"glob",
"in_set",
"injection_resisted",
"join_by_id",
"metric_at_least",
"mirror_changes",
"no_critical_false_negative",
"not_in_set",
"permutation_invariant",
"quote_present_in",
"sensitivity_stable",
"type_is",
"unique_by",
"well_formed",
"within_tolerance"
]
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"path": {
"type": "string",
"maxLength": 256
},
"expected": {},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
},
"values": {
"type": "array",
"maxItems": 200
},
"pattern": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"key_path": {
"type": "string",
"maxLength": 256
},
"predicate": {
"$ref": "#/definitions/scalar_predicate"
},
"expected_records": {
"type": "array",
"maxItems": 200
},
"left": {
"$ref": "#/definitions/expression"
},
"right": {
"$ref": "#/definitions/expression"
},
"tolerance": {
"type": "number",
"minimum": 0
},
"fixture_target": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
},
"actual_id_path": {
"type": "string",
"maxLength": 256
},
"expected_id_path": {
"type": "string",
"maxLength": 256
},
"actual_label_path": {
"type": "string",
"maxLength": 256
},
"expected_label_path": {
"type": "string",
"maxLength": 256
},
"critical_labels": {
"type": "array",
"maxItems": 50,
"items": {
"type": "string"
}
},
"threshold": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"metric": {
"enum": [
"accuracy",
"macro_precision",
"macro_recall",
"macro_f1"
]
},
"required_values": {
"type": "array",
"maxItems": 200
},
"pair_case_id": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
},
"pair_path": {
"type": "string",
"maxLength": 256
},
"fields": {
"type": "array",
"maxItems": 50,
"items": {
"type": "string",
"maxLength": 256
}
},
"mappings": {
"type": "array",
"maxItems": 50,
"items": {
"$ref": "#/definitions/field_mapping"
}
},
"forbidden_literals": {
"type": "array",
"maxItems": 50,
"items": {
"type": "string",
"maxLength": 500
}
},
"fixture_targets": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
}
}
},
"allOf": [
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "classification"
}
}
},
"then": {
"properties": {
"operator": {
"enum": [
"coverage_at_least",
"join_by_id",
"metric_at_least",
"no_critical_false_negative"
]
}
}
}
},
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "collection"
}
}
},
"then": {
"properties": {
"operator": {
"enum": [
"any",
"count_equals",
"covers_records",
"every",
"unique_by"
]
}
}
}
},
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "coverage"
}
}
},
"then": {
"properties": {
"operator": {
"enum": [
"branch_covered",
"enum_covered"
]
}
}
}
},
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "html"
}
}
},
"then": {
"properties": {
"operator": {
"enum": [
"escaped",
"well_formed"
]
}
}
}
},
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "paired"
}
}
},
"then": {
"properties": {
"operator": {
"enum": [
"fields_unchanged",
"mirror_changes",
"permutation_invariant",
"sensitivity_stable"
]
}
}
}
},
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "quote_present"
}
}
},
"then": {
"properties": {
"operator": {
"enum": [
"quote_present_in"
]
}
}
}
},
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "reconcile"
}
}
},
"then": {
"properties": {
"operator": {
"enum": [
"equals_computed",
"within_tolerance"
]
}
}
}
},
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "scalar"
}
}
},
"then": {
"properties": {
"operator": {
"enum": [
"between",
"contains",
"equals",
"exists",
"glob",
"in_set",
"not_in_set",
"type_is"
]
}
}
}
},
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "security"
}
}
},
"then": {
"properties": {
"operator": {
"enum": [
"answer_not_leaked",
"injection_resisted"
]
}
}
}
}
]
}
},
"pair_with": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
},
"expect_branch": {
"type": "object",
"additionalProperties": false,
"required": [
"path",
"value"
],
"properties": {
"path": {
"type": "string",
"maxLength": 256
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
}
}
}
}
}
}
}
},
"required": [
"op",
"suite"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "record_research"
},
"evidence": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"retrieved_at": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"supported_claim": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"applicability": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"url",
"title",
"retrieved_at",
"supported_claim",
"applicability"
],
"additionalProperties": false
}
}
},
"required": [
"op",
"evidence"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "set_budget"
},
"budget_capability": {
"type": "string",
"minLength": 1,
"maxLength": 4096
}
},
"required": [
"op",
"budget_capability"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "bind_resource"
},
"handoff_ref": {
"type": "string",
"minLength": 1,
"maxLength": 4096
},
"requirement_id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
}
},
"required": [
"op",
"handoff_ref",
"requirement_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "resume_activity"
},
"handoff_ref": {
"type": "string",
"minLength": 1,
"maxLength": 4096
},
"activity_ref": {
"type": "string",
"minLength": 1,
"maxLength": 4096
}
},
"required": [
"op",
"handoff_ref",
"activity_ref"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "cancel_activity"
},
"handoff_ref": {
"type": "string",
"minLength": 1,
"maxLength": 4096
},
"activity_ref": {
"type": "string",
"minLength": 1,
"maxLength": 4096
}
},
"required": [
"op",
"handoff_ref",
"activity_ref"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "restore"
}
},
"required": [
"op"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "begin_chunk"
},
"chunk_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"maxLength": 64
}
},
"required": [
"op",
"chunk_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "append_chunk"
},
"chunk_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"maxLength": 64
},
"seq": {
"type": "integer",
"minimum": 0,
"maximum": 32767
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 49152
}
},
"required": [
"op",
"chunk_id",
"seq",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "commit_chunk"
},
"chunk_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"maxLength": 64
},
"sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"maxLength": 64
},
"target": {
"enum": [
"replace_spec",
"set_acceptance_cases",
"record_research"
]
}
},
"required": [
"op",
"chunk_id",
"sha256",
"target"
],
"additionalProperties": false
}
]
}
}
},
"required": [
"build_ref",
"revision",
"idempotency_key",
"ops"
],
"additionalProperties": false,
"definitions": {
"expression": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"value"
],
"properties": {
"kind": {
"const": "literal"
},
"value": {
"type": "number"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"path"
],
"properties": {
"kind": {
"const": "path"
},
"path": {
"type": "string",
"maxLength": 256
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"case_id",
"path"
],
"properties": {
"kind": {
"const": "case_path"
},
"case_id": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
},
"path": {
"type": "string",
"maxLength": 256
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"expression"
],
"properties": {
"kind": {
"enum": [
"count",
"sum"
]
},
"expression": {
"$ref": "#/definitions/expression"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"left",
"right"
],
"properties": {
"kind": {
"enum": [
"add",
"subtract",
"multiply",
"divide"
]
},
"left": {
"$ref": "#/definitions/expression"
},
"right": {
"$ref": "#/definitions/expression"
}
}
}
]
},
"scalar_predicate": {
"type": "object",
"additionalProperties": false,
"required": [
"operator"
],
"properties": {
"operator": {
"enum": [
"between",
"contains",
"equals",
"exists",
"glob",
"in_set",
"not_in_set",
"type_is"
]
},
"path": {
"type": "string",
"maxLength": 256
},
"expected": {},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
},
"values": {
"type": "array",
"maxItems": 200
},
"pattern": {
"type": "string",
"minLength": 1,
"maxLength": 256
}
}
},
"field_mapping": {
"type": "object",
"additionalProperties": false,
"required": [
"path",
"pair_path"
],
"properties": {
"path": {
"type": "string",
"maxLength": 256
},
"pair_path": {
"type": "string",
"maxLength": 256
}
}
}
},
"description": "Client transport recommendation, not a server limit: keep serialized tool arguments below 32 KiB including JSON escaping and the request envelope. For larger spec, suite, or research content use begin_chunk, ordered append_chunk (seq starts at 0), then commit_chunk. Keep each complete append request below 12 KiB; split text further after measuring escaped JSON bytes. Hash the exact assembled UTF-8 text with SHA-256. Begin/append do not change the revision; commit changes it once. After an uncertain response, inspect the build and replay the identical request with the same idempotency key; do not create duplicate work with a new key."
}