tsc, but for specifications.
Specter validates specification files the way a type checker validates source code: parse, resolve dependencies, type-check constraints, measure coverage, gate CI.
The pipeline
Five stages, each catching a different class of error
Specter treats .spec.yaml files as first-class artifacts in a dependency graph: authoritative, testable contracts the codebase is derived from.
specter watchspecter diffspecter doctorspecter explainspecter reversespecter initWhy it exists
When the AI writes the code, how do you know it built what you meant?
Natural-language prompts are ambiguous, and an AI fills the gaps silently and confidently. The code runs; the intent quietly drifted. Spec-driven development makes the contract explicit and machine-checkable:
“Every module has a spec. Every spec has acceptance criteria. Every criterion has a test. A compiler gates CI to enforce coverage. Here is the tool. Read it yourself.”
One pipeline, any contract
It validates the shape, not the category
A .spec.yaml can describe runtime behavior, data invariants, an API schema, an architecture rule, or a security policy. Specter checks that the spec is well-formed, that its references resolve, and that its acceptance criteria are covered, whatever the spec is about.
The same checks run in your editor and in CI: a VS Code extension surfaces coverage gaps and schema diagnostics inline, and specter sync is the merge gate.
Specter also validates Kensa's and OpenWatch's specs. The compiler that enforces coverage across every Hanalyx product is held to the same bar it enforces, and you can run it yourself to check.
For AI coding agents
As AI agents write more production code, the question shifts from “can the AI write it?” to “can anyone verify the AI wrote it correctly?” Specter is that verification layer.
FAQ
Specter FAQ
What is Specter?
Specter is a compiler for specification files. It parses, resolves, and type-checks .spec.yaml files, measures coverage, and gates CI, the way a type checker validates code.
What is Spec-Driven Development?
Spec-Driven Development is a methodology where structured specification files are the single source of truth for every feature. The spec defines context, objective, constraints, and acceptance criteria before code is written; when the spec and the code disagree, the spec is right.
How does Specter fit into CI?
Specter runs in the pipeline (parse, resolve, check, coverage, sync) and can fail the build when specs are invalid or coverage falls below a threshold, so specifications stay enforced.
How is Specter different from OpenAPI?
OpenAPI describes HTTP API surfaces. Specter describes component contracts of any kind, such as runtime behavior, data invariants, security policy, or schema, with constraints and acceptance criteria, and it models dependencies between specs. The two are complementary.