Examples, in your words
Your agent writes each example in 3 parts: what is true before, what the action is asked, and what must happen. Typestate runs each example in Sandbox. An action whose examples fail cannot go Live.
How Typestate does it
- Typestate reads each action and lists the situations that need an example: each way through it, each refusal, and each failure of a connected system.
- Your agent asks you what must happen in each situation and writes your answer as an example. Typestate never writes the answer.
- Typestate runs each example after each change, and a model reads each one against the steps it is about.
What you can do with it
- Say that a second sign up never sends a second mail.
- Say that an order over the stock is refused, and nothing is written.
- Set the clock in an example to prove what happens at exactly 24 hours.
What Typestate gives you
- Written by
- your agent, from your answers
- Runs
- on paid plans, in Sandbox
- Live
- waits for an example of each situation, and refuses a failing one
Say this to your agent
Write an example: an order for more than we have in stock is refused.