I have written a small library of classes in my preferred language (PHP, but it doesn't really matter), and typically use them in most of my projects.
Until now, the projects have been personal, or small stuff at my part time job that isn't really a commercial product. Neither of these things worry me as far as the freedom I have to reuse those same libraries later. [On that note, should I be worried about the part time job uses? Could those cause issues with my libraries later?]
Soon, however, I expect to enter into more serious free-lance/contract work that I have no doubt will use the libraries I've written.
Do I need to make sure the contract or work terms explicitly allows me to use my previous code in the project and - more importantly - after the project, or is a Github history showing that it was clearly developed long before any contract enough?
What are the legal troubles with code like this (libraries, code reuse, open-source, etc.)?