spec-kitty-events
Package Version: 11.5.0 | Envelope Schema Version: 3.0.0 | Python: >=3.10
The event contracts of Spec Kitty: the canonical vocabulary the Spec Kitty CLI and runtime emit as a Mission moves through its lifecycle — and the home of the events-domain services that read and write those events. This repository is the event-contract surface of the Build Kitty product line — the free CLI and its extension surface.
spec-kitty-events owns the CloudEvents-shaped envelope, the payload schemas for
every event family, the pure reducers that fold an event stream into state, the packaged
conformance fixtures, and the compatibility policy. It is a small, dependency-light
Python package with no runtime dependency on the CLI, so any system — a dashboard, an
analytics job, the Team Kitty dossier, a SaaS ingress — can validate, order and reduce
Spec Kitty events orthogonally, without coupling to the CLI's internals.
flowchart LR
cli["spec-kitty CLI / runtime<br/>(producer)"]
subgraph repo["This repository — two release lines"]
pkg["Contract package<br/>(PyPI v*)"]
contracts["contracts/<br/>OpenAPI bundles"]
read["mission-status-api<br/>read service"]
write["command-cli<br/>write service"]
end
log[("status.events.jsonl<br/>per-mission event log")]
dossier["Team Kitty dossier"]
dash["dashboards / analytics"]
ingress["SaaS ingress"]
cli -->|emits per the contract| log
contracts --> read
contracts --> write
write -->|appends — fail-closed<br/>until the write core lands| log
log -->|read| read
read -->|status over loopback HTTP| cli
pkg --> dossier
pkg --> dash
pkg --> ingress
What this package gives you
- One envelope.
Eventis the single top-level envelope every family rides in: a stable set of context fields (identity, ordering clock, project, schema version) carrying an opaque, per-familypayload. - Event families. Typed Pydantic payload models and event-type constants for mission lifecycle, work-package status, review and audit, runtime observation, collaboration, and semantics and analytics. See Event families.
- Deterministic reducers. Pure functions that fold an ordered event stream into a frozen state snapshot (mission state, work-package lanes, audit verdict, collaboration roster, …).
- A fail-closed strict profile.
validate_strict_envelope— an opt-in, deterministic gate (STRICT_PROFILE_ID = "journal/v1") for the durable journal and TeamSpace ingress. - Conformance fixtures. Valid/invalid payloads, replay streams and golden reducer outputs, shipped in the package so every consumer validates against one corpus.
Documentation
The documentation site follows the doc-kitty
convention and is published from main to
https://spec-kitty.github.io/spec-kitty-events/. Start at
docs/README.md:
- Context — what the package is and how it is produced and consumed.
- Event families — the families grouped by concern.
- API & Contracts — the envelope, the Python package, the lane vocabulary, the versioning policy and the strict profile.
- Service APIs — the read and write services and their
service-v*release line. - Architecture — the envelope design, ordering and reduction, the journal-versus-volatile durability split, and the services.
- Glossary · Decision Records · Guides · Changelog
The durable, governing contracts live in contracts/;
COMPATIBILITY.md is the public compatibility policy and the
authoritative version-and-compatibility reference.
Services
Two events-domain services (Java, under service/) live here and
ship on their own service-v* release line, versioned and released apart from the package
(ADR 0003,
ADR 0004). Both are loopback-only: they bind
127.0.0.1 and answer to no other address.
-
Read:
mission-status-api— a detached, read-only HTTP service that reads the Missions of one project directory and serves their status (GET /api/v1/project,GET /api/v1/missions, theGET /api/v1/eventschange stream and two artifact reads). No spec-kitty command starts it; run it yourself. From a checkout, after building the jar against the contract bundle (run from source):java -jar service/build/libs/mission-status-api.jar --mission-status.project-root=<project root> --mission-status.port=8787
How to run it from a release or from source: Running the Mission Status Read API; details in
service/README.md. -
Write:
command-cli— the canonical event writer the CLI's launcher starts, checks ready and drives per git common dir; it publishes its port and bearer token inendpoint.jsonfor the launcher alone. Until the write core lands (#160, #161) every write refuses fail-closed. From a checkout, after building the jar the same way (./gradlew :command-cli:bootJar):java -jar service/command-cli/build/libs/command-cli.jar serve --git-common-dir <absolute git common dir>
Details in
service/command-cli/README.mdand the write-service protocol.
Contracts and API reference
The normative contracts for both services live under contracts/
(contracts/mission-status,
contracts/mission-write); contracts/tools/bundle.py resolves
each module to a single self-contained OpenAPI file, and the docs site renders them with the
raw bundle and its sha256 alongside:
- mission-status API reference — the read contract, which is wider than the routes the service serves today (which routes).
- mission-write API reference — the write service's endpoints.
- Service APIs — the hub for both.
- Event envelope schema — the normative envelope the Python payloads ride in.
Installation
Pin a released version (a v<version> tag), not a mainline commit — a package version
is frozen only when it is tagged, so main may still move an unreleased version
(versioning policy).
From PyPI (pin an explicit version — see COMPATIBILITY.md for the
current release and what a major bump means):
pip install "spec-kitty-events==11.5.0"
# with conformance-validation support:
pip install "spec-kitty-events[conformance]==11.5.0"
With uv, install the exact versions pinned by the committed
uv.lock — what CI and make test-fast / make test-full resolve against:
uv sync --locked --extra dev --extra conformance
Quick start
Emit a canonical envelope
import uuid
from datetime import datetime, timezone
from spec_kitty_events import Event
event = Event(
event_id="01ARZ3NDEKTSV4RRFFQ69G5FAV",
event_type="WPStatusChanged",
aggregate_id="mission/WP01",
payload={
"mission_slug": "mission-001",
"wp_id": "WP01",
"from_lane": "planned",
"to_lane": "claimed",
"actor": "ci-bot",
"execution_mode": "worktree",
},
timestamp=datetime.now(timezone.utc),
build_id="build-2026-04-05",
node_id="runner-01",
lamport_clock=1,
project_uuid=uuid.uuid4(),
correlation_id="01ARZ3NDEKTSV4RRFFQ69G5FAV",
schema_version="3.0.0",
)
Validate a payload against the canonical contract
from spec_kitty_events.conformance import validate_event
result = validate_event(event.payload, "WPStatusChanged")
assert result.valid
Gate a full envelope fail-closed (durable journal / ingress)
from spec_kitty_events.strict import validate_strict_envelope
errors = validate_strict_envelope(event.to_dict())
assert not errors
More, including reducing a stream into state, is in API & Contracts.
Versioning: two release lines
The repository releases on two independent lines:
- The package line —
v*tags on PyPI — carries the Python contract package (current version at the top of this file). Two version numbers move independently on it: the package version (contract behaviour) and the on-wire envelopeschema_version(3.0.0, held stable across package majors). - The service line —
service-v*tags, current releaseservice-v0.1.0-rc.2— ships the events-domain services as attested native binaries and JVM jars with the contract bundles attached. See service protocol and releases.
A change is major if it flips the accept/reject boundary for any producer or consumer. The
rules and the required artifacts on a bump are in
contracts/versioning-and-compatibility.md.
Development
make test-fast # implementer blast-radius baseline
make test-full # whole suite with coverage (CI agent)
uv run pytest --pyargs spec_kitty_events.conformance # packaged conformance gate — every PR
ruff check . && ruff format --check . # lint
make test-java # the Java binding check alone (JDK 25, provisioned if absent)
make test-gradle # the whole Gradle build — ./gradlew verifyAll over the binding, the services and the contracts
The Gradle build is ./gradlew verifyAll (run through scripts/verify_all.sh,
which stages the contract bundle); it needs JDK 25, which
scripts/ensure_jdk25.sh finds or provisions.
See AGENTS.md for the programme process and
docs/guides/contributing.md.
License
MIT © 2026 Spec Kitty, Inc. and contributors.
Metadata
Release files for spec-kitty-events 11.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spec_kitty_events-11.5.0.tar.gz | 877.2 kB | With provenance | Details for spec_kitty_events-11.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spec_kitty_events-11.5.0-py3-none-any.whl | Python 3 | none | any | Details for spec_kitty_events-11.5.0-py3-none-any.whl |
Total release size: 2.8 MB
Release files / spec_kitty_events-11.5.0.tar.gz
| Download URL | spec_kitty_events-11.5.0.tar.gz |
|---|---|
| Size | 877.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1b198283365bce10ac8c2c93a3b7c540c018dcfdba424ec2a9b8a4f60801104
|
|
BLAKE2b-256 checksum How to use checksums |
d42bc2df34a1df0c49f10a88b152cbb7704719d8c144f45298426944ca3b9414
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / spec_kitty_events-11.5.0-py3-none-any.whl
| Download URL | spec_kitty_events-11.5.0-py3-none-any.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51a8e8fba4c4aa3f5de974494b16539dc85b1096f2fa0870949a8e2d90324b42
|
|
BLAKE2b-256 checksum How to use checksums |
49c2ae0ee4b539022fcd25e4ce106479aec5408232126841ea158fee773c2806
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for spec-kitty-events 11.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for spec_kitty_events-11.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.