Contracts
- id: 1766057250
- Date: Dec. 21, 2025, 3:19 p.m.
- Author: Donald F. Elger
Goals
- Describe a contract
- Skillfully create and use contracts
- Continually get high payoffs from using contracts
What?
A contract is an explicit or implicit agreement that defines the relationship between actors.
The purpose of a contract is to define the best outcomes that can happen and the best path for reaching those outcomes. A contract also reduces waste, ambiguity, misalignment, and conflicts.
That is, a contract serves to define the “best relationship.”
- Actor
- An actor is a person, group, or entity (code, device, method, webpage, … ) that has a role to play.
- Best
- Best means the highest probability of maximizing rewards minus drawbacks in a holistic sense for the given context and surrounding circumstances.
- Relationship
- In the context of a contract, a relationship refers to the purpose, inputs, outputs, and the criteria for success.
Examples
Coding
In coding, contracts are built in. A function implicitly promises the following:
- If you provide these inputs, it will produce these outputs.
- If something goes wrong, it will respond in defined ways, such as errors, exceptions, or fallback behavior.
Contracts are used extensively in software engineering. They function as promises that make systems reliable and composable.
Problem Solving
A well-developed problem-solving method functions as an implicit contract with its user. The method promises:
- If you follow this recipe skillfully, you will have the highest likelihood of solving your problem.
- You will also follow a high-quality path, not just reach an outcome.
- You will be given guardrails that reduce risk.
- You will have techniques for getting back on track when things go astray.
In this case, the contract exists between two entities: the method and the user of the method. The essence of a high-quality contract is a promise of the highest probability of success in both outcomes and paths.
Relationship
If a relationship between two people is set up with a high-quality contract:
- Both parties get more of what they want most of the time.
- Expectations are clear on both sides.
- There are effective methods for getting things done.
- There are agreed-upon ways to resolve conflicts as they arise.
Here again, the core elements of a contract appear: inputs, outputs, best outcomes, and best paths, without assuming perfection, which does not exist.
Employee / Employer (Poor Contract)
High-quality contracts are uncommon. This often becomes visible in employee–employer relationships where one or both parties are dissatisfied.
The costs of a low-quality contract can include:
- Loss of productivity
- Ongoing conflict
- Reduced enjoyment of work
- Damage to relationships
- Increased turnover and disengagement
Why?
Skilled contract building equips you with the ability to maximize your chances of getting the best results and the best paths across many contexts, including coding, relationships, method development, product development, education, management, and parenting. Even better, it helps handle errors and problems and get things back on track when they go awry.
In short, a high quality contract is a guarantee of success (in a probability sense) in a relationship between you and another actor (person, group or thing)
Building High-Quality Contracts (How to)
A contract is a relationship between two entities: X and Y. Here is the recipe in short hand:
Purpose → Inputs → Outputs → Success Criteria → Reflect & Improve
Here are the recipe steps.
- Figure out the contract purposes
- Why does the relationship exist?
- What rewards can and should this relationship produce?
- Figure out Inputs
- What does X need to provide?
- What does Y need to provide?
- Figure out Outputs
- What is produced?
- What outcomes are needed or desirable?
- Figure out Success criteria
- How we know it worked?
- What exceptions will occur and how will they be handled?
- Reflect and Improve (contract building is iterative; not a one-off)
- What is working and why?
- What are the most useful concerns and how do we address them?
- What, if anything, has been learned about contracts?
- What are next steps?
- What is the current level of quality on the 10 scale? (10 = best quality possible for the context)
Success Criteria
Success Criteria (SC) are the list of desirable or necessary outcomes that define what success looks like. They make the “pot of gold” visible — the rewards that justify the effort — and they must be expressed in observable or measurable terms so anyone can recognize when the gold has been reached.
Quality in a Contract
Quality is the degree to which an entity (a performance, good, service, or experience) fulfills its intended purpose across all relevant dimensions.
A contract has high quality when the following conditions are jointly met.
- It does its job well
- The core function succeeds.
- Examples include code that works as intended, a problem-solving method that reliably produces good solutions, a relationship that functions well for the people in it, and a restaurant that delivers great food and service.
- Clear, concise, and motivating purpose
- The purpose explains why the contract exists.
- When humans are involved, the purpose is motivating enough to drive good execution.
- Well-defined success criteria (the gold)
- Success criteria are measurable or observable.
- They describe the rewards (payoffs) that matter to the human actors involved.
- Well-defined inputs
- What each party must provide is explicit.
- Assumptions are minimized or eliminated.
- Well-defined outputs
- What the contract produces is explicit and distinguishable from success criteria.
- Outputs can be checked or verified.
- Graceful exception handling
- Expected deviations, edge cases, and failures are anticipated.
- Exceptions are handled in ways that preserve as much value as possible rather than treating them as surprises or total failures.
Taken together, these conditions are necessary and sufficient for a contract to achieve high quality in real-world use.
Pitfalls and Tips
Exceptions are not the same as errors or problems.
- Errors and problems often imply something went wrong
unexpectedly.
- Exceptions are expected deviations from the happy path.
- In contract build, we anticipate and deal with problems, conflicts, and messiness; this is part of the process.
- Errors and problems often imply something went wrong
unexpectedly.
Build contracts iteratively
- First iteration captures the essentials
- Later iterations pick up more details and build in more exception handling.
The label “contract” can be off putting in many contexts. There are many synonyms to use. So pick the one that works best.
- Whatever you call a contract, the essential elements are the same
- Here are some possible synonyms
- agreement, promise, specification, blueprint, design, definition, description, model, interface, framework, schema, plan, recipe, playbook, protocol, guide, promise, offer, value proposition, payoff definition
AI assistants (ChatGPT, Gemni, Claude, DeepSeek, etc.) are super useful for assisting with contract building.
Success Criteria (For this Lesson)
Success (the gold) is reached when the following criteria are jointly met.
- Answer 5W1H questions (what? why? how? who? when? where? how much?) about contracts and the related concepts such as exceptions, gold (rewards), success criteria.
- Create a contract and iteratively improve it to high quality.
- Diagnose and fix problems with contracts.
- Evaluate the quality of a contract
- Create contracts in areas in which contracts are not usually applied.
- Get high positive payoffs from designing, building, improving and using contracts.
TwFs (Tasks with Feedback)
Why build contracts?
Feedback
Highest chances of a great relationship as defined by best results + best path for both actors.
Build a contract for a Restaurant ↔︎ Diner
Feedback
- Purpose:
- Exchange money for a great meal and a good overall experience.
- Enable a flourishing, sustainable business for the restaurant.
- Inputs:
- Diner: payment, clear orders, reasonable behavior.
- Restaurant: food, service, ambiance, clean and safe environment.
- Outputs:
- Prepared meals.
- Service.
- Dining experience.
- Success criteria:
- Food tastes good and is safe to eat.
- Food is delivered in a reasonable amount of time.
- Diner leaves satisfied and willing to return.
- Staff are treated well and can do their jobs effectively.
- The restaurant is profitable enough to continue operating.
- Exceptions:
- Unruly or abusive customers.
- Wrong or missing orders.
- Long waits or service breakdowns.
- Poor food quality.
- Complaints or disputes.
- Theft or non-payment.
- Handled through remakes, refunds, apologies, removal of customers, or other corrective actions that preserve as much value as possible.
Build a contract for a Dog ↔︎ Owner
Feedback
- Purpose:
- Companionship, enjoyment, and sometimes social status for the owner.
- Food, shelter, safety, care, and belonging for the dog.
- Inputs:
- Dog: being itself, responding to training, basic cooperation (house rules, commands).
- Owner: food, water, shelter, safety, training, veterinary care, exercise, socialization, cleanup, time, and attention.
- Outputs:
- Companionship and emotional connection.
- Shared experiences (walks, play, trips).
- Security and awareness (barking, presence, warning behaviors).
- Success criteria:
- Dog is healthy, safe, and well cared for.
- Dog is up to date on vaccinations and basic medical care.
- Dog is reasonably well-mannered and responds to commands appropriate to its breed and age.
- Owner enjoys the relationship and feels the dog adds value to their life.
- Dog is treated as a valued member of the household.
- The relationship is enjoyable for both dog and owner.
- Exceptions:
- Biting or dangerous aggression.
- Excessive barking or destructive behavior.
- Dog escaping or getting lost.
- Dog illness or injury.
- Abuse or neglect by the owner.
- Fights with other dogs.
- Chasing or harming people or animals.
- Handled through training, behavior modification, medical care, containment, rehoming, or intervention by professionals when needed.
Build a contract for a Fiction Book ↔︎ Reader
Feedback
- Purpose:
- Deliver a compelling story about the human experience.
- Engage the reader emotionally, imaginatively, and intellectually.
- Provide enjoyment, meaning, insight, or escape for the reader.
- Inputs:
- Book: story elements such as characters, setting, plot, language, structure, and medium.
- Reader: time, attention, willingness to engage, imagination, and basic literacy in the book’s language and genre.
- Outputs:
- A completed reading experience.
- Emotional, imaginative, or intellectual responses in the reader (e.g., enjoyment, insight, reflection).
- Success criteria:
- Reader finds the book engaging and worth their time.
- Reader finishes the book or meaningfully engages with it.
- Reader feels rewarded (entertained, moved, enlightened, or satisfied).
- Reader is willing to recommend the book or read similar books.
- Exceptions:
- Reader abandons the book due to boredom, confusion, or mismatch of expectations.
- Book content is poorly written, incoherent, or misleading relative to genre signals.
- Reader expectations do not align with the book’s style, pacing, or themes.
What is the recipe for a high-quality contract?
Feedback
Purpose → Inputs → Outputs → Success Criteria → Reflect and Improve