feat(extensions): port git extension scripts to Python
Summary
Fixes #3282 — part of #3277. Last script port in the porting phase: extensions/git/scripts/{bash,powershell}/ now has Python twins in extensions/git/scripts/python/.
Changes
git_common.py—has_git,effective_branch_name,check_feature_branch(port of git-common.sh)initialize_repo.py— repo init with configurable initial commit messageauto_commit.py— per-event auto-commit, mirroring the line-based git-config.yml parser including the default/explicit-false precedence rulescreate_new_feature_branch.py— full port: slug generation with stop-word filtering and acronym handling, sequential numbering across specs/local branches/remote refs,branch_template/branch_prefixwith scoped numbering,GIT_BRANCH_NAMEoverride, 244-byte truncation,SPECIFY_INIT_DIRvia the corecommon.pyresolver (same refusal as bash when core scripts are missing)
Same conventions as the merged check-prerequisites PoC and the #3280/#3281 ports: stdlib only, standalone scripts, no runtime wiring changes.
Testing
43 new tests in tests/extensions/git/test_git_extension_python_parity.py. The parity tests run each bash script and its Python twin in identical twin projects and assert matching stdout, exit codes, stderr, and resulting git state (branches created, commit messages). Covers branch creation and commit behavior per the issue's acceptance criteria, plus template validation errors, existing-branch handling, and no-git degradation.
uv run pytest tests/extensions/git/— 97 passed- Full suite: 3847 passed, 105 skipped
uvx ruff check— clean
Checklist
- [x] Tests pass locally
- [x] Lint passes
- [x] I did use AI assistance for this contribution
@copilot review
Please address Copilot feedback
@copilot review
@copilot review
@copilot review
@copilot review
@copilot review
Thank you!