feat(spec): add decision.completed + builders for RFC 09 Slice 1a#258
Merged
Conversation
…etion_event for RFC 09 RFC 09's Decision Graph projection needs a chain-closing terminal event, and earlier drafts were reusing decision.graduated for that role. That collides with decision.graduated's existing meaning (pattern promotion from episodic to semantic memory), so this slice splits the vocabulary: decision.completed becomes the canonical chain terminator while decision.graduated keeps its original promotion semantics unchanged. Adds two builders alongside the existing build_proposal_event / build_correction_event pair: build_policy_event for the policy.evaluated chain-forming event (Instinct gate evaluations) and build_completion_event for decision.completed with a landed/rejected/abandoned status. trace_decision_chain's filter is extended to follow both new actions while keeping decision.graduated in scope for backward-compat queries. Additive: no shipped action names changed, no signatures rewritten. Refs paw-workspace#63 (RFC 09 Slice 1a).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
RFC 09's Decision Graph projection needs a single, unambiguous chain-closing terminal event. Earlier drafts repurposed
decision.graduatedfor that role, but the same action name already ships with a different meaning: a recurring correction pattern that has been promoted from episodic to semantic / core memory. Two different subsystems were about to overload one verb, so this slice splits the vocabulary cleanly.What changed
ACTION_NAMESPACESgainsdecision.completed— the RFC 09 chain terminator.decision.graduatedstays and keeps its original pattern-promotion meaning; nothing about the existing action's contract changed.spec/decisions.py, sitting next to the existingbuild_proposal_event/build_correction_eventpair:build_policy_eventforpolicy.evaluated(Instinct gate evaluations — the last one before chain close becomesDecision.instinct_policyin the projection).build_completion_eventfordecision.completed, with alanded/rejected/abandonedstatus and an optionalreason.trace_decision_chainfollows both new actions and keepsdecision.graduatedin the filter so older queries that emit graduation events on a correlation_id still surface them.CompletionStatusLiteral alias exported the same wayDispositionis.Both new builders accept an optional
payload_extrasdict so callers can attach evaluator metadata (rule id, latency, outcome refs) without churning the public signature later.Compatibility
Purely additive. No shipped action names changed, no signatures rewritten, no behavior for existing builders altered. Downstream consumers that already use
build_proposal_event/build_correction_event/trace_decision_chainsee no diff in their call sites; the trace filter grew, so chains that happen to carry the new actions will start surfacing them.Test plan
uv run pytest tests/test_spec/ -xvs— 96 passed (10 new tests added for the RFC 09 builders + filter extension).uv run pytest -q— 2919 passed, 5 unrelated pre-existing failures (fastmcp / httpx missing optional deps).uv run ruff check+ruff format --checkon touched files — clean.Refs
paw-workspace#63 (RFC 09 — Decision Graph projection, Slice 1a).