A clever shortcut becomes a burden when the reason for it disappears with the person who wrote it. I document the constraint that justified unusual code, not merely what the code does. Future maintainers can then remove the workaround when the constraint changes.
Comments that narrate every line age quickly; decision records survive longer. Good maintenance leaves permission to simplify, not an obligation to preserve complexity. The maintenance note describes the user need and the interface relationship the change must preserve, then gives tests for any future replacement.
A maintainer arriving years later can update a dependency or component without copying obsolete implementation details. The design is handed over as criteria and constraints, allowing adaptation while protecting behaviour that users and other systems still rely on. Each workaround carries an expiry condition and the problem it originally solved.
A successor can simplify the system confidently because the documentation gives criteria for adaptation instead of turning temporary complexity into permanent architecture.