prompt-suite 1.0.3 → 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 +101 -37
- 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:
|
|
@@ -32,9 +63,17 @@ The installer will:
|
|
|
32
63
|
|
|
33
64
|
## 🔄 Updating / Upgrading
|
|
34
65
|
|
|
35
|
-
|
|
66
|
+
To update `prompt-suite` to the latest version:
|
|
67
|
+
|
|
68
|
+
### 1. Update the package
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npm install prompt-suite@latest -D
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 2. Update resources and prompts
|
|
36
75
|
|
|
37
|
-
|
|
76
|
+
#### Safe Mode (Default):
|
|
38
77
|
|
|
39
78
|
Preserves your customizations by skipping modified files:
|
|
40
79
|
|
|
@@ -42,7 +81,7 @@ Preserves your customizations by skipping modified files:
|
|
|
42
81
|
npx prompt-suite init
|
|
43
82
|
```
|
|
44
83
|
|
|
45
|
-
|
|
84
|
+
#### Force Overwrite:
|
|
46
85
|
|
|
47
86
|
Resets everything to latest defaults (⚠️ overwrites your changes):
|
|
48
87
|
|
|
@@ -50,7 +89,7 @@ Resets everything to latest defaults (⚠️ overwrites your changes):
|
|
|
50
89
|
npx prompt-suite init --force
|
|
51
90
|
```
|
|
52
91
|
|
|
53
|
-
|
|
92
|
+
#### Conflict Resolution:
|
|
54
93
|
|
|
55
94
|
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.
|
|
56
95
|
|
|
@@ -95,7 +134,7 @@ Select your IDE when prompted. Prompts will be automatically installed.
|
|
|
95
134
|
|
|
96
135
|
```bash
|
|
97
136
|
# Copy template
|
|
98
|
-
cp prompt-suite/templates/gen-rule-template.
|
|
137
|
+
cp prompt-suite/tasks/templates/gen-rule-template.md my-rules.txt
|
|
99
138
|
|
|
100
139
|
# Edit my-rules.txt with your stack info
|
|
101
140
|
# Then generate rules:
|
|
@@ -106,20 +145,20 @@ cp prompt-suite/templates/gen-rule-template.txt my-rules.txt
|
|
|
106
145
|
|
|
107
146
|
```bash
|
|
108
147
|
# Copy template
|
|
109
|
-
cp prompt-suite/templates/gen-requirement-template.
|
|
148
|
+
cp prompt-suite/tasks/templates/gen-requirement-template.md FEAT-001-request.txt
|
|
110
149
|
|
|
111
150
|
# Edit FEAT-001-request.txt with your feature request
|
|
112
151
|
# Then generate requirement:
|
|
113
152
|
/ps.1-gen-requirement FEAT-001-request.txt
|
|
114
153
|
|
|
115
154
|
# Generate design:
|
|
116
|
-
/ps.2-gen-design prompt-suite/
|
|
155
|
+
/ps.2-gen-design prompt-suite/tasks/FEAT-001/FEAT-001-requirement.md
|
|
117
156
|
|
|
118
157
|
# Generate code:
|
|
119
|
-
/ps.3-gen-code prompt-suite/
|
|
158
|
+
/ps.3-gen-code prompt-suite/tasks/FEAT-001/FEAT-001-design.md
|
|
120
159
|
|
|
121
160
|
# Apply the patch:
|
|
122
|
-
git apply prompt-suite/
|
|
161
|
+
git apply prompt-suite/tasks/FEAT-001/FEAT-001-feature.patch
|
|
123
162
|
```
|
|
124
163
|
|
|
125
164
|
---
|
|
@@ -130,8 +169,9 @@ git apply prompt-suite/specs/FEAT-001/FEAT-001-feature.patch
|
|
|
130
169
|
|
|
131
170
|
- `rules/` - Generated coding rules (from Step 0)
|
|
132
171
|
- `scripts/` - Setup scripts for manual IDE configuration
|
|
133
|
-
- `
|
|
134
|
-
- `
|
|
172
|
+
- `tasks/` - Task artifacts and templates
|
|
173
|
+
- `templates/` - Input templates for commands
|
|
174
|
+
- `{TASK-ID}/` - Generated task artifacts (requirements, designs, patches)
|
|
135
175
|
- `README.md` - This documentation
|
|
136
176
|
|
|
137
177
|
### In your IDE:
|
|
@@ -223,27 +263,51 @@ All commands require **file path input** (not direct text):
|
|
|
223
263
|
|
|
224
264
|
### Task ID Requirement
|
|
225
265
|
|
|
226
|
-
Filenames **must contain a Task ID** (e.g., `FEAT-001`, `
|
|
266
|
+
Filenames **must contain a Task ID** (e.g., `FEAT-001`, `BUG-123`):
|
|
227
267
|
|
|
228
268
|
```bash
|
|
229
269
|
# ✅ Valid filenames
|
|
230
270
|
/ps.1-gen-requirement customer-request-FEAT-001.txt
|
|
231
|
-
/ps.2-gen-design
|
|
271
|
+
/ps.2-gen-design BUG-123-bugfix.md
|
|
232
272
|
|
|
233
273
|
# ❌ Invalid - no Task ID
|
|
234
274
|
/ps.1-gen-requirement request.txt
|
|
235
275
|
```
|
|
236
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
|
+
|
|
237
301
|
### Applying Patches
|
|
238
302
|
|
|
239
303
|
Steps 3 and 5 generate patch files that you must manually apply:
|
|
240
304
|
|
|
241
305
|
```bash
|
|
242
306
|
# Check if patch can be applied
|
|
243
|
-
git apply --check prompt-suite/
|
|
307
|
+
git apply --check prompt-suite/tasks/FEAT-001/FEAT-001-feature.patch
|
|
244
308
|
|
|
245
309
|
# Apply the patch
|
|
246
|
-
git apply prompt-suite/
|
|
310
|
+
git apply prompt-suite/tasks/FEAT-001/FEAT-001-feature.patch
|
|
247
311
|
|
|
248
312
|
# Review and commit
|
|
249
313
|
git status
|
|
@@ -306,15 +370,15 @@ project/
|
|
|
306
370
|
│ ├── scripts/ # Manual setup scripts
|
|
307
371
|
│ │ ├── setup-ps-chat-vscode.sh
|
|
308
372
|
│ │ └── setup-ps-chat-antigravity.sh
|
|
309
|
-
│ ├──
|
|
310
|
-
│ │ ├──
|
|
311
|
-
│ │
|
|
312
|
-
│
|
|
313
|
-
│ │ └── 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
|
|
314
378
|
│ │ ├── FEAT-001-requirement.md
|
|
315
379
|
│ │ ├── FEAT-001-design.md
|
|
316
380
|
│ │ ├── FEAT-001-test.md
|
|
317
|
-
│ │ ├── FEAT-001-
|
|
381
|
+
│ │ ├── FEAT-001-code.patch
|
|
318
382
|
│ │ └── FEAT-001-test.patch
|
|
319
383
|
│ └── README.md
|
|
320
384
|
│
|
|
@@ -354,7 +418,7 @@ bash prompt-suite/scripts/setup-ps-chat-antigravity.sh
|
|
|
354
418
|
#### Step 0: Generate Rules (One-time)
|
|
355
419
|
|
|
356
420
|
```bash
|
|
357
|
-
cp prompt-suite/templates/gen-rule-template.
|
|
421
|
+
cp prompt-suite/tasks/templates/gen-rule-template.md my-rules.txt
|
|
358
422
|
# Edit: Step: all, Stack: Laravel + Vue.js, Architecture: Clean Architecture
|
|
359
423
|
/ps.0-gen-rules my-rules.txt
|
|
360
424
|
```
|
|
@@ -362,27 +426,27 @@ cp prompt-suite/templates/gen-rule-template.txt my-rules.txt
|
|
|
362
426
|
#### Step 1: Generate Requirement
|
|
363
427
|
|
|
364
428
|
```bash
|
|
365
|
-
cp prompt-suite/templates/gen-requirement-template.
|
|
429
|
+
cp prompt-suite/tasks/templates/gen-requirement-template.md FEAT-001-request.txt
|
|
366
430
|
# Edit: Task ID: FEAT-001, Raw Request: User login with email/password...
|
|
367
431
|
/ps.1-gen-requirement FEAT-001-request.txt
|
|
368
|
-
/ps.1-rev-requirement prompt-suite/
|
|
432
|
+
/ps.1-rev-requirement prompt-suite/tasks/FEAT-001/FEAT-001-requirement.md
|
|
369
433
|
```
|
|
370
434
|
|
|
371
435
|
#### Step 2: Generate Design
|
|
372
436
|
|
|
373
437
|
```bash
|
|
374
|
-
/ps.2-gen-design prompt-suite/
|
|
375
|
-
/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
|
|
376
440
|
```
|
|
377
441
|
|
|
378
442
|
#### Step 3: Generate Code
|
|
379
443
|
|
|
380
444
|
```bash
|
|
381
|
-
/ps.3-gen-code prompt-suite/
|
|
445
|
+
/ps.3-gen-code prompt-suite/tasks/FEAT-001/FEAT-001-design.md
|
|
382
446
|
|
|
383
447
|
# Apply patch
|
|
384
|
-
git apply --check prompt-suite/
|
|
385
|
-
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
|
|
386
450
|
git add .
|
|
387
451
|
git commit -m "feat: user login with rate limiting (FEAT-001)"
|
|
388
452
|
```
|
|
@@ -390,18 +454,18 @@ git commit -m "feat: user login with rate limiting (FEAT-001)"
|
|
|
390
454
|
#### Step 4: Generate Test Plan
|
|
391
455
|
|
|
392
456
|
```bash
|
|
393
|
-
/ps.4-gen-test-plan prompt-suite/
|
|
394
|
-
/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
|
|
395
459
|
```
|
|
396
460
|
|
|
397
461
|
#### Step 5: Generate Test Code
|
|
398
462
|
|
|
399
463
|
```bash
|
|
400
|
-
/ps.5-gen-test-code prompt-suite/
|
|
464
|
+
/ps.5-gen-test-code prompt-suite/tasks/FEAT-001/FEAT-001-test.md
|
|
401
465
|
|
|
402
466
|
# Apply test patch
|
|
403
|
-
git apply --check prompt-suite/
|
|
404
|
-
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
|
|
405
469
|
./vendor/bin/phpunit
|
|
406
470
|
git add .
|
|
407
471
|
git commit -m "test: add tests for login feature (FEAT-001)"
|
|
@@ -411,9 +475,9 @@ git commit -m "test: add tests for login feature (FEAT-001)"
|
|
|
411
475
|
|
|
412
476
|
```bash
|
|
413
477
|
/ps.6-analyze \
|
|
414
|
-
prompt-suite/
|
|
415
|
-
prompt-suite/
|
|
416
|
-
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
|
|
417
481
|
```
|
|
418
482
|
|
|
419
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**.
|