BEHAVE-EXTRACTOR.md Phase A Step 8. Dispersion / bimodality of
inter-command pauses. HUMAN-bimodal vs LLM-metronomic.
* _features/cognitive.py:inter_command_consistency(ctx) emits one
Observation in {metronomic, variable, bimodal}.
* CV = stdev / mean of ctx.inter_cmd_iats. CV < 0.40 → metronomic
(LLM-pure; corpus anchor 0.24); CV ≥ 1.50 → bimodal heuristic
(LLM-assisted human; v0.1 placeholder, true bimodal via Hartigan
dip is registry-flagged for v0.2); else → variable (human;
corpus anchor 0.94).
* < 2 IATs or zero mean → skip emission. < 5 commands halves
confidence (0.40 vs 0.75) per sample-size honesty.
Tests: too-few IATs → no emission, uniform → metronomic,
human-like dispersion → variable, extreme bursts+gaps → bimodal,
low-sample-count → reduced confidence.
Step 8 closes the six-primitive calibration floor for Phase A.
Step 9 (calibration grid lockdown) is the gate that pins it.
35 lines
974 B
Python
35 lines
974 B
Python
"""Registered feature functions.
|
|
|
|
Each entry takes a ``SessionContext`` and yields zero or more
|
|
``Observation`` instances. Adding a primitive = adding a function in a
|
|
sibling module and appending it to ``FEATURES``.
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
from typing import Callable, Iterable
|
|
|
|
from decnet_behave_core.spec.envelope import Observation
|
|
|
|
from decnet.profiler.behave_shell._ctx import SessionContext
|
|
from decnet.profiler.behave_shell._features.cognitive import (
|
|
command_branch_diversity,
|
|
feedback_loop_engagement,
|
|
inter_command_consistency,
|
|
inter_command_latency_class,
|
|
)
|
|
from decnet.profiler.behave_shell._features.motor import (
|
|
input_modality,
|
|
paste_burst_rate,
|
|
)
|
|
|
|
FeatureFn = Callable[[SessionContext], Iterable[Observation]]
|
|
|
|
FEATURES: tuple[FeatureFn, ...] = (
|
|
input_modality,
|
|
paste_burst_rate,
|
|
inter_command_latency_class,
|
|
command_branch_diversity,
|
|
feedback_loop_engagement,
|
|
inter_command_consistency,
|
|
)
|