RAC/AI

By Jeremy Krystosik

Layer 5: Build, or When to Ship Custom Code and When to Reuse a Standard Module

Every custom build starts with "we need something specific for us." Half the time that is true. The other half is the siren that kills the engagement.

Layer 5 of the AIOS is Build. By the time we get here, the first four layers have already done the heavy lifting. Context is written, data is centralized, the intelligence brief ships on schedule, and the automation layer has cleared its bar. That freed bandwidth is what Build spends. The question is where to spend it, and the answer has a default.

The default is borrow. The principle we run every Build decision through is borrow before you build. Roughly eighty percent of what a mid-market firm needs at Layer 5 fits a standard pattern, and the twenty percent that does not is where custom work actually pays off. Over-building floods the firm with bespoke code nobody can maintain. Under-building yields a system that cannot express the firm's actual differentiator and quietly stops being used.

This post is about how we make that call, and what the architecture looks like on each side of it.

The default: borrow

We maintain a small, opinionated set of standard patterns for the workflows most mid-market firms need. Content pipelines. Reporting surfaces. Intake handling. Follow-up orchestration. These are not off-the-shelf SaaS bolted together. They are internally-versioned patterns we have shipped enough times to know their shape, their failure modes, and their config surface.

A pattern enters our borrow set only after it has been deployed across several clients and survived contact with real operating conditions. That survival history is what makes it a module and not a prototype. It has a known input contract, a known output contract, a small number of config knobs, and documented edge cases. When the next client's need fits inside eighty percent of that shape, we do not rewrite it. We adapt the config.

This is counterintuitive when you are used to consulting engagements that price per hour of custom work. The incentive in that world is to build. The incentive in an AIOS engagement is to ship working layers that compound. Borrowing a proven pattern ships faster, fails less, and inherits the fixes the next pattern-level improvement brings. Bain's operations work keeps landing on the same conclusion: the firms that scale AI are the ones that resist the urge to treat every problem as unique.

Ed made a version of this argument in why more software makes operations worse. Every bespoke system is a future tax. Borrowing is the counterweight.

When to build custom

There are three signals that Build is genuinely the right call. If any two land, we build. If only one lands, we push back.

Signal one: the workflow is the firm's actual differentiator. The way they qualify clients. The specific scoring that expresses their ICP fit. The voice rules that make their content recognizable as theirs and not as generic category output. These are not commodity workflows. They are the firm's edge rendered in code. If a standard module could execute them identically, the firm would not actually be differentiated. So the module cannot, and building custom is the honest answer.

Signal two: no standard module covers more than fifty percent of the shape. We look at the input contract, the output contract, and the decision logic. If more than half of any of those is a mismatch, forcing the shape onto a module produces a worse result than building from scratch. Module abuse is worse than module absence. A standard pattern twisted to do something it was not designed for becomes unmaintainable fast.

Signal three: the business will still be running this workflow in three years. Custom code is a three-to-five year commitment by default. If the workflow is a response to a market condition we expect to change in twelve months, custom is the wrong instrument. A lighter touch inside a standard module, or a manual process documented in Context, is the right instrument. Three-year durability is what justifies the build cost.

When two of those signals clear, Build earns its place in the engagement. When fewer than two clear, we have not yet found the actual Build opportunity and we keep looking.

When not to build custom (the siren)

The siren call at Layer 5 sounds exactly the same every time. "Our business is different. We need something specific for us." The intent behind the sentence is usually good. The firm has been burned by generic tooling before, or the leadership team has strong opinions about how the work should run. They are right that generic tooling has failed them. They are wrong that the answer is always to build.

The workflows where this instinct goes wrong are the commodity ones. Newsletter sends. Calendar automation. Standard CRM syncs. Invoice routing. Expense approval. These are solved problems with well-understood shapes across thousands of firms. The five percent of difference a leadership team can describe on a whiteboard is almost always a config decision, not a code decision. Firms that build custom CRMs because theirs is "different" end up with a system that costs ten times what the adapted module would have cost and falls behind the industry in eighteen months.

The heuristic is simple. If the workflow appears under the same name in ten other firms in the same industry, it is a module. If the leadership team can describe its uniqueness in under three sentences, the uniqueness is config. If they cannot describe it at all, the uniqueness is aspirational and the workflow is a module they have not accepted yet.

Pushing back on the siren is part of the job. It is also why Build is sequenced last. By the time we get to Layer 5, the firm has already seen four layers clear their bars, and they trust that the default is there to protect them and not to shortcut them.

Module architecture: config over code

The standard modules we maintain have a shared architecture pattern, and the pattern is what makes them reusable.

