todo2code

Ticket 009: Canonical structured-response contracts

Goal and scope

Generate the OpenRouter JSON Schema and the TypeScript runtime parser from one canonical response contract at every production LLM boundary. Provider output must fail closed instead of being silently coerced into a different intent.

Executable implementation belongs under src/ and tests under test/. This ticket directory contains only governance and evidence.

Acceptance criteria

Participants

Evidence

Result

Seven production OpenRouter boundaries now use chatStructuredWithMetadata; the repository gate found zero raw JSON calls outside the client. Provider schema and runtime parsing share one typed contract, while grounding remains a separate evidence check. The implementation was published as d0fc143.