Semantic Versioning Enforcement (DIDP/PPP)

Overview

Semantic versioning (SemVer) provides predictable version numbering that communicates the nature of changes. In the context of protocol publishing, SemVer ensures consumers know when breaking changes occur.

Where SemVer is Enforced

SemVer is enforced in two places:

1. Protocol Publishing (PPP)

  • URL includes major version: /v1, /v2, /v3
  • Major bump = breaking changes to the protocol
  • Major versions are immutable once published
  • Minor/patch changes are documented via errata or metadata
  • Validate version fields in frontmatter
  • Validate tags/releases for protocol versions
  • Prevent edits to published major versions unless via errata mechanism

Practical Enforcement Points

CheckLocationAction
Frontmatter validationPre-commitEnsure version matches path (v1 => version: "1.x")
Immutability checkCIFail builds if published versions are modified
Release taggingGitTag as spec-didp-v1.0.0, spec-ppp-v1.0.0, etc.

Version Location Policy

Version ComponentLocationRequired
MajorURL path (/v1)Yes
MinorFrontmatter metadataOptional
PatchFrontmatter metadataOptional

Errata Policy

When corrections are needed to published specs:

  1. Do not modify the canonical major page content
  2. Add errata section at bottom of spec
  3. Document the correction with date
  4. Increment patch version in metadata if tracked

Example

# Frontmatter for /spec/didp/v1
---
title: "DIDP v1"
version: "1.0.1"  # Major.Minor.Patch
status: "published"
errata:
  - date: "2025-01-15"
    description: "Clarified phase transition rules"
---

Suggested Policy Summary

  • Major in URL: Required for all published specs
  • Minor/patch in metadata: Optional, for internal tracking
  • Errata: Allowed without changing canonical URL or major version