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
@@ -46,35 +46,51 @@ if [ -z "$FEATURE_DIR" ]; then
|
|
46
46
|
fi
|
47
47
|
fi
|
48
48
|
|
49
|
-
|
49
|
+
TASK_DIR="$PROJECT_ROOT/tasks/${FEATURE_DIR}"
|
50
|
+
PLAN_DIR="$PROJECT_ROOT/plans/${FEATURE_DIR}"
|
51
|
+
SPEC_DIR="$PROJECT_ROOT/specs/${FEATURE_DIR}"
|
50
52
|
TEMPLATE_FILE="$PROJECT_ROOT/templates/task.md"
|
51
|
-
PLAN_FILE="$PROJECT_ROOT/plans/${FEATURE_DIR}/plan.md"
|
52
|
-
SPEC_FILE="$PROJECT_ROOT/specs/${FEATURE_DIR}/spec.md"
|
53
53
|
|
54
54
|
# Ensure tasks directory exists
|
55
|
-
mkdir -p "$
|
55
|
+
mkdir -p "$TASK_DIR"
|
56
56
|
|
57
|
-
#
|
58
|
-
if [
|
59
|
-
|
57
|
+
# Find latest spec file
|
58
|
+
if [ -d "$SPEC_DIR" ]; then
|
59
|
+
SPEC_FILE=$(find "$SPEC_DIR" -name "spec-*.md" -printf "%T@ %p\n" | sort -n | tail -1 | cut -d' ' -f2-)
|
60
|
+
if [ -z "$SPEC_FILE" ]; then
|
61
|
+
error_exit "No specification files found in $SPEC_DIR. Please create specification first."
|
62
|
+
fi
|
63
|
+
else
|
64
|
+
error_exit "Specifications directory not found: $SPEC_DIR. Please create specification first."
|
60
65
|
fi
|
61
66
|
|
62
|
-
|
63
|
-
|
67
|
+
# Find latest plan file
|
68
|
+
if [ -d "$PLAN_DIR" ]; then
|
69
|
+
PLAN_FILE=$(find "$PLAN_DIR" -name "plan-*.md" -printf "%T@ %p\n" | sort -n | tail -1 | cut -d' ' -f2-)
|
70
|
+
if [ -z "$PLAN_FILE" ]; then
|
71
|
+
error_exit "No plan files found in $PLAN_DIR. Please create plan first."
|
72
|
+
fi
|
73
|
+
else
|
74
|
+
error_exit "Plans directory not found: $PLAN_DIR. Please create plan first."
|
64
75
|
fi
|
65
76
|
|
77
|
+
# Find next available task number or create new one
|
78
|
+
if [ -d "$TASK_DIR" ]; then
|
79
|
+
existing_tasks=$(find "$TASK_DIR" -name "task-*.md" | wc -l)
|
80
|
+
task_number=$((existing_tasks + 1))
|
81
|
+
else
|
82
|
+
task_number=1
|
83
|
+
fi
|
84
|
+
TASK_FILE="$TASK_DIR/task-$(printf "%03d" $task_number).md"
|
85
|
+
|
66
86
|
# Ensure task template exists
|
67
87
|
if [ ! -f "$TEMPLATE_FILE" ]; then
|
68
88
|
error_exit "Template not found: $TEMPLATE_FILE"
|
69
89
|
fi
|
70
90
|
|
71
|
-
# Create task file
|
72
|
-
|
73
|
-
|
74
|
-
cp "$TEMPLATE_FILE" "$TASK_FILE" || error_exit "Failed to copy task template"
|
75
|
-
else
|
76
|
-
log "Task breakdown already exists: $TASK_FILE"
|
77
|
-
fi
|
91
|
+
# Create task file
|
92
|
+
log "Creating task breakdown from template: $TASK_FILE"
|
93
|
+
cp "$TEMPLATE_FILE" "$TASK_FILE" || error_exit "Failed to copy task template"
|
78
94
|
|
79
95
|
# Validate task structure
|
80
96
|
log "Validating task breakdown..."
|
@@ -0,0 +1,22 @@
|
|
1
|
+
openapi: 3.0.0
|
2
|
+
info:
|
3
|
+
title: {{ service_name }} API
|
4
|
+
version: {{ version }}
|
5
|
+
description: {{ service_description }}
|
6
|
+
|
7
|
+
servers:
|
8
|
+
- url: {{ base_url }}
|
9
|
+
description: {{ environment }}
|
10
|
+
|
11
|
+
paths:
|
12
|
+
{{ paths }}
|
13
|
+
|
14
|
+
components:
|
15
|
+
schemas:
|
16
|
+
{{ schemas }}
|
17
|
+
|
18
|
+
securitySchemes:
|
19
|
+
{{ security_schemes }}
|
20
|
+
|
21
|
+
tags:
|
22
|
+
{{ tags }}
|
@@ -0,0 +1,134 @@
|
|
1
|
+
# Integration Plan: {{ feature_name }}
|
2
|
+
|
3
|
+
## Metadata
|
4
|
+
- **Spec ID**: {{ spec_id }}
|
5
|
+
- **Decomposition Date**: {{ decomposition_date }}
|
6
|
+
- **Services Count**: {{ service_count }}
|
7
|
+
- **Generated**: {{ date }}
|
8
|
+
- **Version**: {{ version }}
|
9
|
+
|
10
|
+
## Service Overview
|
11
|
+
|
12
|
+
{{ service_list }}
|
13
|
+
|
14
|
+
## Integration Architecture
|
15
|
+
|
16
|
+
```mermaid
|
17
|
+
{{ architecture_diagram }}
|
18
|
+
```
|
19
|
+
|
20
|
+
## Communication Strategy
|
21
|
+
|
22
|
+
### Synchronous Communication
|
23
|
+
{{ sync_communication }}
|
24
|
+
|
25
|
+
### Asynchronous Communication
|
26
|
+
{{ async_communication }}
|
27
|
+
|
28
|
+
## Data Consistency Strategy
|
29
|
+
|
30
|
+
### Transaction Boundaries
|
31
|
+
{{ transaction_strategy }}
|
32
|
+
|
33
|
+
### Event Sourcing
|
34
|
+
{{ event_sourcing }}
|
35
|
+
|
36
|
+
### Saga Patterns
|
37
|
+
{{ saga_patterns }}
|
38
|
+
|
39
|
+
## Integration Phases
|
40
|
+
|
41
|
+
### Phase 1: Service Infrastructure
|
42
|
+
**Duration**: {{ phase1_duration }}
|
43
|
+
**Deliverables**:
|
44
|
+
- Service discovery setup
|
45
|
+
- API Gateway configuration
|
46
|
+
- Load balancer setup
|
47
|
+
- Service mesh deployment
|
48
|
+
|
49
|
+
### Phase 2: Inter-Service Communication
|
50
|
+
**Duration**: {{ phase2_duration }}
|
51
|
+
**Deliverables**:
|
52
|
+
- REST API endpoints
|
53
|
+
- Message queue setup
|
54
|
+
- Event bus configuration
|
55
|
+
- Circuit breakers
|
56
|
+
|
57
|
+
### Phase 3: Data Synchronization
|
58
|
+
**Duration**: {{ phase3_duration }}
|
59
|
+
**Deliverables**:
|
60
|
+
- Data replication strategy
|
61
|
+
- Cache synchronization
|
62
|
+
- Event replay mechanisms
|
63
|
+
- Consistency validation
|
64
|
+
|
65
|
+
### Phase 4: Integration Testing
|
66
|
+
**Duration**: {{ phase4_duration }}
|
67
|
+
**Deliverables**:
|
68
|
+
- Contract tests
|
69
|
+
- End-to-end scenarios
|
70
|
+
- Performance benchmarks
|
71
|
+
- Chaos engineering tests
|
72
|
+
|
73
|
+
## Service Dependencies
|
74
|
+
|
75
|
+
```yaml
|
76
|
+
dependencies:
|
77
|
+
{{ service_dependencies }}
|
78
|
+
```
|
79
|
+
|
80
|
+
## API Gateway Configuration
|
81
|
+
|
82
|
+
### Routing Rules
|
83
|
+
{{ routing_rules }}
|
84
|
+
|
85
|
+
### Rate Limiting
|
86
|
+
{{ rate_limiting }}
|
87
|
+
|
88
|
+
### Authentication Flow
|
89
|
+
{{ auth_flow }}
|
90
|
+
|
91
|
+
## Monitoring & Observability
|
92
|
+
|
93
|
+
### Distributed Tracing
|
94
|
+
- Correlation ID propagation
|
95
|
+
- Span collection strategy
|
96
|
+
- Trace sampling rate
|
97
|
+
|
98
|
+
### Health Checks
|
99
|
+
{{ health_checks }}
|
100
|
+
|
101
|
+
### SLA Targets
|
102
|
+
{{ sla_targets }}
|
103
|
+
|
104
|
+
## Rollout Strategy
|
105
|
+
|
106
|
+
### Service Deployment Order
|
107
|
+
1. {{ deployment_order }}
|
108
|
+
|
109
|
+
### Feature Flags
|
110
|
+
{{ feature_flags }}
|
111
|
+
|
112
|
+
### Rollback Plan
|
113
|
+
{{ rollback_plan }}
|
114
|
+
|
115
|
+
## Constitutional Compliance
|
116
|
+
- [ ] Each integration point ≤ 3 dependencies (Article I: Simplicity)
|
117
|
+
- [ ] Contract tests defined (Article III: Test-First)
|
118
|
+
- [ ] Real services over mocks (Article VIII: Framework Selection)
|
119
|
+
- [ ] Security at integration points (Article V: Security by Design)
|
120
|
+
|
121
|
+
## Risk Assessment
|
122
|
+
|
123
|
+
### Integration Risks
|
124
|
+
{{ integration_risks }}
|
125
|
+
|
126
|
+
### Mitigation Strategies
|
127
|
+
{{ mitigation_strategies }}
|
128
|
+
|
129
|
+
## Success Criteria
|
130
|
+
- [ ] All services communicating successfully
|
131
|
+
- [ ] Data consistency maintained
|
132
|
+
- [ ] Performance targets met
|
133
|
+
- [ ] Zero message loss
|
134
|
+
- [ ] Graceful degradation working
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/**
|
2
|
+
* {{ interface_name }}
|
3
|
+
* {{ interface_description }}
|
4
|
+
*
|
5
|
+
* Bounded Context: {{ bounded_context }}
|
6
|
+
* Service: {{ service_name }}
|
7
|
+
*/
|
8
|
+
|
9
|
+
export interface {{ interface_name }} {
|
10
|
+
{{ methods }}
|
11
|
+
}
|
12
|
+
|
13
|
+
// Data Transfer Objects
|
14
|
+
{{ dto_definitions }}
|
15
|
+
|
16
|
+
// Event Contracts
|
17
|
+
{{ event_contracts }}
|
18
|
+
|
19
|
+
// Domain Types
|
20
|
+
{{ domain_types }}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Microservice Decomposition: {{ feature_name }}
|
2
|
+
|
3
|
+
## Metadata
|
4
|
+
- **Spec ID**: {{ spec_id }}
|
5
|
+
- **Decomposed**: {{ date }}
|
6
|
+
- **Version**: {{ version }}
|
7
|
+
|
8
|
+
## Service Boundaries
|
9
|
+
|
10
|
+
{{ services }}
|
11
|
+
|
12
|
+
## Communication Matrix
|
13
|
+
|
14
|
+
{{ communication_patterns }}
|
15
|
+
|
16
|
+
## Data Ownership
|
17
|
+
|
18
|
+
{{ data_boundaries }}
|
19
|
+
|
20
|
+
## Integration Points
|
21
|
+
|
22
|
+
{{ integration_points }}
|
23
|
+
|
24
|
+
## Constitutional Compliance
|
25
|
+
- [ ] Each service ≤ 3 core modules (Article I: Simplicity)
|
26
|
+
- [ ] Single responsibility per service (Article V)
|
27
|
+
- [ ] Clear test boundaries defined (Article III)
|
28
|
+
- [ ] Framework selection documented (Article VIII)
|
29
|
+
|
30
|
+
## Next Steps
|
31
|
+
1. Review service boundaries with team
|
32
|
+
2. Run `/sp-plan generate` with decomposition context
|
33
|
+
3. Create tasks per service with `/sp-task breakdown`
|
34
|
+
4. Validate with `/sp-validate decomposition`
|
@@ -0,0 +1,168 @@
|
|
1
|
+
# Service Plan: {{ service_name }}
|
2
|
+
|
3
|
+
## Metadata
|
4
|
+
- **Service**: {{ service_name }}
|
5
|
+
- **Bounded Context**: {{ bounded_context }}
|
6
|
+
- **Spec Reference**: {{ spec_id }}
|
7
|
+
- **Generated**: {{ date }}
|
8
|
+
- **Version**: {{ version }}
|
9
|
+
|
10
|
+
## Service Overview
|
11
|
+
|
12
|
+
### Responsibility
|
13
|
+
{{ service_responsibility }}
|
14
|
+
|
15
|
+
### Capabilities
|
16
|
+
{{ service_capabilities }}
|
17
|
+
|
18
|
+
### Data Ownership
|
19
|
+
{{ data_ownership }}
|
20
|
+
|
21
|
+
## Architecture
|
22
|
+
|
23
|
+
### Internal Structure
|
24
|
+
```
|
25
|
+
{{ service_name }}/
|
26
|
+
├── domain/ # Business logic
|
27
|
+
├── application/ # Use cases
|
28
|
+
├── infrastructure/ # External interfaces
|
29
|
+
└── presentation/ # API layer
|
30
|
+
```
|
31
|
+
|
32
|
+
### Technology Stack
|
33
|
+
- **Language**: {{ language }}
|
34
|
+
- **Framework**: {{ framework }}
|
35
|
+
- **Database**: {{ database }}
|
36
|
+
- **Cache**: {{ cache }}
|
37
|
+
- **Message Queue**: {{ queue }}
|
38
|
+
|
39
|
+
## API Design
|
40
|
+
|
41
|
+
### REST Endpoints
|
42
|
+
{{ rest_endpoints }}
|
43
|
+
|
44
|
+
### Event Publications
|
45
|
+
{{ event_publications }}
|
46
|
+
|
47
|
+
### Event Subscriptions
|
48
|
+
{{ event_subscriptions }}
|
49
|
+
|
50
|
+
## Data Model
|
51
|
+
|
52
|
+
### Entities
|
53
|
+
{{ entities }}
|
54
|
+
|
55
|
+
### Value Objects
|
56
|
+
{{ value_objects }}
|
57
|
+
|
58
|
+
### Aggregates
|
59
|
+
{{ aggregates }}
|
60
|
+
|
61
|
+
## Implementation Phases
|
62
|
+
|
63
|
+
### Phase 1: Domain Layer
|
64
|
+
**Duration**: {{ phase1_duration }}
|
65
|
+
- Domain entities
|
66
|
+
- Business rules
|
67
|
+
- Domain events
|
68
|
+
- Value objects
|
69
|
+
|
70
|
+
### Phase 2: Application Layer
|
71
|
+
**Duration**: {{ phase2_duration }}
|
72
|
+
- Use cases
|
73
|
+
- Application services
|
74
|
+
- DTOs
|
75
|
+
- Mappers
|
76
|
+
|
77
|
+
### Phase 3: Infrastructure Layer
|
78
|
+
**Duration**: {{ phase3_duration }}
|
79
|
+
- Database repositories
|
80
|
+
- External service clients
|
81
|
+
- Message handlers
|
82
|
+
- Cache implementation
|
83
|
+
|
84
|
+
### Phase 4: API Layer
|
85
|
+
**Duration**: {{ phase4_duration }}
|
86
|
+
- REST controllers
|
87
|
+
- Request/Response models
|
88
|
+
- Validation
|
89
|
+
- Error handling
|
90
|
+
|
91
|
+
## Testing Strategy
|
92
|
+
|
93
|
+
### Unit Tests
|
94
|
+
- Domain logic: {{ domain_coverage }}%
|
95
|
+
- Use cases: {{ usecase_coverage }}%
|
96
|
+
- Infrastructure: {{ infra_coverage }}%
|
97
|
+
|
98
|
+
### Integration Tests
|
99
|
+
{{ integration_tests }}
|
100
|
+
|
101
|
+
### Contract Tests
|
102
|
+
{{ contract_tests }}
|
103
|
+
|
104
|
+
## Service Configuration
|
105
|
+
|
106
|
+
### Environment Variables
|
107
|
+
```yaml
|
108
|
+
{{ env_variables }}
|
109
|
+
```
|
110
|
+
|
111
|
+
### Feature Flags
|
112
|
+
{{ feature_flags }}
|
113
|
+
|
114
|
+
### Secrets Management
|
115
|
+
{{ secrets }}
|
116
|
+
|
117
|
+
## Deployment
|
118
|
+
|
119
|
+
### Container Configuration
|
120
|
+
```dockerfile
|
121
|
+
{{ dockerfile_snippet }}
|
122
|
+
```
|
123
|
+
|
124
|
+
### Resource Requirements
|
125
|
+
- CPU: {{ cpu_requirements }}
|
126
|
+
- Memory: {{ memory_requirements }}
|
127
|
+
- Storage: {{ storage_requirements }}
|
128
|
+
|
129
|
+
### Scaling Strategy
|
130
|
+
{{ scaling_strategy }}
|
131
|
+
|
132
|
+
## Monitoring
|
133
|
+
|
134
|
+
### Metrics
|
135
|
+
{{ metrics }}
|
136
|
+
|
137
|
+
### Logs
|
138
|
+
{{ logging_strategy }}
|
139
|
+
|
140
|
+
### Alerts
|
141
|
+
{{ alert_rules }}
|
142
|
+
|
143
|
+
## Dependencies
|
144
|
+
|
145
|
+
### Internal Services
|
146
|
+
{{ internal_dependencies }}
|
147
|
+
|
148
|
+
### External Services
|
149
|
+
{{ external_dependencies }}
|
150
|
+
|
151
|
+
### Libraries
|
152
|
+
{{ libraries }}
|
153
|
+
|
154
|
+
## Constitutional Compliance
|
155
|
+
- [ ] Service has single responsibility (Article V)
|
156
|
+
- [ ] ≤ 3 core modules (Article I: Simplicity)
|
157
|
+
- [ ] Tests before implementation (Article III)
|
158
|
+
- [ ] Direct framework usage (Article VIII)
|
159
|
+
|
160
|
+
## Risk Assessment
|
161
|
+
{{ risks }}
|
162
|
+
|
163
|
+
## Success Criteria
|
164
|
+
- [ ] All endpoints functional
|
165
|
+
- [ ] Test coverage > {{ test_target }}%
|
166
|
+
- [ ] Performance targets met
|
167
|
+
- [ ] Zero security vulnerabilities
|
168
|
+
- [ ] Documentation complete
|