pub fn validate_output(schema: &Value, content: &str) -> ArgValidationExpand description
Validate a submitted final output against the schema its blueprint declared.
Shape, not well-formedness. Whether the answer parses as the format it claims
is format::check’s job, and runs before this. This answers the narrower
question of whether the parsed document has the fields the author asked for,
and runs only when they supplied a schema to ask with.
content is the agent’s submission verbatim. Because a schema means the
author wants JSON, content that will not parse as JSON is a violation in its
own right, reported the same way so the model can correct itself on the next
turn.