specpulse 1.0.6__py3-none-any.whl → 1.1.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.
- specpulse/__init__.py +1 -1
- specpulse/cli/main.py +598 -617
- specpulse/core/specpulse.py +1110 -1105
- specpulse/resources/commands/claude/sp-continue.md +203 -0
- specpulse/resources/commands/claude/{plan.md → sp-plan.md} +53 -38
- specpulse/resources/commands/claude/sp-pulse.md +142 -0
- specpulse/resources/commands/claude/{spec.md → sp-spec.md} +36 -23
- specpulse/resources/commands/claude/sp-status.md +170 -0
- specpulse/resources/commands/claude/{task.md → sp-task.md} +68 -48
- specpulse/resources/commands/gemini/sp-continue.toml +56 -0
- specpulse/resources/commands/gemini/sp-plan.toml +68 -0
- specpulse/resources/commands/gemini/{pulse.toml → sp-pulse.toml} +12 -6
- specpulse/resources/commands/gemini/sp-spec.toml +54 -0
- specpulse/resources/commands/gemini/sp-status.toml +61 -0
- specpulse/resources/commands/gemini/sp-task.toml +79 -0
- specpulse/resources/memory/constitution.md +5 -5
- specpulse/resources/memory/context.md +12 -1
- specpulse/resources/scripts/{pulse-init.py → sp-pulse-init.py} +6 -6
- specpulse/resources/scripts/{pulse-init.sh → sp-pulse-init.sh} +95 -95
- specpulse/resources/scripts/{pulse-plan.py → sp-pulse-plan.py} +32 -7
- specpulse/resources/scripts/{pulse-plan.sh → sp-pulse-plan.sh} +136 -126
- specpulse/resources/scripts/{pulse-spec.py → sp-pulse-spec.py} +26 -6
- specpulse/resources/scripts/{pulse-spec.sh → sp-pulse-spec.sh} +126 -103
- specpulse/resources/scripts/{pulse-task.py → sp-pulse-task.py} +42 -6
- specpulse/resources/scripts/{pulse-task.sh → sp-pulse-task.sh} +32 -16
- specpulse/resources/templates/plan.md +206 -206
- specpulse/resources/templates/spec.md +125 -125
- specpulse/resources/templates/task.md +164 -163
- {specpulse-1.0.6.dist-info → specpulse-1.1.0.dist-info}/METADATA +35 -35
- specpulse-1.1.0.dist-info/RECORD +41 -0
- specpulse/resources/commands/claude/pulse.md +0 -91
- specpulse/resources/commands/gemini/plan.toml +0 -59
- specpulse/resources/commands/gemini/spec.toml +0 -45
- specpulse/resources/commands/gemini/task.toml +0 -69
- specpulse/resources/scripts/pulse-init.ps1 +0 -186
- specpulse/resources/scripts/pulse-plan.ps1 +0 -251
- specpulse/resources/scripts/pulse-spec.ps1 +0 -185
- specpulse/resources/scripts/pulse-task.ps1 +0 -263
- specpulse-1.0.6.dist-info/RECORD +0 -41
- {specpulse-1.0.6.dist-info → specpulse-1.1.0.dist-info}/WHEEL +0 -0
- {specpulse-1.0.6.dist-info → specpulse-1.1.0.dist-info}/entry_points.txt +0 -0
- {specpulse-1.0.6.dist-info → specpulse-1.1.0.dist-info}/licenses/LICENSE +0 -0
- {specpulse-1.0.6.dist-info → specpulse-1.1.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,203 @@
|
|
1
|
+
---
|
2
|
+
name: sp-continue
|
3
|
+
description: Switch context and continue work on a specific feature
|
4
|
+
allowed_tools:
|
5
|
+
- Read
|
6
|
+
- Write
|
7
|
+
- Edit
|
8
|
+
- Bash
|
9
|
+
- TodoWrite
|
10
|
+
---
|
11
|
+
|
12
|
+
# /sp-continue Command
|
13
|
+
|
14
|
+
Switch context to a specific feature and continue work from where you left off.
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
```
|
18
|
+
/sp-continue <feature-name|feature-id>
|
19
|
+
```
|
20
|
+
|
21
|
+
## Implementation
|
22
|
+
|
23
|
+
When called with `/sp-continue $ARGUMENTS`, I will:
|
24
|
+
|
25
|
+
1. **Parse arguments** to extract feature name or ID
|
26
|
+
2. **Find feature directory** using context detection:
|
27
|
+
- Search for matching feature directory (specs/*, plans/*, tasks/*)
|
28
|
+
- Support partial matching (e.g., "auth" matches "001-user-authentication")
|
29
|
+
- Support ID matching (e.g., "001" matches "001-user-authentication")
|
30
|
+
|
31
|
+
3. **Validate feature exists**:
|
32
|
+
- Check if feature directory has any files
|
33
|
+
- Verify feature structure is intact
|
34
|
+
- Report if feature not found
|
35
|
+
|
36
|
+
4. **Update context** in `memory/context.md`:
|
37
|
+
```yaml
|
38
|
+
# Feature Context
|
39
|
+
|
40
|
+
## Current Feature
|
41
|
+
- **ID**: 001
|
42
|
+
- **Name**: user-authentication
|
43
|
+
- **Branch**: 001-user-authentication
|
44
|
+
- **Status**: active
|
45
|
+
- **Created**: 2025-01-09
|
46
|
+
- **Last Updated**: 2025-01-09
|
47
|
+
- **Switched To**: 2025-01-09 (via /continue)
|
48
|
+
```
|
49
|
+
|
50
|
+
5. **Switch git branch** if in git repository:
|
51
|
+
- Checkout feature branch if it exists
|
52
|
+
- Report if branch doesn't exist
|
53
|
+
- Handle branch switching errors gracefully
|
54
|
+
|
55
|
+
6. **Display feature status**:
|
56
|
+
- Show current progress percentage
|
57
|
+
- List next available actions
|
58
|
+
- Highlight any blockers or issues
|
59
|
+
- Show recent activity
|
60
|
+
|
61
|
+
7. **Suggest next steps** based on feature state:
|
62
|
+
- If no spec files: `/spec <description>`
|
63
|
+
- If spec but no plan: `/plan`
|
64
|
+
- If plan but no tasks: `/task`
|
65
|
+
- If tasks exist: Show task completion status and suggest next task
|
66
|
+
|
67
|
+
## Feature Detection Logic
|
68
|
+
|
69
|
+
The command supports multiple ways to identify features:
|
70
|
+
|
71
|
+
### By Name
|
72
|
+
```
|
73
|
+
/sp-continue user-authentication
|
74
|
+
/sp-continue "user authentication"
|
75
|
+
/sp-continue auth
|
76
|
+
```
|
77
|
+
|
78
|
+
### By ID
|
79
|
+
```
|
80
|
+
/sp-continue 001
|
81
|
+
/sp-continue 002
|
82
|
+
```
|
83
|
+
|
84
|
+
### By Partial Match
|
85
|
+
```
|
86
|
+
/sp-continue user # Matches any feature with "user" in name
|
87
|
+
/sp-continue pay # Matches "payment-processing"
|
88
|
+
```
|
89
|
+
|
90
|
+
## Context Switching
|
91
|
+
|
92
|
+
When switching features, the system:
|
93
|
+
|
94
|
+
1. **Saves previous context**:
|
95
|
+
- Stores previous feature state
|
96
|
+
- Notes switch reason and timestamp
|
97
|
+
- Preserves all progress tracking data
|
98
|
+
|
99
|
+
2. **Loads new context**:
|
100
|
+
- Updates `memory/context.md` with new feature
|
101
|
+
- Loads feature metadata
|
102
|
+
- Calculates current progress
|
103
|
+
|
104
|
+
3. **Environment setup**:
|
105
|
+
- Switches git branch if available
|
106
|
+
- Updates working directory context
|
107
|
+
- Prepares for continued development
|
108
|
+
|
109
|
+
## Examples
|
110
|
+
|
111
|
+
### Basic feature switch
|
112
|
+
```
|
113
|
+
User: /sp-continue user-authentication
|
114
|
+
```
|
115
|
+
|
116
|
+
I will:
|
117
|
+
- Find feature: `001-user-authentication`
|
118
|
+
- Update context: Switch from current feature to `001-user-authentication`
|
119
|
+
- Switch git branch: `git checkout 001-user-authentication`
|
120
|
+
- Display status:
|
121
|
+
```
|
122
|
+
## Switched to Feature: 001-user-authentication
|
123
|
+
|
124
|
+
**Progress**: 65% complete
|
125
|
+
**Status**: Active
|
126
|
+
**Last Worked**: 2025-01-09
|
127
|
+
|
128
|
+
### Next Steps
|
129
|
+
- 16 tasks completed, 9 remaining
|
130
|
+
- 1 blocker: T015 (Database schema approval)
|
131
|
+
- Suggested action: /sp-status user-authentication for details
|
132
|
+
```
|
133
|
+
|
134
|
+
### Continue with ID
|
135
|
+
```
|
136
|
+
User: /sp-continue 002
|
137
|
+
```
|
138
|
+
|
139
|
+
I will:
|
140
|
+
- Find feature: `002-payment-processing`
|
141
|
+
- Switch context and display feature status
|
142
|
+
|
143
|
+
### Feature not found
|
144
|
+
```
|
145
|
+
User: /sp-continue non-existent-feature
|
146
|
+
```
|
147
|
+
|
148
|
+
I will:
|
149
|
+
- Search for matching features
|
150
|
+
- Show available features:
|
151
|
+
```
|
152
|
+
Feature "non-existent-feature" not found.
|
153
|
+
|
154
|
+
Available features:
|
155
|
+
- 001-user-authentication (65%)
|
156
|
+
- 002-payment-processing (23%)
|
157
|
+
- 003-user-profile (45%)
|
158
|
+
|
159
|
+
Use /sp-status to see all features.
|
160
|
+
```
|
161
|
+
|
162
|
+
## Integration Features
|
163
|
+
|
164
|
+
- **Intelligent feature matching** with partial name and ID support
|
165
|
+
- **Context preservation** when switching between features
|
166
|
+
- **Git integration** with automatic branch switching
|
167
|
+
- **Progress tracking** across feature switches
|
168
|
+
- **Smart suggestions** for next actions based on feature state
|
169
|
+
- **Error recovery** with helpful fallback options
|
170
|
+
- **Cross-platform compatibility** for any development environment
|
171
|
+
|
172
|
+
## Error Handling
|
173
|
+
|
174
|
+
- Feature not found with suggestions
|
175
|
+
- Git branch switching errors
|
176
|
+
- Context file permission issues
|
177
|
+
- Directory structure validation
|
178
|
+
- Progress calculation errors
|
179
|
+
- Working directory validation
|
180
|
+
|
181
|
+
## Multi-Feature Workflow
|
182
|
+
|
183
|
+
The `/continue` command enables efficient multi-feature development:
|
184
|
+
|
185
|
+
```
|
186
|
+
# Start new feature
|
187
|
+
/sp-pulse new-feature
|
188
|
+
/sp-spec "feature description"
|
189
|
+
/sp-plan
|
190
|
+
/sp-task
|
191
|
+
|
192
|
+
# Switch to existing feature
|
193
|
+
/sp-continue user-authentication
|
194
|
+
|
195
|
+
# Check status and continue work
|
196
|
+
/sp-status user-authentication
|
197
|
+
# ... complete some tasks ...
|
198
|
+
|
199
|
+
# Switch back to new feature
|
200
|
+
/sp-continue new-feature
|
201
|
+
```
|
202
|
+
|
203
|
+
This enables developers to context-switch between multiple active features while maintaining progress tracking and development context.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
---
|
2
|
-
name: plan
|
2
|
+
name: sp-plan
|
3
3
|
description: Generate or validate implementation plans using AI-optimized templates
|
4
4
|
allowed_tools:
|
5
5
|
- Read
|
@@ -9,55 +9,65 @@ allowed_tools:
|
|
9
9
|
- TodoWrite
|
10
10
|
---
|
11
11
|
|
12
|
-
# /plan Command
|
12
|
+
# /sp-plan Command
|
13
13
|
|
14
14
|
Generate implementation plans from specifications following SpecPulse methodology with constitutional compliance and AI-optimized templates.
|
15
15
|
|
16
16
|
## Usage
|
17
17
|
```
|
18
|
-
/plan [action] [feature-directory]
|
18
|
+
/sp-plan [action] [feature-directory]
|
19
19
|
```
|
20
20
|
|
21
21
|
Actions: `generate`, `validate`, `optimize` (defaults to `generate`)
|
22
22
|
|
23
23
|
## Implementation
|
24
24
|
|
25
|
-
When called with `/plan $ARGUMENTS`, I will:
|
25
|
+
When called with `/sp-plan $ARGUMENTS`, I will:
|
26
26
|
|
27
|
-
1. **
|
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** and determine action:
|
28
34
|
- If `validate`: Check plan against constitutional gates
|
29
35
|
- If `optimize`: Improve existing plan complexity
|
30
36
|
- Otherwise: Generate new plan
|
31
37
|
|
32
|
-
|
33
|
-
a. **
|
38
|
+
3. **For `/sp-plan generate` or `/sp-plan`:**
|
39
|
+
a. **Show existing spec files**: List all spec-XXX.md files in current feature directory
|
40
|
+
b. **Ask user to select**: Which spec file to base plan on
|
41
|
+
c. **Find and validate specification** from selected spec file
|
34
42
|
|
35
|
-
|
43
|
+
d. **Enhanced validation** using cross-platform script:
|
36
44
|
```bash
|
37
45
|
# Cross-platform detection
|
38
46
|
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
39
|
-
|
47
|
+
python scripts/sp-pulse-plan.py "$FEATURE_DIR"
|
40
48
|
else
|
41
|
-
bash scripts/pulse-plan.sh "$FEATURE_DIR" || python scripts/pulse-plan.py "$FEATURE_DIR"
|
49
|
+
bash scripts/sp-pulse-plan.sh "$FEATURE_DIR" || python scripts/sp-pulse-plan.py "$FEATURE_DIR"
|
42
50
|
fi
|
43
51
|
```
|
44
52
|
|
45
|
-
|
53
|
+
e. **Run Constitutional Phase Gates** (Article VII):
|
46
54
|
- Simplicity Gate: ≤3 modules justification
|
47
55
|
- Anti-Abstraction Gate: Direct framework usage
|
48
56
|
- Test-First Gate: Tests before implementation
|
49
57
|
- Integration-First Gate: Real services over mocks
|
50
58
|
- Research Gate: Technology choices documented
|
51
59
|
|
52
|
-
|
60
|
+
f. **Generate AI-optimized plan** using template variables:
|
53
61
|
```markdown
|
54
62
|
# Implementation Plan: {{ feature_name }}
|
55
63
|
## Specification Reference
|
56
64
|
- **Spec ID**: SPEC-{{ feature_id }}
|
65
|
+
- **Spec Version**: {{ spec_version }}
|
66
|
+
- **Plan Version**: {{ plan_version }}
|
57
67
|
- **Generated**: {{ date }}
|
58
68
|
```
|
59
69
|
|
60
|
-
|
70
|
+
g. **Generate comprehensive sections**:
|
61
71
|
- Technology stack with performance implications
|
62
72
|
- Architecture overview with component relationships
|
63
73
|
- Implementation phases with timeline estimates
|
@@ -67,37 +77,42 @@ When called with `/plan $ARGUMENTS`, I will:
|
|
67
77
|
- Security considerations with compliance requirements
|
68
78
|
- Deployment strategy with rollback plans
|
69
79
|
|
70
|
-
|
80
|
+
h. **Complexity tracking** (Article VII):
|
71
81
|
- Document all complexity exceptions with justifications
|
72
82
|
- Create mitigation strategies for each exception
|
73
83
|
- Track optimization opportunities
|
74
84
|
|
75
|
-
|
85
|
+
i. **Version management**: Check existing plan files and create next version (plan-001.md, plan-002.md, etc.)
|
86
|
+
j. **Write optimized plan** to `plans/XXX-feature/plan-XXX.md`
|
76
87
|
|
77
|
-
|
78
|
-
|
88
|
+
4. **For `/sp-plan validate`:**
|
89
|
+
a. **Show existing plan files**: List all plan-XXX.md files in current feature directory
|
90
|
+
b. **Ask user to select**: Which plan file to validate
|
91
|
+
c. **Enhanced validation** using cross-platform script:
|
79
92
|
```bash
|
80
93
|
# Cross-platform detection
|
81
94
|
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
82
|
-
|
95
|
+
python scripts/sp-pulse-plan.py "$FEATURE_DIR"
|
83
96
|
else
|
84
|
-
bash scripts/pulse-plan.sh "$FEATURE_DIR" || python scripts/pulse-plan.py "$FEATURE_DIR"
|
97
|
+
bash scripts/sp-pulse-plan.sh "$FEATURE_DIR" || python scripts/sp-pulse-plan.py "$FEATURE_DIR"
|
85
98
|
fi
|
86
99
|
```
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
100
|
+
d. Verify all constitutional gates are addressed
|
101
|
+
e. Check complexity exceptions have proper justifications
|
102
|
+
f. Validate test-first approach is documented
|
103
|
+
g. Ensure integration strategy uses real services
|
104
|
+
h. Report detailed validation results
|
105
|
+
|
106
|
+
5. **For `/sp-plan optimize`:**
|
107
|
+
a. **Show existing plan files**: List all plan-XXX.md files in current feature directory
|
108
|
+
b. **Ask user to select**: Which plan file to optimize
|
109
|
+
c. **Read existing plan** from detected context and analyze complexity
|
110
|
+
d. **Identify optimization opportunities**:
|
111
|
+
- Module consolidation opportunities
|
112
|
+
- Abstraction layer removal candidates
|
113
|
+
- Simplification strategies
|
114
|
+
e. **Generate optimization recommendations**
|
115
|
+
f. **Create new version**: Write optimized plan as next version (plan-XXX.md)
|
101
116
|
|
102
117
|
## Constitutional Phase Gates (Phase -1)
|
103
118
|
|
@@ -137,17 +152,17 @@ When called with `/plan $ARGUMENTS`, I will:
|
|
137
152
|
|
138
153
|
### Generate plan with validation
|
139
154
|
```
|
140
|
-
User: /plan generate
|
155
|
+
User: /sp-plan generate
|
141
156
|
```
|
142
157
|
I will:
|
143
|
-
- Run: `bash scripts/pulse-plan.sh "$FEATURE_DIR"`
|
158
|
+
- Run: `bash scripts/sp-pulse-plan.sh "$FEATURE_DIR"`
|
144
159
|
- Validate: Constitutional gates compliance
|
145
160
|
- Create: AI-optimized plan with template variables
|
146
161
|
- Output: `CONSTITUTIONAL_GATES_STATUS=PENDING`
|
147
162
|
|
148
163
|
### Validate existing plan
|
149
164
|
```
|
150
|
-
User: /plan validate
|
165
|
+
User: /sp-plan validate
|
151
166
|
```
|
152
167
|
I will run comprehensive validation:
|
153
168
|
```
|
@@ -159,7 +174,7 @@ STATUS=validation_complete
|
|
159
174
|
|
160
175
|
### Optimize plan complexity
|
161
176
|
```
|
162
|
-
User: /plan optimize
|
177
|
+
User: /sp-plan optimize
|
163
178
|
```
|
164
179
|
I will analyze and recommend complexity reductions.
|
165
180
|
|
@@ -167,7 +182,7 @@ I will analyze and recommend complexity reductions.
|
|
167
182
|
|
168
183
|
- **AI-optimized templates** with Jinja2-style variables
|
169
184
|
- **Cross-platform script execution** with automatic detection
|
170
|
-
- **Enhanced script integration** for Bash
|
185
|
+
- **Enhanced script integration** for Bash and Python
|
171
186
|
- **Constitutional compliance tracking** with gate status
|
172
187
|
- **Complexity exception management** with justifications
|
173
188
|
- **Performance and security considerations** integrated
|
@@ -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. **
|
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
|
-
|
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
|
-
-
|
50
|
-
-
|
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
|
-
- **
|
53
|
-
- **
|
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
|
-
|
57
|
-
-
|
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
|
-
|
64
|
-
-
|
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
|
-
|
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
|
-
|
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
|
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
|