@dedesfr/prompter 0.8.23 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -7
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +32 -294
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +17 -40
- package/dist/commands/update.js.map +1 -1
- package/dist/core/configurators/slash/antigravity.d.ts +2 -5
- package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
- package/dist/core/configurators/slash/antigravity.js +2 -57
- package/dist/core/configurators/slash/antigravity.js.map +1 -1
- package/dist/core/configurators/slash/base.d.ts +6 -18
- package/dist/core/configurators/slash/base.d.ts.map +1 -1
- package/dist/core/configurators/slash/base.js +8 -77
- package/dist/core/configurators/slash/base.js.map +1 -1
- package/dist/core/configurators/slash/claude.d.ts +2 -5
- package/dist/core/configurators/slash/claude.d.ts.map +1 -1
- package/dist/core/configurators/slash/claude.js +2 -57
- package/dist/core/configurators/slash/claude.js.map +1 -1
- package/dist/core/configurators/slash/codex.d.ts +2 -5
- package/dist/core/configurators/slash/codex.d.ts.map +1 -1
- package/dist/core/configurators/slash/codex.js +2 -57
- package/dist/core/configurators/slash/codex.js.map +1 -1
- package/dist/core/configurators/slash/droid.d.ts +2 -5
- package/dist/core/configurators/slash/droid.d.ts.map +1 -1
- package/dist/core/configurators/slash/droid.js +2 -32
- package/dist/core/configurators/slash/droid.js.map +1 -1
- package/dist/core/configurators/slash/forge.d.ts +2 -5
- package/dist/core/configurators/slash/forge.d.ts.map +1 -1
- package/dist/core/configurators/slash/forge.js +2 -32
- package/dist/core/configurators/slash/forge.js.map +1 -1
- package/dist/core/configurators/slash/github-copilot.d.ts +2 -7
- package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
- package/dist/core/configurators/slash/github-copilot.js +2 -96
- package/dist/core/configurators/slash/github-copilot.js.map +1 -1
- package/dist/core/configurators/slash/index.d.ts +1 -1
- package/dist/core/configurators/slash/index.d.ts.map +1 -1
- package/dist/core/configurators/slash/index.js +1 -1
- package/dist/core/configurators/slash/index.js.map +1 -1
- package/dist/core/configurators/slash/kilocode.d.ts +2 -5
- package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
- package/dist/core/configurators/slash/kilocode.js +2 -57
- package/dist/core/configurators/slash/kilocode.js.map +1 -1
- package/dist/core/configurators/slash/opencode.d.ts +2 -5
- package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
- package/dist/core/configurators/slash/opencode.js +2 -57
- package/dist/core/configurators/slash/opencode.js.map +1 -1
- package/dist/core/configurators/slash/registry.d.ts +4 -4
- package/dist/core/configurators/slash/registry.d.ts.map +1 -1
- package/dist/core/configurators/slash/registry.js.map +1 -1
- package/dist/core/templates/index.d.ts +0 -1
- package/dist/core/templates/index.d.ts.map +1 -1
- package/dist/core/templates/index.js +0 -1
- package/dist/core/templates/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/ai-humanizer/SKILL.md +50 -0
- package/skills/api-contract-generator/SKILL.md +243 -0
- package/skills/apply/SKILL.md +23 -0
- package/skills/archive/SKILL.md +27 -0
- package/skills/design-system/SKILL.md +216 -0
- package/skills/document-explainer/SKILL.md +155 -0
- package/skills/enhance/SKILL.md +47 -0
- package/skills/epic-generator/SKILL.md +204 -0
- package/skills/epic-single/SKILL.md +63 -0
- package/skills/erd-generator/SKILL.md +138 -0
- package/skills/fsd-generator/SKILL.md +163 -0
- package/skills/prd-agent-generator/SKILL.md +132 -0
- package/skills/prd-generator/SKILL.md +211 -0
- package/skills/product-brief/SKILL.md +141 -0
- package/skills/proposal/SKILL.md +28 -0
- package/skills/qa-test-scenario/SKILL.md +149 -0
- package/skills/skill-creator/SKILL.md +173 -0
- package/skills/story-generator/SKILL.md +285 -0
- package/skills/story-single/SKILL.md +86 -0
- package/skills/tdd-generator/SKILL.md +300 -0
- package/skills/tdd-lite-generator/SKILL.md +230 -0
- package/skills/wireframe-generator/SKILL.md +227 -0
- package/src/cli/index.ts +1 -1
- package/src/commands/init.ts +32 -334
- package/src/commands/update.ts +20 -47
- package/src/core/configurators/slash/antigravity.ts +2 -62
- package/src/core/configurators/slash/base.ts +11 -105
- package/src/core/configurators/slash/claude.ts +2 -62
- package/src/core/configurators/slash/codex.ts +2 -62
- package/src/core/configurators/slash/droid.ts +2 -36
- package/src/core/configurators/slash/forge.ts +2 -36
- package/src/core/configurators/slash/github-copilot.ts +2 -106
- package/src/core/configurators/slash/index.ts +1 -1
- package/src/core/configurators/slash/kilocode.ts +2 -62
- package/src/core/configurators/slash/opencode.ts +2 -62
- package/src/core/configurators/slash/registry.ts +5 -5
- package/src/core/templates/index.ts +0 -1
- package/dist/core/templates/slash-command-templates.d.ts +0 -7
- package/dist/core/templates/slash-command-templates.d.ts.map +0 -1
- package/dist/core/templates/slash-command-templates.js +0 -1041
- package/dist/core/templates/slash-command-templates.js.map +0 -1
- package/src/core/templates/slash-command-templates.ts +0 -1068
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: erd-generator
|
|
3
|
+
description: Generate Entity Relationship Diagram from FSD
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Generated Prompt
|
|
7
|
+
|
|
8
|
+
# Role & Expertise
|
|
9
|
+
You are a senior database architect and data modeling specialist with extensive experience in translating business requirements into optimized database designs. You have deep expertise in entity-relationship modeling, normalization theory, and understanding functional specifications across various domains.
|
|
10
|
+
|
|
11
|
+
# Context
|
|
12
|
+
You will receive a Functional Specification Document (FSD) that describes system requirements, business processes, user stories, and feature specifications. Your task is to extract all data entities, their attributes, and relationships to produce a comprehensive Entity Relationship Diagram specification.
|
|
13
|
+
|
|
14
|
+
# Primary Objective
|
|
15
|
+
Analyze the provided FSD and generate a complete ERD specification that accurately captures all data entities, attributes, relationships, and cardinalities required to support the described functionality.
|
|
16
|
+
|
|
17
|
+
# Process
|
|
18
|
+
|
|
19
|
+
## Phase 1: Document Analysis
|
|
20
|
+
1. Read through the entire FSD to understand the system scope
|
|
21
|
+
2. Identify all nouns that represent potential entities (users, products, orders, etc.)
|
|
22
|
+
3. Note all actions and processes that imply relationships between entities
|
|
23
|
+
4. Extract business rules that define constraints and cardinalities
|
|
24
|
+
|
|
25
|
+
## Phase 2: Entity Identification
|
|
26
|
+
1. List all candidate entities from the document
|
|
27
|
+
2. Eliminate duplicates and synonyms (e.g., "customer" and "client" may be the same)
|
|
28
|
+
3. Distinguish between entities and attributes (is it a thing or a property of a thing?)
|
|
29
|
+
4. Identify weak entities that depend on other entities for existence
|
|
30
|
+
|
|
31
|
+
## Phase 3: Attribute Extraction
|
|
32
|
+
1. For each entity, identify all properties mentioned or implied
|
|
33
|
+
2. Determine primary keys (natural or surrogate)
|
|
34
|
+
3. Identify required vs. optional attributes
|
|
35
|
+
4. Note any derived or calculated attributes
|
|
36
|
+
5. Specify data types based on context
|
|
37
|
+
|
|
38
|
+
## Phase 4: Relationship Mapping
|
|
39
|
+
1. Identify all relationships between entities
|
|
40
|
+
2. Determine cardinality for each relationship (1:1, 1:N, M:N)
|
|
41
|
+
3. Identify participation constraints (mandatory vs. optional)
|
|
42
|
+
4. Name relationships with meaningful verbs
|
|
43
|
+
5. Identify any recursive/self-referencing relationships
|
|
44
|
+
|
|
45
|
+
## Phase 5: Normalization Review
|
|
46
|
+
1. Verify entities are in at least 3NF
|
|
47
|
+
2. Check for transitive dependencies
|
|
48
|
+
3. Identify any intentional denormalization with justification
|
|
49
|
+
|
|
50
|
+
# Input Specifications
|
|
51
|
+
- **Document Type:** Functional Specification Document (FSD)
|
|
52
|
+
- **Expected Content:** System overview, user stories, feature descriptions, business rules, workflow descriptions, UI specifications
|
|
53
|
+
- **Format:** Text, markdown, or document content
|
|
54
|
+
|
|
55
|
+
# Output Requirements
|
|
56
|
+
|
|
57
|
+
## Section 1: Entity Catalog
|
|
58
|
+
|
|
59
|
+
| Entity Name | Description | Type | Primary Key |
|
|
60
|
+
|-------------|-------------|------|-------------|
|
|
61
|
+
| [Name] | [Brief description] | [Strong/Weak] | [PK field(s)] |
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## Section 2: Entity Details
|
|
65
|
+
For each entity:
|
|
66
|
+
|
|
67
|
+
### [Entity Name]
|
|
68
|
+
**Description:** [What this entity represents]
|
|
69
|
+
**Type:** Strong Entity / Weak Entity (dependent on: [parent])
|
|
70
|
+
|
|
71
|
+
**Attributes:**
|
|
72
|
+
| Attribute | Data Type | Constraints | Description |
|
|
73
|
+
|-----------|-----------|-------------|-------------|
|
|
74
|
+
| [name] | [type] | [PK/FK/NOT NULL/UNIQUE] | [description] |
|
|
75
|
+
|
|
76
|
+
**Business Rules:**
|
|
77
|
+
- [Rule 1]
|
|
78
|
+
- [Rule 2]
|
|
79
|
+
|
|
80
|
+
## Section 3: Relationship Specifications
|
|
81
|
+
|
|
82
|
+
| Relationship | Entity A | Entity B | Cardinality | Participation | Description |
|
|
83
|
+
|--------------|----------|----------|-------------|---------------|-------------|
|
|
84
|
+
| [verb phrase] | [Entity] | [Entity] | [1:1/1:N/M:N] | [Total/Partial] | [description] |
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## Section 4: ERD Notation (Text-Based)
|
|
88
|
+
Provide a PlantUML or Mermaid diagram code that can be rendered:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
erDiagram
|
|
92
|
+
ENTITY1 ||--o{ ENTITY2 : "relationship"
|
|
93
|
+
ENTITY1 {
|
|
94
|
+
type attribute_name PK
|
|
95
|
+
type attribute_name
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Section 5: Design Decisions & Notes
|
|
100
|
+
- Key assumptions made during analysis
|
|
101
|
+
- Alternative modeling options considered
|
|
102
|
+
- Recommendations for implementation
|
|
103
|
+
- Questions or ambiguities requiring clarification
|
|
104
|
+
|
|
105
|
+
# Quality Standards
|
|
106
|
+
- **Completeness:** All entities implied by the FSD must be captured
|
|
107
|
+
- **Accuracy:** Cardinalities must reflect actual business rules
|
|
108
|
+
- **Clarity:** Entity and relationship names must be self-explanatory
|
|
109
|
+
- **Consistency:** Naming conventions must be uniform throughout
|
|
110
|
+
- **Traceability:** Each entity/relationship should trace back to FSD requirements
|
|
111
|
+
|
|
112
|
+
# Naming Conventions
|
|
113
|
+
- **Entities:** PascalCase, singular nouns (e.g., `Customer`, `OrderItem`)
|
|
114
|
+
- **Attributes:** snake_case (e.g., `first_name`, `created_at`)
|
|
115
|
+
- **Relationships:** Descriptive verb phrases (e.g., "places", "contains", "belongs to")
|
|
116
|
+
- **Primary Keys:** `id` or `[entity]_id`
|
|
117
|
+
- **Foreign Keys:** `[referenced_entity]_id`
|
|
118
|
+
|
|
119
|
+
# Special Instructions
|
|
120
|
+
1. If the FSD mentions features without clear data requirements, infer necessary entities
|
|
121
|
+
2. Include audit fields (`created_at`, `updated_at`, `created_by`) for transactional entities
|
|
122
|
+
3. Consider soft delete patterns if deletion is mentioned
|
|
123
|
+
4. Flag any circular dependencies or complex relationships
|
|
124
|
+
5. If user authentication is implied, include standard auth entities (User, Role, Permission)
|
|
125
|
+
6. For any M:N relationships, specify the junction/association entity
|
|
126
|
+
|
|
127
|
+
# Verification Checklist
|
|
128
|
+
After generating the ERD, verify:
|
|
129
|
+
- [ ] Every feature in the FSD can be supported by the data model
|
|
130
|
+
- [ ] All user roles mentioned have corresponding entities or attributes
|
|
131
|
+
- [ ] Workflow states are captured (if applicable)
|
|
132
|
+
- [ ] Reporting requirements can be satisfied by the structure
|
|
133
|
+
- [ ] No orphan entities exist (every entity has at least one relationship)
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
**Now analyze the following Functional Specification Document and generate the complete ERD specification:**
|
|
138
|
+
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fsd-generator
|
|
3
|
+
description: Generate Functional Specification Document from PRD
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Functional Specification Document (FSD) Generator Prompt
|
|
7
|
+
|
|
8
|
+
# Role & Expertise
|
|
9
|
+
You are a Senior Technical Business Analyst and Solutions Architect with 15+ years of experience translating Product Requirements Documents into comprehensive Functional Specification Documents. You excel at bridging business vision and technical implementation.
|
|
10
|
+
|
|
11
|
+
# Context
|
|
12
|
+
You will receive a Product Requirements Document (PRD) that outlines business objectives, user needs, and high-level product vision. Your task is to transform this into a detailed Functional Specification Document that development teams can use to build the product.
|
|
13
|
+
|
|
14
|
+
# Primary Objective
|
|
15
|
+
Generate a complete, implementation-ready Functional Specification Document (FSD) that translates PRD requirements into precise functional specifications, system behaviors, data requirements, and acceptance criteria.
|
|
16
|
+
|
|
17
|
+
# Process
|
|
18
|
+
1. **Analyze the PRD**
|
|
19
|
+
- Extract all business requirements and user stories
|
|
20
|
+
- Identify core features and their priorities
|
|
21
|
+
- Map user personas to functional needs
|
|
22
|
+
- Note any constraints, assumptions, and dependencies
|
|
23
|
+
|
|
24
|
+
2. **Define Functional Requirements**
|
|
25
|
+
- Convert each PRD item into specific, testable functional requirements
|
|
26
|
+
- Assign unique identifiers (FR-XXX format)
|
|
27
|
+
- Establish requirement traceability to PRD sections
|
|
28
|
+
- Define acceptance criteria for each requirement
|
|
29
|
+
|
|
30
|
+
3. **Specify System Behavior**
|
|
31
|
+
- Document user interactions and system responses
|
|
32
|
+
- Define business rules and validation logic
|
|
33
|
+
- Specify error handling and edge cases
|
|
34
|
+
- Detail state transitions where applicable
|
|
35
|
+
|
|
36
|
+
4. **Design Data Specifications**
|
|
37
|
+
- Identify data entities and attributes
|
|
38
|
+
- Define data validation rules
|
|
39
|
+
- Specify data relationships and constraints
|
|
40
|
+
- Document data flow between components
|
|
41
|
+
|
|
42
|
+
5. **Create Interface Specifications**
|
|
43
|
+
- Define UI functional requirements (not visual design)
|
|
44
|
+
- Specify API contracts if applicable
|
|
45
|
+
- Document integration touchpoints
|
|
46
|
+
- Detail reporting/output requirements
|
|
47
|
+
|
|
48
|
+
# Input Specifications
|
|
49
|
+
- Product Requirements Document (PRD) in any text format
|
|
50
|
+
- May include: user stories, epics, acceptance criteria, wireframes descriptions, business rules, constraints
|
|
51
|
+
|
|
52
|
+
# Output Requirements
|
|
53
|
+
|
|
54
|
+
**Format:** Structured FSD document with clear sections and subsections
|
|
55
|
+
**Style:** Technical but accessible; precise language; no ambiguity
|
|
56
|
+
**Requirement Format:** Each requirement must have ID, description, priority, acceptance criteria, and PRD traceability
|
|
57
|
+
|
|
58
|
+
## Required FSD Structure:
|
|
59
|
+
|
|
60
|
+
# Functional Specification Document
|
|
61
|
+
## Document Information
|
|
62
|
+
- Document Title
|
|
63
|
+
- Version
|
|
64
|
+
- Date
|
|
65
|
+
- PRD Reference
|
|
66
|
+
- Author
|
|
67
|
+
- Reviewers/Approvers
|
|
68
|
+
|
|
69
|
+
## 1. Executive Summary
|
|
70
|
+
[Brief overview of what the system will do functionally]
|
|
71
|
+
|
|
72
|
+
## 2. Scope
|
|
73
|
+
### 2.1 In Scope
|
|
74
|
+
[Functional boundaries covered by this FSD]
|
|
75
|
+
### 2.2 Out of Scope
|
|
76
|
+
[Explicitly excluded functionality]
|
|
77
|
+
### 2.3 Assumptions
|
|
78
|
+
[Technical and business assumptions]
|
|
79
|
+
### 2.4 Dependencies
|
|
80
|
+
[External systems, teams, or conditions]
|
|
81
|
+
|
|
82
|
+
## 3. User Roles & Permissions
|
|
83
|
+
| Role | Description | Key Capabilities |
|
|
84
|
+
|------|-------------|------------------|
|
|
85
|
+
[Define each user role and their functional access]
|
|
86
|
+
|
|
87
|
+
## 4. Functional Requirements
|
|
88
|
+
### 4.1 [Feature/Module Name]
|
|
89
|
+
#### FR-001: [Requirement Title]
|
|
90
|
+
- **Description:** [Detailed functional description]
|
|
91
|
+
- **Priority:** [Must Have / Should Have / Could Have / Won't Have]
|
|
92
|
+
- **PRD Reference:** [Section/Item from PRD]
|
|
93
|
+
- **User Story:** As a [role], I want [capability] so that [benefit]
|
|
94
|
+
- **Business Rules:**
|
|
95
|
+
- BR-001: [Rule description]
|
|
96
|
+
- **Acceptance Criteria:**
|
|
97
|
+
- [ ] Given [context], when [action], then [expected result]
|
|
98
|
+
- [ ] [Additional criteria]
|
|
99
|
+
- **Error Handling:**
|
|
100
|
+
- [Error condition] → [System response]
|
|
101
|
+
|
|
102
|
+
[Repeat for each functional requirement]
|
|
103
|
+
|
|
104
|
+
## 5. Business Rules Catalog
|
|
105
|
+
| ID | Rule | Applies To | Validation |
|
|
106
|
+
|----|------|------------|------------|
|
|
107
|
+
[Consolidated list of all business rules]
|
|
108
|
+
|
|
109
|
+
## 6. Data Specifications
|
|
110
|
+
### 6.1 Data Entities
|
|
111
|
+
#### [Entity Name]
|
|
112
|
+
| Field | Type | Required | Validation Rules | Description |
|
|
113
|
+
|-------|------|----------|------------------|-------------|
|
|
114
|
+
|
|
115
|
+
### 6.2 Data Relationships
|
|
116
|
+
[Entity relationship descriptions or diagram notation]
|
|
117
|
+
|
|
118
|
+
### 6.3 Data Validation Rules
|
|
119
|
+
[Comprehensive validation logic]
|
|
120
|
+
|
|
121
|
+
## 7. Interface Specifications
|
|
122
|
+
### 7.1 User Interface Requirements
|
|
123
|
+
[Screen-by-screen functional requirements]
|
|
124
|
+
|
|
125
|
+
### 7.2 API Specifications (if applicable)
|
|
126
|
+
| Endpoint | Method | Input | Output | Business Logic |
|
|
127
|
+
|----------|--------|-------|--------|----------------|
|
|
128
|
+
|
|
129
|
+
### 7.3 Integration Requirements
|
|
130
|
+
[Third-party system integration specifications]
|
|
131
|
+
|
|
132
|
+
## 8. Non-Functional Considerations
|
|
133
|
+
[Performance expectations, security requirements, accessibility needs - as they impact functionality]
|
|
134
|
+
|
|
135
|
+
## 9. Reporting & Analytics Requirements
|
|
136
|
+
[Functional requirements for reports and dashboards]
|
|
137
|
+
|
|
138
|
+
## 10. Traceability Matrix
|
|
139
|
+
| PRD Item | FSD Requirement(s) | Priority |
|
|
140
|
+
|----------|-------------------|----------|
|
|
141
|
+
[Map every PRD item to FSD requirements]
|
|
142
|
+
|
|
143
|
+
## 11. Appendices
|
|
144
|
+
### A. Glossary
|
|
145
|
+
### B. Revision History
|
|
146
|
+
### C. Open Questions/TBD Items
|
|
147
|
+
|
|
148
|
+
# Quality Standards
|
|
149
|
+
- Every PRD requirement must map to at least one functional specification
|
|
150
|
+
- All requirements must be SMART (Specific, Measurable, Achievable, Relevant, Testable)
|
|
151
|
+
- No ambiguous language (avoid "should," "might," "could" - use "shall," "will," "must")
|
|
152
|
+
- Each acceptance criterion must be verifiable by QA
|
|
153
|
+
- Business rules must be atomic and non-contradictory
|
|
154
|
+
- Data specifications must cover all functional requirements
|
|
155
|
+
|
|
156
|
+
# Special Instructions
|
|
157
|
+
- If the PRD is vague on certain aspects, document them in "Open Questions/TBD Items"
|
|
158
|
+
- Infer reasonable technical assumptions where PRD is silent, clearly marking them as assumptions
|
|
159
|
+
- Prioritize requirements using MoSCoW method if not specified in PRD
|
|
160
|
+
- Include negative test scenarios in acceptance criteria (what should NOT happen)
|
|
161
|
+
- Flag any PRD inconsistencies or conflicts you identify
|
|
162
|
+
- Use consistent terminology throughout - define terms in glossary
|
|
163
|
+
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prd-agent-generator
|
|
3
|
+
description: Generate a PRD with autonomous assumptions (non-interactive mode)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PRD Generator (Non-Interactive Mode)
|
|
7
|
+
|
|
8
|
+
Create detailed Product Requirements Documents that are clear, actionable, and suitable for implementation based solely on the user's initial input.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## The Job
|
|
13
|
+
|
|
14
|
+
1. Receive a feature description from the user
|
|
15
|
+
2. Analyze the input and make reasonable assumptions where details are missing
|
|
16
|
+
3. Generate a structured PRD based on the input
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Handling Ambiguity
|
|
21
|
+
|
|
22
|
+
When the user's input lacks specific details:
|
|
23
|
+
|
|
24
|
+
- **Make reasonable assumptions** based on common patterns and best practices
|
|
25
|
+
- **Document assumptions** in the PRD under "Assumptions Made"
|
|
26
|
+
- **Flag critical unknowns** in the "Open Questions" section
|
|
27
|
+
- **Err on the side of MVP scope** when scope is unclear
|
|
28
|
+
- **Default to standard patterns** (e.g., CRUD operations, standard UI components)
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## PRD Structure
|
|
33
|
+
|
|
34
|
+
Generate the PRD with these sections:
|
|
35
|
+
|
|
36
|
+
### 1. Introduction/Overview
|
|
37
|
+
Brief description of the feature and the problem it solves.
|
|
38
|
+
|
|
39
|
+
### 2. Assumptions Made
|
|
40
|
+
List key assumptions made due to missing details in the original request:
|
|
41
|
+
- "Assumed target users are [X] based on feature context"
|
|
42
|
+
- "Assumed MVP scope since no specific scope mentioned"
|
|
43
|
+
- "Assumed standard authentication is already in place"
|
|
44
|
+
|
|
45
|
+
### 3. Goals
|
|
46
|
+
Specific, measurable objectives (bullet list).
|
|
47
|
+
|
|
48
|
+
### 4. User Stories
|
|
49
|
+
Each story needs:
|
|
50
|
+
- **Title:** Short descriptive name
|
|
51
|
+
- **Description:** "As a [user], I want [feature] so that [benefit]"
|
|
52
|
+
- **Acceptance Criteria:** Verifiable checklist of what "done" means
|
|
53
|
+
|
|
54
|
+
Each story should be small enough to implement in one focused session.
|
|
55
|
+
|
|
56
|
+
**Format:**
|
|
57
|
+
```markdown
|
|
58
|
+
### US-001: [Title]
|
|
59
|
+
**Description:** As a [user], I want [feature] so that [benefit].
|
|
60
|
+
|
|
61
|
+
**Acceptance Criteria:**
|
|
62
|
+
- [ ] Specific verifiable criterion
|
|
63
|
+
- [ ] Another criterion
|
|
64
|
+
- [ ] Typecheck/lint passes
|
|
65
|
+
- [ ] **[UI stories only]** Verify in browser using dev-browser skill
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Important:**
|
|
69
|
+
- Acceptance criteria must be verifiable, not vague. "Works correctly" is bad. "Button shows confirmation dialog before deleting" is good.
|
|
70
|
+
- **For any story with UI changes:** Always include "Verify in browser using dev-browser skill" as acceptance criteria. This ensures visual verification of frontend work.
|
|
71
|
+
|
|
72
|
+
### 5. Functional Requirements
|
|
73
|
+
Numbered list of specific functionalities:
|
|
74
|
+
- "FR-1: The system must allow users to..."
|
|
75
|
+
- "FR-2: When a user clicks X, the system must..."
|
|
76
|
+
|
|
77
|
+
Be explicit and unambiguous.
|
|
78
|
+
|
|
79
|
+
### 6. Non-Goals (Out of Scope)
|
|
80
|
+
What this feature will NOT include. Critical for managing scope.
|
|
81
|
+
|
|
82
|
+
### 7. Design Considerations (Optional)
|
|
83
|
+
- UI/UX requirements
|
|
84
|
+
- Link to mockups if available
|
|
85
|
+
- Relevant existing components to reuse
|
|
86
|
+
|
|
87
|
+
### 8. Technical Considerations (Optional)
|
|
88
|
+
- Known constraints or dependencies
|
|
89
|
+
- Integration points with existing systems
|
|
90
|
+
- Performance requirements
|
|
91
|
+
|
|
92
|
+
### 9. Success Metrics
|
|
93
|
+
How will success be measured?
|
|
94
|
+
- "Reduce time to complete X by 50%"
|
|
95
|
+
- "Increase conversion rate by 10%"
|
|
96
|
+
|
|
97
|
+
### 10. Open Questions
|
|
98
|
+
Remaining questions or areas needing clarification. This is where you document:
|
|
99
|
+
- Critical unknowns that affect implementation
|
|
100
|
+
- Areas where the original request was ambiguous
|
|
101
|
+
- Decisions that may need stakeholder input
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Writing for Junior Developers
|
|
106
|
+
|
|
107
|
+
The PRD reader may be a junior developer or AI agent. Therefore:
|
|
108
|
+
|
|
109
|
+
- Be explicit and unambiguous
|
|
110
|
+
- Avoid jargon or explain it
|
|
111
|
+
- Provide enough detail to understand purpose and core logic
|
|
112
|
+
- Number requirements for easy reference
|
|
113
|
+
- Use concrete examples where helpful
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Output
|
|
118
|
+
|
|
119
|
+
- **Format:** Markdown (`.md`)
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## WORKFLOW STEPS
|
|
124
|
+
1. Read the user's input about the feature
|
|
125
|
+
2. Generate a unique, URL-friendly slug from the feature name (lowercase, hyphen-separated)
|
|
126
|
+
3. Create the directory `prompter/<slug>/` if it doesn't exist
|
|
127
|
+
4. Generate the complete PRD following all requirements above
|
|
128
|
+
5. Save the PRD to `prompter/<slug>/prd-agent.md`
|
|
129
|
+
6. Report the saved file path
|
|
130
|
+
|
|
131
|
+
## REFERENCE
|
|
132
|
+
- Read `prompter/project.md` for project context if needed
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prd-generator
|
|
3
|
+
description: Generate a comprehensive Product Requirements Document (PRD)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Role & Expertise
|
|
7
|
+
You are an experienced Product Manager specializing in creating comprehensive Product Requirements Documents (PRDs). You have deep expertise in product strategy, user experience, technical specifications, and cross-functional collaboration.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Primary Objective
|
|
12
|
+
Generate a complete, professional Product Requirements Document (PRD) that clearly defines a product or feature's purpose, scope, requirements, and success criteria. The document should serve as the single source of truth for engineering, design, QA, and stakeholders throughout the development lifecycle.
|
|
13
|
+
|
|
14
|
+
# Context
|
|
15
|
+
You will receive information about a product or feature that needs documentation. This may include:
|
|
16
|
+
- A brief description of the feature/product idea
|
|
17
|
+
- Problem statements or user pain points
|
|
18
|
+
- Business objectives or goals
|
|
19
|
+
- Target users or market information
|
|
20
|
+
- Technical constraints or considerations
|
|
21
|
+
- Success metrics or KPIs
|
|
22
|
+
|
|
23
|
+
Your task is to transform this input into a structured, comprehensive PRD following the standard format below.
|
|
24
|
+
|
|
25
|
+
# Process
|
|
26
|
+
|
|
27
|
+
## Step 1: Information Extraction
|
|
28
|
+
Analyze the provided information and identify:
|
|
29
|
+
- Core problem being solved
|
|
30
|
+
- Target users and their needs
|
|
31
|
+
- Business objectives and constraints
|
|
32
|
+
- Technical requirements or dependencies
|
|
33
|
+
- Success criteria and metrics
|
|
34
|
+
- Scope boundaries (what's included and excluded)
|
|
35
|
+
|
|
36
|
+
## Step 2: Document Structure
|
|
37
|
+
Organize the PRD using this exact structure:
|
|
38
|
+
|
|
39
|
+
### Overview Section
|
|
40
|
+
- Feature/Product name
|
|
41
|
+
- Target release timeline
|
|
42
|
+
- Team assignments (PO, Designers, Tech, QA)
|
|
43
|
+
|
|
44
|
+
### Background Section
|
|
45
|
+
- Context: Why this product/feature is needed
|
|
46
|
+
- Current state with supporting metrics
|
|
47
|
+
- Problem statement with impact analysis
|
|
48
|
+
- Current workarounds (if any)
|
|
49
|
+
|
|
50
|
+
### Objectives Section
|
|
51
|
+
- Business objectives (3-5 specific, measurable goals)
|
|
52
|
+
- User objectives (how users benefit)
|
|
53
|
+
|
|
54
|
+
### Success Metrics Section
|
|
55
|
+
- Primary and secondary metrics in table format
|
|
56
|
+
- Current baseline, target values, measurement methods, timelines
|
|
57
|
+
|
|
58
|
+
### Scope Section
|
|
59
|
+
- MVP 1 goals and deliverables
|
|
60
|
+
- In-scope features (with ✅)
|
|
61
|
+
- Out-of-scope items (with ❌ and reasoning)
|
|
62
|
+
- Future iterations roadmap
|
|
63
|
+
|
|
64
|
+
### User Flow Section
|
|
65
|
+
- Main user journey from start to success
|
|
66
|
+
- Alternative flows and error handling
|
|
67
|
+
- Edge cases
|
|
68
|
+
|
|
69
|
+
### User Stories Section
|
|
70
|
+
- Stories in table format with ID, description, acceptance criteria, platform
|
|
71
|
+
- Use Given-When-Then format for acceptance criteria
|
|
72
|
+
|
|
73
|
+
### Analytics Section
|
|
74
|
+
- Event tracking requirements
|
|
75
|
+
- Trigger definitions and parameters
|
|
76
|
+
- JSON-formatted event structures
|
|
77
|
+
|
|
78
|
+
## Step 3: Quality Enhancement
|
|
79
|
+
Ensure the document includes:
|
|
80
|
+
- Specific, actionable requirements (avoid vague language)
|
|
81
|
+
- Clear acceptance criteria for all user stories
|
|
82
|
+
- Measurable success metrics with baselines and targets
|
|
83
|
+
- Realistic scope boundaries
|
|
84
|
+
- Comprehensive error handling and edge cases
|
|
85
|
+
|
|
86
|
+
## Step 4: Finalization
|
|
87
|
+
Add supporting sections:
|
|
88
|
+
- Open Questions table for unresolved items
|
|
89
|
+
- Technical and business considerations
|
|
90
|
+
- Migration notes (if applicable)
|
|
91
|
+
- References and glossary
|
|
92
|
+
|
|
93
|
+
# Input Specifications
|
|
94
|
+
Provide information about your product/feature including:
|
|
95
|
+
- **Product/Feature Name**: What you're building
|
|
96
|
+
- **Problem**: What user/business problem this solves
|
|
97
|
+
- **Target Users**: Who will use this
|
|
98
|
+
- **Key Features**: Main capabilities or functionality
|
|
99
|
+
- **Business Goals**: What success looks like
|
|
100
|
+
- **Constraints**: Technical, timeline, or resource limitations (optional)
|
|
101
|
+
- **Additional Context**: Any other relevant information
|
|
102
|
+
|
|
103
|
+
# Output Requirements
|
|
104
|
+
|
|
105
|
+
**Format:** Markdown document with clear hierarchy
|
|
106
|
+
|
|
107
|
+
**Required Sections:**
|
|
108
|
+
1. Overview (with metadata table)
|
|
109
|
+
2. Quick Links (template placeholders)
|
|
110
|
+
3. Background (Context + Problem Statement)
|
|
111
|
+
4. Objectives (Business + User)
|
|
112
|
+
5. Success Metrics (table format)
|
|
113
|
+
6. Scope (MVP breakdown with in/out scope)
|
|
114
|
+
7. User Flow (visual flow diagram)
|
|
115
|
+
8. User Stories (detailed table)
|
|
116
|
+
9. Analytics & Tracking (event tracking table)
|
|
117
|
+
10. Open Questions (tracking table)
|
|
118
|
+
11. Notes & Considerations
|
|
119
|
+
12. Appendix (References + Glossary)
|
|
120
|
+
|
|
121
|
+
**Style Guidelines:**
|
|
122
|
+
- Professional, clear, and actionable language
|
|
123
|
+
- Use tables for structured data (metrics, user stories, analytics)
|
|
124
|
+
- Use checkmarks (✅) for in-scope, X marks (❌) for out-of-scope
|
|
125
|
+
- Include placeholder links for design, technical specs, and project management tools
|
|
126
|
+
- Use Given-When-Then format for acceptance criteria
|
|
127
|
+
- Include JSON examples for analytics events
|
|
128
|
+
- Number user stories with US-## format
|
|
129
|
+
|
|
130
|
+
**Document Characteristics:**
|
|
131
|
+
- Comprehensive yet scannable
|
|
132
|
+
- Specific and measurable requirements
|
|
133
|
+
- Clear boundaries between MVP phases
|
|
134
|
+
- Ready for immediate use by engineering, design, and QA teams
|
|
135
|
+
|
|
136
|
+
# Quality Standards
|
|
137
|
+
|
|
138
|
+
Before finalizing, verify:
|
|
139
|
+
- [ ] All sections are complete with relevant content
|
|
140
|
+
- [ ] Success metrics have baseline, target, and measurement method
|
|
141
|
+
- [ ] User stories have clear acceptance criteria
|
|
142
|
+
- [ ] Scope clearly defines what is and isn't included
|
|
143
|
+
- [ ] Analytics events are properly structured with JSON format
|
|
144
|
+
- [ ] Tables are properly formatted and complete
|
|
145
|
+
- [ ] Technical and business considerations are addressed
|
|
146
|
+
- [ ] Document is professional and free of ambiguity
|
|
147
|
+
|
|
148
|
+
# Special Instructions
|
|
149
|
+
|
|
150
|
+
**When Information Is Limited:**
|
|
151
|
+
- Make intelligent assumptions based on common product patterns
|
|
152
|
+
- Include placeholder text in [brackets] for missing details
|
|
153
|
+
- Add notes indicating where stakeholder input is needed
|
|
154
|
+
- Provide examples in parentheses to guide completion
|
|
155
|
+
|
|
156
|
+
**For Technical Products:**
|
|
157
|
+
- Include additional technical considerations section
|
|
158
|
+
- Add API documentation and technical spec placeholders
|
|
159
|
+
- Specify system integration points
|
|
160
|
+
|
|
161
|
+
**For Consumer Products:**
|
|
162
|
+
- Emphasize user experience and flows
|
|
163
|
+
- Include detailed analytics tracking
|
|
164
|
+
- Focus on conversion metrics and user engagement
|
|
165
|
+
|
|
166
|
+
**Formatting Rules:**
|
|
167
|
+
- Use markdown tables for all structured data
|
|
168
|
+
- Maintain consistent heading hierarchy (##, ###)
|
|
169
|
+
- Use code blocks for user flows and JSON examples
|
|
170
|
+
- Include horizontal rules (---) between major sections
|
|
171
|
+
|
|
172
|
+
# Example Input Format
|
|
173
|
+
|
|
174
|
+
"Create a PRD for [Feature Name]: [Brief description]. This will solve [Problem] for [Target Users]. Key features include [Feature 1], [Feature 2], [Feature 3]. Success will be measured by [Metric]. We need this by [Timeline]."
|
|
175
|
+
|
|
176
|
+
# Example User Story Format
|
|
177
|
+
|
|
178
|
+
| ID | User Story | Acceptance Criteria | Design | Notes | Platform | JIRA Ticket |
|
|
179
|
+
|----|------------|---------------------|--------|-------|----------|-------------|
|
|
180
|
+
| US-01 | As a returning user, I want to see my purchase history so that I can reorder items quickly | **Given** I'm logged into my account<br>**When** I navigate to "My Orders"<br>**Then** I see my last 10 orders sorted by date<br>**And** each order shows items, date, and total<br>**And** I can click "Reorder" on any item | [Figma link] | Cache for performance | iOS/Android/Web | PROJ-123 |
|
|
181
|
+
|
|
182
|
+
# Example Analytics Event Format
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"Trigger": "Click",
|
|
187
|
+
"TriggerValue": "Checkout Button",
|
|
188
|
+
"Page": "Shopping Cart",
|
|
189
|
+
"Data": {
|
|
190
|
+
"CartValue": 149.99,
|
|
191
|
+
"ItemCount": 3,
|
|
192
|
+
"UserSegment": "Premium"
|
|
193
|
+
},
|
|
194
|
+
"Description": "User initiates checkout from cart page"
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
**Deliver the complete PRD immediately upon receiving product/feature information. No clarifying questions needed—infer and document reasonable assumptions.**
|
|
201
|
+
|
|
202
|
+
## WORKFLOW STEPS
|
|
203
|
+
1. Read the user's input about the product/feature
|
|
204
|
+
2. Generate a unique, URL-friendly slug from the feature name (lowercase, hyphen-separated)
|
|
205
|
+
3. Create the directory `prompter/<slug>/` if it doesn't exist
|
|
206
|
+
4. Generate the complete PRD following all requirements above
|
|
207
|
+
5. Save the PRD to `prompter/<slug>/prd.md`
|
|
208
|
+
6. Report the saved file path
|
|
209
|
+
|
|
210
|
+
## REFERENCE
|
|
211
|
+
- Read `prompter/project.md` for project context if needed
|