feat(profiler/behave_shell): emit environmental.shell_type

Per-prompt classification mode over ctx.prompt_lines. $/# → bash;
% → zsh; > with 'PS ' prefix → powershell; > with 'C:\' substring →
cmd.exe; > otherwise → fish. New _features/environmental.py module
opens Phase F.
This commit is contained in:
2026-05-04 00:30:24 -04:00
parent 1ff02f0c77
commit 07ff5ff0c9
4 changed files with 171 additions and 0 deletions

View File

@@ -228,6 +228,11 @@ LANDING_RITUAL_MIN_COMMANDS: int = 3
PROMPT_SUFFIX_CHARS: frozenset[str] = frozenset({"$", "#", "%", ">"})
PROMPT_LINE_MAX_CHARS: int = 256
# ── environmental.shell_type (Step F.1) ────────────────────────────────────
# Below this many detected prompt-lines, drop confidence (sample-size
# honesty). Above, the shell-type vote is robust.
SHELL_TYPE_MIN_PROMPTS: int = 3
# ── motor.keystroke_cadence (Step B.1) ──────────────────────────────────────
# Typing bursts split at gaps > IKI_THINK_MAX_S so think-pauses between
# commands don't inflate the within-burst CV. Mirrors the prototype's