Skip to content
Niki v0.7.0 — plan mode, honest metering, headless CI contract.Read the release notes
niki
Esc
navigateopen⌘Jpreview
On this page

Coder Agent

The Coder agent role, CodeDiff generation, and hunk-based editing.

The Coder Agent ()

The Coder receives the TaskSpec produced by the Planner and generates precise code modifications.


What the Coder Does

  1. Focused Implementation: Implements only the files and modifications specified in the TaskSpec. It is instructed not to introduce unsolicited refactors or unrelated changes.
  2. Unified Diff Generation: Emits structured search/replace hunks (CodeDiff) with exact indentation and context lines.
  3. Spec Adherence Check: Explains how each change satisfies the specific acceptance criteria defined by the Planner.
  4. Handling Feedback: When the Reviewer rejects a draft or requests changes, the Coder receives the ReviewFeedback artifact and writes a targeted revision without starting from scratch.

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

Was this page helpful?