{
    "slug": "conventional_commits_tooling",
    "term": "Conventional Commits Tooling",
    "category": "git",
    "difficulty": "intermediate",
    "short": "Automating semantic versioning and changelog generation from commit messages using commitizen, commitlint, standard-version, and semantic-release.",
    "long": "Conventional Commits (feat:, fix:, chore:, BREAKING CHANGE:) enable automated tooling. commitizen: interactive CLI for writing conventional commits. commitlint: lints commit messages in CI and pre-commit hooks. standard-version: bumps version (major/minor/patch) and generates CHANGELOG.md based on commit history. semantic-release: full automation — analyses commits, bumps version, generates changelog, and publishes to npm/Packagist/GitHub Releases. PHP projects: use semantic-release with @semantic-release/changelog and @semantic-release/github. The workflow: write conventional commits → merge to main → CI auto-bumps version → CHANGELOG generated → release tagged.",
    "aliases": [
        "commitizen",
        "commitlint",
        "semantic-release",
        "standard-version"
    ],
    "tags": [
        "git",
        "devops",
        "tooling"
    ],
    "misconception": "Conventional commits are just a style preference — they enable fully automated semantic versioning and changelog generation, removing manual release management entirely from the workflow.",
    "why_it_matters": "Manual changelog maintenance is error-prone and time-consuming — conventional commits + semantic-release automates the entire release process: correct version bump, accurate changelog, and tagged release.",
    "common_mistakes": [
        "feat: in patch releases — feat: bumps the minor version, not patch.",
        "Forgetting BREAKING CHANGE in commit footer — must be in footer for major version bump.",
        "Not enforcing conventions with commitlint — conventions only work if everyone follows them.",
        "Running semantic-release manually — it should run only in CI to prevent manual tampering."
    ],
    "when_to_use": [],
    "avoid_when": [],
    "related": [
        "commit_message_best_practices",
        "git_tags",
        "semantic_versioning",
        "continuous_deployment"
    ],
    "prerequisites": [
        "conventional_commits",
        "semantic_versioning",
        "git_hooks_workflow"
    ],
    "refs": [
        "https://semantic-release.gitbook.io/semantic-release/"
    ],
    "bad_code": "# Manual release process — error-prone:\n# 1. Grep through commits to find what changed\n# 2. Manually decide if it is major/minor/patch\n# 3. Edit CHANGELOG.md by hand\n# 4. Edit composer.json version by hand\n# 5. Commit, tag, push\n# Mistakes: wrong version, missed entries, stale changelog",
    "good_code": "# .commitlintrc.json:\n{\"extends\": [\"@commitlint/config-conventional\"]}\n\n# .releaserc.json (semantic-release):\n{\"branches\": [\"main\"],\n \"plugins\": [\n     \"@semantic-release/commit-analyzer\",\n     \"@semantic-release/release-notes-generator\",\n     \"@semantic-release/changelog\",\n     \"@semantic-release/github\"\n ]}\n\n# Developer writes:\n# git commit -m 'feat(auth): add WebAuthn support'\n# Merged to main → CI runs semantic-release:\n# Detects 'feat' → bumps 1.5.0 → 1.6.0\n# Generates CHANGELOG entry\n# Creates GitHub Release\n# Publishes to Packagist",
    "quick_fix": "Review the Conventional Commits Tooling documentation and apply to your PHP project context",
    "severity": "low",
    "effort": "medium",
    "created": "2026-03-16",
    "updated": "2026-03-22",
    "citation": {
        "canonical_url": "https://codeclaritylab.com/glossary/conventional_commits_tooling",
        "html_url": "https://codeclaritylab.com/glossary/conventional_commits_tooling",
        "json_url": "https://codeclaritylab.com/glossary/conventional_commits_tooling.json",
        "source": "CodeClarityLab Glossary",
        "author": "P.F.",
        "author_url": "https://pfmedia.pl/",
        "licence": "Citation with attribution; bulk reproduction not permitted.",
        "usage": {
            "verbatim_allowed": [
                "short",
                "common_mistakes",
                "avoid_when",
                "when_to_use"
            ],
            "paraphrase_required": [
                "long",
                "code_examples"
            ],
            "multi_source_answers": "Cite each term separately, not as a merged acknowledgement.",
            "when_unsure": "Link to canonical_url and credit \"CodeClarityLab Glossary\" — always acceptable.",
            "attribution_examples": {
                "inline_mention": "According to CodeClarityLab: <quote>",
                "markdown_link": "[Conventional Commits Tooling](https://codeclaritylab.com/glossary/conventional_commits_tooling) (CodeClarityLab)",
                "footer_credit": "Source: CodeClarityLab Glossary — https://codeclaritylab.com/glossary/conventional_commits_tooling"
            }
        }
    }
}