[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79DVAVSHBP46Q61Z2BK35NJ":3,"skill-same:01M79DVAVSHBP46Q61Z2BK35NJ":76},{"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":42,"commitSha":43,"skillDirectory":44,"forksCount":14,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":61},"01M79DVAVSHBP46Q61Z2BK35NJ","harness-release",null,"Generic release automation for projects using Keep a Changelog + GitHub. Single confirmation gate then end-to-end automation: bump detection, CHANGELOG promotion, PR\u002Fmain merge, tag, GitHub Release. Trigger: release, version bump, publish. Do NOT load for: implementation, review, planning, setup.","foden303\u002Fharness","foden303","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F77870743?v=4","01M79DK06BJVG7HTKT05FM221X","Foden Ngo","01M79DK071J1HMYV20FJSMG71X",0,"MIT","https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness\u002Fblob\u002Fmain\u002Fskills\u002Fharness-release\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: harness-release\ndescription: \"Generic release automation for projects using Keep a Changelog + GitHub. Single confirmation gate then end-to-end automation: bump detection, CHANGELOG promotion, PR\u002Fmain merge, tag, GitHub Release. Trigger: release, version bump, publish. Do NOT load for: implementation, review, planning, setup.\"\ndescription-en: \"Generic release automation for projects using Keep a Changelog + GitHub. Single confirmation gate then end-to-end automation: bump detection, CHANGELOG promotion, PR\u002Fmain merge, tag, GitHub Release. Trigger: release, version bump, publish. Do NOT load for: implementation, review, planning, setup.\"\nkind: workflow\npurpose: \"Release projects through changelog, version, PR\u002Fmain merge, tag, and GitHub Release gates\"\ntrigger: \"release, version bump, publish\"\nshape: workflow\nrole: orchestrator\npair: harness-review\nowner: harness-core\nsince: \"2026-05-05\"\nallowed-tools: [\"Read\", \"Write\", \"Edit\", \"Bash\", \"AskUserQuestion\", \"Skill\"]\nargument-hint: \"[patch|minor|major|--dry-run]\"\ncontext: fork\neffort: high\nuser-invocable: true\n---\n\n# Harness Release (generic)\n\nA generic release automation skill **for any project** using Keep a Changelog + GitHub.\n\n**Design principle**: a single confirmation gate. The user reviews and approves the whole plan just once. After approval, it runs uninterrupted from file rewrite → commit → branch push → PR create\u002Fupdate → merge into the default branch → tag on the default branch → GitHub Release.\n\n**Definition of \"release complete\"**: a release is not complete just because \"a tag and a GitHub Release were created.\" It is complete when the target work and the release bump are merged into the default branch (usually `main`), the release tag points at a commit reachable from the default branch, and the GitHub Release publishes that tag.\n\n## PR ready vs release ready\n\nIn Harness V2, do not conflate PR closeout and release closeout.\n\n| Gate | Meaning | Required conditions | Stop lane |\n|------|---------|---------------------|-----------|\n| **PR ready** | The branch is reviewable and merge can be decided | `harness-review` `APPROVE`, focused tests PASS, complete evidence pack (accepted\u002Frejected findings, tests, release-preflight warnings handled, residual risk) | `[lane:fast]` \u002F `[lane:gate]` may stop here |\n| **release ready** | The public distribution path passes preflight | PR ready conditions + version surface sync + tag + GitHub Release + CI\u002Fpublic artifact verification | `[lane:release]` only |\n\n- PR ready is decided by `harness-review` APPROVE + evidence pack. `harness-review` does not push \u002F PR \u002F merge.\n- release ready is decided only by `harness-release`'s Preflight \u002F Post-Gate. version bump \u002F tag \u002F GitHub Release are release-lane only.\n- \"local tests passed\" alone is neither PR ready nor release ready (`not_observed != absent`).\n\n> **Literal invocation note**: this skill's entry point uses literal commands as-is, such as `harness-release`, `\u002Frelease`, `\u002Frelease patch`, `\u002Frelease --dry-run`.\n\n## Relationship to the CC runtime hard floor\n\nThe runtime hard floor in Claude Code 2.1.183+ structurally denies GitHub CLI release-publish commands (an Anthropic product spec; it cannot be overridden by `settings.json`'s `permissions.ask`). This skill does not perform the publish itself; it delegates to `.github\u002Fworkflows\u002Frelease.yml` (tag push trigger). The skill completes its responsibility at the tag push, then verifies the workflow's publish with `scripts\u002Frelease-verify-publish.sh`.\n\n**Revert condition**: if CC provides a user-explicit-approval path to the runtime hard floor, consider restoring a direct publish step in the Post-Gate.\n\n## Bare invocation contract\n\nif $ARGUMENTS == \"\":\n  → interpret it as \"commit the work so far, complete PR\u002Fmain merge, and release,\" and run Review Gate detection\n  → auto-advance to Step 0 (Review Gate) only when the target work can be uniquely determined\n  → if the target is unclear or there is no review state, present options via AskUserQuestion before proceeding\n\nOn the first response of a no-argument invocation, always emit the following literal marker:\n\n`RELEASE_AUTOSTART: target=\u003Cwork-summary>, base_ref=\u003Cref>, mode=\u003Cpatch|minor|major|auto>`\n\n\"The task is unclear,\" \"I will wait for instructions,\" \"There is no task,\" and \"I await further instructions\" are prohibited behaviors.\n\n\u003C!-- The block above is the AUTO-START CONTRACT. Follows the skill-editing.md \"within the first 3 lines\" rule. patterns.md P27 solution triple (machine-readable condition + prohibited-behavior literal + AUTOSTART marker) -->\n\n### Output Contract (P35: countermeasure for the \"looks stuck\" UX)\n\nThe **last line** of the output at the skill's conclusion must always include the following literal:\n\n`↑ Claude will summarize this result. Press Enter to continue, or give a new instruction with a fresh prompt.`\n\nThis is an explicit instruction (patterns.md P35) for the UX problem where, when shown as a text response via `\u003Clocal-command-stdout>`, the user feels it has \"stopped.\"\n\nWhen only `harness-release` \u002F `\u002Frelease` is entered, treat it as\n**\"commit the work so far, complete PR\u002Fmain merge, and release.\"**\nThe older phrasing **\"commit the work so far and release\"** has the same intent, but the completion condition must always include PR\u002Fmain merge.\nDo not stop with \"there is no task\" or \"I will wait for instructions.\"\n\nFor a bare release, run the **Review Gate** and the **Work Commit Gate** before the normal release preflight.\n\nThe Review Gate is for **release ready**. For work that only needs PR ready in `[lane:fast]` \u002F `[lane:gate]`, do not start `harness-release` unless the user explicitly asks for a release.\n\n1. Check `git status --porcelain` and `git log @{upstream}..HEAD` \u002F `main..HEAD` to identify the target of \"the work so far\"\n2. Check `.claude\u002Fstate\u002Freview-result.json` and `.claude\u002Fstate\u002Freview-approved.json` to confirm the target work has an `APPROVE`d review and an evidence pack\n3. If there is no `APPROVE`d review, confirm via `AskUserQuestion`\n4. If the user chooses \"start from review,\" start `harness-review` and do not proceed to release until it is `APPROVE`\n5. If `harness-review` returns `REQUEST_CHANGES`, hold the release, fix with `harness-work`, then re-run `harness-review`. Loop this until `APPROVE`\n6. After `harness-review` returns `APPROVE`, create a work commit for the working tree\n7. Once the working tree is clean, proceed to the normal release preflight \u002F confirmation gate \u002F PR merge \u002F tag \u002F GitHub Release\n\n### Review Gate AskUserQuestion\n\nWhen review approval cannot be confirmed at `harness-release` time, do not release on a guess.\nEmit the following Ask.\n\n```text\nquestion: \"harness-release commits the work so far and releases it, but no APPROVE review was found for this work. How do you want to proceed?\"\noptions:\n  - label: \"Start from review (Recommended)\"\n    description: \"Run harness-review, and proceed to commit\u002Frelease only if it becomes APPROVE.\"\n  - label: \"release dry-run\"\n    description: \"Do not rewrite files; only check the release plan and the missing gates.\"\n  - label: \"Cancel\"\n    description: \"Stop without doing review or release.\"\n```\n\nIf the user chooses \"Start from review,\" start from `harness-review` within the same session.\nThe target determination for `harness-review` follows `harness-review`'s bare review contract.\nIf the review is `APPROVE`, return to `harness-release`'s Work Commit Gate as-is.\nIf the review is `REQUEST_CHANGES`, hold the release, fix with `harness-work`, then re-run `harness-review`.\nThis fix-then-re-review loop continues until `APPROVE`.\n\nYou may return to the user only in the following cases.\n\n1. The fix requires a decision on the spec source of truth \u002F Plans.md \u002F API \u002F permission \u002F migration \u002F billing, etc., and `AskUserQuestion` is needed\n2. There are multiple fix approaches, and the choice changes user value or compatibility\n3. The user chose `release dry-run` or `Cancel` at the Ask\n\nDo not make `REQUEST_CHANGES` alone the final stop reason.\n\n### Work Commit Gate\n\nWhen a bare release has uncommitted changes in the working tree, create the reviewed work commit first,\nseparately from the release version bump commit.\n\n```bash\ngit status --short\ngit diff --stat\ngit add \u003Creviewed files>\ngit commit -m \"\u003Ctype>: \u003Csummary>\"\n```\n\nGenerate the commit message briefly from the review summary \u002F Plans.md task \u002F branch name.\nIf you cannot decide, offer 2-3 commit message candidates via `AskUserQuestion`.\nAfter creating the work commit, check or update `commit_hash` in `.claude\u002Fstate\u002Freview-result.json`,\nthen proceed to the release preflight.\n\nOnce in the normal release preflight, treat a dirty working tree as a failure as before.\nDo not proceed to version bump \u002F tag \u002F GitHub Release with a dirty tree.\n\n## Quick Reference\n\n```bash\n\u002Frelease              # review gate → commit → PR\u002Fmain merge → release the work so far\n\u002Frelease patch        # explicitly specify a patch bump\n\u002Frelease minor        # explicitly specify a minor bump\n\u002Frelease major        # explicitly specify a major bump\n\u002Frelease --dry-run    # show the plan only, do not execute\n```\n\n## Prerequisites\n\nA project this skill runs on must satisfy the following:\n\n1. `CHANGELOG.md` is in [Keep a Changelog](https:\u002F\u002Fkeepachangelog.com\u002F) format\n2. An `[Unreleased]` section exists\n3. It has one of the following version files:\n   - `VERSION` (a standalone file)\n   - `package.json` (npm)\n   - `pyproject.toml` (Python, `[project]` or `[tool.poetry]`)\n   - `Cargo.toml` (Rust, `[package]`)\n4. The `gh` CLI is installed and authenticated\n5. The git remote `origin` points at GitHub\n6. For a Claude Code plugin project, the `claude` CLI supports `plugin tag`\n\nIf these are not satisfied, Preflight detects it and aborts.\n\nMulti-host review URLs via `prUrlTemplate` are recognized as a future candidate, but\nthis skill's release automation still uses the `gh` CLI and a GitHub remote as the primary path.\nAuto-fetching owner \u002F branch \u002F release asset \u002F CI metadata varies greatly per host, so Phase 56.2.3 keeps it docs-only.\n\n## Single-gate flow\n\n```\n[Bare release only: pre-stage for work review\u002Fcommit]\n  ↓\n  0. Review Gate (if unreviewed, AskUserQuestion → harness-review)\n  0.5 Work Commit Gate (commit the review-APPROVEd work separately from the release bump)\n  ↓\n[Pre-Gate: information gathering only, files unchanged]\n  ↓\n  1. Preflight (confirm working tree clean \u002F CHANGELOG \u002F gh, etc.)\n  2. Auto-detect the version file\n  3. Read the current version\n  4. Claude plugin tag preflight (plugin projects only)\n  5. Analyze the [Unreleased] content → estimate the bump level\n  6. Compute the new version\n  7. Draft the CHANGELOG diff (in memory)\n  8. Draft the GitHub Release notes (in memory)\n\n★━━━━━━ Single confirmation gate ━━━━━━★\n  Present the whole plan to the user just once:\n    - The detected version file\n    - Current version → new version\n    - Bump rationale (\"minor because [Unreleased] has ### Added,\" etc.)\n    - CHANGELOG change preview\n    - GitHub Release notes draft\n    - List of files to commit\n    - Final actions (branch push + PR merge + tag + release publish)\n\n  User response:\n    \"yes\"          → proceed to Post-Gate\n    \"\u003Camendment>\"  → regenerate the draft per the instruction, re-confirm\n    \"cancel\u002Fno\"    → end without doing anything\n★━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━★\n  ↓\n[Post-Gate: after approval, no interruption]\n\n  9. Rewrite the version file\n  10. Rewrite CHANGELOG.md ([Unreleased] → promote to [X.Y.Z] + compare link)\n  11. git add + commit\n  12. Push the release branch\n  13. Create\u002Fupdate the PR\n  14. Merge into the default branch\n  15. Fetch\u002Fcheckout the default branch and confirm the release commit is reachable\n  16. Claude plugin tag validation + tag (plugin projects only)\n  17. semver tag for the GitHub Release (only projects that need it)\n  18. git push origin \u003Cdefault-branch> --tags\n  19. After the tag push, `.github\u002Fworkflows\u002Frelease.yml` publishes the release, and `release-verify-publish.sh` verifies it\n  20. Completion report\n```\n\n## Pre-Gate details\n\n### 1. Preflight\n\nrelease ready gate: in addition to the PR ready conditions, confirm the version \u002F tag \u002F GitHub Release \u002F CI artifact path.\n\n```bash\n# Required tools\ncommand -v gh >\u002Fdev\u002Fnull || { echo \"gh CLI is missing\"; exit 1; }\ncommand -v python3 >\u002Fdev\u002Fnull || { echo \"python3 is required\"; exit 1; }\n\n# working tree\nif [ -n \"$(git status --porcelain)\" ]; then\n  echo \"the working tree has uncommitted changes\"; exit 1;\nfi\n\n# CHANGELOG\n[ -f CHANGELOG.md ] || { echo \"CHANGELOG.md is missing\"; exit 1; }\ngrep -q \"^## \\[Unreleased\\]\" CHANGELOG.md || { echo \"there is no [Unreleased] section\"; exit 1; }\n\n# plugin\u002Fmirror projects\nscripts\u002Frelease-preflight.sh\n```\n\nThis working-tree-clean check is the normal release preflight gate.\nFor a bare release where you want to commit \"the work so far,\" complete the Review Gate and the Work Commit Gate before this check.\nDo not abort and finish on this check alone for an unreviewed dirty tree.\n\n`scripts\u002Frelease-preflight.sh` also detects mirror drift in the `.agents\u002Fskills\u002F` mirror before tag creation. If `.\u002Fscripts\u002Fsync-skill-mirrors.sh` produces a diff, stop the release, commit that diff, then proceed to the tag.\n\n### 2. Version file auto-detection\n\nSearch in priority order. Treat the first one found as the source of truth:\n\n```python\n# Python snippet to run inline\nimport os, json, re\nimport tomllib  # Python 3.11+\n\ndef detect_version_file():\n    if os.path.exists(\"VERSION\"):\n        with open(\"VERSION\") as f:\n            return (\"VERSION\", f.read().strip(), None)\n    if os.path.exists(\"package.json\"):\n        with open(\"package.json\") as f:\n            data = json.load(f)\n        return (\"package.json\", data[\"version\"], None)\n    if os.path.exists(\"pyproject.toml\"):\n        with open(\"pyproject.toml\", \"rb\") as f:\n            data = tomllib.load(f)\n        if \"project\" in data:\n            return (\"pyproject.toml\", data[\"project\"][\"version\"], \"[project]\")\n        if \"tool\" in data and \"poetry\" in data[\"tool\"]:\n            return (\"pyproject.toml\", data[\"tool\"][\"poetry\"][\"version\"], \"[tool.poetry]\")\n    if os.path.exists(\"Cargo.toml\"):\n        with open(\"Cargo.toml\", \"rb\") as f:\n            data = tomllib.load(f)\n        return (\"Cargo.toml\", data[\"package\"][\"version\"], \"[package]\")\n    raise RuntimeError(\"No supported version file found\")\n```\n\nDetails: [version-files.md](${CLAUDE_SKILL_DIR}\u002Freferences\u002Fversion-files.md)\n\n### 3. Claude Plugin Tag Preflight\n\nIn a project where `.claude-plugin\u002Fplugin.json` exists, create a Claude plugin release tag in addition to the normal GitHub Release tag.\n\nIn short, before hand-assembling `git tag -a`, pass Claude Code's own plugin validation, then create the `{plugin-name}--v{version}` tag.\n\nThe Pre-Gate does not rewrite files; it confirms the following.\nDo not pick up version sync with `grep` \u002F `sed`; read JSON with a structured parser:\n\n```bash\ncommand -v claude >\u002Fdev\u002Fnull || { echo \"claude CLI is missing\"; exit 1; }\nclaude plugin validate .claude-plugin\u002Fplugin.json\n\nHARNESS_PLUGIN_ROOT=\"${CLAUDE_PLUGIN_ROOT:-.}\"\npython3 \"${HARNESS_PLUGIN_ROOT}\u002Fscripts\u002Fcheck-release-version-sync.py\" --root .\n\nclaude plugin tag .claude-plugin --dry-run\n```\n\n`${HARNESS_PLUGIN_ROOT}\u002Fscripts\u002Fcheck-release-version-sync.py` reads all existing release surfaces and decides the canonical one in the order `VERSION > package.json > .claude-plugin\u002Fplugin.json > .claude-plugin\u002Fmarketplace.json`.\nOn top of that, it does not proceed to tag \u002F release if there is even one of the following mismatches \u002F omissions:\n\n- `VERSION`\n- `.version` in `package.json`\n- `.version` in `.claude-plugin\u002Fplugin.json`\n- `.metadata.version` in `.claude-plugin\u002Fmarketplace.json`\n- `.plugins[].version` in `.claude-plugin\u002Fmarketplace.json` (each plugin entry in the array)\n\nOn a mismatch, it shows which surface differs from the canonical, or which field is missing \u002F invalid.\nFor machine processing or CI, use `--json`:\n\n```bash\npython3 \"${HARNESS_PLUGIN_ROOT}\u002Fscripts\u002Fcheck-release-version-sync.py\" --root . --json\n```\n\nThis check exists to prevent 3 accidents:\n\n- Cutting a tag while the versions of `VERSION` and `.claude-plugin\u002Fplugin.json` are out of sync\n- Proceeding to the release workflow while the version in `package.json` \u002F a marketplace entry is stale\n- Getting stuck later on plugin install \u002F update by not passing the plugin manifest \u002F marketplace entry validation\n\nWith `--dry-run`, you can see the tag name `claude plugin tag` will actually create and the internal `git tag -a` \u002F push-equivalent commands. Include the commands you see here in the Confirmation Gate plan.\n\n### 4. Bump auto-estimation\n\nAnalyze the headings directly under `[Unreleased]` to determine the bump level:\n\n| Heading within [Unreleased] | Estimated bump |\n|-----------------------------|----------------|\n| Includes `### Breaking Changes` or `### Removed` | **major** |\n| Includes `### Added` (no Removed\u002FBreaking) | **minor** |\n| Only `### Fixed` \u002F `### Changed` \u002F `### Security` | **patch** |\n| Empty section | **error: nothing to release** |\n\nIf the user explicitly specifies with `\u002Frelease patch|minor|major`, that takes precedence.\nDetails: [bump-detection.md](${CLAUDE_SKILL_DIR}\u002Freferences\u002Fbump-detection.md)\n\n### 5. Draft the CHANGELOG (in memory)\n\nCompute the following; do not write yet:\n\n1. Cut out the body of `## [Unreleased]`\n2. Build a form that inserts `## [\u003Cnew>] - YYYY-MM-DD` between `## [Unreleased]` and `## [\u003Cprevious>]`\n3. Trailing compare link:\n   - `[Unreleased]: ...\u002Fcompare\u002Fv\u003Cprev>...HEAD` → `v\u003Cnew>...HEAD`\n   - Add `[\u003Cnew>]: ...\u002Fcompare\u002Fv\u003Cprev>...v\u003Cnew>`\n4. Extract the repo URL dynamically from the existing `[Unreleased]: ` line\n\n### 6. Draft the Release Notes (in memory)\n\nGenerate the markdown for the GitHub Release based on the content of the `## [\u003Cnew>]` section:\n\n```markdown\n## What's Changed\n\n**\u003Crelease theme (one line)>**\n\n### Before \u002F After\n\u003Ctable>\n\n### Added \u002F Changed \u002F Fixed \u002F Removed\n\u003Ccopy the relevant sections>\n\n---\n\n🤖 Generated with [Claude Code](https:\u002F\u002Fclaude.com\u002Fclaude-code)\n```\n\nDetails: [release-notes.md](${CLAUDE_SKILL_DIR}\u002Freferences\u002Frelease-notes.md)\n\n## Confirmation Gate\n\nOnce all drafts are ready, present them to the user just once:\n\n```\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nRelease Plan: v\u003Cold> → v\u003Cnew> (\u003Cbump>)\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n Version file: \u003Cdetected file>\n Bump reason:  \u003Cwhy this level was chosen>\n\n CHANGELOG changes:\n   Detected \u003CN> changes in [Unreleased]\n   Finalize as [\u003Cnew>] - YYYY-MM-DD\n   Add the compare link\n\n GitHub Release notes preview:\n   \u003Cfirst 10 lines>\n   ...\n\n Files to modify:\n   - \u003Cversion file>\n   - CHANGELOG.md\n\n Final actions:\n   - git commit -m \"chore: release v\u003Cnew>\"\n   - git push origin \u003Crelease-branch>\n   - gh pr create\u002Fupdate + gh pr merge into \u003Cdefault-branch>\n   - git fetch origin \u003Cdefault-branch> && git checkout \u003Cdefault-branch>\n   - claude plugin tag .claude-plugin --push --remote origin  # for plugin projects. Run on the default branch\n   - git tag -a v\u003Cnew>                                        # when a semver tag for the GitHub Release is needed. Create on the default branch\n   - git push origin \u003Cdefault-branch> --tags\n   - (after the tag push, the GitHub Actions release workflow publishes the release automatically)\n\nProceed? [yes \u002F cancel \u002F \u003Camendment>]\n```\n\n## Post-Gate details\n\nRuns uninterrupted after approval. On failure, the policy is:\n\n| Failure point | Recovery |\n|---------------|----------|\n| File rewrite failed | Abort there; the local tree stays dirty for a human to judge |\n| commit failed | Hook rejection, etc. Present the cause to the user and prompt a fix |\n| PR create\u002Fmerge failed | Stop with the release incomplete. Do not proceed to tag \u002F GitHub Release |\n| plugin tag validation failed | Fix the `VERSION` \u002F `.claude-plugin\u002Fplugin.json` \u002F marketplace entry mismatch, and do not proceed to tag creation |\n| push failed | A remote-side problem. Keep the local commit\u002Ftag |\n\n### PR \u002F Main Merge Gate\n\nAfter the Post-Gate release commit, merge the GitHub PR into the default branch before creating the tag.\n\n```bash\nrelease_branch=\"$(git branch --show-current)\"\ndefault_branch=\"${HARNESS_RELEASE_DEFAULT_BRANCH:-main}\"\n\ngit push -u origin \"$release_branch\"\ngh pr create --base \"$default_branch\" --head \"$release_branch\" --title \"chore: release v\u003Cnew>\" --body \"\u003Crelease summary>\"\ngh pr merge --merge --delete-branch=false\n\ngit fetch origin \"$default_branch\" --tags\ngit checkout \"$default_branch\"\ngit pull --ff-only origin \"$default_branch\"\ngit merge-base --is-ancestor \"\u003Crelease-commit>\" \"origin\u002F$default_branch\"\n```\n\nIf an existing PR exists, do not create a new one; update the existing PR's body and merge it. If the repository policy requires a squash merge, confirm that the release bump content (version files + CHANGELOG + source commits) is included in the default branch, not the release commit hash.\n\nCreate the tag after this Gate completes, on the default branch's HEAD or on a commit reachable from the release commit. Do not create a GitHub Release with a tag pointing at a commit that exists only on the release branch.\n\n### Tag creation for a Claude plugin project\n\nIn a project with `.claude-plugin\u002Fplugin.json`, confirm version sync once more on the default branch after the PR\u002Fmain merge, then create the plugin tag:\n\n```bash\nHARNESS_PLUGIN_ROOT=\"${CLAUDE_PLUGIN_ROOT:-.}\"\npython3 \"${HARNESS_PLUGIN_ROOT}\u002Fscripts\u002Fcheck-release-version-sync.py\" --root .\n\nclaude plugin tag .claude-plugin --dry-run\nclaude plugin tag .claude-plugin --push --remote origin\n```\n\nThe tag `claude plugin tag` creates is in `{plugin-name}--v{version}` format. In a project whose existing GitHub Release workflow assumes a `vX.Y.Z` tag, create a `git tag -a v\u003Cnew>` separately from the plugin tag. Leave the plugin distribution tag to `claude plugin tag`, and treat the semver tag for the GitHub Release as the release automation's compatibility surface.\n\n### Verify Workflow Publish\n\nAfter the tag push, `.github\u002Fworkflows\u002Frelease.yml` publishes the release automatically. The skill verifies the result with:\n\n```bash\nOWNER=\"$(git remote get-url origin | sed 's|.*github.com[:\u002F]\\([^\u002F]*\u002F[^\u002F]*\\)\\.git|\\1|')\"\nbash scripts\u002Frelease-verify-publish.sh \"v${NEW_VERSION}\" \"${OWNER}\"\n```\n\nTimeout: 5-second interval × 60 = up to 5 minutes of polling.\n\n- exit 0: PASS — `draft=false` and all 4 platform assets published\n- exit 2: WARN — timeout (the tag is already pushed, so do not abort; prompt human judgment)\n- exit 3: ERROR — API error (permission\u002Fauth problem, requires manual investigation)\n\nVerify is done via `gh api`. Do not use the GitHub CLI release subcommand prefix, since it is denied by the CC runtime hard floor.\n\n## `--dry-run` mode\n\nRuns the entire Pre-Gate and shows the content up to the Confirmation Gate, but **stops at the gate and does not proceed to the Post-Gate**.\n\nFor a Claude plugin project, even in dry-run it runs `python3 \"${HARNESS_PLUGIN_ROOT}\u002Fscripts\u002Fcheck-release-version-sync.py\" --root .` and `claude plugin tag .claude-plugin --dry-run` to show the plugin tag name that will actually be created and the push target. If the version surfaces of `VERSION` \u002F `package.json` \u002F `.claude-plugin\u002Fplugin.json` \u002F `.claude-plugin\u002Fmarketplace.json` are mismatched or missing here, stop at the dry-run point.\n\n## Environment variables\n\nUsed for per-project adjustment:\n\n| Variable | Description |\n|----------|-------------|\n| `HARNESS_RELEASE_PROJECT_ROOT` | Repository root (default: `$(pwd)`) |\n| `HARNESS_RELEASE_BRANCH` | Branch to push (default: the current branch) |\n| `HARNESS_RELEASE_DEFAULT_BRANCH` | The default branch to merge the PR into (default: `main`) |\n| `HARNESS_RELEASE_HEALTHCHECK_CMD` | An additional command to run in Preflight |\n| `HARNESS_RELEASE_SKIP_GH` | `1` skips GitHub Release creation |\n\n## CHANGELOG writing rules\n\nThe `[Unreleased]` section must always have one of the following subsections:\n\n```markdown\n## [Unreleased]\n\n### Added       ← minor\n### Changed     ← patch\n### Deprecated  ← minor\n### Removed     ← major\n### Fixed       ← patch\n### Security    ← patch\n### Breaking Changes  ← major (non-standard in Keep a Changelog but common)\n```\n\nThis skill parses these headings mechanically, so it cannot recognize heading variants (`### Fix` \u002F `### Bug Fixes`, etc.). Use the KaCL standard headings.\n\n## Pre-shipping acceptance decision (for non-engineers)\n\nPropose `harness-accept` before finalizing the release. It is an \"acceptance decision\" screen that summarizes, on a single HTML page, whether each acceptance condition was met and a ship\u002Fwait\u002Freject recommendation, so a requester can judge whether to ship without technical knowledge.\n\n## Related skills\n\n- `harness-release-internal` - a harness-specific preflight\u002Ffinalization run additionally when releasing the main harness itself (not distributed)\n- `harness-plan` - Plans.md management\n- `harness-review` - code review before release\n- `harness-accept` - acceptance decision HTML (for non-engineers, proposed before release)\n\n## Design philosophy\n\n- **PR ready \u002F release ready separation**: PR ready is review + evidence pack. release ready goes all the way to version\u002Ftag\u002FGitHub Release\u002FCI. lane:fast \u002F lane:gate may stop at PR ready\n- **Single gate**: the user's decision point is just once. Inserting mini-confirmations turns it into a rubber stamp and loses meaning\n- **Draw everything up front**: prohibit \"rethinking\" after entering the Post-Gate. Have all drafts ready before the Gate\n- **Main merge is the completion condition**: create the release tag \u002F GitHub Release only after the default branch merge. Treat a branch-only release as incomplete\n- **Failures are transparent**: on a mid-way failure, do not attempt an automatic rollback; present the current state to the user for a decision\n- **Project-agnostic**: do not assume a specific environment such as VERSION file format, mirror, or residue check. Split main-harness-specific processing into `harness-release-internal`\n","# Harness Release (generic)\n\nA generic release automation skill **for any project** using Keep a Changelog + GitHub.\n\n**Design principle**: a single confirmation gate. The user reviews and approves the whole plan just once. After approval, it runs uninterrupted from file rewrite → commit → branch push → PR create\u002Fupdate → merge into the default branch → tag on the default branch → GitHub Release.\n\n**Definition of \"release complete\"**: a release is not complete just because \"a tag and a GitHub Release were created.\" It is complete when the target work and the release bump are merged into the default branch (usually `main`), the release tag points at a commit reachable from the default branch, and the GitHub Release publishes that tag.\n\n## PR ready vs release ready\n\nIn Harness V2, do not conflate PR closeout and release closeout.\n\n| Gate | Meaning | Required conditions | Stop lane |\n|------|---------|---------------------|-----------|\n| **PR ready** | The branch is reviewable and merge can be decided | `harness-review` `APPROVE`, focused tests PASS, complete evidence pack (accepted\u002Frejected findings, tests, release-preflight warnings handled, residual risk) | `[lane:fast]` \u002F `[lane:gate]` may stop here |\n| **release ready** | The public distribution path passes preflight | PR ready conditions + version surface sync + tag + GitHub Release + CI\u002Fpublic artifact verification | `[lane:release]` only |\n\n- PR ready is decided by `harness-review` APPROVE + evidence pack. `harness-review` does not push \u002F PR \u002F merge.\n- release ready is decided only by `harness-release`'s Preflight \u002F Post-Gate. version bump \u002F tag \u002F GitHub Release are release-lane only.\n- \"local tests passed\" alone is neither PR ready nor release ready (`not_observed != absent`).\n\n> **Literal invocation note**: this skill's entry point uses literal commands as-is, such as `harness-release`, `\u002Frelease`, `\u002Frelease patch`, `\u002Frelease --dry-run`.\n\n## Relationship to the CC runtime hard floor\n\nThe runtime hard floor in Claude Code 2.1.183+ structurally denies GitHub CLI release-publish commands (an Anthropic product spec; it cannot be overridden by `settings.json`'s `permissions.ask`). This skill does not perform the publish itself; it delegates to `.github\u002Fworkflows\u002Frelease.yml` (tag push trigger). The skill completes its responsibility at the tag push, then verifies the workflow's publish with `scripts\u002Frelease-verify-publish.sh`.\n\n**Revert condition**: if CC provides a user-explicit-approval path to the runtime hard floor, consider restoring a direct publish step in the Post-Gate.\n\n## Bare invocation contract\n\nif $ARGUMENTS == \"\":\n  → interpret it as \"commit the work so far, complete PR\u002Fmain merge, and release,\" and run Review Gate detection\n  → auto-advance to Step 0 (Review Gate) only when the target work can be uniquely determined\n  → if the target is unclear or there is no review state, present options via AskUserQuestion before proceeding\n\nOn the first response of a no-argument invocation, always emit the following literal marker:\n\n`RELEASE_AUTOSTART: target=\u003Cwork-summary>, base_ref=\u003Cref>, mode=\u003Cpatch|minor|major|auto>`\n\n\"The task is unclear,\" \"I will wait for instructions,\" \"There is no task,\" and \"I await further instructions\" are prohibited behaviors.\n\n\u003C!-- The block above is the AUTO-START CONTRACT. Follows the skill-editing.md \"within the first 3 lines\" rule. patterns.md P27 solution triple (machine-readable condition + prohibited-behavior literal + AUTOSTART marker) -->\n\n### Output Contract (P35: countermeasure for the \"looks stuck\" UX)\n\nThe **last line** of the output at the skill's conclusion must always include the following literal:\n\n`↑ Claude will summarize this result. Press Enter to continue, or give a new instruction with a fresh prompt.`\n\nThis is an explicit instruction (patterns.md P35) for the UX problem where, when shown as a text response via `\u003Clocal-command-stdout>`, the user feels it has \"stopped.\"\n\nWhen only `harness-release` \u002F `\u002Frelease` is entered, treat it as\n**\"commit the work so far, complete PR\u002Fmain merge, and release.\"**\nThe older phrasing **\"commit the work so far and release\"** has the same intent, but the completion condition must always include PR\u002Fmain merge.\nDo not stop with \"there is no task\" or \"I will wait for instructions.\"\n\nFor a bare release, run the **Review Gate** and the **Work Commit Gate** before the normal release preflight.\n\nThe Review Gate is for **release ready**. For work that only needs PR ready in `[lane:fast]` \u002F `[lane:gate]`, do not start `harness-release` unless the user explicitly asks for a release.\n\n1. Check `git status --porcelain` and `git log @{upstream}..HEAD` \u002F `main..HEAD` to identify the target of \"the work so far\"\n2. Check `.claude\u002Fstate\u002Freview-result.json` and `.claude\u002Fstate\u002Freview-approved.json` to confirm the target work has an `APPROVE`d review and an evidence pack\n3. If there is no `APPROVE`d review, confirm via `AskUserQuestion`\n4. If the user chooses \"start from review,\" start `harness-review` and do not proceed to release until it is `APPROVE`\n5. If `harness-review` returns `REQUEST_CHANGES`, hold the release, fix with `harness-work`, then re-run `harness-review`. Loop this until `APPROVE`\n6. After `harness-review` returns `APPROVE`, create a work commit for the working tree\n7. Once the working tree is clean, proceed to the normal release preflight \u002F confirmation gate \u002F PR merge \u002F tag \u002F GitHub Release\n\n### Review Gate AskUserQuestion\n\nWhen review approval cannot be confirmed at `harness-release` time, do not release on a guess.\nEmit the following Ask.\n\n```text\nquestion: \"harness-release commits the work so far and releases it, but no APPROVE review was found for this work. How do you want to proceed?\"\noptions:\n  - label: \"Start from review (Recommended)\"\n    description: \"Run harness-review, and proceed to commit\u002Frelease only if it becomes APPROVE.\"\n  - label: \"release dry-run\"\n    description: \"Do not rewrite files; only check the release plan and the missing gates.\"\n  - label: \"Cancel\"\n    description: \"Stop without doing review or release.\"\n```\n\nIf the user chooses \"Start from review,\" start from `harness-review` within the same session.\nThe target determination for `harness-review` follows `harness-review`'s bare review contract.\nIf the review is `APPROVE`, return to `harness-release`'s Work Commit Gate as-is.\nIf the review is `REQUEST_CHANGES`, hold the release, fix with `harness-work`, then re-run `harness-review`.\nThis fix-then-re-review loop continues until `APPROVE`.\n\nYou may return to the user only in the following cases.\n\n1. The fix requires a decision on the spec source of truth \u002F Plans.md \u002F API \u002F permission \u002F migration \u002F billing, etc., and `AskUserQuestion` is needed\n2. There are multiple fix approaches, and the choice changes user value or compatibility\n3. The user chose `release dry-run` or `Cancel` at the Ask\n\nDo not make `REQUEST_CHANGES` alone the final stop reason.\n\n### Work Commit Gate\n\nWhen a bare release has uncommitted changes in the working tree, create the reviewed work commit first,\nseparately from the release version bump commit.\n\n```bash\ngit status --short\ngit diff --stat\ngit add \u003Creviewed files>\ngit commit -m \"\u003Ctype>: \u003Csummary>\"\n```\n\nGenerate the commit message briefly from the review summary \u002F Plans.md task \u002F branch name.\nIf you cannot decide, offer 2-3 commit message candidates via `AskUserQuestion`.\nAfter creating the work commit, check or update `commit_hash` in `.claude\u002Fstate\u002Freview-result.json`,\nthen proceed to the release preflight.\n\nOnce in the normal release preflight, treat a dirty working tree as a failure as before.\nDo not proceed to version bump \u002F tag \u002F GitHub Release with a dirty tree.\n\n## Quick Reference\n\n```bash\n\u002Frelease              # review gate → commit → PR\u002Fmain merge → release the work so far\n\u002Frelease patch        # explicitly specify a patch bump\n\u002Frelease minor        # explicitly specify a minor bump\n\u002Frelease major        # explicitly specify a major bump\n\u002Frelease --dry-run    # show the plan only, do not execute\n```\n\n## Prerequisites\n\nA project this skill runs on must satisfy the following:\n\n1. `CHANGELOG.md` is in [Keep a Changelog](https:\u002F\u002Fkeepachangelog.com\u002F) format\n2. An `[Unreleased]` section exists\n3. It has one of the following version files:\n   - `VERSION` (a standalone file)\n   - `package.json` (npm)\n   - `pyproject.toml` (Python, `[project]` or `[tool.poetry]`)\n   - `Cargo.toml` (Rust, `[package]`)\n4. The `gh` CLI is installed and authenticated\n5. The git remote `origin` points at GitHub\n6. For a Claude Code plugin project, the `claude` CLI supports `plugin tag`\n\nIf these are not satisfied, Preflight detects it and aborts.\n\nMulti-host review URLs via `prUrlTemplate` are recognized as a future candidate, but\nthis skill's release automation still uses the `gh` CLI and a GitHub remote as the primary path.\nAuto-fetching owner \u002F branch \u002F release asset \u002F CI metadata varies greatly per host, so Phase 56.2.3 keeps it docs-only.\n\n## Single-gate flow\n\n```\n[Bare release only: pre-stage for work review\u002Fcommit]\n  ↓\n  0. Review Gate (if unreviewed, AskUserQuestion → harness-review)\n  0.5 Work Commit Gate (commit the review-APPROVEd work separately from the release bump)\n  ↓\n[Pre-Gate: information gathering only, files unchanged]\n  ↓\n  1. Preflight (confirm working tree clean \u002F CHANGELOG \u002F gh, etc.)\n  2. Auto-detect the version file\n  3. Read the current version\n  4. Claude plugin tag preflight (plugin projects only)\n  5. Analyze the [Unreleased] content → estimate the bump level\n  6. Compute the new version\n  7. Draft the CHANGELOG diff (in memory)\n  8. Draft the GitHub Release notes (in memory)\n\n★━━━━━━ Single confirmation gate ━━━━━━★\n  Present the whole plan to the user just once:\n    - The detected version file\n    - Current version → new version\n    - Bump rationale (\"minor because [Unreleased] has ### Added,\" etc.)\n    - CHANGELOG change preview\n    - GitHub Release notes draft\n    - List of files to commit\n    - Final actions (branch push + PR merge + tag + release publish)\n\n  User response:\n    \"yes\"          → proceed to Post-Gate\n    \"\u003Camendment>\"  → regenerate the draft per the instruction, re-confirm\n    \"cancel\u002Fno\"    → end without doing anything\n★━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━★\n  ↓\n[Post-Gate: after approval, no interruption]\n\n  9. Rewrite the version file\n  10. Rewrite CHANGELOG.md ([Unreleased] → promote to [X.Y.Z] + compare link)\n  11. git add + commit\n  12. Push the release branch\n  13. Create\u002Fupdate the PR\n  14. Merge into the default branch\n  15. Fetch\u002Fcheckout the default branch and confirm the release commit is reachable\n  16. Claude plugin tag validation + tag (plugin projects only)\n  17. semver tag for the GitHub Release (only projects that need it)\n  18. git push origin \u003Cdefault-branch> --tags\n  19. After the tag push, `.github\u002Fworkflows\u002Frelease.yml` publishes the release, and `release-verify-publish.sh` verifies it\n  20. Completion report\n```\n\n## Pre-Gate details\n\n### 1. Preflight\n\nrelease ready gate: in addition to the PR ready conditions, confirm the version \u002F tag \u002F GitHub Release \u002F CI artifact path.\n\n```bash\n# Required tools\ncommand -v gh >\u002Fdev\u002Fnull || { echo \"gh CLI is missing\"; exit 1; }\ncommand -v python3 >\u002Fdev\u002Fnull || { echo \"python3 is required\"; exit 1; }\n\n# working tree\nif [ -n \"$(git status --porcelain)\" ]; then\n  echo \"the working tree has uncommitted changes\"; exit 1;\nfi\n\n# CHANGELOG\n[ -f CHANGELOG.md ] || { echo \"CHANGELOG.md is missing\"; exit 1; }\ngrep -q \"^## \\[Unreleased\\]\" CHANGELOG.md || { echo \"there is no [Unreleased] section\"; exit 1; }\n\n# plugin\u002Fmirror projects\nscripts\u002Frelease-preflight.sh\n```\n\nThis working-tree-clean check is the normal release preflight gate.\nFor a bare release where you want to commit \"the work so far,\" complete the Review Gate and the Work Commit Gate before this check.\nDo not abort and finish on this check alone for an unreviewed dirty tree.\n\n`scripts\u002Frelease-preflight.sh` also detects mirror drift in the `.agents\u002Fskills\u002F` mirror before tag creation. If `.\u002Fscripts\u002Fsync-skill-mirrors.sh` produces a diff, stop the release, commit that diff, then proceed to the tag.\n\n### 2. Version file auto-detection\n\nSearch in priority order. Treat the first one found as the source of truth:\n\n```python\n# Python snippet to run inline\nimport os, json, re\nimport tomllib  # Python 3.11+\n\ndef detect_version_file():\n    if os.path.exists(\"VERSION\"):\n        with open(\"VERSION\") as f:\n            return (\"VERSION\", f.read().strip(), None)\n    if os.path.exists(\"package.json\"):\n        with open(\"package.json\") as f:\n            data = json.load(f)\n        return (\"package.json\", data[\"version\"], None)\n    if os.path.exists(\"pyproject.toml\"):\n        with open(\"pyproject.toml\", \"rb\") as f:\n            data = tomllib.load(f)\n        if \"project\" in data:\n            return (\"pyproject.toml\", data[\"project\"][\"version\"], \"[project]\")\n        if \"tool\" in data and \"poetry\" in data[\"tool\"]:\n            return (\"pyproject.toml\", data[\"tool\"][\"poetry\"][\"version\"], \"[tool.poetry]\")\n    if os.path.exists(\"Cargo.toml\"):\n        with open(\"Cargo.toml\", \"rb\") as f:\n            data = tomllib.load(f)\n        return (\"Cargo.toml\", data[\"package\"][\"version\"], \"[package]\")\n    raise RuntimeError(\"No supported version file found\")\n```\n\nDetails: [version-files.md](${CLAUDE_SKILL_DIR}\u002Freferences\u002Fversion-files.md)\n\n### 3. Claude Plugin Tag Preflight\n\nIn a project where `.claude-plugin\u002Fplugin.json` exists, create a Claude plugin release tag in addition to the normal GitHub Release tag.\n\nIn short, before hand-assembling `git tag -a`, pass Claude Code's own plugin validation, then create the `{plugin-name}--v{version}` tag.\n\nThe Pre-Gate does not rewrite files; it confirms the following.\nDo not pick up version sync with `grep` \u002F `sed`; read JSON with a structured parser:\n\n```bash\ncommand -v claude >\u002Fdev\u002Fnull || { echo \"claude CLI is missing\"; exit 1; }\nclaude plugin validate .claude-plugin\u002Fplugin.json\n\nHARNESS_PLUGIN_ROOT=\"${CLAUDE_PLUGIN_ROOT:-.}\"\npython3 \"${HARNESS_PLUGIN_ROOT}\u002Fscripts\u002Fcheck-release-version-sync.py\" --root .\n\nclaude plugin tag .claude-plugin --dry-run\n```\n\n`${HARNESS_PLUGIN_ROOT}\u002Fscripts\u002Fcheck-release-version-sync.py` reads all existing release surfaces and decides the canonical one in the order `VERSION > package.json > .claude-plugin\u002Fplugin.json > .claude-plugin\u002Fmarketplace.json`.\nOn top of that, it does not proceed to tag \u002F release if there is even one of the following mismatches \u002F omissions:\n\n- `VERSION`\n- `.version` in `package.json`\n- `.version` in `.claude-plugin\u002Fplugin.json`\n- `.metadata.version` in `.claude-plugin\u002Fmarketplace.json`\n- `.plugins[].version` in `.claude-plugin\u002Fmarketplace.json` (each plugin entry in the array)\n\nOn a mismatch, it shows which surface differs from the canonical, or which field is missing \u002F invalid.\nFor machine processing or CI, use `--json`:\n\n```bash\npython3 \"${HARNESS_PLUGIN_ROOT}\u002Fscripts\u002Fcheck-release-version-sync.py\" --root . --json\n```\n\nThis check exists to prevent 3 accidents:\n\n- Cutting a tag while the versions of `VERSION` and `.claude-plugin\u002Fplugin.json` are out of sync\n- Proceeding to the release workflow while the version in `package.json` \u002F a marketplace entry is stale\n- Getting stuck later on plugin install \u002F update by not passing the plugin manifest \u002F marketplace entry validation\n\nWith `--dry-run`, you can see the tag name `claude plugin tag` will actually create and the internal `git tag -a` \u002F push-equivalent commands. Include the commands you see here in the Confirmation Gate plan.\n\n### 4. Bump auto-estimation\n\nAnalyze the headings directly under `[Unreleased]` to determine the bump level:\n\n| Heading within [Unreleased] | Estimated bump |\n|-----------------------------|----------------|\n| Includes `### Breaking Changes` or `### Removed` | **major** |\n| Includes `### Added` (no Removed\u002FBreaking) | **minor** |\n| Only `### Fixed` \u002F `### Changed` \u002F `### Security` | **patch** |\n| Empty section | **error: nothing to release** |\n\nIf the user explicitly specifies with `\u002Frelease patch|minor|major`, that takes precedence.\nDetails: [bump-detection.md](${CLAUDE_SKILL_DIR}\u002Freferences\u002Fbump-detection.md)\n\n### 5. Draft the CHANGELOG (in memory)\n\nCompute the following; do not write yet:\n\n1. Cut out the body of `## [Unreleased]`\n2. Build a form that inserts `## [\u003Cnew>] - YYYY-MM-DD` between `## [Unreleased]` and `## [\u003Cprevious>]`\n3. Trailing compare link:\n   - `[Unreleased]: ...\u002Fcompare\u002Fv\u003Cprev>...HEAD` → `v\u003Cnew>...HEAD`\n   - Add `[\u003Cnew>]: ...\u002Fcompare\u002Fv\u003Cprev>...v\u003Cnew>`\n4. Extract the repo URL dynamically from the existing `[Unreleased]: ` line\n\n### 6. Draft the Release Notes (in memory)\n\nGenerate the markdown for the GitHub Release based on the content of the `## [\u003Cnew>]` section:\n\n```markdown\n## What's Changed\n\n**\u003Crelease theme (one line)>**\n\n### Before \u002F After\n\u003Ctable>\n\n### Added \u002F Changed \u002F Fixed \u002F Removed\n\u003Ccopy the relevant sections>\n\n---\n\n🤖 Generated with [Claude Code](https:\u002F\u002Fclaude.com\u002Fclaude-code)\n```\n\nDetails: [release-notes.md](${CLAUDE_SKILL_DIR}\u002Freferences\u002Frelease-notes.md)\n\n## Confirmation Gate\n\nOnce all drafts are ready, present them to the user just once:\n\n```\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nRelease Plan: v\u003Cold> → v\u003Cnew> (\u003Cbump>)\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n Version file: \u003Cdetected file>\n Bump reason:  \u003Cwhy this level was chosen>\n\n CHANGELOG changes:\n   Detected \u003CN> changes in [Unreleased]\n   Finalize as [\u003Cnew>] - YYYY-MM-DD\n   Add the compare link\n\n GitHub Release notes preview:\n   \u003Cfirst 10 lines>\n   ...\n\n Files to modify:\n   - \u003Cversion file>\n   - CHANGELOG.md\n\n Final actions:\n   - git commit -m \"chore: release v\u003Cnew>\"\n   - git push origin \u003Crelease-branch>\n   - gh pr create\u002Fupdate + gh pr merge into \u003Cdefault-branch>\n   - git fetch origin \u003Cdefault-branch> && git checkout \u003Cdefault-branch>\n   - claude plugin tag .claude-plugin --push --remote origin  # for plugin projects. Run on the default branch\n   - git tag -a v\u003Cnew>                                        # when a semver tag for the GitHub Release is needed. Create on the default branch\n   - git push origin \u003Cdefault-branch> --tags\n   - (after the tag push, the GitHub Actions release workflow publishes the release automatically)\n\nProceed? [yes \u002F cancel \u002F \u003Camendment>]\n```\n\n## Post-Gate details\n\nRuns uninterrupted after approval. On failure, the policy is:\n\n| Failure point | Recovery |\n|---------------|----------|\n| File rewrite failed | Abort there; the local tree stays dirty for a human to judge |\n| commit failed | Hook rejection, etc. Present the cause to the user and prompt a fix |\n| PR create\u002Fmerge failed | Stop with the release incomplete. Do not proceed to tag \u002F GitHub Release |\n| plugin tag validation failed | Fix the `VERSION` \u002F `.claude-plugin\u002Fplugin.json` \u002F marketplace entry mismatch, and do not proceed to tag creation |\n| push failed | A remote-side problem. Keep the local commit\u002Ftag |\n\n### PR \u002F Main Merge Gate\n\nAfter the Post-Gate release commit, merge the GitHub PR into the default branch before creating the tag.\n\n```bash\nrelease_branch=\"$(git branch --show-current)\"\ndefault_branch=\"${HARNESS_RELEASE_DEFAULT_BRANCH:-main}\"\n\ngit push -u origin \"$release_branch\"\ngh pr create --base \"$default_branch\" --head \"$release_branch\" --title \"chore: release v\u003Cnew>\" --body \"\u003Crelease summary>\"\ngh pr merge --merge --delete-branch=false\n\ngit fetch origin \"$default_branch\" --tags\ngit checkout \"$default_branch\"\ngit pull --ff-only origin \"$default_branch\"\ngit merge-base --is-ancestor \"\u003Crelease-commit>\" \"origin\u002F$default_branch\"\n```\n\nIf an existing PR exists, do not create a new one; update the existing PR's body and merge it. If the repository policy requires a squash merge, confirm that the release bump content (version files + CHANGELOG + source commits) is included in the default branch, not the release commit hash.\n\nCreate the tag after this Gate completes, on the default branch's HEAD or on a commit reachable from the release commit. Do not create a GitHub Release with a tag pointing at a commit that exists only on the release branch.\n\n### Tag creation for a Claude plugin project\n\nIn a project with `.claude-plugin\u002Fplugin.json`, confirm version sync once more on the default branch after the PR\u002Fmain merge, then create the plugin tag:\n\n```bash\nHARNESS_PLUGIN_ROOT=\"${CLAUDE_PLUGIN_ROOT:-.}\"\npython3 \"${HARNESS_PLUGIN_ROOT}\u002Fscripts\u002Fcheck-release-version-sync.py\" --root .\n\nclaude plugin tag .claude-plugin --dry-run\nclaude plugin tag .claude-plugin --push --remote origin\n```\n\nThe tag `claude plugin tag` creates is in `{plugin-name}--v{version}` format. In a project whose existing GitHub Release workflow assumes a `vX.Y.Z` tag, create a `git tag -a v\u003Cnew>` separately from the plugin tag. Leave the plugin distribution tag to `claude plugin tag`, and treat the semver tag for the GitHub Release as the release automation's compatibility surface.\n\n### Verify Workflow Publish\n\nAfter the tag push, `.github\u002Fworkflows\u002Frelease.yml` publishes the release automatically. The skill verifies the result with:\n\n```bash\nOWNER=\"$(git remote get-url origin | sed 's|.*github.com[:\u002F]\\([^\u002F]*\u002F[^\u002F]*\\)\\.git|\\1|')\"\nbash scripts\u002Frelease-verify-publish.sh \"v${NEW_VERSION}\" \"${OWNER}\"\n```\n\nTimeout: 5-second interval × 60 = up to 5 minutes of polling.\n\n- exit 0: PASS — `draft=false` and all 4 platform assets published\n- exit 2: WARN — timeout (the tag is already pushed, so do not abort; prompt human judgment)\n- exit 3: ERROR — API error (permission\u002Fauth problem, requires manual investigation)\n\nVerify is done via `gh api`. Do not use the GitHub CLI release subcommand prefix, since it is denied by the CC runtime hard floor.\n\n## `--dry-run` mode\n\nRuns the entire Pre-Gate and shows the content up to the Confirmation Gate, but **stops at the gate and does not proceed to the Post-Gate**.\n\nFor a Claude plugin project, even in dry-run it runs `python3 \"${HARNESS_PLUGIN_ROOT}\u002Fscripts\u002Fcheck-release-version-sync.py\" --root .` and `claude plugin tag .claude-plugin --dry-run` to show the plugin tag name that will actually be created and the push target. If the version surfaces of `VERSION` \u002F `package.json` \u002F `.claude-plugin\u002Fplugin.json` \u002F `.claude-plugin\u002Fmarketplace.json` are mismatched or missing here, stop at the dry-run point.\n\n## Environment variables\n\nUsed for per-project adjustment:\n\n| Variable | Description |\n|----------|-------------|\n| `HARNESS_RELEASE_PROJECT_ROOT` | Repository root (default: `$(pwd)`) |\n| `HARNESS_RELEASE_BRANCH` | Branch to push (default: the current branch) |\n| `HARNESS_RELEASE_DEFAULT_BRANCH` | The default branch to merge the PR into (default: `main`) |\n| `HARNESS_RELEASE_HEALTHCHECK_CMD` | An additional command to run in Preflight |\n| `HARNESS_RELEASE_SKIP_GH` | `1` skips GitHub Release creation |\n\n## CHANGELOG writing rules\n\nThe `[Unreleased]` section must always have one of the following subsections:\n\n```markdown\n## [Unreleased]\n\n### Added       ← minor\n### Changed     ← patch\n### Deprecated  ← minor\n### Removed     ← major\n### Fixed       ← patch\n### Security    ← patch\n### Breaking Changes  ← major (non-standard in Keep a Changelog but common)\n```\n\nThis skill parses these headings mechanically, so it cannot recognize heading variants (`### Fix` \u002F `### Bug Fixes`, etc.). Use the KaCL standard headings.\n\n## Pre-shipping acceptance decision (for non-engineers)\n\nPropose `harness-accept` before finalizing the release. It is an \"acceptance decision\" screen that summarizes, on a single HTML page, whether each acceptance condition was met and a ship\u002Fwait\u002Freject recommendation, so a requester can judge whether to ship without technical knowledge.\n\n## Related skills\n\n- `harness-release-internal` - a harness-specific preflight\u002Ffinalization run additionally when releasing the main harness itself (not distributed)\n- `harness-plan` - Plans.md management\n- `harness-review` - code review before release\n- `harness-accept` - acceptance decision HTML (for non-engineers, proposed before release)\n\n## Design philosophy\n\n- **PR ready \u002F release ready separation**: PR ready is review + evidence pack. release ready goes all the way to version\u002Ftag\u002FGitHub Release\u002FCI. lane:fast \u002F lane:gate may stop at PR ready\n- **Single gate**: the user's decision point is just once. Inserting mini-confirmations turns it into a rubber stamp and loses meaning\n- **Draw everything up front**: prohibit \"rethinking\" after entering the Post-Gate. Have all drafts ready before the Gate\n- **Main merge is the completion condition**: create the release tag \u002F GitHub Release only after the default branch merge. Treat a branch-only release as incomplete\n- **Failures are transparent**: on a mid-way failure, do not attempt an automatic rollback; present the current state to the user for a decision\n- **Project-agnostic**: do not assume a specific environment such as VERSION file format, mirror, or residue check. Split main-harness-specific processing into `harness-release-internal`\n",{"kind":24,"name":5,"pair":25,"role":26,"owner":27,"shape":24,"since":28,"effort":29,"context":30,"purpose":31,"trigger":32,"description":7,"allowed-tools":33,"argument-hint":40,"description-en":7,"user-invocable":41},"workflow","harness-review","orchestrator","harness-core","2026-05-05","high","fork","Release projects through changelog, version, PR\u002Fmain merge, tag, and GitHub Release gates","release, version bump, publish",[34,35,36,37,38,39],"Read","Write","Edit","Bash","AskUserQuestion","Skill","[patch|minor|major|--dry-run]",true,"main","3517f6fc9c5159f32d585682386ed45e35c30ddf","skills\u002Fharness-release","https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness","https:\u002F\u002Fgithub.com\u002Ffoden303","Software Engineer","2026-11-06 10:59:21",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":41},[51,54,57],{"tool":52,"command":53},"npx","npx skills add foden303\u002Fharness --skill harness-release",{"tool":55,"command":56},"bunx","bunx skills add foden303\u002Fharness --skill harness-release",{"tool":58,"command":59},"pnpm","pnpm dlx skills add foden303\u002Fharness --skill harness-release","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness\u002Fblob\u002Fmain\u002Fskills\u002Fharness-release\u002FSKILL.md",[62,68,72],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fbump-detection.md","REFERENCE","参考文档",3411,"https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness\u002Fblob\u002Fmain\u002Fskills\u002Fharness-release\u002Freferences\u002Fbump-detection.md",{"path":69,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Frelease-notes.md",2654,"https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness\u002Fblob\u002Fmain\u002Fskills\u002Fharness-release\u002Freferences\u002Frelease-notes.md",{"path":73,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fversion-files.md",3687,"https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness\u002Fblob\u002Fmain\u002Fskills\u002Fharness-release\u002Freferences\u002Fversion-files.md",[77,83,89,96,103,110],{"skillNo":78,"name":79,"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":80,"categories":81,"keywords":82,"publishedAt":19},"01M79DWR27RWW11HNKY0MRECPP","escape-skill","https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fzz-review-escape\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"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":86,"categories":87,"keywords":88,"publishedAt":19},"01M79DWPSR8ZK3V4DQK5EWVJ3K","zz-review-empty","https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fzz-review-empty\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M79DWFV6PYV0QEZ3SC32VMCM","memory","Manage SSOT, memory, and cross-tool memory search. Guardian of decisions.md and patterns.md. Use when user mentions memory, SSOT, decisions.md, patterns.md, merging, migration, SSOT promotion, sync memory, save learnings, memory search, harness-mem, past decisions, or record this. Do NOT load for: implementation work, reviews, ad-hoc notes, or in-session logging.","https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness\u002Fblob\u002Fmain\u002Fskills\u002Fmemory\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M79DWB6MB7EQK2JT4A84NHJD","maintenance","File cleanup and archiving. Tidies up bloated Plans.md, session-log.md, old logs, and state files. Trigger: \u002Fmaintenance, cleanup, archive, organize, split session-log. Do NOT load for: implementation, review, release, new feature development.","https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness\u002Fblob\u002Fmain\u002Fskills\u002Fmaintenance\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M79DW33AEPBCXFAMX8YH56PG","harness-work","HAR: Execute Plans.md tasks from single task to full parallel team run. Trigger: implement, execute, do everything, breezing, team run, parallel. Do NOT load for: planning, review, release, setup.","https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness\u002Fblob\u002Fmain\u002Fskills\u002Fharness-work\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M79DVWV7PZC0E2GYC103QBYZ","harness-sync","HAR: Sync Plans.md with implementation. Drift detect, marker update, retrospective. Trigger: sync-status, where am I, check progress. --snapshot for snapshots. Do NOT load for: planning, implementation, review, release.","https:\u002F\u002Fgithub.com\u002Ffoden303\u002Fharness\u002Fblob\u002Fmain\u002Fskills\u002Fharness-sync\u002FSKILL.md",[],[]]