I told my boss I had an idea for a program that could improve efficiency across much of the business, and he let me build it on company time. In the long term, he wanted to be able to sell it to other companies. However, the program never got implemented due to personnel mismanagement, and I’d rather be able to post it on my github under a free licence so I can use it as a resume item, and at least someone would have the chance to actually use it. It’s all still in my head, and I could write it again if I wanted. If I do, is it illegal to publish it? What if I write it in a different language? Do I need to change the variable names? I did plenty of research and planning on company time to build it, and it’s not like I can research it again, it’s all still in my head.
Ask your boss.
I would never rely on the opinion of my boss when the question is what my rights are. They’re usually not a lawyer and their interests are often contrary to mine.
It’s usually much easier to just ask for what you want before getting lawyers involved.
I’ve found that getting people to sign a contract is much more difficult than you’re making it out to be. A verbal agreement from your boss isn’t worth shit later when you’d need it to hold up.
Where did I say verbal?
I’ll restate. Getting something in writing isn’t easy (and has high potential to involve lawyers). And verbal agreement’s aren’t worth your time. So your advice isn’t the simple thing you’re presenting.