← Catalog

@emiliosp/pi-maestro

A spec-driven multiagent development workflow for Pi.

Package

Install

Install with PiG

pig install npm:@emiliosp/pi-maestro

Install with Pi

pi install npm:@emiliosp/pi-maestro
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions/maestro.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.24.0 (README.md). PiG does not review it.

Pi Maestro logo

pi-maestro

Coverage

Pi extension for writing a specification and optionally implementing it through a spec-driven multiagent workflow.

How it works

Every change starts with a spec. Maestro helps the owner to define a specification (spec) for a change, including clear requirements and acceptance criteria.

Two ways of working with Maestro are available:

  • Spec only: Stop after approval and use the spec in another workflow.
  • Spec and implementation: The builder implements the approved spec. Three optional steps can follow: the verifier independently checks every acceptance criterion, the simplifier improves the code without changing its behavior, and the scorer rates the result and the quality of the verification evidence. These steps can be enabled independently. See Phase selection for setup and defaults.

Each agent has a separate job. No agent approves its own work and the owner makes decisions when questions come up and reviews the final code.

Read The Pi Maestro Manifesto for the motivation behind the project.

Inspirations

Pi Maestro is inspired by concepts from OpenSpec and GitHub Spec Kit. It adapts those concepts to a sequential multiagent workflow in Pi. See Inspirations for details and sources.

The roles

RoleResponsibility
OwnerBrings the problem, approves the spec, decides questions, and reviews the final code.
MaestroWorks directly with the owner, prepares the spec, runs the other agents, records decisions, and summarizes results.
BuilderImplements the approved spec.
VerifierIndependently checks the implementation against the approved spec and reports any technical issues it finds.
SimplifierRefactors accepted code for clarity without changing behavior or introducing check failures.
ScorerOptional classifier invoked by Maestro to score correctness and verification quality.

Prerequisites

  • Node.js 26 or later.
  • Pi 1.5.0 or later.
  • Access to the models for enabled agents.

Installation

The owner installs Maestro:

pi install npm:@emiliosp/pi-maestro

Usage

The owner starts Pi from the project directory:

cd /path/to/project
pi

Activate Maestro:

/maestro

Choose "New spec" to start or "Restart spec" to revisit an existing spec.

If the configuration is invalid or a model for an enabled implementation role is unavailable, Maestro stays off and reports the problem.

The owner follows this workflow:

  1. Describes one change to Maestro.
  2. Reviews the spec, including its acceptance criteria and concrete examples.
  3. Replies GREEN FLAG when Maestro asks for approval.
  4. Answers each builder escalation and gives a reason, if any arise.
  5. Chooses what to do about each verifier finding, if any arise.
  6. Reads Maestro's summary and performs the final review.

The same /maestro command disables Maestro and leaves project files unchanged.

Troubleshooting

If an agent fails, use the session path shown by Maestro, when available, to inspect or export the session.

LLM as Judge

The optional scorer uses an explicitly selected Pi classifier to evaluate the entire workflow against the approved spec after implementation.

It scores:

  • correctness (how well the result meets the requirements)
  • verification quality (how well the evidence supports that result).

Maestro presents the results in the final summary.

See Scorer configuration to choose a classifier.

This automatic grading system gives the owner a level of confidence in the workflow's outcome, not proof of correctness.

See Workflow evaluation for the criteria and scores.

Configuration

On first use, /maestro opens guided setup to select agent models and thinking levels, plus an optional scorer classifier without a thinking level. Choices are saved in .pi/maestro.json.

The owner can edit this file before activation. See Configuration for fields, defaults, and phase selection.

Documentation

  • Glossary: terms and identifiers used in specs, reports, and Maestro messages. Read this before the first workflow.
  • Workflow: approvals, decisions, and how each run produces artifacts.
  • Configuration: project paths, models, and thinking levels.
  • Subagent integration: agent context, execution, and activity tracking.

Project constitution

  • Mission: purpose, scope, and owner responsibilities.
  • Tech stack: runtime technologies and development tools.
  • Roadmap: completed outcomes and planned work maintained in the repository.
  • Changelog: meaningful codebase changes and breaking changes.
  • Architecture decision records: architectural choices, context, consequences, and evidence.

License

Copyright (c) 2026 Emilio Spatola. Licensed under AGPL-3.0-or-later.