Skip to main content

Build Kitty

spec-kitty-events

Package Version: 11.0.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. 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.

spec-kitty CLI / runtime   ──emit──▶   status.events.jsonl / relay / journal
      (producer)                                   │
                                                   ▼
                                       spec-kitty-events contracts
                              (envelope · payloads · reducers · strict profile)
                                                   │
          ┌────────────────────────┬───────────────┴───────────────┐
          ▼                        ▼                                ▼
   Team Kitty dossier        dashboards / analytics            SaaS ingress
        (consumer)               (consumer)                     (consumer)

What this package gives you

  • One envelope. Event is 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-family payload.
  • 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:

The durable, governing contracts live in contracts/; COMPATIBILITY.md is the public compatibility policy and the authoritative version-and-compatibility reference.

Installation

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.0.0"
# with conformance-validation support:
pip install "spec-kitty-events[conformance]==11.0.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 in one line

Two version numbers move independently: the package version (contract behaviour) and the on-wire envelope schema_version (3.0.0, held stable across package majors). 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

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.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spec-kitty-events 11.0.0
File Size Uploaded Provenance Actions
spec_kitty_events-11.0.0.tar.gz 574.2 kB With provenance Details for spec_kitty_events-11.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spec-kitty-events 11.0.0
File Interpreter ABI Platform Actions
spec_kitty_events-11.0.0-py3-none-any.whl Python 3 none any Details for spec_kitty_events-11.0.0-py3-none-any.whl

Total release size: 1.5 MB

Release files / spec_kitty_events-11.0.0.tar.gz

Download URL spec_kitty_events-11.0.0.tar.gz
Size 574.2 kB
Tags Source
SHA-256 checksum
How to use checksums
33abc6c561f86e40cf921d739d26fffa6559204a06e6b51d11dd99c5bf7d5eca
BLAKE2b-256 checksum
How to use checksums
ffda4d3475cc37468a1f1b38e31e03c1a0a52e06e5feac2e4f33773df97eef54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 18, 2026.

Transparency log

Release files / spec_kitty_events-11.0.0-py3-none-any.whl

Download URL spec_kitty_events-11.0.0-py3-none-any.whl
Size 966.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d667119882f64c0a19ac58ce458e14f267e28e1cd53d3e7bc294052cf896065
BLAKE2b-256 checksum
How to use checksums
9507e91fcb79fe6cb66b608abaefa2d942a87605e483fc87883d640eb0ff723a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 18, 2026.

Transparency log

Security for spec-kitty-events 11.0.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.

Select from 2 files

Attestation for spec_kitty_events-11.0.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 Oct 18, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

11.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page