# TodoManager

**Kind:** Class

**Source:** [`atloria-monorepo/libs/agent-core/src/context/todo-manager.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/agent-core/src/context/todo-manager.ts#L19)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `add` | `add(description: string)` | `TodoItem` |
| `addBatch` | `addBatch(descriptions: string[])` | `TodoItem[]` |
| `start` | `start(id: string)` | `void` |
| `complete` | `complete(id: string, result: string)` | `void` |
| `skip` | `skip(id: string, reason: string)` | `void` |
| `getAll` | `getAll()` | `ReadonlyArray<TodoItem>` |
| `getPending` | `getPending()` | `TodoItem[]` |
| `getCurrent` | `getCurrent()` | `TodoItem | undefined` |
| `getStats` | `getStats()` | `{ total: number; completed: number; pending: number; inProgress: number; skipped: number }` |
| `toContextString` | `toContextString()` | `string` |
| `serialize` | `serialize()` | `string` |
| `deserialize` | `deserialize(json: string)` | `TodoManager` |

## Where it refuses work

- `TodoManager` stops the work with an early return when `this.items.length === 0`.
