# pi-task

A deterministic spec-orchestration tool for the pi coding agent that drives a request through fixed refine, research, grill, compose and critique phases before handing the main session a verified spec to execute.

pi-task addresses local models drifting on non-trivial planning tasks by never trusting a single prompt: it drives a request through a fixed, persisted pipeline of small, verifiable phases, then hands the main agent session a clean spec to execute. Every phase boundary is written to a task file on disk, so a task survives a crash, a restart, or being canceled and resumed later.

The phase order is fixed code rather than a model's free choice; a research phase fans work out to isolated child agents, one indexing project files and others digging into APIs, context and tooling, and verifies tooling claims before they reach the spec, keeping noisy file exploration and page fetches out of the parent's context. A loop detector and failure classifier catch stalls, repetition and malformed output from smaller models and retry with sharper emphasis.

It installs as a package for the pi coding agent, and is used through slash commands for starting, planning and running a whole pre-written plan through the pipeline.

Website: https://github.com/mjasnikovs/pi-task
