Skip to content

Questions and queues

Most of a motion is mechanical. The interesting cases aren’t: two companies that might be the same, a CNPJ that matches three registrations, a lead that’s almost in the ICP. A step doesn’t guess on those. It asks a question, and a person who knows answers it.

A question has a type, a prompt, and two to four options. It can also carry a recommended option, evidence the step found, and a risk level.

const answer = await ctx.ask({
type: "domain_owner",
prompt: `rdap says ${rdap.registrant} owns ${domain}. Is that ${company.core.name}?`,
options: [
{ id: "same", text: "Same company: keep going" },
{ id: "other", text: "Someone else: drop it", effect: "drop" },
],
evidence: [{ source: "rdap.lookup", shows: `registrant: ${rdap.registrant}` }],
});

The person answering sees the prompt, the options, the evidence, and the company’s facts so far.

  • ctx.ask blocks. The company waits in the waiting lane until someone answers. Then the step runs again from the top, and this time ctx.ask returns the chosen option’s id.
  • A question in the step’s return value doesn’t block by default. The company carries on with the step’s facts, and the question waits on the side as a warning. Set blocking: true on it to make the company wait for the answer.

Either way, when a person answers, the step runs again with the answer: ctx.ask returns it, and ctx.answer(type) reads it without asking.

Each option has an effect on the company, continue unless you say otherwise:

Effect What happens to the company
continue Nothing: the step gets the answer and carries on.
hold It moves to the held lane, out of the batch, with the reason <type>: <option>.
drop It moves to the dropped lane, with the same kind of reason.

This holds for non-blocking questions too: answering a warning with a drop option drops the company.

Every question goes to the queue named after its type. motion.yaml says who owns each queue, how long it has, and what happens if nobody answers:

queues:
domain_owner: { title: Who owns this domain?, owner: ana, deadline: 1d, default: hold }
  • owner is the handle of the person who answers. The motion’s approvers can answer any queue too.
  • deadline is a duration from when the question was asked, such as 4h or 2d, or a key of the motion’s calendar.
  • default is what the question gets at its deadline: hold, drop, continue, or recommended for the step’s recommended option.

A question whose type has no queue in motion.yaml goes to the first approver, with no deadline, and defaults to hold.

A step can propose its own answer with suggest, along with how sure it is:

  • A low-risk suggestion answers the question on the spot. It’s recorded as answered by the step, and the company doesn’t wait.
  • A high-risk suggestion is shown to the person answering, who can accept it with one click. Approvers can accept every pending suggestion in a batch at once.

This is how a motion starts cautious and grows confident: suggest at high risk, watch how often people agree, then lower the risk where they always do.

  • Today: the questions that need you, across every batch.
  • Questions: every open question in the tenant, yours first, then by deadline.
  • The batch: a company’s drawer shows its questions in place.

See Answer and approve for the day-to-day, and Ask questions for writing them.

Motions is built by Pruma. These docs describe what the platform does today; Limitations lists what it doesn't do yet. Open the app