omp packages

pi-spec-builder0.1.1

Spec-Driven Development (SDD) and architecture planning framework for Pi Coding Agent

luisito15 Published 1 month ago MIT ~262 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-spec-builder banner

npm version CI status Pi compatible License Node version


๐Ÿ“ Overview

pi-spec-builder brings structured Spec-Driven Development (SDD) and architectural guardrails to Pi Coding Agent.

Left unchecked, AI coding agents frequently begin editing code immediately without clarifying requirements, designing interface contracts, or considering failure modes.

pi-spec-builder enforces a battle-tested 3-phase development lifecycle inside .specs/<feature>/:

  1. Proposal: Clarify user problem, non-goals, and tradeoffs.
  2. Specification: Detail TypeScript interface contracts, data models, and Mermaid architecture diagrams.
  3. Tasks: Break work into atomic, verifiable checklists.

Code modification is gated until you review and approve the architectural specification.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       /sdd init feature      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€> โ”‚  01-proposal.md         โ”‚
โ”‚                 โ”‚                              โ”‚  (Problem & Non-Goals)  โ”‚
โ”‚                 โ”‚ <โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚                 โ”‚     /sdd approve proposal                โ”‚
โ”‚    Developer    โ”‚                                          โ–ผ
โ”‚    (Terminal)   โ”‚                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 โ”‚                              โ”‚  02-specification.md    โ”‚
โ”‚                 โ”‚                              โ”‚  (Interfaces & Mermaid) โ”‚
โ”‚                 โ”‚ <โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚                 โ”‚     /sdd approve spec                    โ”‚
โ”‚                 โ”‚                                          โ–ผ
โ”‚                 โ”‚                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 โ”‚                              โ”‚  03-tasks.md            โ”‚
โ”‚                 โ”‚                              โ”‚  (Implementation Phase) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Features

  • ๐Ÿ“‘ Standardized SDD Artifacts: Automatically structures proposals, specs, and task lists.
  • ๐Ÿšฆ Phase Transition Gates: Tracks approval states per feature in .specs/status.json.
  • ๐Ÿ“Š Architecture Diagrams: Integrated Mermaid boilerplate for sequence and component flows.
  • ๐Ÿ›ก๏ธ Autonomous Guard (sdd_check_guard): Pi self-audits whether sign-off was given before making edits.

๐Ÿš€ Installation

Via Pi Package Registry (Recommended)

pi install npm:pi-spec-builder

Direct from GitHub

pi install git:https://github.com/lleontor705/pi-spec-builder.git

From Local Source

git clone https://github.com/lleontor705/pi-spec-builder.git
cd pi-spec-builder
npm install && npm run build
pi install ./

๐Ÿ“– Usage & Commands

Slash Commands

Command Description
/sdd init <feature> Scaffolds .specs/<feature>/ with standard markdown templates.
/sdd status Displays active features and their current phase / approval status.
/sdd approve <feature> proposal Approves Phase 1 (Proposal) and moves to Specification.
/sdd approve <feature> specification Approves Phase 2 (Spec) and unlocks code implementation.

Agent Autonomous Tools

  • sdd_init_feature: Pi initializes an SDD feature folder when tasked with a complex goal.
  • sdd_check_guard: Pi checks if the specification is approved before touching source code.
// Prompt:
"We need to implement a rate-limiter using sliding-window Redis counters."

Pi creates .specs/rate-limiter/01-proposal.md and pauses:

"I have drafted the proposal in .specs/rate-limiter/01-proposal.md. Run /sdd approve rate-limiter proposal when you're ready to proceed to API specifications."


๐Ÿ—๏ธ Architecture & Development

# Clone
git clone https://github.com/lleontor705/pi-spec-builder.git
cd pi-spec-builder

# Install & Build
npm install
npm run build

๐Ÿ“„ License

MIT ยฉ Luis Leon