Maintain the package
Protect the public contract
Test documented behavior and types so refactors cannot quietly break consumers.
9 minute lesson
Before choosing a tool or writing more code, make the requirement concrete. Contract tests run against the packed artifact and preserve the documented handling of Unicode and duplicate separators.
The public API includes runtime behavior, errors, types, import paths, environment support, and sometimes performance characteristics. The useful target is not encyclopedic coverage. Make one deliberate choice, observe its consequences, and know which requirement would make you revise it.
A common failure is to treat a passing internal unit test as proof that every consumer contract survived. The happy path may still work, which makes the mistake easy to miss. turn documented examples and previous bug fixes into black-box tests of the public package. Keep the first version small enough that every important input and output remains visible.
This supports the module goal: Maintain the package as a promise to consumers, with explicit support, measured changes, and a retirement path. Capture the request, command, trace, screenshot, test result, or other evidence that proves the result.
Refactor the implementation aggressively while keeping consumer tests unchanged; investigate every failure as a contract question. Change one condition on purpose, predict the result, and compare the prediction with what actually happened.
Lesson completed