You should look at Taskwarrior for some inspiration! I use TW and it has the features you mentioned(and I use them regularly). Urgency is derived from certain coefficients[1].
Anyway I'd be interested in learning Taskwarrior, but in my day job I work in a team and I can't make them use that kind of tooling.