@pjmendonca/devflow 1.9.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.
Files changed (124) hide show
  1. package/CHANGELOG.md +526 -0
  2. package/LICENSE +21 -0
  3. package/README.md +620 -0
  4. package/bin/devflow-checkpoint.js +10 -0
  5. package/bin/devflow-collab.js +10 -0
  6. package/bin/devflow-cost.js +10 -0
  7. package/bin/devflow-create-persona.js +10 -0
  8. package/bin/devflow-init.js +10 -0
  9. package/bin/devflow-memory.js +10 -0
  10. package/bin/devflow-new-doc.js +10 -0
  11. package/bin/devflow-personalize.js +10 -0
  12. package/bin/devflow-setup-checkpoint.js +10 -0
  13. package/bin/devflow-story.js +10 -0
  14. package/bin/devflow-tech-debt.js +10 -0
  15. package/bin/devflow-validate-overrides.js +10 -0
  16. package/bin/devflow-validate.js +10 -0
  17. package/bin/devflow-version.js +10 -0
  18. package/lib/constants.js +30 -0
  19. package/lib/exec-python.js +78 -0
  20. package/lib/python-check.js +178 -0
  21. package/package.json +64 -0
  22. package/tooling/.automation/agents/architect.md +135 -0
  23. package/tooling/.automation/agents/ba.md +70 -0
  24. package/tooling/.automation/agents/dev.md +79 -0
  25. package/tooling/.automation/agents/maintainer.md +97 -0
  26. package/tooling/.automation/agents/pm.md +116 -0
  27. package/tooling/.automation/agents/reviewer.md +141 -0
  28. package/tooling/.automation/agents/sm.md +61 -0
  29. package/tooling/.automation/agents/writer.md +193 -0
  30. package/tooling/.automation/config.ps1.template +61 -0
  31. package/tooling/.automation/config.sh.template +48 -0
  32. package/tooling/.automation/memory/.gitkeep +6 -0
  33. package/tooling/.automation/memory/knowledge/kg_integration-test.json +94 -0
  34. package/tooling/.automation/memory/knowledge/kg_test-story.json +300 -0
  35. package/tooling/.automation/memory/shared/shared_integration-test.json +30 -0
  36. package/tooling/.automation/memory/shared/shared_test-story.json +78 -0
  37. package/tooling/.automation/overrides/templates/README.md +113 -0
  38. package/tooling/.automation/overrides/templates/architect/README.md +27 -0
  39. package/tooling/.automation/overrides/templates/architect/cloud-native.yaml +92 -0
  40. package/tooling/.automation/overrides/templates/architect/enterprise-architect.yaml +85 -0
  41. package/tooling/.automation/overrides/templates/architect/pragmatic-minimalist.yaml +88 -0
  42. package/tooling/.automation/overrides/templates/ba/README.md +27 -0
  43. package/tooling/.automation/overrides/templates/ba/agile-storyteller.yaml +86 -0
  44. package/tooling/.automation/overrides/templates/ba/domain-expert.yaml +91 -0
  45. package/tooling/.automation/overrides/templates/ba/requirements-engineer.yaml +89 -0
  46. package/tooling/.automation/overrides/templates/dev/README.md +32 -0
  47. package/tooling/.automation/overrides/templates/dev/junior-mentored.yaml +39 -0
  48. package/tooling/.automation/overrides/templates/dev/performance-engineer.yaml +43 -0
  49. package/tooling/.automation/overrides/templates/dev/rapid-prototyper.yaml +52 -0
  50. package/tooling/.automation/overrides/templates/dev/security-focused.yaml +43 -0
  51. package/tooling/.automation/overrides/templates/dev/senior-fullstack.yaml +39 -0
  52. package/tooling/.automation/overrides/templates/maintainer/README.md +27 -0
  53. package/tooling/.automation/overrides/templates/maintainer/devops-maintainer.yaml +113 -0
  54. package/tooling/.automation/overrides/templates/maintainer/legacy-steward.yaml +94 -0
  55. package/tooling/.automation/overrides/templates/maintainer/oss-maintainer.yaml +94 -0
  56. package/tooling/.automation/overrides/templates/pm/README.md +27 -0
  57. package/tooling/.automation/overrides/templates/pm/agile-pm.yaml +91 -0
  58. package/tooling/.automation/overrides/templates/pm/hybrid-delivery.yaml +87 -0
  59. package/tooling/.automation/overrides/templates/pm/traditional-pm.yaml +91 -0
  60. package/tooling/.automation/overrides/templates/reviewer/README.md +11 -0
  61. package/tooling/.automation/overrides/templates/reviewer/mentoring-reviewer.yaml +45 -0
  62. package/tooling/.automation/overrides/templates/reviewer/quick-sanity.yaml +50 -0
  63. package/tooling/.automation/overrides/templates/reviewer/thorough-critic.yaml +48 -0
  64. package/tooling/.automation/overrides/templates/sm/README.md +11 -0
  65. package/tooling/.automation/overrides/templates/sm/agile-coach.yaml +52 -0
  66. package/tooling/.automation/overrides/templates/sm/startup-pm.yaml +50 -0
  67. package/tooling/.automation/overrides/templates/sm/technical-lead.yaml +47 -0
  68. package/tooling/.automation/overrides/templates/user-profile.template.yaml +62 -0
  69. package/tooling/.automation/overrides/templates/writer/README.md +27 -0
  70. package/tooling/.automation/overrides/templates/writer/api-documentarian.yaml +99 -0
  71. package/tooling/.automation/overrides/templates/writer/docs-as-code.yaml +108 -0
  72. package/tooling/.automation/overrides/templates/writer/user-guide-author.yaml +100 -0
  73. package/tooling/completions/DevflowCompletion.ps1 +213 -0
  74. package/tooling/completions/_run-story +116 -0
  75. package/tooling/completions/run-story-completion.bash +136 -0
  76. package/tooling/docs/DOC-STANDARD.md +717 -0
  77. package/tooling/docs/sprint-status.yaml.template +24 -0
  78. package/tooling/docs/templates/bug-report.md +234 -0
  79. package/tooling/docs/templates/migration-spec.md +274 -0
  80. package/tooling/docs/templates/refactor-spec.md +86 -0
  81. package/tooling/docs/templates/tech-debt.md +86 -0
  82. package/tooling/scripts/context_checkpoint.py +556 -0
  83. package/tooling/scripts/cost_dashboard.py +617 -0
  84. package/tooling/scripts/create-persona.py +690 -0
  85. package/tooling/scripts/create-persona.sh +435 -0
  86. package/tooling/scripts/init-project-workflow.ps1 +651 -0
  87. package/tooling/scripts/init-project-workflow.py +70 -0
  88. package/tooling/scripts/init-project-workflow.sh +746 -0
  89. package/tooling/scripts/lib/__init__.py +35 -0
  90. package/tooling/scripts/lib/agent_handoff.py +526 -0
  91. package/tooling/scripts/lib/agent_router.py +698 -0
  92. package/tooling/scripts/lib/checkpoint-integration.ps1 +245 -0
  93. package/tooling/scripts/lib/checkpoint-integration.sh +191 -0
  94. package/tooling/scripts/lib/claude-cli.ps1 +952 -0
  95. package/tooling/scripts/lib/claude-cli.sh +1293 -0
  96. package/tooling/scripts/lib/cost_config.py +222 -0
  97. package/tooling/scripts/lib/cost_display.py +443 -0
  98. package/tooling/scripts/lib/cost_tracker.py +710 -0
  99. package/tooling/scripts/lib/currency_converter.py +328 -0
  100. package/tooling/scripts/lib/errors.py +438 -0
  101. package/tooling/scripts/lib/override-loader.sh +286 -0
  102. package/tooling/scripts/lib/pair_programming.py +589 -0
  103. package/tooling/scripts/lib/shared_memory.py +637 -0
  104. package/tooling/scripts/lib/swarm_orchestrator.py +689 -0
  105. package/tooling/scripts/memory_summarize.py +324 -0
  106. package/tooling/scripts/new-doc.ps1 +405 -0
  107. package/tooling/scripts/new-doc.py +93 -0
  108. package/tooling/scripts/new-doc.sh +534 -0
  109. package/tooling/scripts/personalize_agent.py +385 -0
  110. package/tooling/scripts/rollback-migration.sh +540 -0
  111. package/tooling/scripts/run-collab.ps1 +251 -0
  112. package/tooling/scripts/run-collab.py +605 -0
  113. package/tooling/scripts/run-collab.sh +110 -0
  114. package/tooling/scripts/run-story.ps1 +490 -0
  115. package/tooling/scripts/run-story.py +387 -0
  116. package/tooling/scripts/run-story.sh +467 -0
  117. package/tooling/scripts/setup-checkpoint-service.ps1 +219 -0
  118. package/tooling/scripts/setup-checkpoint-service.py +87 -0
  119. package/tooling/scripts/setup-checkpoint-service.sh +236 -0
  120. package/tooling/scripts/tech-debt-tracker.py +608 -0
  121. package/tooling/scripts/update_version.py +244 -0
  122. package/tooling/scripts/validate-overrides.py +511 -0
  123. package/tooling/scripts/validate-overrides.sh +432 -0
  124. package/tooling/scripts/validate_setup.py +539 -0
