v3.8.0: the Stop hook fires on every platform, session recovery finds the real store, smart injection
This release closes two silent failures that hit exactly the long-running story the skill exists for, then adds the injection controls that keep a long plan in the model's window.
Fixed
The Stop hook never fired on macOS or Linux, and was a silent no-op on every platform when CLAUDE_SKILL_DIR was unset. Two dispatch bugs stacked: the install path fallback used a shell default that can never substitute, and the PowerShell branch was selected everywhere because check-complete.ps1 ships on all platforms, so the dispatch died with a suppressed exit 127 wherever PowerShell is absent. Both the completion advisory and the v3 completion gate were dead in those environments. The scalar now selects targets by file existence and dispatches by platform. Windows output is unchanged. New tests execute the scalar end to end on both CI legs instead of string-matching its shape.
Session recovery searched a ~/.claude/projects directory that does not exist for macOS and Linux installs, nor for any project path containing an underscore: Claude Code keeps underscores and the leading dash of POSIX absolute paths, the mapper stripped both. Recovery after /clear silently found nothing in those cases. The mapper now probes the exact spelling first, keeps the legacy spellings as fallbacks, and settles ambiguity via the cwd recorded in the newest session file.
Also fixed: a stale SHA cache hit could report a false PLAN TAMPERED for a different project (the cache key now includes the project root), resolve-plan-dir.ps1 reached parity with the sh resolver (slug validation, task_plan.md requirement, fail-closed containment), and ledger-append.sh no longer truncates a CJK or emoji summary mid-codepoint.
Added
Opt-in structure-aware injection: PWF_INJECT=smart (or an inject-smart token in .mode) replaces the position-blind head-50 with the plan title, Goal, Next Step, Current Phase, phase counts, the full in_progress phase section, and the last three decisions, so late in a long task the active phase is always in the window. Default output stays byte-identical to v2.43.
A Next Step section in both plan templates plus a sixth reboot question (what am I about to do), tool result outcomes in the session catchup report, a macos-latest CI leg plus a BSD userland simulation harness that runs the script fleet without realpath, readlink, flock, or sha256sum, pinned line endings via .gitattributes, three problem-query docs pages, a rewritten llms.txt, and a rebuilt README with committed SVG benchmark charts that carry the internal benchmark framing inside the images.
Suite at 301 passed (from 217), 11 skipped, green on Windows, Linux, and the new macOS leg pending first run. Full details in the CHANGELOG.