Overview
An agent needs an explicit reason to stop looping. That reason is the definition of done.
The definition of done is the set of requirements the agent must satisfy before it can conclude that the task is complete. It may include:
- A required number of items.
- A required output structure.
- Technical specifications.
- Quality checks.
- Validation tests.
- Formatting requirements.
- Constraints that must remain satisfied.
- Failure conditions that must not be present.
Consider a research request. "Research creatine supplementation in men" gives the agent a topic, but it does not define completion. The system may stop after two sources, ten sources, or a general summary. A stronger request states that the agent should continue until it has compiled at least ten empirical sources and then return a structured evidence report. The agent can now evaluate its progress after every loop: Has it found ten qualifying sources? Has it organized the evidence? Has it produced the required report?
The definition of done changes a vague intention into an executable standard. Without it, the agent must guess when enough work has been performed. With it, the system has a measurable completion route.
Weak prompts commonly fail because they omit this standard. Requests such as "build Netflix 2.0," "make me a million dollars," or "make no mistakes" do not explain the acceptable scope, the constraints, the output, the available resources, the quality threshold, or the conditions that would count as failure. The model may still produce something, but it is being forced to invent critical requirements.
Mastering agents therefore requires a management mindset. The user is responsible for defining the goal and the boundaries of success. The agent is responsible for carrying out the iterative work within those boundaries.