Skip to content

System context

This page places spec-kitty-events between the Spec Kitty CLI that produces events and the systems that consume them. It explains the three transports an event can travel on and why consumers stay decoupled from the producer.

The neighbours

Events-domain services

(loopback-only)

Build Kitty

imports + emits

append

broadcast volatile moments

durable work observations

launcher starts and drives

append — durable status appends

reads

status over loopback HTTP

validates / reduces

validates / reduces

spec-kitty CLI / runtime

central event emitter

spec-kitty-events

contract package

status.events.jsonl

local append-only log

Zeitgeist relay

volatile, bounded attrs

SaaS durable journal

mission-status-api

read service

command-cli

write service

spec-kitty-go

(untyped consumer)

Team Kitty dossier

reduces the diary

dashboards / analytics

How the CLI core produces events

The CLI holds a single sanctioned path for emitting canonical events. Centralising it means one place enforces the envelope shape, the Lamport clock (optional for local ledgers since 11.0.0) and the forbidden-key rules, so no corner of the CLI invents its own vocabulary. The local-only classification (LOCAL_ONLY_EVENT_TYPES) is removed in 11.0.0: every modelled event type is canonical.

Identity on every envelope is build-scoped, not team-scoped: build_id is the checkout that produced the event and node_id is the causal emitter. Team routing, sharing and approval are host-product policy and deliberately not part of this contract.

Three transports

An event reaches consumers on one of three paths, and the contract’s durability split decides which:

TransportCarriesValidity
status.events.jsonlthe local, append-only status diary the CLI writes to diskread permissively by the CLI so users never lose their own history
Zeitgeist relayvolatile “moments” (presence, lane signals, decision broadcasts) projected to a bounded attrs wire shaperetention-window only; never the durable record
Durable journaldurable WorkObservation streams and journal-profile eventsgated fail-closed by the strict profile

The loopback services

The repository also ships two events-domain services on its own service-v* release line (ADR-0003). Both are strictly local: each binds 127.0.0.1, guards the Host and Origin headers, and answers to no other address.

  • The read service, mission-status-api, is detached and read-only: nothing starts it, and it never writes to the project. Run against one project directory, it serves the project header, the mission page, a change stream and two capped artifact reads from that project’s event logs — the diary transport lifted to HTTP. See Running the Mission Status Read API.
  • The write service, command-cli, is the canonical event writer. The CLI’s launcher starts one process per git common dir and drives it; the service publishes its host, its OS-picked port and its bearer token to the launcher alone in endpoint.json. Its write core is built (#160, #161): a write that passes every check is appended and synced, or replayed, and the service answers a DurabilityAck; coordination_ref_commit waits for migration step 4. The protocol is in write-service protocol; both services are mapped in Services.

Why consumers stay orthogonal

A consumer depends on spec_kitty_events — a small Pydantic package — and nothing else of Spec Kitty’s. It validates a payload with validate_event, gates an envelope with validate_strict_envelope, and folds a stream with a family reducer. The Team Kitty dossier re-uses the very same status-diary reducer the CLI uses, so producer and consumer agree by construction rather than by convention.

Not every consumer is Python. spec-kitty-go carries the work-package lane as a bare string by design; it cannot import the Lane enum, which is one reason a lane change is always a major version bump — the version number is the only reliable cross-language coordination signal. See lane vocabulary and versioning.

See also