Skip to content

Review, Audit and Decision Events

These families record the review and governance surface of a mission: the decision points a mission opens and resolves, the audits it runs, the retrospective it captures, the parity of its dossier artifacts, and the CI gates that pass or fail on its pull requests. They are emitted by the Spec Kitty CLI and runtime and consumed by the mission dashboard, the audit journal and the dossier parity checker.

Decision points — decisionpoint.py

A decision point is a question a mission opens, optionally widens to a broader audience, discusses, and resolves (or has overridden). Shared value objects live in decision_moment.py. Decision Moment V1 was introduced in spec-kitty-events 4.0.0; its envelope schema_version is 3.0.0.

Event typePayload modelMeaning
DecisionPointOpenedDecisionPointOpenedAdrPayload / DecisionPointOpenedInterviewPayloadA decision point opens (variant by origin_surface).
DecisionPointWidenedDecisionPointWidenedPayloadThe decision is widened to a broader audience.
DecisionPointDiscussingDecisionPointDiscussingAdrPayload / DecisionPointDiscussingInterviewPayloadThe decision enters discussion.
DecisionPointResolvedDecisionPointResolvedAdrPayload / DecisionPointResolvedInterviewPayloadThe decision is resolved.
DecisionPointOverriddenDecisionPointOverriddenPayloadThe decision is overridden.

The five types make up DECISION_POINT_EVENT_TYPES. The state vocabulary is DecisionPointState (open, widened, discussing, resolved, overridden); DecisionAuthorityRole names who may decide (mission_owner, advisory, informed). The opened/discussing/resolved payloads are discriminated unions over origin_surface (ADR vs planning interview). Shared models from decision_moment.py include OriginSurface, OriginFlow, TerminalOutcome, WideningChannel and WideningProjection.

DecisionPointOpened

DecisionPointWidened

DecisionPointDiscussing

DecisionPointResolved

DecisionPointOverridden

open

widened

discussing

resolved

overridden

Reducer. reduce_decision_point_events runs sort → dedup → filter(DECISION_POINT_EVENT_TYPES) → fold → freeze into a ReducedDecisionPointState, carrying the current state, the identity fields (decision_point_id, mission_id, run_id, mission_slug), the V1 projection (origin_surface, question, options, widening, terminal_outcome, final_answer, participants, resolved_by) and anomalies.

