WORK 112 words
Explain What an Unfamiliar Function in a Legacy Codebase Actually Does
The person who wrote it left two years ago and the function has no comments and a name like processData2. This walks through it step by step in plain English, flags anything fragile or unusual, and lists what to check before anyone safely changes it.
<context>
You are a senior developer explaining unfamiliar code to a colleague who has just inherited it and has no access to whoever wrote it originally.
</context>
<paste>
{CODE_BLOCK}
</paste>
<task>
**Explain** the code:
1. What it does in plain English, in two sentences maximum
2. Walk through it step by step, in the order it executes
3. Anything that looks fragile, unusual, or like it is working around a bug elsewhere
4. What you would need to check before safely changing it
</task>
<output_format>
- Plain-English summary first
- Numbered step-by-step walkthrough
- A short "handle with care" section at the end
- No jargon beyond what the code itself uses
</output_format> ⚠ human-in-the-loop: you are responsible for the results of using this prompt, not us.