speccrew 0.1.5 → 0.1.7

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.
@@ -50,6 +50,14 @@ Read all confirmed PRD documents specified by the user. PRD documents contain:
50
50
  - Business process flows
51
51
  - Acceptance criteria
52
52
 
53
+ ### Discover Frontend Platforms
54
+
55
+ Read `speccrew-workspace/knowledges/techs/techs-manifest.json` to identify all frontend platforms:
56
+ - Look for platform entries with type starting with `web-` or `mobile-`
57
+ - If multiple frontend platforms exist (e.g., web-vue + mobile-uniapp), frontend design MUST cover each platform separately
58
+ - If only one frontend platform exists, design for that single platform
59
+ - Pass discovered platform list to the design phase
60
+
53
61
  ### Read on Demand
54
62
  When involving related business domains, read `speccrew-workspace/knowledges/bizs/system-overview.md` first, then follow the links within it to navigate to:
55
63
  - Related module business knowledge documents
@@ -70,6 +78,7 @@ Invoke Skill directly with parameters:
70
78
  - Parameters:
71
79
  - `prd_path`: Path to the PRD document
72
80
  - `output_path`: Path for the feature specification document
81
+ - `frontend_platforms`: List of frontend platforms from techs-manifest (e.g., `["web-vue", "mobile-uniapp"]`)
73
82
 
74
83
  ### Multiple PRD Documents (Master + Sub PRDs)
75
84
  Invoke `speccrew-task-worker` agents in parallel:
@@ -79,6 +88,7 @@ Invoke `speccrew-task-worker` agents in parallel:
79
88
  - `master_prd_path`: Path to the Master PRD document (for overall context)
80
89
  - `sub_prd_path`: Path to one Sub PRD document
81
90
  - `output_path`: Path for the feature specification document
91
+ - `frontend_platforms`: List of frontend platforms from techs-manifest
82
92
  - Parallel execution pattern:
83
93
  - Worker 1: Master PRD + Sub PRD 1 → Sub Feature Spec 1
84
94
  - Worker 2: Master PRD + Sub PRD 2 → Sub Feature Spec 2
@@ -131,9 +141,10 @@ The Feature Detail Design Document should include the following:
131
141
  - Feature design scope list
132
142
 
133
143
  ## 2. Core Interface Prototype (ASCII Wireframe)
134
- - List page prototype + interface element description
135
- - Form page prototype + form field description
136
- - Modal/dialog page prototype (if applicable)
144
+ - **Per frontend platform** (e.g., Web, Mobile): separate wireframes reflecting platform-specific layout
145
+ - Web: List page prototype + Form page prototype + Modal/dialog
146
+ - Mobile: Card list / Bottom navigation / Drawer / Action sheet patterns
147
+ - Interface element description per platform
137
148
 
138
149
  ## 3. Interaction Flow Description
139
150
  - Core operation flow (Mermaid sequence diagram)
@@ -39,6 +39,19 @@ Based on PRD content, identify related modules and read their overview files:
39
39
  speccrew-workspace/knowledges/bizs/{module-name}/{module-name}-overview.md
