Skip to content

unixmonk/specpulse

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SpecPulse

PyPI Python 3.11+ License: MIT Downloads

Transform Your Development Process with Specification-Driven Development

Build better software faster by putting specifications first and letting AI handle the implementation details.

Installation β€’ Quick Start β€’ Usage Guide β€’ Features β€’ Documentation β€’ Contributing


🎯 What is SpecPulse?

SpecPulse revolutionizes AI-assisted development by enforcing a specification-first approach. Instead of jumping straight into code, SpecPulse ensures every feature starts with clear specifications, validated plans, and tracked tasks - guaranteeing quality from day one.

Latest Update (v1.3.4):

  • πŸ§ͺ 89% Test Coverage: Comprehensive test suite with 450+ tests
  • πŸ” Version Update Checking: Automatic PyPI version checking with 24-hour caching
  • πŸ’ͺ PowerShell Support: Full Windows PowerShell script support alongside Bash
  • πŸ› οΈ Enhanced Stability: Critical path fixes and improved error handling
  • Previous (v1.3.0): Continuous task execution with /sp-execute command
  • Previous (v1.2.0): Microservice decomposition, service-based planning
  • Previous (v1.1.0): Command prefix system, multi-spec workflow

Why SpecPulse?

  • πŸ” Clarity First: No more ambiguous requirements or scope creep
  • πŸ€– AI-Optimized: Designed specifically for Claude and Gemini workflows
  • βœ… Quality Gates: Built-in checks prevent bad code from entering your codebase
  • πŸ“Š Full Traceability: Every decision, change, and requirement is tracked
  • πŸš€ Faster Delivery: Structured approach reduces rework and debugging time

πŸ“¦ Installation

pip install specpulse --upgrade

Requirements:

  • Python 3.11 or higher
  • Git (optional, for version control features)
  • Claude or Gemini CLI (for AI integration)

Cross-Platform Support:

  • Windows: Requires Git Bash or WSL
  • Linux: Native Bash support
  • macOS: Native Bash support
  • Source Installation: Works perfectly from source code (not just PyPI)

πŸš€ Quick Start

Step 1: Initialize Your Project

# Create a new project
specpulse init my-awesome-project

# Or add to existing project
cd existing-project
specpulse init --here

Step 2: Configure AI Assistant

# For Claude projects
specpulse init --ai claude

# For Gemini projects
specpulse init --ai gemini

Step 3: Start Building (Inside AI)

# Initialize a new feature
/sp-pulse user-authentication
# Creates structure for 001-user-authentication feature

# Create the specification
/sp-spec create user login with OAuth2 and email/password
# Or just: /sp-spec (for interactive mode)

# [NEW] Decompose large specs into microservices (optional)
/sp-decompose 001
# Creates service boundaries, API contracts, and interfaces

# Generate implementation plan
/sp-plan generate
# For decomposed: Creates service-specific plans + integration plan
# For monolithic: Creates single comprehensive plan

# Break down into tasks
/sp-task breakdown
# For decomposed: Creates AUTH-T001, USER-T001, INT-T001 tasks
# For monolithic: Creates T001, T002, T003 tasks

# [NEW] Execute all tasks continuously without stopping
/sp-execute all
# Completes ALL tasks in sequence without interruptions
# Or: /sp-execute (for next task), /sp-execute T001 (specific task)

Step 4: Validate & Ship

# Validate everything
specpulse validate

# [NEW] Decompose specifications
specpulse decompose 001
# Or with options:
specpulse decompose --microservices
specpulse decompose --apis
specpulse decompose --interfaces

# Run diagnostics
specpulse doctor

# Sync project state
specpulse sync

✨ Features

πŸ›οΈ Constitutional Development

Nine immutable principles guide every line of code:

Article Principle Benefit
I Library-First Every feature is modular and reusable
II CLI Interface Text-based interaction for automation
III Test-First Tests before code, always
IV Staged Implementation Incremental, validated progress
V Direct Framework Usage No unnecessary abstractions
VI No Abstraction Layers Keep it simple, keep it maintainable
VII Simplicity Enforcement Maximum 3 modules per feature
VIII Complexity Tracking Document and justify exceptions
IX Framework-First Don't reinvent the wheel

🚦 Phase Gates System

