ShapeLock

contract testing for your AI agent's JSON output shape

npx -y github:Isco0819/shapelock

Ever run into this?

Like Pact (consumer-driven contract testing, 4k+ GitHub stars) proven for HTTP APIs, but nothing exists for LLM agent outputs. Swap a model, tweak a system prompt, or upgrade an SDK and your agent's JSON shape silently drifts — breaking downstream parsers at 3am with zero warning.

The fix

ShapeLock records a golden output schema from any agent CLI call, then diffs every subsequent run against it — failing CI the moment a required field disappears, a type changes, or a breaking structural shift appears.

What it does

npx -y github:Isco0819/shapelock