Software companies
When the engineers who know your legacy code retire: capture knowledge first
By SourceX Editorial · Updated
Short answer
Legacy code knowledge transfer works best when it starts before a retirement date is set: record walkthroughs of the riskiest modules, write decision records for choices nobody else can explain, link old tickets to the commits that fixed them and test every runbook with someone who has never done the task. Prioritize by bus factor, not by code age.
Key takeaways
- Find the modules where one person wrote or reviewed nearly every change; that is where knowledge loss hurts first.
- A recorded walkthrough answered by the retiring engineer captures intent that code comments never held.
- Decision records written after the fact are still valuable if they are marked as reconstructed.
- A runbook is finished only when someone else has followed it without help.
- Get a written IP assignment if a retired engineer comes back as a contractor.
Find where the knowledge gap actually is#
The knowledge gap in a legacy codebase sits in the modules where one or two people wrote, reviewed and debugged nearly every change, which is what engineers mean by a low bus factor. Code age alone is a poor guide; a very old module that several people understand is safer than a younger one only its author can touch.
Use the history you already have. Commit authorship, code review approvals, on-call pages and the names that appear in Jira comments on hard bugs all point to the same people. Then ask a direct question in each team: which changes would you refuse to ship if this person were unavailable?
- Commit and review history by file path, filtered to recent years.
- Incident and on-call records showing who resolves which alerts.
- Jira or Linear issues reassigned to the same engineer again and again.
- Build, release and deployment steps that only one person performs.
- Customer-specific behavior, patches or branches that live in one person's memory.
The knowledge capture checklist#
The knowledge capture checklist below lists the artifacts that preserve the most knowledge per hour of a retiring engineer's time. Assign each artifact an owner on the receiving side, because the successor, not the retiree, decides when it is good enough.
| Artifact | What it captures | How to produce it | Done when |
|---|---|---|---|
| Recorded walkthroughs | How a module works and why it is shaped that way | Screen recording of the expert reading code, with a successor asking questions | The successor can explain the module back |
| Architecture decision records | Choices, alternatives rejected and consequences | Short documents, reconstructed from memory, email and tickets | Each major design choice has one |
| Ticket-to-commit links | Why specific code exists | Backfill issue keys into commit history or a mapping file | Hard bugs trace from report to fix |
| Runbooks | Build, release, recovery and data repair steps | Written by the expert, executed by someone else | A newcomer completes the task unaided |
| Build environment recipe | Old compilers, libraries and machine images | A scripted environment or preserved virtual machine | A clean build succeeds from scratch |
| Data dictionary | What tables and fields mean, including oddities | Annotated schema with examples | Reports and fixes stop needing the expert |
| Domain glossary | Business terms the code assumes | List of terms with plain definitions | New engineers stop asking the same questions |
Recorded walkthroughs people will actually use#
Recorded walkthroughs are useful when they are short, specific and searchable. Record one module per session, with the successor driving the questions, rather than a long monologue nobody will rewatch.
Store each recording with a transcript next to the code it explains, and index it by module and by the questions answered. A transcript makes the session searchable, and it can be turned into documentation later.
Before sharing recordings beyond the team, review them. Engineers often show terminals, configuration files and production consoles, which can expose credentials and customer data.
Writing decision records after the fact#
Decision records written after the fact capture the reasons behind a legacy design while someone still remembers them. Use a simple format: the context, the decision, the alternatives rejected and the consequences, and mark each record as reconstructed so readers know it was not written at the time.
Source material is usually scattered across old email threads, Confluence pages, ticket comments and commit messages. Ask the retiring engineer to review a draft rather than write from a blank page; reviewing is faster and draws out details people forget they know.
Linking tickets to commits retroactively#
Linking tickets to commits retroactively turns version history into an explanation. When a commit message carries an issue key, an engineer reading a strange line of code can trace it to the customer report, the discussion and the review that produced it.
Older histories rarely have clean links, especially after a migration from Subversion or another system. A script can match issue keys, dates and authors to propose links, and the retiring engineer can confirm the hard cases. Store the mapping alongside the repository so it survives the next migration.
Keep the retiring engineer reachable, and keep ownership clear#
Keeping a retiring engineer reachable through a consulting arrangement often pays for itself the first time a rare failure occurs. Agree the scope, response expectations and how access to systems will work after their employee accounts close.
Ownership needs attention. While the engineer is an employee, code and documentation produced in the job are generally works made for hire, and 17 U.S.C. 201(b) makes the employer the owner absent a signed agreement to the contrary. Once they return as a contractor, that default largely falls away: the Copyright Office's Circular 30 limits commissioned works made for hire to specific statutory categories backed by a written agreement, so the consulting contract should assign anything they produce.
Scan captured material before it spreads. TruffleHog, an open-source secret scanner, states that it scans Git, chats, wikis, logs and filesystems and can check whether a secret is live by attempting to log in, so use that verification feature with care and with approval.
Illustrative: a freight rating engine and two retirements#
Illustrative: a fictional company sells freight rating and billing software to regional trucking carriers. Its rating engine is written in Delphi, built on a preserved Windows machine and understood in depth by two engineers who plan to retire.
The CTO starts with history: commits, reviews and Jira escalations show that both engineers touched almost every change to the tariff rules module. Over several months they record module walkthroughs with a younger engineer asking questions, review reconstructed decision records and confirm a scripted mapping of old tickets to commits. The build machine is captured as a scripted environment and tested from scratch.
After the retirements, the younger engineer implements a carrier's new fuel surcharge rule alone, using a walkthrough transcript and two linked tickets from years earlier. One retiree remains on a consulting agreement with a written IP assignment.
Why captured knowledge is also a record worth keeping#
Captured knowledge is also a business record worth keeping, because linked tickets, code reviews, decision records and walkthrough transcripts describe how experienced engineers reason about real systems. AI developers building coding assistants look for exactly that kind of human-generated, domain-specific engineering history.
If a company later considers licensing such records, SourceX would assess them with the SourceX Enterprise Data Value Framework: walkthrough transcripts and linked tickets score on domain expertise and human-generated signal, while reviewing recordings adds privacy burden and preparation cost that lower net value. Any license would follow the SourceX five-step transaction, Supply to Rights to Preparation to Approval to Delivery, with recordings of employees checked for notice and personal details before the company approves release.
Frequently asked questions
How early should knowledge capture start?
As soon as you can name the people whose departure would hurt, ideally before any retirement date is announced. Capture takes many sessions spread over months, and engineers are more generous with time and detail before their final weeks become a handover rush.
Should we rewrite the legacy code instead of documenting it?
A rewrite still needs the knowledge, because the old code encodes business rules and edge cases nobody wrote down. Capture first, then decide. Many rewrites fail when the people who understood the old behavior have already left.
Can AI coding tools replace a retiring engineer's knowledge?
They help newcomers read and navigate code faster, but they cannot recover intent that was never recorded, such as why a customer-specific rule exists. Walkthrough transcripts, decision records and linked tickets give those tools and your engineers the missing context.
Do we need consent to record walkthroughs?
Give clear notice and get agreement from everyone recorded. Recording laws differ by state, and some require all parties to consent, so check with counsel. Tell participants how recordings will be stored, who can access them and how long they will be kept.
What if the engineer has already left?
Start from the history: commits, reviews, tickets and incident notes still show what the engineer did and why. Ask whether the former employee would take a short paid consulting engagement to answer specific questions, with a written agreement covering confidentiality and ownership.
Sources
- 17 U.S.C. 201(b) provides that in the case of a work made for hire, the employer or other person for whom the work was prepared is considered the author and, unless the parties have expressly agreed otherwise in a written instrument signed by them, owns all of the rights comprised in the copyright. Source
- Copyright Office Circular 30 explains a work made for hire arises either when an employee creates the work as part of regular duties, or when a work in certain statutory categories is created under an express written agreement with a party specially ordering or commissioning it. Source
- TruffleHog, an AGPL-3.0 open-source secret scanner from Truffle Security, can log in to confirm whether a secret it classifies is live, and scans sources including Git, chats, wikis, logs, object stores and filesystems. Source
Related resources
See if your company qualifies
A short company assessment. No data uploads are needed.