Reopen. Since 11.0.0 a decision may be reopened from deferred by a resolve (DECISION_POINT_TERMINAL_REOPEN = {(deferred, resolved)}). One Resolved(deferred) plus one Resolved(resolved) fold to resolved in either file order, using the resolved event’s answer and time; reopened_from_deferred is True and no anomaly is emitted. Every reduced state carries reopened_from_deferred. An Overridden is legal only after the effective resolve; one placed before it reports invalid_transition. Any other multi-Resolved set reports unfoldable_terminal_combination for each extra, and the first Resolved by the canonical ordering key stands (#120).

Ledger fold. reduce_decision_point_records(records, *, strict=True) folds the records persistence.append_event writes: it validates each fail-closed, skips non-DecisionPoint types, groups by decision_point_id and reduces each group by the same rules. With strict=True it raises LedgerValidationError on a malformed record and DecisionPointFoldError on an unfoldable combination; with strict=False both become anomalies.

Durability. Journaled. DecisionPointOpened and DecisionPointResolved are also projected onto the volatile relay (VOLATILE_EVENT_TYPES).

Decision significance — decision_significance.py

Added in 11.1.0. SignificanceEvaluated mirrors the event core persists. DecisionTimeoutExpired mirrors core’s TimeoutExpiredPayload model under a name this package chose, because core does not yet persist a timeout event. Since 11.2.0 the timeout has a producer row, run.decision.timeoutexpired.v1, cross-anchored to this payload. See Lifecycle reconciliation. Both sit beside mission_next and use a new RACI actor model rather than RuntimeActorIdentity.

Event typePayload modelMeaning
SignificanceEvaluatedSignificanceEvaluatedPayloadA decision’s significance score and effective band (low, medium, high) were evaluated.
DecisionTimeoutExpiredDecisionTimeoutExpiredPayloadA decision at band medium or high timed out; carries timeout_configured_seconds, escalation_targets and the resolved RACI snapshot.

RaciRoleBinding (actor_type of human, llm or service, plus actor_id) and ResolvedRaciSnapshot are the shared value objects. Unlike core, actor_id is required and non-empty. There is no reducer. These types are not part of STRICT_EVENT_TYPES.

Mission audit — mission_audit.py

The mission-audit family records one audit run from request to terminal verdict.

Event typePayload modelMeaning
MissionAuditRequestedMissionAuditRequestedPayloadAn audit is requested.
MissionAuditStartedMissionAuditStartedPayloadThe audit run starts (running).
MissionAuditDecisionRequestedMissionAuditDecisionRequestedPayloadThe audit blocks awaiting a decision.
MissionAuditCompletedMissionAuditCompletedPayloadThe audit completes with a verdict.
MissionAuditFailedMissionAuditFailedPayloadThe audit fails (error code/message).

The five types make up MISSION_AUDIT_EVENT_TYPES (AUDIT_SCHEMA_VERSION 2.5.0). The vocabularies are AuditVerdict (pass, pass_with_warnings, fail, blocked_decision_required), AuditSeverity (info, warning, error, critical) and AuditStatus (pending, running, awaiting_decision, completed, failed); completed and failed are terminal (TERMINAL_AUDIT_STATUSES).

Reducer. reduce_mission_audit_events runs sort → dedup → filter(MISSION_AUDIT_EVENT_TYPES) → reduce → freeze into a ReducedMissionAuditState — audit_status, verdict, severity, findings_count, artifact refs, pending_decisions, the mission identity fields and anomalies.

Durability. Journaled and reduced into durable audit state.

Retrospectives — retrospective.py

The retrospective family has two shapes: two terminal PascalCase event types and a dot-named lifecycle/proposal vocabulary (RETROSPECTIVE_SCHEMA_VERSION 4.1.0). It defines payloads only; it has no reducer.

Event typePayload modelMeaning
RetrospectiveCompletedRetrospectiveCompletedPayloadTerminal: the retrospective is captured.
RetrospectiveSkippedRetrospectiveSkippedPayloadTerminal: the retrospective is skipped.
retrospective.requestedRetrospectiveRequestedPayloadA retrospective is requested.
retrospective.startedRetrospectiveStartedPayloadA retrospective run starts.
retrospective.completedRetrospectiveLifecycleCompletedPayloadThe run completes.
retrospective.skippedRetrospectiveLifecycleSkippedPayloadThe run is skipped.
retrospective.failedRetrospectiveFailedPayloadThe run fails.
retrospective.proposal.generatedRetrospectiveProposalGeneratedPayloadA proposal is generated.
retrospective.proposal.appliedRetrospectiveProposalAppliedPayloadA proposal is applied.
retrospective.proposal.rejectedRetrospectiveProposalRejectedPayloadA proposal is rejected.

The eight dot-named strings are RETROSPECTIVE_EVENT_NAMES; the full set, including the two terminal PascalCase types, is RETROSPECTIVE_EVENT_TYPES.

Durability. Journaled. The dot-named lifecycle rows use the non-lane type envelope shape and pass through the status diary unchanged.

Mission dossier — dossier.py

The dossier family records artifact parity for a mission dossier: which artifacts are indexed, which are missing, the computed snapshot, and any drift between snapshots.

Event typePayload modelMeaning
MissionDossierArtifactIndexedMissionDossierArtifactIndexedPayloadAn artifact is indexed into the dossier.
MissionDossierArtifactMissingMissionDossierArtifactMissingPayloadAn expected artifact is not found.
MissionDossierSnapshotComputedMissionDossierSnapshotComputedPayloadA deterministic snapshot of dossier state is computed.
MissionDossierParityDriftDetectedMissionDossierParityDriftDetectedPayloadA parity drift between snapshots is detected.

The four types make up DOSSIER_EVENT_TYPES. Events are namespaced by a LocalNamespaceTuple; reduce_mission_dossier filters to DOSSIER_EVENT_TYPES and folds into a MissionDossierState (artifact entries, anomalies, snapshot summary, drift records), raising NamespaceMixedStreamError if events from more than one namespace are mixed.

Durability. Journaled and reduced into durable dossier state.

CI gates — gates.py

The gate family records CI check-run outcomes as pass/fail observability events.

Event typePayload modelMeaning
GatePassedGatePassedPayloadA CI gate concluded success.
GateFailedGateFailedPayloadA CI gate concluded failure, timed_out, cancelled or action_required.

Both payloads extend GatePayloadBase (gate name, type, raw conclusion, provider, check-run id/url, delivery id, optional PR number). map_check_run_conclusion maps a raw GitHub conclusion to "GatePassed", "GateFailed" or None (for the ignored neutral, skipped, stale), and raises UnknownConclusionError on an unknown value. There is no reducer.

Durability. Journaled observability rows; keyed by the webhook delivery_id for idempotency.

See also

Schemas