specpulse 1.0.6__py3-none-any.whl → 1.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. specpulse/__init__.py +1 -1
  2. specpulse/cli/main.py +809 -617
  3. specpulse/core/specpulse.py +1140 -1105
  4. specpulse/resources/commands/claude/sp-continue.md +203 -0
  5. specpulse/resources/commands/claude/sp-decompose.md +227 -0
  6. specpulse/resources/commands/claude/sp-plan.md +220 -0
  7. specpulse/resources/commands/claude/sp-pulse.md +142 -0
  8. specpulse/resources/commands/claude/{spec.md → sp-spec.md} +36 -23
  9. specpulse/resources/commands/claude/sp-status.md +170 -0
  10. specpulse/resources/commands/claude/sp-task.md +315 -0
  11. specpulse/resources/commands/gemini/sp-continue.toml +56 -0
  12. specpulse/resources/commands/gemini/sp-decompose.toml +54 -0
  13. specpulse/resources/commands/gemini/sp-plan.toml +68 -0
  14. specpulse/resources/commands/gemini/{pulse.toml → sp-pulse.toml} +12 -6
  15. specpulse/resources/commands/gemini/sp-spec.toml +54 -0
  16. specpulse/resources/commands/gemini/sp-status.toml +61 -0
  17. specpulse/resources/commands/gemini/sp-task.toml +79 -0
  18. specpulse/resources/memory/constitution.md +5 -5
  19. specpulse/resources/memory/context.md +53 -1
  20. specpulse/resources/scripts/sp-pulse-decompose.py +66 -0
  21. specpulse/resources/scripts/sp-pulse-decompose.sh +56 -0
  22. specpulse/resources/scripts/{pulse-init.py → sp-pulse-init.py} +6 -6
  23. specpulse/resources/scripts/{pulse-init.sh → sp-pulse-init.sh} +95 -95
  24. specpulse/resources/scripts/{pulse-plan.py → sp-pulse-plan.py} +32 -7
  25. specpulse/resources/scripts/{pulse-plan.sh → sp-pulse-plan.sh} +136 -126
  26. specpulse/resources/scripts/{pulse-spec.py → sp-pulse-spec.py} +26 -6
  27. specpulse/resources/scripts/{pulse-spec.sh → sp-pulse-spec.sh} +126 -103
  28. specpulse/resources/scripts/{pulse-task.py → sp-pulse-task.py} +42 -6
  29. specpulse/resources/scripts/{pulse-task.sh → sp-pulse-task.sh} +32 -16
  30. specpulse/resources/templates/decomposition/api-contract.yaml +22 -0
  31. specpulse/resources/templates/decomposition/integration-plan.md +134 -0
  32. specpulse/resources/templates/decomposition/interface.ts +20 -0
  33. specpulse/resources/templates/decomposition/microservices.md +34 -0
  34. specpulse/resources/templates/decomposition/service-plan.md +168 -0
  35. specpulse/resources/templates/plan.md +206 -206
  36. specpulse/resources/templates/spec.md +125 -125
  37. specpulse/resources/templates/task.md +164 -163
  38. {specpulse-1.0.6.dist-info → specpulse-1.2.0.dist-info}/METADATA +95 -36
  39. specpulse-1.2.0.dist-info/RECORD +50 -0
  40. specpulse/resources/commands/claude/plan.md +0 -184
  41. specpulse/resources/commands/claude/pulse.md +0 -91
  42. specpulse/resources/commands/claude/task.md +0 -237
  43. specpulse/resources/commands/gemini/plan.toml +0 -59
  44. specpulse/resources/commands/gemini/spec.toml +0 -45
  45. specpulse/resources/commands/gemini/task.toml +0 -69
  46. specpulse/resources/scripts/pulse-init.ps1 +0 -186
  47. specpulse/resources/scripts/pulse-plan.ps1 +0 -251
  48. specpulse/resources/scripts/pulse-spec.ps1 +0 -185
  49. specpulse/resources/scripts/pulse-task.ps1 +0 -263
  50. specpulse-1.0.6.dist-info/RECORD +0 -41
  51. {specpulse-1.0.6.dist-info → specpulse-1.2.0.dist-info}/WHEEL +0 -0
  52. {specpulse-1.0.6.dist-info → specpulse-1.2.0.dist-info}/entry_points.txt +0 -0
  53. {specpulse-1.0.6.dist-info → specpulse-1.2.0.dist-info}/licenses/LICENSE +0 -0
  54. {specpulse-1.0.6.dist-info → specpulse-1.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: sp-pulse
3
+ description: Initialize a new feature with SpecPulse framework
4
+ allowed_tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - TodoWrite
10
+ ---
11
+
12
+ # /sp-pulse Command
13
+
14
+ Initialize a new feature following SpecPulse methodology with constitutional compliance.
15
+
16
+ ## Usage
17
+ ```
18
+ /sp-pulse <feature-name> [feature-id]
19
+ ```
20
+
21
+ ## Implementation
22
+
23
+ When called with `/sp-pulse $ARGUMENTS`, I will:
24
+
25
+ 1. **Validate arguments** and extract feature name + optional ID
26
+ 2. **Run initialization script** with cross-platform detection:
27
+ - **Linux/macOS**: `bash scripts/sp-pulse-init.sh "$FEATURE_NAME" "$OPTIONAL_ID"`
28
+ - **Python Fallback**: `python scripts/sp-pulse-init.py "$FEATURE_NAME" "$OPTIONAL_ID"`
29
+ 3. **Create complete feature structure**:
30
+ - Generate feature ID (001, 002, etc.) or use provided ID
31
+ - Create sanitized branch name: `ID-feature-name`
32
+ - Create directories: `specs/ID-feature-name/`, `plans/ID-feature-name/`, `tasks/ID-feature-name/`
33
+ - Copy AI-optimized templates to feature directories
34
+ - Update `memory/context.md` with current feature metadata
35
+ - Create and switch to git branch if in git repository
36
+
37
+ 4. **Suggest specification creation**:
38
+ - Provide user with 2-3 AI-generated specification suggestions
39
+ - Ask user to choose one or create custom specification
40
+ - Guide user to use `/sp-spec` command after making selection
41
+
42
+ 5. **Validate structure** and report comprehensive status
43
+
44
+ ## Constitutional Compliance
45
+
46
+ **Article I: Simplicity**
47
+ - [ ] Feature name is clear and specific
48
+ - [ ] No unnecessary abstractions in initial structure
49
+ - [ ] Single responsibility per feature
50
+
51
+ **Article II: Anti-Abstraction**
52
+ - [ ] Direct template usage (no wrapper layers)
53
+ - [ ] Minimal initial structure
54
+ - [ ] Framework-ready files
55
+
56
+ ## Example
57
+ ```
58
+ User: /sp-pulse user-authentication-oauth2
59
+ ```
60
+
61
+ I will:
62
+ - Run: `bash scripts/sp-pulse-init.sh "user-authentication-oauth2"`
63
+ - Create: `specs/001-user-authentication-oauth2/` (empty, ready for spec)
64
+ - Create: `plans/001-user-authentication-oauth2/` (empty, ready for plan)
65
+ - Create: `tasks/001-user-authentication-oauth2/` (empty, ready for tasks)
66
+ - Branch: `001-user-authentication-oauth2`
67
+ - Suggest specification options:
68
+ 1. "User authentication with OAuth2 providers and JWT tokens"
69
+ 2. "Complete authentication system including registration, login, and profile management"
70
+ 3. "OAuth2 integration with social login providers"
71
+ - Ask: "Which specification would you like to use? (Choose 1-3 or provide your own)"
72
+ - Guide: "After choosing, use `/sp-spec [your choice]` to create the specification"
73
+ - Status: `STATUS=ready_for_spec, BRANCH_NAME=001-user-authentication-oauth2`
74
+
75
+ ## Error Handling
76
+
77
+ Enhanced validation includes:
78
+ - Feature name sanitization (alphanumeric, hyphens only)
79
+ - Directory creation validation
80
+ - Template existence verification
81
+ - Git repository validation
82
+ - Context file management
83
+
84
+ ## Manual Workflow
85
+
86
+ The `/sp-pulse` command creates the feature structure and then guides you through manual steps:
87
+
88
+ 1. **Phase -1**: **MANUAL** - Use `/sp-spec` to create specification with AI assistance
89
+ 2. **Phase 0**: **MANUAL** - Use `/sp-plan` to generate implementation plan
90
+ 3. **Phase 1**: **MANUAL** - Use `/sp-task` to create task breakdown
91
+ 4. **Implementation**: Begin development following constitutional principles
92
+
93
+ ## Context Detection
94
+
95
+ The system automatically detects which feature you're working on:
96
+ - Checks `memory/context.md` for current feature
97
+ - Uses git branch name if available
98
+ - Falls back to most recently created feature directory
99
+ - You can also specify feature directory explicitly in commands
100
+
101
+ ## Integration Features
102
+
103
+ - **Automatic context tracking** in `memory/context.md`
104
+ - **Enhanced error reporting** with specific failure reasons
105
+ - **Git integration** with branch management
106
+ - **Template validation** before copying
107
+ - **Todo list creation** for progress tracking
108
+ - **Cross-platform script execution** with automatic detection
109
+ - **Multiple language support**: Bash, PowerShell, Python
110
+ - **Platform-agnostic operation** for any development environment
111
+
112
+ ## Feature Progress Tracking
113
+
114
+ The system tracks progress across all features:
115
+
116
+ ### Active Features Overview
117
+ ```
118
+ FEATURE_COUNT=3
119
+ ACTIVE_FEATURE=001-user-authentication
120
+ COMPLETED_FEATURES=1
121
+ IN_PROGRESS_FEATURES=2
122
+ ```
123
+
124
+ ### Context Management
125
+ - `memory/context.md` tracks current active feature
126
+ - Progress percentages calculated from task completion
127
+ - Feature status: active, completed, paused, blocked
128
+ - Automatic context switching when working on different features
129
+
130
+ ### Multi-Feature Workflow
131
+ ```
132
+ /sp-pulse feature-a → /sp-spec → /sp-plan → /sp-task → [work]
133
+ /sp-pulse feature-b → /sp-spec → /sp-plan → /sp-task → [work]
134
+ /sp-status feature-a → Check progress → /sp-continue feature-a
135
+ ```
136
+
137
+ ### Feature Switching
138
+ When you have multiple features, the system helps you:
139
+ - List all existing features with their status
140
+ - Switch context between features
141
+ - Continue work from where you left off
142
+ - Track overall project progress across all features
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: spec
2
+ name: sp-spec
3
3
  description: Create or manage feature specifications using AI-optimized templates
4
4
  allowed_tools:
5
5
  - Read
@@ -9,29 +9,35 @@ allowed_tools:
9
9
  - TodoWrite
10
10
  ---
11
11
 
12
- # /spec Command
12
+ # /sp-spec Command
13
13
 
14
14
  Create, update, or validate feature specifications using SpecPulse methodology with AI-optimized templates.
15
15
 
16
16
  ## Usage
17
17
  ```
18
- /spec [action] [description|feature-name]
18
+ /sp-spec [action] [description|feature-name]
19
19
  ```
20
20
 
21
21
  Actions: `create`, `update`, `validate`, `clarify` (defaults to `create`)
22
22
 
23
23
  ## Implementation
24
24
 
25
- When called with `/spec $ARGUMENTS`, I will:
25
+ When called with `/sp-spec $ARGUMENTS`, I will:
26
26
 
27
- 1. **Parse arguments** to determine action:
27
+ 1. **Detect current feature context**:
28
+ - Read `memory/context.md` for current feature metadata
29
+ - Use git branch name if available (e.g., `001-user-authentication`)
30
+ - Fall back to most recently created feature directory
31
+ - If no context found, ask user to specify feature or run `/sp-pulse` first
32
+
33
+ 2. **Parse arguments** to determine action:
28
34
  - If starts with `create`: Generate new specification
29
35
  - If starts with `update`: Modify existing specification
30
36
  - If starts with `validate`: Check specification completeness
31
37
  - If starts with `clarify`: Address [NEEDS CLARIFICATION] markers
32
38
  - If no action specified: Default to `create` with full arguments as description
33
39
 
34
- 2. **For `/spec create [description]` or `/spec [description]`:**
40
+ 3. **For `/sp-spec create [description]` or `/sp-spec [description]`:**
35
41
  - Read AI-optimized template from `templates/spec.md`
36
42
  - Parse the description to identify:
37
43
  - Functional requirements (Must/Should/Could/Won't have)
@@ -43,32 +49,37 @@ When called with `/spec $ARGUMENTS`, I will:
43
49
  # Specification: {{ feature_name }}
44
50
  ## Metadata
45
51
  - **ID**: SPEC-{{ feature_id }}
52
+ - **Version**: {{ version }}
46
53
  - **Created**: {{ date }}
47
54
  ```
48
55
  - Mark any uncertainties with `[NEEDS CLARIFICATION: specific question]`
49
- - Find current feature directory from context or create new
50
- - Write specification to `specs/ID-feature-name/spec.md`
56
+ - Use detected feature context to determine target directory
57
+ - **Version management**: Check existing spec files and create next version (spec-001.md, spec-002.md, etc.)
58
+ - Write specification to `specs/ID-feature-name/spec-XXX.md`
51
59
  - Run enhanced validation with cross-platform detection:
52
- - **Windows**: `powershell scripts/pulse-spec.ps1 "$FEATURE_DIR"`
53
- - **Linux/macOS**: `bash scripts/pulse-spec.sh "$FEATURE_DIR"`
54
- - **Python Fallback**: `python scripts/pulse-spec.py "$FEATURE_DIR"`
60
+ - **Linux/macOS**: `bash scripts/sp-pulse-spec.sh "$FEATURE_DIR"`
61
+ - **Python Fallback**: `python scripts/sp-pulse-spec.py "$FEATURE_DIR"`
55
62
 
56
- 3. **For `/spec update`:**
57
- - Read existing specification from current context
63
+ 4. **For `/sp-spec update`:**
64
+ - **Show existing spec files**: List all spec-XXX.md files in current feature directory
65
+ - **Ask user to select**: Which spec file to update
66
+ - Read selected specification file
58
67
  - Parse update requests and identify sections to modify
59
68
  - Update content while preserving AI-friendly template structure
60
69
  - Remove resolved `[NEEDS CLARIFICATION]` markers
61
70
  - Run validation to ensure completeness
62
71
 
63
- 4. **For `/spec validate`:**
64
- - Read current specification
72
+ 5. **For `/sp-spec validate`:**
73
+ - **Show existing spec files**: List all spec-XXX.md files in current feature directory
74
+ - **Ask user to select**: Which spec file to validate
75
+ - Read selected specification file from detected context
65
76
  - Check all required sections using enhanced validation:
66
77
  ```bash
67
78
  # Cross-platform detection
68
79
  if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
69
- powershell scripts/pulse-spec.ps1 "$FEATURE_DIR"
80
+ python scripts/sp-pulse-spec.py "$FEATURE_DIR"
70
81
  else
71
- bash scripts/pulse-spec.sh "$FEATURE_DIR" || python scripts/pulse-spec.py "$FEATURE_DIR"
82
+ bash scripts/sp-pulse-spec.sh "$FEATURE_DIR" || python scripts/sp-pulse-spec.py "$FEATURE_DIR"
72
83
  fi
73
84
  ```
74
85
  - Count `[NEEDS CLARIFICATION]` markers
@@ -76,7 +87,9 @@ When called with `/spec $ARGUMENTS`, I will:
76
87
  - Check constitutional compliance indicators
77
88
  - Report detailed validation results
78
89
 
79
- 5. **For `/spec clarify`:**
90
+ 6. **For `/sp-spec clarify`:**
91
+ - **Show existing spec files**: List all spec-XXX.md files in current feature directory
92
+ - **Ask user to select**: Which spec file to clarify
80
93
  - Find all `[NEEDS CLARIFICATION]` markers
81
94
  - Address each uncertainty with user input
82
95
  - Update specification with resolved information
@@ -87,7 +100,7 @@ When called with `/spec $ARGUMENTS`, I will:
87
100
 
88
101
  ### Creating a new specification
89
102
  ```
90
- User: /spec create user authentication system with OAuth2 and JWT tokens
103
+ User: /sp-spec create user authentication system with OAuth2 and JWT tokens
91
104
  ```
92
105
  I will create a comprehensive specification using AI-optimized templates with:
93
106
  - Jinja2-style variables for AI processing
@@ -97,13 +110,13 @@ I will create a comprehensive specification using AI-optimized templates with:
97
110
 
98
111
  ### Updating existing specification
99
112
  ```
100
- User: /spec update add password complexity requirements
113
+ User: /sp-spec update add password complexity requirements
101
114
  ```
102
115
  I will read the current spec, update password requirements, and validate changes.
103
116
 
104
117
  ### Validating specification
105
118
  ```
106
- User: /spec validate
119
+ User: /sp-spec validate
107
120
  ```
108
121
  I will run enhanced validation with detailed reporting:
109
122
  ```
@@ -115,7 +128,7 @@ STATUS=validation_complete
115
128
 
116
129
  ### Addressing clarifications
117
130
  ```
118
- User: /spec clarify
131
+ User: /sp-spec clarify
119
132
  ```
120
133
  I will systematically address all [NEEDS CLARIFICATION] markers.
121
134
 
@@ -152,7 +165,7 @@ The AI-optimized specification template includes:
152
165
  ## Integration Features
153
166
 
154
167
  - **Cross-platform script execution** with automatic detection
155
- - **Enhanced script integration** with Bash, PowerShell, and Python support
168
+ - **Enhanced script integration** with Bash and Python support
156
169
  - **Template variable processing** for AI optimization
157
170
  - **Automated validation** with detailed reporting
158
171
  - **Context-aware operation** using memory/context.md
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: sp-status
3
+ description: Track progress across all features and specific feature details
4
+ allowed_tools:
5
+ - Read
6
+ - Write
7
+ - Edit
8
+ - Bash
9
+ - TodoWrite
10
+ ---
11
+
12
+ # /sp-status Command
13
+
14
+ Track progress across all features or get detailed status of a specific feature.
15
+
16
+ ## Usage
17
+ ```
18
+ /sp-status [feature-name]
19
+ ```
20
+
21
+ ## Implementation
22
+
23
+ When called with `/sp-status $ARGUMENTS`, I will:
24
+
25
+ 1. **Parse arguments** to determine scope:
26
+ - If feature name provided: Show detailed status for that feature
27
+ - Otherwise: Show overview of all features
28
+
29
+ 2. **Read feature context** from `memory/context.md`
30
+
31
+ 3. **For `/sp-status` (all features overview):**
32
+ - Scan all feature directories (specs/*, plans/*, tasks/*)
33
+ - Count features by status: active, completed, in_progress, paused
34
+ - Calculate overall project progress
35
+ - Show summary statistics:
36
+ ```
37
+ TOTAL_FEATURES=5
38
+ ACTIVE_FEATURES=2
39
+ COMPLETED_FEATURES=1
40
+ IN_PROGRESS_FEATURES=1
41
+ PAUSED_FEATURES=1
42
+ OVERALL_PROGRESS=42%
43
+ ```
44
+ - List all features with their status and progress percentage
45
+ - Highlight current active feature from context
46
+
47
+ 4. **For `/sp-status [feature-name]` (detailed feature status):**
48
+ - Detect feature directory (using context detection logic)
49
+ - Read all task files in the feature's tasks directory
50
+ - Calculate completion percentage based on task status
51
+ - Show detailed breakdown:
52
+ ```
53
+ FEATURE: 001-user-authentication
54
+ STATUS: active
55
+ PROGRESS: 65%
56
+ SPECS: 2 files
57
+ PLANS: 1 file
58
+ TASKS: 1 file (25 total tasks)
59
+ COMPLETED_TASKS: 16
60
+ IN_PROGRESS_TASKS: 5
61
+ BLOCKED_TASKS: 1
62
+ LAST_UPDATED: 2025-01-09
63
+ ```
64
+ - Show phase-by-phase progress
65
+ - List any blockers or issues
66
+ - Provide recommendations for next steps
67
+
68
+ 5. **Progress calculation logic:**
69
+ - Scan task files for completion status: `[x]` for completed, `[ ]` for pending, `[-]` for in progress, `[!]` for blocked
70
+ - Calculate percentages: completed / total * 100
71
+ - Track trends over time if historical data available
72
+
73
+ ## Feature Status Indicators
74
+
75
+ - **Active**: Currently being worked on (in context.md)
76
+ - **Completed**: All tasks marked as complete
77
+ - **In Progress**: Has task files with some completed tasks
78
+ - **Paused**: No recent activity, not all tasks complete
79
+ - **Blocked**: Has blocked tasks preventing progress
80
+
81
+ ## Examples
82
+
83
+ ### All features overview
84
+ ```
85
+ User: /sp-status
86
+ ```
87
+
88
+ I will display:
89
+ ```
90
+ ## Feature Status Overview
91
+
92
+ **Total Features**: 5
93
+ **Overall Progress**: 42%
94
+
95
+ ### Active Features
96
+ - [🔄] 001-user-authentication (65%)
97
+ - [🔄] 002-payment-processing (23%)
98
+
99
+ ### Completed Features
100
+ - [✅] 000-project-setup (100%)
101
+
102
+ ### In Progress Features
103
+ - [⏳] 003-user-profile (45%)
104
+
105
+ ### Paused Features
106
+ - [⏸️] 004-notifications (78%)
107
+
108
+ ### Current Context
109
+ **Active Feature**: 001-user-authentication
110
+ **Last Updated**: 2025-01-09
111
+ ```
112
+
113
+ ### Specific feature status
114
+ ```
115
+ User: /sp-status user-authentication
116
+ ```
117
+
118
+ I will display:
119
+ ```
120
+ ## Feature Status: 001-user-authentication
121
+
122
+ **Overall Progress**: 65%
123
+ **Status**: Active
124
+ **Created**: 2025-01-09
125
+ **Last Updated**: 2025-01-09
126
+
127
+ ### Files
128
+ - **Specifications**: spec-001.md, spec-002.md (2 files)
129
+ - **Plans**: plan-001.md (1 file)
130
+ - **Tasks**: task-001.md (1 file, 25 total tasks)
131
+
132
+ ### Task Progress
133
+ - **Completed**: 16 tasks (64%)
134
+ - **In Progress**: 5 tasks (20%)
135
+ - **Blocked**: 1 task (4%)
136
+ - **Pending**: 3 tasks (12%)
137
+
138
+ ### Phase Progress
139
+ - **Phase 0 (Critical Path)**: 80% complete
140
+ - **Phase 1 (Foundation)**: 70% complete
141
+ - **Phase 2 (Core Features)**: 50% complete
142
+ - **Phase 3 (Polish)**: 20% complete
143
+ - **Phase 4 (Testing)**: 0% complete
144
+
145
+ ### Blockers
146
+ - T015: Database schema approval pending
147
+
148
+ ### Recommendations
149
+ 1. Resolve database schema blocker (T015)
150
+ 2. Continue with Phase 2 core features
151
+ 3. Consider starting Phase 4 testing in parallel
152
+ ```
153
+
154
+ ## Integration Features
155
+
156
+ - **Multi-feature tracking** across entire project
157
+ - **Progress percentage calculation** from task completion
158
+ - **Status categorization** with visual indicators
159
+ - **Blocker identification** and resolution tracking
160
+ - **Context-aware operation** using memory/context.md
161
+ - **Cross-platform compatibility** with proper path handling
162
+ - **Historical trend tracking** for progress over time
163
+
164
+ ## Error Handling
165
+
166
+ - Feature directory validation
167
+ - Task file parsing with error recovery
168
+ - Progress calculation validation
169
+ - Context file fallback handling
170
+ - Permission and access error handling