Data-deleting scripts need to be handled with extreme caution, and a readiness to use
Edit > Undo ⌘Z immediately afterwards.
If you wanted to create one, you could uncomment the delete line in something like this:
Code:
tell application id "OFOC"
tell default document
set refZap to (flattened projects where completed = true and name contains "routine")
-- delete refZap
end tell
end tell