A number of agent-oriented programming systems are based on a framework of beliefs, desires and intentions (BDI) and more explicitly on the BDI logic of Rao and Georgeff. In this logic, goals are a consistent set of desires, and this property is fundamental to the semantics of the logic. However, implementations based on this framework typically have no explicit representation of either desires or goals, and consequently no mechanisms for checking consistency. In this paper we address this gap between theory and practice by giving an explicit representation for a simple class of desires. The simplicity of this class makes it both straightforward and efficient to check for consistency. We provide a general framework for conflict resolution based on a preference ordering of sets of goals, and we illustrate how different rules for specifying consistent goal sets (corresponding to different preference orderings) relate to existing commitment strategies. We also report on some implementa...