speccrew 0.1.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/.speccrew/agents/speccrew-feature-designer.md +142 -0
- package/.speccrew/agents/speccrew-product-manager.md +61 -0
- package/.speccrew/agents/speccrew-system-designer.md +200 -0
- package/.speccrew/agents/speccrew-system-developer.md +238 -0
- package/.speccrew/agents/speccrew-task-worker.md +80 -0
- package/.speccrew/agents/speccrew-team-leader.md +92 -0
- package/.speccrew/agents/speccrew-test-manager.md +313 -0
- package/.speccrew/skills/speccrew-create-agents/SKILL.md +98 -0
- package/.speccrew/skills/speccrew-create-agents/templates/agents/designer-agent.md +54 -0
- package/.speccrew/skills/speccrew-create-agents/templates/agents/dev-agent.md +79 -0
- package/.speccrew/skills/speccrew-create-agents/templates/agents/test-agent.md +80 -0
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +205 -0
- package/.speccrew/skills/speccrew-dev-backend/templates/TASK-RECORD-TEMPLATE.md +118 -0
- package/.speccrew/skills/speccrew-dev-desktop/SKILL.md +258 -0
- package/.speccrew/skills/speccrew-dev-desktop/templates/TASK-RECORD-TEMPLATE.md +161 -0
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +202 -0
- package/.speccrew/skills/speccrew-dev-frontend/templates/TASK-RECORD-TEMPLATE.md +115 -0
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +200 -0
- package/.speccrew/skills/speccrew-dev-mobile/templates/TASK-RECORD-TEMPLATE.md +125 -0
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +73 -0
- package/.speccrew/skills/speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md +96 -0
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +395 -0
- package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +387 -0
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +80 -0
- package/.speccrew/skills/speccrew-get-timestamp/scripts/get-timestamp.js +35 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +1116 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-FASTAPI.md +462 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-JAVA.md +480 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-NET.md +464 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE.md +480 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/MODULE-OVERVIEW-TEMPLATE.md +367 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +667 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +74 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +176 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +150 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +106 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +249 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +848 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +226 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +264 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +34 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +867 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +26 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +165 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/apply-module-mapping.js +208 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/extract-module-summary.js +180 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/reindex-modules.js +358 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +1055 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-DESKTOP.md +303 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-ELECTRON.md +327 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MINIAPP.md +292 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MOBILE.md +281 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI.md +324 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +270 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/COMPONENT-PATTERN-TEMPLATE.md +33 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/LAYOUT-PATTERN-TEMPLATE.md +33 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/PAGE-TYPE-TEMPLATE.md +33 -0
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +229 -0
- package/.speccrew/skills/speccrew-knowledge-graph-query/scripts/graph-query.js +549 -0
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +181 -0
- package/.speccrew/skills/speccrew-knowledge-graph-write/scripts/graph-write.js +651 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +305 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/templates/MODULE-OVERVIEW-TEMPLATE.md +400 -0
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +351 -0
- package/.speccrew/skills/speccrew-knowledge-system-summarize/templates/SYSTEM-OVERVIEW-TEMPLATE.md +294 -0
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +683 -0
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +550 -0
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/templates/techs-manifest-EXAMPLE.json +35 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +1087 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/ARCHITECTURE-TEMPLATE.md +240 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COLOR-SYSTEM-TEMPLATE.md +68 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COMPONENT-LIBRARY-TEMPLATE.md +86 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-BUILD-TEMPLATE.md +466 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DATA-TEMPLATE.md +432 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DESIGN-TEMPLATE.md +1209 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DEV-TEMPLATE.md +1433 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-SYSTEM-TEST-TEMPLATE.md +1052 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-UNIT-TEST-TEMPLATE.md +946 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/INDEX-TEMPLATE.md +29 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-LAYOUTS-TEMPLATE.md +69 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +74 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/TECH-STACK-TEMPLATE.md +232 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +628 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +392 -0
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +489 -0
- package/.speccrew/skills/speccrew-knowledge-techs-index/templates/INDEX-TEMPLATE.md +243 -0
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +269 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +562 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/BUSINESS-COMPONENTS-TEMPLATE.md +171 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMMON-COMPONENTS-TEMPLATE.md +177 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-INDIVIDUAL-TEMPLATE.md +80 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-LIBRARY-TEMPLATE.md +118 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-INDIVIDUAL-TEMPLATE.md +97 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-PATTERNS-TEMPLATE.md +208 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/NAVIGATION-PATTERNS-TEMPLATE.md +157 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-INDIVIDUAL-TEMPLATE.md +123 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +58 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/SPACING-TEMPLATE.md +119 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/STYLE-SYSTEM-TEMPLATE.md +117 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/TYPOGRAPHY-TEMPLATE.md +107 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/UI-STYLE-GUIDE-TEMPLATE.md +171 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +434 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/BIZS-MODELING-TEMPLATE.md +332 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md +200 -0
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +195 -0
- package/.speccrew/skills/speccrew-project-diagnosis/SKILL.md +208 -0
- package/.speccrew/skills/speccrew-project-diagnosis/templates/DIAGNOSIS-REPORT-TEMPLATE.md +202 -0
- package/.speccrew/skills/speccrew-sd-backend/SKILL.md +188 -0
- package/.speccrew/skills/speccrew-sd-backend/templates/INDEX-TEMPLATE.md +85 -0
- package/.speccrew/skills/speccrew-sd-backend/templates/SD-BACKEND-TEMPLATE.md +269 -0
- package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +192 -0
- package/.speccrew/skills/speccrew-sd-desktop/templates/INDEX-TEMPLATE.md +271 -0
- package/.speccrew/skills/speccrew-sd-desktop/templates/SD-DESKTOP-TEMPLATE.md +673 -0
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +176 -0
- package/.speccrew/skills/speccrew-sd-frontend/templates/INDEX-TEMPLATE.md +184 -0
- package/.speccrew/skills/speccrew-sd-frontend/templates/SD-FRONTEND-TEMPLATE.md +382 -0
- package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +189 -0
- package/.speccrew/skills/speccrew-sd-mobile/templates/INDEX-TEMPLATE.md +219 -0
- package/.speccrew/skills/speccrew-sd-mobile/templates/SD-MOBILE-TEMPLATE.md +534 -0
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +284 -0
- package/.speccrew/skills/speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md +263 -0
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +313 -0
- package/.speccrew/skills/speccrew-test-code-gen/templates/TEST-CODE-PLAN-TEMPLATE.md +180 -0
- package/.speccrew/skills/speccrew-test-execute/SKILL.md +283 -0
- package/.speccrew/skills/speccrew-test-execute/templates/BUG-REPORT-TEMPLATE.md +50 -0
- package/.speccrew/skills/speccrew-test-execute/templates/TEST-REPORT-TEMPLATE.md +57 -0
- package/.speccrew/skills/speccrew-workflow-diagnose/SKILL.md +155 -0
- package/LICENSE +21 -0
- package/README.ar.md +318 -0
- package/README.en.md +318 -0
- package/README.es.md +318 -0
- package/README.md +340 -0
- package/bin/cli.js +62 -0
- package/lib/commands/doctor.js +138 -0
- package/lib/commands/init.js +231 -0
- package/lib/commands/list.js +114 -0
- package/lib/commands/uninstall.js +117 -0
- package/lib/commands/update.js +351 -0
- package/lib/ide-adapters.js +73 -0
- package/lib/utils.js +104 -0
- package/package.json +28 -0
- package/workspace-template/docs/configs/document-templates.json +667 -0
- package/workspace-template/docs/configs/platform-mapping.json +194 -0
- package/workspace-template/docs/configs/tech-stack-mappings.json +313 -0
- package/workspace-template/docs/configs/validation-rules.json +87 -0
- package/workspace-template/docs/rules/mermaid-rule.md +114 -0
- package/workspace-template/docs/solutions/Agent/346/212/200/350/203/275/345/256/232/344/271/211+/351/234/200/346/261/202/346/226/207/346/241/243+UML/344/275/277/347/224/250/346/250/241/346/235/277/357/274/210ISA-95/345/205/255/346/256/265/345/274/217/350/236/215/345/220/210/347/211/210/357/274/211.md +586 -0
- package/workspace-template/docs/solutions/agent-knowledge-map.md +238 -0
- package/workspace-template/docs/solutions/bizs-knowledge-pipeline.md +678 -0
- package/workspace-template/docs/solutions/harness.md +410 -0
- package/workspace-template/docs/solutions/knowledge-incremental-sync-spec.md +943 -0
- package/workspace-template/docs/solutions/techs-knowledge-pipeline.md +803 -0
- package/workspace-template/docs/solutions/workspace-structure.md +318 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
|
|
2
|
+
# Feature Detail Design Template - [Feature Name]
|
|
3
|
+
|
|
4
|
+
> **Platform**: Mini Program (WeChat/Alipay/ByteDance)
|
|
5
|
+
> **Tech Stack**: WXML/AXML/TTML + WXSS/ACSS/TTSS + JavaScript
|
|
6
|
+
|
|
7
|
+
## 1. Content Overview
|
|
8
|
+
|
|
9
|
+
name: {Feature Name}
|
|
10
|
+
|
|
11
|
+
description: Feature overview.
|
|
12
|
+
|
|
13
|
+
document-path: {documentPath}
|
|
14
|
+
source-path: {sourcePath}
|
|
15
|
+
|
|
16
|
+
## 2. Interface Prototype
|
|
17
|
+
|
|
18
|
+
<!-- AI-TAG: UI_PROTOTYPE -->
|
|
19
|
+
<!-- AI-NOTE: Mini Program UI uses mobile-first ASCII wireframes -->
|
|
20
|
+
<!-- AI-NOTE: Screen width: 750rpx (responsive unit) -->
|
|
21
|
+
<!-- AI-NOTE: ONLY draw prototype for the MAIN PAGE defined in {{sourcePath}} -->
|
|
22
|
+
|
|
23
|
+
### 2.1 {Main Page Name}
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
┌─────────────────────────┐
|
|
27
|
+
│ Navigation Bar Title │ ← System Navigation Bar
|
|
28
|
+
├─────────────────────────┤
|
|
29
|
+
│ │
|
|
30
|
+
│ ┌─────────────────┐ │
|
|
31
|
+
│ │ Search Bar 🔍 │ │ ← Search Component
|
|
32
|
+
│ └─────────────────┘ │
|
|
33
|
+
│ │
|
|
34
|
+
│ ┌─────────────────┐ │
|
|
35
|
+
│ │ │ │
|
|
36
|
+
│ │ Content │ │ ← Scroll View
|
|
37
|
+
│ │ Area │ │
|
|
38
|
+
│ │ │ │
|
|
39
|
+
│ │ │ │
|
|
40
|
+
│ └─────────────────┘ │
|
|
41
|
+
│ │
|
|
42
|
+
│ ┌─────────────────┐ │
|
|
43
|
+
│ │ [ + Action ] │ │ ← Floating Button
|
|
44
|
+
│ └─────────────────┘ │
|
|
45
|
+
│ │
|
|
46
|
+
├─────────────────────────┤
|
|
47
|
+
│ 🏠 📋 💬 👤 │ ← Tab Bar (if configured)
|
|
48
|
+
└─────────────────────────┘
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Card Component Layout:**
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
┌─────────────────────────┐
|
|
55
|
+
│ ┌────┐ Title ▸ │
|
|
56
|
+
│ │Img │ Description │
|
|
57
|
+
│ └────┘ [Tag1] [Tag2] │
|
|
58
|
+
├─────────────────────────┤
|
|
59
|
+
│ ┌────┐ Title ▸ │
|
|
60
|
+
│ │Img │ Description │
|
|
61
|
+
│ └────┘ [Tag1] [Tag2] │
|
|
62
|
+
└─────────────────────────┘
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Interface Element Description:**
|
|
66
|
+
|
|
67
|
+
| Area | Element | Component | Description | Interaction | Source Link |
|
|
68
|
+
|------|---------|-----------|-------------|-------------|-------------|
|
|
69
|
+
| Nav | Title | NavigationBar | {Page title} | - | [Source](../../{sourcePath}) |
|
|
70
|
+
| Search | Search Input | search | {Search input} | bind:input/bind:confirm | [Source](../../{sourcePath}) |
|
|
71
|
+
| Content | Card | view + image + text | {Display item} | bind:tap | [Source](../../{sourcePath}) |
|
|
72
|
+
| Action | FAB | button | {Primary action} | bind:tap | [Source](../../{sourcePath}) |
|
|
73
|
+
|
|
74
|
+
**Mini Program Specific Interactions:**
|
|
75
|
+
|
|
76
|
+
| Event | Trigger | Description | Source |
|
|
77
|
+
|-------|---------|-------------|--------|
|
|
78
|
+
| bind:tap | Tap | Click element | [Source](../../{sourcePath}) |
|
|
79
|
+
| bind:longpress | Long press | Long press element | [Source](../../{sourcePath}) |
|
|
80
|
+
| bind:touchstart | Touch start | Start touch | [Source](../../{sourcePath}) |
|
|
81
|
+
| bind:touchend | Touch end | End touch | [Source](../../{sourcePath}) |
|
|
82
|
+
| bind:scrolltolower | Scroll to bottom | Load more | [Source](../../{sourcePath}) |
|
|
83
|
+
| bind:pullDownRefresh | Pull down | Refresh page | [Source](../../{sourcePath}) |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 3. Business Flow Description
|
|
88
|
+
|
|
89
|
+
<!-- AI-TAG: BUSINESS_FLOW -->
|
|
90
|
+
<!-- AI-NOTE: Mini Program lifecycle: onLoad → onShow → onReady → onHide → onUnload -->
|
|
91
|
+
|
|
92
|
+
### 3.1 Page Initialization Flow
|
|
93
|
+
|
|
94
|
+
```mermaid
|
|
95
|
+
graph TB
|
|
96
|
+
Start([Page Open]) --> onLoad[onLoad - Parse options]
|
|
97
|
+
onLoad --> onShow[onShow - Page visible]
|
|
98
|
+
onShow --> CheckAuth{Check Login}
|
|
99
|
+
CheckAuth -->|Not Login| GetUser[Get User Info]
|
|
100
|
+
CheckAuth -->|Logged In| LoadData[Load Data]
|
|
101
|
+
GetUser --> LoadData
|
|
102
|
+
LoadData --> onReady[onReady - Render complete]
|
|
103
|
+
onReady --> End([End])
|
|
104
|
+
|
|
105
|
+
LoadData -->|Call| API1[wx.request - API call]
|
|
106
|
+
GetUser -->|Call| wxLogin[wx.login - Get code]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Flow Description:**
|
|
110
|
+
|
|
111
|
+
| Step | Business Operation | Lifecycle | Source |
|
|
112
|
+
|------|-------------------|-----------|--------|
|
|
113
|
+
| 1 | Parse page options | onLoad | [Source](../../{sourcePath}) |
|
|
114
|
+
| 2 | Page becomes visible | onShow | [Source](../../{sourcePath}) |
|
|
115
|
+
| 3 | Check/get user info | onShow | [Source](../../{sourcePath}) |
|
|
116
|
+
| 4 | Load page data | onShow | [Source](../../{sourcePath}) |
|
|
117
|
+
| 5 | Page render complete | onReady | [Source](../../{sourcePath}) |
|
|
118
|
+
|
|
119
|
+
### 3.2 User Interaction Flows
|
|
120
|
+
|
|
121
|
+
#### 3.2.1 {Event Name: e.g., Card onTap}
|
|
122
|
+
|
|
123
|
+
```mermaid
|
|
124
|
+
graph TB
|
|
125
|
+
Tap[bind:tap] --> GetData[Get dataset]
|
|
126
|
+
GetData --> Navigate[wx.navigateTo]
|
|
127
|
+
Navigate --> PassData[Pass data via URL]
|
|
128
|
+
PassData --> TargetPage[Target Page]
|
|
129
|
+
|
|
130
|
+
TargetPage -->|Call| API2[wx.request - Load detail]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Flow Description:**
|
|
134
|
+
|
|
135
|
+
| Step | Business Operation | Event | Source |
|
|
136
|
+
|------|-------------------|-------|--------|
|
|
137
|
+
| 1 | Get data from dataset | bind:tap | [Source](../../{sourcePath}) |
|
|
138
|
+
| 2 | Navigate to detail | wx.navigateTo | [Source](../../{sourcePath}) |
|
|
139
|
+
| 3 | Pass data via URL | query parameter | [Source](../../{sourcePath}) |
|
|
140
|
+
|
|
141
|
+
#### 3.2.2 {Event Name: e.g., Pull Down Refresh}
|
|
142
|
+
|
|
143
|
+
```mermaid
|
|
144
|
+
graph TB
|
|
145
|
+
Pull[Pull Down] --> Trigger[Trigger refresh]
|
|
146
|
+
Trigger --> ShowLoading[Show loading]
|
|
147
|
+
ShowLoading --> Fetch[Fetch data]
|
|
148
|
+
Fetch --> StopPull[wx.stopPullDownRefresh]
|
|
149
|
+
StopPull --> UpdateUI[Update page data]
|
|
150
|
+
|
|
151
|
+
Fetch -->|Call| API3[wx.request - Refresh API]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### 3.3 Mini Program Lifecycle
|
|
155
|
+
|
|
156
|
+
```mermaid
|
|
157
|
+
graph TB
|
|
158
|
+
subgraph PageLifecycle["Page Lifecycle"]
|
|
159
|
+
Load[onLoad] --> Show[onShow]
|
|
160
|
+
Show --> Ready[onReady]
|
|
161
|
+
Ready --> Hide[onHide]
|
|
162
|
+
Hide --> Show
|
|
163
|
+
Hide --> Unload[onUnload]
|
|
164
|
+
end
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**Lifecycle Functions:**
|
|
168
|
+
|
|
169
|
+
| Function | Trigger | Purpose | Source |
|
|
170
|
+
|----------|---------|---------|--------|
|
|
171
|
+
| onLoad | Page created | Parse options, init | [Source](../../{sourcePath}) |
|
|
172
|
+
| onShow | Page visible | Refresh data | [Source](../../{sourcePath}) |
|
|
173
|
+
| onReady | Render done | DOM operations | [Source](../../{sourcePath}) |
|
|
174
|
+
| onHide | Page hidden | Pause operations | [Source](../../{sourcePath}) |
|
|
175
|
+
| onUnload | Page closed | Cleanup | [Source](../../{sourcePath}) |
|
|
176
|
+
| onPullDownRefresh | Pull down | Refresh data | [Source](../../{sourcePath}) |
|
|
177
|
+
| onReachBottom | Scroll bottom | Load more | [Source](../../{sourcePath}) |
|
|
178
|
+
| onShareAppMessage | Share | Custom share | [Source](../../{sourcePath}) |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 4. Data Field Definition
|
|
183
|
+
|
|
184
|
+
### 4.1 Page Data Fields
|
|
185
|
+
|
|
186
|
+
| Field Name | Type | Description | Source |
|
|
187
|
+
|------------|------|-------------|--------|
|
|
188
|
+
| {Field 1} | String/Number/Boolean/Array/Object | {Description} | [Source](../../{sourcePath}) |
|
|
189
|
+
| {loading} | Boolean | {Loading state} | [Source](../../{sourcePath}) |
|
|
190
|
+
| {list} | Array | {List data} | [Source](../../{sourcePath}) |
|
|
191
|
+
| {hasMore} | Boolean | {Has more data} | [Source](../../{sourcePath}) |
|
|
192
|
+
|
|
193
|
+
### 4.2 Form Fields (if applicable)
|
|
194
|
+
|
|
195
|
+
| Field Name | Type | Validation | Component | Source |
|
|
196
|
+
|------------|------|------------|-----------|--------|
|
|
197
|
+
| {Field 1} | String | {Required} | input | [Source](../../{sourcePath}) |
|
|
198
|
+
| {Field 2} | String | {Phone format} | input type=digit | [Source](../../{sourcePath}) |
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## 5. References
|
|
203
|
+
|
|
204
|
+
### 5.1 APIs
|
|
205
|
+
|
|
206
|
+
| API Name | Type | Main Function | Source | Document Path |
|
|
207
|
+
|----------|------|---------------|--------|---------------|
|
|
208
|
+
| {API Name} | Query/Mutation | {Brief description} | [Source](../../{apiSourcePath}) | [API Doc](../../apis/{api-name}.md) |
|
|
209
|
+
|
|
210
|
+
### 5.2 Mini Program APIs
|
|
211
|
+
|
|
212
|
+
| API | Purpose | Usage | Source |
|
|
213
|
+
|-----|---------|-------|--------|
|
|
214
|
+
| wx.request | HTTP request | Call backend API | [Source](../../{sourcePath}) |
|
|
215
|
+
| wx.navigateTo | Page navigation | Navigate to page | [Source](../../{sourcePath}) |
|
|
216
|
+
| wx.showToast | Show toast | Display message | [Source](../../{sourcePath}) |
|
|
217
|
+
| wx.getUserInfo | Get user info | Authentication | [Source](../../{sourcePath}) |
|
|
218
|
+
|
|
219
|
+
### 5.3 Components
|
|
220
|
+
|
|
221
|
+
| Component | Type | Main Function | Source | Document Path |
|
|
222
|
+
|-----------|------|---------------|--------|---------------|
|
|
223
|
+
| {Custom Component} | UI | {Description} | [Source](../../{componentSourcePath}) | [Component Doc](../../components/{component-name}.md) |
|
|
224
|
+
|
|
225
|
+
### 5.4 Other Pages
|
|
226
|
+
|
|
227
|
+
| Page Name | Relation Type | Description | Source | Document Path |
|
|
228
|
+
|-----------|---------------|-------------|--------|---------------|
|
|
229
|
+
| {Page Name} | navigateTo | {Navigation description} | [Source](../../{pageSourcePath}) | [Page Doc](../{page-path}.md) |
|
|
230
|
+
|
|
231
|
+
### 5.5 Referenced By
|
|
232
|
+
|
|
233
|
+
| Page Name | Function Description | Source Path | Document Path |
|
|
234
|
+
|-------------|---------------------|-------------|---------------|
|
|
235
|
+
| {Referencing Page} | {e.g., "Navigate to this page"} | {source-path} | [Page Doc](../{page-path}.md) |
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## 6. Business Rule Constraints
|
|
240
|
+
|
|
241
|
+
### 6.1 Permission Rules
|
|
242
|
+
|
|
243
|
+
| Operation | Permission | No Permission Handling | Source |
|
|
244
|
+
|-----------|------------|----------------------|--------|
|
|
245
|
+
| View page | {None/Login} | Show login modal | [Source](../../{sourcePath}) |
|
|
246
|
+
| Use feature | {Scope required} | Guide to authorize | [Source](../../{sourcePath}) |
|
|
247
|
+
|
|
248
|
+
### 6.2 Mini Program Specific Rules
|
|
249
|
+
|
|
250
|
+
1. **Package Size**: {e.g., Main package ≤ 2MB} | [Source](../../{sourcePath})
|
|
251
|
+
2. **API Limit**: {e.g., Concurrent request limit} | [Source](../../{sourcePath})
|
|
252
|
+
3. **Storage**: {e.g., Use wx.setStorage for cache} | [Source](../../{sourcePath})
|
|
253
|
+
|
|
254
|
+
### 6.3 Validation Rules
|
|
255
|
+
|
|
256
|
+
| Scenario | Rule | Handling | Source |
|
|
257
|
+
|----------|------|----------|--------|
|
|
258
|
+
| Form submit | {Validation} | wx.showToast / showModal | [Source](../../{sourcePath}) |
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## 7. Notes and Additional Information
|
|
263
|
+
|
|
264
|
+
### 7.1 Platform Differences
|
|
265
|
+
|
|
266
|
+
- **WeChat**: wx.* APIs, WXML/WXSS
|
|
267
|
+
- **Alipay**: my.* APIs, AXML/ACSS
|
|
268
|
+
- **ByteDance**: tt.* APIs, TTML/TTSS
|
|
269
|
+
- **Universal**: Use framework like uni-app/Taro for multi-platform
|
|
270
|
+
|
|
271
|
+
### 7.2 Performance Considerations
|
|
272
|
+
|
|
273
|
+
- **List Rendering**: Use wx:key for list items
|
|
274
|
+
- **Image Optimization**: Use lazy-load, appropriate size
|
|
275
|
+
- **setData**: Minimize data size, avoid frequent calls
|
|
276
|
+
- **Subpackages**: Use for large applications
|
|
277
|
+
|
|
278
|
+
### 7.3 Pending Confirmations
|
|
279
|
+
|
|
280
|
+
- [ ] **{Pending 1}**: {e.g., Whether to support share to moments}
|
|
281
|
+
- [ ] **{Pending 2}**: {e.g., Whether to add subscription message}
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
**Document Status:** 📝 Draft / 👀 In Review / ✅ Published
|
|
286
|
+
**Last Updated:** {Date}
|
|
287
|
+
**Maintainer:** {Name}
|
|
288
|
+
**Related Module Document:** [Module Overview Document](../{{module-name}}-overview.md)
|
|
289
|
+
|
|
290
|
+
**Section Source**
|
|
291
|
+
- [{page}.js/{page}.wxml](../../{sourcePath})
|
|
292
|
+
- [{page}.json](../../{configPath})
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
|
|
2
|
+
# Feature Detail Design Template - [Feature Name]
|
|
3
|
+
|
|
4
|
+
> **Platform**: Mobile Native (iOS/Android)
|
|
5
|
+
> **Tech Stack**: Swift/Kotlin/React Native/Flutter
|
|
6
|
+
|
|
7
|
+
## 1. Content Overview
|
|
8
|
+
|
|
9
|
+
name: {Feature Name}
|
|
10
|
+
|
|
11
|
+
description: Feature overview.
|
|
12
|
+
|
|
13
|
+
document-path: {documentPath}
|
|
14
|
+
source-path: {sourcePath}
|
|
15
|
+
|
|
16
|
+
## 2. Interface Prototype
|
|
17
|
+
|
|
18
|
+
<!-- AI-TAG: UI_PROTOTYPE -->
|
|
19
|
+
<!-- AI-NOTE: Mobile UI prototype uses vertical ASCII wireframes for phone screen layout -->
|
|
20
|
+
<!-- AI-NOTE: Screen size reference: 375×812pt (iPhone X) or 360×640dp (Android) -->
|
|
21
|
+
<!-- AI-NOTE: ONLY draw prototype for the MAIN SCREEN defined in {{sourcePath}} -->
|
|
22
|
+
|
|
23
|
+
### 2.1 {Main Screen Name}
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
┌─────────────────────────┐
|
|
27
|
+
│ Status Bar │
|
|
28
|
+
├─────────────────────────┤
|
|
29
|
+
│ ← Title [⋯] │ ← Navigation Bar
|
|
30
|
+
├─────────────────────────┤
|
|
31
|
+
│ │
|
|
32
|
+
│ ┌─────────────────┐ │
|
|
33
|
+
│ │ Search Bar │ │ ← Search/Filter Area
|
|
34
|
+
│ └─────────────────┘ │
|
|
35
|
+
│ │
|
|
36
|
+
│ ┌─────────────────┐ │
|
|
37
|
+
│ │ │ │
|
|
38
|
+
│ │ Content │ │ ← Main Content
|
|
39
|
+
│ │ Area │ │ (List/Grid/Form)
|
|
40
|
+
│ │ │ │
|
|
41
|
+
│ │ │ │
|
|
42
|
+
│ └─────────────────┘ │
|
|
43
|
+
│ │
|
|
44
|
+
│ ┌─────────────────┐ │
|
|
45
|
+
│ │ [Action Btn] │ │ ← Floating Action Button
|
|
46
|
+
│ └─────────────────┘ │
|
|
47
|
+
│ │
|
|
48
|
+
├─────────────────────────┤
|
|
49
|
+
│ [Tab1] [Tab2] [Tab3] │ ← Tab Bar (if applicable)
|
|
50
|
+
└─────────────────────────┘
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**List Item Layout:**
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
┌─────────────────────────┐
|
|
57
|
+
│ ┌────┐ Title > │
|
|
58
|
+
│ │Icon│ Subtitle │
|
|
59
|
+
│ └────┘ [Tag] │
|
|
60
|
+
├─────────────────────────┤
|
|
61
|
+
│ ┌────┐ Title > │
|
|
62
|
+
│ │Img │ Subtitle │
|
|
63
|
+
│ └────┘ [Tag] │
|
|
64
|
+
└─────────────────────────┘
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Interface Element Description:**
|
|
68
|
+
|
|
69
|
+
| Area | Element | Type | Description | Interaction | Source Link |
|
|
70
|
+
|------|---------|------|-------------|-------------|-------------|
|
|
71
|
+
| Nav Bar | Back Button | Button | {Return to previous screen} | Tap to navigate back | [Source](../../{sourcePath}) |
|
|
72
|
+
| Nav Bar | Title | Label | {Screen title} | - | [Source](../../{sourcePath}) |
|
|
73
|
+
| Nav Bar | More Menu | Button | {Show action sheet} | Tap to show options | [Source](../../{sourcePath}) |
|
|
74
|
+
| Content | List Item | Cell | {Display data item} | Tap to view detail | [Source](../../{sourcePath}) |
|
|
75
|
+
| Content | Pull Refresh | Gesture | {Pull down to refresh} | Pull down gesture | [Source](../../{sourcePath}) |
|
|
76
|
+
| FAB | Action Button | Button | {Primary action} | Tap to create/add | [Source](../../{sourcePath}) |
|
|
77
|
+
|
|
78
|
+
**Mobile-Specific Interactions:**
|
|
79
|
+
|
|
80
|
+
| Gesture | Action | Description | Source |
|
|
81
|
+
|---------|--------|-------------|--------|
|
|
82
|
+
| Tap | Select item | Navigate to detail | [Source](../../{sourcePath}) |
|
|
83
|
+
| Long Press | Context menu | Show action sheet | [Source](../../{sourcePath}) |
|
|
84
|
+
| Swipe Left | Delete/Reveal | Show delete/edit actions | [Source](../../{sourcePath}) |
|
|
85
|
+
| Pull Down | Refresh | Reload data | [Source](../../{sourcePath}) |
|
|
86
|
+
| Infinite Scroll | Load more | Pagination | [Source](../../{sourcePath}) |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 3. Business Flow Description
|
|
91
|
+
|
|
92
|
+
<!-- AI-TAG: BUSINESS_FLOW -->
|
|
93
|
+
<!-- AI-NOTE: Document ALL business flows triggered by user interactions -->
|
|
94
|
+
<!-- AI-NOTE: Mobile events: onTap, onLongPress, onSwipe, onScroll, onRefresh -->
|
|
95
|
+
|
|
96
|
+
### 3.1 Screen Initialization Flow
|
|
97
|
+
|
|
98
|
+
```mermaid
|
|
99
|
+
graph TB
|
|
100
|
+
Start([Screen Load]) --> Init[Initialize ViewModel/State]
|
|
101
|
+
Init --> CheckAuth{Check Auth}
|
|
102
|
+
CheckAuth -->|Not Auth| Login[Navigate to Login]
|
|
103
|
+
CheckAuth -->|Authed| LoadData[Load Data]
|
|
104
|
+
LoadData --> Render[Render UI]
|
|
105
|
+
Render --> End([End])
|
|
106
|
+
|
|
107
|
+
LoadData -->|Call| API1[API fetchData - Query API]
|
|
108
|
+
LoadData -->|Call| Cache[Load from Cache]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Flow Description:**
|
|
112
|
+
|
|
113
|
+
| Step | Business Operation | Trigger | Source |
|
|
114
|
+
|------|-------------------|---------|--------|
|
|
115
|
+
| 1 | Initialize ViewModel | viewDidLoad/onCreate | [Source](../../{sourcePath}) |
|
|
116
|
+
| 2 | Check authentication | After init | [Source](../../{sourcePath}) |
|
|
117
|
+
| 3 | Load data | Auth passed | [Source](../../{sourcePath}) |
|
|
118
|
+
| 4 | Render UI | Data loaded | [Source](../../{sourcePath}) |
|
|
119
|
+
|
|
120
|
+
### 3.2 User Interaction Flows
|
|
121
|
+
|
|
122
|
+
#### 3.2.1 {Event Name: e.g., List Item onTap}
|
|
123
|
+
|
|
124
|
+
```mermaid
|
|
125
|
+
graph TB
|
|
126
|
+
Tap[User Tap] --> CheckType{Item Type}
|
|
127
|
+
CheckType -->|Detail| Navigate[Push Detail Screen]
|
|
128
|
+
CheckType -->|Action| ShowAction[Show Action Sheet]
|
|
129
|
+
Navigate --> LoadDetail[Load Detail Data]
|
|
130
|
+
ShowAction --> HandleAction[Handle Selected Action]
|
|
131
|
+
|
|
132
|
+
LoadDetail -->|Call| API2[API getDetail - Query API]
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Flow Description:**
|
|
136
|
+
|
|
137
|
+
| Step | Business Operation | Trigger | Source |
|
|
138
|
+
|------|-------------------|---------|--------|
|
|
139
|
+
| 1 | Detect tap | onTap | [Source](../../{sourcePath}) |
|
|
140
|
+
| 2 | Check item type | Tap detected | [Source](../../{sourcePath}) |
|
|
141
|
+
| 3 | Navigate or show actions | Based on type | [Source](../../{sourcePath}) |
|
|
142
|
+
|
|
143
|
+
#### 3.2.2 {Event Name: e.g., Pull to Refresh}
|
|
144
|
+
|
|
145
|
+
```mermaid
|
|
146
|
+
graph TB
|
|
147
|
+
Pull[Pull Down] --> Trigger{Threshold Met}
|
|
148
|
+
Trigger -->|Yes| Refresh[Trigger Refresh]
|
|
149
|
+
Trigger -->|No| Cancel[Cancel]
|
|
150
|
+
Refresh --> ShowLoading[Show Loading Indicator]
|
|
151
|
+
ShowLoading --> FetchData[Fetch Latest Data]
|
|
152
|
+
FetchData --> UpdateUI[Update List]
|
|
153
|
+
FetchData -->|Call| API3[API refreshData - Query API]
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 3.3 Lifecycle Events
|
|
157
|
+
|
|
158
|
+
```mermaid
|
|
159
|
+
graph TB
|
|
160
|
+
subgraph ScreenLifecycle["Screen Lifecycle"]
|
|
161
|
+
Create[viewDidLoad/onCreate] --> Appear[viewWillAppear/onStart]
|
|
162
|
+
Appear --> Active[viewDidAppear/onResume]
|
|
163
|
+
Active --> Disappear[viewWillDisappear/onPause]
|
|
164
|
+
Disappear --> Inactive[viewDidDisappear/onStop]
|
|
165
|
+
Inactive --> Destroy[deinit/onDestroy]
|
|
166
|
+
end
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Lifecycle Handlers:**
|
|
170
|
+
|
|
171
|
+
| Event | Platform | Handler | Purpose | Source |
|
|
172
|
+
|-------|----------|---------|---------|--------|
|
|
173
|
+
| Create | iOS | viewDidLoad | Initial setup | [Source](../../{sourcePath}) |
|
|
174
|
+
| Create | Android | onCreate | Initial setup | [Source](../../{sourcePath}) |
|
|
175
|
+
| Appear | iOS | viewWillAppear | Prepare data | [Source](../../{sourcePath}) |
|
|
176
|
+
| Appear | Android | onStart | Prepare data | [Source](../../{sourcePath}) |
|
|
177
|
+
| Destroy | iOS | deinit | Cleanup | [Source](../../{sourcePath}) |
|
|
178
|
+
| Destroy | Android | onDestroy | Cleanup | [Source](../../{sourcePath}) |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 4. Data Field Definition
|
|
183
|
+
|
|
184
|
+
### 4.1 Screen State Fields
|
|
185
|
+
|
|
186
|
+
| Field Name | Field Type | Description | Platform | Source |
|
|
187
|
+
|------------|------------|-------------|----------|--------|
|
|
188
|
+
| {Field 1} | String/Int/Boolean | {Description} | iOS/Android | [Source](../../{sourcePath}) |
|
|
189
|
+
| {isLoading} | Boolean | {Loading state} | iOS/Android | [Source](../../{sourcePath}) |
|
|
190
|
+
| {dataList} | Array | {List data source} | iOS/Android | [Source](../../{sourcePath}) |
|
|
191
|
+
|
|
192
|
+
### 4.2 Form Fields (if applicable)
|
|
193
|
+
|
|
194
|
+
| Field Name | Field Type | Validation | Input Type | Source |
|
|
195
|
+
|------------|------------|------------|------------|--------|
|
|
196
|
+
| {Field 1} | String | {Required} | TextField/EditText | [Source](../../{sourcePath}) |
|
|
197
|
+
| {Field 2} | String | {Email format} | Keyboard: Email | [Source](../../{sourcePath}) |
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## 5. References
|
|
202
|
+
|
|
203
|
+
### 5.1 APIs
|
|
204
|
+
|
|
205
|
+
| API Name | Type | Main Function | Source | Document Path |
|
|
206
|
+
|----------|------|---------------|--------|---------------|
|
|
207
|
+
| {API Name} | Query/Mutation | {Brief description} | [Source](../../{apiSourcePath}) | [API Doc](../../apis/{api-name}.md) |
|
|
208
|
+
|
|
209
|
+
### 5.2 Native Components/Views
|
|
210
|
+
|
|
211
|
+
| Component | Platform | Type | Main Function | Source | Document Path |
|
|
212
|
+
|-----------|----------|------|---------------|--------|---------------|
|
|
213
|
+
| {UITableView/RecyclerView} | iOS/Android | List | {Display scrollable list} | [Source](../../{componentSourcePath}) | [Component Doc](../../components/{component-name}.md) |
|
|
214
|
+
| {UICollectionView} | iOS | Grid | {Display grid layout} | [Source](../../{componentSourcePath}) | [Component Doc](../../components/{component-name}.md) |
|
|
215
|
+
|
|
216
|
+
### 5.3 Other Screens
|
|
217
|
+
|
|
218
|
+
| Screen Name | Relation Type | Description | Source | Document Path |
|
|
219
|
+
|-------------|---------------|-------------|--------|---------------|
|
|
220
|
+
| {Screen Name} | Push/Modal | {Navigation description} | [Source](../../{screenSourcePath}) | [Screen Doc](../{screen-path}.md) |
|
|
221
|
+
|
|
222
|
+
### 5.4 Referenced By
|
|
223
|
+
|
|
224
|
+
| Screen Name | Function Description | Source Path | Document Path |
|
|
225
|
+
|-------------|---------------------|-------------|---------------|
|
|
226
|
+
| {Referencing Screen} | {e.g., "Tap item to navigate to this screen"} | {source-path} | [Screen Doc](../{screen-path}.md) |
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## 6. Business Rule Constraints
|
|
231
|
+
|
|
232
|
+
### 6.1 Permission Rules
|
|
233
|
+
|
|
234
|
+
| Operation | Permission Requirement | No Permission Handling | Source |
|
|
235
|
+
|-----------|----------------------|----------------------|--------|
|
|
236
|
+
| View screen | {Authentication required} | Navigate to login | [Source](../../{sourcePath}) |
|
|
237
|
+
| Perform action | {Role/Permission required} | Hide button / Show alert | [Source](../../{sourcePath}) |
|
|
238
|
+
|
|
239
|
+
### 6.2 Mobile-Specific Rules
|
|
240
|
+
|
|
241
|
+
1. **Offline Support**: {e.g., Cache data for offline viewing} | [Source](../../{sourcePath})
|
|
242
|
+
2. **Network Detection**: {e.g., Show offline banner when no connection} | [Source](../../{sourcePath})
|
|
243
|
+
3. **Loading States**: {e.g., Show skeleton screens during load} | [Source](../../{sourcePath})
|
|
244
|
+
|
|
245
|
+
### 6.3 Validation Rules
|
|
246
|
+
|
|
247
|
+
| Scenario | Rule | Error Handling | Source |
|
|
248
|
+
|----------|------|----------------|--------|
|
|
249
|
+
| Form input | {Validation rule} | Show inline error / Toast | [Source](../../{sourcePath}) |
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## 7. Notes and Additional Information
|
|
254
|
+
|
|
255
|
+
### 7.1 Platform Adaptation
|
|
256
|
+
|
|
257
|
+
- **iOS**: Follow Human Interface Guidelines, support Dynamic Type
|
|
258
|
+
- **Android**: Follow Material Design, support different screen densities
|
|
259
|
+
- **Safe Area**: Handle notch, home indicator, status bar
|
|
260
|
+
|
|
261
|
+
### 7.2 Performance Considerations
|
|
262
|
+
|
|
263
|
+
- **List Optimization**: Use cell reuse, lazy loading
|
|
264
|
+
- **Image Loading**: Use placeholder, progressive loading
|
|
265
|
+
- **Memory Management**: Release resources on screen close
|
|
266
|
+
|
|
267
|
+
### 7.3 Pending Confirmations
|
|
268
|
+
|
|
269
|
+
- [ ] **{Pending 1}**: {e.g., Whether to support dark mode}
|
|
270
|
+
- [ ] **{Pending 2}**: {e.g., Whether to add haptic feedback}
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
**Document Status:** 📝 Draft / 👀 In Review / ✅ Published
|
|
275
|
+
**Last Updated:** {Date}
|
|
276
|
+
**Maintainer:** {Name}
|
|
277
|
+
**Related Module Document:** [Module Overview Document](../{{module-name}}-overview.md)
|
|
278
|
+
|
|
279
|
+
**Section Source**
|
|
280
|
+
- [{ViewController}.swift/{Activity}.kt](../../{sourcePath})
|
|
281
|
+
- [{ViewModel}.swift/{ViewModel}.kt](../../{viewModelPath})
|