Skip to content

feat(spec): add decision.completed + builders for RFC 09 Slice 1a#258

Merged
prakashUXtech merged 1 commit into
devfrom
feat/rfc-09-slice-1-decision-vocabulary
May 30, 2026
Merged

feat(spec): add decision.completed + builders for RFC 09 Slice 1a#258
prakashUXtech merged 1 commit into
devfrom
feat/rfc-09-slice-1-decision-vocabulary

Conversation

@prakashUXtech
Copy link
Copy Markdown
Contributor

Why

RFC 09's Decision Graph projection needs a single, unambiguous chain-closing terminal event. Earlier drafts repurposed decision.graduated for 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_NAMESPACES gains decision.completed — the RFC 09 chain terminator. decision.graduated stays and keeps its original pattern-promotion meaning; nothing about the existing action's contract changed.
  • Two new builders in spec/decisions.py, sitting next to the existing build_proposal_event / build_correction_event pair:
    • build_policy_event for policy.evaluated (Instinct gate evaluations — the last one before chain close becomes Decision.instinct_policy in the projection).
    • build_completion_event for decision.completed, with a landed / rejected / abandoned status and an optional reason.
  • trace_decision_chain follows both new actions and keeps decision.graduated in the filter so older queries that emit graduation events on a correlation_id still surface them.
  • CompletionStatus Literal alias exported the same way Disposition is.

Both new builders accept an optional payload_extras dict 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_chain see 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 --check on touched files — clean.

Refs

paw-workspace#63 (RFC 09 — Decision Graph projection, Slice 1a).

…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).
@prakashUXtech prakashUXtech merged commit 144b285 into dev May 30, 2026
2 checks passed
@prakashUXtech prakashUXtech deleted the feat/rfc-09-slice-1-decision-vocabulary branch May 30, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant