So for that rule #17, I think just to prevent DOS I will make a simple rule: if the sum of inputs is < 0.01 and transaction fee is < 0.0005 then reject it. Hopefully something like that is reasonable as a start.
The anti-DOS rule is:
A 0.0005 fee is required if any output is smaller than 0.01 (not the sum of the inputs) or if the priority is less than 51,000,000.
You calculate the priority as sum(input value * confirmations)/tx_data_size
If your change would be smaller than the fee 0.0005 the wallet is smart enough to give it up as fee to avoid the 0.0005 fee— but it's not generally smart enough to always pick the mixture of inputs required to avoid a fee and could be improved. What it currently does is tries to find the smallest set of inputs that sum to at least your transaction value, first using only input txn which have 6+ confirms, then 1+ confirms (and your own zero confirm txn), then using unconfirmed inputs.