Gestion des versions

VérifiéPrudence

Préparez et publiez une nouvelle version : mise à jour du changelog, détermination de la version sémantique, exécution de pre-commit, incrémentation avec commitizen et alignement des notes de version GitHub.

Spar Skills Guide Bot
DevOpsAvancé
04/08/2026
Claude Code
#release-management#changelog#semantic-versioning#commitizen#pre-commit

Recommandé pour

Synthèse automatique

Automatise la préparation et la publication d'une nouvelle version du projet expert-rotary-phone : mise à jour du changelog, choix de l'incrément SemVer, bump Commitizen, contrôles pre-commit et alignement des notes de version GitHub.

Points forts

  • Décrit un enchaînement complet et ordonné, du journal des commits depuis le dernier tag jusqu'au bump de version et au push.
  • Pré-scanne les `version_files` pour repérer les collisions de sous-chaînes et annule les réécritures accidentelles (par exemple `10.0.0` transformé en `10.0.1` dans une dépendance).
  • Lance des sous-agents en parallèle (copy-editor, qa-fixer) et fait remonter les modifications manuelles dans `.wiswa.jsonnet` via wiswa-sync.
  • En cas d'échec de `cz bump`, restaure l'état du dépôt avec `git checkout -- .` et s'arrête en alertant l'utilisateur plutôt que de contourner le problème.

Limites

  • Fortement lié à l'outillage d'un projet précis : Commitizen, Wiswa, pre-commit et les contraintes de sandbox de Claude Code.
  • Le document est tronqué au milieu de l'étape de vérification (manifest Flatpak), la phase de contrôle finale reste donc incomplète.
  • Suppose de pouvoir exécuter `pre-commit run -a` hors sandbox, sans proposer d'alternative pour d'autres environnements.
Quand l'utiliser

À utiliser lorsqu'il faut préparer et publier une nouvelle version taguée de expert-rotary-phone.

Quand l'éviter

À éviter sur un dépôt dépourvu de configuration Commitizen/Wiswa, ou pour toute tâche sans rapport avec une publication de version.

Analyse de sécurité

Prudence
Score qualité92/100

The skill performs legitimate release management tasks but uses powerful tools that modify repository and remote state, including pushing signed tags and GitHub releases. It explicitly directs running some commands outside the sandbox, which reduces isolation and could lead to unintended changes if the model misbehaves, though no destructive or exfiltrating actions are present.

Points d'attention
  • •Skill instructs running commands outside the sandbox (pre-commit run -a, git commit) to bypass read-only mount restrictions.
  • •Uses authenticated git push and gh release creation, modifying remote repository and tags.
  • •No allowed-tools declared despite requiring git, pre-commit, cz, gh, rg/grep.
Comment cette analyse est faite

Exemples

Cut a minor release
Prepare the next minor release of expert-rotary-phone: update CHANGELOG.md from the commits since the last tag, pick the right SemVer increment, and bump the version with cz bump --files-only.
Patch release after hotfixes
We merged three bug fixes since the last tag — run the release workflow as a patch bump and verify CITATION.cff and the Flatpak manifest once the bumps are done.
Version collision audit
Before bumping, scan every entry in [tool.commitizen].version_files for substring collisions with the current version and list anything cz would corrupt.

Release

Prepare and publish a new release for the expert-rotary-phone project.

You manage the release process: update the changelog, determine the version bump, run pre-commit checks, bump the version, and push, and align GitHub release notes with the changelog.

