Skip to content
arrow_backBack to Insights
Essay· 12 min read

What Slime Mold Knows About Software Architecture

Biological systems converge on optimal solutions because their targets have shape. Slogans don't converge. Specific, measurable identity declarations do. The difference determines whether your agent fleet finds the architecture or wanders forever.

In 2010, researchers at Hokkaido University placed a slime mold on a wet surface scattered with oat flakes. Each flake sat at the location of a major city in the Greater Tokyo area. The organism, Physarum polycephalum, has no brain and no central nervous system. It did what it does: spread outward, explore every direction at once, and build a redundant network of tubules connecting every food source it could find.

Then it started pruning.

Routes that carried more nutrients thickened. Routes that carried less shrank. Over twenty-six hours, the network converged on a layout that matched the efficiency, fault tolerance, and cost of Tokyo's actual rail system — a system designed by thousands of engineers over the better part of a century. Atsushi Tero and his colleagues published the result in Science. The paper had the kind of title that undersells its own result: "Rules for Biologically Inspired Adaptive Network Design." A brainless organism found the same answer as the best human planners, and it did it in a day.

The mold had no plan. But it had something better than a plan. It had specific destinations.

"Be the best" is not a loss function

A vague slogan scatters effort in every direction while a shaped goal with specific measurable properties pulls agents toward convergence

Most engineering organizations cast vision the way motivational speakers do. "Build the best developer platform." "Deliver world-class reliability." "Be the most trusted name in fintech."

These sound like they mean something. They don't. Not to an optimizer. A direction tells you which way to face. A destination tells you when you've arrived. That distinction is structural, not rhetorical, and it determines whether a system converges or oscillates.

Consider two statements:

  • "We want to be the best payment platform on the market."
  • "Process transactions with P99 latency under 200ms, zero silent drops, PCI-DSS 4.0 compliant, with full audit trails queryable within 30 seconds."

The first is a slogan. You cannot falsify it. You cannot measure your distance from it. You cannot tell an agent, human or machine, whether they are getting closer or further away. There is no gradient to descend. It is a banner, not a target.

The second has shape. You can measure your distance from every clause independently. An agent generating code for this system can check its own output: does this implementation honor the latency SLO? Does it maintain the audit trail? Does it comply with PCI-DSS 4.0? Each question has a binary or quantitative answer. Each answer is a signal. Enough signals, and you have a loss surface — something an optimizer can actually work with.

The slime mold did not set out to "build the best network." It set out to connect specific food sources using the least total length while maintaining fault tolerance. The goal had shape. The shape is why it converged.

Explore everything, reinforce what works

The slime mold's strategy looks wasteful. It explores every direction. It builds connections it will later abandon. It pours resources into paths that turn out to be dead ends.

That waste is how it works.

Marco Dorigo formalized a similar pattern in 1992 when he introduced ant colony optimization. Ants searching for food leave pheromone trails. Shorter paths accumulate pheromone faster because ants complete the round trip sooner and reinforce the trail more frequently. Longer paths accumulate pheromone more slowly. Over time, the colony converges on the shortest route — not because any individual ant calculated it, but because the feedback loop amplified the right signal.

Two properties make this work:

The destinations are specific. The food is at a known location. The nest is at a known location. "Shortest path between two specific points" is a well-defined optimization problem. "Find food in the general vicinity" is not. Ants following vague gradients disperse. Ants following specific gradients converge.

The feedback signal decays. Pheromone evaporates. This prevents premature lock-in to a suboptimal path. If pheromone persisted forever, the first path found would dominate regardless of quality. Evaporation forces the colony to continuously re-earn its consensus. The best route has to keep proving it is the best route.

Biologists call this pattern stigmergy: coordination through environmental signals rather than central planning. No ant sees the whole map. No ant communicates directly with the others about strategy. The system converges because the targets are specific enough to generate a measurable feedback signal, and the signal decays fast enough to stay honest.

The oat flake on your architecture diagram

