Install
Install with PiG
pig install npm:@emiliosp/pi-maestroInstall with Pi
pi install npm:@emiliosp/pi-maestroPackages 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
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
specin another workflow. - Spec and implementation: The
builderimplements the approvedspec. Three optional steps can follow: theverifierindependently checks everyacceptance criterion, thesimplifierimproves the code without changing its behavior, and thescorerrates 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
| Role | Responsibility |
|---|---|
Owner | Brings the problem, approves the spec, decides questions, and reviews the final code. |
Maestro | Works directly with the owner, prepares the spec, runs the other agents, records decisions, and summarizes results. |
Builder | Implements the approved spec. |
Verifier | Independently checks the implementation against the approved spec and reports any technical issues it finds. |
Simplifier | Refactors accepted code for clarity without changing behavior or introducing check failures. |
Scorer | Optional 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:
- Describes one change to
Maestro. - Reviews the
spec, including itsacceptance criteriaand concrete examples. - Replies
GREEN FLAGwhenMaestroasks for approval. - Answers each builder escalation and gives a reason, if any arise.
- Chooses what to do about each verifier finding, if any arise.
- 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, andMaestromessages. Read this before the first workflow. - Workflow: approvals, decisions, and how each
runproducesartifacts. - Configuration: project paths, models, and thinking levels.
- Subagent integration: agent context, execution, and activity tracking.
Project constitution
- Mission: purpose, scope, and
ownerresponsibilities. - 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.