# NeedsClarification
Source: https://docs.maelstrom-ai.co/dev/reference/protocol/interfaces/needsclarification/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

Defined in: [packages/protocol/src/lib/needs-clarification.ts:33](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/needs-clarification.ts#L33)

A Planner result that asks the user a question. It may also carry the changes the Planner could already make alongside the question: for “Show Apple and Alphabet stock” it can lay out Apple and ask which Alphabet share class the user means. Without `layout` and `executionPlan` it leaves the screen unchanged.

`M` is the request’s layout mode and picks the `layout` shape, as `GridResponse` and `TilingResponse` do for a plan result. The default accepts either shape.

Only valid when the chart request set `skipReply: true`. A caller that leaves `skipReply` unset expects a reply-bearing response, so the Engine rejects this result on that path. Engine validation accepts it when the flag is set, but `Engine.handle` still refuses it with `Err(ValidationError)` on field `skipReply`, because a `chart_response` has no shape for a question. A replyless plan result does ship, with `userMessage` absent.

## Type Parameters

### M

`M` _extends_ [`LayoutMode`](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/layoutmode/) = [`LayoutMode`](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/layoutmode/)

## Properties

### executionPlan?

> `readonly` `optional` **executionPlan?**: readonly `object`\[\]

Defined in: [packages/protocol/src/lib/needs-clarification.ts:52](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/needs-clarification.ts#L52)

Actions the Planner could already plan, in order, with the same shape and limit as a plan result’s execution plan. A caller that acts on the clarification runs them after applying [layout](https://docs.maelstrom-ai.co/dev/reference/protocol/interfaces/needsclarification/#layout). Absent means no Actions.

* * *

### layout?

> `readonly` `optional` **layout?**: `ClarificationLayoutFor`<`M`\>

Defined in: [packages/protocol/src/lib/needs-clarification.ts:45](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/needs-clarification.ts#L45)

Layout the Planner could already settle, in the request’s mode. A caller that acts on the clarification applies it before asking the question. Absent means the current layout stays as it is.

* * *

### options?

> `readonly` `optional` **options?**: readonly `string`\[\]

Defined in: [packages/protocol/src/lib/needs-clarification.ts:39](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/needs-clarification.ts#L39)

Suggested answers the caller may offer the user. Each one is non-blank.

* * *

### question

> `readonly` **question**: `string`

Defined in: [packages/protocol/src/lib/needs-clarification.ts:37](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/needs-clarification.ts#L37)

The question the Planner needs answered before it can proceed. Never blank.

* * *

### type

> `readonly` **type**: `"needs_clarification"`

Defined in: [packages/protocol/src/lib/needs-clarification.ts:35](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/needs-clarification.ts#L35)

Discriminant that tells this result apart from a plan result.

* * *

### verdicts?

> `readonly` `optional` **verdicts?**: readonly [`PlannerReasonVerdict`](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/plannerreasonverdict/)\[\]

Defined in: [packages/protocol/src/lib/needs-clarification.ts:58](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/needs-clarification.ts#L58)

Verdicts on the request’s `user_intent` reasons, one per reason id the Planner can name. A reason without a verdict shares this result’s outcome. Absent means every reason does.
