[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C45J5KEC7TSPTJ950JBM84":3,"skill-same:01M6C45J5KEC7TSPTJ950JBM84":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":30,"linkOnly":31,"markdownContent":32,"markdownBody":33,"frontMatter":34,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":41,"install":42,"resources":55},"01M6C45J5KEC7TSPTJ950JBM84","persist-changes",null,"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.","Grimblaz\u002Fagent-orchestra","Grimblaz","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F74755849?v=4","01M6C430M9XZDHGHPWQVTQ3KMA","01M6C430RJY3MMX0QAZ3X8DR3Y",3,"MIT","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fpersist-changes\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29],"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":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add Grimblaz\u002Fagent-orchestra --skill persist-changes",{"tool":48,"command":49},"bunx","bunx skills add Grimblaz\u002Fagent-orchestra --skill persist-changes",{"tool":51,"command":52},"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,[56],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"scripts\u002FResolve-PersistDecision.ps1","SCRIPT","脚本",2385,"https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fpersist-changes\u002Fscripts\u002FResolve-PersistDecision.ps1",[63,97,119,135,162,183],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":77,"publishedAt":30},"01M6C48YMJVFHM7DVGG1WWW5RJ","webapp-testing","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).","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[69,74],{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":75,"categoryName":76,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000009","前端开发",[78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,29],"testing","webapp testing","webapp","canvas","tdd","workflow","playwright","test","web","react","component","debugging","development","browser","ci","execution","e2e","game","coverage",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":30},"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).","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[104,105,106,107,20,108,21,109,110,22,111,112,92,113,114,115,116,29,117,118],"verification","verification before completion","review","change","merge","cleanup","run","code-review","intake","loop","verification loop","work","check","evidence","campaign",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":30},"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).","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fvalidation-methodology\u002FSKILL.md",[],[126,127,128,106,129,130,131,132,22,133,93,29,134],"validation","methodology","validation methodology","triage","orchestration","setup","adversarial review","flow","dispatch",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":149,"publishedAt":30},"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.","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fupstream-onboarding\u002FSKILL.md",[141,144],{"categoryNo":142,"categoryName":143,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":145,"categoryName":146,"taxonomyType":147,"taxonomyTypeDesc":148},"01JBSEEDCAT000000000000038","人力资源","PROFESSION","适用职业",[150,151,106,152,153,108,154,21,22,155,156,157,158,159,160,115,116,161,28,29],"onboarding","upstream onboarding","github","research","standards check","protocol","brief","boundary","designer","subagent","planner","user",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":176,"publishedAt":30},"01M6C48GPVE120TGPMD1CS365H","ui-testing","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).","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fui-testing\u002FSKILL.md",[168,169,170,173],{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},{"categoryNo":75,"categoryName":76,"taxonomyType":72,"taxonomyTypeDesc":73},{"categoryNo":171,"categoryName":172,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":174,"categoryName":175,"taxonomyType":147,"taxonomyTypeDesc":148},"01JBSEEDCAT000000000000032","设计师",[78,177,178,179,180,181,81,83,84,85,87,88,89,90,91,182,94,95,29,80],"ui","ui testing","frontend","design","writing","testing patterns",{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":191,"publishedAt":30},"01M6C48DRJ9XBDR2FW0W37DY53","ui-iteration","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).","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fui-iteration\u002FSKILL.md",[189,190],{"categoryNo":75,"categoryName":76,"taxonomyType":72,"taxonomyTypeDesc":73},{"categoryNo":174,"categoryName":175,"taxonomyType":147,"taxonomyTypeDesc":148},[177,192,179,180,106,83,193,22,194,195,196,197,198,115,199,200,29,201],"ui iteration","accessibility","screenshot","Tailwind","polish","ui polish","feedback","redesign","strategy","only"]