Skip to main content

Documentation matches current version

ab-001008 · developer-documentation.maintenance.version-match
Severity: highactive

Why it matters

Documentation that describes a v1 API in a project now on v3 is worse than no documentation: it actively sends developers down paths that no longer exist. A 'npm install package@1.2.0' command in the README when the current version is 3.0.0 installs broken software. Code examples showing deprecated methods produce runtime errors with no obvious cause. iso-25010:2011 analysability requires that documentation reflect the actual current system, not a historical one. For vibe-coded projects that iterate rapidly, docs are frequently written once for an early version and never updated as the API evolves.

Severity rationale

High because stale documentation sends developers down dead-end integration paths, producing runtime errors from deprecated or removed APIs that cannot be resolved without reading source code.

Remediation

Audit all code examples and install commands against the current version. Add a CI grep to catch pinned old versions in docs:

# Add to package.json scripts or CI
grep -rn "npm install.*@[0-9]" docs/ README.md || echo "No pinned versions found"

For projects maintaining multiple versions, use version selectors or version-specific branches (docs/v2/, docs/v3/) rather than a single unversioned doc set. Template install commands to pull the current version from package.json rather than hardcoding. Every deprecated method mentioned in docs must include a 'removed in vX, use Y instead' annotation.

Detection

  • ID: developer-documentation.maintenance.version-match

  • Severity: high

  • What to look for: Compare the version referenced in documentation (install commands, API examples, changelog) with the project's current version in package.json, Cargo.toml, pyproject.toml, or equivalent. Check that examples don't reference deprecated APIs, removed features, or old configuration formats. If docs show npm install package@1.2.0 but the current version is 3.0.0, the docs are stale. Count all instances found and enumerate each.

  • Pass criteria: Documentation references the current major version. Install commands don't pin to old versions. Code examples use the current API (no deprecated methods). Configuration examples match the current config format. At least 1 implementation must be confirmed.

  • Fail criteria: Documentation references an older major version, uses deprecated API methods, or shows configuration formats from a previous version. Common pattern: docs were written for v1 and the project is now on v3 with a completely different API.

  • Skip (N/A) when: The project is on its first version (0.x or 1.0.0) and has never had a breaking change.

  • Detail on fail: Example: "README install command says 'npm install package@1.2.0' but current version is 3.1.0" or "API examples use client.fetchData() which was renamed to client.query() in v2.0" or "Config example shows 'module.exports = {...}' but project switched to ESM-only in v2"

  • Remediation: Review all code examples against the current API. Search docs for old version numbers and update them. If maintaining multiple versions, use version selectors or version-specific doc branches. Run a version-match check script to flag stale examples:

    # Add to package.json scripts
    grep -rn "npm install.*@[0-9]" docs/ README.md || echo "No pinned versions in docs"
    

    Reference the current version from package.json in doc templates and CI checks.

External references

Taxons

History