---
canonical: https://sincllm.com/blog/software-maintenance-system-keeps-software-alive
kind: agent-digest (verbatim extract of the canonical article; the article is authoritative)
author: Mario Alexandre
updated: 2026-12-06
---

# You Built Software. Did You Build the System That Keeps It Alive?

Keeping software alive takes a second system, separate from the product. It is the people, process, automation and AI agents that patch, renew, upgrade, watch, fix and learn on a schedule. Lehman's laws say a real-world system must keep adapting or it gets worse. Build that system on purpose, give each duty an owner, and keep a named human accountable.

Software that ships still needs a second system to keep it alive. That system is the people, routines, tools and agents that do the recurring work after launch. If you never built it, you are the system, and the software lives only as long as you keep showing up.

## Launch is an event, and survival is a system you have to build
Launch happens once. Survival happens every day after that, and it needs its own design. Most teams pour their effort into the first and assume the second will sort itself out.

### What "alive" means for software
Alive does not mean "the server is up." A system can be up and still be dying. It is alive when it can still change safely for as long as people need it.

## First-order engineering builds the product, and second-order engineering builds the capacity to keep it
First-order engineering is building the thing users touch. Second-order engineering is building the capacity that keeps that thing working, safe and changeable over time. Both are engineering. Only the first tends to get a budget.

### First-order work
First-order work is what most people mean by "building software." You design screens. You write the API. You set up the database. You ship features. Progress is easy to see. A demo proves it.

### Second-order work
Second-order work has no end point. It is the machine around the product. It includes the alerts that tell you something broke. It includes the runbook that says what to do next. It includes the bot that opens update pull requests. It includes the person who reads them and the rule for when they must merge.

### Why second-order work gets skipped
There are three common reasons. Each one is easy to spot once you name it.