A DNA declaration for a software system works the same way. It is a specific destination that agents can explore toward.

Consider a fleet of agents working on a payment service. Without a DNA layer, each agent has its own prompt, its own context window, its own interpretation of what the service should do. Agent A refactors the transaction pipeline for throughput. Agent B adds a caching layer for latency. Agent C tightens input validation for security. Each agent optimizes locally. None of them is wrong individually. But their combined output does not converge on a coherent system because there is no shared destination to converge toward.

Now give them a DNA declaration. The PaymentService identity declares its purpose: process financial transactions between buyers and merchants, route payments to the appropriate processor, maintain a complete and queryable audit trail. It explicitly excludes user management, merchant onboarding, and reporting dashboards. Its contracts guarantee that the ProcessPayment API is idempotent, responds within 200ms at P99, and never silently drops a transaction. Its constraints require PCI-DSS 4.0 compliance, regional data residency, and audit trail queries that resolve within 30 seconds.

Now Agent A's throughput optimization has a constraint: P99 stays under 200ms. Agent B's caching layer has a boundary: no storing card data outside the originating region. Agent C's validation has a contract: never silently drop a transaction. Each agent still explores its own route. The feedback loop — does this change honor the declaration? — reinforces the routes that converge on the target and penalizes the ones that don't.

The agents do not need to coordinate with each other. They do not even need to know about each other's work. They need to know what the system is supposed to be, stated specifically enough that they can measure their distance from it. The DNA declaration is the pheromone trail laid down by a human, telling every agent what counts as closer and what counts as further away.

The specificity spectrum

There is a failure mode at each end.

Too vague: "Provide an excellent, secure payment experience." An agent cannot measure its distance from "excellent." There is no gradient. The agent will do whatever its training data suggests a good payment service looks like, which is an average of every payment service ever described on the internet. You get a generic system. Not the specific thing you need.

Too specific: "Use a PostgreSQL 16.2 database with a transactions table containing columns id UUID PRIMARY KEY, amount DECIMAL(19,4), currency VARCHAR(3), status VARCHAR(20) with a B-tree index on (merchant_id, created_at)..." This is not identity. This is implementation. You have eliminated the exploration that makes multi-agent systems powerful in the first place. If you specify the schema, the agent cannot discover a better schema. If you specify the architecture, the agent cannot discover a better architecture. You have replaced emergence with dictation.

The slime mold knows where the food is. It does not know which path to take. That distinction is the entire design.

DNA declarations should be specific about what and why. They should be silent about how.

  • What: "Process transactions idempotently with P99 under 200ms."
  • Why: "PCI-DSS 4.0 compliance, regional data residency, complete audit trail."
  • How: Left to the agents. Let them explore. Let the feedback loops select.

The specificity spectrum from slogan to implementation, with identity as the sweet spot where multiple paths converge on a shared target

This maps directly to the biological precedent. The oat flakes are the what — specific, fixed, non-negotiable. The constraint surface (wet agar, not open air) is the why — it shapes what routes are feasible. The path the tubules take is the how — emergent, adaptive, and almost certainly not what a human planner would have drawn.

What shaped goals look like

The test for whether your DNA declaration has shape is simple: can an agent measure its distance from it?

DeclarationHas shape?Why / why not
"Build a world-class API"No"World-class" is not measurable
"All API responses under 200ms at P99"YesLatency is measurable per request
"Ensure robust security"No"Robust" is a judgment call, not a metric
"mTLS between all services, no secrets in environment variables, rotate credentials every 24h"YesEach clause is independently verifiable
"Maintain high code quality"No"High quality" means different things to every agent
"Zero circular dependencies, all public functions documented with input/output types, no function longer than 50 lines"YesEach clause can be checked by a linter or static analysis
"Provide a great user experience"NoNo agent can measure "great"
"All user-facing errors include an error code, a human-readable message, and a link to documentation"YesStructurally verifiable

The left column is how most teams write mission statements and architectural principles today. The right column is what agents need. The gap between them is the distance between a vector and a point.

