DocumentationGeneric
Explain Complex Code
Get a clear explanation of confusing code
Prompt
Explain this code to me. I'm having trouble understanding it:
[paste code]
Explain:
1. What does it do overall? (one sentence)
2. Walk through it step by step
3. Why might it have been written this way? (design intent)
4. Are there any gotchas or non-obvious behaviors?
5. If I needed to modify it to [describe change], what would I touch?