ai-flow-dev 2.7.0 → 2.8.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 (171) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +573 -570
  3. package/package.json +74 -74
  4. package/prompts/backend/flow-build-phase-0.md +535 -535
  5. package/prompts/backend/flow-build-phase-1.md +626 -626
  6. package/prompts/backend/flow-build-phase-10.md +340 -340
  7. package/prompts/backend/flow-build-phase-2.md +573 -573
  8. package/prompts/backend/flow-build-phase-3.md +834 -834
  9. package/prompts/backend/flow-build-phase-4.md +554 -554
  10. package/prompts/backend/flow-build-phase-5.md +703 -703
  11. package/prompts/backend/flow-build-phase-6.md +524 -524
  12. package/prompts/backend/flow-build-phase-7.md +1001 -1001
  13. package/prompts/backend/flow-build-phase-8.md +1407 -1407
  14. package/prompts/backend/flow-build-phase-9.md +477 -477
  15. package/prompts/backend/flow-build.md +137 -137
  16. package/prompts/backend/flow-check-review.md +656 -20
  17. package/prompts/backend/flow-check-test.md +526 -14
  18. package/prompts/backend/flow-check.md +725 -67
  19. package/prompts/backend/flow-commit.md +88 -119
  20. package/prompts/backend/flow-docs-sync.md +354 -354
  21. package/prompts/backend/flow-finish.md +919 -0
  22. package/prompts/backend/flow-release.md +949 -0
  23. package/prompts/backend/flow-work-feature.md +61 -61
  24. package/prompts/backend/flow-work-fix.md +46 -46
  25. package/prompts/backend/flow-work-refactor.md +48 -48
  26. package/prompts/backend/flow-work-resume.md +34 -34
  27. package/prompts/backend/flow-work.md +1098 -1286
  28. package/prompts/desktop/flow-build-phase-0.md +359 -359
  29. package/prompts/desktop/flow-build-phase-1.md +295 -295
  30. package/prompts/desktop/flow-build-phase-10.md +357 -357
  31. package/prompts/desktop/flow-build-phase-2.md +282 -282
  32. package/prompts/desktop/flow-build-phase-3.md +291 -291
  33. package/prompts/desktop/flow-build-phase-4.md +308 -308
  34. package/prompts/desktop/flow-build-phase-5.md +269 -269
  35. package/prompts/desktop/flow-build-phase-6.md +350 -350
  36. package/prompts/desktop/flow-build-phase-7.md +297 -297
  37. package/prompts/desktop/flow-build-phase-8.md +541 -541
  38. package/prompts/desktop/flow-build-phase-9.md +439 -439
  39. package/prompts/desktop/flow-build.md +156 -156
  40. package/prompts/desktop/flow-check-review.md +656 -20
  41. package/prompts/desktop/flow-check-test.md +526 -14
  42. package/prompts/desktop/flow-check.md +725 -67
  43. package/prompts/desktop/flow-commit.md +88 -119
  44. package/prompts/desktop/flow-docs-sync.md +354 -354
  45. package/prompts/desktop/flow-finish.md +910 -0
  46. package/prompts/desktop/flow-release.md +662 -0
  47. package/prompts/desktop/flow-work-feature.md +61 -61
  48. package/prompts/desktop/flow-work-fix.md +46 -46
  49. package/prompts/desktop/flow-work-refactor.md +48 -48
  50. package/prompts/desktop/flow-work-resume.md +34 -34
  51. package/prompts/desktop/flow-work.md +1202 -1390
  52. package/prompts/frontend/flow-build-phase-0.md +425 -425
  53. package/prompts/frontend/flow-build-phase-1.md +626 -626
  54. package/prompts/frontend/flow-build-phase-10.md +33 -33
  55. package/prompts/frontend/flow-build-phase-2.md +573 -573
  56. package/prompts/frontend/flow-build-phase-3.md +782 -782
  57. package/prompts/frontend/flow-build-phase-4.md +554 -554
  58. package/prompts/frontend/flow-build-phase-5.md +703 -703
  59. package/prompts/frontend/flow-build-phase-6.md +524 -524
  60. package/prompts/frontend/flow-build-phase-7.md +1001 -1001
  61. package/prompts/frontend/flow-build-phase-8.md +872 -872
  62. package/prompts/frontend/flow-build-phase-9.md +94 -94
  63. package/prompts/frontend/flow-build.md +137 -137
  64. package/prompts/frontend/flow-check-review.md +656 -20
  65. package/prompts/frontend/flow-check-test.md +526 -14
  66. package/prompts/frontend/flow-check.md +725 -67
  67. package/prompts/frontend/flow-commit.md +88 -119
  68. package/prompts/frontend/flow-docs-sync.md +550 -550
  69. package/prompts/frontend/flow-finish.md +910 -0
  70. package/prompts/frontend/flow-release.md +519 -0
  71. package/prompts/frontend/flow-work-api.md +1540 -0
  72. package/prompts/frontend/flow-work-feature.md +61 -61
  73. package/prompts/frontend/flow-work-fix.md +38 -38
  74. package/prompts/frontend/flow-work-refactor.md +48 -48
  75. package/prompts/frontend/flow-work-resume.md +34 -34
  76. package/prompts/frontend/flow-work.md +1583 -1320
  77. package/prompts/mobile/flow-build-phase-0.md +425 -425
  78. package/prompts/mobile/flow-build-phase-1.md +626 -626
  79. package/prompts/mobile/flow-build-phase-10.md +32 -32
  80. package/prompts/mobile/flow-build-phase-2.md +573 -573
  81. package/prompts/mobile/flow-build-phase-3.md +782 -782
  82. package/prompts/mobile/flow-build-phase-4.md +554 -554
  83. package/prompts/mobile/flow-build-phase-5.md +703 -703
  84. package/prompts/mobile/flow-build-phase-6.md +524 -524
  85. package/prompts/mobile/flow-build-phase-7.md +1001 -1001
  86. package/prompts/mobile/flow-build-phase-8.md +888 -888
  87. package/prompts/mobile/flow-build-phase-9.md +90 -90
  88. package/prompts/mobile/flow-build.md +135 -135
  89. package/prompts/mobile/flow-check-review.md +656 -20
  90. package/prompts/mobile/flow-check-test.md +526 -14
  91. package/prompts/mobile/flow-check.md +725 -67
  92. package/prompts/mobile/flow-commit.md +88 -119
  93. package/prompts/mobile/flow-docs-sync.md +620 -620
  94. package/prompts/mobile/flow-finish.md +910 -0
  95. package/prompts/mobile/flow-release.md +751 -0
  96. package/prompts/mobile/flow-work-api.md +1493 -0
  97. package/prompts/mobile/flow-work-feature.md +61 -61
  98. package/prompts/mobile/flow-work-fix.md +46 -46
  99. package/prompts/mobile/flow-work-refactor.md +48 -48
  100. package/prompts/mobile/flow-work-resume.md +34 -34
  101. package/prompts/mobile/flow-work.md +1593 -1329
  102. package/prompts/shared/mermaid-guidelines.md +102 -102
  103. package/prompts/shared/scope-levels.md +114 -114
  104. package/prompts/shared/smart-skip-preflight.md +214 -214
  105. package/prompts/shared/story-points.md +55 -55
  106. package/prompts/shared/task-format.md +74 -74
  107. package/prompts/shared/task-summary-template.md +277 -277
  108. package/templates/AGENT.template.md +443 -443
  109. package/templates/backend/.clauderules.template +112 -112
  110. package/templates/backend/.cursorrules.template +102 -102
  111. package/templates/backend/README.template.md +2 -2
  112. package/templates/backend/ai-instructions.template.md +2 -2
  113. package/templates/backend/copilot-instructions.template.md +2 -2
  114. package/templates/backend/docs/api.template.md +320 -320
  115. package/templates/backend/docs/business-flows.template.md +97 -97
  116. package/templates/backend/docs/code-standards.template.md +2 -2
  117. package/templates/backend/docs/contributing.template.md +3 -3
  118. package/templates/backend/docs/data-model.template.md +520 -520
  119. package/templates/backend/docs/testing.template.md +2 -2
  120. package/templates/backend/project-brief.template.md +2 -2
  121. package/templates/backend/specs/configuration.template.md +2 -2
  122. package/templates/backend/specs/security.template.md +2 -2
  123. package/templates/desktop/.clauderules.template +112 -112
  124. package/templates/desktop/.cursorrules.template +102 -102
  125. package/templates/desktop/README.template.md +170 -170
  126. package/templates/desktop/ai-instructions.template.md +366 -366
  127. package/templates/desktop/copilot-instructions.template.md +140 -140
  128. package/templates/desktop/docs/docs/api.template.md +320 -320
  129. package/templates/desktop/docs/docs/architecture.template.md +724 -724
  130. package/templates/desktop/docs/docs/business-flows.template.md +102 -102
  131. package/templates/desktop/docs/docs/code-standards.template.md +792 -792
  132. package/templates/desktop/docs/docs/contributing.template.md +149 -149
  133. package/templates/desktop/docs/docs/data-model.template.md +520 -520
  134. package/templates/desktop/docs/docs/operations.template.md +720 -720
  135. package/templates/desktop/docs/docs/testing.template.md +722 -722
  136. package/templates/desktop/project-brief.template.md +150 -150
  137. package/templates/desktop/specs/specs/configuration.template.md +121 -121
  138. package/templates/desktop/specs/specs/security.template.md +392 -392
  139. package/templates/frontend/README.template.md +2 -2
  140. package/templates/frontend/ai-instructions.template.md +2 -2
  141. package/templates/frontend/docs/api-integration.template.md +362 -362
  142. package/templates/frontend/docs/components.template.md +2 -2
  143. package/templates/frontend/docs/error-handling.template.md +360 -360
  144. package/templates/frontend/docs/operations.template.md +107 -107
  145. package/templates/frontend/docs/performance.template.md +124 -124
  146. package/templates/frontend/docs/pwa.template.md +119 -119
  147. package/templates/frontend/docs/state-management.template.md +2 -2
  148. package/templates/frontend/docs/styling.template.md +2 -2
  149. package/templates/frontend/docs/testing.template.md +2 -2
  150. package/templates/frontend/project-brief.template.md +2 -2
  151. package/templates/frontend/specs/accessibility.template.md +95 -95
  152. package/templates/frontend/specs/configuration.template.md +2 -2
  153. package/templates/frontend/specs/security.template.md +175 -175
  154. package/templates/fullstack/README.template.md +252 -252
  155. package/templates/fullstack/ai-instructions.template.md +444 -444
  156. package/templates/fullstack/project-brief.template.md +157 -157
  157. package/templates/fullstack/specs/configuration.template.md +340 -340
  158. package/templates/mobile/README.template.md +167 -167
  159. package/templates/mobile/ai-instructions.template.md +196 -196
  160. package/templates/mobile/docs/app-store.template.md +135 -135
  161. package/templates/mobile/docs/architecture.template.md +63 -63
  162. package/templates/mobile/docs/native-features.template.md +94 -94
  163. package/templates/mobile/docs/navigation.template.md +59 -59
  164. package/templates/mobile/docs/offline-strategy.template.md +65 -65
  165. package/templates/mobile/docs/permissions.template.md +56 -56
  166. package/templates/mobile/docs/state-management.template.md +85 -85
  167. package/templates/mobile/docs/testing.template.md +109 -109
  168. package/templates/mobile/project-brief.template.md +69 -69
  169. package/templates/mobile/specs/build-configuration.template.md +91 -91
  170. package/templates/mobile/specs/deployment.template.md +92 -92
  171. package/templates/work.template.md +47 -47
