Start with an issue you recently solved. Write the question as you first encountered it, then identify the language or framework version and link to the part of its documentation that answers it.
Preserve the smallest useful example
Include the input, the expected output and one case that failed before the fix. Remove secrets and customer data. Keep the code short enough that a colleague can run it without opening the original repository.
Update the note when its assumptions change
After an upgrade, rerun the example and check the linked documentation. If it fails, retain the old version information while adding the new result. That makes the reference useful when you maintain projects on different releases.
