# arch-relationships

> Every algorithm contract in this domain is listed with its position on the derivation loop, its intent and invariant, the flow it walks, its productions as a…

Page: Ontology · Algorithms
Canonical: https://banes-lab.com/ontology/algorithms#algo-domain-arch-relationships

Every algorithm contract in this domain is listed with its position on the derivation loop, its intent and invariant, the flow it walks, its productions as a grammar, what it composes and is composed by, which forces and principles it answers to, what grounds it and what it grounds, and an exemplar where the record carries one. The diagram shows what composes what inside the domain.

Relations diagram

What composes what inside this domain.

```mermaid
flowchart LR
n_architectural_relationship_record["Architectural Relationship Record"]
n_architecture_knowledge_graph["Architecture Knowledge Graph"]
n_architectural_force_classification["Architectural Force Classification"]
n_dependency_closure["Dependency Closure"]
n_reinforcement_propagation["Reinforcement Propagation"]
n_conflict_and_tension_resolution["Conflict and Tension Resolution"]
n_severity_policy["Severity Policy"]
n_violation_detection["Violation Detection"]
n_measurement_normalization["Measurement Normalization"]
n_refactor_selection["Refactor Selection"]
n_enforcement_gate["Enforcement Gate"]
n_architecture_assessment["Architecture Assessment"]
n_modular_boundary_compliance["Modular Boundary Compliance"]
n_contract_compatibility["Contract Compatibility"]
n_canonical_semantics["Canonical Semantics"]
n_domain_boundary_governance["Domain Boundary Governance"]
n_self_description_and_discovery["Self-Description and Discovery"]
n_runtime_extensibility["Runtime Extensibility"]
n_pattern_selection["Pattern Selection"]
n_architectural_style_selection["Architectural Style Selection"]
n_event_and_messaging_consistency["Event and Messaging Consistency"]
n_state_and_transaction_safety["State and Transaction Safety"]
n_correctness_verification["Correctness Verification"]
n_resilience_policy["Resilience Policy"]
n_observability_and_auditability["Observability and Auditability"]
n_causality_and_ordering["Causality and Ordering"]
n_performance_and_scalability["Performance and Scalability"]
n_portability_and_deployment_environment["Portability and Deployment Environment"]
n_security_governance["Security Governance"]
n_architecture_evolution_governance["Architecture Evolution Governance"]
n_control_plane_coordination["Control Plane Coordination"]
n_metaprogramming_safety["Metaprogramming Safety"]
n_streaming_dataflow["Streaming Dataflow"]
n_model_lifecycle_governance["Model Architecture Governance"]
n_architectural_recommendation["Architectural Recommendation"]
n_architecture_fitness_function_generation["Architecture Fitness Function Generation"]
n_architecture_refactoring_roadmap["Architecture Refactoring Roadmap"]
n_concept_cluster_extraction["Concept Cluster Extraction"]
n_architecture_decision_support["Architecture Decision Support"]
n_relationship_schema_validation["Relationship Schema Validation"]
n_architecture_catalog_compiler["Architecture Catalog Compiler"]
n_master_architecture_governance_kernel["Master Architecture Governance Kernel"]
n_architectural_relationship_algebra["Architectural Relationship Algebra"]
n_architecture_assessment --> n_dependency_closure
n_architecture_assessment --> n_violation_detection
n_architecture_assessment --> n_measurement_normalization
n_architectural_recommendation --> n_dependency_closure
n_architecture_fitness_function_generation --> n_architectural_relationship_record
n_architecture_fitness_function_generation --> n_enforcement_gate
n_architecture_fitness_function_generation --> n_severity_policy
n_master_architecture_governance_kernel --> n_relationship_schema_validation
n_master_architecture_governance_kernel --> n_concept_cluster_extraction
n_master_architecture_governance_kernel --> n_dependency_closure
n_master_architecture_governance_kernel --> n_violation_detection
n_master_architecture_governance_kernel --> n_measurement_normalization
n_master_architecture_governance_kernel --> n_refactor_selection
n_master_architecture_governance_kernel --> n_enforcement_gate
n_master_architecture_governance_kernel --> n_architecture_decision_support
n_architectural_relationship_algebra --> n_dependency_closure
n_architectural_relationship_algebra --> n_violation_detection
n_architectural_relationship_algebra --> n_measurement_normalization
n_architectural_relationship_algebra --> n_refactor_selection
n_architectural_relationship_algebra --> n_enforcement_gate
n_architectural_relationship_algebra --> n_architecture_evolution_governance
```

### Architectural Relationship Record

