specpulse 1.0.3__py3-none-any.whl → 1.0.5__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 (32) hide show
  1. specpulse/__init__.py +1 -1
  2. specpulse/resources/commands/claude/plan.md +180 -50
  3. specpulse/resources/commands/claude/pulse.md +79 -24
  4. specpulse/resources/commands/claude/spec.md +156 -43
  5. specpulse/resources/commands/claude/task.md +229 -48
  6. specpulse/resources/commands/gemini/plan.toml +59 -48
  7. specpulse/resources/commands/gemini/pulse.toml +21 -39
  8. specpulse/resources/commands/gemini/spec.toml +40 -28
  9. specpulse/resources/commands/gemini/task.toml +69 -51
  10. specpulse/resources/memory/constitution.md +2 -2
  11. specpulse/resources/scripts/pulse-init.ps1 +186 -0
  12. specpulse/resources/scripts/pulse-init.py +171 -0
  13. specpulse/resources/scripts/pulse-init.sh +80 -21
  14. specpulse/resources/scripts/pulse-plan.ps1 +251 -0
  15. specpulse/resources/scripts/pulse-plan.py +191 -0
  16. specpulse/resources/scripts/pulse-plan.sh +113 -12
  17. specpulse/resources/scripts/pulse-spec.ps1 +185 -0
  18. specpulse/resources/scripts/pulse-spec.py +167 -0
  19. specpulse/resources/scripts/pulse-spec.sh +86 -11
  20. specpulse/resources/scripts/pulse-task.ps1 +263 -0
  21. specpulse/resources/scripts/pulse-task.py +237 -0
  22. specpulse/resources/scripts/pulse-task.sh +123 -9
  23. specpulse/resources/templates/plan.md +142 -287
  24. specpulse/resources/templates/spec.md +80 -246
  25. specpulse/resources/templates/task.md +114 -93
  26. {specpulse-1.0.3.dist-info → specpulse-1.0.5.dist-info}/METADATA +67 -34
  27. specpulse-1.0.5.dist-info/RECORD +41 -0
  28. specpulse-1.0.3.dist-info/RECORD +0 -33
  29. {specpulse-1.0.3.dist-info → specpulse-1.0.5.dist-info}/WHEEL +0 -0
  30. {specpulse-1.0.3.dist-info → specpulse-1.0.5.dist-info}/entry_points.txt +0 -0
  31. {specpulse-1.0.3.dist-info → specpulse-1.0.5.dist-info}/licenses/LICENSE +0 -0
  32. {specpulse-1.0.3.dist-info → specpulse-1.0.5.dist-info}/top_level.txt +0 -0
@@ -1,13 +1,13 @@
1
- <!-- SpecPulse Implementation Plan Template v3.0 -->
2
- <!-- AI Instructions: Generate plan from specification following SDD methodology -->
1
+ <!-- SpecPulse Implementation Plan Template v4.0 - AI-Optimized -->
2
+ <!-- AI Instructions: Generate plan from specification following constitutional gates -->
3
3
 
4
- # Implementation Plan: [FEATURE_NAME]
4
+ # Implementation Plan: {{ feature_name }}
5
5
 
6
6
  ## Specification Reference
7
- - **Spec ID**: SPEC-[XXX]
8
- - **Branch**: [feature-branch-name]
9
- - **Generated**: [DATE]
10
- - **Optimization Focus**: [PERFORMANCE|SECURITY|SIMPLICITY|COST]
7
+ - **Spec ID**: SPEC-{{ feature_id }}
8
+ - **Branch**: {{ branch_name }}
9
+ - **Generated**: {{ date }}
10
+ - **Optimization Focus**: {{ optimization_focus | default("SIMPLICITY") }}
11
11
 
12
12
  ## Phase -1: Pre-Implementation Gates
13
13
 
@@ -20,8 +20,6 @@
20
20
  - [ ] Direct framework usage (no unnecessary wrappers)?
21
21
  - [ ] Single model representation per concept?
22
22
 
23
- **If any checkbox is unchecked, document in Complexity Tracking below**
24
-
25
23
  #### Anti-Abstraction Gate (Article VII)
26
24
  - [ ] Using framework features directly?
27
25
  - [ ] No unnecessary abstraction layers?
@@ -44,308 +42,165 @@
44
42
  - [ ] Library options researched?
45
43
  - [ ] Performance implications documented?
