I think basically what needs to be said has been said.
But as hw3k6i said, 你写的很好 still makes sense and therefore is actually not grammatically wrong.
The original version of the "N1 + V + 的" pattern is "N1 + V + 的 + N2", which is a relative clause that can be seen as "The N2 that + N1 + V" in English. When N2 can be inferred, it's very often dropped and becomes "N1 + V + 的" only, which can be seen as "what N1 + V" in English. Therefore, 你写的很好 can be seen as an easy way to say 你写的 (文章/东西) 很好. I think you have known the "N + V + 得 + adv" structure well so I won't go on and rant about it.
Here's a practice. What should it be when you hear "你做 de 很好"? Is the pinyin part for 的 or 得? The answer is: it depends.
你做得很好 means "You did/does well".
你做的很好 means "What you did/do is great".