Product Assembly Layer

June 5, 2026 · View on GitHub

中文 | English

Product Assembly Layer

This layer owns product assembly, compatibility exports, capability selection, and runtime registration. It wires lower layers together for a delivery form; it does not own concrete adapter behavior, reusable service implementations, OS integration, or stable product-domain contracts.

Modules

CrateResponsibilityLocal doc
corebitfun-core compatibility facade and product-full assemblyAGENTS.md
product-capabilitiesProduct capability profiles, tool group facts, service requirements, and harness selectionsAGENTS.md

Placement Rules

  • Put product-full wiring, compatibility shims, capability profile selection, and adapter/service registration here.
  • Keep product-domain rules in contracts/product-domains; assembly may select those facts but must not become their owner.
  • Move stable owner logic to contracts, portable execution logic to execution, concrete protocol adaptation to adapters, and reusable implementation behavior to services when a lower layer can own it.
  • Preserve existing public import paths unless a migration explicitly removes them with compatibility notes and tests.
  • Keep assembly additions small and traceable; broad feature growth here is a sign that ownership has not been pushed down far enough.

Dependency Boundaries

  • assembly/core may depend on lower owner layers to assemble the current product runtime.
  • Assembly may depend on adapter and service crates for selected delivery forms, but should not implement their protocol serialization, authentication, transport, or platform details.
  • Avoid direct host APIs in assembly code; Tauri support must remain feature-gated and should be owned by app or adapter code when possible.
  • Interface crates may call assembly APIs, but adapters and services must not depend on assembly.