Over time, any decent developer creates a set of tools that helps them get the job done. Things like Utils classes, build scripts, etc, that aren't really part of any business logic of the company you're working for. Some of these things are trivial, while others may have been developed over years.
My question is- what do you do with these tools when you change jobs? What are the legal repercussions of bringing them with you to your next job? Must you totally abandon your accreted toolset, and start over from scratch? Is it legal to recreate them from memory? I realize that the answer in many cases depends on what kind of paperwork you signed prior at the beginning of employment, but are there any general guidelines to follow?