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

# Task template patterns for human-in-the-loop review

> Author reusable task configurations — actions, options, document groups, and the cookbook patterns for safe human-in-the-loop review.

A task template is the YAML blueprint for a piece of human work. Projects bind to a task template via project resources, and every task created from that template inherits its options, forms, document family groups, and action buttons.

This section is the developer-facing companion to the Studio [Task Templates](/studio/project/task-templates) reference. It focuses on the patterns that show up repeatedly in real review workflows — gating actions on data quality, recording reviewer ownership, and making sure event subscriptions and AI agents stay out of the reviewer's way once a value has been accepted.

## When to reach for a task template

Use a task template whenever a person needs to look at extracted data, decide something, and click a button:

* Reviewing extracted invoice data before payment
* Approving or rejecting a document classification
* Resolving exceptions raised by validation rules
* Confirming that an AI-generated summary is correct

The template is the contract between the reviewer's UI and the orchestration layer: it defines what the reviewer sees, what they can do, and what happens to the underlying data when they click an action.

## Cookbook recipes

These recipes solve concrete problems that come up in nearly every review workflow. Each recipe is independent — pick the ones you need.

<CardGroup cols={2}>
  <Card title="Gating actions on exceptions" icon="shield-check" href="/guides/task-templates/gating-actions-on-exceptions">
    Only allow the reviewer to approve when the data they care about is clean.
  </Card>

  <Card title="Take-ownership pattern" icon="user-check" href="/guides/task-templates/take-ownership-pattern">
    Record that a reviewer accepted a value, and stop AI from quietly overwriting it.
  </Card>

  <Card title="Requiring comments on actions" icon="message-square" href="/guides/task-templates/requiring-comments-on-actions">
    Force a comment on outcome-changing actions like Reject or Escalate, persisted to the activity timeline.
  </Card>
</CardGroup>

## Related reading

* [Task Templates in Studio](/studio/project/task-templates) — visual editor walkthrough
* [Activity Plans](/guides/activity-plans/index) — how multiple tasks chain together
* [Data Definitions: event subscriptions](/guides/data-definitions/event-subscriptions) — where AI/automation may try to write
* [Data Definitions: validation rules](/guides/data-definitions/validation-and-conditional-formatting) — what creates the exceptions you'll gate on