40
40
  ```
41
41
 
42
+ ### 2.2b Discover Frontend Platforms
43
+
44
+ Read `speccrew-workspace/knowledges/techs/techs-manifest.json` to identify frontend platforms:
45
+
46
+ | Platform Type | Examples | Design Implications |
47
+ |---------------|----------|---------------------|
48
+ | `web-*` | web-vue, web-react | Desktop-width layouts, tables, modals, sidebars |
49
+ | `mobile-*` | mobile-uniapp, mobile-flutter | Compact layouts, card lists, bottom nav, swipe actions |
50
+
51
+ - If `frontend_platforms` parameter is provided by the agent, use that list
52
+ - Otherwise, read techs-manifest.json directly
53
+ - Store the platform list for use in Step 5
54
+
42
55
  ### 2.3 Query Knowledge Graph (Optional)
43
56
 
44
57
  If cross-module relationships need analysis, use `speccrew-knowledge-graph-query` skill:
@@ -109,6 +122,69 @@ Based on PRD structure, determine feature spec output structure:
109
122
 
110
123
  ## Step 5: Frontend Design (Per Function)
111
124
 
125
+ **Multi-Platform Rule**: If multiple frontend platforms are identified, repeat the frontend design (5.1 UI Prototype + 5.2 Interface Elements + 5.3 Interaction Flow) for EACH platform. Use platform-specific section headers:
126
+
127
+ | Platforms | Section Structure |
128
+ |-----------|-------------------|
129
+ | Single platform | `#### 2.N.1 Frontend Prototype` (as-is) |
130
+ | Multiple platforms | `#### 2.N.1 Frontend Prototype - Web` + `#### 2.N.1b Frontend Prototype - Mobile` |
131
+
132
+ **Mobile-specific wireframe patterns:**
133
+
134
+ ```
135
+ Pattern M-A: Card List (replaces PC table list)
136
+ +----------------------------------+
137
+ | [Search...] [Filter] |
138
+ +----------------------------------+
139
+ | +----------------------------+ |
140
+ | | Title Status Tag | |
141
+ | | Subtitle / Key info | |
142
+ | | Detail line [Action] | |
143
+ | +----------------------------+ |
144
+ | +----------------------------+ |
145
+ | | Title Status Tag | |
146
+ | | Subtitle / Key info | |
147
+ | | Detail line [Action] | |
148
+ | +----------------------------+ |
149
+ | |
150
+ | [Load More / Pull to Refresh] |
151
+ +----------------------------------+
152
+ | [Tab1] [Tab2] [Tab3] [Tab4] |
153
+ +----------------------------------+
154
+
155
+ Pattern M-B: Mobile Form (replaces PC wide form)
156
+ +----------------------------------+
157
+ | < Back Title [Save] |
158
+ +----------------------------------+
159
+ | Label |
160
+ | [Full-width input ] |
161
+ | |
162
+ | Label |
163
+ | [Full-width input ] |
164
+ | |
165
+ | Label |
166
+ | [Picker / Selector >] |
167
+ | |
168
+ | Label |
169
+ | [Switch toggle O ] |
170
+ +----------------------------------+
171
+
172
+ Pattern M-C: Action Sheet (replaces PC modal)
173
+ +----------------------------------+
174
+ | (dimmed background) |
175
+ | |
176
+ | +----------------------------+ |
177
+ | | Action Sheet Title | |
178
+ | +----------------------------+ |
179
+ | | Option 1 | |
180
+ | +----------------------------+ |
181
+ | | Option 2 | |
182
+ | +----------------------------+ |
183
+ | | Cancel | |
184
+ | +----------------------------+ |
185
+ +----------------------------------+
186
+ ```
187
+
112
188
  For each function requiring frontend changes:
113
189
 
114
190
  ### 5.1 UI Prototype
@@ -383,6 +459,7 @@ After feature spec documents are complete, call `speccrew-fd-api-contract/SKILL.
383
459
  - [ ] Checkpoint A passed: function breakdown confirmed with user
384
460
  - [ ] Output structure determined (single vs master-sub)
385
461
  - [ ] Frontend design includes ASCII wireframes and interaction flows
462
+ - [ ] **[Multi-platform]** Each frontend platform has separate wireframes and interaction flows
386
463
  - [ ] Backend design includes interface list and logic flows
387
464
  - [ ] Data model includes new entities and modifications to existing
388
465
  - [ ] Business rules and constraints documented
@@ -44,6 +44,8 @@
44
44
 
45
45
  #### 2.1.1 Frontend Prototype
46
46
 
47
+ <!-- AI-NOTE: If the project has multiple frontend platforms (e.g., web + mobile), create separate Frontend Prototype sub-sections for each platform. Use headers like "#### 2.1.1 Frontend Prototype - Web" and "#### 2.1.1b Frontend Prototype - Mobile". Each platform should have its own wireframes and element descriptions tailored to the platform's interaction patterns. -->
48
+
47
49
  <!-- AI-NOTE: Use ASCII wireframes to show the UI layout. Choose the appropriate pattern below based on the interface type. -->
48
50
 
49
51
  **Pattern A: List Page**
@@ -112,6 +114,75 @@
112
114
  └─────────────────────────────────────────────────────────────┘
113
115
  ```
114
116
 
