ai-flow-dev 2.1.3 → 2.1.4
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/README.md +25 -38
- package/dist/cli.js +68 -46
- package/dist/cli.js.map +1 -1
- package/package.json +5 -5
- package/prompts/backend/flow-build-phase-0.md +31 -63
- package/prompts/backend/flow-build-phase-1.md +9 -17
- package/prompts/backend/flow-build-phase-10.md +199 -585
- package/prompts/backend/flow-build-phase-2.md +152 -86
- package/prompts/backend/flow-build-phase-3.md +108 -68
- package/prompts/backend/flow-build-phase-4.md +5 -8
- package/prompts/backend/flow-build-phase-5.md +39 -12
- package/prompts/backend/flow-build-phase-6.md +29 -8
- package/prompts/backend/flow-build-phase-7.md +120 -40
- package/prompts/backend/flow-build-phase-8.md +28 -65
- package/prompts/backend/flow-build-phase-9.md +267 -1298
- package/prompts/backend/flow-build.md +881 -957
- package/prompts/backend/flow-dev-commit.md +27 -50
- package/prompts/backend/flow-dev-feature.md +1929 -2017
- package/prompts/backend/flow-dev-fix.md +936 -964
- package/prompts/backend/flow-dev-refactor.md +672 -701
- package/prompts/backend/flow-dev-review.md +356 -389
- package/prompts/backend/flow-dev-work.md +1066 -1118
- package/prompts/backend/flow-docs-sync.md +20 -196
- package/prompts/frontend/flow-build-phase-0.md +503 -484
- package/prompts/frontend/flow-build-phase-1.md +445 -433
- package/prompts/frontend/flow-build-phase-2.md +910 -957
- package/prompts/frontend/flow-build-phase-3.md +692 -664
- package/prompts/frontend/flow-build-phase-4.md +478 -463
- package/prompts/frontend/flow-build-phase-5.md +488 -467
- package/prompts/frontend/flow-build-phase-6.md +571 -550
- package/prompts/frontend/flow-build-phase-7.md +560 -592
- package/prompts/frontend/flow-build-phase-8.md +17 -42
- package/prompts/frontend/flow-build.md +457 -503
- package/prompts/frontend/flow-docs-sync.md +14 -35
- package/prompts/mobile/flow-build-phase-0.md +104 -97
- package/prompts/mobile/flow-build-phase-1.md +137 -122
- package/prompts/mobile/flow-build-phase-2.md +123 -130
- package/prompts/mobile/flow-build-phase-3.md +144 -149
- package/prompts/mobile/flow-build-phase-4.md +140 -132
- package/prompts/mobile/flow-build-phase-5.md +70 -70
- package/prompts/mobile/flow-build-phase-6.md +136 -134
- package/prompts/mobile/flow-build-phase-7.md +24 -58
- package/prompts/mobile/flow-build-phase-8.md +17 -42
- package/prompts/mobile/flow-build.md +47 -97
- package/prompts/mobile/flow-docs-sync.md +13 -32
- package/prompts/shared/mermaid-guidelines.md +106 -0
- package/prompts/shared/scope-levels.md +126 -0
- package/prompts/shared/story-points.md +65 -0
- package/prompts/shared/task-format.md +86 -0
- package/templates/AGENT.template.md +194 -15
- package/templates/backend/README.template.md +2 -32
- package/templates/backend/ai-instructions.template.md +2 -32
- package/templates/backend/copilot-instructions.template.md +2 -22
- package/templates/backend/docs/api.template.md +89 -20
- package/templates/backend/docs/architecture.template.md +165 -53
- package/templates/backend/docs/business-flows.template.md +7 -14
- package/templates/backend/docs/code-standards.template.md +2 -38
- package/templates/backend/docs/contributing.template.md +2 -16
- package/templates/backend/docs/data-model.template.md +125 -21
- package/templates/backend/docs/operations.template.md +179 -50
- package/templates/backend/docs/testing.template.md +2 -42
- package/templates/backend/project-brief.template.md +2 -28
- package/templates/backend/specs/configuration.template.md +2 -14
- package/templates/backend/specs/security.template.md +2 -32
- package/templates/frontend/README.template.md +2 -18
- package/templates/frontend/ai-instructions.template.md +2 -20
- package/templates/frontend/docs/api-integration.template.md +12 -30
- package/templates/frontend/docs/components.template.md +2 -28
- package/templates/frontend/docs/error-handling.template.md +11 -27
- package/templates/frontend/docs/operations.template.md +8 -18
- package/templates/frontend/docs/performance.template.md +8 -18
- package/templates/frontend/docs/pwa.template.md +8 -18
- package/templates/frontend/docs/state-management.template.md +2 -28
- package/templates/frontend/docs/styling.template.md +2 -26
- package/templates/frontend/docs/testing.template.md +2 -28
- package/templates/frontend/project-brief.template.md +2 -16
- package/templates/frontend/specs/accessibility.template.md +8 -18
- package/templates/frontend/specs/configuration.template.md +2 -24
- package/templates/frontend/specs/security.template.md +10 -24
- package/templates/fullstack/README.template.md +17 -47
- package/templates/fullstack/ai-instructions.template.md +17 -45
- package/templates/fullstack/project-brief.template.md +16 -42
- package/templates/fullstack/specs/configuration.template.md +16 -42
- package/templates/mobile/README.template.md +11 -29
- package/templates/mobile/ai-instructions.template.md +11 -27
- package/templates/mobile/docs/app-store.template.md +11 -29
- package/templates/mobile/docs/architecture.template.md +14 -38
- package/templates/mobile/docs/native-features.template.md +16 -44
- package/templates/mobile/docs/navigation.template.md +9 -23
- package/templates/mobile/docs/offline-strategy.template.md +10 -26
- package/templates/mobile/docs/permissions.template.md +9 -23
- package/templates/mobile/docs/state-management.template.md +12 -32
- package/templates/mobile/docs/testing.template.md +14 -38
- package/templates/mobile/project-brief.template.md +12 -30
- package/templates/mobile/specs/build-configuration.template.md +10 -26
- package/templates/mobile/specs/deployment.template.md +9 -23
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# Project Brief
|
|
2
2
|
|
|
3
3
|
> Business context and objectives for {{PROJECT_NAME}}
|
|
4
|
-
|
|
5
4
|
---
|
|
6
|
-
|
|
7
5
|
## 🎯 Project Overview
|
|
8
6
|
|
|
9
7
|
### What Problem Are We Solving?
|
|
@@ -13,9 +11,7 @@
|
|
|
13
11
|
### Description
|
|
14
12
|
|
|
15
13
|
{{PROJECT_DESCRIPTION}}
|
|
16
|
-
|
|
17
14
|
---
|
|
18
|
-
|
|
19
15
|
## 👥 Target Users
|
|
20
16
|
|
|
21
17
|
{{TARGET_USERS_DESCRIPTION}}
|
|
@@ -24,9 +20,7 @@
|
|
|
24
20
|
{{#EACH TARGET_USER}}
|
|
25
21
|
- **{{USER_TYPE}}**: {{USER_DESCRIPTION}}
|
|
26
22
|
{{/EACH}}
|
|
27
|
-
|
|
28
23
|
---
|
|
29
|
-
|
|
30
24
|
## 🎯 Business Objectives
|
|
31
25
|
|
|
32
26
|
### Primary Objectives
|
|
@@ -36,9 +30,7 @@
|
|
|
36
30
|
- {{OBJECTIVE_DESCRIPTION}}
|
|
37
31
|
- Success metric: {{SUCCESS_METRIC}}
|
|
38
32
|
{{/EACH}}
|
|
39
|
-
|
|
40
33
|
---
|
|
41
|
-
|
|
42
34
|
## ✅ Scope
|
|
43
35
|
|
|
44
36
|
### In Scope
|
|
@@ -56,9 +48,7 @@
|
|
|
56
48
|
{{#EACH OUT_OF_SCOPE_FEATURE}}
|
|
57
49
|
- **{{FEATURE_NAME}}**: {{REASON_OUT_OF_SCOPE}}
|
|
58
50
|
{{/EACH}}
|
|
59
|
-
|
|
60
51
|
---
|
|
61
|
-
|
|
62
52
|
## 🚧 Constraints
|
|
63
53
|
|
|
64
54
|
{{#EACH CONSTRAINT}}
|
|
@@ -69,9 +59,7 @@
|
|
|
69
59
|
**Impact:** {{CONSTRAINT_IMPACT}}
|
|
70
60
|
|
|
71
61
|
{{/EACH}}
|
|
72
|
-
|
|
73
62
|
---
|
|
74
|
-
|
|
75
63
|
## 📊 Success Metrics (KPIs)
|
|
76
64
|
|
|
77
65
|
### Technical Metrics
|
|
@@ -85,9 +73,7 @@
|
|
|
85
73
|
{{#EACH BUSINESS_METRIC}}
|
|
86
74
|
- **{{METRIC_NAME}}**: {{METRIC_TARGET}}
|
|
87
75
|
{{/EACH}}
|
|
88
|
-
|
|
89
76
|
---
|
|
90
|
-
|
|
91
77
|
## 🗓️ Project Context
|
|
92
78
|
|
|
93
79
|
**Current Phase:** {{PROJECT_PHASE}}
|
|
@@ -95,17 +81,13 @@
|
|
|
95
81
|
{{#IF TIMELINE}}**Estimated Timeline:** {{TIMELINE}}{{/IF}}
|
|
96
82
|
|
|
97
83
|
{{#IF BUDGET}}**Budget Constraints:** {{BUDGET}}{{/IF}}
|
|
98
|
-
|
|
99
84
|
---
|
|
100
|
-
|
|
101
85
|
## 🏢 Stakeholders
|
|
102
86
|
|
|
103
87
|
{{#EACH STAKEHOLDER}}
|
|
104
88
|
- **{{STAKEHOLDER_ROLE}}**: {{STAKEHOLDER_INTEREST}}
|
|
105
89
|
{{/EACH}}
|
|
106
|
-
|
|
107
90
|
---
|
|
108
|
-
|
|
109
91
|
## 🔄 Integration Points
|
|
110
92
|
|
|
111
93
|
**External Systems:**
|
|
@@ -119,17 +101,13 @@ None - This is a standalone system.
|
|
|
119
101
|
- Critical: {{IS_CRITICAL}}
|
|
120
102
|
{{/EACH}}
|
|
121
103
|
{{/IF}}
|
|
122
|
-
|
|
123
104
|
---
|
|
124
|
-
|
|
125
105
|
## 📋 Key Assumptions
|
|
126
106
|
|
|
127
107
|
{{#EACH ASSUMPTION}}
|
|
128
108
|
- {{ASSUMPTION_DESCRIPTION}}
|
|
129
109
|
{{/EACH}}
|
|
130
|
-
|
|
131
110
|
---
|
|
132
|
-
|
|
133
111
|
## ⚠️ Risks
|
|
134
112
|
|
|
135
113
|
{{#EACH RISK}}
|
|
@@ -144,9 +122,7 @@ None - This is a standalone system.
|
|
|
144
122
|
**Mitigation:** {{RISK_MITIGATION}}
|
|
145
123
|
|
|
146
124
|
{{/EACH}}
|
|
147
|
-
|
|
148
125
|
---
|
|
149
|
-
|
|
150
126
|
## 🎓 Domain Glossary
|
|
151
127
|
|
|
152
128
|
**Key terms and concepts:**
|
|
@@ -154,9 +130,7 @@ None - This is a standalone system.
|
|
|
154
130
|
{{#EACH GLOSSARY_TERM}}
|
|
155
131
|
- **{{TERM}}**: {{DEFINITION}}
|
|
156
132
|
{{/EACH}}
|
|
157
|
-
|
|
158
133
|
---
|
|
159
|
-
|
|
160
134
|
## 📚 References
|
|
161
135
|
|
|
162
136
|
{{#IF REFERENCES}}
|
|
@@ -166,11 +140,11 @@ None - This is a standalone system.
|
|
|
166
140
|
{{ELSE}}
|
|
167
141
|
No external references.
|
|
168
142
|
{{/IF}}
|
|
169
|
-
|
|
170
143
|
---
|
|
171
|
-
|
|
172
144
|
**Document Version:** 1.0
|
|
173
145
|
|
|
174
146
|
**Last Updated:** {{GENERATION_DATE}}
|
|
175
147
|
|
|
176
148
|
**Generated by:** AI Flow v1.0.0
|
|
149
|
+
|
|
150
|
+
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# Configuration Specifications
|
|
2
2
|
|
|
3
3
|
> Environment variables and configuration management for {{PROJECT_NAME}}
|
|
4
|
-
|
|
5
4
|
---
|
|
6
|
-
|
|
7
5
|
## 📋 Environment Variables
|
|
8
6
|
|
|
9
7
|
### Required Variables
|
|
@@ -35,9 +33,7 @@
|
|
|
35
33
|
**Example:** `{{VAR_EXAMPLE}}`
|
|
36
34
|
|
|
37
35
|
{{/EACH}}
|
|
38
|
-
|
|
39
36
|
---
|
|
40
|
-
|
|
41
37
|
## 🌍 Configuration by Environment
|
|
42
38
|
|
|
43
39
|
### Development
|
|
@@ -57,9 +53,7 @@
|
|
|
57
53
|
```bash
|
|
58
54
|
{{PRODUCTION_ENV_CONFIG}}
|
|
59
55
|
```
|
|
60
|
-
|
|
61
56
|
---
|
|
62
|
-
|
|
63
57
|
## 🔌 External Services
|
|
64
58
|
|
|
65
59
|
{{#EACH EXTERNAL_SERVICE}}
|
|
@@ -77,9 +71,7 @@
|
|
|
77
71
|
{{#IF SERVICE_FALLBACK}}**Fallback:** {{SERVICE_FALLBACK}}{{/IF}}
|
|
78
72
|
|
|
79
73
|
{{/EACH}}
|
|
80
|
-
|
|
81
74
|
---
|
|
82
|
-
|
|
83
75
|
## 💾 Database Configuration
|
|
84
76
|
|
|
85
77
|
```bash
|
|
@@ -90,9 +82,7 @@
|
|
|
90
82
|
- Min: {{DB_POOL_MIN}}
|
|
91
83
|
- Max: {{DB_POOL_MAX}}
|
|
92
84
|
- Idle Timeout: {{DB_IDLE_TIMEOUT}}ms
|
|
93
|
-
|
|
94
85
|
---
|
|
95
|
-
|
|
96
86
|
## 🔐 Secrets
|
|
97
87
|
|
|
98
88
|
**Never commit these variables:**
|
|
@@ -102,9 +92,7 @@
|
|
|
102
92
|
{{/EACH}}
|
|
103
93
|
|
|
104
94
|
**Storage:** {{SECRETS_STORAGE}}
|
|
105
|
-
|
|
106
95
|
---
|
|
107
|
-
|
|
108
96
|
## 🎚️ Feature Flags
|
|
109
97
|
|
|
110
98
|
{{#IF FEATURE_FLAGS}}
|
|
@@ -123,11 +111,11 @@
|
|
|
123
111
|
Feature flags not implemented yet.
|
|
124
112
|
|
|
125
113
|
{{/IF}}
|
|
126
|
-
|
|
127
114
|
---
|
|
128
|
-
|
|
129
115
|
**Document Version:** 1.0
|
|
130
116
|
|
|
131
117
|
**Last Updated:** {{GENERATION_DATE}}
|
|
132
118
|
|
|
133
119
|
**Generated by:** AI Flow v1.0.0
|
|
120
|
+
|
|
121
|
+
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# Security Specifications
|
|
2
2
|
|
|
3
3
|
> Security policies, authentication, authorization, and compliance for {{PROJECT_NAME}}
|
|
4
|
-
|
|
5
4
|
---
|
|
6
|
-
|
|
7
5
|
## 🔐 Authentication
|
|
8
6
|
|
|
9
7
|
### Method
|
|
@@ -53,9 +51,7 @@
|
|
|
53
51
|
**Scopes:** {{OAUTH_SCOPES}}
|
|
54
52
|
|
|
55
53
|
{{/IF}}
|
|
56
|
-
|
|
57
54
|
---
|
|
58
|
-
|
|
59
55
|
## 🛡️ Authorization
|
|
60
56
|
|
|
61
57
|
### Model
|
|
@@ -93,9 +89,7 @@
|
|
|
93
89
|
{{/EACH}}
|
|
94
90
|
|
|
95
91
|
{{/IF}}
|
|
96
|
-
|
|
97
92
|
---
|
|
98
|
-
|
|
99
93
|
## 🔑 Password Policy
|
|
100
94
|
|
|
101
95
|
**Requirements:**
|
|
@@ -113,9 +107,7 @@
|
|
|
113
107
|
```{{LANGUAGE}}
|
|
114
108
|
{{PASSWORD_HASHING_EXAMPLE}}
|
|
115
109
|
```
|
|
116
|
-
|
|
117
110
|
---
|
|
118
|
-
|
|
119
111
|
## 🚦 Rate Limiting
|
|
120
112
|
|
|
121
113
|
**Strategy:** {{RATE_LIMIT_STRATEGY}}
|
|
@@ -133,9 +125,7 @@
|
|
|
133
125
|
```{{LANGUAGE}}
|
|
134
126
|
{{RATE_LIMIT_IMPLEMENTATION}}
|
|
135
127
|
```
|
|
136
|
-
|
|
137
128
|
---
|
|
138
|
-
|
|
139
129
|
## 🌐 CORS Policy
|
|
140
130
|
|
|
141
131
|
**Allowed Origins:**
|
|
@@ -150,9 +140,7 @@
|
|
|
150
140
|
**Credentials:** {{CORS_CREDENTIALS}}
|
|
151
141
|
|
|
152
142
|
**Max Age:** {{CORS_MAX_AGE}} seconds
|
|
153
|
-
|
|
154
143
|
---
|
|
155
|
-
|
|
156
144
|
## 🔒 Data Encryption
|
|
157
145
|
|
|
158
146
|
### In Transit
|
|
@@ -184,9 +172,7 @@
|
|
|
184
172
|
**Status:** Not implemented yet
|
|
185
173
|
|
|
186
174
|
{{/IF}}
|
|
187
|
-
|
|
188
175
|
---
|
|
189
|
-
|
|
190
176
|
## 🛡️ Security Headers
|
|
191
177
|
|
|
192
178
|
{{#EACH SECURITY_HEADER}}
|
|
@@ -202,9 +188,7 @@
|
|
|
202
188
|
```{{LANGUAGE}}
|
|
203
189
|
{{SECURITY_HEADERS_IMPLEMENTATION}}
|
|
204
190
|
```
|
|
205
|
-
|
|
206
191
|
---
|
|
207
|
-
|
|
208
192
|
## ✅ Input Validation
|
|
209
193
|
|
|
210
194
|
**Library:** {{VALIDATION_LIBRARY}}
|
|
@@ -220,9 +204,7 @@
|
|
|
220
204
|
```{{LANGUAGE}}
|
|
221
205
|
{{INPUT_VALIDATION_EXAMPLE}}
|
|
222
206
|
```
|
|
223
|
-
|
|
224
207
|
---
|
|
225
|
-
|
|
226
208
|
## 🚫 Security Vulnerabilities Prevention
|
|
227
209
|
|
|
228
210
|
### SQL Injection
|
|
@@ -240,9 +222,7 @@
|
|
|
240
222
|
### CSRF (Cross-Site Request Forgery)
|
|
241
223
|
|
|
242
224
|
{{CSRF_PREVENTION_STRATEGY}}
|
|
243
|
-
|
|
244
225
|
---
|
|
245
|
-
|
|
246
226
|
## 📜 Compliance
|
|
247
227
|
|
|
248
228
|
{{#EACH COMPLIANCE_REQ}}
|
|
@@ -259,9 +239,7 @@
|
|
|
259
239
|
{{COMPLIANCE_IMPLEMENTATION}}
|
|
260
240
|
|
|
261
241
|
{{/EACH}}
|
|
262
|
-
|
|
263
242
|
---
|
|
264
|
-
|
|
265
243
|
## 📝 Audit Logging
|
|
266
244
|
|
|
267
245
|
**What We Log:**
|
|
@@ -275,9 +253,7 @@
|
|
|
275
253
|
```json
|
|
276
254
|
{{AUDIT_LOG_FORMAT}}
|
|
277
255
|
```
|
|
278
|
-
|
|
279
256
|
---
|
|
280
|
-
|
|
281
257
|
## 🔒 Secrets Management
|
|
282
258
|
|
|
283
259
|
**Tool:** {{SECRETS_MANAGER}}
|
|
@@ -290,9 +266,7 @@
|
|
|
290
266
|
**Access Policy:** {{SECRETS_ACCESS_POLICY}}
|
|
291
267
|
|
|
292
268
|
**Rotation:** {{SECRETS_ROTATION}}
|
|
293
|
-
|
|
294
269
|
---
|
|
295
|
-
|
|
296
270
|
## 🔑 API Keys Management
|
|
297
271
|
|
|
298
272
|
{{#IF API_KEYS_ENABLED}}
|
|
@@ -356,9 +330,7 @@
|
|
|
356
330
|
{{ELSE}}
|
|
357
331
|
**API Keys:** Not used - Authentication via JWT/Sessions only
|
|
358
332
|
{{/IF}}
|
|
359
|
-
|
|
360
333
|
---
|
|
361
|
-
|
|
362
334
|
## 🔍 Dependency Security
|
|
363
335
|
|
|
364
336
|
**Scanning Tool:** {{DEPENDENCY_SCANNER}}
|
|
@@ -401,9 +373,7 @@
|
|
|
401
373
|
- ✅ Regular security audits ({{AUDIT_FREQUENCY}})
|
|
402
374
|
- ❌ Don't ignore critical vulnerabilities
|
|
403
375
|
- ❌ Don't update without testing
|
|
404
|
-
|
|
405
376
|
---
|
|
406
|
-
|
|
407
377
|
## 🚨 Security Incident Response
|
|
408
378
|
|
|
409
379
|
**Contact:** {{SECURITY_CONTACT}}
|
|
@@ -412,11 +382,11 @@
|
|
|
412
382
|
{{#EACH INCIDENT_STEP}}
|
|
413
383
|
{{STEP_NUMBER}}. {{STEP_DESCRIPTION}}
|
|
414
384
|
{{/EACH}}
|
|
415
|
-
|
|
416
385
|
---
|
|
417
|
-
|
|
418
386
|
**Document Version:** 1.0
|
|
419
387
|
|
|
420
388
|
**Last Updated:** {{GENERATION_DATE}}
|
|
421
389
|
|
|
422
390
|
**Generated by:** AI Flow v1.0.0
|
|
391
|
+
|
|
392
|
+
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# {{PROJECT_NAME}}
|
|
2
2
|
|
|
3
3
|
> {{PROJECT_DESCRIPTION}}
|
|
4
|
-
|
|
5
4
|
---
|
|
6
|
-
|
|
7
5
|
## 🚀 Quick Start
|
|
8
6
|
|
|
9
7
|
### Prerequisites
|
|
@@ -34,17 +32,13 @@ cp .env.example .env
|
|
|
34
32
|
```
|
|
35
33
|
|
|
36
34
|
See `specs/configuration.md` for all environment variables.
|
|
37
|
-
|
|
38
35
|
---
|
|
39
|
-
|
|
40
36
|
## 📁 Project Structure
|
|
41
37
|
|
|
42
38
|
```
|
|
43
39
|
{{FOLDER_STRUCTURE}}
|
|
44
40
|
```
|
|
45
|
-
|
|
46
41
|
---
|
|
47
|
-
|
|
48
42
|
## 🛠️ Development
|
|
49
43
|
|
|
50
44
|
### Available Scripts
|
|
@@ -65,9 +59,7 @@ See `specs/configuration.md` for all environment variables.
|
|
|
65
59
|
- **Testing:** {{UNIT_TEST_FRAMEWORK}}, {{E2E_FRAMEWORK}}
|
|
66
60
|
|
|
67
61
|
See `ai-instructions.md` for complete tech stack.
|
|
68
|
-
|
|
69
62
|
---
|
|
70
|
-
|
|
71
63
|
## 📚 Documentation
|
|
72
64
|
|
|
73
65
|
**For AI Assistants:**
|
|
@@ -80,9 +72,7 @@ See `ai-instructions.md` for complete tech stack.
|
|
|
80
72
|
- `docs/styling.md` - Styling guidelines
|
|
81
73
|
- `docs/testing.md` - Testing strategy
|
|
82
74
|
- `specs/accessibility.md` - A11y requirements
|
|
83
|
-
|
|
84
75
|
---
|
|
85
|
-
|
|
86
76
|
## 🧪 Testing
|
|
87
77
|
|
|
88
78
|
```bash
|
|
@@ -95,27 +85,21 @@ See `ai-instructions.md` for complete tech stack.
|
|
|
95
85
|
# Run E2E tests
|
|
96
86
|
{{PACKAGE_MANAGER}} run test:e2e
|
|
97
87
|
```
|
|
98
|
-
|
|
99
88
|
---
|
|
100
|
-
|
|
101
89
|
## 🚢 Deployment
|
|
102
90
|
|
|
103
91
|
{{DEPLOYMENT_INSTRUCTIONS}}
|
|
104
92
|
|
|
105
93
|
See `docs/operations.md` for detailed deployment procedures.
|
|
106
|
-
|
|
107
94
|
---
|
|
108
|
-
|
|
109
95
|
## 🤝 Contributing
|
|
110
96
|
|
|
111
97
|
See `docs/contributing.md` for contribution guidelines.
|
|
112
|
-
|
|
113
98
|
---
|
|
114
|
-
|
|
115
99
|
## 📄 License
|
|
116
100
|
|
|
117
101
|
{{LICENSE}}
|
|
118
|
-
|
|
119
102
|
---
|
|
120
|
-
|
|
121
103
|
**Last Updated:** {{GENERATION_DATE}}
|
|
104
|
+
|
|
105
|
+
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# AI Instructions - Frontend
|
|
2
2
|
|
|
3
3
|
> **CRITICAL:** Every AI assistant MUST read and follow this document before any work.
|
|
4
|
-
|
|
5
4
|
---
|
|
6
|
-
|
|
7
5
|
## 🎯 Project Overview
|
|
8
6
|
|
|
9
7
|
**Name:** {{PROJECT_NAME}}
|
|
@@ -13,9 +11,7 @@
|
|
|
13
11
|
**Purpose:** {{PROBLEM_STATEMENT}}
|
|
14
12
|
|
|
15
13
|
**Target Users:** {{TARGET_USERS}}
|
|
16
|
-
|
|
17
14
|
---
|
|
18
|
-
|
|
19
15
|
## 🏗️ Tech Stack
|
|
20
16
|
|
|
21
17
|
### Frontend
|
|
@@ -64,9 +60,7 @@
|
|
|
64
60
|
- **CI/CD:** {{CICD_PLATFORM}}
|
|
65
61
|
- **CDN:** {{CDN_PROVIDER}}
|
|
66
62
|
- **Analytics:** {{ANALYTICS_TOOL}}
|
|
67
|
-
|
|
68
63
|
---
|
|
69
|
-
|
|
70
64
|
## 🏛️ Architecture
|
|
71
65
|
|
|
72
66
|
**Component Pattern:** {{COMPONENT_PATTERN}}
|
|
@@ -79,9 +73,7 @@
|
|
|
79
73
|
```
|
|
80
74
|
{{FOLDER_STRUCTURE}}
|
|
81
75
|
```
|
|
82
|
-
|
|
83
76
|
---
|
|
84
|
-
|
|
85
77
|
## ❌ NEVER Rules
|
|
86
78
|
|
|
87
79
|
**YOU MUST NEVER:**
|
|
@@ -174,9 +166,7 @@
|
|
|
174
166
|
- ❌ Forget responsive design - Mobile-first approach
|
|
175
167
|
- ❌ Ignore dark mode support (if {{THEME_SUPPORT}} includes dark mode)
|
|
176
168
|
- ❌ Use RGB hex colors directly - Use CSS variables or design tokens
|
|
177
|
-
|
|
178
169
|
---
|
|
179
|
-
|
|
180
170
|
## ✅ ALWAYS Rules
|
|
181
171
|
|
|
182
172
|
**YOU MUST ALWAYS:**
|
|
@@ -273,9 +263,7 @@
|
|
|
273
263
|
- ✅ Implement proper error messages
|
|
274
264
|
- ✅ Cache responses when appropriate
|
|
275
265
|
- ✅ Cancel requests on component unmount
|
|
276
|
-
|
|
277
266
|
---
|
|
278
|
-
|
|
279
267
|
## 🎨 Code Style
|
|
280
268
|
|
|
281
269
|
### Naming Conventions
|
|
@@ -299,9 +287,7 @@
|
|
|
299
287
|
3. Relative imports (./Button, ../utils)
|
|
300
288
|
4. Styles
|
|
301
289
|
5. Types (if separate file)
|
|
302
|
-
|
|
303
290
|
---
|
|
304
|
-
|
|
305
291
|
## 🚀 Development Workflow
|
|
306
292
|
|
|
307
293
|
### Before Starting Any Task
|
|
@@ -335,9 +321,7 @@
|
|
|
335
321
|
- ✅ Build succeeds: `npm run build`
|
|
336
322
|
- ✅ No console.log statements
|
|
337
323
|
- ✅ No commented code
|
|
338
|
-
|
|
339
324
|
---
|
|
340
|
-
|
|
341
325
|
## 📊 Performance Targets
|
|
342
326
|
|
|
343
327
|
**Core Web Vitals:**
|
|
@@ -348,9 +332,7 @@
|
|
|
348
332
|
**Bundle Size:**
|
|
349
333
|
- Initial bundle: {{INITIAL_BUNDLE_TARGET}}
|
|
350
334
|
- Route bundles: {{ROUTE_BUNDLE_TARGET}}
|
|
351
|
-
|
|
352
335
|
---
|
|
353
|
-
|
|
354
336
|
## 🔗 Related Documents
|
|
355
337
|
|
|
356
338
|
- [Component Architecture](docs/components.md) - Component patterns and structure
|
|
@@ -360,9 +342,9 @@
|
|
|
360
342
|
- [API Integration](docs/api-integration.md) - API communication patterns
|
|
361
343
|
- [Performance](docs/performance.md) - Performance optimization
|
|
362
344
|
- [Accessibility](specs/accessibility.md) - WCAG compliance details
|
|
363
|
-
|
|
364
345
|
---
|
|
365
|
-
|
|
366
346
|
**Last Updated:** {{GENERATION_DATE}}
|
|
367
347
|
|
|
368
348
|
**Framework:** {{UI_FRAMEWORK}} {{UI_FRAMEWORK_VERSION}}
|
|
349
|
+
|
|
350
|
+
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
# API Integration
|
|
2
2
|
|
|
3
3
|
> API communication patterns and best practices for {{PROJECT_NAME}}
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
4
|
+
---
|
|
7
5
|
## 🎯 API Integration Strategy
|
|
8
6
|
|
|
9
7
|
**Pattern:** {{API_INTEGRATION_PATTERN}}
|
|
10
8
|
**Client:** {{API_CLIENT}}
|
|
11
9
|
**Base URL:** {{API_BASE_URL}}
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
10
|
+
---
|
|
15
11
|
## 📡 API Client Setup
|
|
16
12
|
|
|
17
13
|
### Base Configuration
|
|
@@ -56,9 +52,7 @@ apiClient.interceptors.response.use(
|
|
|
56
52
|
|
|
57
53
|
export default apiClient;
|
|
58
54
|
```
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
55
|
+
---
|
|
62
56
|
## 🏗️ API Layer Pattern
|
|
63
57
|
|
|
64
58
|
### Service Layer (Recommended)
|
|
@@ -149,9 +143,7 @@ export const useUsers = () => {
|
|
|
149
143
|
return { getById, create };
|
|
150
144
|
};
|
|
151
145
|
```
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
146
|
+
---
|
|
155
147
|
## 🔄 Error Handling
|
|
156
148
|
|
|
157
149
|
### Error Types
|
|
@@ -219,9 +211,7 @@ export function handleApiError(error: unknown): string {
|
|
|
219
211
|
return 'An unexpected error occurred.';
|
|
220
212
|
}
|
|
221
213
|
```
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
214
|
+
---
|
|
225
215
|
## 🔁 Retry Strategy
|
|
226
216
|
|
|
227
217
|
### Automatic Retry
|
|
@@ -259,9 +249,7 @@ const { data } = useQuery({
|
|
|
259
249
|
retryDelay: (attemptIndex) => Math.min(1000 * 2 ** attemptIndex, 30000),
|
|
260
250
|
});
|
|
261
251
|
```
|
|
262
|
-
|
|
263
|
-
---
|
|
264
|
-
|
|
252
|
+
---
|
|
265
253
|
## 🔐 Authentication
|
|
266
254
|
|
|
267
255
|
### Token Management
|
|
@@ -314,9 +302,7 @@ export async function refreshAuthToken(): Promise<string> {
|
|
|
314
302
|
return refreshTokenPromise;
|
|
315
303
|
}
|
|
316
304
|
```
|
|
317
|
-
|
|
318
|
-
---
|
|
319
|
-
|
|
305
|
+
---
|
|
320
306
|
## 📊 Request/Response Transformation
|
|
321
307
|
|
|
322
308
|
### Request Transformation
|
|
@@ -344,9 +330,7 @@ apiClient.interceptors.response.use((response) => {
|
|
|
344
330
|
return response;
|
|
345
331
|
});
|
|
346
332
|
```
|
|
347
|
-
|
|
348
|
-
---
|
|
349
|
-
|
|
333
|
+
---
|
|
350
334
|
## 🧪 Testing API Integration
|
|
351
335
|
|
|
352
336
|
### Mocking API Calls
|
|
@@ -372,19 +356,17 @@ beforeAll(() => server.listen());
|
|
|
372
356
|
afterEach(() => server.resetHandlers());
|
|
373
357
|
afterAll(() => server.close());
|
|
374
358
|
```
|
|
375
|
-
|
|
376
|
-
---
|
|
377
|
-
|
|
359
|
+
---
|
|
378
360
|
## 🔗 Related Documents
|
|
379
361
|
|
|
380
362
|
- [State Management](state-management.md) - Server state patterns
|
|
381
363
|
- [Error Handling](error-handling.md) - Error handling strategies
|
|
382
364
|
- [Security](security.md) - Security best practices
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
365
|
+
---
|
|
386
366
|
**Last Updated:** {{GENERATION_DATE}}
|
|
387
367
|
|
|
388
368
|
**API Pattern:** {{API_INTEGRATION_PATTERN}}
|
|
389
369
|
**Client:** {{API_CLIENT}}
|
|
390
370
|
|
|
371
|
+
|
|
372
|
+
|