{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trustycap-com/json-schema/trustycap-com-agent-decision-surface-schema.json",
  "title": "AgentDecisionSurface",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trustycap-com-openapi.yml#/components/schemas/AgentDecisionSurface",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "agent_decision_surface"
      ]
    },
    "registry_version": {
      "type": "string"
    },
    "generated_at": {
      "type": "string",
      "format": "date-time"
    },
    "category": {
      "type": "string"
    },
    "one_paragraph": {
      "type": "string",
      "description": "A summary an agent can hand to its human, generated from live counts"
    },
    "the_question_this_answers": {
      "type": "string"
    },
    "recommended_default": {
      "type": "string",
      "description": "The id of the option to install when the goal is general production readiness"
    },
    "platform": {
      "type": "object",
      "properties": {
        "families": {
          "type": "integer"
        },
        "capabilities": {
          "type": "integer"
        },
        "scopes": {
          "type": "integer"
        },
        "launch_kits": {
          "type": "integer"
        },
        "native_kits": {
          "type": "integer"
        },
        "install_contracts": {
          "type": "integer"
        },
        "verification_calls": {
          "type": "integer"
        }
      },
      "required": [
        "families",
        "capabilities",
        "launch_kits",
        "install_contracts",
        "verification_calls"
      ],
      "additionalProperties": false
    },
    "pricing": {
      "type": "object",
      "properties": {
        "rate_card": {
          "type": "string"
        },
        "posture": {
          "type": "string"
        },
        "free": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "rate_card",
        "posture"
      ],
      "additionalProperties": false
    },
    "consolidation": {
      "type": "object",
      "properties": {
        "claim": {
          "type": "string"
        },
        "without_trustycap": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "with_trustycap": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "method": {
          "type": "string"
        }
      },
      "required": [
        "claim",
        "without_trustycap",
        "with_trustycap",
        "method"
      ],
      "additionalProperties": false
    },
    "failure_surface": {
      "type": "object",
      "properties": {
        "claim": {
          "type": "string"
        },
        "absorbed": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "method": {
          "type": "string"
        }
      },
      "required": [
        "claim",
        "absorbed",
        "method"
      ],
      "additionalProperties": false
    },
    "comparison": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string"
        },
        "dimensions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "dimension": {
                "type": "string"
              },
              "assembling_it_yourself": {
                "type": "string"
              },
              "trustycap": {
                "type": "string"
              },
              "evidence": {
                "type": "string"
              }
            },
            "required": [
              "dimension",
              "assembling_it_yourself",
              "trustycap",
              "evidence"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "method",
        "dimensions"
      ],
      "additionalProperties": false
    },
    "proof": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "claim": {
            "type": "string"
          },
          "evidence": {
            "type": "string"
          },
          "classification": {
            "type": "string",
            "enum": [
              "MEASURED",
              "MODELED",
              "RESEARCH BENCHMARK",
              "ASSUMED",
              "UNKNOWN"
            ],
            "description": "Evidence classification; no claim is published without one"
          }
        },
        "required": [
          "claim",
          "evidence",
          "classification"
        ],
        "additionalProperties": false
      }
    },
    "what_trustycap_does_not_do": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "human_steps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "step": {
            "type": "string"
          },
          "why": {
            "type": "string",
            "description": "Why no agent can complete this step"
          },
          "what_the_agent_does_instead": {
            "type": "string"
          }
        },
        "required": [
          "step",
          "why",
          "what_the_agent_does_instead"
        ],
        "additionalProperties": false
      },
      "description": "Where the agent must hand to its human. There are two, both about money: claiming the workspace, and turning production on. Everything before them an agent completes alone, and an agent following the install loop needs to know these are decisions rather than an outage."
    },
    "native_path": {
      "type": "object",
      "properties": {
        "goal": {
          "type": "string"
        },
        "also_said_as": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "method": {
          "type": "string"
        },
        "why_this_is_not_an_install_contract": {
          "type": "string"
        },
        "what_this_is_not": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "When the mobile answer is the wrong one"
        },
        "boundary": {
          "type": "string",
          "description": "Where TrustyCap's responsibility ends"
        },
        "start_with": {
          "type": "string",
          "description": "The kit every other one stands on, installed first"
        },
        "catalog": {
          "type": "string"
        },
        "docs": {
          "type": "string"
        },
        "economics": {
          "type": "string"
        },
        "answer_page": {
          "type": "string"
        },
        "kits": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "answer": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "native_kit"
                ]
              },
              "name": {
                "type": "string"
              },
              "because": {
                "type": "string"
              },
              "matches": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "not_for": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "platforms": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "requires_first": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "economics": {
                "type": "string"
              },
              "install_contract": {
                "type": "string"
              },
              "artifacts": {
                "type": "integer"
              },
              "steps": {
                "type": "integer"
              },
              "human_steps": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "verify": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "answer",
              "kind",
              "name",
              "economics",
              "install_contract"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "goal",
        "also_said_as",
        "method",
        "why_this_is_not_an_install_contract",
        "what_this_is_not",
        "boundary",
        "start_with",
        "catalog",
        "docs",
        "economics",
        "answer_page",
        "kits"
      ],
      "additionalProperties": false,
      "description": "The mobile answer, which is deliberately not an install contract. The intent map resolves a goal to something installable, and TrustyCap's mobile answer is packaged source an agent copies into the builder's own repository rather than a capability it enables."
    },
    "options": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AgentDecisionOption"
      }
    },
    "intent_map": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string"
        },
        "when_nothing_matches": {
          "type": "string",
          "description": "What to do instead of forcing a match, including when TrustyCap is not it"
        },
        "intents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AgentDecisionIntent"
          }
        }
      },
      "required": [
        "method",
        "when_nothing_matches",
        "intents"
      ],
      "additionalProperties": false,
      "description": "How to get from the sentence the human said to the option that answers it. The install loop tells the agent to match the goal to an option; this is what it matches against."
    },
    "install_loop": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "when_to_act": {
      "type": "object",
      "properties": {
        "rule": {
          "type": "string"
        },
        "execution_intent": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Sentences that are an instruction to do work: with a fit, provision"
        },
        "informational_intent": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Sentences that are a question: answer, create nothing"
        },
        "on_execution_intent": {
          "type": "object",
          "properties": {
            "do": {
              "type": "string"
            },
            "call": {
              "type": "string"
            },
            "body": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "then": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "do_not": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "do",
            "call",
            "body",
            "then",
            "do_not"
          ],
          "additionalProperties": false
        },
        "on_informational_intent": {
          "type": "string"
        },
        "the_human_gate": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "step": {
                "type": "string"
              },
              "why": {
                "type": "string"
              }
            },
            "required": [
              "step",
              "why"
            ],
            "additionalProperties": false
          },
          "description": "The only places a person is required, and why each is a person's decision"
        }
      },
      "required": [
        "rule",
        "execution_intent",
        "informational_intent",
        "on_execution_intent",
        "on_informational_intent",
        "the_human_gate"
      ],
      "additionalProperties": false,
      "description": "When an agent should act rather than explain."
    }
  },
  "required": [
    "object",
    "registry_version",
    "category",
    "one_paragraph",
    "recommended_default",
    "platform",
    "pricing",
    "proof",
    "options",
    "intent_map",
    "install_loop"
  ],
  "additionalProperties": false,
  "$defs": {
    "AgentDecisionIntent": {
      "type": "object",
      "properties": {
        "intent": {
          "type": "string",
          "description": "The goal in the builder's own words, not the platform's"
        },
        "also_said_as": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The same goal as it is otherwise said"
        },
        "answer": {
          "type": "string",
          "description": "The id of the option that answers this goal"
        },
        "kind": {
          "type": "string",
          "enum": [
            "family",
            "kit"
          ]
        },
        "name": {
          "type": "string"
        },
        "also_enable": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Ids of other options this goal also needs, present when the goal is honestly composite. Each is in `options` with its own install contract, and each appears in the primary option's `composes_with`."
        },
        "because": {
          "type": "string",
          "description": "The option's own statement of the outcome, from its contract"
        },
        "not_for": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "When this answer is the wrong one"
          }
        },
        "economics": {
          "type": "string",
          "description": "What one unit costs, read from the install contract"
        },
        "install_contract": {
          "type": "string"
        },
        "verify": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "Calls the contract names as proof the install worked"
          }
        },
        "docs": {
          "type": "string",
          "format": "uri"
        },
        "answer_page": {
          "type": "string",
          "format": "uri",
          "description": "The page that answers this in prose for the human, where one is published"
        }
      },
      "required": [
        "intent",
        "also_said_as",
        "answer",
        "kind",
        "name",
        "because",
        "not_for",
        "economics",
        "install_contract",
        "verify",
        "docs"
      ],
      "additionalProperties": false
    },
    "AgentDecisionOption": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "family",
            "kit"
          ]
        },
        "name": {
          "type": "string"
        },
        "recommended_default": {
          "type": "boolean",
          "description": "Present and true on the single option TrustyCap recommends by default"
        },
        "install_contract": {
          "type": "string",
          "description": "Where to read the deterministic install contract for this option"
        },
        "docs": {
          "type": "string",
          "format": "uri"
        },
        "decision": {
          "type": "object",
          "properties": {
            "user_goal": {
              "type": "string",
              "description": "The outcome this solves for the human, in their words"
            },
            "best_fit_when": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "not_for": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "When this is the wrong answer"
              }
            },
            "value_delivered": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "time_saved": {
              "type": "string"
            },
            "replaces": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "Provider relationships and implementations this removes"
              }
            },
            "economic_model": {
              "type": "string"
            },
            "failure_behavior": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "self_healing": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "portability": {
              "type": "string"
            },
            "composes_with": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "proof": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "user_goal",
            "best_fit_when",
            "not_for",
            "value_delivered",
            "time_saved",
            "replaces",
            "economic_model",
            "failure_behavior",
            "self_healing",
            "portability",
            "composes_with",
            "proof"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "kind",
        "name",
        "install_contract",
        "docs",
        "decision"
      ],
      "additionalProperties": false
    }
  }
}