However, there is a difference between safety and liability. The commit message ought to mention tradeoffs or alternative attempts. It may never happen, but post-mortem folks will want to have the assurance of thoughtfulness.
That's true even if it's your own invention. You would want to note prior work. (If there aren't any or none was searched, you wouldn't have to cite anyway.) Likely though, implementors and adopters are interested in the design and references.
The prompt doesn't necessarily need to be committed to source control, but it does bring up a question: if the prompt can reproduce the (company-owned) code diff, doesn't it need to be independently auditable as well?
Same with local scripts. It's on the company machine, but it's not really as inspectable as on a remote branch. Does one default-share those? Some are truly experimental. That would depend on policy. (A major outage can influence policy.)
It's easier if the prompt is on a company account; then only the link needs to be included, instead of a massive text file.
However, I don’t paste the prompt I used nor do I mention any LLM. LLMs might have spit out the code. But I edit the code, iterate the code and ensure that the code works as it is supposed to. So I give no attribution.
Howeer, if I do ‘vibe code’ and copy-paste code as-is or make only minor changes, I will place the prompts or URL to the LLM chat that I used - so that I can recreate / continue the session if I want to.
Same thing.