devflow-prompts 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,914 @@
1
+ # DevFlow Prompts - Development Workflow System
2
+
3
+ DevFlow (Development Flow) is a comprehensive prompt system that automates the software development process from raw customer request → production-ready code + tests.
4
+
5
+ ## 📦 Installation
6
+
7
+ To install DevFlow Prompts in your project:
8
+
9
+ ```bash
10
+ # Initialize in your project root
11
+ npm install devflow-prompts
12
+ npx devflow-prompts init
13
+ ```
14
+
15
+ This will create a `devflow-prompts/` directory in your project with all necessary prompts, scripts, and rules.
16
+
17
+ Once installed, run the setup script to configure your IDE:
18
+
19
+ ```bash
20
+ ./devflow-prompts/gen-chat.sh
21
+ ```
22
+
23
+ ---
24
+
25
+ ## 🔄 Updating / Upgrading
26
+
27
+ When you upgrade `devflow-prompts` to a newer version and run `npx devflow-prompts init`, the script will handle your existing files intelligently:
28
+
29
+ 1. **Safe Mode (Default)**:
30
+ It will **skip** any files that you have modified, ensuring your customizations are preserved.
31
+
32
+ ```bash
33
+ npx devflow-prompts init
34
+ ```
35
+
36
+ 2. **Force Overwrite**:
37
+ Use `--force` if you want to **reset** everything to the latest defaults (warning: this will overwrite your changes).
38
+
39
+ ```bash
40
+ npx devflow-prompts init --force
41
+ ```
42
+
43
+ 3. **Conflict Resolution**:
44
+ If a file exists but is different from the new version, the script will create a `.new` file (e.g., `README.md.new`) instead of overwriting. You can then compare and merge the changes manually.
45
+
46
+ ---
47
+
48
+ ## 📋 Overview
49
+
50
+ **Prefix**: `/devflow.` - Distinguishes from other workflow systems
51
+
52
+ ## 🎯 Complete Workflow (Step 0-6)
53
+
54
+ ```
55
+ [Step 0] Generate Coding Rules (One-time setup)
56
+
57
+ [Step 1] Requirement Document
58
+
59
+ [Step 2] Technical Design
60
+
61
+ [Step 3] Feature Code
62
+
63
+ [Step 4] Test Plan
64
+
65
+ [Step 5] Test Code
66
+
67
+ [Step 6] Validate & Analyze
68
+ ```
69
+
70
+ ## 🚀 Quick Start Guide
71
+
72
+ ### Prerequisites
73
+
74
+ Run the setup script for your IDE:
75
+
76
+ ```bash
77
+ # For Antigravity
78
+ ./devflow-prompts/gen-chat.sh antigravity
79
+
80
+ # For VSCode
81
+ ./devflow-prompts/gen-chat.sh vscode
82
+
83
+ # For Cursor
84
+ ./devflow-prompts/gen-chat.sh cursor
85
+
86
+ # Auto-detect IDE (if supported)
87
+ ./devflow-prompts/gen-chat.sh
88
+ ```
89
+
90
+ This will install all DevFlow prompts and enable autocomplete for `/devflow.*` commands.
91
+
92
+ ---
93
+
94
+ ## 📦 Output Summary - What Each Step Produces
95
+
96
+ ### Step 0: Generate Rules (One-time)
97
+
98
+ **Output:** 10 markdown files
99
+ **Location:** `/devflow-prompts/rules/`
100
+ **Action:** ✅ AI auto-creates files
101
+ **Manual step:** ❌ None
102
+
103
+ ---
104
+
105
+ ### Step 1: Requirement
106
+
107
+ **Output:** 1 markdown file (`{task-id}-requirement.md`)
108
+ **Location:** `/devflow-prompts/specs/{task-id}/`
109
+ **Action:** ✅ AI auto-creates file
110
+ **Manual step:** ❌ None
111
+
112
+ ---
113
+
114
+ ### Step 2: Design
115
+
116
+ **Output:** 1 markdown file (`{task-id}-design.md`)
117
+ **Location:** `/devflow-prompts/specs/{task-id}/`
118
+ **Action:** ✅ AI auto-creates file
119
+ **Manual step:** ❌ None
120
+
121
+ ---
122
+
123
+ ### Step 3: Code ⚠️ (Manual Action Required)
124
+
125
+ **Output:** 1 git patch file (`{task-id}-feature.patch`)
126
+ **Location:** `/devflow-prompts/specs/{task-id}/`
127
+ **Action:** ⚠️ AI generates patch
128
+ **Manual step:** ✅ **YOU must apply patch**
129
+
130
+ **⚠️ Warning:** AI only creates the patch file. You must manually run `git apply` to create the actual source code files in your project.
131
+
132
+ ```bash
133
+ cd /path/to/your/project
134
+ git apply --check devflow-prompts/specs/FEAT-001/FEAT-001-feature.patch
135
+ git apply devflow-prompts/specs/FEAT-001/FEAT-001-feature.patch
136
+ git status
137
+ ```
138
+
139
+ ---
140
+
141
+ ### Step 4: Test Plan
142
+
143
+ **Output:** 1 markdown file (`{task-id}-test.md`)
144
+ **Location:** `/devflow-prompts/specs/{task-id}/`
145
+ **Action:** ✅ AI auto-creates file
146
+ **Manual step:** ❌ None
147
+
148
+ ---
149
+
150
+ ### Step 5: Test Code ⚠️ (Manual Action Required)
151
+
152
+ **Output:** 1 git patch file (`{task-id}-test.patch`)
153
+ **Location:** `/devflow-prompts/specs/{task-id}/`
154
+ **Action:** ⚠️ AI generates patch
155
+ **Manual step:** ✅ **YOU must apply patch**
156
+
157
+ **⚠️ Warning:** AI only creates the patch file. You must manually run `git apply` to create the actual test files in your project.
158
+
159
+ ```bash
160
+ cd /path/to/your/project
161
+ git apply --check devflow-prompts/specs/FEAT-001/FEAT-001-test.patch
162
+ git apply devflow-prompts/specs/FEAT-001/FEAT-001-test.patch
163
+ ./vendor/bin/phpunit # Run tests
164
+ ```
165
+
166
+ ---
167
+
168
+ ### Step 6: Analyze
169
+
170
+ **Output:** Analysis report (inline text)
171
+ **Location:** Inline in AI response
172
+ **Action:** ℹ️ AI displays report
173
+ **Manual step:** ❌ None (read only)
174
+
175
+ ---
176
+
177
+ ## 📚 Step-by-Step Guide
178
+
179
+ ### Step 0: Generate Coding Rules (One-time Setup)
180
+
181
+ **Purpose**: Create project-specific coding standards and quality checklists.
182
+
183
+ #### Commands:
184
+
185
+ | Command | Purpose |
186
+ | ---------------------- | ---------------------------------------- |
187
+ | `/devflow.0-gen-rules` | Generate coding rules for specific steps |
188
+ | `/devflow.0-rev-rules` | Review and improve generated rules |
189
+
190
+ #### Usage Example:
191
+
192
+ **Input Type: File Path (Required)**
193
+
194
+ 1. Copy template file:
195
+
196
+ ```bash
197
+ cp devflow-prompts/templates/gen-rule-template.txt my-rules-input.txt
198
+ ```
199
+
200
+ 2. Edit `my-rules-input.txt`:
201
+
202
+ ```text
203
+ Step: all
204
+ Stack: Laravel (Backend) + Vue.js (Frontend)
205
+ Architecture: Clean Architecture
206
+ Team: 5 developers, mid-level experience
207
+ Constraints: Must support 10k concurrent users, PCI-DSS compliance required
208
+ Language: en
209
+ ```
210
+
211
+ 3. Run command:
212
+
213
+ ```bash
214
+ /devflow.0-gen-rules my-rules-input.txt
215
+ ```
216
+
217
+ **Output**: 10 rule files in `/devflow-prompts/rules/`:
218
+
219
+ **Output**: 10 rule files in `/devflow-prompts/rules/`:
220
+
221
+ ```
222
+ /devflow-prompts/rules/
223
+ ├── devflow.1-gen-requirement.rule.md
224
+ ├── devflow.1-rev-requirement.rule.md
225
+ ├── devflow.2-gen-design.rule.md
226
+ ├── devflow.2-rev-design.rule.md
227
+ ├── devflow.3-gen-code.rule.md
228
+ ├── devflow.3-rev-code.rule.md
229
+ ├── devflow.4-gen-test-plan.rule.md
230
+ ├── devflow.4-rev-test-plan.rule.md
231
+ ├── devflow.5-gen-test-code.rule.md
232
+ └── devflow.5-rev-test-code.rule.md
233
+ ```
234
+
235
+ #### Generate Rules for Specific Step:
236
+
237
+ ```bash
238
+ # Generate both gen + rev rules for Step 1 (Requirement)
239
+ /devflow.0-gen-rules
240
+
241
+ Step: 1
242
+ Stack: Laravel + Vue.js
243
+ Architecture: Clean Architecture
244
+
245
+ # → Generates: devflow.1-gen-requirement.rule.md, devflow.1-rev-requirement.rule.md
246
+ ```
247
+
248
+ #### Generate Individual Rule File (Granular):
249
+
250
+ **Use cases:**
251
+
252
+ - Fix/iterate on a specific rule file
253
+ - Regenerate only gen-rule or rev-rule
254
+
255
+ ```bash
256
+ # Generate ONLY gen-rule for Step 3 (Code)
257
+ /devflow.0-gen-rules
258
+
259
+ Step: 3-gen
260
+ Stack: Laravel + Vue.js
261
+ Architecture: Clean Architecture
262
+
263
+ # → Generates: devflow.3-gen-code.rule.md (only)
264
+
265
+ # Generate ONLY rev-rule for Step 2 (Design)
266
+ /devflow.0-gen-rules
267
+
268
+ Step: 2-rev
269
+ Stack: Laravel + Vue.js
270
+ Architecture: Clean Architecture
271
+
272
+ # → Generates: devflow.2-rev-design.rule.md (only)
273
+ ```
274
+
275
+ **Available options:**
276
+
277
+ - `1`, `2`, `3`, `4`, `5` - Generate both gen + rev for that step
278
+ - `1-gen`, `2-gen`, etc. - Generate only gen-rule
279
+ - `1-rev`, `2-rev`, etc. - Generate only rev-rule
280
+ - `all` - Generate all 10 files
281
+
282
+ #### Review Generated Rules:
283
+
284
+ ```bash
285
+ # Option 1: Review all rules in directory (Recommended)
286
+ /devflow.0-rev-rules /devflow-prompts/rules/
287
+
288
+ # Option 2: Review specific file
289
+ /devflow.0-rev-rules /devflow-prompts/rules/devflow.1-gen-requirement.rule.md
290
+ ```
291
+
292
+ **Review specific step or individual file:**
293
+
294
+ ```bash
295
+ # Review both gen + rev for Step 3 (Code)
296
+ /devflow.0-rev-rules /devflow-prompts/rules/devflow.3-gen-code.rule.md /devflow-prompts/rules/devflow.3-rev-code.rule.md
297
+
298
+ # Review ONLY gen-rule for Step 2 (Design)
299
+ /devflow.0-rev-rules /devflow-prompts/rules/devflow.2-gen-design.rule.md
300
+ ```
301
+
302
+ **Available options:**
303
+
304
+ - `1`, `2`, `3`, `4`, `5` - Review both gen + rev for that step
305
+ - `1-gen`, `2-gen`, etc. - Review only gen-rule
306
+ - `1-rev`, `2-rev`, etc. - Review only rev-rule
307
+ - `all` - Review all 10 files
308
+
309
+ ---
310
+
311
+ ### Step 1: Requirement Document
312
+
313
+ **Purpose**: Convert raw customer request into structured, testable requirement document.
314
+
315
+ #### Commands:
316
+
317
+ | Command | Purpose |
318
+ | ---------------------------- | ------------------------------------- |
319
+ | `/devflow.1-gen-requirement` | Convert raw request → requirement doc |
320
+ | `/devflow.1-rev-requirement` | Review requirement for completeness |
321
+
322
+ #### Usage Example:
323
+
324
+ **Input Type: File Path (Required)**
325
+
326
+ 1. Copy template:
327
+
328
+ ```bash
329
+ cp devflow-prompts/templates/gen-requirement-template.txt FEAT-001-request.txt
330
+ ```
331
+
332
+ 2. Edit `FEAT-001-request.txt`:
333
+
334
+ ```text
335
+ Task ID: FEAT-001
336
+ Language: en
337
+ Raw Request: I want users to login with email/password. If they enter wrong password too many times, lock the account temporarily for 15 minutes.
338
+ ```
339
+
340
+ 3. Run command:
341
+
342
+ ```bash
343
+ /devflow.1-gen-requirement FEAT-001-request.txt
344
+ ```
345
+
346
+ **Output**: `/devflow-prompts/specs/FEAT-001/FEAT-001-requirement.md`
347
+
348
+ #### Review Requirement:
349
+
350
+ ```bash
351
+ /devflow.1-rev-requirement /devflow-prompts/specs/FEAT-001/FEAT-001-requirement.md
352
+ ```
353
+
354
+ ---
355
+
356
+ ### Step 2: Technical Design
357
+
358
+ **Purpose**: Create implementable technical design from requirement.
359
+
360
+ #### Commands:
361
+
362
+ | Command | Purpose |
363
+ | ----------------------- | ----------------------------------- |
364
+ | `/devflow.2-gen-design` | Create tech design from requirement |
365
+ | `/devflow.2-rev-design` | Review design for implementability |
366
+
367
+ #### Usage Example:
368
+
369
+ ```bash
370
+ /devflow.2-gen-design /devflow-prompts/specs/FEAT-001/FEAT-001-requirement.md
371
+ ```
372
+
373
+ **Note**: AI will auto-detect `Task Mode` (New/Update) from the requirement file.
374
+
375
+ - If `UPDATE` mode: AI inspects existing code via **Coding Rules**, enforcing strict **Impact Analysis** and **Backward Compatibility**.
376
+
377
+ ````
378
+
379
+ **Output**: `/devflow-prompts/specs/FEAT-001/FEAT-001-design.md` containing:
380
+ - Architecture approach
381
+ - API endpoints (request/response/errors)
382
+ - Data model with migrations
383
+ - Business logic step-by-step
384
+ - Security measures
385
+ - Observability (logs, metrics)
386
+ - Rollout plan
387
+
388
+ #### Review Design:
389
+
390
+ ```bash
391
+ /devflow.2-rev-design /devflow-prompts/specs/FEAT-001/FEAT-001-design.md
392
+ ````
393
+
394
+ ---
395
+
396
+ ### Step 3: Feature Code
397
+
398
+ **Purpose**: Generate production-ready code from technical design.
399
+
400
+ #### Commands:
401
+
402
+ | Command | Purpose |
403
+ | --------------------- | --------------------------------- |
404
+ | `/devflow.3-gen-code` | Generate code from tech design |
405
+ | `/devflow.3-rev-code` | Review code quality & correctness |
406
+
407
+ #### Usage Example:
408
+
409
+ ```bash
410
+ /devflow.3-gen-code /devflow-prompts/specs/FEAT-001/FEAT-001-design.md
411
+ ```
412
+
413
+ **Note**: In `UPDATE` mode, AI will:
414
+
415
+ - Read existing files to match style.
416
+ - Only generate minimal diffs to implementing the change.
417
+ - Protect legacy behavior.
418
+
419
+ ````
420
+
421
+ **Output**: Git unified diff (patch) - `/devflow-prompts/specs/FEAT-001/FEAT-001-feature.patch`
422
+
423
+ #### ⚠️ Apply Patch (Manual Step Required):
424
+
425
+ **AI generates the patch, but YOU must manually apply it:**
426
+
427
+ ```bash
428
+ # Step 1: Navigate to project root
429
+ cd /path/to/your/project
430
+
431
+ # Step 2: Check if patch can be applied (dry run - no changes made)
432
+ git apply --check devflow-prompts/specs/FEAT-001/FEAT-001-feature.patch
433
+
434
+ # Step 3: If no errors, apply the patch
435
+ git apply devflow-prompts/specs/FEAT-001/FEAT-001-feature.patch
436
+
437
+ # Step 4: Verify what files were created/modified
438
+ git status
439
+ git diff
440
+
441
+ # Step 5: Review changes and commit
442
+ git add .
443
+ git commit -m "feat: implement user login with rate limiting (FEAT-001)"
444
+ ````
445
+
446
+ **Troubleshooting:**
447
+
448
+ - If `git apply --check` fails → patch conflicts with existing code
449
+ - Solution: Manually review patch file and apply changes
450
+ - Or: Run `/devflow.3-rev-code` to get corrected patch
451
+
452
+ ---
453
+
454
+ ### Step 4: Test Plan
455
+
456
+ **Purpose**: Create comprehensive test plan covering unit/integration/E2E tests.
457
+
458
+ #### Commands:
459
+
460
+ | Command | Purpose |
461
+ | -------------------------- | ----------------------------------- |
462
+ | `/devflow.4-gen-test-plan` | Create test plan from tech design |
463
+ | `/devflow.4-rev-test-plan` | Review test coverage & traceability |
464
+
465
+ #### Usage Example:
466
+
467
+ ```bash
468
+ /devflow.4-gen-test-plan /devflow-prompts/specs/FEAT-001/FEAT-001-design.md
469
+ ```
470
+
471
+ **Output**: `/devflow-prompts/specs/FEAT-001/FEAT-001-test.md` containing:
472
+
473
+ - Test level strategy (unit/integration/E2E)
474
+ - Detailed test cases
475
+ - Negative & edge cases
476
+ - Mock/stub strategy
477
+ - Test data requirements
478
+
479
+ #### Review Test Plan:
480
+
481
+ ```bash
482
+ /devflow.4-rev-test-plan /devflow-prompts/specs/FEAT-001/FEAT-001-design.md /devflow-prompts/specs/FEAT-001/FEAT-001-test.md
483
+ ```
484
+
485
+ ---
486
+
487
+ ### Step 5: Test Code
488
+
489
+ **Purpose**: Generate test code from test plan.
490
+
491
+ #### Commands:
492
+
493
+ | Command | Purpose |
494
+ | -------------------------- | --------------------------------- |
495
+ | `/devflow.5-gen-test-code` | Generate test code from test plan |
496
+ | `/devflow.5-rev-test-code` | Review test quality & reliability |
497
+
498
+ #### Usage Example:
499
+
500
+ ```bash
501
+ /devflow.5-gen-test-code /devflow-prompts/specs/FEAT-001/FEAT-001-test.md
502
+ ```
503
+
504
+ **Output**: Git unified diff (patch) - `/devflow-prompts/specs/FEAT-001/FEAT-001-test.patch`
505
+
506
+ #### ⚠️ Apply Test Patch (Manual Step Required):
507
+
508
+ **AI generates the patch, but YOU must manually apply it:**
509
+
510
+ ```bash
511
+ # Step 1: Navigate to project root
512
+ cd /path/to/your/project
513
+
514
+ # Step 2: Check if patch can be applied (dry run - no changes made)
515
+ git apply --check devflow-prompts/specs/FEAT-001/FEAT-001-test.patch
516
+
517
+ # Step 3: If no errors, apply the patch
518
+ git apply devflow-prompts/specs/FEAT-001/FEAT-001-test.patch
519
+
520
+ # Step 4: Verify test files were created
521
+ git status
522
+
523
+ # Step 5: Run tests to verify they work
524
+ ./vendor/bin/phpunit tests/Feature/UserLoginTest.php
525
+ # Or run all tests:
526
+ ./vendor/bin/phpunit
527
+
528
+ # Step 6: If all tests pass, commit
529
+ git add .
530
+ git commit -m "test: add tests for user login with rate limiting (FEAT-001)"
531
+ ```
532
+
533
+ **Troubleshooting:**
534
+
535
+ - If `git apply --check` fails → patch conflicts with existing test files
536
+ - If tests fail → Review test code or run `/devflow.5-rev-test-code`
537
+ - Solution: Manually review patch file and apply changes
538
+
539
+ ---
540
+
541
+ ### Step 6: Validate & Analyze
542
+
543
+ **Purpose**: Validate entire flow from requirement → design → code → test, find inconsistencies.
544
+
545
+ #### Command:
546
+
547
+ | Command | Purpose |
548
+ | -------------------- | ------------------------------- |
549
+ | `/devflow.6-analyze` | Validate entire flow, find gaps |
550
+
551
+ #### Usage Example:
552
+
553
+ ```bash
554
+ /devflow.6-analyze \
555
+ /devflow-prompts/specs/FEAT-001/FEAT-001-requirement.md \
556
+ /devflow-prompts/specs/FEAT-001/FEAT-001-design.md \
557
+ /devflow-prompts/specs/FEAT-001/FEAT-001-test.md
558
+ ```
559
+
560
+ **Output**: Analysis report with:
561
+
562
+ - Alignment check (Requirement ↔ Design ↔ Code ↔ Test)
563
+ - Inconsistencies found (P0/P1/P2)
564
+ - Coverage gaps
565
+ - Recommendations (prioritized)
566
+
567
+ ---
568
+
569
+ ## 📁 File Structure
570
+
571
+ ```
572
+ project/
573
+ ├── devflow-prompts/
574
+ │ ├── README.md # This file
575
+ │ ├── gen-chat.sh # Main setup script
576
+ │ │
577
+ │ ├── scripts/ # IDE-specific setup scripts
578
+ │ │ ├── setup-devflow-chat-antigravity.sh
579
+ │ │ ├── setup-devflow-chat-cursor.sh
580
+ │ │ └── setup-devflow-chat-vscode.sh
581
+ │ │
582
+ │ ├── flows/ # Prompt definitions
583
+ │ │ ├── devflow.0-gen-rules.prompt.md
584
+ │ │ ├── devflow.1-gen-requirement.prompt.md
585
+ │ │ └── ...
586
+ │ │
587
+ │ ├── templates/ # Template files for input
588
+ │ │ ├── gen-rule-template.txt # Template for /devflow.0-gen-rules
589
+ │ │ └── gen-requirement-template.txt # Template for /devflow.1-gen-requirement
590
+ │ │
591
+ │ ├── rules/ # Coding rules (generated by Step 0)
592
+ │ │ ├── devflow.1-gen-requirement.rule.md
593
+ │ │ ├── devflow.1-rev-requirement.rule.md
594
+ │ │ ├── devflow.2-gen-design.rule.md
595
+ │ │ └── ...
596
+ │ │
597
+ │ └── specs/ # Feature specifications
598
+ │ └── FEAT-001/
599
+ │ ├── FEAT-001-requirement.md
600
+ │ ├── FEAT-001-design.md
601
+ │ ├── FEAT-001-test.md
602
+ │ ├── FEAT-001-feature.patch
603
+ │ └── FEAT-001-test.patch
604
+
605
+ ├── .agent/
606
+ │ └── workflows/ # Installed prompts (after setup)
607
+ │ ├── devflow.0-gen-rules.prompt.md
608
+ │ ├── devflow.1-gen-requirement.prompt.md
609
+ │ └── ...
610
+
611
+ └── src/ # Source code (after applying patches)
612
+ ```
613
+
614
+ ---
615
+
616
+ ## 🌍 Multi-Language Support
617
+
618
+ DevFlow supports multiple languages. Technical terms (API, HTTP, JWT, etc.) always stay in English.
619
+
620
+ ### Supported Languages:
621
+
622
+ - `en` - English (default)
623
+ - `vi` - Vietnamese
624
+ - `ja` - Japanese
625
+ - `ko` - Korean
626
+
627
+ ### Usage:
628
+
629
+ **For Rules:**
630
+
631
+ ```text
632
+ Step: all
633
+ Stack: Laravel + Vue.js
634
+ Architecture: Clean Architecture
635
+ Language: vi
636
+ ```
637
+
638
+ **For Requirements:**
639
+
640
+ ```text
641
+ Task ID: FEAT-001
642
+ Language: vi
643
+ Raw Request: Tôi muốn user đăng nhập bằng email/password...
644
+ ```
645
+
646
+ ---
647
+
648
+ ## 💡 Tips & Best Practices
649
+
650
+ ### When to Use Which Command?
651
+
652
+ | Situation | Command |
653
+ | --------------------------- | ---------------------------- |
654
+ | Starting new project | `/devflow.0-gen-rules` |
655
+ | Have raw customer request | `/devflow.1-gen-requirement` |
656
+ | Requirement unclear | `/devflow.1-rev-requirement` |
657
+ | Need technical design | `/devflow.2-gen-design` |
658
+ | Design has issues | `/devflow.2-rev-design` |
659
+ | Need to generate code | `/devflow.3-gen-code` |
660
+ | Code has bugs | `/devflow.3-rev-code` |
661
+ | Need test plan | `/devflow.4-gen-test-plan` |
662
+ | Test coverage insufficient | `/devflow.4-rev-test-plan` |
663
+ | Need to generate tests | `/devflow.5-gen-test-code` |
664
+ | Tests have issues | `/devflow.5-rev-test-code` |
665
+ | Need to validate everything | `/devflow.6-analyze` |
666
+
667
+ ### Flexible Workflow
668
+
669
+ Not required to run all commands. Adapt based on task complexity:
670
+
671
+ **Small task (bug fix)**:
672
+
673
+ ```
674
+ /devflow.1-gen-requirement → /devflow.2-gen-design → /devflow.3-gen-code
675
+ ```
676
+
677
+ **Medium task (new feature)**:
678
+
679
+ ```
680
+ /devflow.1-gen-requirement → /devflow.1-rev-requirement
681
+ → /devflow.2-gen-design → /devflow.2-rev-design
682
+ → /devflow.3-gen-code → /devflow.5-gen-test-code
683
+ ```
684
+
685
+ **Large task (critical feature)**:
686
+
687
+ ```
688
+ Full workflow (Step 0-6)
689
+ ```
690
+
691
+ ### Using Template Files
692
+
693
+ **Benefits of using template files:**
694
+
695
+ - ✅ Reusable for similar tasks
696
+ - ✅ Version control friendly
697
+ - ✅ Easy to share with team
698
+ - ✅ Consistent format
699
+
700
+ **Workflow:**
701
+
702
+ 1. Copy template from `/devflow-prompts/templates/gen-`
703
+ 2. Fill in your information
704
+ 3. Save with descriptive name
705
+ 4. Pass to command: `/devflow.X-xxx path/to/file.txt`
706
+
707
+ ### Strict File Path Input
708
+
709
+ **All DevFlow prompts strictly require File Path Input.** "Direct Input" (analyzing pasted text) is NOT supported.
710
+
711
+ **Requirements:**
712
+
713
+ 1. **Provide the Input Path** (File or Directory) to the command.
714
+ - **File Path**: Standard input for all commands.
715
+ - **Directory Path**: Supported by specific commands (e.g., `/devflow.0-rev-rules`) to mass-process files.
716
+ 2. **Filename MUST contain a Task ID** (e.g., `FEAT-001`, `TASK-123`).
717
+ - The AI uses this Task ID to correctly name output files.
718
+ - The Task ID can be anywhere in the filename.
719
+
720
+ **Benefits:**
721
+
722
+ - ✅ **Flexible location**: Files can be anywhere in filesystem (not limited to `/devflow-prompts`)
723
+ - ✅ **Flexible naming**: File names can be anything **as long as they contain the Task ID**
724
+ - ✅ **Faster**: No need to copy/paste content
725
+ - ✅ **Version control**: Keep files in git for tracking
726
+ - ✅ **Reusable**: Easy to iterate and rerun
727
+
728
+ **Examples:**
729
+
730
+ ```bash
731
+ # Single file input - filename MUST contain Task ID
732
+ /devflow.1-gen-requirement ~/Desktop/FEAT-001-request.txt
733
+ /devflow.2-gen-design /Users/phongle/Documents/FEAT-001-v2.md
734
+
735
+ # Multiple files input
736
+ /devflow.3-rev-code /path/to/FEAT-001-design.md /path/to/FEAT-001.patch
737
+ /devflow.4-rev-test-plan /path/to/FEAT-001-design.md /path/to/FEAT-001-test.md
738
+
739
+ # Directory input (e.g. for bulk rule review)
740
+ /devflow.0-rev-rules /devflow-prompts/rules/
741
+ ```
742
+
743
+ # Valid filenames (contain Task ID)
744
+
745
+ /devflow.1-gen-requirement /path/to/customer-request-FEAT-001.txt
746
+ /devflow.2-gen-design /path/to/FEAT-001-design-v2.md
747
+ /devflow.3-gen-code /path/to/TASK-123-spec.md
748
+
749
+ ````
750
+
751
+
752
+
753
+ ## Complete Example Walkthrough
754
+
755
+ ### Scenario: User Login with Rate Limiting
756
+
757
+ #### Step 0: Setup (One-time)
758
+
759
+ ```bash
760
+ # Copy template
761
+ cp devflow-prompts/templates/gen-rule-template.txt my-project-rules.txt
762
+
763
+ # Edit file
764
+ # Step: all
765
+ # Stack: Laravel (PHP 8.2) + Vue 3
766
+ # Architecture: Clean Architecture
767
+ # Team: 5 developers
768
+
769
+ # Generate rules
770
+ /devflow.0-gen-rules my-project-rules.txt
771
+ ````
772
+
773
+ #### Step 1: Generate Requirement
774
+
775
+ ```bash
776
+ # Copy template
777
+ cp devflow-prompts/templates/gen-requirement-template.txt FEAT-001-request.txt
778
+
779
+ # Edit file
780
+ # Task ID: FEAT-001
781
+ # Language: en
782
+ # Task Mode: NEW
783
+ # Raw Request: I want users to login with email/password. Lock account after 3 failed attempts for 15 minutes.
784
+
785
+
786
+ # Generate requirement
787
+ /devflow.1-gen-requirement FEAT-001-request.txt
788
+ ```
789
+
790
+ **Review**:
791
+
792
+ ```bash
793
+ /devflow.1-rev-requirement /devflow-prompts/specs/FEAT-001/FEAT-001-requirement.md
794
+ ```
795
+
796
+ #### Step 2: Generate Design
797
+
798
+ ```bash
799
+ /devflow.2-gen-design /devflow-prompts/specs/FEAT-001/FEAT-001-requirement.md
800
+ ```
801
+
802
+ **Review**:
803
+
804
+ ```bash
805
+ /devflow.2-rev-design /devflow-prompts/specs/FEAT-001/FEAT-001-design.md
806
+ ```
807
+
808
+ #### Step 3: Generate Code
809
+
810
+ ```bash
811
+ /devflow.3-gen-code /devflow-prompts/specs/FEAT-001/FEAT-001-design.md
812
+ # Apply patch: git apply devflow-prompts/specs/FEAT-001/FEAT-001-feature.patch
813
+ ```
814
+
815
+ #### Step 4: Generate Test Plan
816
+
817
+ ```bash
818
+ /devflow.4-gen-test-plan /devflow-prompts/specs/FEAT-001/FEAT-001-design.md
819
+ ```
820
+
821
+ #### Step 5: Generate Test Code
822
+
823
+ ```bash
824
+ /devflow.5-gen-test-code /devflow-prompts/specs/FEAT-001/FEAT-001-test.md
825
+ # Apply patch: git apply devflow-prompts/specs/FEAT-001/FEAT-001-test.patch
826
+ ```
827
+
828
+ #### Step 6: Validate
829
+
830
+ ```bash
831
+ /devflow.6-analyze \
832
+ /devflow-prompts/specs/FEAT-001/FEAT-001-requirement.md \
833
+ /devflow-prompts/specs/FEAT-001/FEAT-001-design.md \
834
+ /devflow-prompts/specs/FEAT-001/FEAT-001-test.md
835
+ ```
836
+
837
+ ---
838
+
839
+ ## 🎯 General Principles
840
+
841
+ ### ✅ DO
842
+
843
+ - Use template files for consistency
844
+ - Put unclear items in "Open Questions" (don't invent)
845
+ - Make output implementable and testable
846
+ - Follow coding rules
847
+ - Keep changes minimal and cohesive
848
+
849
+ ### ❌ DON'T
850
+
851
+ - Don't change requirements when doing design
852
+ - Don't redesign when implementing code
853
+ - Don't add features not in spec
854
+ - Don't guess missing information
855
+
856
+ ---
857
+
858
+ ## 🔧 Troubleshooting
859
+
860
+ ### Autocomplete not working?
861
+
862
+ 1. **Reload IDE**:
863
+ - Antigravity: Restart
864
+ - VSCode/Cursor: `Cmd+Shift+P` → "Developer: Reload Window"
865
+
866
+ 2. **Re-run setup**:
867
+
868
+ ```bash
869
+ ./devflow-prompts/gen-chat.sh antigravity
870
+ ```
871
+
872
+ 3. **Check files**:
873
+ ```bash
874
+ ls .agent/workflows/devflow.*.md
875
+ ```
876
+
877
+ ### Commands not appearing?
878
+
879
+ - Make sure you ran setup for correct IDE
880
+ - Check that files are in correct location
881
+ - Verify file format (must have `# /devflow.X-xxx` heading)
882
+
883
+ ---
884
+
885
+ ## 📞 Support
886
+
887
+ For issues or questions:
888
+
889
+ - Check rule files in `/devflow-prompts/rules/`
890
+ - Review prompt files in `/devflow-prompts/flows/`
891
+ - Use template files in `/devflow-prompts/templates/gen-`
892
+ - Run `/devflow.0-rev-rules` to improve rules
893
+
894
+ ---
895
+
896
+ **Version**: 4.0
897
+ **Last Updated**: 2026-01-17
898
+ **Status**: ✅ Production Ready
899
+
900
+ ### Changelog
901
+
902
+ #### v4.0 (2026-01-17)
903
+
904
+ - ✨ **NEW**: Enforced **Strict File Path Input** for all 13 prompts
905
+ - Removed "Direct Input" option to streamline workflow
906
+ - **Filename MUST contain Task ID** (e.g., `FEAT-001`) for correct output generation
907
+ - 📝 Updated all documentation to reflect clean file-based workflow
908
+ - 🎯 Consolidated usage patterns for better consistency
909
+
910
+ #### v3.2 (Previous)
911
+
912
+ - Initial DevFlow Kit release with 13 prompts
913
+ - Template-based workflow system
914
+ - Multi-language support