[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C45J5KEC7TSPTJ950JBM84":3,"skill-same:01M6C45J5KEC7TSPTJ950JBM84":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":13,"ownerHtmlUrl":52,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":53,"install":54,"resources":67},"01M6C45J5KEC7TSPTJ950JBM84","persist-changes","Git 变更提交与推送","Git-portable commit+push primitive for applied changes. Caller-parameterized; no Code-Conductor session flags. Use after a validated terminal step to commit staged fix files and push to the current branch's PR head remote. DO NOT USE FOR: new-PR creation (that is Code-Conductor Step 4 git push -u origin); force-push; or any scenario requiring git add -A.","用于已应用变更的、可跨 Git 仓库移植的提交+推送原子操作。由调用方传参控制，不使用 Code-Conductor 会话标志。在经校验的终端步骤之后使用，用于提交已暂存的修复文件，并推送到当前分支的 PR 头端远程仓库。请勿用于：新建 PR（那是 Code-Conductor 第 4 步的 git push -u origin）；强制推送；或任何需要 git add -A 的场景。","Grimblaz\u002Fagent-orchestra","Grimblaz","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F74755849?v=4","01M6C430M9XZDHGHPWQVTQ3KMA",null,"01M6C430RJY3MMX0QAZ3X8DR3Y",3,"MIT","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fpersist-changes\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41],"persist changes","terminal","commit","pr","code","git","push","git push","branch","fix","session","use","2026-11-10 10:12:30",false,"---\nname: persist-changes\ndescription: \"Git-portable commit+push primitive for applied changes. Caller-parameterized; no Code-Conductor session flags. Use after a validated terminal step to commit staged fix files and push to the current branch's PR head remote. DO NOT USE FOR: new-PR creation (that is Code-Conductor Step 4 git push -u origin); force-push; or any scenario requiring git add -A.\"\n---\n\n\u003C!-- markdownlint-disable-file MD041 -->\n\n## When to Use\n\n- After a validated terminal step that applied changes to the working tree.\n- After the CE Gate when one runs (idempotent re-invoke is safe — if no new changes, the helper returns `nothing-to-push`).\n- From any orchestrator that has the caller-supplied inputs available.\n- From both Code-Conductor review loops and the spine-runner (#678) review loops.\n\n## When Not to Use\n\n- **New-PR creation** — that is Code-Conductor Step 4's `git push -u origin {branch}` + `gh pr create`.\n- **Force-push** — this skill never emits `--force` or `--force-with-lease`.\n- **When `git add -A` would be required** — the caller must supply the specific file list; bulk-staging is not permitted.\n- **From adversarial review passes** (Code-Critic \u002F Code-Review-Response) — persist\u002Fpush is a non-adversarial action and must not be triggered from within adversarial executor scope.\n\n## Caller Inputs\n\nThe executor (orchestrator) must supply all of the following before invoking `Resolve-PersistDecision.ps1`:\n\n| Input | Type | Acquisition |\n|---|---|---|\n| `fixFiles` | `string[]` | Repo-relative paths to the changed\u002Ffixed files. Never `git add -A`. |\n| `branch` | `string` | Current branch name from `git branch --show-current`. |\n| `isDetached` | `bool` | `true` if `git branch --show-current` returns empty. |\n| `defaultBranch` | `string` | Dynamically resolved via `git symbolic-ref refs\u002Fremotes\u002Forigin\u002FHEAD` (strip `refs\u002Fremotes\u002Forigin\u002F`) or `gh repo view --json defaultBranchRef --jq .defaultBranchRef.name`. **Never hardcoded.** |\n| `headRemote` | `string` | The remote that owns the PR branch. Resolved via `gh pr view --json headRepositoryOwner,headRefName`. Default `origin` on non-fork. |\n| `headRemoteWritable` | `bool` | Whether the executor has write access to `headRemote`. Acquired by the executor (side-effecting — not inside the helper). |\n| `commitPolicyDisabled` | `bool` | From D12 Commit-Policy read (see `## Commit-Policy Opt-Out`). |\n| `hasFixFiles` | `bool` | `true` if `fixFiles` is non-empty. |\n| `isUpToDate` | `bool` | `true` if the working tree has no staged\u002Funstaged changes after `git add {fixFiles}`. |\n| `nonFastForwardProbe` | `bool` | `true` only if `git merge-base --is-ancestor FETCH_HEAD HEAD` exits with status exactly `1` (after `git fetch {headRemote} {branch}`, which populates `FETCH_HEAD`). Any other non-zero exit is a command error that must propagate, not a non-ff signal. **Executor-owned acquisition — NOT computed inside the helper.** |\n\n## Guard Decision Helper (Resolve-PersistDecision.ps1)\n\nThe side-effect-free helper lives at `skills\u002Fpersist-changes\u002Fscripts\u002FResolve-PersistDecision.ps1`. It takes all inputs and returns a decision struct. It performs no git operations itself.\n\n### Inputs\n\nPass as a single hashtable (`$Inputs` key→value):\n\n```text\n{ branch, isDetached, defaultBranch, headRemote, headRemoteWritable,\n  commitPolicyDisabled, hasFixFiles, isUpToDate, nonFastForwardProbe }\n```\n\nEdge case: if `headRemote` is null or empty, treat as `\"origin\"`.\n\n### Outputs\n\n```text\n{ commit: bool, push: bool, push_target_remote: string|null,\n  refuse_reason: string|null, not_pushed_reason: string|null,\n  manual_instruction: string|null }\n```\n\n`push_target_remote` format is the git remote name (e.g. `\"origin\"`, `\"upstream\"`), not a URL.\n\n**No force-push field**: the output struct MUST NOT contain a `force` or `forcePush` field. `push=true` always means a standard non-force push.\n\n### `refuse_reason` \u002F `not_pushed_reason` enum (exhaustive)\n\n```text\n'detached' | 'default-branch' | 'fork-no-write' | 'non-ff' | 'opt-out' | 'nothing-to-push'\n```\n\n### Guard Precedence\n\nEvaluated in this exact order. The first matching condition wins and short-circuits.\n\n1. `isDetached == true`\n   → `commit=false, push=false, refuse_reason='detached'`\n\n2. `branch == defaultBranch`\n   → `commit=false, push=false, refuse_reason='default-branch'`\n\n3. `!hasFixFiles || isUpToDate`\n   → `commit=false, push=false, not_pushed_reason='nothing-to-push'`\n\n4. Else → `commit=true`, then evaluate the push gate in order:\n\n   a. `commitPolicyDisabled == true`\n      → `push=false, not_pushed_reason='opt-out'`, set `manual_instruction` to:\n      `\"Commit-Policy disabled — changes committed to '{branch}'. Push manually: git push {headRemote} HEAD:{branch}\"`\n\n   b. `!headRemoteWritable`\n      → `push=false, not_pushed_reason='fork-no-write'`\n\n   c. `nonFastForwardProbe == true`\n      → `push=false, not_pushed_reason='non-ff'`\n\n   d. Else → `push=true, push_target_remote=headRemote`\n\n## Executor Contract\n\nThe orchestrating executor is responsible for the following steps in order.\n\n### Step 1: Acquire side-effecting inputs\n\nAcquire the following before calling the helper (these involve git I\u002FO and must not be inside the pure helper):\n\n- **`nonFastForwardProbe`**: run `git fetch {headRemote} {branch}` (this populates `FETCH_HEAD` with the fetched branch tip) then `git merge-base --is-ancestor FETCH_HEAD HEAD`. Set `nonFastForwardProbe=true` only when that command exits with status exactly `1` — a non-ff means the fetched remote tip is NOT an ancestor of local HEAD (the branches have diverged), so a plain non-force push would be rejected. Any other non-zero exit from `git merge-base` (e.g. `128` for a bad\u002Fmissing ref) is a command error, not a non-ff signal, and must propagate rather than being silently treated as `non-ff`. **Exception**: if `git fetch` exits non-zero because the remote ref does not exist (unknown ref — branch not yet on the remote), set `nonFastForwardProbe=false`. A branch with no remote tracking ref is not non-fast-forward.\n- **`headRemoteWritable`**: attempt a dry-run push (`git push --dry-run {headRemote} HEAD:{branch}`) or use `gh repo view` to confirm write access.\n\n### Step 2: Call `Resolve-PersistDecision.ps1`\n\nPass all inputs. Capture the output struct.\n\n**Invocation form is load-bearing.** This file defines a function; it does not execute one. Dot-source\nit, then call the function. Resolve the path from the repository root rather than the caller's current\ndirectory — a subagent or command launch can start anywhere, and a shell `cd` does not persist between\ntool calls:\n\n```powershell\n$repoRoot = (git rev-parse --show-toplevel)\n. (Join-Path $repoRoot 'skills\u002Fpersist-changes\u002Fscripts\u002FResolve-PersistDecision.ps1')\n$decision = Resolve-PersistDecision -Inputs $inputs\n```\n\nInvoking the script with `&` instead runs it and returns `$null` — the function is never defined and\nno decision is produced. What happens next depends on strict mode, and neither branch is safe:\n\n- Under `Set-StrictMode -Version Latest`, reading any field of that `$null` throws\n  `PropertyNotFoundException` (measured) — including inside an `if (-not $decision.commit)` guard.\n- Without strict mode, every field reads falsy, so a guard silently takes its negative branch.\n\nSo check the result explicitly and fail closed:\n\n```powershell\nif ($null -eq $decision) { throw 'Resolve-PersistDecision returned no decision - dot-source the script, do not invoke it with &' }\n```\n\n### Step 3: If `commit=false`\n\nSurface the `refuse_reason` loudly and stop. Do not attempt any git operations. Return the reason to the caller for routing.\n\n### Step 4: If `commit=true`\n\nExecute in order:\n\n1. `git add {fixFiles}` (file list only — never `git add -A`).\n2. Load `skills\u002Fpre-commit-formatting\u002FSKILL.md` and execute format-before-commit.\n3. `git commit -m \"fix({issue}): apply review-accepted changes\"` (or an equivalent commit message reflecting the actual issue and context).\n\n### Step 5: Consume `push_target_remote`\n\nUse exactly the value returned by the helper. Do NOT re-resolve the remote independently.\n\n### Step 6: If `push=true`\n\n`git push {push_target_remote} HEAD:{branch}`\n\n**MUST NOT add `--force` or `--force-with-lease`** to any push command.\n\nOn non-zero exit from `git push`, surface the failure loudly — emit git's stderr and exit code to the user. Do not silently absorb a runtime push failure or claim success in the Response Summary.\n\n### Step 7: If `push=false`\n\nSurface the `not_pushed_reason` loudly. If `not_pushed_reason='opt-out'`, emit the `manual_instruction` text verbatim to the user — do not silently drop it.\n\n### Cross-reference note\n\n\u003C!-- related: persist-changes \u003C-> step-commit (separate by design)\n  step-commit is VS Code-SCM-coupled and Conductor-scoped and uses a hardcoded\n  branch list (skills\u002Fstep-commit\u002FSKILL.md:28) that DD1 forbids. persist-changes\n  is git-portable and uses dynamic default-branch resolution. -->\n\nThis executor contract is step-commit separate by design from `skills\u002Fstep-commit\u002FSKILL.md`. That skill is VS Code-SCM-coupled and Conductor-scoped; this skill is git-portable and designed for use from any orchestrator including the spine-runner.\n\n## Commit-Policy Opt-Out\n\nHow to detect `commitPolicyDisabled` (D12 read):\n\n1. Read `.github\u002Fcopilot-instructions.md` (if it exists).\n2. Find the `## Commit Policy` heading via regex `^## Commit Policy`.\n3. Under that heading, find the `auto-commit:` line.\n4. Value `disabled` (case-insensitive) → `commitPolicyDisabled = true`.\n5. Any other value, missing line, or missing file → `commitPolicyDisabled = false`. Log a warning if the heading exists but the `auto-commit:` line is absent or malformed.\n\nWhen `commitPolicyDisabled = true`:\n\n- The executor **commits** the changes (so work is not lost).\n- The executor does **NOT push**.\n- The executor emits the `manual_instruction` from the helper verbatim:\n  `\"Commit-Policy disabled — changes committed to '{branch}'. Push manually: git push {headRemote} HEAD:{branch}\"`\n- This instruction is emitted loudly — not silently dropped.\n\n## Response Summary Shape\n\nAfter the persist attempt completes, the executor assembles a Response Summary containing all of the following:\n\n1. **Per-finding disposition summary** — from the review judgment: which findings were accepted, rejected, or escalated.\n2. **Commit SHA(s) applied** — from `git rev-parse HEAD` immediately after the commit step.\n3. **Push ref\u002Fresult** — one of:\n   - `{headRemote}\u002F{branch}` if push succeeded (standard non-force push).\n   - The `not_pushed_reason` value + `manual_instruction` text if push was skipped.\n   - `attempted-and-failed: {stderr} (exit {code})` if `git push` executed but returned non-zero — surface loudly; do not claim success.\n4. **Explicit not-pushed list** — when any accepted findings were NOT pushed, list each one with its `not_pushed_reason`. This includes the distinct \"nothing to push (all deferred\u002Frejected\u002Fescalated)\" state when zero findings were accepted and `not_pushed_reason='nothing-to-push'`.\n5. **Close-out record amendment outcome, one per judge pass this run reached** — one of `amended`, `no-new-findings`, `not-applicable`, `no-issue-resolved`, or `skipped`, carrying the `⚠️ close-out record amendment skipped — {reason}` literal on the last two. State how many passes fired. That step is **advisory** and never halts the run, so this summary is its only trace on this path; without the item a skipped amendment disappears into a summary that satisfies every other requirement here. The step itself — trigger, moment, executor, transport, and outcome set — lives at `skills\u002Freview-judgment\u002FSKILL.md` § Close-Out Record Amendment; this item reports its outcome and restates none of it.\n\nThe canonical shape is `skills\u002Fvalidation-methodology\u002Freferences\u002Freview-reconciliation.md` § Response Commit & Push. This list must carry the same item count; a four-item copy beside the persist call is how item 5 goes missing at the one moment it is being reported.\n\n## Validation\n\nRun these checks after authoring or modifying this skill:\n\n```sh\nmarkdownlint-cli2 skills\u002Fpersist-changes\u002FSKILL.md\n```\n\n```sh\ngrep -n \"Resolve-PersistDecision\" skills\u002Fpersist-changes\u002FSKILL.md\n```\n\nMust find references in both the `## Guard Decision Helper` section and the `## Executor Contract` section.\n\n```sh\ngrep -n \"refuse_reason\\|not_pushed_reason\" skills\u002Fpersist-changes\u002FSKILL.md\n```\n\nMust find the enum definition.\n\n```sh\ngrep -n \"step-commit\" skills\u002Fpersist-changes\u002FSKILL.md\n```\n\nMust find the cross-reference comment in `## Executor Contract`.\n\n```sh\ngrep -n \"pre-commit-formatting\" skills\u002Fpersist-changes\u002FSKILL.md\n```\n\nMust find the format-before-commit reference in `## Executor Contract`.\n\n## Related\n\n- `skills\u002Fstep-commit\u002FSKILL.md` — VS Code-SCM-coupled step commit (separate by design; see executor contract cross-reference note)\n- `skills\u002Fpre-commit-formatting\u002FSKILL.md` — format-before-commit gate loaded by the executor in Step 4\n- `skills\u002Fcode-review-intake\u002FSKILL.md` — the convergence contract that fires this skill as a terminal step (s5)\n- `skills\u002Fvalidation-methodology\u002Freferences\u002Freview-reconciliation.md` — the SSOT for Response Summary shape (s4)\n","\u003C!-- markdownlint-disable-file MD041 -->\n\n## When to Use\n\n- After a validated terminal step that applied changes to the working tree.\n- After the CE Gate when one runs (idempotent re-invoke is safe — if no new changes, the helper returns `nothing-to-push`).\n- From any orchestrator that has the caller-supplied inputs available.\n- From both Code-Conductor review loops and the spine-runner (#678) review loops.\n\n## When Not to Use\n\n- **New-PR creation** — that is Code-Conductor Step 4's `git push -u origin {branch}` + `gh pr create`.\n- **Force-push** — this skill never emits `--force` or `--force-with-lease`.\n- **When `git add -A` would be required** — the caller must supply the specific file list; bulk-staging is not permitted.\n- **From adversarial review passes** (Code-Critic \u002F Code-Review-Response) — persist\u002Fpush is a non-adversarial action and must not be triggered from within adversarial executor scope.\n\n## Caller Inputs\n\nThe executor (orchestrator) must supply all of the following before invoking `Resolve-PersistDecision.ps1`:\n\n| Input | Type | Acquisition |\n|---|---|---|\n| `fixFiles` | `string[]` | Repo-relative paths to the changed\u002Ffixed files. Never `git add -A`. |\n| `branch` | `string` | Current branch name from `git branch --show-current`. |\n| `isDetached` | `bool` | `true` if `git branch --show-current` returns empty. |\n| `defaultBranch` | `string` | Dynamically resolved via `git symbolic-ref refs\u002Fremotes\u002Forigin\u002FHEAD` (strip `refs\u002Fremotes\u002Forigin\u002F`) or `gh repo view --json defaultBranchRef --jq .defaultBranchRef.name`. **Never hardcoded.** |\n| `headRemote` | `string` | The remote that owns the PR branch. Resolved via `gh pr view --json headRepositoryOwner,headRefName`. Default `origin` on non-fork. |\n| `headRemoteWritable` | `bool` | Whether the executor has write access to `headRemote`. Acquired by the executor (side-effecting — not inside the helper). |\n| `commitPolicyDisabled` | `bool` | From D12 Commit-Policy read (see `## Commit-Policy Opt-Out`). |\n| `hasFixFiles` | `bool` | `true` if `fixFiles` is non-empty. |\n| `isUpToDate` | `bool` | `true` if the working tree has no staged\u002Funstaged changes after `git add {fixFiles}`. |\n| `nonFastForwardProbe` | `bool` | `true` only if `git merge-base --is-ancestor FETCH_HEAD HEAD` exits with status exactly `1` (after `git fetch {headRemote} {branch}`, which populates `FETCH_HEAD`). Any other non-zero exit is a command error that must propagate, not a non-ff signal. **Executor-owned acquisition — NOT computed inside the helper.** |\n\n## Guard Decision Helper (Resolve-PersistDecision.ps1)\n\nThe side-effect-free helper lives at `skills\u002Fpersist-changes\u002Fscripts\u002FResolve-PersistDecision.ps1`. It takes all inputs and returns a decision struct. It performs no git operations itself.\n\n### Inputs\n\nPass as a single hashtable (`$Inputs` key→value):\n\n```text\n{ branch, isDetached, defaultBranch, headRemote, headRemoteWritable,\n  commitPolicyDisabled, hasFixFiles, isUpToDate, nonFastForwardProbe }\n```\n\nEdge case: if `headRemote` is null or empty, treat as `\"origin\"`.\n\n### Outputs\n\n```text\n{ commit: bool, push: bool, push_target_remote: string|null,\n  refuse_reason: string|null, not_pushed_reason: string|null,\n  manual_instruction: string|null }\n```\n\n`push_target_remote` format is the git remote name (e.g. `\"origin\"`, `\"upstream\"`), not a URL.\n\n**No force-push field**: the output struct MUST NOT contain a `force` or `forcePush` field. `push=true` always means a standard non-force push.\n\n### `refuse_reason` \u002F `not_pushed_reason` enum (exhaustive)\n\n```text\n'detached' | 'default-branch' | 'fork-no-write' | 'non-ff' | 'opt-out' | 'nothing-to-push'\n```\n\n### Guard Precedence\n\nEvaluated in this exact order. The first matching condition wins and short-circuits.\n\n1. `isDetached == true`\n   → `commit=false, push=false, refuse_reason='detached'`\n\n2. `branch == defaultBranch`\n   → `commit=false, push=false, refuse_reason='default-branch'`\n\n3. `!hasFixFiles || isUpToDate`\n   → `commit=false, push=false, not_pushed_reason='nothing-to-push'`\n\n4. Else → `commit=true`, then evaluate the push gate in order:\n\n   a. `commitPolicyDisabled == true`\n      → `push=false, not_pushed_reason='opt-out'`, set `manual_instruction` to:\n      `\"Commit-Policy disabled — changes committed to '{branch}'. Push manually: git push {headRemote} HEAD:{branch}\"`\n\n   b. `!headRemoteWritable`\n      → `push=false, not_pushed_reason='fork-no-write'`\n\n   c. `nonFastForwardProbe == true`\n      → `push=false, not_pushed_reason='non-ff'`\n\n   d. Else → `push=true, push_target_remote=headRemote`\n\n## Executor Contract\n\nThe orchestrating executor is responsible for the following steps in order.\n\n### Step 1: Acquire side-effecting inputs\n\nAcquire the following before calling the helper (these involve git I\u002FO and must not be inside the pure helper):\n\n- **`nonFastForwardProbe`**: run `git fetch {headRemote} {branch}` (this populates `FETCH_HEAD` with the fetched branch tip) then `git merge-base --is-ancestor FETCH_HEAD HEAD`. Set `nonFastForwardProbe=true` only when that command exits with status exactly `1` — a non-ff means the fetched remote tip is NOT an ancestor of local HEAD (the branches have diverged), so a plain non-force push would be rejected. Any other non-zero exit from `git merge-base` (e.g. `128` for a bad\u002Fmissing ref) is a command error, not a non-ff signal, and must propagate rather than being silently treated as `non-ff`. **Exception**: if `git fetch` exits non-zero because the remote ref does not exist (unknown ref — branch not yet on the remote), set `nonFastForwardProbe=false`. A branch with no remote tracking ref is not non-fast-forward.\n- **`headRemoteWritable`**: attempt a dry-run push (`git push --dry-run {headRemote} HEAD:{branch}`) or use `gh repo view` to confirm write access.\n\n### Step 2: Call `Resolve-PersistDecision.ps1`\n\nPass all inputs. Capture the output struct.\n\n**Invocation form is load-bearing.** This file defines a function; it does not execute one. Dot-source\nit, then call the function. Resolve the path from the repository root rather than the caller's current\ndirectory — a subagent or command launch can start anywhere, and a shell `cd` does not persist between\ntool calls:\n\n```powershell\n$repoRoot = (git rev-parse --show-toplevel)\n. (Join-Path $repoRoot 'skills\u002Fpersist-changes\u002Fscripts\u002FResolve-PersistDecision.ps1')\n$decision = Resolve-PersistDecision -Inputs $inputs\n```\n\nInvoking the script with `&` instead runs it and returns `$null` — the function is never defined and\nno decision is produced. What happens next depends on strict mode, and neither branch is safe:\n\n- Under `Set-StrictMode -Version Latest`, reading any field of that `$null` throws\n  `PropertyNotFoundException` (measured) — including inside an `if (-not $decision.commit)` guard.\n- Without strict mode, every field reads falsy, so a guard silently takes its negative branch.\n\nSo check the result explicitly and fail closed:\n\n```powershell\nif ($null -eq $decision) { throw 'Resolve-PersistDecision returned no decision - dot-source the script, do not invoke it with &' }\n```\n\n### Step 3: If `commit=false`\n\nSurface the `refuse_reason` loudly and stop. Do not attempt any git operations. Return the reason to the caller for routing.\n\n### Step 4: If `commit=true`\n\nExecute in order:\n\n1. `git add {fixFiles}` (file list only — never `git add -A`).\n2. Load `skills\u002Fpre-commit-formatting\u002FSKILL.md` and execute format-before-commit.\n3. `git commit -m \"fix({issue}): apply review-accepted changes\"` (or an equivalent commit message reflecting the actual issue and context).\n\n### Step 5: Consume `push_target_remote`\n\nUse exactly the value returned by the helper. Do NOT re-resolve the remote independently.\n\n### Step 6: If `push=true`\n\n`git push {push_target_remote} HEAD:{branch}`\n\n**MUST NOT add `--force` or `--force-with-lease`** to any push command.\n\nOn non-zero exit from `git push`, surface the failure loudly — emit git's stderr and exit code to the user. Do not silently absorb a runtime push failure or claim success in the Response Summary.\n\n### Step 7: If `push=false`\n\nSurface the `not_pushed_reason` loudly. If `not_pushed_reason='opt-out'`, emit the `manual_instruction` text verbatim to the user — do not silently drop it.\n\n### Cross-reference note\n\n\u003C!-- related: persist-changes \u003C-> step-commit (separate by design)\n  step-commit is VS Code-SCM-coupled and Conductor-scoped and uses a hardcoded\n  branch list (skills\u002Fstep-commit\u002FSKILL.md:28) that DD1 forbids. persist-changes\n  is git-portable and uses dynamic default-branch resolution. -->\n\nThis executor contract is step-commit separate by design from `skills\u002Fstep-commit\u002FSKILL.md`. That skill is VS Code-SCM-coupled and Conductor-scoped; this skill is git-portable and designed for use from any orchestrator including the spine-runner.\n\n## Commit-Policy Opt-Out\n\nHow to detect `commitPolicyDisabled` (D12 read):\n\n1. Read `.github\u002Fcopilot-instructions.md` (if it exists).\n2. Find the `## Commit Policy` heading via regex `^## Commit Policy`.\n3. Under that heading, find the `auto-commit:` line.\n4. Value `disabled` (case-insensitive) → `commitPolicyDisabled = true`.\n5. Any other value, missing line, or missing file → `commitPolicyDisabled = false`. Log a warning if the heading exists but the `auto-commit:` line is absent or malformed.\n\nWhen `commitPolicyDisabled = true`:\n\n- The executor **commits** the changes (so work is not lost).\n- The executor does **NOT push**.\n- The executor emits the `manual_instruction` from the helper verbatim:\n  `\"Commit-Policy disabled — changes committed to '{branch}'. Push manually: git push {headRemote} HEAD:{branch}\"`\n- This instruction is emitted loudly — not silently dropped.\n\n## Response Summary Shape\n\nAfter the persist attempt completes, the executor assembles a Response Summary containing all of the following:\n\n1. **Per-finding disposition summary** — from the review judgment: which findings were accepted, rejected, or escalated.\n2. **Commit SHA(s) applied** — from `git rev-parse HEAD` immediately after the commit step.\n3. **Push ref\u002Fresult** — one of:\n   - `{headRemote}\u002F{branch}` if push succeeded (standard non-force push).\n   - The `not_pushed_reason` value + `manual_instruction` text if push was skipped.\n   - `attempted-and-failed: {stderr} (exit {code})` if `git push` executed but returned non-zero — surface loudly; do not claim success.\n4. **Explicit not-pushed list** — when any accepted findings were NOT pushed, list each one with its `not_pushed_reason`. This includes the distinct \"nothing to push (all deferred\u002Frejected\u002Fescalated)\" state when zero findings were accepted and `not_pushed_reason='nothing-to-push'`.\n5. **Close-out record amendment outcome, one per judge pass this run reached** — one of `amended`, `no-new-findings`, `not-applicable`, `no-issue-resolved`, or `skipped`, carrying the `⚠️ close-out record amendment skipped — {reason}` literal on the last two. State how many passes fired. That step is **advisory** and never halts the run, so this summary is its only trace on this path; without the item a skipped amendment disappears into a summary that satisfies every other requirement here. The step itself — trigger, moment, executor, transport, and outcome set — lives at `skills\u002Freview-judgment\u002FSKILL.md` § Close-Out Record Amendment; this item reports its outcome and restates none of it.\n\nThe canonical shape is `skills\u002Fvalidation-methodology\u002Freferences\u002Freview-reconciliation.md` § Response Commit & Push. This list must carry the same item count; a four-item copy beside the persist call is how item 5 goes missing at the one moment it is being reported.\n\n## Validation\n\nRun these checks after authoring or modifying this skill:\n\n```sh\nmarkdownlint-cli2 skills\u002Fpersist-changes\u002FSKILL.md\n```\n\n```sh\ngrep -n \"Resolve-PersistDecision\" skills\u002Fpersist-changes\u002FSKILL.md\n```\n\nMust find references in both the `## Guard Decision Helper` section and the `## Executor Contract` section.\n\n```sh\ngrep -n \"refuse_reason\\|not_pushed_reason\" skills\u002Fpersist-changes\u002FSKILL.md\n```\n\nMust find the enum definition.\n\n```sh\ngrep -n \"step-commit\" skills\u002Fpersist-changes\u002FSKILL.md\n```\n\nMust find the cross-reference comment in `## Executor Contract`.\n\n```sh\ngrep -n \"pre-commit-formatting\" skills\u002Fpersist-changes\u002FSKILL.md\n```\n\nMust find the format-before-commit reference in `## Executor Contract`.\n\n## Related\n\n- `skills\u002Fstep-commit\u002FSKILL.md` — VS Code-SCM-coupled step commit (separate by design; see executor contract cross-reference note)\n- `skills\u002Fpre-commit-formatting\u002FSKILL.md` — format-before-commit gate loaded by the executor in Step 4\n- `skills\u002Fcode-review-intake\u002FSKILL.md` — the convergence contract that fires this skill as a terminal step (s5)\n- `skills\u002Fvalidation-methodology\u002Freferences\u002Freview-reconciliation.md` — the SSOT for Response Summary shape (s4)\n",{"name":5,"description":7},"main","d5486aacc32c9ca1b07173cfd530f8fe75c29e58","skills\u002Fpersist-changes",0,"https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra","https:\u002F\u002Fgithub.com\u002FGrimblaz","2026-08-16 01:12:46",{"source":9,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add Grimblaz\u002Fagent-orchestra --skill persist-changes",{"tool":60,"command":61},"bunx","bunx skills add Grimblaz\u002Fagent-orchestra --skill persist-changes",{"tool":63,"command":64},"pnpm","pnpm dlx skills add Grimblaz\u002Fagent-orchestra --skill persist-changes","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fpersist-changes\u002FSKILL.md",true,[68],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"scripts\u002FResolve-PersistDecision.ps1","SCRIPT","脚本",2385,"https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fpersist-changes\u002Fscripts\u002FResolve-PersistDecision.ps1",[75,109,137,157,184,201],{"skillNo":76,"name":77,"nameZh":78,"description":79,"descriptionZh":80,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":81,"categories":82,"keywords":89,"publishedAt":42},"01M6C48YMJVFHM7DVGG1WWW5RJ","webapp-testing","Playwright 端到端测试","Playwright end-to-end testing guidance for web apps, with practical patterns and setup steps. Use when creating or improving browser-based E2E coverage, test stability, and CI execution. DO NOT USE FOR: React component tests (use ui-testing), canvas game interaction (use browser-canvas-testing), TDD workflow (use test-driven-development), debugging failures (use systematic-debugging), or randomized property tests (use property-based-testing).","面向 Web 应用的 Playwright 端到端测试指南，包含实用模式和设置步骤。在创建或改进基于浏览器的 E2E 覆盖率、测试稳定性和 CI 执行时使用。不要用于：React 组件测试（使用 ui-testing）、Canvas 游戏交互（使用 browser-canvas-testing）、TDD 工作流（使用 test-driven-development）、失败调试（使用 systematic-debugging）或随机化属性测试（使用 property-based-testing）。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[83,86],{"categoryNo":84,"categoryName":85,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":87,"categoryName":88,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,41],"testing","webapp testing","webapp","canvas","tdd","workflow","playwright","test","web","react","component","debugging","development","browser","ci","execution","e2e","game","coverage",{"skillNo":110,"name":111,"nameZh":112,"description":113,"descriptionZh":114,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":115,"categories":116,"keywords":121,"publishedAt":42},"01M6C48TNNP2KCSQXV8YK7SK49","verification-before-completion","任务完成前验证","Evidence-based verification checklist before marking work complete. Use before PRs, releases, marking tickets done, or any \"I'm finished\" declaration; also when naming a baseline commit for a differential suite claim, when designing a mutation campaign or red-run evidence, when making an absence claim, a universal claim, or a one-time demonstration offered as a standing guarantee, when attributing a measurement or claiming a sweep or verification loop is complete, and when stating what a check or a CI suite will do about a change. DO NOT USE FOR: post-merge cleanup or archival (use post-pr-review) or processing GitHub review comments (use code-review-intake).","在将工作标记为完成前使用的基于证据的验证清单。适用于提交 PR、发布、将工单标记为完成，或任何「我已完成」的声明之前；也适用于为差异测试套件的主张指定基线提交、设计变异测试活动或红灯运行证据、做出「不存在」的主张、普遍性主张，或将一次性演示作为长期保证提供时、归因某项测量结果或声称某次扫描或验证循环已完成时，以及陈述某项检查或 CI 套件将如何处理某个变更时。不要用于：合并后清理或归档（使用 post-pr-review），或处理 GitHub 审查意见（使用 code-review-intake）。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[117,118],{"categoryNo":84,"categoryName":85,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":119,"categoryName":120,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8C48JNVH0P83Z0KVKAQ4819","成果验证与价值评估",[122,123,124,125,32,126,33,127,128,34,129,130,104,131,132,133,134,41,135,136],"verification","verification before completion","review","change","merge","cleanup","run","code-review","intake","loop","verification loop","work","check","evidence","campaign",{"skillNo":138,"name":139,"nameZh":140,"description":141,"descriptionZh":142,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":143,"categories":144,"keywords":147,"publishedAt":42},"01M6C48QZWNTP7JGKD32QZAKKX","validation-methodology","验证与审查方法论","Reusable validation and review methodology for staged validation, failure triage, and prosecution-depth setup. Use when running validation ladders, triaging failures, or executing adversarial review passes. DO NOT USE FOR: CE Gate orchestration, specialist dispatch ownership, or step execution flow (keep those in Code-Conductor).","用于分阶段验证、故障分诊和追查深度设置的可复用验证与审查方法论。在运行验证阶梯、对失败进行分诊或执行对抗性审查时使用。不要用于：CE Gate 编排、专家派发的职责归属或步骤执行流程（这些保留在 Code-Conductor 中）。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fvalidation-methodology\u002FSKILL.md",[145,146],{"categoryNo":84,"categoryName":85,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":119,"categoryName":120,"taxonomyType":27,"taxonomyTypeDesc":28},[148,149,150,124,151,152,153,154,34,155,105,41,156],"validation","methodology","validation methodology","triage","orchestration","setup","adversarial review","flow","dispatch",{"skillNo":158,"name":159,"nameZh":160,"description":161,"descriptionZh":162,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":163,"categories":164,"keywords":171,"publishedAt":42},"01M6C48MCAHG5Z79BJ369CRYRZ","upstream-onboarding","上游智能体接手协议","Shared opening-phase protocol for upstream agents (Experience-Owner, Solution-Designer, Issue-Planner) and Code-Conductor when invoked on an existing GitHub issue. Renders a scaled context brief and runs a standards check on inherited work at each phase boundary. Use when a user-invocable agent receives a request referencing an existing GitHub issue and must load solution-authoring and upstream-onboarding at the opening phase. DO NOT USE FOR: subagent dispatches (which already operate within an assessed session context); post-merge review (use post-pr-review); research or non-tree subagents.","供上游智能体（Experience-Owner、Solution-Designer、Issue-Planner）与 Code-Conductor 在针对现有 GitHub issue 被调用时使用的共享开场阶段协议。它会生成适配规模的上下文简报，并在每个阶段边界对承接的工作执行标准检查。当用户可调用的智能体收到引用现有 GitHub issue 的请求、且必须在开场阶段加载 solution-authoring 与 upstream-onboarding 时使用。不要用于：子智能体派发（其已在经评估的会话上下文中运行）、合并后审查（使用 post-pr-review）、研究类或非树形子智能体。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fupstream-onboarding\u002FSKILL.md",[165,168],{"categoryNo":166,"categoryName":167,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",{"categoryNo":169,"categoryName":170,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发",[172,173,124,174,175,126,176,33,34,177,178,179,180,181,182,133,134,183,40,41],"onboarding","upstream onboarding","github","research","standards check","protocol","brief","boundary","designer","subagent","planner","user",{"skillNo":185,"name":186,"nameZh":187,"description":188,"descriptionZh":189,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":190,"categories":191,"keywords":194,"publishedAt":42},"01M6C48GPVE120TGPMD1CS365H","ui-testing","React 组件测试策略","Resilient React component testing strategies focusing on user behavior. Use when writing or reviewing component-level React tests, fixing flaky component tests, or establishing React testing patterns. DO NOT USE FOR: Playwright E2E tests (use webapp-testing), canvas game interaction (use browser-canvas-testing), TDD workflow (use test-driven-development), debugging failures (use systematic-debugging), UI component design (use frontend-design), or randomized property tests (use property-based-testing).","以用户行为为核心的弹性 React 组件测试策略。适用于编写或审阅组件级 React 测试、修复不稳定的组件测试，或建立 React 测试模式。不适用于：Playwright E2E 测试（使用 webapp-testing）、canvas 游戏交互（使用 browser-canvas-testing）、TDD 工作流（使用 test-driven-development）、失败调试（使用 systematic-debugging）、UI 组件设计（使用 frontend-design），或随机属性测试（使用 property-based-testing）。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fui-testing\u002FSKILL.md",[192,193],{"categoryNo":84,"categoryName":85,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":87,"categoryName":88,"taxonomyType":27,"taxonomyTypeDesc":28},[90,195,196,197,198,199,93,95,96,97,99,100,101,102,103,200,106,107,41,92],"ui","ui testing","frontend","design","writing","testing patterns",{"skillNo":202,"name":203,"nameZh":204,"description":205,"descriptionZh":206,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":207,"categories":208,"keywords":215,"publishedAt":42},"01M6C48DRJ9XBDR2FW0W37DY53","ui-iteration","UI 界面视觉迭代优化","Reusable screenshot-driven UI polish workflow for iterative visual refinement. Use when improving layout, hierarchy, spacing, feedback, or Tailwind-based presentation through repeated review-and-adjust passes. DO NOT USE FOR: functional bug fixing, accessibility-only audits, or major redesign strategy work (use Code-Smith or frontend-design).","可复用的截图驱动 UI 打磨工作流，用于迭代式视觉优化。适用于通过反复审阅与调整来改进布局、层级、间距、反馈或基于 Tailwind 的呈现效果。不适用于：功能性 Bug 修复、仅针对无障碍的审计，或重大重设计策略工作（使用 Code-Smith 或 frontend-design）。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fui-iteration\u002FSKILL.md",[209,212],{"categoryNo":210,"categoryName":211,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQMKHSMFVQHR2KYAEVN","界面设计师",{"categoryNo":213,"categoryName":214,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[195,216,197,198,124,95,217,34,218,219,220,221,222,133,223,224,41,225],"ui iteration","accessibility","screenshot","Tailwind","polish","ui polish","feedback","redesign","strategy","only"]