Skip to main content

Multi-language Contract Validation

Goal

Ensure all language-specific implementations enforce the same contract and gate semantics.

Pattern

  1. Store canonical schemas in templates/schemas.
  2. Validate examples in each language CI pipeline.
  3. Reject builds on schema mismatch.

Suggested validators

  • TypeScript: AJV-based validation
  • Python: jsonschema validation
  • Go: JSON schema validator package
  • Java: networknt/json-schema-validator or equivalent

Required scenarios

  • Valid contract should pass in all languages.
  • Missing required_gates should fail in all languages.
  • Invalid decision enum should fail in all languages.