How StateAnchor works
A deterministic desired-state compiler with observational drift detection and a conservative policy engine. Not a generator. Not a pipeline. Infrastructure.
Desired state in. Artifacts out. Nothing else.
stateanchor.yaml
Lives in Git. Single authoritative source of truth for your API contract.
ERR . WARN . INFO
Every change classified before anything deploys. Breaking changes blocked automatically.
SDKs . MCP . Docs
TypeScript, Python, Go SDKs. MCP server. OpenAPI 3.1. All regenerated on every push from the spec.
One authoritative source. Nothing more.
stateanchor.yaml lives in your repo. It is the only authoritative source. Nothing writes back to it automatically. Not scanners. Not runtime probes. Not the gate. The spec is declared. Everything else is derived.
Observe. Never overwrite.
Source scanners and optional runtime probes detect what your live API actually does. This plane is observational only. It surfaces warnings. It informs the gate. It never overwrites the spec and never becomes authoritative.
Everything else is an output.
SDKs, your MCP server, OpenAPI 3.1 docs -- all derived from the spec. Never the source of truth. When the spec changes, they rebuild. They are consequences, not causes.
Conservative by design
Every change is sorted into one of three lanes. Each lane has a fixed behavior that never changes. ERR always blocks. WARN blocks above a configurable threshold. INFO always passes. No composite scores. No tuning until deploys stop breaking. The lane drives the decision.
Always blocks
Endpoint removed. Required field deleted. Type changed. Auth scheme changed. No threshold. No override without a scoped exception.
Examples: endpoint removed, required field deleted, type changed, auth scheme changed
Blocks above threshold
Optional field removed. Deprecation violated. Response shape changed. Configurable enforcement per team.
Examples: optional field removed, deprecation violated, response field made required
Always passes
New endpoint added. Optional field extended. Description changed. Additive changes never block your pipeline.
Examples: new endpoint added, optional field extended, description changed