# Behavioral Patterns

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

Page: Ontology · Principles
Canonical: https://banes-lab.com/ontology#arch-category-behavioral-patterns

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_strategy_pattern["Strategy Pattern"]
n_template_method_pattern["Template Method Pattern"]
n_observer_pattern["Observer Pattern"]
n_mediator_pattern["Mediator Pattern"]
n_command_pattern["Command Pattern"]
n_state_pattern["State Pattern"]
n_chain_of_responsibility_pattern["Chain of Responsibility Pattern"]
n_iterator_pattern["Iterator Pattern"]
n_visitor_pattern["Visitor Pattern"]
n_memento_pattern["Memento Pattern"]
n_null_object_pattern["Null Object Pattern"]
n_finite_state_machine["Finite State Machine"]
n_statecharts["Statecharts"]
n_finite_state_machine --> n_state_pattern
n_statecharts --> n_finite_state_machine
n_statecharts --> n_finite_state_machine
```

### Strategy Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: recommended
- Scope: algorithm, policy, behavior
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Interchangeable Algorithms](https://banes-lab.com/records/lex/interchangeable-algorithms.md)

Reinforces
[Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md), [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)

Enables
[Runtime Behavior Selection](https://banes-lab.com/records/lex/runtime-behavior-selection.md)

In tension with
[Class Count](https://banes-lab.com/records/lex/class-count.md)

Conflicts with
[Large Conditional Logic](https://banes-lab.com/records/lex/large-conditional-logic.md)

Referenced by
[Composition Over Inheritance](https://banes-lab.com/records/arch/composition-over-inheritance.md), [Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md), [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)

Tensions
[Strategy Pattern Class Count](https://banes-lab.com/records/tension/class-count-strategy-pattern.md)

Violated by
switch over behavior modes

Detected by
conditional strategy selection with duplicated behavior

Measured by
conditional complexity

Refactored by
Extract Strategy

Enforced by
complexity thresholds, [review](https://banes-lab.com/records/lex/review.md)

Before

```typescript
function priceFoo(kind: string, value: number) {
if (kind === "standard") return value;
if (kind === "double") return value * 2;
return 0;
}
```

After

```typescript
interface FooPricing { price(value: number): number; }
const standard: FooPricing = { price: value => value };
const doubled: FooPricing = { price: value => value * 2 };
function priceFoo(strategy: FooPricing, value: number) { return strategy.price(value); }
```

### Template Method Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: workflow, framework
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Stable Algorithm Skeleton](https://banes-lab.com/records/lex/stable-algorithm-skeleton.md)

Reinforces
[Framework Reuse](https://banes-lab.com/records/lex/framework-reuse.md)

Enables
[Controlled Variation](https://banes-lab.com/records/lex/controlled-variation.md)

In tension with
[Inheritance Coupling](https://banes-lab.com/records/lex/inheritance-coupling.md)

Conflicts with
[Duplicated Workflow](https://banes-lab.com/records/lex/duplicated-workflow.md)

Tensions
[Template Method Pattern Inheritance Coupling](https://banes-lab.com/records/tension/inheritance-coupling-template-method-pattern.md)

Violated by
copied workflows with small variations

Detected by
duplicated method sequences

Measured by
workflow duplication

Refactored by
Introduce Template Method

Enforced by
[design review](https://banes-lab.com/records/arch/design-review.md)

Before

```typescript
function importJsonFoo(raw: string) { validateJson(raw); return saveFoo(parseJson(raw)); }
function importCsvFoo(raw: string) { validateCsv(raw); return saveFoo(parseCsv(raw)); }
```

After

```typescript
abstract class FooImporter {
import(raw: string) { this.validate(raw); return saveFoo(this.parse(raw)); }
protected abstract validate(raw: string): void;
protected abstract parse(raw: string): Foo;
}
```

### Observer Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: recommended
- Scope: event notification, runtime
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Subject/Subscriber Contract](https://banes-lab.com/records/lex/subject-subscriber-contract.md)

Reinforces
[Event-Driven Architecture](https://banes-lab.com/records/arch/event-driven-architecture.md)

Enables
[Decoupled Notification](https://banes-lab.com/records/lex/decoupled-notification.md)

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

Conflicts with
[Direct Callback Coupling](https://banes-lab.com/records/lex/direct-callback-coupling.md)

Tensions
[Observer Pattern Ordering](https://banes-lab.com/records/tension/observer-pattern-ordering.md), [Observer Pattern Debuggability](https://banes-lab.com/records/tension/debuggability-observer-pattern.md)

Violated by
hardcoded notification targets

Detected by
direct calls to multiple listeners

Measured by
subscriber coupling count

Refactored by
Introduce Observer/Event Publisher

Enforced by
event contract tests

Before

```typescript
class FooEditor {
save(foo: Foo) {
fooStore.save(foo);
refreshFooView(foo);
sendFooEmail(foo);
}
}
```

After

```typescript
class FooEvents {
#listeners = new Set<(event: FooEvent) => void>();
subscribe(listener: (event: FooEvent) => void) { this.#listeners.add(listener); }
publish(event: FooEvent) { this.#listeners.forEach(listener => listener(event)); }
}
class FooEditor {
constructor(private readonly events: FooEvents) {}
save(foo: Foo) {
fooStore.save(foo);
this.events.publish({ type: "FooSaved", foo });
}
}
fooEvents.subscribe(event => refreshFooView(event.foo));
fooEvents.subscribe(event => sendFooEmail(event.foo));
```

### Mediator Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: object coordination, module
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Coordination Complexity](https://banes-lab.com/records/lex/coordination-complexity.md)

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

Enables
[Centralized Interaction Logic](https://banes-lab.com/records/lex/centralized-interaction-logic.md)

In tension with
[Mediator God Object](https://banes-lab.com/records/lex/mediator-god-object.md)

Conflicts with
[Mesh Dependencies](https://banes-lab.com/records/lex/mesh-dependencies.md)

Tensions
[Mediator Pattern Mediator God Object](https://banes-lab.com/records/tension/mediator-god-object-mediator-pattern.md)

Violated by
many-to-many object dependencies

Detected by
dense object dependency graph

Measured by
interaction graph density

Refactored by
Introduce Mediator

Enforced by
dependency graph checks

Before

```typescript
fooEditor.notify(fooList, fooDetails, fooToolbar, foo);
fooList.update(fooDetails, fooToolbar, foo);
```

After

```typescript
class FooMediator {
constructor(private readonly list: FooList, private readonly details: FooDetails) {}
handle(event: FooEvent) {
this.list.apply(event);
this.details.apply(event);
}
}
```

### Command Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: recommended
- Scope: behavior, invocation, workflow
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Encapsulation](https://banes-lab.com/records/arch/encapsulation.md)

Reinforces
[Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md), [Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md)

Enables
[Undo/Redo](https://banes-lab.com/records/lex/undo-redo.md), [Deferred Execution](https://banes-lab.com/records/lex/deferred-execution.md), [Request Queuing](https://banes-lab.com/records/lex/request-queuing.md)

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

Conflicts with
[Direct Method Invocation](https://banes-lab.com/records/lex/direct-method-invocation.md)

Tensions
[Command Pattern Simplicity](https://banes-lab.com/records/tension/command-pattern-simplicity.md)

Violated by
inline conditional dispatch on an action name

Detected by
switch/if chains selecting an operation to run

Measured by
dispatch-branch count per action site

Refactored by
Encapsulate Invocation as a Command object

Enforced by
[design review](https://banes-lab.com/records/arch/design-review.md)

Before

```typescript
button.onClick = () => fooEditor.delete(foo.id);
```

After

```typescript
interface FooCommand { execute(): void; undo(): void; }
class DeleteFooCommand implements FooCommand {
constructor(private readonly id: FooId) {}
execute() { fooStore.delete(this.id); }
undo() { fooStore.restore(this.id); }
}
history.run(new DeleteFooCommand(foo.id));
```

### State Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: recommended
- Scope: behavior, state machine, lifecycle
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Explicit State Model](https://banes-lab.com/records/lex/explicit-state-model.md)

Reinforces
[Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md), [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)

Enables
[State-Local Behavior](https://banes-lab.com/records/lex/state-local-behavior.md), [Legal-Transition Enforcement](https://banes-lab.com/records/lex/legal-transition-enforcement.md)

In tension with
[Class Proliferation](https://banes-lab.com/records/lex/class-proliferation.md)

Conflicts with
[Boolean Flag Soup](https://banes-lab.com/records/lex/boolean-flag-soup.md)

Referenced by
[Finite State Machine](https://banes-lab.com/records/arch/finite-state-machine.md)

Tensions
[State Pattern Class Proliferation](https://banes-lab.com/records/tension/class-proliferation-state-pattern.md)

Violated by
behavior branched on scattered status flags

Detected by
repeated conditionals on a status field

Measured by
status-conditional density

Refactored by
Replace State-Conditional with State objects

Enforced by
[design review](https://banes-lab.com/records/arch/design-review.md)

Before

```typescript
function handleFoo(foo: Foo, event: string) {
if (foo.status === "draft" && event === "submit") foo.status = "review";
if (foo.status === "review" && event === "approve") foo.status = "published";
}
```

After

```typescript
interface FooState { submit(): FooState; approve(): FooState; }
const published: FooState = { submit: () => published, approve: () => published };
const review: FooState = { submit: () => review, approve: () => published };
const draft: FooState = { submit: () => review, approve: () => draft };
class Foo {
constructor(private state: FooState = draft) {}
submit() { this.state = this.state.submit(); }
approve() { this.state = this.state.approve(); }
}
```

### Chain of Responsibility Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: recommended
- Scope: behavior, request handling, pipeline
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Uniform Handler Interface](https://banes-lab.com/records/lex/uniform-handler-interface.md)

Reinforces
[Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md), [Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md)

Enables
[Pluggable Handling](https://banes-lab.com/records/lex/pluggable-handling.md), [Ordered Fallthrough](https://banes-lab.com/records/lex/ordered-fallthrough.md)

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

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

Tensions
[Chain of Responsibility Pattern Traceability](https://banes-lab.com/records/tension/chain-of-responsibility-pattern-traceability.md)

Violated by
one handler with nested conditionals for every case

Detected by
long if/else ladders handling heterogeneous requests

Measured by
handler cyclomatic complexity

Refactored by
Extract Handler Chain

Enforced by
[design review](https://banes-lab.com/records/arch/design-review.md)

Before

```typescript
function handleFoo(request: FooRequest) {
if (request.size > MAX_SIZE) return reject(request);
if (!request.authorized) return deny(request);
return process(request);
}
```

After

```typescript
type FooHandler = (request: FooRequest, next: () => FooResult) => FooResult;
const enforceSize: FooHandler = (request, next) => request.size > MAX_SIZE ? reject(request) : next();
const enforceAuth: FooHandler = (request, next) => request.authorized ? next() : deny(request);
const chain = composeHandlers([enforceSize, enforceAuth, () => process(request)]);
chain(request);
```

### Iterator Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: behavior, traversal, collection
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Uniform Traversal Interface](https://banes-lab.com/records/lex/uniform-traversal-interface.md)

Reinforces
[Encapsulation](https://banes-lab.com/records/arch/encapsulation.md), [Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md)

Enables
[Structure-Agnostic Iteration](https://banes-lab.com/records/lex/structure-agnostic-iteration.md), [Lazy Traversal](https://banes-lab.com/records/lex/lazy-traversal.md)

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

Conflicts with
[Exposed Internal Representation](https://banes-lab.com/records/lex/exposed-internal-representation.md)

Tensions
[Iterator Pattern Simplicity](https://banes-lab.com/records/tension/iterator-pattern-simplicity.md)

Violated by
callers walking a structure's internal fields directly

Detected by
index/pointer traversal of another type's internals

Measured by
internal-structure access count

Refactored by
Introduce Iterator

Enforced by
[design review](https://banes-lab.com/records/arch/design-review.md)

Before

```typescript
for (let i = 0; i < fooTree.nodes.length; i += 1) visit(fooTree.nodes[i]);
```

After

```typescript
class FooTree {
#roots: FooNode[] = [];
*[Symbol.iterator](): Iterator<Foo> {
for (const node of this.#roots) yield* this.walk(node);
}
}
for (const foo of fooTree) visit(foo);
```

### Visitor Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: behavior, operation, type hierarchy
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Stable Element Hierarchy](https://banes-lab.com/records/lex/stable-element-hierarchy.md)

Reinforces
[Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md), [Separation of Concerns](https://banes-lab.com/records/arch/separation-of-concerns.md)

Enables
[Operation Extension Without Element Change](https://banes-lab.com/records/lex/operation-extension-without-element-change.md)

In tension with
[Element Stability](https://banes-lab.com/records/lex/element-stability.md)

Conflicts with
[Type-Switch Dispatch](https://banes-lab.com/records/lex/type-switch-dispatch.md)

Tensions
[Visitor Pattern Element Stability](https://banes-lab.com/records/tension/element-stability-visitor-pattern.md)

Violated by
operations added by editing every element type

Detected by
type-tag switches repeated per operation

Measured by
type-switch duplication across operations

Refactored by
Introduce Visitor

Enforced by
[design review](https://banes-lab.com/records/arch/design-review.md)

Before

```typescript
function renderFoo(node: FooNode) {
if (node.kind === "text") return node.value;
if (node.kind === "group") return node.children.map(renderFoo).join("");
}
```

After

```typescript
interface FooVisitor<T> { text(node: TextNode): T; group(node: GroupNode): T; }
class RenderFooVisitor implements FooVisitor<string> {
text(node: TextNode) { return node.value; }
group(node: GroupNode) { return node.children.map(child => child.accept(this)).join(""); }
}
```

### Memento Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: behavior, state capture, history
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Encapsulation](https://banes-lab.com/records/arch/encapsulation.md)

Reinforces
[Information Hiding](https://banes-lab.com/records/arch/information-hiding.md)

Enables
[Undo/Redo](https://banes-lab.com/records/lex/undo-redo.md), [Snapshot/Restore](https://banes-lab.com/records/lex/snapshot-restore.md)

In tension with
[Memory Footprint](https://banes-lab.com/records/lex/memory-footprint.md)

Conflicts with
[External State Reach-In](https://banes-lab.com/records/lex/external-state-reach-in.md)

Tensions
[Memento Pattern Memory Footprint](https://banes-lab.com/records/tension/memento-pattern-memory-footprint.md)

Violated by
callers copying an object's private fields to save state

Detected by
external code reconstructing internal state

Measured by
private-field external access count

Refactored by
Capture State as a Memento

Enforced by
[design review](https://banes-lab.com/records/arch/design-review.md)

Before

```typescript
const backupName = foo.name;
const backupTags = [...foo.tags];
foo.rename(newName);
if (cancelled) { foo.name = backupName; foo.tags = backupTags; }
```

After

```typescript
class FooMemento { constructor(readonly snapshot: Readonly<Foo>) {} }
const memento = foo.save();
foo.rename(newName);
if (cancelled) foo.restore(memento);
```

### Null Object Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: behavior, absence, default
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Shared Behavioral Interface](https://banes-lab.com/records/lex/shared-behavioral-interface.md)

Reinforces
[Polymorphism](https://banes-lab.com/records/arch/polymorphism.md), [Fail-Safe Defaults](https://banes-lab.com/records/lex/fail-safe-defaults.md)

Enables
[Null-Check Elimination](https://banes-lab.com/records/lex/null-check-elimination.md)

In tension with
[Silent No-Op Risk](https://banes-lab.com/records/lex/silent-no-op-risk.md)

Conflicts with
[Null Semantics Drift](https://banes-lab.com/records/arch/null-semantics-drift.md)

Tensions
[Null Object Pattern Silent No-Op Risk](https://banes-lab.com/records/tension/null-object-pattern-silent-no-op-risk.md)

Violated by
null-guards scattered across every call site

Detected by
repeated null checks before the same operation

Measured by
null-guard density

Refactored by
Introduce Null Object

Enforced by
[design review](https://banes-lab.com/records/arch/design-review.md)

Before

```typescript
const logger = config.logger;
if (logger) logger.info("foo saved");
```

After

```typescript
interface FooLogger { info(message: string): void; }
const NoopFooLogger: FooLogger = { info() {} };
const logger = config.logger ?? NoopFooLogger;
logger.info("foo saved");
```

### Finite State Machine

- Kind: [model](https://banes-lab.com/records/kind/model.md)
- Severity: recommended
- Scope: behavior, state modeling, control flow
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Explicit State Set](https://banes-lab.com/records/lex/explicit-state-set.md)

Reinforces
[State Pattern](https://banes-lab.com/records/arch/state-pattern.md), [Correctness](https://banes-lab.com/records/arch/correctness.md)

Enables
[Legal-Transition Enforcement](https://banes-lab.com/records/lex/legal-transition-enforcement.md), [Exhaustive State Reasoning](https://banes-lab.com/records/lex/exhaustive-state-reasoning.md)

In tension with
[State Explosion](https://banes-lab.com/records/lex/state-explosion.md)

Conflicts with
[Boolean Flag Soup](https://banes-lab.com/records/lex/boolean-flag-soup.md)

Referenced by
[Statecharts](https://banes-lab.com/records/arch/statecharts.md)

Contracts
[Finite State Machine](https://banes-lab.com/records/algo/finite-state-machine.md)

Tensions
[Finite State Machine State Explosion](https://banes-lab.com/records/tension/finite-state-machine-state-explosion.md)

Violated by
behavior driven by ad-hoc combinations of scattered status booleans

Detected by
impossible or contradictory state combinations reachable at runtime

Measured by
count of representable-but-illegal states

Refactored by
Model states and transitions as an explicit FSM

Enforced by
state model review

Before

```typescript
let isOpen = false, isLoading = false, isError = false;
function onClick() { isLoading = true; if (isOpen) isOpen = false; }
```

After

```typescript
type FooState = "closed" | "loading" | "open" | "error";
const transitions: Record<FooState, Partial<Record<FooEvent, FooState>>> = {
closed: { open: "loading" },
loading: { ready: "open", fail: "error" },
open: { close: "closed" },
error: { retry: "loading" },
};
function next(state: FooState, event: FooEvent): FooState { return transitions[state][event] ?? state; }
```

### Statecharts

- Kind: [model](https://banes-lab.com/records/kind/model.md)
- Severity: contextual
- Scope: behavior, state modeling, hierarchy
- Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)

Details

Requires
[Finite State Machine](https://banes-lab.com/records/arch/finite-state-machine.md)

Reinforces
[Finite State Machine](https://banes-lab.com/records/arch/finite-state-machine.md), [Separation of Concerns](https://banes-lab.com/records/arch/separation-of-concerns.md)

Enables
[Hierarchical States](https://banes-lab.com/records/lex/hierarchical-states.md), [Parallel Regions](https://banes-lab.com/records/lex/parallel-regions.md), [Guarded Transitions](https://banes-lab.com/records/lex/guarded-transitions.md)

In tension with
[Tooling Complexity](https://banes-lab.com/records/lex/tooling-complexity.md)

Conflicts with
[Flat State Explosion](https://banes-lab.com/records/lex/flat-state-explosion.md)

Contracts
[Statecharts](https://banes-lab.com/records/algo/statecharts.md)

Tensions
[Statecharts Tooling Complexity](https://banes-lab.com/records/tension/statecharts-tooling-complexity.md)

Violated by
a flat FSM duplicating shared transitions across many near-identical states

Detected by
combinatorial state growth from independent concerns modeled in one flat machine

Measured by
transition duplication across sibling states

Refactored by
Introduce nested and parallel statechart regions

Enforced by
state model review

Before

```typescript
type S = "idleMuted" | "idleLoud" | "playingMuted" | "playingLoud";
```

After

```typescript
const fooChart = {
initial: "idle",
states: { idle: {}, playing: {} },
parallel: { volume: { states: { muted: {}, loud: {} } } },
};
```

## Links to

- [pattern](https://banes-lab.com/records/kind/pattern.md)
- [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)
- [Interchangeable Algorithms](https://banes-lab.com/records/lex/interchangeable-algorithms.md)
- [Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md)
- [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)
- [Runtime Behavior Selection](https://banes-lab.com/records/lex/runtime-behavior-selection.md)
- [Class Count](https://banes-lab.com/records/lex/class-count.md)
- [Large Conditional Logic](https://banes-lab.com/records/lex/large-conditional-logic.md)
- [Composition Over Inheritance](https://banes-lab.com/records/arch/composition-over-inheritance.md)
- [Strategy Pattern / Class Count](https://banes-lab.com/records/tension/class-count-strategy-pattern.md)
- [Review](https://banes-lab.com/records/lex/review.md)
- [Stable Algorithm Skeleton](https://banes-lab.com/records/lex/stable-algorithm-skeleton.md)
- [Framework Reuse](https://banes-lab.com/records/lex/framework-reuse.md)
- [Controlled Variation](https://banes-lab.com/records/lex/controlled-variation.md)
- [Inheritance Coupling](https://banes-lab.com/records/lex/inheritance-coupling.md)
- [Duplicated Workflow](https://banes-lab.com/records/lex/duplicated-workflow.md)
- [Template Method Pattern / Inheritance Coupling](https://banes-lab.com/records/tension/inheritance-coupling-template-method-pattern.md)
- [Design Review](https://banes-lab.com/records/arch/design-review.md)
- [Subject/Subscriber Contract](https://banes-lab.com/records/lex/subject-subscriber-contract.md)
- [Event-Driven Architecture](https://banes-lab.com/records/arch/event-driven-architecture.md)
- [Decoupled Notification](https://banes-lab.com/records/lex/decoupled-notification.md)
- [Ordering](https://banes-lab.com/records/lex/ordering.md)
- [Debuggability](https://banes-lab.com/records/lex/debuggability.md)
- [Direct Callback Coupling](https://banes-lab.com/records/lex/direct-callback-coupling.md)
- [Observer Pattern / Ordering](https://banes-lab.com/records/tension/observer-pattern-ordering.md)
- [Observer Pattern / Debuggability](https://banes-lab.com/records/tension/debuggability-observer-pattern.md)
- [Coordination Complexity](https://banes-lab.com/records/lex/coordination-complexity.md)
- [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md)
- [Centralized Interaction Logic](https://banes-lab.com/records/lex/centralized-interaction-logic.md)
- [Mediator God Object](https://banes-lab.com/records/lex/mediator-god-object.md)
- [Mesh Dependencies](https://banes-lab.com/records/lex/mesh-dependencies.md)
- [Mediator Pattern / Mediator God Object](https://banes-lab.com/records/tension/mediator-god-object-mediator-pattern.md)
- [Encapsulation](https://banes-lab.com/records/arch/encapsulation.md)
- [Single Responsibility Principle (SRP)](https://banes-lab.com/records/arch/single-responsibility.md)
- [Undo/Redo](https://banes-lab.com/records/lex/undo-redo.md)
- [Deferred Execution](https://banes-lab.com/records/lex/deferred-execution.md)
- [Request Queuing](https://banes-lab.com/records/lex/request-queuing.md)
- [Simplicity](https://banes-lab.com/records/lex/simplicity.md)
- [Direct Method Invocation](https://banes-lab.com/records/lex/direct-method-invocation.md)
- [Command Pattern / Simplicity](https://banes-lab.com/records/tension/command-pattern-simplicity.md)
- [Explicit State Model](https://banes-lab.com/records/lex/explicit-state-model.md)
- [State-Local Behavior](https://banes-lab.com/records/lex/state-local-behavior.md)
- [Legal-Transition Enforcement](https://banes-lab.com/records/lex/legal-transition-enforcement.md)
- [Class Proliferation](https://banes-lab.com/records/lex/class-proliferation.md)
- [Boolean Flag Soup](https://banes-lab.com/records/lex/boolean-flag-soup.md)
- [Finite State Machine](https://banes-lab.com/records/arch/finite-state-machine.md)
- [State Pattern / Class Proliferation](https://banes-lab.com/records/tension/class-proliferation-state-pattern.md)
- [Uniform Handler Interface](https://banes-lab.com/records/lex/uniform-handler-interface.md)
- [Pluggable Handling](https://banes-lab.com/records/lex/pluggable-handling.md)
- [Ordered Fallthrough](https://banes-lab.com/records/lex/ordered-fallthrough.md)
- [Traceability](https://banes-lab.com/records/arch/traceability.md)
- [Monolithic Handler](https://banes-lab.com/records/lex/monolithic-handler.md)
- [Chain of Responsibility Pattern / Traceability](https://banes-lab.com/records/tension/chain-of-responsibility-pattern-traceability.md)
- [Uniform Traversal Interface](https://banes-lab.com/records/lex/uniform-traversal-interface.md)
- [Structure-Agnostic Iteration](https://banes-lab.com/records/lex/structure-agnostic-iteration.md)
- [Lazy Traversal](https://banes-lab.com/records/lex/lazy-traversal.md)
- [Exposed Internal Representation](https://banes-lab.com/records/lex/exposed-internal-representation.md)
- [Iterator Pattern / Simplicity](https://banes-lab.com/records/tension/iterator-pattern-simplicity.md)
- [Stable Element Hierarchy](https://banes-lab.com/records/lex/stable-element-hierarchy.md)
- [Separation of Concerns](https://banes-lab.com/records/arch/separation-of-concerns.md)
- [Operation Extension Without Element Change](https://banes-lab.com/records/lex/operation-extension-without-element-change.md)
- [Element Stability](https://banes-lab.com/records/lex/element-stability.md)
- [Type-Switch Dispatch](https://banes-lab.com/records/lex/type-switch-dispatch.md)
- [Visitor Pattern / Element Stability](https://banes-lab.com/records/tension/element-stability-visitor-pattern.md)
- [Information Hiding](https://banes-lab.com/records/arch/information-hiding.md)
- [Snapshot/Restore](https://banes-lab.com/records/lex/snapshot-restore.md)
- [Memory Footprint](https://banes-lab.com/records/lex/memory-footprint.md)
- [External State Reach-In](https://banes-lab.com/records/lex/external-state-reach-in.md)
- [Memento Pattern / Memory Footprint](https://banes-lab.com/records/tension/memento-pattern-memory-footprint.md)
- [Shared Behavioral Interface](https://banes-lab.com/records/lex/shared-behavioral-interface.md)
- [Fail-Safe Defaults](https://banes-lab.com/records/lex/fail-safe-defaults.md)
- [Null-Check Elimination](https://banes-lab.com/records/lex/null-check-elimination.md)
- [Silent No-Op Risk](https://banes-lab.com/records/lex/silent-no-op-risk.md)
- [Null Semantics Drift](https://banes-lab.com/records/arch/null-semantics-drift.md)
- [Null Object Pattern / Silent No-Op Risk](https://banes-lab.com/records/tension/null-object-pattern-silent-no-op-risk.md)
- [model](https://banes-lab.com/records/kind/model.md)
- [Explicit State Set](https://banes-lab.com/records/lex/explicit-state-set.md)
- [State Pattern](https://banes-lab.com/records/arch/state-pattern.md)
- [Correctness](https://banes-lab.com/records/arch/correctness.md)
- [Exhaustive State Reasoning](https://banes-lab.com/records/lex/exhaustive-state-reasoning.md)
- [State Explosion](https://banes-lab.com/records/lex/state-explosion.md)
- [Statecharts](https://banes-lab.com/records/arch/statecharts.md)
- [Finite State Machine](https://banes-lab.com/records/algo/finite-state-machine.md)
- [Finite State Machine / State Explosion](https://banes-lab.com/records/tension/finite-state-machine-state-explosion.md)
- [Hierarchical States](https://banes-lab.com/records/lex/hierarchical-states.md)
- [Parallel Regions](https://banes-lab.com/records/lex/parallel-regions.md)
- [Guarded Transitions](https://banes-lab.com/records/lex/guarded-transitions.md)
- [Tooling Complexity](https://banes-lab.com/records/lex/tooling-complexity.md)
- [Flat State Explosion](https://banes-lab.com/records/lex/flat-state-explosion.md)
- [Statecharts](https://banes-lab.com/records/algo/statecharts.md)
- [Statecharts / Tooling Complexity](https://banes-lab.com/records/tension/statecharts-tooling-complexity.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)
