You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Detail the existing problems with the code (e.g., readability, performance, maintainability, redundancy, technical debt, etc.)
27
+
placeholder: |
28
+
1. Readability: The function is too long (over 200 lines) with unclear variable naming
29
+
2. Performance: Nested loops lead to O(n²) time complexity, resulting in slow data processing
30
+
3. Maintainability: Lack of comments and type definitions, difficult to debug and modify
31
+
4. Redundancy: Duplicate code blocks exist in 3 different files, increasing maintenance costs
32
+
validations:
33
+
required: true
34
+
35
+
# 3. Refactoring Objectives (Required)
36
+
- type: textarea
37
+
id: refactor-objectives
38
+
attributes:
39
+
label: Refactoring Objectives
40
+
description: Clearly state the expected outcomes and goals of the refactoring
41
+
placeholder: |
42
+
1. Split long functions into small, single-responsibility functions
43
+
2. Optimize algorithm to reduce time complexity to O(n log n)
44
+
3. Add complete type definitions and functional comments
45
+
4. Extract duplicate code into public utility functions
46
+
5. Improve test coverage from 60% to 90%
47
+
validations:
48
+
required: true
49
+
50
+
# 4. Refactoring Scope and Boundaries (Required)
51
+
- type: input
52
+
id: refactor-scope
53
+
attributes:
54
+
label: Refactoring Scope and Boundaries
55
+
description: Specify the scope of refactoring and clear boundaries (what to change/what not to change)
56
+
placeholder: e.g., Only refactor the data processing logic, do not modify the external API interface; Only adjust the code structure, do not change business logic
57
+
validations:
58
+
required: true
59
+
60
+
# 5. Risk Assessment (Optional)
61
+
- type: textarea
62
+
id: risk-assessment
63
+
attributes:
64
+
label: Risk Assessment
65
+
description: List potential risks of refactoring and corresponding mitigation measures (enter "N/A" if none)
66
+
placeholder: |
67
+
1. Risk: May affect the existing business logic → Mitigation: Add comprehensive unit tests before refactoring
68
+
2. Risk: Team members are unfamiliar with the new code structure → Mitigation: Conduct code walkthrough after refactoring
69
+
3. N/A
70
+
validations:
71
+
required: false
72
+
73
+
# 6. Reference Materials (Optional string)
74
+
- type: input
75
+
id: reference-materials
76
+
attributes:
77
+
label: Reference Materials
78
+
description: Enter URLs of relevant design documents, best practices or examples (enter "N/A" if none)
0 commit comments