# Core Modular Design

> Every principle in this category is listed as a record.

Page: Ontology · Principles
Canonical: https://banes-lab.com/ontology#arch-category-core-modular-design

Every principle in this category is listed as a record. Each record carries its kind, its severity, the scopes it applies at and the layer it lives in, then the edge relations that join it to other records, the records that point back at it, the contracts that answer to it and the tensions it takes part in. The descriptors say how it is violated, detected, measured, repaired and enforced. Where the record carries one, an exemplar shows the shape before and after the principle is applied.

Relations diagram

The relations inside this category.

```mermaid
flowchart LR
n_single_responsibility["Single Responsibility Principle (SRP)"]
n_separation_of_concerns["Separation of Concerns"]
n_duplicate_code["Do Not Repeat Yourself (DRY)"]
n_high_cohesion["High Cohesion"]
n_low_coupling["Low Coupling"]
n_encapsulation["Encapsulation"]
n_information_hiding["Information Hiding"]
n_abstraction["Abstraction"]
n_modularity["Modularity"]
n_composability["Composability"]
n_composition_over_inheritance["Composition Over Inheritance"]
n_reusability["Reusability"]
n_replaceability["Replaceability"]
n_interchangeability["Interchangeability"]
n_independence["Independence"]
n_autonomy["Autonomy"]
n_single_responsibility --> n_high_cohesion
n_single_responsibility --> n_separation_of_concerns
n_single_responsibility --> n_modularity
n_single_responsibility --> n_replaceability
n_single_responsibility --> n_reusability
n_separation_of_concerns --> n_abstraction
n_separation_of_concerns --> n_single_responsibility
n_separation_of_concerns --> n_modularity
n_separation_of_concerns --> n_replaceability
n_duplicate_code --> n_abstraction
n_duplicate_code --> n_reusability
n_high_cohesion --> n_single_responsibility
n_high_cohesion --> n_modularity
n_high_cohesion --> n_encapsulation
n_high_cohesion --> n_replaceability
n_low_coupling --> n_abstraction
n_low_coupling --> n_modularity
n_low_coupling --> n_replaceability
n_encapsulation --> n_information_hiding
n_encapsulation --> n_abstraction
n_encapsulation --> n_low_coupling
n_information_hiding --> n_encapsulation
n_information_hiding --> n_low_coupling
n_information_hiding --> n_replaceability
n_abstraction --> n_low_coupling
n_abstraction --> n_replaceability
n_modularity --> n_high_cohesion
n_modularity --> n_low_coupling
n_modularity --> n_separation_of_concerns
n_modularity --> n_composability
n_modularity --> n_replaceability
n_composability --> n_low_coupling
n_composability --> n_modularity
n_composability --> n_reusability
n_composition_over_inheritance --> n_low_coupling
n_composition_over_inheritance --> n_replaceability
n_reusability --> n_abstraction
n_reusability --> n_duplicate_code
n_reusability --> n_composability
n_replaceability --> n_low_coupling
n_interchangeability --> n_replaceability
n_independence --> n_low_coupling
n_independence --> n_autonomy
n_autonomy --> n_independence
```

