How much did Rowling plan ahead?
In book 5, Petunia says,
“I heard — that awful boy — telling her about them — years ago,”
where [them] is Dementors. This sentence strikes me as brilliant writing since "that awful boy" has got to be Snape, but ofc Harry would think it's his dad. So that means she had to have had Snape planned out.
But in book 4, Moody can see through the invisibility cloak, and I refuse to consider that anything but a plot hole. So that would suggest she didn't know about the Deathly Hallows at book 4.
I'm sure there's info about this somewhere but everything Rowling says about the universe is just so dumb, I'm afraid to look.
Like, I just googled and
Angela Morrissey: Why is it that albus dumbledore can see harry under his invisibility cloak at certain moments? (during the series is the cloak only infallible to those who do not own a deathly hallow).
J.K. Rowling: Dumbledore, who could perform magic without needing to say the incantation aloud, was using ‘homenum revelio’ - the human-presence-revealing spell Hermione makes use of in Deathly Hallows.
IT'S A DEATHLY HALLOW IT'S SUPPOSED TO BE UNAFFECTED BY SPELLS