🐛 Fixed
- Unborn branch misdetected as detached HEAD:
get_current_branch()now usesgit branch --show-current(Git 2.22+) with fallback togit rev-parse --abbrev-ref HEADfor older Git. Correctly returns the branch name on fresh repos with no commits, fixing false "Not in a git repository" errors duringspec-kitty init. - Windows subprocess decode crash: Added
encoding="utf-8", errors="replace"to all 113subprocess.run(text=True)calls across 31 files. PreventsUnicodeDecodeErroron Windows systems with non-UTF-8 locale settings. - Pre-commit hook blocks commits when Python unavailable: Expanded interpreter detection to try
python3,python, andpy(Windows launcher) with a smoke test. Removedset -eso non-encoding Python failures (e.g. filenames with special characters) warn-and-skip instead of blocking commits. Distinguishes Python execution failure from actual encoding errors via distinct exit codes. - Init reports "project ready" even when git init failed:
initnow raisesRuntimeErroraftertracker.error()wheninit_git_repo()returns False, triggering the failure panel and non-zero exit instead of falsely reporting success. - PowerShell equivalents in implement templates: Added PowerShell syntax examples (in collapsible
<details>blocks) after bash code blocks in implement templates for all 3 missions (software-dev, research, documentation).
🔧 Changed
- Removed 7 duplicate inline
subprocess.run(["git", "rev-parse", "--abbrev-ref", "HEAD"])calls infeature.py,tasks.py, andworkflow.py, replacing them with the centralizedget_current_branch()helper. - Updated all callers that checked
== "HEAD"to checkis Noneinstead, sincegit branch --show-currentnever returns the literal string"HEAD".