Task 1 goes through an iterative development process and is checked in for review, he gets $20
Task 1 passes automated testing, he gets $30.
Task 1 passes QA with no bugs, he gets $20.
Task 1 passes UAT, he gets $20.
Task 1 is deployed to production, he gets $10.
Sorry, but:
A smart contract cannot assert the code has been checked in for review
A smart contract cannot assert the above code passes automation
A smart contract cannot assert the code has no bugs
A smart contract cannot assert it passes UAT
A smart contract cannot assert assert it wast deployed to production
There are a lot of tools already, such as Visual Studio online that do lots of metrics, code coverage, analyse etc.