Twitter's only black engineering manager just left the company with a scathing critique of its diversity practices.

In an essay published on Medium, Leslie Miley, who says that he was the only African-American in engineering leadership at Twitter, writes about his conflicted feelings toward a company whose management demographics are so at odds with its user base.

"Every day for almost three years, I have looked forward to making contributions to the platform that enables #BlackLivesMatter, and that amplifies the voices of #BlackTwitter," Miley writes. Citing a Twitter Diversity report, Miley notes that while more than 30 percent of the platform's U.S. active monthly users are black or Hispanic, that demographic makes up less than five percent of its engineering and product management team.

Miley describes uncomfortable situations where he tried to press for greater diversity in the company. He says that Hiring Committee meetings became contentious when he advocated for diverse candidates:

Candidates who were dinged for not being fast enough to solve problems, not having internships at ‘strong’ companies and who took too long to finish their degree. Only after hours of lobbying would they be hired. Needless to say, the majority of them performed well.

Miley says that at one point, when he asked what specific steps his department was taking to increase diversity, the senior vice president of engineering told him, "Diversity is important, but we can't lower the bar."

Miley also notes that while employee resource groups for women offered special opportunities to meet with guests of the company like Hillary Clinton and Mellody Hobson, the employee resource group representing Twitter's black employees did not receive invitations to events featuring Jesse Jackson or former NAACP head Ben Jealous.

"Why wouldn’t there be a concerted effort to invite the few African American employees to these events?" Miley wonders. "Is it because, as one colleague told me, 'they forgot that you were black?'"

A particularly low moment for Miley came when he was working on an initiative with the senior vice president of engineering to track the ethnicity of potential job candidates to better understand where diverse candidates were falling out of the process. The VP suggested that Miley create a tool to analyze candidates' last names in order to classify their identities, a misleading and overly simplistic solution to a problem that extends beyond finding diverse candidates in the job pipeline.

I left that meeting wondering how I could, in good conscience, continue to work in an organization where the Sr. VP of Engineering could see himself as a technology visionary and be so unaware of this blind spot in his understanding of diversity.

TechCrunch reports that although Miley was laid off as part of Twitter's staff cuts in October, he had already told the company that he was leaving at the end of the month. The publication also notes that he had given up a severance package so that he could speak openly about his experience at Twitter.

But Miley's assessment of Twitter had some optimistic aspects as well, particularly regarding the return in August of co-founder Jack Dorsey:

It is my belief that Jack understands the use case of Twitter better than anyone else, understands how diversity can be additive to growth, and is committed to making that happen. The leadership that Jack is showing has been long missing from Twitter and tech.

In response to Miley's critique, a spokesperson for Twitter told NTRSCTN:

We're committed to making substantive progress in making Twitter more diverse and inclusive. This commitment includes the expansion of our inclusion and diversity programs, diversity recruiting, employee development, and resource group-led initiatives. Beyond just disclosing our workforce representation statistics, we have also publicly disclosed our representation goals for women and under-represented minorities for 2016, making us the largest tech company to put hard numbers around its diversity commitment.

Miley says in his essay that with his departure, Twitter no longer has any managers, directors, or vice presidents of color in engineering or product management. ​