Most of what engineering organizations call "vision" is useless as a convergence target. Vision documents, architectural principles, team charters: if they cannot be compiled into a form an agent can check its output against, they are not targets. They are decoration.

Evaporation matters too

Ant colony optimization works because pheromone accumulates on good paths and evaporates from bad ones. Without evaporation, the first path discovered locks in permanently, even if a shorter path exists. The colony gets stuck in a local optimum because historical signal overwhelms current signal.

DNA declarations evolve through evaporation cycles as constraints are reviewed, weakened, or strengthened over time

DNA layers have the same failure mode if they are treated as permanent artifacts. A declaration written eighteen months ago encoded the constraints, business rules, and architecture of a system that existed eighteen months ago. If nobody updates it, agents will dutifully converge toward an outdated target. The code will get increasingly coherent — and increasingly wrong.

DNA declarations have to be versioned, reviewed, and actively maintained. Each review is an evaporation cycle: weaken or remove constraints that no longer apply, strengthen ones that do. The declaration earns its authority by staying current, not by being old.

Same practice Kubernetes uses for desired state. You do not write a manifest once and walk away. You update it as requirements change. The reconciliation loop makes reality match the declaration, but only if the declaration reflects current intent.

Monday morning

You probably already have some form of DNA declaration, even if it is a README, a CLAUDE.md, or a design doc your team references. Here is how to test whether it has enough shape to drive convergence.

Start with the distance test. For every statement in your declaration, ask: can an agent measure its distance from this? "We value clean code" fails. "No function exceeds 50 lines, no module has more than 3 external dependencies" passes. Rewrite every failing statement into something measurable, or remove it entirely.

Then separate what from how. Look for implementation details hiding in your identity layer. If you have specified database engines, framework versions, or folder structures, move those to implementation docs. Your DNA layer should survive a complete rewrite of the codebase. If it cannot, it is too coupled to the current implementation.

Check for boundaries. A declaration that says what the system does without saying what it does not do is half a declaration. Boundaries prevent the most common form of agent-driven scope creep: the slow accretion of "one small feature" that transforms a focused service into an incoherent grab bag. The slime mold prunes branches that lead nowhere. Your declaration should make pruning possible.

Schedule the evaporation. Review your DNA declarations quarterly. Not as a ceremony, but as a real audit. Which constraints still hold? Which contracts have drifted? Which boundaries have been crossed without anyone updating the declaration?

Finally, measure convergence, not just compliance. After a month of agents working against a shaped declaration, look at the trend. Are successive PRs getting closer to the declared identity, or oscillating? Convergence means the delta between declared state and actual state shrinks over time. If it does not, either the declaration is too vague to generate a gradient, or the feedback loop is broken.

The boundary between vision and dictation

The hard problem is granularity, and the answer is not settled.

Specify too little and agents wander. Specify too much and you have manually written the architecture while paying for agents to type it in. The sweet spot is a declaration specific enough that an agent can tell whether it is getting warmer or colder, and open enough that the agent can surprise you with a route you did not anticipate.

Tero's team found the same tension. The organism's networks were not identical to Tokyo's rail system. They were comparable in efficiency and fault tolerance but structurally different. Sometimes shorter. Sometimes more redundant. Sometimes using routes no human planner had considered. The mold found solutions the engineers missed, because it was not constrained by their assumptions about how to connect the dots. Only by where the dots were.

Declare the dots. Let the agents find the routes. Review the routes. Update the dots when the world changes.

An organism without a genome is a puddle of proteins. A fleet of agents without a shaped identity layer is a puddle of PRs. The difference is not intelligence or coordination. It is specificity of purpose, declared clearly enough that a system with no brain at all can find the answer.


Shaped goals for a system you're building? We're working on the tooling that makes DNA declarations enforceable, not just aspirational.

terminal

The ribo.dev Team

Building the identity layer for software.

We use cookies to understand how you use ribo.dev and improve your experience.

Learn more in our Cookie Policy