Config over code. A module is defined by its interface, not its internals. The interface is three things: an input contract that describes what the module consumes, an output contract that describes what it produces, and a config surface that describes what a client can tune without touching the module's implementation. The internals are free to evolve. The interface is stable.

Interface over implementation. When a client engages, we adapt the config and leave the implementation alone. If a client's need pushes outside the config surface, that is a signal. Either the module should expand its surface to accommodate a pattern we are seeing repeatedly, which upgrades every deployment, or the client's need is genuinely outside the module's shape and Build applies.

Narrow surface. The config surface is deliberately small. Large config surfaces produce configuration complexity that is indistinguishable from custom code in its maintenance cost. A module with fifty knobs is a rewrite waiting to happen. A module with five or ten knobs, chosen well, covers eighty percent of cases cleanly and sends the rest to Build. HBR's work on technology and analytics frames this directly: the organizations that actually scale technology are the ones that resist the seduction of optionality and keep their configurable surfaces narrow.

This architecture is what makes the borrow default possible. A module that is actually reusable exists only when the interface is clean enough that adapting it is cheaper than rebuilding it.

Custom architecture: specified against the Blueprint

When Build is the right call, the architecture is different. Custom code is scoped, specified, and priced to ship. Not to explore.

Specified against the Blueprint. The Blueprint from Phase 2 of the engagement is where the custom workflow gets defined before any code runs. Inputs, outputs, acceptance criteria, edge cases, and the Context sections the build depends on. If the Blueprint cannot state those cleanly, we do not start. Vague specs produce bespoke code that becomes bespoke debt.

Narrow scope. Custom builds are scoped to the smallest version of the workflow that delivers a measurable outcome. We resist the feature list that tries to pre-solve future needs. The ones we actually solve are the ones the acceptance bar can verify, and Ed wrote about that bar directly in the acceptance bar for a layer. Everything else waits until the first version is live and has earned the right to grow.

Context-governed, not Context-generating. This is the most important architectural constraint at Layer 5. Build reads from Context. Build does not invent Context. When a build starts making decisions about ICP fit, pricing tiers, voice rules, or commercial policy, those decisions belong upstream in Layer 1, not inside a Layer 5 artifact. If we notice Build drifting into Context territory, we pause Build and fix Layer 1. Getting this boundary wrong is how firms end up with business logic trapped inside bespoke code that nobody can audit without engineering.

The same discipline applies to the approval surfaces custom builds expose. The gates we wrote about in layer 4, automate carry into Build. Custom code does not bypass the approval architecture. It inherits it.

Maintenance posture and retirement

Custom builds inherit maintenance. That is the long tail people forget when they argue for building.

A module we build once and reuse across ten clients absorbs ten times the fixes over its lifetime. Every pattern-level improvement flows to every deployment. A one-off custom build absorbs the fixes for exactly one engagement. The math favors modules by an order of magnitude, and it compounds every year. McKinsey's digital research repeatedly finds that the hidden cost of AI at scale is not the build. It is the ongoing maintenance surface the build created. Minimizing that surface is the most consequential architectural choice at Layer 5.

That is why the economics of Layer 5 look the way they do. The climb we described in revenue per employee as the AI metric does not come from building more software. It comes from freeing the team's bandwidth inside the first four layers and then spending Build carefully on the narrow slice where custom genuinely pays. Every unneeded custom line of code taxes that metric in the years that follow.

Retirement is the other side of the same coin. A custom build does not stay custom forever by default. When a standard module catches up to the custom's eighty percent line, we migrate. The module has by then absorbed improvements from every other deployment, and the custom build has kept its narrow shape. The migration cost is real but bounded. This is explicit during Run: we flag custom builds for review at each quarterly session, check them against the current module library, and make the call.

The opposite pattern, a module slowly accreting client-specific branches until it is secretly ten custom builds wearing the same name, is what we work hardest to avoid. Ed covered the Run-side of this discipline in AIOS Run, month two versus month twelve. The retire-and-migrate rhythm is part of what makes Run sustainable instead of a slowly-growing maintenance tax.

Where this fits

Build is last for a reason. The three-year durability test, the two-of-three signals, the config-first module architecture, and the retire-on-module-catchup posture all depend on the first four layers having done their work first. Context has to be real before Build can read from it. Data has to be centralized before Build has something honest to operate on.

If you are thinking about Layer 5 before the first four layers are live, you are thinking about the wrong problem. The starting point is the Fit Check, and the Blueprint that follows it is where we decide where custom actually pays. Build executes against that Blueprint once the lower layers have earned it.

Borrow before you build. Build only what the firm is still going to need in three years. Let the module library catch up, and migrate when it does.

-Jeremy

Want to know where AIOS fits in your business?

Take the 5-minute AIOS Fit Check. We will tell you where the biggest leverage is and what an install would actually involve. No pitch deck.