Contracts are often pointed to as one of the structures that appear to act as obstacles to the adoption of Agile process and practice adoption in teams. Yet at the same time 'contractual thinking' seems to be behind the use of User Stories, Product Backlogs, Unit Tests and Test Driven Development, all of which are key practices on SCRUM, XP and Agile teams.
Mike Cohn of Mountain Goat Software writes about these contractual aspects of Agile teams but also, how to write contracts that work well in these environments (link)