Anything which is published before your filing date is prior art. Something sitting in your garage that only you and your drinking buddies know about or something your coworkers have been chatting about on a whiteboard at the office is not prior art.
This also means that if you want a patent you need to file a provisional application before publishing your work anywhere (e.g. the other commenter’s YouTube example). https://en.wikipedia.org/wiki/Provisional_application
Having a first-to-invent patent system makes patent disputes into complicated messy legal fights about when different people first encountered an idea. First-to-file leaves much less ambiguity.
Less ambiguity is not automatically an improvement. I'm not convinced that the lowered ambiguity of first to file is a net win.
Even with the availability of provisional applications, the 12 month limit on priority date, and the relative stringency required to avoid challenges to the priority date, doesn't seem to tip the scales significantly towards encouraging the creation of what we think of as inventions while simultaneously simplifying possible court proceedings, or lowering ambiguity as you put it.
This also means that if you want a patent you need to file a provisional application before publishing your work anywhere (e.g. the other commenter’s YouTube example). https://en.wikipedia.org/wiki/Provisional_application
Having a first-to-invent patent system makes patent disputes into complicated messy legal fights about when different people first encountered an idea. First-to-file leaves much less ambiguity.