Before any code is written, features must pass:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Specification   β”‚ β†’ Must be complete with no ambiguities
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Phase Gates     β”‚ β†’ Constitutional compliance check
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜     Simplicity validation (≀3 modules)
         ↓              Test strategy defined
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     Framework selected
β”‚ Implementation  β”‚     Research completed
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Validation      β”‚ β†’ Automated quality checks
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎨 Beautiful CLI Experience

View CLI Screenshots
+=====================================================================+
|                                                                     |
|    _____ ____  _____ _____ ____  _   _ _     _____ _____           |
|   / ____|  _ \|  ___/ ____|  _ \| | | | |   / ____|  ___|          |
|   | (___ | |_) | |__ | |    | |_) | | | | |   | (___ | |__          |
|   \___ \|  __/|  __|| |    |  __/| | | | |    \___ \|  __|         |
|   ____) | |   | |___| |____| |   | |_| | |________) | |___         |
|   |_____/|_|   |______\_____|_|    \___/|______|_____/|_____|       |
|                                                                     |
|          Specification-Driven Development Framework                |
|                    Beyond Traditional Development                   |
|                                                                     |
+=====================================================================+
  • ASCII Art Banners - Beautiful project initialization
  • Color-Coded Output - Instant status recognition
  • Progress Indicators - Real-time operation feedback
  • Interactive Tables - Clean data presentation
  • Celebration Animations - Milestone achievements

🧠 Intelligent Memory System

memory/
β”œβ”€β”€ constitution.md  # Immutable project principles
β”œβ”€β”€ context.md      # Current state and progress tracking
└── decisions.md    # Architecture Decision Records (ADRs)
  • Persistent Context: Never lose track of project state
  • Decision History: Understand why choices were made
  • Constitutional Enforcement: Principles that can't be violated

πŸ” [NEEDS CLARIFICATION] Markers

Stop guessing what users want:

## Requirements
- User authentication via OAuth2
- Password reset via email
- [NEEDS CLARIFICATION: Should we support 2FA?]
- [NEEDS CLARIFICATION: Password complexity rules?]

πŸ€– Deep AI Integration

How AI Commands Work:

Claude and Gemini use slash commands that accept arguments via $ARGUMENTS:

Script Execution:

  • All Platforms: Bash (.sh) scripts only
  • Requirements: Bash shell required (Git Bash on Windows, native on Linux/macOS)
  • Universal Compatibility: Works whether installed via PyPI or source code
  • Unicode Support: Full international character support (≀, β‰₯, β†’, ←)
/sp-pulse user-authentication     # Start new feature with name
/sp-spec create OAuth2 login      # Create specification with description
/sp-spec update                   # Update existing specification
/sp-spec validate                 # Validate specification completeness
/sp-decompose 001                 # Decompose spec into microservices
/sp-plan generate                 # Generate plan(s) - detects decomposition
/sp-plan validate                 # Validate plan against constitution
/sp-task breakdown                # Create task list(s) - per service if decomposed
/sp-task update                   # Update task statuses
/sp-task status                   # Show current progress
/sp-execute all                   # [NEW] Execute ALL tasks non-stop until completion
/sp-execute                       # [NEW] Execute next task and continue
/sp-execute T001                  # [NEW] Execute specific task and continue

Behind the Scenes:

  • Commands capture arguments using $ARGUMENTS variable
  • Shell scripts in resources/scripts/ folder process the arguments:
    • sp-pulse-*.sh - Bash scripts (all platforms)
  • AI reads templates from resources/templates/ folder
  • Results are saved in specs/, plans/, tasks/ folders
  • Memory system tracks progress in memory/ folder

πŸ”’ Important Security Rules:

  • Protected Directories (Read-Only after init):
    • templates/ - Original template files
    • scripts/ - Shell scripts
    • commands/ - AI command definitions
    • .claude/ and .gemini/ - AI configurations
  • Editable Directories:
    • specs/ - Feature specifications (AI creates/edits here)
    • plans/ - Implementation plans (AI creates/edits here)
    • tasks/ - Task breakdowns (AI creates/edits here)
    • memory/ - Project context and decisions
  • Workflow: Templates are COPIED to working directories, never modified directly

