The solution that PVirtanen and Chronos provide makes sense as far as I can see.
On day X, if a monk sees X-1 other monks infected, he would know that he too is infected and should kill himself. On day X+1, there is no plague.
The “you are a writer” bit appears to be there to justify the one piece of knowledge that is given to the monks–that at least one of them has the plague. We are also making the assumuption that these monks are a logical order.