46
44
  - [ ] Security considerations analyzed?
47
- - [ ] Trade-offs documented in research.md?
45
+ - [ ] Trade-offs documented?
48
46
 
49
- **Gate Status**: [ ] PASSED / [ ] BLOCKED (See Complexity Tracking)
47
+ **Gate Status**: {{ gate_status | default("[ ] PENDING") }}
50
48
 
51
49
  ## Complexity Tracking
50
+ {% if complexity_exceptions %}
51
+ {% for exception in complexity_exceptions %}
52
+ ### Exception {{ loop.index }}
53
+ - **Article**: {{ exception.article }}
54
+ - **Violation**: {{ exception.violation }}
55
+ - **Justification**: {{ exception.justification }}
56
+ - **Mitigation**: {{ exception.mitigation }}
57
+ {% endfor %}
58
+ {% else %}
59
+ No complexity exceptions documented.
60
+ {% endif %}
52
61
 
53
- ### Justified Exceptions
54
- ```yaml
55
- complexity_exceptions:
56
- # Example:
57
- # - article: VII
58
- # violation: "Using 4 modules instead of 3"
59
- # justification: "Authentication requires separate service for security isolation"
60
- # approved_by: "[Approver]"
61
- # date: "[DATE]"
62
- ```
63
-
64
- ### Simplification Opportunities
65
- - [ ] Areas identified for future simplification
66
- - [ ] Technical debt documented
67
- - [ ] Refactoring planned for Phase X
62
+ ## Technology Stack
68
63
 
69
- ## Research Summary
70
- **[Link to detailed research.md]**
64
+ ### Core Technologies
65
+ {% for tech in core_technologies %}
66
+ - **{{ tech.name }}**: {{ tech.version }} - {{ tech.purpose }}
67
+ {% endfor %}
71
68
 
72
- ### Library Selection
73
- | Purpose | Options Evaluated | Selected | Rationale |
74
- |---------|------------------|----------|-----------|
75
- | [Need] | [Option1, Option2] | [Choice] | [Why] |
69
+ ### Dependencies
70
+ {% for dep in dependencies %}
71
+ - **{{ dep.name }}**: {{ dep.reason }}
72
+ {% endfor %}
76
73
 
77
- ### Performance Analysis
78
- - Expected load: [metrics]
79
- - Bottlenecks identified: [list]
80
- - Optimization strategy: [approach]
74
+ ## Architecture Overview
81
75
 
82
- ### Security Considerations
83
- - Attack vectors considered: [list]
84
- - Mitigations planned: [list]
85
- - Compliance requirements: [list]
76
+ ### System Components
77
+ {% for component in components %}
78
+ #### {{ component.name }}
79
+ - **Purpose**: {{ component.purpose }}
80
+ - **Key Features**: {{ component.features }}
81
+ - **Dependencies**: {{ component.dependencies | join(", ") }}
82
+ {% endfor %}
83
+
84
+ ### Data Models
85
+ {% for model in data_models %}
86
+ #### {{ model.name }}
87
+ - **Fields**: {{ model.fields | join(", ") }}
88
+ - **Relationships**: {{ model.relationships }}
89
+ - **Validation**: {{ model.validation }}
90
+ {% endfor %}
86
91
 
87
- ## Architecture Overview
92
+ ## Implementation Phases
88
93
 
