Two findings from live-hook e2e smoke 2026-05-25 on this Windows machine:
(1) README snippet was pwsh-only — PS 7 Core isn't on stock Windows. PS 5.1
(`powershell`) is always present and the hook script runs cleanly under both.
README now leads with `powershell` and notes the `pwsh` swap for PS 7+ users.
(2) Missing caveat that hooks load at Claude Code session start — mid-session
edits to ~/.claude/settings.json don't activate the hook until CC restart.
Without this note user would think the hook is broken after applying the
snippet (standalone smoke would pass but live in-session wouldn't fire).
Added explicit restart instruction + verification recipe.
Also: dist/session-handoff.skill now tracked (was missing since promotion —
inconsistent with other dist/*.skill artifacts that ship in repo).
PATCH bump 0.3.1 → 0.3.2 (docs-only, no behavioral change in hook or skill).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`(& git log -1 --format='%b')` in PowerShell collapses multi-line subprocess
output into string[]. The threshold check used `$body.Length` which on a
string[] returns the line count, not char count — so the body>200 condition
was effectively comparing "more than 200 lines", which is much harder to
meet. Files-count saves it in practice for big commits, but small-file
big-message commits were under-detected.
Fix: join the array back into a single string with `-join "`n"` before
measuring length. Verified via stdin-pipe smoke against current HEAD:
body chars now report 1255 (vs 29 before — the line count).
POSIX `.sh` variant unaffected — `$()` collapses output and `${#var}` is
char count.
Bump 0.3.0 → 0.3.1 PATCH (bugfix, no behavior contract change).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hooks live in skills/session-handoff/hooks/:
- commit-detector.ps1 Windows/PowerShell
- commit-detector.sh POSIX (python3 for JSON parsing)
- README.md opt-in instructions, cross-platform settings.json
snippets, smoke procedure
Hook reads PostToolUse stdin, detects substantive `git commit` (prefix
not in meta/docs/style/chore + fix typo, AND body >200 chars OR files >3).
On hit, emits hookSpecificOutput.additionalContext so Claude Code
surfaces a system reminder next iteration. Silent skip on --amend, failed
commits, non-git cwd, trivial prefix, below thresholds.
install.sh deliberately does NOT mutate settings.json — opt-in via the
README hook config snippet, applied once per machine. SKILL.md body
mentions the hook as an optional alternative to the agent-side
behavioral heuristic.
Bump 0.2.1 -> 0.3.0 MINOR (new opt-in capability, backward-compatible —
SKILL keeps working without the hook).
Deferred (separate follow-ups if needed):
- live-hook e2e smoke (would interfere with current session commits)
- rebase/cherry-pick batch deduplication
Closes [session-handoff-posttooluse-hook] (partial: stdin smoke,
live-hook deferred).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MINOR bump — skeleton (v0.1.0) gets functional 6-section body. Source: .workshop/.archive/2026-05-24-session-handoff-skill.md (Round 1 design + Round 2 resolved Q1-Q10).
Body sections: When to use (read/write triggers + skip patterns), Inputs (read/write), Steps (read 5 + write 5), Failure modes (incl. secret-detection abort), Side effects (sliding overwrite + git-tracked, no global state), What NOT to do (no auto-execute, no append-with-archive, no cross-project, no SessionEnd-hook dependency).
Still skeleton from claude-skills/ POV: no install.sh run, no push, no hermes/mapping.yaml entry — those remain in baseline tasks (session-handoff-install / -hermes-mapping / -test-trigger / -bootstrap-template-extend / -review umbrella).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Promoted from .workshop/.brainstorm/session-handoff-skill.md (Round 1 design + Round 2 resolved 2026-05-24, Q1-Q10).
Skeleton only — header + empty 6-section body. Body filled in second pass from .workshop/.archive/2026-05-24-session-handoff-skill.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>