I have been working on contract for 4 years developing software. (and more than a decade before that as a regular employee elsewhere) The contract is conventional in that the work I do for them belongs to them and I have no problem with that.
About a year ago, I became aware of a "problem" that would benefit from a software fix and counted a few distinct industries that would benefit from my solution. All of these were outside the scope of my current employer/client's industry.
A few months before that, I formed an LLC. I did that primarily for asset protection and potential corp-corp contracts without particular regard for developing my own product. My solution for this problem is essentially my first product. Since my contract is full time and family life important, my time on my project has been minimal. I have little more than notes and an early project that I developed on my own time and on my own equipment. I am not particularly concerned about someone scooping my product as this is a decades-old problem that nobody has yet solved despite its simplicity.
My client approached me recently about a problem they are having with the systems my software runs on (it is not a problem with the software I develop for them). This problem is nearly identical to the one I wish to solve with my own project. As it is not yet finished, however, I will need to spend a good amount of time developing and testing it. I cannot, then, immediately offer them a finished product.
My goal is to maintain my main contract and the good working relationship I have with my client while also maintaining ownership of the product I conceived of and have so far developed solely on my own time. My question is, how should I negotiate this arrangement with my client?