SpecPulse — Prompts
Prompt 1: /sp-pulse Command (Feature Initialization)
Source: specpulse/resources/commands/claude/sp-pulse.md
Technique: Structured procedural prompt with explicit failure-handling and rollback logic.
---
name: sp-pulse
description: Initialize new features and manage project context without SpecPulse CLI
allowed_tools:
- Read
- Write
- Edit
- Bash
- TodoWrite
- Glob
---
# /sp-pulse Command
Initialize new features and manage project context without SpecPulse CLI. Works completely independently through LLM-safe file operations.
## Usage
/sp-pulse [feature-name] # Initialize new feature
/sp-pulse status # Show current feature status
/sp-pulse list # List all features
## Implementation
When called with `/sp-pulse {{args}}`, I will:
### 2. For Feature Initialization
#### A. Generate Universal Feature ID
- Scan existing feature directories in `.specpulse/specs/`
- Find highest used number (001, 002, 003, etc.)
- Generate next sequential ID with zero-padding
- Create feature name from input (kebab-case)
#### B. Create Directory Structure (Atomic Operations)
**I will use atomic file operations to prevent corruption:**
**Atomic Directory Creation:**
- Use **Bash** with `mkdir -p` for atomic directory creation
- Validate each directory creation before proceeding
- Rollback entire operation if any step fails
**Safe File Operations:**
- Use **Write** tool with full file content (not partial updates)
- Validate file paths are within `.specpulse/` directory only
- Create backup copies before overwriting existing files
**Rollback Mechanism:**
- Track all created files and directories
- If any step fails, use **Bash** to remove partial creations
- Restore original state from backups
- Report specific failure points with recovery instructions
Notable technique: Explicit atomicity contract — the LLM is instructed to treat directory creation as a transaction with rollback.
Prompt 2: /sp-task Command (Task Generation)
Source: specpulse/resources/commands/claude/sp-task.md (inferred from README description)
Technique: Structured output generation with YAML-in-Markdown schema enforcement.
From README:
---
id: task-001
status: todo
title: "Set up authentication middleware"
description: |
- What problem does this solve?: Foundation for secure route protection
- Why is this necessary?: All protected endpoints require authentication
- How will this be done?: Express middleware with JWT validation
- When is this complete?: Middleware successfully validates tokens
files_touched:
- path: src/middleware/auth.js
Notable technique: The task format enforces a 4-question answer schema for every task description (what/why/how/when) — preventing shallow tasks that only name an action without explaining its rationale.
Prompt 3: /sp-llm-enforce (Compliance Watchdog)
Source: specpulse/resources/commands/claude/sp-llm-enforce.md (named in README)
Technique: LLM self-policing / meta-compliance. This command asks the AI to verify its own adherence to the spec-driven workflow, checking whether it followed the correct step sequence before proceeding. No verbatim content available; behavior described in README as "LLM compliance enforcement."