Serving markdown to AI agents via content negotiation

How to make any docs site agent-friendly by serving raw markdown to AI agents and HTML to humans from the same URL, using HTTP content negotiation.