Brain regions devoted to instinctual behaviors, including the vertebrate hypothalamus and arthropod cerebrum, contain bespoke neural circuits dedicated to perceptual and internal regulation of many behavioral states. These circuits are usually complex in structure and contain an extensive diversity of cell types. The regulatory mechanisms that pattern circuits for instinctual behaviors have been challenging to elucidate. Here, we developed methods in Drosophila to transcriptionally profile identified neuronal stem cell lineages in the cerebrum. We applied this method to lineages that generate sex-differentiated neurons with known circuit roles. We identified 91 transcription factors that, in combinations of 6-8, delineate cerebral hemilineages - classes of postmitotic neurons born from the same stem cell and sharing Notch status. Hemilineages comprise the major anatomic classes in the cerebrum and these transcription factors are required to generate their gross features. We further identified 33 transcription factors characteristic of neuronal birth order within lineages; these subtly differentiate neuronal subtypes to provide common computational modules to circuits regulating different behaviors. Our findings suggest that hemilineage and birth order transcription factors operate in a hierarchical system to build, diversify, and sexually differentiate lineally-related neurons that compose complex instinctual circuits.