|who||whom (or, informally, who)|
Who wrote that enthusiastic letter?
He wrote that enthusiastic letter.
[Subject: Use who.]
Whoever could have written it?
She could have written it.
[Subject: Use whoever.]
Who[m] were they describing?
They were describing him.
[Object: whom (formal); though who is common in speech and writing.]
They want to know who runs the business.
[subject of clause = who]
They want to know who I think runs the business.
[subject of clause = I]
They want to know whom the manager reports to.
[object of to know= whom]
I will hire whoever is qualified.
[subject of clause = whoever]
I will hire whomever my boss recommends.
[object of recommends = whomever]