Again, original sentence,
"All of these details are publicly available in patents, and were carefully written to not leak anything."
I'll simplify:
"Details available in patents, carefully written to not leak"
What's been written? The patent.
What is in the patent? Details.
How are the details written to not leak? Carefully.