{
  "name": "decide.fyi",
  "schema_version": 1,
  "version": "1.12.1",
  "last_updated": "2026-06-14T00:00:00Z",
  "source": "public/docs.json",
  "description": "Machine-readable Decide API reference for Decision Record v1 fields, Decision Packet v1 exports, policy patterns, replay, counterfactual analysis, action execution receipts, verification, reference proof runs, and source-backed reference applications.",
  "decision_api": {
    "description": "Core Decision API runtime. Production-deterministic calls use mode=rulebook with a versioned declarative Rulebook v1 and structured context. The legacy single, multi, and runtime modes remain AI-assisted and must not be treated as the binding determinism boundary. Store the returned Decision Record v1 before state changes, record the target-system neutral Action Execution Receipt when the authorized mutation is attempted, then report the post-action Outcome Record and optional adapter receipts such as CRM Sync. Decision Packet v1 exports bundle the record, execution/outcome evidence, policy intelligence, and audit-chain proof for portable review.",
    "protocol_version": "decision_protocol_v1",
    "record_version": "decision_record_v1",
    "canonical_wedge": "Pricing exception before CRM or billing state changes.",
    "determinism_boundary": {
      "mode": "rulebook",
      "schema_version": "rulebook_v1",
      "runtime_architecture": "docs/RULEBOOK_RUNTIME_ARCHITECTURE.md",
      "contract": "A validated declarative rulebook plus the same canonical facts produces the same application verdict, reason code, matched rule id, action, and rulebook hash. Facts may be supplied directly or emitted by an exact-version trusted adapter whose manifest and bundled implementation hashes are pinned in the Decision Record.",
      "supported_binding_modes": [
        "direct_declarative_rulebook",
        "trusted_adapter_facts_then_declarative_rulebook"
      ],
      "unsupported_binding_modes": [
        {
          "mode": "customer_executable_rulebook",
          "status": "rejected",
          "error": "RULEBOOK_BINDING_MODE_UNSUPPORTED"
        }
      ],
      "response_only_material_policy": {
        "status": "rejected_in_request",
        "error": "RULEBOOK_OUTPUT_MATERIAL_FORBIDDEN",
        "forbidden_request_fields": [
          "runtime_binding",
          "trusted_adapter",
          "adapter_facts",
          "rulebook_attestation",
          "decision_contract",
          "application_verdict",
          "action"
        ],
        "conformance_fixture": "https://api.decide.fyi/conformance/rulebook-v1/caller-output-material-rejected.json",
        "summary": "Decision Record output material is produced by Decide and cannot be supplied as caller authority in Rulebook requests."
      },
      "legacy_modes": [
        "single",
        "multi",
        "runtime"
      ],
      "legacy_status": "AI-assisted; useful for exploration and drafting, but not the production determinism boundary.",
      "executable_code_policy": "Customer-supplied executable code does not run inside Decide. Executable extensions are registered first-party trusted adapters with strict input/output schemas, exact version and manifest selection, bundled implementation source hashes, registration-time capability audits, and one-shot empty-environment worker execution with hard time/resource limits and denied common ambient capabilities. The declarative rulebook remains the only binding verdict selector; worker isolation is not presented as an OS-level sandbox.",
      "compatibility_policy": {
        "policy_version": "compatibility_policy_v1",
        "human_docs": "https://www.decide.fyi/resources/docs#rulebook-compatibility",
        "summary": "Historical replay never reinterprets stored records with the current evaluator or adapter. One rulebook id/version cannot bind to a different canonical rulebook hash or silently move to a different evaluator version. Adapter dependency changes require a new adapter version, a new manifest hash, and an explicit rulebook version migration. Public REST, MCP, and SDK responses may add optional fields but must not remove, rename, or change the meaning of stable fields without a new versioned contract."
      },
      "golden_replay_corpus": {
        "url": "https://api.decide.fyi/replay/rulebook-v1/index.json",
        "corpus_version": "rulebook_v1_golden_replay_v1",
        "replay_contract": "historical_rulebook_replay_v1",
        "dry_run_command": "npm run rulebook:migration-dry-run -- --json",
        "migration_manifest_schema": "rulebook_migration_v1",
        "migration_manifest_schema_url": "https://api.decide.fyi/schemas/rulebook-migration-v1.schema.json",
        "migration_manifest_command": "npm run rulebook:migration-dry-run -- --migration path/to/migration.json --json",
        "summary": "Public Rulebook v1 historical replay corpus for direct rulebooks, the Solana trusted-adapter gate, and the Refund, Trial, Cancel, and Return reference notary families."
      },
      "application_binding": {
        "contract_version": "decide_application_binding_v1",
        "applies_to": "krafthaus_workflow_applications",
        "must_bind_before_action": true,
        "accepted_fact_sources": [
          "context.inputs",
          "adapter_facts"
        ],
        "required_decision_material": [
          "rulebook_contract",
          "runtime_binding",
          "verdict",
          "application_verdict",
          "action",
          "reason_code",
          "matched_rule_id",
          "rulebook.hash",
          "input_hash",
          "rulebook_attestation.bundle_hash"
        ],
        "replay_reference": "https://api.decide.fyi/replay/rulebook-v1/index.json",
        "conformance_reference": "https://api.decide.fyi/conformance/rulebook-v1/index.json",
        "prohibited_claims": [
          "llm_output_is_binding_production_verdict",
          "customer_executable_code_runs_as_rulebook_v1",
          "action_executes_before_decision_material_is_captured"
        ],
        "human_docs": "https://www.decide.fyi/resources/docs#application-binding",
        "summary": "Workflow applications such as Krafthaus must bind Decide before execution handoff by preserving runtime binding, rulebook contract, verdict/action material, input hash, and attestation bundle hash. Response-only material is preserved after Decide evaluation, not supplied as request authority."
      }
    },
    "decision_lifecycle": {
      "human_docs": "https://www.decide.fyi/resources/docs#decision-lifecycle",
      "intelligence_docs": "https://www.decide.fyi/resources/docs/intelligence",
      "api_reference": "https://www.decide.fyi/resources/docs/api-reference",
      "verification_docs": "https://www.decide.fyi/resources/docs/verification",
      "error_reference": "https://www.decide.fyi/resources/docs/errors",
      "stages": [
        {
          "name": "decision_record",
          "endpoint": "/api/decide",
          "artifact": "decision_record_v1",
          "purpose": "Return a verdict, action binding, evidence, policy bundle hash, record hash, receipt hash, replay URL, and verify URL before the downstream action changes state."
        },
        {
          "name": "execution_receipt",
          "endpoint": "/api/decision/:id/execution",
          "artifact": "decision_execution_v1",
          "purpose": "Record the attempted target-system mutation, execution status, target object, executor, state hashes, and action binding hash."
        },
        {
          "name": "outcome_record",
          "endpoint": "/api/decision/:id/outcome",
          "artifact": "decision_outcome_v1",
          "purpose": "Report the post-action business result, observed metrics, execution references, outcome hash, and Decision Record hash links."
        },
        {
          "name": "policy_intelligence",
          "endpoints": [
            "/api/decision/policies/:policy_id/effectiveness",
            "/api/decision/policies/:policy_id/confidence",
            "/api/decision/policies/:policy_id/anomalies",
            "/api/decision/policies/:policy_id/benchmarks"
          ],
          "artifacts": [
            "policy_effectiveness_v1",
            "decision_confidence_v1",
            "decision_anomaly_report_v1",
            "decision_benchmark_v1"
          ],
          "purpose": "Turn caller-scoped Outcome Records into policy effectiveness, confidence, explainable anomaly, and opt-in benchmark reports."
        },
        {
          "name": "decision_packet",
          "endpoint": "/api/decision/:id/packet",
          "verify_endpoint": "/api/decision/packet/verify",
          "artifact": "decision_packet_v1",
          "purpose": "Export a portable review packet that binds the Decision Record, optional original input, execution receipts, Outcome Records, policy intelligence, retained audit-chain links, and packet_hash."
        }
      ]
    },
    "store_with_action": [
      "request_id",
      "decision_id",
      "application_verdict",
      "reason_code",
      "matched_rule_id",
      "rulebook",
      "evaluator_version",
      "rulebook_registry",
      "decision_protocol_version",
      "decision_record_version",
      "record_hash",
      "policy_version",
      "policy_hash",
      "source_hash",
      "policy_bundle",
      "policy_bundle_hash",
      "input_hash",
      "output_hash",
      "idempotency_key",
      "action_binding",
      "action_binding_hash",
      "evidence_manifest",
      "replay_url",
      "verify_url",
      "receipt_hash",
      "receipt_key_id",
      "receipt_signature",
      "receipt_signature_algorithm",
      "receipt_public_key_fingerprint",
      "decision_confidence",
      "confidence_hash",
      "evidence"
    ],
    "outcome_tracking": {
      "endpoint": "/api/decision/:id/outcome",
      "record_version": "decision_outcome_v1",
      "purpose": "Report what happened after a Decision Record authorized or routed an action, producing a hashed Outcome Record linked to decision_id, record_hash, receipt_hash, policy fields, action binding, observed metrics, and execution receipt references, observed metrics, and final result evidence.",
      "idempotency": "Same idempotency key plus same canonical outcome payload returns the original Outcome Record; same key plus a different payload returns 409 DECIDE_OUTCOME_IDEMPOTENCY_CONFLICT.",
      "statuses": [
        "succeeded",
        "failed",
        "reverted",
        "reviewed",
        "skipped",
        "unknown"
      ],
      "store_with_action": [
        "outcome_id",
        "decision_id",
        "decision_outcome_version",
        "outcome_status",
        "action_executed",
        "action_taken",
        "target_system",
        "target_object_id",
        "mutation",
        "external_ref",
        "decision_record_hash",
        "decision_receipt_hash",
        "observed_metrics",
        "evidence_refs",
        "outcome_input_hash",
        "outcome_hash",
        "reported_at",
        "executed_at"
      ]
    },
    "crm_sync": {
      "endpoint": "/api/decision/:id/crm-sync",
      "record_version": "decision_crm_sync_v1",
      "purpose": "Record CRM write-back or inbound CRM sync receipts linked to a Decision Record. The record captures CRM provider, object type/id, mapped Decision Record fields, sync status, idempotency, and sync_hash without storing CRM credentials.",
      "idempotency": "Same idempotency key plus same canonical CRM sync payload returns the original CRM Sync Record; same key plus a different payload returns 409 DECIDE_CRM_SYNC_IDEMPOTENCY_CONFLICT.",
      "directions": [
        "writeback",
        "inbound",
        "bidirectional"
      ],
      "statuses": [
        "queued",
        "written",
        "failed",
        "skipped",
        "stale",
        "unknown"
      ],
      "store_with_crm_object": [
        "sync_id",
        "decision_id",
        "decision_crm_sync_version",
        "sync_status",
        "sync_direction",
        "crm_target.provider",
        "crm_target.object_type",
        "crm_target.object_id",
        "mapped_fields",
        "sync_input_hash",
        "sync_hash",
        "reported_at"
      ]
    },
    "audit_chain": {
      "endpoint": "/api/decision/chains/:chain_id",
      "record_version": "decision_chain_v1",
      "purpose": "Attach each stored Decision Record to a caller-scoped cryptographic audit chain. The chain uses record_hash and receipt_hash as a leaf, then returns chain position, previous link hash, rolling Merkle root, link hash, retained links, and verification metadata.",
      "merkle_strategy": "rolling_sha256_pair_v1",
      "hash_binding": "Decision Record record_hash remains stable; audit_chain leaf_hash binds decision_id, record_hash, and receipt_hash into the chain."
    },
    "counterfactual_analysis": {
      "endpoint": "/api/decision/:id/counterfactuals",
      "record_version": "decision_counterfactuals_v1",
      "purpose": "Evaluate labeled simulation-only what-if scenarios against the current Decision API runtime for a stored Decision Record. The report includes baseline fields, scenario verdict/action/hash diffs, projected Decision Record fields, and a counterfactual_hash.",
      "data_source": "Stored Decision Record input plus caller-supplied scenario patches or full scenario inputs.",
      "scope": "Simulation-only; counterfactual results do not authorize downstream mutation and should be used for rollout review, policy tuning, and planning.",
      "max_scenarios": 8
    },
    "policy_effectiveness": {
      "endpoint": "/api/decision/policies/:policy_id/effectiveness",
      "record_version": "policy_effectiveness_v1",
      "purpose": "Score a policy from the latest Decision Outcome per decision within the caller's API-key scope. Metrics include success rate, failure rate, review rate, terminal coverage, confidence, and proxy false-positive/false-negative rates.",
      "data_source": "Decision Outcome records reported through /api/decision/:id/outcome",
      "scope": "Scoped to the caller API key hash; cross-customer benchmarking is intentionally not part of this endpoint.",
      "recommendations": [
        "insufficient_data",
        "review_policy",
        "monitor",
        "healthy"
      ]
    },
    "predictive_confidence": {
      "endpoint": "/api/decision/policies/:policy_id/confidence",
      "record_version": "decision_confidence_v1",
      "purpose": "Attach predictive confidence to new Decision Records and expose policy-level verdict confidence baselines from latest Outcome Records per decision in the caller's API-key scope.",
      "data_source": "Decision Outcome records reported through /api/decision/:id/outcome",
      "scope": "Scoped to the caller API key hash; scores are deterministic confidence signals, not causal ML predictions.",
      "recommendations": [
        "collect_more_outcomes",
        "high_confidence_proceed",
        "high_confidence_block",
        "high_confidence_review",
        "proceed_with_monitoring",
        "route_for_review",
        "monitor"
      ]
    },
    "cross_customer_benchmarks": {
      "endpoint": "/api/decision/policies/:policy_id/benchmarks",
      "record_version": "decision_benchmark_v1",
      "purpose": "Compare caller-scoped policy outcomes against an opt-in anonymized cohort after minimum cohort privacy thresholds are met.",
      "data_source": "Anonymized benchmark rows derived from Decision Outcome records reported through /api/decision/:id/outcome when DECIDE_BENCHMARKS_ENABLED is enabled.",
      "scope": "Caller metrics remain scoped to the API key hash; cross-customer cohort rows contain hashed scope and decision identifiers only, exclude the caller from the cohort, and expose no raw records.",
      "privacy_thresholds": {
        "default_min_cohort_scopes": 3,
        "default_min_cohort_decisions": 30,
        "raw_records_exposed": false,
        "opt_in_required": true
      },
      "recommendations": [
        "benchmark_unavailable",
        "within_cohort_range",
        "review_policy_outcomes",
        "tighten_approval_policy",
        "reduce_manual_review_pressure"
      ]
    },
    "anomaly_detection": {
      "endpoint": "/api/decision/policies/:policy_id/anomalies",
      "record_version": "decision_anomaly_report_v1",
      "purpose": "Return deterministic anomaly reports from latest Decision Outcome records per decision. Reports include baseline rates, observed metric baselines, anomaly score, severity, reason codes, and anomaly_hash.",
      "data_source": "Decision Outcome records reported through /api/decision/:id/outcome",
      "scope": "Scoped to the caller API key hash; scores are explainable heuristics, not model predictions.",
      "recommendations": [
        "collect_more_outcomes",
        "review_high_anomalies",
        "monitor_anomalies",
        "stable"
      ]
    },
    "policy_pattern_registry": {
      "endpoint": "/api/decision/policy-patterns",
      "catalog": "/resources/patterns",
      "record_version": "decision_pattern_registry_v1",
      "pattern_version": "decision_pattern_v1",
      "purpose": "Expose first-party Decision API templates for common state-changing workflows so integrations can start from versioned request, outcome, and CRM sync shapes.",
      "filters": [
        "pattern_id",
        "tag"
      ],
      "built_in_patterns": [
        "pricing_exception",
        "refund_review",
        "agent_action_gate",
        "crm_writeback_gate"
      ]
    },
    "decision_packet": {
      "endpoint": "/api/decision/:id/packet",
      "verify_endpoint": "/api/decision/packet/verify",
      "record_version": "decision_packet_v1",
      "purpose": "Export portable proof for audits, support, and buyer reviews by bundling a Decision Record with linked execution receipts, Outcome Records, policy intelligence, audit-chain metadata, verification hints, and packet_hash.",
      "hash_binding": "packet_hash is sha256 over the canonical packet with packet_hash omitted; embedded Decision Records, execution receipts, outcomes, effectiveness reports, anomaly reports, and retained chain links keep their own hash checks.",
      "cli": "npx @decide-fyi/sdk verify-packet decision-packet.json --key-registry https://www.decide.fyi/api/decision/receipt-keys"
    },
    "base_url": "https://www.decide.fyi",
    "auth": {
      "type": "api_key",
      "header": "x-api-key"
    },
    "endpoints": [
      {
        "method": "POST",
        "path": "/api/decide",
        "purpose": "Evaluate a declarative Rulebook v1 deterministically when mode=rulebook, or run a legacy AI-assisted decision mode, then return a Decision Record v1 object with application verdict lineage, action, evidence, replay/verify URLs, policy version, hashes, and durable identifiers.",
        "request": {
          "required_alternatives": {
            "rulebook_mode": [
              "mode=rulebook",
              "rulebook",
              "context"
            ],
            "legacy_modes": [
              "question or prompt"
            ]
          },
          "optional": {
            "question": "string; legacy AI-assisted modes",
            "prompt": "string; legacy AI-assisted modes",
            "mode": "single | multi | runtime | rulebook",
            "context": "object | string",
            "rulebook": "Rulebook v1 object with schema_version, rulebook_id, version, input_schema, ordered rules, and a required default outcome",
            "adapter": "optional trusted adapter invocation with adapter_id, semantic version, pinned manifest_hash, and bounded input; cannot be combined with context.inputs",
            "response_view": "minimal | standard | full"
          },
          "headers": {
            "x-api-key": "required for production access",
            "x-request-id": "optional caller trace id",
            "x-idempotency-key": "optional caller retry/dedupe handle",
            "Prefer": "optional response view selector, for example return=minimal",
            "x-decision-response-view": "optional response view selector: minimal, standard, or full"
          }
        },
        "response": {
          "response_view": "projection returned to caller; minimal, standard, or full",
          "decision_protocol_version": "protocol version; currently decision_protocol_v1",
          "decision_record_version": "contract version; currently decision_record_v1",
          "c": "compact verdict category",
          "v": "verdict value",
          "verdict": "normalized yes | no | review-style verdict",
          "application_verdict": "rulebook-defined application verdict, for example APPROVE, DENY, or NEEDS_INPUT",
          "reason_code": "stable rulebook reason code for routing, audit, and downstream policy handling",
          "matched_rule_id": "stable id of the first matching rule; omitted for fail-closed input validation and default outcomes when no explicit rule matched",
          "rulebook": "Rulebook v1 lineage: schema_version, id, version, and canonical sha256 hash",
          "evaluator_version": "versioned deterministic evaluator used for the rulebook result",
          "rulebook_contract": "runtime-enforced Rulebook v1 contract metadata: schema_version, schema_url, schema_hash, and evaluator_version",
          "rulebook_registry": "tenant-scoped immutable registry metadata for the stored rulebook snapshot, including scope-bound attestation hash and Ed25519 registry signature when configured; snapshot content is retained internally for replay",
          "runtime_binding": "runtime selection metadata with production_core=hybrid_declarative_rulebook_with_trusted_adapters, binding_mode direct_declarative_rulebook or trusted_adapter_facts_then_declarative_rulebook, declarative rulebook verdict authority, and rejected customer-supplied code",
          "trusted_adapter": "exact adapter lineage including manifest version, adapter id/version, implementation revision, bundled implementation hash, manifest hash, canonical input/output hashes, one-shot worker isolation, capability-enforcement version, and hard timeout",
          "adapter_facts": "schema-validated facts emitted by the trusted adapter and consumed by Rulebook v1",
          "request_id": "request handle for logs and downstream metadata",
          "decision_id": "ledger key for lookup and replay",
          "evidence": "machine-readable evidence codes when available",
          "evidence_manifest": "normalized evidence codes and source references when available",
          "action": "recommended downstream action when available",
          "action_binding": "normalized actor/system/resource/proposed_action plus target system/object, mutation, expiration, and execution metadata when supplied",
          "idempotency_key": "caller retry/dedupe handle when provided",
          "policy_version": "declared rule/policy version used for this decision",
          "policy_hash": "hash of declared rule/version context",
          "source_hash": "backend lineage hash returned in the full response when supplied by the upstream decision engine",
          "policy_bundle": "optional attestation of the policy bundle that shaped the decision",
          "policy_bundle_hash": "hash of the policy bundle attestation or declared bundle content",
          "input_hash": "canonical request hash",
          "output_hash": "canonical response hash",
          "record_hash": "hash of the normalized Decision Record v1 envelope, including binding application verdict, matched rule, rulebook lineage, registry attestation, trusted adapter attestation, and adapter facts when present",
          "receipt_hash": "compact hash over record_hash, policy/input/output hashes, action binding, and evidence manifest",
          "receipt_key_id": "key identifier used for receipt signing when signing is enabled",
          "receipt_signature": "optional HMAC or Ed25519 receipt signature over decision_id, record_hash, receipt_hash, and key id",
          "receipt_signature_algorithm": "signature algorithm; hmac-sha256 or ed25519 when signing is enabled",
          "receipt_public_key": "Ed25519 public key PEM when portable public verification is enabled",
          "receipt_public_key_fingerprint": "sha256 fingerprint of the Ed25519 public key when available",
          "confidence": "decision_confidence_v1 block with score, level, basis, recommendation, and confidence_hash",
          "decision_confidence": "same confidence block, named explicitly for callers that avoid generic confidence fields",
          "confidence_hash": "hash of the decision_confidence_v1 envelope",
          "replay_url": "path to replay the decision record",
          "verify_url": "path to verify the record hash and receipt hash without replaying upstream logic",
          "integrity": "canonicalization and hash metadata for tamper-evident verification",
          "created_at": "record creation timestamp"
        },
        "headers": {
          "x-decision-id": "mirrors response decision_id when available",
          "x-request-id": "mirrors response request_id when available",
          "x-decision-record-version": "mirrors response decision_record_version",
          "x-decision-record-hash": "mirrors response record_hash",
          "x-decision-receipt-hash": "mirrors response receipt_hash",
          "x-decision-receipt-signature": "mirrors response receipt_signature when signing is enabled",
          "x-decision-confidence-score": "mirrors response decision_confidence.score",
          "x-decision-confidence-level": "mirrors response decision_confidence.level",
          "x-decision-confidence-hash": "mirrors response decision_confidence.confidence_hash",
          "x-decision-verify-url": "mirrors response verify_url",
          "x-decision-response-view": "mirrors the response view used for the response body",
          "x-idempotency-key": "mirrors caller idempotency key when provided",
          "x-idempotency-status": "created, replayed, or conflict for idempotent Decision API calls",
          "x-ratelimit-limit": "requests per active rate window",
          "x-ratelimit-remaining": "remaining requests in active rate window",
          "x-ratelimit-reset": "rate window reset timestamp in milliseconds",
          "x-usage-monthly-limit": "monthly decision-record cap when enforced",
          "x-usage-monthly-used": "monthly decision-record usage when enforced",
          "x-usage-monthly-remaining": "remaining monthly decision records when enforced"
        },
        "errors": {
          "401_or_403": {
            "shape": {
              "c": "unclear",
              "v": "unauthorized",
              "error": "DECIDE_API_UNAUTHORIZED"
            },
            "caller_behavior": "Do not execute the downstream action; fix key scope or account status."
          },
          "429_rate_limit": {
            "shape": {
              "c": "unclear",
              "v": "rate_limited",
              "error": "DECIDE_API_RATE_LIMITED",
              "retry_after": "seconds"
            },
            "caller_behavior": "Honor Retry-After; keep irreversible source actions in review."
          },
          "429_monthly_cap": {
            "shape": {
              "c": "unclear",
              "v": "monthly_cap_exceeded",
              "error": "DECIDE_API_MONTHLY_CAP_EXCEEDED"
            },
            "caller_behavior": "Do not execute automatically; request capacity or route to owner review."
          },
          "409_idempotency_conflict": {
            "shape": {
              "c": "unclear",
              "v": "idempotency_conflict",
              "error": "DECIDE_API_IDEMPOTENCY_CONFLICT"
            },
            "caller_behavior": "Do not execute. Reuse an idempotency key only with the same canonical payload, or create a new key for a new action attempt."
          },
          "5xx": {
            "caller_behavior": "Retry with backoff only when integration policy allows it; otherwise fail closed."
          }
        }
      },
      {
        "method": "GET",
        "path": "/api/decision/:id",
        "purpose": "Fetch a stored Decision Record v1 ledger entry by decision_id."
      },
      {
        "method": "POST",
        "path": "/api/decision/:id/replay",
        "purpose": "Rulebook decisions default to historical replay with the original canonical input and immutable rulebook snapshot. Legacy decisions default to current-mode replay. The response reports semantic reproduction separately from volatile record hashes."
      },
      {
        "method": "POST",
        "path": "/api/decision/:id/diff",
        "purpose": "Replay/diff alias for rollout review, policy drift checks, and regression comparisons."
      },
      {
        "method": "POST",
        "path": "/api/decision/:id/counterfactuals",
        "purpose": "Return decision_counterfactuals_v1 for labeled simulation-only scenarios, including baseline-to-scenario verdict, action, policy version, input hash, output hash, and record hash diffs."
      },
      {
        "method": "GET | POST",
        "path": "/api/decision/:id/execution",
        "purpose": "Record or list target-system neutral Action Execution Receipts for a Decision Record, including execution status, target system/object, mutation, execution id, state hashes, action_binding_hash, and execution_hash."
      },
      {
        "method": "GET | POST",
        "path": "/api/decision/:id/outcome",
        "purpose": "Record or list Decision Outcome records linked to a decision_id. POST creates a decision_outcome_v1 record with outcome_hash, idempotency support, action result fields, observed metrics, and execution references."
      },
      {
        "method": "GET | POST",
        "path": "/api/decision/:id/crm-sync",
        "purpose": "Record or list Decision CRM Sync records linked to a decision_id. POST creates a decision_crm_sync_v1 receipt with sync_hash, CRM object references, field mapping, mapped Decision Record fields, and idempotency support."
      },
      {
        "method": "GET",
        "path": "/api/decision/:id/packet",
        "purpose": "Export decision_packet_v1 with the Decision Record, optional input, execution receipts, Outcome Records, policy intelligence, audit-chain metadata, verification hints, and packet_hash."
      },
      {
        "method": "GET",
        "path": "/api/decision/chains/:chain_id",
        "purpose": "Return decision_chain_v1 head, retained links, rolling Merkle root, and link verification for the caller API-key scoped audit chain."
      },
      {
        "method": "GET",
        "path": "/api/decision/policies/:policy_id/effectiveness",
        "purpose": "Return policy_effectiveness_v1 metrics for a policy, optionally filtered by policy_version, using latest Outcome Records per decision in the caller's API-key scope."
      },
      {
        "method": "GET",
        "path": "/api/decision/policies/:policy_id/confidence",
        "purpose": "Return decision_confidence_v1 for a candidate verdict/action, optionally filtered by policy_version, using latest Outcome Records per decision in the caller's API-key scope."
      },
      {
        "method": "GET",
        "path": "/api/decision/policies/:policy_id/benchmarks",
        "purpose": "Return decision_benchmark_v1 with caller metrics plus anonymized cohort percentiles when DECIDE_BENCHMARKS_ENABLED is on and minimum cohort privacy thresholds are met."
      },
      {
        "method": "GET",
        "path": "/api/decision/policies/:policy_id/anomalies",
        "purpose": "Return decision_anomaly_report_v1 for a policy, optionally filtered by policy_version, using latest Outcome Records per decision in the caller's API-key scope."
      },
      {
        "method": "GET | POST",
        "path": "/api/decision/:id/verify",
        "purpose": "Verify the stored or supplied Decision Record v1 envelope by recomputing record_hash, receipt_hash, optional receipt_signature, policy_bundle_hash, and optional input_hash."
      },
      {
        "method": "GET | POST",
        "path": "/api/decision/verify",
        "purpose": "Verify an exported Decision Record v1 packet directly from the request body, without depending on the hosted ledger."
      },
      {
        "method": "GET | POST",
        "path": "/api/decision/packet/verify",
        "purpose": "Verify an exported Decision Packet v1 object from the request body, including packet_hash, embedded Decision Record verification, execution/outcome hash links, intelligence report hashes, and retained chain links when present."
      },
      {
        "method": "GET",
        "path": "/api/decision/receipt-keys",
        "purpose": "Return the active public Ed25519 receipt-verification key registry when portable receipt signing is configured."
      },
      {
        "method": "GET",
        "path": "/api/decision/policy-bundles",
        "purpose": "Return the active and historical policy bundle registry, including bundle hashes and source references."
      },
      {
        "method": "GET",
        "path": "/api/decision/rulebooks",
        "purpose": "Resolve metadata for one tenant-scoped immutable rulebook by hash, or by rulebook_id plus version. Registry listing and snapshot-body disclosure are not supported."
      },
      {
        "method": "GET",
        "path": "/api/decision/policy-patterns",
        "purpose": "Return decision_pattern_registry_v1 with first-party Decision API pattern templates; pass pattern_id for a single template or tag to filter."
      },
      {
        "method": "GET",
        "path": "/api/decision/status",
        "purpose": "Return readiness for receipt signing, rulebook runtime contract metadata, policy bundle, rulebook and pattern registries, durable ledger, idempotency, auth, and backend wiring."
      }
    ],
    "trust_envelope": {
      "canonicalization": "json.sort_deep.v1",
      "hash_algorithm": "sha256",
      "record_hash": "Tamper-evident hash of the normalized Decision Record v1 envelope, including binding Rulebook v1 lineage, registry attestation, trusted adapter attestation, and adapter facts when present.",
      "receipt_hash": "Portable receipt hash for exports, logs, and dispute packets.",
      "policy_bundle": "Optional policy-bundle attestation with id, version, source, canonicalization, and sha256 hash.",
      "receipt_signature": "Optional hmac-sha256 or Ed25519 signature over the portable receipt. Use DECIDE_RECEIPT_SIGNING_SECRET for HMAC or DECIDE_RECEIPT_ED25519_PRIVATE_KEY for portable public verification.",
      "public_key_registry": "GET /api/decision/receipt-keys returns active public Ed25519 receipt keys when configured, so exported records can be verified without trusting record-embedded key material.",
      "policy_bundle_registry": "GET /api/decision/policy-bundles returns active and historical policy bundle hashes, versions, source refs, and changelog notes.",
      "rulebook_registry": "Successful Rulebook v1 decisions register an immutable tenant-scoped snapshot keyed by rulebook id, version, and canonical hash. Registry attestations bind scope hash, evaluator, registration time, and any trusted-adapter lineage; they are Ed25519-signed when separate registry signing keys are configured. Deployments can set DECIDE_REQUIRE_SIGNED_REGISTRY=1 to degrade readiness and reject unsigned registration. One rulebook id/version is bound to one evaluator version; evaluator changes require an explicit rulebook version migration. Adapter dependency changes require a new adapter version, a new manifest hash, and an explicit rulebook version migration. GET /api/decision/rulebooks exposes exact metadata lookup only; snapshot bodies remain internal for historical replay.",
      "rulebook_registry_rollout": "Before setting DECIDE_REQUIRE_SIGNED_REGISTRY=1, configure DECIDE_REGISTRY_ED25519_PRIVATE_KEY, DECIDE_REGISTRY_ED25519_PUBLIC_KEY, and DECIDE_REGISTRY_KEY_ID, then confirm /api/decision/status reports checks.rulebook_registry.attestation.status=configured and public_verification=true.",
      "rulebook_runtime_contract": "GET /api/decision/status reports checks.rulebook_runtime_contract with the active Rulebook runtime manifest at https://api.decide.fyi/manifests/rulebook-runtime-v1.json, the Rulebook v1 schema URL/hash/evaluator version, production_core=hybrid_declarative_rulebook_with_trusted_adapters, supported binding modes direct_declarative_rulebook and trusted_adapter_facts_then_declarative_rulebook, and application_binding=decide_application_binding_v1 for workflow-app pre-action handoff material.",
      "runtime_binding": "Rulebook Decision Records include runtime_binding with production_core, binding_mode, verdict_authority, customer_supplied_code=rejected, and adapter_authority=facts_only when the trusted_adapter_facts_then_declarative_rulebook path is used.",
      "policy_pattern_registry": "GET /api/decision/policy-patterns returns first-party decision_pattern_v1 templates with request, outcome, CRM sync, and SDK example hints.",
      "crm_sync": "GET or POST /api/decision/:id/crm-sync records decision_crm_sync_v1 write-back receipts for CRM objects without storing CRM credentials.",
      "predictive_confidence": "New Decision Records include decision_confidence_v1, a hashed deterministic confidence signal from caller-scoped Outcome Records. It does not change the Decision Record v1 record_hash.",
      "cross_customer_benchmarks": "GET /api/decision/policies/:policy_id/benchmarks returns decision_benchmark_v1. Cohort metrics require opt-in benchmark collection and minimum anonymized cohort thresholds; raw records are never returned.",
      "hosted_verifier": "https://www.decide.fyi/verify verifies exported Decision Record packets, optional original inputs, optional Ed25519 public keys, and stored decision ids through the public verifier endpoint.",
      "offline_verifier": "SDK verifier CLI: npx @decide-fyi/sdk verify decision-record.json --input decision-input.json --key-registry https://www.decide.fyi/api/decision/receipt-keys --json",
      "ci_verifier": "Use npx @decide-fyi/sdk verify in CI to fail builds when exported Decision Records do not verify against their original input and receipt key registry.",
      "conformance_fixtures": "SDK fixture pack: sdk/fixtures/decision-input.json, valid-decision-record.json, tampered-record.json, and replay-diff-example.json. Verify with --hmac-secret decide_conformance_hmac_secret_v1.",
      "rulebook_conformance_runner": "Run npx @decide-fyi/sdk rulebook-conformance --index https://api.decide.fyi/conformance/rulebook-v1/index.json --endpoint https://api.decide.fyi/api/decide --summary to verify a target endpoint against the public Rulebook v1 fixture index, including semantic output, executable-payload rejection, caller-supplied output-material rejection, rulebook_contract metadata, and repeat-run stability.",
      "rulebook_golden_replay_corpus": "The public golden replay corpus is https://api.decide.fyi/replay/rulebook-v1/index.json. It uses corpus version rulebook_v1_golden_replay_v1 and replay contract historical_rulebook_replay_v1. Backend migrations should run npm run rulebook:migration-dry-run -- --json before changing evaluator, adapter, or rulebook routing. Release gates should use a rulebook_migration_v1 manifest with npm run rulebook:migration-dry-run -- --migration path/to/migration.json --json. The manifest JSON Schema is https://api.decide.fyi/schemas/rulebook-migration-v1.schema.json.",
      "verify_url": "GET verifies the stored ledger record; POST can verify a supplied record and optional input payload.",
      "export_verify": "POST /api/decision/verify verifies a Decision Record packet without requiring a hosted ledger lookup.",
      "action_binding": "Binds the verdict to actor, system, resource, proposed action, target system/object, mutation, expiration, and execution metadata when supplied.",
      "evidence_manifest": "Carries evidence codes plus source references, policy refs, retrieval ids, and snapshot/content hashes so reviewers can distinguish policy output from source material.",
      "idempotency": "Same idempotency key plus same canonical request payload returns the original Decision Record; same key plus a different payload returns 409.",
      "application_binding": "decide_application_binding_v1 requires workflow applications to preserve rulebook_contract, runtime_binding, verdict, application_verdict, action, reason_code, matched_rule_id, rulebook.hash, input_hash, and rulebook_attestation.bundle_hash before execution handoff. Prohibited claims include llm_output_is_binding_production_verdict, customer_executable_code_runs_as_rulebook_v1, and action_executes_before_decision_material_is_captured.",
      "application_binding_verifier": "SDK verifier support: verifyApplicationBinding(record) and npx @decide-fyi/sdk verify app-record.json --application-binding --summary check decide_application_binding_v1 material before execution handoff."
    },
    "response_views": {
      "default": "full",
      "selection": {
        "body": "response_view",
        "headers": [
          "Prefer: return=minimal|standard|full",
          "x-decision-response-view: minimal|standard|full"
        ]
      },
      "invariant": "All response views are projections of the same canonical Decision Record v1 ledger entry and preserve decision_id, record_hash, receipt_hash, policy_bundle_hash when present, verify_url, and signed receipt fields when configured.",
      "minimal": {
        "best_for": "Routing, agent gates, queue gates, and lightweight webhook handlers.",
        "fields": [
          "decision_protocol_version",
          "decision_record_version",
          "response_view",
          "decision_id",
          "request_id",
          "verdict",
          "action",
          "record_hash",
          "receipt_hash",
          "policy_bundle_hash",
          "confidence",
          "decision_confidence",
          "confidence_hash",
          "receipt_key_id",
          "receipt_signature",
          "receipt_signature_algorithm",
          "receipt_public_key_fingerprint",
          "verify_url",
          "decision_url",
          "replay_url"
        ]
      },
      "standard": {
        "best_for": "Production integrations that store a record beside a CRM, billing, queue, or workflow action.",
        "adds": [
          "evidence",
          "policy fields",
          "policy_bundle",
          "action_binding",
          "predictive confidence",
          "input_hash",
          "output_hash",
          "created_at"
        ]
      },
      "full": {
        "best_for": "Audits, exports, replay labs, packet reviews, and buyers that want the complete trust envelope immediately.",
        "adds": [
          "evidence_manifest",
          "integrity",
          "upstream response fields when available"
        ]
      }
    },
    "action_execution": {
      "endpoint": "/api/decision/:id/execution",
      "record_version": "decision_execution_v1",
      "purpose": "Report whether the exact action authorized by a Decision Record was executed, queued, skipped, failed, blocked, reviewed, or reverted in any target system. Execution receipts are adapter-neutral; CRM sync, reference policy remotes, billing systems, queues, agents, and Krafthaus workflows sit above this protocol layer.",
      "idempotency": "Same idempotency key plus same canonical execution payload returns the original Action Execution Receipt; same key plus a different payload returns 409 DECIDE_EXECUTION_IDEMPOTENCY_CONFLICT.",
      "statuses": [
        "queued",
        "executed",
        "failed",
        "skipped",
        "reverted",
        "blocked",
        "reviewed",
        "unknown"
      ],
      "store_with_action": [
        "execution_receipt_id",
        "decision_id",
        "decision_execution_version",
        "execution_status",
        "action_taken",
        "target_system",
        "target_object_id",
        "mutation",
        "execution_id",
        "external_ref",
        "executor",
        "decision_record_hash",
        "decision_receipt_hash",
        "action_binding",
        "action_binding_hash",
        "action_binding_match",
        "state_before_hash",
        "state_after_hash",
        "execution_input_hash",
        "execution_hash",
        "reported_at",
        "executed_at"
      ]
    }
  },
  "resources": {
    "docs": "https://www.decide.fyi/resources/docs",
    "api_reference": "https://www.decide.fyi/resources/docs/api-reference",
    "verification_docs": "https://www.decide.fyi/resources/docs/verification",
    "decision_intelligence": "https://www.decide.fyi/resources/docs/intelligence",
    "error_reference": "https://www.decide.fyi/resources/docs/errors",
    "verify": "https://www.decide.fyi/verify",
    "openapi": "https://www.decide.fyi/openapi.json",
    "rulebook_v1_schema": "https://api.decide.fyi/schemas/rulebook-v1.schema.json",
    "rulebook_v1_conformance": "https://api.decide.fyi/conformance/rulebook-v1/index.json",
    "rulebook_compatibility_policy": "https://www.decide.fyi/resources/docs#rulebook-compatibility",
    "rulebook_golden_replay_corpus": "https://api.decide.fyi/replay/rulebook-v1/index.json",
    "rulebook_migration_manifest": "https://www.decide.fyi/resources/docs#rulebook-compatibility",
    "rulebook_migration_manifest_schema": "https://api.decide.fyi/schemas/rulebook-migration-v1.schema.json",
    "sdk": "https://www.decide.fyi/sdk/README.md",
    "sdk_npm": "https://www.npmjs.com/package/@decide-fyi/sdk",
    "sdk_conformance": "https://www.decide.fyi/sdk/README.md",
    "sdk_rulebook_conformance_runner": "https://www.decide.fyi/sdk/README.md",
    "integrations": "https://www.decide.fyi/resources/integrations",
    "examples": "https://www.decide.fyi/resources/examples",
    "policy_patterns": "https://www.decide.fyi/resources/patterns",
    "changelog": "https://www.decide.fyi/resources/changelog",
    "live_proof": "https://www.decide.fyi/resources/live-proof",
    "pricing": "https://www.decide.fyi/pricing",
    "status": "https://www.decide.fyi/resources/status",
    "security": "https://www.decide.fyi/resources/security",
    "receipt_keys": "https://www.decide.fyi/api/decision/receipt-keys",
    "terms": "https://www.decide.fyi/terms",
    "privacy": "https://www.decide.fyi/privacy",
    "reference_alerts": "https://www.decide.fyi/resources/policy-alerts",
    "decide_application_binding_v1": "https://www.decide.fyi/resources/docs#application-binding"
  },
  "sdk_status": {
    "javascript": {
      "package": "@decide-fyi/sdk",
      "version": "0.1.16",
      "source_version": "0.1.16",
      "install": "npm install @decide-fyi/sdk",
      "npm": "https://www.npmjs.com/package/@decide-fyi/sdk",
      "status": "published",
      "includes": [
        "server-side API client",
        "CLI verifier",
        "Rulebook v1 conformance runner",
        "offline verification helpers",
        "conformance fixtures",
        "integration examples",
        "application-binding verifier"
      ]
    },
    "python": {
      "status": "raw_https_examples_only",
      "note": "The site does not advertise a separate PyPI package yet."
    }
  },
  "policy_pattern_catalog": {
    "url": "https://www.decide.fyi/resources/patterns",
    "scope": "first_party_templates",
    "status": "v0_catalog",
    "source_endpoint": "https://www.decide.fyi/api/decision/policy-patterns",
    "patterns": [
      "pricing_exception",
      "refund_review",
      "agent_action_gate",
      "crm_writeback_gate"
    ],
    "community_templates_live": false
  },
  "built_on_decide_examples": [
    {
      "name": "Krafthaus",
      "url": "https://www.krafthaus.app/",
      "relationship": "Hosted product layer built on Decide. Demonstrates decision packet, memo run, and workspace workflows powered by the Decision API.",
      "required_for_core_api": false
    },
    {
      "name": "Krafthaus Policy Checks",
      "url": "https://www.krafthaus.app/policy-notaries",
      "relationship": "Product page for refund, cancellation, return, and trial checks while stable MCP and REST runtime endpoints remain on Decide.",
      "required_for_core_api": false
    },
    {
      "name": "Krafthaus Solana Execution Gate",
      "url": "https://www.krafthaus.app/solana/demo",
      "relationship": "Execution-gate demo showing a proposed action packaged as a decision packet with evidence, verdict, packet hash, and operator memo.",
      "required_for_core_api": false
    }
  ],
  "integration_patterns": [
    {
      "system": "CRM",
      "examples": [
        "Salesforce",
        "HubSpot"
      ],
      "pattern": "Call Decide before a quote, deal, approval, or discount field changes state; store request_id and decision_id on the source record."
    },
    {
      "system": "Billing",
      "examples": [
        "Stripe-style billing updates"
      ],
      "pattern": "Call Decide before credits, discounts, refunds, or subscription changes; attach decision metadata to the billing action or internal ledger."
    },
    {
      "system": "Automation",
      "examples": [
        "Zapier",
        "Make",
        "internal workflow tools"
      ],
      "pattern": "Use a server-side proxy for API key custody, then return proceed, block, or review to the automation step."
    },
    {
      "system": "Queues and webhooks",
      "examples": [
        "workers",
        "webhook receivers",
        "async jobs"
      ],
      "pattern": "Run Decide before the worker performs side effects; pass the decision handles through job metadata."
    },
    {
      "system": "Agents",
      "examples": [
        "agent action gates",
        "internal autonomous tools"
      ],
      "pattern": "Treat review, unknown, rate-limited, and unauthorized outcomes as non-execution states unless a human owner approves."
    }
  ],
  "sdk_examples": [
    {
      "name": "pricing_exception",
      "path": "sdk/examples/pricing-exception.js",
      "pattern": "Canonical pricing exception call with idempotency and exported verification."
    },
    {
      "name": "billing_discount_gate",
      "path": "sdk/examples/billing-discount-gate.js",
      "pattern": "Call Decide before a billing discount mutation, store the record, and attach decision metadata to the billing update."
    },
    {
      "name": "crm_writeback",
      "path": "sdk/examples/crm-writeback.js",
      "pattern": "Record a hashed CRM write-back receipt after Decision Record fields are written to a CRM object."
    },
    {
      "name": "webhook_queue_gate",
      "path": "sdk/examples/webhook-queue-gate.js",
      "pattern": "Call Decide before queue or webhook worker side effects and route unavailable or unclear outcomes to review."
    },
    {
      "name": "agent_action_gate",
      "path": "sdk/examples/agent-action-gate.js",
      "pattern": "Authorize an agent-proposed action before execution and persist the Decision Record handles."
    },
    {
      "name": "lifecycle_proof_pack",
      "path": "sdk/examples/lifecycle-proof-pack.js",
      "pattern": "Run the buyer proof path from Decision Record to execution receipt, Outcome Record, policy effectiveness score, and anomaly review."
    },
    {
      "path": "sdk/examples/action-execution-receipt.js",
      "purpose": "Record a decision_execution_v1 receipt for a generic target-system mutation authorized by a Decision Record."
    },
    {
      "name": "outcome_tracking",
      "path": "sdk/examples/outcome-tracking.js",
      "pattern": "Report what happened after an authorized billing mutation and link the Outcome Record back to the original Decision Record."
    },
    {
      "name": "policy_effectiveness",
      "path": "sdk/examples/policy-effectiveness.js",
      "pattern": "Read Outcome Record based policy effectiveness metrics and inspect score, confidence, recommendation, and proxy quality."
    },
    {
      "name": "policy_anomalies",
      "path": "sdk/examples/policy-anomalies.js",
      "pattern": "Read explainable anomaly reports with baseline rates, reason codes, severity, and anomaly hashes."
    },
    {
      "name": "policy_confidence",
      "path": "sdk/examples/policy-confidence.js",
      "pattern": "Read predictive confidence for a candidate policy verdict and inspect score, level, stability, and confidence hash."
    },
    {
      "name": "policy_benchmarks",
      "path": "sdk/examples/policy-benchmarks.js",
      "pattern": "Read opt-in anonymized policy benchmarks and inspect cohort percentiles, comparison deltas, privacy thresholds, and benchmark hash."
    },
    {
      "name": "policy_patterns",
      "path": "sdk/examples/policy-patterns.js",
      "pattern": "Read first-party Decision API templates and start a decision call from a versioned pattern request shape."
    },
    {
      "name": "counterfactual_analysis",
      "path": "sdk/examples/counterfactual-analysis.js",
      "pattern": "Evaluate simulation-only what-if scenarios against a stored Decision Record and compare verdict/action drift."
    },
    {
      "name": "decision_chain",
      "path": "sdk/examples/decision-chain.js",
      "pattern": "Read the cryptographic audit chain attached to a Decision Record and verify retained links."
    }
  ],
  "conformance_fixtures": {
    "hmac_secret": "decide_conformance_hmac_secret_v1",
    "files": [
      "sdk/fixtures/decision-input.json",
      "sdk/fixtures/valid-decision-record.json",
      "sdk/fixtures/tampered-record.json",
      "sdk/fixtures/replay-diff-example.json"
    ],
    "expected": {
      "valid-decision-record.json": "verified",
      "tampered-record.json": "not verified",
      "replay-diff-example.json": "example current-policy drift packet"
    }
  },
  "services": [
    {
      "name": "refund.decide.fyi",
      "type": "refund_eligibility_notary",
      "description": "Refund eligibility checker backed by direct declarative Rulebook v1 evaluation. Returns ALLOWED, DENIED, or UNKNOWN based on vendor refund window.",
      "runtime_contract": {
        "evaluation": "direct_rulebook_v1",
        "trusted_adapter_required": false,
        "rest_rulebook_result_field": "rulebook_result",
        "mcp_rulebook_result_field": "structuredContent.rulebook_result",
        "attestation": "rulebook_attestation_signature_v1"
      },
      "endpoint": {
        "method": "POST",
        "url": "https://refund.decide.fyi/api/v1/refund/eligibility"
      },
      "decision_record_endpoint": {
        "method": "POST",
        "url": "https://www.decide.fyi/api/v1/refund/eligibility?decision_record=1",
        "response": "decision_record_v1",
        "verification": "request_linked",
        "replay": "historical_rulebook_replay_v1"
      },
      "mcp_endpoint": {
        "method": "POST",
        "url": "https://refund.decide.fyi/api/mcp",
        "protocol": "JSON-RPC 2.0 (MCP)",
        "tool_name": "refund_eligibility"
      },
      "inputs": {
        "vendor": {
          "type": "string",
          "required": true,
          "enum": [
            "1password",
            "adobe",
            "amazon_music_unlimited",
            "amazon_prime",
            "amc_plus",
            "apple_app_store",
            "apple_arcade",
            "apple_music",
            "apple_tv_plus",
            "audible",
            "bitwarden",
            "britbox",
            "bumble",
            "calm",
            "canva",
            "chatgpt_plus",
            "claude_pro",
            "coursera_plus",
            "crunchyroll",
            "dashlane",
            "deezer",
            "discord_nitro",
            "discovery_plus",
            "disney_plus",
            "doordash_dashpass",
            "dropbox_us",
            "duolingo",
            "ea_play",
            "espn_plus",
            "evernote",
            "expressvpn",
            "figma",
            "fitbit_premium",
            "fubo_tv",
            "github_pro",
            "google_one",
            "google_play",
            "grammarly",
            "headspace",
            "hellofresh",
            "hinge",
            "hulu",
            "icloud_plus",
            "instacart_plus",
            "keeper",
            "kindle_unlimited",
            "lastpass",
            "linkedin_premium",
            "masterclass",
            "max",
            "microsoft_365",
            "midjourney",
            "mlb_tv",
            "myfitnesspal_premium",
            "netflix",
            "new_york_times",
            "nfl_plus",
            "nintendo_switch_online",
            "noom",
            "nordvpn",
            "notion",
            "paramount_plus",
            "patreon",
            "peacock",
            "peloton",
            "playstation_plus",
            "proton",
            "reddit_premium",
            "ring_protect",
            "roblox_premium",
            "scribd",
            "shutterstock",
            "siriusxm",
            "slack",
            "sling_tv",
            "snapchat_plus",
            "soundcloud_go",
            "spotify",
            "squarespace",
            "starz",
            "strava",
            "substack",
            "surfshark",
            "telegram_premium",
            "tidal",
            "tinder",
            "todoist",
            "twitch",
            "uber_one",
            "ubisoft_plus",
            "wall_street_journal",
            "walmart_plus",
            "washington_post",
            "weightwatchers",
            "wix",
            "x_premium",
            "xbox_game_pass",
            "youtube_premium",
            "youtube_tv",
            "zoom"
          ]
        },
        "days_since_purchase": {
          "type": "number",
          "required": true,
          "minimum": 0
        },
        "region": {
          "type": "string",
          "required": true,
          "enum": [
            "US"
          ]
        },
        "plan": {
          "type": "string",
          "required": true,
          "enum": [
            "individual"
          ]
        }
      },
      "outputs": {
        "verdict": {
          "enum": [
            "ALLOWED",
            "DENIED",
            "UNKNOWN"
          ]
        },
        "code": {
          "enum": [
            "WITHIN_WINDOW",
            "OUTSIDE_WINDOW",
            "NO_REFUNDS",
            "UNSUPPORTED_VENDOR",
            "NON_US_REGION",
            "NON_INDIVIDUAL_PLAN"
          ]
        },
        "rulebook_result": {
          "type": "object",
          "description": "Direct Rulebook v1 result with deterministic outcome, rulebook lineage, evidence-bound input hash, and signed rulebook attestation."
        }
      }
    },
    {
      "name": "cancel.decide.fyi",
      "type": "cancellation_penalty_notary",
      "description": "Cancellation penalty checker backed by direct declarative Rulebook v1 evaluation. Returns FREE_CANCEL, PENALTY, or LOCKED based on vendor cancellation terms.",
      "endpoint": {
        "method": "POST",
        "url": "https://cancel.decide.fyi/api/v1/cancel/penalty"
      },
      "mcp_endpoint": {
        "method": "POST",
        "url": "https://cancel.decide.fyi/api/mcp",
        "protocol": "JSON-RPC 2.0 (MCP)",
        "tool_name": "cancellation_penalty"
      },
      "inputs": {
        "vendor": {
          "type": "string",
          "required": true,
          "enum": [
            "1password",
            "adobe",
            "amazon_music_unlimited",
            "amazon_prime",
            "amc_plus",
            "apple_app_store",
            "apple_arcade",
            "apple_music",
            "apple_tv_plus",
            "audible",
            "bitwarden",
            "britbox",
            "bumble",
            "calm",
            "canva",
            "chatgpt_plus",
            "claude_pro",
            "coursera_plus",
            "crunchyroll",
            "dashlane",
            "deezer",
            "discord_nitro",
            "discovery_plus",
            "disney_plus",
            "doordash_dashpass",
            "dropbox_us",
            "duolingo",
            "ea_play",
            "espn_plus",
            "evernote",
            "expressvpn",
            "figma",
            "fitbit_premium",
            "fubo_tv",
            "github_pro",
            "google_one",
            "google_play",
            "grammarly",
            "headspace",
            "hellofresh",
            "hinge",
            "hulu",
            "icloud_plus",
            "instacart_plus",
            "keeper",
            "kindle_unlimited",
            "lastpass",
            "linkedin_premium",
            "masterclass",
            "max",
            "microsoft_365",
            "midjourney",
            "mlb_tv",
            "myfitnesspal_premium",
            "netflix",
            "new_york_times",
            "nfl_plus",
            "nintendo_switch_online",
            "noom",
            "nordvpn",
            "notion",
            "paramount_plus",
            "patreon",
            "peacock",
            "peloton",
            "playstation_plus",
            "proton",
            "reddit_premium",
            "ring_protect",
            "roblox_premium",
            "scribd",
            "shutterstock",
            "siriusxm",
            "slack",
            "sling_tv",
            "snapchat_plus",
            "soundcloud_go",
            "spotify",
            "squarespace",
            "starz",
            "strava",
            "substack",
            "surfshark",
            "telegram_premium",
            "tidal",
            "tinder",
            "todoist",
            "twitch",
            "uber_one",
            "ubisoft_plus",
            "wall_street_journal",
            "walmart_plus",
            "washington_post",
            "weightwatchers",
            "wix",
            "x_premium",
            "xbox_game_pass",
            "youtube_premium",
            "youtube_tv",
            "zoom"
          ]
        },
        "region": {
          "type": "string",
          "required": true,
          "enum": [
            "US"
          ]
        },
        "plan": {
          "type": "string",
          "required": true,
          "enum": [
            "individual"
          ]
        }
      },
      "outputs": {
        "verdict": {
          "enum": [
            "FREE_CANCEL",
            "PENALTY",
            "LOCKED",
            "UNKNOWN"
          ]
        },
        "code": {
          "enum": [
            "NO_PENALTY",
            "EARLY_TERMINATION_FEE",
            "CONTRACT_LOCKED",
            "UNSUPPORTED_VENDOR",
            "NON_US_REGION",
            "NON_INDIVIDUAL_PLAN"
          ]
        },
        "rulebook_result": {
          "type": "object",
          "description": "Direct Rulebook v1 result with deterministic outcome, rulebook lineage, evidence-bound input hash, and signed rulebook attestation."
        }
      },
      "runtime_contract": {
        "evaluation": "direct_rulebook_v1",
        "trusted_adapter_required": false,
        "rest_rulebook_result_field": "rulebook_result",
        "mcp_rulebook_result_field": "structuredContent.rulebook_result",
        "attestation": "rulebook_attestation_signature_v1"
      }
    },
    {
      "name": "return.decide.fyi",
      "type": "return_eligibility_notary",
      "description": "Return eligibility checker backed by direct declarative Rulebook v1 evaluation. Returns RETURNABLE, EXPIRED, or NON_RETURNABLE with return type and method.",
      "endpoint": {
        "method": "POST",
        "url": "https://return.decide.fyi/api/v1/return/eligibility"
      },
      "mcp_endpoint": {
        "method": "POST",
        "url": "https://return.decide.fyi/api/mcp",
        "protocol": "JSON-RPC 2.0 (MCP)",
        "tool_name": "return_eligibility"
      },
      "inputs": {
        "vendor": {
          "type": "string",
          "required": true,
          "enum": [
            "1password",
            "adobe",
            "amazon_music_unlimited",
            "amazon_prime",
            "amc_plus",
            "apple_app_store",
            "apple_arcade",
            "apple_music",
            "apple_tv_plus",
            "audible",
            "bitwarden",
            "britbox",
            "bumble",
            "calm",
            "canva",
            "chatgpt_plus",
            "claude_pro",
            "coursera_plus",
            "crunchyroll",
            "dashlane",
            "deezer",
            "discord_nitro",
            "discovery_plus",
            "disney_plus",
            "doordash_dashpass",
            "dropbox_us",
            "duolingo",
            "ea_play",
            "espn_plus",
            "evernote",
            "expressvpn",
            "figma",
            "fitbit_premium",
            "fubo_tv",
            "github_pro",
            "google_one",
            "google_play",
            "grammarly",
            "headspace",
            "hellofresh",
            "hinge",
            "hulu",
            "icloud_plus",
            "instacart_plus",
            "keeper",
            "kindle_unlimited",
            "lastpass",
            "linkedin_premium",
            "masterclass",
            "max",
            "microsoft_365",
            "midjourney",
            "mlb_tv",
            "myfitnesspal_premium",
            "netflix",
            "new_york_times",
            "nfl_plus",
            "nintendo_switch_online",
            "noom",
            "nordvpn",
            "notion",
            "paramount_plus",
            "patreon",
            "peacock",
            "peloton",
            "playstation_plus",
            "proton",
            "reddit_premium",
            "ring_protect",
            "roblox_premium",
            "scribd",
            "shutterstock",
            "siriusxm",
            "slack",
            "sling_tv",
            "snapchat_plus",
            "soundcloud_go",
            "spotify",
            "squarespace",
            "starz",
            "strava",
            "substack",
            "surfshark",
            "telegram_premium",
            "tidal",
            "tinder",
            "todoist",
            "twitch",
            "uber_one",
            "ubisoft_plus",
            "wall_street_journal",
            "walmart_plus",
            "washington_post",
            "weightwatchers",
            "wix",
            "x_premium",
            "xbox_game_pass",
            "youtube_premium",
            "youtube_tv",
            "zoom"
          ]
        },
        "days_since_purchase": {
          "type": "number",
          "required": true,
          "minimum": 0
        },
        "region": {
          "type": "string",
          "required": true,
          "enum": [
            "US"
          ]
        },
        "plan": {
          "type": "string",
          "required": true,
          "enum": [
            "individual"
          ]
        }
      },
      "outputs": {
        "verdict": {
          "enum": [
            "RETURNABLE",
            "EXPIRED",
            "NON_RETURNABLE",
            "UNKNOWN"
          ]
        },
        "code": {
          "enum": [
            "FULL_RETURN",
            "PRORATED_RETURN",
            "CREDIT_RETURN",
            "OUTSIDE_WINDOW",
            "NO_RETURNS",
            "UNSUPPORTED_VENDOR",
            "NON_US_REGION",
            "NON_INDIVIDUAL_PLAN"
          ]
        },
        "rulebook_result": {
          "type": "object",
          "description": "Direct Rulebook v1 result with deterministic outcome, rulebook lineage, evidence-bound input hash, and signed rulebook attestation."
        }
      },
      "runtime_contract": {
        "evaluation": "direct_rulebook_v1",
        "trusted_adapter_required": false,
        "rest_rulebook_result_field": "rulebook_result",
        "mcp_rulebook_result_field": "structuredContent.rulebook_result",
        "attestation": "rulebook_attestation_signature_v1"
      }
    },
    {
      "name": "trial.decide.fyi",
      "type": "trial_terms_notary",
      "description": "Free trial terms checker backed by direct declarative Rulebook v1 evaluation. Returns TRIAL_AVAILABLE or NO_TRIAL with trial length, card requirement, and auto-conversion status.",
      "endpoint": {
        "method": "POST",
        "url": "https://trial.decide.fyi/api/v1/trial/terms"
      },
      "mcp_endpoint": {
        "method": "POST",
        "url": "https://trial.decide.fyi/api/mcp",
        "protocol": "JSON-RPC 2.0 (MCP)",
        "tool_name": "trial_terms"
      },
      "inputs": {
        "vendor": {
          "type": "string",
          "required": true,
          "enum": [
            "1password",
            "adobe",
            "amazon_music_unlimited",
            "amazon_prime",
            "amc_plus",
            "apple_app_store",
            "apple_arcade",
            "apple_music",
            "apple_tv_plus",
            "audible",
            "bitwarden",
            "britbox",
            "bumble",
            "calm",
            "canva",
            "chatgpt_plus",
            "claude_pro",
            "coursera_plus",
            "crunchyroll",
            "dashlane",
            "deezer",
            "discord_nitro",
            "discovery_plus",
            "disney_plus",
            "doordash_dashpass",
            "dropbox_us",
            "duolingo",
            "ea_play",
            "espn_plus",
            "evernote",
            "expressvpn",
            "figma",
            "fitbit_premium",
            "fubo_tv",
            "github_pro",
            "google_one",
            "google_play",
            "grammarly",
            "headspace",
            "hellofresh",
            "hinge",
            "hulu",
            "icloud_plus",
            "instacart_plus",
            "keeper",
            "kindle_unlimited",
            "lastpass",
            "linkedin_premium",
            "masterclass",
            "max",
            "microsoft_365",
            "midjourney",
            "mlb_tv",
            "myfitnesspal_premium",
            "netflix",
            "new_york_times",
            "nfl_plus",
            "nintendo_switch_online",
            "noom",
            "nordvpn",
            "notion",
            "paramount_plus",
            "patreon",
            "peacock",
            "peloton",
            "playstation_plus",
            "proton",
            "reddit_premium",
            "ring_protect",
            "roblox_premium",
            "scribd",
            "shutterstock",
            "siriusxm",
            "slack",
            "sling_tv",
            "snapchat_plus",
            "soundcloud_go",
            "spotify",
            "squarespace",
            "starz",
            "strava",
            "substack",
            "surfshark",
            "telegram_premium",
            "tidal",
            "tinder",
            "todoist",
            "twitch",
            "uber_one",
            "ubisoft_plus",
            "wall_street_journal",
            "walmart_plus",
            "washington_post",
            "weightwatchers",
            "wix",
            "x_premium",
            "xbox_game_pass",
            "youtube_premium",
            "youtube_tv",
            "zoom"
          ]
        },
        "region": {
          "type": "string",
          "required": true,
          "enum": [
            "US"
          ]
        },
        "plan": {
          "type": "string",
          "required": true,
          "enum": [
            "individual"
          ]
        }
      },
      "outputs": {
        "verdict": {
          "enum": [
            "TRIAL_AVAILABLE",
            "NO_TRIAL",
            "UNKNOWN"
          ]
        },
        "code": {
          "enum": [
            "AUTO_CONVERTS",
            "NO_AUTO_CONVERT",
            "TRIAL_NOT_AVAILABLE",
            "UNSUPPORTED_VENDOR",
            "NON_US_REGION",
            "NON_INDIVIDUAL_PLAN"
          ]
        },
        "rulebook_result": {
          "type": "object",
          "description": "Direct Rulebook v1 result with deterministic outcome, rulebook lineage, evidence-bound input hash, and signed rulebook attestation."
        }
      },
      "runtime_contract": {
        "evaluation": "direct_rulebook_v1",
        "trusted_adapter_required": false,
        "rest_rulebook_result_field": "rulebook_result",
        "mcp_rulebook_result_field": "structuredContent.rulebook_result",
        "attestation": "rulebook_attestation_signature_v1"
      }
    }
  ],
  "execution": {
    "stateless": true,
    "side_effects": "none"
  },
  "auth": {
    "type": "mixed",
    "decision_api": "Production /api/decide calls require x-api-key.",
    "reference_applications": "Public reference application endpoints use public IP limits.",
    "reference_rate_limit": "100 requests/minute per IP"
  }
}
