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