Skip to content

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

Envelope

Event (models.py)

Payload families

typed Pydantic models + event-type constants

Reducers

pure fold: stream -> frozen state

Strict profile

validate_strict_envelope (journal/v1)

Conformance corpus

fixtures · replay streams · golden outputs

  1. The envelope. Event is the single top-level envelope every family rides in — stable context fields carrying an opaque payload. See the envelope.
  2. Payload families. One module per family defines its typed payload models and its event-type string constants. See Event families.
  3. Reducers. Pure, deterministic functions that fold an ordered stream into a frozen state snapshot. They all share one pipeline — see ordering and reduction.
  4. The strict profile. The opt-in, fail-closed envelope gate for the durable journal and ingress. See the strict profile.
  5. 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.

spec-kitty-events

emit

CLI / runtime

(producer)

envelope

payload

validate / strict

reduce

consumer

dossier · dashboard · ingress

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-api rooted at service/): the loopback read-only Mission Status API — see running the service;
  • the write service (command-cli, at service/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