Overview
spec-kitty-events is the contract package and the home of the events-domain services:
the Java services and their OpenAPI contracts live here under service/ and contracts/,
imported from core with their history
(ADR-0002). The package itself has five
parts, and everything else builds on them. Read this page first, then the page for the part
you care about; for the services, start at the services hub and
running the Mission Status Read API.
The five parts
- The envelope.
Eventis the single top-level envelope every family rides in — stable context fields carrying an opaquepayload. See the envelope. - Payload families. One module per family defines its typed payload models and its event-type string constants. See Event families.
- Reducers. Pure, deterministic functions that fold an ordered stream into a frozen state snapshot. They all share one pipeline — see ordering and reduction.
- The strict profile. The opt-in, fail-closed envelope gate for the durable journal and ingress. See the strict profile.
- The conformance corpus. Valid/invalid payloads, replay streams and golden reducer outputs, shipped in the package so every consumer validates against one corpus.
The producer-consumer flow
The Spec Kitty CLI and runtime are the single producer; everything else is a consumer. The contract is the only coupling between them.
A producer builds an Event, fills the family payload, and emits it on one of three
transports. A consumer validates the payload (validate_event),
optionally gates the envelope fail-closed (validate_strict_envelope), and folds the stream
with the family reducer. Because the contract carries no behaviour, consumers stay
orthogonal to the CLI.
The services
Two deployables ship from this repository on the service-v* line
(ADR-0003,
ADR-0004):
- the read service (
mission-status-api, Gradle module:mission-status-apirooted atservice/): the loopback read-only Mission Status API — see running the service; - the write service (
command-cli, atservice/command-cli/): the canonical event writer core’s launcher starts per git common dir — see service protocol and releases.
Their OpenAPI contracts live under contracts/ (mission-status, mission-write) and are
published in this site’s services hub.
What this package deliberately does not own
- No team routing. Identity on the envelope is build-scoped (
build_id,node_id); private-versus-team routing, sharing and approval are host-product policy. - No transport or network. The package defines shapes and folds; producing and shipping events is the CLI’s and the host’s job.
- No single current-version restatement. The authoritative version lives once in
COMPATIBILITY.md; see versioning & compatibility.
See also
- Ordering and reduction — how a stream becomes deterministic state.
- Durability and the relay — which events are durable and which are volatile.