A Contract Is Just An Understanding

I'm happy with the strongest interpretation of the term contract.... the penalties for violating the contract are _always_ harsh, immediate, require no enforcement and no higher court will change that.

Your code just plain won't work properly.

I'd merely add that the contract is _always_ open for renegotiation by _all_ parties involved.

And that's the tricky bit. The "_all_ parties involved".

To change the contract you have to get every client and every implementation on board to agree to (and implement at the same time) the changes.

Which is where one starts talking about Open Closed and the Interface Segregation Principles.

That said, usually the refactoring that results in most lines of code deleted (across the whole system), arises from a subtle renegotiation of a contract.