(WITH-AI ...) A developer who used AI to build a web service discovered that the LLM-generated code included sophisticated CSRF protection, complete with macros and detailed comments. The AI refactored the middleware to use functional programming principles and generated a dedicated CSRF module with token generation, validation, and exemption handling for certain endpoints. I vibe coded my web site, not bothering to examine the code generated by the LLM, but giving it specifically directed prompts to generate a secure web service. I cracked open the code today to see how it did. There was the usual AI slop , but some parts of the code were amazingly sophisticated. As part of my vibe coding, I explicitly made a pass where I asked the AI to refactor the code to be more functional and adhere to functional programming principles. This turned out to produce some nice results. The AI refactored elements of the middleware to use some WITH-... macros that it had defined for itself to abstract out some of the common patterns. Let me show you some of what it was doing. Cross-site request forgery CSRF is a common web security vulnerability. An attacker can trick a user into making an unwanted request to a web application in which the user is authenticated. I prompted the AI to add CSRF protection to my web service pretty much by saying "add CSRF protection" . The AI generated a file specifically for CSRF protection. The file starts with this comment: ;; --- CSRF PROTECTION --- ;; ;; Every state-changing HTML