feat(git-plugin): add complete git workflow automation suite

## Why
The git plugin only covered a partial slice of common git workflows.
This adds the remaining skill set (branches, commits, history, remotes,
submodules, workflow, worktrees) plus a git-orchestrate agent so the
plugin can handle end-to-end git automation instead of a handful of
commands.

## Implementation Notes
Each new skill was validated against its research docs and org
conventions after initial authoring, which surfaced hallucinated
version pins, factual errors, and completeness gaps that were
corrected in the same pass rather than left for follow-up.

## Impact
Bumps the git plugin to 1.3.0.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-04 18:41:09 +00:00
parent 05bb9d6e9f
commit 0239b00944
48 changed files with 2306 additions and 19 deletions

View File

@@ -20,6 +20,8 @@ git commit -m "same message"
## Secret detected (gitleaks)
> Not sourced from the pre-commit research corpus (`context7-pre-commit-com`/`pre-commit-com` cover pre-commit itself, not gitleaks) — general tool knowledge, verify against gitleaks' own docs if precision matters.
Cause: gitleaks found a high-entropy string or known secret pattern in a staged file.
Suggestions:
@@ -28,6 +30,8 @@ Suggestions:
## Shellcheck warning
> Not sourced from the pre-commit research corpus — general tool knowledge, verify against shellcheck's own docs if precision matters.
Cause: shellcheck found a shell script issue. The output includes the file path, line number, and SC-code.
Fix: Look up the SC-code on shellcheck.net or pass `--explain SCxxxx` to shellcheck for a detailed explanation. The most common fixes:
@@ -35,6 +39,44 @@ Fix: Look up the SC-code on shellcheck.net or pass `--explain SCxxxx` to shellch
- SC2046 (unquoted command substitution): wrap in double quotes.
- SC2181 (check exit code of `$?`): use `if command; then` directly.
## `check-hooks-apply` fails
Cause: A hook's `files`/`types` filter matches zero files in the repo — the hook is dead weight.
Fix: Broaden the filter, or remove the hook if it no longer applies to this repo.
## `check-useless-excludes` fails
Cause: An `exclude` pattern matches no files.
Fix: Remove or fix the pattern.
## SSH cloning fails in CI
Cause: The CI environment lacks SSH credentials to clone hook repos over SSH.
Fix: Export `SSH_AUTH_SOCK` in the CI environment, or switch hook repo URLs to HTTPS.
## HTTP proxy needed
Cause: The CI/sandbox network requires a proxy to reach hook repos.
Fix:
```bash
export http_proxy=http://proxy.example.com:3128
export https_proxy=http://proxy.example.com:3128
export no_proxy=localhost,127.0.0.1
```
## `rev` is a branch name — `autoupdate` broke it
Cause: Branch refs are mutable and drift over time; pre-commit resolves them once at install time, so pinning to a branch name (instead of a tag or commit SHA) leads to silent version drift.
Fix:
```bash
pre-commit autoupdate # finds the latest tag and rewrites rev in place
```
## pretty-format-json fails but doesn't fix
Cause: `pretty-format-json` requires `args: [--autofix]` to modify files. Without it, the hook only fails.