ai-scaffold-pro 1.1.1
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/bin/cli.js +86 -0
- package/hooks/check-review-needed.sh +28 -0
- package/hooks/post-edit-tracker.sh +21 -0
- package/i18n/en.json +536 -0
- package/i18n/index.js +27 -0
- package/i18n/zh.json +536 -0
- package/package.json +29 -0
- package/scripts/gen_references.py +877 -0
- package/src/detect.js +320 -0
- package/src/platforms/android.js +206 -0
- package/src/platforms/default.js +26 -0
- package/src/platforms/flutter.js +278 -0
- package/src/platforms/harmonyos.js +26 -0
- package/src/platforms/index.js +40 -0
- package/src/platforms/ios.js +252 -0
- package/src/platforms/react-native.js +26 -0
- package/src/prompts.js +191 -0
- package/src/render.js +459 -0
- package/templates/CHANGELOG.md +21 -0
- package/templates/agents/arch-review.md +78 -0
- package/templates/agents/cpp-memory-review.md +84 -0
- package/templates/agents/proactive-correction.md +204 -0
- package/templates/agents/resource-sync.md +34 -0
- package/templates/rules/conflict_resolution.md +39 -0
- package/templates/rules/project_rule.md +210 -0
- package/templates/settings.json +27 -0
- package/templates/settings.local.json +5 -0
- package/templates/skills/code_review/SKILL.md +117 -0
- package/templates/skills/plan_mode/SKILL.md +92 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: proactive-correction
|
|
3
|
+
description: {{t "proactive_correction.description"}}
|
|
4
|
+
tools: Read, Grep, Glob, Write, Edit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# {{t "proactive_correction.title"}}
|
|
8
|
+
|
|
9
|
+
{{t "proactive_correction.intro"}}
|
|
10
|
+
|
|
11
|
+
## {{t "proactive_correction.core_principles_title"}}
|
|
12
|
+
|
|
13
|
+
1. {{t "proactive_correction.principle_1"}}
|
|
14
|
+
2. {{t "proactive_correction.principle_2"}}
|
|
15
|
+
3. {{t "proactive_correction.principle_3"}}
|
|
16
|
+
4. {{t "proactive_correction.principle_4"}}
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## {{t "proactive_correction.dimensions_title"}}
|
|
21
|
+
|
|
22
|
+
### {{t "proactive_correction.dim1_title"}}
|
|
23
|
+
|
|
24
|
+
{{t "proactive_correction.dim1_desc"}}
|
|
25
|
+
|
|
26
|
+
{{t "proactive_correction.dim1_table_header"}}
|
|
27
|
+
|---|--------|---------|--------------|
|
|
28
|
+
{{t "proactive_correction.dim1_row1"}}
|
|
29
|
+
{{t "proactive_correction.dim1_row2"}}
|
|
30
|
+
{{t "proactive_correction.dim1_row3"}}
|
|
31
|
+
{{t "proactive_correction.dim1_row4"}}
|
|
32
|
+
{{t "proactive_correction.dim1_row5"}}
|
|
33
|
+
{{t "proactive_correction.dim1_row6"}}
|
|
34
|
+
{{t "proactive_correction.dim1_row7"}}
|
|
35
|
+
|
|
36
|
+
{{t "proactive_correction.dim1_action"}}
|
|
37
|
+
1. {{t "proactive_correction.dim1_action_step1"}}
|
|
38
|
+
2. {{t "proactive_correction.dim1_action_step2"}}
|
|
39
|
+
3. {{t "proactive_correction.dim1_action_step3"}} {{DIR}}/CHANGELOG.md {{t "proactive_correction.dim1_action_step3_suffix"}}
|
|
40
|
+
|
|
41
|
+
#### {{t "proactive_correction.consistency_types_title"}}
|
|
42
|
+
|
|
43
|
+
**{{t "proactive_correction.type1_title"}}**
|
|
44
|
+
|
|
45
|
+
- {{t "proactive_correction.type1_def"}}
|
|
46
|
+
- {{t "proactive_correction.type1_example"}}
|
|
47
|
+
- {{t "proactive_correction.type1_method"}}
|
|
48
|
+
- {{t "proactive_correction.type1_fix"}}
|
|
49
|
+
|
|
50
|
+
**{{t "proactive_correction.type2_title"}}**
|
|
51
|
+
|
|
52
|
+
- {{t "proactive_correction.type2_def"}}
|
|
53
|
+
- {{t "proactive_correction.type2_example"}}
|
|
54
|
+
- {{t "proactive_correction.type2_method"}}
|
|
55
|
+
- {{t "proactive_correction.type2_fix"}}
|
|
56
|
+
|
|
57
|
+
**{{t "proactive_correction.type3_title"}}**
|
|
58
|
+
|
|
59
|
+
- {{t "proactive_correction.type3_def"}}
|
|
60
|
+
- {{t "proactive_correction.type3_example"}}
|
|
61
|
+
- {{t "proactive_correction.type3_method"}}
|
|
62
|
+
- {{t "proactive_correction.type3_fix"}}
|
|
63
|
+
|
|
64
|
+
### {{t "proactive_correction.dim2_title"}}
|
|
65
|
+
|
|
66
|
+
{{t "proactive_correction.dim2_desc"}}
|
|
67
|
+
|
|
68
|
+
{{t "proactive_correction.dim2_table_header"}}
|
|
69
|
+
|---|--------|---------|------------|
|
|
70
|
+
{{t "proactive_correction.dim2_row1"}}
|
|
71
|
+
{{t "proactive_correction.dim2_row2"}}
|
|
72
|
+
{{t "proactive_correction.dim2_row3"}}
|
|
73
|
+
{{t "proactive_correction.dim2_row4"}}
|
|
74
|
+
{{t "proactive_correction.dim2_row5"}}
|
|
75
|
+
{{t "proactive_correction.dim2_row6"}}
|
|
76
|
+
{{t "proactive_correction.dim2_row7"}}
|
|
77
|
+
{{t "proactive_correction.dim2_row8"}}
|
|
78
|
+
{{#if HAS_NDK}}
|
|
79
|
+
{{t "proactive_correction.dim2_ndk_row1"}}
|
|
80
|
+
{{t "proactive_correction.dim2_ndk_row2"}}
|
|
81
|
+
{{t "proactive_correction.dim2_ndk_row3"}}
|
|
82
|
+
{{/if}}
|
|
83
|
+
|
|
84
|
+
{{t "proactive_correction.dim2_action"}}
|
|
85
|
+
1. {{t "proactive_correction.dim2_action_step1"}}
|
|
86
|
+
2. {{t "proactive_correction.dim2_action_step2"}}
|
|
87
|
+
3. {{t "proactive_correction.dim2_action_step3"}}
|
|
88
|
+
4. {{t "proactive_correction.dim2_action_step4"}}
|
|
89
|
+
|
|
90
|
+
### {{t "proactive_correction.dim3_title"}}
|
|
91
|
+
|
|
92
|
+
{{t "proactive_correction.dim3_desc"}}
|
|
93
|
+
|
|
94
|
+
{{t "proactive_correction.dim3_table_header"}}
|
|
95
|
+
|---|--------|---------|--------------|
|
|
96
|
+
{{t "proactive_correction.dim3_row1"}}
|
|
97
|
+
{{t "proactive_correction.dim3_row2"}}
|
|
98
|
+
{{t "proactive_correction.dim3_row3"}}
|
|
99
|
+
{{t "proactive_correction.dim3_row4"}}
|
|
100
|
+
{{t "proactive_correction.dim3_row5"}}
|
|
101
|
+
{{t "proactive_correction.dim3_row6"}}
|
|
102
|
+
{{t "proactive_correction.dim3_row7"}}
|
|
103
|
+
{{t "proactive_correction.dim3_row8"}}
|
|
104
|
+
{{#if HAS_NDK}}
|
|
105
|
+
{{t "proactive_correction.dim3_ndk_row4"}}
|
|
106
|
+
{{t "proactive_correction.dim3_ndk_row5"}}
|
|
107
|
+
{{/if}}
|
|
108
|
+
|
|
109
|
+
{{t "proactive_correction.dim3_action"}}
|
|
110
|
+
1. {{t "proactive_correction.dim3_action_step1"}}
|
|
111
|
+
2. {{t "proactive_correction.dim3_action_step2"}}
|
|
112
|
+
3. {{t "proactive_correction.dim3_action_step3"}}
|
|
113
|
+
4. {{t "proactive_correction.dim3_action_step4"}}
|
|
114
|
+
|
|
115
|
+
#### {{t "proactive_correction.impl_checklist_title"}}
|
|
116
|
+
|
|
117
|
+
{{t "proactive_correction.impl_checklist_header"}}
|
|
118
|
+
|---|---------|---------|------|----------|
|
|
119
|
+
{{t "proactive_correction.impl_checklist_row1"}}
|
|
120
|
+
{{t "proactive_correction.impl_checklist_row2"}}
|
|
121
|
+
{{t "proactive_correction.impl_checklist_row3"}}
|
|
122
|
+
{{t "proactive_correction.impl_checklist_row4"}}
|
|
123
|
+
{{t "proactive_correction.impl_checklist_row5"}}
|
|
124
|
+
{{t "proactive_correction.impl_checklist_row6"}}
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## {{t "proactive_correction.trigger_title"}}
|
|
129
|
+
|
|
130
|
+
{{t "proactive_correction.trigger_desc"}}
|
|
131
|
+
|
|
132
|
+
1. {{t "proactive_correction.trigger_1"}}
|
|
133
|
+
2. {{t "proactive_correction.trigger_2"}}
|
|
134
|
+
3. {{t "proactive_correction.trigger_3"}}
|
|
135
|
+
4. {{t "proactive_correction.trigger_4"}}
|
|
136
|
+
5. {{t "proactive_correction.trigger_5"}}
|
|
137
|
+
|
|
138
|
+
{{t "proactive_correction.skip_title"}}
|
|
139
|
+
{{t "proactive_correction.skip_conditions"}}
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## {{t "proactive_correction.flow_title"}}
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
{{t "proactive_correction.flow_content"}}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## {{t "proactive_correction.report_title"}}
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
{{t "proactive_correction.report_content"}}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## {{t "proactive_correction.collab_title"}}
|
|
160
|
+
|
|
161
|
+
{{t "proactive_correction.collab_table_header"}}
|
|
162
|
+
|---------|---------|
|
|
163
|
+
{{t "proactive_correction.collab_row_project_rule"}}
|
|
164
|
+
{{t "proactive_correction.collab_row_code_review"}}
|
|
165
|
+
{{t "proactive_correction.collab_row_plan_mode"}}
|
|
166
|
+
{{t "proactive_correction.collab_row_arch_review"}}
|
|
167
|
+
{{t "proactive_correction.collab_row_resource_sync"}}
|
|
168
|
+
{{#if HAS_NDK}}
|
|
169
|
+
{{t "proactive_correction.collab_row_cpp_memory"}}
|
|
170
|
+
{{/if}}
|
|
171
|
+
|
|
172
|
+
{{t "proactive_correction.key_distinction_title"}}
|
|
173
|
+
- {{t "proactive_correction.key_distinction_proactive"}}
|
|
174
|
+
- {{t "proactive_correction.key_distinction_others"}}
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## {{t "proactive_correction.multi_round_title"}}
|
|
179
|
+
|
|
180
|
+
{{t "proactive_correction.multi_round_desc"}}
|
|
181
|
+
|
|
182
|
+
{{t "proactive_correction.multi_round_limit"}}
|
|
183
|
+
|
|
184
|
+
{{t "proactive_correction.multi_round_overflow"}}
|
|
185
|
+
|
|
186
|
+
{{t "proactive_correction.multi_round_output_title"}}
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
{{t "proactive_correction.multi_round_output_example"}}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
{{t "proactive_correction.multi_round_resume"}}
|
|
193
|
+
|
|
194
|
+
{{t "proactive_correction.multi_round_dedup"}}
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## {{t "proactive_correction.constraints_title"}}
|
|
199
|
+
|
|
200
|
+
{{t "proactive_correction.must_do_title"}}
|
|
201
|
+
{{t "proactive_correction.must_do_rules"}}
|
|
202
|
+
|
|
203
|
+
{{t "proactive_correction.must_not_title"}}
|
|
204
|
+
{{t "proactive_correction.must_not_rules"}}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: resource-sync
|
|
3
|
+
description: {{t "resource_sync.description"}}
|
|
4
|
+
tools: Read, Grep, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# {{t "resource_sync.title"}}
|
|
8
|
+
|
|
9
|
+
{{PLATFORM_RESOURCE_SYNC_CONTENT}}
|
|
10
|
+
|
|
11
|
+
## {{t "resource_sync.output_title"}}
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
## 🎨 {{t "resource_sync.title"}}
|
|
15
|
+
|
|
16
|
+
**{{t "resource_sync.output_scope"}}**:[{{t "resource_sync.output_scope_value"}}]
|
|
17
|
+
**{{t "resource_sync.output_result"}}**:✅ {{t "resource_sync.output_pass"}} / ❌ {{t "resource_sync.output_fail"}}
|
|
18
|
+
|
|
19
|
+
### ❌ {{t "resource_sync.output_missing_section"}}
|
|
20
|
+
|
|
21
|
+
| # | {{t "resource_sync.output_col_name"}} | {{t "resource_sync.output_col_type"}} | {{t "resource_sync.output_col_exists"}} | {{t "resource_sync.output_col_missing"}} |
|
|
22
|
+
|---|--------|------|-----------|---------|
|
|
23
|
+
|
|
24
|
+
### ⚠️ {{t "resource_sync.output_naming_section"}}
|
|
25
|
+
|
|
26
|
+
| # | {{t "resource_sync.output_col_name"}} | {{t "resource_sync.output_col_file"}} | {{t "resource_sync.output_col_issue"}} | {{t "resource_sync.output_col_suggestion"}} |
|
|
27
|
+
|---|--------|------|------|------|
|
|
28
|
+
|
|
29
|
+
### ✅ {{t "resource_sync.output_passed_section"}}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## {{t "resource_sync.constraints_title"}}
|
|
33
|
+
|
|
34
|
+
{{t "resource_sync.constraints"}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# {{t "conflict_resolution.title"}}
|
|
2
|
+
|
|
3
|
+
> {{t "conflict_resolution.desc"}}
|
|
4
|
+
> {{t "conflict_resolution.desc2"}}
|
|
5
|
+
|
|
6
|
+
## {{t "conflict_resolution.priority_title"}}
|
|
7
|
+
|
|
8
|
+
1. {{t "conflict_resolution.priority_1"}}
|
|
9
|
+
2. {{t "conflict_resolution.priority_2"}}
|
|
10
|
+
3. {{t "conflict_resolution.priority_3"}}
|
|
11
|
+
4. {{t "conflict_resolution.priority_4"}}
|
|
12
|
+
|
|
13
|
+
## {{t "conflict_resolution.domain_title"}}
|
|
14
|
+
|
|
15
|
+
{{t "conflict_resolution.domain_table_header"}}
|
|
16
|
+
|---------|----------|---------|
|
|
17
|
+
| project_rule | 100 | {{DOMAINS}} |
|
|
18
|
+
|
|
19
|
+
## {{t "conflict_resolution.conflict_table_title"}}
|
|
20
|
+
|
|
21
|
+
{{t "conflict_resolution.conflict_table_header"}}
|
|
22
|
+
|---|---------|-----------|-----------|------|------|
|
|
23
|
+
{{t "conflict_resolution.conflict_row1"}}
|
|
24
|
+
{{t "conflict_resolution.conflict_row2"}}
|
|
25
|
+
{{t "conflict_resolution.conflict_row3"}}
|
|
26
|
+
{{t "conflict_resolution.conflict_row4"}}
|
|
27
|
+
{{t "conflict_resolution.conflict_row5"}}
|
|
28
|
+
{{t "conflict_resolution.conflict_row6"}}
|
|
29
|
+
{{t "conflict_resolution.conflict_row_other"}}
|
|
30
|
+
|
|
31
|
+
## {{t "conflict_resolution.registration_title"}}
|
|
32
|
+
|
|
33
|
+
{{t "conflict_resolution.registration_steps"}}
|
|
34
|
+
6. {{t "conflict_resolution.registration_step6_prefix"}} `{{ENTRY}}` {{t "conflict_resolution.registration_step6_suffix"}}
|
|
35
|
+
|
|
36
|
+
## {{t "conflict_resolution.maintenance_title"}}
|
|
37
|
+
|
|
38
|
+
{{t "conflict_resolution.maintenance_rules"}} `{{DIR}}/CHANGELOG.md`
|
|
39
|
+
{{t "conflict_resolution.maintenance_rules_suffix"}}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
id: project_rule
|
|
3
|
+
domains: [{{DOMAINS}}]
|
|
4
|
+
priority: 100
|
|
5
|
+
triggers: [code_generation, code_modification, code_review, refactoring, bug_fix, feature_development]
|
|
6
|
+
mandatory: true
|
|
7
|
+
-->
|
|
8
|
+
# {{PROJECT_NAME}} {{t "project_rule.title"}}
|
|
9
|
+
|
|
10
|
+
> {{t "project_rule.scope"}}
|
|
11
|
+
> {{t "project_rule.skip_conditions"}}
|
|
12
|
+
|
|
13
|
+
### {{t "project_rule.negative_title"}}
|
|
14
|
+
|
|
15
|
+
{{t "project_rule.negative_table_header"}}
|
|
16
|
+
|---------|------|------|
|
|
17
|
+
{{t "project_rule.negative_row1"}}
|
|
18
|
+
{{t "project_rule.negative_row2"}}
|
|
19
|
+
{{t "project_rule.negative_row3"}}
|
|
20
|
+
{{t "project_rule.negative_row4"}}
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 1 {{t "project_rule.conduct_title"}}
|
|
25
|
+
|
|
26
|
+
{{#if HAS_CODEGRAPH}}
|
|
27
|
+
- {{t "project_rule.conduct_codegraph_search"}} `{{DIR}}/references/` {{t "project_rule.conduct_codegraph_search_suffix"}}
|
|
28
|
+
- {{t "project_rule.conduct_no_fabrication"}}
|
|
29
|
+
- {{t "project_rule.conduct_no_new_deps"}} `{{DIR}}/references/dependencies.md` {{t "project_rule.conduct_no_new_deps_suffix"}}
|
|
30
|
+
- {{t "project_rule.conduct_codegraph_lightweight"}}
|
|
31
|
+
{{else}}
|
|
32
|
+
- {{t "project_rule.conduct_search_first"}} `{{DIR}}/references/` {{t "project_rule.conduct_search_first_suffix"}}
|
|
33
|
+
- {{t "project_rule.conduct_no_fabrication"}}
|
|
34
|
+
- {{t "project_rule.conduct_no_new_deps"}} `{{DIR}}/references/dependencies.md` {{t "project_rule.conduct_no_new_deps_suffix"}}
|
|
35
|
+
{{/if}}
|
|
36
|
+
- {{t "project_rule.conduct_reuse"}}
|
|
37
|
+
- {{t "project_rule.conduct_confirm"}}
|
|
38
|
+
|
|
39
|
+
### 1.N {{t "project_rule.proactive_title"}}
|
|
40
|
+
|
|
41
|
+
- {{t "project_rule.proactive_scan"}}
|
|
42
|
+
- {{t "project_rule.proactive_fix"}}
|
|
43
|
+
- {{t "project_rule.proactive_rules"}}
|
|
44
|
+
- {{t "project_rule.proactive_closure"}}
|
|
45
|
+
- {{t "project_rule.proactive_confirm"}}
|
|
46
|
+
- {{t "project_rule.proactive_limit"}}
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 2 {{t "project_rule.arch_title"}}
|
|
51
|
+
|
|
52
|
+
### 2.1 {{t "project_rule.arch_dep_title"}}
|
|
53
|
+
{{DEPENDENCY_RULES}}
|
|
54
|
+
|
|
55
|
+
### 2.2 {{t "project_rule.arch_comm_title"}}
|
|
56
|
+
{{t "project_rule.arch_comm_desc"}}
|
|
57
|
+
|
|
58
|
+
### 2.3 {{t "project_rule.arch_inherit_title"}}
|
|
59
|
+
{{INHERITANCE_RULES}}
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 3 {{t "project_rule.forbidden_title"}}
|
|
64
|
+
|
|
65
|
+
{{t "project_rule.forbidden_desc"}}
|
|
66
|
+
|
|
67
|
+
{{t "project_rule.forbidden_table_header"}}
|
|
68
|
+
|---|---------|---------|------|
|
|
69
|
+
{{FORBIDDEN_PATTERNS_TABLE}}
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 4 {{t "project_rule.naming_title"}}
|
|
74
|
+
|
|
75
|
+
### 4.1 {{t "project_rule.naming_resource_title"}}
|
|
76
|
+
{{RESOURCE_PREFIXES}}
|
|
77
|
+
|
|
78
|
+
### 4.2 {{t "project_rule.naming_class_title"}}
|
|
79
|
+
{{CLASS_NAMING}}
|
|
80
|
+
|
|
81
|
+
### 4.3 {{t "project_rule.naming_layout_title"}}
|
|
82
|
+
{{LAYOUT_NAMING}}
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 5 {{PLATFORM}} {{t "project_rule.platform_title"}}
|
|
87
|
+
|
|
88
|
+
{{PLATFORM_SPECIFIC_RULES}}
|
|
89
|
+
|
|
90
|
+
{{#if HAS_NDK}}
|
|
91
|
+
|
|
92
|
+
### 5.N {{t "project_rule.ndk_title"}}
|
|
93
|
+
|
|
94
|
+
#### 5.N.1 {{t "project_rule.ndk_jni_memory_title"}}
|
|
95
|
+
|
|
96
|
+
{{t "project_rule.ndk_jni_memory_desc"}}
|
|
97
|
+
|
|
98
|
+
{{t "project_rule.ndk_jni_memory_table_header"}}
|
|
99
|
+
|---|------|------|
|
|
100
|
+
{{t "project_rule.ndk_jni_memory_row1"}}
|
|
101
|
+
{{t "project_rule.ndk_jni_memory_row2"}}
|
|
102
|
+
{{t "project_rule.ndk_jni_memory_row3"}}
|
|
103
|
+
{{t "project_rule.ndk_jni_memory_row4"}}
|
|
104
|
+
{{t "project_rule.ndk_jni_memory_row5"}}
|
|
105
|
+
{{t "project_rule.ndk_jni_memory_row6"}}
|
|
106
|
+
|
|
107
|
+
#### 5.N.2 {{t "project_rule.ndk_jni_coding_title"}}
|
|
108
|
+
|
|
109
|
+
{{t "project_rule.ndk_jni_coding_table_header"}}
|
|
110
|
+
|---|------|------|
|
|
111
|
+
{{t "project_rule.ndk_jni_coding_row1"}}
|
|
112
|
+
{{t "project_rule.ndk_jni_coding_row2"}}
|
|
113
|
+
{{t "project_rule.ndk_jni_coding_row3"}}
|
|
114
|
+
{{t "project_rule.ndk_jni_coding_row4"}}
|
|
115
|
+
|
|
116
|
+
#### 5.N.3 {{t "project_rule.ndk_memory_safety_title"}}
|
|
117
|
+
|
|
118
|
+
| # | Rule | Description |
|
|
119
|
+
|---|------|------|
|
|
120
|
+
| 1 | {{t "project_rule.ndk_memory_safety_row1"}} |
|
|
121
|
+
| 2 | {{t "project_rule.ndk_memory_safety_row2"}} |
|
|
122
|
+
| 3 | {{t "project_rule.ndk_memory_safety_row3"}} |
|
|
123
|
+
| 4 | {{t "project_rule.ndk_memory_safety_row4"}} |
|
|
124
|
+
| 5 | {{t "project_rule.ndk_memory_safety_row5"}} |
|
|
125
|
+
| 6 | {{t "project_rule.ndk_memory_safety_row6"}} |
|
|
126
|
+
|
|
127
|
+
#### 5.N.4 {{t "project_rule.ndk_build_title"}}
|
|
128
|
+
|
|
129
|
+
| # | Rule | Description |
|
|
130
|
+
|---|------|------|
|
|
131
|
+
| 2 | {{t "project_rule.ndk_build_row2"}} |
|
|
132
|
+
| 3 | {{t "project_rule.ndk_build_row3"}} |
|
|
133
|
+
| 4 | {{t "project_rule.ndk_build_row4"}} |
|
|
134
|
+
| 5 | {{t "project_rule.ndk_build_row5"}} |
|
|
135
|
+
| 6 | {{t "project_rule.ndk_build_row6"}} |
|
|
136
|
+
|
|
137
|
+
{{/if}}
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 6 {{t "project_rule.quality_title"}}
|
|
142
|
+
|
|
143
|
+
{{t "project_rule.quality_rules"}}
|
|
144
|
+
|
|
145
|
+
{{#if HAS_NDK}}
|
|
146
|
+
|
|
147
|
+
### 6.N {{t "project_rule.quality_ndk_title"}}
|
|
148
|
+
|
|
149
|
+
{{t "project_rule.quality_ndk_rules"}}
|
|
150
|
+
|
|
151
|
+
{{/if}}
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## 7 {{t "project_rule.checklist_title"}}
|
|
156
|
+
|
|
157
|
+
{{t "project_rule.checklist_desc"}}
|
|
158
|
+
|
|
159
|
+
{{t "project_rule.checklist_table_header"}}
|
|
160
|
+
|---|--------|
|
|
161
|
+
{{t "project_rule.checklist_row1"}}
|
|
162
|
+
{{t "project_rule.checklist_row2"}}
|
|
163
|
+
{{t "project_rule.checklist_row3"}}
|
|
164
|
+
{{t "project_rule.checklist_row4"}}
|
|
165
|
+
{{t "project_rule.checklist_row5"}}
|
|
166
|
+
{{t "project_rule.checklist_row6"}}
|
|
167
|
+
{{t "project_rule.checklist_rowC1"}}
|
|
168
|
+
{{t "project_rule.checklist_rowC2"}}
|
|
169
|
+
{{t "project_rule.checklist_rowC3"}}
|
|
170
|
+
{{PLATFORM_SELF_CHECK_ITEMS}}
|
|
171
|
+
{{#if HAS_NDK}}
|
|
172
|
+
| N1 | {{t "project_rule.checklist_ndk_row1"}} |
|
|
173
|
+
| N2 | {{t "project_rule.checklist_ndk_row2"}} |
|
|
174
|
+
| N3 | {{t "project_rule.checklist_ndk_row3"}} |
|
|
175
|
+
| N4 | {{t "project_rule.checklist_ndk_row4"}} |
|
|
176
|
+
| N5 | {{t "project_rule.checklist_ndk_row5"}} |
|
|
177
|
+
| N6 | {{t "project_rule.checklist_ndk_row6"}} |
|
|
178
|
+
| N7 | {{t "project_rule.checklist_ndk_row7"}} |
|
|
179
|
+
| N8 | {{t "project_rule.checklist_ndk_row8"}} |
|
|
180
|
+
| N9 | {{t "project_rule.checklist_ndk_row9"}} |
|
|
181
|
+
| N10 | {{t "project_rule.checklist_ndk_row10"}} |
|
|
182
|
+
{{/if}}
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 8 {{DIR}} {{t "project_rule.config_title"}}
|
|
187
|
+
|
|
188
|
+
{{t "project_rule.config_desc"}} `{{DIR}}/` {{t "project_rule.config_desc_suffix"}}
|
|
189
|
+
|
|
190
|
+
1. {{t "project_rule.config_step1"}} `{{DIR}}/CHANGELOG.md` {{t "project_rule.config_step1_suffix"}}
|
|
191
|
+
2. {{t "project_rule.config_step2_prefix"}} `{{ENTRY}}` {{t "project_rule.config_step2_suffix"}}
|
|
192
|
+
|
|
193
|
+
{{t "project_rule.config_version_table_header"}}
|
|
194
|
+
|---------|---------|
|
|
195
|
+
{{t "project_rule.config_version_row1"}}
|
|
196
|
+
{{t "project_rule.config_version_row2"}}
|
|
197
|
+
{{t "project_rule.config_version_row3"}}
|
|
198
|
+
|
|
199
|
+
{{t "project_rule.config_scope"}}
|
|
200
|
+
|
|
201
|
+
{{t "project_rule.config_scope_table_header"}}
|
|
202
|
+
|------|------|
|
|
203
|
+
| `{{ENTRY}}` | {{t "project_rule.config_scope_entry"}} |
|
|
204
|
+
| `{{DIR}}/rules/*.md` | {{t "project_rule.config_scope_rules"}} |
|
|
205
|
+
| `{{DIR}}/skills/*/SKILL.md` | {{t "project_rule.config_scope_skills"}} |
|
|
206
|
+
| `{{DIR}}/agents/*.md` | {{t "project_rule.config_scope_agents"}} |
|
|
207
|
+
| `{{DIR}}/hooks/*.sh` | {{t "project_rule.config_scope_hooks"}} |
|
|
208
|
+
| `{{DIR}}/settings.json` | {{t "project_rule.config_scope_settings"}} |
|
|
209
|
+
| `{{DIR}}/references/*.md` | {{t "project_rule.config_scope_references"}} |
|
|
210
|
+
| `{{DIR}}/scripts/*` | {{t "project_rule.config_scope_scripts"}} |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PostToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Write|Edit",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "{{DIR}}/hooks/post-edit-tracker.sh",
|
|
10
|
+
"timeout": 5
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"Stop": [
|
|
16
|
+
{
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "{{DIR}}/hooks/check-review-needed.sh",
|
|
21
|
+
"timeout": 5
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code_review
|
|
3
|
+
description: {{t "code_review.description"}}
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {{t "code_review.title"}}
|
|
7
|
+
|
|
8
|
+
> {{t "code_review.trigger_title"}}
|
|
9
|
+
> 1. {{t "code_review.trigger_1"}}
|
|
10
|
+
> 2. {{t "code_review.trigger_2"}}
|
|
11
|
+
> 3. {{t "code_review.trigger_3"}}
|
|
12
|
+
> 4. {{t "code_review.trigger_4"}}
|
|
13
|
+
>
|
|
14
|
+
> {{t "code_review.skip"}}
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 1 {{t "code_review.checklist_title"}}
|
|
19
|
+
|
|
20
|
+
### 1.1 {{t "code_review.fatal_title"}}
|
|
21
|
+
|
|
22
|
+
| # | Check | Method |
|
|
23
|
+
|---|--------|---------|
|
|
24
|
+
| 1 | {{t "code_review.fatal_row1"}} |
|
|
25
|
+
| 2 | {{t "code_review.fatal_row2"}} |
|
|
26
|
+
| 3 | {{t "code_review.fatal_row3"}} |
|
|
27
|
+
| 4 | {{t "code_review.fatal_row4"}} |
|
|
28
|
+
| 5 | {{t "code_review.fatal_row5"}} |
|
|
29
|
+
| 6 | {{t "code_review.fatal_row6"}} |
|
|
30
|
+
{{PLATFORM_FATAL_CHECKS}}
|
|
31
|
+
{{#if HAS_NDK}}
|
|
32
|
+
| F-NDK1 | {{t "code_review.fatal_ndk1"}} |
|
|
33
|
+
| F-NDK2 | {{t "code_review.fatal_ndk2"}} |
|
|
34
|
+
| F-NDK3 | {{t "code_review.fatal_ndk3"}} |
|
|
35
|
+
| F-NDK4 | {{t "code_review.fatal_ndk4"}} |
|
|
36
|
+
| F-NDK5 | {{t "code_review.fatal_ndk5"}} |
|
|
37
|
+
| F-NDK6 | {{t "code_review.fatal_ndk6"}} |
|
|
38
|
+
{{/if}}
|
|
39
|
+
|
|
40
|
+
### 1.2 {{t "code_review.warning_title"}}
|
|
41
|
+
|
|
42
|
+
| # | Check | Method |
|
|
43
|
+
|---|--------|---------|
|
|
44
|
+
| 7 | {{t "code_review.warning_row7"}} |
|
|
45
|
+
| 8 | {{t "code_review.warning_row8"}} |
|
|
46
|
+
| 9 | {{t "code_review.warning_row9"}} |
|
|
47
|
+
| 10 | {{t "code_review.warning_row10"}} |
|
|
48
|
+
{{PLATFORM_WARNING_CHECKS}}
|
|
49
|
+
{{#if HAS_NDK}}
|
|
50
|
+
| W-NDK1 | {{t "code_review.warning_ndk1"}} |
|
|
51
|
+
| W-NDK2 | {{t "code_review.warning_ndk2"}} |
|
|
52
|
+
| W-NDK3 | {{t "code_review.warning_ndk3"}} |
|
|
53
|
+
| W-NDK4 | {{t "code_review.warning_ndk4"}} |
|
|
54
|
+
| W-NDK5 | {{t "code_review.warning_ndk5"}} |
|
|
55
|
+
{{/if}}
|
|
56
|
+
|
|
57
|
+
### 1.3 {{t "code_review.suggestion_title"}}
|
|
58
|
+
|
|
59
|
+
| # | Check | Method |
|
|
60
|
+
|---|--------|---------|
|
|
61
|
+
| 11 | {{t "code_review.suggestion_row11"}} |
|
|
62
|
+
| 12 | {{t "code_review.suggestion_row12"}} |
|
|
63
|
+
| 13 | {{t "code_review.suggestion_row13"}} |
|
|
64
|
+
| 14 | {{t "code_review.suggestion_row14"}} |
|
|
65
|
+
{{PLATFORM_SUGGESTION_CHECKS}}
|
|
66
|
+
{{#if HAS_NDK}}
|
|
67
|
+
| S-NDK1 | {{t "code_review.suggestion_ndk1"}} |
|
|
68
|
+
| S-NDK2 | {{t "code_review.suggestion_ndk2"}} |
|
|
69
|
+
| S-NDK3 | {{t "code_review.suggestion_ndk3"}} |
|
|
70
|
+
| S-NDK4 | {{t "code_review.suggestion_ndk4"}} |
|
|
71
|
+
| S-NDK5 | {{t "code_review.suggestion_ndk5"}} |
|
|
72
|
+
{{/if}}
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 2 {{t "code_review.output_title"}}
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
## 🔍 {{t "code_review.title"}}
|
|
80
|
+
|
|
81
|
+
**{{t "code_review.output_scope"}}**:[{{t "code_review.output_scope_value"}}]
|
|
82
|
+
**{{t "code_review.output_result"}}**:✅ {{t "code_review.output_pass"}} / ⚠️ N {{t "code_review.output_warnings"}} / ❌ N {{t "code_review.output_fatals"}}
|
|
83
|
+
|
|
84
|
+
### ❌ {{t "code_review.output_fatal_section"}}
|
|
85
|
+
|
|
86
|
+
**{{t "code_review.output_issue"}} 1**:[{{t "code_review.output_issue_title"}}]
|
|
87
|
+
- **{{t "code_review.output_location"}}**:`file:line`
|
|
88
|
+
- **{{t "code_review.output_violated_rule"}}**:[rule]
|
|
89
|
+
- **{{t "code_review.output_current_code"}}**:`snippet`
|
|
90
|
+
- **{{t "code_review.output_fix"}}**:`fix`
|
|
91
|
+
|
|
92
|
+
### ⚠️ {{t "code_review.output_warning_section"}}
|
|
93
|
+
|
|
94
|
+
### 💡 {{t "code_review.output_suggestion_section"}}
|
|
95
|
+
|
|
96
|
+
### ✅ {{t "code_review.output_passed_section"}}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 3 {{t "code_review.flow_title"}}
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
{{t "code_review.flow_content"}}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 4 {{t "code_review.collab_title"}}
|
|
110
|
+
|
|
111
|
+
- {{t "code_review.collab_proactive"}}
|
|
112
|
+
- {{t "code_review.collab_arch"}}
|
|
113
|
+
- {{t "code_review.collab_resource"}}
|
|
114
|
+
{{#if HAS_NDK}}
|
|
115
|
+
- {{t "code_review.collab_cpp"}}
|
|
116
|
+
{{/if}}
|
|
117
|
+
- {{t "code_review.collab_timing_prefix"}} {{ARCH_REVIEW_MODULE_THRESHOLD}}{{t "code_review.collab_timing_suffix"}}{{#if HAS_NDK}}{{t "code_review.collab_timing_ndk"}}{{/if}}
|