BXUP Track progress & test yourself — free
Software Engineering · Playbook · Foundation · ~4 min read
SOFTWARE ENGINEERING · PLAYBOOK · FOUNDATION

Doc Debt Payoff and Release Notes That Stay True — Generated, Verified, CI-Enforced

Docs rot because writing them competes with shipping, and updating them competes with everything. AI removes the writing cost — docstrings, READMEs, API references, and release notes are now cheap to generate from code and git history.

Tier: Foundation · Workflow area: Documentation

What AI does not remove is the lying risk: generated docs describe what the model inferred, not necessarily what the code does, and a plausible-but-wrong README is worse than none. This playbook covers both halves: a verified generation pass to pay off the debt, and CI drift-checks plus changelog automation so it never re-accumulates.

When to use

  • A module/service others must integrate with has no README, stale docstrings, or an API reference from three versions ago.
  • Onboarding feedback says "the docs lied to me."
  • Release notes are written at 6 p.m. on release day by whoever lost the coin toss, in one tone for two audiences.

Skip generating docs for code about to be rewritten, and skip docstrings that would restate a self-evident signature — """Gets the user by id.""" on get_user_by_id is noise with a maintenance cost.

Prerequisites

  • A repo-aware assistant (Copilot, Claude Code, Cursor) — doc generation from single pasted files misses cross-module truth.
  • A docstring linter to enforce presence/format: interrogate or pydocstyle (Python), eslint-plugin-jsdoc (JS/TS).
  • For release notes: merged-PR history with halfway-decent titles, and Conventional Commits if you have them (release-please/semantic-release become nearly free).

The workflow

  1. Generate against the code, with claims traceable. Per module:

    Write the README for services/reconciliation. Sections: purpose (2 sentences),
    how it fits the system (upstream/downstream), quickstart (runnable commands),
    configuration table (every env var actually read in config.py, with defaults),
    failure modes, and "what this service does NOT do".
    Every factual claim must be traceable to a file — cite the path after each
    config row and failure-mode claim. If you cannot find support in code, write
    TODO(verify) instead of guessing.
    

    The citation rule is the anti-hallucination mechanism: uncited claims are where generated docs lie.

  2. Verify the executable parts by executing them. Run the quickstart in a clean checkout. Diff the config table against grep -r "os.environ\|getenv" . Docstrings: spot-check that documented raises/returns match the code, especially for functions with recent changes.

  3. Enforce presence in CI. interrogate --fail-under 90 (or the eslint equivalent) so new public functions cannot merge undocumented. Presence-checking is mechanical; correctness stays human.

  4. Add the drift check. Nightly or per-PR job: an agent (or a scheduled prompt over the diff) compares README claims against the current code and opens an issue per contradiction — e.g. "README documents default BATCH_SIZE=500; config.py now says 200." Low-tech version that works today: CI greps every documented env var and flag against the code and fails on mismatch; AI generates that check script in minutes.

  5. Automate release notes, tone-tiered. From merged PRs since the last tag:

    Here are the 23 PRs merged since v2.14 (titles, bodies, labels below).
    Produce two outputs:
    1. Engineering changelog: exhaustive, grouped breaking/feature/fix/internal,
       PR links, migration notes for the two PRs labeled "breaking".
    2. Customer-facing notes: only user-visible changes, benefit-first, no
       internal jargon or ticket numbers, max 6 bullets.
    Do not invent impact that PR bodies do not state — omit unclear PRs and
    list them separately as "needs author input".
    
  6. Pipeline it. Wire step 5 into the release workflow (release-please for the mechanical changelog + an LLM pass for the customer tier). The "needs author input" list goes to PR authors before release day, which is what kills the 6 p.m. scramble.

Key Takeaway:

Generation pays the debt once; the CI presence gate and drift check are what stop it from coming back. Ship all three or you will redo this next year.

Tool variants

  • Claude Code / Copilot agent mode: best for repo-wide passes (READMEs, config tables, drift-check scripts) — they can read every file they cite.
  • Copilot/Cursor inline: efficient for docstring backfill file-by-file during normal work.
  • release-please / semantic-release + any LLM: mechanical changelog from Conventional Commits; the LLM adds only the tone-tiered customer layer.

Verification

  • Quickstart commands run clean in a fresh clone (the highest-signal doc test that exists).
  • Config table matches a grep of actual env reads — zero ghost vars, zero undocumented ones.
  • No TODO(verify) markers survive into the merged README.
  • Customer notes contain no claim a PM cannot map to a PR; engineering changelog covers 100% of merged PRs.

Pitfalls

  • Docs that describe intent, not behavior. The model reads a function named validate_and_save and documents validation the code does not perform. The citation rule plus spot-checks exist for exactly this.
  • Restating-the-obvious docstrings inflating the presence metric. Configure the linter to require param/return/raises sections, and review a sample; 100% coverage of noise is debt with better lighting.
  • Release notes inventing user impact. PR title "refactor billing retry" becomes "improved billing reliability!" — flattering, unverified, and someday false. The omit-and-ask rule is non-negotiable.
  • One-shot heroics. A doc-debt weekend without the CI gate is a countdown to the same debt.

Restricted-environment variant

Docs generation reads the whole repo — the worst case for client-code restrictions. Use the client-sanctioned assistant tenant only (Copilot Business no-training, Bedrock/Azure in-tenancy); if none exists, generate docs with a local model via Ollama (Qwen-Coder-class handles docstrings and config-table extraction well; README synthesis is serviceable with the citation rule enforced). Release notes are lower risk — PR titles usually shareable — but scrub customer names from PR bodies before pasting, and keep the customer-facing tier inside whatever tool marketing already approved.

Success criteria

  • Target modules have READMEs whose every claim is cited or verified, and the quickstart runs.
  • Docstring presence gate is live; drift check has caught at least one real contradiction.
  • Last release shipped both changelog tiers generated in minutes, with zero invented impact claims.
  • New-joiner or consumer-team feedback stops including the word "outdated."
This is the free reading view. Open BXUP to track your progress, run the hands-on labs, and prove it with original, exam-pattern assessments.
© Anvi Innovate · BXUP — Be Exponentially Upskilled · BXUP is an independent learning platform, not affiliated with or endorsed by AWS, Microsoft, Google, NVIDIA, IBM, Salesforce, Databricks, Oracle or Anthropic. All trademarks belong to their respective owners. · bxup.in