2026-09-18 · updated 2026-11-14

#architecture #capabilities #drift #distributed-systems

1,661 words · 9 min read

Capability first, distributed

AI agents are poised to play an important role in both how software is developed and how teams are structured. Future teams will consist of both humans and agents working together. Humans are needed for accountability, while agents are needed for velocity. A distributed system architecture presents unique challenges for such a team. With several moving parts, maintaining an accurate worldview is difficult for both humans and agents. Without this accuracy, speed is useless, and accountability is meaningless.

This essay details how a capability-first approach could help in achieving this accurate worldview semantically in distributed environments.

To recap, a capability is a named unit of business function. It has inputs, outputs, a closed set of failures, one line of intent and an owner. It is the invariant and the primary artefact, with the endpoints being a projection of it. In a distributed environment, it is also a promise made to the caller.

One container#

Let us start with a monolith. It is one process, one codebase and one deployment. A capability here is just a method. Say generateStatement() in a package reporting. All usage of this capability and the capability itself are in the same codebase. Both the producer of the promise and the holder of the promise are deployed together. Renaming the capability forces the callers to follow suit. The compiler has a complete worldview, and there is no possibility of drift. The capability here is not just a method but a symbol.

When an agent reads the codebase, it can build semantic understanding of such symbols across the entire codebase with little archaeology. Since the entire codebase ships together, no part of the built-up context goes stale, which can impact the accuracy of the worldview. With the advancements in models, a single context window may sometimes be enough to generate very high-quality software. The quality of the outcomes here depends primarily on the quality of the prompts.

the monolithone process, one clockpackage reportinggenerateStatement(…)throws AccountClosed, PeriodInvalidpackage billingchargeStatement()package notificationssendStatement()package portalshowStatement()every use and the capability itself: one place, one compiler, one commit
The monolith: the capability and all its usages in one place, under one compiler, changed by one commit.

Where the symbol stops#

With a move to a micro-service architecture, using the inverse Conway manoeuvre, teams are now organised with the target architecture in mind. Most services within such an architecture communicate via REST. Instead of capabilities, teams exchange endpoint documentation.

Consider how humans or agents get to know the system they work on. A human picks up the knowledge using both formal tools and informally, say, hallway chats and personal contacts. This is beyond what the organisation chart planned earlier. An agent has no such channels. It is confined by what the sandbox lets it read. Notice that Conway’s law applies to both, but more literally for agents. An agent that does not have an accurate picture of the parts it modifies is likely to assume or hallucinate. It is much cheaper and faster for it to generate code than to wait for clarification from humans. This likely increases the burden on humans, as they are accountable.

A common approach today is to hand agents every repository and document and let them figure out what matters. This archaeology works up to a certain point. Since parts of the distributed system evolve on their own clocks, parts of the built-up context go stale. This essay does not argue that every human change has an accurate worldview, but at human speed the inaccuracy is acceptable. However, at agent speed of delivery, inaccuracy ships.

Many formal tools available today focus on endpoints rather than capabilities. At a bare minimum, each capability ends up with its own endpoint, a client on the caller and documentation hosted on a separate server. Each of these artefacts has its own clock, and some of them are maintained manually. This is where the capability stops being the symbol and drifts out of sync.

In this example, generateStatement() moves into statement_service. One of its callers moves into billing_service, another into notification_service, etc. The maker of the promise is statement_service, and the holders of the promise are billing_service and notification_service.

What changed here is that the capability as a promise and every understanding of it stopped deploying together.
the monolithone process, one compiler, one clockstatements servicedeployed Tuesdaybilling servicedeployed 3 weeks agonotifications servicedeployed in springcustomer portal servicedeployed last yeargenerateStatement(…)the promisegenerateStatementa client, generated at a momentgenerateStatementa client, generated at a momentgenerateStatementa client, generated at a moment
The split. One artefact now becomes several.

Three containers, three clocks, three advertisers#

For an organisation’s semantic context to exist as a living document, you need three kinds of responsibility containers.

The first is the service container. A service is a concrete deployable artefact. It runs on a clock of minutes to days. This is where the capability is defined. It is responsible for upholding the promise as long as a holder exists. It advertises what capabilities it has, but semantically it is not complete without additional context attached to it. For example, a service can expose a capability named approveInvoice(), but only when we attach the context is the meaning complete (say account_receivable.approveInvoice(…) vs purchase_orders.approveInvoice(…)).

The second is the bounded context. Though abstract and conceptual, the bounded context is the actual owner of the capability exposed by the services. Though a capability’s implementation is defined in a service, it makes no sense without the bounded context. Any changes to it are managed by the team responsible for the bounded context. Sometimes, a bounded context splits or merges with another, on a clock of years. This is where the capability becomes an entry with an owner.

The third is the organisation. This owns all the bounded contexts and their capabilities for anyone, both internal and external (endpoint projects at the organisation’s edge) to invoke. The organisation can change on a clock of years to decades. The capability here is a qualified entry that any service or agent can depend on. The organisation is conceptual as well.

The advertisements take a bottom-up approach. It starts at the services, acquires semantic enrichment at the bounded context and gets qualified at the organisation level. If these responsibility containers are to be made useful, they need to be accurate as well. Hence, they are derived from the services rather than built post-archaeology.

