claude-autopm 1.27.0 → 1.29.0
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.
- package/README.md +72 -0
- package/autopm/.claude/scripts/pm/analytics.js +425 -0
- package/autopm/.claude/scripts/pm/prd-new.js +292 -2
- package/autopm/.claude/scripts/pm/sync-batch.js +337 -0
- package/autopm/.claude/scripts/pm/template-list.js +119 -0
- package/autopm/.claude/scripts/pm/template-new.js +344 -0
- package/autopm/.claude/templates/prds/README.md +334 -0
- package/autopm/.claude/templates/prds/api-feature.md +306 -0
- package/autopm/.claude/templates/prds/bug-fix.md +413 -0
- package/autopm/.claude/templates/prds/data-migration.md +483 -0
- package/autopm/.claude/templates/prds/documentation.md +439 -0
- package/autopm/.claude/templates/prds/ui-feature.md +365 -0
- package/lib/README-FILTER-SEARCH.md +285 -0
- package/lib/analytics-engine.js +689 -0
- package/lib/batch-processor-integration.js +366 -0
- package/lib/batch-processor.js +278 -0
- package/lib/burndown-chart.js +415 -0
- package/lib/dependency-analyzer.js +466 -0
- package/lib/filter-engine.js +414 -0
- package/lib/query-parser.js +322 -0
- package/lib/template-engine.js +347 -0
- package/package.json +5 -4
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: {{id}}
|
|
3
|
+
title: {{title}}
|
|
4
|
+
type: prd
|
|
5
|
+
status: draft
|
|
6
|
+
priority: {{priority}}
|
|
7
|
+
created: {{timestamp}}
|
|
8
|
+
author: {{author}}
|
|
9
|
+
timeline: {{timeline}}
|
|
10
|
+
severity: {{severity}}
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# PRD: Bug Fix - {{title}}
|
|
14
|
+
|
|
15
|
+
## Bug Summary
|
|
16
|
+
|
|
17
|
+
**Issue ID**: {{bug_id}}
|
|
18
|
+
**Severity**: {{severity}} (Critical/High/Medium/Low)
|
|
19
|
+
**Impact**: {{user_impact}}
|
|
20
|
+
**Affected Users**: {{affected_users}}
|
|
21
|
+
**Environment**: {{environment}}
|
|
22
|
+
|
|
23
|
+
## Problem Description
|
|
24
|
+
|
|
25
|
+
### Observed Behavior
|
|
26
|
+
{{observed_behavior}}
|
|
27
|
+
|
|
28
|
+
### Expected Behavior
|
|
29
|
+
{{expected_behavior}}
|
|
30
|
+
|
|
31
|
+
### Reproduction Steps
|
|
32
|
+
|
|
33
|
+
1. {{step_1}}
|
|
34
|
+
2. {{step_2}}
|
|
35
|
+
3. {{step_3}}
|
|
36
|
+
{{#if additional_steps}}
|
|
37
|
+
{{#each additional_steps}}
|
|
38
|
+
{{this}}
|
|
39
|
+
{{/each}}
|
|
40
|
+
{{/if}}
|
|
41
|
+
|
|
42
|
+
### Environment Details
|
|
43
|
+
- **Browser/OS**: {{browser_os}}
|
|
44
|
+
- **Version**: {{app_version}}
|
|
45
|
+
- **User Role**: {{user_role}}
|
|
46
|
+
- **Data State**: {{data_state}}
|
|
47
|
+
|
|
48
|
+
### Error Messages/Logs
|
|
49
|
+
```
|
|
50
|
+
{{error_logs}}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Screenshots/Videos
|
|
54
|
+
{{#if media_links}}
|
|
55
|
+
{{#each media_links}}
|
|
56
|
+
- {{this}}
|
|
57
|
+
{{/each}}
|
|
58
|
+
{{/if}}
|
|
59
|
+
|
|
60
|
+
## Impact Analysis
|
|
61
|
+
|
|
62
|
+
### User Impact
|
|
63
|
+
- **Affected Users**: {{affected_user_count}} ({{affected_percentage}}%)
|
|
64
|
+
- **User Segments**: {{user_segments}}
|
|
65
|
+
- **Business Impact**: {{business_impact}}
|
|
66
|
+
- **Revenue Impact**: {{revenue_impact}}
|
|
67
|
+
|
|
68
|
+
### System Impact
|
|
69
|
+
- **Components Affected**: {{affected_components}}
|
|
70
|
+
- **Services Down**: {{services_down}}
|
|
71
|
+
- **Data Integrity**: {{data_integrity_status}}
|
|
72
|
+
- **Performance Impact**: {{performance_impact}}
|
|
73
|
+
|
|
74
|
+
### Severity Classification
|
|
75
|
+
|
|
76
|
+
**Critical** (P0):
|
|
77
|
+
- System completely unusable
|
|
78
|
+
- Data loss or corruption
|
|
79
|
+
- Security breach
|
|
80
|
+
- Revenue impact > $10k/hour
|
|
81
|
+
|
|
82
|
+
**High** (P1):
|
|
83
|
+
- Major feature broken
|
|
84
|
+
- Significant user impact (>20%)
|
|
85
|
+
- Workaround exists but difficult
|
|
86
|
+
- Revenue impact $1k-10k/hour
|
|
87
|
+
|
|
88
|
+
**Medium** (P2):
|
|
89
|
+
- Feature degradation
|
|
90
|
+
- Moderate user impact (<20%)
|
|
91
|
+
- Easy workaround available
|
|
92
|
+
- Minimal revenue impact
|
|
93
|
+
|
|
94
|
+
**Low** (P3):
|
|
95
|
+
- Minor issue
|
|
96
|
+
- Cosmetic or edge case
|
|
97
|
+
- No workaround needed
|
|
98
|
+
- No revenue impact
|
|
99
|
+
|
|
100
|
+
## Root Cause Analysis (RCA)
|
|
101
|
+
|
|
102
|
+
### Investigation Timeline
|
|
103
|
+
| Time | Action | Finding |
|
|
104
|
+
|------|--------|---------|
|
|
105
|
+
| {{time_1}} | {{action_1}} | {{finding_1}} |
|
|
106
|
+
| {{time_2}} | {{action_2}} | {{finding_2}} |
|
|
107
|
+
|
|
108
|
+
### 5 Whys Analysis
|
|
109
|
+
|
|
110
|
+
**Problem**: {{problem_statement}}
|
|
111
|
+
|
|
112
|
+
1. **Why?** {{why_1}}
|
|
113
|
+
2. **Why?** {{why_2}}
|
|
114
|
+
3. **Why?** {{why_3}}
|
|
115
|
+
4. **Why?** {{why_4}}
|
|
116
|
+
5. **Why?** {{why_5}}
|
|
117
|
+
|
|
118
|
+
**Root Cause**: {{root_cause}}
|
|
119
|
+
|
|
120
|
+
### Affected Components
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
System Map:
|
|
124
|
+
{{system_map}}
|
|
125
|
+
|
|
126
|
+
Affected Areas:
|
|
127
|
+
{{#if affected_areas}}
|
|
128
|
+
{{#each affected_areas}}
|
|
129
|
+
- {{component}}: {{impact}}
|
|
130
|
+
{{/each}}
|
|
131
|
+
{{/if}}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Root Cause Category
|
|
135
|
+
- [ ] Code defect (logic error, typo, missing validation)
|
|
136
|
+
- [ ] Configuration issue (environment, settings)
|
|
137
|
+
- [ ] Infrastructure problem (server, network, database)
|
|
138
|
+
- [ ] Third-party service failure (API, library)
|
|
139
|
+
- [ ] Data quality issue (corrupt data, missing data)
|
|
140
|
+
- [ ] Deployment error (rollout, migration)
|
|
141
|
+
- [ ] Security vulnerability
|
|
142
|
+
- [ ] Performance bottleneck
|
|
143
|
+
- [ ] Race condition / timing issue
|
|
144
|
+
- [ ] Integration failure
|
|
145
|
+
|
|
146
|
+
### Contributing Factors
|
|
147
|
+
{{#if contributing_factors}}
|
|
148
|
+
{{#each contributing_factors}}
|
|
149
|
+
- {{this}}
|
|
150
|
+
{{/each}}
|
|
151
|
+
{{/if}}
|
|
152
|
+
|
|
153
|
+
## Proposed Solution
|
|
154
|
+
|
|
155
|
+
### Fix Approach
|
|
156
|
+
{{solution_approach}}
|
|
157
|
+
|
|
158
|
+
### Technical Implementation
|
|
159
|
+
|
|
160
|
+
**Files to Modify**:
|
|
161
|
+
{{#if files_to_modify}}
|
|
162
|
+
{{#each files_to_modify}}
|
|
163
|
+
- `{{file}}`: {{change}}
|
|
164
|
+
{{/each}}
|
|
165
|
+
{{/if}}
|
|
166
|
+
|
|
167
|
+
**Code Changes Summary**:
|
|
168
|
+
```{{language}}
|
|
169
|
+
{{code_changes_summary}}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Alternative Solutions Considered
|
|
173
|
+
|
|
174
|
+
| Solution | Pros | Cons | Selected |
|
|
175
|
+
|----------|------|------|----------|
|
|
176
|
+
| {{alt_solution_1}} | {{pros_1}} | {{cons_1}} | {{selected_1}} |
|
|
177
|
+
| {{alt_solution_2}} | {{pros_2}} | {{cons_2}} | {{selected_2}} |
|
|
178
|
+
|
|
179
|
+
## Testing Strategy (TDD)
|
|
180
|
+
|
|
181
|
+
### Reproduction Test (Red Phase)
|
|
182
|
+
- [ ] Write test that reproduces the bug
|
|
183
|
+
- [ ] Verify test fails with current code
|
|
184
|
+
- [ ] Document failing test case
|
|
185
|
+
|
|
186
|
+
### Fix Implementation (Green Phase)
|
|
187
|
+
- [ ] Implement minimal fix
|
|
188
|
+
- [ ] Verify reproduction test passes
|
|
189
|
+
- [ ] Ensure no new failures
|
|
190
|
+
|
|
191
|
+
### Regression Prevention (Refactor Phase)
|
|
192
|
+
- [ ] Add edge case tests
|
|
193
|
+
- [ ] Refactor code for clarity
|
|
194
|
+
- [ ] Update documentation
|
|
195
|
+
|
|
196
|
+
### Test Coverage
|
|
197
|
+
|
|
198
|
+
**Unit Tests**:
|
|
199
|
+
- [ ] Fix validation test
|
|
200
|
+
- [ ] Edge case coverage
|
|
201
|
+
- [ ] Error handling paths
|
|
202
|
+
- [ ] Mock external dependencies
|
|
203
|
+
|
|
204
|
+
**Integration Tests**:
|
|
205
|
+
- [ ] Component integration
|
|
206
|
+
- [ ] Database operations
|
|
207
|
+
- [ ] API contract verification
|
|
208
|
+
- [ ] State management
|
|
209
|
+
|
|
210
|
+
**E2E Tests**:
|
|
211
|
+
- [ ] User flow regression
|
|
212
|
+
- [ ] Cross-browser validation
|
|
213
|
+
- [ ] Performance verification
|
|
214
|
+
- [ ] Data integrity check
|
|
215
|
+
|
|
216
|
+
**Automated Regression Suite**:
|
|
217
|
+
- [ ] Add bug reproduction to CI/CD
|
|
218
|
+
- [ ] Update smoke tests
|
|
219
|
+
- [ ] Performance benchmarks
|
|
220
|
+
- [ ] Security scanning
|
|
221
|
+
|
|
222
|
+
## Risk Assessment
|
|
223
|
+
|
|
224
|
+
### Risks of Fix Implementation
|
|
225
|
+
|
|
226
|
+
| Risk | Impact | Probability | Mitigation |
|
|
227
|
+
|------|--------|-------------|------------|
|
|
228
|
+
| Breaking changes | {{break_impact}} | {{break_prob}} | {{break_mitigation}} |
|
|
229
|
+
| Performance degradation | {{perf_impact}} | {{perf_prob}} | {{perf_mitigation}} |
|
|
230
|
+
| New bugs introduced | {{bug_impact}} | {{bug_prob}} | {{bug_mitigation}} |
|
|
231
|
+
| Data migration needed | {{data_impact}} | {{data_prob}} | {{data_mitigation}} |
|
|
232
|
+
|
|
233
|
+
### Risk Mitigation Strategies
|
|
234
|
+
{{#if risk_strategies}}
|
|
235
|
+
{{#each risk_strategies}}
|
|
236
|
+
- {{this}}
|
|
237
|
+
{{/each}}
|
|
238
|
+
{{/if}}
|
|
239
|
+
|
|
240
|
+
## Rollback Plan
|
|
241
|
+
|
|
242
|
+
### Rollback Triggers
|
|
243
|
+
- New error rate > {{rollback_error_threshold}}%
|
|
244
|
+
- Performance degradation > {{rollback_perf_threshold}}%
|
|
245
|
+
- User reports > {{rollback_user_threshold}}
|
|
246
|
+
- Data integrity issues detected
|
|
247
|
+
- Security vulnerability introduced
|
|
248
|
+
|
|
249
|
+
### Rollback Procedure
|
|
250
|
+
|
|
251
|
+
**Immediate Rollback** (< 5 minutes):
|
|
252
|
+
1. {{rollback_step_1}}
|
|
253
|
+
2. {{rollback_step_2}}
|
|
254
|
+
3. {{rollback_step_3}}
|
|
255
|
+
|
|
256
|
+
**Full Rollback** (< 30 minutes):
|
|
257
|
+
1. Revert deployment to previous version
|
|
258
|
+
2. Restore database from backup (if needed)
|
|
259
|
+
3. Clear caches and restart services
|
|
260
|
+
4. Notify stakeholders
|
|
261
|
+
5. Update status page
|
|
262
|
+
|
|
263
|
+
**Rollback Validation**:
|
|
264
|
+
- [ ] System functionality verified
|
|
265
|
+
- [ ] Error rates normalized
|
|
266
|
+
- [ ] User impact resolved
|
|
267
|
+
- [ ] Monitoring confirms stability
|
|
268
|
+
|
|
269
|
+
## Implementation Plan
|
|
270
|
+
|
|
271
|
+
### Immediate Actions (Hour 0-1)
|
|
272
|
+
- [ ] Implement hotfix
|
|
273
|
+
- [ ] Write reproduction test
|
|
274
|
+
- [ ] Local testing and validation
|
|
275
|
+
- [ ] Code review (expedited)
|
|
276
|
+
- [ ] Security scan
|
|
277
|
+
|
|
278
|
+
### Short-term (Hour 1-4)
|
|
279
|
+
- [ ] Deploy to staging
|
|
280
|
+
- [ ] QA validation
|
|
281
|
+
- [ ] Regression testing
|
|
282
|
+
- [ ] Performance testing
|
|
283
|
+
- [ ] Stakeholder approval
|
|
284
|
+
|
|
285
|
+
### Deployment (Hour 4-6)
|
|
286
|
+
- [ ] Production deployment (canary/blue-green)
|
|
287
|
+
- [ ] Monitor error rates
|
|
288
|
+
- [ ] Verify user reports
|
|
289
|
+
- [ ] Update status page
|
|
290
|
+
- [ ] Communication to users
|
|
291
|
+
|
|
292
|
+
### Follow-up (Day 1-7)
|
|
293
|
+
- [ ] Monitor metrics (24h)
|
|
294
|
+
- [ ] Complete RCA documentation
|
|
295
|
+
- [ ] Update runbooks
|
|
296
|
+
- [ ] Team retrospective
|
|
297
|
+
- [ ] Process improvements
|
|
298
|
+
|
|
299
|
+
## Monitoring & Verification
|
|
300
|
+
|
|
301
|
+
### Success Metrics
|
|
302
|
+
- **Error Rate**: Reduced from {{current_error_rate}}% to < {{target_error_rate}}%
|
|
303
|
+
- **User Reports**: Zero new reports within 24h
|
|
304
|
+
- **Performance**: No regression (< {{perf_threshold}}ms)
|
|
305
|
+
- **Availability**: {{uptime_target}}% uptime maintained
|
|
306
|
+
|
|
307
|
+
### Monitoring Dashboards
|
|
308
|
+
- [ ] Error tracking (Sentry/Rollbar)
|
|
309
|
+
- [ ] Application metrics (Datadog/New Relic)
|
|
310
|
+
- [ ] User analytics (GA4/Mixpanel)
|
|
311
|
+
- [ ] Server metrics (CPU, memory, disk)
|
|
312
|
+
|
|
313
|
+
### Alerts Configuration
|
|
314
|
+
- Error rate > {{alert_error_threshold}}%
|
|
315
|
+
- Response time > {{alert_latency_threshold}}ms
|
|
316
|
+
- Failed requests > {{alert_failure_threshold}}
|
|
317
|
+
- Anomaly detection triggers
|
|
318
|
+
|
|
319
|
+
## Prevention Strategies
|
|
320
|
+
|
|
321
|
+
### Immediate Prevention
|
|
322
|
+
- [ ] Add monitoring/alerting for this scenario
|
|
323
|
+
- [ ] Update validation rules
|
|
324
|
+
- [ ] Improve error handling
|
|
325
|
+
- [ ] Add circuit breakers
|
|
326
|
+
|
|
327
|
+
### Long-term Prevention
|
|
328
|
+
- [ ] Code review checklist update
|
|
329
|
+
- [ ] Add pre-deployment validation
|
|
330
|
+
- [ ] Improve testing coverage
|
|
331
|
+
- [ ] Update coding standards
|
|
332
|
+
- [ ] Team training session
|
|
333
|
+
|
|
334
|
+
### Process Improvements
|
|
335
|
+
{{#if process_improvements}}
|
|
336
|
+
{{#each process_improvements}}
|
|
337
|
+
- {{this}}
|
|
338
|
+
{{/each}}
|
|
339
|
+
{{/if}}
|
|
340
|
+
|
|
341
|
+
## Communication Plan
|
|
342
|
+
|
|
343
|
+
### Internal Communication
|
|
344
|
+
- **Engineering Team**: {{eng_communication}}
|
|
345
|
+
- **Product Team**: {{product_communication}}
|
|
346
|
+
- **Leadership**: {{leadership_communication}}
|
|
347
|
+
- **Support Team**: {{support_communication}}
|
|
348
|
+
|
|
349
|
+
### External Communication
|
|
350
|
+
{{#if external_communication_needed}}
|
|
351
|
+
- **Users Affected**: {{user_message}}
|
|
352
|
+
- **Status Page Update**: {{status_page_message}}
|
|
353
|
+
- **Social Media**: {{social_media_message}}
|
|
354
|
+
- **Support Channels**: {{support_message}}
|
|
355
|
+
{{/if}}
|
|
356
|
+
|
|
357
|
+
## Post-Mortem
|
|
358
|
+
|
|
359
|
+
### Timeline of Events
|
|
360
|
+
| Time | Event | Action Taken |
|
|
361
|
+
|------|-------|--------------|
|
|
362
|
+
| {{event_time_1}} | {{event_1}} | {{event_action_1}} |
|
|
363
|
+
| {{event_time_2}} | {{event_2}} | {{event_action_2}} |
|
|
364
|
+
|
|
365
|
+
### What Went Well
|
|
366
|
+
{{#if went_well}}
|
|
367
|
+
{{#each went_well}}
|
|
368
|
+
- {{this}}
|
|
369
|
+
{{/each}}
|
|
370
|
+
{{/if}}
|
|
371
|
+
|
|
372
|
+
### What Went Wrong
|
|
373
|
+
{{#if went_wrong}}
|
|
374
|
+
{{#each went_wrong}}
|
|
375
|
+
- {{this}}
|
|
376
|
+
{{/each}}
|
|
377
|
+
{{/if}}
|
|
378
|
+
|
|
379
|
+
### Lessons Learned
|
|
380
|
+
{{#if lessons_learned}}
|
|
381
|
+
{{#each lessons_learned}}
|
|
382
|
+
- {{this}}
|
|
383
|
+
{{/each}}
|
|
384
|
+
{{/if}}
|
|
385
|
+
|
|
386
|
+
### Action Items
|
|
387
|
+
| Action | Owner | Due Date | Status |
|
|
388
|
+
|--------|-------|----------|--------|
|
|
389
|
+
| {{action_1}} | {{owner_1}} | {{due_1}} | {{status_1}} |
|
|
390
|
+
| {{action_2}} | {{owner_2}} | {{due_2}} | {{status_2}} |
|
|
391
|
+
|
|
392
|
+
## Appendix
|
|
393
|
+
|
|
394
|
+
### Related Issues
|
|
395
|
+
{{#if related_issues}}
|
|
396
|
+
{{#each related_issues}}
|
|
397
|
+
- {{issue_id}}: {{issue_title}}
|
|
398
|
+
{{/each}}
|
|
399
|
+
{{/if}}
|
|
400
|
+
|
|
401
|
+
### References
|
|
402
|
+
- [Root Cause Analysis Guide](https://asana.com/resources/root-cause-analysis)
|
|
403
|
+
- [5 Whys Technique](https://www.mindtools.com/pages/article/newTMC_5W.htm)
|
|
404
|
+
- [Incident Response Best Practices](https://www.atlassian.com/incident-management/postmortem)
|
|
405
|
+
- [Bug Fix Best Practices 2025](https://stackoverflow.blog/2023/12/28/best-practices-for-writing-code-comments/)
|
|
406
|
+
|
|
407
|
+
### Changelog
|
|
408
|
+
- {{timestamp}}: Initial bug fix PRD created by {{author}}
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
*Bug Fix PRD - Generated from template: bug-fix*
|
|
413
|
+
*Template follows 2025 best practices: 5 Whys RCA, TDD testing, comprehensive monitoring, prevention-focused*
|