This paper discusses an approach for the top-down composition of software architectures. First, an architecture is derived that addresses functional requirements only. This architecture contains a number of variability points which are next filled in to address quality concerns. The quality requirements and associated architectural solution fragments are captured in a so-called feature-solution (FS) graph. The solution fragments captured in this graph are used to iteratively compose an architecture driven by quality requirements. Our versatile composition technique allows for pre- and post-refinements, refinements that involve multiple variability points, and functionality extensions. In addition, the usage of the FS-graph supports aspect-oriented programming at the architecture level. © 2002 Elsevier Science Inc. All rights reserved.