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.
- package/LICENSE +21 -21
- package/README.md +573 -570
- package/package.json +74 -74
- package/prompts/backend/flow-build-phase-0.md +535 -535
- package/prompts/backend/flow-build-phase-1.md +626 -626
- package/prompts/backend/flow-build-phase-10.md +340 -340
- package/prompts/backend/flow-build-phase-2.md +573 -573
- package/prompts/backend/flow-build-phase-3.md +834 -834
- package/prompts/backend/flow-build-phase-4.md +554 -554
- package/prompts/backend/flow-build-phase-5.md +703 -703
- package/prompts/backend/flow-build-phase-6.md +524 -524
- package/prompts/backend/flow-build-phase-7.md +1001 -1001
- package/prompts/backend/flow-build-phase-8.md +1407 -1407
- package/prompts/backend/flow-build-phase-9.md +477 -477
- package/prompts/backend/flow-build.md +137 -137
- package/prompts/backend/flow-check-review.md +656 -20
- package/prompts/backend/flow-check-test.md +526 -14
- package/prompts/backend/flow-check.md +725 -67
- package/prompts/backend/flow-commit.md +88 -119
- package/prompts/backend/flow-docs-sync.md +354 -354
- package/prompts/backend/flow-finish.md +919 -0
- package/prompts/backend/flow-release.md +949 -0
- package/prompts/backend/flow-work-feature.md +61 -61
- package/prompts/backend/flow-work-fix.md +46 -46
- package/prompts/backend/flow-work-refactor.md +48 -48
- package/prompts/backend/flow-work-resume.md +34 -34
- package/prompts/backend/flow-work.md +1098 -1286
- package/prompts/desktop/flow-build-phase-0.md +359 -359
- package/prompts/desktop/flow-build-phase-1.md +295 -295
- package/prompts/desktop/flow-build-phase-10.md +357 -357
- package/prompts/desktop/flow-build-phase-2.md +282 -282
- package/prompts/desktop/flow-build-phase-3.md +291 -291
- package/prompts/desktop/flow-build-phase-4.md +308 -308
- package/prompts/desktop/flow-build-phase-5.md +269 -269
- package/prompts/desktop/flow-build-phase-6.md +350 -350
- package/prompts/desktop/flow-build-phase-7.md +297 -297
- package/prompts/desktop/flow-build-phase-8.md +541 -541
- package/prompts/desktop/flow-build-phase-9.md +439 -439
- package/prompts/desktop/flow-build.md +156 -156
- package/prompts/desktop/flow-check-review.md +656 -20
- package/prompts/desktop/flow-check-test.md +526 -14
- package/prompts/desktop/flow-check.md +725 -67
- package/prompts/desktop/flow-commit.md +88 -119
- package/prompts/desktop/flow-docs-sync.md +354 -354
- package/prompts/desktop/flow-finish.md +910 -0
- package/prompts/desktop/flow-release.md +662 -0
- package/prompts/desktop/flow-work-feature.md +61 -61
- package/prompts/desktop/flow-work-fix.md +46 -46
- package/prompts/desktop/flow-work-refactor.md +48 -48
- package/prompts/desktop/flow-work-resume.md +34 -34
- package/prompts/desktop/flow-work.md +1202 -1390
- package/prompts/frontend/flow-build-phase-0.md +425 -425
- package/prompts/frontend/flow-build-phase-1.md +626 -626
- package/prompts/frontend/flow-build-phase-10.md +33 -33
- package/prompts/frontend/flow-build-phase-2.md +573 -573
- package/prompts/frontend/flow-build-phase-3.md +782 -782
- package/prompts/frontend/flow-build-phase-4.md +554 -554
- package/prompts/frontend/flow-build-phase-5.md +703 -703
- package/prompts/frontend/flow-build-phase-6.md +524 -524
- package/prompts/frontend/flow-build-phase-7.md +1001 -1001
- package/prompts/frontend/flow-build-phase-8.md +872 -872
- package/prompts/frontend/flow-build-phase-9.md +94 -94
- package/prompts/frontend/flow-build.md +137 -137
- package/prompts/frontend/flow-check-review.md +656 -20
- package/prompts/frontend/flow-check-test.md +526 -14
- package/prompts/frontend/flow-check.md +725 -67
- package/prompts/frontend/flow-commit.md +88 -119
- package/prompts/frontend/flow-docs-sync.md +550 -550
- package/prompts/frontend/flow-finish.md +910 -0
- package/prompts/frontend/flow-release.md +519 -0
- package/prompts/frontend/flow-work-api.md +1540 -0
- package/prompts/frontend/flow-work-feature.md +61 -61
- package/prompts/frontend/flow-work-fix.md +38 -38
- package/prompts/frontend/flow-work-refactor.md +48 -48
- package/prompts/frontend/flow-work-resume.md +34 -34
- package/prompts/frontend/flow-work.md +1583 -1320
- package/prompts/mobile/flow-build-phase-0.md +425 -425
- package/prompts/mobile/flow-build-phase-1.md +626 -626
- package/prompts/mobile/flow-build-phase-10.md +32 -32
- package/prompts/mobile/flow-build-phase-2.md +573 -573
- package/prompts/mobile/flow-build-phase-3.md +782 -782
- package/prompts/mobile/flow-build-phase-4.md +554 -554
- package/prompts/mobile/flow-build-phase-5.md +703 -703
- package/prompts/mobile/flow-build-phase-6.md +524 -524
- package/prompts/mobile/flow-build-phase-7.md +1001 -1001
- package/prompts/mobile/flow-build-phase-8.md +888 -888
- package/prompts/mobile/flow-build-phase-9.md +90 -90
- package/prompts/mobile/flow-build.md +135 -135
- package/prompts/mobile/flow-check-review.md +656 -20
- package/prompts/mobile/flow-check-test.md +526 -14
- package/prompts/mobile/flow-check.md +725 -67
- package/prompts/mobile/flow-commit.md +88 -119
- package/prompts/mobile/flow-docs-sync.md +620 -620
- package/prompts/mobile/flow-finish.md +910 -0
- package/prompts/mobile/flow-release.md +751 -0
- package/prompts/mobile/flow-work-api.md +1493 -0
- package/prompts/mobile/flow-work-feature.md +61 -61
- package/prompts/mobile/flow-work-fix.md +46 -46
- package/prompts/mobile/flow-work-refactor.md +48 -48
- package/prompts/mobile/flow-work-resume.md +34 -34
- package/prompts/mobile/flow-work.md +1593 -1329
- package/prompts/shared/mermaid-guidelines.md +102 -102
- package/prompts/shared/scope-levels.md +114 -114
- package/prompts/shared/smart-skip-preflight.md +214 -214
- package/prompts/shared/story-points.md +55 -55
- package/prompts/shared/task-format.md +74 -74
- package/prompts/shared/task-summary-template.md +277 -277
- package/templates/AGENT.template.md +443 -443
- package/templates/backend/.clauderules.template +112 -112
- package/templates/backend/.cursorrules.template +102 -102
- package/templates/backend/README.template.md +2 -2
- package/templates/backend/ai-instructions.template.md +2 -2
- package/templates/backend/copilot-instructions.template.md +2 -2
- package/templates/backend/docs/api.template.md +320 -320
- package/templates/backend/docs/business-flows.template.md +97 -97
- package/templates/backend/docs/code-standards.template.md +2 -2
- package/templates/backend/docs/contributing.template.md +3 -3
- package/templates/backend/docs/data-model.template.md +520 -520
- package/templates/backend/docs/testing.template.md +2 -2
- package/templates/backend/project-brief.template.md +2 -2
- package/templates/backend/specs/configuration.template.md +2 -2
- package/templates/backend/specs/security.template.md +2 -2
- package/templates/desktop/.clauderules.template +112 -112
- package/templates/desktop/.cursorrules.template +102 -102
- package/templates/desktop/README.template.md +170 -170
- package/templates/desktop/ai-instructions.template.md +366 -366
- package/templates/desktop/copilot-instructions.template.md +140 -140
- package/templates/desktop/docs/docs/api.template.md +320 -320
- package/templates/desktop/docs/docs/architecture.template.md +724 -724
- package/templates/desktop/docs/docs/business-flows.template.md +102 -102
- package/templates/desktop/docs/docs/code-standards.template.md +792 -792
- package/templates/desktop/docs/docs/contributing.template.md +149 -149
- package/templates/desktop/docs/docs/data-model.template.md +520 -520
- package/templates/desktop/docs/docs/operations.template.md +720 -720
- package/templates/desktop/docs/docs/testing.template.md +722 -722
- package/templates/desktop/project-brief.template.md +150 -150
- package/templates/desktop/specs/specs/configuration.template.md +121 -121
- package/templates/desktop/specs/specs/security.template.md +392 -392
- package/templates/frontend/README.template.md +2 -2
- package/templates/frontend/ai-instructions.template.md +2 -2
- package/templates/frontend/docs/api-integration.template.md +362 -362
- package/templates/frontend/docs/components.template.md +2 -2
- package/templates/frontend/docs/error-handling.template.md +360 -360
- package/templates/frontend/docs/operations.template.md +107 -107
- package/templates/frontend/docs/performance.template.md +124 -124
- package/templates/frontend/docs/pwa.template.md +119 -119
- package/templates/frontend/docs/state-management.template.md +2 -2
- package/templates/frontend/docs/styling.template.md +2 -2
- package/templates/frontend/docs/testing.template.md +2 -2
- package/templates/frontend/project-brief.template.md +2 -2
- package/templates/frontend/specs/accessibility.template.md +95 -95
- package/templates/frontend/specs/configuration.template.md +2 -2
- package/templates/frontend/specs/security.template.md +175 -175
- package/templates/fullstack/README.template.md +252 -252
- package/templates/fullstack/ai-instructions.template.md +444 -444
- package/templates/fullstack/project-brief.template.md +157 -157
- package/templates/fullstack/specs/configuration.template.md +340 -340
- package/templates/mobile/README.template.md +167 -167
- package/templates/mobile/ai-instructions.template.md +196 -196
- package/templates/mobile/docs/app-store.template.md +135 -135
- package/templates/mobile/docs/architecture.template.md +63 -63
- package/templates/mobile/docs/native-features.template.md +94 -94
- package/templates/mobile/docs/navigation.template.md +59 -59
- package/templates/mobile/docs/offline-strategy.template.md +65 -65
- package/templates/mobile/docs/permissions.template.md +56 -56
- package/templates/mobile/docs/state-management.template.md +85 -85
- package/templates/mobile/docs/testing.template.md +109 -109
- package/templates/mobile/project-brief.template.md +69 -69
- package/templates/mobile/specs/build-configuration.template.md +91 -91
- package/templates/mobile/specs/deployment.template.md +92 -92
- package/templates/work.template.md +47 -47
|
@@ -1,541 +1,541 @@
|
|
|
1
|
-
## PHASE 8: Project Setup & Final Documentation (10-15 min)
|
|
2
|
-
|
|
3
|
-
> **🎯 SPECIAL PHASE:** This phase MUST be executed differently depending on project state.
|
|
4
|
-
|
|
5
|
-
### Objective
|
|
6
|
-
|
|
7
|
-
Initialize the project structure (if new) or finalize documentation (if existing).
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## 8.0 Project State Detection
|
|
12
|
-
|
|
13
|
-
**CRITICAL FIRST STEP - Detect Project State:**
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
Scan the project root for:
|
|
17
|
-
|
|
18
|
-
A) ✅ EXISTING Project Markers:
|
|
19
|
-
- NetBeans: nbproject/project.xml, build.xml
|
|
20
|
-
- Eclipse: .project, .classpath
|
|
21
|
-
- Maven: pom.xml with <dependencies>
|
|
22
|
-
- Gradle: build.gradle with dependencies
|
|
23
|
-
- Source code: src/ with .java files
|
|
24
|
-
- If ANY exist → EXISTING PROJECT
|
|
25
|
-
|
|
26
|
-
B) ❌ NEW Project Markers:
|
|
27
|
-
- Only .ai-flow/ directory exists
|
|
28
|
-
- No build files or source code
|
|
29
|
-
- Empty project directory
|
|
30
|
-
- If NONE of above exist → NEW PROJECT
|
|
31
|
-
|
|
32
|
-
DETECTED STATE: [EXISTING / NEW]
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## 8.1 EXISTING Project Path
|
|
38
|
-
|
|
39
|
-
**If project is EXISTING, execute this section:**
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
✅ Existing Desktop Project Detected
|
|
43
|
-
|
|
44
|
-
I've analyzed your existing Java desktop project and gathered all the documentation.
|
|
45
|
-
|
|
46
|
-
Now I'll finalize the documentation:
|
|
47
|
-
1. Validate all documentation is complete
|
|
48
|
-
2. Generate missing sections
|
|
49
|
-
3. Create final README.md
|
|
50
|
-
4. Generate .gitignore
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### 8.1.1 Validate Documentation
|
|
54
|
-
|
|
55
|
-
Check that all required documents exist:
|
|
56
|
-
|
|
57
|
-
- ✅ project-brief.md
|
|
58
|
-
- ✅ docs/ARCHITECTURE.md
|
|
59
|
-
- ✅ docs/DATABASE.md (if applicable)
|
|
60
|
-
- ✅ docs/DEVELOPMENT.md
|
|
61
|
-
- ✅ docs/DEPLOYMENT.md
|
|
62
|
-
|
|
63
|
-
### 8.1.2 Generate .gitignore
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
# Generated .gitignore for Desktop Java Project
|
|
67
|
-
|
|
68
|
-
# Build outputs
|
|
69
|
-
/target/
|
|
70
|
-
/build/
|
|
71
|
-
/dist/
|
|
72
|
-
/out/
|
|
73
|
-
|
|
74
|
-
# IDE
|
|
75
|
-
.idea/
|
|
76
|
-
*.iml
|
|
77
|
-
.vscode/
|
|
78
|
-
.settings/
|
|
79
|
-
.classpath
|
|
80
|
-
.project
|
|
81
|
-
nbproject/private/
|
|
82
|
-
build/
|
|
83
|
-
|
|
84
|
-
# NetBeans
|
|
85
|
-
nbproject/private/
|
|
86
|
-
nbbuild/
|
|
87
|
-
nbdist/
|
|
88
|
-
.nb-gradle/
|
|
89
|
-
|
|
90
|
-
# Eclipse
|
|
91
|
-
.metadata
|
|
92
|
-
bin/
|
|
93
|
-
tmp/
|
|
94
|
-
*.tmp
|
|
95
|
-
*.bak
|
|
96
|
-
|
|
97
|
-
# Package Files
|
|
98
|
-
*.jar
|
|
99
|
-
*.war
|
|
100
|
-
*.nar
|
|
101
|
-
*.ear
|
|
102
|
-
*.zip
|
|
103
|
-
*.tar.gz
|
|
104
|
-
*.rar
|
|
105
|
-
|
|
106
|
-
# Logs
|
|
107
|
-
*.log
|
|
108
|
-
logs/
|
|
109
|
-
|
|
110
|
-
# OS
|
|
111
|
-
.DS_Store
|
|
112
|
-
Thumbs.db
|
|
113
|
-
*~
|
|
114
|
-
|
|
115
|
-
# Database
|
|
116
|
-
*.db
|
|
117
|
-
*.sqlite
|
|
118
|
-
*.h2.db
|
|
119
|
-
|
|
120
|
-
# Keep .ai-flow but ignore work
|
|
121
|
-
.ai-flow/work/
|
|
122
|
-
.ai-flow/archive/
|
|
123
|
-
.ai-flow/cache/
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### 8.1.3 Generate README.md
|
|
127
|
-
|
|
128
|
-
Generate comprehensive README with:
|
|
129
|
-
|
|
130
|
-
- Project name and description
|
|
131
|
-
- Prerequisites (Java version, IDE)
|
|
132
|
-
- Build instructions (Maven/Gradle/Ant)
|
|
133
|
-
- Running the application
|
|
134
|
-
- Testing instructions
|
|
135
|
-
- Packaging instructions
|
|
136
|
-
- Contributing guidelines
|
|
137
|
-
- License
|
|
138
|
-
|
|
139
|
-
### 8.1.4 Final Validation
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
✅ Documentation complete!
|
|
143
|
-
|
|
144
|
-
Generated/Updated files:
|
|
145
|
-
- README.md
|
|
146
|
-
- .gitignore
|
|
147
|
-
- docs/ARCHITECTURE.md
|
|
148
|
-
- docs/DATABASE.md
|
|
149
|
-
- docs/DEVELOPMENT.md
|
|
150
|
-
- docs/DEPLOYMENT.md
|
|
151
|
-
|
|
152
|
-
Next steps:
|
|
153
|
-
1. Review the generated documentation
|
|
154
|
-
2. Optionally run Phase 9 for Implementation Roadmap
|
|
155
|
-
3. Optionally run Phase 10 for User Stories
|
|
156
|
-
|
|
157
|
-
Type "continue" to proceed to Phase 9, or "done" to finish.
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## 8.2 NEW Project Path
|
|
163
|
-
|
|
164
|
-
**If project is NEW, execute this section:**
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
✅ New Desktop Project Initialization
|
|
168
|
-
|
|
169
|
-
I'll set up a complete Java desktop project structure for you.
|
|
170
|
-
|
|
171
|
-
Based on your answers from previous phases:
|
|
172
|
-
- IDE: [NetBeans / Eclipse]
|
|
173
|
-
- UI Framework: [Swing / JavaFX / SWT]
|
|
174
|
-
- Build Tool: [Maven / Gradle / Ant]
|
|
175
|
-
- Java Version: [17]
|
|
176
|
-
|
|
177
|
-
Proceeding with project initialization...
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### 8.2.1 Detect Framework & Build Tool
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
Based on Phase 2 and Phase 3:
|
|
184
|
-
- UI Framework: [Swing / JavaFX / SWT]
|
|
185
|
-
- Build Tool: [Maven / Gradle / Ant]
|
|
186
|
-
- Architecture: [MVC / MVP / MVVM]
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### 8.2.2 Generate Project Structure
|
|
190
|
-
|
|
191
|
-
**For Maven (recommended):**
|
|
192
|
-
|
|
193
|
-
```
|
|
194
|
-
project-root/
|
|
195
|
-
├── pom.xml
|
|
196
|
-
├── src/
|
|
197
|
-
│ ├── main/
|
|
198
|
-
│ │ ├── java/
|
|
199
|
-
│ │ │ └── com/company/app/
|
|
200
|
-
│ │ │ ├── Main.java
|
|
201
|
-
│ │ │ ├── model/
|
|
202
|
-
│ │ │ ├── view/
|
|
203
|
-
│ │ │ ├── controller/
|
|
204
|
-
│ │ │ ├── service/
|
|
205
|
-
│ │ │ └── util/
|
|
206
|
-
│ │ └── resources/
|
|
207
|
-
│ │ ├── application.properties
|
|
208
|
-
│ │ ├── fxml/ (JavaFX)
|
|
209
|
-
│ │ ├── forms/ (Swing .form)
|
|
210
|
-
│ │ └── icons/
|
|
211
|
-
│ └── test/
|
|
212
|
-
│ ├── java/
|
|
213
|
-
│ │ └── com/company/app/
|
|
214
|
-
│ └── resources/
|
|
215
|
-
├── docs/
|
|
216
|
-
│ ├── ARCHITECTURE.md
|
|
217
|
-
│ ├── DATABASE.md
|
|
218
|
-
│ ├── DEVELOPMENT.md
|
|
219
|
-
│ └── DEPLOYMENT.md
|
|
220
|
-
├── scripts/
|
|
221
|
-
│ ├── build.sh
|
|
222
|
-
│ └── build.bat
|
|
223
|
-
├── README.md
|
|
224
|
-
├── .gitignore
|
|
225
|
-
├── CONTRIBUTING.md
|
|
226
|
-
└── LICENSE
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
**For Gradle:**
|
|
230
|
-
|
|
231
|
-
```
|
|
232
|
-
Similar structure with:
|
|
233
|
-
├── build.gradle (or build.gradle.kts)
|
|
234
|
-
├── settings.gradle
|
|
235
|
-
└── gradle/
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
**For Ant (NetBeans):**
|
|
239
|
-
|
|
240
|
-
```
|
|
241
|
-
project-root/
|
|
242
|
-
├── nbproject/
|
|
243
|
-
│ ├── project.xml
|
|
244
|
-
│ ├── project.properties
|
|
245
|
-
│ └── build-impl.xml
|
|
246
|
-
├── build.xml
|
|
247
|
-
├── manifest.mf
|
|
248
|
-
├── src/
|
|
249
|
-
│ └── com/company/app/
|
|
250
|
-
│ ├── Main.java
|
|
251
|
-
│ └── ...
|
|
252
|
-
├── lib/ (dependencies)
|
|
253
|
-
├── test/
|
|
254
|
-
├── dist/ (build output)
|
|
255
|
-
└── build/ (compiled classes)
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### 8.2.3 Generate pom.xml (Maven)
|
|
259
|
-
|
|
260
|
-
```xml
|
|
261
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
262
|
-
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
263
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
264
|
-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
|
265
|
-
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
266
|
-
<modelVersion>4.0.0</modelVersion>
|
|
267
|
-
|
|
268
|
-
<groupId>com.company</groupId>
|
|
269
|
-
<artifactId>myapp</artifactId>
|
|
270
|
-
<version>1.0.0</version>
|
|
271
|
-
<packaging>jar</packaging>
|
|
272
|
-
|
|
273
|
-
<name>MyApp</name>
|
|
274
|
-
<description>My Desktop Application</description>
|
|
275
|
-
|
|
276
|
-
<properties>
|
|
277
|
-
<maven.compiler.source>17</maven.compiler.source>
|
|
278
|
-
<maven.compiler.target>17</maven.compiler.target>
|
|
279
|
-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
280
|
-
|
|
281
|
-
<!-- Dependencies versions -->
|
|
282
|
-
<javafx.version>21.0.1</javafx.version>
|
|
283
|
-
<flatlaf.version>3.3</flatlaf.version>
|
|
284
|
-
<h2.version>2.2.224</h2.version>
|
|
285
|
-
<hibernate.version>6.4.1.Final</hibernate.version>
|
|
286
|
-
<junit.version>5.10.1</junit.version>
|
|
287
|
-
</properties>
|
|
288
|
-
|
|
289
|
-
<dependencies>
|
|
290
|
-
<!-- UI Framework (conditional on Phase 2 choice) -->
|
|
291
|
-
[IF JavaFX:]
|
|
292
|
-
<dependency>
|
|
293
|
-
<groupId>org.openjfx</groupId>
|
|
294
|
-
<artifactId>javafx-controls</artifactId>
|
|
295
|
-
<version>${javafx.version}</version>
|
|
296
|
-
</dependency>
|
|
297
|
-
<dependency>
|
|
298
|
-
<groupId>org.openjfx</groupId>
|
|
299
|
-
<artifactId>javafx-fxml</artifactId>
|
|
300
|
-
<version>${javafx.version}</version>
|
|
301
|
-
</dependency>
|
|
302
|
-
|
|
303
|
-
[IF Swing + FlatLaf:]
|
|
304
|
-
<dependency>
|
|
305
|
-
<groupId>com.formdev</groupId>
|
|
306
|
-
<artifactId>flatlaf</artifactId>
|
|
307
|
-
<version>${flatlaf.version}</version>
|
|
308
|
-
</dependency>
|
|
309
|
-
|
|
310
|
-
[IF SWT:]
|
|
311
|
-
<dependency>
|
|
312
|
-
<groupId>org.eclipse.platform</groupId>
|
|
313
|
-
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
|
|
314
|
-
<version>3.125.0</version>
|
|
315
|
-
</dependency>
|
|
316
|
-
|
|
317
|
-
<!-- Database (if Phase 4 specified) -->
|
|
318
|
-
[IF H2:]
|
|
319
|
-
<dependency>
|
|
320
|
-
<groupId>com.h2database</groupId>
|
|
321
|
-
<artifactId>h2</artifactId>
|
|
322
|
-
<version>${h2.version}</version>
|
|
323
|
-
</dependency>
|
|
324
|
-
|
|
325
|
-
[IF JPA + Hibernate:]
|
|
326
|
-
<dependency>
|
|
327
|
-
<groupId>org.hibernate.orm</groupId>
|
|
328
|
-
<artifactId>hibernate-core</artifactId>
|
|
329
|
-
<version>${hibernate.version}</version>
|
|
330
|
-
</dependency>
|
|
331
|
-
|
|
332
|
-
<!-- Testing -->
|
|
333
|
-
<dependency>
|
|
334
|
-
<groupId>org.junit.jupiter</groupId>
|
|
335
|
-
<artifactId>junit-jupiter</artifactId>
|
|
336
|
-
<version>${junit.version}</version>
|
|
337
|
-
<scope>test</scope>
|
|
338
|
-
</dependency>
|
|
339
|
-
<dependency>
|
|
340
|
-
<groupId>org.mockito</groupId>
|
|
341
|
-
<artifactId>mockito-core</artifactId>
|
|
342
|
-
<version>5.8.0</version>
|
|
343
|
-
<scope>test</scope>
|
|
344
|
-
</dependency>
|
|
345
|
-
</dependencies>
|
|
346
|
-
|
|
347
|
-
<build>
|
|
348
|
-
<plugins>
|
|
349
|
-
<plugin>
|
|
350
|
-
<groupId>org.apache.maven.plugins</groupId>
|
|
351
|
-
<artifactId>maven-compiler-plugin</artifactId>
|
|
352
|
-
<version>3.11.0</version>
|
|
353
|
-
</plugin>
|
|
354
|
-
<plugin>
|
|
355
|
-
<groupId>org.apache.maven.plugins</groupId>
|
|
356
|
-
<artifactId>maven-jar-plugin</artifactId>
|
|
357
|
-
<version>3.3.0</version>
|
|
358
|
-
<configuration>
|
|
359
|
-
<archive>
|
|
360
|
-
<manifest>
|
|
361
|
-
<mainClass>com.company.app.Main</mainClass>
|
|
362
|
-
</manifest>
|
|
363
|
-
</archive>
|
|
364
|
-
</configuration>
|
|
365
|
-
</plugin>
|
|
366
|
-
[IF JavaFX:]
|
|
367
|
-
<plugin>
|
|
368
|
-
<groupId>org.openjfx</groupId>
|
|
369
|
-
<artifactId>javafx-maven-plugin</artifactId>
|
|
370
|
-
<version>0.0.8</version>
|
|
371
|
-
<configuration>
|
|
372
|
-
<mainClass>com.company.app.Main</mainClass>
|
|
373
|
-
</configuration>
|
|
374
|
-
</plugin>
|
|
375
|
-
</plugins>
|
|
376
|
-
</build>
|
|
377
|
-
</project>
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
### 8.2.4 Generate Main.java
|
|
381
|
-
|
|
382
|
-
**For Swing:**
|
|
383
|
-
|
|
384
|
-
```java
|
|
385
|
-
package com.company.app;
|
|
386
|
-
|
|
387
|
-
import javax.swing.*;
|
|
388
|
-
import com.formdev.flatlaf.FlatLightLaf;
|
|
389
|
-
|
|
390
|
-
public class Main {
|
|
391
|
-
public static void main(String[] args) {
|
|
392
|
-
// Set Look and Feel
|
|
393
|
-
try {
|
|
394
|
-
UIManager.setLookAndFeel(new FlatLightLaf());
|
|
395
|
-
} catch (Exception ex) {
|
|
396
|
-
System.err.println("Failed to initialize FlatLaf");
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
// Launch UI on Event Dispatch Thread
|
|
400
|
-
SwingUtilities.invokeLater(() -> {
|
|
401
|
-
MainWindow window = new MainWindow();
|
|
402
|
-
window.setVisible(true);
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
**For JavaFX:**
|
|
409
|
-
|
|
410
|
-
```java
|
|
411
|
-
package com.company.app;
|
|
412
|
-
|
|
413
|
-
import javafx.application.Application;
|
|
414
|
-
import javafx.fxml.FXMLLoader;
|
|
415
|
-
import javafx.scene.Scene;
|
|
416
|
-
import javafx.stage.Stage;
|
|
417
|
-
|
|
418
|
-
public class Main extends Application {
|
|
419
|
-
@Override
|
|
420
|
-
public void start(Stage primaryStage) throws Exception {
|
|
421
|
-
FXMLLoader loader = new FXMLLoader(
|
|
422
|
-
getClass().getResource("/fxml/main.fxml")
|
|
423
|
-
);
|
|
424
|
-
Scene scene = new Scene(loader.load());
|
|
425
|
-
|
|
426
|
-
primaryStage.setTitle("MyApp");
|
|
427
|
-
primaryStage.setScene(scene);
|
|
428
|
-
primaryStage.show();
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
public static void main(String[] args) {
|
|
432
|
-
launch(args);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
**For SWT:**
|
|
438
|
-
|
|
439
|
-
```java
|
|
440
|
-
package com.company.app;
|
|
441
|
-
|
|
442
|
-
import org.eclipse.swt.widgets.Display;
|
|
443
|
-
import org.eclipse.swt.widgets.Shell;
|
|
444
|
-
|
|
445
|
-
public class Main {
|
|
446
|
-
public static void main(String[] args) {
|
|
447
|
-
Display display = new Display();
|
|
448
|
-
Shell shell = new Shell(display);
|
|
449
|
-
|
|
450
|
-
shell.setText("MyApp");
|
|
451
|
-
shell.setSize(800, 600);
|
|
452
|
-
shell.open();
|
|
453
|
-
|
|
454
|
-
while (!shell.isDisposed()) {
|
|
455
|
-
if (!display.readAndDispatch()) {
|
|
456
|
-
display.sleep();
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
display.dispose();
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
### 8.2.5 Generate Documentation
|
|
465
|
-
|
|
466
|
-
Generate all documentation files:
|
|
467
|
-
|
|
468
|
-
- README.md
|
|
469
|
-
- docs/ARCHITECTURE.md
|
|
470
|
-
- docs/DATABASE.md (if applicable)
|
|
471
|
-
- docs/DEVELOPMENT.md
|
|
472
|
-
- docs/DEPLOYMENT.md
|
|
473
|
-
- CONTRIBUTING.md
|
|
474
|
-
- .gitignore
|
|
475
|
-
|
|
476
|
-
### 8.2.6 Final Steps
|
|
477
|
-
|
|
478
|
-
```
|
|
479
|
-
✅ Project initialization complete!
|
|
480
|
-
|
|
481
|
-
Created structure:
|
|
482
|
-
- Maven/Gradle/Ant project
|
|
483
|
-
- Source directories
|
|
484
|
-
- Main entry point
|
|
485
|
-
- Build configuration
|
|
486
|
-
- Documentation
|
|
487
|
-
|
|
488
|
-
Next steps:
|
|
489
|
-
1. Import project in [NetBeans / Eclipse / IntelliJ]
|
|
490
|
-
2. Run: mvn clean compile (or gradle build, ant compile)
|
|
491
|
-
3. Test: mvn test
|
|
492
|
-
4. Run: mvn javafx:run (or java -jar target/myapp.jar)
|
|
493
|
-
|
|
494
|
-
Optionally:
|
|
495
|
-
- Phase 9: Generate Implementation Roadmap
|
|
496
|
-
- Phase 10: Generate User Stories
|
|
497
|
-
|
|
498
|
-
Type "continue" for Phase 9, or "done" to finish.
|
|
499
|
-
```
|
|
500
|
-
|
|
501
|
-
---
|
|
502
|
-
|
|
503
|
-
### Phase 8 Output
|
|
504
|
-
|
|
505
|
-
```
|
|
506
|
-
📋 PHASE 8 SUMMARY:
|
|
507
|
-
|
|
508
|
-
Project State: [EXISTING / NEW]
|
|
509
|
-
[IF NEW:]
|
|
510
|
-
- Project structure created
|
|
511
|
-
- Build file generated (pom.xml/build.gradle/build.xml)
|
|
512
|
-
- Main class generated
|
|
513
|
-
- Dependencies configured
|
|
514
|
-
|
|
515
|
-
[IF EXISTING:]
|
|
516
|
-
- Documentation validated
|
|
517
|
-
- .gitignore generated
|
|
518
|
-
- README.md updated
|
|
519
|
-
|
|
520
|
-
All documentation complete:
|
|
521
|
-
✅ README.md
|
|
522
|
-
✅ project-brief.md
|
|
523
|
-
✅ docs/ARCHITECTURE.md
|
|
524
|
-
✅ docs/DATABASE.md
|
|
525
|
-
✅ docs/DEVELOPMENT.md
|
|
526
|
-
✅ docs/DEPLOYMENT.md
|
|
527
|
-
✅ .gitignore
|
|
528
|
-
|
|
529
|
-
Ready to proceed? (Yes/No)
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
---
|
|
533
|
-
|
|
534
|
-
**Next Phase:** Phase 9 - Implementation Roadmap (optional)
|
|
535
|
-
|
|
536
|
-
Read: `.ai-flow/prompts/desktop/flow-build-phase-9.md`
|
|
537
|
-
|
|
538
|
-
---
|
|
539
|
-
|
|
540
|
-
**Last Updated:** 2025-02-03
|
|
541
|
-
**Version:** 1.0.0
|
|
1
|
+
## PHASE 8: Project Setup & Final Documentation (10-15 min)
|
|
2
|
+
|
|
3
|
+
> **🎯 SPECIAL PHASE:** This phase MUST be executed differently depending on project state.
|
|
4
|
+
|
|
5
|
+
### Objective
|
|
6
|
+
|
|
7
|
+
Initialize the project structure (if new) or finalize documentation (if existing).
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 8.0 Project State Detection
|
|
12
|
+
|
|
13
|
+
**CRITICAL FIRST STEP - Detect Project State:**
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Scan the project root for:
|
|
17
|
+
|
|
18
|
+
A) ✅ EXISTING Project Markers:
|
|
19
|
+
- NetBeans: nbproject/project.xml, build.xml
|
|
20
|
+
- Eclipse: .project, .classpath
|
|
21
|
+
- Maven: pom.xml with <dependencies>
|
|
22
|
+
- Gradle: build.gradle with dependencies
|
|
23
|
+
- Source code: src/ with .java files
|
|
24
|
+
- If ANY exist → EXISTING PROJECT
|
|
25
|
+
|
|
26
|
+
B) ❌ NEW Project Markers:
|
|
27
|
+
- Only .ai-flow/ directory exists
|
|
28
|
+
- No build files or source code
|
|
29
|
+
- Empty project directory
|
|
30
|
+
- If NONE of above exist → NEW PROJECT
|
|
31
|
+
|
|
32
|
+
DETECTED STATE: [EXISTING / NEW]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 8.1 EXISTING Project Path
|
|
38
|
+
|
|
39
|
+
**If project is EXISTING, execute this section:**
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
✅ Existing Desktop Project Detected
|
|
43
|
+
|
|
44
|
+
I've analyzed your existing Java desktop project and gathered all the documentation.
|
|
45
|
+
|
|
46
|
+
Now I'll finalize the documentation:
|
|
47
|
+
1. Validate all documentation is complete
|
|
48
|
+
2. Generate missing sections
|
|
49
|
+
3. Create final README.md
|
|
50
|
+
4. Generate .gitignore
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 8.1.1 Validate Documentation
|
|
54
|
+
|
|
55
|
+
Check that all required documents exist:
|
|
56
|
+
|
|
57
|
+
- ✅ project-brief.md
|
|
58
|
+
- ✅ docs/ARCHITECTURE.md
|
|
59
|
+
- ✅ docs/DATABASE.md (if applicable)
|
|
60
|
+
- ✅ docs/DEVELOPMENT.md
|
|
61
|
+
- ✅ docs/DEPLOYMENT.md
|
|
62
|
+
|
|
63
|
+
### 8.1.2 Generate .gitignore
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
# Generated .gitignore for Desktop Java Project
|
|
67
|
+
|
|
68
|
+
# Build outputs
|
|
69
|
+
/target/
|
|
70
|
+
/build/
|
|
71
|
+
/dist/
|
|
72
|
+
/out/
|
|
73
|
+
|
|
74
|
+
# IDE
|
|
75
|
+
.idea/
|
|
76
|
+
*.iml
|
|
77
|
+
.vscode/
|
|
78
|
+
.settings/
|
|
79
|
+
.classpath
|
|
80
|
+
.project
|
|
81
|
+
nbproject/private/
|
|
82
|
+
build/
|
|
83
|
+
|
|
84
|
+
# NetBeans
|
|
85
|
+
nbproject/private/
|
|
86
|
+
nbbuild/
|
|
87
|
+
nbdist/
|
|
88
|
+
.nb-gradle/
|
|
89
|
+
|
|
90
|
+
# Eclipse
|
|
91
|
+
.metadata
|
|
92
|
+
bin/
|
|
93
|
+
tmp/
|
|
94
|
+
*.tmp
|
|
95
|
+
*.bak
|
|
96
|
+
|
|
97
|
+
# Package Files
|
|
98
|
+
*.jar
|
|
99
|
+
*.war
|
|
100
|
+
*.nar
|
|
101
|
+
*.ear
|
|
102
|
+
*.zip
|
|
103
|
+
*.tar.gz
|
|
104
|
+
*.rar
|
|
105
|
+
|
|
106
|
+
# Logs
|
|
107
|
+
*.log
|
|
108
|
+
logs/
|
|
109
|
+
|
|
110
|
+
# OS
|
|
111
|
+
.DS_Store
|
|
112
|
+
Thumbs.db
|
|
113
|
+
*~
|
|
114
|
+
|
|
115
|
+
# Database
|
|
116
|
+
*.db
|
|
117
|
+
*.sqlite
|
|
118
|
+
*.h2.db
|
|
119
|
+
|
|
120
|
+
# Keep .ai-flow but ignore work
|
|
121
|
+
.ai-flow/work/
|
|
122
|
+
.ai-flow/archive/
|
|
123
|
+
.ai-flow/cache/
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 8.1.3 Generate README.md
|
|
127
|
+
|
|
128
|
+
Generate comprehensive README with:
|
|
129
|
+
|
|
130
|
+
- Project name and description
|
|
131
|
+
- Prerequisites (Java version, IDE)
|
|
132
|
+
- Build instructions (Maven/Gradle/Ant)
|
|
133
|
+
- Running the application
|
|
134
|
+
- Testing instructions
|
|
135
|
+
- Packaging instructions
|
|
136
|
+
- Contributing guidelines
|
|
137
|
+
- License
|
|
138
|
+
|
|
139
|
+
### 8.1.4 Final Validation
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
✅ Documentation complete!
|
|
143
|
+
|
|
144
|
+
Generated/Updated files:
|
|
145
|
+
- README.md
|
|
146
|
+
- .gitignore
|
|
147
|
+
- docs/ARCHITECTURE.md
|
|
148
|
+
- docs/DATABASE.md
|
|
149
|
+
- docs/DEVELOPMENT.md
|
|
150
|
+
- docs/DEPLOYMENT.md
|
|
151
|
+
|
|
152
|
+
Next steps:
|
|
153
|
+
1. Review the generated documentation
|
|
154
|
+
2. Optionally run Phase 9 for Implementation Roadmap
|
|
155
|
+
3. Optionally run Phase 10 for User Stories
|
|
156
|
+
|
|
157
|
+
Type "continue" to proceed to Phase 9, or "done" to finish.
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 8.2 NEW Project Path
|
|
163
|
+
|
|
164
|
+
**If project is NEW, execute this section:**
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
✅ New Desktop Project Initialization
|
|
168
|
+
|
|
169
|
+
I'll set up a complete Java desktop project structure for you.
|
|
170
|
+
|
|
171
|
+
Based on your answers from previous phases:
|
|
172
|
+
- IDE: [NetBeans / Eclipse]
|
|
173
|
+
- UI Framework: [Swing / JavaFX / SWT]
|
|
174
|
+
- Build Tool: [Maven / Gradle / Ant]
|
|
175
|
+
- Java Version: [17]
|
|
176
|
+
|
|
177
|
+
Proceeding with project initialization...
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### 8.2.1 Detect Framework & Build Tool
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
Based on Phase 2 and Phase 3:
|
|
184
|
+
- UI Framework: [Swing / JavaFX / SWT]
|
|
185
|
+
- Build Tool: [Maven / Gradle / Ant]
|
|
186
|
+
- Architecture: [MVC / MVP / MVVM]
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### 8.2.2 Generate Project Structure
|
|
190
|
+
|
|
191
|
+
**For Maven (recommended):**
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
project-root/
|
|
195
|
+
├── pom.xml
|
|
196
|
+
├── src/
|
|
197
|
+
│ ├── main/
|
|
198
|
+
│ │ ├── java/
|
|
199
|
+
│ │ │ └── com/company/app/
|
|
200
|
+
│ │ │ ├── Main.java
|
|
201
|
+
│ │ │ ├── model/
|
|
202
|
+
│ │ │ ├── view/
|
|
203
|
+
│ │ │ ├── controller/
|
|
204
|
+
│ │ │ ├── service/
|
|
205
|
+
│ │ │ └── util/
|
|
206
|
+
│ │ └── resources/
|
|
207
|
+
│ │ ├── application.properties
|
|
208
|
+
│ │ ├── fxml/ (JavaFX)
|
|
209
|
+
│ │ ├── forms/ (Swing .form)
|
|
210
|
+
│ │ └── icons/
|
|
211
|
+
│ └── test/
|
|
212
|
+
│ ├── java/
|
|
213
|
+
│ │ └── com/company/app/
|
|
214
|
+
│ └── resources/
|
|
215
|
+
├── docs/
|
|
216
|
+
│ ├── ARCHITECTURE.md
|
|
217
|
+
│ ├── DATABASE.md
|
|
218
|
+
│ ├── DEVELOPMENT.md
|
|
219
|
+
│ └── DEPLOYMENT.md
|
|
220
|
+
├── scripts/
|
|
221
|
+
│ ├── build.sh
|
|
222
|
+
│ └── build.bat
|
|
223
|
+
├── README.md
|
|
224
|
+
├── .gitignore
|
|
225
|
+
├── CONTRIBUTING.md
|
|
226
|
+
└── LICENSE
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**For Gradle:**
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
Similar structure with:
|
|
233
|
+
├── build.gradle (or build.gradle.kts)
|
|
234
|
+
├── settings.gradle
|
|
235
|
+
└── gradle/
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**For Ant (NetBeans):**
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
project-root/
|
|
242
|
+
├── nbproject/
|
|
243
|
+
│ ├── project.xml
|
|
244
|
+
│ ├── project.properties
|
|
245
|
+
│ └── build-impl.xml
|
|
246
|
+
├── build.xml
|
|
247
|
+
├── manifest.mf
|
|
248
|
+
├── src/
|
|
249
|
+
│ └── com/company/app/
|
|
250
|
+
│ ├── Main.java
|
|
251
|
+
│ └── ...
|
|
252
|
+
├── lib/ (dependencies)
|
|
253
|
+
├── test/
|
|
254
|
+
├── dist/ (build output)
|
|
255
|
+
└── build/ (compiled classes)
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### 8.2.3 Generate pom.xml (Maven)
|
|
259
|
+
|
|
260
|
+
```xml
|
|
261
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
262
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
263
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
264
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
|
265
|
+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
266
|
+
<modelVersion>4.0.0</modelVersion>
|
|
267
|
+
|
|
268
|
+
<groupId>com.company</groupId>
|
|
269
|
+
<artifactId>myapp</artifactId>
|
|
270
|
+
<version>1.0.0</version>
|
|
271
|
+
<packaging>jar</packaging>
|
|
272
|
+
|
|
273
|
+
<name>MyApp</name>
|
|
274
|
+
<description>My Desktop Application</description>
|
|
275
|
+
|
|
276
|
+
<properties>
|
|
277
|
+
<maven.compiler.source>17</maven.compiler.source>
|
|
278
|
+
<maven.compiler.target>17</maven.compiler.target>
|
|
279
|
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
280
|
+
|
|
281
|
+
<!-- Dependencies versions -->
|
|
282
|
+
<javafx.version>21.0.1</javafx.version>
|
|
283
|
+
<flatlaf.version>3.3</flatlaf.version>
|
|
284
|
+
<h2.version>2.2.224</h2.version>
|
|
285
|
+
<hibernate.version>6.4.1.Final</hibernate.version>
|
|
286
|
+
<junit.version>5.10.1</junit.version>
|
|
287
|
+
</properties>
|
|
288
|
+
|
|
289
|
+
<dependencies>
|
|
290
|
+
<!-- UI Framework (conditional on Phase 2 choice) -->
|
|
291
|
+
[IF JavaFX:]
|
|
292
|
+
<dependency>
|
|
293
|
+
<groupId>org.openjfx</groupId>
|
|
294
|
+
<artifactId>javafx-controls</artifactId>
|
|
295
|
+
<version>${javafx.version}</version>
|
|
296
|
+
</dependency>
|
|
297
|
+
<dependency>
|
|
298
|
+
<groupId>org.openjfx</groupId>
|
|
299
|
+
<artifactId>javafx-fxml</artifactId>
|
|
300
|
+
<version>${javafx.version}</version>
|
|
301
|
+
</dependency>
|
|
302
|
+
|
|
303
|
+
[IF Swing + FlatLaf:]
|
|
304
|
+
<dependency>
|
|
305
|
+
<groupId>com.formdev</groupId>
|
|
306
|
+
<artifactId>flatlaf</artifactId>
|
|
307
|
+
<version>${flatlaf.version}</version>
|
|
308
|
+
</dependency>
|
|
309
|
+
|
|
310
|
+
[IF SWT:]
|
|
311
|
+
<dependency>
|
|
312
|
+
<groupId>org.eclipse.platform</groupId>
|
|
313
|
+
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
|
|
314
|
+
<version>3.125.0</version>
|
|
315
|
+
</dependency>
|
|
316
|
+
|
|
317
|
+
<!-- Database (if Phase 4 specified) -->
|
|
318
|
+
[IF H2:]
|
|
319
|
+
<dependency>
|
|
320
|
+
<groupId>com.h2database</groupId>
|
|
321
|
+
<artifactId>h2</artifactId>
|
|
322
|
+
<version>${h2.version}</version>
|
|
323
|
+
</dependency>
|
|
324
|
+
|
|
325
|
+
[IF JPA + Hibernate:]
|
|
326
|
+
<dependency>
|
|
327
|
+
<groupId>org.hibernate.orm</groupId>
|
|
328
|
+
<artifactId>hibernate-core</artifactId>
|
|
329
|
+
<version>${hibernate.version}</version>
|
|
330
|
+
</dependency>
|
|
331
|
+
|
|
332
|
+
<!-- Testing -->
|
|
333
|
+
<dependency>
|
|
334
|
+
<groupId>org.junit.jupiter</groupId>
|
|
335
|
+
<artifactId>junit-jupiter</artifactId>
|
|
336
|
+
<version>${junit.version}</version>
|
|
337
|
+
<scope>test</scope>
|
|
338
|
+
</dependency>
|
|
339
|
+
<dependency>
|
|
340
|
+
<groupId>org.mockito</groupId>
|
|
341
|
+
<artifactId>mockito-core</artifactId>
|
|
342
|
+
<version>5.8.0</version>
|
|
343
|
+
<scope>test</scope>
|
|
344
|
+
</dependency>
|
|
345
|
+
</dependencies>
|
|
346
|
+
|
|
347
|
+
<build>
|
|
348
|
+
<plugins>
|
|
349
|
+
<plugin>
|
|
350
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
351
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
|
352
|
+
<version>3.11.0</version>
|
|
353
|
+
</plugin>
|
|
354
|
+
<plugin>
|
|
355
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
356
|
+
<artifactId>maven-jar-plugin</artifactId>
|
|
357
|
+
<version>3.3.0</version>
|
|
358
|
+
<configuration>
|
|
359
|
+
<archive>
|
|
360
|
+
<manifest>
|
|
361
|
+
<mainClass>com.company.app.Main</mainClass>
|
|
362
|
+
</manifest>
|
|
363
|
+
</archive>
|
|
364
|
+
</configuration>
|
|
365
|
+
</plugin>
|
|
366
|
+
[IF JavaFX:]
|
|
367
|
+
<plugin>
|
|
368
|
+
<groupId>org.openjfx</groupId>
|
|
369
|
+
<artifactId>javafx-maven-plugin</artifactId>
|
|
370
|
+
<version>0.0.8</version>
|
|
371
|
+
<configuration>
|
|
372
|
+
<mainClass>com.company.app.Main</mainClass>
|
|
373
|
+
</configuration>
|
|
374
|
+
</plugin>
|
|
375
|
+
</plugins>
|
|
376
|
+
</build>
|
|
377
|
+
</project>
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### 8.2.4 Generate Main.java
|
|
381
|
+
|
|
382
|
+
**For Swing:**
|
|
383
|
+
|
|
384
|
+
```java
|
|
385
|
+
package com.company.app;
|
|
386
|
+
|
|
387
|
+
import javax.swing.*;
|
|
388
|
+
import com.formdev.flatlaf.FlatLightLaf;
|
|
389
|
+
|
|
390
|
+
public class Main {
|
|
391
|
+
public static void main(String[] args) {
|
|
392
|
+
// Set Look and Feel
|
|
393
|
+
try {
|
|
394
|
+
UIManager.setLookAndFeel(new FlatLightLaf());
|
|
395
|
+
} catch (Exception ex) {
|
|
396
|
+
System.err.println("Failed to initialize FlatLaf");
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// Launch UI on Event Dispatch Thread
|
|
400
|
+
SwingUtilities.invokeLater(() -> {
|
|
401
|
+
MainWindow window = new MainWindow();
|
|
402
|
+
window.setVisible(true);
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**For JavaFX:**
|
|
409
|
+
|
|
410
|
+
```java
|
|
411
|
+
package com.company.app;
|
|
412
|
+
|
|
413
|
+
import javafx.application.Application;
|
|
414
|
+
import javafx.fxml.FXMLLoader;
|
|
415
|
+
import javafx.scene.Scene;
|
|
416
|
+
import javafx.stage.Stage;
|
|
417
|
+
|
|
418
|
+
public class Main extends Application {
|
|
419
|
+
@Override
|
|
420
|
+
public void start(Stage primaryStage) throws Exception {
|
|
421
|
+
FXMLLoader loader = new FXMLLoader(
|
|
422
|
+
getClass().getResource("/fxml/main.fxml")
|
|
423
|
+
);
|
|
424
|
+
Scene scene = new Scene(loader.load());
|
|
425
|
+
|
|
426
|
+
primaryStage.setTitle("MyApp");
|
|
427
|
+
primaryStage.setScene(scene);
|
|
428
|
+
primaryStage.show();
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
public static void main(String[] args) {
|
|
432
|
+
launch(args);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
**For SWT:**
|
|
438
|
+
|
|
439
|
+
```java
|
|
440
|
+
package com.company.app;
|
|
441
|
+
|
|
442
|
+
import org.eclipse.swt.widgets.Display;
|
|
443
|
+
import org.eclipse.swt.widgets.Shell;
|
|
444
|
+
|
|
445
|
+
public class Main {
|
|
446
|
+
public static void main(String[] args) {
|
|
447
|
+
Display display = new Display();
|
|
448
|
+
Shell shell = new Shell(display);
|
|
449
|
+
|
|
450
|
+
shell.setText("MyApp");
|
|
451
|
+
shell.setSize(800, 600);
|
|
452
|
+
shell.open();
|
|
453
|
+
|
|
454
|
+
while (!shell.isDisposed()) {
|
|
455
|
+
if (!display.readAndDispatch()) {
|
|
456
|
+
display.sleep();
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
display.dispose();
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
### 8.2.5 Generate Documentation
|
|
465
|
+
|
|
466
|
+
Generate all documentation files:
|
|
467
|
+
|
|
468
|
+
- README.md
|
|
469
|
+
- docs/ARCHITECTURE.md
|
|
470
|
+
- docs/DATABASE.md (if applicable)
|
|
471
|
+
- docs/DEVELOPMENT.md
|
|
472
|
+
- docs/DEPLOYMENT.md
|
|
473
|
+
- CONTRIBUTING.md
|
|
474
|
+
- .gitignore
|
|
475
|
+
|
|
476
|
+
### 8.2.6 Final Steps
|
|
477
|
+
|
|
478
|
+
```
|
|
479
|
+
✅ Project initialization complete!
|
|
480
|
+
|
|
481
|
+
Created structure:
|
|
482
|
+
- Maven/Gradle/Ant project
|
|
483
|
+
- Source directories
|
|
484
|
+
- Main entry point
|
|
485
|
+
- Build configuration
|
|
486
|
+
- Documentation
|
|
487
|
+
|
|
488
|
+
Next steps:
|
|
489
|
+
1. Import project in [NetBeans / Eclipse / IntelliJ]
|
|
490
|
+
2. Run: mvn clean compile (or gradle build, ant compile)
|
|
491
|
+
3. Test: mvn test
|
|
492
|
+
4. Run: mvn javafx:run (or java -jar target/myapp.jar)
|
|
493
|
+
|
|
494
|
+
Optionally:
|
|
495
|
+
- Phase 9: Generate Implementation Roadmap
|
|
496
|
+
- Phase 10: Generate User Stories
|
|
497
|
+
|
|
498
|
+
Type "continue" for Phase 9, or "done" to finish.
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
### Phase 8 Output
|
|
504
|
+
|
|
505
|
+
```
|
|
506
|
+
📋 PHASE 8 SUMMARY:
|
|
507
|
+
|
|
508
|
+
Project State: [EXISTING / NEW]
|
|
509
|
+
[IF NEW:]
|
|
510
|
+
- Project structure created
|
|
511
|
+
- Build file generated (pom.xml/build.gradle/build.xml)
|
|
512
|
+
- Main class generated
|
|
513
|
+
- Dependencies configured
|
|
514
|
+
|
|
515
|
+
[IF EXISTING:]
|
|
516
|
+
- Documentation validated
|
|
517
|
+
- .gitignore generated
|
|
518
|
+
- README.md updated
|
|
519
|
+
|
|
520
|
+
All documentation complete:
|
|
521
|
+
✅ README.md
|
|
522
|
+
✅ project-brief.md
|
|
523
|
+
✅ docs/ARCHITECTURE.md
|
|
524
|
+
✅ docs/DATABASE.md
|
|
525
|
+
✅ docs/DEVELOPMENT.md
|
|
526
|
+
✅ docs/DEPLOYMENT.md
|
|
527
|
+
✅ .gitignore
|
|
528
|
+
|
|
529
|
+
Ready to proceed? (Yes/No)
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
---
|
|
533
|
+
|
|
534
|
+
**Next Phase:** Phase 9 - Implementation Roadmap (optional)
|
|
535
|
+
|
|
536
|
+
Read: `.ai-flow/prompts/desktop/flow-build-phase-9.md`
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
540
|
+
**Last Updated:** 2025-02-03
|
|
541
|
+
**Version:** 1.0.0
|