git-ops · diff
git:20261008.59ee80d to git:20261023.bbc2e64
25 added, 50 removed. Audit A to A.
---
name: git-ops
- description: Commit, push, safely rebase an existing branch, create/read/update/close a pull/merge request (GitHub PR or GitLab MR), cut a feature branch, create/resume a managed worktree, or release. Triggers — gcam / gcamp / gcampr / rebase / 解决冲突 / 提 PR / 提 MR / pull request / merge request / 看 PR / 看 MR / 关 PR / 关 MR / checkout / worktree / 切新分支 / 起新分支 / 发版.
+ description: Commit, push, rebase, manage GitHub PRs or GitLab MRs, create/resume branches and worktrees, or publish releases. Use for gcam / gcamp / gcampr / rebase / 解决冲突 / 提 PR / 提 MR / 看 PR / 看 MR / 关 PR / 关 MR / checkout / worktree / 切新分支 / 发版.
---
- Use devloop's scripts as the executable policy. Inspect Git state freely, but do not replace an
- owned workflow with raw `git commit/push`, `git worktree add`, force-push, or hand-written
- `curl`/`glab`/`gh` forge calls.
-
- `<PLUGIN_ROOT>` maps to `${CLAUDE_PLUGIN_ROOT}` on Claude Code and `${PLUGIN_ROOT}` on Codex.
-
- Run Python workflows through `<PLUGIN_ROOT>/scripts/python <PLUGIN_ROOT>/scripts/<name>.py`.
- This launcher supplies the locked dependencies via uv; system Python or the target project's
- environment may not have them.
-
- ## Before mutation
-
- Resolve the task's intent and the live branch/PR state before changing HEAD or files. The current
- checkout is a work site, not automatically the correct baseline for a new task.
-
- | State | Meaning and action |
- |---|---|
- | `PROTECTED` | Trunk or release branch. Analyze it only when it is the intended baseline; create a feature branch before changes. |
- | `HEALTHY` | Active feature branch. Continue only when the task belongs to this branch. |
- | `IN-FLIGHT` | PR/MR open. Keep it for fixes to that proposal; new work needs a fresh branch. |
- | `INACTIVE` | PR/MR merged/closed; historical branch. Do not use it as the current-state baseline or edit it. |
-
- Release/version is a branch role, not another lifecycle state. Use one as the baseline only when
- the task explicitly targets that version.
+ Use devloop's managed scripts for Git and Forge operations; read-only Git inspection is unrestricted.
+ Do not replace these workflows with raw Git mutations or provider-specific API calls.
- ## Mutation rules
+ `<PLUGIN_ROOT>` is the installed plugin directory: `${CLAUDE_PLUGIN_ROOT}` on Claude Code,
+ `${PLUGIN_ROOT}` on Codex. Run Python entrypoints through
+ `<PLUGIN_ROOT>/scripts/python <PLUGIN_ROOT>/scripts/<name>.py` for their locked dependencies.
- 1. Start new work with the branch-create transaction before editing. Commit-time `--branch` remains
- the compatibility path for intentional edit-then-cut flows. Both cut from freshly fetched
- `origin/<target>`; stacking requires explicit `--base`.
- 2. Preserve existing branches and worktrees as-is. Rebase/reset is a separate explicit operation.
- 3. Revalidate forge, remote, and lease state at the mutation boundary; injected context is guidance,
- while the owning script's live check is authoritative.
- 4. Scope staging to the user's files. Never use repo-wide `git add -A`, and never let an ambiguous
- workspace cwd silently select another repo.
- 5. Trust and surface each script's `PLAN:` result. A failure stops the current transaction;
- diagnose it, repair causes within the authorized task, and retry the owning script. Continue
- routine repairs without asking again; ask only when a remedy needs new authorization or a
- material scope decision. Preserve the gates and report unresolved blockers; never substitute
- raw Git/forge mutations or fabricated validation evidence. Merge remains a human action.
+ ## Task boundaries
- Validation scope is automatic; see [repocli](../../references/repocli.md) for direct diff inspection
- and fallback semantics. Do not guess `TEST_FILES` or `LINT_FILES` for lifecycle checks.
+ - Continue an active branch only when the task belongs to its proposal. New work starts through
+ branch/worktree creation before editing; a merged/closed branch is historical, not a new baseline.
+ - Preserve other work and session-owned checkouts. Rebase is a separate requested operation.
+ - Select the actual repository and task files explicitly when the workspace contains other work.
+ - Follow the script's `PLAN:` and live checks. Repair failures within the authorized task and retry
+ the owning entrypoint; preserve validation gates and report any remaining blocker.
+ - Stop at the requested commit, push, PR/MR, or release outcome. Merge remains a human action.
## Routes
- - Start new work on a fresh feature branch → read [[references/branch|branch flow]].
- - Commit, push, or create/reuse a PR/MR → read [[references/commit-flow|commit flow]].
- - Create or resume an isolated checkout → read [[references/worktree|managed worktrees]].
- - Rebase an existing PR/MR branch → read [[references/rebase|safe rebase]].
- - Inspect, update, close, or reply on a PR/MR → read [[references/pr-management|PR/MR management]].
- - Create or inspect a release → read [[references/release|release flow]].
+ | Task | Read |
+ |---|---|
+ | Start a feature branch | [Branch](references/branch.md) |
+ | Create/resume an isolated checkout | [Worktree](references/worktree.md) |
+ | Commit, push, create/reuse PR/MR | [Commit flow](references/commit-flow.md) |
+ | Rebase an existing branch | [Rebase](references/rebase.md) |
+ | Show/list/update/close/reply on PR/MR | [PR management](references/pr-management.md) |
+ | Publish or inspect a release | [Release](references/release.md) |
- Commit-triggered code review is advisory and automatic. Report a surfaced result without taking
- over the session; use the `review` skill for ReviewRun status, Finding Verdicts, fixes, and thread
- resolution.
+ Validation scope and reuse are managed by the workflow; use [validate](../validate/SKILL.md) for
+ standalone checks. Commit-triggered review is automatic and advisory; use
+ [review](../review/SKILL.md) to inspect or handle its findings.