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.
- specpulse/__init__.py +1 -1
- specpulse/cli/main.py +809 -617
- specpulse/core/specpulse.py +1140 -1105
- specpulse/resources/commands/claude/sp-continue.md +203 -0
- specpulse/resources/commands/claude/sp-decompose.md +227 -0
- specpulse/resources/commands/claude/sp-plan.md +220 -0
- 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/sp-task.md +315 -0
- specpulse/resources/commands/gemini/sp-continue.toml +56 -0
- specpulse/resources/commands/gemini/sp-decompose.toml +54 -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 +53 -1
- specpulse/resources/scripts/sp-pulse-decompose.py +66 -0
- specpulse/resources/scripts/sp-pulse-decompose.sh +56 -0
- 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/decomposition/api-contract.yaml +22 -0
- specpulse/resources/templates/decomposition/integration-plan.md +134 -0
- specpulse/resources/templates/decomposition/interface.ts +20 -0
- specpulse/resources/templates/decomposition/microservices.md +34 -0
- specpulse/resources/templates/decomposition/service-plan.md +168 -0
- 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.2.0.dist-info}/METADATA +95 -36
- specpulse-1.2.0.dist-info/RECORD +50 -0
- specpulse/resources/commands/claude/plan.md +0 -184
- specpulse/resources/commands/claude/pulse.md +0 -91
- specpulse/resources/commands/claude/task.md +0 -237
- 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.2.0.dist-info}/WHEEL +0 -0
- {specpulse-1.0.6.dist-info → specpulse-1.2.0.dist-info}/entry_points.txt +0 -0
- {specpulse-1.0.6.dist-info → specpulse-1.2.0.dist-info}/licenses/LICENSE +0 -0
- {specpulse-1.0.6.dist-info → specpulse-1.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,315 @@
|
|
1
|
+
---
|
2
|
+
name: sp-task
|
3
|
+
description: Generate and manage task breakdowns using AI-optimized templates
|
4
|
+
allowed_tools:
|
5
|
+
- Read
|
6
|
+
- Write
|
7
|
+
- Edit
|
8
|
+
- Bash
|
9
|
+
- TodoWrite
|
10
|
+
---
|
11
|
+
|
12
|
+
# /sp-task Command
|
13
|
+
|
14
|
+
Generate task breakdowns from implementation plans using SpecPulse methodology with AI-optimized templates and enhanced validation.
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
```
|
18
|
+
/sp-task [action] [feature-directory]
|
19
|
+
```
|
20
|
+
|
21
|
+
Actions: `breakdown`, `update`, `status`, `execute` (defaults to `breakdown`)
|
22
|
+
|
23
|
+
## Implementation
|
24
|
+
|
25
|
+
When called with `/sp-task $ARGUMENTS`, I will:
|
26
|
+
|
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:
|
34
|
+
- If `update`: Update task status and dependencies
|
35
|
+
- If `status`: Show comprehensive progress with metrics
|
36
|
+
- If `execute`: Execute task with script integration
|
37
|
+
- Otherwise: Generate task breakdown
|
38
|
+
|
39
|
+
3. **For `/sp-task breakdown` or `/sp-task`:**
|
40
|
+
|
41
|
+
a. **Check for decomposition**: Look for `specs/XXX-feature/decomposition/` directory
|
42
|
+
b. **If decomposed**:
|
43
|
+
- Read service definitions from decomposition
|
44
|
+
- Show service-specific plan files (auth-service-plan.md, user-service-plan.md, etc.)
|
45
|
+
- Generate tasks per service with service prefix (AUTH-T001, USER-T001)
|
46
|
+
- Create integration tasks (INT-T001) for cross-service work
|
47
|
+
- Structure: `tasks/XXX-feature/auth-service-tasks.md`, `integration-tasks.md`
|
48
|
+
c. **If not decomposed**:
|
49
|
+
- Show existing plan files and ask user to select
|
50
|
+
- Generate single task file with standard IDs (T001, T002)
|
51
|
+
c. **Enhanced validation** using cross-platform script:
|
52
|
+
```bash
|
53
|
+
# Cross-platform detection
|
54
|
+
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
55
|
+
python scripts/sp-pulse-task.py "$FEATURE_DIR"
|
56
|
+
else
|
57
|
+
bash scripts/sp-pulse-task.sh "$FEATURE_DIR" || python scripts/sp-pulse-task.py "$FEATURE_DIR"
|
58
|
+
fi
|
59
|
+
```
|
60
|
+
|
61
|
+
d. **Read implementation plan** from selected plan file
|
62
|
+
|
63
|
+
e. **Generate AI-optimized tasks** using template variables:
|
64
|
+
```markdown
|
65
|
+
# Task List: {{ feature_name }}
|
66
|
+
## Metadata
|
67
|
+
- **Total Tasks**: {{ task_count }}
|
68
|
+
- **Estimated Duration**: {{ total_duration }}
|
69
|
+
- **Plan Reference**: plan-{{ plan_version }}.md
|
70
|
+
- **Task Version**: {{ task_version }}
|
71
|
+
```
|
72
|
+
|
73
|
+
f. **Generate structured task categories based on architecture**:
|
74
|
+
- **For decomposed services**:
|
75
|
+
* Service-specific tasks with bounded context
|
76
|
+
* Inter-service integration tasks
|
77
|
+
* Service deployment order tasks
|
78
|
+
* Contract testing tasks between services
|
79
|
+
- **For monolithic architecture**:
|
80
|
+
* Layer-based tasks (data, business, API)
|
81
|
+
* Module-specific tasks
|
82
|
+
- **Common categories**:
|
83
|
+
* Constitutional Gates Compliance
|
84
|
+
* Critical Path identification
|
85
|
+
* Parallel vs Sequential grouping
|
86
|
+
* Progress Tracking configuration
|
87
|
+
|
88
|
+
g. **For each task**, generate comprehensive metadata:
|
89
|
+
- **ID**: T[XXX] format (T001, T002)
|
90
|
+
- **Type**: setup, development, testing, documentation
|
91
|
+
- **Priority**: HIGH, MEDIUM, LOW
|
92
|
+
- **Estimate**: Hours or complexity points
|
93
|
+
- **Dependencies**: Task ID dependencies
|
94
|
+
- **Description**: Clear what needs to be done
|
95
|
+
- **Acceptance**: How to verify completion
|
96
|
+
- **Files**: Files to be created/modified
|
97
|
+
- **Assignable**: Role/skill required
|
98
|
+
- **Parallel**: Whether can run in parallel [P]
|
99
|
+
|
100
|
+
h. **Generate AI execution guidelines** with workflow integration:
|
101
|
+
```markdown
|
102
|
+
## AI Execution Strategy
|
103
|
+
### Parallel Tasks (can be worked on simultaneously):
|
104
|
+
- T001, T002, T003: Independent tasks, no dependencies
|
105
|
+
### Sequential Tasks (must be completed in order):
|
106
|
+
- T004 → T005 → T006: Dependency chain
|
107
|
+
```
|
108
|
+
|
109
|
+
i. **Version management**: Check existing task files and create next version (task-001.md, task-002.md, etc.)
|
110
|
+
j. **Write comprehensive task breakdown** to `tasks/XXX-feature/task-XXX.md`
|
111
|
+
|
112
|
+
4. **For `/sp-task update`:**
|
113
|
+
a. **Show existing task files**: List all task-XXX.md files in current feature directory
|
114
|
+
b. **Ask user to select**: Which task file to update
|
115
|
+
c. **Enhanced analysis** using cross-platform script:
|
116
|
+
```bash
|
117
|
+
# Cross-platform detection
|
118
|
+
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
119
|
+
python scripts/sp-pulse-task.py "$FEATURE_DIR"
|
120
|
+
else
|
121
|
+
bash scripts/sp-pulse-task.sh "$FEATURE_DIR" || python scripts/sp-pulse-task.py "$FEATURE_DIR"
|
122
|
+
fi
|
123
|
+
```
|
124
|
+
d. **Parse current tasks** from selected file with comprehensive status:
|
125
|
+
- Total tasks, completed, pending, blocked
|
126
|
+
- Parallel tasks identification
|
127
|
+
- Constitutional gates status
|
128
|
+
- Completion percentage calculation
|
129
|
+
e. **Interactive task updates**:
|
130
|
+
- Mark tasks as completed/in-progress/blocked
|
131
|
+
- Update dependencies and blockers
|
132
|
+
- Add newly discovered tasks with proper metadata
|
133
|
+
- Adjust estimates based on actual progress
|
134
|
+
f. **Generate updated progress tracking** YAML
|
135
|
+
|
136
|
+
5. **For `/sp-task status`:**
|
137
|
+
a. **Show existing task files**: List all task-XXX.md files in current feature directory
|
138
|
+
b. **Ask user to select**: Which task file to show status for
|
139
|
+
c. **Enhanced reporting** from script output:
|
140
|
+
```bash
|
141
|
+
TOTAL_TASKS=25
|
142
|
+
COMPLETED_TASKS=10
|
143
|
+
COMPLETION_PERCENTAGE=40%
|
144
|
+
CONSTITUTIONAL_GATES_PENDING=2
|
145
|
+
```
|
146
|
+
d. **Display comprehensive progress**:
|
147
|
+
- Overall completion percentage
|
148
|
+
- Phase-by-phase progress
|
149
|
+
- Blocker identification and resolution
|
150
|
+
- Velocity metrics and estimates
|
151
|
+
- Constitutional gates compliance status
|
152
|
+
|
153
|
+
6. **For `/sp-task execute`:**
|
154
|
+
a. **Show existing task files**: List all task-XXX.md files in current feature directory
|
155
|
+
b. **Ask user to select**: Which task file to execute from
|
156
|
+
c. **Ask user to specify**: Which specific task ID to execute
|
157
|
+
d. **Validate task readiness** using constitutional gates
|
158
|
+
e. **Execute task** using AI assistant capabilities:
|
159
|
+
```markdown
|
160
|
+
## Task Execution: {{ TASK_ID }}
|
161
|
+
**AI Assistant**: Claude/Gemini
|
162
|
+
**Method**: Direct implementation within AI session
|
163
|
+
**Status**: [ ] Pending → [-] In Progress → [x] Completed
|
164
|
+
```
|
165
|
+
f. **Track execution results** and update status
|
166
|
+
g. **Update progress tracking** automatically
|
167
|
+
|
168
|
+
## Enhanced Task Format
|
169
|
+
|
170
|
+
### For Decomposed Services
|
171
|
+
```markdown
|
172
|
+
### Auth Service Tasks
|
173
|
+
#### AUTH-T001: Initialize auth service structure
|
174
|
+
- **Service**: Authentication
|
175
|
+
- **Type**: setup
|
176
|
+
- **Priority**: HIGH
|
177
|
+
- **Dependencies**: None
|
178
|
+
|
179
|
+
### User Service Tasks
|
180
|
+
#### USER-T001: Initialize user service structure
|
181
|
+
- **Service**: User Management
|
182
|
+
- **Type**: setup
|
183
|
+
- **Priority**: HIGH
|
184
|
+
- **Dependencies**: None
|
185
|
+
|
186
|
+
### Integration Tasks
|
187
|
+
#### INT-T001: Set up service communication
|
188
|
+
- **Services**: Auth ↔ User
|
189
|
+
- **Type**: integration
|
190
|
+
- **Priority**: HIGH
|
191
|
+
- **Dependencies**: AUTH-T001, USER-T001
|
192
|
+
```
|
193
|
+
|
194
|
+
### For Monolithic Architecture
|
195
|
+
```markdown
|
196
|
+
### Parallel Group A
|
197
|
+
#### T001: Initialize project structure
|
198
|
+
- **Type**: setup
|
199
|
+
- **Priority**: HIGH
|
200
|
+
- **Estimate**: 2 hours
|
201
|
+
- **Dependencies**: None
|
202
|
+
- **Description**: Set up project directory structure and configuration
|
203
|
+
- **Acceptance**: All directories exist and config files are valid
|
204
|
+
- **Files**: package.json, README.md, .gitignore
|
205
|
+
- **Assignable**: developer
|
206
|
+
- **Parallel**: [P]
|
207
|
+
|
208
|
+
## Progress Tracking
|
209
|
+
```yaml
|
210
|
+
status:
|
211
|
+
total: 25
|
212
|
+
completed: 10
|
213
|
+
in_progress: 3
|
214
|
+
blocked: 0
|
215
|
+
|
216
|
+
metrics:
|
217
|
+
velocity: 2-3 tasks/day
|
218
|
+
estimated_completion: 2025-09-15
|
219
|
+
completion_percentage: 40%
|
220
|
+
```
|
221
|
+
|
222
|
+
## Constitutional Gates Integration
|
223
|
+
|
224
|
+
Each task breakdown includes constitutional compliance validation:
|
225
|
+
- **Simplicity Gate**: Tasks avoid unnecessary complexity
|
226
|
+
- **Test-First Gate**: Test tasks before implementation tasks
|
227
|
+
- **Integration-First Gate**: Real service integration preferred
|
228
|
+
- **Research Gate**: Technology research tasks included
|
229
|
+
|
230
|
+
## Examples
|
231
|
+
|
232
|
+
### Generate tasks for decomposed spec
|
233
|
+
```
|
234
|
+
User: /sp-task breakdown
|
235
|
+
```
|
236
|
+
Detecting decomposition in `specs/001-authentication/decomposition/`...
|
237
|
+
I will create:
|
238
|
+
- `tasks/001-authentication/auth-service-tasks.md`
|
239
|
+
- `tasks/001-authentication/user-service-tasks.md`
|
240
|
+
- `tasks/001-authentication/integration-tasks.md`
|
241
|
+
|
242
|
+
### Generate tasks for monolithic spec
|
243
|
+
```
|
244
|
+
User: /sp-task breakdown
|
245
|
+
```
|
246
|
+
No decomposition found. Creating single task file:
|
247
|
+
- `tasks/001-authentication/task-001.md`
|
248
|
+
|
249
|
+
### Execute service-specific task
|
250
|
+
```
|
251
|
+
User: /sp-task execute AUTH-T001
|
252
|
+
```
|
253
|
+
I will:
|
254
|
+
- Run: Cross-platform detection and execution
|
255
|
+
```bash
|
256
|
+
# Cross-platform detection
|
257
|
+
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
258
|
+
python scripts/sp-pulse-task.py "$FEATURE_DIR"
|
259
|
+
else
|
260
|
+
bash scripts/sp-pulse-task.sh "$FEATURE_DIR" || python scripts/sp-pulse-task.py "$FEATURE_DIR"
|
261
|
+
fi
|
262
|
+
```
|
263
|
+
- Create: AI-optimized task structure with template variables
|
264
|
+
- Output: `TOTAL_TASKS=25, PARALLEL_TASKS=8, STATUS=generated`
|
265
|
+
|
266
|
+
### Update task status
|
267
|
+
```
|
268
|
+
User: /sp-task update mark T001-T005 as completed
|
269
|
+
```
|
270
|
+
I will update task status and recalculate progress metrics.
|
271
|
+
|
272
|
+
### Show comprehensive status
|
273
|
+
```
|
274
|
+
User: /sp-task status
|
275
|
+
```
|
276
|
+
I will display detailed progress with constitutional gates compliance.
|
277
|
+
|
278
|
+
### Execute specific task
|
279
|
+
```
|
280
|
+
User: /sp-task execute T001
|
281
|
+
```
|
282
|
+
I will:
|
283
|
+
- Validate: Constitutional gates compliance and task readiness
|
284
|
+
- Execute: Cross-platform task execution
|
285
|
+
```bash
|
286
|
+
# Cross-platform task execution
|
287
|
+
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
288
|
+
python scripts/sp-pulse-task.py "$FEATURE_DIR" "execute:$TASK_ID"
|
289
|
+
else
|
290
|
+
bash scripts/sp-pulse-task.sh "$FEATURE_DIR" "execute:$TASK_ID" || python scripts/sp-pulse-task.py "$FEATURE_DIR" "execute:$TASK_ID"
|
291
|
+
fi
|
292
|
+
```
|
293
|
+
- Track: Results and update progress automatically
|
294
|
+
|
295
|
+
## Enhanced Features
|
296
|
+
|
297
|
+
- **Cross-platform script execution** with automatic detection (Bash/Python)
|
298
|
+
- **AI-optimized templates** with Jinja2-style variables
|
299
|
+
- **Enhanced script integration** for validation and execution
|
300
|
+
- **Constitutional gates compliance** tracking
|
301
|
+
- **Parallel task identification** and execution
|
302
|
+
- **Comprehensive progress tracking** with YAML configuration
|
303
|
+
- **Automatic percentage calculation** and velocity metrics
|
304
|
+
- **Task dependency management** with conflict detection
|
305
|
+
- **Execution command generation** with script integration
|
306
|
+
- **Platform-agnostic operation** for Windows, Linux, and macOS
|
307
|
+
|
308
|
+
## Error Handling
|
309
|
+
|
310
|
+
- Plan existence validation before task generation
|
311
|
+
- Constitutional gates compliance checking
|
312
|
+
- Template structure validation
|
313
|
+
- Dependency conflict detection
|
314
|
+
- Task execution error handling with rollback
|
315
|
+
- Progress tracking validation and correction
|
@@ -0,0 +1,56 @@
|
|
1
|
+
description = "Switch context and continue work on a specific feature"
|
2
|
+
prompt = """
|
3
|
+
Handle the /sp-continue command with arguments: {{args}}
|
4
|
+
|
5
|
+
Parse arguments to extract feature name or ID
|
6
|
+
|
7
|
+
## Feature Detection:
|
8
|
+
1. Find feature directory using context detection:
|
9
|
+
- Search for matching feature directory (specs/*, plans/*, tasks/*)
|
10
|
+
- Support partial matching (e.g., "auth" matches "001-user-authentication")
|
11
|
+
- Support ID matching (e.g., "001" matches "001-user-authentication")
|
12
|
+
|
13
|
+
2. Validate feature exists:
|
14
|
+
- Check if feature directory has any files
|
15
|
+
- Verify feature structure is intact
|
16
|
+
- Report if feature not found
|
17
|
+
|
18
|
+
3. Update context in memory/context.md:
|
19
|
+
- Switch current feature to selected feature
|
20
|
+
- Update timestamp and switch reason
|
21
|
+
- Preserve previous context data
|
22
|
+
|
23
|
+
4. Switch git branch if in git repository:
|
24
|
+
- Checkout feature branch if it exists
|
25
|
+
- Report if branch doesn't exist
|
26
|
+
- Handle branch switching errors gracefully
|
27
|
+
|
28
|
+
5. Display feature status:
|
29
|
+
- Show current progress percentage
|
30
|
+
- List next available actions
|
31
|
+
- Highlight any blockers or issues
|
32
|
+
- Show recent activity
|
33
|
+
|
34
|
+
6. Suggest next steps based on feature state:
|
35
|
+
- If no spec files: /sp-spec <description>
|
36
|
+
- If spec but no plan: /sp-plan
|
37
|
+
- If plan but no tasks: /sp-task
|
38
|
+
- If tasks exist: Show task completion status and suggest next task
|
39
|
+
|
40
|
+
## Supported Feature Identification:
|
41
|
+
- By name: /sp-continue user-authentication
|
42
|
+
- By ID: /sp-continue 001
|
43
|
+
- By partial match: /sp-continue auth
|
44
|
+
|
45
|
+
## Context Switching:
|
46
|
+
1. Save previous context state
|
47
|
+
2. Load new feature context
|
48
|
+
3. Update memory/context.md
|
49
|
+
4. Switch git branch if available
|
50
|
+
5. Display feature status and next steps
|
51
|
+
|
52
|
+
Examples:
|
53
|
+
- /sp-continue user-authentication
|
54
|
+
- /sp-continue 001
|
55
|
+
- /sp-continue auth
|
56
|
+
"""
|
@@ -0,0 +1,54 @@
|
|
1
|
+
[command]
|
2
|
+
name = "sp-decompose"
|
3
|
+
description = "Decompose large specifications into microservices, APIs, and smaller components"
|
4
|
+
type = "spec-decomposition"
|
5
|
+
|
6
|
+
[prompt]
|
7
|
+
template = """
|
8
|
+
Decompose the specification {{args}} into smaller, manageable components.
|
9
|
+
|
10
|
+
Analysis required:
|
11
|
+
1. Identify microservice boundaries using DDD principles
|
12
|
+
2. Define API contracts with OpenAPI specifications
|
13
|
+
3. Create interface specifications for each component
|
14
|
+
4. Map data ownership and consistency boundaries
|
15
|
+
5. Design communication patterns between services
|
16
|
+
|
17
|
+
Generate:
|
18
|
+
- Service definitions with clear responsibilities
|
19
|
+
- API contracts in OpenAPI 3.0 format
|
20
|
+
- Interface specifications in appropriate languages
|
21
|
+
- Data models and schemas
|
22
|
+
- Integration mapping diagram
|
23
|
+
- Migration plan from monolith
|
24
|
+
|
25
|
+
Apply these principles:
|
26
|
+
- Domain-Driven Design for boundaries
|
27
|
+
- SOLID principles for design
|
28
|
+
- Single responsibility per service
|
29
|
+
- Clear data ownership
|
30
|
+
- Minimal coupling between services
|
31
|
+
|
32
|
+
Output structure:
|
33
|
+
specs/XXX-feature/decomposition/
|
34
|
+
├── microservices.md
|
35
|
+
├── api-contracts/
|
36
|
+
├── interfaces/
|
37
|
+
├── data-models/
|
38
|
+
├── integration-map.md
|
39
|
+
└── migration-plan.md
|
40
|
+
"""
|
41
|
+
|
42
|
+
[validation]
|
43
|
+
required_outputs = [
|
44
|
+
"microservices.md",
|
45
|
+
"api-contracts",
|
46
|
+
"interfaces",
|
47
|
+
"integration-map.md"
|
48
|
+
]
|
49
|
+
|
50
|
+
[options]
|
51
|
+
microservices = "Focus on service boundary identification"
|
52
|
+
apis = "Generate detailed API contracts"
|
53
|
+
interfaces = "Create interface specifications"
|
54
|
+
all = "Complete decomposition analysis"
|
@@ -0,0 +1,68 @@
|
|
1
|
+
description = "Generate or validate implementation plans with versioning"
|
2
|
+
prompt = """
|
3
|
+
Handle the /sp-plan command with arguments: {{args}}
|
4
|
+
|
5
|
+
First, detect current feature context:
|
6
|
+
- Read memory/context.md for current feature metadata
|
7
|
+
- Use git branch name if available (e.g., 001-user-authentication)
|
8
|
+
- Fall back to most recently created feature directory
|
9
|
+
- If no context found, ask user to specify feature or run /sp-pulse first
|
10
|
+
|
11
|
+
Parse arguments to determine action:
|
12
|
+
- If "validate": Check plan against constitution
|
13
|
+
- Otherwise: Generate new plan
|
14
|
+
|
15
|
+
## For /sp-plan generate or /sp-plan:
|
16
|
+
1. Show list of existing spec files in current feature directory
|
17
|
+
2. Ask user which spec file to base plan on
|
18
|
+
3. Read selected specification from @{specs/*/spec-XXX.md}
|
19
|
+
|
20
|
+
4. Run Phase Gates checks:
|
21
|
+
- Constitutional compliance
|
22
|
+
- Simplicity check (≤3 modules)
|
23
|
+
- Test-first strategy defined
|
24
|
+
- Framework selection complete
|
25
|
+
- Research completed
|
26
|
+
|
27
|
+
5. Generate plan sections:
|
28
|
+
- Technology stack
|
29
|
+
- Architecture overview
|
30
|
+
- Implementation phases
|
31
|
+
- API contracts
|
32
|
+
- Data models
|
33
|
+
- Testing strategy
|
34
|
+
|
35
|
+
6. Track complexity:
|
36
|
+
- If >3 modules, document justification
|
37
|
+
- Create simplification roadmap
|
38
|
+
|
39
|
+
7. Check existing plan files and create next version (plan-001.md, plan-002.md, etc.)
|
40
|
+
8. Write plan to plans/XXX-feature/plan-XXX.md
|
41
|
+
9. Run cross-platform validation:
|
42
|
+
- Linux/macOS: !{bash scripts/sp-pulse-plan.sh "XXX-feature"}
|
43
|
+
- Fallback: !{python scripts/sp-pulse-plan.py "XXX-feature"}
|
44
|
+
|
45
|
+
## For /sp-plan validate:
|
46
|
+
1. Show list of existing plan files in current feature directory
|
47
|
+
2. Ask user which plan file to validate
|
48
|
+
3. Read selected plan from @{plans/*/plan-XXX.md}
|
49
|
+
4. Run cross-platform validation:
|
50
|
+
- Linux/macOS: !{bash scripts/sp-pulse-plan.sh "XXX-feature"}
|
51
|
+
- Fallback: !{python scripts/sp-pulse-plan.py "XXX-feature"}
|
52
|
+
5. Verify Phase Gates compliance
|
53
|
+
6. Check complexity tracking
|
54
|
+
7. Ensure test-first approach
|
55
|
+
8. Validate framework choices
|
56
|
+
9. Report validation results
|
57
|
+
|
58
|
+
Phase Gates (Phase -1) must pass before implementation:
|
59
|
+
- ✅ Using ≤3 projects/modules
|
60
|
+
- ✅ Tests defined before code
|
61
|
+
- ✅ Using framework features directly
|
62
|
+
- ✅ No premature abstractions
|
63
|
+
- ✅ Research completed
|
64
|
+
|
65
|
+
Examples:
|
66
|
+
- /sp-plan generate
|
67
|
+
- /sp-plan validate
|
68
|
+
"""
|
@@ -6,9 +6,8 @@ Please follow these steps:
|
|
6
6
|
|
7
7
|
1. Extract the feature name from the provided arguments
|
8
8
|
2. Run the initialization script with cross-platform detection:
|
9
|
-
-
|
10
|
-
-
|
11
|
-
- Fallback: !{python scripts/pulse-init.py "{{args}"}
|
9
|
+
- Linux/macOS: !{bash scripts/sp-pulse-init.sh "{{args}}"}
|
10
|
+
- Fallback: !{python scripts/sp-pulse-init.py "{{args}}"}
|
12
11
|
3. Create the feature structure:
|
13
12
|
- Generate feature ID (001, 002, etc.)
|
14
13
|
- Create directories: specs/XXX-feature/, plans/XXX-feature/, tasks/XXX-feature/
|
@@ -16,12 +15,19 @@ Please follow these steps:
|
|
16
15
|
- Update memory/context.md with current feature
|
17
16
|
- Create git branch if in git repository
|
18
17
|
|
19
|
-
4.
|
18
|
+
4. Suggest specification options:
|
19
|
+
- Generate 2-3 different specification suggestions based on the feature name
|
20
|
+
- Present options to user as numbered choices
|
21
|
+
- Ask user to choose one or provide their own specification description
|
22
|
+
- Guide user to use /sp-spec command after making selection
|
23
|
+
|
24
|
+
5. Report the results showing:
|
20
25
|
- Created structure paths
|
21
26
|
- Feature ID and branch name
|
22
|
-
-
|
27
|
+
- Specification suggestions for user to choose from
|
28
|
+
- Next steps guidance
|
23
29
|
|
24
30
|
If no feature name is provided, ask the user for the feature name first.
|
25
31
|
|
26
|
-
Example usage: /pulse user-authentication
|
32
|
+
Example usage: /sp-pulse user-authentication
|
27
33
|
"""
|
@@ -0,0 +1,54 @@
|
|
1
|
+
description = "Create or manage feature specifications with versioning"
|
2
|
+
prompt = """
|
3
|
+
Handle the /sp-spec command with arguments: {{args}}
|
4
|
+
|
5
|
+
First, detect current feature context:
|
6
|
+
- Read memory/context.md for current feature metadata
|
7
|
+
- Use git branch name if available (e.g., 001-user-authentication)
|
8
|
+
- Fall back to most recently created feature directory
|
9
|
+
- If no context found, ask user to specify feature or run /sp-pulse first
|
10
|
+
|
11
|
+
Parse the arguments to determine the action:
|
12
|
+
- If starts with "create": Generate new specification
|
13
|
+
- If starts with "update": Modify existing specification
|
14
|
+
- If starts with "validate": Check specification completeness
|
15
|
+
- If no action specified: Default to "create" with full arguments as description
|
16
|
+
|
17
|
+
## For /sp-spec create [description] or /sp-spec [description]:
|
18
|
+
1. Read template from @{templates/spec.md}
|
19
|
+
2. Parse the description to identify:
|
20
|
+
- Functional requirements (Must/Should/Could have)
|
21
|
+
- User stories and acceptance criteria
|
22
|
+
- Technical requirements
|
23
|
+
3. Mark any uncertainties with [NEEDS CLARIFICATION: detail]
|
24
|
+
4. Find current feature directory from detected context
|
25
|
+
5. Check existing spec files and create next version (spec-001.md, spec-002.md, etc.)
|
26
|
+
6. Write specification to specs/XXX-feature/spec-XXX.md
|
27
|
+
7. Run cross-platform validation:
|
28
|
+
- Linux/macOS: !{bash scripts/sp-pulse-spec.sh "XXX-feature"}
|
29
|
+
- Fallback: !{python scripts/sp-pulse-spec.py "XXX-feature"}
|
30
|
+
|
31
|
+
## For /sp-spec update:
|
32
|
+
1. Show list of existing spec files in current feature directory
|
33
|
+
2. Ask user which spec file to update
|
34
|
+
3. Read selected specification file
|
35
|
+
4. Ask user for clarifications or changes
|
36
|
+
5. Update content while preserving structure
|
37
|
+
6. Remove resolved [NEEDS CLARIFICATION] markers
|
38
|
+
|
39
|
+
## For /sp-spec validate:
|
40
|
+
1. Show list of existing spec files in current feature directory
|
41
|
+
2. Ask user which spec file to validate
|
42
|
+
3. Run cross-platform validation:
|
43
|
+
- Linux/macOS: !{bash scripts/sp-pulse-spec.sh "XXX-feature"}
|
44
|
+
- Fallback: !{python scripts/sp-pulse-spec.py "XXX-feature"}
|
45
|
+
4. Check all required sections are filled
|
46
|
+
5. Count [NEEDS CLARIFICATION] markers
|
47
|
+
6. Verify acceptance criteria are testable
|
48
|
+
7. Report validation results
|
49
|
+
|
50
|
+
Examples:
|
51
|
+
- /sp-spec user authentication with OAuth2 and email/password
|
52
|
+
- /sp-spec update
|
53
|
+
- /sp-spec validate
|
54
|
+
"""
|
@@ -0,0 +1,61 @@
|
|
1
|
+
description = "Track progress across all features or specific feature details"
|
2
|
+
prompt = """
|
3
|
+
Handle the /sp-status command with arguments: {{args}}
|
4
|
+
|
5
|
+
First, detect current feature context:
|
6
|
+
- Read memory/context.md for current feature metadata
|
7
|
+
- Use git branch name if available (e.g., 001-user-authentication)
|
8
|
+
- Fall back to most recently created feature directory
|
9
|
+
- If no context found, work with all features
|
10
|
+
|
11
|
+
Parse arguments to determine scope:
|
12
|
+
- If feature name provided: Show detailed status for that feature
|
13
|
+
- Otherwise: Show overview of all features
|
14
|
+
|
15
|
+
## For /sp-status (all features overview):
|
16
|
+
1. Scan all feature directories (specs/*, plans/*, tasks/*)
|
17
|
+
2. Count features by status: active, completed, in_progress, paused
|
18
|
+
3. Calculate overall project progress
|
19
|
+
4. Show summary statistics:
|
20
|
+
```
|
21
|
+
TOTAL_FEATURES=5
|
22
|
+
ACTIVE_FEATURES=2
|
23
|
+
COMPLETED_FEATURES=1
|
24
|
+
IN_PROGRESS_FEATURES=1
|
25
|
+
PAUSED_FEATURES=1
|
26
|
+
OVERALL_PROGRESS=42%
|
27
|
+
```
|
28
|
+
5. List all features with their status and progress percentage
|
29
|
+
6. Highlight current active feature from context
|
30
|
+
|
31
|
+
## For /sp-status [feature-name] (detailed feature status):
|
32
|
+
1. Detect feature directory using context detection logic
|
33
|
+
2. Read all task files in the feature's tasks directory
|
34
|
+
3. Calculate completion percentage based on task status
|
35
|
+
4. Show detailed breakdown:
|
36
|
+
```
|
37
|
+
FEATURE: 001-user-authentication
|
38
|
+
STATUS: active
|
39
|
+
PROGRESS: 65%
|
40
|
+
SPECS: 2 files
|
41
|
+
PLANS: 1 file
|
42
|
+
TASKS: 1 file (25 total tasks)
|
43
|
+
COMPLETED_TASKS: 16
|
44
|
+
IN_PROGRESS_TASKS: 5
|
45
|
+
BLOCKED_TASKS: 1
|
46
|
+
LAST_UPDATED: 2025-01-09
|
47
|
+
```
|
48
|
+
5. Show phase-by-phase progress
|
49
|
+
6. List any blockers or issues
|
50
|
+
7. Provide recommendations for next steps
|
51
|
+
|
52
|
+
Progress calculation:
|
53
|
+
- Scan task files for completion status: [x] completed, [ ] pending, [-] in progress, [!] blocked
|
54
|
+
- Calculate percentages: completed / total * 100
|
55
|
+
- Track status: active, completed, in_progress, paused, blocked
|
56
|
+
|
57
|
+
Examples:
|
58
|
+
- /sp-status
|
59
|
+
- /sp-status user-authentication
|
60
|
+
- /sp-status 001
|
61
|
+
"""
|