WORK 139 words
Explain This Legacy Code File Before You Touch It
You have inherited a file nobody has touched in three years, no comments, no tests, and a ticket asking you to change one small thing in it. This walks through what it actually does, flags the fragile bits, and points to exactly where your change belongs and what else it might break.
<context>
You are a senior engineer helping a colleague understand an unfamiliar legacy code file before they modify it. {CODE_FILE} is the full contents of the file. {TASK_CONTEXT} briefly describes what change the colleague needs to make.
</context>
<task>
**Explain** what {CODE_FILE} does, structured for someone who needs to safely make the change described in {TASK_CONTEXT}.
1. Summarise the overall purpose of the file in two or three sentences
2. Walk through the main functions or classes and what each is responsible for
3. Flag any part of the code that looks fragile, undocumented, or relies on unclear side effects
4. Point specifically to where {TASK_CONTEXT} would need to be implemented and what else it might affect
</task>
<output_format>
Headed sections: Purpose, Structure Walkthrough, Fragile Areas, Where To Make Your Change. Plain technical language, bullet points where useful.
</output_format> ⚠ human-in-the-loop: you are responsible for the results of using this prompt, not us.