← Home ← Codex ← DEBT ← Engine
Browse by Category
+ added · updated 7d
← Back to glossary

Semantic Versioning

Style Beginner
debt(d7/e3/b5/t5)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7) — tools like semantic-release and conventional-changelog can automate versioning if adopted, but detecting that a MINOR bump actually contains breaking changes requires human review of the diff or downstream breakage; composer won't flag it.

e3 Effort Remediation debt — work required to fix once spotted

Closest to 'simple parameterised fix' (e3) — the quick_fix is adopting a strict semver policy and bumping correctly going forward; if a bad release already shipped, you yank and re-release under the correct major, which is a small versioning fix rather than a cross-file refactor.

b5 Burden Structural debt — long-term weight of choosing wrong

Closest to 'persistent productivity tax' (b5) — versioning discipline applies to every release across web and cli contexts and shapes how every consumer pins dependencies; mistakes propagate to all downstream users, but it doesn't define system architecture.

t5 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap (documented gotcha)' (t5) — the misconception that PATCH can include small behavioural changes is widespread; most devs eventually learn that any observable change is at minimum MINOR, but it's a well-known gotcha rather than an inversion of similar concepts.

About DEBT scoring →

Also Known As

SemVer semantic versioning MAJOR.MINOR.PATCH version number

TL;DR

MAJOR.MINOR.PATCH — bump MAJOR for breaking changes, MINOR for new backwards-compatible features, PATCH for backwards-compatible bug fixes. Pre-release and build metadata extend this.

Explanation

SemVer 2.0: MAJOR.MINOR.PATCH. MAJOR: incompatible API changes. MINOR: new functionality, backwards compatible. PATCH: bug fixes, backwards compatible. Pre-release: 1.0.0-alpha.1, 1.0.0-beta.2, 1.0.0-rc.1 — lower precedence than release. Build metadata: 1.0.0+build.123 — ignored in precedence. Caret (^1.2.3): allows MINOR and PATCH updates. Tilde (~1.2.3): allows only PATCH updates. SemVer with Conventional Commits enables automated changelog generation and version bumping (semantic-release, changesets).

Common Misconception

PATCH versions can include small behavioural changes — any change in observable behaviour is at minimum a MINOR change; PATCH is strictly bug fixes only.

Why It Matters

Incorrect semantic versioning causes dependency conflicts — a MINOR bump that actually contains breaking changes breaks every consumer's app when they run composer update.

Common Mistakes

  • Releasing breaking changes as MINOR — any dependency that allows ^1.x automatically gets the breaking change.
  • Not starting at 1.0.0 for stable public APIs — 0.x means no stability guarantees; release 1.0.0 when the API is stable.
  • Version 0.0.1 for everything — arbitrary version numbers without semantic meaning defeat the system.
  • Not using pre-release versions for testing — release 2.0.0-beta.1 before 2.0.0 to allow early adopters to test.

Code Examples

✗ Vulnerable
# Breaking change released as MINOR — breaks consumers:
# Version 1.5.0: renamed method process() to run()
# Composer allows: ^1.0 (caret = any 1.x)
# Consumer runs: composer update
# Gets 1.5.0: their code calling process() breaks
# Correct version: 2.0.0 (MAJOR — breaking change)
✓ Fixed
# Correct versioning:
# Bug fix: 1.2.3 → 1.2.4 (PATCH)
# New optional parameter: 1.2.3 → 1.3.0 (MINOR)
# Renamed method: 1.2.3 → 2.0.0 (MAJOR)

# composer.json:
"require": {
    "vendor/lib": "^2.0"   # Allows 2.0.0 through 2.x.x
    "vendor/lib": "~2.1.0" # Allows 2.1.0 through 2.1.x only
}

# Changelog driven by Conventional Commits:
# feat: → MINOR bump
# fix: → PATCH bump
# feat!: or BREAKING CHANGE: → MAJOR bump

Added 15 Mar 2026
Edited 22 Mar 2026
Views 98
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings W 0 pings T 2 pings F 0 pings S 1 ping S 0 pings M 0 pings T 1 ping W 0 pings T 1 ping F 0 pings S 0 pings S 1 ping M 1 ping T 0 pings W 0 pings T 0 pings F 0 pings S 2 pings S 0 pings M 0 pings T 1 ping W 0 pings T 0 pings F 0 pings S 0 pings S 1 ping M 0 pings T 0 pings W 0 pings T
No pings yet today
No pings yesterday
Amazonbot 12 Ahrefs 7 PetalBot 7 SEMrush 7 Bing 6 ChatGPT 5 Scrapy 3 Google 2 Twitter/X 2 Brave Search 2 Applebot 2 Perplexity 1 Meta AI 1 Unknown AI 1
crawler 53 crawler_json 5
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: Low
⚡ Quick Fix
Follow semver strictly: patch (1.0.x) for bug fixes, minor (1.x.0) for backwards-compatible features, major (x.0.0) for breaking changes — document what constitutes a breaking change in your CONTRIBUTING.md
📦 Applies To
any web cli
🔗 Prerequisites
🔍 Detection Hints
Breaking changes released as minor version; no CHANGELOG; version not following semver pattern; composer constraints too loose allowing breaking updates
Auto-detectable: ✓ Yes semantic-release conventional-changelog composer
⚠ Related Problems
🤖 AI Agent
Confidence: Medium False Positives: Medium ✗ Manual fix Fix: Low Context: File

References


✓ schema.org compliant