Understanding how cell identity is encoded by the genome and acquired during differentiation is a central challenge in cell biology. I have developed a theoretical framework called EnhancerNet, which models the regulation of cell identity through the lens of transcription factor-enhancer interactions. I demonstrate that autoregulation in these interactions imposes a constraint on the model, resulting in simplified dynamics that can be parameterized from observed cell identities. Despite its simplicity, EnhancerNet recapitulates a broad range of experimental observations on cell identity dynamics, including enhancer selection, cell fate induction, hierarchical differentiation through multipotent progenitor states and direct reprogramming by transcription factor overexpression. The model makes specific quantitative predictions, reproducing known reprogramming recipes and the complex haematopoietic differentiation hierarchy without fitting unobserved parameters. EnhancerNet provides insights into how new cell types could evolve and highlights the functional importance of distal regulatory elements with dynamic chromatin in multicellular evolution.