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,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-sd-frontend
|
|
3
|
+
description: Frontend System Design SOP. Guide System Designer Agent to generate platform-specific frontend detailed design documents by filling technology implementation details into the Feature Spec skeleton. Reads techs knowledge to determine actual framework syntax and conventions.
|
|
4
|
+
tools: Read, Write, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Trigger Scenarios
|
|
8
|
+
|
|
9
|
+
- System Designer Agent dispatches this skill with platform context (platform_id, techs paths, Feature Spec paths)
|
|
10
|
+
- Feature Spec has been confirmed, user requests frontend system design
|
|
11
|
+
- User asks "Create frontend design for this platform" or "Generate frontend module design"
|
|
12
|
+
|
|
13
|
+
# Workflow
|
|
14
|
+
|
|
15
|
+
## Step 1: Read Inputs
|
|
16
|
+
|
|
17
|
+
Read in order:
|
|
18
|
+
|
|
19
|
+
1. **Feature Spec document(s)**: `speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/[feature-name]-feature-spec.md`
|
|
20
|
+
2. **API Contract**: `speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/[feature-name]-api-contract.md`
|
|
21
|
+
3. **Frontend techs knowledge** (paths from agent context):
|
|
22
|
+
- `speccrew-workspace/knowledges/techs/{platform_id}/tech-stack.md`
|
|
23
|
+
- `speccrew-workspace/knowledges/techs/{platform_id}/architecture.md`
|
|
24
|
+
- `speccrew-workspace/knowledges/techs/{platform_id}/conventions-design.md`
|
|
25
|
+
- `speccrew-workspace/knowledges/techs/{platform_id}/conventions-dev.md`
|
|
26
|
+
- `speccrew-workspace/knowledges/techs/{platform_id}/ui-style/ui-style-guide.md` (if exists)
|
|
27
|
+
4. **Design template**: `speccrew-sd-frontend/templates/SD-FRONTEND-TEMPLATE.md`
|
|
28
|
+
5. **Index template**: `speccrew-sd-frontend/templates/INDEX-TEMPLATE.md`
|
|
29
|
+
|
|
30
|
+
## Step 2: Analyze Existing Code Structure
|
|
31
|
+
|
|
32
|
+
Use Glob/Grep to understand current codebase:
|
|
33
|
+
|
|
34
|
+
| Target | Glob Pattern | Purpose |
|
|
35
|
+
|--------|-------------|---------|
|
|
36
|
+
| Component directory | `src/components/**/*.vue` or `src/components/**/*.tsx` | Understand component organization |
|
|
37
|
+
| Shared/base components | `src/components/base/**/*` | Identify reusable components |
|
|
38
|
+
| State management | `src/stores/**/*.ts` or `src/store/**/*.ts` | Understand store pattern |
|
|
39
|
+
| Router configuration | `src/router/**/*.ts` | Understand routing structure |
|
|
40
|
+
| API layer | `src/apis/**/*.ts` or `src/api/**/*.ts` | Understand API encapsulation pattern |
|
|
41
|
+
| Naming conventions | Various | Identify actual naming patterns in use |
|
|
42
|
+
|
|
43
|
+
Document findings for reference in later steps.
|
|
44
|
+
|
|
45
|
+
## Step 3: Extract Functions from Feature Spec
|
|
46
|
+
|
|
47
|
+
Parse Feature Spec to identify all functions (Section 2.N pattern).
|
|
48
|
+
|
|
49
|
+
For each function, extract:
|
|
50
|
+
|
|
51
|
+
| Aspect | Content to Extract |
|
|
52
|
+
|--------|-------------------|
|
|
53
|
+
| Frontend prototype | ASCII wireframe from Feature Spec |
|
|
54
|
+
| Interaction flow | User actions and system responses |
|
|
55
|
+
| Backend API calls | Required API endpoints from API Contract |
|
|
56
|
+
| Data requirements | Fields and structures needed |
|
|
57
|
+
|
|
58
|
+
Mark each function's components as:
|
|
59
|
+
|
|
60
|
+
| Marker | Meaning | Example |
|
|
61
|
+
|--------|---------|---------|
|
|
62
|
+
| `[EXISTING]` | Reuse current component/store | `[EXISTING] UserSelect component` |
|
|
63
|
+
| `[MODIFIED]` | Enhance/change existing | `[MODIFIED] OrderTable - add new column` |
|
|
64
|
+
| `[NEW]` | Create brand new | `[NEW] ProductDetailDrawer` |
|
|
65
|
+
|
|
66
|
+
**Checkpoint A: Present function extraction summary to user for confirmation.**
|
|
67
|
+
|
|
68
|
+
## Step 4: Generate Module Design Documents
|
|
69
|
+
|
|
70
|
+
For each function (or logical group of closely related functions = one module):
|
|
71
|
+
|
|
72
|
+
### 4.1 Read Template
|
|
73
|
+
|
|
74
|
+
Read `SD-FRONTEND-TEMPLATE.md` for document structure.
|
|
75
|
+
|
|
76
|
+
### 4.2 Fill Technology-Specific Details
|
|
77
|
+
|
|
78
|
+
Fill each section with technology-specific implementation details:
|
|
79
|
+
|
|
80
|
+
| Section | Technology-Specific Content |
|
|
81
|
+
|---------|----------------------------|
|
|
82
|
+
| Component tree | Use actual framework patterns (Vue 3 Composition API / React Hooks / etc.) |
|
|
83
|
+
| Props/Emits | TypeScript types from conventions-dev.md |
|
|
84
|
+
| State management | Actual store pattern (Pinia/Vuex/Redux/Zustand) |
|
|
85
|
+
| API layer | Actual request library and interceptor patterns |
|
|
86
|
+
| Routing | Actual router config format |
|
|
87
|
+
| Pseudo-code | MUST use actual framework syntax from techs knowledge |
|
|
88
|
+
|
|
89
|
+
### 4.3 Write Module Design
|
|
90
|
+
|
|
91
|
+
Write to: `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/{module}-design.md`
|
|
92
|
+
|
|
93
|
+
**Key Rules for Pseudo-code**:
|
|
94
|
+
- MUST use actual framework API syntax from techs knowledge
|
|
95
|
+
- NOT generic pseudo-code
|
|
96
|
+
- Include actual import statements
|
|
97
|
+
- Use actual store/API patterns from conventions
|
|
98
|
+
|
|
99
|
+
## Step 5: Generate Platform INDEX.md
|
|
100
|
+
|
|
101
|
+
After all module designs are complete:
|
|
102
|
+
|
|
103
|
+
### 5.1 Read Template
|
|
104
|
+
|
|
105
|
+
Read `INDEX-TEMPLATE.md` for document structure.
|
|
106
|
+
|
|
107
|
+
### 5.2 Fill Platform-Level Summary
|
|
108
|
+
|
|
109
|
+
| Section | Content Source |
|
|
110
|
+
|---------|---------------|
|
|
111
|
+
| Tech stack summary | tech-stack.md |
|
|
112
|
+
| Shared design decisions | architecture.md, conventions-design.md |
|
|
113
|
+
| Global state strategy | architecture.md state management section |
|
|
114
|
+
| Base components | conventions-design.md shared components |
|
|
115
|
+
| API interceptor config | conventions-dev.md HTTP client section |
|
|
116
|
+
| Auth pattern | architecture.md authentication section |
|
|
117
|
+
|
|
118
|
+
### 5.3 Build Module List
|
|
119
|
+
|
|
120
|
+
Create table with links to each module design document.
|
|
121
|
+
|
|
122
|
+
### 5.4 Write INDEX
|
|
123
|
+
|
|
124
|
+
Write to: `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/INDEX.md`
|
|
125
|
+
|
|
126
|
+
## Step 6: Present Summary
|
|
127
|
+
|
|
128
|
+
Present to user:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Frontend System Design Summary for: {feature-name}
|
|
132
|
+
Platform: {platform_id}
|
|
133
|
+
|
|
134
|
+
Module Design Documents: {count}
|
|
135
|
+
├── {module1}-design.md
|
|
136
|
+
├── {module2}-design.md
|
|
137
|
+
└── ...
|
|
138
|
+
|
|
139
|
+
Key Design Decisions:
|
|
140
|
+
- State Management: {approach}
|
|
141
|
+
- Component Strategy: {approach}
|
|
142
|
+
- API Layer: {approach}
|
|
143
|
+
|
|
144
|
+
Concerns/Trade-offs:
|
|
145
|
+
- {list any concerns}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Ask user to confirm:**
|
|
149
|
+
1. Are the component architectures appropriate?
|
|
150
|
+
2. Is the state management strategy correct?
|
|
151
|
+
3. Do the pseudo-code patterns match project conventions?
|
|
152
|
+
4. Are all API calls from API Contract covered?
|
|
153
|
+
|
|
154
|
+
# Key Rules
|
|
155
|
+
|
|
156
|
+
| Rule | Description |
|
|
157
|
+
|------|-------------|
|
|
158
|
+
| **Actual Framework Syntax** | All pseudo-code MUST use actual framework/library syntax from techs knowledge, NOT generic code |
|
|
159
|
+
| **API Contract READ-ONLY** | API Contract is reference only - do not modify |
|
|
160
|
+
| **One Module Per Function Group** | Each module design document maps to one or more related Feature Spec functions |
|
|
161
|
+
| **Status Markers Required** | Use [EXISTING], [MODIFIED], [NEW] markers for all components and store modules |
|
|
162
|
+
| **Follow Techs Conventions** | Naming, directory structure, patterns must follow techs knowledge |
|
|
163
|
+
|
|
164
|
+
# Checklist
|
|
165
|
+
|
|
166
|
+
- [ ] All techs knowledge documents loaded before design
|
|
167
|
+
- [ ] Existing code structure analyzed via Glob/Grep
|
|
168
|
+
- [ ] Every Feature Spec function covered in a module design
|
|
169
|
+
- [ ] All API calls from API Contract referenced correctly
|
|
170
|
+
- [ ] Pseudo-code uses actual framework syntax (not generic)
|
|
171
|
+
- [ ] Component naming follows conventions-dev.md
|
|
172
|
+
- [ ] State management follows architecture.md patterns
|
|
173
|
+
- [ ] Directory structure follows conventions-design.md
|
|
174
|
+
- [ ] INDEX.md generated with complete module list
|
|
175
|
+
- [ ] All files written to correct paths under 03.system-design/{platform_id}/
|
|
176
|
+
- [ ] Checkpoint A passed: function extraction confirmed with user
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# Frontend System Design Index - {PlatformId}
|
|
2
|
+
|
|
3
|
+
> Platform: {PlatformId} | Framework: {Framework} | Language: {Language}
|
|
4
|
+
> Feature Spec: {FeatureSpecPath}
|
|
5
|
+
> Generated: {Timestamp}
|
|
6
|
+
|
|
7
|
+
## 1. Platform Tech Stack Summary
|
|
8
|
+
|
|
9
|
+
<!-- AI-NOTE: Fill from techs knowledge tech-stack.md -->
|
|
10
|
+
|
|
11
|
+
| Category | Technology | Version | Purpose |
|
|
12
|
+
|----------|-----------|---------|---------|
|
|
13
|
+
| Framework | {e.g., Vue 3} | {version} | Core UI framework |
|
|
14
|
+
| State Management | {e.g., Pinia} | {version} | Global state management |
|
|
15
|
+
| Router | {e.g., Vue Router 4} | {version} | Client-side routing |
|
|
16
|
+
| HTTP Client | {e.g., Axios} | {version} | API request handling |
|
|
17
|
+
| UI Library | {e.g., Element Plus} | {version} | Component library |
|
|
18
|
+
| Build Tool | {e.g., Vite} | {version} | Build and dev server |
|
|
19
|
+
| Language | {e.g., TypeScript} | {version} | Type-safe development |
|
|
20
|
+
|
|
21
|
+
## 2. Shared Design Decisions
|
|
22
|
+
|
|
23
|
+
<!-- AI-NOTE: Fill from architecture.md and conventions-design.md -->
|
|
24
|
+
|
|
25
|
+
### 2.1 Global State Strategy
|
|
26
|
+
|
|
27
|
+
<!-- AI-NOTE: Describe global state management approach, shared stores pattern -->
|
|
28
|
+
|
|
29
|
+
{Description of global state management approach}
|
|
30
|
+
|
|
31
|
+
**Shared Stores**:
|
|
32
|
+
|
|
33
|
+
| Store | Path | Purpose | Used By Modules |
|
|
34
|
+
|-------|------|---------|-----------------|
|
|
35
|
+
| {store-name} | `{path}` | {purpose} | {module list} |
|
|
36
|
+
|
|
37
|
+
### 2.2 Base Components
|
|
38
|
+
|
|
39
|
+
<!-- AI-NOTE: List base/shared components that modules should reuse -->
|
|
40
|
+
|
|
41
|
+
| Component | Path | Purpose | Used By |
|
|
42
|
+
|-----------|------|---------|---------|
|
|
43
|
+
| {BaseButton} | `@/components/base/BaseButton.vue` | {purpose} | {which modules} |
|
|
44
|
+
| {BaseTable} | `@/components/base/BaseTable.vue` | {purpose} | {which modules} |
|
|
45
|
+
| {BaseForm} | `@/components/base/BaseForm.vue` | {purpose} | {which modules} |
|
|
46
|
+
|
|
47
|
+
### 2.3 API Interceptor Configuration
|
|
48
|
+
|
|
49
|
+
<!-- AI-NOTE: Describe request/response interceptors, auth token handling, error handling -->
|
|
50
|
+
|
|
51
|
+
**Request Interceptor**:
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
// AI-NOTE: Simplified example - use actual pattern from conventions-dev.md
|
|
55
|
+
request.interceptors.request.use((config) => {
|
|
56
|
+
// Add auth token
|
|
57
|
+
const token = useAuthStore().token
|
|
58
|
+
if (token) {
|
|
59
|
+
config.headers.Authorization = `Bearer ${token}`
|
|
60
|
+
}
|
|
61
|
+
return config
|
|
62
|
+
})
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Response Interceptor**:
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
// AI-NOTE: Simplified example - use actual pattern from conventions-dev.md
|
|
69
|
+
request.interceptors.response.use(
|
|
70
|
+
(response) => response.data,
|
|
71
|
+
(error) => {
|
|
72
|
+
// Handle common errors (401, 403, 500, etc.)
|
|
73
|
+
if (error.response?.status === 401) {
|
|
74
|
+
// Redirect to login
|
|
75
|
+
}
|
|
76
|
+
return Promise.reject(error)
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Common Error Handling**:
|
|
82
|
+
|
|
83
|
+
| HTTP Status | Error Code | Handling |
|
|
84
|
+
|-------------|-----------|----------|
|
|
85
|
+
| 401 | UNAUTHORIZED | Redirect to login page |
|
|
86
|
+
| 403 | FORBIDDEN | Show permission denied message |
|
|
87
|
+
| 500 | INTERNAL_ERROR | Show server error toast |
|
|
88
|
+
|
|
89
|
+
### 2.4 Authentication Pattern
|
|
90
|
+
|
|
91
|
+
<!-- AI-NOTE: Describe how auth state is managed, route guards, token refresh -->
|
|
92
|
+
|
|
93
|
+
**Auth Flow**:
|
|
94
|
+
|
|
95
|
+
1. User logs in → Store token in auth store + localStorage
|
|
96
|
+
2. Route guard checks auth state before protected routes
|
|
97
|
+
3. Token refresh mechanism (if applicable)
|
|
98
|
+
4. Logout clears auth state and redirects
|
|
99
|
+
|
|
100
|
+
**Route Guard**:
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
// AI-NOTE: Example - use actual pattern from architecture.md
|
|
104
|
+
router.beforeEach((to, from, next) => {
|
|
105
|
+
const authStore = useAuthStore()
|
|
106
|
+
if (to.meta.requiresAuth && !authStore.isAuthenticated) {
|
|
107
|
+
next({ name: 'Login', query: { redirect: to.fullPath } })
|
|
108
|
+
} else {
|
|
109
|
+
next()
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## 3. Module Design Index
|
|
115
|
+
|
|
116
|
+
<!-- AI-NOTE: List all module design documents generated for this platform -->
|
|
117
|
+
|
|
118
|
+
| Module | Scope | Components | APIs | Status | Document |
|
|
119
|
+
|--------|-------|------------|------|--------|----------|
|
|
120
|
+
| {module-name} | {brief scope} | {count} | {count} | [NEW]/[MODIFIED] | [{module-name}-design.md](./{module-name}-design.md) |
|
|
121
|
+
|
|
122
|
+
**Status Legend**:
|
|
123
|
+
- [NEW]: All components and stores are newly created
|
|
124
|
+
- [MODIFIED]: Some existing components/stores are modified
|
|
125
|
+
|
|
126
|
+
## 4. Cross-Module Interaction Notes
|
|
127
|
+
|
|
128
|
+
<!-- AI-NOTE: Describe any shared state, event bus patterns, or cross-module dependencies -->
|
|
129
|
+
|
|
130
|
+
**Shared State**:
|
|
131
|
+
|
|
132
|
+
| Shared Data | Source Store | Consumer Modules | Access Pattern |
|
|
133
|
+
|-------------|-------------|------------------|----------------|
|
|
134
|
+
| {data} | {store} | {modules} | {how accessed} |
|
|
135
|
+
|
|
136
|
+
**Cross-Module Events**:
|
|
137
|
+
|
|
138
|
+
| Event | Publisher | Subscriber | Payload |
|
|
139
|
+
|-------|-----------|------------|---------|
|
|
140
|
+
| {event-name} | {module} | {module} | {type} |
|
|
141
|
+
|
|
142
|
+
**Module Dependencies**:
|
|
143
|
+
|
|
144
|
+
```mermaid
|
|
145
|
+
graph LR
|
|
146
|
+
A[ModuleA] --> B[ModuleB]
|
|
147
|
+
A --> C[SharedStore]
|
|
148
|
+
B --> C
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## 5. Directory Structure Impact
|
|
152
|
+
|
|
153
|
+
<!-- AI-NOTE: Show new directories and files to be created/modified -->
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
src/
|
|
157
|
+
├── views/
|
|
158
|
+
│ └── {ModuleName}/
|
|
159
|
+
│ ├── {PageName}.vue # [NEW]
|
|
160
|
+
│ └── components/
|
|
161
|
+
│ ├── {Component1}.vue # [NEW]
|
|
162
|
+
│ └── {Component2}.vue # [MODIFIED]
|
|
163
|
+
├── components/
|
|
164
|
+
│ └── {SharedComponent}/ # [MODIFIED]
|
|
165
|
+
├── stores/
|
|
166
|
+
│ └── {store-name}.ts # [NEW]/[MODIFIED]
|
|
167
|
+
├── apis/
|
|
168
|
+
│ └── {module}.ts # [NEW]
|
|
169
|
+
├── router/
|
|
170
|
+
│ └── modules/
|
|
171
|
+
│ └── {module}.ts # [NEW]/[MODIFIED]
|
|
172
|
+
└── types/
|
|
173
|
+
└── {module}.ts # [NEW]
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Legend**:
|
|
177
|
+
- [NEW]: New file/directory to create
|
|
178
|
+
- [MODIFIED]: Existing file to modify
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
**Document Status**: Draft / In Review / Published
|
|
183
|
+
**Last Updated**: {Date}
|
|
184
|
+
**Related Feature Spec**: [{Feature Name}]({FeatureSpecPath})
|