1. **It is not visible.** A renewed certificate looks the same as one that was never at risk. Nobody demos a patch that prevented a breach.
2. **It is seen as lesser work.** The [Wikipedia entry on software maintenance](https://en.wikipedia.org/wiki/Software_maintenance) notes that maintenance "is often considered lower skilled and less rewarding than new development."
3. **It is spread thin.** No single duty seems big. A renewal here. An upgrade there. The total only shows up when you add it all up, or when you try to take a week off.

### A side by side view
The last row matters most for this series. AI did not only change how fast code gets written. It can change who does the recurring work across the whole life of a system. That is the bigger shift, and we come back to it below.

| Question | First-order engineering | Second-order engineering |
|---|---|---|
| Main goal | Make it work | Keep it working and changeable |
| Time shape | Project with an end | Loop with no end |
| Proof of progress | Demo, release, feature | Calm on-call, clean drills, fast safe change |
| Typical owner | Product team | Often no one, unless you assign it |
| Main risk if skipped | No product | A product that slowly stops fitting the world |
| Where AI helps | Writing code faster | Doing recurring duties under review |

## Lehman's laws explain why software decays when nobody tends it
Lehman's laws say that software used in the real world must keep changing, or it gets worse. They were first set out in the 1970s. They still describe what every team sees after launch.

### Which software the laws cover
Lehman split software into types. The one that matters here is the E-type program. An E-type program is written to "mechanize a human or societal activity." Billing, booking, support, sales, logistics: almost every business app is E-type.

### Four laws that matter most for sustainment
You do not need all eight laws to plan your work. Four of them map straight onto the sustainment system.

- **Continuing Change.** Per the source, an E-type system "must be continually adapted or it becomes progressively less satisfactory." Standing still is not neutral. It is a slow loss.
- **Increasing Complexity.** As the system evolves, "its complexity increases unless explicit work is done to maintain or reduce it." Clean code does not stay clean on its own.
- **Declining Quality.** Quality "will appear to be declining unless it is rigorously maintained and adapted to operational environment changes." Note "appear." Users judge against today's world, not launch day.
- **Feedback System.** The laws call evolution a "multi-level, multi-loop, multi-agent" feedback system. You cannot fix it with one heroic push. You need loops.

### What the laws mean in plain terms
Put simply, the laws turn maintenance from a choice into a law of nature for real-world software. You will spend effort after launch. The only question is whether you spend it on purpose, on a schedule, or in a panic.

## Maintenance is most of the cost, not a footnote to the build
Maintenance is usually the longest and most costly phase of a system's life. Planning only for the build means planning for the small part.

### The four types of maintenance
The ISO/IEC 14764 standard, as summarized in that entry, sorts maintenance into four types. Each one needs a different trigger and a different owner.

- **Corrective:** fixing "a bug or other failure to meet requirements." This is the work people picture first.
- **Adaptive:** keeping the software usable "in a changed or changing environment." New OS, new runtime, new API version.
- **Preventive:** fixing "problems that have not manifested yet." Upgrades before they are forced. Load tests before the rush.
- **Perfective:** improving things like "user experience, processing efficiency, and maintainability." Refactors, docs, speed work.

### An illustrative cost view
Here is some illustrative arithmetic. It is not a measurement. Suppose a small product took 6 months of build effort. Suppose the team expects it to live for 5 years. Suppose the ongoing work is 1 person-day per week.

## The recurring duties run across the whole life of the system
A sustainment system is, at its core, a list of duties that never stop. Each duty has a trigger, a rhythm and an owner. If any of the three is missing, the duty will fail at the worst time.

| Stage | Recurring duty | Typical trigger | What fails if no one owns it |
|---|---|---|---|
| Run | Watch health and alerts | Always on | Users find outages before you do |
| Run | Respond to incidents | An alert or a user report | Long outages, guesswork, blame |
| Run | Back up and test restores | Schedule | Backups that do not restore |
| Keep safe | Patch known flaws | Advisory or scanner | Open doors that attackers know about |
| Keep safe | Renew certificates and keys | Expiry date | Sudden outage on a known date |
| Keep safe | Review access and secrets | Schedule or staff change | Old accounts that still work |
| Keep current | Update dependencies | New release | A pile of upgrades too big to move |
| Keep current | Move off retired runtimes and APIs | End of life notice | Code that stops running or stops getting fixes |
| Keep current | Migrate AI models before retirement | Deprecation notice | Requests that fail on a set date |
| Improve | Pay down complexity | Schedule or pain | Every change gets slower and riskier |
| Improve | Learn from incidents | After each incident | The same failure, again |
| Govern | Review costs and vendors | Monthly or yearly | Bills and lock-in nobody chose |
| Govern | Keep docs and runbooks true | After each change | Knowledge that lives in one head |
| End | Retire features or the whole system | Business decision | Zombie systems that still cost money |

### Run duties
Run duties keep the service up today. They include watching, responding and restoring. The Google SRE book chapter on [managing incidents](https://sre.google/sre-book/managing-incidents/) shows how even response needs structure. It names an incident commander who "holds the high-level state about the incident" and assigns roles.

### Keep-safe duties
Keep-safe duties close doors before others walk through them. Some flaws hide for years. The [Log4Shell entry](https://en.wikipedia.org/wiki/Log4Shell) notes that the flaw "had existed unnoticed since 2013." Nobody changed that code to make it unsafe. The world just learned something new about it.

### Keep-current duties
Keep-current duties stop the slow slide out of date. Tools can help a lot here. GitHub's [Dependabot docs](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates) describe the loop plainly: "You check that your tests pass, review the changelog and release notes included in the pull request summary, and then merge it." [Renovate](https://docs.renovatebot.com/) offers the same idea: "Automated dependency updates."

### Improve and govern duties
Improve duties fight Lehman's Increasing Complexity law. The [technical debt entry](https://en.wikipedia.org/wiki/Technical_debt) defines debt as "the cost to maintain a system that is attributable to choosing an expedient solution." Every shortcut adds to the bill. Paying it down is a recurring duty, not a one-time cleanup.

## The world moves even when your code does not
Software can go out of date with zero commits. The code stays the same. The ground under it shifts. This is the part of sustainment that most surprises new owners.

- **Certificates.** The [Let's Encrypt FAQ](https://letsencrypt.org/docs/faq/) says "our default certificates are valid for 90 days." Renewal is not a one-time task. It is a loop.
- **Runtimes.** The Python team says "January 1, 2020, was the day that we sunset Python 2." In their [sunset notice](https://www.python.org/doc/sunset-python-2/), they say they will not improve it after that day. Code on Python 2 did not change. Its support did.
- **AI models.** Anthropic's [model deprecations page](https://docs.anthropic.com/en/docs/about-claude/model-deprecations) is blunt: "Requests to retired models fail." If your product calls a model by name, that name has a shelf life.
- **Tiny dependencies.** The [left-pad incident](https://en.wikipedia.org/wiki/Npm_left-pad_incident) involved a package of "only 11 lines of code." Its removal still broke many builds. Size does not equal risk.

## The price of building software is not the price of keeping it
The build has a price you can quote. The keeping has a price that shows up later, in hours, risk and stress. Owners who only budget for the first are surprised by the second.

### The hidden line item: you
For solo founders and small teams, the biggest keeping cost is often a person. Every unowned duty lands on the founder. Each one is small. Together they become a second job.

## The sustainment stack has four layers: people, process, automation and AI agents
A sustainment system is a stack of four layers. People own outcomes. Process says what happens and when. Automation does the fixed, repeatable steps. AI agents take on the judgment-light work that used to need a person. Each layer leans on the one below it.

### Layer 1: people
This layer is the base because only people can be accountable. Someone must own each duty, by name. Someone must be able to cover when that person is away.

### Layer 2: process
This layer turns good intent into a repeatable loop. It is the runbook, the calendar, the review rule and the escalation path. Without it, people rely on memory, and memory leaves when they do.

### Layer 3: automation
This layer does the steps that never need judgment. Renewals, backups, scans, update pull requests, test runs. It is cheap to run and does not get tired.

### Layer 4: AI agents
This layer sits on top. Agents can read an alert, look at logs, draft a fix, open a pull request, or write a first-pass postmortem. They handle work that is too fuzzy for a script but too frequent for a senior person.

| Layer | Best at | Weak at | Owner question |
|---|---|---|---|
| People | Judgment, trade-offs, accountability | Repetition, being always on | Who is named, and who covers? |
| Process | Making the loop repeatable | Adapting to new cases | Where is it written, and when is it reviewed? |
| Automation | Fixed steps at any hour | Anything that needs judgment | Who fixes the script when it breaks? |
| AI agents | Fuzzy, frequent, low-stakes tasks | High-impact calls, novel failure | What may it do alone, and what needs approval? |

## AI agents change who does the recurring work, not only how fast code is written
The biggest chance for AI in software starts after launch. Most talk about AI and code is about writing new code faster. The larger shift is that agents can take on recurring duties that used to need a person every time.

### Where agents help most
- **Triage.** Read alerts and logs, group them, and write a plain summary for the human on call.
- **Update drafts.** Take a bot's update pull request, read the changelog, run tests, and flag the risky ones.
- **Fix drafts.** Propose a patch for a known bug, with tests, for a human to review.
- **Docs upkeep.** Spot runbook steps that no longer match the system after a change.
- **Postmortem drafts.** Turn the incident timeline into a first draft that a human edits.

### Be honest about the limits
Agent skill at real repair work is still a moving target. The [SWE-bench paper](https://arxiv.org/abs/2310.06770) built a test of "2,294 software engineering problems drawn from real GitHub issues." In that original paper, the authors reported that the best model of the time solved "a mere 1.96% of the issues." Scores have moved since. The lesson has not: measure an agent on your own tasks before you trust it.

## Delegate the execution, and keep the accountability with a named human
Agents can do the work. They cannot own the outcome. Every duty an agent performs still needs a named person who answers for it, sets its limits and approves its high-impact moves.

### A simple split of who decides
Agents also do not need to change software all the time to add value. Often the best work is to watch, report and propose. The human then makes the call. The [series page on delegating execution, not accountability](/blog/ai-agent-accountability-delegate-execution) goes deeper. The live guides on [where human approval matters](/blog/human-in-the-loop-where-approval-matters) and [what an agent audit trail must record](/blog/what-ai-agent-audit-trail-must-record) show the controls.

| Action | Agent may do alone | Needs human approval |
|---|---|---|
| Read logs, sort alerts, write summaries | Yes | No |
| Open a pull request with tests | Yes | Merge needs review |
| Roll back a release that failed checks | If the runbook says so | Tell the owner at once |
| Change access, keys or billing | No | Yes, every time |
| Delete data or retire a system | No | Yes, with a second person |
| Accept a known risk or skip a patch | No | Yes, and write down why |

## A five-level maturity model shows how far your sustainment system has come
The maturity model has five levels, from 0 to 4. Each level answers one question about how your software stays alive. Score yourself by the level that holds on a bad week, not a good one.

| Level | Name | What is true | Test that proves it |
|---|---|---|---|
| 0 | Founder is the system | Duties live in one head | None. It works while you work. |
| 1 | Written down | Duties and steps are listed | Someone else can read what to do |
| 2 | Owned and scheduled | Each duty has a name, a backup and a date | Nothing is missed in a normal month |
| 3 | Assisted | Tools and agents do routine steps under review | Most alerts and updates close without the founder |
| 4 | Proven | Drills and absence tests pass | Planned incidents are handled while the owner is away |

### How to read the levels
Level 0 is not a failure. Every product starts there. The risk is staying there after users, money or data depend on you.

### The real test of maturity begins when you step away
Your true level is the one that holds while you are gone. A calm week without you proves little. Calm weeks happen by luck. A real test means a real incident class happens, and the system handles it without you.

## Start by naming one duty and one owner this week
You do not need a big program to begin. You need one list, one owner per row and one test. Then repeat.

1. **List the duties.** Copy the duty table above. Add any rows unique to your product.
2. **Fill the owner column.** Write a name next to each row. Write a backup name too.
3. **Find the blanks.** Any empty cell is a risk you carry today. Circle the worst one.
4. **Fix one blank.** Write the steps, set a date, and give it to an owner. Add a bot if the step is fixed.
5. **Pick one agent task.** Choose a low-stakes, frequent duty, such as alert summaries. Set what it may do alone and what needs approval.
6. **Run one drill.** Test one incident class while the usual owner stays out of it.

## FAQ
Q: What is second-order engineering in software?
A: Second-order engineering is building the system that keeps your software alive, not the software itself. It covers who patches, who renews, who watches, who fixes and who learns after each failure. First-order work ships the product. Second-order work makes sure the product can still change safely next year. Most teams fund the first and leave the second to whoever is around.
Q: Why does software decay if nobody changes the code?
A: The world around the code keeps moving. Runtimes reach end of life, certificates expire, APIs and models are retired, and new flaws are found in old libraries. Lehman's first law says a real-world system must be continually adapted or it becomes less satisfactory. Code that stands still slowly stops fitting the world it runs in, even with zero commits.
Q: What are Lehman's laws of software evolution?
A: They are eight laws that Lehman and Belady began to set out in 1974. They apply to E-type systems, meaning software that models a real activity. The best known say such a system must keep changing, that its complexity grows unless work is done to cut it, and that its quality will seem to decline unless it is kept up and adapted.
Q: What are the four types of software maintenance?
A: The ISO/IEC 14764 standard names four types. Corrective work fixes bugs. Adaptive work keeps the software usable when its environment changes. Preventive work fixes problems before they show up. Perfective work improves things like speed, user experience and ease of change. A sound sustainment plan gives each type a schedule and an owner, not just a backlog.
Q: Can AI agents maintain software on their own?
A: AI agents can do a growing share of recurring work, such as drafting dependency updates, sorting alerts and writing first drafts of fixes. They should not hold final authority on high-impact actions. OWASP advises human approval for those actions, and Anthropic advises testing agents in sandboxes with guardrails. Delegate the execution. Keep a named person accountable for the outcome.
Q: How do I know how mature my sustainment system is?
A: Use a five-level model. At level 0 the founder is the system. At level 1 duties are written down. At level 2 each duty has a schedule and a named owner. At level 3 tools and agents do most routine work under review. At level 4 the system is tested by drills and absence. Your real level is the one that holds when you step away.
Q: What is the first step to build a sustainment system?
A: List every recurring duty your software needs: patching, renewals, upgrades, backups, alerts, incidents, reviews and retirement. Next to each, write who does it, how often, and what happens if they are away. Any blank cell is a risk you carry today. Fix the riskiest blank first, then repeat each month until no duty depends on one person's memory.