Skip to content

feat: behavioral signal SDK v1.12.0 — report_pipeline, report_user_turn, report_action, request_feedback, submit_feedback#174

Merged
devonakelley merged 2 commits intomainfrom
feat/behavioral-sdk
Apr 30, 2026
Merged

feat: behavioral signal SDK v1.12.0 — report_pipeline, report_user_turn, report_action, request_feedback, submit_feedback#174
devonakelley merged 2 commits intomainfrom
feat/behavioral-sdk

Conversation

@devonakelley
Copy link
Copy Markdown
Contributor

Closes #173

What ships

Five new typed SDK functions on top of existing emit_signal() primitive. All additive, nothing changed.

  • report_pipeline() — anchors a pipeline run; stores session to ~/.kalibr/sessions/{session_id}.json with 30-min TTL; emits pipeline_anchor signal
  • report_user_turn() — two-layer classifier (heuristic ≥0.85 terminates; LLM async fallback below threshold); fire-and-forget; never blocks
  • report_action() — verbatim=1.0, copied=0.9, edited=0.4, discarded=0.0; highest-confidence signal; fire-and-forget
  • request_feedback() — SDK-only, no network call; returns structured dict for developer to render
  • submit_feedback() — ONE ROW PER DIMENSION rated; signal_source=explicit_feedback; confidence=1.0

Rollout

Feature-flagged. Enable per-tenant via behavioral_sdk_enabled flag.

What was NOT changed

emit_signal(), user_rejected(), user_accepted(), track_run(), classify_satisfaction() — all unchanged.

devonakelley and others added 2 commits April 30, 2026 12:29
…rt_action, request_feedback, submit_feedback (v1.12.0)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code review fixes:
1. _heuristic_classify returned 'rejection'/'acceptance' but /signals expects
   'user_rejected'/'user_accepted'. Fixed to use correct signal_type values.
2. _fire_user_turn_signal now drops 'unrelated' signals (no-op return).
   Absence of reaction is not a signal.
3. submit_feedback strength had dead branch (0.5 for rating==0 was unreachable
   because the 0 case was already skipped). Simplified to binary 0.0/-1 → 1.0.
@devonakelley devonakelley merged commit 6a7104d into main Apr 30, 2026
4 checks passed
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.

feat: behavioral signal SDK — report_pipeline, report_user_turn, report_action, submit_feedback

1 participant