Skip to content

feat(git-pilot): implement v2 with rebase, worktrees, stash, and agent teams#4

Merged
moukrea merged 7 commits into
mainfrom
feat/git-pilot-v2
Feb 24, 2026
Merged

feat(git-pilot): implement v2 with rebase, worktrees, stash, and agent teams#4
moukrea merged 7 commits into
mainfrom
feat/git-pilot-v2

Conversation

@moukrea
Copy link
Copy Markdown
Owner

@moukrea moukrea commented Feb 24, 2026

Summary

Major upgrade to git-pilot implementing six new features from the v2 technical specification:

  • Branch freshness detection: auto-fetch on session start, fast-forward behind branches, warn on divergence
  • Base branch drift detection: detect when the base branch has advanced, auto-rebase before push with configurable conflict strategy
  • Intelligent rebase & conflict resolution: structured conflict details with recommendations, tri-state protectDefaultBranch (warn/block/off)
  • Unrelated work detection: UserPromptSubmit hook provides branch context so Claude can detect off-topic requests
  • Agent Teams support: suppress interactive prompts for spawned agents, orchestrator-only operations, git worktree management
  • Automatic stash management: auto-stash/restore on branch switches

Changes

  • 3 new library scripts: agent.sh, rebase.sh, worktree.sh
  • 1 new hook: prompt-context.sh (UserPromptSubmit)
  • 6 modified hooks: session-start, session-stop, pre-commit, post-bash, post-write, hooks.json
  • 3 new skills: /stash, /worktree, /rebase
  • 3 modified skills: /branch, /finish, /configure
  • Updated config schema: 13 new config keys across rebase, worktree, agentTeams sections
  • CLAUDE.md: expanded from 6 to 10 rules
  • Plugin version: 1.1.0 → 2.0.0
  • Test suite: 74 bats test cases across 9 test files

Test plan

  • bash -n plugins/git-pilot/scripts/*.sh passes (verified)
  • shellcheck --severity=warning plugins/git-pilot/scripts/*.sh passes (verified)
  • jq . plugins/git-pilot/defaults/config.json valid (verified)
  • jq . plugins/git-pilot/hooks/hooks.json valid (verified)
  • All 7 skills have valid YAML frontmatter
  • CLAUDE.md contains all 10 rules and 7-skill reference table
  • v1 config files remain backward compatible (boolean protectDefaultBranch normalized)
  • Run bats plugins/git-pilot/tests/ for full test suite

@moukrea moukrea merged commit 8274ffc into main Feb 24, 2026
1 check passed
@moukrea moukrea deleted the feat/git-pilot-v2 branch February 24, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant