feat(profiler/behave_shell): emit motor.motor_stability

BEHAVE-EXTRACTOR.md Phase B Step B.2. First principled
implementation — the prototype doesn't ship this primitive at all.

* _features/motor.py:motor_stability(ctx) emits one Observation
  in {steady, variable, tremor}. Reuses ctx.typing_bursts from B.1.
* Tremor proxy: fraction of within-burst IATs below
  TREMOR_FAST_FLOOR_S (30 ms — humans can't sustain sub-50 ms IATs).
  ≥ TREMOR_RATE_MIN (10%) sub-floor → tremor (double-press / motor
  twitch / stuck-key).
* Otherwise median burst CV decides: < CV_STEADY_MAX → steady,
  else → variable. Confidence 0.70 / 0.60 / 0.65.
* No typing bursts or fewer than 5 within-burst IATs → skip emit.
* Calibration grid widened to include motor.motor_stability; green
  across all five shards.

Tests cover all three buckets + skip paths.
This commit is contained in:
2026-05-03 21:25:54 -04:00
parent d90c8b70ce
commit 0737fcfe93
5 changed files with 118 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ PHASE_AB_PRIMITIVES: frozenset[str] = frozenset({
"cognitive.inter_command_consistency",
# Phase B — motor.* completion (lands one primitive per commit)
"motor.keystroke_cadence",
"motor.motor_stability",
})