{
  "id": "observation-shrink-plan",
  "name": "Observed failure reduction planner",
  "description": "Select the smallest target-failing subsequence among supplied observations, reconcile conflicting evidence, and materialize missing one-deletion experiments. References are caller assertions; no target execution, reproduced bug or global minimum claim.",
  "category": "structured",
  "priceUsd": "0.003",
  "pricingStatus": "proposed-unverified",
  "pricing": {
    "unit": "one successful operation call",
    "proposedNominalUsd": "0.003",
    "sixDecimalTokenBaseUnits": "3000",
    "subscription": false,
    "includesPayerWalletOrNetworkFees": false,
    "liveQuoteVerified": false,
    "condition": "Actual SDK challenge is authoritative only within the caller's explicit authorization; configured six-decimal token peg is an operator assertion, not a conversion guarantee."
  },
  "intents": [
    "Plan next reduction experiments from caller-supplied failure observations",
    "Materialize the smallest observed target-failing sequence and its evidence"
  ],
  "whenToUse": [
    "Caller already owns a harness and supplies bounded pass/fail/unresolved observations"
  ],
  "whenNotToUse": [
    "Autonomous ddmin, reproducing bugs, root-cause claims, global minimality or executing a target",
    "Unobserved harness identity, flakiness or causality verification",
    "Execute target code, call APIs, fetch data, run external agents, mutate accounts or deploy"
  ],
  "capabilities": [
    "Conflicting evidence detection and target-failure-aware deterministic selection",
    "Concrete one-deletion input queue, complete local supplied-pass certificate or explicit incompleteness",
    "Complete bounded result computed before challenge; atomic work/output failures"
  ],
  "limits": {
    "inputBytes": 100000,
    "outputBytes": 300000,
    "jsonNodes": 12000,
    "depth": 16,
    "atoms": 64,
    "observations": 512,
    "retainedIds": 64,
    "observationIdReferences": 16384,
    "atomValueBytes": 512,
    "nextExperiments": 64
  },
  "related": [
    "replay-divergence-check",
    "json-patch"
  ],
  "errorCodes": [
    "INPUT_LIMIT",
    "OUTPUT_LIMIT",
    "COMPLEXITY_LIMIT",
    "INVALID_JSON",
    "INVALID_NUMBER",
    "INVALID_UNICODE",
    "UNSAFE_KEY",
    "DUPLICATE_ATOM",
    "DUPLICATE_OBSERVATION",
    "ATOM_LIMIT",
    "UNKNOWN_ATOM",
    "INVALID_SUBSEQUENCE",
    "CONTEXT_MISMATCH"
  ],
  "requirementsProfile": {
    "format": "declared-requirements-v1",
    "facts": {
      "execution.suppliedCode": false,
      "execution.remoteMutation": false,
      "execution.llmInference": false,
      "execution.paidMcp": false,
      "verification.semanticTruth": false,
      "verification.sourceAuthenticity": false,
      "verification.liveVulnerabilities": false,
      "numbers.arbitraryPrecisionJson": false,
      "numbers.model": "ieee754-binary64",
      "privacy.requestBodyPersisted": false,
      "execution.deterministic": true,
      "execution.networkAccess": false,
      "privacy.resultBodyPersisted": false,
      "payment.x402": true,
      "payment.mpp": true,
      "operation.id": "observation-shrink-plan",
      "operation.category": "structured",
      "limit.httpRequestBytes": 131072,
      "limit.requestBytes": 100000,
      "limit.responseBytes": 524288,
      "limit.resultBytes": 300000,
      "limit.jsonDepth": 16,
      "limit.jsonNodes": 12000,
      "testing.targetExecuted": false,
      "testing.behaviorVerified": false,
      "testing.bugFindingGuaranteed": false,
      "testing.externalHarnessAccess": false,
      "testing.generatedArtifactsAreInert": true,
      "shrink.profile": "supplied-observations-one-deletion-v1",
      "shrink.maxAtoms": 64,
      "shrink.maxObservations": 512,
      "shrink.smallestAmongSuppliedObservations": true,
      "shrink.globalMinimality": false,
      "shrink.causalityEstablished": false,
      "shrink.failureReproduced": false,
      "shrink.harnessIdentityVerified": false,
      "shrink.suppliedPassesAuthenticateBehavior": false,
      "shrink.executesExperiments": false,
      "shrink.oneDeletionCertificateScope": "uncontradicted-supplied-passes-only",
      "input.atoms.maxItems": 64,
      "input.initialRetainedIds.maxItems": 64,
      "input.harnessRef.maxLength": 128,
      "input.harnessRef.minLength": 1,
      "input.caseRef.maxLength": 128,
      "input.caseRef.minLength": 1,
      "input.failureKey.maxLength": 128,
      "input.failureKey.minLength": 1,
      "input.observations.maxItems": 512
    },
    "unknownPolicy": "Undeclared requirements are unknown, never compatible. Matching declared facts does not establish semantic fit or input validity.",
    "preflight": "/preflight"
  },
  "documentation": "/reference/tools/observation-shrink-plan.md",
  "serviceContract": "/reference/services/observation-shrink-plan.json",
  "errors": [
    {
      "status": 400,
      "meaning": "Malformed JSON, missing/invalid idempotency key, or payment identifier mismatch",
      "retry": "Correct the request before payment"
    },
    {
      "status": 402,
      "meaning": "Payment challenge or rejected payment",
      "retry": "Use official protocol SDK; inspect payment outcome before another payment"
    },
    {
      "status": 409,
      "meaning": "Idempotency conflict, duplicate proof, or PAYMENT_UNCERTAIN",
      "retry": "Keep original key, body, and proof; reconcile uncertainty with operator; never blindly repay"
    },
    {
      "status": 413,
      "meaning": "Input or generated output too large",
      "retry": "Reduce input; no payment attempted for validation failure"
    },
    {
      "status": 415,
      "meaning": "Unsupported media type or compression",
      "retry": "Send uncompressed application/json"
    },
    {
      "status": 422,
      "meaning": "Schema or service-specific semantic validation failure",
      "retry": "Correct input using returned error code; no payment attempted"
    },
    {
      "status": 429,
      "meaning": "Request/payment-attempt rate exceeded",
      "retry": "Wait for rate limit window; preserve existing payment identity"
    },
    {
      "status": 503,
      "meaning": "Payment configuration/provider/state unavailable, or live DNS preparation failed before settlement",
      "retry": "Check readiness; DNS preparation failures may retry the identical key/body/credential only; uncertainty requires reconciliation"
    }
  ],
  "numericPrecision": "JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.",
  "paymentWorkflow": {
    "discoveryOnly": false,
    "supportedProtocols": [
      "x402",
      "mpp"
    ],
    "x402": {
      "credentialHeader": "PAYMENT-SIGNATURE",
      "challengeHeader": "PAYMENT-REQUIRED",
      "receiptHeader": "PAYMENT-RESPONSE",
      "version": 2,
      "scheme": "exact",
      "paymentIdentifier": "payment-identifier extension MUST equal the HTTP Idempotency-Key",
      "sdk": "@x402/core with @x402/evm"
    },
    "mpp": {
      "supported": true,
      "credentialHeader": "Authorization",
      "challengeHeader": "WWW-Authenticate",
      "receiptHeader": "Payment-Receipt",
      "method": "tempo",
      "intent": "charge",
      "sdk": "mppx",
      "tokenDecimals": 6
    },
    "steps": [
      "Check configured readiness and the exact service schema",
      "Generate a fresh random Idempotency-Key for this operation; never use a discovery probe fixture for purchases",
      "Send valid input without a credential to obtain the official protocol challenge",
      "Use the official SDK and authorized wallet to fulfill the challenge",
      "Retry only with identical key, body, protocol and credential",
      "On PAYMENT_UNCERTAIN stop and request operator reconciliation; never blindly pay again"
    ],
    "versionedRetries": "Request fingerprint includes service release version. Retries across a version upgrade can conflict; coordinate upgrades outside the 24-hour replay window and reconcile pending attempts.",
    "docs": "/llms.txt"
  },
  "method": "POST",
  "paths": {
    "x402": "/v1/x402/observation-shrink-plan",
    "mpp": "/v1/mpp/observation-shrink-plan"
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "atoms": {
        "maxItems": 64,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
            },
            "value": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": [
            "id",
            "value"
          ],
          "additionalProperties": false
        }
      },
      "initialRetainedIds": {
        "maxItems": 64,
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
        }
      },
      "harnessRef": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      },
      "caseRef": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      },
      "failureKey": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      },
      "observations": {
        "maxItems": 512,
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                },
                "harnessRef": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "caseRef": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "retainedIds": {
                  "maxItems": 64,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                  }
                },
                "outcome": {
                  "type": "string",
                  "const": "pass"
                }
              },
              "required": [
                "id",
                "harnessRef",
                "caseRef",
                "retainedIds",
                "outcome"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                },
                "harnessRef": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "caseRef": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "retainedIds": {
                  "maxItems": 64,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                  }
                },
                "outcome": {
                  "type": "string",
                  "const": "unresolved"
                }
              },
              "required": [
                "id",
                "harnessRef",
                "caseRef",
                "retainedIds",
                "outcome"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                },
                "harnessRef": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "caseRef": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "retainedIds": {
                  "maxItems": 64,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                  }
                },
                "outcome": {
                  "type": "string",
                  "const": "fail"
                },
                "failureKey": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                }
              },
              "required": [
                "id",
                "harnessRef",
                "caseRef",
                "retainedIds",
                "outcome",
                "failureKey"
              ],
              "additionalProperties": false
            }
          ]
        }
      }
    },
    "required": [
      "atoms",
      "initialRetainedIds",
      "harnessRef",
      "caseRef",
      "failureKey",
      "observations"
    ],
    "additionalProperties": false,
    "$defs": {
      "__schema0": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/$defs/__schema0"
            }
          },
          {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/$defs/__schema0"
            }
          }
        ]
      }
    }
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "operation",
      "version",
      "result",
      "provenance"
    ],
    "properties": {
      "operation": {
        "const": "observation-shrink-plan",
        "type": "string"
      },
      "version": {
        "const": "0.29.0",
        "type": "string"
      },
      "result": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "profile": {
            "type": "string",
            "const": "supplied-observations-one-deletion-v1"
          },
          "status": {
            "type": "string",
            "enum": [
              "planned",
              "inconsistent-evidence",
              "no-target-failure-observed"
            ]
          },
          "harnessRef": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "caseRef": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "failureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "selected": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "retainedIds": {
                    "maxItems": 64,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                    }
                  },
                  "values": {
                    "maxItems": 64,
                    "type": "array",
                    "items": {
                      "$ref": "#/properties/result/$defs/__schema0"
                    }
                  },
                  "observationIds": {
                    "maxItems": 512,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                    }
                  }
                },
                "required": [
                  "retainedIds",
                  "values",
                  "observationIds"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "smallestAmongSuppliedObservations": {
            "type": "boolean"
          },
          "globalMinimalityEstablished": {
            "type": "boolean",
            "const": false
          },
          "oneDeletionCertificate": {
            "type": "string",
            "enum": [
              "supported-by-supplied-passes",
              "incomplete",
              "not-applicable"
            ]
          },
          "neighbors": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "omittedAtomId": {
                  "type": "string",
                  "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                },
                "retainedIds": {
                  "maxItems": 64,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                  }
                },
                "evidenceStatus": {
                  "type": "string",
                  "enum": [
                    "pass",
                    "unresolved",
                    "untested",
                    "other-failure"
                  ]
                },
                "observationIds": {
                  "maxItems": 512,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                  }
                }
              },
              "required": [
                "omittedAtomId",
                "retainedIds",
                "evidenceStatus",
                "observationIds"
              ],
              "additionalProperties": false
            }
          },
          "nextExperiments": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "harnessRef": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "caseRef": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "targetFailureKey": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "omittedAtomId": {
                  "type": "string",
                  "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                },
                "retainedIds": {
                  "maxItems": 64,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                  }
                },
                "values": {
                  "maxItems": 64,
                  "type": "array",
                  "items": {
                    "$ref": "#/properties/result/$defs/__schema0"
                  }
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "unresolved",
                    "untested",
                    "other-failure"
                  ]
                }
              },
              "required": [
                "harnessRef",
                "caseRef",
                "targetFailureKey",
                "omittedAtomId",
                "retainedIds",
                "values",
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "conflicts": {
            "maxItems": 512,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "retainedIds": {
                  "maxItems": 64,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                  }
                },
                "observationIds": {
                  "maxItems": 512,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                  }
                }
              },
              "required": [
                "retainedIds",
                "observationIds"
              ],
              "additionalProperties": false
            }
          },
          "targetExecuted": {
            "type": "boolean",
            "const": false
          },
          "behaviorVerified": {
            "type": "boolean",
            "const": false
          },
          "externalRequests": {
            "type": "number",
            "const": 0
          }
        },
        "required": [
          "profile",
          "status",
          "harnessRef",
          "caseRef",
          "failureKey",
          "selected",
          "smallestAmongSuppliedObservations",
          "globalMinimalityEstablished",
          "oneDeletionCertificate",
          "neighbors",
          "nextExperiments",
          "conflicts",
          "targetExecuted",
          "behaviorVerified",
          "externalRequests"
        ],
        "additionalProperties": false,
        "$defs": {
          "__schema0": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/properties/result/$defs/__schema0"
                }
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/properties/result/$defs/__schema0"
                }
              }
            ]
          }
        }
      },
      "provenance": {
        "type": "object",
        "required": [
          "inputSha256",
          "outputSha256",
          "deterministic",
          "externalRequests"
        ],
        "properties": {
          "inputSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "outputSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "deterministic": {
            "const": true
          },
          "externalRequests": {
            "const": 0
          }
        }
      }
    },
    "additionalProperties": false
  },
  "exampleInput": {
    "atoms": [
      {
        "id": "a",
        "value": {
          "op": "open"
        }
      },
      {
        "id": "b",
        "value": {
          "op": "configure",
          "mode": "x"
        }
      },
      {
        "id": "c",
        "value": {
          "op": "trigger"
        }
      },
      {
        "id": "d",
        "value": {
          "op": "close"
        }
      }
    ],
    "initialRetainedIds": [
      "a",
      "b",
      "c",
      "d"
    ],
    "harnessRef": "harness-v1",
    "caseRef": "case-x",
    "failureKey": "E_X",
    "observations": [
      {
        "id": "full",
        "harnessRef": "harness-v1",
        "caseRef": "case-x",
        "retainedIds": [
          "a",
          "b",
          "c",
          "d"
        ],
        "outcome": "fail",
        "failureKey": "E_X"
      },
      {
        "id": "reduced",
        "harnessRef": "harness-v1",
        "caseRef": "case-x",
        "retainedIds": [
          "a",
          "c"
        ],
        "outcome": "fail",
        "failureKey": "E_X"
      },
      {
        "id": "a-pass",
        "harnessRef": "harness-v1",
        "caseRef": "case-x",
        "retainedIds": [
          "a"
        ],
        "outcome": "pass"
      },
      {
        "id": "c-unresolved",
        "harnessRef": "harness-v1",
        "caseRef": "case-x",
        "retainedIds": [
          "c"
        ],
        "outcome": "unresolved"
      }
    ]
  },
  "exampleResponse": {
    "operation": "observation-shrink-plan",
    "version": "0.29.0",
    "result": {
      "profile": "supplied-observations-one-deletion-v1",
      "status": "planned",
      "harnessRef": "harness-v1",
      "caseRef": "case-x",
      "failureKey": "E_X",
      "selected": {
        "retainedIds": [
          "a",
          "c"
        ],
        "values": [
          {
            "op": "open"
          },
          {
            "op": "trigger"
          }
        ],
        "observationIds": [
          "reduced"
        ]
      },
      "smallestAmongSuppliedObservations": true,
      "globalMinimalityEstablished": false,
      "oneDeletionCertificate": "incomplete",
      "neighbors": [
        {
          "omittedAtomId": "a",
          "retainedIds": [
            "c"
          ],
          "evidenceStatus": "unresolved",
          "observationIds": [
            "c-unresolved"
          ]
        },
        {
          "omittedAtomId": "c",
          "retainedIds": [
            "a"
          ],
          "evidenceStatus": "pass",
          "observationIds": [
            "a-pass"
          ]
        }
      ],
      "nextExperiments": [
        {
          "harnessRef": "harness-v1",
          "caseRef": "case-x",
          "targetFailureKey": "E_X",
          "omittedAtomId": "a",
          "retainedIds": [
            "c"
          ],
          "values": [
            {
              "op": "trigger"
            }
          ],
          "reason": "unresolved"
        }
      ],
      "conflicts": [],
      "targetExecuted": false,
      "behaviorVerified": false,
      "externalRequests": 0
    },
    "provenance": {
      "inputSha256": "67fbcdaab9d5b3fd35e6bf7d29e597bfffa06f507f26b5bd0f40c85e5809307a",
      "outputSha256": "25ef2cfd69a0b40f6cd46f38112bed174cf4e4f5d35867388bd82becec52855a",
      "deterministic": true,
      "externalRequests": 0
    }
  },
  "requiredHeaders": {
    "Content-Type": "application/json",
    "Idempotency-Key": "random 16–128 character operation identifier"
  },
  "fixedExample": "/reference/examples/observation-shrink-plan.json",
  "execution": {
    "deterministic": true,
    "externalRequests": 0,
    "maxExternalRequests": 0,
    "resultSnapshotPersisted": false,
    "fixedExampleIsIllustrativeSnapshot": false,
    "requiresPayment": true,
    "supportsMcpExecution": false
  },
  "releaseSnapshot": {
    "format": "static-release-reference-v1",
    "sourceVersion": "0.29.0",
    "sourceRegistrySha256": "a2b5ec09bf6c38b9d2879d746a4fded374f5928b445377b0270ef6aa8e6cac65",
    "generatedAt": "2026-10-06T15:38:00Z",
    "releaseAcceptance": "not-verified-by-generator",
    "runtimeReadiness": "not-evaluated",
    "livePaymentsVerified": false,
    "indexingVerified": false,
    "apiOrigin": null,
    "notice": "Build-time release reference. Runtime readiness, deployment, payment settlement and external indexing are not evaluated here. Prices are proposed; this file cannot authorize execution or payment."
  }
}
