Docs

Goals: what should stay true

A goal is something that should stay true: the site answers, the nightly backup ran, the sign-up page loads. kwant checks it on a schedule, without a bot. While everything is fine you see one quiet line. When a goal breaks, a bot looks into it and you get one decision with what it found and the fix it proposes.

The Goals strip above the Mission board: 1 needs you, 1 draft to approve, 1 can't check, 3 OK. "The site stays up" needs you: the site answers check has failed since 10:03 PM, the likely cause is a full disk so nginx returns 502, and the proposed fix is to delete logs older than 14 days and rotate them weekly, with Fix it, Not now and Always fix this goal buttons. Below, a drafted goal waiting for review and goals that are OK.
Goals sit above the Mission board. A broken goal brings one decision.

Make a goal

Goals are new in 0.6.5. Open the Mission board and pick New goal. Say what should stay true in a sentence, and the bot you pick drafts the checks. You review the draft before anything runs. Prefer to write them yourself? Pick Add checks myself.

You can also make a goal from finished work: on a verified task whose checks passed, Keep this true turns those checks into a goal.

A bot never starts a goal by itself. It drafts one only when you ask, a draft does nothing until you approve it, at most 3 drafts wait per space, and a draft you don't approve is removed after a week.

Checks

Checks run on their own, without a bot or a model. A goal is OK when every required check passes.

CheckWhat it looks at
A pageHTTP status, response time, whether the page shows some text, or a value in its JSON
A commandIts exit code, whether its output shows some text, or a number in its output
A fileThat it exists, that it contains some text, or that its checksum matches
  • Plain matching. "Shows" looks for the exact text you give. There are no patterns to get wrong.
  • Required or advisory. An advisory check shows on the card but doesn't decide OK.
  • How often. Every 15 minutes to once a day, every hour unless you change it. A goal counts as broken after 2 failed checks in a row by default.
  • Can't check is not Failing. When a check can't run at all, the goal says Can't check, not Failing. One dropped connection right after a passing check keeps the goal OK; a second in a row shows Can't check.

When it breaks

Each goal says what happens when it breaks:

SettingWhat happens
Just tell meYou hear about it. Nothing else runs.
Suggest a fixThe default. A bot looks into it and plans a fix, which waits for you.
Fix itThe bot looks into it and fixes it, and the goal's checks confirm the fix.

A broken goal gets one Restore mission on the board. First the bot looks into it, without changing anything. With Suggest a fix, you then get one decision with the likely cause and the proposed fix, marked as the bot's report, not instructions:

  • Fix it runs the fix now.
  • Not now keeps the fix waiting. It's dropped if the goal recovers on its own.
  • Always fix this goal fixes it now, and next time without asking.

Limits that keep it calm

  • One line while everything is OK, for example "3 goals OK · checked 4 min ago".
  • At most 3 notices per goal a day, and only when its state changes.
  • Goals in the same folder that break within 10 minutes share one Restore mission, and one fix runs per folder at a time.
  • At most 2 fix attempts per break and 3 fixes a day per goal, with an optional token limit for fixes. Past that, the goal says Needs you.
  • After a fix, the folder's other goals are checked again. If one of them broke, that comes to you.
  • A fix runs with the bot's usual approvals and Flight School tier. A goal never gives a bot more freedom.
Nothing to switch on. Goals show with the Mission board. Upgrading to 0.6.5 starts no checks and no background work: nothing runs until you create or approve a goal.