Claude vs Gemini:

  • Claude: Uses Markdown command files (.claude/commands/*.md) with YAML frontmatter
    • Arguments passed via $ARGUMENTS variable to shell scripts
  • Gemini: Uses TOML command files (.gemini/commands/*.toml) with simple format
    • Arguments handled via {{args}} placeholder in prompts
  • Both support arguments and work the same way from user perspective

Command Arguments:

  • Commands can accept arguments: /command arg1 arg2
  • Claude: Arguments passed to scripts via $ARGUMENTS
  • Gemini: Arguments injected via {{args}} placeholder
  • Commands can be used without arguments for interactive mode

πŸ“Š Real-World Impact

Metric Traditional Development With SpecPulse
Requirements Clarity ~60% 95%+
First-Time Success Rate ~40% 85%+
Code Review Iterations 3-5 1-2
Technical Debt Accumulates Tracked & Managed
Documentation Often outdated Always current

πŸš€ Continuous Task Execution (NEW in v1.3.0)

SpecPulse now supports non-stop task execution for maximum development efficiency:

The /sp-execute Command

Complete entire features without interruptions:

# Execute ALL tasks continuously
/sp-execute all
# AI will complete every task in sequence without stopping

# Execute next task and continue
/sp-execute
# Starts with next pending task and keeps going

# Execute from specific task
/sp-execute T001
# Starts from T001 and continues through all remaining tasks

Flow State Development

The continuous execution mode enables:

  • Zero Context Switching: No stops between tasks
  • Maximum Efficiency: Complete features 10x faster
  • Uninterrupted Flow: Maintain focus and productivity
  • Automatic Progression: Smart task advancement
  • Batch Processing: Handle entire task lists in one go

Example Workflow

# Traditional approach (multiple commands, lots of waiting)
/sp-task execute T001
# ... wait for completion ...
/sp-task execute T002
# ... wait for completion ...
/sp-task execute T003
# ... and so on ...

# NEW: Continuous execution (one command, no waiting)
/sp-execute all
# Completes T001, T002, T003... T025 automatically!

Benefits

Traditional Execution Continuous Execution
Stop after each task Non-stop completion
Constant confirmations Automatic progression
Context switching Flow state maintained
5-10 tasks/hour 50+ tasks/hour
Manual task selection Smart task ordering

🎯 Microservice Decomposition

For large, complex specifications, SpecPulse can automatically decompose them into microservices:

# Decompose a specification
/sp-decompose 001

This creates:

  • Service Boundaries: Using Domain-Driven Design principles
  • API Contracts: OpenAPI 3.0 specifications for each service
  • Interface Definitions: TypeScript/Java/Go interfaces
  • Integration Map: Service communication architecture
  • Migration Plan: Strategy for breaking down monoliths

Workflow Adaptation

SpecPulse automatically adapts based on architecture:

Monolithic Flow:

spec-001.md β†’ plan-001.md β†’ task-001.md (T001, T002...)

Decomposed Flow:

spec-001.md β†’ decomposition/ β†’ service plans β†’ service tasks
                β”œβ”€β”€ microservices.md      β”œβ”€β”€ auth-service-plan.md    β”œβ”€β”€ AUTH-T001
                β”œβ”€β”€ api-contracts/        β”œβ”€β”€ user-service-plan.md    β”œβ”€β”€ USER-T001
                └── interfaces/           └── integration-plan.md     └── INT-T001

πŸ—οΈ Project Structure

my-project/
β”œβ”€β”€ .specpulse/          # Configuration and cache
β”‚   └── config.yaml      # Project settings
β”œβ”€β”€ .claude/             # Claude AI integration
β”‚   └── commands/        # Claude command definitions (.md)
β”œβ”€β”€ .gemini/             # Gemini AI integration
β”‚   └── commands/        # Gemini command definitions (.toml)
β”œβ”€β”€ memory/              # Project intelligence
β”‚   β”œβ”€β”€ constitution.md  # Immutable principles
β”‚   β”œβ”€β”€ context.md      # Current state
β”‚   └── decisions.md    # Architecture Decision Records
β”œβ”€β”€ specs/               # Feature specifications
β”‚   └── 001-feature/
β”‚       β”œβ”€β”€ spec-001.md
β”‚       └── decomposition/    # [NEW] Microservice decomposition
β”‚           β”œβ”€β”€ microservices.md
β”‚           β”œβ”€β”€ api-contracts/
β”‚           └── interfaces/
β”œβ”€β”€ plans/               # Implementation plans
β”‚   └── 001-feature/
β”‚       β”œβ”€β”€ plan-001.md      # Monolithic plan
β”‚       # OR for decomposed:
β”‚       β”œβ”€β”€ auth-service-plan.md
β”‚       β”œβ”€β”€ user-service-plan.md
β”‚       └── integration-plan.md
β”œβ”€β”€ tasks/               # Task breakdowns
β”‚   └── 001-feature/
β”‚       β”œβ”€β”€ task-001.md      # Monolithic tasks
β”‚       # OR for decomposed:
β”‚       β”œβ”€β”€ auth-service-tasks.md
β”‚       β”œβ”€β”€ user-service-tasks.md
β”‚       └── integration-tasks.md
β”œβ”€β”€ templates/           # Customizable templates
β”œβ”€β”€ scripts/             # Shell scripts for AI execution
β”‚   β”œβ”€β”€ sp-pulse-init.sh    # Feature initialization
β”‚   β”œβ”€β”€ sp-pulse-spec.sh    # Specification creation
β”‚   β”œβ”€β”€ sp-pulse-plan.sh    # Plan generation
β”‚   └── sp-pulse-task.sh    # Task breakdown
└── PULSE.md            # Project manifest

πŸ› οΈ Advanced Usage

Custom Templates

Create project-specific templates:

# Copy and modify templates
cp templates/spec-001.md templates/custom-spec.md
# Edit to match your needs

Validation Rules

Configure validation in .specpulse/config.yaml:

validation:
  enforce_constitution: true
  max_complexity: 3
  require_tests: true
  spec_sections:
    - requirements
    - user_stories
    - acceptance_criteria

Git Integration

# Smart commits with context
specpulse sync

# Branch management
git checkout -b 001-new-feature

πŸ“ˆ Metrics & Reporting

Track your project health:

# Full system diagnostic
specpulse doctor

# Detailed validation report
specpulse validate --verbose

# Component-specific checks
specpulse validate --component spec
specpulse validate --component plan
specpulse validate --component constitution

πŸ”§ Troubleshooting

Common Issues & Solutions

Import Error

Problem: ModuleNotFoundError: No module named 'specpulse' Solution: Ensure Python 3.11+ and run pip install --upgrade specpulse

Git Integration Issues

Problem: Git commands failing Solution: Install Git or use --no-git flag

Template Not Found

Problem: Custom templates not loading Solution: Check template path in config.yaml

AI Commands Not Working

Problem: /sp-pulse commands not recognized Solution: Ensure you ran specpulse init --ai claude or --ai gemini

🀝 Contributing

We welcome contributions! The project is actively maintained and looking for contributors.

# Fork and clone
git clone https://github.com/specpulse/specpulse.git

# Create feature branch
git checkout -b feature/amazing-feature

# Make changes and test
pytest tests/

# Submit PR

πŸ“š Documentation

  • PyPI Package - Official package page
  • GitHub Repository - Source code and issues
  • Command Reference - See AI Integration section above for full command list

πŸ“š Usage Guide

How to Break Your Project into Features (Pulses)

A complete guide is available in SPECPULSE_USAGE_GUIDE.md which covers:

  • Feature decomposition strategies
  • Sizing guidelines (3-15 tasks per pulse)
  • Naming conventions (001-feature-name format)
  • Real-world examples for different project types
  • Best practices for feature boundaries

Quick Examples

E-Commerce Platform:

001-user-authentication    # Registration, login, sessions
002-product-catalog        # Products, categories, search
003-shopping-cart          # Cart management, calculations
004-payment-processing     # Gateway, transactions, receipts
005-order-management       # History, tracking, refunds

SaaS Application:

001-tenant-management      # Multi-tenancy, workspaces
002-subscription-billing   # Plans, payments, invoices
003-api-management        # Keys, rate limiting, docs
004-admin-dashboard       # Analytics, reports, settings
005-webhook-system        # Events, notifications, logs

Key Principles:

  • Each pulse should be independent and testable
  • Keep pulses between 3-15 tasks
  • Use sequential numbering (001, 002, 003...)
  • Follow the 9 constitutional principles

See the full guide for detailed breakdowns and strategies.

πŸ“„ License

MIT License - see LICENSE file for details.

🚦 Project Status

Build Status Coverage Tests Maintainability


Built with ❀️ for developers who refuse to compromise on quality

Report Bug β€’ Request Feature β€’ Join Discussion

About

Specification-Driven Development (SDD) Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 73.0%
  • Shell 14.9%
  • PowerShell 11.9%
  • TypeScript 0.2%