ai-flow-dev 1.0.1
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/LICENSE +21 -0
- package/README.md +408 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +791 -0
- package/dist/cli.js.map +1 -0
- package/dist/fs-utils.d.ts +2 -0
- package/dist/fs-utils.d.ts.map +1 -0
- package/dist/fs-utils.js +46 -0
- package/dist/fs-utils.js.map +1 -0
- package/package.json +71 -0
- package/prompts/backend/flow-dev-feature.md +1318 -0
- package/prompts/backend/flow-dev-fix.md +903 -0
- package/prompts/backend/flow-dev-refactor.md +715 -0
- package/prompts/backend/flow-dev-review.md +401 -0
- package/prompts/backend/flow-dev-work.md +1129 -0
- package/prompts/backend/flow-docs-gen-phase-0.md +1840 -0
- package/prompts/backend/flow-docs-gen-phase-1.md +435 -0
- package/prompts/backend/flow-docs-gen-phase-2.md +460 -0
- package/prompts/backend/flow-docs-gen-phase-3.md +684 -0
- package/prompts/backend/flow-docs-gen-phase-4.md +516 -0
- package/prompts/backend/flow-docs-gen-phase-5.md +637 -0
- package/prompts/backend/flow-docs-gen-phase-6.md +465 -0
- package/prompts/backend/flow-docs-gen-phase-7.md +1207 -0
- package/prompts/backend/flow-docs-gen.md +820 -0
- package/prompts/backend/flow-docs-sync.md +526 -0
- package/prompts/backend/flow-project-init.md +248 -0
- package/prompts/backend/flow-project-roadmap.md +1159 -0
- package/prompts/frontend/flow-docs-gen-phase-0.md +494 -0
- package/prompts/frontend/flow-docs-gen-phase-1.md +449 -0
- package/prompts/frontend/flow-docs-gen-phase-2.md +983 -0
- package/prompts/frontend/flow-docs-gen-phase-3.md +685 -0
- package/prompts/frontend/flow-docs-gen-phase-4.md +480 -0
- package/prompts/frontend/flow-docs-gen-phase-5.md +483 -0
- package/prompts/frontend/flow-docs-gen-phase-6.md +570 -0
- package/prompts/frontend/flow-docs-gen-phase-7.md +582 -0
- package/prompts/frontend/flow-docs-gen.md +413 -0
- package/prompts/frontend/flow-docs-sync.md +561 -0
- package/prompts/mobile/flow-docs-gen-phase-0.md +387 -0
- package/prompts/mobile/flow-docs-gen-phase-1.md +530 -0
- package/prompts/mobile/flow-docs-gen-phase-2.md +584 -0
- package/prompts/mobile/flow-docs-gen-phase-3.md +659 -0
- package/prompts/mobile/flow-docs-gen-phase-4.md +363 -0
- package/prompts/mobile/flow-docs-gen-phase-5.md +369 -0
- package/prompts/mobile/flow-docs-gen-phase-6.md +490 -0
- package/prompts/mobile/flow-docs-gen-phase-7.md +407 -0
- package/prompts/mobile/flow-docs-gen.md +430 -0
- package/prompts/mobile/flow-docs-sync.md +634 -0
- package/templates/backend/.clauderules.template +111 -0
- package/templates/backend/.cursorrules.template +102 -0
- package/templates/backend/.env.example.template +122 -0
- package/templates/backend/README.template.md +200 -0
- package/templates/backend/ai-instructions.template.md +354 -0
- package/templates/backend/copilot-instructions.template.md +160 -0
- package/templates/backend/docs/api.template.md +251 -0
- package/templates/backend/docs/architecture.template.md +612 -0
- package/templates/backend/docs/business-flows.template.md +109 -0
- package/templates/backend/docs/code-standards.template.md +828 -0
- package/templates/backend/docs/contributing.template.md +163 -0
- package/templates/backend/docs/data-model.template.md +416 -0
- package/templates/backend/docs/operations.template.md +591 -0
- package/templates/backend/docs/testing.template.md +762 -0
- package/templates/backend/project-brief.template.md +176 -0
- package/templates/backend/specs/configuration.template.md +133 -0
- package/templates/backend/specs/security.template.md +422 -0
- package/templates/frontend/README.template.md +121 -0
- package/templates/frontend/ai-instructions.template.md +368 -0
- package/templates/frontend/docs/api-integration.template.md +390 -0
- package/templates/frontend/docs/components.template.md +567 -0
- package/templates/frontend/docs/error-handling.template.md +385 -0
- package/templates/frontend/docs/operations.template.md +123 -0
- package/templates/frontend/docs/performance.template.md +140 -0
- package/templates/frontend/docs/pwa.template.md +135 -0
- package/templates/frontend/docs/state-management.template.md +394 -0
- package/templates/frontend/docs/styling.template.md +779 -0
- package/templates/frontend/docs/testing.template.md +736 -0
- package/templates/frontend/project-brief.template.md +55 -0
- package/templates/frontend/specs/accessibility.template.md +111 -0
- package/templates/frontend/specs/configuration.template.md +520 -0
- package/templates/frontend/specs/security.template.md +197 -0
- package/templates/fullstack/README.template.md +282 -0
- package/templates/fullstack/ai-instructions.template.md +487 -0
- package/templates/fullstack/project-brief.template.md +197 -0
- package/templates/fullstack/specs/configuration.template.md +380 -0
- package/templates/mobile/AGENT.template.md +251 -0
- package/templates/mobile/README.template.md +195 -0
- package/templates/mobile/ai-instructions.template.md +221 -0
- package/templates/mobile/docs/app-store.template.md +163 -0
- package/templates/mobile/docs/architecture.template.md +100 -0
- package/templates/mobile/docs/native-features.template.md +137 -0
- package/templates/mobile/docs/navigation.template.md +81 -0
- package/templates/mobile/docs/offline-strategy.template.md +90 -0
- package/templates/mobile/docs/permissions.template.md +70 -0
- package/templates/mobile/docs/state-management.template.md +116 -0
- package/templates/mobile/docs/testing.template.md +146 -0
- package/templates/mobile/project-brief.template.md +97 -0
- package/templates/mobile/specs/build-configuration.template.md +116 -0
- package/templates/mobile/specs/deployment.template.md +114 -0
- package/templates/shared/AGENT.template.md +252 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
# Configuration Specifications
|
|
2
|
+
|
|
3
|
+
> Environment variables and configuration management for {{PROJECT_NAME}} (Full Stack)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🎯 Configuration Strategy
|
|
8
|
+
|
|
9
|
+
**Approach:** {{CONFIGURATION_APPROACH}}
|
|
10
|
+
|
|
11
|
+
**Key Principles:**
|
|
12
|
+
1. **Separation of Concerns** - Backend vs Frontend config
|
|
13
|
+
2. **Security First** - Never expose secrets to client
|
|
14
|
+
3. **Type Safety** - Validate and type all config
|
|
15
|
+
4. **Environment Parity** - Consistent config across environments
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 📁 Configuration Files Structure
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
{{PROJECT_NAME}}/
|
|
23
|
+
├── backend/
|
|
24
|
+
│ ├── .env.local # Local overrides (gitignored)
|
|
25
|
+
│ ├── .env.development # Development defaults
|
|
26
|
+
│ ├── .env.production # Production defaults
|
|
27
|
+
│ └── .env.example # Template for new developers
|
|
28
|
+
├── frontend/
|
|
29
|
+
│ ├── .env.local # Local overrides (gitignored)
|
|
30
|
+
│ ├── .env.development # Development defaults
|
|
31
|
+
│ ├── .env.production # Production defaults
|
|
32
|
+
│ ├── .env.example # Template for new developers
|
|
33
|
+
│ └── src/
|
|
34
|
+
│ └── config/
|
|
35
|
+
│ ├── index.ts # Configuration loader
|
|
36
|
+
│ ├── schema.ts # Validation schema
|
|
37
|
+
│ └── constants.ts # Static constants
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 🔐 Backend Environment Variables
|
|
43
|
+
|
|
44
|
+
### Required Variables
|
|
45
|
+
|
|
46
|
+
{{#EACH BACKEND_REQUIRED_VAR}}
|
|
47
|
+
#### `{{VAR_NAME}}`
|
|
48
|
+
|
|
49
|
+
**Description:** {{VAR_DESCRIPTION}}
|
|
50
|
+
|
|
51
|
+
**Type:** {{VAR_TYPE}}
|
|
52
|
+
|
|
53
|
+
**Example:** `{{VAR_EXAMPLE}}`
|
|
54
|
+
|
|
55
|
+
{{#IF VAR_VALIDATION}}**Validation:** {{VAR_VALIDATION}}{{/IF}}
|
|
56
|
+
|
|
57
|
+
{{/EACH}}
|
|
58
|
+
|
|
59
|
+
### Optional Variables
|
|
60
|
+
|
|
61
|
+
{{#EACH BACKEND_OPTIONAL_VAR}}
|
|
62
|
+
#### `{{VAR_NAME}}`
|
|
63
|
+
|
|
64
|
+
**Description:** {{VAR_DESCRIPTION}}
|
|
65
|
+
|
|
66
|
+
**Type:** {{VAR_TYPE}}
|
|
67
|
+
|
|
68
|
+
**Default:** `{{VAR_DEFAULT}}`
|
|
69
|
+
|
|
70
|
+
**Example:** `{{VAR_EXAMPLE}}`
|
|
71
|
+
|
|
72
|
+
{{/EACH}}
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 🎨 Frontend Environment Variables
|
|
77
|
+
|
|
78
|
+
### Required Variables
|
|
79
|
+
|
|
80
|
+
**Format:** `VITE_[CATEGORY]_[NAME]` (or your build tool's prefix)
|
|
81
|
+
|
|
82
|
+
{{#EACH FRONTEND_REQUIRED_VAR}}
|
|
83
|
+
#### `{{VAR_NAME}}`
|
|
84
|
+
|
|
85
|
+
**Description:** {{VAR_DESCRIPTION}}
|
|
86
|
+
|
|
87
|
+
**Type:** {{VAR_TYPE}}
|
|
88
|
+
|
|
89
|
+
**Example:** `{{VAR_EXAMPLE}}`
|
|
90
|
+
|
|
91
|
+
{{#IF VAR_VALIDATION}}**Validation:** {{VAR_VALIDATION}}{{/IF}}
|
|
92
|
+
|
|
93
|
+
{{/EACH}}
|
|
94
|
+
|
|
95
|
+
### Optional Variables
|
|
96
|
+
|
|
97
|
+
{{#EACH FRONTEND_OPTIONAL_VAR}}
|
|
98
|
+
#### `{{VAR_NAME}}`
|
|
99
|
+
|
|
100
|
+
**Description:** {{VAR_DESCRIPTION}}
|
|
101
|
+
|
|
102
|
+
**Type:** {{VAR_TYPE}}
|
|
103
|
+
|
|
104
|
+
**Default:** `{{VAR_DEFAULT}}`
|
|
105
|
+
|
|
106
|
+
**Example:** `{{VAR_EXAMPLE}}`
|
|
107
|
+
|
|
108
|
+
{{/EACH}}
|
|
109
|
+
|
|
110
|
+
### Variable Naming Convention (Frontend)
|
|
111
|
+
|
|
112
|
+
**Format:** `VITE_[CATEGORY]_[NAME]`
|
|
113
|
+
|
|
114
|
+
**Categories:**
|
|
115
|
+
- `VITE_APP_*` - Application metadata
|
|
116
|
+
- `VITE_API_*` - API endpoints (points to backend)
|
|
117
|
+
- `VITE_AUTH_*` - Authentication config
|
|
118
|
+
- `VITE_FEATURE_*` - Feature flags
|
|
119
|
+
- `VITE_ANALYTICS_*` - Analytics services
|
|
120
|
+
|
|
121
|
+
**Important:** Only variables prefixed with `VITE_` (or your build tool's prefix) are exposed to the client.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 🌍 Configuration by Environment
|
|
126
|
+
|
|
127
|
+
### Development
|
|
128
|
+
|
|
129
|
+
**Backend (.env.development):**
|
|
130
|
+
```bash
|
|
131
|
+
{{BACKEND_DEV_ENV_CONFIG}}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Frontend (.env.development):**
|
|
135
|
+
```bash
|
|
136
|
+
{{FRONTEND_DEV_ENV_CONFIG}}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Staging
|
|
140
|
+
|
|
141
|
+
**Backend (.env.staging):**
|
|
142
|
+
```bash
|
|
143
|
+
{{BACKEND_STAGING_ENV_CONFIG}}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Frontend (.env.staging):**
|
|
147
|
+
```bash
|
|
148
|
+
{{FRONTEND_STAGING_ENV_CONFIG}}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Production
|
|
152
|
+
|
|
153
|
+
**Backend (.env.production):**
|
|
154
|
+
```bash
|
|
155
|
+
{{BACKEND_PRODUCTION_ENV_CONFIG}}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Frontend (.env.production):**
|
|
159
|
+
```bash
|
|
160
|
+
{{FRONTEND_PRODUCTION_ENV_CONFIG}}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## 🔌 External Services
|
|
166
|
+
|
|
167
|
+
### Backend Services
|
|
168
|
+
|
|
169
|
+
{{#EACH BACKEND_EXTERNAL_SERVICE}}
|
|
170
|
+
### {{SERVICE_NAME}}
|
|
171
|
+
|
|
172
|
+
**Purpose:** {{SERVICE_PURPOSE}}
|
|
173
|
+
|
|
174
|
+
**Configuration:**
|
|
175
|
+
```bash
|
|
176
|
+
{{SERVICE_ENV_VARS}}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Documentation:** {{SERVICE_DOCS_URL}}
|
|
180
|
+
|
|
181
|
+
{{#IF SERVICE_FALLBACK}}**Fallback:** {{SERVICE_FALLBACK}}{{/IF}}
|
|
182
|
+
|
|
183
|
+
{{/EACH}}
|
|
184
|
+
|
|
185
|
+
### Frontend Services
|
|
186
|
+
|
|
187
|
+
{{#EACH FRONTEND_EXTERNAL_SERVICE}}
|
|
188
|
+
### {{SERVICE_NAME}}
|
|
189
|
+
|
|
190
|
+
**Purpose:** {{SERVICE_PURPOSE}}
|
|
191
|
+
|
|
192
|
+
**Configuration:**
|
|
193
|
+
```bash
|
|
194
|
+
{{SERVICE_ENV_VARS}}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Documentation:** {{SERVICE_DOCS_URL}}
|
|
198
|
+
|
|
199
|
+
{{#IF SERVICE_FALLBACK}}**Fallback:** {{SERVICE_FALLBACK}}{{/IF}}
|
|
200
|
+
|
|
201
|
+
{{/EACH}}
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## 💾 Database Configuration (Backend)
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
{{DATABASE_CONFIG}}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Connection Pool:**
|
|
212
|
+
- Min: {{DB_POOL_MIN}}
|
|
213
|
+
- Max: {{DB_POOL_MAX}}
|
|
214
|
+
- Idle Timeout: {{DB_IDLE_TIMEOUT}}ms
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## 🔐 Secrets Management
|
|
219
|
+
|
|
220
|
+
### Backend Secrets
|
|
221
|
+
|
|
222
|
+
**Never commit these variables:**
|
|
223
|
+
|
|
224
|
+
{{#EACH BACKEND_SECRET_VAR}}
|
|
225
|
+
- `{{VAR_NAME}}` - {{VAR_PURPOSE}}
|
|
226
|
+
{{/EACH}}
|
|
227
|
+
|
|
228
|
+
**Storage:** {{BACKEND_SECRETS_STORAGE}}
|
|
229
|
+
|
|
230
|
+
### Frontend Secrets
|
|
231
|
+
|
|
232
|
+
**Important:** Frontend should NEVER contain secrets. Only public keys and non-sensitive configuration.
|
|
233
|
+
|
|
234
|
+
**Allowed:**
|
|
235
|
+
- Public API keys (e.g., Google Maps API key)
|
|
236
|
+
- Public service IDs
|
|
237
|
+
- Feature flags
|
|
238
|
+
- Analytics IDs
|
|
239
|
+
|
|
240
|
+
**Never:**
|
|
241
|
+
- Database credentials
|
|
242
|
+
- API secret keys
|
|
243
|
+
- Authentication secrets
|
|
244
|
+
- Private keys
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## 🚩 Feature Flags
|
|
249
|
+
|
|
250
|
+
### Backend Feature Flags
|
|
251
|
+
|
|
252
|
+
{{#IF BACKEND_FEATURE_FLAGS}}
|
|
253
|
+
{{#EACH BACKEND_FEATURE_FLAG}}
|
|
254
|
+
### `{{FLAG_NAME}}`
|
|
255
|
+
|
|
256
|
+
**Description:** {{FLAG_DESCRIPTION}}
|
|
257
|
+
|
|
258
|
+
**Default:** {{FLAG_DEFAULT}}
|
|
259
|
+
|
|
260
|
+
**Environments:** {{FLAG_ENVIRONMENTS}}
|
|
261
|
+
|
|
262
|
+
{{/EACH}}
|
|
263
|
+
|
|
264
|
+
{{ELSE}}
|
|
265
|
+
Backend feature flags not implemented yet.
|
|
266
|
+
|
|
267
|
+
{{/IF}}
|
|
268
|
+
|
|
269
|
+
### Frontend Feature Flags
|
|
270
|
+
|
|
271
|
+
{{#IF FRONTEND_FEATURE_FLAGS}}
|
|
272
|
+
{{#EACH FRONTEND_FEATURE_FLAG}}
|
|
273
|
+
### `{{FLAG_NAME}}`
|
|
274
|
+
|
|
275
|
+
**Description:** {{FLAG_DESCRIPTION}}
|
|
276
|
+
|
|
277
|
+
**Default:** {{FLAG_DEFAULT}}
|
|
278
|
+
|
|
279
|
+
**Environments:** {{FLAG_ENVIRONMENTS}}
|
|
280
|
+
|
|
281
|
+
{{/EACH}}
|
|
282
|
+
|
|
283
|
+
{{ELSE}}
|
|
284
|
+
Frontend feature flags not implemented yet.
|
|
285
|
+
|
|
286
|
+
{{/IF}}
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## 🔒 Security Best Practices
|
|
291
|
+
|
|
292
|
+
### Backend
|
|
293
|
+
|
|
294
|
+
- ✅ Store all secrets in environment variables
|
|
295
|
+
- ✅ Use secrets manager for production (AWS Secrets Manager, Azure Key Vault, etc.)
|
|
296
|
+
- ✅ Never log secrets or sensitive data
|
|
297
|
+
- ✅ Rotate secrets regularly
|
|
298
|
+
- ✅ Use different secrets per environment
|
|
299
|
+
|
|
300
|
+
### Frontend
|
|
301
|
+
|
|
302
|
+
- ✅ Never expose secrets to client code
|
|
303
|
+
- ✅ Only use public keys and non-sensitive config
|
|
304
|
+
- ✅ Sanitize error messages (don't expose config in production)
|
|
305
|
+
- ✅ Validate all environment variables
|
|
306
|
+
- ✅ Use Content Security Policy headers
|
|
307
|
+
|
|
308
|
+
### Example: API Key Management
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
# ❌ WRONG - Secret key in frontend
|
|
312
|
+
VITE_STRIPE_SECRET_KEY=sk_live_...
|
|
313
|
+
|
|
314
|
+
# ✅ CORRECT - Public key in frontend, secret in backend
|
|
315
|
+
# Frontend
|
|
316
|
+
VITE_STRIPE_PUBLISHABLE_KEY=pk_live_...
|
|
317
|
+
|
|
318
|
+
# Backend
|
|
319
|
+
STRIPE_SECRET_KEY=sk_live_...
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## 🧪 Testing Configuration
|
|
325
|
+
|
|
326
|
+
### Backend Test Environment
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
# .env.test
|
|
330
|
+
NODE_ENV=test
|
|
331
|
+
DATABASE_URL=postgresql://test:test@localhost:5432/test_db
|
|
332
|
+
LOG_LEVEL=silent
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Frontend Test Environment
|
|
336
|
+
|
|
337
|
+
```typescript
|
|
338
|
+
// vitest.config.ts
|
|
339
|
+
export default defineConfig({
|
|
340
|
+
test: {
|
|
341
|
+
env: {
|
|
342
|
+
VITE_API_BASE_URL: 'http://localhost:3001/api',
|
|
343
|
+
VITE_APP_ENV: 'test',
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
});
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## 📊 Configuration Monitoring
|
|
352
|
+
|
|
353
|
+
### Backend
|
|
354
|
+
|
|
355
|
+
- Log configuration on startup (development only)
|
|
356
|
+
- Monitor secret rotation
|
|
357
|
+
- Track configuration changes
|
|
358
|
+
|
|
359
|
+
### Frontend
|
|
360
|
+
|
|
361
|
+
- Log config on startup (development only)
|
|
362
|
+
- Monitor API endpoint availability
|
|
363
|
+
- Track feature flag usage
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## 🔗 Related Documents
|
|
368
|
+
|
|
369
|
+
- [AI Instructions](../ai-instructions.md) - Configuration rules
|
|
370
|
+
- [Security Specification](security.md) - Security requirements
|
|
371
|
+
- [Deployment Guide](../docs/operations.md) - Environment setup
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
**Document Version:** 1.0
|
|
376
|
+
|
|
377
|
+
**Last Updated:** {{GENERATION_DATE}}
|
|
378
|
+
|
|
379
|
+
**Generated by:** AI Flow v1.3.0
|
|
380
|
+
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# AGENT.md
|
|
2
|
+
|
|
3
|
+
> Universal AI Assistant Configuration
|
|
4
|
+
>
|
|
5
|
+
> This file provides context for ALL AI development tools (Claude, Copilot, Cursor, Gemini, etc.)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 📋 About This Project
|
|
10
|
+
|
|
11
|
+
**Project Name:** {{PROJECT_NAME}}
|
|
12
|
+
|
|
13
|
+
**Description:** {{PROJECT_DESCRIPTION}}
|
|
14
|
+
|
|
15
|
+
**Problem We're Solving:** {{PROBLEM_STATEMENT}}
|
|
16
|
+
|
|
17
|
+
**Target Users:** {{TARGET_USERS}}
|
|
18
|
+
|
|
19
|
+
### Technical Context
|
|
20
|
+
|
|
21
|
+
**Project Type:** Backend API/Service
|
|
22
|
+
**Architecture:** {{ARCHITECTURE_PATTERN}}
|
|
23
|
+
**Primary Language:** {{LANGUAGE}} {{LANGUAGE_VERSION}}
|
|
24
|
+
**Framework:** {{FRAMEWORK}}
|
|
25
|
+
**Database:** {{DATABASE}} with {{ORM}}
|
|
26
|
+
|
|
27
|
+
**Key Characteristics:**
|
|
28
|
+
- Authentication: {{AUTH_METHOD}}
|
|
29
|
+
- API Style: {{API_STYLE}}
|
|
30
|
+
- Deployment: {{DEPLOYMENT_PLATFORM}}
|
|
31
|
+
- Current Phase: {{PROJECT_PHASE}}
|
|
32
|
+
|
|
33
|
+
> This project uses AI-assisted development with comprehensive documentation.
|
|
34
|
+
> All files below provide context to AI assistants for consistent, high-quality code generation.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 🏗️ Documentation Architecture
|
|
39
|
+
|
|
40
|
+
This project follows **AI-assisted development** with comprehensive documentation.
|
|
41
|
+
All documentation is structured to guide AI assistants in understanding the project deeply.
|
|
42
|
+
|
|
43
|
+
### 📚 Core Documentation (Read in Order)
|
|
44
|
+
|
|
45
|
+
1. **`ai-instructions.md`** ⭐ **START HERE**
|
|
46
|
+
|
|
47
|
+
- Tech stack and versions
|
|
48
|
+
- NEVER/ALWAYS rules
|
|
49
|
+
- Development workflow
|
|
50
|
+
- Priorities
|
|
51
|
+
|
|
52
|
+
2. **`project-brief.md`**
|
|
53
|
+
|
|
54
|
+
- Business context
|
|
55
|
+
- Objectives and scope
|
|
56
|
+
- Constraints and success metrics
|
|
57
|
+
|
|
58
|
+
3. **`README.md`**
|
|
59
|
+
|
|
60
|
+
- Quick start
|
|
61
|
+
- Installation and commands
|
|
62
|
+
- Project directory tour
|
|
63
|
+
|
|
64
|
+
4. **`docs/architecture.md`**
|
|
65
|
+
|
|
66
|
+
- System architecture pattern
|
|
67
|
+
- Component structure
|
|
68
|
+
- Request/response flow
|
|
69
|
+
|
|
70
|
+
5. **`docs/data-model.md`**
|
|
71
|
+
|
|
72
|
+
- Database schema
|
|
73
|
+
- Entity relationships
|
|
74
|
+
- Data patterns
|
|
75
|
+
|
|
76
|
+
6. **`docs/code-standards.md`**
|
|
77
|
+
|
|
78
|
+
- Naming conventions
|
|
79
|
+
- Code quality rules
|
|
80
|
+
- Error handling patterns
|
|
81
|
+
|
|
82
|
+
7. **`docs/testing.md`**
|
|
83
|
+
|
|
84
|
+
- Testing strategy
|
|
85
|
+
- Coverage requirements
|
|
86
|
+
- Test patterns
|
|
87
|
+
|
|
88
|
+
8. **`docs/operations.md`**
|
|
89
|
+
|
|
90
|
+
- Deployment procedures
|
|
91
|
+
- Monitoring and alerts
|
|
92
|
+
- Scaling strategy
|
|
93
|
+
|
|
94
|
+
9. **`docs/business-flows.md`**
|
|
95
|
+
|
|
96
|
+
- End-to-end business processes
|
|
97
|
+
- Key actors and systems
|
|
98
|
+
- Flow diagrams
|
|
99
|
+
|
|
100
|
+
10. **`docs/api.md`**
|
|
101
|
+
|
|
102
|
+
- Endpoint conventions
|
|
103
|
+
- Authentication and pagination rules
|
|
104
|
+
- Request/response examples
|
|
105
|
+
|
|
106
|
+
11. **`docs/contributing.md`**
|
|
107
|
+
|
|
108
|
+
- Development setup
|
|
109
|
+
- Contribution guidelines
|
|
110
|
+
- Code review process
|
|
111
|
+
|
|
112
|
+
12. **`specs/security.md`**
|
|
113
|
+
|
|
114
|
+
- Authentication/Authorization
|
|
115
|
+
- Security policies
|
|
116
|
+
- Compliance requirements
|
|
117
|
+
|
|
118
|
+
13. **`specs/configuration.md`**
|
|
119
|
+
|
|
120
|
+
- Environment variables
|
|
121
|
+
- External services
|
|
122
|
+
- Configuration by environment
|
|
123
|
+
|
|
124
|
+
14. **`.env.example`**
|
|
125
|
+
- Required environment variables
|
|
126
|
+
- Default/local values
|
|
127
|
+
- Secrets handling guidance
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## ⚡ Quick Reference
|
|
132
|
+
|
|
133
|
+
### Tech Stack
|
|
134
|
+
|
|
135
|
+
**Backend:**
|
|
136
|
+
|
|
137
|
+
- Framework: {{FRAMEWORK}}
|
|
138
|
+
- Language: {{LANGUAGE}} {{LANGUAGE_VERSION}}
|
|
139
|
+
- Database: {{DATABASE}}
|
|
140
|
+
- ORM: {{ORM}}
|
|
141
|
+
- Authentication: {{AUTH_METHOD}}
|
|
142
|
+
- Caching: {{CACHE_STRATEGY}}
|
|
143
|
+
|
|
144
|
+
**Infrastructure:**
|
|
145
|
+
|
|
146
|
+
- Deployment: {{DEPLOYMENT_PLATFORM}}
|
|
147
|
+
- CI/CD: {{CICD_PLATFORM}}
|
|
148
|
+
- Monitoring: {{MONITORING_TOOLS}}
|
|
149
|
+
|
|
150
|
+
### Critical Rules
|
|
151
|
+
|
|
152
|
+
**❌ NEVER:**
|
|
153
|
+
{{NEVER_RULES}}
|
|
154
|
+
|
|
155
|
+
**✅ ALWAYS:**
|
|
156
|
+
{{ALWAYS_RULES}}
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 🤖 AI Assistant Workflow
|
|
161
|
+
|
|
162
|
+
When working on this project:
|
|
163
|
+
|
|
164
|
+
1. **Before starting ANY task:**
|
|
165
|
+
|
|
166
|
+
- Read `ai-instructions.md` for project-wide rules
|
|
167
|
+
- Check relevant documentation for the area you're working on
|
|
168
|
+
- Understand the business context from `project-brief.md`
|
|
169
|
+
|
|
170
|
+
2. **When implementing features:**
|
|
171
|
+
|
|
172
|
+
- Follow architecture patterns from `docs/architecture.md`
|
|
173
|
+
- Respect data models from `docs/data-model.md`
|
|
174
|
+
- Apply code standards from `docs/code-standards.md`
|
|
175
|
+
- Add tests according to `docs/testing.md`
|
|
176
|
+
|
|
177
|
+
3. **When handling security:**
|
|
178
|
+
|
|
179
|
+
- Consult `specs/security.md` for auth/authz
|
|
180
|
+
- Never hardcode secrets (use `specs/configuration.md`)
|
|
181
|
+
- Follow security headers and encryption requirements
|
|
182
|
+
|
|
183
|
+
4. **When deploying:**
|
|
184
|
+
- Follow procedures in `docs/operations.md`
|
|
185
|
+
- Update configuration per environment
|
|
186
|
+
- Check health endpoints
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 🛠️ Tool-Specific Configurations
|
|
191
|
+
|
|
192
|
+
Different AI tools have specific configuration files that extend this AGENT.md:
|
|
193
|
+
|
|
194
|
+
### Claude Code
|
|
195
|
+
|
|
196
|
+
- **File:** `.clauderules`
|
|
197
|
+
- **Purpose:** Claude-specific instructions and preferences
|
|
198
|
+
- **References:** This AGENT.md + project docs
|
|
199
|
+
|
|
200
|
+
### Cursor
|
|
201
|
+
|
|
202
|
+
- **File:** `.cursorrules`
|
|
203
|
+
- **Purpose:** Cursor-specific context and rules
|
|
204
|
+
- **References:** This AGENT.md + project docs
|
|
205
|
+
|
|
206
|
+
### GitHub Copilot
|
|
207
|
+
|
|
208
|
+
- **File:** `.github/copilot-instructions.md`
|
|
209
|
+
- **Purpose:** Copilot workspace instructions
|
|
210
|
+
- **References:** This AGENT.md + project docs
|
|
211
|
+
|
|
212
|
+
**All tool-specific configs reference this AGENT.md as the source of truth.**
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## 📊 Project Status
|
|
217
|
+
|
|
218
|
+
**Current Phase:** {{PROJECT_PHASE}}
|
|
219
|
+
|
|
220
|
+
**Architecture:** {{ARCHITECTURE_PATTERN}}
|
|
221
|
+
|
|
222
|
+
**Compliance:** {{COMPLIANCE_REQUIREMENTS}}
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## 🚀 Getting Started
|
|
227
|
+
|
|
228
|
+
### For AI Assistants
|
|
229
|
+
|
|
230
|
+
1. Read this AGENT.md completely
|
|
231
|
+
2. Read `ai-instructions.md` for critical rules
|
|
232
|
+
3. Familiarize with `docs/architecture.md`
|
|
233
|
+
4. Review `docs/code-standards.md` for coding patterns
|
|
234
|
+
5. Check `specs/security.md` before handling auth/sensitive data
|
|
235
|
+
|
|
236
|
+
### For Developers
|
|
237
|
+
|
|
238
|
+
See `README.md` for installation and setup instructions.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 📝 Document Update Policy
|
|
243
|
+
|
|
244
|
+
- Documents are **living artifacts** - update as project evolves
|
|
245
|
+
- Breaking changes to architecture → Update `docs/architecture.md`
|
|
246
|
+
- New security requirements → Update `specs/security.md`
|
|
247
|
+
- Stack changes → Update `ai-instructions.md` AND this AGENT.md
|
|
248
|
+
|
|
249
|
+
**Last Updated:** {{GENERATION_DATE}}
|
|
250
|
+
|
|
251
|
+
**Generated by:** AI Flow v1.0.8
|