coding template
Explain this codebase to me
Gets you oriented in unfamiliar code fast.
Use this templateOpens the composer with the prompt filled in. Free — an emailed code is all you need.
The prompt
Copy it, or use the button above to drop
it straight into the composer. Everything in [SQUARE BRACKETS] is a
slot you fill in.
I've inherited this code and need to understand it before I change anything. ``` [PASTE FILE OR MODULE] ``` Context: [WHAT THE APP DOES, WHY I'M IN THIS FILE] Explain in this order: 1. What this module is responsible for, in two sentences. 2. The data flow — what comes in, what transformations happen, what goes out. Name the actual functions. 3. The non-obvious decisions and why they were probably made that way. Distinguish "deliberate" from "accumulated". 4. The parts that will bite me: hidden state, implicit ordering requirements, side effects, things that look pure but aren't. 5. What I should read next to have the full picture, and what I can safely ignore for now. 6. If I need to change [MY INTENDED CHANGE], the specific places that will need to move together. Don't restate the code line by line. Tell me the model I need in my head to work on it.
When to use it
- You have an error and want the cause, not five things to try
- You've inherited code and need the model in your head before changing it
- You want tests for the cases that actually break, not the happy path
Which mode suits it
Code questions want the answer first and an explicit “I can't see that” instead of a confident guess about code that wasn't pasted in.
- Precise — shorter, fact-first, no padding