To construct an initial Gestalt architecture, Define the architecture decomposition to be congruent to the given code decomposition, except that the architecture decomposition need not be as fine-grained as the code decomposition. Create one spec in the architecture for each header file in the code. Where multiple spec names are attached to a port, the port obeys a spec defined as the union of those specs. Although these steps produce a valid Gestalt architecture, consistent with the code, it would not necessarily be a very good architecture. Define a separate port on each component for each distinct type of communication between that component and others.
Clustering algorithms can be useful for finding groups of related header files.
Reconnect the arrows and exposures involved to reflect the different types of communication. Attach implementation ports to modules, as appropriate, and reconnect arrows and exposures to distinguish implementation from communication relationships. Identify the modules that implement communications infrastructure, and devise composite and abstract connectors to describe how they are used. This may require breaking up the code into smaller pieces so that separate connector instances are declared in separate header files. Revise both the code and the architecture to improve the structure.