prompt-suite 1.0.0 → 1.0.2
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 +223 -702
- package/bin/cli.js +1 -1
- package/package.json +1 -1
- package/{templates/gen-requirement-template.txt → specs/FEAT-000/gen-requirement-template.md} +3 -3
- package/raws/.gitkeep +0 -0
- package/raws/changename.md +0 -7
- package/raws/my-project-rules.txt +0 -7
- /package/{templates/gen-rule-template.txt → specs/FEAT-000/gen-rule-template.md} +0 -0
package/README.md
CHANGED
|
@@ -1,54 +1,66 @@
|
|
|
1
|
-
# Prompt Suite - Development Workflow
|
|
1
|
+
# Prompt Suite - Development Workflow Automation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Prompt Suite** is a comprehensive prompt system that automates the software development process from raw customer request → production-ready code + tests.
|
|
4
4
|
|
|
5
5
|
## 📦 Installation
|
|
6
6
|
|
|
7
7
|
To install Prompt Suite in your project:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
#
|
|
10
|
+
# Install the package
|
|
11
11
|
npm install prompt-suite -D
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
# Initialize and setup
|
|
14
|
+
npx prompt-suite init
|
|
13
15
|
```
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
During initialization, you'll be prompted to select your IDE:
|
|
18
|
+
|
|
19
|
+
- **VSCode / Cursor** - Prompts will be installed to `.github/prompts/`
|
|
20
|
+
- **Antigravity** - Prompts will be installed to `.agent/workflows/`
|
|
21
|
+
- **Skip** - Manual setup later
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
The installer will:
|
|
19
24
|
|
|
20
|
-
|
|
25
|
+
1. Copy resources (rules, scripts, templates) to `prompt-suite/` folder
|
|
26
|
+
2. Copy prompt files directly to your IDE's prompts directory
|
|
27
|
+
3. Update IDE settings (VSCode only)
|
|
28
|
+
|
|
29
|
+
> **⚠️ Important:** Run this command on your **local machine** (where your IDE is installed), **NOT** inside a Docker container.
|
|
21
30
|
|
|
22
31
|
---
|
|
23
32
|
|
|
24
33
|
## 🔄 Updating / Upgrading
|
|
25
34
|
|
|
26
|
-
When you upgrade `prompt-suite` to a newer version
|
|
35
|
+
When you upgrade `prompt-suite` to a newer version:
|
|
27
36
|
|
|
28
|
-
|
|
29
|
-
It will **skip** any files that you have modified, ensuring your customizations are preserved.
|
|
37
|
+
### Safe Mode (Default):
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
npx prompt-suite publish
|
|
33
|
-
```
|
|
39
|
+
Preserves your customizations by skipping modified files:
|
|
34
40
|
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
```bash
|
|
42
|
+
npx prompt-suite init
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Force Overwrite:
|
|
37
46
|
|
|
38
|
-
|
|
39
|
-
npx prompt-suite publish --force
|
|
40
|
-
```
|
|
47
|
+
Resets everything to latest defaults (⚠️ overwrites your changes):
|
|
41
48
|
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
```bash
|
|
50
|
+
npx prompt-suite init --force
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Conflict Resolution:
|
|
54
|
+
|
|
55
|
+
If a file exists but differs from the new version, a `.new` file will be created (e.g., `README.md.new`) for manual comparison and merging.
|
|
44
56
|
|
|
45
57
|
---
|
|
46
58
|
|
|
47
59
|
## 📋 Overview
|
|
48
60
|
|
|
49
|
-
**Prefix**: `/ps.` -
|
|
61
|
+
**Prefix**: `/ps.` - All Prompt Suite commands start with this prefix
|
|
50
62
|
|
|
51
|
-
## 🎯 Complete Workflow (
|
|
63
|
+
## 🎯 Complete Workflow (6 Steps)
|
|
52
64
|
|
|
53
65
|
```
|
|
54
66
|
[Step 0] Generate Coding Rules (One-time setup)
|
|
@@ -57,580 +69,222 @@ When you upgrade `prompt-suite` to a newer version and run `npx prompt-suite ini
|
|
|
57
69
|
↓
|
|
58
70
|
[Step 2] Technical Design
|
|
59
71
|
↓
|
|
60
|
-
[Step 3] Feature Code
|
|
72
|
+
[Step 3] Feature Code (Patch)
|
|
61
73
|
↓
|
|
62
74
|
[Step 4] Test Plan
|
|
63
75
|
↓
|
|
64
|
-
[Step 5] Test Code
|
|
76
|
+
[Step 5] Test Code (Patch)
|
|
65
77
|
↓
|
|
66
78
|
[Step 6] Validate & Analyze
|
|
67
79
|
```
|
|
68
80
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### Prerequisites
|
|
81
|
+
---
|
|
72
82
|
|
|
73
|
-
|
|
83
|
+
## 🚀 Quick Start
|
|
74
84
|
|
|
75
|
-
|
|
85
|
+
### 1. Install and Initialize
|
|
76
86
|
|
|
77
87
|
```bash
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
# For VSCode / Cursor
|
|
82
|
-
./prompt-suite/scripts/setup-ps-chat-vscode.sh
|
|
88
|
+
npm install prompt-suite -D
|
|
89
|
+
npx prompt-suite init
|
|
83
90
|
```
|
|
84
91
|
|
|
85
|
-
|
|
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
|
|
92
|
+
Select your IDE when prompted. Prompts will be automatically installed.
|
|
101
93
|
|
|
102
|
-
|
|
103
|
-
**Location:** `/prompt-suite/specs/{task-id}/`
|
|
104
|
-
**Action:** ✅ AI auto-creates file
|
|
105
|
-
**Manual step:** ❌ None
|
|
94
|
+
### 2. Generate Coding Rules (One-time)
|
|
106
95
|
|
|
107
|
-
|
|
96
|
+
```bash
|
|
97
|
+
# Copy template
|
|
98
|
+
cp prompt-suite/templates/gen-rule-template.txt my-rules.txt
|
|
108
99
|
|
|
109
|
-
|
|
100
|
+
# Edit my-rules.txt with your stack info
|
|
101
|
+
# Then generate rules:
|
|
102
|
+
/ps.0-gen-rules my-rules.txt
|
|
103
|
+
```
|
|
110
104
|
|
|
111
|
-
|
|
112
|
-
**Location:** `/prompt-suite/specs/{task-id}/`
|
|
113
|
-
**Action:** ✅ AI auto-creates file
|
|
114
|
-
**Manual step:** ❌ None
|
|
105
|
+
### 3. Start Your First Feature
|
|
115
106
|
|
|
116
|
-
|
|
107
|
+
```bash
|
|
108
|
+
# Copy template
|
|
109
|
+
cp prompt-suite/templates/gen-requirement-template.txt FEAT-001-request.txt
|
|
117
110
|
|
|
118
|
-
|
|
111
|
+
# Edit FEAT-001-request.txt with your feature request
|
|
112
|
+
# Then generate requirement:
|
|
113
|
+
/ps.1-gen-requirement FEAT-001-request.txt
|
|
119
114
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
**Action:** ⚠️ AI generates patch
|
|
123
|
-
**Manual step:** ✅ **YOU must apply patch**
|
|
115
|
+
# Generate design:
|
|
116
|
+
/ps.2-gen-design prompt-suite/specs/FEAT-001/FEAT-001-requirement.md
|
|
124
117
|
|
|
125
|
-
|
|
118
|
+
# Generate code:
|
|
119
|
+
/ps.3-gen-code prompt-suite/specs/FEAT-001/FEAT-001-design.md
|
|
126
120
|
|
|
127
|
-
|
|
128
|
-
cd /path/to/your/project
|
|
129
|
-
git apply --check prompt-suite/specs/FEAT-001/FEAT-001-feature.patch
|
|
121
|
+
# Apply the patch:
|
|
130
122
|
git apply prompt-suite/specs/FEAT-001/FEAT-001-feature.patch
|
|
131
|
-
git status
|
|
132
123
|
```
|
|
133
124
|
|
|
134
125
|
---
|
|
135
126
|
|
|
136
|
-
|
|
127
|
+
## 📦 What Gets Installed
|
|
137
128
|
|
|
138
|
-
|
|
139
|
-
**Location:** `/prompt-suite/specs/{task-id}/`
|
|
140
|
-
**Action:** ✅ AI auto-creates file
|
|
141
|
-
**Manual step:** ❌ None
|
|
129
|
+
### In `prompt-suite/` folder:
|
|
142
130
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
**Location:** `/prompt-suite/specs/{task-id}/`
|
|
149
|
-
**Action:** ⚠️ AI generates patch
|
|
150
|
-
**Manual step:** ✅ **YOU must apply patch**
|
|
131
|
+
- `rules/` - Generated coding rules (from Step 0)
|
|
132
|
+
- `scripts/` - Setup scripts for manual IDE configuration
|
|
133
|
+
- `templates/` - Input templates for commands
|
|
134
|
+
- `specs/` - Generated specifications and patches
|
|
135
|
+
- `README.md` - This documentation
|
|
151
136
|
|
|
152
|
-
|
|
137
|
+
### In your IDE:
|
|
153
138
|
|
|
154
|
-
|
|
155
|
-
|
|
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
|
-
```
|
|
139
|
+
- **VSCode/Cursor**: `.github/prompts/*.md` - All prompt files
|
|
140
|
+
- **Antigravity**: `.agent/workflows/*.md` - All prompt files
|
|
160
141
|
|
|
161
142
|
---
|
|
162
143
|
|
|
163
|
-
|
|
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
|
-
---
|
|
144
|
+
## 📚 Available Commands
|
|
171
145
|
|
|
172
|
-
|
|
146
|
+
### Step 0: Coding Rules (One-time Setup)
|
|
173
147
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
```
|
|
148
|
+
| Command | Purpose |
|
|
149
|
+
| ----------------- | -------------------------------------- |
|
|
150
|
+
| `/ps.0-gen-rules` | Generate coding rules for your project |
|
|
151
|
+
| `/ps.0-rev-rules` | Review and improve generated rules |
|
|
194
152
|
|
|
195
|
-
|
|
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
|
-
```
|
|
153
|
+
**Output**: 10 rule files in `prompt-suite/rules/`
|
|
242
154
|
|
|
243
|
-
|
|
155
|
+
### Step 1: Requirements
|
|
244
156
|
|
|
245
|
-
|
|
157
|
+
| Command | Purpose |
|
|
158
|
+
| ----------------------- | -------------------------------------------- |
|
|
159
|
+
| `/ps.1-gen-requirement` | Convert raw request → structured requirement |
|
|
160
|
+
| `/ps.1-rev-requirement` | Review requirement for completeness |
|
|
246
161
|
|
|
247
|
-
-
|
|
248
|
-
- Regenerate only gen-rule or rev-rule
|
|
162
|
+
**Output**: `{task-id}-requirement.md`
|
|
249
163
|
|
|
250
|
-
|
|
251
|
-
# Generate ONLY gen-rule for Step 3 (Code)
|
|
252
|
-
/ps.0-gen-rules
|
|
164
|
+
### Step 2: Technical Design
|
|
253
165
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
166
|
+
| Command | Purpose |
|
|
167
|
+
| ------------------ | ---------------------------------------- |
|
|
168
|
+
| `/ps.2-gen-design` | Create technical design from requirement |
|
|
169
|
+
| `/ps.2-rev-design` | Review design for implementability |
|
|
257
170
|
|
|
258
|
-
|
|
171
|
+
**Output**: `{task-id}-design.md`
|
|
259
172
|
|
|
260
|
-
|
|
261
|
-
/ps.0-gen-rules
|
|
173
|
+
### Step 3: Feature Code ⚠️
|
|
262
174
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
175
|
+
| Command | Purpose |
|
|
176
|
+
| ---------------- | --------------------------------- |
|
|
177
|
+
| `/ps.3-gen-code` | Generate code patch from design |
|
|
178
|
+
| `/ps.3-rev-code` | Review code quality & correctness |
|
|
266
179
|
|
|
267
|
-
|
|
268
|
-
```
|
|
180
|
+
**Output**: `{task-id}-feature.patch` (⚠️ Manual `git apply` required)
|
|
269
181
|
|
|
270
|
-
|
|
182
|
+
### Step 4: Test Plan
|
|
271
183
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
-
|
|
184
|
+
| Command | Purpose |
|
|
185
|
+
| --------------------- | ---------------------------- |
|
|
186
|
+
| `/ps.4-gen-test-plan` | Create test plan from design |
|
|
187
|
+
| `/ps.4-rev-test-plan` | Review test coverage |
|
|
276
188
|
|
|
277
|
-
|
|
189
|
+
**Output**: `{task-id}-test.md`
|
|
278
190
|
|
|
279
|
-
|
|
280
|
-
# Option 1: Review all rules in directory (Recommended)
|
|
281
|
-
/ps.0-rev-rules /prompt-suite/rules/
|
|
191
|
+
### Step 5: Test Code ⚠️
|
|
282
192
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
193
|
+
| Command | Purpose |
|
|
194
|
+
| --------------------- | --------------------------------------- |
|
|
195
|
+
| `/ps.5-gen-test-code` | Generate test code patch from test plan |
|
|
196
|
+
| `/ps.5-rev-test-code` | Review test quality |
|
|
286
197
|
|
|
287
|
-
**
|
|
198
|
+
**Output**: `{task-id}-test.patch` (⚠️ Manual `git apply` required)
|
|
288
199
|
|
|
289
|
-
|
|
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
|
|
200
|
+
### Step 6: Analysis
|
|
292
201
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
**Available options:**
|
|
202
|
+
| Command | Purpose |
|
|
203
|
+
| --------------- | ------------------------------------------ |
|
|
204
|
+
| `/ps.6-analyze` | Validate entire flow, find inconsistencies |
|
|
298
205
|
|
|
299
|
-
|
|
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
|
|
206
|
+
**Output**: Analysis report (inline)
|
|
303
207
|
|
|
304
208
|
---
|
|
305
209
|
|
|
306
|
-
|
|
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 |
|
|
210
|
+
## 💡 Usage Tips
|
|
316
211
|
|
|
317
|
-
|
|
212
|
+
### Input Format
|
|
318
213
|
|
|
319
|
-
**
|
|
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:
|
|
214
|
+
All commands require **file path input** (not direct text):
|
|
336
215
|
|
|
337
216
|
```bash
|
|
217
|
+
# ✅ Correct - file path
|
|
338
218
|
/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
219
|
|
|
355
|
-
|
|
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
|
|
220
|
+
# ❌ Wrong - direct text not supported
|
|
221
|
+
/ps.1-gen-requirement "I want a login feature"
|
|
366
222
|
```
|
|
367
223
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
- If `UPDATE` mode: AI inspects existing code via **Coding Rules**, enforcing strict **Impact Analysis** and **Backward Compatibility**.
|
|
224
|
+
### Task ID Requirement
|
|
371
225
|
|
|
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:
|
|
226
|
+
Filenames **must contain a Task ID** (e.g., `FEAT-001`, `TASK-123`):
|
|
384
227
|
|
|
385
228
|
```bash
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
---
|
|
390
|
-
|
|
391
|
-
### Step 3: Feature Code
|
|
229
|
+
# ✅ Valid filenames
|
|
230
|
+
/ps.1-gen-requirement customer-request-FEAT-001.txt
|
|
231
|
+
/ps.2-gen-design TASK-123-spec.md
|
|
392
232
|
|
|
393
|
-
|
|
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
|
|
233
|
+
# ❌ Invalid - no Task ID
|
|
234
|
+
/ps.1-gen-requirement request.txt
|
|
406
235
|
```
|
|
407
236
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
- Read existing files to match style.
|
|
411
|
-
- Only generate minimal diffs to implementing the change.
|
|
412
|
-
- Protect legacy behavior.
|
|
237
|
+
### Applying Patches
|
|
413
238
|
|
|
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:**
|
|
239
|
+
Steps 3 and 5 generate patch files that you must manually apply:
|
|
421
240
|
|
|
422
241
|
```bash
|
|
423
|
-
#
|
|
424
|
-
cd /path/to/your/project
|
|
425
|
-
|
|
426
|
-
# Step 2: Check if patch can be applied (dry run - no changes made)
|
|
242
|
+
# Check if patch can be applied
|
|
427
243
|
git apply --check prompt-suite/specs/FEAT-001/FEAT-001-feature.patch
|
|
428
244
|
|
|
429
|
-
#
|
|
245
|
+
# Apply the patch
|
|
430
246
|
git apply prompt-suite/specs/FEAT-001/FEAT-001-feature.patch
|
|
431
247
|
|
|
432
|
-
#
|
|
248
|
+
# Review and commit
|
|
433
249
|
git status
|
|
434
250
|
git diff
|
|
435
|
-
|
|
436
|
-
# Step 5: Review changes and commit
|
|
437
251
|
git add .
|
|
438
|
-
git commit -m "feat: implement
|
|
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
|
|
252
|
+
git commit -m "feat: implement feature FEAT-001"
|
|
464
253
|
```
|
|
465
254
|
|
|
466
|
-
|
|
255
|
+
### Flexible Workflow
|
|
467
256
|
|
|
468
|
-
|
|
469
|
-
- Detailed test cases
|
|
470
|
-
- Negative & edge cases
|
|
471
|
-
- Mock/stub strategy
|
|
472
|
-
- Test data requirements
|
|
257
|
+
You don't need to run all steps. Adapt based on complexity:
|
|
473
258
|
|
|
474
|
-
|
|
259
|
+
**Small task (bug fix)**:
|
|
475
260
|
|
|
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
261
|
```
|
|
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
|
|
262
|
+
/ps.1-gen-requirement → /ps.2-gen-design → /ps.3-gen-code
|
|
497
263
|
```
|
|
498
264
|
|
|
499
|
-
**
|
|
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
|
|
265
|
+
**Medium task (new feature)**:
|
|
522
266
|
|
|
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
267
|
```
|
|
527
|
-
|
|
528
|
-
|
|
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
|
|
268
|
+
/ps.1-gen-requirement → /ps.1-rev-requirement
|
|
269
|
+
→ /ps.2-gen-design → /ps.2-rev-design
|
|
270
|
+
→ /ps.3-gen-code → /ps.5-gen-test-code
|
|
553
271
|
```
|
|
554
272
|
|
|
555
|
-
**
|
|
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
|
|
273
|
+
**Large task (critical feature)**:
|
|
565
274
|
|
|
566
275
|
```
|
|
567
|
-
|
|
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)
|
|
276
|
+
Full workflow (Steps 0-6)
|
|
607
277
|
```
|
|
608
278
|
|
|
609
279
|
---
|
|
610
280
|
|
|
611
281
|
## 🌍 Multi-Language Support
|
|
612
282
|
|
|
613
|
-
|
|
283
|
+
Supported languages: `en` (English), `vi` (Vietnamese), `ja` (Japanese), `ko` (Korean)
|
|
614
284
|
|
|
615
|
-
|
|
285
|
+
Technical terms (API, HTTP, JWT, etc.) always stay in English.
|
|
616
286
|
|
|
617
|
-
|
|
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:**
|
|
287
|
+
**Example**:
|
|
634
288
|
|
|
635
289
|
```text
|
|
636
290
|
Task ID: FEAT-001
|
|
@@ -640,271 +294,138 @@ Raw Request: Tôi muốn user đăng nhập bằng email/password...
|
|
|
640
294
|
|
|
641
295
|
---
|
|
642
296
|
|
|
643
|
-
##
|
|
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)**:
|
|
297
|
+
## 📁 File Structure
|
|
681
298
|
|
|
682
299
|
```
|
|
683
|
-
|
|
300
|
+
project/
|
|
301
|
+
├── prompt-suite/ # Installed resources
|
|
302
|
+
│ ├── rules/ # Generated coding rules
|
|
303
|
+
│ │ ├── ps.1-gen-requirement.rule.md
|
|
304
|
+
│ │ ├── ps.1-rev-requirement.rule.md
|
|
305
|
+
│ │ └── ...
|
|
306
|
+
│ ├── scripts/ # Manual setup scripts
|
|
307
|
+
│ │ ├── setup-ps-chat-vscode.sh
|
|
308
|
+
│ │ └── setup-ps-chat-antigravity.sh
|
|
309
|
+
│ ├── templates/ # Input templates
|
|
310
|
+
│ │ ├── gen-rule-template.txt
|
|
311
|
+
│ │ └── gen-requirement-template.txt
|
|
312
|
+
│ ├── specs/ # Generated specs & patches
|
|
313
|
+
│ │ └── FEAT-001/
|
|
314
|
+
│ │ ├── FEAT-001-requirement.md
|
|
315
|
+
│ │ ├── FEAT-001-design.md
|
|
316
|
+
│ │ ├── FEAT-001-test.md
|
|
317
|
+
│ │ ├── FEAT-001-feature.patch
|
|
318
|
+
│ │ └── FEAT-001-test.patch
|
|
319
|
+
│ └── README.md
|
|
320
|
+
│
|
|
321
|
+
├── .github/prompts/ # VSCode prompts (auto-installed)
|
|
322
|
+
│ ├── ps.0-gen-rules.prompt.md
|
|
323
|
+
│ ├── ps.1-gen-requirement.prompt.md
|
|
324
|
+
│ └── ...
|
|
325
|
+
│
|
|
326
|
+
├── .agent/workflows/ # Antigravity prompts (auto-installed)
|
|
327
|
+
│ ├── ps.0-gen-rules.prompt.md
|
|
328
|
+
│ ├── ps.1-gen-requirement.prompt.md
|
|
329
|
+
│ └── ...
|
|
330
|
+
│
|
|
331
|
+
└── src/ # Your source code
|
|
684
332
|
```
|
|
685
333
|
|
|
686
|
-
|
|
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:**
|
|
334
|
+
---
|
|
716
335
|
|
|
717
|
-
|
|
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
|
|
336
|
+
## 🔧 Manual IDE Setup
|
|
722
337
|
|
|
723
|
-
|
|
338
|
+
If you skipped IDE selection during `init`, you can run setup scripts manually:
|
|
724
339
|
|
|
725
340
|
```bash
|
|
726
|
-
#
|
|
727
|
-
/ps
|
|
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
|
|
341
|
+
# For VSCode/Cursor
|
|
342
|
+
bash prompt-suite/scripts/setup-ps-chat-vscode.sh
|
|
733
343
|
|
|
734
|
-
#
|
|
735
|
-
|
|
344
|
+
# For Antigravity
|
|
345
|
+
bash prompt-suite/scripts/setup-ps-chat-antigravity.sh
|
|
736
346
|
```
|
|
737
347
|
|
|
738
|
-
|
|
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
|
-
|
|
348
|
+
---
|
|
747
349
|
|
|
748
|
-
##
|
|
350
|
+
## 📖 Complete Example
|
|
749
351
|
|
|
750
352
|
### Scenario: User Login with Rate Limiting
|
|
751
353
|
|
|
752
|
-
#### Step 0:
|
|
354
|
+
#### Step 0: Generate Rules (One-time)
|
|
753
355
|
|
|
754
356
|
```bash
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
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
|
-
````
|
|
357
|
+
cp prompt-suite/templates/gen-rule-template.txt my-rules.txt
|
|
358
|
+
# Edit: Step: all, Stack: Laravel + Vue.js, Architecture: Clean Architecture
|
|
359
|
+
/ps.0-gen-rules my-rules.txt
|
|
360
|
+
```
|
|
767
361
|
|
|
768
362
|
#### Step 1: Generate Requirement
|
|
769
363
|
|
|
770
364
|
```bash
|
|
771
|
-
# Copy template
|
|
772
365
|
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
|
|
366
|
+
# Edit: Task ID: FEAT-001, Raw Request: User login with email/password...
|
|
782
367
|
/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
|
|
368
|
+
/ps.1-rev-requirement prompt-suite/specs/FEAT-001/FEAT-001-requirement.md
|
|
789
369
|
```
|
|
790
370
|
|
|
791
371
|
#### Step 2: Generate Design
|
|
792
372
|
|
|
793
373
|
```bash
|
|
794
|
-
/ps.2-gen-design
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
**Review**:
|
|
798
|
-
|
|
799
|
-
```bash
|
|
800
|
-
/ps.2-rev-design /prompt-suite/specs/FEAT-001/FEAT-001-design.md
|
|
374
|
+
/ps.2-gen-design prompt-suite/specs/FEAT-001/FEAT-001-requirement.md
|
|
375
|
+
/ps.2-rev-design prompt-suite/specs/FEAT-001/FEAT-001-design.md
|
|
801
376
|
```
|
|
802
377
|
|
|
803
378
|
#### Step 3: Generate Code
|
|
804
379
|
|
|
805
380
|
```bash
|
|
806
|
-
/ps.3-gen-code
|
|
807
|
-
|
|
381
|
+
/ps.3-gen-code prompt-suite/specs/FEAT-001/FEAT-001-design.md
|
|
382
|
+
|
|
383
|
+
# Apply patch
|
|
384
|
+
git apply --check prompt-suite/specs/FEAT-001/FEAT-001-feature.patch
|
|
385
|
+
git apply prompt-suite/specs/FEAT-001/FEAT-001-feature.patch
|
|
386
|
+
git add .
|
|
387
|
+
git commit -m "feat: user login with rate limiting (FEAT-001)"
|
|
808
388
|
```
|
|
809
389
|
|
|
810
390
|
#### Step 4: Generate Test Plan
|
|
811
391
|
|
|
812
392
|
```bash
|
|
813
|
-
/ps.4-gen-test-plan
|
|
393
|
+
/ps.4-gen-test-plan prompt-suite/specs/FEAT-001/FEAT-001-design.md
|
|
394
|
+
/ps.4-rev-test-plan prompt-suite/specs/FEAT-001/FEAT-001-design.md prompt-suite/specs/FEAT-001/FEAT-001-test.md
|
|
814
395
|
```
|
|
815
396
|
|
|
816
397
|
#### Step 5: Generate Test Code
|
|
817
398
|
|
|
818
399
|
```bash
|
|
819
|
-
/ps.5-gen-test-code
|
|
820
|
-
|
|
400
|
+
/ps.5-gen-test-code prompt-suite/specs/FEAT-001/FEAT-001-test.md
|
|
401
|
+
|
|
402
|
+
# Apply test patch
|
|
403
|
+
git apply --check prompt-suite/specs/FEAT-001/FEAT-001-test.patch
|
|
404
|
+
git apply prompt-suite/specs/FEAT-001/FEAT-001-test.patch
|
|
405
|
+
./vendor/bin/phpunit
|
|
406
|
+
git add .
|
|
407
|
+
git commit -m "test: add tests for login feature (FEAT-001)"
|
|
821
408
|
```
|
|
822
409
|
|
|
823
410
|
#### Step 6: Validate
|
|
824
411
|
|
|
825
412
|
```bash
|
|
826
413
|
/ps.6-analyze \
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
414
|
+
prompt-suite/specs/FEAT-001/FEAT-001-requirement.md \
|
|
415
|
+
prompt-suite/specs/FEAT-001/FEAT-001-design.md \
|
|
416
|
+
prompt-suite/specs/FEAT-001/FEAT-001-test.md
|
|
830
417
|
```
|
|
831
418
|
|
|
832
419
|
---
|
|
833
420
|
|
|
834
|
-
##
|
|
421
|
+
## 🤝 Contributing
|
|
835
422
|
|
|
836
|
-
|
|
423
|
+
Issues and pull requests are welcome!
|
|
837
424
|
|
|
838
|
-
|
|
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
|
|
425
|
+
## 📄 License
|
|
843
426
|
|
|
844
|
-
|
|
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
|
|
427
|
+
ISC
|
|
850
428
|
|
|
851
429
|
---
|
|
852
430
|
|
|
853
|
-
|
|
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
|
|
431
|
+
**Made with ❤️ by Phong Le**
|
package/bin/cli.js
CHANGED
|
@@ -17,7 +17,7 @@ const sourceRoot = path.join(__dirname, '..');
|
|
|
17
17
|
const targetRoot = path.join(process.cwd(), 'prompt-suite');
|
|
18
18
|
|
|
19
19
|
// Exclude 'flows' - will be copied directly to IDE prompts folder
|
|
20
|
-
const itemsToCopy = ['rules', 'scripts', 'templates', 'README.md'];
|
|
20
|
+
const itemsToCopy = ['rules', 'scripts', 'specs', 'templates', 'README.md'];
|
|
21
21
|
|
|
22
22
|
console.log(`\n🚀 Initializing Prompt Suite...`);
|
|
23
23
|
console.log(`Source: ${sourceRoot}`);
|
package/package.json
CHANGED
package/{templates/gen-requirement-template.txt → specs/FEAT-000/gen-requirement-template.md}
RENAMED
|
@@ -18,9 +18,9 @@ Example (Update Feature):
|
|
|
18
18
|
Task ID: FEAT-002
|
|
19
19
|
Language: vi
|
|
20
20
|
Task Mode: UPDATE
|
|
21
|
-
Existing Logic/Code:
|
|
21
|
+
Existing Logic/Code:
|
|
22
22
|
function login(email, password) {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
// checked password
|
|
24
|
+
return true;
|
|
25
25
|
}
|
|
26
26
|
Raw Request: Cập nhật hàm login để thêm logic kiểm tra captcha trước khi check password. Nếu sai captcha trả về lỗi 400.
|
package/raws/.gitkeep
DELETED
|
File without changes
|
package/raws/changename.md
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Yêu cầu thay đổi tên dự án và prefix
|
|
2
|
-
|
|
3
|
-
Thực hiện các thay đổi sau cho hệ thống prompt:
|
|
4
|
-
|
|
5
|
-
1. **Đổi tên dự án**: Cập nhật tên thư mục hoặc tên gói thành `devflow-prompts`.
|
|
6
|
-
2. **Đổi Prefix Prompt**: Cập nhật tiền tố (prefix) cho các lệnh prompt từ tên cũ sang `devflow`.
|
|
7
|
-
- Ví dụ: đổi thành `df.1-gen-requirement`, `df.2-gen-design`, v.v.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
Step: all
|
|
2
|
-
Stack: Laravel (Backend) + Inertia & Vue.js (Frontend)
|
|
3
|
-
Architecture: Read this source code to understand the architecture
|
|
4
|
-
Coding Rules: Read this source code to understand the coding rules
|
|
5
|
-
Team: 5 developers, mid-level experience
|
|
6
|
-
Constraints: Must support 10k concurrent users
|
|
7
|
-
Language: en
|
|
File without changes
|