speccrew 0.7.9 → 0.7.11
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/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-FASTAPI.md +23 -23
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-JAVA.md +23 -23
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-NET.md +23 -23
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE.md +23 -23
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/workflow.agentflow.xml +9 -5
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +88 -2
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +43 -7
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-DESKTOP.md +46 -46
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-ELECTRON.md +51 -51
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MINIAPP.md +48 -48
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MOBILE.md +42 -42
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI.md +47 -47
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/workflow.agentflow.xml +10 -1
- package/package.json +1 -1
package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js
CHANGED
|
@@ -63,13 +63,25 @@ function toRelativePath(absolutePath, projectRoot) {
|
|
|
63
63
|
return normalizedAbs;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
// Generate unique feature ID from source path
|
|
67
|
+
// Converts path separators to hyphens, removes extension
|
|
68
|
+
// e.g., 'src/views/bpm/form/data.ts' -> 'src-views-bpm-form-data'
|
|
69
|
+
// e.g., 'ruoyi-fastapi-app/src/pages/common/agreement/index.vue' -> 'ruoyi-fastapi-app-src-pages-common-agreement-index'
|
|
70
|
+
function generateFeatureId(relativeSourcePath) {
|
|
71
|
+
// Remove file extension
|
|
72
|
+
const pathWithoutExt = relativeSourcePath.replace(/\.[^.]+$/, '');
|
|
73
|
+
|
|
74
|
+
// Replace path separators with hyphens
|
|
75
|
+
const id = pathWithoutExt.replace(/\//g, '-').replace(/\\/g, '-');
|
|
76
|
+
|
|
77
|
+
return id;
|
|
78
|
+
}
|
|
79
|
+
|
|
66
80
|
// Generate document path for a feature
|
|
67
|
-
// Format: speccrew-workspace/knowledges/bizs/{platformId}/{module}/{subpath}/{
|
|
81
|
+
// Format: speccrew-workspace/knowledges/bizs/{platformId}/{module}/{subpath}/{uniqueName}.md
|
|
82
|
+
// The documentPath must be unique to avoid overwriting
|
|
68
83
|
function generateDocumentPath(platformId, module, sourcePath, projectRoot) {
|
|
69
|
-
//
|
|
70
|
-
const basename = path.basename(sourcePath, path.extname(sourcePath));
|
|
71
|
-
|
|
72
|
-
// Get directory relative to module root
|
|
84
|
+
// Get the relative path from project root
|
|
73
85
|
const relativePath = toRelativePath(sourcePath, projectRoot);
|
|
74
86
|
|
|
75
87
|
// Parse the source path to extract module and subpath
|
|
@@ -92,6 +104,22 @@ function generateDocumentPath(platformId, module, sourcePath, projectRoot) {
|
|
|
92
104
|
subpath = pathParts.slice(moduleIndex + 1, pathParts.length - 1).join('/');
|
|
93
105
|
}
|
|
94
106
|
|
|
107
|
+
// Extract filename without extension
|
|
108
|
+
const basename = path.basename(sourcePath, path.extname(sourcePath));
|
|
109
|
+
|
|
110
|
+
// Generate unique document name to avoid collisions
|
|
111
|
+
// Use the path after module to create a unique name
|
|
112
|
+
let uniqueDocName;
|
|
113
|
+
if (moduleIndex >= 0 && moduleIndex < pathParts.length - 1) {
|
|
114
|
+
// Get all path parts after module (excluding extension)
|
|
115
|
+
const pathAfterModule = pathParts.slice(moduleIndex + 1);
|
|
116
|
+
// Join with hyphens to create unique name
|
|
117
|
+
uniqueDocName = pathAfterModule.join('-').replace(/\.[^.]+$/, '');
|
|
118
|
+
} else {
|
|
119
|
+
// Fallback: use basename
|
|
120
|
+
uniqueDocName = basename;
|
|
121
|
+
}
|
|
122
|
+
|
|
95
123
|
// Construct document path using platformId (which follows {platformType}-{techStack} format)
|
|
96
124
|
// e.g., backend-fastapi, web-vue3, mobile-uniapp
|
|
97
125
|
const docPathParts = ['speccrew-workspace', 'knowledges', 'bizs', platformId, module];
|
|
@@ -100,7 +128,7 @@ function generateDocumentPath(platformId, module, sourcePath, projectRoot) {
|
|
|
100
128
|
docPathParts.push(subpath);
|
|
101
129
|
}
|
|
102
130
|
|
|
103
|
-
docPathParts.push(`${
|
|
131
|
+
docPathParts.push(`${uniqueDocName}.md`);
|
|
104
132
|
|
|
105
133
|
return docPathParts.join('/');
|
|
106
134
|
}
|
|
@@ -203,10 +231,14 @@ function main() {
|
|
|
203
231
|
const relativeSourcePath = toRelativePath(sourceFile, projectRoot);
|
|
204
232
|
const fileName = path.basename(sourceFile, path.extname(sourceFile));
|
|
205
233
|
|
|
206
|
-
// Generate
|
|
234
|
+
// Generate unique feature ID based on full relative path
|
|
235
|
+
const featureId = generateFeatureId(relativeSourcePath);
|
|
236
|
+
|
|
237
|
+
// Generate document path using platformId (now with unique filename)
|
|
207
238
|
const documentPath = generateDocumentPath(platformId, moduleName, sourceFile, projectRoot);
|
|
208
239
|
|
|
209
240
|
features.push({
|
|
241
|
+
id: featureId,
|
|
210
242
|
fileName: fileName,
|
|
211
243
|
sourcePath: relativeSourcePath,
|
|
212
244
|
documentPath: documentPath,
|
|
@@ -227,6 +259,9 @@ function main() {
|
|
|
227
259
|
});
|
|
228
260
|
}
|
|
229
261
|
|
|
262
|
+
// Determine analysis method based on platform type
|
|
263
|
+
const analysisMethod = platformType === 'backend' ? 'api-based' : 'ui-based';
|
|
264
|
+
|
|
230
265
|
// Build output JSON
|
|
231
266
|
const outputData = {
|
|
232
267
|
platformName: platformName,
|
|
@@ -235,6 +270,7 @@ function main() {
|
|
|
235
270
|
platformId: platformId,
|
|
236
271
|
sourcePath: sourceRoot,
|
|
237
272
|
techStack: techStack,
|
|
273
|
+
analysisMethod: analysisMethod,
|
|
238
274
|
modules: modules,
|
|
239
275
|
totalFiles: features.length,
|
|
240
276
|
analyzedCount: 0,
|
|
@@ -78,21 +78,21 @@ source-path: {sourcePath}
|
|
|
78
78
|
|
|
79
79
|
| Area | Element | Control | Description | Interaction | Source Link |
|
|
80
80
|
|------|---------|---------|-------------|-------------|-------------|
|
|
81
|
-
| Menu | File Menu | MenuStrip | {Application menu} | Click | [Source](
|
|
82
|
-
| Toolbar | New Button | ToolStripButton | {Create new} | Click | [Source](
|
|
83
|
-
| Tree | Navigation | TreeView | {Navigate sections} | NodeClick | [Source](
|
|
84
|
-
| Grid | Data Grid | DataGridView | {Display data} | CellClick/DoubleClick | [Source](
|
|
85
|
-
| Status | Status Label | StatusStrip | {Show status} | - | [Source](
|
|
81
|
+
| Menu | File Menu | MenuStrip | {Application menu} | Click | [Source](../../../../../../{sourcePath}) |
|
|
82
|
+
| Toolbar | New Button | ToolStripButton | {Create new} | Click | [Source](../../../../../../{sourcePath}) |
|
|
83
|
+
| Tree | Navigation | TreeView | {Navigate sections} | NodeClick | [Source](../../../../../../{sourcePath}) |
|
|
84
|
+
| Grid | Data Grid | DataGridView | {Display data} | CellClick/DoubleClick | [Source](../../../../../../{sourcePath}) |
|
|
85
|
+
| Status | Status Label | StatusStrip | {Show status} | - | [Source](../../../../../../{sourcePath}) |
|
|
86
86
|
|
|
87
87
|
**Desktop-Specific Interactions:**
|
|
88
88
|
|
|
89
89
|
| Interaction | Action | Description | Source |
|
|
90
90
|
|-------------|--------|-------------|--------|
|
|
91
|
-
| Click | Select/Activate | Mouse click | [Source](
|
|
92
|
-
| DoubleClick | Open/Edit | Double click row | [Source](
|
|
93
|
-
| RightClick | Context Menu | Show context menu | [Source](
|
|
94
|
-
| DragDrop | Reorder | Drag and drop items | [Source](
|
|
95
|
-
| Keyboard | Shortcut | Ctrl+S, Ctrl+N, etc. | [Source](
|
|
91
|
+
| Click | Select/Activate | Mouse click | [Source](../../../../../../{sourcePath}) |
|
|
92
|
+
| DoubleClick | Open/Edit | Double click row | [Source](../../../../../../{sourcePath}) |
|
|
93
|
+
| RightClick | Context Menu | Show context menu | [Source](../../../../../../{sourcePath}) |
|
|
94
|
+
| DragDrop | Reorder | Drag and drop items | [Source](../../../../../../{sourcePath}) |
|
|
95
|
+
| Keyboard | Shortcut | Ctrl+S, Ctrl+N, etc. | [Source](../../../../../../{sourcePath}) |
|
|
96
96
|
|
|
97
97
|
---
|
|
98
98
|
|
|
@@ -121,11 +121,11 @@ graph TB
|
|
|
121
121
|
|
|
122
122
|
| Step | Business Operation | Event | Source |
|
|
123
123
|
|------|-------------------|-------|--------|
|
|
124
|
-
| 1 | Initialize UI components | Form_Load/OnInitialized | [Source](
|
|
125
|
-
| 2 | Load app configuration | After init | [Source](
|
|
126
|
-
| 3 | Check authentication | After config load | [Source](
|
|
127
|
-
| 4 | Load data from service | Auth passed | [Source](
|
|
128
|
-
| 5 | Bind data to controls | Data loaded | [Source](
|
|
124
|
+
| 1 | Initialize UI components | Form_Load/OnInitialized | [Source](../../../../../../{sourcePath}) |
|
|
125
|
+
| 2 | Load app configuration | After init | [Source](../../../../../../{sourcePath}) |
|
|
126
|
+
| 3 | Check authentication | After config load | [Source](../../../../../../{sourcePath}) |
|
|
127
|
+
| 4 | Load data from service | Auth passed | [Source](../../../../../../{sourcePath}) |
|
|
128
|
+
| 5 | Bind data to controls | Data loaded | [Source](../../../../../../{sourcePath}) |
|
|
129
129
|
|
|
130
130
|
### 3.2 User Interaction Flows
|
|
131
131
|
|
|
@@ -151,11 +151,11 @@ graph TB
|
|
|
151
151
|
|
|
152
152
|
| Step | Business Operation | Event | Source |
|
|
153
153
|
|------|-------------------|-------|--------|
|
|
154
|
-
| 1 | Get selected row | DoubleClick | [Source](
|
|
155
|
-
| 2 | Validate selection | After get | [Source](
|
|
156
|
-
| 3 | Open edit dialog | Validation passed | [Source](
|
|
157
|
-
| 4 | Load detail data | Dialog opened | [Source](
|
|
158
|
-
| 5 | Handle save/cancel | Dialog closed | [Source](
|
|
154
|
+
| 1 | Get selected row | DoubleClick | [Source](../../../../../../{sourcePath}) |
|
|
155
|
+
| 2 | Validate selection | After get | [Source](../../../../../../{sourcePath}) |
|
|
156
|
+
| 3 | Open edit dialog | Validation passed | [Source](../../../../../../{sourcePath}) |
|
|
157
|
+
| 4 | Load detail data | Dialog opened | [Source](../../../../../../{sourcePath}) |
|
|
158
|
+
| 5 | Handle save/cancel | Dialog closed | [Source](../../../../../../{sourcePath}) |
|
|
159
159
|
|
|
160
160
|
#### 3.2.2 {Event Name: e.g., Toolbar Button Click}
|
|
161
161
|
|
|
@@ -190,12 +190,12 @@ graph TB
|
|
|
190
190
|
|
|
191
191
|
| Event | WPF | WinForms | Purpose | Source |
|
|
192
192
|
|-------|-----|----------|---------|--------|
|
|
193
|
-
| Initialized | ✅ | - | Component init | [Source](
|
|
194
|
-
| Loaded | ✅ | Load | Window loaded | [Source](
|
|
195
|
-
| Shown | - | Shown | Window visible | [Source](
|
|
196
|
-
| Activated | ✅ | Activated | Window focused | [Source](
|
|
197
|
-
| Closing | ✅ | FormClosing | About to close | [Source](
|
|
198
|
-
| Closed | ✅ | FormClosed | Window closed | [Source](
|
|
193
|
+
| Initialized | ✅ | - | Component init | [Source](../../../../../../{sourcePath}) |
|
|
194
|
+
| Loaded | ✅ | Load | Window loaded | [Source](../../../../../../{sourcePath}) |
|
|
195
|
+
| Shown | - | Shown | Window visible | [Source](../../../../../../{sourcePath}) |
|
|
196
|
+
| Activated | ✅ | Activated | Window focused | [Source](../../../../../../{sourcePath}) |
|
|
197
|
+
| Closing | ✅ | FormClosing | About to close | [Source](../../../../../../{sourcePath}) |
|
|
198
|
+
| Closed | ✅ | FormClosed | Window closed | [Source](../../../../../../{sourcePath}) |
|
|
199
199
|
|
|
200
200
|
---
|
|
201
201
|
|
|
@@ -205,18 +205,18 @@ graph TB
|
|
|
205
205
|
|
|
206
206
|
| Field Name | Type | Description | Binding | Source |
|
|
207
207
|
|------------|------|-------------|---------|--------|
|
|
208
|
-
| {Field 1} | string/int/bool | {Description} | {OneWay/TwoWay} | [Source](
|
|
209
|
-
| {SelectedItem} | Object | {Current selection} | {OneWayToSource} | [Source](
|
|
210
|
-
| {DataSource} | Collection | {List data} | {OneWay} | [Source](
|
|
211
|
-
| {IsBusy} | bool | {Loading state} | {OneWay} | [Source](
|
|
208
|
+
| {Field 1} | string/int/bool | {Description} | {OneWay/TwoWay} | [Source](../../../../../../{sourcePath}) |
|
|
209
|
+
| {SelectedItem} | Object | {Current selection} | {OneWayToSource} | [Source](../../../../../../{sourcePath}) |
|
|
210
|
+
| {DataSource} | Collection | {List data} | {OneWay} | [Source](../../../../../../{sourcePath}) |
|
|
211
|
+
| {IsBusy} | bool | {Loading state} | {OneWay} | [Source](../../../../../../{sourcePath}) |
|
|
212
212
|
|
|
213
213
|
### 4.2 Form Fields (if applicable)
|
|
214
214
|
|
|
215
215
|
| Field Name | Type | Validation | Control | Source |
|
|
216
216
|
|------------|------|------------|---------|--------|
|
|
217
|
-
| {Field 1} | string | {Required} | TextBox | [Source](
|
|
218
|
-
| {Field 2} | int | {Range} | NumericUpDown | [Source](
|
|
219
|
-
| {Field 3} | DateTime | {Not null} | DateTimePicker | [Source](
|
|
217
|
+
| {Field 1} | string | {Required} | TextBox | [Source](../../../../../../{sourcePath}) |
|
|
218
|
+
| {Field 2} | int | {Range} | NumericUpDown | [Source](../../../../../../{sourcePath}) |
|
|
219
|
+
| {Field 3} | DateTime | {Not null} | DateTimePicker | [Source](../../../../../../{sourcePath}) |
|
|
220
220
|
|
|
221
221
|
---
|
|
222
222
|
|
|
@@ -226,25 +226,25 @@ graph TB
|
|
|
226
226
|
|
|
227
227
|
| Service | Type | Main Function | Source | Document Path |
|
|
228
228
|
|---------|------|---------------|--------|---------------|
|
|
229
|
-
| {Service Name} | Business | {Description} | [Source](
|
|
229
|
+
| {Service Name} | Business | {Description} | [Source](../../../../../../{serviceSourcePath}) | [Service Doc](../../../../../../services/{service-name}.md) |
|
|
230
230
|
|
|
231
231
|
### 5.2 UI Components
|
|
232
232
|
|
|
233
233
|
| Component | Framework | Type | Main Function | Source | Document Path |
|
|
234
234
|
|-----------|-----------|------|---------------|--------|---------------|
|
|
235
|
-
| {UserControl} | WPF/WinForms | Custom | {Reusable UI} | [Source](
|
|
235
|
+
| {UserControl} | WPF/WinForms | Custom | {Reusable UI} | [Source](../../../../../../{componentSourcePath}) | [Component Doc](../../../../../../components/{component-name}.md) |
|
|
236
236
|
|
|
237
237
|
### 5.3 Other Windows
|
|
238
238
|
|
|
239
239
|
| Window Name | Relation Type | Description | Source | Document Path |
|
|
240
240
|
|-------------|---------------|-------------|--------|---------------|
|
|
241
|
-
| {Window Name} | Dialog/Child | {Relation description} | [Source](
|
|
241
|
+
| {Window Name} | Dialog/Child | {Relation description} | [Source](../../../../../../{windowSourcePath}) | [Window Doc](../{window-path}.md) |
|
|
242
242
|
|
|
243
243
|
### 5.4 Referenced By
|
|
244
244
|
|
|
245
245
|
| Window Name | Function Description | Source Path | Document Path |
|
|
246
246
|
|-------------|---------------------|-------------|---------------|
|
|
247
|
-
| {Referencing Window} | {e.g., "Open this window from main menu"} | {source-path} | [Window Doc](
|
|
247
|
+
| {Referencing Window} | {e.g., "Open this window from main menu"} | {source-path} | [Window Doc](../../../../../../{window-path}.md) |
|
|
248
248
|
|
|
249
249
|
---
|
|
250
250
|
|
|
@@ -254,21 +254,21 @@ graph TB
|
|
|
254
254
|
|
|
255
255
|
| Operation | Permission Requirement | No Permission Handling | Source |
|
|
256
256
|
|-----------|----------------------|----------------------|--------|
|
|
257
|
-
| View window | {Role required} | Hide menu item / Show message | [Source](
|
|
258
|
-
| Edit data | {Permission required} | Disable edit button | [Source](
|
|
259
|
-
| Delete record | {Admin role} | Disable delete button | [Source](
|
|
257
|
+
| View window | {Role required} | Hide menu item / Show message | [Source](../../../../../../{sourcePath}) |
|
|
258
|
+
| Edit data | {Permission required} | Disable edit button | [Source](../../../../../../{sourcePath}) |
|
|
259
|
+
| Delete record | {Admin role} | Disable delete button | [Source](../../../../../../{sourcePath}) |
|
|
260
260
|
|
|
261
261
|
### 6.2 Desktop-Specific Rules
|
|
262
262
|
|
|
263
|
-
1. **Auto-save**: {e.g., Auto-save draft every 5 minutes} | [Source](
|
|
264
|
-
2. **Keyboard Shortcuts**: {e.g., Ctrl+S save, Ctrl+F find} | [Source](
|
|
265
|
-
3. **Window State**: {e.g., Remember window size and position} | [Source](
|
|
263
|
+
1. **Auto-save**: {e.g., Auto-save draft every 5 minutes} | [Source](../../../../../../{sourcePath})
|
|
264
|
+
2. **Keyboard Shortcuts**: {e.g., Ctrl+S save, Ctrl+F find} | [Source](../../../../../../{sourcePath})
|
|
265
|
+
3. **Window State**: {e.g., Remember window size and position} | [Source](../../../../../../{sourcePath})
|
|
266
266
|
|
|
267
267
|
### 6.3 Validation Rules
|
|
268
268
|
|
|
269
269
|
| Scenario | Rule | Error Handling | Source |
|
|
270
270
|
|----------|------|----------------|--------|
|
|
271
|
-
| Form submit | {Validation rule} | Show error provider / MessageBox | [Source](
|
|
271
|
+
| Form submit | {Validation rule} | Show error provider / MessageBox | [Source](../../../../../../{sourcePath}) |
|
|
272
272
|
|
|
273
273
|
---
|
|
274
274
|
|
|
@@ -299,5 +299,5 @@ graph TB
|
|
|
299
299
|
**Related Module Document:** [Module Overview Document](../{{module-name}}-overview.md)
|
|
300
300
|
|
|
301
301
|
**Section Source**
|
|
302
|
-
- [{Window}.xaml.cs/{Form}.cs](
|
|
303
|
-
- [{ViewModel}.cs](
|
|
302
|
+
- [{Window}.xaml.cs/{Form}.cs](../../../../../../{sourcePath})
|
|
303
|
+
- [{ViewModel}.cs](../../../../../../{viewModelPath})
|
|
@@ -72,22 +72,22 @@ source-path: {sourcePath}
|
|
|
72
72
|
|
|
73
73
|
| Area | Element | Type | Description | Interaction | Source Link |
|
|
74
74
|
|------|---------|------|-------------|-------------|-------------|
|
|
75
|
-
| Title Bar | Window Controls | Button | {Minimize/Maximize/Close} | Click | [Source](
|
|
76
|
-
| Menu | App Menu | Menu | {Application menu} | Click | [Source](
|
|
77
|
-
| Toolbar | Action Buttons | Button | {Primary actions} | Click | [Source](
|
|
78
|
-
| Sidebar | Navigation | Nav | {Section navigation} | Click | [Source](
|
|
79
|
-
| Content | Cards/Tables | Component | {Display content} | Click/Right-click | [Source](
|
|
80
|
-
| Status Bar | Status Info | Status | {App status} | - | [Source](
|
|
75
|
+
| Title Bar | Window Controls | Button | {Minimize/Maximize/Close} | Click | [Source](../../../../../../{sourcePath}) |
|
|
76
|
+
| Menu | App Menu | Menu | {Application menu} | Click | [Source](../../../../../../{sourcePath}) |
|
|
77
|
+
| Toolbar | Action Buttons | Button | {Primary actions} | Click | [Source](../../../../../../{sourcePath}) |
|
|
78
|
+
| Sidebar | Navigation | Nav | {Section navigation} | Click | [Source](../../../../../../{sourcePath}) |
|
|
79
|
+
| Content | Cards/Tables | Component | {Display content} | Click/Right-click | [Source](../../../../../../{sourcePath}) |
|
|
80
|
+
| Status Bar | Status Info | Status | {App status} | - | [Source](../../../../../../{sourcePath}) |
|
|
81
81
|
|
|
82
82
|
**Electron-Specific Interactions:**
|
|
83
83
|
|
|
84
84
|
| Interaction | Action | Description | Source |
|
|
85
85
|
|-------------|--------|-------------|--------|
|
|
86
|
-
| Click | Select/Activate | Mouse click | [Source](
|
|
87
|
-
| RightClick | Context Menu | Show native/context menu | [Source](
|
|
88
|
-
| Drag | File Drop | Drag files into window | [Source](
|
|
89
|
-
| Keyboard | Shortcut | Cmd/Ctrl+ shortcuts | [Source](
|
|
90
|
-
| IPC | Main ↔ Renderer | Communication between processes | [Source](
|
|
86
|
+
| Click | Select/Activate | Mouse click | [Source](../../../../../../{sourcePath}) |
|
|
87
|
+
| RightClick | Context Menu | Show native/context menu | [Source](../../../../../../{sourcePath}) |
|
|
88
|
+
| Drag | File Drop | Drag files into window | [Source](../../../../../../{sourcePath}) |
|
|
89
|
+
| Keyboard | Shortcut | Cmd/Ctrl+ shortcuts | [Source](../../../../../../{sourcePath}) |
|
|
90
|
+
| IPC | Main ↔ Renderer | Communication between processes | [Source](../../../../../../{sourcePath}) |
|
|
91
91
|
|
|
92
92
|
---
|
|
93
93
|
|
|
@@ -121,12 +121,12 @@ graph TB
|
|
|
121
121
|
|
|
122
122
|
| Step | Business Operation | Process | Source |
|
|
123
123
|
|------|-------------------|---------|--------|
|
|
124
|
-
| 1 | Main process starts | Main | [Source](
|
|
125
|
-
| 2 | Create browser window | Main | [Source](
|
|
126
|
-
| 3 | Renderer process loads | Renderer | [Source](
|
|
127
|
-
| 4 | Initialize frontend framework | Renderer | [Source](
|
|
128
|
-
| 5 | Check for updates | Main → Renderer | [Source](
|
|
129
|
-
| 6 | Load user data via IPC | Renderer → Main | [Source](
|
|
124
|
+
| 1 | Main process starts | Main | [Source](../../../../../../{mainSourcePath}) |
|
|
125
|
+
| 2 | Create browser window | Main | [Source](../../../../../../{mainSourcePath}) |
|
|
126
|
+
| 3 | Renderer process loads | Renderer | [Source](../../../../../../{sourcePath}) |
|
|
127
|
+
| 4 | Initialize frontend framework | Renderer | [Source](../../../../../../{sourcePath}) |
|
|
128
|
+
| 5 | Check for updates | Main → Renderer | [Source](../../../../../../{sourcePath}) |
|
|
129
|
+
| 6 | Load user data via IPC | Renderer → Main | [Source](../../../../../../{sourcePath}) |
|
|
130
130
|
|
|
131
131
|
### 3.2 User Interaction Flows
|
|
132
132
|
|
|
@@ -152,12 +152,12 @@ graph TB
|
|
|
152
152
|
|
|
153
153
|
| Step | Business Operation | Process | Source |
|
|
154
154
|
|------|-------------------|---------|--------|
|
|
155
|
-
| 1 | Validate form data | Renderer | [Source](
|
|
156
|
-
| 2 | Send IPC message | Renderer | [Source](
|
|
157
|
-
| 3 | Handle IPC call | Main | [Source](
|
|
158
|
-
| 4 | Show native dialog | Main | [Source](
|
|
159
|
-
| 5 | Write file | Main | [Source](
|
|
160
|
-
| 6 | Return result | Main → Renderer | [Source](
|
|
155
|
+
| 1 | Validate form data | Renderer | [Source](../../../../../../{sourcePath}) |
|
|
156
|
+
| 2 | Send IPC message | Renderer | [Source](../../../../../../{sourcePath}) |
|
|
157
|
+
| 3 | Handle IPC call | Main | [Source](../../../../../../{mainSourcePath}) |
|
|
158
|
+
| 4 | Show native dialog | Main | [Source](../../../../../../{mainSourcePath}) |
|
|
159
|
+
| 5 | Write file | Main | [Source](../../../../../../{mainSourcePath}) |
|
|
160
|
+
| 6 | Return result | Main → Renderer | [Source](../../../../../../{sourcePath}) |
|
|
161
161
|
|
|
162
162
|
#### 3.2.2 {Event Name: e.g., File Drop}
|
|
163
163
|
|
|
@@ -200,9 +200,9 @@ graph TB
|
|
|
200
200
|
|
|
201
201
|
| Direction | Method | Use Case | Source |
|
|
202
202
|
|-----------|--------|----------|--------|
|
|
203
|
-
| Renderer → Main | ipcRenderer.send | Fire-and-forget | [Source](
|
|
204
|
-
| Renderer → Main | ipcRenderer.invoke | Request/Response | [Source](
|
|
205
|
-
| Main → Renderer | webContents.send | Push notification | [Source](
|
|
203
|
+
| Renderer → Main | ipcRenderer.send | Fire-and-forget | [Source](../../../../../../{sourcePath}) |
|
|
204
|
+
| Renderer → Main | ipcRenderer.invoke | Request/Response | [Source](../../../../../../{sourcePath}) |
|
|
205
|
+
| Main → Renderer | webContents.send | Push notification | [Source](../../../../../../{mainSourcePath}) |
|
|
206
206
|
|
|
207
207
|
---
|
|
208
208
|
|
|
@@ -212,17 +212,17 @@ graph TB
|
|
|
212
212
|
|
|
213
213
|
| Field Name | Type | Description | Framework | Source |
|
|
214
214
|
|------------|------|-------------|-----------|--------|
|
|
215
|
-
| {Field 1} | string/number/boolean | {Description} | React/Vue/Angular | [Source](
|
|
216
|
-
| {files} | Array | {Dropped files} | React/Vue/Angular | [Source](
|
|
217
|
-
| {isProcessing} | boolean | {Processing state} | React/Vue/Angular | [Source](
|
|
218
|
-
| {settings} | Object | {App settings} | React/Vue/Angular | [Source](
|
|
215
|
+
| {Field 1} | string/number/boolean | {Description} | React/Vue/Angular | [Source](../../../../../../{sourcePath}) |
|
|
216
|
+
| {files} | Array | {Dropped files} | React/Vue/Angular | [Source](../../../../../../{sourcePath}) |
|
|
217
|
+
| {isProcessing} | boolean | {Processing state} | React/Vue/Angular | [Source](../../../../../../{sourcePath}) |
|
|
218
|
+
| {settings} | Object | {App settings} | React/Vue/Angular | [Source](../../../../../../{sourcePath}) |
|
|
219
219
|
|
|
220
220
|
### 4.2 Form Fields (if applicable)
|
|
221
221
|
|
|
222
222
|
| Field Name | Type | Validation | Component | Source |
|
|
223
223
|
|------------|------|------------|-----------|--------|
|
|
224
|
-
| {Field 1} | string | {Required} | Input | [Source](
|
|
225
|
-
| {Field 2} | string | {File path} | Input + File picker | [Source](
|
|
224
|
+
| {Field 1} | string | {Required} | Input | [Source](../../../../../../{sourcePath}) |
|
|
225
|
+
| {Field 2} | string | {File path} | Input + File picker | [Source](../../../../../../{sourcePath}) |
|
|
226
226
|
|
|
227
227
|
---
|
|
228
228
|
|
|
@@ -232,36 +232,36 @@ graph TB
|
|
|
232
232
|
|
|
233
233
|
| API | Module | Purpose | Source | Document Path |
|
|
234
234
|
|-----|--------|---------|--------|---------------|
|
|
235
|
-
| {Handler Name} | ipcMain | {IPC handler description} | [Source](
|
|
235
|
+
| {Handler Name} | ipcMain | {IPC handler description} | [Source](../../../../../../{mainSourcePath}) | [Main Doc](../../../../../../main/{handler-name}.md) |
|
|
236
236
|
|
|
237
237
|
### 5.2 Electron APIs
|
|
238
238
|
|
|
239
239
|
| API | Process | Purpose | Usage | Source |
|
|
240
240
|
|-----|---------|---------|-------|--------|
|
|
241
|
-
| dialog | Main | Native dialogs | Open/Save dialogs | [Source](
|
|
242
|
-
| shell | Both | Open external | Open file manager/browser | [Source](
|
|
243
|
-
| clipboard | Renderer | Clipboard ops | Copy/paste | [Source](
|
|
244
|
-
| notification | Renderer | Native notifications | Show notification | [Source](
|
|
241
|
+
| dialog | Main | Native dialogs | Open/Save dialogs | [Source](../../../../../../{mainSourcePath}) |
|
|
242
|
+
| shell | Both | Open external | Open file manager/browser | [Source](../../../../../../{sourcePath}) |
|
|
243
|
+
| clipboard | Renderer | Clipboard ops | Copy/paste | [Source](../../../../../../{sourcePath}) |
|
|
244
|
+
| notification | Renderer | Native notifications | Show notification | [Source](../../../../../../{sourcePath}) |
|
|
245
245
|
|
|
246
246
|
### 5.3 Node.js Modules
|
|
247
247
|
|
|
248
248
|
| Module | Purpose | Usage | Source |
|
|
249
249
|
|--------|---------|-------|--------|
|
|
250
|
-
| fs | File system | Read/write files | [Source](
|
|
251
|
-
| path | Path operations | Handle file paths | [Source](
|
|
252
|
-
| os | System info | Get platform info | [Source](
|
|
250
|
+
| fs | File system | Read/write files | [Source](../../../../../../{mainSourcePath}) |
|
|
251
|
+
| path | Path operations | Handle file paths | [Source](../../../../../../{mainSourcePath}) |
|
|
252
|
+
| os | System info | Get platform info | [Source](../../../../../../{mainSourcePath}) |
|
|
253
253
|
|
|
254
254
|
### 5.4 Other Windows
|
|
255
255
|
|
|
256
256
|
| Window Name | Relation Type | Description | Source | Document Path |
|
|
257
257
|
|-------------|---------------|-------------|--------|---------------|
|
|
258
|
-
| {Window Name} | Modal/Child | {Relation description} | [Source](
|
|
258
|
+
| {Window Name} | Modal/Child | {Relation description} | [Source](../../../../../../{windowSourcePath}) | [Window Doc](../{window-path}.md) |
|
|
259
259
|
|
|
260
260
|
### 5.5 Referenced By
|
|
261
261
|
|
|
262
262
|
| Window Name | Function Description | Source Path | Document Path |
|
|
263
263
|
|-------------|---------------------|-------------|---------------|
|
|
264
|
-
| {Referencing Window} | {e.g., "Open from main menu"} | {source-path} | [Window Doc](
|
|
264
|
+
| {Referencing Window} | {e.g., "Open from main menu"} | {source-path} | [Window Doc](../../../../../../{window-path}.md) |
|
|
265
265
|
|
|
266
266
|
---
|
|
267
267
|
|
|
@@ -271,20 +271,20 @@ graph TB
|
|
|
271
271
|
|
|
272
272
|
| Operation | Permission | No Permission Handling | Source |
|
|
273
273
|
|-----------|------------|----------------------|--------|
|
|
274
|
-
| File system access | {User consent} | Show permission dialog | [Source](
|
|
275
|
-
| External links | {N/A} | Open in system browser | [Source](
|
|
274
|
+
| File system access | {User consent} | Show permission dialog | [Source](../../../../../../{sourcePath}) |
|
|
275
|
+
| External links | {N/A} | Open in system browser | [Source](../../../../../../{sourcePath}) |
|
|
276
276
|
|
|
277
277
|
### 6.2 Electron-Specific Rules
|
|
278
278
|
|
|
279
|
-
1. **Security**: {e.g., Enable contextIsolation, use IPC not remote} | [Source](
|
|
280
|
-
2. **Auto-update**: {e.g., Check updates on startup} | [Source](
|
|
281
|
-
3. **Window State**: {e.g., Restore window position/size} | [Source](
|
|
279
|
+
1. **Security**: {e.g., Enable contextIsolation, use IPC not remote} | [Source](../../../../../../{sourcePath})
|
|
280
|
+
2. **Auto-update**: {e.g., Check updates on startup} | [Source](../../../../../../{sourcePath})
|
|
281
|
+
3. **Window State**: {e.g., Restore window position/size} | [Source](../../../../../../{sourcePath})
|
|
282
282
|
|
|
283
283
|
### 6.3 Validation Rules
|
|
284
284
|
|
|
285
285
|
| Scenario | Rule | Error Handling | Source |
|
|
286
286
|
|----------|------|----------------|--------|
|
|
287
|
-
| File type | {Allowed extensions} | Show error dialog | [Source](
|
|
287
|
+
| File type | {Allowed extensions} | Show error dialog | [Source](../../../../../../{sourcePath}) |
|
|
288
288
|
|
|
289
289
|
---
|
|
290
290
|
|
|
@@ -322,6 +322,6 @@ graph TB
|
|
|
322
322
|
**Related Module Document:** [Module Overview Document](../{{module-name}}-overview.md)
|
|
323
323
|
|
|
324
324
|
**Section Source**
|
|
325
|
-
- [{Component}.jsx/.vue](
|
|
326
|
-
- [main.js/main.ts](
|
|
327
|
-
- [preload.js](
|
|
325
|
+
- [{Component}.jsx/.vue](../../../../../../{sourcePath})
|
|
326
|
+
- [main.js/main.ts](../../../../../../{mainSourcePath})
|
|
327
|
+
- [preload.js](../../../../../../{preloadSourcePath})
|