### Single Responsibility Principle (SRP)

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: mandatory
- Scope: class, module, service
- Aliases: SRP, Single Responsibility Principle (SRP)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[High Cohesion](https://banes-lab.com/records/arch/high-cohesion.md), [Explicit Boundaries](https://banes-lab.com/records/arch/explicit-boundaries.md)

Reinforces
[Separation of Concerns](https://banes-lab.com/records/arch/separation-of-concerns.md), [Modularity](https://banes-lab.com/records/arch/modularity.md), [Testability](https://banes-lab.com/records/arch/testability.md)

Enables
[Replaceability](https://banes-lab.com/records/arch/replaceability.md), [Reusability](https://banes-lab.com/records/arch/reusability.md)

In tension with
[Excessive Fragmentation](https://banes-lab.com/records/lex/excessive-fragmentation.md)

Conflicts with
[God Object](https://banes-lab.com/records/arch/god-object.md), [Blob Class](https://banes-lab.com/records/lex/blob-class.md), [Divergent Change](https://banes-lab.com/records/arch/divergent-change.md)

Referenced by
[Command Pattern](https://banes-lab.com/records/arch/command-pattern.md), [Chain of Responsibility Pattern](https://banes-lab.com/records/arch/chain-of-responsibility-pattern.md), [Iterator Pattern](https://banes-lab.com/records/arch/iterator-pattern.md), [Pipes and Filters](https://banes-lab.com/records/arch/pipes-and-filters.md), [Separation of Concerns](https://banes-lab.com/records/arch/separation-of-concerns.md), [High Cohesion](https://banes-lab.com/records/arch/high-cohesion.md), [Domain Service](https://banes-lab.com/records/arch/domain-service.md), [Interface Segregation Principle (ISP)](https://banes-lab.com/records/arch/interface-segregation.md)

Tensions
[Single Responsibility Principle (SRP) Excessive Fragmentation](https://banes-lab.com/records/tension/excessive-fragmentation-single-responsibility-principle-srp.md)

Violated by
Mixed Responsibilities, Multi-Reason Change

Detected by
high fan-in/fan-out, unrelated methods, unrelated dependencies

Measured by
cohesion score, responsibility count, change-coupling

Refactored by
Extract Class, Extract Module, Split Service, Move Method

Enforced by
architecture tests, package boundaries, [static analysis](https://banes-lab.com/records/reason/technique-static-analysis.md)

Before

```typescript
class FooService {
save(foo: Foo) { fooDb.insert(foo); }
send(foo: Foo) { fooMail.send(foo); }
report(foo: Foo) { return `${foo.id}:${foo.name}`; }
}
```

After

```typescript
class FooRepository { save(foo: Foo) { return fooDb.insert(foo); } }
class FooNotifier { send(foo: Foo) { return fooMail.send(foo); } }
class FooReporter { report(foo: Foo) { return `${foo.id}:${foo.name}`; } }
```

### Separation of Concerns

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: mandatory
- Scope: module, package, component, system
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Explicit Boundaries](https://banes-lab.com/records/arch/explicit-boundaries.md), [Abstraction](https://banes-lab.com/records/arch/abstraction.md)

Reinforces
[Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md), [Modularity](https://banes-lab.com/records/arch/modularity.md), [Layered Architecture](https://banes-lab.com/records/arch/layered-architecture.md)

Enables
[Maintainability](https://banes-lab.com/records/lex/maintainability.md), [Replaceability](https://banes-lab.com/records/arch/replaceability.md)

In tension with
[Over-Layering](https://banes-lab.com/records/lex/over-layering.md)

Conflicts with
[Cross-Cutting Leakage](https://banes-lab.com/records/lex/cross-cutting-leakage.md), [Mixed Layers](https://banes-lab.com/records/lex/mixed-layers.md)

Referenced by
[Visitor Pattern](https://banes-lab.com/records/arch/visitor-pattern.md), [Statecharts](https://banes-lab.com/records/arch/statecharts.md), [Layered Architecture](https://banes-lab.com/records/arch/layered-architecture.md), [Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md), [Modularity](https://banes-lab.com/records/arch/modularity.md), [One Concern Per File](https://banes-lab.com/records/arch/one-concern-per-file.md)

Tensions
[Separation of Concerns Over-Layering](https://banes-lab.com/records/tension/over-layering-separation-of-concerns.md)

Violated by
business logic in controllers, persistence logic in domain

Detected by
layer imports, mixed naming roles, cross-boundary logic

Measured by
dependency direction, layer purity, concern overlap

Refactored by
Extract Layer, Move Logic, Introduce Boundary

Enforced by
import rules, dependency graph checks

Before

```typescript
function handleFoo(request: Request) {
const foo = JSON.parse(request.body);
fooDb.insert(foo);
return `<div>${foo.name}</div>`;
}
```

After

```typescript
function parseFoo(request: Request): Foo { return decodeFoo(request.body); }
function saveFoo(foo: Foo) { return fooDb.insert(foo); }
function renderFoo(foo: Foo) { return `<div>${foo.name}</div>`; }
```

### Do Not Repeat Yourself (DRY)

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: mandatory
- Scope: function, module, domain
- Aliases: DRY
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Abstraction](https://banes-lab.com/records/arch/abstraction.md), [Canonical Source](https://banes-lab.com/records/lex/canonical-source.md)

Reinforces
[Single Source of Truth](https://banes-lab.com/records/arch/single-source-of-truth.md), [Reusability](https://banes-lab.com/records/arch/reusability.md)

Enables
[Consistency](https://banes-lab.com/records/arch/consistency.md), [Maintainability](https://banes-lab.com/records/lex/maintainability.md)

In tension with
[Locality of Behavior](https://banes-lab.com/records/lex/locality-of-behavior.md), [Simplicity](https://banes-lab.com/records/lex/simplicity.md)

Conflicts with
[Copy-Paste Programming](https://banes-lab.com/records/lex/copy-paste-programming.md)

Referenced by
[Reusability](https://banes-lab.com/records/arch/reusability.md), [Metaprogramming](https://banes-lab.com/records/arch/metaprogramming.md), [Single Source of Truth](https://banes-lab.com/records/arch/single-source-of-truth.md), [Normalization](https://banes-lab.com/records/arch/normalization.md)

Tensions
[Do Not Repeat Yourself (DRY) Locality of Behavior](https://banes-lab.com/records/tension/do-not-repeat-yourself-dry-locality-of-behavior.md), [Do Not Repeat Yourself (DRY) Simplicity](https://banes-lab.com/records/tension/do-not-repeat-yourself-dry-simplicity.md)

Violated by
duplicated logic, duplicated constants, duplicated schemas

Detected by
clone detection, duplicated branches, repeated literals

Measured by
duplication percentage, clone count

Refactored by
Extract Function, Extract Module, Parameterize, Centralize Rule

Enforced by
clone analyzers, lint rules, review gates

Before

```typescript
function validateFoo(foo: Foo) {
if (!foo.name || foo.name.length > 40) throw new Error("invalid name");
}
function validateBar(bar: Bar) {
if (!bar.name || bar.name.length > 40) throw new Error("invalid name");
}
```

After

```typescript
function validateName(name: string) {
if (!name || name.length > 40) throw new Error("invalid name");
}
function validateFoo(foo: Foo) { validateName(foo.name); }
function validateBar(bar: Bar) { validateName(bar.name); }
```

### High Cohesion

- Kind: [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- Severity: mandatory
- Scope: class, module, component
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md), [Explicit Boundaries](https://banes-lab.com/records/arch/explicit-boundaries.md)

Reinforces
[Modularity](https://banes-lab.com/records/arch/modularity.md), [Encapsulation](https://banes-lab.com/records/arch/encapsulation.md)

Enables
[Testability](https://banes-lab.com/records/arch/testability.md), [Replaceability](https://banes-lab.com/records/arch/replaceability.md)

In tension with
[Over-Specialization](https://banes-lab.com/records/lex/over-specialization.md)

Conflicts with
[God Object](https://banes-lab.com/records/arch/god-object.md), [Utility Dump](https://banes-lab.com/records/arch/utility-dump.md), [Shotgun Surgery](https://banes-lab.com/records/arch/shotgun-surgery.md)

Referenced by
[Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md), [Modularity](https://banes-lab.com/records/arch/modularity.md)

Tensions
[High Cohesion Over-Specialization](https://banes-lab.com/records/tension/high-cohesion-over-specialization.md)

Violated by
unrelated methods, unrelated fields, unstable responsibility grouping

Detected by
low LCOM, scattered dependencies, unrelated public API

Measured by
cohesion metrics, change locality

Refactored by
Extract Class, Split Module, Move Method

Enforced by
module ownership, [architecture review](https://banes-lab.com/records/arch/architecture-review.md)

Before

```typescript
class FooManager {
saveFoo(foo: Foo) { return fooDb.insert(foo); }
resizeImage(image: Image) { return image.resize(100, 100); }
parseBar(raw: string) { return JSON.parse(raw) as Bar; }
}
```

After

```typescript
class FooRepository {
save(foo: Foo) { return fooDb.insert(foo); }
load(id: FooId) { return fooDb.find(id); }
remove(id: FooId) { return fooDb.delete(id); }
}
class ImageResizer { resize(image: Image) { return image.resize(100, 100); } }
class BarParser { parse(raw: string) { return JSON.parse(raw) as Bar; } }
```

### Low Coupling

- Kind: [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- Severity: mandatory
- Scope: module, component, service
- Aliases: Loose Coupling
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Abstraction](https://banes-lab.com/records/arch/abstraction.md), [Stable Interfaces](https://banes-lab.com/records/arch/stable-interfaces.md)

Reinforces
[Modularity](https://banes-lab.com/records/arch/modularity.md), [Replaceability](https://banes-lab.com/records/arch/replaceability.md), [Portability](https://banes-lab.com/records/arch/portability.md)

Enables
[Independent Deployment](https://banes-lab.com/records/lex/independent-deployment.md), [Test Isolation](https://banes-lab.com/records/lex/test-isolation.md)

In tension with
[Runtime Indirection](https://banes-lab.com/records/lex/runtime-indirection.md)

Conflicts with
[Tight Coupling](https://banes-lab.com/records/lex/tight-coupling.md), [Cyclic Dependencies](https://banes-lab.com/records/lex/cyclic-dependencies.md), [Inappropriate Intimacy](https://banes-lab.com/records/arch/inappropriate-intimacy.md), [Message Chain](https://banes-lab.com/records/arch/message-chain.md)

Referenced by
[Mediator Pattern](https://banes-lab.com/records/arch/mediator-pattern.md), [Service-Oriented Architecture](https://banes-lab.com/records/arch/service-oriented-architecture.md), [Stable Interfaces](https://banes-lab.com/records/arch/stable-interfaces.md), [Encapsulation](https://banes-lab.com/records/arch/encapsulation.md), [Information Hiding](https://banes-lab.com/records/arch/information-hiding.md), [Abstraction](https://banes-lab.com/records/arch/abstraction.md), [Modularity](https://banes-lab.com/records/arch/modularity.md), [Composability](https://banes-lab.com/records/arch/composability.md), [Composition Over Inheritance](https://banes-lab.com/records/arch/composition-over-inheritance.md), [Replaceability](https://banes-lab.com/records/arch/replaceability.md), [Independence](https://banes-lab.com/records/arch/independence.md), [Testability](https://banes-lab.com/records/arch/testability.md), [Anti-Corruption Layer](https://banes-lab.com/records/arch/anti-corruption-layer.md), [Event-Driven Architecture](https://banes-lab.com/records/arch/event-driven-architecture.md), [Publish/Subscribe Pattern](https://banes-lab.com/records/arch/publish-subscribe-pattern.md), [Asynchronous Communication](https://banes-lab.com/records/arch/asynchronous-communication.md), [Interface Segregation Principle (ISP)](https://banes-lab.com/records/arch/interface-segregation.md), [Dependency Inversion Principle (DIP)](https://banes-lab.com/records/arch/dependency-inversion.md)

Tensions
[Low Coupling Runtime Indirection](https://banes-lab.com/records/tension/low-coupling-runtime-indirection.md)

Violated by
concrete imports, [global state](https://banes-lab.com/records/lex/global-state.md), bidirectional dependencies

Detected by
dependency cycles, high afferent/efferent coupling

Measured by
coupling metrics, dependency graph density

Refactored by
Introduce Interface, [Dependency Injection](https://banes-lab.com/records/arch/dependency-injection.md), Adapter Extraction

Enforced by
dependency rules, architecture fitness tests

Before

```typescript
class FooService {
save(foo: Foo) {
const db = new SqlDatabase("foo-prod");
barIndex.update(foo);
return db.table("foos").insert(foo);
}
}
```

After

```typescript
class FooService {
constructor(private readonly events: EventSink) {}
save(foo: Foo) { return this.events.emit({ type: "FooSaved", foo }); }
}
```

### Encapsulation

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: mandatory
- Scope: class, module, component
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Information Hiding](https://banes-lab.com/records/arch/information-hiding.md), [Stable Interfaces](https://banes-lab.com/records/arch/stable-interfaces.md)

Reinforces
[Abstraction](https://banes-lab.com/records/arch/abstraction.md), [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md)

Enables
[Change Isolation](https://banes-lab.com/records/lex/change-isolation.md), [Invariant Protection](https://banes-lab.com/records/lex/invariant-protection.md)

In tension with
[Debuggability](https://banes-lab.com/records/lex/debuggability.md)

Conflicts with
[Exposed Internals](https://banes-lab.com/records/lex/exposed-internals.md), [Anemic Encapsulation](https://banes-lab.com/records/lex/anemic-encapsulation.md), [Feature Envy](https://banes-lab.com/records/arch/feature-envy.md)

Referenced by
[Command Pattern](https://banes-lab.com/records/arch/command-pattern.md), [Iterator Pattern](https://banes-lab.com/records/arch/iterator-pattern.md), [Memento Pattern](https://banes-lab.com/records/arch/memento-pattern.md), [Invariants](https://banes-lab.com/records/arch/invariants.md), [High Cohesion](https://banes-lab.com/records/arch/high-cohesion.md), [Information Hiding](https://banes-lab.com/records/arch/information-hiding.md), [Factory Pattern](https://banes-lab.com/records/arch/factory-pattern.md), [Explicit Boundaries](https://banes-lab.com/records/arch/explicit-boundaries.md), [Aggregate](https://banes-lab.com/records/arch/aggregate.md), [Value Object](https://banes-lab.com/records/arch/value-object.md), [Entity](https://banes-lab.com/records/arch/entity.md), [Introspection](https://banes-lab.com/records/arch/introspection.md), [Facade Pattern](https://banes-lab.com/records/arch/facade-pattern.md), [Proxy Pattern](https://banes-lab.com/records/arch/proxy-pattern.md), [State Isolation](https://banes-lab.com/records/arch/state-isolation.md)

Tensions
[Encapsulation Debuggability](https://banes-lab.com/records/tension/debuggability-encapsulation.md)

Violated by
public mutable fields, leaky getters, direct state mutation

Detected by
public state, excessive setters, external invariant manipulation

Measured by
public surface area, mutation exposure

Refactored by
Hide Field, Introduce Method, Restrict Visibility

Enforced by
visibility rules, linting, API review

Before

```typescript
class FooCounter {
count = 0;
}
const counter = new FooCounter();
counter.count = -100;
```

After

```typescript
class FooCounter {
#count = 0;
increment() { this.#count += 1; }
value() { return this.#count; }
}
```

### Information Hiding

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: mandatory
- Scope: class, module, package
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Encapsulation](https://banes-lab.com/records/arch/encapsulation.md), [Explicit Interfaces](https://banes-lab.com/records/lex/explicit-interfaces.md)

Reinforces
[Low Coupling](https://banes-lab.com/records/arch/low-coupling.md), [Replaceability](https://banes-lab.com/records/arch/replaceability.md)

Enables
[Internal Refactoring](https://banes-lab.com/records/lex/internal-refactoring.md)

In tension with
[Observability](https://banes-lab.com/records/arch/observability.md)

Conflicts with
[Leaky Abstraction](https://banes-lab.com/records/lex/leaky-abstraction.md)

Referenced by
[Memento Pattern](https://banes-lab.com/records/arch/memento-pattern.md), [Encapsulation](https://banes-lab.com/records/arch/encapsulation.md), [Facade Pattern](https://banes-lab.com/records/arch/facade-pattern.md)

Tensions
[Information Hiding Observability](https://banes-lab.com/records/tension/information-hiding-observability.md)

Violated by
exposing implementation details, shared internals

Detected by
internal packages imported externally, exposed persistence models

Measured by
internal API exposure, dependency leakage

Refactored by
Introduce Facade, Hide Module, Restrict Exports

Enforced by
package visibility, module export rules

Before

```typescript
class FooStore {
public readonly rows = new Map<string, Foo>();
}
fooStore.rows.set(foo.id, foo);
```

After

```typescript
interface FooStore {
save(foo: Foo): void;
find(id: string): Foo | undefined;
}
class MapFooStore implements FooStore {
#rows = new Map<string, Foo>();
save(foo: Foo) { this.#rows.set(foo.id, foo); }
find(id: string) { return this.#rows.get(id); }
}
```

### Abstraction

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: mandatory
- Scope: class, module, service, system
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Stable Semantics](https://banes-lab.com/records/lex/stable-semantics.md), [Interface Definition](https://banes-lab.com/records/lex/interface-definition.md)

Reinforces
[Dependency Inversion Principle (DIP)](https://banes-lab.com/records/arch/dependency-inversion.md), [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md), [Portability](https://banes-lab.com/records/arch/portability.md)

Enables
[Polymorphism](https://banes-lab.com/records/arch/polymorphism.md), [Replaceability](https://banes-lab.com/records/arch/replaceability.md)

In tension with
[Simplicity](https://banes-lab.com/records/lex/simplicity.md)

Conflicts with
[Concrete Coupling](https://banes-lab.com/records/arch/concrete-coupling.md), [Middle Man](https://banes-lab.com/records/arch/middle-man.md)

Referenced by
[Interface-Based Design](https://banes-lab.com/records/arch/interface-based-design.md), [Separation of Concerns](https://banes-lab.com/records/arch/separation-of-concerns.md), [Do Not Repeat Yourself (DRY)](https://banes-lab.com/records/arch/duplicate-code.md), [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md), [Encapsulation](https://banes-lab.com/records/arch/encapsulation.md), [Reusability](https://banes-lab.com/records/arch/reusability.md), [Inversion of Control (IoC)](https://banes-lab.com/records/arch/inversion-of-control.md), [Dependency Injection](https://banes-lab.com/records/arch/dependency-injection.md), [Portability](https://banes-lab.com/records/arch/portability.md), [Dynamic Binding](https://banes-lab.com/records/arch/dynamic-binding.md), [Dependency Inversion Principle (DIP)](https://banes-lab.com/records/arch/dependency-inversion.md), [Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md), [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)

Tensions
[Abstraction Simplicity](https://banes-lab.com/records/tension/abstraction-simplicity.md)

Violated by
hardcoded implementation dependency, implementation leakage

Detected by
concrete type usage across boundaries

Measured by
abstraction ratio, interface stability

Refactored by
Extract Interface, Introduce Port, Generalize Dependency

Enforced by
architecture tests, dependency inversion rules

Before

```typescript
function saveFoo(foo: Foo) {
return sqlClient.query("insert into foos(id,name) values($1,$2)", [foo.id, foo.name]);
}
```

After

```typescript
interface FooRepository { save(foo: Foo): Promise<void>; }
class SqlFooRepository implements FooRepository {
save(foo: Foo) { return sqlClient.query("insert into foos(id,name) values($1,$2)", [foo.id, foo.name]); }
}
class HttpFooRepository implements FooRepository {
save(foo: Foo) { return http.post("/foos", foo); }
}
function saveFoo(foo: Foo, repository: FooRepository) { return repository.save(foo); }
```

### Modularity

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: mandatory
- Scope: package, component, service, system
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[High Cohesion](https://banes-lab.com/records/arch/high-cohesion.md), [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md), [Explicit Boundaries](https://banes-lab.com/records/arch/explicit-boundaries.md)

Reinforces
[Separation of Concerns](https://banes-lab.com/records/arch/separation-of-concerns.md), [Composability](https://banes-lab.com/records/arch/composability.md)

Enables
[Replaceability](https://banes-lab.com/records/arch/replaceability.md), [Plugin Architecture](https://banes-lab.com/records/arch/plugin-architecture.md)

In tension with
[Cross-Cutting Concerns](https://banes-lab.com/records/lex/cross-cutting-concerns.md)

Conflicts with
[Big Ball of Mud](https://banes-lab.com/records/arch/big-ball-of-mud.md)

Referenced by
[Component-Based Architecture](https://banes-lab.com/records/arch/component-based-architecture.md), [Package by Feature](https://banes-lab.com/records/arch/package-by-feature.md), [Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md), [Separation of Concerns](https://banes-lab.com/records/arch/separation-of-concerns.md), [High Cohesion](https://banes-lab.com/records/arch/high-cohesion.md), [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md), [Composability](https://banes-lab.com/records/arch/composability.md), [Bounded Context](https://banes-lab.com/records/arch/bounded-context.md), [Explicit Boundaries](https://banes-lab.com/records/arch/explicit-boundaries.md), [Plugin Architecture](https://banes-lab.com/records/arch/plugin-architecture.md)

Tensions
[Modularity Cross-Cutting Concerns](https://banes-lab.com/records/tension/cross-cutting-concerns-modularity.md)

Violated by
[cyclic dependencies](https://banes-lab.com/records/lex/cyclic-dependencies.md), [shared mutable state](https://banes-lab.com/records/arch/shared-mutable-state.md), [boundary leakage](https://banes-lab.com/records/arch/boundary-leakage.md)

Detected by
dependency cycles, unstable module graph

Measured by
modularity score, graph density, instability

Refactored by
Split Module, Introduce Boundary, Invert Dependency

Enforced by
module rules, package ownership, [fitness functions](https://banes-lab.com/records/arch/fitness-functions.md)

Before

```typescript
class FooApplication {
parse(raw: string) { return JSON.parse(raw) as Foo; }
save(foo: Foo) { return fooDb.insert(foo); }
publish(foo: Foo) { return fooBus.emit(foo); }
}
```

After

```typescript
export const fooParser = { parse: (raw: string) => decodeFoo(raw) };
export const fooRepository = { save: (foo: Foo) => fooDb.insert(foo) };
export const fooPublisher = { publish: (foo: Foo) => fooBus.emit(foo) };
```

### Composability

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: recommended
- Scope: function, component, system
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Stable Interfaces](https://banes-lab.com/records/arch/stable-interfaces.md), [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md)

Reinforces
[Modularity](https://banes-lab.com/records/arch/modularity.md), [Reusability](https://banes-lab.com/records/arch/reusability.md)

Enables
[Pipeline Architecture](https://banes-lab.com/records/arch/pipeline-architecture.md), [Plugin Architecture](https://banes-lab.com/records/arch/plugin-architecture.md)

In tension with
[Performance Overhead](https://banes-lab.com/records/lex/performance-overhead.md)

Conflicts with
[Monolithic Procedures](https://banes-lab.com/records/lex/monolithic-procedures.md)

Referenced by
[Component-Based Architecture](https://banes-lab.com/records/arch/component-based-architecture.md), [Pipes and Filters](https://banes-lab.com/records/arch/pipes-and-filters.md), [Modularity](https://banes-lab.com/records/arch/modularity.md), [Reusability](https://banes-lab.com/records/arch/reusability.md), [Pipeline Architecture](https://banes-lab.com/records/arch/pipeline-architecture.md), [Decorator Pattern](https://banes-lab.com/records/arch/decorator-pattern.md)

Tensions
[Composability Performance Overhead](https://banes-lab.com/records/tension/composability-performance-overhead.md)

Violated by
[hidden side effects](https://banes-lab.com/records/lex/hidden-side-effects.md), [incompatible interfaces](https://banes-lab.com/records/lex/incompatible-interfaces.md)

Detected by
non-chainable APIs, incompatible contracts

Measured by
composition count, interface compatibility

Refactored by
Normalize Interface, Extract Component, Introduce Adapter

Enforced by
contract tests, type checks

Before

```typescript
function processFoo(raw: string) {
const foo = JSON.parse(raw) as Foo;
const normalized = { ...foo, name: foo.name.trim() };
return fooDb.insert(normalized);
}
```

After

```typescript
const parseFoo = (raw: string): Foo => decodeFoo(raw);
const normalizeFoo = (foo: Foo): Foo => ({ ...foo, name: foo.name.trim() });
const saveFoo = (foo: Foo) => fooDb.insert(foo);
const processFoo = flow(parseFoo, normalizeFoo, saveFoo);
```

### Composition Over Inheritance

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: recommended
- Scope: class, component
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Delegation](https://banes-lab.com/records/lex/delegation.md), [Interface-Based Design](https://banes-lab.com/records/arch/interface-based-design.md)

Reinforces
[Low Coupling](https://banes-lab.com/records/arch/low-coupling.md), [Replaceability](https://banes-lab.com/records/arch/replaceability.md)

Enables
[Strategy Pattern](https://banes-lab.com/records/arch/strategy-pattern.md), [Decorator Pattern](https://banes-lab.com/records/arch/decorator-pattern.md)

In tension with
[Simplicity for Trivial Reuse](https://banes-lab.com/records/lex/simplicity-for-trivial-reuse.md)

Conflicts with
[Deep Inheritance Hierarchy](https://banes-lab.com/records/lex/deep-inheritance-hierarchy.md)

Referenced by
[Bridge Pattern](https://banes-lab.com/records/arch/bridge-pattern.md)

Tensions
[Composition Over Inheritance Simplicity for Trivial Reuse](https://banes-lab.com/records/tension/composition-over-inheritance-simplicity-for-trivial-reuse.md)

Violated by
fragile base class, inherited behavior misuse

Detected by
inheritance depth, overridden behavior conflicts

Measured by
inheritance depth, composition ratio

Refactored by
Replace Inheritance with Delegation, Extract Strategy

Enforced by
inheritance depth limits, review rules

Before

```typescript
class RetryingSqlFooStore extends SqlFooStore {
async save(foo: Foo) {
for (let attempt = 0; attempt < 3; attempt += 1) {
try { return await super.save(foo); } catch (error) { if (attempt === 2) throw error; }
}
}
}
```

After

```typescript
class RetryingFooStore implements FooStore {
constructor(private readonly inner: FooStore, private readonly attempts: number) {}
async save(foo: Foo) {
for (let attempt = 0; attempt < this.attempts; attempt += 1) {
try { return await this.inner.save(foo); } catch (error) { if (attempt === this.attempts - 1) throw error; }
}
}
}
```

### Reusability

- Kind: [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- Severity: recommended
- Scope: function, module, component
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Abstraction](https://banes-lab.com/records/arch/abstraction.md), [Stable Contracts](https://banes-lab.com/records/lex/stable-contracts.md)

Reinforces
[Do Not Repeat Yourself (DRY)](https://banes-lab.com/records/arch/duplicate-code.md), [Composability](https://banes-lab.com/records/arch/composability.md)

Enables
[Shared Libraries](https://banes-lab.com/records/lex/shared-libraries.md), [Product Lines](https://banes-lab.com/records/lex/product-lines.md)

In tension with
[YAGNI](https://banes-lab.com/records/lex/yagni.md), [Over-Generalization](https://banes-lab.com/records/lex/over-generalization.md)

Conflicts with
[Context-Specific Coupling](https://banes-lab.com/records/lex/context-specific-coupling.md)

Referenced by
[Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md), [Do Not Repeat Yourself (DRY)](https://banes-lab.com/records/arch/duplicate-code.md), [Composability](https://banes-lab.com/records/arch/composability.md)

Tensions
[Reusability YAGNI](https://banes-lab.com/records/tension/reusability-yagni.md), [Reusability Over-Generalization](https://banes-lab.com/records/tension/over-generalization-reusability.md)

Violated by
hardcoded context, hidden assumptions

Detected by
environment-specific logic in reusable code

Measured by
reuse count, dependency portability

Refactored by
Parameterize, Extract Library, Remove Context Coupling

Enforced by
API review, dependency rules

Before

```typescript
function saveAdminFoo(foo: Foo) { return adminFooDb.insert(foo); }
function savePublicFoo(foo: Foo) { return publicFooDb.insert(foo); }
```

After

```typescript
function saveFoo(store: FooStore, foo: Foo) { return store.save(foo); }
const saveAdminFoo = (foo: Foo) => saveFoo(adminFooStore, foo);
const savePublicFoo = (foo: Foo) => saveFoo(publicFooStore, foo);
```

### Replaceability

- Kind: [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- Severity: recommended
- Scope: component, service, infrastructure
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Stable Interfaces](https://banes-lab.com/records/arch/stable-interfaces.md), [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md)

Reinforces
[Dependency Inversion Principle (DIP)](https://banes-lab.com/records/arch/dependency-inversion.md), [Ports and Adapters](https://banes-lab.com/records/lex/ports-and-adapters.md)

Enables
[Vendor Swap](https://banes-lab.com/records/lex/vendor-swap.md), [Plugin Architecture](https://banes-lab.com/records/arch/plugin-architecture.md)

In tension with
[Deep Optimization](https://banes-lab.com/records/lex/deep-optimization.md)

Conflicts with
[Concrete Coupling](https://banes-lab.com/records/arch/concrete-coupling.md)

Referenced by
[Ports and Adapters Architecture](https://banes-lab.com/records/arch/ports-and-adapters-architecture.md), [Component-Based Architecture](https://banes-lab.com/records/arch/component-based-architecture.md), [Stable Interfaces](https://banes-lab.com/records/arch/stable-interfaces.md), [Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md), [Separation of Concerns](https://banes-lab.com/records/arch/separation-of-concerns.md), [High Cohesion](https://banes-lab.com/records/arch/high-cohesion.md), [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md), [Information Hiding](https://banes-lab.com/records/arch/information-hiding.md), [Abstraction](https://banes-lab.com/records/arch/abstraction.md), [Modularity](https://banes-lab.com/records/arch/modularity.md), [Composition Over Inheritance](https://banes-lab.com/records/arch/composition-over-inheritance.md), [Interchangeability](https://banes-lab.com/records/arch/interchangeability.md), [Explicit Boundaries](https://banes-lab.com/records/arch/explicit-boundaries.md), [Dependency Injection](https://banes-lab.com/records/arch/dependency-injection.md), [Portability](https://banes-lab.com/records/arch/portability.md), [Protocol Independence](https://banes-lab.com/records/arch/protocol-independence.md), [Adapter Pattern](https://banes-lab.com/records/arch/adapter-pattern.md)

Tensions
[Replaceability Deep Optimization](https://banes-lab.com/records/tension/deep-optimization-replaceability.md)

Violated by
direct vendor SDK usage in domain/application

Detected by
infrastructure imports in core layers

Measured by
adapter coverage, boundary purity

Refactored by
Introduce Port, Extract Adapter, Invert Dependency

Enforced by
import restrictions, adapter tests

Before

```typescript
class FooService {
private readonly store = new SqlFooStore();
save(foo: Foo) { return this.store.save(foo); }
}
```

After

```typescript
class FooService {
constructor(private readonly store: FooStore) {}
save(foo: Foo) { return this.store.save(foo); }
}
test("saves without a database", async () => {
const store = new MemoryFooStore();
await new FooService(store).save(foo);
expect(store.find(foo.id)).toEqual(foo);
});
```

### Interchangeability

- Kind: [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- Severity: recommended
- Scope: component, plugin, service
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Contract Compatibility](https://banes-lab.com/records/lex/contract-compatibility.md), [Interface Conformance](https://banes-lab.com/records/lex/interface-conformance.md)

Reinforces
[Replaceability](https://banes-lab.com/records/arch/replaceability.md), [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)

Enables
[Strategy Swap](https://banes-lab.com/records/lex/strategy-swap.md), [Plugin Swap](https://banes-lab.com/records/lex/plugin-swap.md)

In tension with
[Specialized Optimization](https://banes-lab.com/records/lex/specialized-optimization.md)

Conflicts with
[Implementation-Specific Contracts](https://banes-lab.com/records/lex/implementation-specific-contracts.md)

Referenced by
[Abstract Factory Pattern](https://banes-lab.com/records/arch/abstract-factory-pattern.md), [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)

Tensions
[Interchangeability Specialized Optimization](https://banes-lab.com/records/tension/interchangeability-specialized-optimization.md)

Violated by
non-conforming substitutes

Detected by
contract test failure, incompatible schema

Measured by
conformance score, compatibility tests

Refactored by
Normalize Interface, Add Adapter, Align Contract

Enforced by
contract tests, [schema validation](https://banes-lab.com/records/arch/schema-validation.md)

Before

```typescript
function loadFoo(kind: "sql" | "memory", id: FooId) {
if (kind === "sql") return sqlFooStore.find(id);
return memoryFooStore.get(id);
}
```

After

```typescript
interface FooStore { find(id: FooId): Promise<Foo | undefined>; }
function loadFoo(store: FooStore, id: FooId) { return store.find(id); }
```

### Independence

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: recommended
- Scope: module, service, deployment
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Low Coupling](https://banes-lab.com/records/arch/low-coupling.md), [Explicit Boundaries](https://banes-lab.com/records/arch/explicit-boundaries.md)

Reinforces
[Autonomy](https://banes-lab.com/records/arch/autonomy.md), [Portability](https://banes-lab.com/records/arch/portability.md)

Enables
[Independent Testing](https://banes-lab.com/records/lex/independent-testing.md), [Independent Deployment](https://banes-lab.com/records/lex/independent-deployment.md)

In tension with
[Coordination Cost](https://banes-lab.com/records/lex/coordination-cost.md)

Conflicts with
[Shared Runtime Dependency](https://banes-lab.com/records/lex/shared-runtime-dependency.md)

Referenced by
[Autonomy](https://banes-lab.com/records/arch/autonomy.md), [Service Autonomy](https://banes-lab.com/records/arch/service-autonomy.md)

Tensions
[Independence Coordination Cost](https://banes-lab.com/records/tension/coordination-cost-independence.md)

Violated by
shared database coupling, synchronous dependency chains

Detected by
shared mutable resources, deployment coupling

Measured by
independent deployability, dependency count

Refactored by
Split Boundary, Introduce Events, Decouple Persistence

Enforced by
deployment rules, service ownership

Before

```typescript
class FooModule {
create(foo: Foo) {
barModule.refresh(foo.id);
bazModule.rebuild(foo.id);
return fooDb.insert(foo);
}
}
```

After

```typescript
class FooModule {
constructor(private readonly store: FooStore, private readonly events: EventSink) {}
async create(foo: Foo) {
await this.store.save(foo);
this.events.emit({ type: "FooCreated", fooId: foo.id });
}
}
```

### Autonomy

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: contextual
- Scope: service, team, bounded context
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Requires
[Independence](https://banes-lab.com/records/arch/independence.md), [Service Autonomy](https://banes-lab.com/records/arch/service-autonomy.md)

Reinforces
[Decentralization](https://banes-lab.com/records/arch/decentralization.md), [Resilience](https://banes-lab.com/records/arch/resilience.md)

Enables
[Microservices](https://banes-lab.com/records/arch/microservices.md), [Bounded Context Ownership](https://banes-lab.com/records/lex/bounded-context-ownership.md)

In tension with
[Governance](https://banes-lab.com/records/arch/governance.md), [Standardization](https://banes-lab.com/records/arch/standardization.md)

Conflicts with
[Centralized Runtime Control](https://banes-lab.com/records/lex/centralized-runtime-control.md)

Referenced by
[Decentralization](https://banes-lab.com/records/arch/decentralization.md), [Independence](https://banes-lab.com/records/arch/independence.md), [Bounded Context](https://banes-lab.com/records/arch/bounded-context.md)

Tensions
[Autonomy Governance](https://banes-lab.com/records/tension/autonomy-governance.md), [Autonomy Standardization](https://banes-lab.com/records/tension/autonomy-standardization.md)

Violated by
cross-service database writes, shared business logic ownership

Detected by
external writes to owned data, cross-team coupling

Measured by
ownership clarity, deployment independence

Refactored by
[Own Data](https://banes-lab.com/records/lex/own-data.md), Split Context, Introduce Events

Enforced by
ownership boundaries, API policies

Before

```typescript
async function createFoo(foo: Foo) {
const bar = await barService.get(foo.barId);
await bazService.validate(foo, bar);
return fooStore.save(foo);
}
```

After

```typescript
async function createFoo(foo: Foo) {
await fooStore.save(foo);
await outbox.append({ type: "FooCreated", fooId: foo.id, barId: foo.barId });
}
```

## Links to

- [principle](https://banes-lab.com/records/kind/principle.md)
- [Structural Core](https://banes-lab.com/records/layer/structural-core.md)
- [High Cohesion](https://banes-lab.com/records/arch/high-cohesion.md)
- [Explicit Boundaries](https://banes-lab.com/records/arch/explicit-boundaries.md)
- [Separation of Concerns](https://banes-lab.com/records/arch/separation-of-concerns.md)
- [Modularity](https://banes-lab.com/records/arch/modularity.md)
- [Testability](https://banes-lab.com/records/arch/testability.md)
- [Replaceability](https://banes-lab.com/records/arch/replaceability.md)
- [Reusability](https://banes-lab.com/records/arch/reusability.md)
- [Excessive Fragmentation](https://banes-lab.com/records/lex/excessive-fragmentation.md)
- [God Object](https://banes-lab.com/records/arch/god-object.md)
- [Blob Class](https://banes-lab.com/records/lex/blob-class.md)
- [Divergent Change](https://banes-lab.com/records/arch/divergent-change.md)
- [Command Pattern](https://banes-lab.com/records/arch/command-pattern.md)
- [Chain of Responsibility Pattern](https://banes-lab.com/records/arch/chain-of-responsibility-pattern.md)
- [Iterator Pattern](https://banes-lab.com/records/arch/iterator-pattern.md)
- [Pipes and Filters](https://banes-lab.com/records/arch/pipes-and-filters.md)
- [Domain Service](https://banes-lab.com/records/arch/domain-service.md)
- [Interface Segregation Principle (ISP)](https://banes-lab.com/records/arch/interface-segregation.md)
- [Single Responsibility Principle (SRP) / Excessive Fragmentation](https://banes-lab.com/records/tension/excessive-fragmentation-single-responsibility-principle-srp.md)
- [Static Analysis](https://banes-lab.com/records/reason/technique-static-analysis.md)
- [Abstraction](https://banes-lab.com/records/arch/abstraction.md)
- [Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md)
- [Layered Architecture](https://banes-lab.com/records/arch/layered-architecture.md)
- [Maintainability](https://banes-lab.com/records/lex/maintainability.md)
- [Over-Layering](https://banes-lab.com/records/lex/over-layering.md)
- [Cross-Cutting Leakage](https://banes-lab.com/records/lex/cross-cutting-leakage.md)
- [Mixed Layers](https://banes-lab.com/records/lex/mixed-layers.md)
- [Visitor Pattern](https://banes-lab.com/records/arch/visitor-pattern.md)
- [Statecharts](https://banes-lab.com/records/arch/statecharts.md)
- [One Concern Per File](https://banes-lab.com/records/arch/one-concern-per-file.md)
- [Separation of Concerns / Over-Layering](https://banes-lab.com/records/tension/over-layering-separation-of-concerns.md)
- [Canonical Source](https://banes-lab.com/records/lex/canonical-source.md)
- [Single Source of Truth](https://banes-lab.com/records/arch/single-source-of-truth.md)
- [Consistency](https://banes-lab.com/records/arch/consistency.md)
- [Locality of Behavior](https://banes-lab.com/records/lex/locality-of-behavior.md)
- [Simplicity](https://banes-lab.com/records/lex/simplicity.md)
- [Copy-Paste Programming](https://banes-lab.com/records/lex/copy-paste-programming.md)
- [Metaprogramming](https://banes-lab.com/records/arch/metaprogramming.md)
- [Normalization](https://banes-lab.com/records/arch/normalization.md)
- [Do Not Repeat Yourself (DRY) / Locality of Behavior](https://banes-lab.com/records/tension/do-not-repeat-yourself-dry-locality-of-behavior.md)
- [Do Not Repeat Yourself (DRY) / Simplicity](https://banes-lab.com/records/tension/do-not-repeat-yourself-dry-simplicity.md)
- [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- [Encapsulation](https://banes-lab.com/records/arch/encapsulation.md)
- [Over-Specialization](https://banes-lab.com/records/lex/over-specialization.md)
- [Utility Dump](https://banes-lab.com/records/arch/utility-dump.md)
- [Shotgun Surgery](https://banes-lab.com/records/arch/shotgun-surgery.md)
- [High Cohesion / Over-Specialization](https://banes-lab.com/records/tension/high-cohesion-over-specialization.md)
- [Architecture Review](https://banes-lab.com/records/arch/architecture-review.md)
- [Stable Interfaces](https://banes-lab.com/records/arch/stable-interfaces.md)
- [Portability](https://banes-lab.com/records/arch/portability.md)
- [Independent Deployment](https://banes-lab.com/records/lex/independent-deployment.md)
- [Test Isolation](https://banes-lab.com/records/lex/test-isolation.md)
- [Runtime Indirection](https://banes-lab.com/records/lex/runtime-indirection.md)
- [Tight Coupling](https://banes-lab.com/records/lex/tight-coupling.md)
- [Cyclic Dependencies](https://banes-lab.com/records/lex/cyclic-dependencies.md)
- [Inappropriate Intimacy](https://banes-lab.com/records/arch/inappropriate-intimacy.md)
- [Message Chain](https://banes-lab.com/records/arch/message-chain.md)
- [Mediator Pattern](https://banes-lab.com/records/arch/mediator-pattern.md)
- [Service-Oriented Architecture](https://banes-lab.com/records/arch/service-oriented-architecture.md)
- [Information Hiding](https://banes-lab.com/records/arch/information-hiding.md)
- [Composability](https://banes-lab.com/records/arch/composability.md)
- [Composition Over Inheritance](https://banes-lab.com/records/arch/composition-over-inheritance.md)
- [Independence](https://banes-lab.com/records/arch/independence.md)
- [Anti-Corruption Layer](https://banes-lab.com/records/arch/anti-corruption-layer.md)
- [Event-Driven Architecture](https://banes-lab.com/records/arch/event-driven-architecture.md)
- [Publish/Subscribe Pattern](https://banes-lab.com/records/arch/publish-subscribe-pattern.md)
- [Asynchronous Communication](https://banes-lab.com/records/arch/asynchronous-communication.md)
- [Dependency Inversion Principle (DIP)](https://banes-lab.com/records/arch/dependency-inversion.md)
- [Low Coupling / Runtime Indirection](https://banes-lab.com/records/tension/low-coupling-runtime-indirection.md)
- [Global State](https://banes-lab.com/records/lex/global-state.md)
- [Dependency Injection](https://banes-lab.com/records/arch/dependency-injection.md)
- [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md)
- [Change Isolation](https://banes-lab.com/records/lex/change-isolation.md)
- [Invariant Protection](https://banes-lab.com/records/lex/invariant-protection.md)
- [Debuggability](https://banes-lab.com/records/lex/debuggability.md)
- [Exposed Internals](https://banes-lab.com/records/lex/exposed-internals.md)
- [Anemic Encapsulation](https://banes-lab.com/records/lex/anemic-encapsulation.md)
- [Feature Envy](https://banes-lab.com/records/arch/feature-envy.md)
- [Memento Pattern](https://banes-lab.com/records/arch/memento-pattern.md)
- [Invariants](https://banes-lab.com/records/arch/invariants.md)
- [Factory Pattern](https://banes-lab.com/records/arch/factory-pattern.md)
- [Aggregate](https://banes-lab.com/records/arch/aggregate.md)
- [Value Object](https://banes-lab.com/records/arch/value-object.md)
- [Entity](https://banes-lab.com/records/arch/entity.md)
- [Introspection](https://banes-lab.com/records/arch/introspection.md)
- [Facade Pattern](https://banes-lab.com/records/arch/facade-pattern.md)
- [Proxy Pattern](https://banes-lab.com/records/arch/proxy-pattern.md)
- [State Isolation](https://banes-lab.com/records/arch/state-isolation.md)
- [Encapsulation / Debuggability](https://banes-lab.com/records/tension/debuggability-encapsulation.md)
- [Explicit Interfaces](https://banes-lab.com/records/lex/explicit-interfaces.md)
- [Internal Refactoring](https://banes-lab.com/records/lex/internal-refactoring.md)
- [Observability](https://banes-lab.com/records/arch/observability.md)
- [Leaky Abstraction](https://banes-lab.com/records/lex/leaky-abstraction.md)
- [Information Hiding / Observability](https://banes-lab.com/records/tension/information-hiding-observability.md)
- [Stable Semantics](https://banes-lab.com/records/lex/stable-semantics.md)
- [Interface Definition](https://banes-lab.com/records/lex/interface-definition.md)
- [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)
- [Concrete Coupling](https://banes-lab.com/records/arch/concrete-coupling.md)
- [Middle Man](https://banes-lab.com/records/arch/middle-man.md)
- [Interface-Based Design](https://banes-lab.com/records/arch/interface-based-design.md)
- [Do Not Repeat Yourself (DRY)](https://banes-lab.com/records/arch/duplicate-code.md)
- [Inversion of Control (IoC)](https://banes-lab.com/records/arch/inversion-of-control.md)
- [Dynamic Binding](https://banes-lab.com/records/arch/dynamic-binding.md)
- [Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md)
- [Abstraction / Simplicity](https://banes-lab.com/records/tension/abstraction-simplicity.md)
- [Plugin Architecture](https://banes-lab.com/records/arch/plugin-architecture.md)
- [Cross-Cutting Concerns](https://banes-lab.com/records/lex/cross-cutting-concerns.md)
- [Big Ball of Mud](https://banes-lab.com/records/arch/big-ball-of-mud.md)
- [Component-Based Architecture](https://banes-lab.com/records/arch/component-based-architecture.md)
- [Package by Feature](https://banes-lab.com/records/arch/package-by-feature.md)
- [Bounded Context](https://banes-lab.com/records/arch/bounded-context.md)
- [Modularity / Cross-Cutting Concerns](https://banes-lab.com/records/tension/cross-cutting-concerns-modularity.md)
- [Shared Mutable State](https://banes-lab.com/records/arch/shared-mutable-state.md)
- [Boundary Leakage](https://banes-lab.com/records/arch/boundary-leakage.md)
- [Fitness Functions](https://banes-lab.com/records/arch/fitness-functions.md)
- [Pipeline Architecture](https://banes-lab.com/records/arch/pipeline-architecture.md)
- [Performance Overhead](https://banes-lab.com/records/lex/performance-overhead.md)
- [Monolithic Procedures](https://banes-lab.com/records/lex/monolithic-procedures.md)
- [Decorator Pattern](https://banes-lab.com/records/arch/decorator-pattern.md)
- [Composability / Performance Overhead](https://banes-lab.com/records/tension/composability-performance-overhead.md)
- [Hidden Side Effects](https://banes-lab.com/records/lex/hidden-side-effects.md)
- [Incompatible Interfaces](https://banes-lab.com/records/lex/incompatible-interfaces.md)
- [Delegation](https://banes-lab.com/records/lex/delegation.md)
- [Strategy Pattern](https://banes-lab.com/records/arch/strategy-pattern.md)
- [Simplicity for Trivial Reuse](https://banes-lab.com/records/lex/simplicity-for-trivial-reuse.md)
- [Deep Inheritance Hierarchy](https://banes-lab.com/records/lex/deep-inheritance-hierarchy.md)
- [Bridge Pattern](https://banes-lab.com/records/arch/bridge-pattern.md)
- [Composition Over Inheritance / Simplicity for Trivial Reuse](https://banes-lab.com/records/tension/composition-over-inheritance-simplicity-for-trivial-reuse.md)
- [Stable Contracts](https://banes-lab.com/records/lex/stable-contracts.md)
- [Shared Libraries](https://banes-lab.com/records/lex/shared-libraries.md)
- [Product Lines](https://banes-lab.com/records/lex/product-lines.md)
- [YAGNI](https://banes-lab.com/records/lex/yagni.md)
- [Over-Generalization](https://banes-lab.com/records/lex/over-generalization.md)
- [Context-Specific Coupling](https://banes-lab.com/records/lex/context-specific-coupling.md)
- [Reusability / YAGNI](https://banes-lab.com/records/tension/reusability-yagni.md)
- [Reusability / Over-Generalization](https://banes-lab.com/records/tension/over-generalization-reusability.md)
- [Ports and Adapters](https://banes-lab.com/records/lex/ports-and-adapters.md)
- [Vendor Swap](https://banes-lab.com/records/lex/vendor-swap.md)
- [Deep Optimization](https://banes-lab.com/records/lex/deep-optimization.md)
- [Ports and Adapters Architecture](https://banes-lab.com/records/arch/ports-and-adapters-architecture.md)
- [Interchangeability](https://banes-lab.com/records/arch/interchangeability.md)
- [Protocol Independence](https://banes-lab.com/records/arch/protocol-independence.md)
- [Adapter Pattern](https://banes-lab.com/records/arch/adapter-pattern.md)
- [Replaceability / Deep Optimization](https://banes-lab.com/records/tension/deep-optimization-replaceability.md)
- [Contract Compatibility](https://banes-lab.com/records/lex/contract-compatibility.md)
- [Interface Conformance](https://banes-lab.com/records/lex/interface-conformance.md)
- [Strategy Swap](https://banes-lab.com/records/lex/strategy-swap.md)
- [Plugin Swap](https://banes-lab.com/records/lex/plugin-swap.md)
- [Specialized Optimization](https://banes-lab.com/records/lex/specialized-optimization.md)
- [Implementation-Specific Contracts](https://banes-lab.com/records/lex/implementation-specific-contracts.md)
- [Abstract Factory Pattern](https://banes-lab.com/records/arch/abstract-factory-pattern.md)
- [Interchangeability / Specialized Optimization](https://banes-lab.com/records/tension/interchangeability-specialized-optimization.md)
- [Schema Validation](https://banes-lab.com/records/arch/schema-validation.md)
- [Autonomy](https://banes-lab.com/records/arch/autonomy.md)
- [Independent Testing](https://banes-lab.com/records/lex/independent-testing.md)
- [Coordination Cost](https://banes-lab.com/records/lex/coordination-cost.md)
- [Shared Runtime Dependency](https://banes-lab.com/records/lex/shared-runtime-dependency.md)
- [Service Autonomy](https://banes-lab.com/records/arch/service-autonomy.md)
- [Independence / Coordination Cost](https://banes-lab.com/records/tension/coordination-cost-independence.md)
- [Decentralization](https://banes-lab.com/records/arch/decentralization.md)
- [Resilience](https://banes-lab.com/records/arch/resilience.md)
- [Microservices](https://banes-lab.com/records/arch/microservices.md)
- [Bounded Context Ownership](https://banes-lab.com/records/lex/bounded-context-ownership.md)
- [Governance](https://banes-lab.com/records/arch/governance.md)
- [Standardization](https://banes-lab.com/records/arch/standardization.md)
- [Centralized Runtime Control](https://banes-lab.com/records/lex/centralized-runtime-control.md)
- [Autonomy / Governance](https://banes-lab.com/records/tension/autonomy-governance.md)
- [Autonomy / Standardization](https://banes-lab.com/records/tension/autonomy-standardization.md)
- [Own Data](https://banes-lab.com/records/lex/own-data.md)

## Linked from

- [The layer topology](https://banes-lab.com/ontology/schema/the-layer-topology.md)
- [The membership](https://banes-lab.com/ontology/schema/the-membership.md)
