Modularity is enforced at the source. Every repository must fit exactly one of these archetypes — there is no fourth option and no hybrid.
1. Atomic repositories — the atom
The smallest possible unit of granularity. If a component can be broken down further, it is not an atom. The structure is flat: a single level of directory inside src/, fulfilling one specific contract.
Examples: common-contract, http-value-object,http-client.
2. Assembly repositories — the assembly
Connection points. They contain no logic; they orchestrate the union of atoms through composer.json dependencies, so that one install brings ten atoms at once.
Examples: common, http,data-transfer-object.
3. Application repositories — the core
The living system. Not a library, but the implementation of the business heart, following Clean Architecture and DDD. It stays lean: anything generic is pushed down into atoms.
Examples: ensemble, koenma-id,grogu-gateway.