# XWUIAgentPlanTracker

Editable nested agent plan with live `STEP_STARTED` / `STEP_FINISHED` status, an approve-plan gate, and a clarifying-question slot. Default autonomy is `suggest`. The plan is a diff until `approvePlan()`. Model text is untrusted and never written into `html`.

## Basic Usage

Pending two-step plan with a visible autonomy badge and approve-plan gate.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Pending two-step plan with visible autonomy and an approve-plan gate.
```

## Nested Steps

Approved nested plan; child status updates from AG-UI step events.

```example
file: examples/NestedSteps.ts
html: examples/NestedSteps.html
title: Nested Steps
description: Approved nested plan with live child status from STEP events.
```

## Approve Gate

HITL bar composed from `XWUIApproveRejectBar.projectView`. Accept runs `approvePlan()`.

```example
file: examples/ApproveGate.ts
html: examples/ApproveGate.html
title: Approve Gate
description: Plan stays a diff until Approve plan runs at autonomy suggest.
```

## Clarifying Question

`setQuestion()` opens the answer slot; submit runs `answerQuestion()`.

```example
file: examples/ClarifyingQuestion.ts
html: examples/ClarifyingQuestion.html
title: Clarifying Question
description: Agent asks a question; answering goes through answerQuestion().
```

```api
```
