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,1318 @@
|
|
|
1
|
+
# AI Flow - Feature Development Workflow
|
|
2
|
+
|
|
3
|
+
**YOU ARE AN EXPERT SOFTWARE ARCHITECT AND IMPLEMENTATION SPECIALIST.**
|
|
4
|
+
|
|
5
|
+
Your mission is to create, modify, or refactor complete features through an interactive workflow when the user executes `/feature`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Command: `/feature`
|
|
10
|
+
|
|
11
|
+
### Objective
|
|
12
|
+
|
|
13
|
+
Create, modify, or refactor complete functionalities with automatic documentation, tests, and validation.
|
|
14
|
+
|
|
15
|
+
### Usage Modes
|
|
16
|
+
|
|
17
|
+
- **`/feature`** → Interactive mode (asks type: new/change/refactor)
|
|
18
|
+
- **`/feature new`** → New functionality from scratch
|
|
19
|
+
- **`/feature change`** → Modify existing functionality
|
|
20
|
+
- **`/feature refactor`** → Refactor existing code
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Workflow: 4 Phases (15-20 minutes)
|
|
25
|
+
|
|
26
|
+
### Phase 1: Quick Specification (2-3 minutes)
|
|
27
|
+
|
|
28
|
+
Ask 3-5 key questions to understand requirements:
|
|
29
|
+
|
|
30
|
+
1. **What do you want to build?** (describe in 1-2 sentences)
|
|
31
|
+
2. **What endpoints/functions do you need?**
|
|
32
|
+
3. **What database entities/models?**
|
|
33
|
+
4. **Special requirements?** (real-time, authentication, etc.)
|
|
34
|
+
|
|
35
|
+
**Generate:** `.ai-flow/work/feature-[name]/spec.md`
|
|
36
|
+
|
|
37
|
+
**Example interaction:**
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
41
|
+
🚀 Feature Workflow | Phase 1/4: Specification
|
|
42
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
43
|
+
|
|
44
|
+
What do you want to build? (1-2 sentences)
|
|
45
|
+
> [Wait for user response]
|
|
46
|
+
|
|
47
|
+
What endpoints/functions do you need?
|
|
48
|
+
> [Wait for user response]
|
|
49
|
+
|
|
50
|
+
What database entities?
|
|
51
|
+
> [Wait for user response]
|
|
52
|
+
|
|
53
|
+
Special requirements? (real-time, auth, etc.)
|
|
54
|
+
> [Wait for user response]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Phase 2: Technical Plan (1 minute - auto-generated)
|
|
58
|
+
|
|
59
|
+
Based on the project's detected stack and existing patterns, auto-generate a technical plan.
|
|
60
|
+
|
|
61
|
+
**Analyze:**
|
|
62
|
+
|
|
63
|
+
- Read `AGENT.md` and `ai-instructions.md` for project context
|
|
64
|
+
- Detect framework, ORM, and tech stack
|
|
65
|
+
- Identify existing code patterns
|
|
66
|
+
|
|
67
|
+
**Detect Complexity Automatically:**
|
|
68
|
+
|
|
69
|
+
Count total tasks needed based on spec. Then classify:
|
|
70
|
+
|
|
71
|
+
- **SIMPLE** (1-10 tasks): Single-phase implementation
|
|
72
|
+
- Small changes, 1-2 files, minimal dependencies
|
|
73
|
+
- Example: Add field to entity + update endpoint
|
|
74
|
+
- **MEDIUM** (11-40 tasks): 2-4 phases
|
|
75
|
+
- Multiple files, some cross-layer dependencies
|
|
76
|
+
- Example: New entity with CRUD + validation + tests
|
|
77
|
+
- **COMPLEX** (41-80 tasks): 4-8 phases
|
|
78
|
+
- Multiple modules, integration, extensive testing
|
|
79
|
+
- Example: Authentication system with multiple providers
|
|
80
|
+
- **LARGE** (81+ tasks): 8-N phases
|
|
81
|
+
- Feature affecting entire system, major refactoring
|
|
82
|
+
- Example: Multi-tenant architecture implementation
|
|
83
|
+
|
|
84
|
+
**Story Points Estimation (Fibonacci Scale):**
|
|
85
|
+
|
|
86
|
+
Estimate complexity using industry-standard Fibonacci Story Points:
|
|
87
|
+
|
|
88
|
+
| Story Points | Complexity | Typical Time | Example Task |
|
|
89
|
+
| ------------ | ---------- | ------------ | ------------------------------------ |
|
|
90
|
+
| **1 SP** | Trivial | 1-2 hours | Add simple field, update enum |
|
|
91
|
+
| **2 SP** | Very Small | 2-4 hours | Basic validation, simple test |
|
|
92
|
+
| **3 SP** | Small | 4-8 hours | Simple CRUD endpoint, basic entity |
|
|
93
|
+
| **5 SP** | Medium | 1-2 days | Complex endpoint with business logic |
|
|
94
|
+
| **8 SP** | Complex | 2-3 days | Auth flow, complex validation |
|
|
95
|
+
| **13 SP** | Large | 1 week | Complete module with full tests |
|
|
96
|
+
| **21 SP** | Very Large | 2 weeks | Major feature with integration |
|
|
97
|
+
|
|
98
|
+
> **Note:** Times assume experienced developer with AI assistance.
|
|
99
|
+
> Without AI: multiply by 2-3x.
|
|
100
|
+
|
|
101
|
+
**Phase Structure (for MEDIUM/COMPLEX/LARGE):**
|
|
102
|
+
|
|
103
|
+
Organize tasks into logical phases:
|
|
104
|
+
|
|
105
|
+
1. **Data Layer** - Entities, migrations, repositories
|
|
106
|
+
2. **Business Logic** - Services, validation, business rules
|
|
107
|
+
3. **API Layer** - Controllers, routes, DTOs
|
|
108
|
+
4. **Integration** - Connect layers, middleware, error handling
|
|
109
|
+
5. **Testing** - Unit tests, integration tests, E2E tests
|
|
110
|
+
6. **Documentation** - Update docs, examples, deployment notes
|
|
111
|
+
|
|
112
|
+
**Show plan to user:**
|
|
113
|
+
|
|
114
|
+
- Technical decisions (libraries, patterns)
|
|
115
|
+
- Files to create/modify
|
|
116
|
+
- Tasks organized by phases (or flat list if SIMPLE)
|
|
117
|
+
- Dependencies between phases
|
|
118
|
+
- Estimated time per phase
|
|
119
|
+
|
|
120
|
+
**Generate:** `.ai-flow/work/feature-[name]/plan.md`
|
|
121
|
+
|
|
122
|
+
**Example output (SIMPLE):**
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
126
|
+
📐 Technical Plan (auto-generated)
|
|
127
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
128
|
+
|
|
129
|
+
Based on your project (Node.js + Express + PostgreSQL):
|
|
130
|
+
|
|
131
|
+
**Complexity:** SIMPLE (8 tasks) • 3 SP
|
|
132
|
+
⏱️ **Est. Time:** 15-20 minutes
|
|
133
|
+
|
|
134
|
+
**Stack decisions:**
|
|
135
|
+
- Validation: joi ⚡
|
|
136
|
+
|
|
137
|
+
**Files to modify:**
|
|
138
|
+
- src/entities/User.entity.ts
|
|
139
|
+
- src/controllers/UserController.ts
|
|
140
|
+
- tests/user.test.ts
|
|
141
|
+
|
|
142
|
+
**Tasks:**
|
|
143
|
+
- [ ] Add email field to User entity (1 SP)
|
|
144
|
+
- [ ] Update UserController validation (0.5 SP)
|
|
145
|
+
- [ ] Add migration for email column (0.5 SP)
|
|
146
|
+
- [ ] Update existing tests (0.5 SP)
|
|
147
|
+
- [ ] Add email validation tests (0.5 SP)
|
|
148
|
+
- [ ] Update API documentation (trivial)
|
|
149
|
+
- [ ] Update data model documentation (trivial)
|
|
150
|
+
- [ ] Test endpoint manually (trivial)
|
|
151
|
+
|
|
152
|
+
**Total:** 3 SP (~15-20 min with AI assistance)
|
|
153
|
+
|
|
154
|
+
Review plan? (Y/n)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Example output (COMPLEX):**
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
161
|
+
📐 Technical Plan (auto-generated)
|
|
162
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
163
|
+
|
|
164
|
+
Based on your project (Node.js + Express + PostgreSQL):
|
|
165
|
+
|
|
166
|
+
**Complexity:** COMPLEX (52 tasks across 5 phases) • 34 SP
|
|
167
|
+
⏱️ **Est. Time:** 2-3 hours
|
|
168
|
+
|
|
169
|
+
**Stack decisions:**
|
|
170
|
+
- Auth: JWT with jsonwebtoken ⭐
|
|
171
|
+
- Validation: joi ⚡
|
|
172
|
+
- Email: nodemailer 📧
|
|
173
|
+
|
|
174
|
+
## Phase 1: Data Layer • 8 SP
|
|
175
|
+
⏱️ **Est. Time:** 30-40 min
|
|
176
|
+
|
|
177
|
+
- [ ] 1.1 Create User entity (2 SP)
|
|
178
|
+
- [ ] 1.2 Create Session entity (1 SP)
|
|
179
|
+
- [ ] 1.3 Create RefreshToken entity (1 SP)
|
|
180
|
+
- [ ] 1.4 Create migrations (1 SP)
|
|
181
|
+
- [ ] 1.5 Create UserRepository (1 SP)
|
|
182
|
+
- [ ] 1.6 Create SessionRepository (1 SP)
|
|
183
|
+
- [ ] 1.7 Create RefreshTokenRepository (1 SP)
|
|
184
|
+
- [ ] ... (4 more tasks)
|
|
185
|
+
|
|
186
|
+
## Phase 2: Business Logic • 13 SP
|
|
187
|
+
⏱️ **Est. Time:** 50-60 min
|
|
188
|
+
|
|
189
|
+
- [ ] 2.1 Create AuthService (3 SP)
|
|
190
|
+
- [ ] 2.2 Create TokenService (2 SP)
|
|
191
|
+
- [ ] 2.3 Create EmailService (2 SP)
|
|
192
|
+
- [ ] 2.4 Implement password hashing (1 SP)
|
|
193
|
+
- [ ] 2.5 Implement JWT generation (2 SP)
|
|
194
|
+
- [ ] 2.6 Implement refresh token rotation (2 SP)
|
|
195
|
+
- [ ] 2.7 Email verification flow (1 SP)
|
|
196
|
+
- [ ] ... (8 more tasks)
|
|
197
|
+
|
|
198
|
+
## Phase 3: API Layer • 8 SP
|
|
199
|
+
⏱️ **Est. Time:** 30-40 min
|
|
200
|
+
|
|
201
|
+
- [ ] 3.1 Create AuthController (3 SP)
|
|
202
|
+
- [ ] 3.2 Create auth middleware (2 SP)
|
|
203
|
+
- [ ] 3.3 Create validation schemas (1 SP)
|
|
204
|
+
- [ ] 3.4 Create DTOs (1 SP)
|
|
205
|
+
- [ ] 3.5 Setup routes (1 SP)
|
|
206
|
+
- [ ] ... (7 more tasks)
|
|
207
|
+
|
|
208
|
+
## Phase 4: Integration • 3 SP
|
|
209
|
+
⏱️ **Est. Time:** 15-20 min
|
|
210
|
+
|
|
211
|
+
- [ ] 4.1 Connect services to controllers (1 SP)
|
|
212
|
+
- [ ] 4.2 Add error handling middleware (1 SP)
|
|
213
|
+
- [ ] 4.3 Configure CORS and security headers (1 SP)
|
|
214
|
+
- [ ] ... (5 more tasks)
|
|
215
|
+
|
|
216
|
+
## Phase 5: Testing & Docs • 2 SP
|
|
217
|
+
⏱️ **Est. Time:** 10-15 min
|
|
218
|
+
|
|
219
|
+
- [ ] 5.1 Unit tests for services (1 SP)
|
|
220
|
+
- [ ] 5.2 Integration tests for API (1 SP)
|
|
221
|
+
- [ ] 5.3 Update documentation (trivial)
|
|
222
|
+
- [ ] ... (4 more tasks)
|
|
223
|
+
|
|
224
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
225
|
+
**Total:** 34 SP • 52 tasks • ~2-3 hours with AI assistance
|
|
226
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
227
|
+
|
|
228
|
+
Review plan? (Y/n)
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
### Phase 0.5: Git Branch Setup (Optional, 30 seconds)
|
|
234
|
+
|
|
235
|
+
**After user confirms plan, detect Git repository:**
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
git rev-parse --git-dir 2>/dev/null
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**If NO Git repository found:**
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
ℹ️ No Git repository detected
|
|
245
|
+
|
|
246
|
+
Git integration is disabled for this session.
|
|
247
|
+
To enable Git features, initialize a repository first:
|
|
248
|
+
git init
|
|
249
|
+
git remote add origin <url>
|
|
250
|
+
|
|
251
|
+
Continue without Git? (Y/n)
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**If Git repository detected:**
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
258
|
+
🌿 Git Integration
|
|
259
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
260
|
+
|
|
261
|
+
Git repository detected ✅
|
|
262
|
+
Current branch: main
|
|
263
|
+
Status: clean
|
|
264
|
+
|
|
265
|
+
Feature: notifications-websocket
|
|
266
|
+
Suggested branch: feature/notifications-websocket
|
|
267
|
+
|
|
268
|
+
Create new branch and enable Git integration?
|
|
269
|
+
|
|
270
|
+
A) ⭐ Yes - Create branch + auto-commit per phase (Recommended for MEDIUM/COMPLEX/LARGE)
|
|
271
|
+
B) Yes - Create branch + single commit at end (Good for SIMPLE)
|
|
272
|
+
C) Work on current branch (no branch creation)
|
|
273
|
+
D) Skip Git integration (work without commits)
|
|
274
|
+
|
|
275
|
+
Your choice (A): __
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**Smart defaults based on complexity:**
|
|
279
|
+
|
|
280
|
+
- **SIMPLE** (1-10 tasks) → Suggest **Option B** (single commit at end)
|
|
281
|
+
- **MEDIUM/COMPLEX/LARGE** (11+ tasks) → Suggest **Option A** (commit per phase)
|
|
282
|
+
|
|
283
|
+
**Edge Case 1: Uncommitted Changes Detected**
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
git status --porcelain
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
If output is non-empty:
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
⚠️ Uncommitted changes detected:
|
|
293
|
+
|
|
294
|
+
M src/controllers/UserController.ts
|
|
295
|
+
M src/services/AuthService.ts
|
|
296
|
+
?? new-file.ts
|
|
297
|
+
|
|
298
|
+
Options:
|
|
299
|
+
A) Stash changes and proceed (git stash)
|
|
300
|
+
B) Commit changes first (I'll guide you)
|
|
301
|
+
C) Continue anyway (changes will be included)
|
|
302
|
+
D) Cancel workflow
|
|
303
|
+
|
|
304
|
+
Your choice (A): __
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**If A selected:** `git stash && git stash list` → Show stash confirmation
|
|
308
|
+
**If B selected:** Guide conventional commit, then continue
|
|
309
|
+
**If D selected:** Exit workflow
|
|
310
|
+
|
|
311
|
+
**Edge Case 2: Already on Feature Branch**
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
git rev-parse --abbrev-ref HEAD
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
If result starts with `feature/`, `fix/`, or `refactor/`:
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
⚠️ You're currently on branch: feature/other-work
|
|
321
|
+
|
|
322
|
+
Options:
|
|
323
|
+
A) Continue on this branch (may mix work)
|
|
324
|
+
B) Create new branch from current (branch off)
|
|
325
|
+
C) Switch to main/develop first (recommended)
|
|
326
|
+
D) Skip Git integration
|
|
327
|
+
|
|
328
|
+
Your choice (C): __
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**If C selected:** `git checkout main` → Then proceed with branch creation
|
|
332
|
+
|
|
333
|
+
**Edge Case 3: Branch Name Already Exists**
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
git show-ref --verify --quiet refs/heads/feature/notifications-websocket
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
If exists:
|
|
340
|
+
|
|
341
|
+
```
|
|
342
|
+
⚠️ Branch 'feature/notifications-websocket' already exists
|
|
343
|
+
|
|
344
|
+
Options:
|
|
345
|
+
A) Use different name (feature/notifications-websocket-v2)
|
|
346
|
+
B) Checkout existing branch (continue previous work)
|
|
347
|
+
C) Skip Git integration
|
|
348
|
+
|
|
349
|
+
Your choice (A): __
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
**Edge Case 4: Detached HEAD State**
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
git symbolic-ref -q HEAD || echo "detached"
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
If detached:
|
|
359
|
+
|
|
360
|
+
```
|
|
361
|
+
⚠️ Detached HEAD state detected
|
|
362
|
+
|
|
363
|
+
You're not on a branch. Git integration requires a branch.
|
|
364
|
+
|
|
365
|
+
Options:
|
|
366
|
+
A) Create new branch here (git checkout -b feature/notifications)
|
|
367
|
+
B) Go back to previous branch (git checkout -)
|
|
368
|
+
C) Switch to main (git checkout main)
|
|
369
|
+
D) Skip Git integration
|
|
370
|
+
|
|
371
|
+
Your choice (C): __
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
**Actions if user enables Git integration (Options A or B):**
|
|
375
|
+
|
|
376
|
+
1. **Create branch:**
|
|
377
|
+
|
|
378
|
+
```bash
|
|
379
|
+
git checkout -b feature/notifications-websocket
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
2. **Update status.json:**
|
|
383
|
+
|
|
384
|
+
```json
|
|
385
|
+
{
|
|
386
|
+
"git": {
|
|
387
|
+
"enabled": true,
|
|
388
|
+
"autoCommit": "phase" | "end", // Based on user choice A or B
|
|
389
|
+
"branchCreated": true,
|
|
390
|
+
"branchName": "feature/notifications-websocket",
|
|
391
|
+
"sourceBranch": "main",
|
|
392
|
+
"commits": [],
|
|
393
|
+
"lastCommitSha": null,
|
|
394
|
+
"uncommittedChanges": false,
|
|
395
|
+
"readyForPR": false,
|
|
396
|
+
"prSuggested": false
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
3. **Show confirmation:**
|
|
402
|
+
|
|
403
|
+
```
|
|
404
|
+
✅ Branch created: feature/notifications-websocket
|
|
405
|
+
📦 Git commits will be created: per phase
|
|
406
|
+
|
|
407
|
+
Proceeding to implementation...
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
**If user skips Git (Options C or D):**
|
|
411
|
+
|
|
412
|
+
```json
|
|
413
|
+
{
|
|
414
|
+
"git": {
|
|
415
|
+
"enabled": false
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
### Phase 3: Progressive Implementation (10-15 minutes)
|
|
423
|
+
|
|
424
|
+
**STEP 3.1: Choose Implementation Mode**
|
|
425
|
+
|
|
426
|
+
After user confirms plan (Review plan? Y), suggest smart default based on complexity:
|
|
427
|
+
|
|
428
|
+
**Smart Defaults:**
|
|
429
|
+
|
|
430
|
+
- **SIMPLE** → Mode 1 (Auto) - Fast, no pauses needed
|
|
431
|
+
- **MEDIUM** → Mode 2 (Phase-by-phase) - Balanced control
|
|
432
|
+
- **COMPLEX/LARGE** → Mode 2 (Phase-by-phase) - Review between phases
|
|
433
|
+
|
|
434
|
+
Ask with recommended default:
|
|
435
|
+
|
|
436
|
+
```
|
|
437
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
438
|
+
⚙️ Implementation Mode
|
|
439
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
440
|
+
|
|
441
|
+
Recommended: Phase-by-phase (based on COMPLEX feature)
|
|
442
|
+
|
|
443
|
+
How do you want to proceed?
|
|
444
|
+
|
|
445
|
+
1. 🚀 Auto (implement all tasks automatically)
|
|
446
|
+
2. 📋 Phase-by-phase (pause after each phase for review) ⭐ RECOMMENDED
|
|
447
|
+
3. 🔍 Task-by-task (manual approval for each task)
|
|
448
|
+
4. 💾 Save and resume later
|
|
449
|
+
|
|
450
|
+
Your choice (2): [1/2/3/4]
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
**Note:** User can override recommended mode by typing different number, or press Enter to accept default.
|
|
454
|
+
|
|
455
|
+
**STEP 3.2: Execute Based on Mode**
|
|
456
|
+
|
|
457
|
+
#### Mode 1: Auto (Default for SIMPLE features)
|
|
458
|
+
|
|
459
|
+
Execute all tasks automatically with progress updates:
|
|
460
|
+
|
|
461
|
+
```
|
|
462
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
463
|
+
⚙️ Implementation (Auto Mode)
|
|
464
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
465
|
+
|
|
466
|
+
Task 1/12: Create User entity ✅
|
|
467
|
+
Task 2/12: Create AuthService ✅
|
|
468
|
+
Task 3/12: Create AuthController ✅
|
|
469
|
+
...
|
|
470
|
+
Task 12/12: Update documentation ✅
|
|
471
|
+
|
|
472
|
+
All tasks completed! ✅
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
#### Mode 2: Phase-by-phase (Recommended for COMPLEX features)
|
|
476
|
+
|
|
477
|
+
Execute one phase at a time, pause for review:
|
|
478
|
+
|
|
479
|
+
```
|
|
480
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
481
|
+
⚙️ Implementation (Phase-by-phase Mode)
|
|
482
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
483
|
+
|
|
484
|
+
PHASE 1/5: Data Layer
|
|
485
|
+
├── Task 1.1: Create User entity ✅
|
|
486
|
+
├── Task 1.2: Create Session entity ✅
|
|
487
|
+
├── Task 1.3: Create RefreshToken entity ✅
|
|
488
|
+
├── Task 1.4: Create migrations ✅
|
|
489
|
+
├── Task 1.5: Create UserRepository ✅
|
|
490
|
+
└── ... (5 more tasks) ✅
|
|
491
|
+
|
|
492
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
493
|
+
✅ Phase 1 Complete (10/10 tasks)
|
|
494
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
495
|
+
|
|
496
|
+
📁 Files created:
|
|
497
|
+
- src/entities/User.entity.ts
|
|
498
|
+
- src/entities/Session.entity.ts
|
|
499
|
+
- src/entities/RefreshToken.entity.ts
|
|
500
|
+
- src/migrations/001_create_auth_tables.ts
|
|
501
|
+
- src/repositories/UserRepository.ts
|
|
502
|
+
|
|
503
|
+
**If git.enabled === true AND git.autoCommit === "phase":**
|
|
504
|
+
|
|
505
|
+
**Pre-commit Validation:**
|
|
506
|
+
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
🔍 Running pre-commit checks...
|
|
510
|
+
✅ Lint passed (eslint --fix applied)
|
|
511
|
+
✅ Tests passed (24/24, +10 new tests)
|
|
512
|
+
✅ Type check passed
|
|
513
|
+
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
**If validation FAILS:**
|
|
517
|
+
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
❌ Pre-commit checks failed:
|
|
521
|
+
|
|
522
|
+
Lint errors (2):
|
|
523
|
+
|
|
524
|
+
- src/entities/User.entity.ts:15 - Missing semicolon
|
|
525
|
+
- src/entities/Session.entity.ts:22 - Unused import
|
|
526
|
+
|
|
527
|
+
Options:
|
|
528
|
+
A) Fix issues automatically and retry
|
|
529
|
+
B) Skip commit (continue without committing)
|
|
530
|
+
C) Show errors and let me fix manually
|
|
531
|
+
D) Force commit anyway (not recommended)
|
|
532
|
+
|
|
533
|
+
Your choice (A): \_\_
|
|
534
|
+
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
**If option A:** Run fixes, re-validate, continue
|
|
538
|
+
**If option B:** Skip commit, set `uncommittedChanges: true`
|
|
539
|
+
**If option C:** Show errors, pause workflow
|
|
540
|
+
**If option D:** Commit with `--no-verify`
|
|
541
|
+
|
|
542
|
+
**If validation PASSES:**
|
|
543
|
+
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
📦 Creating commit for Phase 1...
|
|
547
|
+
|
|
548
|
+
Conventional Commit:
|
|
549
|
+
Type: feat
|
|
550
|
+
Scope: entities
|
|
551
|
+
Subject: add authentication entities and migrations
|
|
552
|
+
|
|
553
|
+
Generated commit message:
|
|
554
|
+
───────────────────────────────────────────────────────
|
|
555
|
+
feat(entities): add authentication entities and migrations
|
|
556
|
+
|
|
557
|
+
- Create User entity with email verification
|
|
558
|
+
- Create Session entity for active sessions tracking
|
|
559
|
+
- Create RefreshToken entity with rotation support
|
|
560
|
+
- Add migrations for auth tables
|
|
561
|
+
- Add UserRepository with findByEmail method
|
|
562
|
+
|
|
563
|
+
Files changed: 5
|
|
564
|
+
Lines added: 245
|
|
565
|
+
───────────────────────────────────────────────────────
|
|
566
|
+
|
|
567
|
+
Commit this? (Y/n/edit): \_\_
|
|
568
|
+
|
|
569
|
+
````
|
|
570
|
+
|
|
571
|
+
**If Y:** Execute commit
|
|
572
|
+
**If n:** Skip commit
|
|
573
|
+
**If edit:** Allow editing commit message
|
|
574
|
+
|
|
575
|
+
**Execute commit:**
|
|
576
|
+
|
|
577
|
+
```bash
|
|
578
|
+
git add .
|
|
579
|
+
git commit -m "feat(entities): add authentication entities and migrations
|
|
580
|
+
|
|
581
|
+
- Create User entity with email verification
|
|
582
|
+
- Create Session entity for active sessions tracking
|
|
583
|
+
- Create RefreshToken entity with rotation support
|
|
584
|
+
- Add migrations for auth tables
|
|
585
|
+
- Add UserRepository with findByEmail method"
|
|
586
|
+
````
|
|
587
|
+
|
|
588
|
+
**Update status.json:**
|
|
589
|
+
|
|
590
|
+
```json
|
|
591
|
+
{
|
|
592
|
+
"git": {
|
|
593
|
+
"commits": [
|
|
594
|
+
{
|
|
595
|
+
"sha": "abc123def456",
|
|
596
|
+
"type": "feat",
|
|
597
|
+
"scope": "entities",
|
|
598
|
+
"message": "add authentication entities and migrations",
|
|
599
|
+
"phase": 1,
|
|
600
|
+
"timestamp": "2025-12-04T14:30:00Z",
|
|
601
|
+
"filesChanged": 5
|
|
602
|
+
}
|
|
603
|
+
],
|
|
604
|
+
"lastCommitSha": "abc123def456",
|
|
605
|
+
"uncommittedChanges": false
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
**Show confirmation:**
|
|
611
|
+
|
|
612
|
+
```
|
|
613
|
+
✅ Committed: abc123de
|
|
614
|
+
feat(entities): add authentication entities and migrations
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
Continue to Phase 2? (Y/n/pause)
|
|
618
|
+
|
|
619
|
+
> Y
|
|
620
|
+
|
|
621
|
+
PHASE 2/5: Business Logic
|
|
622
|
+
├── Task 2.1: Create AuthService ✅
|
|
623
|
+
...
|
|
624
|
+
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
**Options after each phase:**
|
|
628
|
+
|
|
629
|
+
- **Y** → Continue to next phase
|
|
630
|
+
- **n** → Stop and allow modifications
|
|
631
|
+
- **pause** → Save progress and exit (can resume with `/work resume`)
|
|
632
|
+
|
|
633
|
+
#### Mode 3: Task-by-task (Maximum control)
|
|
634
|
+
|
|
635
|
+
Ask confirmation before each task:
|
|
636
|
+
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
640
|
+
⚙️ Implementation (Task-by-task Mode)
|
|
641
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
642
|
+
|
|
643
|
+
Next task: Create User entity
|
|
644
|
+
Files to create: src/entities/User.entity.ts
|
|
645
|
+
|
|
646
|
+
Proceed? (Y/n/skip/pause)
|
|
647
|
+
|
|
648
|
+
> Y
|
|
649
|
+
|
|
650
|
+
[Creates User.entity.ts]
|
|
651
|
+
|
|
652
|
+
✅ Task 1/12 complete
|
|
653
|
+
|
|
654
|
+
Next task: Create AuthService
|
|
655
|
+
Files to create: src/services/AuthService.ts
|
|
656
|
+
|
|
657
|
+
Proceed? (Y/n/skip/pause)
|
|
658
|
+
|
|
659
|
+
> Y
|
|
660
|
+
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
**Options for each task:**
|
|
664
|
+
|
|
665
|
+
- **Y** → Execute task
|
|
666
|
+
- **n** → Stop (allow manual work)
|
|
667
|
+
- **skip** → Skip this task
|
|
668
|
+
- **pause** → Save and exit
|
|
669
|
+
|
|
670
|
+
#### Mode 4: Save and resume later
|
|
671
|
+
|
|
672
|
+
Save current state and exit:
|
|
673
|
+
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
677
|
+
💾 Progress Saved
|
|
678
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
679
|
+
|
|
680
|
+
Current progress: 0/52 tasks (0%)
|
|
681
|
+
Status: Ready to start
|
|
682
|
+
|
|
683
|
+
To resume: /work resume feature-[name]
|
|
684
|
+
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
**Generate:** `.ai-flow/work/feature-[name]/tasks.md` (with ✅ checkmarks)
|
|
688
|
+
|
|
689
|
+
**Implementation rules:**
|
|
690
|
+
|
|
691
|
+
- Follow project conventions detected in codebase
|
|
692
|
+
- Use same code style as existing files
|
|
693
|
+
- Write tests for all new code
|
|
694
|
+
- Validate each task before marking complete
|
|
695
|
+
- Update status.json after each task/phase
|
|
696
|
+
|
|
697
|
+
### Phase 4: Security Check + Auto-Archive (1-2 minutes)
|
|
698
|
+
|
|
699
|
+
**Security Quick Check:**
|
|
700
|
+
Ask 1-2 questions about production considerations:
|
|
701
|
+
|
|
702
|
+
- Add rate limiting?
|
|
703
|
+
- Input validation sufficient?
|
|
704
|
+
- Consider [specific concern] for production?
|
|
705
|
+
|
|
706
|
+
**Auto-Archive:**
|
|
707
|
+
|
|
708
|
+
1. Move work to `.ai-flow/archive/YYYY-MM/feature-[name]/`
|
|
709
|
+
2. Update affected documentation:
|
|
710
|
+
- `docs/api.md` (if new endpoints)
|
|
711
|
+
- `docs/data-model.md` (if new entities)
|
|
712
|
+
- `specs/security.md` (if auth/permissions changed)
|
|
713
|
+
3. Generate final summary
|
|
714
|
+
|
|
715
|
+
**Example output:**
|
|
716
|
+
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
720
|
+
🔒 Security Quick Check
|
|
721
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
722
|
+
|
|
723
|
+
✅ Password hashing: bcrypt cost 12
|
|
724
|
+
✅ JWT secret: from env variable
|
|
725
|
+
⚠️ Consider: Rate limiting on login endpoint
|
|
726
|
+
|
|
727
|
+
Add rate limiting now? (Y/n)
|
|
728
|
+
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
**Documentation Updates:**
|
|
732
|
+
|
|
733
|
+
Update affected documentation files:
|
|
734
|
+
- `docs/api.md` - Add new endpoints
|
|
735
|
+
- `docs/data-model.md` - Add new entities
|
|
736
|
+
- `.env.example` - Add new environment variables
|
|
737
|
+
|
|
738
|
+
**If git.enabled === true:**
|
|
739
|
+
|
|
740
|
+
**Final Documentation Commit:**
|
|
741
|
+
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
📦 Creating final documentation commit...
|
|
745
|
+
|
|
746
|
+
Conventional Commit:
|
|
747
|
+
Type: docs
|
|
748
|
+
Scope: api
|
|
749
|
+
Subject: update documentation for authentication feature
|
|
750
|
+
|
|
751
|
+
Generated commit message:
|
|
752
|
+
───────────────────────────────────────────────────────
|
|
753
|
+
docs(api): update documentation for authentication feature
|
|
754
|
+
|
|
755
|
+
- Add 5 authentication endpoints with examples
|
|
756
|
+
- Update data model with User, Session, RefreshToken entities
|
|
757
|
+
- Add environment variables for JWT configuration
|
|
758
|
+
- Document rate limiting on auth endpoints
|
|
759
|
+
|
|
760
|
+
Files changed: 3
|
|
761
|
+
───────────────────────────────────────────────────────
|
|
762
|
+
|
|
763
|
+
Commit? (Y/n): \_\_
|
|
764
|
+
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
**After final commit:**
|
|
768
|
+
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
772
|
+
✅ Feature Complete!
|
|
773
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
774
|
+
|
|
775
|
+
Summary:
|
|
776
|
+
|
|
777
|
+
- Feature: JWT authentication system
|
|
778
|
+
- Files: 28 created, 5 modified
|
|
779
|
+
- Tests: 47 added (all passing ✅)
|
|
780
|
+
- Time: 2.5 hours
|
|
781
|
+
- Complexity: COMPLEX (52 tasks, 5 phases)
|
|
782
|
+
|
|
783
|
+
📦 Git Summary:
|
|
784
|
+
Branch: feature/auth-jwt-system
|
|
785
|
+
Source: main
|
|
786
|
+
Commits: 6
|
|
787
|
+
|
|
788
|
+
1. feat(entities): add authentication entities and migrations
|
|
789
|
+
2. feat(services): implement AuthService and TokenService
|
|
790
|
+
3. feat(api): add authentication endpoints
|
|
791
|
+
4. feat(middleware): add JWT verification middleware
|
|
792
|
+
5. test(auth): add comprehensive test suite
|
|
793
|
+
6. docs(api): update documentation for authentication feature
|
|
794
|
+
|
|
795
|
+
All changes committed ✅
|
|
796
|
+
Ready for Pull Request ✅
|
|
797
|
+
|
|
798
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
799
|
+
|
|
800
|
+
Would you like to create a Pull Request?
|
|
801
|
+
|
|
802
|
+
A) Show PR command (recommended)
|
|
803
|
+
B) No, I'll create it later
|
|
804
|
+
|
|
805
|
+
Your choice (A): \_\_
|
|
806
|
+
|
|
807
|
+
```
|
|
808
|
+
|
|
809
|
+
**If option A selected:**
|
|
810
|
+
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
To create a Pull Request, run:
|
|
814
|
+
|
|
815
|
+
gh pr create \
|
|
816
|
+
--title "feat: JWT authentication system" \
|
|
817
|
+
--body "## Summary
|
|
818
|
+
Implements complete JWT authentication with refresh tokens, email verification, and session management.
|
|
819
|
+
|
|
820
|
+
## Changes
|
|
821
|
+
|
|
822
|
+
- **Entities:** User, Session, RefreshToken with relationships
|
|
823
|
+
- **Services:** AuthService, TokenService, EmailService
|
|
824
|
+
- **API:** 5 endpoints (register, login, refresh, logout, verify-email)
|
|
825
|
+
- **Security:** bcrypt password hashing, JWT with RS256
|
|
826
|
+
- **Tests:** 47 tests (unit + integration), 95% coverage
|
|
827
|
+
|
|
828
|
+
## Documentation
|
|
829
|
+
|
|
830
|
+
- API endpoints documented in docs/api.md
|
|
831
|
+
- Data model updated in docs/data-model.md
|
|
832
|
+
- Environment variables in .env.example
|
|
833
|
+
|
|
834
|
+
## Testing
|
|
835
|
+
|
|
836
|
+
- ✅ All 47 tests passing
|
|
837
|
+
- ✅ Lint checks passed
|
|
838
|
+
- ✅ Type checks passed
|
|
839
|
+
- ✅ Security review completed" \
|
|
840
|
+
--base main \
|
|
841
|
+
--head feature/auth-jwt-system
|
|
842
|
+
|
|
843
|
+
Or open in browser:
|
|
844
|
+
https://github.com/[user]/[repo]/compare/main...feature/auth-jwt-system
|
|
845
|
+
|
|
846
|
+
````
|
|
847
|
+
|
|
848
|
+
**Update status.json:**
|
|
849
|
+
|
|
850
|
+
```json
|
|
851
|
+
{
|
|
852
|
+
"git": {
|
|
853
|
+
"readyForPR": true,
|
|
854
|
+
"prSuggested": true
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
````
|
|
858
|
+
|
|
859
|
+
---
|
|
860
|
+
|
|
861
|
+
## Files Generated
|
|
862
|
+
|
|
863
|
+
### During workflow (work directory):
|
|
864
|
+
|
|
865
|
+
```
|
|
866
|
+
.ai-flow/work/feature-[name]/
|
|
867
|
+
├── spec.md # What is being built
|
|
868
|
+
├── plan.md # How it will be built
|
|
869
|
+
├── tasks.md # Checklist with ✅
|
|
870
|
+
├── status.json # Metadata (progress, timestamps)
|
|
871
|
+
└── implementation.md # Optional implementation notes
|
|
872
|
+
```
|
|
873
|
+
|
|
874
|
+
### After completion (archive):
|
|
875
|
+
|
|
876
|
+
```
|
|
877
|
+
.ai-flow/archive/YYYY-MM/feature-[name]/
|
|
878
|
+
├── spec.md
|
|
879
|
+
├── plan.md
|
|
880
|
+
├── tasks.md
|
|
881
|
+
└── summary.md # Final summary with stats
|
|
882
|
+
```
|
|
883
|
+
|
|
884
|
+
---
|
|
885
|
+
|
|
886
|
+
## status.json Schema
|
|
887
|
+
|
|
888
|
+
```json
|
|
889
|
+
{
|
|
890
|
+
"name": "feature-notifications",
|
|
891
|
+
"type": "feature",
|
|
892
|
+
"subtype": "new" | "change" | "refactor",
|
|
893
|
+
"complexity": "simple" | "medium" | "complex" | "large",
|
|
894
|
+
"status": "in_progress" | "completed" | "paused",
|
|
895
|
+
"phase": "spec" | "plan" | "implementation" | "done",
|
|
896
|
+
"implementationMode": "auto" | "phase-by-phase" | "task-by-task",
|
|
897
|
+
"progress": {
|
|
898
|
+
"completed": 12,
|
|
899
|
+
"total": 52,
|
|
900
|
+
"percentage": 23,
|
|
901
|
+
"currentPhase": 2,
|
|
902
|
+
"totalPhases": 5,
|
|
903
|
+
"currentTask": "2.3"
|
|
904
|
+
},
|
|
905
|
+
"phases": [
|
|
906
|
+
{
|
|
907
|
+
"id": 1,
|
|
908
|
+
"name": "Data Layer",
|
|
909
|
+
"tasks": 10,
|
|
910
|
+
"completed": 10,
|
|
911
|
+
"status": "completed"
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"id": 2,
|
|
915
|
+
"name": "Business Logic",
|
|
916
|
+
"tasks": 15,
|
|
917
|
+
"completed": 2,
|
|
918
|
+
"status": "in_progress"
|
|
919
|
+
}
|
|
920
|
+
],
|
|
921
|
+
"created": "2025-01-20T10:00:00Z",
|
|
922
|
+
"updated": "2025-01-20T15:30:00Z",
|
|
923
|
+
"lastPauseReason": "User requested pause after Phase 1",
|
|
924
|
+
"filesCreated": ["src/entities/Notification.entity.ts", "..."],
|
|
925
|
+
"filesModified": ["src/app.ts"],
|
|
926
|
+
"affectedDocs": ["docs/api.md", "docs/data-model.md"],
|
|
927
|
+
"git": {
|
|
928
|
+
"enabled": true,
|
|
929
|
+
"autoCommit": "phase" | "end" | "off",
|
|
930
|
+
"branchCreated": true,
|
|
931
|
+
"branchName": "feature/notifications-websocket",
|
|
932
|
+
"sourceBranch": "main",
|
|
933
|
+
"commits": [
|
|
934
|
+
{
|
|
935
|
+
"sha": "abc123def456",
|
|
936
|
+
"type": "feat",
|
|
937
|
+
"scope": "entities",
|
|
938
|
+
"message": "add Notification entity with websocket support",
|
|
939
|
+
"phase": 1,
|
|
940
|
+
"timestamp": "2025-01-20T14:30:00Z",
|
|
941
|
+
"filesChanged": 5
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"sha": "def456abc789",
|
|
945
|
+
"type": "feat",
|
|
946
|
+
"scope": "services",
|
|
947
|
+
"message": "implement NotificationService with real-time delivery",
|
|
948
|
+
"phase": 2,
|
|
949
|
+
"timestamp": "2025-01-20T15:00:00Z",
|
|
950
|
+
"filesChanged": 8
|
|
951
|
+
}
|
|
952
|
+
],
|
|
953
|
+
"lastCommitSha": "def456abc789",
|
|
954
|
+
"uncommittedChanges": false,
|
|
955
|
+
"readyForPR": false,
|
|
956
|
+
"prSuggested": false
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
```
|
|
960
|
+
|
|
961
|
+
---
|
|
962
|
+
|
|
963
|
+
## Git Integration
|
|
964
|
+
|
|
965
|
+
### Overview
|
|
966
|
+
|
|
967
|
+
Git integration is **optional** and **non-intrusive**. It helps isolate changes in feature branches and create atomic commits automatically per phase or at the end.
|
|
968
|
+
|
|
969
|
+
**Key Benefits:**
|
|
970
|
+
|
|
971
|
+
- ✅ Automatic branch creation with smart naming (`feature/[name]`)
|
|
972
|
+
- ✅ Conventional Commits enforced (feat/fix/refactor/docs/test)
|
|
973
|
+
- ✅ Pre-commit validation (lint + tests + type check)
|
|
974
|
+
- ✅ Atomic commits per phase (MEDIUM/COMPLEX/LARGE) or single commit (SIMPLE)
|
|
975
|
+
- ✅ Pull Request suggestion with pre-filled template
|
|
976
|
+
- ❌ **NO automatic push** (always local only for safety)
|
|
977
|
+
|
|
978
|
+
### When Git is Used
|
|
979
|
+
|
|
980
|
+
**Branch Creation:** Optional at Phase 0.5 (after plan approval, before implementation)
|
|
981
|
+
**Commit Points:**
|
|
982
|
+
|
|
983
|
+
- **SIMPLE features** (1-10 tasks): Single commit at end
|
|
984
|
+
- **MEDIUM/COMPLEX/LARGE** (11+ tasks): Commit after each phase completion
|
|
985
|
+
|
|
986
|
+
### Conventional Commits Format
|
|
987
|
+
|
|
988
|
+
**Enforced types:**
|
|
989
|
+
|
|
990
|
+
- `feat` - New feature or functionality
|
|
991
|
+
- `fix` - Bug fix
|
|
992
|
+
- `refactor` - Code refactoring
|
|
993
|
+
- `docs` - Documentation updates
|
|
994
|
+
- `test` - Test additions or updates
|
|
995
|
+
- `chore` - Maintenance tasks
|
|
996
|
+
- `perf` - Performance improvements
|
|
997
|
+
- `style` - Code style changes (formatting, etc.)
|
|
998
|
+
|
|
999
|
+
**Format:**
|
|
1000
|
+
|
|
1001
|
+
```
|
|
1002
|
+
<type>(<scope>): <subject>
|
|
1003
|
+
|
|
1004
|
+
<body>
|
|
1005
|
+
|
|
1006
|
+
<footer>
|
|
1007
|
+
```
|
|
1008
|
+
|
|
1009
|
+
**Examples:**
|
|
1010
|
+
|
|
1011
|
+
```bash
|
|
1012
|
+
# Feature with entities
|
|
1013
|
+
feat(entities): add Notification and NotificationSetting entities
|
|
1014
|
+
|
|
1015
|
+
- Create Notification entity with user relationship
|
|
1016
|
+
- Create NotificationSetting entity for preferences
|
|
1017
|
+
- Add migrations for notifications tables
|
|
1018
|
+
- Add indexes for performance
|
|
1019
|
+
|
|
1020
|
+
# Feature with services
|
|
1021
|
+
feat(services): implement NotificationService with real-time delivery
|
|
1022
|
+
|
|
1023
|
+
- NotificationService with create, read, mark as read
|
|
1024
|
+
- WebSocket integration for real-time push
|
|
1025
|
+
- Email fallback for offline users
|
|
1026
|
+
- Unit tests for all methods
|
|
1027
|
+
|
|
1028
|
+
# Documentation update
|
|
1029
|
+
docs(api): update documentation for notifications feature
|
|
1030
|
+
|
|
1031
|
+
- Add 3 notification endpoints with examples
|
|
1032
|
+
- Update data model with Notification entity
|
|
1033
|
+
- Add environment variables for WebSocket
|
|
1034
|
+
```
|
|
1035
|
+
|
|
1036
|
+
### Pre-commit Validation
|
|
1037
|
+
|
|
1038
|
+
**Runs automatically before every commit:**
|
|
1039
|
+
|
|
1040
|
+
1. **Lint check** - ESLint/Prettier/Black/etc.
|
|
1041
|
+
2. **Test execution** - Run full test suite
|
|
1042
|
+
3. **Type check** - TypeScript/MyPy (if applicable)
|
|
1043
|
+
|
|
1044
|
+
**If validation fails:**
|
|
1045
|
+
|
|
1046
|
+
- Show errors clearly with file and line numbers
|
|
1047
|
+
- Offer to auto-fix (if possible)
|
|
1048
|
+
- Allow skip or manual fix
|
|
1049
|
+
- Force commit option available (not recommended)
|
|
1050
|
+
|
|
1051
|
+
**Example validation output:**
|
|
1052
|
+
|
|
1053
|
+
```
|
|
1054
|
+
🔍 Running pre-commit checks...
|
|
1055
|
+
✅ Lint passed (eslint --fix applied)
|
|
1056
|
+
✅ Tests passed (47/47, +12 new tests)
|
|
1057
|
+
✅ Type check passed
|
|
1058
|
+
|
|
1059
|
+
Ready to commit ✅
|
|
1060
|
+
```
|
|
1061
|
+
|
|
1062
|
+
### Edge Cases Handled
|
|
1063
|
+
|
|
1064
|
+
1. ✅ **Uncommitted changes** - Stash, commit first, or continue with them
|
|
1065
|
+
2. ✅ **Already on feature branch** - Continue, branch off, or switch to main
|
|
1066
|
+
3. ✅ **Branch name conflict** - Suggest alternative name or checkout existing
|
|
1067
|
+
4. ✅ **Detached HEAD** - Prompt to create branch or switch to existing
|
|
1068
|
+
5. ✅ **No Git repository** - Disable Git integration gracefully
|
|
1069
|
+
6. ✅ **Behind remote** - Suggest pull before starting (if applicable)
|
|
1070
|
+
7. ✅ **Merge conflicts** - Pause and instruct manual resolution
|
|
1071
|
+
8. ✅ **Large changesets** - Suggest splitting commits by logical groups
|
|
1072
|
+
9. ✅ **Validation failures** - Auto-fix, skip, show errors, or force commit
|
|
1073
|
+
|
|
1074
|
+
### Workflow Example (COMPLEX Feature)
|
|
1075
|
+
|
|
1076
|
+
```
|
|
1077
|
+
1. User runs: /feature new
|
|
1078
|
+
2. Phase 1: Specification (user answers questions)
|
|
1079
|
+
3. Phase 2: Technical Plan (AI generates plan, 52 tasks, 5 phases)
|
|
1080
|
+
4. Phase 0.5: Git Setup
|
|
1081
|
+
→ Detect Git repo ✅
|
|
1082
|
+
→ Suggest: feature/auth-jwt-system
|
|
1083
|
+
→ User confirms: Create branch + commit per phase
|
|
1084
|
+
→ Branch created ✅
|
|
1085
|
+
5. Phase 3: Implementation (Phase-by-phase mode)
|
|
1086
|
+
→ Phase 1: Data Layer (10 tasks)
|
|
1087
|
+
→ Pre-commit validation ✅
|
|
1088
|
+
→ Commit: feat(entities): add authentication entities
|
|
1089
|
+
→ Phase 2: Business Logic (15 tasks)
|
|
1090
|
+
→ Pre-commit validation ✅
|
|
1091
|
+
→ Commit: feat(services): implement auth services
|
|
1092
|
+
→ ... (continue for remaining phases)
|
|
1093
|
+
6. Phase 4: Security Check + Archive
|
|
1094
|
+
→ Update documentation
|
|
1095
|
+
→ Final commit: docs(api): update auth documentation
|
|
1096
|
+
→ Show PR command: gh pr create ...
|
|
1097
|
+
7. Done! 6 commits ready for PR ✅
|
|
1098
|
+
```
|
|
1099
|
+
|
|
1100
|
+
### Configuration (Optional)
|
|
1101
|
+
|
|
1102
|
+
**File:** `.ai-flow/core/config.json`
|
|
1103
|
+
|
|
1104
|
+
```json
|
|
1105
|
+
{
|
|
1106
|
+
"git": {
|
|
1107
|
+
"enabled": true,
|
|
1108
|
+
"autoCommit": "phase", // "phase" | "end" | "off"
|
|
1109
|
+
"autoCreateBranch": true,
|
|
1110
|
+
"branchPrefix": "feature", // "feature" | "feat" | "work"
|
|
1111
|
+
"commitFormat": "conventional", // always conventional
|
|
1112
|
+
"pushAfterCommit": false, // always false
|
|
1113
|
+
"prSuggestion": true
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
```
|
|
1117
|
+
|
|
1118
|
+
### Messages Style
|
|
1119
|
+
|
|
1120
|
+
**Non-intrusive, informative, brief:**
|
|
1121
|
+
|
|
1122
|
+
✅ **Good:**
|
|
1123
|
+
|
|
1124
|
+
```
|
|
1125
|
+
✅ Committed: abc123de
|
|
1126
|
+
feat(entities): add notification entities
|
|
1127
|
+
```
|
|
1128
|
+
|
|
1129
|
+
❌ **Bad:**
|
|
1130
|
+
|
|
1131
|
+
```
|
|
1132
|
+
🎉🎉🎉 COMMIT SUCCESSFUL! 🎉🎉🎉
|
|
1133
|
+
SHA: abc123def456789abcdef123456789abcdef1234
|
|
1134
|
+
Author: John Doe <john@example.com>
|
|
1135
|
+
Date: Wed Dec 4 15:30:00 2025 -0500
|
|
1136
|
+
Files changed: 5 insertions(+), 2 deletions(-)
|
|
1137
|
+
Would you like to push to remote? (Y/n)
|
|
1138
|
+
Configure CI/CD pipeline? (Y/n)
|
|
1139
|
+
Set up code review? (Y/n)
|
|
1140
|
+
...
|
|
1141
|
+
```
|
|
1142
|
+
|
|
1143
|
+
### Disabling Git Integration
|
|
1144
|
+
|
|
1145
|
+
**To work without Git:**
|
|
1146
|
+
|
|
1147
|
+
1. **During Phase 0.5:** Select option D (Skip Git integration)
|
|
1148
|
+
2. **In config:** Set `"enabled": false`
|
|
1149
|
+
3. **No Git repo:** Automatically disabled
|
|
1150
|
+
|
|
1151
|
+
**Git integration will never block your workflow.**
|
|
1152
|
+
|
|
1153
|
+
---
|
|
1154
|
+
|
|
1155
|
+
## Important Rules
|
|
1156
|
+
|
|
1157
|
+
### 1. Project Context
|
|
1158
|
+
|
|
1159
|
+
**Before starting ANY work:**
|
|
1160
|
+
|
|
1161
|
+
- Read `AGENT.md` for project guidelines
|
|
1162
|
+
- Read `ai-instructions.md` for tech stack and conventions
|
|
1163
|
+
- Scan existing code to understand patterns
|
|
1164
|
+
- Follow project's existing code style
|
|
1165
|
+
|
|
1166
|
+
### 2. Continuous Validation
|
|
1167
|
+
|
|
1168
|
+
- Each task must validate before moving to next
|
|
1169
|
+
- Tests must pass before marking task complete
|
|
1170
|
+
- Spec requirements must be 100% fulfilled
|
|
1171
|
+
- No placeholders - only working code
|
|
1172
|
+
- Update status.json after each task/phase completion
|
|
1173
|
+
- In phase-by-phase mode, validate entire phase before pausing
|
|
1174
|
+
|
|
1175
|
+
### 3. Automatic Documentation
|
|
1176
|
+
|
|
1177
|
+
- Update all affected docs when archiving
|
|
1178
|
+
- Maintain consistency with existing documentation
|
|
1179
|
+
- Use same format as existing docs
|
|
1180
|
+
- Include examples in API documentation
|
|
1181
|
+
|
|
1182
|
+
### 4. Quality Standards
|
|
1183
|
+
|
|
1184
|
+
- Write tests for all new functionality
|
|
1185
|
+
- Follow SOLID principles
|
|
1186
|
+
- Handle errors appropriately
|
|
1187
|
+
- Add input validation
|
|
1188
|
+
- Consider security implications
|
|
1189
|
+
|
|
1190
|
+
---
|
|
1191
|
+
|
|
1192
|
+
## Example Outputs
|
|
1193
|
+
|
|
1194
|
+
### Example 1: SIMPLE Feature (Auto Mode)
|
|
1195
|
+
|
|
1196
|
+
```
|
|
1197
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1198
|
+
✅ Feature Complete!
|
|
1199
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1200
|
+
|
|
1201
|
+
Complexity: SIMPLE
|
|
1202
|
+
Mode: Auto
|
|
1203
|
+
Duration: 18 minutes
|
|
1204
|
+
|
|
1205
|
+
Summary:
|
|
1206
|
+
- 8 tasks completed
|
|
1207
|
+
- 3 files modified
|
|
1208
|
+
- 5 tests passed (100% coverage)
|
|
1209
|
+
- Documentation updated
|
|
1210
|
+
|
|
1211
|
+
✏️ Files modified:
|
|
1212
|
+
- src/entities/User.entity.ts
|
|
1213
|
+
- src/controllers/UserController.ts
|
|
1214
|
+
- tests/user.test.ts
|
|
1215
|
+
|
|
1216
|
+
📚 Documentation updated:
|
|
1217
|
+
- docs/data-model.md (added email field)
|
|
1218
|
+
|
|
1219
|
+
📦 Work archived: .ai-flow/archive/2025-01/feature-user-email/
|
|
1220
|
+
|
|
1221
|
+
Next steps:
|
|
1222
|
+
1. Run tests: npm test
|
|
1223
|
+
2. Test endpoint manually
|
|
1224
|
+
```
|
|
1225
|
+
|
|
1226
|
+
### Example 2: COMPLEX Feature (Phase-by-phase Mode)
|
|
1227
|
+
|
|
1228
|
+
```
|
|
1229
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1230
|
+
✅ Feature Complete!
|
|
1231
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1232
|
+
|
|
1233
|
+
Complexity: COMPLEX
|
|
1234
|
+
Mode: Phase-by-phase
|
|
1235
|
+
Duration: 2h 15min (across 5 phases)
|
|
1236
|
+
|
|
1237
|
+
Summary:
|
|
1238
|
+
- 52 tasks completed across 5 phases
|
|
1239
|
+
- 15 files created
|
|
1240
|
+
- 4 files modified
|
|
1241
|
+
- 48 tests passed (98% coverage)
|
|
1242
|
+
- Documentation updated
|
|
1243
|
+
|
|
1244
|
+
📁 Files created (by phase):
|
|
1245
|
+
PHASE 1 - Data Layer:
|
|
1246
|
+
- src/entities/User.entity.ts
|
|
1247
|
+
- src/entities/Session.entity.ts
|
|
1248
|
+
- src/entities/RefreshToken.entity.ts
|
|
1249
|
+
- src/repositories/UserRepository.ts
|
|
1250
|
+
- src/migrations/001_create_auth_tables.ts
|
|
1251
|
+
|
|
1252
|
+
PHASE 2 - Business Logic:
|
|
1253
|
+
- src/services/AuthService.ts
|
|
1254
|
+
- src/services/TokenService.ts
|
|
1255
|
+
- src/services/EmailService.ts
|
|
1256
|
+
|
|
1257
|
+
PHASE 3 - API Layer:
|
|
1258
|
+
- src/controllers/AuthController.ts
|
|
1259
|
+
- src/middleware/auth.middleware.ts
|
|
1260
|
+
- src/validators/auth.validators.ts
|
|
1261
|
+
|
|
1262
|
+
PHASE 4 - Integration:
|
|
1263
|
+
- src/routes/auth.routes.ts
|
|
1264
|
+
|
|
1265
|
+
PHASE 5 - Testing:
|
|
1266
|
+
- tests/unit/AuthService.test.ts
|
|
1267
|
+
- tests/integration/auth.api.test.ts
|
|
1268
|
+
|
|
1269
|
+
✏️ Files modified:
|
|
1270
|
+
- src/app.ts (registered routes)
|
|
1271
|
+
- src/routes/index.ts
|
|
1272
|
+
- package.json (added dependencies)
|
|
1273
|
+
- .env.example (added JWT variables)
|
|
1274
|
+
|
|
1275
|
+
📚 Documentation updated:
|
|
1276
|
+
- docs/api.md (added 5 auth endpoints)
|
|
1277
|
+
- docs/data-model.md (added 3 auth entities)
|
|
1278
|
+
- specs/security.md (added JWT auth flow)
|
|
1279
|
+
|
|
1280
|
+
📦 Work archived: .ai-flow/archive/2025-01/feature-user-auth/
|
|
1281
|
+
|
|
1282
|
+
Next steps:
|
|
1283
|
+
1. Run tests: npm test
|
|
1284
|
+
2. Configure JWT secrets in .env
|
|
1285
|
+
3. Start server: npm run dev
|
|
1286
|
+
4. Test auth flow manually
|
|
1287
|
+
```
|
|
1288
|
+
|
|
1289
|
+
---
|
|
1290
|
+
|
|
1291
|
+
## Mode-Specific Behaviors
|
|
1292
|
+
|
|
1293
|
+
### `/feature new` - New Functionality
|
|
1294
|
+
|
|
1295
|
+
- Start from scratch
|
|
1296
|
+
- Create all files needed
|
|
1297
|
+
- Generate comprehensive tests
|
|
1298
|
+
- Full documentation
|
|
1299
|
+
|
|
1300
|
+
### `/feature change` - Modify Existing
|
|
1301
|
+
|
|
1302
|
+
- Identify affected files first
|
|
1303
|
+
- Show delta of changes (ADDED/MODIFIED/REMOVED)
|
|
1304
|
+
- Update existing tests
|
|
1305
|
+
- Update documentation sections
|
|
1306
|
+
|
|
1307
|
+
### `/feature refactor` - Refactor Code
|
|
1308
|
+
|
|
1309
|
+
- Analyze code to refactor
|
|
1310
|
+
- Create refactoring plan
|
|
1311
|
+
- Execute incrementally
|
|
1312
|
+
- Ensure tests still pass
|
|
1313
|
+
- Update documentation only if architecture changes
|
|
1314
|
+
|
|
1315
|
+
---
|
|
1316
|
+
|
|
1317
|
+
**BEGIN EXECUTION when user runs `/feature`, `/feature new`, `/feature change`, or `/feature refactor`**
|
|
1318
|
+
|