From 80127b6da97ded84171d3c2beaca85433d1e9a4a Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Sat, 31 Oct 2026 21:05:14 -0500 Subject: [PATCH] fix(git-manager): resolve review parity items CR-01 and CR-02 - Align cherry-pick and revert approval wording across SKILL.md, commits.md, and history-editing.md with profile/AGENTS.md (CR-01) - Gate commit message drafting in inspect-flake-update Step 4 on delivery mode so learning mode preserves user message authoring (CR-02) --- skills/git-manager/SKILL.md | 2 +- skills/git-manager/references/commits.md | 2 +- skills/git-manager/references/history-editing.md | 6 +++++- skills/inspect-flake-update/SKILL.md | 10 +++++----- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/skills/git-manager/SKILL.md b/skills/git-manager/SKILL.md index 9d57b96..20ba822 100644 --- a/skills/git-manager/SKILL.md +++ b/skills/git-manager/SKILL.md @@ -51,7 +51,7 @@ description: >- 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 non-trivial cherry-picks. + conflicts, reverts, or cherry-picks. - **Destructive operations**: explicitly confirm with impact described first per `profile/AGENTS.md` before `git reset --hard`, `git restore `, `git clean -fd`, force-push, or dirty worktree removal. diff --git a/skills/git-manager/references/commits.md b/skills/git-manager/references/commits.md index 3b38960..d802552 100644 --- a/skills/git-manager/references/commits.md +++ b/skills/git-manager/references/commits.md @@ -38,7 +38,7 @@ Verify all four checks before creating any commit: 1. Active branch is `main`, `master`, or detached `HEAD`. 2. Relevant checks failed and cannot be resolved within current task scope (never silently waive failing checks). 3. Working tree contains unfamiliar modifications or ambiguous untracked files not produced by the current task; present 2-3 slicing options (recommended first) exposing files and consequences. - 4. Operation involves `git revert`, cross-branch `cherry-pick` adaptation, or rewriting shared history. + 4. Operation involves `git revert`, `cherry-pick`, or rewriting shared history. - **`learning` mode (`profile/learning-contract.md`)**: For each slice, state the facts (files, behavior changed, checks present or missing, risks) and ask 0-2 questions drawn from the diff. Pause so the user writes the commit message. Evaluate the user's draft against the diff (`correct`, `missing`, `wrong`, `unsupported` + assistance level) and let them revise. Write a message only if explicitly asked, recording `shown-solution`. diff --git a/skills/git-manager/references/history-editing.md b/skills/git-manager/references/history-editing.md index 13b31d4..e1c0700 100644 --- a/skills/git-manager/references/history-editing.md +++ b/skills/git-manager/references/history-editing.md @@ -12,11 +12,15 @@ Rules for rewriting or combining history. Read before any of these operations. - On conflicts: stop immediately. Inspect `git status --short` and conflicting hunks. Never guess resolution. Offer `git rebase --abort` to return cleanly to prior state if resolution is uncertain. ## Cherry-pick -1. Inspect the source commit and what it depends on. +1. Inspect the source commit and what it depends on, and confirm approval with the user per `profile/AGENTS.md` before executing. 2. Confirm the target working tree is clean. 3. Cherry-pick, inspect the resulting diff, run validation. 4. On conflicts or hidden dependencies: stop and report. Offer `git cherry-pick --abort`. +## Revert +- Confirm target SHA, blast radius, and user approval per `profile/AGENTS.md` before running `git revert`. +- Run validation after creating the revert commit; on conflicts, stop and offer `git revert --abort`. + ## Merge - Follow the repo's integration policy (merge commit vs fast-forward vs rebase). - Keep merge commits when the branch shape tells a useful story (long-running feature work). diff --git a/skills/inspect-flake-update/SKILL.md b/skills/inspect-flake-update/SKILL.md index feef252..3f207b4 100644 --- a/skills/inspect-flake-update/SKILL.md +++ b/skills/inspect-flake-update/SKILL.md @@ -27,19 +27,19 @@ description: >- 3. **Validate the flake.** Run `nix flake check` to ensure metadata, inputs, and derivations evaluate cleanly. If the repository defines host or package builds, optionally run dry builds without switching or activating. -4. **Synthesize changes and suggest commit message.** Summarize all inspected inputs, - noting their updated versions and key upstream changes. Suggest a Conventional Commit - message (e.g. `chore(flake): bump to ` or `chore(deps): update inputs`). +4. **Synthesize changes and prepare commit.** Summarize all inspected inputs, noting their + updated versions and key upstream changes. In `delivery` mode, draft a Conventional Commit + message (e.g. `chore(flake): bump to `); in `learning` mode, let the user write it. 5. **Hand off.** Hand off to `git-manager` to stage `flake.lock` and commit per session-mode rules. ## Your call - Deciding whether to accept an input update or roll it back. - Choosing whether to run additional dry builds beyond `nix flake check`. -- Approving the commit when on `main`/`master` or in `learning` mode per `profile/AGENTS.md`. +- Approving the commit on `main`/`master`, or writing the message in `learning` mode per `profile/AGENTS.md`. ## Done when - All updated inputs have been reviewed, `nix flake check` passes cleanly, the change - summary and commit message are produced, and handoff to `git-manager` is ready. + summary is produced, and handoff to `git-manager` is ready. ## Hands off to - `git-manager`: to stage `flake.lock` and record the commit.