@@ -12,6 +12,11 @@ user*, while these say *how the code base must be structured* to make that possi
1212to keep it sustainable. They are distilled from the INET Developer's Guide and from
1313recurring lessons in day-to-day INET/OMNeT++ development.
1414
15+ Domain-specific extensions refine these rules where one protocol family concentrates extra
16+ risk; the first is
17+ [ ieee80211-architectural-requirements.md] ( ieee80211-architectural-requirements.md ) , whose
18+ ` AR-WLAN-* ` rules apply in addition to everything here under the IEEE 802.11 subtrees.
19+
1520## Code Organization (AR-ORG)
1621
1722### AR-ORG-DOMAINS — Layered, domain-partitioned source tree with acyclic dependencies
@@ -581,6 +586,64 @@ declaration — are enforceable by an **agent reviewer** run as a CI gate, leavi
581586judgment (is a fidelity level worth adding?) to a human. The enforcement status of each requirement
582587is tracked in the map below.
583588
589+ ## How the requirements compose
590+
591+ The requirements above are not independent style preferences; they form a network of mutually
592+ reinforcing constraints, and their aggregate effect is larger than any rule alone. Seven compound
593+ properties are the actual goal — each names the requirements that jointly produce it, which is also
594+ a review aid: a change that weakens one rule usually attacks one of these properties, and the
595+ property says what else to check.
596+
597+ ** A contract graph instead of a dependency tangle.** AR-ORG-DOMAINS, AR-ORG-CONTRACTS,
598+ AR-MOD-COMPOSITION, AR-MOD-PLUGGABLE, AR-COM-REGISTRY, AR-COM-DISPATCH, AR-EXT-NOCORE, and
599+ AR-EXT-ATTACH together produce * structural substitutability* : a component is replaceable not merely
600+ because an interface exists, but because its slot is interface-typed, its service is discoverable
601+ at runtime, its packet identity is explicit, and the core never learns its concrete type. This
602+ combination is what makes adding a protocol an extension rather than a central-core edit.
603+
604+ ** A truthful data path from model to wire to evidence.** AR-PKT-CHUNKS, AR-PKT-DUAL, AR-PKT-TAGS,
605+ AR-PKT-ERRORS, AR-PKT-SIGNAL, AR-OBS-INTROSPECTION, and AR-OBS-FLOWS partition information by what
606+ it * is* — typed content is what the packet carries, tags are local metadata, Signals are physical
607+ transmissions, serializers are the wire boundary, region tags preserve identity through
608+ transformation. The emergent property is * evidentiary continuity* : a field inspected in a packet,
609+ serialized into a capture, processed by the PHY, and attributed to a flow is one representation
610+ throughout, so analysis tooling cannot report something the model did not actually represent.
611+
612+ ** Composable but causally explicit behavior.** AR-COM-DIRECT, AR-LIFE-STAGES, AR-LIFE-OPERATIONS,
613+ AR-QUEUE-ROLES, and AR-QUEUE-STREAMING each put internal cooperation at its right semantic level:
614+ direct calls for same-instant coordination, scheduled messages for genuine events, stages for
615+ initialization order, queueing contracts for datapath transfer. The result is an event trajectory
616+ that corresponds to modeled behavior rather than implementation plumbing — which is what makes
617+ debugging, performance, and fingerprint signal quality good at the same time.
618+
619+ ** Observability without observer effects.** AR-ORG-VIS-SPLIT, AR-OBS-SIGNALS, AR-OBS-NED-TRUTH, and
620+ AR-OBS-INTROSPECTION establish a one-way path: model owner → declared signal → recorder, visualizer,
621+ analyzer. Consumers subscribe from the outside and events are emitted once by their owner, so
622+ recording is additive, never behavioral; NED remains the machine-readable statement of what exists.
623+ Observability becomes an external capability instead of a hidden second implementation of the model.
624+
625+ ** Fidelity as a controlled dimension.** AR-MOD-FIDELITY, AR-PKT-ERRORS, AR-PKT-SIGNAL,
626+ AR-EXT-FEATURES, and AR-CFG-PARAMS let a study choose detail deliberately: a coarse error model and
627+ a detailed analog model occupy the same contractual slot, and the choice is visible in
628+ configuration. Large scenarios buy affordable abstraction, focused studies buy detail, and neither
629+ requires replacing the surrounding architecture.
630+
631+ ** Reproducible rather than anecdotal correctness.** AR-CFG-INFER, AR-CFG-PARAMS, AR-BUILD-OUTOFTREE,
632+ AR-BUILD-DECLARATIVE, AR-QUAL-DETERMINISM, AR-QUAL-FINGERPRINT, AR-QUAL-TESTS, and
633+ AR-QUAL-TRACEABILITY form a chain — unambiguous configuration → isolated, discoverable build →
634+ deterministic execution → matching tests plus trajectory fingerprints → traceable baselines — in
635+ which each link removes a different source of uncertainty. A fingerprint is meaningful only on a
636+ deterministic model; a deterministic run is useful only when its inputs are known; a passing test is
637+ persuasive only when its type matches the claim and its baseline has provenance.
638+
639+ ** Complexity paid once, in infrastructure.** Registries, dispatchers, serializers, signals,
640+ lifecycle protocols, queueing contracts, and feature descriptors are up-front structure whose
641+ aggregate purpose is to make the * next* model cheaper to integrate: each new protocol reuses the
642+ same extension, observation, testing, configuration, and build paths instead of carving a bespoke
643+ path through the core. The architecture has a rising initial discipline cost and a falling marginal
644+ integration cost — without it, every new feature looks locally simple while adding one more special
645+ case to dispatch, inspection, build selection, and tests.
646+
584647## Quality attributes and enforcement
585648
586649The requirements above are grouped by * architectural concern* — the axis a contributor uses to find
@@ -668,3 +731,32 @@ move every requirement as far up this ladder as it can go.
668731| AR-QUAL-LOGGING | T3+T4 | ` -Werror ` /` clang-tidy ` + agent review that programming errors throw, not log |
669732| AR-QUAL-TRACEABILITY | T3 | fingerprint tags + source→config mapping (partial) |
670733| AR-QUAL-ENFORCED | — | the CI gate set itself; measured by how many rows above reach T1–T4 (automated) |
734+
735+ ## Contributor workflow
736+
737+ For a normal INET change, the requirements work as a design map rather than a reading assignment —
738+ the unit of review is not "does this patch look reasonable?" but "which architectural contracts does
739+ this patch touch, what evidence establishes compliance, and what will prevent a regression later?":
740+
741+ 1 . ** Scope.** Identify the affected domain, contracts, module composition, packet content, tags,
742+ configuration surface, observability, build feature, and test coverage.
743+ 2 . ** Seals.** If the change is under ` src/inet/ ` , resolve exact and ancestor-directory seals first
744+ (see [ sealing.md] ( sealing.md ) ) — a sealed path needs explicit permission before anything else.
745+ 3 . ** Applicable rules.** Read only the requirement sections that apply (including the
746+ [ IEEE 802.11 extensions] ( ieee80211-architectural-requirements.md ) when in scope), plus both
747+ exception ledgers and [ naming-conventions.md] ( naming-conventions.md ) for every new or renamed
748+ artifact.
749+ 4 . ** Smallest surface.** Establish state ownership and the smallest change surface before editing;
750+ prefer the smallest change that satisfies the contracts, ownership, observability,
751+ configuration, determinism, and testing requirements.
752+ 5 . ** Existing mechanisms.** Implement through existing contracts, registries, signals, serializers,
753+ lifecycle APIs, and feature descriptors before inventing a new mechanism.
754+ 6 . ** Validate in proportion to risk.** Run [ enforcement/check-architecture.sh] ( enforcement/check-architecture.sh )
755+ (scoped to the touched subtree for focused work) and the test categories matching the claim;
756+ preserve the exact commands, configurations, and statuses for review.
757+ 7 . ** Reconcile, don't re-litigate.** Record only genuinely new deviations as ` AV-* ` /` NV-* ` ledger
758+ rows; deviations already in [ architecture-exceptions.md] ( architecture-exceptions.md ) or
759+ [ naming-exceptions.md] ( naming-exceptions.md ) are known, not findings. Fingerprint baselines
760+ change only with explicit approval and a reviewable explanation (AR-QUAL-TRACEABILITY).
761+ 8 . ** Sealing last.** Sealing is the terminal state of this pipeline, not a shortcut around it: a
762+ complete audit, with every deviation fixed or ledgered, precedes recording a seal.
0 commit comments