89
- ### Library-First Design (Article I)
90
- ```
91
- [feature-name]-lib/
92
- ├── cli/ # CLI interface (Article II)
93
- │ └── main.py # Text in/out, JSON support
94
- ├── core/ # Core library logic
95
- │ ├── __init__.py # Public API
96
- │ └── [modules]/ # Internal modules
97
- ├── tests/ # Test-First (Article III)
98
- │ ├── contracts/ # Contract tests first
99
- │ ├── integration/ # Integration tests second
100
- │ ├── e2e/ # End-to-end tests third
101
- │ └── unit/ # Unit tests last
102
- └── docs/ # Executable documentation (Article IX)
94
+ ### Phase 0: Critical Path (Week {{ phase_0.weeks | default(1) }})
95
+ {% for task in phase_0.tasks %}
96
+ - [ ] {{ task.description }}
97
+ {% endfor %}
98
+
99
+ ### Phase 1: Foundation (Week {{ phase_1.weeks | default(2) }})
100
+ {% for task in phase_1.tasks %}
101
+ - [ ] {{ task.description }}
102
+ {% endfor %}
103
+
104
+ ### Phase 2: Core Features (Week {{ phase_2.weeks | default(3) }})
105
+ {% for task in phase_2.tasks %}
106
+ - [ ] {{ task.description }}
107
+ {% endfor %}
108
+
109
+ ### Phase 3: Polish (Week {{ phase_3.weeks | default(1) }})
110
+ {% for task in phase_3.tasks %}
111
+ - [ ] {{ task.description }}
112
+ {% endfor %}
113
+
114
+ ## API Contracts
115
+
116
+ ### Endpoints
117
+ {% for endpoint in endpoints %}
118
+ #### {{ endpoint.method }} {{ endpoint.path }}
119
+ - **Description**: {{ endpoint.description }}
120
+ - **Request**: {{ endpoint.request }}
121
+ - **Response**: {{ endpoint.response }}
122
+ - **Authentication**: {{ endpoint.auth | default("Required") }}
123
+ {% endfor %}
124
+
125
+ ### Data Schemas
126
+ {% for schema in schemas %}
127
+ #### {{ schema.name }}
128
+ ```json
129
+ {{ schema.json | indent(4) }}
103
130
  ```
131
+ {% endfor %}
104
132
 
105
- ### System Architecture
106
- ```mermaid
107
- graph TB
108
- subgraph "Library Architecture"
109
- CLI[CLI Interface] --> Core[Core Library]
110
- Core --> Data[Data Layer]
111
- Core --> Services[Service Layer]
112
- end
113
-
114
- subgraph "Testing Strategy"
115
- CT[Contract Tests] --> IT[Integration Tests]
116
- IT --> E2E[E2E Tests]
117
- E2E --> UT[Unit Tests]
118
- end
119
- ```
133
+ ## Testing Strategy
120
134
 
121
- ## Technology Stack
135
+ ### Test Categories
136
+ - **Unit Tests**: {{ testing.unit.target | default("80% coverage") }}
137
+ - **Integration Tests**: {{ testing.integration.target | default("Critical paths") }}
138
+ - **E2E Tests**: {{ testing.e2e.target | default("Key user workflows") }}
139
+ - **Performance Tests**: {{ testing.performance.target | default("Load testing") }}
122
140
 
123
- ### Core Technologies (Justified per Article VI)
124
- - **Language**: [Choice] - [Research-backed rationale]
125
- - **Framework**: [Choice] - [Why not alternatives]
126
- - **Database**: [Choice] - [Performance/scale rationale]
127
- - **Testing**: [Choice] - [Integration capability rationale]
141
+ ### Test Environment
142
+ - **Database**: {{ testing.environment.database | default("PostgreSQL") }}
143
+ - **Services**: {{ testing.environment.services | join(", ") }}
144
+ - **Test Data**: {{ testing.environment.data_strategy | default("Seed with realistic data") }}
128
145
 
129
- ### Complexity Budget (Article VII)
130
- - Module 1: [Purpose]
131
- - Module 2: [Purpose]
132
- - Module 3: [Purpose] (if needed)
133
- - **Total Modules**: [2-3] ✓
146
+ ## Security Considerations
134
147
 
135
- ## Implementation Phases
148
+ ### Authentication & Authorization
149
+ - **Method**: {{ security.auth_method | default("JWT tokens") }}
150
+ - **Roles**: {{ security.roles | join(", ") }}
151
+ - **Permissions**: {{ security.permissions_model | default("Role-based access control") }}
136
152
 
137
- ### Phase 0: Test Infrastructure Setup
138
- **Duration**: [Estimate]
139
- **Gate**: Must pass all Article III requirements
140
-
141
- 1. **Setup Test Environment**
142
- - [ ] Real database instance (not mocks)
143
- - [ ] Service dependencies running
144
- - [ ] Production-like configuration
145
-
146
- 2. **Write Contract Tests** (Article VIII priority)
147
- ```python
148
- # contracts/test_api_contract.py
149
- def test_api_contract_failing():
150
- """This test MUST fail initially per Article III"""
151
- assert False # Red phase
152
- ```
153
-
154
- 3. **Write Integration Tests**
155
- ```python
156
- # integration/test_service_integration.py
157
- def test_service_integration_failing():
158
- """Test service with real dependencies"""
159
- assert False # Red phase
160
- ```
161
-
162
- ### Phase 1: Library Core Implementation
163
- **Duration**: [Estimate]
164
- **Gate**: All tests from Phase 0 must be failing
165
-
166
- 1. **CLI Interface** (Article II)
167
- ```python
168
- # cli/main.py structure
169
- def main():
170
- """Accept text input, produce text output"""
171
- pass
172
- ```
173
-
174
- 2. **Core Library** (Article I)
175
- - [ ] Minimal implementation to pass first test
176
- - [ ] No premature optimization
177
- - [ ] Direct framework usage
178
-
179
- 3. **Make Tests Pass** (Green phase)
180
- - [ ] Contract tests passing
181
- - [ ] Integration tests passing
182
- - [ ] Refactor while green
183
-
184
- ### Phase 2: Feature Completion
185
- **Duration**: [Estimate]
186
- **Gate**: Core tests passing, ready for features
187
-
188
- 1. **User Story Implementation**
189
- - [ ] Story 1: [Title] - Tests first, then code
190
- - [ ] Story 2: [Title] - Tests first, then code
191
- - [ ] Story 3: [Title] - Tests first, then code
192
-
193
- 2. **End-to-End Testing**
194
- - [ ] Critical path tests with real services
195
- - [ ] Performance benchmarks
196
- - [ ] Security scenarios
197
-
198
- ### Phase 3: Production Readiness
199
- **Duration**: [Estimate]
200
- **Gate**: All acceptance criteria met
201
-
202
- 1. **Documentation** (Article IX - Executable)
203
- ```markdown
204
- # Quick Start (executable)
205
- $ pip install feature-lib
206
- $ feature-cli --help
207
- $ echo "input" | feature-cli process
208
- ```
209
-
210
- 2. **Observability**
211
- - [ ] Logging with structure
212
- - [ ] Metrics exposed
213
- - [ ] Health checks
214
-
215
- 3. **Deployment**
216
- - [ ] CI/CD pipeline
217
- - [ ] Rollback capability
218
- - [ ] Feature flags
219
-
220
- ## Test-First Development Plan
221
-
222
- ### Test Execution Order (Article III & VIII)
223
- 1. **Contract Tests** → Define boundaries
224
- 2. **Integration Tests** → Verify interactions
225
- 3. **E2E Tests** → Validate workflows
226
- 4. **Unit Tests** → Isolate logic
227
-
228
- ### Test Coverage Requirements
229
- - Contract Tests: 100% of API surface
230
- - Integration Tests: 100% of service interactions
231
- - E2E Tests: 100% of critical paths
232
- - Unit Tests: 80% of business logic
233
-
234
- ### Example Test Structure
235
- ```python
236
- # Step 1: Write failing test (Red)
237
- def test_feature_behavior():
238
- result = feature.process("input")
239
- assert result == "expected" # Fails
240
-
241
- # Step 2: Implement minimum to pass (Green)
242
- def process(input):
243
- return "expected" # Passes
244
-
245
- # Step 3: Refactor (Refactor)
246
- def process(input):
247
- # Clean, maintainable implementation
248
- return transform(validate(input))
249
- ```
153
+ ### Data Protection
154
+ - **Encryption**: {{ security.encryption.transit | default("TLS 1.3") }} in transit, {{ security.encryption.at_rest | default("AES-256") }} at rest
155
+ - **Compliance**: {{ security.compliance | join(", ") }}
250
156
 
251
- ## API Contracts (Article VIII - Contract First)
252
-
253
- ### Contract: [Feature API]
254
- ```yaml
255
- # contracts/feature-api.yaml
256
- openapi: 3.0.0
257
- paths:
258
- /process:
259
- post:
260
- request:
261
- required: true
262
- content:
263
- text/plain:
264
- schema:
265
- type: string
266
- responses:
267
- '200':
268
- content:
269
- application/json:
270
- schema:
271
- type: object
272
- ```
157
+ ## Deployment Strategy
273
158
 
274
- ### Contract Test
275
- ```python
276
- # contracts/test_feature_contract.py
277
- def test_process_contract():
278
- """Verify API contract compliance"""
279
- response = client.post("/process", data="input")
280
- assert response.status_code == 200
281
- assert "result" in response.json()
282
- ```
159
+ ### Environments
160
+ {% for env in environments %}
161
+ #### {{ env.name }}
162
+ - **URL**: {{ env.url }}
163
+ - **Auto-deploy**: {{ env.auto_deploy | default("Manual") }}
164
+ - **Health Checks**: {{ env.health_checks | default("Basic monitoring") }}
165
+ {% endfor %}
283
166
 
284
- ## Data Models (Simple per Article VII)
285
-
286
- ### Primary Entity
287
- ```python
288
- # Single, simple model - no premature abstraction
289
- @dataclass
290
- class Feature:
291
- id: str
292
- data: str
293
- created_at: datetime
294
-
295
- def process(self) -> str:
296
- """Direct, simple processing"""
297
- return self.data.upper() # No unnecessary layers
298
- ```
167
+ ### Rollback Plan
168
+ - **Strategy**: {{ rollback.strategy | default("Blue-green deployment") }}
169
+ - **Triggers**: {{ rollback.triggers | join(", ") }}
170
+ - **Recovery Time**: {{ rollback.recovery_time | default("< 5 minutes") }}
299
171
 
300
- ## Risk Mitigation
172
+ ## Success Criteria
301
173
 
302
- ### Complexity Risks (Article VII)
303
- | Risk | Mitigation |
304
- |------|------------|
305
- | Over-engineering | Phase gates enforce simplicity |
306
- | Premature optimization | Start simple, measure first |
307
- | Abstraction creep | Direct framework usage required |
174
+ ### Must-Have Metrics
175
+ {% for metric in success_criteria.must %}
176
+ - {{ metric.name }}: {{ metric.target }} ({{ metric.measurement }})
177
+ {% endfor %}
308
178
 
309
- ### Testing Risks (Article III)
310
- | Risk | Mitigation |
311
- |------|------------|
312
- | Skipping TDD | Gates require failing tests first |
313
- | Mock overuse | Real services required |
314
- | Low coverage | Coverage gates enforced |
179
+ ### Should-Have Metrics
180
+ {% for metric in success_criteria.should %}
181
+ - {{ metric.name }}: {{ metric.target }} ({{ metric.measurement }})
182
+ {% endfor %}
315
183
 
316
- ## Success Criteria
184
+ ## Risk Assessment
185
+
186
+ | Risk | Probability | Impact | Mitigation | Owner |
187
+ |------|------------|--------|------------|-------|
188
+ {% for risk in risks %}
189
+ | {{ risk.description }} | {{ risk.probability }} | {{ risk.impact }} | {{ risk.mitigation }} | {{ risk.owner }} |
190
+ {% endfor %}
191
+
192
+ ## Monitoring & Observability
193
+
194
+ ### Key Metrics
195
+ {% for metric in monitoring.metrics %}
196
+ - **{{ metric.name }}**: {{ metric.target }} ({{ metric.unit }})
197
+ {% endfor %}
317
198
 
318
- ### Constitutional Compliance
319
- - [ ] All Phase Gates passed
320
- - [ ] Complexity exceptions documented
321
- - [ ] Test-First cycle followed
322
- - [ ] Library-First architecture
323
-
324
- ### Functional Completion
325
- - [ ] All user stories implemented
326
- - [ ] Acceptance criteria met
327
- - [ ] Contract tests passing
328
- - [ ] E2E scenarios validated
329
-
330
- ### Quality Metrics
331
- - [ ] Test coverage > 80%
332
- - [ ] Performance targets met
333
- - [ ] Security audit passed
334
- - [ ] Documentation executable
335
-
336
- ## Continuous Refinement (Article V)
337
-
338
- ### Specification Feedback Loop
339
- - [ ] Implementation discoveries documented
340
- - [ ] Specification updated with learnings
341
- - [ ] [NEEDS CLARIFICATION] items resolved
342
- - [ ] Future improvements noted
343
-
344
- ### Post-Implementation Review
345
- - [ ] Complexity assessment
346
- - [ ] Simplification opportunities
347
- - [ ] Architecture decisions validated
348
- - [ ] Constitution compliance verified
199
+ ### Alerting
200
+ - **Critical Alerts**: {{ monitoring.alerts.critical | join(", ") }}
201
+ - **Warning Alerts**: {{ monitoring.alerts.warnings | join(", ") }}
349
202
 
350
203
  ---
351
- **Note**: This plan is a living document. Update it as implementation progresses and learnings emerge.
204
+ **Generated by**: {{ ai_assistant }} on {{ date }}
205
+ **Constitutional Gates**: {{ gate_status | default("PENDING") }}
206
+ **Next Steps**: Use `/task` to break down into executable tasks