---
title: Planner Agent
description: The Planner agent role, TaskSpec generation, and scope boundaries.
sidebar:
  order: 2
  label: Planner Agent
---

## The Planner Agent (`◈`)

The **Planner** is the architectural entry point of NIKI. Its mission is to convert an ambiguous human task description into a concrete, minimal, and deterministic engineering specification.

---

## What the Planner Does

1. **Workspace Scanning:** Inspects file trees, project configurations (`package.json`, `Cargo.toml`, `pyproject.toml`), and existing interfaces.
2. **Knowledge Ingestion:** Reads relevant project documentation matching `[knowledge].doc_globs` and external URLs configured in `niki.toml`.
3. **Spec Generation:** Emits a structured `TaskSpec` JSON artifact detailing:
   * Files to create, modify, or delete.
   * Step-by-step implementation strategy.
   * Acceptance criteria that must be verified.
   * Technical constraints and architectural invariants.
   * Estimated complexity (`Low`, `Medium`, `High`, `Critical`).

---

## Recommended Models

Because planning requires deep reasoning, long-context comprehension, and strict adherence to schemas, we recommend using high-capability reasoning models for the Planner:

```toml
[agents.planner]
provider    = "anthropic"
model       = "claude-sonnet-4-20250514"
max_tokens  = 8192
temperature = 0.2
```