Workflow

  1. Review changes since last tag. Run git log $(git describe --tags --abbrev=0)..HEAD --oneline to see all commits since the last release.

  2. Update CHANGELOG.md. Add entries under [Unreleased] if not already present. Use the appropriate sections: Added, Changed, Fixed, Removed.

  3. Determine the version bump based on Semantic Versioning:

    • patch: bug fixes, dependency updates, documentation changes.
    • minor: new features, new commands, new public API additions.
    • major: breaking changes to public API, removed commands/functions.
  4. Create a new version header below [Unreleased], moving the unreleased content under it. Format: ## [X.Y.Z] - YYYY-MM-DD. Leave [Unreleased] empty above it.

  5. Launch agents in parallel before bumping:

    • copy-editor - to fix prose in the changelog entries.
    • qa-fixer - to format and fix any lint/spelling issues.
  6. Sync repo state back to .wiswa.jsonnet. Run the wiswa-sync agent so every hand edit to a Wiswa-managed file since the last regen is reflected in .wiswa.jsonnet. Any release-time discoveries (for example a version_files entry that was missing) must round-trip so the next regen reproduces them.

  7. Run pre-commit run -a outside the sandbox to ensure all hooks pass. The hooks write across the worktree, which the sandbox's read-only mount blocks. Fix any issues before proceeding.

  8. Record the current HEAD before bumping: git rev-parse HEAD (save this as PRE_BUMP_REF).

  9. Pre-scan version_files for collision risk. Note OLD (the current [tool.commitizen].version) and NEW (the post-bump version for the selected increment). For each entry in [tool.commitizen].version_files, run rg --fixed-strings --line-number 'OLD' <file> (or grep -nF 'OLD' <file>). Exactly one match is the canonical version field cz is meant to bump. Every other match is a collision candidate: cz uses plain string substitution, so any substring OLD in the file is replaced with NEW, regardless of context. Save the candidate list (file, line number, full pre-bump line) so the matches can be reverted after the bump. The classic example: OLD 0.0.0 and NEW 0.0.1 rewrite a "some-dep": "10.0.0" line into "some-dep": "10.0.1" even though 10.0.0 is unrelated to the project version.

  10. Run cz bump --files-only --increment {MAJOR,MINOR,PATCH} with the appropriate increment. This only updates version strings in files without committing or tagging. Never pass --changelog or -ch to cz bump. If cz bump fails for any reason:

    1. Restore the repository to the pre-bump state: git checkout -- .
    2. Stop work immediately and alert the user. Do not attempt to work around the failure.
  11. Revert accidental bump collisions. For every collision candidate recorded in the pre-scan, open the same file:line and confirm whether cz rewrote a substring inside an unrelated value (for example 10.0.0 → 10.0.1). If so, restore that line to its pre-bump content; leave the canonical version-field match in its post-bump state. If you are unsure whether a change is intended, prefer to revert and stop with a report rather than ship the bump with a corrupted dependency or transitive version.

  12. Verify version-bound and source-bound files. Stop and report if any check fails:

    • CITATION.cff if present: version matches NEW and date-released equals today's date. If cz bump did not update either, the file is missing from [tool.commitizen].version_files - add it, rerun wiswa-sync, and restart the bump.
    • Flatpak manifest (flatpak/**, any *.flatpak.{json,yaml}) if present: every version reference is updated to NEW (cz must drive this through version_files - fix the configuration as above if it did not), and every sources entry pointing at this repository uses tag: vNEW with a fresh commit: SHA where applicable. No local path: sources, no moving branch.
    • Snapcraft (snap/snapcraft.yaml or top-level snapcraft.yaml) if present: every version reference and every part's source-tag: equal NEW / vNEW. source: points at the remote repository, never a local path. Same version_files rule for cz.
  13. Commit the version bump outside the sandbox. Stage all changed files and commit with git commit -S -s -m 'bump: vOLD → vNEW' (replace OLD/NEW with actual versions). Run outside the sandbox because the pre-commit hooks invoked by the commit need to write across the worktree.

  14. Create a signed tag. Run git tag -s vNEW -m 'vNEW' (replace NEW with the new version).

  15. Push the commit and tag. Run git push && git push --tags.

  16. Update GitHub release notes using gh (authenticated for this repository). After the tag is on the remote, automation may create the GitHub Release record later or as a draft; do not skip this step when a draft exists.

    • Wait for the release: Poll until gh release view vNEW exits successfully, including when isDraft is true. Use a short sleep between attempts and a sensible overall timeout; if the release never appears, stop and report the failure.
    • Body from CHANGELOG.md: Copy only the content for this version (from the first ### Added, ### Changed, ### Fixed, or ### Removed under that version through the line before the next ## [ version header). Do not include the ## [X.Y.Z] - YYYY-MM-DD heading line. For GitHub's layout, promote each of those subsection headings from ### to ## (### Added → ## Added, and the same pattern for Changed, Fixed, and Removed).
    • Wrapping within list items: Undo changelog hard-wraps inside one bullet: when a list line ends with a single newline and the following line continues the same item (for example an indented continuation), join them with one space so - item with long sentence plus line 2 reads as - item with long sentence line 2. Do not join across a paragraph break: leave any run of two or more consecutive newlines (\n\n or more) unchanged.
    • Full Changelog line: After the body, append one blank line, then exactly: **Full Changelog**: https://github.com/Tatsh/expert-rotary-phone/compare/vPREV...vNEW where vNEW is this release's tag. Set vPREV to the tag of the most recent other GitHub release (for example from gh release list, ordered by recency, skipping vNEW). If no earlier release exists on GitHub, fall back to the previous version in CHANGELOG.md immediately below this entry, or the git tag that precedes vNEW.
    • Apply: Write the combined Markdown to a file (for example under .wiswa-ci/) and run gh release edit vNEW --notes-file <path>.
  17. Monitor CI until the release is undrafted. On GitHub, the release pipeline triggered by the tag push un-drafts the GitHub Release on success. Poll runs created at or after the push (use gh run list --branch vNEW and/or per-workflow filters; ignore older runs) on a short sleep until every post-push run reaches a terminal status and gh release view vNEW --json isDraft -q .isDraft returns false. Cap the loop with a sensible overall timeout. On all-green and undrafted, report the release URL and stop.

    If any post-push run failed, recover as follows:

    1. Alert the user with the failing run URLs and a one-line summary of the workflow and job that failed.
    2. Fetch the failing logs with gh run view <run-id> --log-failed (or --log for the full transcript) and read them to identify the root cause.
    3. Delete the broken release and tag. Run gh release delete vNEW --yes, git push origin :refs/tags/vNEW, and git tag -d vNEW.
    4. If the release was already un-drafted before the failure surfaced, do not reuse vNEW after the cleanup; a published release is part of the public history. Bump one more patch level so the recovery release is vNEW+1, leaving the failed tag as a recorded mistake.
    5. Apply the fix if the logs make the root cause clear, as a normal commit (separate from the original bump commit). Then restart from the version-bump step with the same OLD→NEW (or OLD→NEW+1 in the premature-undraft case).
    6. If the cause is unclear, stop and hand back to the user with the logs and the cleanup state.

Rules

  • Never use --no-verify or skip hooks.
  • Never force-push.
  • If any step fails, stop and report the error. Do not continue the release process.
  • The [Unreleased] section must always exist at the top of the changelog after the release.
  • Run pre-commit run -a and the version-bump git commit outside the sandbox; both need write access across the worktree.
  • Flatpak manifests and snapcraft.yaml at release time always build from the about-to-be pushed tag, never from a local path or moving branch.
  • Never hand-patch a version reference in CITATION.cff, a flatpak manifest, or snapcraft.yaml to compensate for a missing [tool.commitizen].version_files entry. Fix the configuration, run wiswa-sync so the fix reaches .wiswa.jsonnet, then restart the bump.
  • cz bump --files-only is plain string substitution, not pattern-aware. Always pre-scan every version_files entry for OLD substrings before bumping, and revert non-canonical matches afterwards so unrelated literals like 10.0.0 are not corrupted into 10.0.1.
  • A release is not complete until every post-push CI run reaches a terminal status and the GitHub Release is un-drafted. If recovery requires deleting a release that was already un-drafted, bump one more patch level instead of reusing the failed tag - a published release is part of the public history and must not be silently replaced.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/release-management-mse7in7r/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/release-management-mse7in7r' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/release-management-mse7in7r/download' --output '.skill-downloads/release-management-mse7in7r/SKILL.md.part' && mv '.skill-downloads/release-management-mse7in7r/SKILL.md.part' '.skill-downloads/release-management-mse7in7r/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Le fichier ne fournit pas un en-tête name/description exploitable pour cette procédure native. Le téléchargement reste disponible pour lecture ; utilisez le mode manuel ci-dessous.

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/release-management-mse7in7r/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires