feat(profiler/behave_shell): emit cognitive.error_resilience.fallback_to_man

For each errored command, check whether the next command's
first_token_hash is in {man, help, info} (precomputed at module
load). At least one match → present, else absent. The --help / -h
flag forms aren't first tokens; v0.2 will reconsider once arg-token
hashing is justified by corpus.
This commit is contained in:
2026-05-04 00:01:45 -04:00
parent 8183218d29
commit 0fba6b6113
3 changed files with 128 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ from decnet.profiler.behave_shell._ctx import SessionContext
from decnet.profiler.behave_shell._features.cognitive import (
cognitive_load,
command_branch_diversity,
error_resilience_fallback_to_man,
error_resilience_frustration_typing,
error_resilience_retry_tactic,
exploration_style,
@@ -57,4 +58,5 @@ FEATURES: tuple[FeatureFn, ...] = (
tool_vocabulary,
error_resilience_retry_tactic,
error_resilience_frustration_typing,
error_resilience_fallback_to_man,
)