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
| Crate | Responsibility | Local doc |
|---|---|---|
core | bitfun-core compatibility facade and product-full assembly | AGENTS.md |
product-capabilities | Product capability profiles, tool group facts, service requirements, and harness selections | AGENTS.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 toexecution, concrete protocol adaptation toadapters, and reusable implementation behavior toserviceswhen 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/coremay 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.