Beyond yourself.
WHAT MAKES CODE MAINTAINABLE
Clear names Small functions doing one thing Obvious structure Documented setup Tests No hidden dependencies
WHAT MAKES IT UNMAINTAINABLE
Clever compact expressions Global state Configuration embedded in code Undocumented assumptions One person's conventions
WHAT TO ASSUME
That someone else will read this, and that it will be you, having forgotten everything.
THE TEST
Could a competent person set this up and change something safely, from the repository alone?
If not, something is missing.
WHAT TO PROVIDE
A readme covering setup and running A requirements file An example configuration Tests, where warranted
WHAT TO AVOID
Undocumented manual steps Dependence on one machine's setup Anything that works only for you
WHAT TO DO BEFORE HANDING A PROJECT OVER
Set it up yourself from scratch, following your own instructions.
WHAT THAT REVEALS
Every step you forgot to write down.