I think you left out a few words that most English writers would include. So instead of:
> "ensure that numbers from one to ten as written as words and numbers greater ten as digits in the given text",
something like the following might be better for most people:
> "ensure that the numbers from one to ten are written as words, and the numbers greater ten are written using numerical digits in the given text"
There are multiple ways to write this, so other people may have better versions.
I'm not an English grammar expert, so I cannot explain to you why the addition of those extra words helps with the clarity of that sentence.