@@ -0,0 +1,234 @@
1
+ # Bug Report: [BUG-ID]# Bug Report: [BUG-ID]
2
+
3
+
4
+
5
+ **Severity**: [Critical/High/Medium/Low]**Severity**: [Critical/High/Medium/Low]
6
+
7
+ **Status**: Open**Status**: Open
8
+
9
+ **Reported**: YYYY-MM-DD**Reported**: YYYY-MM-DD
10
+
11
+ **Component**: [affected component/module]**Component**: [affected component/module]
12
+
13
+ **Regression**: [Yes/No - was this working before?]
14
+
15
+ ## Summary
16
+
17
+ ## Summary
18
+
19
+ [One-line description of the bug]
20
+
21
+ [One-line description of the bug]
22
+
23
+ ## Steps to Reproduce
24
+
25
+ ## Steps to Reproduce
26
+
27
+ 1. [First step]
28
+
29
+ 1. [First step]2. [Second step]
30
+
31
+ 2. [Second step]3. [Third step]
32
+
33
+ 3. [Third step]
34
+
35
+ ## Expected Behavior
36
+
37
+ **Reproducibility**: [Always / Sometimes (X%) / Rare / Unknown]
38
+
39
+ [What should happen]
40
+
41
+ ## Expected Behavior
42
+
43
+ ## Actual Behavior
44
+
45
+ [What should happen]
46
+
47
+ [What actually happens]
48
+
49
+ ## Actual Behavior
50
+
51
+ ## Environment
52
+
53
+ [What actually happens]
54
+
55
+ - **OS**: [e.g., macOS 14.0, Windows 11, Ubuntu 22.04]
56
+
57
+ ## Environment- **Version**: [app version or commit hash]
58
+
59
+ - **Browser/Runtime**: [if applicable]
60
+
61
+ - **OS**: [e.g., macOS 14.0, Windows 11, Ubuntu 22.04]
62
+
63
+ - **Version**: [app version or commit hash]## Logs/Screenshots
64
+
65
+ - **Browser/Runtime**: [if applicable]
66
+
67
+ - **Device/Hardware**: [if applicable]```
68
+
69
+ - **Network**: [online/offline/slow connection if relevant][Paste relevant error logs here]
70
+
71
+ ```
72
+
73
+ ## Logs/Screenshots
74
+
75
+ ## Possible Root Cause
76
+
77
+ ```
78
+
79
+ [Paste relevant error logs here][If you have any ideas about what might be causing this]
80
+
81
+ ```
82
+
83
+ ## Related Files
84
+
85
+ ## Root Cause Analysis
86
+
87
+ - `path/to/file1.ts` - [why this file might be relevant]
88
+
89
+ ### 5 Whys Analysis- `path/to/file2.ts` - [why this file might be relevant]
90
+
91
+
92
+
93
+ Use this technique to dig deeper into the root cause:## Notes
94
+
95
+
96
+
97
+ 1. **Why did this happen?**[Any additional context or information]
98
+
99
+ [First level cause]
100
+
101
+ ---
102
+
103
+ 2. **Why did that happen?**
104
+
105
+ [Second level cause]**To fix this bug, run:**
106
+
107
+ ```bash
108
+
109
+ 3. **Why did that happen?**./run-story.sh [BUG-ID] --bugfix
110
+
111
+ [Third level cause]```
112
+
113
+
114
+ 4. **Why did that happen?**
115
+ [Fourth level cause]
116
+
117
+ 5. **Why did that happen?**
118
+ [Root cause - this is usually the systemic issue]
119
+
120
+ ### Fault Tree
121
+
122
+ Visualize possible causes:
123
+
124
+ ```
125
+ [Bug Symptom]
126
+ ├── [Possible Cause A]
127
+ │ ├── [Sub-cause A1]
128
+ │ └── [Sub-cause A2]
129
+ ├── [Possible Cause B]
130
+ │ └── [Sub-cause B1]
131
+ └── [Possible Cause C] ← [Most likely]
132
+ ```
133
+
134
+ ### Root Cause Category
135
+
136
+ Check the category that best describes this bug:
137
+
138
+ - [ ] **Code Logic** - Algorithm or logic error
139
+ - [ ] **Data Handling** - Incorrect data processing/validation
140
+ - [ ] **State Management** - Race condition or state corruption
141
+ - [ ] **Integration** - API/service communication issue
142
+ - [ ] **Configuration** - Misconfiguration or environment issue
143
+ - [ ] **Resource** - Memory, CPU, or resource exhaustion
144
+ - [ ] **Concurrency** - Threading or async timing issue
145
+ - [ ] **Edge Case** - Unhandled boundary condition
146
+ - [ ] **Dependency** - Third-party library issue
147
+ - [ ] **User Input** - Invalid input not properly handled
148
+ - [ ] **Unknown** - Requires further investigation
149
+
150
+ ### Hypothesis
151
+
152
+ **Most Likely Cause**: [Your best hypothesis about what's causing this]
153
+
154
+ **Evidence Supporting This**:
155
+ - [Evidence 1]
156
+ - [Evidence 2]
157
+
158
+ **Evidence Against This**:
159
+ - [Counter-evidence 1]
160
+
161
+ ### Investigation Steps Taken
162
+
163
+ | Step | What I Checked | Result |
164
+ |------|----------------|--------|
165
+ | 1 | [e.g., Checked logs] | [What I found] |
166
+ | 2 | [e.g., Added debug output] | [What I found] |
167
+ | 3 | [e.g., Tested in isolation] | [What I found] |
168
+
169
+ ## Related Files
170
+
171
+ | File | Relevance | Confidence |
172
+ |------|-----------|------------|
173
+ | `path/to/file1.ts` | [why relevant] | High/Medium/Low |
174
+ | `path/to/file2.ts` | [why relevant] | High/Medium/Low |
175
+
176
+ ## Impact Analysis
177
+
178
+ ### Users Affected
179
+ - [ ] All users
180
+ - [ ] Specific user segment: [describe]
181
+ - [ ] Internal only
182
+ - [ ] Rare edge case
183
+
184
+ ### Workaround Available
185
+ - [ ] **Yes**: [describe workaround]
186
+ - [ ] **No**: Users are blocked
187
+
188
+ ### Related Issues
189
+ - Related to: #[issue-number]
190
+ - Blocks: #[issue-number]
191
+ - Caused by: [commit/PR reference]
192
+
193
+ ## Proposed Fix
194
+
195
+ ### Approach
196
+ [Brief description of the fix approach]
197
+
198
+ ### Files to Modify
199
+ 1. `path/to/file1.ts` - [what to change]
200
+ 2. `path/to/file2.ts` - [what to change]
201
+
202
+ ### Tests to Add
203
+ - [ ] Unit test for [specific scenario]
204
+ - [ ] Integration test for [specific scenario]
205
+ - [ ] Regression test to prevent recurrence
206
+
207
+ ### Rollback Plan
208
+ [How to revert if the fix causes issues]
209
+
210
+ ## Prevention
211
+
212
+ ### How to Prevent Similar Bugs
213
+
214
+ - [ ] Add input validation for [specific case]
215
+ - [ ] Add automated test for [scenario]
216
+ - [ ] Add monitoring/alerting for [condition]
217
+ - [ ] Update documentation about [edge case]
218
+ - [ ] Code review checklist item for [pattern]
219
+
220
+ ## Notes
221
+
222
+ [Any additional context or information]
223
+
224
+ ---
225
+
226
+ **To fix this bug, run:**
227
+ ```bash
228
+ ./run-story.sh [BUG-ID] --bugfix
229
+ ```
230
+
231
+ **To investigate first:**
232
+ ```bash
233
+ ./run-story.sh [BUG-ID] --investigate
234
+ ```
@@ -0,0 +1,274 @@
1
+ # Migration Specification: [MIGRATION-ID]
2
+
3
+ **Priority**: [Critical/High/Medium/Low]
4
+ **Status**: Planned
5
+ **Created**: YYYY-MM-DD
6
+ **Target Date**: YYYY-MM-DD
7
+ **Estimated Downtime**: [None/Minutes/Hours]
8
+ **Risk Level**: [Low/Medium/High/Critical]
9
+
10
+ ## Overview
11
+
12
+ [Brief description of what is being migrated]
13
+
14
+ ## Motivation
15
+
16
+ [Why this migration is necessary]
17
+
18
+ - [Reason 1]
19
+ - [Reason 2]
20
+ - [Reason 3]
21
+
22
+ ## Current State
23
+
24
+ | Component | Current Version | Target Version | Notes |
25
+ |-----------|-----------------|----------------|-------|
26
+ | [Dependency/Framework] | [current] | [target] | [breaking changes?] |
27
+
28
+ ## Impact Analysis
29
+
30
+ ### Users/Systems Affected
31
+ - [ ] All users
32
+ - [ ] Internal systems only
33
+ - [ ] Specific feature: [describe]
34
+ - [ ] Background processes
35
+
36
+ ### Risk Assessment
37
+
38
+ | Risk | Probability | Impact | Mitigation |
39
+ |------|-------------|--------|------------|
40
+ | [Risk 1] | Low/Med/High | Low/Med/High | [Strategy] |
41
+ | [Risk 2] | Low/Med/High | Low/Med/High | [Strategy] |
42
+
43
+ ## Pre-Migration Checklist
44
+
45
+ ### Preparation (1-2 weeks before)
46
+ - [ ] Create rollback point: `./rollback-migration.sh --create [MIGRATION-ID]-pre`
47
+ - [ ] Backup database (if applicable)
48
+ - [ ] Review breaking changes documentation
49
+ - [ ] Update test environment
50
+ - [ ] Run full test suite on current version
51
+ - [ ] Notify stakeholders
52
+ - [ ] Schedule maintenance window (if needed)
53
+
54
+ ### Day Before
55
+ - [ ] Verify rollback point exists
56
+ - [ ] Test rollback procedure in staging
57
+ - [ ] Confirm all team members are available
58
+ - [ ] Prepare communication for users
59
+
60
+ ### Immediately Before
61
+ - [ ] Final backup check
62
+ - [ ] Verify monitoring is active
63
+ - [ ] Clear deployment queue
64
+
65
+ ## Migration Steps
66
+
67
+ ### Phase 1: Preparation
68
+ 1. **Create rollback checkpoint**
69
+ ```bash
70
+ cd tooling/scripts
71
+ ./rollback-migration.sh --create [MIGRATION-ID]-pre
72
+ ```
73
+
74
+ 2. **Verify current state**
75
+ ```bash
76
+ # Run tests before migration
77
+ [test command here]
78
+ ```
79
+
80
+ ### Phase 2: Dependencies
81
+ 1. **Update package files**
82
+ - Files affected: `package.json` / `pubspec.yaml` / `requirements.txt`
83
+ - Changes:
84
+ ```diff
85
+ - "package": "^old-version"
86
+ + "package": "^new-version"
87
+ ```
88
+
89
+ 2. **Install new dependencies**
90
+ ```bash
91
+ # npm / yarn / flutter pub get / pip install
92
+ [install command]
93
+ ```
94
+
95
+ ### Phase 3: Code Changes
96
+ 1. **[Change Description 1]**
97
+ - Files affected: `path/to/file`
98
+ - Changes needed: [describe the code changes]
99
+
100
+ 2. **[Change Description 2]**
101
+ - Files affected: `path/to/file`
102
+ - Changes needed: [describe the code changes]
103
+
104
+ 3. **[Change Description 3]**
105
+ - Files affected: `path/to/file`
106
+ - Changes needed: [describe the code changes]
107
+
108
+ ### Phase 4: Configuration
109
+ 1. **Update configuration files**
110
+ - Files: `config/...`
111
+ - Changes: [describe]
112
+
113
+ ### Phase 5: Verification
114
+ 1. **Run test suite**
115
+ ```bash
116
+ [test command]
117
+ ```
118
+
119
+ 2. **Manual smoke test**
120
+ - [ ] [Critical path 1]
121
+ - [ ] [Critical path 2]
122
+ - [ ] [Critical path 3]
123
+
124
+ ## Post-Migration
125
+
126
+ - [ ] Run full test suite
127
+ - [ ] Verify all critical paths manually
128
+ - [ ] Check error logs for anomalies
129
+ - [ ] Monitor performance metrics
130
+ - [ ] Update documentation
131
+ - [ ] Notify stakeholders of completion
132
+ - [ ] Keep rollback point for [X days]
133
+
134
+ ## Breaking Changes
135
+
136
+ | Change | What Breaks | How to Fix | Automated? |
137
+ |--------|-------------|------------|------------|
138
+ | [Change 1] | [What breaks] | [How to fix] | Yes/No |
139
+ | [Change 2] | [What breaks] | [How to fix] | Yes/No |
140
+
141
+ ## Rollback Plan
142
+
143
+ ### Rollback Triggers
144
+ Execute rollback if ANY of these occur:
145
+ - [ ] Test suite failure rate > [X]%
146
+ - [ ] Critical functionality broken
147
+ - [ ] Performance degradation > [X]%
148
+ - [ ] User-reported blocking issues
149
+ - [ ] Deployment time exceeds [X] hours
150
+
151
+ ### Automated Rollback
152
+
153
+ ```bash
154
+ # Quick rollback using saved checkpoint
155
+ cd tooling/scripts
156
+ ./rollback-migration.sh [MIGRATION-ID]
157
+
158
+ # Or restore from specific point
159
+ ./rollback-migration.sh --restore [MIGRATION-ID]-pre
160
+ ```
161
+
162
+ ### Manual Rollback Steps
163
+
164
+ If automated rollback fails:
165
+
166
+ 1. **Restore dependencies**
167
+ ```bash
168
+ # Restore package files from backup
169
+ git checkout [pre-migration-commit] -- package.json package-lock.json
170
+ # Reinstall
171
+ npm install
172
+ ```
173
+
174
+ 2. **Restore code changes**
175
+ ```bash
176
+ # Revert to pre-migration commit
177
+ git checkout [pre-migration-commit] -- src/
178
+ ```
179
+
180
+ 3. **Restore configuration**
181
+ ```bash
182
+ git checkout [pre-migration-commit] -- config/
183
+ ```
184
+
185
+ 4. **Verify rollback**
186
+ ```bash
187
+ [test command]
188
+ ```
189
+
190
+ 5. **Notify stakeholders**
191
+ - Reason for rollback
192
+ - Next steps
193
+ - Timeline for retry
194
+
195
+ ### Rollback Verification
196
+ - [ ] All tests pass
197
+ - [ ] Critical paths working
198
+ - [ ] No data corruption
199
+ - [ ] Performance restored
200
+
201
+ ## Testing Plan
202
+
203
+ ### Automated Tests
204
+ - [ ] Unit tests pass
205
+ - [ ] Integration tests pass
206
+ - [ ] E2E tests pass
207
+ - [ ] Performance benchmarks acceptable
208
+
209
+ ### Manual Testing Checklist
210
+ - [ ] [Critical user flow 1]
211
+ - [ ] [Critical user flow 2]
212
+ - [ ] [Edge case 1]
213
+ - [ ] [Edge case 2]
214
+
215
+ ### Regression Tests
216
+ - [ ] [Feature that might regress 1]
217
+ - [ ] [Feature that might regress 2]
218
+
219
+ ## Communication Plan
220
+
221
+ ### Before Migration
222
+ - **Who**: [stakeholders]
223
+ - **When**: [X days before]
224
+ - **What**: [brief about upcoming changes]
225
+
226
+ ### During Migration
227
+ - **Channel**: [Slack/Email/Status page]
228
+ - **Updates**: Every [X] minutes
229
+
230
+ ### After Migration
231
+ - **Success**: [communication template]
232
+ - **Failure/Rollback**: [communication template]
233
+
234
+ ## Dependencies
235
+
236
+ | Dependency | Status | Owner | Notes |
237
+ |------------|--------|-------|-------|
238
+ | [Dep 1] | Ready/Pending | [Name] | [Notes] |
239
+ | [Dep 2] | Ready/Pending | [Name] | [Notes] |
240
+
241
+ ## Lessons Learned
242
+
243
+ *To be filled after migration*
244
+
245
+ ### What Went Well
246
+ -
247
+
248
+ ### What Could Be Improved
249
+ -
250
+
251
+ ### Action Items
252
+ -
253
+
254
+ ## Notes
255
+
256
+ [Additional context, links to documentation, etc.]
257
+
258
+ ---
259
+
260
+ **Commands:**
261
+
262
+ ```bash
263
+ # Create pre-migration checkpoint
264
+ ./rollback-migration.sh --create [MIGRATION-ID]-pre
265
+
266
+ # Run migration with Claude
267
+ ./run-story.sh [MIGRATION-ID] --migrate
268
+
269
+ # Rollback if needed
270
+ ./rollback-migration.sh [MIGRATION-ID]
271
+
272
+ # Preview rollback without executing
273
+ ./rollback-migration.sh [MIGRATION-ID] --dry-run
274
+ ```
@@ -0,0 +1,86 @@
1
+ # Refactoring Specification: [REFACTOR-ID]
2
+
3
+ **Priority**: [High/Medium/Low]
4
+ **Status**: Planned
5
+ **Created**: YYYY-MM-DD
6
+ **Estimated Effort**: [Small/Medium/Large]
7
+
8
+ ## Target
9
+
10
+ [What code/component/module is being refactored]
11
+
12
+ ## Current State
13
+
14
+ [Description of the current implementation and its problems]
15
+
16
+ ### Pain Points
17
+
18
+ - [Pain point 1]
19
+ - [Pain point 2]
20
+ - [Pain point 3]
21
+
22
+ ### Code Smells
23
+
24
+ - [ ] Long methods
25
+ - [ ] Duplicate code
26
+ - [ ] Complex conditionals
27
+ - [ ] Poor naming
28
+ - [ ] Missing abstractions
29
+ - [ ] Tight coupling
30
+ - [ ] Other: [describe]
31
+
32
+ ## Desired State
33
+
34
+ [Description of what the code should look like after refactoring]
35
+
36
+ ### Goals
37
+
38
+ - [ ] Improve readability
39
+ - [ ] Reduce duplication
40
+ - [ ] Improve testability
41
+ - [ ] Improve performance
42
+ - [ ] Reduce complexity
43
+ - [ ] Other: [describe]
44
+
45
+ ## Affected Files
46
+
47
+ | File | Changes |
48
+ |------|---------|
49
+ | `path/to/file1.ts` | [brief description] |
50
+ | `path/to/file2.ts` | [brief description] |
51
+
52
+ ## Approach
53
+
54
+ ### Phase 1: [Name]
55
+ [Description of first phase]
56
+
57
+ ### Phase 2: [Name]
58
+ [Description of second phase]
59
+
60
+ ## Testing Strategy
61
+
62
+ - [ ] Existing tests should continue to pass
63
+ - [ ] Add tests for: [specific areas]
64
+ - [ ] Manual testing needed for: [specific scenarios]
65
+
66
+ ## Risks
67
+
68
+ | Risk | Mitigation |
69
+ |------|------------|
70
+ | [Risk 1] | [How to mitigate] |
71
+ | [Risk 2] | [How to mitigate] |
72
+
73
+ ## Rollback Plan
74
+
75
+ [How to revert if something goes wrong]
76
+
77
+ ## Notes
78
+
79
+ [Any additional context]
80
+
81
+ ---
82
+
83
+ **To run this refactoring:**
84
+ ```bash
85
+ ./run-story.sh [REFACTOR-ID] --refactor
86
+ ```
@@ -0,0 +1,86 @@
1
+ # Technical Debt: [DEBT-ID]
2
+
3
+ **Priority**: [Critical/High/Medium/Low]
4
+ **Status**: Identified
5
+ **Created**: YYYY-MM-DD
6
+ **Category**: [Code Quality/Architecture/Dependencies/Testing/Documentation]
7
+
8
+ ## Summary
9
+
10
+ [One-line description of the technical debt]
11
+
12
+ ## Description
13
+
14
+ [Detailed description of the technical debt and its impact]
15
+
16
+ ## Impact
17
+
18
+ ### Current Pain
19
+ - [How this affects developers]
20
+ - [How this affects performance]
21
+ - [How this affects maintainability]
22
+
23
+ ### Risk if Not Addressed
24
+ - [Risk 1]
25
+ - [Risk 2]
26
+
27
+ ### Business Impact
28
+ - [Slower feature development]
29
+ - [Increased bug rate]
30
+ - [Other impacts]
31
+
32
+ ## Location
33
+
34
+ | File/Component | Issue |
35
+ |----------------|-------|
36
+ | `path/to/file1` | [specific issue] |
37
+ | `path/to/file2` | [specific issue] |
38
+
39
+ ## Root Cause
40
+
41
+ [How did this debt accumulate?]
42
+
43
+ - [ ] Time pressure
44
+ - [ ] Lack of understanding
45
+ - [ ] Changing requirements
46
+ - [ ] Outdated dependencies
47
+ - [ ] Missing tests
48
+ - [ ] Other: [describe]
49
+
50
+ ## Proposed Resolution
51
+
52
+ ### Option A: [Name]
53
+ - **Effort**: [estimate]
54
+ - **Risk**: [low/medium/high]
55
+ - **Description**: [approach]
56
+
57
+ ### Option B: [Name]
58
+ - **Effort**: [estimate]
59
+ - **Risk**: [low/medium/high]
60
+ - **Description**: [approach]
61
+
62
+ ### Recommended: [Option X]
63
+ [Why this option is recommended]
64
+
65
+ ## Success Criteria
66
+
67
+ - [ ] [Criterion 1]
68
+ - [ ] [Criterion 2]
69
+ - [ ] All existing tests pass
70
+ - [ ] No performance regression
71
+
72
+ ## Dependencies
73
+
74
+ - [What needs to happen first]
75
+ - [Related debt items]
76
+
77
+ ## Notes
78
+
79
+ [Additional context]
80
+
81
+ ---
82
+
83
+ **To resolve this tech debt:**
84
+ ```bash
85
+ ./run-story.sh [DEBT-ID] --tech-debt
86
+ ```