prompt-suite 1.0.4 → 1.0.6
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/bin/cli.js +21 -21
- 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/scripts/setup-ps-chat-antigravity.sh +1 -1
- package/scripts/setup-ps-chat-vscode.sh +1 -1
- 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/bin/cli.js
CHANGED
|
@@ -16,8 +16,8 @@ if (command !== 'init' && command !== 'publish') {
|
|
|
16
16
|
const sourceRoot = path.join(__dirname, '..');
|
|
17
17
|
const targetRoot = path.join(process.cwd(), 'prompt-suite');
|
|
18
18
|
|
|
19
|
-
// Exclude '
|
|
20
|
-
const itemsToCopy = ['rules', 'scripts', '
|
|
19
|
+
// Exclude 'prompts' - will be copied directly to IDE prompts folder
|
|
20
|
+
const itemsToCopy = ['rules', 'scripts', 'tasks', 'README.md'];
|
|
21
21
|
|
|
22
22
|
console.log(`\n🚀 Initializing Prompt Suite...`);
|
|
23
23
|
console.log(`Source: ${sourceRoot}`);
|
|
@@ -110,7 +110,7 @@ async function copyDir(src, dest) {
|
|
|
110
110
|
console.log("Defaulting to 'skip' mode. You can run setup scripts manually later.");
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
// Copy standard items (rules, scripts,
|
|
113
|
+
// Copy standard items (rules, scripts, tasks, README.md)
|
|
114
114
|
console.log(`\n📦 Copying standard resources...`);
|
|
115
115
|
for (const item of itemsToCopy) {
|
|
116
116
|
const srcPath = path.join(sourceRoot, item);
|
|
@@ -131,46 +131,46 @@ async function copyDir(src, dest) {
|
|
|
131
131
|
|
|
132
132
|
console.log(`\n✅ Standard resources copied successfully!`);
|
|
133
133
|
|
|
134
|
-
// Copy
|
|
135
|
-
const
|
|
134
|
+
// Copy prompts directly to IDE prompts folder
|
|
135
|
+
const promptsSourceDir = path.join(sourceRoot, 'prompts');
|
|
136
136
|
|
|
137
|
-
if (fs.existsSync(
|
|
138
|
-
let
|
|
137
|
+
if (fs.existsSync(promptsSourceDir)) {
|
|
138
|
+
let promptsDestDir;
|
|
139
139
|
let ideDisplayName;
|
|
140
140
|
|
|
141
141
|
if (selectedIDE === 'vscode') {
|
|
142
|
-
|
|
142
|
+
promptsDestDir = path.join(process.cwd(), '.github', 'prompts');
|
|
143
143
|
ideDisplayName = 'VSCode/Cursor';
|
|
144
144
|
} else if (selectedIDE === 'antigravity') {
|
|
145
|
-
|
|
145
|
+
promptsDestDir = path.join(process.cwd(), '.agent', 'workprompts');
|
|
146
146
|
ideDisplayName = 'Antigravity';
|
|
147
147
|
} else {
|
|
148
|
-
// Skip mode - copy to prompt-suite/
|
|
149
|
-
|
|
150
|
-
ideDisplayName = 'Manual (prompt-suite/
|
|
148
|
+
// Skip mode - copy to prompt-suite/prompts for manual setup
|
|
149
|
+
promptsDestDir = path.join(targetRoot, 'prompts');
|
|
150
|
+
ideDisplayName = 'Manual (prompt-suite/prompts)';
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
console.log(`\n📝 Copying prompt
|
|
153
|
+
console.log(`\n📝 Copying prompt prompts to ${ideDisplayName}...`);
|
|
154
154
|
|
|
155
155
|
// Create destination directory
|
|
156
|
-
if (!fs.existsSync(
|
|
157
|
-
fs.mkdirSync(
|
|
156
|
+
if (!fs.existsSync(promptsDestDir)) {
|
|
157
|
+
fs.mkdirSync(promptsDestDir, { recursive: true });
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
// Copy all .md files from
|
|
161
|
-
const flowFiles = fs.readdirSync(
|
|
160
|
+
// Copy all .md files from prompts
|
|
161
|
+
const flowFiles = fs.readdirSync(promptsSourceDir).filter(f => f.endsWith('.md'));
|
|
162
162
|
let flowCount = 0;
|
|
163
163
|
|
|
164
164
|
for (const flowFile of flowFiles) {
|
|
165
|
-
const srcPath = path.join(
|
|
166
|
-
const destPath = path.join(
|
|
165
|
+
const srcPath = path.join(promptsSourceDir, flowFile);
|
|
166
|
+
const destPath = path.join(promptsDestDir, flowFile);
|
|
167
167
|
const stats = fs.statSync(srcPath);
|
|
168
168
|
|
|
169
169
|
await copyFile(srcPath, destPath, stats.mode);
|
|
170
170
|
flowCount++;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
console.log(`\n✅ Copied ${flowCount} prompt
|
|
173
|
+
console.log(`\n✅ Copied ${flowCount} prompt prompts to ${ideDisplayName}!`);
|
|
174
174
|
|
|
175
175
|
// For VSCode, also update settings.json
|
|
176
176
|
if (selectedIDE === 'vscode') {
|
|
@@ -216,7 +216,7 @@ async function copyDir(src, dest) {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
} else {
|
|
219
|
-
console.warn(`\n⚠️ Flows directory not found at ${
|
|
219
|
+
console.warn(`\n⚠️ Flows directory not found at ${promptsSourceDir}`);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
// Final messages
|
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**.
|