prompt-suite 1.0.4 → 1.0.5
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 +89 -33
- package/package.json +1 -1
- package/{flows → prompts}/ps.0-gen-rules.prompt.md +34 -7
- package/{flows → prompts}/ps.1-gen-requirement.prompt.md +11 -6
- package/{flows → prompts}/ps.1-rev-requirement.prompt.md +31 -6
- package/{flows → prompts}/ps.2-gen-design.prompt.md +26 -7
- package/{flows → prompts}/ps.2-rev-design.prompt.md +12 -2
- package/{flows → prompts}/ps.3-gen-code.prompt.md +15 -8
- package/{flows → prompts}/ps.3-rev-code.prompt.md +14 -3
- package/{flows → prompts}/ps.4-gen-test-plan.prompt.md +22 -4
- package/{flows → prompts}/ps.4-rev-test-plan.prompt.md +11 -2
- package/{flows → prompts}/ps.5-gen-test-code.prompt.md +8 -3
- package/{flows → prompts}/ps.5-rev-test-code.prompt.md +12 -2
- package/{flows → prompts}/ps.6-analyze.prompt.md +24 -4
- package/tasks/templates/gen-requirement-template.md +263 -0
- package/tasks/templates/gen-rule-template.md +172 -0
- package/specs/FEAT-000/gen-requirement-template.md +0 -26
- package/specs/FEAT-000/gen-rule-template.md +0 -17
- /package/{flows → prompts}/ps.0-rev-rules.prompt.md +0 -0
- /package/{specs → tasks}/.gitkeep +0 -0
package/README.md
CHANGED
|
@@ -2,6 +2,37 @@
|
|
|
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
|
+
## 📑 Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Installation](#-installation)
|
|
8
|
+
- [Updating / Upgrading](#-updating--upgrading)
|
|
9
|
+
- [Overview](#-overview)
|
|
10
|
+
- [Complete Workflow](#-complete-workflow-6-steps)
|
|
11
|
+
- [Quick Start](#-quick-start)
|
|
12
|
+
- [What Gets Installed](#-what-gets-installed)
|
|
13
|
+
- [Available Commands](#-available-commands)
|
|
14
|
+
- [Step 0: Coding Rules](#step-0-coding-rules-one-time-setup)
|
|
15
|
+
- [Step 1: Requirements](#step-1-requirements)
|
|
16
|
+
- [Step 2: Technical Design](#step-2-technical-design)
|
|
17
|
+
- [Step 3: Feature Code](#step-3-feature-code-)
|
|
18
|
+
- [Step 4: Test Plan](#step-4-test-plan)
|
|
19
|
+
- [Step 5: Test Code](#step-5-test-code-)
|
|
20
|
+
- [Step 6: Analysis](#step-6-analysis)
|
|
21
|
+
- [Usage Tips](#-usage-tips)
|
|
22
|
+
- [Input Format](#input-format)
|
|
23
|
+
- [Task ID Requirement](#task-id-requirement)
|
|
24
|
+
- [Task ID Types](#task-id-types)
|
|
25
|
+
- [Applying Patches](#applying-patches)
|
|
26
|
+
- [Flexible Workflow](#flexible-workflow)
|
|
27
|
+
- [Multi-Language Support](#-multi-language-support)
|
|
28
|
+
- [File Structure](#-file-structure)
|
|
29
|
+
- [Manual IDE Setup](#-manual-ide-setup)
|
|
30
|
+
- [Complete Example](#-complete-example)
|
|
31
|
+
- [Contributing](#-contributing)
|
|
32
|
+
- [License](#-license)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
5
36
|
## 📦 Installation
|
|
6
37
|
|
|
7
38
|
To install Prompt Suite in your project:
|
|
@@ -103,7 +134,7 @@ Select your IDE when prompted. Prompts will be automatically installed.
|
|
|
103
134
|
|
|
104
135
|
```bash
|
|
105
136
|
# Copy template
|
|
106
|
-
cp prompt-suite/templates/gen-rule-template.
|
|
137
|
+
cp prompt-suite/tasks/templates/gen-rule-template.md my-rules.txt
|
|
107
138
|
|
|
108
139
|
# Edit my-rules.txt with your stack info
|
|
109
140
|
# Then generate rules:
|
|
@@ -114,20 +145,20 @@ cp prompt-suite/templates/gen-rule-template.txt my-rules.txt
|
|
|
114
145
|
|
|
115
146
|
```bash
|
|
116
147
|
# Copy template
|
|
117
|
-
cp prompt-suite/templates/gen-requirement-template.
|
|
148
|
+
cp prompt-suite/tasks/templates/gen-requirement-template.md FEAT-001-request.txt
|
|
118
149
|
|
|
119
150
|
# Edit FEAT-001-request.txt with your feature request
|
|
120
151
|
# Then generate requirement:
|
|
121
152
|
/ps.1-gen-requirement FEAT-001-request.txt
|
|
122
153
|
|
|
123
154
|
# Generate design:
|
|
124
|
-
/ps.2-gen-design prompt-suite/
|
|
155
|
+
/ps.2-gen-design prompt-suite/tasks/FEAT-001/FEAT-001-requirement.md
|
|
125
156
|
|
|
126
157
|
# Generate code:
|
|
127
|
-
/ps.3-gen-code prompt-suite/
|
|
158
|
+
/ps.3-gen-code prompt-suite/tasks/FEAT-001/FEAT-001-design.md
|
|
128
159
|
|
|
129
160
|
# Apply the patch:
|
|
130
|
-
git apply prompt-suite/
|
|
161
|
+
git apply prompt-suite/tasks/FEAT-001/FEAT-001-feature.patch
|
|
131
162
|
```
|
|
132
163
|
|
|
133
164
|
---
|
|
@@ -138,8 +169,9 @@ git apply prompt-suite/specs/FEAT-001/FEAT-001-feature.patch
|
|
|
138
169
|
|
|
139
170
|
- `rules/` - Generated coding rules (from Step 0)
|
|
140
171
|
- `scripts/` - Setup scripts for manual IDE configuration
|
|
141
|
-
- `
|
|
142
|
-
- `
|
|
172
|
+
- `tasks/` - Task artifacts and templates
|
|
173
|
+
- `templates/` - Input templates for commands
|
|
174
|
+
- `{TASK-ID}/` - Generated task artifacts (requirements, designs, patches)
|
|
143
175
|
- `README.md` - This documentation
|
|
144
176
|
|
|
145
177
|
### In your IDE:
|
|
@@ -231,27 +263,51 @@ All commands require **file path input** (not direct text):
|
|
|
231
263
|
|
|
232
264
|
### Task ID Requirement
|
|
233
265
|
|
|
234
|
-
Filenames **must contain a Task ID** (e.g., `FEAT-001`, `
|
|
266
|
+
Filenames **must contain a Task ID** (e.g., `FEAT-001`, `BUG-123`):
|
|
235
267
|
|
|
236
268
|
```bash
|
|
237
269
|
# ✅ Valid filenames
|
|
238
270
|
/ps.1-gen-requirement customer-request-FEAT-001.txt
|
|
239
|
-
/ps.2-gen-design
|
|
271
|
+
/ps.2-gen-design BUG-123-bugfix.md
|
|
240
272
|
|
|
241
273
|
# ❌ Invalid - no Task ID
|
|
242
274
|
/ps.1-gen-requirement request.txt
|
|
243
275
|
```
|
|
244
276
|
|
|
277
|
+
### Task ID Types
|
|
278
|
+
|
|
279
|
+
Task IDs follow the pattern: `{TYPE}-{NUMBER}`
|
|
280
|
+
|
|
281
|
+
| Type | Purpose | Example |
|
|
282
|
+
| ---------------- | ---------------------------- | -------------- |
|
|
283
|
+
| **FEAT-xxx** | New feature or functionality | `FEAT-001` |
|
|
284
|
+
| **BUG-xxx** | Bug fix | `BUG-042` |
|
|
285
|
+
| **IMP-xxx** | Improvement or enhancement | `IMP-023` |
|
|
286
|
+
| **REFACTOR-xxx** | Code refactoring | `REFACTOR-001` |
|
|
287
|
+
| **HOTFIX-xxx** | Critical production fix | `HOTFIX-001` |
|
|
288
|
+
| **SPIKE-xxx** | Research or investigation | `SPIKE-001` |
|
|
289
|
+
| **CHORE-xxx** | Maintenance tasks | `CHORE-015` |
|
|
290
|
+
|
|
291
|
+
**Examples:**
|
|
292
|
+
|
|
293
|
+
- `FEAT-001`: User login with email/password
|
|
294
|
+
- `BUG-042`: Fix payment calculation error
|
|
295
|
+
- `IMP-023`: Improve API response time
|
|
296
|
+
- `HOTFIX-001`: Fix SQL injection vulnerability
|
|
297
|
+
- `CHORE-015`: Update npm dependencies
|
|
298
|
+
|
|
299
|
+
> 💡 See `prompt-suite/tasks/templates/TASK-ID-TYPES.md` for detailed guidelines
|
|
300
|
+
|
|
245
301
|
### Applying Patches
|
|
246
302
|
|
|
247
303
|
Steps 3 and 5 generate patch files that you must manually apply:
|
|
248
304
|
|
|
249
305
|
```bash
|
|
250
306
|
# Check if patch can be applied
|
|
251
|
-
git apply --check prompt-suite/
|
|
307
|
+
git apply --check prompt-suite/tasks/FEAT-001/FEAT-001-feature.patch
|
|
252
308
|
|
|
253
309
|
# Apply the patch
|
|
254
|
-
git apply prompt-suite/
|
|
310
|
+
git apply prompt-suite/tasks/FEAT-001/FEAT-001-feature.patch
|
|
255
311
|
|
|
256
312
|
# Review and commit
|
|
257
313
|
git status
|
|
@@ -314,15 +370,15 @@ project/
|
|
|
314
370
|
│ ├── scripts/ # Manual setup scripts
|
|
315
371
|
│ │ ├── setup-ps-chat-vscode.sh
|
|
316
372
|
│ │ └── setup-ps-chat-antigravity.sh
|
|
317
|
-
│ ├──
|
|
318
|
-
│ │ ├──
|
|
319
|
-
│ │
|
|
320
|
-
│
|
|
321
|
-
│ │ └── FEAT-001/
|
|
373
|
+
│ ├── tasks/ # Task artifacts & templates
|
|
374
|
+
│ │ ├── templates/ # Input templates
|
|
375
|
+
│ │ │ ├── gen-rule-template.md
|
|
376
|
+
│ │ │ └── gen-requirement-template.md
|
|
377
|
+
│ │ └── FEAT-001/ # Generated task artifacts
|
|
322
378
|
│ │ ├── FEAT-001-requirement.md
|
|
323
379
|
│ │ ├── FEAT-001-design.md
|
|
324
380
|
│ │ ├── FEAT-001-test.md
|
|
325
|
-
│ │ ├── FEAT-001-
|
|
381
|
+
│ │ ├── FEAT-001-code.patch
|
|
326
382
|
│ │ └── FEAT-001-test.patch
|
|
327
383
|
│ └── README.md
|
|
328
384
|
│
|
|
@@ -362,7 +418,7 @@ bash prompt-suite/scripts/setup-ps-chat-antigravity.sh
|
|
|
362
418
|
#### Step 0: Generate Rules (One-time)
|
|
363
419
|
|
|
364
420
|
```bash
|
|
365
|
-
cp prompt-suite/templates/gen-rule-template.
|
|
421
|
+
cp prompt-suite/tasks/templates/gen-rule-template.md my-rules.txt
|
|
366
422
|
# Edit: Step: all, Stack: Laravel + Vue.js, Architecture: Clean Architecture
|
|
367
423
|
/ps.0-gen-rules my-rules.txt
|
|
368
424
|
```
|
|
@@ -370,27 +426,27 @@ cp prompt-suite/templates/gen-rule-template.txt my-rules.txt
|
|
|
370
426
|
#### Step 1: Generate Requirement
|
|
371
427
|
|
|
372
428
|
```bash
|
|
373
|
-
cp prompt-suite/templates/gen-requirement-template.
|
|
429
|
+
cp prompt-suite/tasks/templates/gen-requirement-template.md FEAT-001-request.txt
|
|
374
430
|
# Edit: Task ID: FEAT-001, Raw Request: User login with email/password...
|
|
375
431
|
/ps.1-gen-requirement FEAT-001-request.txt
|
|
376
|
-
/ps.1-rev-requirement prompt-suite/
|
|
432
|
+
/ps.1-rev-requirement prompt-suite/tasks/FEAT-001/FEAT-001-requirement.md
|
|
377
433
|
```
|
|
378
434
|
|
|
379
435
|
#### Step 2: Generate Design
|
|
380
436
|
|
|
381
437
|
```bash
|
|
382
|
-
/ps.2-gen-design prompt-suite/
|
|
383
|
-
/ps.2-rev-design prompt-suite/
|
|
438
|
+
/ps.2-gen-design prompt-suite/tasks/FEAT-001/FEAT-001-requirement.md
|
|
439
|
+
/ps.2-rev-design prompt-suite/tasks/FEAT-001/FEAT-001-design.md
|
|
384
440
|
```
|
|
385
441
|
|
|
386
442
|
#### Step 3: Generate Code
|
|
387
443
|
|
|
388
444
|
```bash
|
|
389
|
-
/ps.3-gen-code prompt-suite/
|
|
445
|
+
/ps.3-gen-code prompt-suite/tasks/FEAT-001/FEAT-001-design.md
|
|
390
446
|
|
|
391
447
|
# Apply patch
|
|
392
|
-
git apply --check prompt-suite/
|
|
393
|
-
git apply prompt-suite/
|
|
448
|
+
git apply --check prompt-suite/tasks/FEAT-001/FEAT-001-feature.patch
|
|
449
|
+
git apply prompt-suite/tasks/FEAT-001/FEAT-001-feature.patch
|
|
394
450
|
git add .
|
|
395
451
|
git commit -m "feat: user login with rate limiting (FEAT-001)"
|
|
396
452
|
```
|
|
@@ -398,18 +454,18 @@ git commit -m "feat: user login with rate limiting (FEAT-001)"
|
|
|
398
454
|
#### Step 4: Generate Test Plan
|
|
399
455
|
|
|
400
456
|
```bash
|
|
401
|
-
/ps.4-gen-test-plan prompt-suite/
|
|
402
|
-
/ps.4-rev-test-plan prompt-suite/
|
|
457
|
+
/ps.4-gen-test-plan prompt-suite/tasks/FEAT-001/FEAT-001-design.md
|
|
458
|
+
/ps.4-rev-test-plan prompt-suite/tasks/FEAT-001/FEAT-001-design.md prompt-suite/tasks/FEAT-001/FEAT-001-test.md
|
|
403
459
|
```
|
|
404
460
|
|
|
405
461
|
#### Step 5: Generate Test Code
|
|
406
462
|
|
|
407
463
|
```bash
|
|
408
|
-
/ps.5-gen-test-code prompt-suite/
|
|
464
|
+
/ps.5-gen-test-code prompt-suite/tasks/FEAT-001/FEAT-001-test.md
|
|
409
465
|
|
|
410
466
|
# Apply test patch
|
|
411
|
-
git apply --check prompt-suite/
|
|
412
|
-
git apply prompt-suite/
|
|
467
|
+
git apply --check prompt-suite/tasks/FEAT-001/FEAT-001-test.patch
|
|
468
|
+
git apply prompt-suite/tasks/FEAT-001/FEAT-001-test.patch
|
|
413
469
|
./vendor/bin/phpunit
|
|
414
470
|
git add .
|
|
415
471
|
git commit -m "test: add tests for login feature (FEAT-001)"
|
|
@@ -419,9 +475,9 @@ git commit -m "test: add tests for login feature (FEAT-001)"
|
|
|
419
475
|
|
|
420
476
|
```bash
|
|
421
477
|
/ps.6-analyze \
|
|
422
|
-
prompt-suite/
|
|
423
|
-
prompt-suite/
|
|
424
|
-
prompt-suite/
|
|
478
|
+
prompt-suite/tasks/FEAT-001/FEAT-001-requirement.md \
|
|
479
|
+
prompt-suite/tasks/FEAT-001/FEAT-001-design.md \
|
|
480
|
+
prompt-suite/tasks/FEAT-001/FEAT-001-test.md
|
|
425
481
|
```
|
|
426
482
|
|
|
427
483
|
---
|
package/package.json
CHANGED
|
@@ -5,9 +5,11 @@ description: Initialize workflow rules for project (requirement, design, code, t
|
|
|
5
5
|
# /ps.0-gen-rules
|
|
6
6
|
|
|
7
7
|
## Description
|
|
8
|
+
|
|
8
9
|
Create workflow rules for all SDLC steps. Each step has 2 rules: gen-rule (for generation) and rev-rule (for review).
|
|
9
10
|
|
|
10
11
|
**Steps covered:**
|
|
12
|
+
|
|
11
13
|
- Step 1: Requirement (how to write & review requirements)
|
|
12
14
|
- Step 2: Design (how to write & review technical designs)
|
|
13
15
|
- Step 3: Code (how to write & review code)
|
|
@@ -17,9 +19,10 @@ Create workflow rules for all SDLC steps. Each step has 2 rules: gen-rule (for g
|
|
|
17
19
|
## Input Requirements
|
|
18
20
|
|
|
19
21
|
**Input Type: File Path (Required)**
|
|
22
|
+
|
|
20
23
|
- Provides path to a text file containing Step, Stack, Architecture, etc.
|
|
21
24
|
- **File can be located anywhere** (not limited to `/prompt-suite`)
|
|
22
|
-
- Template file available at: `/prompt-suite/templates/gen-rule-template.
|
|
25
|
+
- Template file available at: `/prompt-suite/tasks/templates/gen-rule-template.md`
|
|
23
26
|
- Format inside file:
|
|
24
27
|
```text
|
|
25
28
|
Step: ...
|
|
@@ -48,11 +51,13 @@ Create workflow rules for all SDLC steps. Each step has 2 rules: gen-rule (for g
|
|
|
48
51
|
## Output Format
|
|
49
52
|
|
|
50
53
|
### Output Location:
|
|
54
|
+
|
|
51
55
|
- **Base directory**: `<repo_root>/prompt-suite/rules/`
|
|
52
56
|
- **Auto-creation**: Directory will be created automatically if it doesn't exist
|
|
53
57
|
- **File handling**: Existing files will be overwritten. **Review carefully before running.**
|
|
54
58
|
|
|
55
59
|
### Rules Structure:
|
|
60
|
+
|
|
56
61
|
```
|
|
57
62
|
/prompt-suite/rules/
|
|
58
63
|
├── ps.1-gen-requirement.rule.md
|
|
@@ -70,6 +75,7 @@ Create workflow rules for all SDLC steps. Each step has 2 rules: gen-rule (for g
|
|
|
70
75
|
### Rule Content by Step:
|
|
71
76
|
|
|
72
77
|
**Step 1 (Requirement):**
|
|
78
|
+
|
|
73
79
|
- `ps.1-gen-requirement.rule.md`: Guidelines for converting raw request → requirement document
|
|
74
80
|
- What to include, what to avoid
|
|
75
81
|
- Template structure requirements
|
|
@@ -82,6 +88,7 @@ Create workflow rules for all SDLC steps. Each step has 2 rules: gen-rule (for g
|
|
|
82
88
|
- Common mistakes to catch
|
|
83
89
|
|
|
84
90
|
**Step 2 (Design):**
|
|
91
|
+
|
|
85
92
|
- `ps.2-gen-design.rule.md`: Guidelines for creating tech design from requirement
|
|
86
93
|
- Architecture principles (Clean Architecture, etc.)
|
|
87
94
|
- Security requirements
|
|
@@ -94,6 +101,7 @@ Create workflow rules for all SDLC steps. Each step has 2 rules: gen-rule (for g
|
|
|
94
101
|
- Implementation feasibility
|
|
95
102
|
|
|
96
103
|
**Step 3 (Code):**
|
|
104
|
+
|
|
97
105
|
- `ps.3-gen-code.rule.md`: Coding standards and conventions
|
|
98
106
|
- Backend/Frontend coding rules
|
|
99
107
|
- Layer separation
|
|
@@ -106,6 +114,7 @@ Create workflow rules for all SDLC steps. Each step has 2 rules: gen-rule (for g
|
|
|
106
114
|
- Test coverage requirements
|
|
107
115
|
|
|
108
116
|
**Step 4 (Test Plan):**
|
|
117
|
+
|
|
109
118
|
- `ps.4-gen-test-plan.rule.md`: Guidelines for creating test plans
|
|
110
119
|
- Test level strategy (unit/integration/E2E)
|
|
111
120
|
- Coverage requirements
|
|
@@ -118,6 +127,7 @@ Create workflow rules for all SDLC steps. Each step has 2 rules: gen-rule (for g
|
|
|
118
127
|
- Feasibility assessment
|
|
119
128
|
|
|
120
129
|
**Step 5 (Test Code):**
|
|
130
|
+
|
|
121
131
|
- `ps.5-gen-test-code.rule.md`: Test code writing standards
|
|
122
132
|
- Test structure conventions
|
|
123
133
|
- Assertion best practices
|
|
@@ -182,8 +192,8 @@ COMMON REQUIREMENTS (apply to ALL steps):
|
|
|
182
192
|
3. Examples (Good vs Bad) with real code/content
|
|
183
193
|
4. Common mistakes to avoid
|
|
184
194
|
5. **CRITICAL**: In Section 3 (Project Structure), you MUST document the explicit paths to key directories (e.g., `src/`, `app/`, `tests/`). This allows future AI steps to find files automatically.
|
|
185
|
-
6. Follow the template EXACTLY: Principles → Architecture & Boundaries → Project Structure →
|
|
186
|
-
Implementation Rules → Error Handling & Logging → Testing Rules → Security →
|
|
195
|
+
6. Follow the template EXACTLY: Principles → Architecture & Boundaries → Project Structure →
|
|
196
|
+
Implementation Rules → Error Handling & Logging → Testing Rules → Security →
|
|
187
197
|
PR Checklist → Examples
|
|
188
198
|
|
|
189
199
|
**Every rev-rule file MUST include:**
|
|
@@ -241,57 +251,70 @@ SELF-CHECK BEFORE OUTPUT:
|
|
|
241
251
|
3. Verify all 9 sections are present in every file.
|
|
242
252
|
```
|
|
243
253
|
|
|
244
|
-
## Template for each
|
|
254
|
+
## Template for each \*-rule.md
|
|
245
255
|
|
|
246
|
-
|
|
256
|
+
````markdown
|
|
247
257
|
# {Rule Name}
|
|
248
258
|
|
|
249
259
|
## 1) Principles
|
|
260
|
+
|
|
250
261
|
- MUST:
|
|
251
262
|
- SHOULD:
|
|
252
263
|
- SHOULD NOT:
|
|
253
264
|
|
|
254
265
|
## 2) Architecture & Boundaries
|
|
266
|
+
|
|
255
267
|
- Allowed dependencies:
|
|
256
268
|
- Forbidden dependencies:
|
|
257
269
|
|
|
258
270
|
## 3) Project Structure
|
|
271
|
+
|
|
259
272
|
- **Root Directories** (CRITICAL: Must specify absolute or relative paths from repo root):
|
|
260
273
|
- Folders structure:
|
|
261
274
|
- Naming conventions:
|
|
262
275
|
|
|
263
276
|
## 4) Implementation Rules
|
|
277
|
+
|
|
264
278
|
- Patterns:
|
|
265
279
|
- Anti-patterns:
|
|
266
280
|
|
|
267
281
|
## 5) Error Handling & Logging
|
|
282
|
+
|
|
268
283
|
- Rules:
|
|
269
284
|
- Examples:
|
|
270
285
|
|
|
271
286
|
## 6) Testing Rules
|
|
287
|
+
|
|
272
288
|
- Unit:
|
|
273
289
|
- Integration:
|
|
274
290
|
- E2E:
|
|
275
291
|
|
|
276
292
|
## 7) Security (if applicable)
|
|
293
|
+
|
|
277
294
|
- Rules:
|
|
278
295
|
- Examples:
|
|
279
296
|
|
|
280
297
|
## 8) PR Checklist
|
|
298
|
+
|
|
281
299
|
- [ ] ...
|
|
282
300
|
- [ ] ...
|
|
283
301
|
|
|
284
302
|
## 9) Examples
|
|
303
|
+
|
|
285
304
|
### Good
|
|
305
|
+
|
|
286
306
|
```txt
|
|
287
307
|
...
|
|
288
308
|
```
|
|
309
|
+
````
|
|
289
310
|
|
|
290
311
|
### Bad
|
|
312
|
+
|
|
291
313
|
```txt
|
|
292
314
|
...
|
|
293
315
|
```
|
|
294
|
-
|
|
316
|
+
|
|
317
|
+
````
|
|
295
318
|
|
|
296
319
|
## Rules/Guidelines
|
|
297
320
|
1. ✅ Rules must be **practical** - can be applied immediately
|
|
@@ -306,11 +329,12 @@ SELF-CHECK BEFORE OUTPUT:
|
|
|
306
329
|
```bash
|
|
307
330
|
/ps.0-gen-rules /path/to/my-project-rules.txt
|
|
308
331
|
# → Generates all 10 files in /prompt-suite/rules/ (step1-5, each with gen + rev)
|
|
309
|
-
|
|
332
|
+
````
|
|
310
333
|
|
|
311
334
|
⚠️ **Warning**: This will overwrite existing rule files. Commit your changes first!
|
|
312
335
|
|
|
313
336
|
### Example 2: Generate only step 1 rules (Requirement)
|
|
337
|
+
|
|
314
338
|
```bash
|
|
315
339
|
# In your input file: Step: 1
|
|
316
340
|
/ps.0-gen-rules /path/to/step1-rules.txt
|
|
@@ -318,6 +342,7 @@ SELF-CHECK BEFORE OUTPUT:
|
|
|
318
342
|
```
|
|
319
343
|
|
|
320
344
|
### Example 3: Generate step 2 rules (Design)
|
|
345
|
+
|
|
321
346
|
```bash
|
|
322
347
|
# In your input file: Step: 2
|
|
323
348
|
/ps.0-gen-rules /path/to/step2-rules.txt
|
|
@@ -325,6 +350,7 @@ SELF-CHECK BEFORE OUTPUT:
|
|
|
325
350
|
```
|
|
326
351
|
|
|
327
352
|
### Example 4: Generate step 3 rules (Code) in Vietnamese
|
|
353
|
+
|
|
328
354
|
```bash
|
|
329
355
|
# In your input file: Language: vi
|
|
330
356
|
/ps.0-gen-rules /path/to/step3-vi-rules.txt
|
|
@@ -332,4 +358,5 @@ SELF-CHECK BEFORE OUTPUT:
|
|
|
332
358
|
```
|
|
333
359
|
|
|
334
360
|
## Next Steps
|
|
361
|
+
|
|
335
362
|
After generating workflow rules → run `/ps.0-rev-rules` to review and improve
|
|
@@ -11,6 +11,7 @@ Convert raw customer request into a structured, clear, and testable requirement
|
|
|
11
11
|
## Input Requirements
|
|
12
12
|
|
|
13
13
|
**Input Type: File Path (Required)**
|
|
14
|
+
|
|
14
15
|
- Provides path to a text file containing Task ID, Language, and Raw Request.
|
|
15
16
|
- **File can be located anywhere** (e.g., `~/Desktop/request.txt`, `/tmp/my-task.txt`).
|
|
16
17
|
- **Filename**: Flexible naming, but meaningful names recommended (e.g., `FEAT-001-request.txt`).
|
|
@@ -23,13 +24,16 @@ Convert raw customer request into a structured, clear, and testable requirement
|
|
|
23
24
|
- AI will automatically read the file.
|
|
24
25
|
|
|
25
26
|
**Task Mode (Optional, Default: NEW)**
|
|
26
|
-
|
|
27
|
+
|
|
28
|
+
- `NEW`: New task request.
|
|
27
29
|
- `UPDATE`: Request to update/refactor existing functionality.
|
|
28
30
|
|
|
29
31
|
**Existing Logic/Code (Required for UPDATE)**
|
|
32
|
+
|
|
30
33
|
- If Mode is `UPDATE`, provide current business rules or code snippets to be modified.
|
|
31
34
|
|
|
32
35
|
**Rule File** (optional but recommended):
|
|
36
|
+
|
|
33
37
|
- `ps.1-gen-requirement.rule.md` from `/prompt-suite/rules/` - Guidelines for generating requirements
|
|
34
38
|
|
|
35
39
|
## Input Validation
|
|
@@ -44,18 +48,18 @@ Convert raw customer request into a structured, clear, and testable requirement
|
|
|
44
48
|
|
|
45
49
|
File markdown: `{#task-id}-requirement.md`
|
|
46
50
|
|
|
47
|
-
**Folder Structure**: All
|
|
51
|
+
**Folder Structure**: All task artifacts must be stored in:
|
|
48
52
|
|
|
49
53
|
```
|
|
50
|
-
/prompt-suite/
|
|
54
|
+
/prompt-suite/tasks/{#task-id}/
|
|
51
55
|
├── {#task-id}-requirement.md
|
|
52
56
|
├── {#task-id}-design.md
|
|
53
57
|
├── {#task-id}-test.md
|
|
54
|
-
├── {#task-id}-
|
|
58
|
+
├── {#task-id}-code.patch
|
|
55
59
|
└── {#task-id}-test.patch
|
|
56
60
|
```
|
|
57
61
|
|
|
58
|
-
Example: `/prompt-suite/
|
|
62
|
+
Example: `/prompt-suite/tasks/FEAT-001/FEAT-001-requirement.md`
|
|
59
63
|
|
|
60
64
|
## Template
|
|
61
65
|
|
|
@@ -68,6 +72,7 @@ Example: `/prompt-suite/specs/FEAT-001/FEAT-001-requirement.md`
|
|
|
68
72
|
**Date**: {YYYY-MM-DD}
|
|
69
73
|
**From**: {Customer/Stakeholder name}
|
|
70
74
|
```
|
|
75
|
+
|
|
71
76
|
{Paste exact original request here - keep verbatim}
|
|
72
77
|
|
|
73
78
|
```
|
|
@@ -155,7 +160,7 @@ INSTRUCTIONS:
|
|
|
155
160
|
- Focus on "What changes" vs "What remains".
|
|
156
161
|
- In "Scope", explicitly list what is preserved.
|
|
157
162
|
- **IF Mode is NEW**:
|
|
158
|
-
- Focus on complete new
|
|
163
|
+
- Focus on complete new task definition.
|
|
159
164
|
|
|
160
165
|
2. **Parse Information**:
|
|
161
166
|
- Extract **Task ID**.
|
|
@@ -5,27 +5,28 @@ description: Review requirement document for completeness and clarity
|
|
|
5
5
|
# /ps.1-rev-requirement
|
|
6
6
|
|
|
7
7
|
## Description
|
|
8
|
+
|
|
8
9
|
Review requirement document to detect gaps, ambiguities, contradictions, and suggest improvements.
|
|
9
10
|
|
|
10
11
|
## Input Requirements
|
|
11
12
|
|
|
12
13
|
**Input Type: File Path (Required)**
|
|
14
|
+
|
|
13
15
|
- Provide path to your requirement file
|
|
14
|
-
- **Filename MUST contain task-id** (e.g., `FEAT-001-requirement.md`, `FEAT-001.md`, `my-FEAT-001-
|
|
16
|
+
- **Filename MUST contain task-id** (e.g., `FEAT-001-requirement.md`, `FEAT-001.md`, `my-FEAT-001-req.md`)
|
|
15
17
|
- Task-id is needed to name output files
|
|
16
18
|
- Can be anywhere in filename, any format: `TASK-123`, `FEAT-001`, `BUG-456`
|
|
17
19
|
- **File can be located anywhere** (not limited to `/prompt-suite`)
|
|
18
20
|
- Examples:
|
|
19
21
|
- `~/Desktop/FEAT-001-requirement.md` ✅
|
|
20
|
-
- `/tmp/TASK-123-
|
|
22
|
+
- `/tmp/TASK-123-requirement.md` ✅
|
|
21
23
|
- `./my-FEAT-001-notes.txt` ✅
|
|
22
24
|
- `~/requirement.md` ❌ (no task-id)
|
|
23
25
|
- AI will automatically read file and extract task-id from filename
|
|
24
26
|
|
|
25
27
|
**Rule File** (optional but recommended):
|
|
26
|
-
- `ps.1-rev-requirement.rule.md` from `/prompt-suite/rules/` (for quality checklist)
|
|
27
|
-
|
|
28
28
|
|
|
29
|
+
- `ps.1-rev-requirement.rule.md` from `/prompt-suite/rules/` (for quality checklist)
|
|
29
30
|
|
|
30
31
|
## Input Validation
|
|
31
32
|
|
|
@@ -38,6 +39,7 @@ Review requirement document to detect gaps, ambiguities, contradictions, and sug
|
|
|
38
39
|
**If validation fails**: Stop immediately and output error message.
|
|
39
40
|
|
|
40
41
|
## Output Format
|
|
42
|
+
|
|
41
43
|
1. **Issues list** (grouped):
|
|
42
44
|
- Missing info
|
|
43
45
|
- Ambiguities
|
|
@@ -70,7 +72,7 @@ INSTRUCTIONS:
|
|
|
70
72
|
- Extract task-id from filename using pattern: `[A-Z]+-[0-9]+`
|
|
71
73
|
- Examples:
|
|
72
74
|
- `FEAT-001-requirement.md` → task-id: `FEAT-001`
|
|
73
|
-
- `/tmp/TASK-123-
|
|
75
|
+
- `/tmp/TASK-123-requirement.md` → task-id: `TASK-123`
|
|
74
76
|
- `my-BUG-456-notes.txt` → task-id: `BUG-456`
|
|
75
77
|
- If no task-id found in filename, ask user to provide it
|
|
76
78
|
|
|
@@ -95,6 +97,7 @@ RULES:
|
|
|
95
97
|
```
|
|
96
98
|
|
|
97
99
|
## Rules/Guidelines
|
|
100
|
+
|
|
98
101
|
1. ✅ **Completeness** - Are all sections fully filled?
|
|
99
102
|
2. ✅ **Ambiguity** - Any unclear parts that can be interpreted multiple ways?
|
|
100
103
|
3. ✅ **Contradictions** - Any conflicts between requirements?
|
|
@@ -104,6 +107,7 @@ RULES:
|
|
|
104
107
|
## Review Checklist
|
|
105
108
|
|
|
106
109
|
### Completeness Check
|
|
110
|
+
|
|
107
111
|
- [ ] Overview has Goal, Background, Stakeholders?
|
|
108
112
|
- [ ] Scope clearly defines In/Out scope?
|
|
109
113
|
- [ ] Has User Stories?
|
|
@@ -113,22 +117,26 @@ RULES:
|
|
|
113
117
|
- [ ] Has concrete Examples?
|
|
114
118
|
|
|
115
119
|
### Ambiguity Check
|
|
120
|
+
|
|
116
121
|
- [ ] Acceptance Criteria specific enough?
|
|
117
122
|
- [ ] Validation rules clear (not using "appropriate", "reasonable")?
|
|
118
123
|
- [ ] Error messages defined?
|
|
119
124
|
- [ ] UI/UX flows clear?
|
|
120
125
|
|
|
121
126
|
### Contradiction Check
|
|
127
|
+
|
|
122
128
|
- [ ] FRs don't conflict with each other?
|
|
123
129
|
- [ ] NFRs don't conflict with FRs?
|
|
124
130
|
- [ ] Business rules consistent?
|
|
125
131
|
|
|
126
132
|
### Testability Check
|
|
133
|
+
|
|
127
134
|
- [ ] Each AC can be verified?
|
|
128
135
|
- [ ] Expected behavior clear?
|
|
129
136
|
- [ ] Test data can be prepared?
|
|
130
137
|
|
|
131
138
|
### Edge Cases Check
|
|
139
|
+
|
|
132
140
|
- [ ] Empty/null inputs?
|
|
133
141
|
- [ ] Invalid formats?
|
|
134
142
|
- [ ] Permission denied?
|
|
@@ -141,61 +149,77 @@ RULES:
|
|
|
141
149
|
## Usage Example
|
|
142
150
|
|
|
143
151
|
```bash
|
|
144
|
-
/ps.1-rev-requirement /prompt-suite/
|
|
152
|
+
/ps.1-rev-requirement /prompt-suite/tasks/FEAT-001/FEAT-001-requirement.md
|
|
145
153
|
```
|
|
146
154
|
|
|
147
155
|
## Common Issues Found
|
|
148
156
|
|
|
149
157
|
### Missing Info
|
|
158
|
+
|
|
150
159
|
```markdown
|
|
151
160
|
# Issue
|
|
161
|
+
|
|
152
162
|
FR-1 doesn't specify session timeout duration
|
|
153
163
|
|
|
154
164
|
# Fix
|
|
165
|
+
|
|
155
166
|
→ Add to Open questions: "Q: What is the session timeout? (suggest: 2h)"
|
|
156
167
|
```
|
|
157
168
|
|
|
158
169
|
### Ambiguity
|
|
170
|
+
|
|
159
171
|
```markdown
|
|
160
172
|
# Issue
|
|
173
|
+
|
|
161
174
|
AC: "User is notified when error occurs"
|
|
162
175
|
→ How to notify? Toast? Email? SMS?
|
|
163
176
|
|
|
164
177
|
# Fix
|
|
178
|
+
|
|
165
179
|
AC: "User sees red error message at top of form"
|
|
166
180
|
```
|
|
167
181
|
|
|
168
182
|
### Contradiction
|
|
183
|
+
|
|
169
184
|
```markdown
|
|
170
185
|
# Issue
|
|
186
|
+
|
|
171
187
|
FR-1: "User must verify email before login"
|
|
172
188
|
FR-2: "User can login immediately after register"
|
|
173
189
|
→ Contradiction!
|
|
174
190
|
|
|
175
191
|
# Fix
|
|
192
|
+
|
|
176
193
|
Clarify: User can login but has limited features until email verified
|
|
177
194
|
```
|
|
178
195
|
|
|
179
196
|
### Unclear AC
|
|
197
|
+
|
|
180
198
|
```markdown
|
|
181
199
|
# Issue
|
|
200
|
+
|
|
182
201
|
AC: "Login works correctly"
|
|
183
202
|
→ Too vague!
|
|
184
203
|
|
|
185
204
|
# Fix
|
|
205
|
+
|
|
186
206
|
AC-1: User enters correct credentials → redirect to /dashboard
|
|
187
207
|
AC-2: User enters wrong password → show error, stay on login page
|
|
188
208
|
AC-3: Session token stored in cookie with httpOnly=true, secure=true
|
|
189
209
|
```
|
|
190
210
|
|
|
191
211
|
### Missing Edge Cases
|
|
212
|
+
|
|
192
213
|
```markdown
|
|
193
214
|
# Issue
|
|
215
|
+
|
|
194
216
|
FR-1: Login
|
|
195
217
|
→ No error cases
|
|
196
218
|
|
|
197
219
|
# Fix
|
|
220
|
+
|
|
198
221
|
Error/Edge cases:
|
|
222
|
+
|
|
199
223
|
- Email doesn't exist → show "Invalid credentials"
|
|
200
224
|
- Wrong password → show "Invalid credentials"
|
|
201
225
|
- Account locked → show "Account locked. Try again in X minutes"
|
|
@@ -203,4 +227,5 @@ Error/Edge cases:
|
|
|
203
227
|
```
|
|
204
228
|
|
|
205
229
|
## Next Steps
|
|
230
|
+
|
|
206
231
|
After clarifying → run `/ps.2-gen-design` to create technical design
|