feat(profiler/behave_shell): emit temporal.lifecycle_markers.exit_behavior

Resolves the E.4 hold from Phase E. F.0's Command.followed_by_prompt
gives us the exit-code proxy (prompt-after-last-command) we couldn't
get in Phase E.

Logic: last command without trailing prompt → abrupt; first_token_hash
in {exit, logout, quit, logoff} → graceful; any of the last K=3
commands' first_token_hash in {history, unset, rm, shred, clear, kill}
→ cleanup; else → graceful (clean Ctrl-D / window close).
This commit is contained in:
2026-05-04 00:42:25 -04:00
parent c8166a6071
commit 51ecd0924e
4 changed files with 154 additions and 0 deletions

View File

@@ -272,6 +272,10 @@ NUMPAD_RUN_MIN: int = 4
# Below this many typed chars total, skip emission (no honest signal).
NUMPAD_MIN_TYPED_CHARS: int = 50
# ── temporal.lifecycle_markers.exit_behavior (Step E.4, unblocked by F.0) ──
# How many of the last commands to inspect for cleanup-family tokens.
EXIT_BEHAVIOR_LOOKBACK_K: 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