the organisationcustomer_vaultbillingreportingreportingfetch_statementsgenerate_statementgenerate_statement(account, period, format, delivery) → runfails: account_closed, period_invalidStarts a statement run.owner: reportingfrom: statement_servicereorganises over decadesits language settles over yearsits service deploys in days
Three containers, three clocks.

The package the estate never had#

Each conceptual container above is comparable to a package in a monolith. They are not a governance layer that sits directly between two services; instead, they provide semantic guidance on how an agent should perceive the information. They can define the capability’s visibility characteristics based on the audience. Thus, all properties offered by a package in a monolith are provided by these conceptual containers. What differentiates the monolith’s package is its driftless notion.

Note that there is no compiler to guarantee enforcement in a distributed estate.
a packageone compilernamespacenames qualified by itmembershipby locationvisibilitythe owner marks exportsone clockevery caller sees the changea context, after the splitno compilernamespacea conventionmembershipa list kept by handvisibilitya norm, once written downmany clocksone per deployable
A package and a split context give the same four things. The compiler enforces all four for the package. The context asks people to honour them, and has no clock at all.

Drift, the first way: producer and consumer#

Following the example quoted above, let us consider the following scenario.

statements servicedeployed Tuesdaygenerate_statementfails:account_closedperiod_invaliddelivery_unavailablea small, correct change; tests greenbilling serviceclient generated 3 weeks agogenerate_statementthe client handles:account_closedperiod_invalidno branchcallsdelivery_unavailablewhatever billing does nowis what happens to the customer
Drift, the first way. On Tuesday the promise gains a failure. The client billing holds does not. Nobody is wrong, nobody is told, and the first outage arrives at a branch that does not exist.

On a Tuesday, an agent unaware of the promise’s holders decides to add a failure to the capability generateStatement(). However, the holder of the promise, say billing_service, deployed three weeks ago, is unaware that its understanding has now been rendered false. When statement_service reports the delivery_unavailable failure, billing_service does not know how to handle it.

Similarly, an agent reading a stale snapshot from two weeks ago might generate incorrect code. The worst-case scenario is that it hallucinates based on this stale semantic context and ships it.

This is the first kind of drift, and it is horizontal. It highlights the drift between the maker of the promise and its holder. At this junction, it is worth stating clearly what a drift is.

Drift is the producer’s promise and the consumer’s understanding of that promise changing on different clocks.

A capability-first approach simplifies drift. Compared to an API-first approach, where changing a query parameter to a form parameter also qualifies as drift, capability-first lets you ignore projection-related drift because it no longer applies.

Drift, the second way: the advertising chain#

The second drift is vertical, between layers that advertise these capabilities.

A service advertises what it has. The list of capabilities is derived from code. No drift occurs here, as this is the source of truth.

A bounded context advertises what its services have. This list is gathered from all the services that are bound together. A periodic job can do this. In the example, the reporting context has a list that shows what capabilities its services published the last time this gathering ran.

The organisation advertises what its contexts have. This list is gathered from all the bounded contexts in the organisation. Like a bounded context, a periodic job can do this. This list is also a snapshot.

list · statementsderived at build: truefetch_statementsgenerate_statementwithdraw_runrenamed today: cancel_run → withdraw_runlist · reportingby hand, as of last monthfetch_statementsgenerate_statementcancel_runlist · organisationby hand, as of last yearreporting.fetch_statementsreporting.generate_statementreporting.cancel_runa periodic job: a snapshota snapshot of a snapshotbilling serviceclient generated 3 weeks agogenerate_statementan understanding formed at a momentnothing between the list and the client:drift, unseen
Drift, the second way. Only the service's list is derived. The bounded context's list and the organisation's list are gathered, and a rename at the bottom reaches neither.

Now, every service within the estate and at the edge that wants to consume a capability looks at the organisation’s list. Within its bounded context, it can look at everything the context offers. Outside its own bounded context, it relies on the organisation’s list of capabilities. During deployment, these services register their consumption of the capability.

List is the start. A drift-free list is the answer.#

The list is just a collection of producers’ promises written at the moment. It is an artefact that gets its own clock (when the periodic job runs). It does not prevent the drift on its own. When up to date, it makes drift visible; when stale, it masks drift behind an illusion of truth.

Stale information in this advertisement chain and the consumption chain can directly lead to an incorrect semantic understanding for the agents. At every level of the advertising chain, the list must not drift to the extent that a holder’s understanding is made incorrect. This is what the monolith had and what the split lost.

What it would take#

To conclude, each distributed estate needs a central semantic registry or store for the capabilities with the following properties.

  • Be the source of truth for capability promises and every understanding of it.
  • Advertisements must never be a snapshot; instead, they must be derived across all containers.
  • Be the source of truth for the consumers of a given promise and what understanding they have.
  • A change to the promise must be refused when the consumer’s understanding of the promise is broken.
  • Support an agent to query for semantic context about the capabilities adhering to the visibility rules defined by the responsibility containers.

Deriving the list can be easy. Enforcement of the rules above is what replaces the missing compiler in a distributed estate.