We present a programming methodology for self-assembling complex structures from vast numbers of locally-interacting identically-programmed agents, using techniques inspired by developmental biology. We demonstrate this approach through two examples: shape formation on a reconfigurable sheet, and self-assembling two dimensional structures through replication. In each case, the desired global shape is specified using an abstract geometry-based language, and the agent program is directly compiled from the global specification. The resulting self-assembly processes are versatile, analyzable, and reliable in the face of random agent distributions, varying numbers of agents and random death. This approach takes advantage of traditional computer science techniques for managing complexity, while relying on biological models for achieving robustness at the local level.