We describe an approach that enables the design of optical systems for optimal performance when built, i.e., when user-selected tolerances and compensators are taken into account. The approach does not require significant raytracing or computing time beyond what is used to optimize the nominal design. The approach uses nodal aberration theory to describe the effects of decentered optics; double Zernike polynomials to describe and quantify system performance; and an analytic approach to determining the necessary compensation and residual wavefront error due to a tolerance. We design a triplet using this approach and compare its Monte-Carlo-modeled as-built performance to that of a conventionally-optimized design which optimizes only nominal performance. We also describe several extensions to the theory.