LoopFlow
Tutorial Workshop Keywords ๐ŸŽฎ LoopFlow Lab
Keywords / goal

goal

What "done" means, in plain language. Core syntax

Syntax

goal: <text>

What it does

The objective, stated plainly โ€” one line of natural language that names the outcome the loop is chasing. It is required in every loop: a loop without a goal does not parse, and each stage of a pipeline carries its own. The goal frames the work โ€” it is what the planner reads first and what every cycle steers toward โ€” but it does not decide success. That job belongs to done when, the machine-checkable predicate underneath it.

Reach for a sharp goal because it is the loop's compass, not its finish line. Write it as an outcome ("settings save when the name has an apostrophe"), not a task list ("edit the form and the API"), so the agent is free to find the smallest correct change instead of following your guessed steps. The authoring order puts goal first and done when immediately under it for a reason: if you cannot phrase a check for the goal, the goal is not yet understood โ€” that is the signal to sharpen it before writing another line. A goal broad enough to need three tests is really three stages; a goal you cannot verify at all is a prompt, not a loop.

Example

goal: settings save when the company name has an apostrophe
a goal line

Paired with its check

loop "fix billing apostrophe bug":
  goal: settings save when the company name has an apostrophe
  done when the test "billing.spec.ts::apostrophe" passes
goal on top, the check right under it

Common mistakes

Related