It’s hard to think of an affliction crueler than ALS, or Lou Gehrig’s disease, a neurodegenerative disorder that, over time, renders its victims helpless. And so there’s something beautiful about the slender, cryptic, almost hallucinatory volume of prose that Pulitzer Prize-winning playwright and actor Sam Shepard, who died of ALS complications at age 73 on July 27, left behind as an epitaph.

Spy of the First Person (Knopf, 82 pp., ★★★ out of four), an autobiographical work of fiction, comes with a poignant back story. Shepard, whose illness had not been made public, began working on the book in 2016, writing by hand. When that became impossible, he used a tape recorder, with family members transcribing. Musician Patti Smith, a friend, helped Shepard with edits, and he gave the final manuscript to his daughter just days before he died.

There are references in Spy of the First Person to his actual sisters and two sons and daughter, so reality fleetingly intrudes upon this fragmentary, disjointed narrative, in which Samuel Beckett’s influence on Shepard (Buried Child, Fool for Love) has perhaps never been more apparent. It’s Waiting for Godot in the desert.

Who is the “Spy of the First Person”? It could be Shepard spying on himself, watching himself deteriorate. It could be, and perhaps is, God. Waiting.

As this little book with the brilliant title begins, someone is watching a man on a screened-in porch in a rocking chair, which, we learn later, is a wheelchair. The point of view shifts between the watcher and the watched. (“Sometimes it feels like we’re the same person,” Shepard writes.)

It’s unclear at times who is sharing this flood of memories, of grandparents, of a terrible day when a racehorse was shot by a sniper, of a woman being beaten, of a man escaping Alcatraz (real or a movie?). The reader must follow the flow; but, like trying to decipher someone else’s dreams, it’s not always easy.

The book startles with quick, elliptical references to the unnamed man and his illness, discovered after spinal taps and MRIs and blood tests and X-rays. “Nothing seems to be working now. Hands. Legs. Nothing. I just lie here.”

And later, “You notice the progressive nature of things. Things run down. You notice how different. You don’t want to believe it.”

Eventually, having to ask for help to…