The first sound we hear on good kid, m.A.A.d. city is a prayer: "Thank you, Lord Jesus, for saving us with your precious blood," voices murmur, evoking a family dinner gathering. The album's cover art, a grubby Polaroid, provides a visual prompt for the scene: Baby Kendrick dangles off an uncle's knee in front of a squat kitchen table displaying a 40-ounce and Lamar's baby bottle. The snapshot is such an unvarnished peek into the rapper's inner life that staring at it for too long feels almost invasive. This autobiographical intensity is the album's calling card. Listening to it feels like walking directly into Lamar's childhood home and, for the next hour, growing up alongside him.

Lamar has subtitled the record "A Short Film by Kendrick Lamar", and the comparison rings true: You could take the album's outline and build a set for a three-act play. It opens on a 17-year-old Kendrick "with nothing but pussy stuck on my mental," driving his mother's van to see a girl named Sherane. As his voice darts and halts in a rhythm that mimics his over-eager commute, Lamar explores the furtiveness of young lust: "It's deep-rooted, the music of being young and dumb," he raps. The song is interrupted by the first of several voice mail recordings that delineate the album's structure: Kendrick's mother, rambling into his phone and pleading for him to return her car. These voicemails appear through the record, reinforcing that good kid, m.A.A.d city is partly a love letter to the grounding power of family. In this album's world, family and faith are not abstract concepts: They are the fraying tethers holding Lamar back from the chasm of gang violence that threatens to consume him.

All this weighty material might make good kid, m.A.A.d city sound like a bit of a drag. But the miracle of this album is how it ties straightforward rap thrills-- dazzling lyrical virtuosity, slick quotables, pulverizing beats, star turns from guest rappers-- directly to its narrative. For example, when "Backseat Freestyle" leaked last week, its uncharacteristic subject matter ("All my life I want money and power/ Respect my mind or die from lead shower") took some fans by surprise. But on the album, it marks the moment in the narrative when young Kendrick's character first begins rapping, egged on by a friend who plugs in a beat CD. Framed this way, his "damn, I got bitches" chant gets turned inside out: This isn't an alpha male's boast. It's a pipsqueak's first pass at a chest-puff. It's also a monster of a radio-ready single, with Kendrick rapping in three voices (in double- and triple-time, no less) over an insane Hit-Boy beat.

Lamar grew up in Compton, and ghosts of West Coast gangsta-rap haunt this album's edges, casting shadows on Kendrick's complicated relationship with his hometown. When "The Art of Peer Pressure" brings Kendrick and his friends to Rosecrans Ave., the music downshifts into menacing G-funk mode as a salute to hallowed ground. Ice Cube’s “Bird in the Hand” is invoked to set up “m.A.A.d city” (“Fresh of out school, 'cause I was a high-school grad..."), which appropriately marks the moment when real violence erupts. Here, Kendrick sounds like a terrified kid: "I made a promise to see you bleeding," he raps, his voice pitched at a pleading, near-hysterical sob. In response, the voice of Compton's Most Wanted rapper MC Eiht leers, "Wake yo' punk ass up," like a father figure of the Darth Vader variety.

Which brings us to the album's most visible benefactor and most unsettled presence: Dr. Dre. In recent months, Dre has availed himself of the fresh-career oxygen Kendrick's rise has pumped into his atmosphere, lumbering out of his corporate airlock to stand with Lamar on magazine covers. But the role he plays in Lamar's story feels muddled and unresolved. On an album that manages to seamlessly work a smirking Drake and a highly recognizable Janet Jackson sample ("Poetic Justice") into the fabric of a larger narrative, it is only Dre's appearance, on the final track "Compton", that feels like an uneasy outlier.

"Compton" is the victory lap, the coronation. Coming after the stunning 12-minute denouement "Sing About Me, I'm Dying of Thirst", in which Lamar delivers a verse from a peripheral character that is the album's most dazzling stroke of empathy, it can't help but be a small deflation. The moment of arrival in any artist's story is always less interesting than their journey, and there's a disconnect in hearing Lamar and Dre stunt over Just Blaze's blaring orchestral-soul beat. Dre's music is part of the landscape that Kendrick grew up in but his actual appearance has a certain Truman Show feel to it.

But the true ending of good kid, m.A.A.d. city takes place at the end of the previous song, "Real", which represents the spiritual victory that the album's story has thrashed its way towards. Finally grasping that "none of that shit"-- money, power, respect, loving your block-- "make me real," Lamar embraces what does, as his parents put the album's central concerns to bed: "Any nigga can kill a man," his father admonishes. "That don't make you a real nigga. Real is responsibility. Real is taking care of your motherfucking family." And his mother: "If I don't hear from you by tomorrow, I hope you come back and learn from your mistakes. Come back a man... Tell your story to these black and brown kids in Compton... When you do make it, give back with your words of encouragement. And that's the best way to give back to your city. And I love you, Kendrick."