Skip to main content

Plan-Build Spec (pb-spec): A CLI tool for managing AI coding assistant skills

Project description

pb-spec — Plan-Build Spec

DeepWiki Context7 Python 3.12+ License: Apache-2.0

pb-spec

pb-spec is a CLI tool that installs AI coding assistant skills into your project. It provides a structured workflow — init → plan → build — that turns natural-language requirements into implemented, tested code through AI agent prompts.

Features

  • 3 agent skills: pb-init, pb-plan, pb-build — covering project analysis, design planning, and TDD implementation
  • 3 platforms: Claude Code, VS Code Copilot, OpenCode
  • Zero config: run pb-spec init and start using AI prompts immediately
  • Idempotent: safe to re-run; use --force to overwrite existing files
  • Built with: Python 3.12+, click, uv

Installation

# Recommended
uv tool install pb-spec

# Alternative
pipx install pb-spec

Quick Start

# 1. Install skills for your AI tool
cd my-project
pb-spec init --ai claude       # or: copilot, opencode, all

# 2. Open the project in your AI coding assistant and use the skills:
#    /pb-init                          → Generate AGENTS.md project context
#    /pb-plan Add WebSocket auth       → Generate design.md + tasks.md
#    /pb-build add-websocket-auth      → Implement tasks via TDD subagents

Supported AI Tools

AI Tool Target Directory File Format
Claude Code .claude/skills/pb-<name>/SKILL.md YAML frontmatter + Markdown
VS Code Copilot .github/prompts/pb-<name>.prompt.md Markdown (no frontmatter)
OpenCode .opencode/skills/pb-<name>/SKILL.md YAML frontmatter + Markdown

CLI Reference

pb-spec init --ai <platform> [--force]

Install skill files into the current project.

  • --ai — Target platform: claude, copilot, opencode, or all
  • --force — Overwrite existing files
pb-spec version

Print the installed pb-spec version.

pb-spec update

Update pb-spec to the latest version (requires uv).

Workflow

pb-spec provides three agent skills that chain together:

/pb-init → /pb-plan → /pb-build

1. /pb-init — Project Initialization

Analyzes your project and generates an AGENTS.md file at the project root. This file captures the tech stack, directory structure, conventions, and testing patterns so that subsequent agents have full project context.

2. /pb-plan <requirement> — Design & Task Planning

Takes a natural-language requirement and produces a complete feature spec:

specs/<feature-name>/
├── design.md    # Architecture, API contracts, data models
└── tasks.md     # Ordered implementation tasks with acceptance criteria

3. /pb-build <feature-name> — Subagent-Driven Implementation

Reads specs/<feature-name>/tasks.md and implements each task sequentially. Every task is executed by a fresh subagent following strict TDD (Red → Green → Refactor) with self-review before completion.

Skills Overview

Skill Trigger Output Description
pb-init /pb-init AGENTS.md Detect stack, scan structure, generate project context
pb-plan /pb-plan <requirement> specs/<name>/design.md + tasks.md Design proposal + ordered task breakdown
pb-build /pb-build <feature-name> Code + tests TDD implementation via subagents

Development

# Clone
git clone https://github.com/longcipher/pb-spec.git
cd pb-spec

# Install dependencies
uv sync --group dev

# Run tests
uv run pytest -v

# Install locally for testing
uv pip install -e .

License

Apache-2.0 © 2025 Bob Liu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pb_spec-0.1.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pb_spec-0.1.0-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file pb_spec-0.1.0.tar.gz.

File metadata

  • Download URL: pb_spec-0.1.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pb_spec-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4d0db010c675741000096fb662976eb3348946aca217253c5fd76e440d602fec
MD5 67fd4dfa36912d34ec75d4966401c18b
BLAKE2b-256 670d4a8795438ed6680a91de77ddf4c2d97e1efb248d3052ca51091b736f6833

See more details on using hashes here.

File details

Details for the file pb_spec-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pb_spec-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pb_spec-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 331102235cf9d4ee32ebcc0fc740adcacc58f342a622e8388c92fc4854250885
MD5 4ed1b1ff49867e8dd8c6c8ffbb30d4fb
BLAKE2b-256 ec5ee42133678008b220bf79fbbbe37e82fa79bd7761e6aa5b0f916121429915

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page