Files
skills/skills/git-manager/SKILL.md
T
kiskaadee c0f6e92935 refactor(skills): align retained skills and docs with GitHub delivery loop
- skills/reconcile-docs/: preserve local-only doc reconciliation, scope optional read-only PR/milestone/Projects v2 board reads to GitHub via `gh repo view --json url`, replace `gt pr`/`implement-slice` references, and route handoffs to `projects` and `implement`
- skills/git-manager/SKILL.md: update `gitea-pr` references to `implement` (Draft PRs) and `verify` (promotion and merge) while keeping `git-manager` unchanged
- skills/tdd/SKILL.md: update `verify-slice` references and `Suggested Next Step` routing to `verify`
- skills/gt-usage/SKILL.md: document standalone ad-hoc Gitea CLI role outside the GitHub core delivery loop and remove legacy `gitea-plan`/`gitea-pr` handoffs
- README.md: update architecture overview, active skill table, canonical flows, CLI prerequisites (`gh` primary, `gt` optional standalone), and regression test summary for the 4-skill GitHub loop
- profile/AGENTS.md: update homogeneous operational checkpoint wording from Gitea issues to GitHub issues
2026-11-25 15:02:46 -05:00

4.4 KiB

name, description
name description
git-manager Manage Git repository hygiene, branches, worktrees, incremental Conventional Commits, history integration (rebase, squash, cherry-pick, merge), conflict stops, and evidence-first reflog recovery. Use when creating branches or worktrees, committing completed task checkpoints, integrating branches, or recovering lost commits. Not for pull request lifecycle: use implement (Draft PRs) or verify (promotion and merge). Not for diff code inspection: use code-review.

Git Manager

Use when

  • Creating dedicated branches or isolated worktrees before making edits.
  • Recording clean, atomic Conventional Commits as coherent tasks finish, or slicing a dirty tree.
  • Integrating branches (rebase, squash, merge, cherry-pick) or stopping cleanly on conflicts.
  • Recovering lost commits, dangling refs, or broken working-tree state via reflog.
  • Not for Draft PR creation (implement) or PR promotion and merge closeout (verify).
  • Not for multi-axis static diff evaluation: use code-review.

Steps

  1. Inspect repository state. Resolve repository root (git rev-parse --show-toplevel), active branch, upstream tracking, working-tree status (git status --short), repo AGENTS.md conventions, and git log -n 5 --oneline. Run all commands from the target repository root; trust the diff over conversation claims.
  2. Branch and worktree isolation. Enforce branch-before-edits (git switch -c <name>). For parallel slices or spikes without disturbing the current working tree, manage isolated worktrees per references/worktrees.md. Never remove a worktree containing uncommitted or unmerged work without explicit confirmation.
  3. Incremental checkpoint commits. Group coherent, independently revertible slices and format messages per references/commits.md. Enforce the pre-commit gate: right repo, explicit file or hunk staging (never blind git add -A over unrelated or scratch files), relevant checks passing, zero secrets, and message faithful to the diff. Follow profile/AGENTS.md:
    • delivery mode on a non-default working branch: commit each verified unit immediately without pausing for approval, unless an exception applies (main/master, failing checks, or unfamiliar working-tree edits).
    • learning mode: list diff facts, ask 0-2 questions, and pause so the user writes the commit message per profile/learning-contract.md. In /practice, let the user run the commands.
  4. Integration and history editing. Rebase local unshared branches, squash noisy fixups, merge, or cherry-pick per references/history-editing.md. On any conflict: stop immediately, report conflicting files and hunks in prose, never guess resolution, and offer clean --abort.
  5. Evidence-first recovery. For lost commits, detached HEAD, or botched history edits, inspect git reflog and git fsck before acting and restore into recovery/<topic> per references/recovery.md. Never run speculative --hard resets.
  6. Verify post-operation state. Confirm branch ref, new commit SHA (git log -n 3 --oneline), and remaining working-tree status (git status --short).

Your call

  • Direct main/master commits or ambiguous dirty trees: approve any commit on main/master or choose how to slice unfamiliar pre-existing working-tree edits.
  • learning mode commit reasoning: write the commit message and rationale per learning-contract.md.
  • Integration strategy and exceptions: choose rebase vs. merge when non-obvious, and adjudicate conflicts, reverts, or cherry-picks.
  • Destructive operations: explicitly confirm with impact described first per profile/AGENTS.md before git reset --hard, git restore <file>, git clean -fd, force-push, or dirty worktree removal.

Done when

  • Target branch, worktree, checkpoint commit, integration, or recovery branch is verified by SHA and git status --short reflects expected leftover state.

Hands off to

  • code-review: when a branch or commit range is ready for multi-axis static diff review.
  • implement: when a slice branch is ready for Draft PR creation or rework sync.
  • verify: when a reviewed PR is ready for runtime QA, promotion, and merge closeout.
  • document: when a commit or recovery surfaces a decision or insight worth recording separately.