Skip to content
>devspeak
← glossary
level 7Architecture

Modularity

also: modular, modularize, modularized

Building an app out of separate, self-contained parts, each covering one area, that can be understood and changed on their own.

a bit more technical

The degree to which a system is divided into modules with clear boundaries and small public interfaces. Good modularity lets you understand, test, replace or delete one part without reading or breaking the rest. It's how one codebase stays manageable as it grows.

picture it

A bookshelf built from separate cubes. You can swap one cube, move it, or add another without rebuilding the whole shelf.

why it matters

A modular codebase is easier for agents too: they can work in one area with less risk of breaking others. Asking for modular changes keeps an agent's work contained and easier to review.

what your agent might say
agent
To keep this modular, the loyalty points logic lives in src/loyalty with one public function, awardPoints(). Nothing else imports its internal files.
how you might use it
you → your agent
Put the new invoicing feature in its own module with a small public interface. Other parts of the app should only call those functions.
common mistake

Thinking modularity means splitting into separate services or apps. A single codebase can be highly modular, and a set of microservices can still be tangled.

builds on