@@ -1,269 +1,269 @@
1
- ## PHASE 5: Code Standards (10-15 min)
2
-
3
- > **Order for this phase:** 5.1 → 5.2 → 5.3 → 5.4 → 5.5
4
-
5
- ### Objective
6
-
7
- Define coding conventions, style guides, and best practices for Java desktop development.
8
-
9
- ---
10
-
11
- ## 5.1 Java Version & Features
12
-
13
- ```
14
- Which Java version are you targeting?
15
-
16
- A) ☕ Java 8 (LTS) - Legacy support
17
- - Lambda expressions, Streams
18
- - java.time package
19
- - End of free support: 2030
20
-
21
- B) ☕ Java 11 (LTS) - Current minimum
22
- - Modules, var keyword
23
- - HTTP Client
24
- - End of support: 2026
25
-
26
- C) ☕ Java 17 (LTS) - Modern standard (recommended)
27
- - Records, sealed classes
28
- - Pattern matching
29
- - End of support: 2029
30
-
31
- D) ☕ Java 21 (LTS) - Latest LTS
32
- - Virtual Threads (Project Loom)
33
- - Sequenced Collections
34
- - End of support: 2031
35
-
36
- E) ☕ Java 22/23+ - Cutting edge
37
- - Latest features, shorter support
38
-
39
- Your choice: __
40
-
41
- Modern Java features to use:
42
- - ✅ Records (data classes)
43
- - ✅ var keyword (local variables)
44
- - ✅ Switch expressions
45
- - ✅ Text blocks (multi-line strings)
46
- - ✅ Pattern matching
47
- - ✅ Virtual Threads (Java 21+)
48
- ```
49
-
50
- ---
51
-
52
- ## 5.2 Code Style
53
-
54
- ```
55
- Which coding style guide will you follow?
56
-
57
- A) 🏆 Google Java Style Guide
58
- - 2 spaces indentation
59
- - 100 char line length
60
- - Enforced by Checkstyle
61
-
62
- B) ☕ Oracle Java Conventions
63
- - 4 spaces indentation
64
- - Traditional Java style
65
-
66
- C) 🎯 Sun Code Conventions
67
- - Classic Java style
68
- - Widely adopted
69
-
70
- D) 🔧 Custom - Your own rules
71
-
72
- Your choice: __
73
-
74
- IDE Formatter:
75
- A) Eclipse Formatter (Eclipse, NetBeans)
76
- B) IntelliJ Formatter (IntelliJ IDEA)
77
- C) google-java-format plugin
78
- D) Spotless (Gradle/Maven plugin)
79
-
80
- Your choice: __
81
- ```
82
-
83
- ---
84
-
85
- ## 5.3 Naming Conventions
86
-
87
- ```
88
- Naming conventions (confirm or customize):
89
-
90
- **Classes:**
91
- - PascalCase: MainWindow, UserController
92
- - Interfaces: IService or ServiceInterface?
93
- A) IService (prefix)
94
- B) ServiceInterface (suffix)
95
- C) Service (no prefix/suffix)
96
-
97
- **Methods:**
98
- - camelCase: getUserById(), calculateTotal()
99
- - Getters/Setters: getName(), setName()
100
- - Boolean getters: isActive(), hasPermission()
101
-
102
- **Variables:**
103
- - camelCase: userName, projectList
104
- - Constants: UPPER_SNAKE_CASE: MAX_SIZE, DEFAULT_TIMEOUT
105
- - Private fields: _fieldName or fieldName?
106
- A) fieldName (no prefix)
107
- B) _fieldName (underscore prefix)
108
- C) mFieldName (m prefix, Android style)
109
-
110
- **Packages:**
111
- - lowercase: com.company.app.model
112
- - Singular or plural? model or models?
113
- A) Singular: model, controller
114
- B) Plural: models, controllers
115
-
116
- Your choices: __
117
- ```
118
-
119
- ---
120
-
121
- ## 5.4 Code Organization
122
-
123
- ```
124
- Code organization rules:
125
-
126
- **Class Structure Order:**
127
- 1. Static fields (constants)
128
- 2. Instance fields
129
- 3. Constructors
130
- 4. Static methods
131
- 5. Instance methods
132
- 6. Inner classes
133
-
134
- **Method Organization:**
135
- A) By functionality (all user-related methods together)
136
- B) By access level (public → protected → private)
137
- C) By alphabetical order
138
-
139
- Your preference: __
140
-
141
- **Imports:**
142
- A) ✅ Organize imports - Remove unused
143
- B) ✅ Group imports - java.*, javax.*, org.*, com.*
144
- C) ✅ No wildcard imports - Explicit imports only
145
- D) 🔄 Allow wildcards - import java.util.*
146
-
147
- **Comments:**
148
- A) ✅ Javadoc for public API
149
- B) ✅ Inline comments for complex logic
150
- C) ✅ TODO/FIXME markers
151
- D) ❌ Avoid obvious comments
152
-
153
- **File Organization:**
154
- - One public class per file?
155
- A) ✅ Yes - Standard practice
156
- B) ❌ No - Allow multiple classes
157
-
158
- - Inner classes?
159
- A) ✅ Yes - For closely related classes
160
- B) ❌ No - Separate files always
161
- ```
162
-
163
- ---
164
-
165
- ## 5.5 Best Practices
166
-
167
- ```
168
- Which best practices will you enforce?
169
-
170
- **General:**
171
- A) ✅ Immutability - Prefer final variables and immutable objects
172
- B) ✅ Null safety - Use Optional, avoid null returns
173
- C) ✅ Exception handling - Try-with-resources, specific exceptions
174
- D) ✅ Resource management - Close streams, connections
175
- E) ✅ Logging - Use logging framework, not System.out
176
-
177
- **UI Thread Safety:**
178
- A) ✅ Never block UI thread - Use background tasks
179
- B) ✅ Update UI on UI thread only - invokeLater, Platform.runLater
180
- C) ✅ Progress indicators - Show progress for long operations
181
-
182
- **Performance:**
183
- A) ✅ Lazy initialization - Create objects when needed
184
- B) ✅ Object pooling - Reuse expensive objects
185
- C) ✅ Cache results - Avoid redundant calculations
186
- D) ✅ Efficient collections - Choose right data structure
187
-
188
- **Security:**
189
- A) ✅ Input validation - Validate all user input
190
- B) ✅ SQL injection prevention - Use PreparedStatement
191
- C) ✅ Secure storage - Encrypt sensitive data
192
- D) ✅ Dependency scanning - Check for vulnerabilities
193
-
194
- **Testing:**
195
- A) ✅ Unit tests - Test business logic
196
- B) ✅ UI tests - TestFX (JavaFX), AssertJ-Swing (Swing)
197
- C) ✅ Integration tests - Database, file operations
198
- D) ✅ Code coverage - Aim for 70%+ coverage
199
-
200
- **Static Analysis:**
201
- A) ✅ Checkstyle - Code style enforcement
202
- B) ✅ PMD - Code quality rules
203
- C) ✅ SpotBugs - Bug detection
204
- D) ✅ SonarQube - Comprehensive analysis
205
-
206
- Your choices: __
207
- ```
208
-
209
- ---
210
-
211
- ### Phase 5 Output
212
-
213
- ```
214
- 📋 PHASE 5 SUMMARY:
215
-
216
- Java Version: [Java 17 LTS]
217
- Code Style: [Google Java Style Guide]
218
- IDE Formatter: [Eclipse Formatter]
219
- Naming Conventions:
220
- - Classes: PascalCase
221
- - Methods: camelCase
222
- - Variables: camelCase
223
- - Constants: UPPER_SNAKE_CASE
224
- - Interfaces: [IService / Service]
225
- Best Practices:
226
- - Immutability, null safety
227
- - UI thread safety
228
- - Performance optimization
229
- - Security measures
230
- - Testing strategy
231
- Static Analysis:
232
- - Checkstyle, PMD, SpotBugs
233
-
234
- Is this correct? (Yes/No)
235
- ```
236
-
237
- ---
238
-
239
- ### 📄 Generate Configuration Files
240
-
241
- **Generate Checkstyle configuration:**
242
-
243
- - `.checkstyle.xml` with Google style rules
244
-
245
- **Generate PMD configuration:**
246
-
247
- - `.pmd.xml` with code quality rules
248
-
249
- **Generate EditorConfig:**
250
-
251
- - `.editorconfig` for consistent formatting across IDEs
252
-
253
- **Update `docs/DEVELOPMENT.md`:**
254
-
255
- - Code style guide
256
- - Naming conventions
257
- - Best practices
258
- - Static analysis setup
259
-
260
- ---
261
-
262
- **Next Phase:** Phase 6 - Testing (10-15 min)
263
-
264
- Read: `.ai-flow/prompts/desktop/flow-build-phase-6.md`
265
-
266
- ---
267
-
268
- **Last Updated:** 2025-02-03
269
- **Version:** 1.0.0
1
+ ## PHASE 5: Code Standards (10-15 min)
2
+
3
+ > **Order for this phase:** 5.1 → 5.2 → 5.3 → 5.4 → 5.5
4
+
5
+ ### Objective
6
+
7
+ Define coding conventions, style guides, and best practices for Java desktop development.
8
+
9
+ ---
10
+
11
+ ## 5.1 Java Version & Features
12
+
13
+ ```
14
+ Which Java version are you targeting?
15
+
16
+ A) ☕ Java 8 (LTS) - Legacy support
17
+ - Lambda expressions, Streams
18
+ - java.time package
19
+ - End of free support: 2030
20
+
21
+ B) ☕ Java 11 (LTS) - Current minimum
22
+ - Modules, var keyword
23
+ - HTTP Client
24
+ - End of support: 2026
25
+
26
+ C) ☕ Java 17 (LTS) - Modern standard (recommended)
27
+ - Records, sealed classes
28
+ - Pattern matching
29
+ - End of support: 2029
30
+
31
+ D) ☕ Java 21 (LTS) - Latest LTS
32
+ - Virtual Threads (Project Loom)
33
+ - Sequenced Collections
34
+ - End of support: 2031
35
+
36
+ E) ☕ Java 22/23+ - Cutting edge
37
+ - Latest features, shorter support
38
+
39
+ Your choice: __
40
+
41
+ Modern Java features to use:
42
+ - ✅ Records (data classes)
43
+ - ✅ var keyword (local variables)
44
+ - ✅ Switch expressions
45
+ - ✅ Text blocks (multi-line strings)
46
+ - ✅ Pattern matching
47
+ - ✅ Virtual Threads (Java 21+)
48
+ ```
49
+
50
+ ---
51
+
52
+ ## 5.2 Code Style
53
+
54
+ ```
55
+ Which coding style guide will you follow?
56
+
57
+ A) 🏆 Google Java Style Guide
58
+ - 2 spaces indentation
59
+ - 100 char line length
60
+ - Enforced by Checkstyle
61
+
62
+ B) ☕ Oracle Java Conventions
63
+ - 4 spaces indentation
64
+ - Traditional Java style
65
+
66
+ C) 🎯 Sun Code Conventions
67
+ - Classic Java style
68
+ - Widely adopted
69
+
70
+ D) 🔧 Custom - Your own rules
71
+
72
+ Your choice: __
73
+
74
+ IDE Formatter:
75
+ A) Eclipse Formatter (Eclipse, NetBeans)
76
+ B) IntelliJ Formatter (IntelliJ IDEA)
77
+ C) google-java-format plugin
78
+ D) Spotless (Gradle/Maven plugin)
79
+
80
+ Your choice: __
81
+ ```
82
+
83
+ ---
84
+
85
+ ## 5.3 Naming Conventions
86
+
87
+ ```
88
+ Naming conventions (confirm or customize):
89
+
90
+ **Classes:**
91
+ - PascalCase: MainWindow, UserController
92
+ - Interfaces: IService or ServiceInterface?
93
+ A) IService (prefix)
94
+ B) ServiceInterface (suffix)
95
+ C) Service (no prefix/suffix)
96
+
97
+ **Methods:**
98
+ - camelCase: getUserById(), calculateTotal()
99
+ - Getters/Setters: getName(), setName()
100
+ - Boolean getters: isActive(), hasPermission()
101
+
102
+ **Variables:**
103
+ - camelCase: userName, projectList
104
+ - Constants: UPPER_SNAKE_CASE: MAX_SIZE, DEFAULT_TIMEOUT
105
+ - Private fields: _fieldName or fieldName?
106
+ A) fieldName (no prefix)
107
+ B) _fieldName (underscore prefix)
108
+ C) mFieldName (m prefix, Android style)
109
+
110
+ **Packages:**
111
+ - lowercase: com.company.app.model
112
+ - Singular or plural? model or models?
113
+ A) Singular: model, controller
114
+ B) Plural: models, controllers
115
+
116
+ Your choices: __
117
+ ```
118
+
119
+ ---
120
+
121
+ ## 5.4 Code Organization
122
+
123
+ ```
124
+ Code organization rules:
125
+
126
+ **Class Structure Order:**
127
+ 1. Static fields (constants)
128
+ 2. Instance fields
129
+ 3. Constructors
130
+ 4. Static methods
131
+ 5. Instance methods
132
+ 6. Inner classes
133
+
134
+ **Method Organization:**
135
+ A) By functionality (all user-related methods together)
136
+ B) By access level (public → protected → private)
137
+ C) By alphabetical order
138
+
139
+ Your preference: __
140
+
141
+ **Imports:**
142
+ A) ✅ Organize imports - Remove unused
143
+ B) ✅ Group imports - java.*, javax.*, org.*, com.*
144
+ C) ✅ No wildcard imports - Explicit imports only
145
+ D) 🔄 Allow wildcards - import java.util.*
146
+
147
+ **Comments:**
148
+ A) ✅ Javadoc for public API
149
+ B) ✅ Inline comments for complex logic
150
+ C) ✅ TODO/FIXME markers
151
+ D) ❌ Avoid obvious comments
152
+
153
+ **File Organization:**
154
+ - One public class per file?
155
+ A) ✅ Yes - Standard practice
156
+ B) ❌ No - Allow multiple classes
157
+
158
+ - Inner classes?
159
+ A) ✅ Yes - For closely related classes
160
+ B) ❌ No - Separate files always
161
+ ```
162
+
163
+ ---
164
+
165
+ ## 5.5 Best Practices
166
+
167
+ ```
168
+ Which best practices will you enforce?
169
+
170
+ **General:**
171
+ A) ✅ Immutability - Prefer final variables and immutable objects
172
+ B) ✅ Null safety - Use Optional, avoid null returns
173
+ C) ✅ Exception handling - Try-with-resources, specific exceptions
174
+ D) ✅ Resource management - Close streams, connections
175
+ E) ✅ Logging - Use logging framework, not System.out
176
+
177
+ **UI Thread Safety:**
178
+ A) ✅ Never block UI thread - Use background tasks
179
+ B) ✅ Update UI on UI thread only - invokeLater, Platform.runLater
180
+ C) ✅ Progress indicators - Show progress for long operations
181
+
182
+ **Performance:**
183
+ A) ✅ Lazy initialization - Create objects when needed
184
+ B) ✅ Object pooling - Reuse expensive objects
185
+ C) ✅ Cache results - Avoid redundant calculations
186
+ D) ✅ Efficient collections - Choose right data structure
187
+
188
+ **Security:**
189
+ A) ✅ Input validation - Validate all user input
190
+ B) ✅ SQL injection prevention - Use PreparedStatement
191
+ C) ✅ Secure storage - Encrypt sensitive data
192
+ D) ✅ Dependency scanning - Check for vulnerabilities
193
+
194
+ **Testing:**
195
+ A) ✅ Unit tests - Test business logic
196
+ B) ✅ UI tests - TestFX (JavaFX), AssertJ-Swing (Swing)
197
+ C) ✅ Integration tests - Database, file operations
198
+ D) ✅ Code coverage - Aim for 70%+ coverage
199
+
200
+ **Static Analysis:**
201
+ A) ✅ Checkstyle - Code style enforcement
202
+ B) ✅ PMD - Code quality rules
203
+ C) ✅ SpotBugs - Bug detection
204
+ D) ✅ SonarQube - Comprehensive analysis
205
+
206
+ Your choices: __
207
+ ```
208
+
209
+ ---
210
+
211
+ ### Phase 5 Output
212
+
213
+ ```
214
+ 📋 PHASE 5 SUMMARY:
215
+
216
+ Java Version: [Java 17 LTS]
217
+ Code Style: [Google Java Style Guide]
218
+ IDE Formatter: [Eclipse Formatter]
219
+ Naming Conventions:
220
+ - Classes: PascalCase
221
+ - Methods: camelCase
222
+ - Variables: camelCase
223
+ - Constants: UPPER_SNAKE_CASE
224
+ - Interfaces: [IService / Service]
225
+ Best Practices:
226
+ - Immutability, null safety
227
+ - UI thread safety
228
+ - Performance optimization
229
+ - Security measures
230
+ - Testing strategy
231
+ Static Analysis:
232
+ - Checkstyle, PMD, SpotBugs
233
+
234
+ Is this correct? (Yes/No)
235
+ ```
236
+
237
+ ---
238
+
239
+ ### 📄 Generate Configuration Files
240
+
241
+ **Generate Checkstyle configuration:**
242
+
243
+ - `.checkstyle.xml` with Google style rules
244
+
245
+ **Generate PMD configuration:**
246
+
247
+ - `.pmd.xml` with code quality rules
248
+
249
+ **Generate EditorConfig:**
250
+
251
+ - `.editorconfig` for consistent formatting across IDEs
252
+
253
+ **Update `docs/DEVELOPMENT.md`:**
254
+
255
+ - Code style guide
256
+ - Naming conventions
257
+ - Best practices
258
+ - Static analysis setup
259
+
260
+ ---
261
+
262
+ **Next Phase:** Phase 6 - Testing (10-15 min)
263
+
264
+ Read: `.ai-flow/prompts/desktop/flow-build-phase-6.md`
265
+
266
+ ---
267
+
268
+ **Last Updated:** 2025-02-03
269
+ **Version:** 1.0.0