[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77K323NEPWYCCRGYSMNEY9S":3,"skill-same:01M77K323NEPWYCCRGYSMNEY9S":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M77K323NEPWYCCRGYSMNEY9S","stabilize-loop",null,"Opt-in goal-driven loop that keeps running \u002Fsw-stabilize and \u002Fsw-watch-ci until the all-checks gate is green and no actionable review threads remain. Use when the user asks to stabilize until green or from \u002Fship. Single-pass \u002Fsw-stabilize remains default; does not merge.","grdavies\u002Fshipwright","grdavies","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2638082?v=4","01M77JZCZJTWB8WBWX4NNW8MNP","Ross Davies","01M77JZD0S2Q4JZEM0310T9A73",2,"MIT","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fstabilize-loop\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: stabilize-loop\ndescription: Opt-in goal-driven loop that keeps running \u002Fsw-stabilize and \u002Fsw-watch-ci until the all-checks gate is green and no actionable review threads remain. Use when the user asks to stabilize until green or from \u002Fship. Single-pass \u002Fsw-stabilize remains default; does not merge.\n---\n# stabilize-loop\n\nDrives the current PR to a green gate by repeating the stabilize→verify→push→watch cycle, waking on CI\ncompletion and new review comments. **Opt-in only** — the default for `\u002Fsw-stabilize` is a single pass.\nThis wrapper never changes stabilize's discipline (reply-before-resolve, verify-before-resolve, no\nmass-resolve); it just repeats it under hard stops.\n\n\n**Model tier:** build — resolve via `python3 scripts\u002Fsw_bootstrap.py resolve-model-tier.py -- --skill stabilize-loop`. When using the Task tool for subagent dispatch, resolve concrete model IDs from `models.tiers` in config (never semantic tier names in subagent `model:` frontmatter).\n\n## Success predicate\n\nStop with success when the `checks-gate` verdict (from `scripts\u002Fcheck-gate.py`) is **green**:\n\n- every **required** check passes under the configured all-checks policy (PR test-plan **advisory**\n  job failures appear in `advisoryFailingChecks` but do not block — see `prTestPlan` in gate JSON), and\n- zero checks pending, and\n- **External review is settled for the current head** — `reviewLanded == true` (provider-agnostic; legacy `coderabbitLanded` mirrors the same predicate when `coderabbitState` is\n  `landed`, `skipped`, or `absent`). Because every pass pushes a new fix commit, this means a **fresh**\n  CodeRabbit review must land for that commit, *or* CodeRabbit explicitly skips it (`skipped` — \"no new\n  commits to review\"); a stale review of the pre-fix head with no skip marker never counts. This is the\n  predicate's most important clause: \"the threads I just fixed are resolved\" is **not** success — the\n  re-review of the fix can post new findings (it has, ~1–3 min after the push), and\n- zero unresolved **actionable** review items — both inline review threads **and** non-inline findings\n  (CodeRabbit \"Outside diff range comments\" \u002F \"Additional comments\" harvested from review + walkthrough\n  bodies, which have no reply\u002Fresolve handle).\n\nWhen `coderabbit.noDefer` is true, \"actionable\" includes every valid bot finding — inline or non-inline —\nthe loop is not done while reproducible findings remain unresolved.\n\n\n## Same-stage failure counter (R31)\n\nTrack consecutive failures at the **same stabilize stage** (same head SHA + same failing-check\u002Fthread\u002Ffinding\nset) independently of the no-progress SHA hard stop. The counter is **never** an input to the conductor\nno-progress state signature — only `(headSha, stage, failureSet)` without `failureCount`.\n\nAfter `stabilizeLoop.sameStageEscalation.escalateAfterFailures` (default **2**) at the same stage, escalate\nthe next `\u002Fsw-stabilize` dispatch to a higher `models.tiers` band or a `models.routing.agents` persona\n(`personaFallback`, default `adversarial`). Hard stops (`maxIterations`, no-progress SHA breaker, human\ndecision) are unchanged — escalation does not bypass them.\n\n```bash\npython3 -c \"\nimport json, sys\nsys.path.insert(0, 'scripts')\nfrom pathlib import Path\nimport stabilize_same_stage_lib as lib\nroot = Path('.').resolve()\nstate = lib.record_same_stage_outcome({}, head_sha='abc', stage='stabilize', failure_set={'check:lint'}, progressed=False)\nesc = lib.resolve_escalation(root, failure_count=state['failureCount'], current_tier='build')\nprint(json.dumps({'state': state, 'escalation': esc}, indent=2))\n\"\n```\n\nPersist under `$SW_RUN_DIR\u002Fstabilize-same-stage.json` (or `.cursor\u002Fsw-deliver-runs\u002F\u003Cphase>\u002F`). Record\nescalation events on the execute-discipline dispatch record as `sameStageEscalation` (advisory bookkeeping).\n\n## Hard stops (any one ends the loop)\n\n- `maxIterations` reached (default 5; configurable).\n- **No-progress**: the same head SHA with the same failing-check set (or the same unresolved-thread +\n  non-inline-finding set) seen on two consecutive evaluations → escalate, do not keep pushing.\n- A blocker that needs a human decision (ambiguous fix, scope\u002Farchitecture call, base-branch conflict\n  whose intents disagree) → stop and ask.\n- A check failure outside this PR's scope that a scoped fix cannot address → report, do not mutate CI.\n\n## Loop\n\n1. Resolve PR + config (`checks`, `coderabbit`, `verify`, `memory`). Record the starting head SHA.\n2. Run one `\u002Fsw-stabilize` pass (its full procedure + guardrails, including the **rca-core stabilize\n   entry** RCA pass before the blocker ledger): build the blocker ledger, fix the `fix-now` batch,\n   verify with the configured `verify` commands, reply+resolve only verified threads, make one focused\n   commit, push once.\n3. If nothing changed and the gate was already green → success.\n4. Arm the wake (see below) and wait for CI to settle and for new comments.\n5. Recompute the verdict via `scripts\u002Fcheck-gate.py` (it folds in the per-head CodeRabbit barrier,\n   classified checks, and the unresolved-thread count); also re-harvest open non-inline findings from the\n   review\u002Fwalkthrough bodies (a fixed \"Outside diff range\" item should no longer recur).\n   - **green** (`reviewLanded == true` — the re-review of this pass's fix landed clean, or CodeRabbit\n     skipped the head) → success: report and hand back (to `\u002Fship` → `phase-ready`, or to the user).\n   - **`coderabbitState == \"in-flight\"`** (re-review of the fix not posted yet, no skip marker) → treat as\n     **yellow**, wait on the wake (step 4) and recompute; do **not** declare success.\n   - **red\u002Fblocked** with progress (head SHA advanced or the failing\u002Fthread\u002Ffinding set shrank) → loop to\n     step 2.\n   - **no progress** (same SHA + same failures\u002Fthreads\u002Ffindings twice) → hard stop, escalate.\n6. Honor `maxIterations`. On any hard stop, summarize the remaining blockers and the reason.\n\n## Wake mechanism (from the `loop` pattern)\n\nAfter pushing a pass, block on CI settling rather than busy-polling:\n\n```bash\nPR=$(python3 scripts\u002Fsw_bootstrap.py host.py -- resolve-pr-for-branch)\npython3 scripts\u002Fsw_bootstrap.py host.py -- checks --number \"$PR\"\necho 'STABILIZE_LOOP_TICK {\"phase\":\"recheck\"}'\n```\n\nRun that as a background shell with `notify_on_output` on `^STABILIZE_LOOP_TICK` so the agent wakes when\nchecks finish. Also poll for new review threads on wake. Use a unique sentinel; do not arm duplicate\nloops; track the PID so the loop can be stopped on request.\n\n\n## Deliver-initiated remediation\n\nWhen invoked from `\u002Fsw-deliver` `remediate` dispatch (post-merge `verify:failed`), this loop runs on the\nphase branch under the regression remediation budget (`deliver.remediation.maxAttempts`). Environmental\npost-merge verify failures use a separate `verifyRemediationAttempts` counter and do not consume the\nregression budget. Completion updates durable deliver state (`stabilizePassId`, `lastRemediationAt`) so the\nconductor no-progress signature advances before the next driver tick.\n\n## Guardrails\n\n- Opt-in. Never convert a plain `\u002Fsw-stabilize` into a loop without the user asking (or `\u002Fship` driving).\n- Preserve every `\u002Fsw-stabilize` guardrail — this wrapper adds iteration, not new resolve powers. Each\n  pass includes one rca-core stabilize entry (single analysis step; R29 budget stays here, not nested).\n- One focused commit per pass; never batch \"do everything\" into one inflated commit.\n- Never merge, force-push, rerun unrelated workflows, or edit CI definitions to go green.\n- Always enforce the no-progress stop — a loop that cannot improve must escalate, not churn.\n- Stop and ask on any human-owned decision; record the stop reason.\n","# stabilize-loop\n\nDrives the current PR to a green gate by repeating the stabilize→verify→push→watch cycle, waking on CI\ncompletion and new review comments. **Opt-in only** — the default for `\u002Fsw-stabilize` is a single pass.\nThis wrapper never changes stabilize's discipline (reply-before-resolve, verify-before-resolve, no\nmass-resolve); it just repeats it under hard stops.\n\n\n**Model tier:** build — resolve via `python3 scripts\u002Fsw_bootstrap.py resolve-model-tier.py -- --skill stabilize-loop`. When using the Task tool for subagent dispatch, resolve concrete model IDs from `models.tiers` in config (never semantic tier names in subagent `model:` frontmatter).\n\n## Success predicate\n\nStop with success when the `checks-gate` verdict (from `scripts\u002Fcheck-gate.py`) is **green**:\n\n- every **required** check passes under the configured all-checks policy (PR test-plan **advisory**\n  job failures appear in `advisoryFailingChecks` but do not block — see `prTestPlan` in gate JSON), and\n- zero checks pending, and\n- **External review is settled for the current head** — `reviewLanded == true` (provider-agnostic; legacy `coderabbitLanded` mirrors the same predicate when `coderabbitState` is\n  `landed`, `skipped`, or `absent`). Because every pass pushes a new fix commit, this means a **fresh**\n  CodeRabbit review must land for that commit, *or* CodeRabbit explicitly skips it (`skipped` — \"no new\n  commits to review\"); a stale review of the pre-fix head with no skip marker never counts. This is the\n  predicate's most important clause: \"the threads I just fixed are resolved\" is **not** success — the\n  re-review of the fix can post new findings (it has, ~1–3 min after the push), and\n- zero unresolved **actionable** review items — both inline review threads **and** non-inline findings\n  (CodeRabbit \"Outside diff range comments\" \u002F \"Additional comments\" harvested from review + walkthrough\n  bodies, which have no reply\u002Fresolve handle).\n\nWhen `coderabbit.noDefer` is true, \"actionable\" includes every valid bot finding — inline or non-inline —\nthe loop is not done while reproducible findings remain unresolved.\n\n\n## Same-stage failure counter (R31)\n\nTrack consecutive failures at the **same stabilize stage** (same head SHA + same failing-check\u002Fthread\u002Ffinding\nset) independently of the no-progress SHA hard stop. The counter is **never** an input to the conductor\nno-progress state signature — only `(headSha, stage, failureSet)` without `failureCount`.\n\nAfter `stabilizeLoop.sameStageEscalation.escalateAfterFailures` (default **2**) at the same stage, escalate\nthe next `\u002Fsw-stabilize` dispatch to a higher `models.tiers` band or a `models.routing.agents` persona\n(`personaFallback`, default `adversarial`). Hard stops (`maxIterations`, no-progress SHA breaker, human\ndecision) are unchanged — escalation does not bypass them.\n\n```bash\npython3 -c \"\nimport json, sys\nsys.path.insert(0, 'scripts')\nfrom pathlib import Path\nimport stabilize_same_stage_lib as lib\nroot = Path('.').resolve()\nstate = lib.record_same_stage_outcome({}, head_sha='abc', stage='stabilize', failure_set={'check:lint'}, progressed=False)\nesc = lib.resolve_escalation(root, failure_count=state['failureCount'], current_tier='build')\nprint(json.dumps({'state': state, 'escalation': esc}, indent=2))\n\"\n```\n\nPersist under `$SW_RUN_DIR\u002Fstabilize-same-stage.json` (or `.cursor\u002Fsw-deliver-runs\u002F\u003Cphase>\u002F`). Record\nescalation events on the execute-discipline dispatch record as `sameStageEscalation` (advisory bookkeeping).\n\n## Hard stops (any one ends the loop)\n\n- `maxIterations` reached (default 5; configurable).\n- **No-progress**: the same head SHA with the same failing-check set (or the same unresolved-thread +\n  non-inline-finding set) seen on two consecutive evaluations → escalate, do not keep pushing.\n- A blocker that needs a human decision (ambiguous fix, scope\u002Farchitecture call, base-branch conflict\n  whose intents disagree) → stop and ask.\n- A check failure outside this PR's scope that a scoped fix cannot address → report, do not mutate CI.\n\n## Loop\n\n1. Resolve PR + config (`checks`, `coderabbit`, `verify`, `memory`). Record the starting head SHA.\n2. Run one `\u002Fsw-stabilize` pass (its full procedure + guardrails, including the **rca-core stabilize\n   entry** RCA pass before the blocker ledger): build the blocker ledger, fix the `fix-now` batch,\n   verify with the configured `verify` commands, reply+resolve only verified threads, make one focused\n   commit, push once.\n3. If nothing changed and the gate was already green → success.\n4. Arm the wake (see below) and wait for CI to settle and for new comments.\n5. Recompute the verdict via `scripts\u002Fcheck-gate.py` (it folds in the per-head CodeRabbit barrier,\n   classified checks, and the unresolved-thread count); also re-harvest open non-inline findings from the\n   review\u002Fwalkthrough bodies (a fixed \"Outside diff range\" item should no longer recur).\n   - **green** (`reviewLanded == true` — the re-review of this pass's fix landed clean, or CodeRabbit\n     skipped the head) → success: report and hand back (to `\u002Fship` → `phase-ready`, or to the user).\n   - **`coderabbitState == \"in-flight\"`** (re-review of the fix not posted yet, no skip marker) → treat as\n     **yellow**, wait on the wake (step 4) and recompute; do **not** declare success.\n   - **red\u002Fblocked** with progress (head SHA advanced or the failing\u002Fthread\u002Ffinding set shrank) → loop to\n     step 2.\n   - **no progress** (same SHA + same failures\u002Fthreads\u002Ffindings twice) → hard stop, escalate.\n6. Honor `maxIterations`. On any hard stop, summarize the remaining blockers and the reason.\n\n## Wake mechanism (from the `loop` pattern)\n\nAfter pushing a pass, block on CI settling rather than busy-polling:\n\n```bash\nPR=$(python3 scripts\u002Fsw_bootstrap.py host.py -- resolve-pr-for-branch)\npython3 scripts\u002Fsw_bootstrap.py host.py -- checks --number \"$PR\"\necho 'STABILIZE_LOOP_TICK {\"phase\":\"recheck\"}'\n```\n\nRun that as a background shell with `notify_on_output` on `^STABILIZE_LOOP_TICK` so the agent wakes when\nchecks finish. Also poll for new review threads on wake. Use a unique sentinel; do not arm duplicate\nloops; track the PID so the loop can be stopped on request.\n\n\n## Deliver-initiated remediation\n\nWhen invoked from `\u002Fsw-deliver` `remediate` dispatch (post-merge `verify:failed`), this loop runs on the\nphase branch under the regression remediation budget (`deliver.remediation.maxAttempts`). Environmental\npost-merge verify failures use a separate `verifyRemediationAttempts` counter and do not consume the\nregression budget. Completion updates durable deliver state (`stabilizePassId`, `lastRemediationAt`) so the\nconductor no-progress signature advances before the next driver tick.\n\n## Guardrails\n\n- Opt-in. Never convert a plain `\u002Fsw-stabilize` into a loop without the user asking (or `\u002Fship` driving).\n- Preserve every `\u002Fsw-stabilize` guardrail — this wrapper adds iteration, not new resolve powers. Each\n  pass includes one rca-core stabilize entry (single analysis step; R29 budget stays here, not nested).\n- One focused commit per pass; never batch \"do everything\" into one inflated commit.\n- Never merge, force-push, rerun unrelated workflows, or edit CI definitions to go green.\n- Always enforce the no-progress stop — a loop that cannot improve must escalate, not churn.\n- Stop and ask on any human-owned decision; record the stop reason.\n",{"name":5,"description":7},"main","2633b37cdc50086084cc9c0ce6c994871d3e7aad","core\u002Fskills\u002Fstabilize-loop",0,"https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright","https:\u002F\u002Fgithub.com\u002Fgrdavies","2026-11-03 23:44:15",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add grdavies\u002Fshipwright --skill stabilize-loop",{"tool":37,"command":38},"bunx","bunx skills add grdavies\u002Fshipwright --skill stabilize-loop",{"tool":40,"command":41},"pnpm","pnpm dlx skills add grdavies\u002Fshipwright --skill stabilize-loop","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fstabilize-loop\u002FSKILL.md",true,[],[46,53,60,67,73,80],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M77K4Z004VAMY705XQKJAH4Y","wrong-name","Missing use when phrase and wrong directory name for critical lint failure.","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fworkflow-pack-sdk\u002Fnegative\u002Fbad-instruction\u002Fskills\u002Fbad-skill\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M77K4WR3WP22SBT6053PYWAK","demo-skill","Demo workflow pack skill fixture. Use when validating workflow-pack-sdk golden paths in CI.","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fworkflow-pack-sdk\u002Fgolden\u002Fvalid-pack\u002Fskills\u002Fdemo-skill\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M77K4SV48XDDDQ81PD09G9N6","good-skill","Validates Agent Skills spec conformance for fixture trees. Use when testing skills-spec-guard pass paths across core and dist mirrors. Does not ship production skills.","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fskills-spec\u002Fpass-valid\u002Fcore\u002Fskills\u002Fgood-skill\u002FSKILL.md",[],[],{"skillNo":68,"name":48,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M77K4PWVT96VMTMMFE2Y80GJ","Fixture with name\u002Fdir mismatch for guard failure tests. Use when verifying skills-spec-guard rejects invalid identity. Does not ship production skills.","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fskills-spec\u002Ffail-name-mismatch\u002Fcore\u002Fskills\u002Fgood-skill\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M77K4KSS5Z0Q0DEAA8PV9316","bad-description","Missing the required when trigger phrase in this fixture skill.","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fskills-spec\u002Ffail-description-shape\u002Fcore\u002Fskills\u002Fbad-description\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M77K4H9HK5FDF84D65228XFA","dropin-demo","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fcapability-select\u002Fdropin\u002Fcore\u002Fskills\u002Fdropin-demo\u002FSKILL.md",[],[]]