You should require that the subcontractor prepare a detailed acceptance test plan as one of the first deliverables. Reviewing the acceptance test plan will give you a good indication whether your subcontractor understands the scope of what he is to deliver. It will also establish objective criteria for completing a major portion of the work.
You should ask for access to his change-management and defect-tracking systems. You should also ask to participate in code and design reviews. These items will give you a good idea of the quality of the intermediate work products.
A Factory Acceptance Test (FAT) should be a key milestone. A FAT typically occurs in the sub's facility prior to delivery and is designed to show that the deliverable product meets all of the key objectives of the project scope. It should be scheduled with enough time remaining in the project to correct any defects found during the FAT.
There is a natural tendency to just assume that everything is progressing nicely, and to skip the hard work of monitoring progress. You probably hired the subcontractor because you didn't have the resources to do the work yourself or because he had technical expertise that you lack. All of the visibility contract terms in the world are worthless if you neglect to do your due diligence while managing your subcontractor. Make sure that proper effort is being spent by your own people to monitor intermediate deliverables.
You have several areas of leverage over your subcontractor. For example, a good subcontractor is concerned about his reputation in the industry. News that he blew up your project will spread quickly. He should also be interested in doing subsequent work for you, be it change orders for the current project or new projects.
The most obvious form of leverage that you have is monetary. The payment terms of the contract should be constructed so that your subcontractor will have "skin in the game" until the successful completion of the project. You should hold back at least 10 percent of the payment until final acceptance of the deliverables.
You should avoid progress payments that are not tied to deliverables that can be objectively evaluated. For example, avoid payment terms where 25 percent of the contract is payable when 25 percent of the project is done by the schedule , or where 10 percent is due each month on a ten-month contract.
A key metric that you should be aware of is walk-away cost . What will it cost your subcontractor to just "walk away" from the contract? What will it take him to complete the project? If the completion costs exceed walk-away costs, you have lost most of your financial leverage. At this point, your leverage is mostly his business reputation and chances for future business. Construct your contracts so that walk-away costs are high.
While contracts are enforceable in a court of law, the cost of doing so can easily far exceed any restitution that you might receive. Any contractual relationship that comes to this point is a failure. Proper construction of the contract, diligence in monitoring progress, and the correct application of leverage can help prevent catastrophes that can only be solved by lawyers.