- Math type: [graph](https://banes-lab.com/records/reason/math-type-graph.md)
- Yields: edge-list

Details

Intent
Represent every architectural concept as a typed relationship record containing scope, dependencies, reinforcing effects, enabled capabilities, conflicts, tensions, violations, detection signals, metrics, refactor actions, enforcement mechanisms, and severity.

Invariant
An architecture principle becomes operational when it is converted from a name into a measurable, enforceable relationship contract.

Flow

```text
Concept → Type → Scope → Requires → Violations → Detection → Measurement → Refactor → Enforcement → Severity
```

Productions

```bnf
ArchitecturalRelationshipRecord ::= <ConceptName> ":" <RecordType> "," <ScopeSet> "," <RequiresSet> "," <ReinforcesSet> "," <EnablesSet> "," <ConflictSet> "," <TensionSet> "," <ViolationSet> "," <DetectionSet> "," <MetricSet> "," <RefactorSet> "," <EnforcementSet> "," <EnforcementSeverity>
RecordType ::= "Principle" | "Quality Attribute" | "Contract" | "Architecture Style" | "Pattern" | "Mechanism" | "Metric" | "Practice"
EnforcementSeverity ::= "mandatory" | "recommended" | "contextual" | "discouraged" | "mandatory_for_context"
```

Composes
none

Composed by
[Architecture Fitness Function Generation](https://banes-lab.com/records/algo/architecture-fitness-function-generation.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md)

Grounds
none

Before

```text
'Low Coupling' as a bare name in a list — not measurable, not enforceable.
```

After

```text
Low Coupling : Quality-Attribute, scope{module}, requires{Abstraction}, conflicts_with{Tight Coupling}, detected_by{cycle scan}, measured_by{coupling metric}, refactored_by{invert dependency}, enforced_by{dependency rule}, severity{mandatory}
```

### Architecture Knowledge Graph

- Math type: [graph](https://banes-lab.com/records/reason/math-type-graph.md)
- Yields: edge-list

Details

Intent
Parse all relationship records into a directed multigraph where concepts are nodes and fields such as requires, reinforces, enables, conflicts, tensions, detects, measures, refactors, and enforces are typed edges.

Invariant
The architecture catalog becomes reusable when its relationships can be traversed as a graph.

Flow

```text
Records → Nodes → TypedEdges → Graph → QueryableArchitectureModel
```

Productions

```bnf
ArchitectureGraph ::= <ConceptNodeSet> "," <RelationshipEdgeSet>
ConceptNode ::= <ConceptName> "," <RecordType> "," <ScopeSet> "," <EnforcementSeverity>
RelationshipEdge ::= <SourceConcept> "->" <RelationType> "->" <TargetConceptOrSignal>
RelationType ::= "requires" | "reinforces" | "enables" | "conflicts_with" | "tensions_with" | "violated_by" | "detected_by" | "measured_by" | "refactored_by" | "enforced_by"
```

Composes
none

Forces
[architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
A flat list of relationship records — no way to ask 'what does Foo require, transitively?'
```

After

```text
records → nodes{concepts} + typed-edges{requires, reinforces, enables, conflicts_with} → traversable graph
```

### Architectural Force Classification

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Given a design issue or desired quality, classify it into a force family, then select all concepts whose scope, type, violation signals, and enabled capabilities match that force.

Invariant
Architectural decisions should be selected by force and evidence, not by pattern name recognition.

Flow

```text
Issue → ForceFamily → CandidateConcepts → ApplicableContracts
```

Productions

```bnf
ForceClassification ::= <DesignIssue> "->" <ForceFamily> "->" <ConceptQuery> "->" <ApplicableConceptSet>
ForceFamily ::= "modularity" | "contract_compatibility" | "semantic_consistency" | "domain_boundary" | "runtime_extensibility" | "object_creation" | "structural_mediation" | "behavioral_variation" | "event_messaging" | "state_transaction" | "correctness_verification" | "resilience_recovery" | "observability_traceability" | "causality_ordering" | "performance_scaling" | "security_governance" | "architecture_evolution" | "control_coordination" | "metaprogramming_modeling" | "streaming_dataflow" | "model_governance"
```

Composes
none

Forces
[architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
A design issue answered by pattern-name recall ('use a Factory').
```

After

```text
issue{concrete constructor everywhere} → force{object_creation} → concept-query → applicable{Construction Boundary}
```

### Dependency Closure

- Math type: [graph](https://banes-lab.com/records/reason/math-type-graph.md)
- Yields: edge-list

Details

Intent
For any target architectural concept, recursively collect its required concepts until no new requirements remain, then order the closure by dependency depth before implementation.

Invariant
A principle cannot be adopted safely unless its prerequisites are also satisfied.

Flow

```text
TargetConcept → RequiresEdges → TransitiveClosure → DependencyOrder
```

Productions

```bnf
DependencyClosure ::= <TargetConcept> "->" <RequiresTraversal> "->" <RequiredConceptSet> "->" <TopologicalOrder>
RequiresTraversal ::= "follow requires edges until fixed point"
TopologicalOrder ::= "prerequisites_before_dependents"
```

Composes
none

Composed by
[Architecture Assessment](https://banes-lab.com/records/algo/architecture-assessment.md), [Architectural Recommendation](https://banes-lab.com/records/algo/architectural-recommendation.md), [Master Architecture Governance Kernel](https://banes-lab.com/records/algo/master-architecture-governance-kernel.md), [Architectural Relationship Algebra](https://banes-lab.com/records/algo/architectural-relationship-algebra.md)

Forces
[architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
Adopt Foo without checking what Foo needs — its prerequisites are silently unmet.
```

After

```text
target{Foo} → follow requires-edges to fixed point → {Bar, Baz} → topological order{Baz, Bar, Foo}
```

### Reinforcement Propagation

- Math type: [graph](https://banes-lab.com/records/reason/math-type-graph.md)
- Yields: edge-list

Details

Intent
When a concept is implemented or strengthened, traverse its reinforces and enables edges to identify secondary quality gains and architecture capabilities unlocked.

Invariant
Architecture improvements produce second-order effects through reinforcing relationships.

Flow

```text
ImplementedConcept → Reinforces + Enables → CapabilityImpact
```

Productions

```bnf
ReinforcementPropagation ::= <SatisfiedConcept> "->" <ReinforcesTraversal> "->" <EnablesTraversal> "->" <ImpactSet>
ImpactSet ::= <QualityGainSet> "," <CapabilityGainSet>
QualityGain ::= <ReinforcedConcept> "," <Confidence> "," <EvidenceRequired>
```

Composes
none

Forces
[architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
Foo implemented; its second-order gains go unnoticed and unclaimed.
```

After

```text
satisfied{Foo} → reinforces → {Bar quality} → enables → {Baz capability} → impact set with confidence
```

### Conflict and Tension Resolution

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
For each selected concept, collect conflicts and tensions, classify conflicts as prohibitive or resolvable, classify tensions as trade-offs, and require an explicit decision when severity or impact is high.

Invariant
Architecture is not only principle application; it is trade-off governance.

Flow

```text
CandidateConcept → Conflicts + Tensions → TradeoffAnalysis → Decision
```

Productions

```bnf
ConflictTensionResolution ::= <CandidateConceptSet> "->" <ConflictSet> "->" <TensionSet> "->" <ResolutionPolicy>
ResolutionPolicy ::= "reject_combination" | "accept_with_mitigation" | "document_tradeoff" | "require_architecture_decision" | "contextual_override"
```

Composes
none

Forces
[security_governance](https://banes-lab.com/records/force/security-governance.md)

Grounds
none

Before

```text
Two chosen concepts silently conflict at runtime; the developer never decided the trade-off.
```

After

```text
candidates{Foo, Bar} → conflict{prohibitive} → tension{trade-off} → policy{require architecture decision}
```

### Severity Policy

- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
Interpret severity as an enforcement policy: mandatory concepts become gates, recommended concepts become review findings, contextual concepts require scope justification, and discouraged concepts require explicit exception approval.

Invariant
Severity converts architecture knowledge into governance behavior.

Flow

```text
Severity → EnforcementMode → GateBehavior
```

Productions

```bnf
SeverityPolicy ::= <EnforcementSeverity> "->" <EnforcementMode>
EnforcementMode ::= "blocking_gate" | "review_warning" | "context_required" | "exception_required" | "informational"
SeverityMapping ::= "mandatory → blocking_gate" | "recommended → review_warning" | "contextual → context_required" | "discouraged → exception_required"
```

Composes
none

Composed by
[Anti-Pattern Rule Compiler](https://banes-lab.com/records/algo/anti-pattern-rule-compiler.md), [Architecture Fitness Function Generation](https://banes-lab.com/records/algo/architecture-fitness-function-generation.md)

Forces
[security_governance](https://banes-lab.com/records/force/security-governance.md)

Grounds
none

Before

```text
Every finding treated the same — a style nit blocks like a critical flaw.
```

After

```text
severity{mandatory} → blocking-gate ; severity{recommended} → review-warning ; severity{contextual} → context-required
```

### Violation Detection

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
For each concept applicable to the current scope, execute its detected_by signals against the implementation, map observations to violated_by patterns, and produce evidence-backed violation records.

Invariant
A principle violation must be grounded in observable implementation signals.

Flow

```text
ApplicableConcept → DetectionSignals → Observations → ViolationRecords
```

Productions

```bnf
ViolationDetection ::= <ApplicableConceptSet> "->" <DetectionSignalSet> "->" <ObservedEvidenceSet> "->" <ViolationRecordSet>
ViolationRecord ::= <Concept> "," <ViolationPattern> "," <EvidenceLocationSet> "," <MetricValueSet> "," <EnforcementSeverity> "," <RecommendedRefactorSet>
```

Composes
none

Composed by
[Architecture Assessment](https://banes-lab.com/records/algo/architecture-assessment.md), [Master Architecture Governance Kernel](https://banes-lab.com/records/algo/master-architecture-governance-kernel.md), [Architectural Relationship Algebra](https://banes-lab.com/records/algo/architectural-relationship-algebra.md)

Forces
[observability_traceability](https://banes-lab.com/records/force/observability-traceability.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
'Foo is violated' asserted from opinion, with no observable signal.
```

After

```text
concept{Foo} → detected_by signals run on code → observations → violation-record{concept, pattern, evidence, severity}
```

### Measurement Normalization

- Math type: [analysis](https://banes-lab.com/records/reason/axis-analysis.md)
- Yields: operation

Details

Intent
Convert each concept’s measured_by field into executable or reviewable metrics, collect metric values, normalize them to comparable scores, and attach confidence based on measurement quality.

Invariant
Architectural assessment requires metrics with provenance, not free-form judgment.

Flow

```text
MeasuredBy → MetricDefinition → Measurement → NormalizedScore → Confidence
```

Productions

```bnf
MeasurementNormalization ::= <MetricDescriptorSet> "->" <MetricDefinitionSet> "->" <MetricValueSet> "->" <NormalizedScoreSet>
MetricDefinition ::= <MetricName> "," <Scope> "," <CollectionMethod> "," <ThresholdPolicy> "," <ConfidencePolicy>
```

Composes
none

Composed by
[Architecture Assessment](https://banes-lab.com/records/algo/architecture-assessment.md), [Master Architecture Governance Kernel](https://banes-lab.com/records/algo/master-architecture-governance-kernel.md), [Architectural Relationship Algebra](https://banes-lab.com/records/algo/architectural-relationship-algebra.md)

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md)

Grounds
none

Before

```text
Architecture judged by free-form opinion, no comparable numbers.
```

After

```text
measured_by{coupling} → metric-definition{scope, method, threshold} → values → normalized score + confidence
```

### Refactor Selection

- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
Given a violation record, select refactor actions from the concept’s refactored_by field, rank actions by severity, dependency closure, blast radius, and expected reinforcement gain.

Invariant
Refactoring should be selected from the violated concept’s remediation contract.

Flow

```text
Violation → RefactorCandidates → RiskRank → SelectedPlan
```

Productions

```bnf
RefactorSelection ::= <ViolationRecord> "->" <RefactorActionSet> "->" <RefactorRanking> "->" <RefactorPlan>
RefactorRanking ::= "severity" "," "required_dependency_count" "," "blast_radius" "," "reinforcement_gain" "," "rollback_feasibility"
```

Composes
none

Composed by
[Master Architecture Governance Kernel](https://banes-lab.com/records/algo/master-architecture-governance-kernel.md), [Architectural Relationship Algebra](https://banes-lab.com/records/algo/architectural-relationship-algebra.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
A fix chosen ad hoc, unrelated to the violated concept's remediation contract.
```

After

```text
violation{Foo} → refactored_by candidates → rank{severity, blast-radius, reinforcement-gain} → refactor plan
```

### Enforcement Gate

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Translate each concept’s enforced_by field into static checks, contract tests, schema validation, CI gates, policy rules, runtime monitors, review gates, or architecture fitness functions.

Invariant
Enforcement converts architectural intent into repeatable control.

Flow

```text
EnforcementDescriptor → GateType → ValidationProcedure → Pass|Fail
```

Productions

```bnf
EnforcementGate ::= <Concept> "->" <EnforcementDescriptorSet> "->" <GateSet> "->" <GateResultSet>
GateType ::= "static_analysis" | "architecture_test" | "schema_validation" | "contract_test" | "lint_rule" | "fitness_function" | "runtime_monitor" | "policy_as_code" | "review_gate"
```

Composes
none

Composed by
[Architecture Fitness Function Generation](https://banes-lab.com/records/algo/architecture-fitness-function-generation.md), [Master Architecture Governance Kernel](https://banes-lab.com/records/algo/master-architecture-governance-kernel.md), [Architectural Relationship Algebra](https://banes-lab.com/records/algo/architectural-relationship-algebra.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
'enforced_by: review' — a reviewer's promise that erodes under deadline.
```

After

```text
enforced_by{Foo} → gate-type{static-analysis | contract-test | fitness-function} → pass/fail in CI
```

### Architecture Assessment

- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
Select concepts relevant to a target scope, compute dependency closure, detect violations, measure evidence, rank findings by severity, and emit a prioritized architecture assessment.

Invariant
Assessment is graph query plus evidence collection plus severity policy.

Flow

```text
Scope → RelevantConcepts → DependencyClosure → Detection → Measurement → Findings
```

Productions

```bnf
ArchitectureAssessment ::= <TargetScope> "->" <RelevantConceptSelection> "->" <DependencyClosure> "->" <ViolationDetection> "->" <MeasurementNormalization> "->" <FindingPrioritization> "->" <AssessmentReport>
FindingPrioritization ::= "mandatory_first" "," "high_blast_radius" "," "high_reinforcement_gain" "," "low_refactor_cost"
```

Composes
[Dependency Closure](https://banes-lab.com/records/algo/dependency-closure.md), [Violation Detection](https://banes-lab.com/records/algo/violation-detection.md), [Measurement Normalization](https://banes-lab.com/records/algo/measurement-normalization.md)

Composed by
[Governance Evolution](https://banes-lab.com/records/algo/governance-evolution.md)

Forces
[architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
'The architecture is fine' — an unscoped, evidence-free claim.
```

After

```text
scope → relevant concepts → dependency-closure → violation-detection → measurement → prioritized findings
```

### Modular Boundary Compliance

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Evaluate SRP, separation of concerns, cohesion, coupling, encapsulation, information hiding, abstraction, modularity, composability, replaceability, and autonomy as a connected boundary cluster.

Invariant
Modular design is not one principle; it is a mutually reinforcing cluster around responsibility, dependency, and visibility.

Flow

```text
Module → Responsibility → Cohesion → Coupling → Visibility → BoundaryHealth
```

Productions

```bnf
ModularBoundaryCompliance ::= <ModuleSet> "->" <ResponsibilityAnalysis> "->" <CohesionMetric> "->" <CouplingMetric> "->" <VisibilityLeakCheck> "->" <BoundaryScore>
BoundaryScore ::= <ResponsibilityScore> "," <CohesionScore> "," <CouplingScore> "," <EncapsulationScore> "," <ReplaceabilityScore>
```

Composes
none

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
Modularity judged as one vague impression.
```

After

```text
modules → responsibility + cohesion + coupling + visibility-leak → boundary score{per-dimension}
```

### Contract Compatibility

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
For APIs, services, data, schemas, and protocols, validate explicit contracts, preconditions, postconditions, invariants, versioning, backward compatibility, forward compatibility, and interoperability.

Invariant
Compatibility is the contract cluster that allows independent evolution.

Flow

```text
Boundary → Contract → Version → CompatibilityMatrix → Gate
```

Productions

```bnf
ContractCompatibility ::= <BoundaryContract> "->" <SchemaOrInterfaceValidation> "->" <SemanticValidation> "->" <VersionPolicy> "->" <CompatibilityMatrix> "->" <CompatibilityVerdict>
CompatibilityMatrix ::= "producer_current_consumer_current" | "producer_new_consumer_old" | "producer_old_consumer_new" | "unknown_field_handling" | "breaking_diff_check"
```

Composes
none

Composed by
[Loop-Owned Mode Selection](https://banes-lab.com/records/algo/loop-owned-mode-selection.md), [<Mode-Driven Response Schema>](https://banes-lab.com/records/algo/mode-driven-response-schema.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
A schema changed and downstreams broke — compatibility was never checked.
```

After

```text
boundary-contract → schema/semantic validation → version-policy → compatibility-matrix{new-producer/old-consumer} → verdict
```

### Canonical Semantics

- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
Detect duplicated or conflicting models, schemas, terms, rules, and data definitions; select or create canonical authority; normalize variants; enforce single source of truth.

Invariant
Semantic consistency requires canonical authority and explicit translation where contexts differ.

Flow

```text
Concepts → Conflicts → CanonicalAuthority → Normalization → Enforcement
```

Productions

```bnf
CanonicalSemantics ::= <SemanticArtifactSet> "->" <ConflictDetection> "->" <CanonicalAuthoritySelection> "->" <NormalizationPolicy> "->" <TranslationBoundary> "->" <GovernanceGate>
SemanticArtifact ::= "schema" | "domain_model" | "field" | "term" | "rule" | "configuration"
```

Composes
none

Composed by
[Composed Turn Contract](https://banes-lab.com/records/algo/composed-turn-contract.md)

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
Three models of 'Foo' drift apart; no single authority.
```

After

```text
artifacts{Foo-a, Foo-b} → conflict-detection → canonical authority → normalize variants → SSOT gate
```

### Domain Boundary Governance

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Identify bounded contexts, ubiquitous language, context relationships, domain model ownership, anti-corruption layers, and explicit boundary rules.

Invariant
Domain architecture preserves meaning through ownership and translation boundaries.

Flow

```text
Domain → Contexts → Language → Ownership → ContextMap → ACL
```

Productions

```bnf
DomainBoundaryGovernance ::= <DomainScope> "->" <BoundedContextSet> "->" <UbiquitousLanguageSet> "->" <OwnershipMap> "->" <ContextMap> "->" <AntiCorruptionBoundarySet>
ContextRelationship ::= "upstream" | "downstream" | "shared_kernel" | "customer_supplier" | "anti_corruption_layer" | "separate_ways"
```

Composes
none

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [security_governance](https://banes-lab.com/records/force/security-governance.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
One shared model spans every context; a change for Foo breaks Bar.
```

After

```text
domain → bounded-contexts → ubiquitous-language → ownership-map → context-map → anti-corruption boundaries
```

### Self-Description and Discovery

- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
Require components, services, APIs, plugins, and runtime structures to declare metadata, capabilities, contracts, dependencies, configuration, and health so they can be discovered and validated.

Invariant
Dynamic architecture requires self-description before runtime binding.

Flow

```text
Component → Manifest → CapabilityDeclaration → Discovery → ContractValidation → Binding
```

Productions

```bnf
SelfDescribingDiscovery ::= <RuntimeEntity> "->" <Manifest> "->" <CapabilityDeclaration> "->" <DiscoveryMechanism> "->" <ConformanceValidation> "->" <BindingDecision>
Manifest ::= "identity" "," "version" "," "capabilities" "," "dependencies" "," "contracts" "," "configuration" "," "health"
```

Composes
none

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md)

Grounds
none

Before

```text
A runtime component's capabilities are unknowable without reading its source.
```

After

```text
entity → manifest{identity, capabilities, contracts} → discovery → conformance-validation → bind only if it matches
```

### Runtime Extensibility

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Detect repeated core modification for variants, define extension points, create plugin contracts, register implementations, discover them dynamically, and isolate failures.

Invariant
Extensibility is controlled variation behind stable runtime contracts.

Flow

```text
VariantPressure → ExtensionPoint → PluginContract → Registry → Discovery → Isolation
```

Productions

```bnf
RuntimeExtensibility ::= <VariantPressure> "->" <ExtensionPointDesign> "->" <PluginContract> "->" <RegistrationPolicy> "->" <RuntimeDiscovery> "->" <FailureIsolation>
RegistrationPolicy ::= "manual_registration" | "manifest_based" | "service_registry" | "convention_based" | "configuration_based"
```

Composes
[Runtime Discovery](https://banes-lab.com/records/algo/runtime-discovery.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md)

Principle
[Runtime Extensibility](https://banes-lab.com/records/arch/runtime-extensibility.md)

Grounds
none

Before

```text
Every new variant edits the core switch statement.
```

After

```text
variant-pressure → extension-point → plugin-contract → registry → runtime-discovery → failure-isolation
```

### Pattern Selection

- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
Select creational, structural, or behavioral patterns based on the problem force: creation variation, interface mismatch, access control, behavior variation, notification, workflow reuse, or coordination complexity.

Invariant
Design patterns are remedies for specific force shapes, not generic decorations.

Flow

```text
ProblemForce → PatternFamily → CandidatePattern → ApplicabilityCheck
```

Productions

```bnf
PatternSelection ::= <ProblemForce> "->" <PatternFamily> "->" <CandidatePatternSet> "->" <ApplicabilityVerdict>
PatternFamily ::= "creational" | "structural" | "behavioral"
CandidatePattern ::= "factory" | "factory_method" | "abstract_factory" | "builder" | "prototype" | "adapter" | "facade" | "proxy" | "bridge" | "decorator" | "strategy" | "template_method" | "observer" | "mediator"
```

Composes
none

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
A pattern applied as decoration ('let's add a Facade') with no force to justify it.
```

After

```text
force{interface mismatch} → family{structural} → candidate{Adapter} → applicability verdict
```

### Architectural Style Selection

- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
Select monolith, modular monolith, layered, component-based, package-by-feature, clean, hexagonal, ports-and-adapters, or microservices architecture based on deployment autonomy, domain complexity, operational maturity, consistency needs, and coupling tolerance.

Invariant
Architecture style is a macro-constraint over dependency direction, ownership, deployment, and integration.

Flow

```text
SystemForces → StyleCandidates → TradeoffMatrix → SelectedStyle → FitnessFunctions
```

Productions

```bnf
ArchitectureStyleSelection ::= <SystemForces> "->" <ArchitectureStyleSet> "->" <TradeoffMatrix> "->" <SelectedStyle> "->" <StyleFitnessFunctionSet>
SystemForces ::= "domain_complexity" "," "team_topology" "," "deployment_autonomy" "," "consistency_requirement" "," "operational_maturity" "," "scaling_pressure"
```

Composes
none

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
Microservices chosen before the system's forces are known.
```

After

```text
forces{domain-complexity, team-topology, deployment-autonomy} → style-candidates → trade-off matrix → selected style + fitness functions
```

### Event and Messaging Consistency

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
For asynchronous systems, validate event contracts, message schemas, idempotent consumers, outbox publication, correlation metadata, ordering guarantees, retry behavior, and dead-letter handling.

Invariant
Event-driven architecture is safe only when messages are contracts and consumers are replay-safe.

Flow

```text
StateChange → EventContract → Outbox → Broker → IdempotentConsumer → Trace
```

Productions

```bnf
EventMessagingConsistency ::= <StateChange> "->" <EventClassification> "->" <MessageContract> "->" <PublicationReliability> "->" <ConsumerIdempotency> "->" <OrderingPolicy> "->" <ObservabilityTrace>
EventClassification ::= "domain_event" | "integration_event" | "stream_event"
PublicationReliability ::= "transactional_outbox" | "append_only_log" | "broker_acknowledgement"
```

Composes
[Observability Trace](https://banes-lab.com/records/algo/observability-trace.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [state_transaction](https://banes-lab.com/records/force/state-transaction.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [resilience_recovery](https://banes-lab.com/records/force/resilience-recovery.md), [observability_traceability](https://banes-lab.com/records/force/observability-traceability.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [causality_ordering](https://banes-lab.com/records/force/causality-ordering.md)

Grounds
none

Before

```text
Events published ad hoc; a consumer replays and double-applies.
```

After

```text
state-change → event-contract → transactional-outbox → broker → idempotent-consumer → ordering + trace
```

### State and Transaction Safety

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Identify state mutation boundaries, enforce unit-of-work scope, validate invariants, apply concurrency control, guarantee idempotency where retries exist, and isolate side effects.

Invariant
State correctness depends on explicit mutation boundaries and repeat-safe effects.

Flow

```text
Command → TransactionBoundary → Invariants → Concurrency → Commit|Rollback → Idempotency
```

Productions

```bnf
StateTransactionSafety ::= <Command> "->" <TransactionBoundary> "->" <InvariantCheck> "->" <ConcurrencyControl> "->" <CommitDecision> "->" <SideEffectPolicy>
ConcurrencyControl ::= "optimistic_locking" | "pessimistic_locking" | "serial_execution" | "state_isolation"
SideEffectPolicy ::= "idempotent" | "outbox_published" | "compensatable" | "controlled_side_effect"
```

Composes
[Transaction Boundary](https://banes-lab.com/records/algo/transaction-boundary.md)

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [state_transaction](https://banes-lab.com/records/force/state-transaction.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [resilience_recovery](https://banes-lab.com/records/force/resilience-recovery.md)

Grounds
none

Before

```text
Two mutations with no boundary; a crash between them corrupts state.
```

After

```text
command → transaction-boundary → invariant-check → concurrency-control → commit/rollback → idempotent side-effect
```

### Correctness Verification

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Push nondeterminism to boundaries, prefer pure deterministic core logic, validate specifications with static analysis, type checks, property tests, contract tests, formal methods where useful, and reproducible test environments.

Invariant
Correctness is achieved by deterministic design plus evidence-based verification.

Flow

```text
Input → Canonicalize → DeterministicCore → Spec → Verification → Evidence
```

Productions

```bnf
CorrectnessVerification ::= <InputSet> "->" <Canonicalization> "->" <DeterministicCore> "->" <SpecificationSet> "->" <VerificationMethodSet> "->" <CorrectnessEvidence>
VerificationMethod ::= "type_check" | "static_analysis" | "schema_validation" | "contract_test" | "property_based_test" | "specification_test" | "formal_verification" | "runtime_validation"
```

Composes
[Deterministic Core](https://banes-lab.com/records/algo/deterministic-core.md)

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
Correctness asserted by 'it worked on my machine'.
```

After

```text
input → canonicalize → deterministic-core → spec → {type-check, property-test, contract-test} → evidence
```

### Resilience Policy

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Classify failure modes, apply fail-fast, fail-safe, fail-secure, retry, timeout, circuit breaker, fallback, bulkhead, backpressure, health check, failover, and rollback policies according to dependency criticality.

Invariant
Resilience is controlled degradation under known failure modes.

Flow

```text
FailureMode → Criticality → PolicySet → RuntimeGuard → Recovery
```

Productions

```bnf
ResiliencePolicy ::= <FailureModeSet> "->" <CriticalityClassification> "->" <ResiliencePatternSet> "->" <RuntimeGuardSet> "->" <RecoveryActionSet>
ResiliencePattern ::= "timeout" | "retry" | "circuit_breaker" | "fallback" | "bulkhead" | "backpressure" | "health_check" | "failover" | "rollback" | "auto_remediation"
```

Composes
none

Forces
[state_transaction](https://banes-lab.com/records/force/state-transaction.md), [resilience_recovery](https://banes-lab.com/records/force/resilience-recovery.md)

Grounds
none

Before

```text
A remote call with no failure policy takes the whole system down.
```

After

```text
failure-modes → criticality → {timeout, retry, circuit-breaker, bulkhead} → runtime-guard → recovery
```

### Observability and Auditability

- Math type: [graph](https://banes-lab.com/records/reason/math-type-graph.md)
- Yields: edge-list

Details

Intent
Attach correlation and causation identifiers, emit logs, metrics, traces, alerts, audit records, and runtime health signals, then reconstruct behavior as a causal execution graph.

Invariant
Operability requires reconstructable evidence across runtime boundaries.

Flow

```text
Operation → Correlation → Telemetry → Audit → TraceGraph → Diagnosis
```

Productions

```bnf
ObservabilityAuditability ::= <Operation> "->" <CorrelationId> "->" <CausationId> "->" <TelemetryEventSet> "->" <AuditRecordSet> "->" <TraceGraph>
TelemetryEvent ::= "structured_log" | "metric" | "trace_span" | "alert" | "audit_log" | "health_signal"
```

Composes
none

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [observability_traceability](https://banes-lab.com/records/force/observability-traceability.md), [causality_ordering](https://banes-lab.com/records/force/causality-ordering.md)

Grounds
none

Before

```text
An incident with no correlation ids — behavior can't be reconstructed.
```

After

```text
operation → correlation-id + causation-id → {logs, metrics, traces, audit} → trace-graph → diagnosis
```

### Causality and Ordering

- Math type: [graph](https://banes-lab.com/records/reason/math-type-graph.md)
- Yields: edge-list

Details

Intent
Model distributed events as a dependency graph, attach causation metadata, validate happens-before relationships, and use sequence numbers, Lamport clocks, or vector clocks when physical timestamps are insufficient.

Invariant
Distributed ordering must follow causality, not wall-clock coincidence.

Flow

```text
EventSet → CausalMetadata → DependencyGraph → OrderingPolicy → ConsistencyVerdict
```

Productions

```bnf
CausalityOrdering ::= <EventSet> "->" <CausalMetadataSet> "->" <DependencyGraph> "->" <OrderingValidation> "->" <ConsistencyVerdict>
CausalMetadata ::= "correlation_id" | "causation_id" | "sequence_number" | "lamport_clock" | "vector_clock"
DependencyGraph ::= "DAG"
```

Composes
none

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [observability_traceability](https://banes-lab.com/records/force/observability-traceability.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md), [causality_ordering](https://banes-lab.com/records/force/causality-ordering.md)

Grounds
none

Before

```text
Distributed events ordered by wall-clock; skew corrupts the sequence.
```

After

```text
events → causal-metadata{vector-clock} → dependency-graph{DAG} → happens-before validation → consistency verdict
```

### Performance and Scalability

- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
Establish workload model, profile runtime behavior, benchmark repeatably, identify bottlenecks, analyze time and space complexity, select scaling strategy, optimize only measured bottlenecks, and enforce SLO gates.

Invariant
Performance engineering is evidence-driven bottleneck control, not speculative optimization.

Flow

```text
Workload → Profile → Benchmark → Bottleneck → Complexity → Scale|Optimize → SLO
```

Productions

```bnf
PerformanceScalability ::= <WorkloadModel> "->" <ProfilingEvidence> "->" <BenchmarkResultSet> "->" <BottleneckAnalysis> "->" <ComplexityAnalysis> "->" <ScalingOrOptimizationPlan> "->" <PerformanceGate>
ScalingOrOptimizationPlan ::= "vertical_scale" | "horizontal_scale" | "load_balance" | "shard" | "partition" | "cache" | "stream" | "rate_limit" | "algorithm_replacement"
```

Composes
none

Forces
[performance_scaling](https://banes-lab.com/records/force/performance-scaling.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
Optimize by guesswork; add capacity and hope.
```

After

```text
workload → profile → benchmark → bottleneck → complexity → scale/optimize the measured bottleneck → SLO gate
```

### Portability and Deployment Environment

- Math type: [topology](https://banes-lab.com/records/reason/math-type-topology.md)
- Yields: boolean

Details

Intent
Externalize configuration, abstract platform dependencies, enforce standards compliance, containerize or package runtimes, validate environment parity, and isolate infrastructure-specific behavior behind adapters.

Invariant
Portability requires platform assumptions to be explicit and replaceable.

Flow

```text
RuntimeAssumption → Abstraction → ExternalConfig → Packaging → EnvironmentParity
```

Productions

```bnf
PortabilityDeployment ::= <ApplicationCore> "->" <PlatformAssumptionScan> "->" <PlatformAbstraction> "->" <ConfigurationExternalization> "->" <DeploymentPackaging> "->" <EnvironmentParityValidation>
Environment ::= "local" | "test" | "staging" | "production"
```

Composes
none

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
Platform assumptions baked in; the app only runs on one host.
```

After

```text
core → platform-assumption scan → abstraction → externalized-config → packaging → environment-parity
```

### Security Governance

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Threat-model the system, reduce attack surface, authenticate identity, authorize actions, validate input, encode output, encrypt data, manage secrets, enforce policy as code, and continuously audit compliance.

Invariant
Security is an enforced policy graph over identity, data, operations, and infrastructure.

Flow

```text
ThreatModel → ControlSet → Policy → Enforcement → Audit
```

Productions

```bnf
SecurityGovernance ::= <ThreatModel> "->" <SecurityControlSet> "->" <PolicySet> "->" <PolicyEnforcement> "->" <ContinuousCompliance> "->" <RiskReview>
SecurityControl ::= "authentication" | "authorization" | "least_privilege" | "zero_trust" | "input_validation" | "output_encoding" | "encryption_at_rest" | "encryption_in_transit" | "secrets_management" | "audit_logging"
```

Composes
none

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [security_governance](https://banes-lab.com/records/force/security-governance.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
Security added as a late checklist, not a policy graph.
```

After

```text
threat-model → controls{authn, authz, validation, encryption, secrets} → policy-as-code → enforcement → continuous audit
```

### Architecture Evolution Governance

- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
Assess architecture against quality attributes, document decisions, analyze impact, track gaps, define fitness functions, standardize patterns, and evolve through ADR-backed controlled change.

Invariant
Evolutionary architecture requires decision memory and continuous fitness validation.

Flow

```text
Assessment → GapAnalysis → DecisionRecord → FitnessFunction → ChangePlan → Review
```

Productions

```bnf
ArchitectureEvolutionGovernance ::= <Assessment> "->" <GapAnalysis> "->" <ImpactAnalysis> "->" <DecisionRecord> "->" <FitnessFunctionSet> "->" <EvolutionPlan> "->" <ReviewGate>
DecisionRecord ::= "ADR" "," "context" "," "decision" "," "consequences" "," "status"
```

Composes
none

Composed by
[Architectural Relationship Algebra](https://banes-lab.com/records/algo/architectural-relationship-algebra.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [security_governance](https://banes-lab.com/records/force/security-governance.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
Architecture drifts; no decision memory, no fitness checks.
```

After

```text
assessment → gap-analysis → ADR → fitness-functions → change-plan → review gate
```

### Control Plane Coordination

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Separate control-plane policy from data-plane execution, centralize configuration, authentication, logging, or orchestration only where shared governance is beneficial, and preserve local autonomy where decentralization is required.

Invariant
Control centralization should govern policy without collapsing execution autonomy.

Flow

```text
Policy → ControlPlane → DataPlane → Telemetry → PolicyAdjustment
```

Productions

```bnf
ControlPlaneCoordination ::= <PolicySet> "->" <ControlPlane> "->" <DataPlaneSet> "->" <TelemetryFeedback> "->" <GovernanceAdjustment>
ControlConcern ::= "configuration" | "authentication" | "authorization" | "logging" | "orchestration" | "service_registry"
```

Composes
[Control Plane](https://banes-lab.com/records/algo/control-plane.md)

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [security_governance](https://banes-lab.com/records/force/security-governance.md), [control_coordination](https://banes-lab.com/records/force/control-coordination.md)

Grounds
none

Before

```text
Every service does its own config + auth; policy scatters and drifts.
```

After

```text
policy → control-plane{config, authn, orchestration} → data-planes execute → telemetry → governance adjustment
```

### Metaprogramming Safety

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Treat code as data only through schemas, manifests, DSL grammars, reflection contracts, compile-time checks, runtime guards, and generated artifact validation.

Invariant
Metaprogramming is safe when generated behavior is bounded by a validated model.

Flow

```text
Model → Schema → Transform → Generate|Interpret → Validate → Execute
```

Productions

```bnf
MetaprogrammingSafety ::= <ProgramModel> "->" <ModelSchema> "->" <TransformationEngine> "->" <GeneratedOrInterpretedArtifact> "->" <SafetyValidation> "->" <ExecutionBoundary>
TransformationEngine ::= "reflection" | "introspection" | "compile_time_evaluation" | "runtime_code_generation" | "DSL_interpreter" | "model_driven_generator"
```

Composes
none

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [metaprogramming_modeling](https://banes-lab.com/records/force/metaprogramming-modeling.md)

Grounds
none

Before

```text
Code-as-string eval'd with no schema or bound.
```

After

```text
model → schema → transform{reflection | DSL} → generated artifact → safety-validation → bounded execution
```

### Streaming Dataflow

- Math type: [analysis](https://banes-lab.com/records/reason/axis-analysis.md)
- Yields: operation

Details

Intent
Process data through forward-only stages, preserve bounded memory, apply backpressure, checkpoint state where needed, and prefer stateless processing unless state is explicitly modeled.

Invariant
Streaming architecture is a contract over flow, ordering, pressure, and bounded memory.

Flow

```text
Source → Stage → Stage → Backpressure → Checkpoint → Sink
```

Productions

```bnf
StreamingDataflow ::= <Source> "->" <PipelineStageSet> "->" <ProcessingMode> "->" <BackpressurePolicy> "->" <CheckpointPolicy> "->" <Sink>
ProcessingMode ::= "single_pass" | "lazy_evaluation" | "sequential_access" | "forward_only" | "stateless" | "stateful_with_checkpoint"
```

Composes
none

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [resilience_recovery](https://banes-lab.com/records/force/resilience-recovery.md), [streaming_dataflow](https://banes-lab.com/records/force/streaming-dataflow.md), [causality_ordering](https://banes-lab.com/records/force/causality-ordering.md)

Grounds
none

Before

```text
Load everything into memory, then map/filter — unbounded.
```

After

```text
source → forward-only stages → backpressure → checkpoint → sink (bounded memory)
```

### Model Architecture Governance

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Register models, prompts, datasets, embeddings, retrieval sources, knowledge graphs, inference contracts, evaluation suites, explainability traces, safety gates, and monitoring policies.

Invariant
Model-backed architecture requires governance over evidence, model behavior, inference, evaluation, and safety.

Flow

```text
ModelArtifact → Registry → Evaluation → Safety → InferenceTrace → Monitoring
```

Productions

```bnf
AIModelArchitectureGovernance ::= <AIArtifactSet> "->" <GovernanceRegistry> "->" <EvaluationSuite> "->" <InferenceContract> "->" <ExplainabilityTrace> "->" <SafetyPolicy> "->" <RuntimeMonitoring>
AIArtifact ::= "model" | "prompt" | "embedding_index" | "retrieval_source" | "knowledge_graph" | "dataset" | "evaluation"
```

Composes
none

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [security_governance](https://banes-lab.com/records/force/security-governance.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
A model shipped with no registry, eval, trace, or safety gate.
```

After

```text
artifacts{model, prompt, index} → governance-registry → evaluation → inference-contract → explainability-trace → safety + monitoring
```

### Architectural Recommendation

- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
Given a target problem, query the graph for matching violated_by and detected_by signals, collect candidate concepts, compute required dependencies, remove conflicting concepts, rank by severity and reinforcement gain, then recommend an ordered implementation path.

Invariant
Recommendations are graph-derived paths from evidence to enforceable architecture change.

Flow

```text
ProblemEvidence → CandidateConcepts → DependencyClosure → ConflictPrune → Rank → Roadmap
```

Productions

```bnf
ArchitecturalRecommendation ::= <ProblemEvidenceSet> "->" <ConceptMatchSet> "->" <DependencyClosure> "->" <ConflictTensionResolution> "->" <SeverityRanking> "->" <ImplementationRoadmap>
SeverityRanking ::= "mandatory_before_recommended" "," "contextual_when_scope_matches" "," "discouraged_requires_exception"
```

Composes
[Dependency Closure](https://banes-lab.com/records/algo/dependency-closure.md)

Forces
[architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
Advice given from intuition, not from the graph or the evidence.
```

After

```text
problem-evidence → concept-match → dependency-closure → conflict-prune → severity rank → ordered roadmap
```

### Architecture Fitness Function Generation

- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Convert mandatory and high-impact recommended records into executable fitness functions by binding detected_by signals to checks, measured_by fields to thresholds, and enforced_by fields to pipeline gates.

Invariant
The catalog becomes self-enforcing when records compile into fitness functions.

Flow

```text
RelationshipRecord → DetectionCheck → MetricThreshold → EnforcementGate → FitnessFunction
```

Productions

```bnf
FitnessFunctionGeneration ::= <ArchitecturalRelationshipRecord> "->" <DetectionCheck> "->" <MetricThreshold> "->" <EnforcementGate> "->" <FitnessFunction>
FitnessFunction ::= <Name> "," <Scope> "," <CheckProcedure> "," <Threshold> "," <SeverityPolicy> "," <FailureMessage> "," <RefactorHintSet>
```

Composes
[Architectural Relationship Record](https://banes-lab.com/records/algo/architectural-relationship-record.md), [Enforcement Gate](https://banes-lab.com/records/algo/enforcement-gate.md), [Severity Policy](https://banes-lab.com/records/algo/severity-policy.md)

Forces
[streaming_dataflow](https://banes-lab.com/records/force/streaming-dataflow.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
Mandatory records sit as prose no check executes.
```

After

```text
record → detection-check + metric-threshold + enforcement-gate → executable fitness function
```

### Architecture Refactoring Roadmap

- Math type: [algebra](https://banes-lab.com/records/reason/math-type-algebra.md)
- Yields: ordered-structure

Details

Intent
Group violations by shared refactor actions, order remediation by prerequisite concepts, apply low-risk structural fixes first, then enforce newly satisfied concepts through gates.

Invariant
Architecture repair is more efficient when refactors are grouped by shared conceptual cause.

Flow

```text
Violations → SharedCause → RefactorGroup → DependencyOrder → Apply → Enforce
```

Productions

```bnf
RefactoringRoadmap ::= <ViolationRecordSet> "->" <SharedCauseClustering> "->" <RefactorGroupSet> "->" <DependencyOrderedPlan> "->" <ExecutionGateSet>
SharedCause ::= "missing_boundary" | "missing_contract" | "semantic_drift" | "concrete_coupling" | "uncontrolled_state" | "missing_observability" | "manual_governance_only"
```

Composes
none

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
Violations fixed one-by-one in random order; shared causes re-fixed repeatedly.
```

After

```text
violations → cluster by shared-cause{missing-boundary} → refactor-groups → dependency-ordered plan → enforce
```

### Concept Cluster Extraction

- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
Group concepts into clusters by mutual requires, reinforces, enables, and shared scope; treat clusters as higher-order architectural concerns.

Invariant
Large principle catalogs become usable when concepts are clustered by relationship density.

Flow

```text
Graph → EdgeDensity → Cluster → ConcernFamily
```

Productions

```bnf
ConceptClusterExtraction ::= <ArchitectureGraph> "->" <RelationshipDensityAnalysis> "->" <ClusterSet> "->" <ConcernFamilySet>
ConcernFamily ::= <ClusterName> "," <CoreConceptSet> "," <SupportingConceptSet> "," <ConflictConceptSet> "," <EnforcementPolicySet>
```

Composes
none

Composed by
[Master Architecture Governance Kernel](https://banes-lab.com/records/algo/master-architecture-governance-kernel.md)

Forces
[architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
A flat catalog of hundreds of concepts, unusable at scale.
```

After

```text
graph → relationship-density analysis → clusters → concern-families{core + supporting + conflict concepts}
```

### Architecture Decision Support

- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
For each proposed design decision, compute satisfied concepts, violated concepts, tensions introduced, conflicts triggered, enabled capabilities, and enforcement cost; require ADR when trade-offs are nontrivial.

Invariant
A design decision should be evaluated as a graph delta.

Flow

```text
Decision → GraphDelta → BenefitSet + RiskSet → ADRRequired?
```

Productions

```bnf
ArchitectureDecisionSupport ::= <ProposedDecision> "->" <SatisfiedConceptSet> "->" <ViolatedConceptSet> "->" <TensionSet> "->" <EnabledCapabilitySet> "->" <EnforcementCost> "->" <DecisionGovernance>
DecisionGovernance ::= "approve" | "approve_with_ADR" | "revise" | "reject"
```

Composes
none

Composed by
[Master Architecture Governance Kernel](https://banes-lab.com/records/algo/master-architecture-governance-kernel.md)

Forces
[architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
A design decision judged by gut feel, not by its effect on the graph.
```

After

```text
decision → graph-delta{satisfied, violated, tensions, enabled} → enforcement-cost → approve / approve-with-ADR / revise / reject
```

### Relationship Schema Validation

- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Validate every concept record for required fields, known relation names, parseable scope, valid severity, nonempty detection and enforcement metadata, and resolvable references where possible.

Invariant
The architectural catalog itself must be governed as a schema-bearing artifact.

Flow

```text
Record → SchemaCheck → ReferenceCheck → CompletenessCheck → Valid|Invalid
```

Productions

```bnf
RelationshipSchemaValidation ::= <ArchitecturalRelationshipRecordSet> "->" <RequiredFieldValidation> "->" <ReferenceResolution> "->" <SeverityValidation> "->" <CompletenessScore> "->" <CatalogValidity>
RequiredFieldSet ::= "type" "," "scope" "," "requires" "," "reinforces" "," "enables" "," "conflicts_with" "," "tensions_with" "," "violated_by" "," "detected_by" "," "measured_by" "," "refactored_by" "," "enforced_by" "," "severity"
```

Composes
none

Composed by
[Master Architecture Governance Kernel](https://banes-lab.com/records/algo/master-architecture-governance-kernel.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
Catalog records with missing fields and dangling references ship unchecked.
```

After

```text
records → required-field validation → reference-resolution → severity validation → completeness score → catalog validity
```

### Architecture Catalog Compiler

- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Compile the relationship catalog into four executable artifacts: assessment rules, refactor playbooks, decision-support graphs, and governance gates.

Invariant
A comprehensive architecture catalog should compile into operational tooling.

Flow

```text
Catalog → Rules + Playbooks + DecisionGraph + Gates
```

Productions

```bnf
ArchitectureCatalogCompiler ::= <ArchitectureGraph> "->" <AssessmentRuleSet> "->" <RefactorPlaybookSet> "->" <DecisionSupportModel> "->" <GovernanceGateSet>
AssessmentRule ::= <Concept> "," <DetectedBy> "," <MeasuredBy> "," <EnforcementSeverity>
RefactorPlaybook ::= <ViolationPattern> "," <RefactoredBy> "," <EnforcedBy>
```

Composes
none

Forces
[security_governance](https://banes-lab.com/records/force/security-governance.md)

Grounds
none

Before

```text
The catalog read only by the developer — no operational output.
```

After

```text
graph → {assessment-rules, refactor-playbooks, decision-support-model, governance-gates}
```

### Master Architecture Governance Kernel

- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Parse the catalog, validate records, build the graph, classify target scope, select relevant concept clusters, compute dependency closure, detect violations, measure evidence, resolve conflicts, generate refactor plans, enforce gates, and record decisions.

Invariant
The catalog can be executed as a governance kernel for architecture assessment, remediation, and evolution.

Flow

```text
Catalog → Graph → Scope → Concepts → Detection → Metrics → Refactor → Enforcement → ADR
```

Productions

```bnf
MasterArchitectureGovernanceKernel ::= <RelationshipSchemaValidation> "->" <ArchitectureGraph> "->" <TargetScopeClassification> "->" <ConceptClusterExtraction> "->" <DependencyClosure> "->" <ViolationDetection> "->" <MeasurementNormalization> "->" <ConflictTensionResolution> "->" <RefactorSelection> "->" <EnforcementGate> "->" <ArchitectureDecisionSupport> "->" <GovernanceReport>
GovernanceReport ::= <SatisfiedConceptSet> "," <ViolationRecordSet> "," <MetricEvidenceSet> "," <ConflictTensionSet> "," <RefactorRoadmap> "," <EnforcementGateSet> "," <ADRRecommendationSet> "," <ResidualRiskSet>
```

Composes
[Relationship Schema Validation](https://banes-lab.com/records/algo/relationship-schema-validation.md), [Concept Cluster Extraction](https://banes-lab.com/records/algo/concept-cluster-extraction.md), [Dependency Closure](https://banes-lab.com/records/algo/dependency-closure.md), [Violation Detection](https://banes-lab.com/records/algo/violation-detection.md), [Measurement Normalization](https://banes-lab.com/records/algo/measurement-normalization.md), [Refactor Selection](https://banes-lab.com/records/algo/refactor-selection.md), [Enforcement Gate](https://banes-lab.com/records/algo/enforcement-gate.md), [Architecture Decision Support](https://banes-lab.com/records/algo/architecture-decision-support.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [security_governance](https://banes-lab.com/records/force/security-governance.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
Assessment, remediation, and evolution done by disconnected manual steps.
```

After

```text
validate → graph → scope → clusters → closure → detect → measure → resolve → refactor → enforce → ADR → governance report
```

### Architectural Relationship Algebra

- Meta record

Details

Intent
<Parse concept records> → <Build relationship graph> → <Classify design force> → <Select applicable concepts> → <Resolve prerequisites> → <Detect violations> → <Measure evidence> → <Choose refactors> → <Enforce gates> → <Govern evolution>

Invariant
Every architectural principle, pattern, mechanism, metric, and quality attribute can be treated as a relationship contract whose operational lifecycle is detection, measurement, remediation, enforcement, and evolution.

Flow

```text
Record → Graph → Force → Concept → Evidence → Refactor → Gate → Governance
```

Productions

```bnf
ArchitecturalRelationshipAlgebra ::= <ArchitecturalRelationshipRecordSet> "->" <ArchitectureGraph> "->" <ForceClassification> "->" <ApplicableConceptSet> "->" <DependencyClosure> "->" <ViolationDetection> "->" <MeasurementNormalization> "->" <RefactorSelection> "->" <EnforcementGate> "->" <ArchitectureEvolutionGovernance>
ArchitecturalRelationshipRecord ::= <ConceptName> ":" <RecordType> "," <ScopeSet> "," <RequiresSet> "," <ReinforcesSet> "," <EnablesSet> "," <ConflictSet> "," <TensionSet> "," <ViolationSet> "," <DetectionSet> "," <MetricSet> "," <RefactorSet> "," <EnforcementSet> "," <EnforcementSeverity>
OperationalLifecycle ::= "define" | "select" | "detect" | "measure" | "refactor" | "enforce" | "observe" | "evolve"
CompletionCondition ::= "all_mandatory_concepts_satisfied" "," "contextual_concepts_justified" "," "recommended_concepts_reported" "," "discouraged_concepts_exception_reviewed" "," "residual_risk_recorded"
```

Composes
[Dependency Closure](https://banes-lab.com/records/algo/dependency-closure.md), [Violation Detection](https://banes-lab.com/records/algo/violation-detection.md), [Measurement Normalization](https://banes-lab.com/records/algo/measurement-normalization.md), [Refactor Selection](https://banes-lab.com/records/algo/refactor-selection.md), [Enforcement Gate](https://banes-lab.com/records/algo/enforcement-gate.md), [Architecture Evolution Governance](https://banes-lab.com/records/algo/architecture-evolution-governance.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

## Links to

- [Graph](https://banes-lab.com/records/reason/math-type-graph.md)
- [Architecture Fitness Function Generation](https://banes-lab.com/records/algo/architecture-fitness-function-generation.md)
- [contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md)
- [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)
- [Logic](https://banes-lab.com/records/reason/math-type-logic.md)
- [Architecture Assessment](https://banes-lab.com/records/algo/architecture-assessment.md)
- [Architectural Recommendation](https://banes-lab.com/records/algo/architectural-recommendation.md)
- [Master Architecture Governance Kernel](https://banes-lab.com/records/algo/master-architecture-governance-kernel.md)
- [Architectural Relationship Algebra](https://banes-lab.com/records/algo/architectural-relationship-algebra.md)
- [security_governance](https://banes-lab.com/records/force/security-governance.md)
- [Optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- [Anti-Pattern Rule Compiler](https://banes-lab.com/records/algo/anti-pattern-rule-compiler.md)
- [observability_traceability](https://banes-lab.com/records/force/observability-traceability.md)
- [model_governance](https://banes-lab.com/records/force/model-governance.md)
- [Analysis](https://banes-lab.com/records/reason/axis-analysis.md)
- [semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md)
- [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)
- [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md)
- [Dependency Closure](https://banes-lab.com/records/algo/dependency-closure.md)
- [Violation Detection](https://banes-lab.com/records/algo/violation-detection.md)
- [Measurement Normalization](https://banes-lab.com/records/algo/measurement-normalization.md)
- [Governance Evolution](https://banes-lab.com/records/algo/governance-evolution.md)
- [modularity](https://banes-lab.com/records/force/modularity.md)
- [Loop-Owned Mode Selection](https://banes-lab.com/records/algo/loop-owned-mode-selection.md)
- [<Mode-Driven Response Schema>](https://banes-lab.com/records/algo/mode-driven-response-schema.md)
- [Set Theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- [Composed Turn Contract](https://banes-lab.com/records/algo/composed-turn-contract.md)
- [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)
- [Runtime Discovery](https://banes-lab.com/records/algo/runtime-discovery.md)
- [Runtime Extensibility](https://banes-lab.com/records/arch/runtime-extensibility.md)
- [control_coordination](https://banes-lab.com/records/force/control-coordination.md)
- [Observability Trace](https://banes-lab.com/records/algo/observability-trace.md)
- [state_transaction](https://banes-lab.com/records/force/state-transaction.md)
- [resilience_recovery](https://banes-lab.com/records/force/resilience-recovery.md)
- [event_messaging](https://banes-lab.com/records/force/event-messaging.md)
- [causality_ordering](https://banes-lab.com/records/force/causality-ordering.md)
- [Transaction Boundary](https://banes-lab.com/records/algo/transaction-boundary.md)
- [Deterministic Core](https://banes-lab.com/records/algo/deterministic-core.md)
- [performance_scaling](https://banes-lab.com/records/force/performance-scaling.md)
- [Topology](https://banes-lab.com/records/reason/math-type-topology.md)
- [Control Plane](https://banes-lab.com/records/algo/control-plane.md)
- [metaprogramming_modeling](https://banes-lab.com/records/force/metaprogramming-modeling.md)
- [streaming_dataflow](https://banes-lab.com/records/force/streaming-dataflow.md)
- [Computation](https://banes-lab.com/records/reason/math-type-computation.md)
- [Architectural Relationship Record](https://banes-lab.com/records/algo/architectural-relationship-record.md)
- [Enforcement Gate](https://banes-lab.com/records/algo/enforcement-gate.md)
- [Severity Policy](https://banes-lab.com/records/algo/severity-policy.md)
- [Algebra](https://banes-lab.com/records/reason/math-type-algebra.md)
- [Relationship Schema Validation](https://banes-lab.com/records/algo/relationship-schema-validation.md)
- [Concept Cluster Extraction](https://banes-lab.com/records/algo/concept-cluster-extraction.md)
- [Refactor Selection](https://banes-lab.com/records/algo/refactor-selection.md)
- [Architecture Decision Support](https://banes-lab.com/records/algo/architecture-decision-support.md)
- [Architecture Evolution Governance](https://banes-lab.com/records/algo/architecture-evolution-governance.md)
