> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcliq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# form and approval

> The two built-in hugs: their params, their answers, and how to ask with them.

Hugs › Reference

The built-in hugs ship with cliq — their pages in cliqd (`~/.cliqrc/hugs`), their definitions in
`@getcliqio/cliq-sdk/hugs`. They are ordinary hugs, written with `define_hug` and `mount_hug` from the UI kit, and a
good place to read real ones.

```ts theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
import { form, approval } from '@getcliqio/cliq-sdk/hugs';
```

## `form`

Fields to fill in. The default hug: of agents' `ctx.ask` without a hug, and of LLM phases.

| Params | |
| - | - |
| `prompt` | What you are asking — markdown, up to 20,000 characters |
| `context` | Blocks shown with the question: `markdown`, `artifact`, `checks`, `transcript`; up to 64 KB |
| `inputs` | **Required.** The fields — [requested inputs](https://docs.getcliq.io/hugs.md#requested-inputs) |

| Answer | |
| - | - |
| one key per input, and `comment` | Required inputs filled |
| or `declined` | The person can't answer: a reason, nothing else |

Summary: the first answer's value, or "Couldn't answer". File inputs are upload slots.

```ts theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
const answer = await ctx.ask(form, {
    title: 'Release notes',
    params: { prompt: 'Anything to add?', inputs: [{ name: 'notes', type: 'text', multiline: true, required: false }] },
});
```

## `approval`

Approve or reject. Always the review gate's hug; the gate's `review:` block becomes its params
([gate fields](https://docs.getcliq.io/hugs.md#gate-review-fields)).

| Params | |
| - | - |
| `prompt`, `context`, `inputs` | As for `form` — the inputs are what approving requires |
| `reject_choices` | `[{ value, label }]` offered when rejecting (the gate's "Send back to …") |
| `approve_label`, `reject_label` | Button labels (default *Approve*, *Reject*) |
| `show_comment` | `false` hides the comment box |

| Answer | |
| - | - |
| `decision: approve` | With one key per input (required ones enforced) and an optional `comment` |
| `decision: reject` | With a `reason` and an optional `choice` (one of `reject_choices`) — inputs never required |

Summary: "Approved", the chosen reject choice's label, or "Rejected".

```ts theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
import { groups } from '@getcliqio/cliq-sdk';

const answer = await ctx.ask(approval, {
    title: 'Release 4.2 go / no-go',
    params: { prompt: 'Engineering and product both need to approve.', inputs: [], approve_label: 'Go', reject_label: 'No-go' },
    channels: ['eng-leads', 'product'],
    policy: groups(
        [{ policy: 'any', channels: ['eng-leads'] }, { policy: 'any', channels: ['product'] }],
        { accept: (v) => v.decision === 'approve', reject: (v) => v.decision === 'reject' },
    ),
});
```

## Reserved keys

An input can't be named after a hug's own answer keys: `comment` and `declined` for `form`; `decision`, `reason`,
`choice` and `comment` for `approval` (the gate leaves such `review.inputs` out).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.