117
+ **Pattern M-A: Mobile Card List**
118
+
119
+ <!-- AI-NOTE: Use this pattern instead of Pattern A when designing for mobile platforms -->
120
+
121
+ ```
122
+ +----------------------------------+
123
+ | < Back Title [+ Add] |
124
+ +----------------------------------+
125
+ | [Search...] [Filter] |
126
+ +----------------------------------+
127
+ | +----------------------------+ |
128
+ | | Title Status Tag | |
129
+ | | Subtitle / Key info | |
130
+ | | Detail line [Action] | |
131
+ | +----------------------------+ |
132
+ | +----------------------------+ |
133
+ | | Title Status Tag | |
134
+ | | Subtitle / Key info | |
135
+ | | Detail line [Action] | |
136
+ | +----------------------------+ |
137
+ | |
138
+ | [Load More / Pull to Refresh] |
139
+ +----------------------------------+
140
+ | [Tab1] [Tab2] [Tab3] [Tab4] |
141
+ +----------------------------------+
142
+ ```
143
+
144
+ **Pattern M-B: Mobile Form**
145
+
146
+ <!-- AI-NOTE: Use this pattern instead of Pattern B when designing for mobile platforms -->
147
+
148
+ ```
149
+ +----------------------------------+
150
+ | < Back Title [Save] |
151
+ +----------------------------------+
152
+ | Label |
153
+ | [Full-width input ] |
154
+ | |
155
+ | Label |
156
+ | [Full-width input ] |
157
+ | |
158
+ | Label |
159
+ | [Picker / Selector >] |
160
+ | |
161
+ | Label |
162
+ | [Switch toggle O ] |
163
+ +----------------------------------+
164
+ ```
165
+
166
+ **Pattern M-C: Action Sheet**
167
+
168
+ <!-- AI-NOTE: Use this pattern instead of Pattern C when designing for mobile platforms -->
169
+
170
+ ```
171
+ +----------------------------------+
172
+ | (dimmed background) |
173
+ | |
174
+ | +----------------------------+ |
175
+ | | Action Sheet Title | |
176
+ | +----------------------------+ |
177
+ | | Option 1 | |
178
+ | +----------------------------+ |
179
+ | | Option 2 | |
180
+ | +----------------------------+ |
181
+ | | Cancel | |
182
+ | +----------------------------+ |
183
+ +----------------------------------+
184
+ ```
185
+
115
186
  **Interface Element Description:**
116
187
 
117
188
  | Area | Element | Type | Description | Interaction |
@@ -232,7 +303,9 @@ flowchart TD
232
303
 
233
304
  #### 2.2.1 Frontend Prototype
234
305
 
235
- {ASCII wireframe and element description}
306
+ <!-- AI-NOTE: If multi-platform, create separate wireframes per platform (Web + Mobile) -->
307
+
308
+ {ASCII wireframe and element description per platform}
236
309
 
237
310
  #### 2.2.2 Interaction Flow
238
311
 
@@ -376,6 +376,28 @@ function updatePackageDocs(packageRoot, workspaceDir, stats) {
376
376
  function run() {
377
377
  try {
378
378
  const args = parseArgs();
379
+
380
+ // Self-update: check if a newer version exists on npm registry
381
+ const localVersion = getPackageVersion();
382
+ let latestVersion = null;
383
+ try {
384
+ const { execSync } = require('child_process');
385
+ latestVersion = execSync('npm view speccrew version', { encoding: 'utf8', timeout: 15000 }).trim();
386
+ } catch (e) {
387
+ // Network error or npm not available, skip self-update
388
+ }
389
+
390
+ if (latestVersion && latestVersion !== localVersion) {
391
+ console.log(`Updating CLI: v${localVersion} → v${latestVersion} ...`);
392
+ try {
393
+ const { execSync } = require('child_process');
394
+ execSync('npm install -g speccrew@latest', { stdio: 'inherit', timeout: 60000 });
395
+ console.log(`CLI updated to v${latestVersion}\n`);
396
+ } catch (e) {
397
+ console.warn(`Warning: CLI self-update failed (${e.message}). Continuing with current version.\n`);
398
+ }
399
+ }
400
+
379
401
  const projectRoot = process.cwd();
380
402
 
381
403
  // 读取 .speccrewrc (with migration support)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {