{"skills":[{"name":"Choose a semantic release version","description":"Work out the smallest appropriate next stable version from changes to a documented public API.","content":"# Choose a semantic release version\n\nWork out the smallest appropriate next stable version from changes to a documented public API.\n\n## When to use this skill\n\n- Someone has a changelog or a list of merged changes and the current version, and asks what the next version should be.\n- A team disagrees whether a change is breaking, such as removing a response field or making an optional argument required.\n- A library is deprecating part of its API and wants to know which release should carry the deprecation.\n\n## When not to use it\n\n- Projects that use calendar versioning, or an ecosystem rule that differs from SemVer. Follow their documented policy.\n- Deciding whether a breaking change should be released at all. The version number records compatibility; it does not approve the change.\n- Pre-1.0 (0.y.z) projects without a stated policy. SemVer says anything may change before 1.0.0, so ask what the project promises.\n\n## What you need\n\n- Current stable version and the public API contract for the change set.\n- A list of fixes, backwards-compatible additions, deprecations and breaking changes with their identifiers.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- What is the current released version, and is it 1.0.0 or later?\n- Where is the public API documented? Compatibility is judged against what callers were told they could rely on.\n- Does the project follow SemVer 2.0.0 exactly, or an ecosystem convention such as Cargo's rule that a change in the leftmost non-zero number of a 0.y.z version is breaking?\n- Is this a prerelease, such as 2.0.0-rc.1, or a stable release?\n\n## Method\n\n1. Confirm the project promises Semantic Versioning 2.0.0, has a declared public API and is at 1.0.0 or later. For 0.y.z versions or prereleases, ask for the project's policy instead of applying the stable rules.\n2. Judge each change against the documented public API and the behaviour callers were entitled to rely on, not the size of the diff. Removing or renaming a public item, removing a documented field or making an optional argument required is breaking. In some ecosystems so is adding a value to a closed enumeration; Cargo lists this as major unless the type is marked non_exhaustive.\n3. Classify each change: major for any backwards-incompatible public change; minor for new backwards-compatible public functionality or for marking public functionality deprecated; patch for backwards-compatible bug fixes; none for work outside the released package that needs no release.\n4. Flag a bug fix that changes behaviour many callers depend on. SemVer's FAQ allows a major release in that case even though the change could strictly be a patch, so it is a decision for the maintainers.\n5. Take the highest level required. Increment that number and reset the lower ones to zero: from 2.8.5, major gives 3.0.0, minor 2.9.0 and patch 2.8.6. Numbers increase numerically, so a minor release after 1.9.9 is 1.10.0.\n6. List the change IDs at the winning level as the drivers. Leave prerelease tags and build metadata off a stable version unless asked; build metadata does not affect precedence.\n7. Never change a version that has been published. If a breaking change went out in a minor or patch release by mistake, SemVer says to release a new minor version that restores compatibility and to document the faulty version.\n\n## Checks before you deliver\n\n- A small diff can remove a public guarantee. Size of the code change does not determine the increment.\n- A renamed public method still breaks callers when the original entry point disappears, even if an equivalent method exists.\n- Forgetting to reset lower numbers gives versions such as 3.1.4 after a breaking change to 2.1.4. Major resets minor and patch; minor resets patch.\n- Deprecation is a minor change, not a patch. SemVer requires a minor release when public functionality is deprecated, and at least one minor release carrying the deprecation before removal in a major.\n- Comparing versions as text puts 1.10.0 before 1.9.0. Compare each number numerically.\n- A dependency update that changes nothing in your public API is compatible. One that changes types or behaviour your callers see is judged like any other change to that API.\n\n## How to present the result\n\nLead with the proposed version and the bump, for example 'Release 3.0.0 (major)'. Then list the changes grouped by level with their IDs, naming the drivers. For a major release, draft the migration note listing each breaking change and what callers must do, ready to paste into the changelog.\n\n## Worked example\n\n**Request:** Choose the next stable release under SemVer. Current 2.8.5.\n\n**Supplied material:**\n\n```text\nC1: repair the documented rounding of totals.\nC2: add an optional public sort flag with prior default.\nC3: remove the documented response field line_total.\n```\n\n**Answer:** Release 3.0.0. Removing the documented line_total response field breaks existing callers. Include that removal in the migration notes alongside the optional sort flag and the rounding fix.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn bump as major, minor, patch, none or policy-needed, version as the proposed stable version (null for policy-needed), and drivers as IDs at the highest required level in input order. For none keep the current version and leave drivers empty. For policy-needed use an empty drivers list.\n\n## Sources\n\n- [Semantic Versioning 2.0.0](https:\/\/semver.org\/): The specification: patch for backwards-compatible fixes, minor for compatible new public functionality and for any public deprecation, major for incompatible changes, lower numbers reset to zero, 0.y.z for initial development and build metadata ignored for precedence. Its FAQ covers deprecating before removal and correcting an accidental breaking release.\n- [The Cargo Book: SemVer compatibility](https:\/\/doc.rust-lang.org\/cargo\/reference\/semver.html): Rust's official guide classifies concrete API changes, for example renaming or removing public items as major and adding public items as minor, and explains that Cargo treats a change in the leftmost non-zero number of a 0.y.z version as breaking. The skill uses it to show that pre-1.0 conventions vary by ecosystem.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/choose-a-semantic-release-version\n","scope":"contextual","trigger_keywords":["Choose a semantic release version","choose-a-semantic-release-version","choose a semantic release version","Given these changes, should the next release be a patch, minor or major version?","Given these changes, should the next release be a patch, minor or major version","what semver bump","next semantic version","which semver bump"],"is_private":true,"is_active":true,"scripts":[{"name":"choose-a-semantic-release-version-check","description":"Compare a saved JSON answer with a published test. Pass tests\/case-1\/expected.json (or another case) and the path to your answer.","language":"python","filename":"choose-a-semantic-release-version-check.py","content":"from pathlib import Path\nimport runpy\n\nrunpy.run_path(str(Path(__file__).parent \/ 'tests' \/ 'check.py'), run_name='__main__')\n","supporting_files":[{"path":"SKILL.md","content":"---\nname: choose-a-semantic-release-version\ndescription: \"Work out the next version number under Semantic Versioning 2.0.0 from a list of changes to a documented public API: major for breaking changes, minor for compatible features and deprecations, patch for fixes. Use when someone asks which semver bump a release needs or what the next version should be.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/choose-a-semantic-release-version\n---\n\n# Choose a semantic release version\n\nWork out the smallest appropriate next stable version from changes to a documented public API.\n\n## When to use this skill\n\n- Someone has a changelog or a list of merged changes and the current version, and asks what the next version should be.\n- A team disagrees whether a change is breaking, such as removing a response field or making an optional argument required.\n- A library is deprecating part of its API and wants to know which release should carry the deprecation.\n\n## When not to use it\n\n- Projects that use calendar versioning, or an ecosystem rule that differs from SemVer. Follow their documented policy.\n- Deciding whether a breaking change should be released at all. The version number records compatibility; it does not approve the change.\n- Pre-1.0 (0.y.z) projects without a stated policy. SemVer says anything may change before 1.0.0, so ask what the project promises.\n\n## What you need\n\n- Current stable version and the public API contract for the change set.\n- A list of fixes, backwards-compatible additions, deprecations and breaking changes with their identifiers.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- What is the current released version, and is it 1.0.0 or later?\n- Where is the public API documented? Compatibility is judged against what callers were told they could rely on.\n- Does the project follow SemVer 2.0.0 exactly, or an ecosystem convention such as Cargo's rule that a change in the leftmost non-zero number of a 0.y.z version is breaking?\n- Is this a prerelease, such as 2.0.0-rc.1, or a stable release?\n\n## Method\n\n1. Confirm the project promises Semantic Versioning 2.0.0, has a declared public API and is at 1.0.0 or later. For 0.y.z versions or prereleases, ask for the project's policy instead of applying the stable rules.\n2. Judge each change against the documented public API and the behaviour callers were entitled to rely on, not the size of the diff. Removing or renaming a public item, removing a documented field or making an optional argument required is breaking. In some ecosystems so is adding a value to a closed enumeration; Cargo lists this as major unless the type is marked non_exhaustive.\n3. Classify each change: major for any backwards-incompatible public change; minor for new backwards-compatible public functionality or for marking public functionality deprecated; patch for backwards-compatible bug fixes; none for work outside the released package that needs no release.\n4. Flag a bug fix that changes behaviour many callers depend on. SemVer's FAQ allows a major release in that case even though the change could strictly be a patch, so it is a decision for the maintainers.\n5. Take the highest level required. Increment that number and reset the lower ones to zero: from 2.8.5, major gives 3.0.0, minor 2.9.0 and patch 2.8.6. Numbers increase numerically, so a minor release after 1.9.9 is 1.10.0.\n6. List the change IDs at the winning level as the drivers. Leave prerelease tags and build metadata off a stable version unless asked; build metadata does not affect precedence.\n7. Never change a version that has been published. If a breaking change went out in a minor or patch release by mistake, SemVer says to release a new minor version that restores compatibility and to document the faulty version.\n\n## Checks before you deliver\n\n- A small diff can remove a public guarantee. Size of the code change does not determine the increment.\n- A renamed public method still breaks callers when the original entry point disappears, even if an equivalent method exists.\n- Forgetting to reset lower numbers gives versions such as 3.1.4 after a breaking change to 2.1.4. Major resets minor and patch; minor resets patch.\n- Deprecation is a minor change, not a patch. SemVer requires a minor release when public functionality is deprecated, and at least one minor release carrying the deprecation before removal in a major.\n- Comparing versions as text puts 1.10.0 before 1.9.0. Compare each number numerically.\n- A dependency update that changes nothing in your public API is compatible. One that changes types or behaviour your callers see is judged like any other change to that API.\n\n## How to present the result\n\nLead with the proposed version and the bump, for example 'Release 3.0.0 (major)'. Then list the changes grouped by level with their IDs, naming the drivers. For a major release, draft the migration note listing each breaking change and what callers must do, ready to paste into the changelog.\n\n## Worked example\n\n**Request:** Choose the next stable release under SemVer. Current 2.8.5.\n\n**Supplied material:**\n\n```text\nC1: repair the documented rounding of totals.\nC2: add an optional public sort flag with prior default.\nC3: remove the documented response field line_total.\n```\n\n**Answer:** Release 3.0.0. Removing the documented line_total response field breaks existing callers. Include that removal in the migration notes alongside the optional sort flag and the rounding fix.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn bump as major, minor, patch, none or policy-needed, version as the proposed stable version (null for policy-needed), and drivers as IDs at the highest required level in input order. For none keep the current version and leave drivers empty. For policy-needed use an empty drivers list.\n\n## Sources\n\n- [Semantic Versioning 2.0.0](https:\/\/semver.org\/): The specification: patch for backwards-compatible fixes, minor for compatible new public functionality and for any public deprecation, major for incompatible changes, lower numbers reset to zero, 0.y.z for initial development and build metadata ignored for precedence. Its FAQ covers deprecating before removal and correcting an accidental breaking release.\n- [The Cargo Book: SemVer compatibility](https:\/\/doc.rust-lang.org\/cargo\/reference\/semver.html): Rust's official guide classifies concrete API changes, for example renaming or removing public items as major and adding public items as minor, and explains that Cargo treats a change in the leftmost non-zero number of a 0.y.z version as breaking. The skill uses it to show that pre-1.0 conventions vary by ecosystem.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/choose-a-semantic-release-version\n"},{"path":"LICENSE.txt","content":"Original Raq.com instructions and synthetic examples: CC BY 4.0.\nhttps:\/\/creativecommons.org\/licenses\/by\/4.0\/\nAttribution: Raq.com, https:\/\/skills.raq.com\/skills\/choose-a-semantic-release-version\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# Mixed API changes\n\nChoose the next stable release under SemVer. Current 2.8.5.\n\n## Supplied material\n\nC1: repair the documented rounding of totals.\nC2: add an optional public sort flag with prior default.\nC3: remove the documented response field line_total.\n\n## Worked answer\n\nRelease 3.0.0. Removing the documented line_total response field breaks existing callers. Include that removal in the migration notes alongside the optional sort flag and the rounding fix.\n\n## Reasoning\n\nThe removed field sets the release boundary even though the other changes are compatible.\n"},{"path":"tests\/check.py","content":"\"\"\"Check a saved agent answer locally with Python 3 (standard library only).\"\"\"\nimport json\nimport math\nimport sys\nfrom pathlib import Path\n\n\ndef compare(expected, actual, path=\"$\", accepted=None):\n    if isinstance(expected, bool) or isinstance(actual, bool):\n        if expected is not actual:\n            yield path\n    elif isinstance(expected, (int, float)) and isinstance(actual, (int, float)):\n        if not math.isclose(expected, actual, rel_tol=0, abs_tol=1e-8):\n            yield path\n    elif isinstance(expected, dict) and isinstance(actual, dict):\n        for key in sorted(set(expected) | set(actual)):\n            if key not in expected or key not in actual:\n                yield f\"{path}.{key}\"\n            elif not any(\n                not list(compare(option, actual[key]))\n                for option in (accepted or {}).get(key, [])\n            ):\n                yield from compare(expected[key], actual[key], f\"{path}.{key}\")\n    elif isinstance(expected, list) and isinstance(actual, list):\n        if len(expected) != len(actual):\n            yield f\"{path} (length)\"\n        for i, (left, right) in enumerate(zip(expected, actual)):\n            yield from compare(left, right, f\"{path}[{i}]\")\n    elif type(expected) != type(actual) or expected != actual:\n        yield path\n\n\ndef main():\n    if len(sys.argv) != 3:\n        raise SystemExit(\"Usage: python3 check.py expected.json answer.json\")\n    try:\n        expected, actual = [json.loads(Path(p).read_text(encoding=\"utf-8\")) for p in sys.argv[1:]]\n        alternatives = Path(sys.argv[1]).with_name(\"accepted.json\")\n        accepted = json.loads(alternatives.read_text(encoding=\"utf-8\")) if alternatives.is_file() else {}\n    except (ValueError, OSError) as error:\n        raise SystemExit(str(error))\n    differences = list(compare(expected, actual, accepted=accepted))\n    if differences:\n        raise SystemExit(\"Different fields: \" + \", \".join(differences))\n    print(\"Pass\")\n\n\nif __name__ == \"__main__\":\n    main()\n"},{"path":"tests\/README.md","content":"Give your agent SKILL.md and one request.txt in a fresh session. Keep the expected answer aside. Save the reply as answer.json, then run this from the tests folder:\n\n    python3 check.py case-1\/expected.json answer.json\n\nEach case also has an explanation. Where accepted.json exists, the checker accepts the alternatives listed there.\n"},{"path":"tests\/case-1\/request.txt","content":"Choose the next stable release under SemVer. Current 2.8.5.\nReturn only the JSON specified in SKILL.md for this test.\n\nC1: repair the documented rounding of totals.\nC2: add an optional public sort flag with prior default.\nC3: remove the documented response field line_total.\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"bump\": \"major\",\n    \"version\": \"3.0.0\",\n    \"drivers\": [\n        \"C3\"\n    ]\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"The removed field sets the release boundary even though the other changes are compatible.\n"},{"path":"tests\/case-2\/request.txt","content":"Choose the next stable release under SemVer. Current 1.9.9.\nReturn only the JSON specified in SKILL.md for this test.\n\nR7: mark public method preview() deprecated while retaining its existing behaviour.\nR8: fix a spelling mistake in help text.\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"bump\": \"minor\",\n    \"version\": \"1.10.0\",\n    \"drivers\": [\n        \"R7\"\n    ]\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"Marking a public API as deprecated requires a minor bump under the declared versioning policy.\n"}],"is_active":true,"is_approved":false}]}]}