Not so. The Dharmasastras were written. But they were the products of recollecting a life lived according to the injunctions of the Shruti.

Dharmasastras are not said to be apourusheya...they have definite human authors. To make it easy to understand, let me put it this way. The Sages who saw the truth of the Vedas then lived accordingly. When they recollected the manner in which they carried out the Vedic injunctions, they decided to put it down as Dharmasastras so that others who had not "seen" like they had can also benefit by it.